@savvy-web/github-action-builder 0.7.3 → 0.7.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/index.js CHANGED
@@ -1,134 +1,10 @@
1
- import { Effect, ManagedRuntime, Schema } from "effect";
2
- import { AppLayer, BuildService, ConfigService, ValidationService, ValidationResultSchema, BuildResultSchema, PersistLocalResultSchema, defineConfig, PersistLocalService } from "./948.js";
3
- const GitHubActionBuildResultSchema = Schema.Struct({
4
- success: Schema.Boolean,
5
- build: Schema.optional(BuildResultSchema),
6
- validation: Schema.optional(ValidationResultSchema),
7
- persistLocal: Schema.optional(PersistLocalResultSchema),
8
- error: Schema.optional(Schema.String),
9
- cause: Schema.optional(Schema.Unknown)
10
- });
11
- class GitHubAction {
12
- runtime;
13
- config = null;
14
- cwd;
15
- configSource;
16
- skipValidation;
17
- clean;
18
- constructor(options = {}){
19
- const layer = options.layer ?? AppLayer;
20
- this.runtime = ManagedRuntime.make(layer);
21
- this.configSource = options.config;
22
- this.cwd = options.cwd ?? process.cwd();
23
- this.skipValidation = options.skipValidation ?? false;
24
- this.clean = options.clean ?? true;
25
- }
26
- static create(options = {}) {
27
- return new GitHubAction(options);
28
- }
29
- async loadConfig() {
30
- if (this.config) return this.config;
31
- const configSource = this.configSource;
32
- const cwd = this.cwd;
33
- const program = Effect.gen(function*() {
34
- const configService = yield* ConfigService;
35
- if ("string" == typeof configSource) {
36
- const result = yield* configService.load({
37
- cwd,
38
- configPath: configSource
39
- });
40
- return result.config;
41
- }
42
- if (configSource) return defineConfig(configSource);
43
- const result = yield* configService.load({
44
- cwd
45
- });
46
- return result.config;
47
- });
48
- const config = await this.runtime.runPromise(program);
49
- this.config = config;
50
- return config;
51
- }
52
- async validate(options = {}) {
53
- const config = await this.loadConfig();
54
- const cwd = this.cwd;
55
- const program = Effect.gen(function*() {
56
- const validationService = yield* ValidationService;
57
- return yield* validationService.validate(config, {
58
- cwd,
59
- ...options
60
- });
61
- });
62
- return this.runtime.runPromise(program);
63
- }
64
- async build() {
65
- try {
66
- const config = await this.loadConfig();
67
- let validationResult;
68
- if (!this.skipValidation) {
69
- validationResult = await this.validate();
70
- if (!validationResult.valid) return {
71
- success: false,
72
- validation: validationResult,
73
- error: "Validation failed"
74
- };
75
- }
76
- const cwd = this.cwd;
77
- const clean = this.clean;
78
- const program = Effect.gen(function*() {
79
- const buildService = yield* BuildService;
80
- const buildOptions = {
81
- cwd,
82
- clean
83
- };
84
- return yield* buildService.build(config, buildOptions);
85
- });
86
- const buildResult = await this.runtime.runPromise(program);
87
- if (!buildResult.success) {
88
- if (validationResult) return {
89
- success: false,
90
- build: buildResult,
91
- validation: validationResult,
92
- error: buildResult.error ?? "Build failed"
93
- };
94
- return {
95
- success: false,
96
- build: buildResult,
97
- error: buildResult.error ?? "Build failed"
98
- };
99
- }
100
- let persistLocalResult;
101
- if (config.persistLocal.enabled) {
102
- const persistProgram = Effect.gen(function*() {
103
- const persistLocalService = yield* PersistLocalService;
104
- return yield* persistLocalService.persist(config, {
105
- cwd
106
- });
107
- });
108
- persistLocalResult = await this.runtime.runPromise(persistProgram);
109
- }
110
- if (validationResult) return {
111
- success: true,
112
- build: buildResult,
113
- validation: validationResult,
114
- persistLocal: persistLocalResult
115
- };
116
- return {
117
- success: true,
118
- build: buildResult,
119
- persistLocal: persistLocalResult
120
- };
121
- } catch (error) {
122
- return {
123
- success: false,
124
- error: error instanceof Error ? error.message : "Unknown error",
125
- cause: error
126
- };
127
- }
128
- }
129
- async dispose() {
130
- await this.runtime.dispose();
131
- }
132
- }
133
- export { ActionYmlMissing, ActionYmlMissingBase, ActionYmlPathError, ActionYmlPathErrorBase, ActionYmlResultSchema, ActionYmlSchemaError, ActionYmlSchemaErrorBase, ActionYmlSyntaxError, ActionYmlSyntaxErrorBase, AppLayer, BuildFailed, BuildFailedBase, BuildLayer, BuildOptionsSchema, BuildResultSchema, BuildRunnerOptionsSchema, BuildService, BundleFailed, BundleFailedBase, BundleResultSchema, BundleStatsSchema, CleanError, CleanErrorBase, ConfigInputSchema, ConfigInvalid, ConfigInvalidBase, ConfigLayer, ConfigLoadFailed, ConfigLoadFailedBase, ConfigNotFound, ConfigNotFoundBase, ConfigSchema, ConfigService, DetectEntriesResultSchema, DetectedEntrySchema, EntriesSchema, EntryFileMissing, EntryFileMissingBase, LoadConfigOptionsSchema, MainEntryMissing, MainEntryMissingBase, PersistLocalError, PersistLocalErrorBase, PersistLocalLayer, PersistLocalOptionsSchema, PersistLocalResultSchema, PersistLocalRunnerOptionsSchema, PersistLocalService, ValidateOptionsSchema, ValidationErrorSchema, ValidationFailed, ValidationFailedBase, ValidationLayer, ValidationOptionsSchema, ValidationResultSchema, ValidationService, ValidationWarningSchema, WriteError, WriteErrorBase, defineConfig } from "./948.js";
134
- export { GitHubAction, GitHubActionBuildResultSchema };
1
+ import { ActionYmlMissing, ActionYmlMissingBase, ActionYmlPathError, ActionYmlPathErrorBase, ActionYmlSchemaError, ActionYmlSchemaErrorBase, ActionYmlSyntaxError, ActionYmlSyntaxErrorBase, BuildFailed, BuildFailedBase, BundleFailed, BundleFailedBase, CleanError, CleanErrorBase, ConfigInvalid, ConfigInvalidBase, ConfigLoadFailed, ConfigLoadFailedBase, ConfigNotFound, ConfigNotFoundBase, EntryFileMissing, EntryFileMissingBase, MainEntryMissing, MainEntryMissingBase, PersistLocalError, PersistLocalErrorBase, ValidationFailed, ValidationFailedBase, WriteError, WriteErrorBase } from "./errors.js";
2
+ import { BuildResultSchema, BuildRunnerOptionsSchema, BuildService, BundleResultSchema, BundleStatsSchema } from "./services/build.js";
3
+ import { BuildOptionsSchema, ConfigInputSchema, ConfigSchema, EntriesSchema, PersistLocalOptionsSchema, ValidationOptionsSchema, defineConfig } from "./schemas/config.js";
4
+ import { ConfigService, DetectEntriesResultSchema, DetectedEntrySchema, LoadConfigOptionsSchema } from "./services/config.js";
5
+ import { PersistLocalResultSchema, PersistLocalRunnerOptionsSchema, PersistLocalService } from "./services/persist-local.js";
6
+ import { ActionYmlResultSchema, ValidateOptionsSchema, ValidationErrorSchema, ValidationResultSchema, ValidationService, ValidationWarningSchema } from "./services/validation.js";
7
+ import { AppLayer, BuildLayer, ConfigLayer, PersistLocalLayer, ValidationLayer } from "./layers/app.js";
8
+ import { GitHubAction, GitHubActionBuildResultSchema } from "./github-action.js";
9
+
10
+ export { ActionYmlMissing, ActionYmlMissingBase, ActionYmlPathError, ActionYmlPathErrorBase, ActionYmlResultSchema, ActionYmlSchemaError, ActionYmlSchemaErrorBase, ActionYmlSyntaxError, ActionYmlSyntaxErrorBase, AppLayer, BuildFailed, BuildFailedBase, BuildLayer, BuildOptionsSchema, BuildResultSchema, BuildRunnerOptionsSchema, BuildService, BundleFailed, BundleFailedBase, BundleResultSchema, BundleStatsSchema, CleanError, CleanErrorBase, ConfigInputSchema, ConfigInvalid, ConfigInvalidBase, ConfigLayer, ConfigLoadFailed, ConfigLoadFailedBase, ConfigNotFound, ConfigNotFoundBase, ConfigSchema, ConfigService, DetectEntriesResultSchema, DetectedEntrySchema, EntriesSchema, EntryFileMissing, EntryFileMissingBase, GitHubAction, GitHubActionBuildResultSchema, LoadConfigOptionsSchema, MainEntryMissing, MainEntryMissingBase, PersistLocalError, PersistLocalErrorBase, PersistLocalLayer, PersistLocalOptionsSchema, PersistLocalResultSchema, PersistLocalRunnerOptionsSchema, PersistLocalService, ValidateOptionsSchema, ValidationErrorSchema, ValidationFailed, ValidationFailedBase, ValidationLayer, ValidationOptionsSchema, ValidationResultSchema, ValidationService, ValidationWarningSchema, WriteError, WriteErrorBase, defineConfig };
package/layers/app.js ADDED
@@ -0,0 +1,83 @@
1
+ import { BuildServiceLive } from "../services/build-live.js";
2
+ import { ConfigServiceLive } from "../services/config-live.js";
3
+ import { PersistLocalServiceLive } from "../services/persist-local-live.js";
4
+ import { ValidationServiceLive } from "../services/validation-live.js";
5
+ import { Layer } from "effect";
6
+
7
+ //#region src/layers/app.ts
8
+ /**
9
+ * Application Layer composition.
10
+ *
11
+ * @remarks
12
+ * Composes all service layers into a single application layer for use
13
+ * with Effect programs. These layers provide the runtime implementations
14
+ * of the service interfaces.
15
+ */
16
+ /**
17
+ * Layer providing ConfigService (no dependencies).
18
+ *
19
+ * @remarks
20
+ * Use this layer when you only need configuration management.
21
+ *
22
+ * @public
23
+ */
24
+ const ConfigLayer = ConfigServiceLive;
25
+ /**
26
+ * Layer providing ValidationService (depends on ConfigService).
27
+ *
28
+ * @remarks
29
+ * Includes ConfigService automatically.
30
+ *
31
+ * @public
32
+ */
33
+ const ValidationLayer = ValidationServiceLive.pipe(Layer.provide(ConfigServiceLive));
34
+ /**
35
+ * Layer providing BuildService (depends on ConfigService).
36
+ *
37
+ * @remarks
38
+ * Includes ConfigService automatically.
39
+ *
40
+ * @public
41
+ */
42
+ const BuildLayer = BuildServiceLive.pipe(Layer.provide(ConfigServiceLive));
43
+ /**
44
+ * Layer providing PersistLocalService (no dependencies).
45
+ *
46
+ * @remarks
47
+ * Use this layer when you only need persist-local functionality.
48
+ *
49
+ * @public
50
+ */
51
+ const PersistLocalLayer = PersistLocalServiceLive;
52
+ /**
53
+ * Combined layer providing all services.
54
+ *
55
+ * @remarks
56
+ * This layer composes ConfigService, ValidationService, BuildService,
57
+ * and PersistLocalService.
58
+ * Use this when you need access to all services in your Effect program.
59
+ *
60
+ * @example Using AppLayer with Effect
61
+ * ```typescript
62
+ * import { Effect } from "effect";
63
+ * import { AppLayer, BuildService, ConfigService } from "@savvy-web/github-action-builder";
64
+ *
65
+ * const program = Effect.gen(function* () {
66
+ * const configService = yield* ConfigService;
67
+ * const buildService = yield* BuildService;
68
+ *
69
+ * const { config } = yield* configService.load();
70
+ * const result = yield* buildService.build(config);
71
+ *
72
+ * return result;
73
+ * });
74
+ *
75
+ * Effect.runPromise(program.pipe(Effect.provide(AppLayer)));
76
+ * ```
77
+ *
78
+ * @public
79
+ */
80
+ const AppLayer = Layer.mergeAll(ConfigServiceLive, ValidationLayer, BuildLayer, PersistLocalLayer);
81
+
82
+ //#endregion
83
+ export { AppLayer, BuildLayer, ConfigLayer, PersistLocalLayer, ValidationLayer };
package/package.json CHANGED
@@ -1,92 +1,76 @@
1
1
  {
2
- "name": "@savvy-web/github-action-builder",
3
- "version": "0.7.3",
4
- "private": false,
5
- "description": "A zero-config build tool for creating GitHub Actions from TypeScript. Bundles with rsbuild, validates action.yml against GitHub's schema, and outputs production-ready Node.js 24 actions.",
6
- "keywords": [
7
- "github-actions",
8
- "github",
9
- "actions",
10
- "rsbuild",
11
- "rspack",
12
- "bundler",
13
- "typescript",
14
- "node24",
15
- "cli",
16
- "build-tool",
17
- "action-builder",
18
- "effect-ts",
19
- "esm"
20
- ],
21
- "homepage": "https://github.com/savvy-web/systems/tree/main/packages/github-action-builder",
22
- "bugs": {
23
- "url": "https://github.com/savvy-web/systems/issues"
24
- },
25
- "repository": {
26
- "type": "git",
27
- "url": "git+https://github.com/savvy-web/systems.git",
28
- "directory": "packages/github-action-builder"
29
- },
30
- "license": "MIT",
31
- "author": {
32
- "name": "C. Spencer Beggs",
33
- "email": "spencer@savvyweb.systems",
34
- "url": "https://savvyweb.systems"
35
- },
36
- "type": "module",
37
- "exports": {
38
- ".": {
39
- "types": "./index.d.ts",
40
- "import": "./index.js"
41
- },
42
- "./tsconfig/action.json": "./tsconfig/action.json"
43
- },
44
- "bin": {
45
- "github-action-builder": "bin/github-action-builder.js"
46
- },
47
- "dependencies": {
48
- "@effect/cli": "^0.75.1",
49
- "@effect/platform": "^0.96.1",
50
- "@effect/platform-node": "^0.106.0",
51
- "@effect/printer": "^0.49.0",
52
- "@effect/printer-ansi": "^0.49.0",
53
- "@effect/typeclass": "^0.40.0",
54
- "@rsbuild/core": "^2.0.9",
55
- "effect": "^3.21.2",
56
- "jiti": "^2.7.0",
57
- "picocolors": "^1.1.1",
58
- "yaml-effect": "^0.6.0"
59
- },
60
- "peerDependencies": {
61
- "@types/node": "^25.6.0",
62
- "@typescript/native-preview": "^7.0.0-dev.20260513.1",
63
- "typescript": "^6.0.0"
64
- },
65
- "peerDependenciesMeta": {
66
- "@types/node": {
67
- "optional": false
68
- },
69
- "@typescript/native-preview": {
70
- "optional": false
71
- },
72
- "typescript": {
73
- "optional": false
74
- }
75
- },
76
- "files": [
77
- "!github-action-builder.api.json",
78
- "!tsconfig.json",
79
- "!tsdoc.json",
80
- "231.js",
81
- "612.js",
82
- "948.js",
83
- "LICENSE",
84
- "README.md",
85
- "bin/github-action-builder.js",
86
- "index.d.ts",
87
- "index.js",
88
- "package.json",
89
- "tsconfig/action.json",
90
- "tsdoc-metadata.json"
91
- ]
2
+ "name": "@savvy-web/github-action-builder",
3
+ "version": "0.7.5",
4
+ "private": false,
5
+ "description": "A zero-config build tool for creating GitHub Actions from TypeScript. Bundles with rsbuild, validates action.yml against GitHub's schema, and outputs production-ready Node.js 24 actions.",
6
+ "keywords": [
7
+ "github-actions",
8
+ "github",
9
+ "actions",
10
+ "rsbuild",
11
+ "rspack",
12
+ "bundler",
13
+ "typescript",
14
+ "node24",
15
+ "cli",
16
+ "build-tool",
17
+ "action-builder",
18
+ "effect-ts",
19
+ "esm"
20
+ ],
21
+ "homepage": "https://github.com/savvy-web/systems/tree/main/packages/github-action-builder",
22
+ "bugs": {
23
+ "url": "https://github.com/savvy-web/systems/issues"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/savvy-web/systems.git",
28
+ "directory": "packages/github-action-builder"
29
+ },
30
+ "license": "MIT",
31
+ "author": {
32
+ "name": "C. Spencer Beggs",
33
+ "email": "spencer@savvyweb.systems",
34
+ "url": "https://savvyweb.systems"
35
+ },
36
+ "type": "module",
37
+ "exports": {
38
+ ".": {
39
+ "types": "./index.d.ts",
40
+ "import": "./index.js"
41
+ },
42
+ "./tsconfig/action.json": "./public/tsconfig/action.json"
43
+ },
44
+ "bin": {
45
+ "github-action-builder": "bin/github-action-builder.js"
46
+ },
47
+ "dependencies": {
48
+ "@effect/cli": "^0.75.1",
49
+ "@effect/platform": "^0.96.1",
50
+ "@effect/platform-node": "^0.106.0",
51
+ "@effect/printer": "^0.49.0",
52
+ "@effect/printer-ansi": "^0.49.0",
53
+ "@effect/typeclass": "^0.40.0",
54
+ "@rsbuild/core": "^2.0.9",
55
+ "effect": "^3.21.2",
56
+ "jiti": "^2.7.0",
57
+ "picocolors": "^1.1.1",
58
+ "yaml-effect": "^0.6.0"
59
+ },
60
+ "peerDependencies": {
61
+ "@types/node": "^25.9.0",
62
+ "@typescript/native-preview": "^7.0.0-dev.20260513.1",
63
+ "typescript": "^6.0.0"
64
+ },
65
+ "peerDependenciesMeta": {
66
+ "@types/node": {
67
+ "optional": false
68
+ },
69
+ "@typescript/native-preview": {
70
+ "optional": false
71
+ },
72
+ "typescript": {
73
+ "optional": false
74
+ }
75
+ }
92
76
  }
