@factorialco/gat 0.0.12 → 0.0.13

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/dist/job.d.ts CHANGED
@@ -20,6 +20,7 @@ export interface Service {
20
20
  options?: string;
21
21
  }
22
22
  export interface JobOptions<Step, Runner, Name> {
23
+ prettyName?: string;
23
24
  ifExpression?: string;
24
25
  runsOn?: Runner;
25
26
  timeout?: number;
package/dist/workflow.js CHANGED
@@ -53,9 +53,10 @@ class Workflow {
53
53
  env: this.env.length > 0
54
54
  ? Object.fromEntries(this.env.map(({ name, value }) => [name, value]))
55
55
  : undefined,
56
- jobs: Object.fromEntries(this.jobs.map(({ name, options: { ifExpression, runsOn, matrix, env, steps, dependsOn, services, timeout, concurrency, outputs, }, }) => [
56
+ jobs: Object.fromEntries(this.jobs.map(({ name, options: { prettyName, ifExpression, runsOn, matrix, env, steps, dependsOn, services, timeout, concurrency, outputs, }, }) => [
57
57
  name,
58
58
  {
59
+ name: prettyName,
59
60
  if: ifExpression,
60
61
  "runs-on": this.assignRunner(runsOn),
61
62
  "timeout-minutes": timeout ?? 15,
@@ -191,4 +191,13 @@ const workflow_1 = require("./workflow");
191
191
  });
192
192
  (0, vitest_1.expect)(workflow.compile()).toMatchSnapshot();
193
193
  });
194
+ (0, vitest_1.it)("supports a pretty name for the job", () => {
195
+ const workflow = new workflow_1.Workflow("Job with pretty name")
196
+ .on("push")
197
+ .addJob("job1", {
198
+ prettyName: "My pretty name",
199
+ steps: [{ name: "Do something", run: "exit 0" }],
200
+ });
201
+ (0, vitest_1.expect)(workflow.compile()).toMatchSnapshot();
202
+ });
194
203
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/gat",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "TODO",
5
5
  "bin": {
6
6
  "gat": "dist/cli.js"