@savvy-web/github-action-builder 1.1.1 → 2.0.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/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Context, Effect, Layer, Schema } from "effect";
2
-
3
2
  //#region src/schemas/config.d.ts
4
3
  /**
5
4
  * Schema for entry point paths.
@@ -10,18 +9,20 @@ import { Context, Effect, Layer, Schema } from "effect";
10
9
  * - `pre`: Runs before the main action (optional)
11
10
  * - `post`: Runs after the main action for cleanup (optional)
12
11
  *
13
- * Additional non-lifecycle bundles can be declared via `workers` (name source path),
14
- * each emitted as `dist/<name>.js`.
12
+ * Additional non-lifecycle bundles can be declared via `workers` (name -\> source path),
13
+ * each emitted as `dist/\{name\}.js`.
15
14
  *
16
15
  * @public
17
16
  */
18
17
  declare const EntriesSchema: Schema.Struct<{
19
- /** Path to the main action entry point. Defaults to "src/main.ts". */main: Schema.optionalWith<typeof Schema.String, {
20
- default: () => string;
21
- }>; /** Path to the pre-action hook entry point. */
22
- pre: Schema.optional<typeof Schema.String>; /** Path to the post-action hook entry point. */
23
- post: Schema.optional<typeof Schema.String>; /** Extra non-lifecycle worker bundles (name -> source path), each emitted as dist/<name>.js. */
24
- workers: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
18
+ /** Path to the main action entry point. Defaults to "src/main.ts". */
19
+ readonly main: Schema.withDecodingDefaultType<Schema.String, never>;
20
+ /** Path to the pre-action hook entry point. */
21
+ readonly pre: Schema.optional<Schema.String>;
22
+ /** Path to the post-action hook entry point. */
23
+ readonly post: Schema.optional<Schema.String>;
24
+ /** Extra non-lifecycle worker bundles (name -\> source path), each emitted as dist/\{name\}.js. */
25
+ readonly workers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
25
26
  }>;
26
27
  /**
27
28
  * Entry point paths configuration.
@@ -39,18 +40,14 @@ type Entries = typeof EntriesSchema.Type;
39
40
  * @public
40
41
  */
41
42
  declare const BuildOptionsSchema: Schema.Struct<{
42
- /** Enable minification to reduce bundle size. Defaults to true. */minify: Schema.optionalWith<typeof Schema.Boolean, {
43
- default: () => true;
44
- }>; /** Generate source maps for debugging. Defaults to false. */
45
- sourceMap: Schema.optionalWith<typeof Schema.Boolean, {
46
- default: () => false;
47
- }>; /** Packages to exclude from the bundle (in addition to node: builtins). Defaults to []. */
48
- externals: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
49
- default: () => never[];
50
- }>; /** Packages to exclude from the bundle and replace with a stub that throws if loaded at runtime. Use for optional transitive dependencies the action never exercises (e.g. native modules). Defaults to []. */
51
- ignore: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
52
- default: () => never[];
53
- }>;
43
+ /** Enable minification to reduce bundle size. Defaults to true. */
44
+ readonly minify: Schema.withDecodingDefaultType<Schema.Boolean, never>;
45
+ /** Generate source maps for debugging. Defaults to false. */
46
+ readonly sourceMap: Schema.withDecodingDefaultType<Schema.Boolean, never>;
47
+ /** Packages to exclude from the bundle (in addition to node: builtins). Defaults to []. */
48
+ readonly externals: Schema.withDecodingDefaultType<Schema.$Array<Schema.String>, never>;
49
+ /** Packages to exclude from the bundle and replace with a stub that throws if loaded at runtime. Use for optional transitive dependencies the action never exercises (e.g. native modules). Defaults to []. */
50
+ readonly ignore: Schema.withDecodingDefaultType<Schema.$Array<Schema.String>, never>;
54
51
  /**
55
52
  * Packages whose dynamic `import(...)` calls must stay native `import()` at runtime instead of
56
53
  * being compiled into an rspack context module. Use this for packages that resolve a module path
@@ -60,9 +57,7 @@ declare const BuildOptionsSchema: Schema.Struct<{
60
57
  * the package here injects a `webpackIgnore` comment into its dynamic imports so rspack leaves
61
58
  * them alone. Defaults to [].
62
59
  */
63
- nativeDynamicImports: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
64
- default: () => never[];
65
- }>;
60
+ readonly nativeDynamicImports: Schema.withDecodingDefaultType<Schema.$Array<Schema.String>, never>;
66
61
  }>;
67
62
  /**
68
63
  * Build options for the bundler.
@@ -80,11 +75,12 @@ type BuildOptions = typeof BuildOptionsSchema.Type;
80
75
  * @public
81
76
  */
82
77
  declare const ValidationOptionsSchema: Schema.Struct<{
83
- /** Require action.yml to exist and be valid. Defaults to true. */requireActionYml: Schema.optionalWith<typeof Schema.Boolean, {
84
- default: () => true;
85
- }>; /** Maximum bundle size before warning/error (e.g., "5mb", "500kb"). */
86
- maxBundleSize: Schema.optional<typeof Schema.String>; /** Treat warnings as errors. Auto-detects from CI when undefined. */
87
- strict: Schema.optional<typeof Schema.Boolean>;
78
+ /** Require action.yml to exist and be valid. Defaults to true. */
79
+ readonly requireActionYml: Schema.withDecodingDefaultType<Schema.Boolean, never>;
80
+ /** Maximum bundle size before warning/error (e.g., "5mb", "500kb"). */
81
+ readonly maxBundleSize: Schema.optional<Schema.String>;
82
+ /** Treat warnings as errors. Auto-detects from CI when undefined. */
83
+ readonly strict: Schema.optional<Schema.Boolean>;
88
84
  }>;
89
85
  /**
90
86
  * Validation options for the build process.
@@ -102,15 +98,12 @@ type ValidationOptions = typeof ValidationOptionsSchema.Type;
102
98
  * @public
103
99
  */
104
100
  declare const PersistLocalOptionsSchema: Schema.Struct<{
105
- /** Enable persisting build output locally. Defaults to true. */enabled: Schema.optionalWith<typeof Schema.Boolean, {
106
- default: () => true;
107
- }>; /** Path for the local action directory, relative to cwd. Defaults to ".github/actions/local". */
108
- path: Schema.optionalWith<typeof Schema.String, {
109
- default: () => string;
110
- }>; /** Generate act boilerplate files (.actrc, act-test.yml) if they don't exist. Defaults to true. */
111
- actTemplate: Schema.optionalWith<typeof Schema.Boolean, {
112
- default: () => true;
113
- }>;
101
+ /** Enable persisting build output locally. Defaults to true. */
102
+ readonly enabled: Schema.withDecodingDefaultType<Schema.Boolean, never>;
103
+ /** Path for the local action directory, relative to cwd. Defaults to ".github/actions/local". */
104
+ readonly path: Schema.withDecodingDefaultType<Schema.String, never>;
105
+ /** Generate act boilerplate files (.actrc, act-test.yml) if they don't exist. Defaults to true. */
106
+ readonly actTemplate: Schema.withDecodingDefaultType<Schema.Boolean, never>;
114
107
  }>;
115
108
  /**
116
109
  * Persist-local options for copying build output.
@@ -128,28 +121,28 @@ type PersistLocalOptions = typeof PersistLocalOptionsSchema.Type;
128
121
  * @public
129
122
  */
