momentic 0.0.9 → 0.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.
Files changed (2) hide show
  1. package/bin/cli.js +7 -4
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -2935,7 +2935,7 @@ var executeTest = async ({
2935
2935
  return failed;
2936
2936
  };
2937
2937
 
2938
- // src/run-test.ts
2938
+ // src/logger.ts
2939
2939
  var consoleLogger = {
2940
2940
  info: console.log,
2941
2941
  error: console.error,
@@ -2945,6 +2945,8 @@ var consoleLogger = {
2945
2945
  flush: () => {
2946
2946
  }
2947
2947
  };
2948
+
2949
+ // src/run-test.ts
2948
2950
  async function runTest({
2949
2951
  testId,
2950
2952
  apiClient,
@@ -2979,6 +2981,7 @@ async function runTest({
2979
2981
  }
2980
2982
  });
2981
2983
  } catch (err) {
2984
+ consoleLogger.error(err);
2982
2985
  await apiClient.updateRun(run.id, {
2983
2986
  status: "FAILED",
2984
2987
  finishedAt: /* @__PURE__ */ new Date()
@@ -3026,8 +3029,8 @@ program.command("run-tests").addOption(
3026
3029
  baseURL: "https://api.momentic.ai",
3027
3030
  apiKey
3028
3031
  });
3029
- const promises = tests.map((testId) => {
3030
- const failed = runTest({
3032
+ const promises = tests.map(async (testId) => {
3033
+ const failed = await runTest({
3031
3034
  testId,
3032
3035
  apiClient,
3033
3036
  generator: apiGenerator
@@ -3039,7 +3042,7 @@ program.command("run-tests").addOption(
3039
3042
  if (failedResults.length > 0) {
3040
3043
  console.log(
3041
3044
  chalk.red(
3042
- `Failed ${failedResults.length} out of ${results.length} tests`
3045
+ `Failed ${failedResults.length} out of ${results.length} tests:`
3043
3046
  )
3044
3047
  );
3045
3048
  failedResults.forEach((result) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "momentic",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "The Momentic SDK for Node.js",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",