testeranto 0.219.7 → 0.219.8

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.
@@ -24,7 +24,9 @@ const externalTests = true;
24
24
  const nodeBuildCommand = (fpath) => {
25
25
  if (externalTests) {
26
26
  console.log("external tests", process.cwd());
27
+ // return `cat node_modules/testeranto/src/server/runtimes/node/esbuild.ts`
27
28
  return `yarn tsx node_modules/testeranto/src/server/runtimes/node/node.ts ${fpath}`;
29
+ // return `cat node_modules/testeranto/src/server/runtimes/node/node.ts`
28
30
  // return ["sh", "-c", "cd /workspace && javac -cp \".:lib/*\" src/server/runtimes/java/main.java && java -cp \"src/server/runtimes/java:.\" main"]
29
31
  }
30
32
  else {
@@ -10,22 +10,23 @@ const rebuildPlugin_js_1 = __importDefault(require("../../../esbuildConfigs/rebu
10
10
  const absoluteBundlesDir = (c) => {
11
11
  return "./testeranto/bundles/allTests/node/";
12
12
  };
13
- exports.default = (config, testName) => {
13
+ exports.default = (projectConfig, testName) => {
14
14
  var _a, _b, _c;
15
- console.log(config);
15
+ console.log("mark77", projectConfig);
16
16
  // Get entry points from config, or use a default
17
17
  let entrypoints = [];
18
- if ((_a = config.node) === null || _a === void 0 ? void 0 : _a.tests) {
19
- entrypoints = Object.keys(config.node.tests);
18
+ if ((_a = projectConfig.node) === null || _a === void 0 ? void 0 : _a.tests) {
19
+ entrypoints = Object.keys(projectConfig.node.tests);
20
20
  }
21
21
  else {
22
- throw "config.node.tests should exist";
22
+ // console.log(projectConfig)
23
+ throw "projectConfig.node.tests should exist";
23
24
  // Fallback to a reasonable default
24
25
  // entrypoints = ["./example/Calculator.test.ts"];
25
26
  // console.warn(`No node.tests found in config, using default entry point: ${entrypoints[0]}`);
26
27
  }
27
28
  const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("node", testName);
28
- return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { outdir: absoluteBundlesDir(config), outbase: ".", metafile: true, supported: {
29
+ return Object.assign(Object.assign({}, (0, index_js_1.default)(projectConfig)), { outdir: absoluteBundlesDir(projectConfig), outbase: ".", metafile: true, supported: {
29
30
  "dynamic-import": true,
30
31
  }, define: {
31
32
  "process.env.FLUENTFFMPEG_COV": "0",
@@ -34,6 +35,6 @@ exports.default = (config, testName) => {
34
35
  featuresPlugin_js_1.default,
35
36
  inputFilesPluginFactory,
36
37
  (0, rebuildPlugin_js_1.default)("node"),
37
- ...(((_c = (_b = config.node) === null || _b === void 0 ? void 0 : _b.plugins) === null || _c === void 0 ? void 0 : _c.map((p) => p(register, entrypoints))) || []),
38
+ ...(((_c = (_b = projectConfig.node) === null || _b === void 0 ? void 0 : _b.plugins) === null || _c === void 0 ? void 0 : _c.map((p) => p(register, entrypoints))) || []),
38
39
  ] });
39
40
  };
@@ -39,9 +39,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  const esbuild_1 = __importDefault(require("esbuild"));
40
40
  const esbuild_2 = __importDefault(require("./esbuild"));
41
41
  const common_1 = require("../common");
42
- const configFilePath = process.argv[2];
42
+ const nodeConfig = process.argv[2];
43
43
  const testName = process.argv[3] || "allTests";
44
- console.log(`[NODE BUILDER] configFilePath: ${configFilePath}`);
44
+ console.log(`[NODE BUILDER] nodeConfig: ${nodeConfig}`);
45
45
  // run esbuild in watch mode using esbuildConfigs. Write to fs the bundle and metafile
46
46
  async function startBundling(config) {
47
47
  console.log(`[NODE BUILDER] is now bundling: ${testName}`);
@@ -58,11 +58,11 @@ async function startBundling(config) {
58
58
  }
59
59
  async function main() {
60
60
  try {
61
- const config = (await Promise.resolve(`${configFilePath}`).then(s => __importStar(require(s)))).default;
61
+ const config = (await Promise.resolve(`${nodeConfig}`).then(s => __importStar(require(s)))).default;
62
62
  await startBundling(config);
63
63
  }
64
64
  catch (error) {
65
- console.error("NODE BUILDER: Error importing config:", configFilePath, error);
65
+ console.error("NODE BUILDER: Error importing config:", nodeConfig, error);
66
66
  console.error(error);
67
67
  process.exit(1);
68
68
  }