130
123
  declare const ConfigInputSchema: Schema.Struct<{
131
- entries: Schema.optional<Schema.Struct<{
132
- main: Schema.optional<typeof Schema.String>;
133
- pre: Schema.optional<typeof Schema.String>;
134
- post: Schema.optional<typeof Schema.String>;
135
- workers: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
124
+ readonly entries: Schema.optional<Schema.Struct<{
125
+ readonly main: Schema.optional<Schema.String>;
126
+ readonly pre: Schema.optional<Schema.String>;
127
+ readonly post: Schema.optional<Schema.String>;
128
+ readonly workers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
136
129
  }>>;
137
- build: Schema.optional<Schema.Struct<{
138
- minify: Schema.optional<typeof Schema.Boolean>;
139
- sourceMap: Schema.optional<typeof Schema.Boolean>;
140
- externals: Schema.optional<Schema.Array$<typeof Schema.String>>;
141
- ignore: Schema.optional<Schema.Array$<typeof Schema.String>>;
142
- nativeDynamicImports: Schema.optional<Schema.Array$<typeof Schema.String>>;
130
+ readonly build: Schema.optional<Schema.Struct<{
131
+ readonly minify: Schema.optional<Schema.Boolean>;
132
+ readonly sourceMap: Schema.optional<Schema.Boolean>;
133
+ readonly externals: Schema.optional<Schema.$Array<Schema.String>>;
134
+ readonly ignore: Schema.optional<Schema.$Array<Schema.String>>;
135
+ readonly nativeDynamicImports: Schema.optional<Schema.$Array<Schema.String>>;
143
136
  }>>;
144
- validation: Schema.optional<Schema.Struct<{
145
- requireActionYml: Schema.optional<typeof Schema.Boolean>;
146
- maxBundleSize: Schema.optional<typeof Schema.String>;
147
- strict: Schema.optional<typeof Schema.Boolean>;
137
+ readonly validation: Schema.optional<Schema.Struct<{
138
+ readonly requireActionYml: Schema.optional<Schema.Boolean>;
139
+ readonly maxBundleSize: Schema.optional<Schema.String>;
140
+ readonly strict: Schema.optional<Schema.Boolean>;
148
141
  }>>;
149
- persistLocal: Schema.optional<Schema.Struct<{
150
- enabled: Schema.optional<typeof Schema.Boolean>;
151
- path: Schema.optional<typeof Schema.String>;
152
- actTemplate: Schema.optional<typeof Schema.Boolean>;
142
+ readonly persistLocal: Schema.optional<Schema.Struct<{
143
+ readonly enabled: Schema.optional<Schema.Boolean>;
144
+ readonly path: Schema.optional<Schema.String>;
145
+ readonly actTemplate: Schema.optional<Schema.Boolean>;
153
146
  }>>;
154
147
  }>;
155
148
  /**
@@ -168,27 +161,25 @@ type ConfigInput = typeof ConfigInputSchema.Type;
168
161
  * @public
169
162
  */
170
163
  declare const ConfigSchema: Schema.Struct<{
171
- entries: Schema.Struct<{
172
- /** Path to the main action entry point. Defaults to "src/main.ts". */main: Schema.optionalWith<typeof Schema.String, {
173
- default: () => string;
174
- }>; /** Path to the pre-action hook entry point. */
175
- pre: Schema.optional<typeof Schema.String>; /** Path to the post-action hook entry point. */
176
- post: Schema.optional<typeof Schema.String>; /** Extra non-lifecycle worker bundles (name -> source path), each emitted as dist/<name>.js. */
177
- workers: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
164
+ readonly entries: Schema.Struct<{
165
+ /** Path to the main action entry point. Defaults to "src/main.ts". */
166
+ readonly main: Schema.withDecodingDefaultType<Schema.String, never>;
167
+ /** Path to the pre-action hook entry point. */
168
+ readonly pre: Schema.optional<Schema.String>;
169
+ /** Path to the post-action hook entry point. */
170
+ readonly post: Schema.optional<Schema.String>;
171
+ /** Extra non-lifecycle worker bundles (name -\> source path), each emitted as dist/\{name\}.js. */
172
+ readonly workers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
178
173
  }>;
179
- build: Schema.Struct<{
180
- /** Enable minification to reduce bundle size. Defaults to true. */minify: Schema.optionalWith<typeof Schema.Boolean, {
181
- default: () => true;
182
- }>; /** Generate source maps for debugging. Defaults to false. */
183
- sourceMap: Schema.optionalWith<typeof Schema.Boolean, {
184
- default: () => false;
185
- }>; /** Packages to exclude from the bundle (in addition to node: builtins). Defaults to []. */
186
- externals: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
187
- default: () => never[];
188
- }>; /** Packages to exclude from the bundle and replace with a stub that throws if loaded at runtime. Use for optional transitive dependencies the action never exercises (e.g. native modules). Defaults to []. */
189
- ignore: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
190
- default: () => never[];
191
- }>;
174
+ readonly build: Schema.Struct<{
175
+ /** Enable minification to reduce bundle size. Defaults to true. */
176
+ readonly minify: Schema.withDecodingDefaultType<Schema.Boolean, never>;
177
+ /** Generate source maps for debugging. Defaults to false. */
178
+ readonly sourceMap: Schema.withDecodingDefaultType<Schema.Boolean, never>;
179
+ /** Packages to exclude from the bundle (in addition to node: builtins). Defaults to []. */
180
+ readonly externals: Schema.withDecodingDefaultType<Schema.$Array<Schema.String>, never>;
181
+ /** Packages to exclude from the bundle and replace with a stub that throws if loaded at runtime. Use for optional transitive dependencies the action never exercises (e.g. native modules). Defaults to []. */
182
+ readonly ignore: Schema.withDecodingDefaultType<Schema.$Array<Schema.String>, never>;
192
183
  /**
193
184
  * Packages whose dynamic `import(...)` calls must stay native `import()` at runtime instead of
194
185
  * being compiled into an rspack context module. Use this for packages that resolve a module path
@@ -198,27 +189,23 @@ declare const ConfigSchema: Schema.Struct<{
198
189
  * the package here injects a `webpackIgnore` comment into its dynamic imports so rspack leaves
199
190
  * them alone. Defaults to [].
200
191
  */
201
- nativeDynamicImports: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
202
- default: () => never[];
203
- }>;
192
+ readonly nativeDynamicImports: Schema.withDecodingDefaultType<Schema.$Array<Schema.String>, never>;
204
193
  }>;
205
- validation: Schema.Struct<{
206
- /** Require action.yml to exist and be valid. Defaults to true. */requireActionYml: Schema.optionalWith<typeof Schema.Boolean, {
207
- default: () => true;
208
- }>; /** Maximum bundle size before warning/error (e.g., "5mb", "500kb"). */
209
- maxBundleSize: Schema.optional<typeof Schema.String>; /** Treat warnings as errors. Auto-detects from CI when undefined. */
210
- strict: Schema.optional<typeof Schema.Boolean>;
194
+ readonly validation: Schema.Struct<{
195
+ /** Require action.yml to exist and be valid. Defaults to true. */
196
+ readonly requireActionYml: Schema.withDecodingDefaultType<Schema.Boolean, never>;
197
+ /** Maximum bundle size before warning/error (e.g., "5mb", "500kb"). */
198
+ readonly maxBundleSize: Schema.optional<Schema.String>;
199
+ /** Treat warnings as errors. Auto-detects from CI when undefined. */
200
+ readonly strict: Schema.optional<Schema.Boolean>;
211
201
  }>;
212
- persistLocal: Schema.Struct<{
213
- /** Enable persisting build output locally. Defaults to true. */enabled: Schema.optionalWith<typeof Schema.Boolean, {
214
- default: () => true;
215
- }>; /** Path for the local action directory, relative to cwd. Defaults to ".github/actions/local". */
216
- path: Schema.optionalWith<typeof Schema.String, {
217
- default: () => string;
218
- }>; /** Generate act boilerplate files (.actrc, act-test.yml) if they don't exist. Defaults to true. */
219
- actTemplate: Schema.optionalWith<typeof Schema.Boolean, {
220
- default: () => true;
221
- }>;
202
+ readonly persistLocal: Schema.Struct<{
203
+ /** Enable persisting build output locally. Defaults to true. */
204
+ readonly enabled: Schema.withDecodingDefaultType<Schema.Boolean, never>;
205
+ /** Path for the local action directory, relative to cwd. Defaults to ".github/actions/local". */
206
+ readonly path: Schema.withDecodingDefaultType<Schema.String, never>;
207
+ /** Generate act boilerplate files (.actrc, act-test.yml) if they don't exist. Defaults to true. */
208
+ readonly actTemplate: Schema.withDecodingDefaultType<Schema.Boolean, never>;
222
209
  }>;
223
210
  }>;
224
211
  /**
@@ -297,7 +284,7 @@ declare function defineConfig(config?: Partial<ConfigInput>): Config;
297
284
  *
298
285
  * @public
299
286
  */
300
- declare const ConfigNotFoundBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
287
+ declare const ConfigNotFoundBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
301
288
  readonly _tag: "ConfigNotFound";
302
289
  } & Readonly<A>;
303
290
  /**
@@ -325,7 +312,7 @@ declare class ConfigNotFound extends ConfigNotFoundBase<{
325
312
  *
326
313
  * @public
327
314
  */
328
- declare const ConfigInvalidBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
315
+ declare const ConfigInvalidBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
329
316
  readonly _tag: "ConfigInvalid";
330
317
  } & Readonly<A>;
331
318
  /**
@@ -353,7 +340,7 @@ declare class ConfigInvalid extends ConfigInvalidBase<{
353
340
  *
354
341
  * @public
355
342
  */
356
- declare const ConfigLoadFailedBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
343
+ declare const ConfigLoadFailedBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
357
344
  readonly _tag: "ConfigLoadFailed";
358
345
  } & Readonly<A>;
359
346
  /**
@@ -387,7 +374,7 @@ type ConfigError = ConfigNotFound | ConfigInvalid | ConfigLoadFailed;
387
374
  *
388
375
  * @public
389
376
  */
390
- declare const MainEntryMissingBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
377
+ declare const MainEntryMissingBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
391
378
  readonly _tag: "MainEntryMissing";
392
379
  } & Readonly<A>;
393
380
  /**
@@ -415,7 +402,7 @@ declare class MainEntryMissing extends MainEntryMissingBase<{
415
402
  *
416
403
  * @public
417
404
  */
418
- declare const WorkerEntryMissingBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
405
+ declare const WorkerEntryMissingBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
419
406
  readonly _tag: "WorkerEntryMissing";
420
407
  } & Readonly<A>;
