@dev-blinq/cucumber_client 1.0.1734-dev → 1.0.1736-dev

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.
@@ -11,14 +11,8 @@ import { generateApiCode } from "../code_gen/api_codegen.js";
11
11
  import { tmpdir } from "node:os";
12
12
  import { createHash } from "node:crypto";
13
13
  import { getErrorMessage } from "../utils/socket_logger.js";
14
- import {
15
- FIXED_FILE_NAMES,
16
- FIXED_FOLDER_NAMES,
17
- SaveJobErrorType,
18
- UpdateStepDefinitionsError,
19
- UTF8_ENCODING,
20
- } from "./constants.js";
21
- import { handleFileInitOps, potentialErrorWrapper, processScenarioSteps, writeTemplateFiles } from "./utils.js";
14
+ import { FIXED_FOLDER_NAMES, SaveJobErrorType, UpdateStepDefinitionsError, UTF8_ENCODING } from "./constants.js";
15
+ import { handleFileInitOps, potentialErrorWrapper } from "./utils.js";
22
16
 
23
17
  const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
24
18
 
@@ -1055,15 +1049,17 @@ export async function updateStepDefinitions({ scenario, featureName, projectDir,
1055
1049
  });
1056
1050
  }
1057
1051
  } catch (error) {
1058
- throw new UpdateStepDefinitionsError({
1059
- type: SaveJobErrorType.STEP_DEFINITION_UPDATE_FAILED,
1060
- message: "Failed to update step definition",
1061
- meta: {
1062
- stepIndex: index,
1063
- stepText: step.text,
1064
- reason: getErrorMessage(error),
1065
- },
1066
- });
1052
+ throw error instanceof UpdateStepDefinitionsError
1053
+ ? error
1054
+ : new UpdateStepDefinitionsError({
1055
+ type: SaveJobErrorType.STEP_DEFINITION_UPDATE_FAILED,
1056
+ message: "Failed to update step definition",
1057
+ meta: {
1058
+ stepIndex: index,
1059
+ stepText: step.text,
1060
+ reason: getErrorMessage(error),
1061
+ },
1062
+ });
1067
1063
  }
1068
1064
  }
1069
1065
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-blinq/cucumber_client",
3
- "version": "1.0.1734-dev",
3
+ "version": "1.0.1736-dev",
4
4
  "description": " ",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",