testeranto 0.219.13 → 0.219.15
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/package.json +1 -1
- package/src/testeranto.ts +1 -1
- package/dist/common/allTestsUtils.js +0 -17
- package/dist/common/package.json +0 -3
- package/dist/common/scripts/build-example.js +0 -105
- package/dist/common/src/Init.js +0 -38
- package/dist/common/src/Types.js +0 -63
- package/dist/common/src/esbuildConfigs/consoleDetectorPlugin.js +0 -38
- package/dist/common/src/esbuildConfigs/eslint-formatter-testeranto.js +0 -21
- package/dist/common/src/esbuildConfigs/featuresPlugin.js +0 -39
- package/dist/common/src/esbuildConfigs/index.js +0 -22
- package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +0 -30
- package/dist/common/src/esbuildConfigs/nativeImportDetectorPlugin.js +0 -24
- package/dist/common/src/esbuildConfigs/rebuildPlugin.js +0 -19
- package/dist/common/src/init-docs.js +0 -9
- package/dist/common/src/lib/tiposkripto/BaseGiven.js +0 -96
- package/dist/common/src/lib/tiposkripto/BaseSuite.js +0 -134
- package/dist/common/src/lib/tiposkripto/BaseThen.js +0 -65
- package/dist/common/src/lib/tiposkripto/BaseTiposkripto.js +0 -193
- package/dist/common/src/lib/tiposkripto/BaseWhen.js +0 -46
- package/dist/common/src/lib/tiposkripto/CoreTypes.js +0 -2
- package/dist/common/src/lib/tiposkripto/Node.js +0 -40
- package/dist/common/src/lib/tiposkripto/Tiposkripto.js +0 -49
- package/dist/common/src/lib/tiposkripto/Types.js +0 -2
- package/dist/common/src/lib/tiposkripto/Web.js +0 -70
- package/dist/common/src/lib/tiposkripto/abstractBase.test/MockGiven.js +0 -22
- package/dist/common/src/lib/tiposkripto/abstractBase.test/MockThen.js +0 -16
- package/dist/common/src/lib/tiposkripto/abstractBase.test/MockWhen.js +0 -18
- package/dist/common/src/lib/tiposkripto/abstractBase.test/adapter.js +0 -24
- package/dist/common/src/lib/tiposkripto/abstractBase.test/implementation.js +0 -38
- package/dist/common/src/lib/tiposkripto/abstractBase.test/index.js +0 -17
- package/dist/common/src/lib/tiposkripto/abstractBase.test/specification.js +0 -19
- package/dist/common/src/lib/tiposkripto/abstractBase.test/types.js +0 -2
- package/dist/common/src/lib/tiposkripto/index.js +0 -29
- package/dist/common/src/runtimes.js +0 -4
- package/dist/common/src/server/aider/configParser.js +0 -124
- package/dist/common/src/server/aider/docker.js +0 -30
- package/dist/common/src/server/getRunnables.js +0 -36
- package/dist/common/src/server/htmlTemplate.js +0 -44
- package/dist/common/src/server/nodeVersion.js +0 -5
- package/dist/common/src/server/runtimes/common.js +0 -136
- package/dist/common/src/server/runtimes/golang/docker.js +0 -62
- package/dist/common/src/server/runtimes/java/docker.js +0 -46
- package/dist/common/src/server/runtimes/node/docker.js +0 -42
- package/dist/common/src/server/runtimes/node/esbuild.js +0 -40
- package/dist/common/src/server/runtimes/node/node.js +0 -75
- package/dist/common/src/server/runtimes/python/docker.js +0 -31
- package/dist/common/src/server/runtimes/ruby/docker.js +0 -34
- package/dist/common/src/server/runtimes/rust/docker.js +0 -35
- package/dist/common/src/server/runtimes/web/docker.js +0 -42
- package/dist/common/src/server/runtimes/web/esbuild.js +0 -29
- package/dist/common/src/server/runtimes/web/hoist.js +0 -16
- package/dist/common/src/server/runtimes/web/web.js +0 -157
- package/dist/common/src/server/serverClasees/Server.js +0 -47
- package/dist/common/src/server/serverClasees/Server_Base.js +0 -18
- package/dist/common/src/server/serverClasees/Server_Docker.js +0 -904
- package/dist/common/src/server/serverClasees/Server_FS.js +0 -119
- package/dist/common/src/server/serverClasees/Server_HTTP.js +0 -189
- package/dist/common/src/server/serverClasees/Server_WS.js +0 -262
- package/dist/common/src/server/serverManagers/DockerManager.js +0 -28
- package/dist/common/src/server/serverManagers/HttpManager.js +0 -114
- package/dist/common/src/server/serverManagers/WsManager.js +0 -230
- package/dist/common/src/server/serverManagers/fs.js +0 -32
- package/dist/common/src/server/serverManagers/tcp.js +0 -51
- package/dist/common/src/server/types.js +0 -2
- package/dist/common/src/testeranto.js +0 -75
- package/dist/common/src/vscode/TerminalManager.js +0 -129
- package/dist/common/src/vscode/TestTreeItem.js +0 -77
- package/dist/common/src/vscode/extension.js +0 -185
- package/dist/common/src/vscode/providers/FeaturesTreeDataProvider.js +0 -445
- package/dist/common/src/vscode/providers/FileTreeDataProvider.js +0 -190
- package/dist/common/src/vscode/providers/ProcessesTreeDataProvider.js +0 -270
- package/dist/common/src/vscode/providers/ResultsTreeDataProvider.js +0 -87
- package/dist/common/src/vscode/providers/TestTreeDataProvider.js +0 -309
- package/dist/common/src/vscode/types.js +0 -9
- package/dist/common/testeranto/runtimes/node/node.js +0 -7
- package/dist/common/testeranto/runtimes/web/web.js +0 -6
- package/dist/common/testeranto/testeranto.js +0 -70
- package/dist/common/tsconfig.common.tsbuildinfo +0 -1
- package/dist/module/allTestsUtils.js +0 -13
- package/dist/module/package.json +0 -3
- package/dist/module/scripts/build-example.js +0 -100
- package/dist/module/src/Init.js +0 -33
- package/dist/module/src/Types.js +0 -62
- package/dist/module/src/esbuildConfigs/consoleDetectorPlugin.js +0 -32
- package/dist/module/src/esbuildConfigs/eslint-formatter-testeranto.js +0 -18
- package/dist/module/src/esbuildConfigs/featuresPlugin.js +0 -34
- package/dist/module/src/esbuildConfigs/index.js +0 -20
- package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +0 -25
- package/dist/module/src/esbuildConfigs/nativeImportDetectorPlugin.js +0 -21
- package/dist/module/src/esbuildConfigs/rebuildPlugin.js +0 -14
- package/dist/module/src/init-docs.js +0 -4
- package/dist/module/src/lib/tiposkripto/BaseGiven.js +0 -92
- package/dist/module/src/lib/tiposkripto/BaseSuite.js +0 -130
- package/dist/module/src/lib/tiposkripto/BaseThen.js +0 -61
- package/dist/module/src/lib/tiposkripto/BaseTiposkripto.js +0 -190
- package/dist/module/src/lib/tiposkripto/BaseWhen.js +0 -42
- package/dist/module/src/lib/tiposkripto/CoreTypes.js +0 -1
- package/dist/module/src/lib/tiposkripto/Node.js +0 -33
- package/dist/module/src/lib/tiposkripto/Tiposkripto.js +0 -14
- package/dist/module/src/lib/tiposkripto/Types.js +0 -1
- package/dist/module/src/lib/tiposkripto/Web.js +0 -63
- package/dist/module/src/lib/tiposkripto/abstractBase.test/MockGiven.js +0 -18
- package/dist/module/src/lib/tiposkripto/abstractBase.test/MockThen.js +0 -12
- package/dist/module/src/lib/tiposkripto/abstractBase.test/MockWhen.js +0 -14
- package/dist/module/src/lib/tiposkripto/abstractBase.test/adapter.js +0 -21
- package/dist/module/src/lib/tiposkripto/abstractBase.test/implementation.js +0 -35
- package/dist/module/src/lib/tiposkripto/abstractBase.test/index.js +0 -12
- package/dist/module/src/lib/tiposkripto/abstractBase.test/specification.js +0 -15
- package/dist/module/src/lib/tiposkripto/abstractBase.test/types.js +0 -1
- package/dist/module/src/lib/tiposkripto/index.js +0 -24
- package/dist/module/src/runtimes.js +0 -1
- package/dist/module/src/server/aider/configParser.js +0 -116
- package/dist/module/src/server/aider/docker.js +0 -28
- package/dist/module/src/server/getRunnables.js +0 -29
- package/dist/module/src/server/htmlTemplate.js +0 -40
- package/dist/module/src/server/nodeVersion.js +0 -2
- package/dist/module/src/server/runtimes/common.js +0 -127
- package/dist/module/src/server/runtimes/golang/docker.js +0 -55
- package/dist/module/src/server/runtimes/java/docker.js +0 -40
- package/dist/module/src/server/runtimes/node/docker.js +0 -36
- package/dist/module/src/server/runtimes/node/esbuild.js +0 -35
- package/dist/module/src/server/runtimes/node/node.js +0 -37
- package/dist/module/src/server/runtimes/python/docker.js +0 -25
- package/dist/module/src/server/runtimes/ruby/docker.js +0 -28
- package/dist/module/src/server/runtimes/rust/docker.js +0 -29
- package/dist/module/src/server/runtimes/web/docker.js +0 -36
- package/dist/module/src/server/runtimes/web/esbuild.js +0 -24
- package/dist/module/src/server/runtimes/web/hoist.js +0 -11
- package/dist/module/src/server/runtimes/web/web.js +0 -119
- package/dist/module/src/server/serverClasees/Server.js +0 -40
- package/dist/module/src/server/serverClasees/Server_Base.js +0 -14
- package/dist/module/src/server/serverClasees/Server_Docker.js +0 -897
- package/dist/module/src/server/serverClasees/Server_FS.js +0 -119
- package/dist/module/src/server/serverClasees/Server_HTTP.js +0 -182
- package/dist/module/src/server/serverClasees/Server_WS.js +0 -258
- package/dist/module/src/server/serverManagers/DockerManager.js +0 -28
- package/dist/module/src/server/serverManagers/HttpManager.js +0 -110
- package/dist/module/src/server/serverManagers/WsManager.js +0 -226
- package/dist/module/src/server/serverManagers/fs.js +0 -32
- package/dist/module/src/server/serverManagers/tcp.js +0 -47
- package/dist/module/src/server/types.js +0 -1
- package/dist/module/src/testeranto.js +0 -40
- package/dist/module/src/vscode/TerminalManager.js +0 -92
- package/dist/module/src/vscode/TestTreeItem.js +0 -40
- package/dist/module/src/vscode/extension.js +0 -148
- package/dist/module/src/vscode/providers/FeaturesTreeDataProvider.js +0 -408
- package/dist/module/src/vscode/providers/FileTreeDataProvider.js +0 -153
- package/dist/module/src/vscode/providers/ProcessesTreeDataProvider.js +0 -233
- package/dist/module/src/vscode/providers/ResultsTreeDataProvider.js +0 -50
- package/dist/module/src/vscode/providers/TestTreeDataProvider.js +0 -272
- package/dist/module/src/vscode/types.js +0 -6
- package/dist/module/testeranto/runtimes/node/node.js +0 -5
- package/dist/module/testeranto/runtimes/web/web.js +0 -4
- package/dist/module/testeranto/testeranto.js +0 -68
- package/dist/module/tsconfig.module.tsbuildinfo +0 -1
- package/dist/prebuild/chunk-QLT7PNPK.mjs +0 -162
- package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +0 -20
- package/dist/prebuild/init-docs.mjs +0 -56
- package/dist/prebuild/server/runtimes/node/node.mjs +0 -80
- package/dist/prebuild/server/runtimes/web/hoist.mjs +0 -12
- package/dist/prebuild/server/runtimes/web/web.mjs +0 -162
- package/dist/prebuild/testeranto-6SAYRVSE.mjs +0 -72
- package/dist/prebuild/testeranto.mjs +0 -1692
- package/dist/types/src/Init.d.ts +0 -2
- package/dist/types/src/Types.d.ts +0 -87
- package/dist/types/src/esbuildConfigs/consoleDetectorPlugin.d.ts +0 -2
- package/dist/types/src/esbuildConfigs/eslint-formatter-testeranto.d.ts +0 -2
- package/dist/types/src/esbuildConfigs/featuresPlugin.d.ts +0 -5
- package/dist/types/src/esbuildConfigs/index.d.ts +0 -3
- package/dist/types/src/esbuildConfigs/inputFilesPlugin.d.ts +0 -7
- package/dist/types/src/esbuildConfigs/nativeImportDetectorPlugin.d.ts +0 -2
- package/dist/types/src/esbuildConfigs/rebuildPlugin.d.ts +0 -6
- package/dist/types/src/init-docs.d.ts +0 -1
- package/dist/types/src/lib/tiposkripto/BaseGiven.d.ts +0 -42
- package/dist/types/src/lib/tiposkripto/BaseSuite.d.ts +0 -46
- package/dist/types/src/lib/tiposkripto/BaseThen.d.ts +0 -28
- package/dist/types/src/lib/tiposkripto/BaseTiposkripto.d.ts +0 -35
- package/dist/types/src/lib/tiposkripto/BaseWhen.d.ts +0 -27
- package/dist/types/src/lib/tiposkripto/CoreTypes.d.ts +0 -51
- package/dist/types/src/lib/tiposkripto/Node.d.ts +0 -9
- package/dist/types/src/lib/tiposkripto/Tiposkripto.d.ts +0 -5
- package/dist/types/src/lib/tiposkripto/Types.d.ts +0 -9
- package/dist/types/src/lib/tiposkripto/Web.d.ts +0 -9
- package/dist/types/src/lib/tiposkripto/abstractBase.test/MockGiven.d.ts +0 -9
- package/dist/types/src/lib/tiposkripto/abstractBase.test/MockThen.d.ts +0 -6
- package/dist/types/src/lib/tiposkripto/abstractBase.test/MockWhen.d.ts +0 -6
- package/dist/types/src/lib/tiposkripto/abstractBase.test/adapter.d.ts +0 -3
- package/dist/types/src/lib/tiposkripto/abstractBase.test/implementation.d.ts +0 -3
- package/dist/types/src/lib/tiposkripto/abstractBase.test/index.d.ts +0 -28
- package/dist/types/src/lib/tiposkripto/abstractBase.test/specification.d.ts +0 -3
- package/dist/types/src/lib/tiposkripto/abstractBase.test/types.d.ts +0 -39
- package/dist/types/src/lib/tiposkripto/index.d.ts +0 -56
- package/dist/types/src/runtimes.d.ts +0 -2
- package/dist/types/src/server/aider/configParser.d.ts +0 -11
- package/dist/types/src/server/aider/docker.d.ts +0 -2
- package/dist/types/src/server/getRunnables.d.ts +0 -3
- package/dist/types/src/server/htmlTemplate.d.ts +0 -2
- package/dist/types/src/server/nodeVersion.d.ts +0 -2
- package/dist/types/src/server/runtimes/common.d.ts +0 -12
- package/dist/types/src/server/runtimes/golang/docker.d.ts +0 -5
- package/dist/types/src/server/runtimes/java/docker.d.ts +0 -14
- package/dist/types/src/server/runtimes/node/docker.d.ts +0 -14
- package/dist/types/src/server/runtimes/node/esbuild.d.ts +0 -4
- package/dist/types/src/server/runtimes/node/node.d.ts +0 -1
- package/dist/types/src/server/runtimes/python/docker.d.ts +0 -14
- package/dist/types/src/server/runtimes/ruby/docker.d.ts +0 -14
- package/dist/types/src/server/runtimes/rust/docker.d.ts +0 -14
- package/dist/types/src/server/runtimes/web/docker.d.ts +0 -15
- package/dist/types/src/server/runtimes/web/esbuild.d.ts +0 -4
- package/dist/types/src/server/runtimes/web/hoist.d.ts +0 -1
- package/dist/types/src/server/runtimes/web/web.d.ts +0 -1
- package/dist/types/src/server/serverClasees/Server.d.ts +0 -8
- package/dist/types/src/server/serverClasees/Server_Base.d.ts +0 -9
- package/dist/types/src/server/serverClasees/Server_Docker.d.ts +0 -81
- package/dist/types/src/server/serverClasees/Server_FS.d.ts +0 -0
- package/dist/types/src/server/serverClasees/Server_HTTP.d.ts +0 -20
- package/dist/types/src/server/serverClasees/Server_WS.d.ts +0 -23
- package/dist/types/src/server/serverManagers/DockerManager.d.ts +0 -0
- package/dist/types/src/server/serverManagers/HttpManager.d.ts +0 -9
- package/dist/types/src/server/serverManagers/WsManager.d.ts +0 -10
- package/dist/types/src/server/serverManagers/fs.d.ts +0 -0
- package/dist/types/src/server/serverManagers/tcp.d.ts +0 -27
- package/dist/types/src/server/types.d.ts +0 -68
- package/dist/types/src/testeranto.d.ts +0 -1
- package/dist/types/src/vscode/TerminalManager.d.ts +0 -18
- package/dist/types/src/vscode/TestTreeItem.d.ts +0 -13
- package/dist/types/src/vscode/extension.d.ts +0 -3
- package/dist/types/src/vscode/providers/FeaturesTreeDataProvider.d.ts +0 -17
- package/dist/types/src/vscode/providers/FileTreeDataProvider.d.ts +0 -13
- package/dist/types/src/vscode/providers/ProcessesTreeDataProvider.d.ts +0 -23
- package/dist/types/src/vscode/providers/ResultsTreeDataProvider.d.ts +0 -10
- package/dist/types/src/vscode/providers/TestTreeDataProvider.d.ts +0 -16
- package/dist/types/src/vscode/types.d.ts +0 -14
- package/dist/types/testeranto/testeranto.d.ts +0 -3
- package/dist/types/tsconfig.types.tsbuildinfo +0 -1
- package/dist/vscode/extension.mjs +0 -5116
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.testAdapter = void 0;
|
|
4
|
-
exports.testAdapter = {
|
|
5
|
-
beforeEach: async (subject, initializer, testResource, initialValues) => {
|
|
6
|
-
const result = await initializer();
|
|
7
|
-
// Ensure the result matches the expected type
|
|
8
|
-
if (typeof result === "function") {
|
|
9
|
-
// If it's a function, call it to get the actual store
|
|
10
|
-
return result();
|
|
11
|
-
}
|
|
12
|
-
return result;
|
|
13
|
-
},
|
|
14
|
-
andWhen: async (store, whenCB, testResource, pm) => {
|
|
15
|
-
return whenCB(store);
|
|
16
|
-
},
|
|
17
|
-
butThen: async (store, thenCB, testResource, pm) => {
|
|
18
|
-
return thenCB(store);
|
|
19
|
-
},
|
|
20
|
-
afterEach: async (store, key, pm) => Promise.resolve(store),
|
|
21
|
-
afterAll: async (store, pm) => { },
|
|
22
|
-
assertThis: (result) => !!result,
|
|
23
|
-
beforeAll: async (input, testResource, pm) => input,
|
|
24
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.implementation = void 0;
|
|
4
|
-
exports.implementation = {
|
|
5
|
-
suites: {
|
|
6
|
-
Default: "Abstract Base Test Suite",
|
|
7
|
-
},
|
|
8
|
-
givens: {
|
|
9
|
-
Default: () => () => ({
|
|
10
|
-
testStore: { value: "initial" },
|
|
11
|
-
testSelection: { selected: true },
|
|
12
|
-
}),
|
|
13
|
-
WithError: () => () => ({
|
|
14
|
-
testStore: { value: "error" },
|
|
15
|
-
testSelection: { selected: false },
|
|
16
|
-
}),
|
|
17
|
-
},
|
|
18
|
-
whens: {
|
|
19
|
-
modifyStore: (newValue) => (store) => (Object.assign(Object.assign({}, store), { testStore: { value: newValue } })),
|
|
20
|
-
throwError: () => (store) => {
|
|
21
|
-
throw new Error("Test error");
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
thens: {
|
|
25
|
-
verifyStore: (expected) => (store) => {
|
|
26
|
-
if (store.testStore.value !== expected) {
|
|
27
|
-
throw new Error(`Expected ${expected}, got ${store.testStore.value}`);
|
|
28
|
-
}
|
|
29
|
-
return store;
|
|
30
|
-
},
|
|
31
|
-
verifyError: (expected) => (store) => {
|
|
32
|
-
if (!store.error || !store.error.message.includes(expected)) {
|
|
33
|
-
throw new Error(`Expected error "${expected}" not found`);
|
|
34
|
-
}
|
|
35
|
-
return store;
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const Tiposkripto_1 = __importDefault(require("../Tiposkripto"));
|
|
7
|
-
const adapter_1 = require("./adapter");
|
|
8
|
-
const implementation_1 = require("./implementation");
|
|
9
|
-
const MockGiven_1 = require("./MockGiven");
|
|
10
|
-
const MockThen_1 = require("./MockThen");
|
|
11
|
-
const MockWhen_1 = require("./MockWhen");
|
|
12
|
-
const specification_1 = require("./specification");
|
|
13
|
-
exports.default = (0, Tiposkripto_1.default)({
|
|
14
|
-
MockGiven: MockGiven_1.MockGiven,
|
|
15
|
-
MockWhen: MockWhen_1.MockWhen,
|
|
16
|
-
MockThen: MockThen_1.MockThen,
|
|
17
|
-
}, specification_1.specification, implementation_1.implementation, adapter_1.testAdapter);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.specification = void 0;
|
|
4
|
-
const specification = (Suite, Given, When, Then) => [
|
|
5
|
-
Suite.Default("BaseGiven Tests", {
|
|
6
|
-
initialization: Given.Default(["Should initialize with default values"], [], [Then.verifyStore("initial")]),
|
|
7
|
-
errorHandling: Given.WithError(["Should handle errors properly"], [When.throwError()], [Then.verifyError("Test error")]),
|
|
8
|
-
}),
|
|
9
|
-
Suite.Default("BaseWhen Tests", {
|
|
10
|
-
stateModification: Given.Default(["Should modify state correctly"], [When.modifyStore("modified")], [Then.verifyStore("modified")]),
|
|
11
|
-
errorPropagation: Given.Default(["Should propagate errors"], [When.throwError()], [Then.verifyError("Test error")]),
|
|
12
|
-
}),
|
|
13
|
-
Suite.Default("BaseThen Tests", {
|
|
14
|
-
assertionPassing: Given.Default(["Should pass valid assertions"], [When.modifyStore("asserted")], [Then.verifyStore("asserted")]),
|
|
15
|
-
assertionFailing: Given.Default(["Should fail invalid assertions"], [When.modifyStore("wrong")], [Then.verifyStore("right")] // This should fail
|
|
16
|
-
),
|
|
17
|
-
}),
|
|
18
|
-
];
|
|
19
|
-
exports.specification = specification;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defaultTestResourceRequirement = exports.DefaultAdapter = exports.BaseAdapter = void 0;
|
|
4
|
-
const BaseAdapter = () => ({
|
|
5
|
-
beforeAll: async (input, testResource) => {
|
|
6
|
-
return input;
|
|
7
|
-
},
|
|
8
|
-
beforeEach: async function (subject, initializer, testResource, initialValues) {
|
|
9
|
-
return subject;
|
|
10
|
-
},
|
|
11
|
-
afterEach: async (store, key) => Promise.resolve(store),
|
|
12
|
-
afterAll: (store) => undefined,
|
|
13
|
-
butThen: async (store, thenCb, testResource) => {
|
|
14
|
-
return thenCb(store);
|
|
15
|
-
},
|
|
16
|
-
andWhen: async (store, whenCB, testResource) => {
|
|
17
|
-
return whenCB(store);
|
|
18
|
-
},
|
|
19
|
-
assertThis: (x) => x,
|
|
20
|
-
});
|
|
21
|
-
exports.BaseAdapter = BaseAdapter;
|
|
22
|
-
const DefaultAdapter = (p) => {
|
|
23
|
-
const base = (0, exports.BaseAdapter)();
|
|
24
|
-
return Object.assign(Object.assign({}, base), p);
|
|
25
|
-
};
|
|
26
|
-
exports.DefaultAdapter = DefaultAdapter;
|
|
27
|
-
exports.defaultTestResourceRequirement = {
|
|
28
|
-
ports: 0,
|
|
29
|
-
};
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.parseAiderConfig = parseAiderConfig;
|
|
7
|
-
exports.extractApiKeys = extractApiKeys;
|
|
8
|
-
exports.getApiKeyEnvironmentVariables = getApiKeyEnvironmentVariables;
|
|
9
|
-
const fs_1 = __importDefault(require("fs"));
|
|
10
|
-
const path_1 = __importDefault(require("path"));
|
|
11
|
-
const js_yaml_1 = __importDefault(require("js-yaml"));
|
|
12
|
-
function parseAiderConfig() {
|
|
13
|
-
console.log("parseAiderConfig: Looking for .aider.conf.yml");
|
|
14
|
-
const configPath = path_1.default.join(process.cwd(), ".aider.conf.yml");
|
|
15
|
-
if (!fs_1.default.existsSync(configPath)) {
|
|
16
|
-
console.log(`No .aider.conf.yml file found at ${configPath}`);
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
try {
|
|
20
|
-
console.log(`Found .aider.conf.yml at ${configPath}`);
|
|
21
|
-
const fileContent = fs_1.default.readFileSync(configPath, "utf8");
|
|
22
|
-
// Clean the content - remove any problematic characters
|
|
23
|
-
const cleanedContent = fileContent
|
|
24
|
-
.replace(/\r\n/g, "\n") // Normalize line endings
|
|
25
|
-
.replace(/\t/g, " ") // Convert tabs to spaces
|
|
26
|
-
.replace(/[^\x20-\x7E\n\r]/g, "") // Remove non-printable characters except newlines
|
|
27
|
-
.trim();
|
|
28
|
-
// Try to parse with safe load
|
|
29
|
-
const config = js_yaml_1.default.load(cleanedContent, { json: true });
|
|
30
|
-
if (!config) {
|
|
31
|
-
console.log("Config file is empty or contains only comments");
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
return config;
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
console.error(`Failed to parse .aider.conf.yml:`, error.message);
|
|
38
|
-
// Try to read the file again and log each line
|
|
39
|
-
try {
|
|
40
|
-
const lines = fs_1.default.readFileSync(configPath, "utf8").split("\n");
|
|
41
|
-
console.error("File contents (line by line):");
|
|
42
|
-
lines.forEach((line, index) => {
|
|
43
|
-
console.error(`Line ${index + 1}: "${line}"`);
|
|
44
|
-
// Check for problematic characters
|
|
45
|
-
const hasInvalidChars = /[^\x20-\x7E]/.test(line);
|
|
46
|
-
if (hasInvalidChars) {
|
|
47
|
-
console.error(` WARNING: Line ${index + 1} contains non-printable characters`);
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
catch (readError) {
|
|
52
|
-
console.error("Could not read file for line-by-line analysis:", readError);
|
|
53
|
-
}
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
function extractApiKeys(config) {
|
|
58
|
-
// console.log("extractApiKeys");
|
|
59
|
-
const apiKeys = {};
|
|
60
|
-
if (!config) {
|
|
61
|
-
console.log("No config provided to extractApiKeys");
|
|
62
|
-
return apiKeys;
|
|
63
|
-
}
|
|
64
|
-
// Handle single api-key string
|
|
65
|
-
if (typeof config["api-key"] === "string") {
|
|
66
|
-
// console.log(`Found single api-key string: ${config["api-key"]}`);
|
|
67
|
-
const [provider, key] = config["api-key"].split("=");
|
|
68
|
-
if (provider && key) {
|
|
69
|
-
apiKeys[provider.trim()] = key.trim();
|
|
70
|
-
// console.log(`Extracted API key for provider: ${provider.trim()}`);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
// Handle array of api-key strings
|
|
74
|
-
else if (Array.isArray(config["api-key"])) {
|
|
75
|
-
console.log(`Found api-key array with ${config["api-key"].length} entries`);
|
|
76
|
-
config["api-key"].forEach((keyEntry, index) => {
|
|
77
|
-
// console.log(`Processing api-key entry ${index + 1}: ${keyEntry}`);
|
|
78
|
-
const [provider, key] = keyEntry.split("=");
|
|
79
|
-
if (provider && key) {
|
|
80
|
-
apiKeys[provider.trim()] = key.trim();
|
|
81
|
-
// console.log(`Extracted API key for provider: ${provider.trim()}`);
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
console.log(`Could not parse api-key entry: ${keyEntry}`);
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
else if (config["api-key"]) {
|
|
89
|
-
console.log(`api-key has unexpected type: ${typeof config["api-key"]}, value: ${config["api-key"]}`);
|
|
90
|
-
}
|
|
91
|
-
// Handle individual API keys
|
|
92
|
-
if (config["openai-api-key"]) {
|
|
93
|
-
apiKeys["openai"] = config["openai-api-key"];
|
|
94
|
-
// console.log(`Extracted OpenAI API key`);
|
|
95
|
-
}
|
|
96
|
-
if (config["anthropic-api-key"]) {
|
|
97
|
-
apiKeys["anthropic"] = config["anthropic-api-key"];
|
|
98
|
-
// console.log(`Extracted Anthropic API key`);
|
|
99
|
-
}
|
|
100
|
-
console.log(`Extracted API keys for providers: ${Object.keys(apiKeys).join(", ")}`);
|
|
101
|
-
return apiKeys;
|
|
102
|
-
}
|
|
103
|
-
function getApiKeyEnvironmentVariables(config) {
|
|
104
|
-
const apiKeys = extractApiKeys(config);
|
|
105
|
-
const envVars = {};
|
|
106
|
-
// Map provider names to environment variable names
|
|
107
|
-
const providerToEnvVar = {
|
|
108
|
-
openai: "OPENAI_API_KEY",
|
|
109
|
-
anthropic: "ANTHROPIC_API_KEY",
|
|
110
|
-
deepseek: "DEEPSEEK_API_KEY",
|
|
111
|
-
google: "GOOGLE_API_KEY",
|
|
112
|
-
groq: "GROQ_API_KEY",
|
|
113
|
-
mistral: "MISTRAL_API_KEY",
|
|
114
|
-
cohere: "COHERE_API_KEY",
|
|
115
|
-
together: "TOGETHER_API_KEY",
|
|
116
|
-
};
|
|
117
|
-
for (const [provider, key] of Object.entries(apiKeys)) {
|
|
118
|
-
const envVarName = providerToEnvVar[provider.toLowerCase()] ||
|
|
119
|
-
`${provider.toUpperCase()}_API_KEY`;
|
|
120
|
-
envVars[envVarName] = key;
|
|
121
|
-
console.log(`Setting environment variable ${envVarName} for provider ${provider}`);
|
|
122
|
-
}
|
|
123
|
-
return envVars;
|
|
124
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const configParser_1 = require("./configParser");
|
|
4
|
-
// Add this helper function at the top of the file
|
|
5
|
-
function loadAiderApiKeys() {
|
|
6
|
-
try {
|
|
7
|
-
console.log("Attempting to load API keys from .aider.conf.yml...");
|
|
8
|
-
const config = (0, configParser_1.parseAiderConfig)();
|
|
9
|
-
if (config) {
|
|
10
|
-
const envVars = (0, configParser_1.getApiKeyEnvironmentVariables)(config);
|
|
11
|
-
if (Object.keys(envVars).length > 0) {
|
|
12
|
-
console.log("Successfully loaded API keys from .aider.conf.yml");
|
|
13
|
-
return envVars;
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
console.log("No API keys found in .aider.conf.yml");
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
console.log("Could not parse .aider.conf.yml or file not found");
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
console.error("Failed to load API keys from .aider.conf.yml:", error);
|
|
25
|
-
}
|
|
26
|
-
return {};
|
|
27
|
-
}
|
|
28
|
-
// This file is no longer needed as we're not using a separate aider-pool container
|
|
29
|
-
// Each test will start its own aider process directly
|
|
30
|
-
exports.default = {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getRunnables = void 0;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const getRunnables = (config, projectName) => {
|
|
9
|
-
return {
|
|
10
|
-
golangEntryPoints: Object.entries(config.golang.tests).reduce((pt, cv) => {
|
|
11
|
-
pt[cv[0]] = path_1.default.resolve(cv[0]);
|
|
12
|
-
return pt;
|
|
13
|
-
}, {}),
|
|
14
|
-
nodeEntryPoints: Object.entries(config.node.tests).reduce((pt, cv) => {
|
|
15
|
-
pt[cv[0]] = path_1.default.resolve(`./testeranto/bundles/${projectName}/node/${cv[0]
|
|
16
|
-
.split(".")
|
|
17
|
-
.slice(0, -1)
|
|
18
|
-
.concat("mjs")
|
|
19
|
-
.join(".")}`);
|
|
20
|
-
return pt;
|
|
21
|
-
}, {}),
|
|
22
|
-
pythonEntryPoints: Object.entries(config.python.tests).reduce((pt, cv) => {
|
|
23
|
-
pt[cv[0]] = path_1.default.resolve(cv[0]);
|
|
24
|
-
return pt;
|
|
25
|
-
}, {}),
|
|
26
|
-
webEntryPoints: Object.entries(config.web.tests).reduce((pt, cv) => {
|
|
27
|
-
pt[cv[0]] = path_1.default.resolve(`./testeranto/bundles/${projectName}/web/${cv[0]
|
|
28
|
-
.split(".")
|
|
29
|
-
.slice(0, -1)
|
|
30
|
-
.concat("mjs")
|
|
31
|
-
.join(".")}`);
|
|
32
|
-
return pt;
|
|
33
|
-
}, {}),
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
exports.getRunnables = getRunnables;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateReactAppHtml = generateReactAppHtml;
|
|
4
|
-
exports.generateRedirectHtml = generateRedirectHtml;
|
|
5
|
-
// Utility function to generate HTML for React apps
|
|
6
|
-
function generateReactAppHtml(title, scriptPath, appName) {
|
|
7
|
-
return `
|
|
8
|
-
<!DOCTYPE html>
|
|
9
|
-
<html lang="en">
|
|
10
|
-
<head>
|
|
11
|
-
<meta charset="UTF-8">
|
|
12
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
13
|
-
<title>${title}</title>
|
|
14
|
-
<link href="/dist/prebuild/style.css" rel="stylesheet">
|
|
15
|
-
</head>
|
|
16
|
-
<body>
|
|
17
|
-
<div id="root"></div>
|
|
18
|
-
<script src="/dist/prebuild/server/serverClasees/${scriptPath}.js"></script>
|
|
19
|
-
<script>
|
|
20
|
-
// The bundled script automatically calls initApp when loaded
|
|
21
|
-
// Ensure the root element exists
|
|
22
|
-
if (!document.getElementById('root').innerHTML) {
|
|
23
|
-
document.getElementById('root').innerHTML = '<div class="text-center mt-5"><div class="spinner-border text-primary" role="status"><span class="visually-hidden">Loading...</span></div><p class="mt-2">Loading ${appName}...</p></div>';
|
|
24
|
-
}
|
|
25
|
-
</script>
|
|
26
|
-
</body>
|
|
27
|
-
</html>
|
|
28
|
-
`.trim();
|
|
29
|
-
}
|
|
30
|
-
// Generate HTML for redirect
|
|
31
|
-
function generateRedirectHtml(redirectUrl, message) {
|
|
32
|
-
return `
|
|
33
|
-
<!DOCTYPE html>
|
|
34
|
-
<html>
|
|
35
|
-
<head>
|
|
36
|
-
<title>Redirecting</title>
|
|
37
|
-
<meta http-equiv="refresh" content="0; url=${redirectUrl}" />
|
|
38
|
-
</head>
|
|
39
|
-
<body>
|
|
40
|
-
<p>${message} <a href="${redirectUrl}">here</a>...</p>
|
|
41
|
-
</body>
|
|
42
|
-
</html>
|
|
43
|
-
`.trim();
|
|
44
|
-
}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.computeFilesHash = computeFilesHash;
|
|
7
|
-
exports.sendSourceFilesUpdated = sendSourceFilesUpdated;
|
|
8
|
-
exports.extractInputFilesFromMetafile = extractInputFilesFromMetafile;
|
|
9
|
-
exports.processMetafile = processMetafile;
|
|
10
|
-
const path_1 = __importDefault(require("path"));
|
|
11
|
-
const fs_1 = __importDefault(require("fs"));
|
|
12
|
-
const crypto_1 = __importDefault(require("crypto"));
|
|
13
|
-
// Helper to compute a simple hash from file paths and contents
|
|
14
|
-
async function computeFilesHash(files) {
|
|
15
|
-
const hash = crypto_1.default.createHash('md5');
|
|
16
|
-
for (const file of files) {
|
|
17
|
-
try {
|
|
18
|
-
const stats = fs_1.default.statSync(file);
|
|
19
|
-
hash.update(file);
|
|
20
|
-
hash.update(stats.mtimeMs.toString());
|
|
21
|
-
hash.update(stats.size.toString());
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
// File may not exist, include its name anyway
|
|
25
|
-
hash.update(file);
|
|
26
|
-
hash.update('missing');
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return hash.digest('hex');
|
|
30
|
-
}
|
|
31
|
-
// WebSocket functionality removed - dead feature
|
|
32
|
-
async function sendSourceFilesUpdated(config, hash, files, testName, runtime) {
|
|
33
|
-
console.log(`[${runtime} Builder] WebSocket feature removed - not sending sourceFilesUpdated for ${testName}`);
|
|
34
|
-
return Promise.resolve();
|
|
35
|
-
}
|
|
36
|
-
// Extract input files from metafile recursively
|
|
37
|
-
function extractInputFilesFromMetafile(metafile) {
|
|
38
|
-
const files = new Set();
|
|
39
|
-
if (!metafile || !metafile.inputs) {
|
|
40
|
-
return Array.from(files);
|
|
41
|
-
}
|
|
42
|
-
// Function to recursively collect all dependencies
|
|
43
|
-
function collectDependencies(filePath) {
|
|
44
|
-
if (files.has(filePath)) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
// Add the current file
|
|
48
|
-
files.add(filePath);
|
|
49
|
-
// Get file info from metafile
|
|
50
|
-
const fileInfo = metafile.inputs[filePath];
|
|
51
|
-
if (!fileInfo) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
// Recursively process each import
|
|
55
|
-
if (fileInfo.imports) {
|
|
56
|
-
for (const importInfo of fileInfo.imports) {
|
|
57
|
-
const importPath = importInfo.path;
|
|
58
|
-
// Only process if it's in the inputs (should be)
|
|
59
|
-
if (metafile.inputs[importPath]) {
|
|
60
|
-
collectDependencies(importPath);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
// Start from ALL files in inputs, not just entry points
|
|
66
|
-
// This ensures we get all transitive dependencies
|
|
67
|
-
for (const filePath of Object.keys(metafile.inputs)) {
|
|
68
|
-
collectDependencies(filePath);
|
|
69
|
-
}
|
|
70
|
-
// Convert to absolute paths
|
|
71
|
-
return Array.from(files).map(filePath => path_1.default.isAbsolute(filePath) ? filePath : path_1.default.resolve(process.cwd(), filePath));
|
|
72
|
-
}
|
|
73
|
-
async function processMetafile(config, metafile, runtime) {
|
|
74
|
-
if (!metafile || !metafile.outputs) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
for (const [outputFile, outputInfo] of Object.entries(metafile.outputs)) {
|
|
78
|
-
const outputInfoTyped = outputInfo;
|
|
79
|
-
// Only process outputs that have an associated entryPoint
|
|
80
|
-
if (!outputInfoTyped.entryPoint) {
|
|
81
|
-
console.log(`[${runtime} Builder] Skipping output without entryPoint: ${outputFile}`);
|
|
82
|
-
continue;
|
|
83
|
-
}
|
|
84
|
-
// Get the entry point path
|
|
85
|
-
const entryPoint = outputInfoTyped.entryPoint;
|
|
86
|
-
// Only process test files (files ending with .test.ts, .test.js, .spec.ts, .spec.js)
|
|
87
|
-
// Also, exclude library files like src/lib/tiposkripto/Web.ts and src/lib/tiposkripto/Node.ts
|
|
88
|
-
const isTestFile = /\.(test|spec)\.(ts|js)$/.test(entryPoint);
|
|
89
|
-
if (!isTestFile) {
|
|
90
|
-
console.log(`[${runtime} Builder] Skipping non-test entryPoint: ${entryPoint}`);
|
|
91
|
-
continue;
|
|
92
|
-
}
|
|
93
|
-
// Get input files for this specific output
|
|
94
|
-
const outputInputs = outputInfoTyped.inputs || {};
|
|
95
|
-
// Function to recursively collect dependencies for a file
|
|
96
|
-
const collectedFiles = new Set();
|
|
97
|
-
function collectFileDependencies(filePath) {
|
|
98
|
-
var _a, _b;
|
|
99
|
-
if (collectedFiles.has(filePath)) {
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
collectedFiles.add(filePath);
|
|
103
|
-
const fileInfo = (_a = metafile.inputs) === null || _a === void 0 ? void 0 : _a[filePath];
|
|
104
|
-
if (fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.imports) {
|
|
105
|
-
for (const importInfo of fileInfo.imports) {
|
|
106
|
-
const importPath = importInfo.path;
|
|
107
|
-
if ((_b = metafile.inputs) === null || _b === void 0 ? void 0 : _b[importPath]) {
|
|
108
|
-
collectFileDependencies(importPath);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
// Start from all files listed in this output's inputs
|
|
114
|
-
for (const inputFile of Object.keys(outputInputs)) {
|
|
115
|
-
collectFileDependencies(inputFile);
|
|
116
|
-
}
|
|
117
|
-
// Convert to absolute paths
|
|
118
|
-
const allInputFiles = Array.from(collectedFiles).map(filePath => path_1.default.isAbsolute(filePath) ? filePath : path_1.default.resolve(process.cwd(), filePath));
|
|
119
|
-
// Convert to relative paths from workspace root
|
|
120
|
-
const workspaceRoot = '/workspace';
|
|
121
|
-
const relativeFiles = allInputFiles.map(file => {
|
|
122
|
-
const absolutePath = path_1.default.isAbsolute(file) ? file : path_1.default.resolve(process.cwd(), file);
|
|
123
|
-
// Make path relative to workspace root
|
|
124
|
-
if (absolutePath.startsWith(workspaceRoot)) {
|
|
125
|
-
return absolutePath.slice(workspaceRoot.length);
|
|
126
|
-
}
|
|
127
|
-
// If not under workspace, use relative path from current directory
|
|
128
|
-
return path_1.default.relative(process.cwd(), absolutePath);
|
|
129
|
-
}).filter(Boolean);
|
|
130
|
-
// Write to file
|
|
131
|
-
const outputBaseName = entryPoint.split('.').slice(0, -1).join('.');
|
|
132
|
-
const inputFilesPath = `testeranto/bundles/allTests/${runtime}/${outputBaseName}.mjs-inputFiles.json`;
|
|
133
|
-
fs_1.default.writeFileSync(inputFilesPath, JSON.stringify(relativeFiles, null, 2));
|
|
134
|
-
console.log(`[${runtime} Builder] Wrote ${relativeFiles.length} input files to ${inputFilesPath}`);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.golangTestCommand = exports.golangBddCommand = exports.golangBuildCommand = exports.golangDockerComposeFile = void 0;
|
|
4
|
-
const golangDockerComposeFile = (config, container_name) => {
|
|
5
|
-
return {
|
|
6
|
-
build: {
|
|
7
|
-
context: process.cwd(),
|
|
8
|
-
dockerfile: config[container_name].dockerfile,
|
|
9
|
-
},
|
|
10
|
-
container_name,
|
|
11
|
-
environment: {
|
|
12
|
-
// NODE_ENV: "production",
|
|
13
|
-
// ...config.env,
|
|
14
|
-
},
|
|
15
|
-
working_dir: "/workspace",
|
|
16
|
-
volumes: [
|
|
17
|
-
`${process.cwd()}/src:/workspace/src`,
|
|
18
|
-
`${process.cwd()}/example:/workspace/example`,
|
|
19
|
-
`${process.cwd()}/dist:/workspace/dist`,
|
|
20
|
-
`${process.cwd()}/testeranto:/workspace/testeranto`,
|
|
21
|
-
],
|
|
22
|
-
command: (0, exports.golangBuildCommand)(),
|
|
23
|
-
};
|
|
24
|
-
// return {
|
|
25
|
-
// build: {
|
|
26
|
-
// context: process.cwd(), // Use the project root as build context
|
|
27
|
-
// dockerfile: config.golang.dockerfile,
|
|
28
|
-
// },
|
|
29
|
-
// container_name: `golang-builder-${projectName}`,
|
|
30
|
-
// environment: {
|
|
31
|
-
// ...config.env,
|
|
32
|
-
// },
|
|
33
|
-
// working_dir: "/workspace",
|
|
34
|
-
// volumes: [
|
|
35
|
-
// `${process.cwd()}:/workspace`,
|
|
36
|
-
// ],
|
|
37
|
-
// command: golangBuildCommand(),
|
|
38
|
-
// }
|
|
39
|
-
};
|
|
40
|
-
exports.golangDockerComposeFile = golangDockerComposeFile;
|
|
41
|
-
const golangBuildCommand = () => {
|
|
42
|
-
return "go run src/server/runtimes/golang/main.go";
|
|
43
|
-
// return `go run src/server/runtimes/golang/golang.go /workspace/testeranto/runtimes/golang/golang.go`;
|
|
44
|
-
};
|
|
45
|
-
exports.golangBuildCommand = golangBuildCommand;
|
|
46
|
-
// this image "builds" test bundles. it is not a "docker build" thing
|
|
47
|
-
const golangBddCommand = () => {
|
|
48
|
-
const jsonStr = JSON.stringify({ ports: [1111] });
|
|
49
|
-
return `go run example/cmd/calculator-test`;
|
|
50
|
-
};
|
|
51
|
-
exports.golangBddCommand = golangBddCommand;
|
|
52
|
-
const golangTestCommand = (config, inputfiles) => {
|
|
53
|
-
var _a;
|
|
54
|
-
return `
|
|
55
|
-
${((_a = config.golang.checks) === null || _a === void 0 ? void 0 : _a.map((c) => {
|
|
56
|
-
return c(inputfiles);
|
|
57
|
-
}).join('\n')) || ''}
|
|
58
|
-
|
|
59
|
-
${(0, exports.golangBddCommand)()}
|
|
60
|
-
`;
|
|
61
|
-
};
|
|
62
|
-
exports.golangTestCommand = golangTestCommand;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.javaBddCommand = exports.javaBuildCommand = exports.javaDockerComposeFile = void 0;
|
|
4
|
-
const javaDockerComposeFile = (config, container_name, fpath) => {
|
|
5
|
-
return {
|
|
6
|
-
build: {
|
|
7
|
-
context: process.cwd(),
|
|
8
|
-
dockerfile: config[container_name].dockerfile,
|
|
9
|
-
},
|
|
10
|
-
container_name,
|
|
11
|
-
environment: Object.assign({ NODE_ENV: "production" }, config.env),
|
|
12
|
-
working_dir: "/workspace",
|
|
13
|
-
volumes: [
|
|
14
|
-
`${process.cwd()}/src:/workspace/src`,
|
|
15
|
-
`${process.cwd()}/example:/workspace/example`,
|
|
16
|
-
`${process.cwd()}/dist:/workspace/dist`,
|
|
17
|
-
`${process.cwd()}/testeranto:/workspace/testeranto`,
|
|
18
|
-
],
|
|
19
|
-
command: (0, exports.javaBuildCommand)(fpath),
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
exports.javaDockerComposeFile = javaDockerComposeFile;
|
|
23
|
-
const javaBuildCommand = (fpath) => {
|
|
24
|
-
return `java src/server/runtimes/java/java.java /workspace/${fpath}`;
|
|
25
|
-
};
|
|
26
|
-
exports.javaBuildCommand = javaBuildCommand;
|
|
27
|
-
const javaBddCommand = (fpath) => {
|
|
28
|
-
return `java testeranto/bundles/java/${fpath} /workspace/java.java`;
|
|
29
|
-
};
|
|
30
|
-
exports.javaBddCommand = javaBddCommand;
|
|
31
|
-
// export const javaBuildCommand = () => {
|
|
32
|
-
// return "cd /workspace && javac -cp \".:lib/*\" src/server/runtimes/java/main.java && java -cp \"src/server/runtimes/java:.\" main";
|
|
33
|
-
// }
|
|
34
|
-
// // this image "builds" test bundles. it is not a "docker build" thing
|
|
35
|
-
// export const javaBddCommand = () => {
|
|
36
|
-
// const jsonStr = JSON.stringify({ ports: [1111] });
|
|
37
|
-
// return `java -jar testeranto/bundles/allTests/java/example/Calculator-test.jar '${jsonStr}'`
|
|
38
|
-
// }
|
|
39
|
-
// export const javaTestCommand = (config: IBuiltConfig, inputfiles: string[]) => {
|
|
40
|
-
// return `
|
|
41
|
-
// ${config.java.checks?.map((c) => {
|
|
42
|
-
// return c(inputfiles);
|
|
43
|
-
// }).join('\n') || ''}
|
|
44
|
-
// ${javaBddCommand()}
|
|
45
|
-
// `;
|
|
46
|
-
// }
|