421
408
  /**
@@ -424,8 +411,11 @@ declare const WorkerEntryMissingBase: new <A extends Record<string, any> = {}>(a
424
411
  * @public
425
412
  */
426
413
  declare class WorkerEntryMissing extends WorkerEntryMissingBase<{
427
- /** The worker name (config key). */readonly workerName: string; /** The expected path for the worker entry. */
428
- readonly expectedPath: string; /** The working directory that was searched. */
414
+ /** The worker name (config key). */
415
+ readonly workerName: string;
416
+ /** The expected path for the worker entry. */
417
+ readonly expectedPath: string;
418
+ /** The working directory that was searched. */
429
419
  readonly cwd: string;
430
420
  }> {}
431
421
  /**
@@ -438,7 +428,7 @@ declare class WorkerEntryMissing extends WorkerEntryMissingBase<{
438
428
  *
439
429
  * @public
440
430
  */
441
- declare const WorkerEntryInvalidNameBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
431
+ declare const WorkerEntryInvalidNameBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
442
432
  readonly _tag: "WorkerEntryInvalidName";
443
433
  } & Readonly<A>;
444
434
  /**
@@ -452,7 +442,9 @@ declare const WorkerEntryInvalidNameBase: new <A extends Record<string, any> = {
452
442
  * @public
453
443
  */
454
444
  declare class WorkerEntryInvalidName extends WorkerEntryInvalidNameBase<{
455
- /** The offending worker name (config key). */readonly workerName: string; /** Why the name was rejected. */
445
+ /** The offending worker name (config key). */
446
+ readonly workerName: string;
447
+ /** Why the name was rejected. */
456
448
  readonly reason: string;
457
449
  }> {}
458
450
  /**
@@ -465,7 +457,7 @@ declare class WorkerEntryInvalidName extends WorkerEntryInvalidNameBase<{
465
457
  *
466
458
  * @public
467
459
  */
468
- declare const EntryFileMissingBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
460
+ declare const EntryFileMissingBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
469
461
  readonly _tag: "EntryFileMissing";
470
462
  } & Readonly<A>;
471
463
  /**
@@ -493,7 +485,7 @@ declare class EntryFileMissing extends EntryFileMissingBase<{
493
485
  *
494
486
  * @public
495
487
  */
496
- declare const ActionYmlMissingBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
488
+ declare const ActionYmlMissingBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
497
489
  readonly _tag: "ActionYmlMissing";
498
490
  } & Readonly<A>;
499
491
  /**
@@ -517,7 +509,7 @@ declare class ActionYmlMissing extends ActionYmlMissingBase<{
517
509
  *
518
510
  * @public
519
511
  */
520
- declare const ActionYmlSyntaxErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
512
+ declare const ActionYmlSyntaxErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
521
513
  readonly _tag: "ActionYmlSyntaxError";
522
514
  } & Readonly<A>;
523
515
  /**
@@ -553,7 +545,7 @@ declare class ActionYmlSyntaxError extends ActionYmlSyntaxErrorBase<{
553
545
  *
554
546
  * @public
555
547
  */
556
- declare const ActionYmlSchemaErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
548
+ declare const ActionYmlSchemaErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
557
549
  readonly _tag: "ActionYmlSchemaError";
558
550
  } & Readonly<A>;
559
551
  /**
@@ -584,7 +576,7 @@ declare class ActionYmlSchemaError extends ActionYmlSchemaErrorBase<{
584
576
  *
585
577
  * @public
586
578
  */
587
- declare const ValidationFailedBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
579
+ declare const ValidationFailedBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
588
580
  readonly _tag: "ValidationFailed";
589
581
  } & Readonly<A>;
590
582
  /**
@@ -622,7 +614,7 @@ type ValidationError = MainEntryMissing | WorkerEntryMissing | WorkerEntryInvali
622
614
  *
623
615
  * @public
624
616
  */
625
- declare const BundleFailedBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
617
+ declare const BundleFailedBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
626
618
  readonly _tag: "BundleFailed";
627
619
  } & Readonly<A>;
628
620
  /**
@@ -650,7 +642,7 @@ declare class BundleFailed extends BundleFailedBase<{
650
642
  *
651
643
  * @public
652
644
  */
653
- declare const WriteErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
645
+ declare const WriteErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
654
646
  readonly _tag: "WriteError";
655
647
  } & Readonly<A>;
656
648
  /**
@@ -678,7 +670,7 @@ declare class WriteError extends WriteErrorBase<{
678
670
  *
679
671
  * @public
680
672
  */
681
- declare const CleanErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
673
+ declare const CleanErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
682
674
  readonly _tag: "CleanError";
683
675
  } & Readonly<A>;
684
676
  /**
@@ -706,7 +698,7 @@ declare class CleanError extends CleanErrorBase<{
706
698
  *
707
699
  * @public
708
700
  */
709
- declare const BuildFailedBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
701
+ declare const BuildFailedBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
710
702
  readonly _tag: "BuildFailed";
711
703
  } & Readonly<A>;
712
704
  /**
@@ -740,7 +732,7 @@ type BuildError = BundleFailed | WriteError | CleanError | BuildFailed;
740
732
  *
741
733
  * @public
742
734
  */
743
- declare const PersistLocalErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
735
+ declare const PersistLocalErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
744
736
  readonly _tag: "PersistLocalError";
745
737
  } & Readonly<A>;
746
738
  /**
@@ -768,7 +760,7 @@ declare class PersistLocalError extends PersistLocalErrorBase<{
768
760
  *
769
761
  * @public
770
762
  */
771
- declare const ActionYmlPathErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
763
+ declare const ActionYmlPathErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
772
764
  readonly _tag: "ActionYmlPathError";
773
765
  } & Readonly<A>;
774
766
  /**
@@ -809,8 +801,10 @@ type AppError = ConfigError | ValidationError | BuildError | PersistError;
809
801
  * @public
810
802
  */
811
803
  declare const LoadConfigOptionsSchema: Schema.Struct<{
812
- /** Working directory to search for config. Accepts string, Buffer, or URL. */cwd: Schema.optional<Schema.transform<Schema.Union<[typeof Schema.String, Schema.instanceOf<Buffer<ArrayBufferLike>>, Schema.instanceOf<URL>]>, typeof Schema.String>>; /** Explicit path to config file. Accepts string, Buffer, or URL. */
813
- configPath: Schema.optional<Schema.transform<Schema.Union<[typeof Schema.String, Schema.instanceOf<Buffer<ArrayBufferLike>>, Schema.instanceOf<URL>]>, typeof Schema.String>>;
804
+ /** Working directory to search for config. Accepts string, Buffer, or URL. */
805
+ readonly cwd: Schema.optional<Schema.decodeTo<Schema.String, Schema.Union<readonly [Schema.String, Schema.instanceOf<Buffer<ArrayBufferLike>, unknown>, Schema.instanceOf<URL, unknown>]>, never, never>>;
806
+ /** Explicit path to config file. Accepts string, Buffer, or URL. */
807
+ readonly configPath: Schema.optional<Schema.decodeTo<Schema.String, Schema.Union<readonly [Schema.String, Schema.instanceOf<Buffer<ArrayBufferLike>, unknown>, Schema.instanceOf<URL, unknown>]>, never, never>>;
814
808
  }>;
