@empiricalrun/test-gen 0.16.9 → 0.16.11

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.11
4
+
5
+ ### Patch Changes
6
+
7
+ - 1daf179: fix: add outputs using core actions pkg
8
+
9
+ ## 0.16.10
10
+
11
+ ### Patch Changes
12
+
13
+ - ef600f4: chore: add github output logs
14
+
3
15
  ## 0.16.9
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,uBAoBrD"}
1
+ {"version":3,"file":"ci.d.ts","sourceRoot":"","sources":["../../src/reporter/ci.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,wBAAsB,UAAU,CAAC,SAAS,EAAE,QAAQ,EAAE,uBAkBrD"}
@@ -1,28 +1,50 @@
1
1
  "use strict";
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;
24
+ };
2
25
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
27
  };
5
28
  Object.defineProperty(exports, "__esModule", { value: true });
6
29
  exports.reportOnCI = void 0;
30
+ const core = __importStar(require("@actions/core"));
7
31
  const fs_extra_1 = __importDefault(require("fs-extra"));
8
32
  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_164d8f7d-e2ff-4ffd-b191-d2556125556a");
33
+ console.log("reportOnCI");
11
34
  console.log("scenarios", JSON.stringify(scenarios, null, 2));
12
- if ("true" && "/home/runner/work/_temp/_runner_file_commands/set_output_164d8f7d-e2ff-4ffd-b191-d2556125556a") {
35
+ if ("true" && "/home/runner/work/_temp/_runner_file_commands/set_output_97540806-e920-44fb-9cbf-7ec96b1e22ed") {
13
36
  const testNames = scenarios.map((s) => s.name).join(" ");
14
37
  const scenariosOutput = scenarios
15
38
  .map((s) => {
16
39
  return `**Scenario:** ${s.name} \n\n**Steps:**\n - ${s.steps.join("\n - ")} \n\n**Assert**:\n - ${s.assert}\n\n ----`;
17
40
  })
18
41
  .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_164d8f7d-e2ff-4ffd-b191-d2556125556a", envVars, {
24
- encoding: "utf8",
25
- });
42
+ console.log("scenariosOutput", scenariosOutput);
43
+ console.log("testNames", testNames);
44
+ core.setOutput("summary", scenariosOutput);
45
+ core.setOutput("test_names", testNames);
46
+ const file = fs_extra_1.default.readFileSync("/home/runner/work/_temp/_runner_file_commands/set_output_97540806-e920-44fb-9cbf-7ec96b1e22ed");
47
+ console.log("github output content", file.toString());
26
48
  }
27
49
  return scenarios;
28
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.16.9",
3
+ "version": "0.16.11",
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",