@factorialco/gat 0.0.4 → 0.0.5

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
@@ -5,9 +5,9 @@ export interface ConcurrencyGroup {
5
5
  export interface Matrix {
6
6
  elements: Array<{
7
7
  id: string;
8
- options: any[];
8
+ options: Array<string | number | boolean>;
9
9
  }>;
10
- extra?: Array<Record<string, any>>;
10
+ extra?: Array<Record<string, string | number | boolean>>;
11
11
  }
12
12
  export interface Service {
13
13
  image: string;
package/dist/step.d.ts CHANGED
@@ -11,5 +11,5 @@ export interface RunStep extends BaseStep {
11
11
  }
12
12
  export interface UseStep extends BaseStep {
13
13
  uses: string;
14
- with?: any;
14
+ with?: Record<string, string | number | boolean>;
15
15
  }
@@ -19,7 +19,7 @@ export declare class Workflow<JobStep extends BaseStep = Step, Runner = typeof D
19
19
  on<T extends EventName>(name: T, options?: EventOptions<T>): this;
20
20
  addDefaults(options: DefaultOptions): this;
21
21
  addJob<T extends string>(name: T, options: JobOptions<JobStep, Runner, JobName>): Workflow<JobStep, Runner, JobName | T>;
22
- setEnv(name: string, value: any): this;
22
+ setEnv(name: string, value: string): this;
23
23
  defaultRunner(): string;
24
24
  private assignRunner;
25
25
  compile(): string;
package/dist/workflow.js CHANGED
@@ -37,7 +37,7 @@ class Workflow {
37
37
  assignRunner(runsOn) {
38
38
  const runnerName = runsOn ?? this.defaultRunner();
39
39
  const isSelfHosted = !DEFAULT_RUNNERS.includes(runnerName);
40
- return isSelfHosted ? ["self-hosted", runnerName] : [runnerName];
40
+ return isSelfHosted ? ["self-hosted", runnerName] : runnerName;
41
41
  }
42
42
  compile() {
43
43
  const result = {
@@ -43,7 +43,7 @@ const workflow_1 = require("./workflow");
43
43
  workflow
44
44
  .on("push")
45
45
  .setEnv("NODE_VERSION", "16")
46
- .setEnv("ENABLED", true)
46
+ .setEnv("ENABLED", "true")
47
47
  .addJob("job1", {
48
48
  steps: [
49
49
  {
@@ -131,7 +131,7 @@ const workflow_1 = require("./workflow");
131
131
  workflow
132
132
  .on("push")
133
133
  .setEnv("NODE_VERSION", "16")
134
- .setEnv("ENABLED", true)
134
+ .setEnv("ENABLED", "true")
135
135
  .addJob("job1", {
136
136
  steps: [
137
137
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/gat",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "TODO",
5
5
  "bin": {
6
6
  "gat": "dist/cli.js"
@@ -15,13 +15,21 @@
15
15
  "prepare": "npm run build",
16
16
  "prepublishOnly": "vitest run",
17
17
  "test": "vitest",
18
- "coverage": "vitest run --coverage"
18
+ "coverage": "vitest run --coverage",
19
+ "lint": "eslint src/**/*.ts",
20
+ "format": "prettier --write .",
21
+ "format:check": "prettier --check ."
19
22
  },
20
23
  "author": "David Morcillo <david.morcillo@factorial.co>",
21
24
  "license": "ISC",
22
25
  "devDependencies": {
23
26
  "@types/lodash": "^4.14.184",
27
+ "@typescript-eslint/eslint-plugin": "^5.35.1",
28
+ "@typescript-eslint/parser": "^5.35.1",
24
29
  "commander": "^9.4.0",
30
+ "eslint": "^8.23.0",
31
+ "eslint-config-prettier": "^8.5.0",
32
+ "prettier": "2.7.1",
25
33
  "typescript": "^4.7.4",
26
34
  "vitest": "^0.18.1"
27
35
  },