testeranto 0.219.6 → 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.
@@ -20,7 +20,9 @@ const externalTests = true;
20
20
  export const nodeBuildCommand = (fpath) => {
21
21
  if (externalTests) {
22
22
  console.log("external tests", process.cwd());
23
+ // return `cat node_modules/testeranto/src/server/runtimes/node/esbuild.ts`
23
24
  return `yarn tsx node_modules/testeranto/src/server/runtimes/node/node.ts ${fpath}`;
25
+ // return `cat node_modules/testeranto/src/server/runtimes/node/node.ts`
24
26
  // return ["sh", "-c", "cd /workspace && javac -cp \".:lib/*\" src/server/runtimes/java/main.java && java -cp \"src/server/runtimes/java:.\" main"]
25
27
  }
26
28
  else {
@@ -5,22 +5,23 @@ import rebuildPlugin from "../../../esbuildConfigs/rebuildPlugin.js";
5
5
  const absoluteBundlesDir = (c) => {
6
6
  return "./testeranto/bundles/allTests/node/";
7
7
  };
8
- export default (config, testName) => {
8
+ export default (projectConfig, testName) => {
9
9
  var _a, _b, _c;
10
- console.log(config);
10
+ console.log("mark77", projectConfig);
11
11
  // Get entry points from config, or use a default
12
12
  let entrypoints = [];
13
- if ((_a = config.node) === null || _a === void 0 ? void 0 : _a.tests) {
14
- entrypoints = Object.keys(config.node.tests);
13
+ if ((_a = projectConfig.node) === null || _a === void 0 ? void 0 : _a.tests) {
14
+ entrypoints = Object.keys(projectConfig.node.tests);
15
15
  }
16
16
  else {
17
- throw "config.node.tests should exist";
17
+ // console.log(projectConfig)
18
+ throw "projectConfig.node.tests should exist";
18
19
  // Fallback to a reasonable default
19
20
  // entrypoints = ["./example/Calculator.test.ts"];
20
21
  // console.warn(`No node.tests found in config, using default entry point: ${entrypoints[0]}`);
21
22
  }
22
23
  const { inputFilesPluginFactory, register } = inputFilesPlugin("node", testName);
23
- return Object.assign(Object.assign({}, baseEsBuildConfig(config)), { outdir: absoluteBundlesDir(config), outbase: ".", metafile: true, supported: {
24
+ return Object.assign(Object.assign({}, baseEsBuildConfig(projectConfig)), { outdir: absoluteBundlesDir(projectConfig), outbase: ".", metafile: true, supported: {
24
25
  "dynamic-import": true,
25
26
  }, define: {
26
27
  "process.env.FLUENTFFMPEG_COV": "0",
@@ -29,6 +30,6 @@ export default (config, testName) => {
29
30
  featuresPlugin,
30
31
  inputFilesPluginFactory,
31
32
  rebuildPlugin("node"),
32
- ...(((_c = (_b = config.node) === null || _b === void 0 ? void 0 : _b.plugins) === null || _c === void 0 ? void 0 : _c.map((p) => p(register, entrypoints))) || []),
33
+ ...(((_c = (_b = projectConfig.node) === null || _b === void 0 ? void 0 : _b.plugins) === null || _c === void 0 ? void 0 : _c.map((p) => p(register, entrypoints))) || []),
33
34
  ] });
34
35
  };
@@ -1,9 +1,9 @@
1
1
  import esbuild from "esbuild";
2
2
  import nodeConfiger from "./esbuild";
3
3
  import { processMetafile } from "../common";
4
- const configFilePath = process.argv[2];
4
+ const nodeConfig = process.argv[2];
5
5
  const testName = process.argv[3] || "allTests";
6
- console.log(`[NODE BUILDER] configFilePath: ${configFilePath}`);
6
+ console.log(`[NODE BUILDER] nodeConfig: ${nodeConfig}`);
7
7
  // run esbuild in watch mode using esbuildConfigs. Write to fs the bundle and metafile
8
8
  async function startBundling(config) {
9
9
  console.log(`[NODE BUILDER] is now bundling: ${testName}`);
@@ -20,11 +20,11 @@ async function startBundling(config) {
20
20
  }
21
21
  async function main() {
22
22
  try {
23
- const config = (await import(configFilePath)).default;
23
+ const config = (await import(nodeConfig)).default;
24
24
  await startBundling(config);
25
25
  }
26
26
  catch (error) {
27
- console.error("NODE BUILDER: Error importing config:", configFilePath, error);
27
+ console.error("NODE BUILDER: Error importing config:", nodeConfig, error);
28
28
  console.error(error);
29
29
  process.exit(1);
30
30
  }