track-cli 3.0.0 → 3.1.0-rc1

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.
@@ -6,6 +6,7 @@ import { EnvSettings, FileListType, } from "../track/types.js";
6
6
  import { OrcaClient } from "../orca/client.js";
7
7
  import { FileType } from "../orca/types.js";
8
8
  import * as colors from "../../deps/deno.land/std@0.195.0/fmt/colors.js";
9
+ const MAX_MEMORY_FOR_TEST = 512 * 1024 * 1024; // 512 MB
9
10
  export async function run(options) {
10
11
  const trackContext = await getCommonChallengeContext();
11
12
  const api = trackContext.api;
@@ -13,7 +14,7 @@ export async function run(options) {
13
14
  const codingContext = trackContext.codingContext;
14
15
  // const orcaHost = Deno.env.get("ORCA_HOST") || "track-prod-frontend.orca.run";
15
16
  // Temporary code to retrieve the Orca host. Will be able to get from CodingContext in the future.
16
- const orcaHost = await api.orcaHost();
17
+ const orcaHost = codingContext.orcaHost || await api.orcaHost();
17
18
  const token = await api.orcaToken(codingContext.urlForOrcaToken);
18
19
  const orca = new OrcaClient(orcaHost, token);
19
20
  await orca.connect();
@@ -87,6 +88,7 @@ export async function run(options) {
87
88
  files: buildRan ? [] : files,
88
89
  envVars: {},
89
90
  tarballUrls: buildRan ? [] : codingContext.tarballUrls,
91
+ memoryBytes: MAX_MEMORY_FOR_TEST,
90
92
  };
91
93
  const scoreCounter = new CountPassingLineHandler();
92
94
  const runDoneData = await orca.simpleRunCommand(runCmd, scoreCounter);
package/esm/src/meta.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export declare const VERSION = "3.0.0";
1
+ export declare const VERSION = "3.1.0-rc1";
2
2
  export declare const DESCRIPTION = "A CLI for interacting with tracks.run and running code tests on track's servers";
3
3
  export declare function checkUpdates(): Promise<boolean>;
package/esm/src/meta.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as colors from "../deps/deno.land/std@0.195.0/fmt/colors.js";
2
2
  // @ts-ignore: has no exported member
3
3
  import { CookieJar, fetch } from "node-fetch-cookies";
4
- export const VERSION = "3.0.0";
4
+ export const VERSION = "3.1.0-rc1";
5
5
  export const DESCRIPTION = "A CLI for interacting with tracks.run and running code tests on track's servers";
6
6
  const VERSION_RE = /^(\d+)\.(\d+)\.(\d+)(?:-?(.*))$/;
7
7
  function parseSemver(s) {
@@ -25,6 +25,7 @@ export type SimpleRunCommand = {
25
25
  files: CodeFile[];
26
26
  envVars: Record<string, string>;
27
27
  tarballUrls: string[];
28
+ memoryBytes?: number;
28
29
  };
29
30
  export type EnvVarsCommand = {
30
31
  envVars: Record<string, string>;
@@ -136,6 +136,7 @@ export interface CodingContext {
136
136
  challengeLanguage: SpokenLanguage;
137
137
  settings: ChallengeSettings;
138
138
  answers: CodingAnswers;
139
+ orcaHost?: string;
139
140
  }
140
141
  export declare const FileListType: {
141
142
  readonly All: 0;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "track": "./esm/src/main.js"
4
4
  },
5
5
  "name": "track-cli",
6
- "version": "3.0.0",
6
+ "version": "3.1.0-rc1",
7
7
  "description": "A CLI for interacting with tracks.run and running code tests on track's servers",
8
8
  "license": "MIT",
9
9
  "repository": {