815
809
  /**
816
810
  * Options for loading configuration.
@@ -822,9 +816,12 @@ type LoadConfigOptions = typeof LoadConfigOptionsSchema.Type;
822
816
  * @public
823
817
  */
824
818
  declare const DetectedEntrySchema: Schema.Struct<{
825
- /** Entry type: "main"|"pre"|"post" for lifecycle entries, or the worker name. */type: typeof Schema.String; /** Absolute path to the entry file. */
826
- path: typeof Schema.String; /** Output path for the bundled file. */
827
- output: typeof Schema.String;
819
+ /** Entry type: "main"|"pre"|"post" for lifecycle entries, or the worker name. */
820
+ readonly type: Schema.String;
821
+ /** Absolute path to the entry file. */
822
+ readonly path: Schema.String;
823
+ /** Output path for the bundled file. */
824
+ readonly output: Schema.String;
828
825
  }>;
829
826
  /**
830
827
  * Detected entry point information.
@@ -836,11 +833,16 @@ type DetectedEntry = typeof DetectedEntrySchema.Type;
836
833
  * @public
837
834
  */
838
835
  declare const DetectEntriesResultSchema: Schema.Struct<{
839
- /** Whether detection was successful. */success: typeof Schema.Boolean; /** Detected entries. */
840
- entries: Schema.Array$<Schema.Struct<{
841
- /** Entry type: "main"|"pre"|"post" for lifecycle entries, or the worker name. */type: typeof Schema.String; /** Absolute path to the entry file. */
842
- path: typeof Schema.String; /** Output path for the bundled file. */
843
- output: typeof Schema.String;
836
+ /** Whether detection was successful. */
837
+ readonly success: Schema.Boolean;
838
+ /** Detected entries. */
839
+ readonly entries: Schema.$Array<Schema.Struct<{
840
+ /** Entry type: "main"|"pre"|"post" for lifecycle entries, or the worker name. */
841
+ readonly type: Schema.String;
842
+ /** Absolute path to the entry file. */
843
+ readonly path: Schema.String;
844
+ /** Output path for the bundled file. */
845
+ readonly output: Schema.String;
844
846
  }>>;
845
847
  }>;
846
848
  /**
@@ -861,7 +863,7 @@ interface LoadConfigResult {
861
863
  usingDefaults: boolean;
862
864
  }
863
865
  /**
864
- * ConfigService interface for configuration management capabilities.
866
+ * Service shape for configuration management capabilities.
865
867
  *
866
868
  * @remarks
867
869
  * This service handles:
@@ -869,23 +871,12 @@ interface LoadConfigResult {
869
871
  * - Resolving partial configuration with defaults
870
872
  * - Detecting entry points in the project
871
873
  *
872
- * @example Using ConfigService with Effect
873
- * ```typescript
874
- * import { Effect } from "effect";
875
- * import { AppLayer, ConfigService } from "@savvy-web/github-action-builder";
876
- *
877
- * const program = Effect.gen(function* () {
878
- * const configService = yield* ConfigService;
879
- * const result = yield* configService.load({ cwd: process.cwd() });
880
- * console.log("Loaded config:", result.config);
881
- * });
882
- *
883
- * Effect.runPromise(program.pipe(Effect.provide(AppLayer)));
884
- * ```
874
+ * Use this interface to type structural implementations (e.g. test mocks);
875
+ * use the {@link ConfigService} class as the service key.
885
876
  *
886
877
  * @public
887
878
  */
888
- interface ConfigService {
879
+ interface ConfigServiceShape {
889
880
  /**
890
881
  * Load configuration from file or use defaults.
891
882
  *
@@ -914,12 +905,27 @@ interface ConfigService {
914
905
  workers?: Record<string, string>;
915
906
  }) => Effect.Effect<DetectEntriesResult, MainEntryMissing | WorkerEntryMissing | WorkerEntryInvalidName>;
916
907
  }
908
+ declare const ConfigService_base: Context.ServiceClass<ConfigService, "ConfigService", ConfigServiceShape>;
917
909
  /**
918
- * ConfigService tag for dependency injection.
910
+ * ConfigService key for dependency injection.
911
+ *
912
+ * @example Using ConfigService with Effect
913
+ * ```typescript
914
+ * import { Effect } from "effect";
915
+ * import { AppLayer, ConfigService } from "@savvy-web/github-action-builder";
916
+ *
917
+ * const program = Effect.gen(function* () {
918
+ * const configService = yield* ConfigService;
919
+ * const result = yield* configService.load({ cwd: process.cwd() });
920
+ * console.log("Loaded config:", result.config);
921
+ * });
922
+ *
923
+ * Effect.runPromise(program.pipe(Effect.provide(AppLayer)));
924
+ * ```
919
925
  *
920
926
  * @public
921
927
  */
922
- declare const ConfigService: Context.Tag<ConfigService, ConfigService>;
928
+ declare class ConfigService extends ConfigService_base {}
923
929
  //#endregion
924
930
  //#region src/services/build.d.ts
925
931
  /**
@@ -927,8 +933,10 @@ declare const ConfigService: Context.Tag<ConfigService, ConfigService>;
927
933
  * @public
928
934
  */
929
935
  declare const BuildRunnerOptionsSchema: Schema.Struct<{
930
- /** Working directory for the build. Accepts string, Buffer, or URL. */cwd: Schema.optional<Schema.transform<Schema.Union<[typeof Schema.String, Schema.instanceOf<Buffer<ArrayBufferLike>>, Schema.instanceOf<URL>]>, typeof Schema.String>>; /** Clean output directory before building. Defaults to true. */
931
- clean: Schema.optional<typeof Schema.Boolean>;
936
+ /** Working directory for the build. Accepts string, Buffer, or URL. */
937
+ readonly cwd: Schema.optional<Schema.decodeTo<Schema.String, Schema.Union<readonly [Schema.String, Schema.instanceOf<Buffer<ArrayBufferLike>, unknown>, Schema.instanceOf<URL, unknown>]>, never, never>>;
938
+ /** Clean output directory before building. Defaults to true. */
939
+ readonly clean: Schema.optional<Schema.Boolean>;
932
940
  }>;
933
941
  /**
934
942
  * Options for the build process.
@@ -940,10 +948,14 @@ type BuildRunnerOptions = typeof BuildRunnerOptionsSchema.Type;
940
948
  * @public
941
949
  */
942
950
  declare const BundleStatsSchema: Schema.Struct<{
943
- /** Entry type (main, pre, or post). */entry: typeof Schema.String; /** Bundle size in bytes. */
944
- size: typeof Schema.Number; /** Build duration in milliseconds. */
945
- duration: typeof Schema.Number; /** Output path relative to working directory. */
946
- outputPath: typeof Schema.String;
951
+ /** Entry type (main, pre, or post). */
952
+ readonly entry: Schema.String;
953
+ /** Bundle size in bytes. */
954
+ readonly size: Schema.Number;
955
+ /** Build duration in milliseconds. */
956
+ readonly duration: Schema.Number;
957
+ /** Output path relative to working directory. */
958
+ readonly outputPath: Schema.String;
947
959
  }>;
948
960
  /**
949
961
  * Statistics for a single bundled entry.
@@ -955,14 +967,21 @@ type BundleStats = typeof BundleStatsSchema.Type;
955
967
  * @public
956
968
  */
957
969
  declare const BundleResultSchema: Schema.Struct<{
958
- /** Whether bundling succeeded. */success: typeof Schema.Boolean; /** Bundle statistics if successful. */
959
- stats: Schema.optional<Schema.Struct<{
960
- /** Entry type (main, pre, or post). */entry: typeof Schema.String; /** Bundle size in bytes. */
961
- size: typeof Schema.Number; /** Build duration in milliseconds. */
962
- duration: typeof Schema.Number; /** Output path relative to working directory. */
963
- outputPath: typeof Schema.String;
964
- }>>; /** Error message if failed. */
965
- error: Schema.optional<typeof Schema.String>;
970
+ /** Whether bundling succeeded. */
971
+ readonly success: Schema.Boolean;
972
+ /** Bundle statistics if successful. */
973
+ readonly stats: Schema.optional<Schema.Struct<{
974
+ /** Entry type (main, pre, or post). */
975
+ readonly entry: Schema.String;
976
+ /** Bundle size in bytes. */
977
+ readonly size: Schema.Number;
978
+ /** Build duration in milliseconds. */
979
+ readonly duration: Schema.Number;
980
+ /** Output path relative to working directory. */
981
+ readonly outputPath: Schema.String;
982
+ }>>;
983
+ /** Error message if failed. */
984
+ readonly error: Schema.optional<Schema.String>;
966
985
  }>;
967
986
  /**
968
987
  * Result of bundling a single entry.
@@ -974,19 +993,30 @@ type BundleResult = typeof BundleResultSchema.Type;
974
993
  * @public
975
994
  */
976
995
  declare const BuildResultSchema: Schema.Struct<{
977
- /** Whether the overall build succeeded. */success: typeof Schema.Boolean; /** Results for each entry that was built. */
978
- entries: Schema.Array$<Schema.Struct<{
979
- /** Whether bundling succeeded. */success: typeof Schema.Boolean; /** Bundle statistics if successful. */
980
- stats: Schema.optional<Schema.Struct<{
981
- /** Entry type (main, pre, or post). */entry: typeof Schema.String; /** Bundle size in bytes. */
982
- size: typeof Schema.Number; /** Build duration in milliseconds. */
983
- duration: typeof Schema.Number; /** Output path relative to working directory. */
984
- outputPath: typeof Schema.String;
985
- }>>; /** Error message if failed. */
986
- error: Schema.optional<typeof Schema.String>;
987
- }>>; /** Total build duration in milliseconds. */
988
- duration: typeof Schema.Number; /** Error message if build failed. */
989
- error: Schema.optional<typeof Schema.String>;
996
+ /** Whether the overall build succeeded. */
997
+ readonly success: Schema.Boolean;
998
+ /** Results for each entry that was built. */
999
+ readonly entries: Schema.$Array<Schema.Struct<{
1000
+ /** Whether bundling succeeded. */
1001
+ readonly success: Schema.Boolean;
1002
+ /** Bundle statistics if successful. */
1003
+ readonly stats: Schema.optional<Schema.Struct<{
1004
+ /** Entry type (main, pre, or post). */
1005
+ readonly entry: Schema.String;
1006
+ /** Bundle size in bytes. */
1007
+ readonly size: Schema.Number;
1008
+ /** Build duration in milliseconds. */
1009
+ readonly duration: Schema.Number;
1010
+ /** Output path relative to working directory. */
1011
+ readonly outputPath: Schema.String;
1012
+ }>>;
1013
+ /** Error message if failed. */
1014
+ readonly error: Schema.optional<Schema.String>;
1015
+ }>>;
1016
+ /** Total build duration in milliseconds. */
1017
+ readonly duration: Schema.Number;
1018
+ /** Error message if build failed. */
1019
+ readonly error: Schema.optional<Schema.String>;
990
1020
  }>;
991
1021
  /**
992
1022
  * Result of the complete build process.
@@ -994,7 +1024,7 @@ declare const BuildResultSchema: Schema.Struct<{
994
1024
  */
995
1025
  type BuildResult = typeof BuildResultSchema.Type;
996
1026
  /**
997
- * BuildService interface for build and bundling capabilities.
1027
+ * Service shape for build and bundling capabilities.
998
1028
  *
999
1029
  * @remarks
1000
1030
  * This service handles:
@@ -1003,29 +1033,12 @@ type BuildResult = typeof BuildResultSchema.Type;
1003
1033
  * - Collecting build statistics
1004
1034
  * - Formatting build results
1005
1035
  *
1006
- * @example Using BuildService with Effect
1007
- * ```typescript
1008
- * import { Effect } from "effect";
1009
- * import { AppLayer, BuildService, ConfigService } from "@savvy-web/github-action-builder";
1010
- *
1011
- * const program = Effect.gen(function* () {
1012
- * const configService = yield* ConfigService;
1013
- * const buildService = yield* BuildService;
1014
- *
1015
- * const { config } = yield* configService.load();
1016
- * const result = yield* buildService.build(config);
1017
- *
1018
- * if (result.success) {
1019
- * console.log("Build complete:", result.entries.length, "entries");
1020
- * }
1021
- * });
1022
- *
1023
- * Effect.runPromise(program.pipe(Effect.provide(AppLayer)));
1024
- * ```
1036
+ * Use this interface to type structural implementations (e.g. test mocks);
1037
+ * use the {@link BuildService} class as the service key.
1025
1038
  *
1026
1039
  * @public
1027
1040
  */
1028
- interface BuildService {
1041
+ interface BuildServiceShape {
1029
1042
  /**
1030
1043
  * Build all entries from the configuration.
1031
1044
  *
@@ -1064,12 +1077,33 @@ interface BuildService {
1064
1077
  */
1065
1078
  readonly formatBytes: (bytes: number) => string;
1066
1079
  }
1080
+ declare const BuildService_base: Context.ServiceClass<BuildService, "BuildService", BuildServiceShape>;
1067
1081
  /**
1068
- * BuildService tag for dependency injection.
1082
+ * BuildService key for dependency injection.
1083
+ *
1084
+ * @example Using BuildService with Effect
1085
+ * ```typescript
1086
+ * import { Effect } from "effect";
1087
+ * import { AppLayer, BuildService, ConfigService } from "@savvy-web/github-action-builder";
1088
+ *
1089
+ * const program = Effect.gen(function* () {
1090
+ * const configService = yield* ConfigService;
1091
+ * const buildService = yield* BuildService;
1092
+ *
1093
+ * const { config } = yield* configService.load();
1094
+ * const result = yield* buildService.build(config);
1095
+ *
1096
+ * if (result.success) {
1097
+ * console.log("Build complete:", result.entries.length, "entries");
1098
+ * }
1099
+ * });
1100
+ *
1101
+ * Effect.runPromise(program.pipe(Effect.provide(AppLayer)));
1102
+ * ```
1069
1103
  *
1070
1104
  * @public
1071
1105
  */
1072
- declare const BuildService: Context.Tag<BuildService, BuildService>;
1106
+ declare class BuildService extends BuildService_base {}
1073
1107
  //#endregion
1074
1108
  //#region src/services/persist-local.d.ts
1075
1109
  /**
@@ -1077,7 +1111,8 @@ declare const BuildService: Context.Tag<BuildService, BuildService>;
1077
1111
  * @public
1078
1112
  */
1079
1113
  declare const PersistLocalRunnerOptionsSchema: Schema.Struct<{
1080
- /** Working directory. Accepts string. */cwd: Schema.optional<typeof Schema.String>;
1114
+ /** Working directory. Accepts string. */
1115
+ readonly cwd: Schema.optional<Schema.String>;
1081
1116
  }>;
1082
1117
  /**
1083
1118
  * Options for the persist operation.
@@ -1089,12 +1124,18 @@ type PersistLocalRunnerOptions = typeof PersistLocalRunnerOptionsSchema.Type;
1089
1124
  * @public
1090
1125
  */
1091
1126
  declare const PersistLocalResultSchema: Schema.Struct<{
1092
- /** Whether the operation completed successfully. */success: typeof Schema.Boolean; /** Number of files copied (changed or new). */
1093
- filesCopied: typeof Schema.Number; /** Number of files skipped (unchanged). */
1094
- filesSkipped: typeof Schema.Number; /** Whether act template files were generated. */
1095
- actTemplateGenerated: typeof Schema.Boolean; /** Output path where files were persisted. */
1096
- outputPath: typeof Schema.String; /** Error message if failed. */
1097
- error: Schema.optional<typeof Schema.String>;
1127
+ /** Whether the operation completed successfully. */
1128
+ readonly success: Schema.Boolean;
1129
+ /** Number of files copied (changed or new). */
1130
+ readonly filesCopied: Schema.Number;
1131
+ /** Number of files skipped (unchanged). */
1132
+ readonly filesSkipped: Schema.Number;
1133
+ /** Whether act template files were generated. */
1134
+ readonly actTemplateGenerated: Schema.Boolean;
1135
+ /** Output path where files were persisted. */
1136
+ readonly outputPath: Schema.String;
1137
+ /** Error message if failed. */
1138
+ readonly error: Schema.optional<Schema.String>;
1098
1139
  }>;
1099
1140
  /**
1100
1141
  * Result of the persist-local operation.
@@ -1102,7 +1143,7 @@ declare const PersistLocalResultSchema: Schema.Struct<{
1102
1143
  */
1103
1144
  type PersistLocalResult = typeof PersistLocalResultSchema.Type;
1104
1145
  /**
1105
- * PersistLocalService interface for copying build output locally.
1146
+ * Service shape for copying build output locally.
1106
1147
  *
1107
1148
  * @remarks
1108
1149
  * This service handles:
@@ -1112,9 +1153,12 @@ type PersistLocalResult = typeof PersistLocalResultSchema.Type;
1112
1153
  * - Validating action.yml runs paths resolve in the destination
1113
1154
  * - Generating act boilerplate files
1114
1155
  *
1156
+ * Use this interface to type structural implementations (e.g. test mocks);
1157
+ * use the {@link PersistLocalService} class as the service key.
1158
+ *
1115
1159
  * @public
1116
1160
  */
1117
- interface PersistLocalService {
1161
+ interface PersistLocalServiceShape {
1118
1162
  /**
1119
1163
  * Persist build output to the local action directory.
1120
1164
  *
@@ -1131,12 +1175,13 @@ interface PersistLocalService {
1131
1175
  */
1132
1176
  readonly formatResult: (result: PersistLocalResult) => string;
1133
1177
  }
1178
+ declare const PersistLocalService_base: Context.ServiceClass<PersistLocalService, "PersistLocalService", PersistLocalServiceShape>;
1134
1179
  /**
1135
- * PersistLocalService tag for dependency injection.
1180
+ * PersistLocalService key for dependency injection.
1136
1181
  *
1137
1182
  * @public
1138
1183
  */
1139
- declare const PersistLocalService: Context.Tag<PersistLocalService, PersistLocalService>;
1184
+ declare class PersistLocalService extends PersistLocalService_base {}
1140
1185
  //#endregion
1141
1186
  //#region src/services/validation.d.ts
1142
1187
  /**
@@ -1144,8 +1189,10 @@ declare const PersistLocalService: Context.Tag<PersistLocalService, PersistLocal
1144
1189
  * @public
1145
1190
  */
1146
1191
  declare const ValidateOptionsSchema: Schema.Struct<{
1147
- /** Working directory for file operations. Accepts string, Buffer, or URL. */cwd: Schema.optional<Schema.transform<Schema.Union<[typeof Schema.String, Schema.instanceOf<Buffer<ArrayBufferLike>>, Schema.instanceOf<URL>]>, typeof Schema.String>>; /** Force strict mode regardless of environment. Auto-detects from CI when undefined. */
1148
- strict: Schema.optional<typeof Schema.Boolean>;
1192
+ /** Working directory for file operations. Accepts string, Buffer, or URL. */
1193
+ readonly cwd: Schema.optional<Schema.decodeTo<Schema.String, Schema.Union<readonly [Schema.String, Schema.instanceOf<Buffer<ArrayBufferLike>, unknown>, Schema.instanceOf<URL, unknown>]>, never, never>>;
1194
+ /** Force strict mode regardless of environment. Auto-detects from CI when undefined. */
1195
+ readonly strict: Schema.optional<Schema.Boolean>;
1149
1196
  }>;
1150
1197
  /**
1151
1198
  * Options for validation.
@@ -1157,10 +1204,14 @@ type ValidateOptions = typeof ValidateOptionsSchema.Type;
1157
1204
  * @public
1158
1205
  */
1159
1206
  declare const ValidationErrorSchema: Schema.Struct<{
1160
- /** Error code for categorization. */code: typeof Schema.String; /** Human-readable error message. */
1161
- message: typeof Schema.String; /** File path where error occurred. */
1162
- file: Schema.optional<typeof Schema.String>; /** Suggestion for fixing the error. */
1163
- suggestion: Schema.optional<typeof Schema.String>;
1207
+ /** Error code for categorization. */
1208
+ readonly code: Schema.String;
1209
+ /** Human-readable error message. */
1210
+ readonly message: Schema.String;
1211
+ /** File path where error occurred. */
1212
+ readonly file: Schema.optional<Schema.String>;
1213
+ /** Suggestion for fixing the error. */
1214
+ readonly suggestion: Schema.optional<Schema.String>;
1164
1215
  }>;
1165
1216
  /**
1166
1217
  * A validation error item.
@@ -1172,10 +1223,14 @@ type ValidationErrorItem = typeof ValidationErrorSchema.Type;
1172
1223
  * @public
1173
1224
  */
1174
1225
  declare const ValidationWarningSchema: Schema.Struct<{
1175
- /** Warning code for categorization. */code: typeof Schema.String; /** Human-readable warning message. */
1176
- message: typeof Schema.String; /** File path where warning occurred. */
1177
- file: Schema.optional<typeof Schema.String>; /** Suggestion for addressing the warning. */
1178
- suggestion: Schema.optional<typeof Schema.String>;
1226
+ /** Warning code for categorization. */
1227
+ readonly code: Schema.String;
1228
+ /** Human-readable warning message. */
1229
+ readonly message: Schema.String;
1230
+ /** File path where warning occurred. */
1231
+ readonly file: Schema.optional<Schema.String>;
1232
+ /** Suggestion for addressing the warning. */
1233
+ readonly suggestion: Schema.optional<Schema.String>;
1179
1234
  }>;
1180
1235
  /**
1181
1236
  * A validation warning.
@@ -1187,18 +1242,29 @@ type ValidationWarning = typeof ValidationWarningSchema.Type;
1187
1242
  * @public
1188
1243
  */
1189
1244
  declare const ValidationResultSchema: Schema.Struct<{
1190
- /** Whether validation passed (no errors, or only warnings in non-strict mode). */valid: typeof Schema.Boolean; /** Validation errors. */
1191
- errors: Schema.Array$<Schema.Struct<{
1192
- /** Error code for categorization. */code: typeof Schema.String; /** Human-readable error message. */
1193
- message: typeof Schema.String; /** File path where error occurred. */
1194
- file: Schema.optional<typeof Schema.String>; /** Suggestion for fixing the error. */
1195
- suggestion: Schema.optional<typeof Schema.String>;
1196
- }>>; /** Validation warnings. */
1197
- warnings: Schema.Array$<Schema.Struct<{
1198
- /** Warning code for categorization. */code: typeof Schema.String; /** Human-readable warning message. */
1199
- message: typeof Schema.String; /** File path where warning occurred. */
1200
- file: Schema.optional<typeof Schema.String>; /** Suggestion for addressing the warning. */
1201
- suggestion: Schema.optional<typeof Schema.String>;
1245
+ /** Whether validation passed (no errors, or only warnings in non-strict mode). */
1246
+ readonly valid: Schema.Boolean;
1247
+ /** Validation errors. */
1248
+ readonly errors: Schema.$Array<Schema.Struct<{
1249
+ /** Error code for categorization. */
1250
+ readonly code: Schema.String;
1251
+ /** Human-readable error message. */
1252
+ readonly message: Schema.String;
1253
+ /** File path where error occurred. */
1254
+ readonly file: Schema.optional<Schema.String>;
1255
+ /** Suggestion for fixing the error. */
1256
+ readonly suggestion: Schema.optional<Schema.String>;
1257
+ }>>;
1258
+ /** Validation warnings. */
1259
+ readonly warnings: Schema.$Array<Schema.Struct<{
1260
+ /** Warning code for categorization. */
1261
+ readonly code: Schema.String;
1262
+ /** Human-readable warning message. */
1263
+ readonly message: Schema.String;
1264
+ /** File path where warning occurred. */
1265
+ readonly file: Schema.optional<Schema.String>;
1266
+ /** Suggestion for addressing the warning. */
1267
+ readonly suggestion: Schema.optional<Schema.String>;
1202
1268
  }>>;
1203
1269
  }>;
1204
1270
  /**
@@ -1211,19 +1277,31 @@ type ValidationResult = typeof ValidationResultSchema.Type;
1211
1277
  * @public
1212
1278
  */
1213
1279
  declare const ActionYmlResultSchema: Schema.Struct<{
1214
- /** Whether the action.yml is valid. */valid: typeof Schema.Boolean; /** Parsed action.yml content if valid. */
1215
- content: Schema.optional<typeof Schema.Any>; /** Validation errors. */
1216
- errors: Schema.Array$<Schema.Struct<{
1217
- /** Error code for categorization. */code: typeof Schema.String; /** Human-readable error message. */
1218
- message: typeof Schema.String; /** File path where error occurred. */
1219
- file: Schema.optional<typeof Schema.String>; /** Suggestion for fixing the error. */
1220
- suggestion: Schema.optional<typeof Schema.String>;
1221
- }>>; /** Validation warnings. */
1222
- warnings: Schema.Array$<Schema.Struct<{
1223
- /** Warning code for categorization. */code: typeof Schema.String; /** Human-readable warning message. */
1224
- message: typeof Schema.String; /** File path where warning occurred. */
1225
- file: Schema.optional<typeof Schema.String>; /** Suggestion for addressing the warning. */
1226
- suggestion: Schema.optional<typeof Schema.String>;
1280
+ /** Whether the action.yml is valid. */
1281
+ readonly valid: Schema.Boolean;
1282
+ /** Parsed action.yml content if valid. */
1283
+ readonly content: Schema.optional<Schema.Any>;
1284
+ /** Validation errors. */
1285
+ readonly errors: Schema.$Array<Schema.Struct<{
1286
+ /** Error code for categorization. */
1287
+ readonly code: Schema.String;
1288
+ /** Human-readable error message. */
1289
+ readonly message: Schema.String;
1290
+ /** File path where error occurred. */
1291
+ readonly file: Schema.optional<Schema.String>;
1292
+ /** Suggestion for fixing the error. */
1293
+ readonly suggestion: Schema.optional<Schema.String>;
1294
+ }>>;
1295
+ /** Validation warnings. */
1296
+ readonly warnings: Schema.$Array<Schema.Struct<{
1297
+ /** Warning code for categorization. */
1298
+ readonly code: Schema.String;
1299
+ /** Human-readable warning message. */
1300
+ readonly message: Schema.String;
1301
+ /** File path where warning occurred. */
1302
+ readonly file: Schema.optional<Schema.String>;
1303
+ /** Suggestion for addressing the warning. */
1304
+ readonly suggestion: Schema.optional<Schema.String>;
1227
1305
  }>>;
1228
1306
  }>;
1229
1307
  /**
@@ -1232,7 +1310,7 @@ declare const ActionYmlResultSchema: Schema.Struct<{
1232
1310
  */
1233
1311
  type ActionYmlResult = typeof ActionYmlResultSchema.Type;
1234
1312
  /**
1235
- * ValidationService interface for validation capabilities.
1313
+ * Service shape for validation capabilities.
1236
1314
  *
1237
1315
  * @remarks
1238
1316
  * This service handles:
@@ -1241,29 +1319,12 @@ type ActionYmlResult = typeof ActionYmlResultSchema.Type;
1241
1319
  * - Formatting validation results for display
1242
1320
  * - CI-aware strict mode handling
1243
1321
  *
1244
- * @example Using ValidationService with Effect
1245
- * ```typescript
1246
- * import { Effect } from "effect";
1247
- * import { AppLayer, ConfigService, ValidationService } from "@savvy-web/github-action-builder";
1248
- *
1249
- * const program = Effect.gen(function* () {
1250
- * const configService = yield* ConfigService;
1251
- * const validationService = yield* ValidationService;
1252
- *
1253
- * const { config } = yield* configService.load();
1254
- * const result = yield* validationService.validate(config);
1255
- *
1256
- * if (!result.valid) {
1257
- * console.error("Validation failed:", result.errors);
1258
- * }
1259
- * });
1260
- *
1261
- * Effect.runPromise(program.pipe(Effect.provide(AppLayer)));
1262
- * ```
1322
+ * Use this interface to type structural implementations (e.g. test mocks);
1323
+ * use the {@link ValidationService} class as the service key.
1263
1324
  *
1264
1325
  * @public
1265
1326
  */
1266
- interface ValidationService {
1327
+ interface ValidationServiceShape {
1267
1328
  /**
1268
1329
  * Validate configuration and project structure.
1269
1330
  *
@@ -1300,12 +1361,33 @@ interface ValidationService {
1300
1361
  */
1301
1362
  readonly isStrict: (configStrict?: boolean) => Effect.Effect<boolean>;
1302
1363
  }
1364
+ declare const ValidationService_base: Context.ServiceClass<ValidationService, "ValidationService", ValidationServiceShape>;
1303
1365
  /**
1304
- * ValidationService tag for dependency injection.
1366
+ * ValidationService key for dependency injection.
1367
+ *
1368
+ * @example Using ValidationService with Effect
1369
+ * ```typescript
1370
+ * import { Effect } from "effect";
1371
+ * import { AppLayer, ConfigService, ValidationService } from "@savvy-web/github-action-builder";
1372
+ *
1373
+ * const program = Effect.gen(function* () {
1374
+ * const configService = yield* ConfigService;
1375
+ * const validationService = yield* ValidationService;
1376
+ *
1377
+ * const { config } = yield* configService.load();
1378
+ * const result = yield* validationService.validate(config);
1379
+ *
1380
+ * if (!result.valid) {
1381
+ * console.error("Validation failed:", result.errors);
1382
+ * }
1383
+ * });
1384
+ *
1385
+ * Effect.runPromise(program.pipe(Effect.provide(AppLayer)));
1386
+ * ```
1305
1387
  *
1306
1388
  * @public
1307
1389
  */
1308
- declare const ValidationService: Context.Tag<ValidationService, ValidationService>;
1390
+ declare class ValidationService extends ValidationService_base {}
1309
1391
  //#endregion
1310
1392
  //#region src/github-action.d.ts
1311
1393
  /**
@@ -1367,47 +1449,53 @@ interface GitHubActionOptions {
1367
1449
  * @public
1368
1450
  */
1369
1451
  declare const GitHubActionBuildResultSchema: Schema.Struct<{
1370
- /** Whether the build completed successfully. */success: typeof Schema.Boolean; /** Build result details if the build step ran. */
1371
- build: Schema.optional<Schema.Struct<{
1372
- success: typeof Schema.Boolean;
1373
- entries: Schema.Array$<Schema.Struct<{
1374
- success: typeof Schema.Boolean;
1375
- stats: Schema.optional<Schema.Struct<{
1376
- entry: typeof Schema.String;
1377
- size: typeof Schema.Number;
1378
- duration: typeof Schema.Number;
1379
- outputPath: typeof Schema.String;
1452
+ /** Whether the build completed successfully. */
1453
+ readonly success: Schema.Boolean;
1454
+ /** Build result details if the build step ran. */
1455
+ readonly build: Schema.optional<Schema.Struct<{
1456
+ readonly success: Schema.Boolean;
1457
+ readonly entries: Schema.$Array<Schema.Struct<{
1458
+ readonly success: Schema.Boolean;
1459
+ readonly stats: Schema.optional<Schema.Struct<{
1460
+ readonly entry: Schema.String;
1461
+ readonly size: Schema.Number;
1462
+ readonly duration: Schema.Number;
1463
+ readonly outputPath: Schema.String;
1380
1464
  }>>;
1381
- error: Schema.optional<typeof Schema.String>;
1465
+ readonly error: Schema.optional<Schema.String>;
1382
1466
  }>>;
1383
- duration: typeof Schema.Number;
1384
- error: Schema.optional<typeof Schema.String>;
1385
- }>>; /** Validation result if validation was performed. */
1386
- validation: Schema.optional<Schema.Struct<{
1387
- valid: typeof Schema.Boolean;
1388
- errors: Schema.Array$<Schema.Struct<{
1389
- code: typeof Schema.String;
1390
- message: typeof Schema.String;
1391
- file: Schema.optional<typeof Schema.String>;
1392
- suggestion: Schema.optional<typeof Schema.String>;
1467
+ readonly duration: Schema.Number;
1468
+ readonly error: Schema.optional<Schema.String>;
1469
+ }>>;
1470
+ /** Validation result if validation was performed. */
1471
+ readonly validation: Schema.optional<Schema.Struct<{
1472
+ readonly valid: Schema.Boolean;
1473
+ readonly errors: Schema.$Array<Schema.Struct<{
1474
+ readonly code: Schema.String;
1475
+ readonly message: Schema.String;
1476
+ readonly file: Schema.optional<Schema.String>;
1477
+ readonly suggestion: Schema.optional<Schema.String>;
1393
1478
  }>>;
1394
- warnings: Schema.Array$<Schema.Struct<{
1395
- code: typeof Schema.String;
1396
- message: typeof Schema.String;
1397
- file: Schema.optional<typeof Schema.String>;
1398
- suggestion: Schema.optional<typeof Schema.String>;
1479
+ readonly warnings: Schema.$Array<Schema.Struct<{
1480
+ readonly code: Schema.String;
1481
+ readonly message: Schema.String;
1482
+ readonly file: Schema.optional<Schema.String>;
1483
+ readonly suggestion: Schema.optional<Schema.String>;
1399
1484
  }>>;
1400
- }>>; /** Persist-local result if persist was performed. */
1401
- persistLocal: Schema.optional<Schema.Struct<{
1402
- success: typeof Schema.Boolean;
1403
- filesCopied: typeof Schema.Number;
1404
- filesSkipped: typeof Schema.Number;
1405
- actTemplateGenerated: typeof Schema.Boolean;
1406
- outputPath: typeof Schema.String;
1407
- error: Schema.optional<typeof Schema.String>;
1408
- }>>; /** Error message if the build or validation failed. */
1409
- error: Schema.optional<typeof Schema.String>; /** Raw error object for programmatic inspection. */
1410
- cause: Schema.optional<typeof Schema.Unknown>;
1485
+ }>>;
1486
+ /** Persist-local result if persist was performed. */
1487
+ readonly persistLocal: Schema.optional<Schema.Struct<{
1488
+ readonly success: Schema.Boolean;
1489
+ readonly filesCopied: Schema.Number;
1490
+ readonly filesSkipped: Schema.Number;
1491
+ readonly actTemplateGenerated: Schema.Boolean;
1492
+ readonly outputPath: Schema.String;
1493
+ readonly error: Schema.optional<Schema.String>;
1494
+ }>>;
1495
+ /** Error message if the build or validation failed. */
1496
+ readonly error: Schema.optional<Schema.String>;
1497
+ /** Raw error object for programmatic inspection. */
1498
+ readonly cause: Schema.optional<Schema.Unknown>;
1411
1499
  }>;
1412
1500
  /**
1413
1501
  * Result of a GitHubAction build operation.
@@ -1422,9 +1510,9 @@ type GitHubActionBuildResult = typeof GitHubActionBuildResultSchema.Type;
1422
1510
  * It handles configuration loading, validation, and bundling in a single workflow.
1423
1511
  *
1424
1512
  * For Effect consumers, use the services directly:
1425
- * - {@link (ConfigService:interface)} for configuration
1426
- * - {@link (ValidationService:interface)} for validation
1427
- * - {@link (BuildService:interface)} for building
1513
+ * - {@link ConfigService} for configuration
1514
+ * - {@link ValidationService} for validation
1515
+ * - {@link BuildService} for building
1428
1516
  *
1429
1517
  * @example Complete build workflow
1430
1518
  * ```typescript
@@ -1646,5 +1734,5 @@ declare const PersistLocalLayer: Layer.Layer<PersistLocalService, never, never>;
1646
1734
  */
1647
1735
  declare const AppLayer: Layer.Layer<BuildService | ConfigService | PersistLocalService | ValidationService, never, never>;
1648
1736
  //#endregion
1649
- export { ActionYmlMissing, ActionYmlMissingBase, ActionYmlPathError, ActionYmlPathErrorBase, type ActionYmlResult, ActionYmlResultSchema, ActionYmlSchemaError, ActionYmlSchemaErrorBase, ActionYmlSyntaxError, ActionYmlSyntaxErrorBase, type AppError, AppLayer, type BuildError, BuildFailed, BuildFailedBase, BuildLayer, type BuildOptions, BuildOptionsSchema, type BuildResult, BuildResultSchema, type BuildRunnerOptions, BuildRunnerOptionsSchema, BuildService, BundleFailed, BundleFailedBase, type BundleResult, BundleResultSchema, type BundleStats, BundleStatsSchema, CleanError, CleanErrorBase, type Config, type ConfigError, type ConfigInput, ConfigInputSchema, ConfigInvalid, ConfigInvalidBase, ConfigLayer, ConfigLoadFailed, ConfigLoadFailedBase, ConfigNotFound, ConfigNotFoundBase, ConfigSchema, ConfigService, type DetectEntriesResult, DetectEntriesResultSchema, type DetectedEntry, DetectedEntrySchema, type Entries, EntriesSchema, EntryFileMissing, EntryFileMissingBase, GitHubAction, type GitHubActionBuildResult, GitHubActionBuildResultSchema, type GitHubActionOptions, type LoadConfigOptions, LoadConfigOptionsSchema, type LoadConfigResult, MainEntryMissing, MainEntryMissingBase, type PersistError, PersistLocalError, PersistLocalErrorBase, PersistLocalLayer, type PersistLocalOptions, PersistLocalOptionsSchema, type PersistLocalResult, PersistLocalResultSchema, type PersistLocalRunnerOptions, PersistLocalRunnerOptionsSchema, PersistLocalService, type ValidateOptions, ValidateOptionsSchema, type ValidationError, type ValidationErrorItem, ValidationErrorSchema, ValidationFailed, ValidationFailedBase, ValidationLayer, type ValidationOptions, ValidationOptionsSchema, type ValidationResult, ValidationResultSchema, ValidationService, type ValidationWarning, ValidationWarningSchema, WorkerEntryInvalidName, WorkerEntryInvalidNameBase, WorkerEntryMissing, WorkerEntryMissingBase, WriteError, WriteErrorBase, defineConfig };
1737
+ export { ActionYmlMissing, ActionYmlMissingBase, ActionYmlPathError, ActionYmlPathErrorBase, type ActionYmlResult, ActionYmlResultSchema, ActionYmlSchemaError, ActionYmlSchemaErrorBase, ActionYmlSyntaxError, ActionYmlSyntaxErrorBase, type AppError, AppLayer, type BuildError, BuildFailed, BuildFailedBase, BuildLayer, type BuildOptions, BuildOptionsSchema, type BuildResult, BuildResultSchema, type BuildRunnerOptions, BuildRunnerOptionsSchema, BuildService, type BuildServiceShape, BundleFailed, BundleFailedBase, type BundleResult, BundleResultSchema, type BundleStats, BundleStatsSchema, CleanError, CleanErrorBase, type Config, type ConfigError, type ConfigInput, ConfigInputSchema, ConfigInvalid, ConfigInvalidBase, ConfigLayer, ConfigLoadFailed, ConfigLoadFailedBase, ConfigNotFound, ConfigNotFoundBase, ConfigSchema, ConfigService, type ConfigServiceShape, type DetectEntriesResult, DetectEntriesResultSchema, type DetectedEntry, DetectedEntrySchema, type Entries, EntriesSchema, EntryFileMissing, EntryFileMissingBase, GitHubAction, type GitHubActionBuildResult, GitHubActionBuildResultSchema, type GitHubActionOptions, type LoadConfigOptions, LoadConfigOptionsSchema, type LoadConfigResult, MainEntryMissing, MainEntryMissingBase, type PersistError, PersistLocalError, PersistLocalErrorBase, PersistLocalLayer, type PersistLocalOptions, PersistLocalOptionsSchema, type PersistLocalResult, PersistLocalResultSchema, type PersistLocalRunnerOptions, PersistLocalRunnerOptionsSchema, PersistLocalService, type PersistLocalServiceShape, type ValidateOptions, ValidateOptionsSchema, type ValidationError, type ValidationErrorItem, ValidationErrorSchema, ValidationFailed, ValidationFailedBase, ValidationLayer, type ValidationOptions, ValidationOptionsSchema, type ValidationResult, ValidationResultSchema, ValidationService, type ValidationServiceShape, type ValidationWarning, ValidationWarningSchema, WorkerEntryInvalidName, WorkerEntryInvalidNameBase, WorkerEntryMissing, WorkerEntryMissingBase, WriteError, WriteErrorBase, defineConfig };
1650
1738
  //# sourceMappingURL=index.d.ts.map