@barnum/barnum 0.0.0-main-5e91609d → 0.0.0-main-1b7a5ffd
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/package.json +1 -1
- package/run.ts +4 -4
package/package.json
CHANGED
package/run.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { spawn, type ChildProcess } from "node:child_process";
|
|
2
2
|
import { chmodSync } from "node:fs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
|
-
import
|
|
4
|
+
import { configFileSchema } from "./barnum-config-schema.zod.js";
|
|
5
5
|
import type { z } from "zod";
|
|
6
6
|
|
|
7
7
|
const require = createRequire(import.meta.url);
|
|
@@ -26,14 +26,14 @@ export interface RunOptions {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export class BarnumConfig {
|
|
29
|
-
private readonly config: z.
|
|
29
|
+
private readonly config: z.output<typeof configFileSchema>;
|
|
30
30
|
|
|
31
|
-
private constructor(config: z.
|
|
31
|
+
private constructor(config: z.output<typeof configFileSchema>) {
|
|
32
32
|
this.config = config;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
static fromConfig(config: z.input<typeof configFileSchema>): BarnumConfig {
|
|
36
|
-
return new BarnumConfig(config);
|
|
36
|
+
return new BarnumConfig(configFileSchema.parse(config));
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
run(opts?: RunOptions): ChildProcess {
|