@empiricalrun/test-gen 0.38.34 → 0.38.36
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 +13 -0
- package/dist/bin/index.js +0 -2
- package/dist/session/index.d.ts.map +1 -1
- package/dist/session/index.js +0 -4
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +5 -0
- package/package.json +9 -5
- package/dist/reporter/ci.d.ts +0 -3
- package/dist/reporter/ci.d.ts.map +0 -1
- package/dist/reporter/ci.js +0 -40
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @empiricalrun/test-gen
|
|
2
2
|
|
|
3
|
+
## 0.38.36
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c7c0cc7: feat: migrate from testcase to session for test generation
|
|
8
|
+
|
|
9
|
+
## 0.38.35
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 351950a: fix: allow gist generation for setup project test cases
|
|
14
|
+
- 21d58e7: feat: add session status
|
|
15
|
+
|
|
3
16
|
## 0.38.34
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/bin/index.js
CHANGED
|
@@ -12,7 +12,6 @@ const run_2 = require("../agent/codegen/run");
|
|
|
12
12
|
const infer_agent_1 = require("../agent/infer-agent");
|
|
13
13
|
const run_3 = require("../agent/planner/run");
|
|
14
14
|
const reporter_1 = require("../reporter");
|
|
15
|
-
const ci_1 = require("../reporter/ci");
|
|
16
15
|
const session_1 = require("../session");
|
|
17
16
|
const test_build_1 = require("../test-build");
|
|
18
17
|
const logger_1 = require("./logger");
|
|
@@ -141,7 +140,6 @@ async function runAgent(testGenConfig) {
|
|
|
141
140
|
});
|
|
142
141
|
}
|
|
143
142
|
// TODO: move these reporters to a better lifecycle
|
|
144
|
-
await (0, ci_1.reportOnCI)(testGenConfig.testCase);
|
|
145
143
|
await (0, llm_1.flushAllTraces)();
|
|
146
144
|
await (0, logger_1.waitForLogsToFlush)();
|
|
147
145
|
await (0, session_1.endSession)();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAkBA,iBAAS,iBAAiB;;;;;EAOzB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,YAAY,EACZ,UAAU,EACV,eAAe,GAChB,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB,QAIA;AAED,wBAAsB,iBAAiB,qBAItC;AAED,wBAAsB,eAAe,0DA0BpC;AAED,wBAAsB,UAAU,kBAqB/B;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
package/dist/session/index.js
CHANGED
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getSessionDetails = exports.endSession = exports.getSessionState = exports.shouldStopSession = exports.setSessionDetails = void 0;
|
|
7
7
|
const package_json_1 = __importDefault(require("../../package.json"));
|
|
8
|
-
const logger_1 = require("../bin/logger");
|
|
9
8
|
const sessionDetails = {
|
|
10
9
|
sessionId: undefined,
|
|
11
10
|
version: package_json_1.default.version,
|
|
@@ -32,9 +31,6 @@ exports.setSessionDetails = setSessionDetails;
|
|
|
32
31
|
async function shouldStopSession() {
|
|
33
32
|
const sessionState = await getSessionState();
|
|
34
33
|
const shouldStopSession = sessionState !== "started";
|
|
35
|
-
if (shouldStopSession) {
|
|
36
|
-
new logger_1.CustomLogger().warn(`Generation to be stopped due to session state marked as ${sessionState}`);
|
|
37
|
-
}
|
|
38
34
|
return shouldStopSession;
|
|
39
35
|
}
|
|
40
36
|
exports.shouldStopSession = shouldStopSession;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTypescriptTestBlock = void 0;
|
|
4
|
+
var web_1 = require("../bin/utils/platform/web");
|
|
5
|
+
Object.defineProperty(exports, "getTypescriptTestBlock", { enumerable: true, get: function () { return web_1.getTypescriptTestBlock; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empiricalrun/test-gen",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.36",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -14,10 +14,6 @@
|
|
|
14
14
|
"types": "./dist/agent/infer-agent/index.d.ts",
|
|
15
15
|
"default": "./dist/agent/infer-agent/index.js"
|
|
16
16
|
},
|
|
17
|
-
"./types": {
|
|
18
|
-
"types": "./dist/types/index.d.ts",
|
|
19
|
-
"default": "./dist/types/index.js"
|
|
20
|
-
},
|
|
21
17
|
"./agent/master/run": {
|
|
22
18
|
"types": "./dist/agent/master/run.d.ts",
|
|
23
19
|
"default": "./dist/agent/master/run.js"
|
|
@@ -26,6 +22,14 @@
|
|
|
26
22
|
"types": "./dist/agent/master/planner.d.ts",
|
|
27
23
|
"default": "./dist/agent/master/planner.js"
|
|
28
24
|
},
|
|
25
|
+
"./types": {
|
|
26
|
+
"types": "./dist/types/index.d.ts",
|
|
27
|
+
"default": "./dist/types/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./utils": {
|
|
30
|
+
"types": "./dist/utils/index.d.ts",
|
|
31
|
+
"default": "./dist/utils/index.js"
|
|
32
|
+
},
|
|
29
33
|
".": {
|
|
30
34
|
"types": "./dist/index.d.ts",
|
|
31
35
|
"default": "./dist/index.js"
|
package/dist/reporter/ci.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ci.d.ts","sourceRoot":"","sources":["../../src/reporter/ci.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGpC,wBAAsB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAWtE"}
|
package/dist/reporter/ci.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
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
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.reportOnCI = void 0;
|
|
27
|
-
const core = __importStar(require("@actions/core"));
|
|
28
|
-
const slug_1 = require("../utils/slug");
|
|
29
|
-
async function reportOnCI(testCase) {
|
|
30
|
-
if (process.env.CI) {
|
|
31
|
-
const slug = await (0, slug_1.asyncGenerateRandomSlug)(10);
|
|
32
|
-
const branchName = `test-${testCase.id}-${slug}`;
|
|
33
|
-
const scenariosOutput = `**Scenario:** ${testCase.name} \n\n**Steps:**\n - ${testCase.steps.join("\n - ")}`;
|
|
34
|
-
core.setOutput("summary", scenariosOutput);
|
|
35
|
-
core.setOutput("test_names", testCase.name);
|
|
36
|
-
core.setOutput("branch_name", branchName);
|
|
37
|
-
}
|
|
38
|
-
return testCase;
|
|
39
|
-
}
|
|
40
|
-
exports.reportOnCI = reportOnCI;
|