@factorialco/gat 1.2.0 → 1.3.0

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/event.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export declare type EventName = "push" | "pull_request" | "pull_request_review" | "workflow_run" | "workflow_dispatch" | "schedule" | "pull_request_target" | "merge_group";
2
- export declare type EventOptions<T extends EventName> = T extends "push" ? PushEventOptions : T extends "pull_request" ? PullRequestEventOptions : T extends "pull_request_review" ? PullRequestReviewEventOptions : T extends "workflow_run" ? WorkflowRunEventOptions : T extends "workflow_dispatch" ? WorkflowDispatchEventOptions : T extends "schedule" ? ScheduleEventOptions : T extends "merge_group" ? MergeGroupEventOptions : never;
1
+ export declare type EventName = "push" | "pull_request" | "pull_request_review" | "workflow_run" | "workflow_dispatch" | "schedule" | "pull_request_target";
2
+ export declare type EventOptions<T extends EventName> = T extends "push" ? PushEventOptions : T extends "pull_request" ? PullRequestEventOptions : T extends "pull_request_review" ? PullRequestReviewEventOptions : T extends "workflow_run" ? WorkflowRunEventOptions : T extends "workflow_dispatch" ? WorkflowDispatchEventOptions : T extends "schedule" ? ScheduleEventOptions : never;
3
3
  interface PushEventOptions {
4
4
  branches?: string[];
5
5
  paths?: string[];
@@ -20,7 +20,7 @@ interface WorkflowRunEventOptions {
20
20
  interface WorkflowDispatchInput {
21
21
  description: string;
22
22
  required?: boolean;
23
- type?: "choice" | "boolean";
23
+ type?: "choice" | "boolean" | "string";
24
24
  options?: string[];
25
25
  default?: string | boolean;
26
26
  }
@@ -30,9 +30,6 @@ interface WorkflowDispatchEventOptions {
30
30
  declare type ScheduleEventOptions = Array<{
31
31
  cron: string;
32
32
  }>;
33
- interface MergeGroupEventOptions {
34
- types?: Array<"checks_requested">;
35
- }
36
33
  export interface Event {
37
34
  name: EventName;
38
35
  options?: EventOptions<EventName>;
package/dist/job.d.ts CHANGED
@@ -30,7 +30,7 @@ export interface JobOptions<Step, Runner, Name> {
30
30
  services?: Record<string, Service>;
31
31
  env?: Record<string, string>;
32
32
  concurrency?: ConcurrencyGroup;
33
- matrix?: Matrix;
33
+ matrix?: Matrix | string;
34
34
  steps: Step[];
35
35
  outputs?: Record<string, string>;
36
36
  workingDirectory?: string;
package/dist/workflow.js CHANGED
@@ -82,7 +82,7 @@ class Workflow {
82
82
  strategy: matrix
83
83
  ? {
84
84
  "fail-fast": false,
85
- matrix: {
85
+ matrix: typeof matrix === 'string' ? matrix : {
86
86
  ...Object.fromEntries(matrix.elements.map(({ id, options }) => [id, options])),
87
87
  include: matrix.extra,
88
88
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/gat",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Write your GitHub Actions workflows using TypeScript",
5
5
  "bin": {
6
6
  "gat": "dist/cli.js"