@kaiord/cli 3.0.0 → 4.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/bin/kaiord.js +38 -8
- package/package.json +5 -3
package/dist/bin/kaiord.js
CHANGED
|
@@ -151,11 +151,14 @@ init_esm_shims();
|
|
|
151
151
|
// src/commands/convert/index.ts
|
|
152
152
|
init_esm_shims();
|
|
153
153
|
import {
|
|
154
|
+
createDefaultProviders,
|
|
154
155
|
FitParsingError as FitParsingError3,
|
|
155
156
|
KrdValidationError as KrdValidationError3,
|
|
156
157
|
ToleranceExceededError as ToleranceExceededError3
|
|
157
158
|
} from "@kaiord/core";
|
|
158
|
-
import {
|
|
159
|
+
import { createFitProviders } from "@kaiord/fit";
|
|
160
|
+
import { createTcxProviders } from "@kaiord/tcx";
|
|
161
|
+
import { createZwoProviders } from "@kaiord/zwo";
|
|
159
162
|
|
|
160
163
|
// src/utils/config-loader.ts
|
|
161
164
|
init_esm_shims();
|
|
@@ -1007,7 +1010,14 @@ var convertCommand = async (options) => {
|
|
|
1007
1010
|
});
|
|
1008
1011
|
}
|
|
1009
1012
|
try {
|
|
1010
|
-
const providers =
|
|
1013
|
+
const providers = createDefaultProviders(
|
|
1014
|
+
{
|
|
1015
|
+
fit: createFitProviders(logger),
|
|
1016
|
+
tcx: createTcxProviders(logger),
|
|
1017
|
+
zwo: createZwoProviders(logger)
|
|
1018
|
+
},
|
|
1019
|
+
logger
|
|
1020
|
+
);
|
|
1011
1021
|
if (isBatchMode(validatedOptions.input)) {
|
|
1012
1022
|
return await executeBatchConversion(validatedOptions, providers, logger);
|
|
1013
1023
|
} else {
|
|
@@ -1049,7 +1059,10 @@ init_esm_shims();
|
|
|
1049
1059
|
|
|
1050
1060
|
// src/commands/diff/index.ts
|
|
1051
1061
|
init_esm_shims();
|
|
1052
|
-
import {
|
|
1062
|
+
import { createDefaultProviders as createDefaultProviders2 } from "@kaiord/core";
|
|
1063
|
+
import { createFitProviders as createFitProviders2 } from "@kaiord/fit";
|
|
1064
|
+
import { createTcxProviders as createTcxProviders2 } from "@kaiord/tcx";
|
|
1065
|
+
import { createZwoProviders as createZwoProviders2 } from "@kaiord/zwo";
|
|
1053
1066
|
|
|
1054
1067
|
// src/commands/diff/comparators.ts
|
|
1055
1068
|
init_esm_shims();
|
|
@@ -1057,8 +1070,8 @@ init_esm_shims();
|
|
|
1057
1070
|
// src/commands/diff/compare-steps.ts
|
|
1058
1071
|
init_esm_shims();
|
|
1059
1072
|
var compareSteps = (krd1, krd2) => {
|
|
1060
|
-
const workout1 = krd1.extensions?.
|
|
1061
|
-
const workout2 = krd2.extensions?.
|
|
1073
|
+
const workout1 = krd1.extensions?.structured_workout;
|
|
1074
|
+
const workout2 = krd2.extensions?.structured_workout;
|
|
1062
1075
|
const steps1 = workout1?.steps || [];
|
|
1063
1076
|
const steps2 = workout2?.steps || [];
|
|
1064
1077
|
const differences = [];
|
|
@@ -1242,7 +1255,14 @@ var diffCommand = async (options) => {
|
|
|
1242
1255
|
});
|
|
1243
1256
|
}
|
|
1244
1257
|
try {
|
|
1245
|
-
const providers =
|
|
1258
|
+
const providers = createDefaultProviders2(
|
|
1259
|
+
{
|
|
1260
|
+
fit: createFitProviders2(logger),
|
|
1261
|
+
tcx: createTcxProviders2(logger),
|
|
1262
|
+
zwo: createZwoProviders2(logger)
|
|
1263
|
+
},
|
|
1264
|
+
logger
|
|
1265
|
+
);
|
|
1246
1266
|
logger.debug("Loading files for comparison", {
|
|
1247
1267
|
file1: validatedOptions.file1,
|
|
1248
1268
|
file2: validatedOptions.file2
|
|
@@ -1304,11 +1324,14 @@ var diffCommand = async (options) => {
|
|
|
1304
1324
|
// src/commands/validate.ts
|
|
1305
1325
|
init_esm_shims();
|
|
1306
1326
|
import {
|
|
1327
|
+
createDefaultProviders as createDefaultProviders3,
|
|
1307
1328
|
createToleranceChecker,
|
|
1308
1329
|
toleranceConfigSchema,
|
|
1309
1330
|
validateRoundTrip
|
|
1310
1331
|
} from "@kaiord/core";
|
|
1311
|
-
import {
|
|
1332
|
+
import { createFitProviders as createFitProviders3 } from "@kaiord/fit";
|
|
1333
|
+
import { createTcxProviders as createTcxProviders3 } from "@kaiord/tcx";
|
|
1334
|
+
import { createZwoProviders as createZwoProviders3 } from "@kaiord/zwo";
|
|
1312
1335
|
import { readFile as fsReadFile2 } from "fs/promises";
|
|
1313
1336
|
import ora3 from "ora";
|
|
1314
1337
|
import { z as z5 } from "zod";
|
|
@@ -1378,7 +1401,14 @@ var validateCommand = async (options) => {
|
|
|
1378
1401
|
config: toleranceConfig
|
|
1379
1402
|
});
|
|
1380
1403
|
}
|
|
1381
|
-
const providers =
|
|
1404
|
+
const providers = createDefaultProviders3(
|
|
1405
|
+
{
|
|
1406
|
+
fit: createFitProviders3(logger),
|
|
1407
|
+
tcx: createTcxProviders3(logger),
|
|
1408
|
+
zwo: createZwoProviders3(logger)
|
|
1409
|
+
},
|
|
1410
|
+
logger
|
|
1411
|
+
);
|
|
1382
1412
|
const toleranceChecker = toleranceConfig ? createToleranceChecker(toleranceConfig) : providers.toleranceChecker;
|
|
1383
1413
|
const roundTripValidator = validateRoundTrip(
|
|
1384
1414
|
providers.fitReader,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaiord/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Command-line interface for Kaiord workout file conversion",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -43,8 +43,10 @@
|
|
|
43
43
|
"winston": "^3.11.0",
|
|
44
44
|
"yargs": "^18.0.0",
|
|
45
45
|
"zod": "^3.22.4",
|
|
46
|
-
"@kaiord/
|
|
47
|
-
"@kaiord/
|
|
46
|
+
"@kaiord/core": "^4.0.0",
|
|
47
|
+
"@kaiord/fit": "^4.0.0",
|
|
48
|
+
"@kaiord/tcx": "^4.0.0",
|
|
49
|
+
"@kaiord/zwo": "^4.0.0"
|
|
48
50
|
},
|
|
49
51
|
"devDependencies": {
|
|
50
52
|
"@types/yargs": "^17.0.32",
|