@@ -0,0 +1,110 @@
1
+ import { Schema } from "effect";
2
+
3
+ //#region src/schemas/action-yml.ts
4
+ /**
5
+ * GitHub Action action.yml schema validation using Effect Schema.
6
+ *
7
+ * @remarks
8
+ * Validates structure according to GitHub's action.yml specification.
9
+ * Based on the official JSON Schema from SchemaStore.
10
+ *
11
+ * @see {@link https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions | GitHub Actions metadata syntax}
12
+ * @see {@link https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/github-action.json | Official JSON Schema}
13
+ *
14
+ * @internal
15
+ */
16
+ /**
17
+ * Valid Feather icons for GitHub Action branding.
18
+ *
19
+ * @remarks
20
+ * Complete list from the official GitHub Actions schema.
21
+ *
22
+ * @internal
23
+ */
24
+ const BrandingIcon = Schema.Literal("activity", "airplay", "alert-circle", "alert-octagon", "alert-triangle", "align-center", "align-justify", "align-left", "align-right", "anchor", "aperture", "archive", "arrow-down-circle", "arrow-down-left", "arrow-down-right", "arrow-down", "arrow-left-circle", "arrow-left", "arrow-right-circle", "arrow-right", "arrow-up-circle", "arrow-up-left", "arrow-up-right", "arrow-up", "at-sign", "award", "bar-chart-2", "bar-chart", "battery-charging", "battery", "bell-off", "bell", "bluetooth", "bold", "book-open", "book", "bookmark", "box", "briefcase", "calendar", "camera-off", "camera", "cast", "check-circle", "check-square", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "chevrons-down", "chevrons-left", "chevrons-right", "chevrons-up", "circle", "clipboard", "clock", "cloud-drizzle", "cloud-lightning", "cloud-off", "cloud-rain", "cloud-snow", "cloud", "code", "command", "compass", "copy", "corner-down-left", "corner-down-right", "corner-left-down", "corner-left-up", "corner-right-down", "corner-right-up", "corner-up-left", "corner-up-right", "cpu", "credit-card", "crop", "crosshair", "database", "delete", "disc", "dollar-sign", "download-cloud", "download", "droplet", "edit-2", "edit-3", "edit", "external-link", "eye-off", "eye", "fast-forward", "feather", "file-minus", "file-plus", "file-text", "file", "film", "filter", "flag", "folder-minus", "folder-plus", "folder", "gift", "git-branch", "git-commit", "git-merge", "git-pull-request", "globe", "grid", "hard-drive", "hash", "headphones", "heart", "help-circle", "home", "image", "inbox", "info", "italic", "layers", "layout", "life-buoy", "link-2", "link", "list", "loader", "lock", "log-in", "log-out", "mail", "map-pin", "map", "maximize-2", "maximize", "menu", "message-circle", "message-square", "mic-off", "mic", "minimize-2", "minimize", "minus-circle", "minus-square", "minus", "monitor", "moon", "more-horizontal", "more-vertical", "move", "music", "navigation-2", "navigation", "octagon", "package", "paperclip", "pause-circle", "pause", "percent", "phone-call", "phone-forwarded", "phone-incoming", "phone-missed", "phone-off", "phone-outgoing", "phone", "pie-chart", "play-circle", "play", "plus-circle", "plus-square", "plus", "pocket", "power", "printer", "radio", "refresh-ccw", "refresh-cw", "repeat", "rewind", "rotate-ccw", "rotate-cw", "rss", "save", "scissors", "search", "send", "server", "settings", "share-2", "share", "shield-off", "shield", "shopping-bag", "shopping-cart", "shuffle", "sidebar", "skip-back", "skip-forward", "slash", "sliders", "smartphone", "speaker", "square", "star", "stop-circle", "sun", "sunrise", "sunset", "table", "tablet", "tag", "target", "terminal", "thermometer", "thumbs-down", "thumbs-up", "toggle-left", "toggle-right", "trash-2", "trash", "trending-down", "trending-up", "triangle", "truck", "tv", "type", "umbrella", "underline", "unlock", "upload-cloud", "upload", "user-check", "user-minus", "user-plus", "user-x", "user", "users", "video-off", "video", "voicemail", "volume-1", "volume-2", "volume-x", "volume", "watch", "wifi-off", "wifi", "wind", "x-circle", "x-square", "x", "zap-off", "zap", "zoom-in", "zoom-out");
25
+ /**
26
+ * Schema for action input definition.
27
+ *
28
+ * @remarks
29
+ * According to the official schema, `description` is required.
30
+ *
31
+ * @internal
32
+ */
33
+ const ActionInput = Schema.Struct({
34
+ description: Schema.String,
35
+ required: Schema.optional(Schema.Boolean),
36
+ default: Schema.optional(Schema.String),
37
+ deprecationMessage: Schema.optional(Schema.String)
38
+ });
39
+ /**
40
+ * Schema for action output definition (Docker/JavaScript actions).
41
+ *
42
+ * @remarks
43
+ * According to the official schema, `description` is required.
44
+ *
45
+ * @internal
46
+ */
47
+ const ActionOutput = Schema.Struct({ description: Schema.String });
48
+ /**
49
+ * Schema for Node.js action runs configuration.
50
+ *
51
+ * @remarks
52
+ * This tool builds Node.js 24 actions exclusively. The `using` field
53
+ * is fixed to `node24`.
54
+ *
55
+ * @internal
56
+ */
57
+ const Runs = Schema.Struct({
58
+ using: Schema.Literal("node24"),
59
+ main: Schema.String,
60
+ pre: Schema.optional(Schema.String),
61
+ "pre-if": Schema.optional(Schema.String),
62
+ post: Schema.optional(Schema.String),
63
+ "post-if": Schema.optional(Schema.String)
64
+ });
65
+ /**
66
+ * Valid branding colors for GitHub Marketplace.
67
+ *
68
+ * @remarks
69
+ * Complete list from the official schema.
70
+ *
71
+ * @internal
72
+ */
73
+ const BrandingColor = Schema.Literal("white", "black", "yellow", "blue", "green", "orange", "red", "purple", "gray-dark");
74
+ /**
75
+ * Schema for branding configuration.
76
+ * @internal
77
+ */
78
+ const Branding = Schema.Struct({
79
+ icon: Schema.optional(BrandingIcon),
80
+ color: Schema.optional(BrandingColor)
81
+ });
82
+ /**
83
+ * Complete action.yml schema.
84
+ *
85
+ * @remarks
86
+ * This schema validates the structure of action.yml files according to
87
+ * GitHub's metadata syntax specification. Note that the official schema
88
+ * uses `patternProperties` for inputs/outputs key validation which cannot
89
+ * be directly represented in Effect Schema.
90
+ *
91
+ * @internal
92
+ */
93
+ const ActionYml = Schema.Struct({
94
+ name: Schema.String,
95
+ description: Schema.String,
96
+ author: Schema.optional(Schema.String),
97
+ inputs: Schema.optional(Schema.Record({
98
+ key: Schema.String,
99
+ value: ActionInput
100
+ })),
101
+ outputs: Schema.optional(Schema.Record({
102
+ key: Schema.String,
103
+ value: ActionOutput
104
+ })),
105
+ runs: Runs,
106
+ branding: Schema.optional(Branding)
107
+ });
108
+
109
+ //#endregion
110
+ export { ActionYml };