@factorialco/gat 1.4.0 → 1.5.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/cli.js +1 -1
- package/dist/event.d.ts +3 -3
- package/dist/job.d.ts +1 -1
- package/dist/step.d.ts +1 -1
- package/package.json +8 -8
package/dist/cli.js
CHANGED
|
@@ -15,7 +15,7 @@ const writeFilePromise = (0, util_1.promisify)(fs_1.default.writeFile);
|
|
|
15
15
|
const folder = path_1.default.join(process.cwd(), ".github", "templates");
|
|
16
16
|
const parseFile = async (templateFile) => {
|
|
17
17
|
// NOTE: can we improve this using ts-node or typescript programatically?
|
|
18
|
-
const { stdout } = await execPromise(`npx ts-node --swc -T ${templateFile}`);
|
|
18
|
+
const { stdout } = await execPromise(`npx ts-node ${process.env["GAT_BUILD_FLAGS"] ?? "--swc -T"} ${templateFile}`);
|
|
19
19
|
await writeFilePromise(path_1.default.join(process.cwd(), ".github", "workflows", templateFile.split("/").at(-1).replace(".ts", ".yml")), stdout);
|
|
20
20
|
};
|
|
21
21
|
const cli = new commander_1.Command();
|
package/dist/event.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type EventName = "push" | "pull_request" | "pull_request_review" | "workflow_run" | "workflow_dispatch" | "schedule" | "pull_request_target" | "repository_dispatch";
|
|
2
|
+
export 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 "repository_dispatch" ? RepositoryDispatchEventOptions : never;
|
|
3
3
|
interface PushEventOptions {
|
|
4
4
|
branches?: string[];
|
|
5
5
|
paths?: string[];
|
|
@@ -27,7 +27,7 @@ interface WorkflowDispatchInput {
|
|
|
27
27
|
interface WorkflowDispatchEventOptions {
|
|
28
28
|
inputs?: Record<string, WorkflowDispatchInput>;
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
type ScheduleEventOptions = Array<{
|
|
31
31
|
cron: string;
|
|
32
32
|
}>;
|
|
33
33
|
interface RepositoryDispatchEventOptions {
|
package/dist/job.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export interface JobOptions<Step, Runner, Name> {
|
|
|
35
35
|
outputs?: Record<string, string>;
|
|
36
36
|
workingDirectory?: string;
|
|
37
37
|
}
|
|
38
|
-
export
|
|
38
|
+
export type StringWithNoSpaces<T> = T extends `${string} ${string}` ? never : T extends ` ${string}` ? never : T extends `${string} ` ? never : T;
|
|
39
39
|
export interface Job<Step, Runner, Name> {
|
|
40
40
|
name: string;
|
|
41
41
|
options: JobOptions<Step, Runner, Name>;
|
package/dist/step.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@factorialco/gat",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Write your GitHub Actions workflows using TypeScript",
|
|
5
5
|
"bin": {
|
|
6
6
|
"gat": "dist/cli.js"
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"@swc/core": "^1.3.14",
|
|
27
27
|
"@types/js-yaml": "^4.0.5",
|
|
28
28
|
"@types/lodash": "^4.14.184",
|
|
29
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
30
|
-
"@typescript-eslint/parser": "^
|
|
31
|
-
"commander": "^
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "^6.9.1",
|
|
30
|
+
"@typescript-eslint/parser": "^6.9.1",
|
|
31
|
+
"commander": "^11.1.0",
|
|
32
32
|
"eslint": "^8.23.0",
|
|
33
|
-
"eslint-config-prettier": "^
|
|
34
|
-
"prettier": "
|
|
35
|
-
"typescript": "^
|
|
36
|
-
"vitest": "^0.
|
|
33
|
+
"eslint-config-prettier": "^9.0.0",
|
|
34
|
+
"prettier": "^3.0.3",
|
|
35
|
+
"typescript": "^5.2.2",
|
|
36
|
+
"vitest": "^0.34.6"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"js-yaml": "^4.1.0",
|