@empiricalrun/test-gen 0.16.10 → 0.16.12

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @empiricalrun/test-gen
2
2
 
3
+ ## 0.16.12
4
+
5
+ ### Patch Changes
6
+
7
+ - 9ad9089: fix: github output read file error
8
+
9
+ ## 0.16.11
10
+
11
+ ### Patch Changes
12
+
13
+ - 1daf179: fix: add outputs using core actions pkg
14
+
3
15
  ## 0.16.10
4
16
 
5
17
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"ci.d.ts","sourceRoot":"","sources":["../../src/reporter/ci.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,wBAAsB,UAAU,CAAC,SAAS,EAAE,QAAQ,EAAE,uBAsBrD"}
1
+ {"version":3,"file":"ci.d.ts","sourceRoot":"","sources":["../../src/reporter/ci.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,wBAAsB,UAAU,CAAC,SAAS,EAAE,QAAQ,EAAE,uBAgBrD"}
@@ -1,30 +1,44 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
4
24
  };
5
25
  Object.defineProperty(exports, "__esModule", { value: true });
6
26
  exports.reportOnCI = void 0;
7
- const fs_extra_1 = __importDefault(require("fs-extra"));
27
+ const core = __importStar(require("@actions/core"));
8
28
  async function reportOnCI(scenarios) {
9
- console.log("env::CI", "true");
10
- console.log("env::GITHUB_OUTPUT", "/home/runner/work/_temp/_runner_file_commands/set_output_1e614189-e40a-4b20-8ef0-f15bc9e3828d");
29
+ console.log("reportOnCI");
11
30
  console.log("scenarios", JSON.stringify(scenarios, null, 2));
12
- if ("true" && "/home/runner/work/_temp/_runner_file_commands/set_output_1e614189-e40a-4b20-8ef0-f15bc9e3828d") {
31
+ if ("true" && "/home/runner/work/_temp/_runner_file_commands/set_output_b6c7d510-b621-4566-8d08-029d47d3d4c7") {
13
32
  const testNames = scenarios.map((s) => s.name).join(" ");
14
33
  const scenariosOutput = scenarios
15
34
  .map((s) => {
16
35
  return `**Scenario:** ${s.name} \n\n**Steps:**\n - ${s.steps.join("\n - ")} \n\n**Assert**:\n - ${s.assert}\n\n ----`;
17
36
  })
18
37
  .join("\n ----- \n");
19
- const envVars = [
20
- `summary<<EOF\n${scenariosOutput}\nEOF`,
21
- `test_names=${testNames}`,
22
- ].join("\n");
23
- fs_extra_1.default.appendFileSync("/home/runner/work/_temp/_runner_file_commands/set_output_1e614189-e40a-4b20-8ef0-f15bc9e3828d", envVars, {
24
- encoding: "utf8",
25
- });
26
- const file = fs_extra_1.default.readFileSync("/home/runner/work/_temp/_runner_file_commands/set_output_1e614189-e40a-4b20-8ef0-f15bc9e3828d");
27
- console.log("github output content", file.toString());
38
+ console.log("scenariosOutput", scenariosOutput);
39
+ console.log("testNames", testNames);
40
+ core.setOutput("summary", scenariosOutput);
41
+ core.setOutput("test_names", testNames);
28
42
  }
29
43
  return scenarios;
30
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.16.10",
3
+ "version": "0.16.12",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -15,6 +15,7 @@
15
15
  },
16
16
  "author": "Empirical Team <hey@empirical.run>",
17
17
  "dependencies": {
18
+ "@actions/core": "^1.10.1",
18
19
  "@aws-sdk/client-s3": "^3.614.0",
19
20
  "@aws-sdk/s3-request-presigner": "^3.614.0",
20
21
  "@types/sanitize-html": "^2.11.0",