@covector/assemble
Advanced tools
Comparing version 0.10.1 to 0.10.2
# Changelog | ||
## \[0.10.2] | ||
### Enhancements | ||
- [`7498ecc`](https://www.github.com/jbolda/covector/commit/7498ecc332efd10a1d6d4b6cd487d2817c9a853d)([#289](https://www.github.com/jbolda/covector/pull/289)) Implement zod for config file schema parsing and checking. It will throw an error if the `config.json` has entries that do not match the schema. | ||
### Dependencies | ||
- Upgraded to `@covector/files@0.7.0` | ||
## \[0.10.1] | ||
@@ -4,0 +14,0 @@ |
@@ -11,3 +11,833 @@ import { Operation } from "effection"; | ||
files: File[]; | ||
config?: ConfigFile | undefined; | ||
config?: { | ||
packages: Record<string, import("zod").objectOutputType<{ | ||
version: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
command: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>, import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
use: import("zod").ZodEnum<["fetch:check"]>; | ||
options: import("zod").ZodObject<{ | ||
url: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
url: string; | ||
}, { | ||
url: string; | ||
}>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>]>]>, import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
command: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>, import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
use: import("zod").ZodEnum<["fetch:check"]>; | ||
options: import("zod").ZodObject<{ | ||
url: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
url: string; | ||
}, { | ||
url: string; | ||
}>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>]>]>, "many">]>>; | ||
prepublish: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
command: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>, import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
use: import("zod").ZodEnum<["fetch:check"]>; | ||
options: import("zod").ZodObject<{ | ||
url: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
url: string; | ||
}, { | ||
url: string; | ||
}>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>]>]>, import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
command: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>, import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
use: import("zod").ZodEnum<["fetch:check"]>; | ||
options: import("zod").ZodObject<{ | ||
url: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
url: string; | ||
}, { | ||
url: string; | ||
}>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>]>]>, "many">]>>; | ||
publish: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
command: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>, import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
use: import("zod").ZodEnum<["fetch:check"]>; | ||
options: import("zod").ZodObject<{ | ||
url: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
url: string; | ||
}, { | ||
url: string; | ||
}>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>]>]>, import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
command: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>, import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
use: import("zod").ZodEnum<["fetch:check"]>; | ||
options: import("zod").ZodObject<{ | ||
url: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
url: string; | ||
}, { | ||
url: string; | ||
}>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>]>]>, "many">]>>; | ||
postpublish: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
command: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>, import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
use: import("zod").ZodEnum<["fetch:check"]>; | ||
options: import("zod").ZodObject<{ | ||
url: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
url: string; | ||
}, { | ||
url: string; | ||
}>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>]>]>, import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
command: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>, import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
use: import("zod").ZodEnum<["fetch:check"]>; | ||
options: import("zod").ZodObject<{ | ||
url: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
url: string; | ||
}, { | ||
url: string; | ||
}>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>]>]>, "many">]>>; | ||
errorOnVersionRange: import("zod").ZodOptional<import("zod").ZodString>; | ||
releaseTag: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<false>, import("zod").ZodString]>>; | ||
assets: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{ | ||
path: import("zod").ZodString; | ||
name: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
path: string; | ||
name: string; | ||
}, { | ||
path: string; | ||
name: string; | ||
}>, "many">, import("zod").ZodLiteral<false>]>>; | ||
manager: import("zod").ZodOptional<import("zod").ZodString>; | ||
path: import("zod").ZodOptional<import("zod").ZodString>; | ||
dependencies: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>; | ||
packageFileName: import("zod").ZodOptional<import("zod").ZodString>; | ||
}, import("zod").ZodTypeAny, "passthrough">>; | ||
changeFolder?: string | undefined; | ||
gitSiteUrl?: string | undefined; | ||
additionalBumpTypes?: string[] | undefined; | ||
defaultChangeTag?: string | undefined; | ||
pkgManagers?: Record<string, import("zod").objectOutputType<Pick<{ | ||
version: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
command: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>, import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
use: import("zod").ZodEnum<["fetch:check"]>; | ||
options: import("zod").ZodObject<{ | ||
url: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
url: string; | ||
}, { | ||
url: string; | ||
}>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>]>]>, import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
command: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>, import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
use: import("zod").ZodEnum<["fetch:check"]>; | ||
options: import("zod").ZodObject<{ | ||
url: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
url: string; | ||
}, { | ||
url: string; | ||
}>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>]>]>, "many">]>>; | ||
prepublish: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
command: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>, import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
use: import("zod").ZodEnum<["fetch:check"]>; | ||
options: import("zod").ZodObject<{ | ||
url: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
url: string; | ||
}, { | ||
url: string; | ||
}>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>]>]>, import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
command: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>, import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
use: import("zod").ZodEnum<["fetch:check"]>; | ||
options: import("zod").ZodObject<{ | ||
url: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
url: string; | ||
}, { | ||
url: string; | ||
}>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>]>]>, "many">]>>; | ||
publish: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
command: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>, import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
use: import("zod").ZodEnum<["fetch:check"]>; | ||
options: import("zod").ZodObject<{ | ||
url: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
url: string; | ||
}, { | ||
url: string; | ||
}>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>]>]>, import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
command: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>, import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
use: import("zod").ZodEnum<["fetch:check"]>; | ||
options: import("zod").ZodObject<{ | ||
url: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
url: string; | ||
}, { | ||
url: string; | ||
}>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>]>]>, "many">]>>; | ||
postpublish: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
command: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>, import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
use: import("zod").ZodEnum<["fetch:check"]>; | ||
options: import("zod").ZodObject<{ | ||
url: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
url: string; | ||
}, { | ||
url: string; | ||
}>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>]>]>, import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
command: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
command: string; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>, import("zod").ZodObject<{ | ||
runFromRoot: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
retries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>; | ||
dryRunCommand: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
pipe: import("zod").ZodOptional<import("zod").ZodBoolean>; | ||
use: import("zod").ZodEnum<["fetch:check"]>; | ||
options: import("zod").ZodObject<{ | ||
url: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
url: string; | ||
}, { | ||
url: string; | ||
}>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}, { | ||
options: { | ||
url: string; | ||
}; | ||
use: "fetch:check"; | ||
runFromRoot?: boolean | undefined; | ||
retries?: number[] | undefined; | ||
dryRunCommand?: string | boolean | undefined; | ||
pipe?: boolean | undefined; | ||
}>]>]>, "many">]>>; | ||
errorOnVersionRange: import("zod").ZodOptional<import("zod").ZodString>; | ||
releaseTag: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<false>, import("zod").ZodString]>>; | ||
assets: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{ | ||
path: import("zod").ZodString; | ||
name: import("zod").ZodString; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
path: string; | ||
name: string; | ||
}, { | ||
path: string; | ||
name: string; | ||
}>, "many">, import("zod").ZodLiteral<false>]>>; | ||
}, "version" | "prepublish" | "publish" | "postpublish" | "errorOnVersionRange" | "releaseTag" | "assets">, import("zod").ZodTypeAny, "passthrough">> | undefined; | ||
changeTags?: Record<string, string> | undefined; | ||
} | undefined; | ||
preMode?: { | ||
@@ -14,0 +844,0 @@ on: boolean; |
@@ -226,3 +226,3 @@ "use strict"; | ||
const pkgCommands = Object.keys(config.packages).reduce((pkged, pkg) => { | ||
var _a, _b; | ||
var _a, _b, _c, _d, _e, _f, _g, _h; | ||
const pkgManager = config.packages[pkg].manager; | ||
@@ -234,3 +234,3 @@ const commandItems = { pkg, pkgManager, config }; | ||
? {} | ||
: { packageFileName: (_b = config.packages[pkg]) === null || _b === void 0 ? void 0 : _b.packageFileName })), { precommand: mergeCommand(Object.assign(Object.assign({}, commandItems), { command: `pre${command}` })), command: mergedCommand, postcommand: mergeCommand(Object.assign(Object.assign({}, commandItems), { command: `post${command}` })), manager: config.packages[pkg].manager, dependencies: config.packages[pkg].dependencies, errorOnVersionRange: mergeCommand(Object.assign(Object.assign({}, commandItems), { command: `errorOnVersionRange` })) }); | ||
: { packageFileName: (_b = config.packages[pkg]) === null || _b === void 0 ? void 0 : _b.packageFileName })), { precommand: mergeCommand(Object.assign(Object.assign({}, commandItems), { command: `pre${command}` })), command: mergedCommand, postcommand: mergeCommand(Object.assign(Object.assign({}, commandItems), { command: `post${command}` })), manager: config.packages[pkg].manager, dependencies: config.packages[pkg].dependencies, errorOnVersionRange: (_h = (_e = (_d = (_c = config.packages) === null || _c === void 0 ? void 0 : _c[pkg]) === null || _d === void 0 ? void 0 : _d.errorOnVersionRange) !== null && _e !== void 0 ? _e : (_g = (_f = config.pkgManagers) === null || _f === void 0 ? void 0 : _f[pkgManager !== null && pkgManager !== void 0 ? pkgManager : ""]) === null || _g === void 0 ? void 0 : _g.errorOnVersionRange) !== null && _h !== void 0 ? _h : null }); | ||
} | ||
@@ -268,5 +268,5 @@ return pkged; | ||
// and pipe in data to template function | ||
var _a; | ||
var _a, _b; | ||
const pkgCommands = Object.keys(config.packages).reduce((pkged, pkg) => { | ||
var _a, _b; | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; | ||
const pkgManager = config.packages[pkg].manager; | ||
@@ -292,3 +292,3 @@ const commandItems = { pkg, pkgManager, config }; | ||
? {} | ||
: { assets: publishElements.assets })), { manager: config.packages[pkg].manager || "", dependencies: config.packages[pkg].dependencies, errorOnVersionRange: mergeCommand(Object.assign(Object.assign({}, commandItems), { command: `errorOnVersionRange` })), releaseTag: mergeCommand(Object.assign(Object.assign({}, commandItems), { command: `releaseTag` })) }); | ||
: { assets: publishElements.assets })), { manager: config.packages[pkg].manager || "", dependencies: config.packages[pkg].dependencies, errorOnVersionRange: (_h = (_e = (_d = (_c = config.packages) === null || _c === void 0 ? void 0 : _c[pkg]) === null || _d === void 0 ? void 0 : _d.errorOnVersionRange) !== null && _e !== void 0 ? _e : (_g = (_f = config.pkgManagers) === null || _f === void 0 ? void 0 : _f[pkgManager !== null && pkgManager !== void 0 ? pkgManager : ""]) === null || _g === void 0 ? void 0 : _g.errorOnVersionRange) !== null && _h !== void 0 ? _h : null, releaseTag: (_p = (_l = (_k = (_j = config.packages) === null || _j === void 0 ? void 0 : _j[pkg]) === null || _k === void 0 ? void 0 : _k.releaseTag) !== null && _l !== void 0 ? _l : (_o = (_m = config.pkgManagers) === null || _m === void 0 ? void 0 : _m[pkgManager !== null && pkgManager !== void 0 ? pkgManager : ""]) === null || _o === void 0 ? void 0 : _o.releaseTag) !== null && _p !== void 0 ? _p : null }); | ||
} | ||
@@ -337,6 +337,6 @@ return pkged; | ||
: { | ||
assets: templateCommands(pkgCommands[pkg].assets, pipeToTemplate, [ | ||
"path", | ||
"name", | ||
]), | ||
assets: (_a = pkgCommands[pkg].assets) === null || _a === void 0 ? void 0 : _a.map((asset) => ({ | ||
path: (0, lodash_1.template)(asset.path)(pipeToTemplate), | ||
name: (0, lodash_1.template)(asset.name)(pipeToTemplate), | ||
})), | ||
})); | ||
@@ -351,5 +351,3 @@ pipeOutput[pkg] = {}; | ||
? false | ||
: templateCommands([ | ||
(_a = pkgCommands[pkg].releaseTag) !== null && _a !== void 0 ? _a : "${ pkg.pkg }-v${ pkgFile.version }", | ||
], pipeToTemplate, ["releaseTag"])[0] }); | ||
: (0, lodash_1.template)((_b = pkgCommands[pkg].releaseTag) !== null && _b !== void 0 ? _b : "${ pkg.pkg }-v${ pkgFile.version }")(pipeToTemplate) }); | ||
commands = [...commands, merged]; | ||
@@ -366,5 +364,3 @@ } | ||
var _a, _b, _c, _d, _e, _f; | ||
//@ts-expect-error | ||
const managerCommand = (_c = (_b = (_a = config.pkgManagers) === null || _a === void 0 ? void 0 : _a[pkgManager]) === null || _b === void 0 ? void 0 : _b[command]) !== null && _c !== void 0 ? _c : null; | ||
//@ts-expect-error | ||
const managerCommand = (_c = (_b = (_a = config.pkgManagers) === null || _a === void 0 ? void 0 : _a[pkgManager !== null && pkgManager !== void 0 ? pkgManager : ""]) === null || _b === void 0 ? void 0 : _b[command]) !== null && _c !== void 0 ? _c : null; | ||
const mergedCommand = (_f = (_e = (_d = config.packages) === null || _d === void 0 ? void 0 : _d[pkg]) === null || _e === void 0 ? void 0 : _e[command]) !== null && _f !== void 0 ? _f : managerCommand; | ||
@@ -385,12 +381,15 @@ return mergedCommand; | ||
const templateCommands = (command, pipe, complexCommands) => { | ||
if (!command) | ||
return null; | ||
if (command === null) | ||
return command; | ||
const commands = !Array.isArray(command) ? [command] : command; | ||
return commands.map((c) => { | ||
return commands | ||
.map((c) => { | ||
if (typeof c === "object") { | ||
return Object.assign(Object.assign({}, c), complexCommands.reduce((templated, complex) => { | ||
const commandToTemplate = c[complex]; | ||
// @ts-expect-error issue with proper narrowing | ||
templated[complex] = | ||
typeof c[complex] === "string" | ||
? (0, lodash_1.template)(c[complex])(pipe) | ||
: c[complex]; | ||
typeof commandToTemplate === "string" | ||
? (0, lodash_1.template)(commandToTemplate)(pipe) | ||
: commandToTemplate; | ||
return templated; | ||
@@ -401,5 +400,8 @@ }, {})); | ||
// if it is a function, we pipe when we run the function | ||
return typeof c === "function" ? c : (0, lodash_1.template)(c)(pipe); | ||
return typeof c === "function" || typeof c === "boolean" | ||
? c | ||
: (0, lodash_1.template)(c)(pipe); | ||
} | ||
}); | ||
}) | ||
.filter((c) => c !== false); | ||
}; |
{ | ||
"name": "@covector/assemble", | ||
"version": "0.10.1", | ||
"version": "0.10.2", | ||
"license": "Apache-2.0", | ||
@@ -20,3 +20,3 @@ "homepage": "https://github.com/jbolda/covector#readme", | ||
"@covector/command": "0.7.0", | ||
"@covector/files": "0.6.2", | ||
"@covector/files": "0.7.0", | ||
"effection": "^2.0.6", | ||
@@ -31,5 +31,5 @@ "js-yaml": "^4.1.0", | ||
"devDependencies": { | ||
"@covector/types": "^0.0.0", | ||
"@types/js-yaml": "^4.0.0", | ||
"@types/lodash": "^4.14.191", | ||
"@covector/types": "0.0.0", | ||
"@types/js-yaml": "^4.0.5", | ||
"@types/lodash": "^4.14.196", | ||
"fixturez": "^1.1.0", | ||
@@ -36,0 +36,0 @@ "tslib": "^2.5.0", |
157
src/index.ts
@@ -23,2 +23,6 @@ import { Operation } from "effection"; | ||
PipePublishTemplate, | ||
Command, | ||
NormalizedCommand, | ||
CommandTypes, | ||
PkgManagerConfig, | ||
} from "@covector/types"; | ||
@@ -51,7 +55,7 @@ | ||
throw new Error( | ||
`${file.path} didn't have any packages bumped. Please add a package bump.` | ||
`${file.path} didn't have any packages bumped. Please add a package bump.`, | ||
); | ||
for (const [k, v] of Object.entries( | ||
changeset.releases as { [k: string]: CommonBumps } | ||
changeset.releases as { [k: string]: CommonBumps }, | ||
)) { | ||
@@ -119,3 +123,3 @@ const [bump, tag] = (v as string).split(":"); | ||
changes: Change[], | ||
{ additionalBumpTypes = [] }: { additionalBumpTypes?: string[] } | ||
{ additionalBumpTypes = [] }: { additionalBumpTypes?: string[] }, | ||
) => { | ||
@@ -125,3 +129,3 @@ return changes.reduce((release: { [k: string]: Release }, change) => { | ||
const bumpOptions = ["major", "minor", "patch", "noop"].concat( | ||
additionalBumpTypes | ||
additionalBumpTypes, | ||
); | ||
@@ -133,3 +137,3 @@ | ||
bumpOptions, | ||
!change.meta ? `` : ` in ${change.meta.path}` | ||
!change.meta ? `` : ` in ${change.meta.path}`, | ||
); | ||
@@ -160,3 +164,3 @@ | ||
bumpOptions: string[], | ||
filenameRef: string | ||
filenameRef: string, | ||
) { | ||
@@ -168,3 +172,3 @@ const satisfiesAssertion = bumpOptions.includes(bumpType); | ||
`Try one of the following${filenameRef}: ` + | ||
`${bumpOptions.filter((option) => option !== "noop").join(", ")}.\n` | ||
`${bumpOptions.filter((option) => option !== "noop").join(", ")}.\n`, | ||
); | ||
@@ -203,3 +207,3 @@ } | ||
const prevFile = preMode.prevFiles.find( | ||
(filename) => file.path === filename | ||
(filename) => file.path === filename, | ||
); | ||
@@ -220,3 +224,3 @@ if (!prevFile) { | ||
const prevFile = preMode.prevFiles.find( | ||
(filename) => file.path === filename | ||
(filename) => file.path === filename, | ||
); | ||
@@ -265,6 +269,6 @@ if (prevFile) { | ||
}, | ||
"" | ||
"", | ||
); | ||
throw Error( | ||
`${pkg} listed in ${changesContainingError} does not exist in the .changes/config.json` | ||
`${pkg} listed in ${changesContainingError} does not exist in the .changes/config.json`, | ||
); | ||
@@ -326,3 +330,3 @@ } | ||
}, | ||
{} | ||
{}, | ||
); | ||
@@ -373,6 +377,6 @@ } | ||
dependencies: config.packages[pkg].dependencies, | ||
errorOnVersionRange: mergeCommand({ | ||
...commandItems, | ||
command: `errorOnVersionRange`, | ||
}), | ||
errorOnVersionRange: | ||
config.packages?.[pkg]?.errorOnVersionRange ?? | ||
config.pkgManagers?.[pkgManager ?? ""]?.errorOnVersionRange ?? | ||
null, | ||
}; | ||
@@ -383,3 +387,3 @@ } | ||
}, | ||
{} | ||
{} as { [k: string]: PkgVersion }, | ||
); | ||
@@ -392,3 +396,3 @@ | ||
for (let pkg of Object.keys( | ||
usePackageSubset(assembledChanges.releases, filterPackages) | ||
usePackageSubset(assembledChanges.releases, filterPackages), | ||
)) { | ||
@@ -417,3 +421,3 @@ if (!pkgCommands[pkg]) continue; | ||
pipeToTemplate, | ||
["command", "dryRunCommand", "runFromRoot"] | ||
["command", "dryRunCommand", "runFromRoot"], | ||
), | ||
@@ -427,3 +431,3 @@ command: templateCommands(pkgCommands[pkg].command, pipeToTemplate, [ | ||
pipeToTemplate, | ||
["command", "dryRunCommand", "runFromRoot"] | ||
["command", "dryRunCommand", "runFromRoot"], | ||
), | ||
@@ -439,3 +443,3 @@ errorOnVersionRange: pkgCommands[pkg].errorOnVersionRange, | ||
Object.keys(pipeOutput).forEach((pkg) => | ||
console.dir({ pkg, pipe: pipeOutput[pkg].pipe }, { depth: 5 }) | ||
console.dir({ pkg, pipe: pipeOutput[pkg].pipe }, { depth: 5 }), | ||
); | ||
@@ -526,10 +530,10 @@ } | ||
dependencies: config.packages[pkg].dependencies, | ||
errorOnVersionRange: mergeCommand({ | ||
...commandItems, | ||
command: `errorOnVersionRange`, | ||
}), | ||
releaseTag: mergeCommand({ | ||
...commandItems, | ||
command: `releaseTag`, | ||
}), | ||
errorOnVersionRange: | ||
config.packages?.[pkg]?.errorOnVersionRange ?? | ||
config.pkgManagers?.[pkgManager ?? ""]?.errorOnVersionRange ?? | ||
null, | ||
releaseTag: | ||
config.packages?.[pkg]?.releaseTag ?? | ||
config.pkgManagers?.[pkgManager ?? ""]?.releaseTag ?? | ||
null, | ||
}; | ||
@@ -540,3 +544,3 @@ } | ||
}, | ||
{} | ||
{}, | ||
); | ||
@@ -590,3 +594,3 @@ | ||
//@ts-expect-error no index type string | ||
pkgCommands[pkg][`getPublishedVersion${subPublishCommand}`] | ||
pkgCommands[pkg][`getPublishedVersion${subPublishCommand}`], | ||
)(pipeToTemplate), | ||
@@ -597,6 +601,6 @@ }), | ||
: { | ||
assets: templateCommands(pkgCommands[pkg].assets, pipeToTemplate, [ | ||
"path", | ||
"name", | ||
]), | ||
assets: pkgCommands[pkg].assets?.map((asset) => ({ | ||
path: template(asset.path)(pipeToTemplate), | ||
name: template(asset.name)(pipeToTemplate), | ||
})), | ||
}), | ||
@@ -618,3 +622,3 @@ }; | ||
pipeToTemplate, | ||
["command", "dryRunCommand", "runFromRoot"] | ||
["command", "dryRunCommand", "runFromRoot"], | ||
), | ||
@@ -628,3 +632,3 @@ command: templateCommands(pkgCommands[pkg].command, pipeToTemplate, [ | ||
pipeToTemplate, | ||
["command", "dryRunCommand", "runFromRoot"] | ||
["command", "dryRunCommand", "runFromRoot"], | ||
), | ||
@@ -635,10 +639,6 @@ errorOnVersionRange: pkgCommands[pkg].errorOnVersionRange, | ||
? false | ||
: templateCommands( | ||
[ | ||
pkgCommands[pkg].releaseTag ?? | ||
"${ pkg.pkg }-v${ pkgFile.version }", | ||
], | ||
pipeToTemplate, | ||
["releaseTag"] | ||
)![0], | ||
: template( | ||
(pkgCommands[pkg].releaseTag as string | undefined) ?? | ||
"${ pkg.pkg }-v${ pkgFile.version }", | ||
)(pipeToTemplate), | ||
}; | ||
@@ -652,3 +652,3 @@ | ||
Object.keys(pipeOutput).forEach((pkg) => | ||
console.dir({ pkg, pipe: pipeOutput[pkg].pipe }, { depth: 5 }) | ||
console.dir({ pkg, pipe: pipeOutput[pkg].pipe }, { depth: 5 }), | ||
); | ||
@@ -666,10 +666,9 @@ } | ||
}: { | ||
pkg: any; | ||
pkgManager: any; | ||
command: any; | ||
pkg: keyof ConfigFile["packages"]; | ||
pkgManager: string | undefined; | ||
command: keyof PkgManagerConfig; | ||
config: ConfigFile; | ||
}) => { | ||
//@ts-expect-error | ||
const managerCommand = config.pkgManagers?.[pkgManager]?.[command] ?? null; | ||
//@ts-expect-error | ||
}): Command | null => { | ||
const managerCommand = | ||
config.pkgManagers?.[pkgManager ?? ""]?.[command] ?? null; | ||
const mergedCommand = config.packages?.[pkg]?.[command] ?? managerCommand; | ||
@@ -692,29 +691,37 @@ | ||
type PossibleTemplateCommands = | ||
| "command" | ||
| "dryRunCommand" | ||
| "runFromRoot" | ||
| "assets"; | ||
const templateCommands = ( | ||
command: any, | ||
command: Command | null, | ||
pipe: PipePublishTemplate | PipeVersionTemplate, | ||
complexCommands: string[] | ||
) => { | ||
if (!command) return null; | ||
complexCommands: Extract<keyof NormalizedCommand, PossibleTemplateCommands>[], | ||
): CommandTypes[] | null => { | ||
if (command === null) return command; | ||
const commands = !Array.isArray(command) ? [command] : command; | ||
return commands.map((c) => { | ||
if (typeof c === "object") { | ||
return { | ||
...c, | ||
...complexCommands.reduce( | ||
(templated: { [k: string]: any }, complex) => { | ||
return commands | ||
.map((c) => { | ||
if (typeof c === "object") { | ||
return { | ||
...c, | ||
...complexCommands.reduce((templated, complex) => { | ||
const commandToTemplate = c[complex]; | ||
// @ts-expect-error issue with proper narrowing | ||
templated[complex] = | ||
typeof c[complex] === "string" | ||
? template(c[complex])(pipe) | ||
: c[complex]; | ||
typeof commandToTemplate === "string" | ||
? template(commandToTemplate)(pipe) | ||
: commandToTemplate; | ||
return templated; | ||
}, | ||
{} | ||
), | ||
}; | ||
} else { | ||
// if it is a function, we pipe when we run the function | ||
return typeof c === "function" ? c : template(c)(pipe); | ||
} | ||
}); | ||
}, {} as NormalizedCommand), | ||
}; | ||
} else { | ||
// if it is a function, we pipe when we run the function | ||
return typeof c === "function" || typeof c === "boolean" | ||
? c | ||
: template(c)(pipe); | ||
} | ||
}) | ||
.filter((c) => c !== false) as CommandTypes[]; | ||
}; |
@@ -176,3 +176,3 @@ import { it } from "@effection/jest"; | ||
}, | ||
]) | ||
]), | ||
); | ||
@@ -202,3 +202,3 @@ expect(assembled.releases).toMatchObject({ | ||
}, | ||
]) | ||
]), | ||
); | ||
@@ -228,3 +228,3 @@ expect(assembled.releases).toMatchObject({ | ||
}, | ||
]) | ||
]), | ||
); | ||
@@ -251,3 +251,3 @@ expect(assembled.releases).toMatchObject({ | ||
}, | ||
]) | ||
]), | ||
); | ||
@@ -284,3 +284,3 @@ expect(assembled.releases).toMatchObject({ | ||
expect(e.message).toMatch( | ||
".changes/empty-file.md didn't have any packages bumped. Please add a package bump." | ||
".changes/empty-file.md didn't have any packages bumped. Please add a package bump.", | ||
); | ||
@@ -301,3 +301,2 @@ } | ||
], | ||
//@ts-expect-error | ||
config: configSpecial, | ||
@@ -319,3 +318,2 @@ }); | ||
], | ||
//@ts-expect-error | ||
config, | ||
@@ -326,3 +324,3 @@ }); | ||
"housekeeping specified for assemble1 is invalid.\n" + | ||
"Try one of the following: major, minor, patch.\n" | ||
"Try one of the following: major, minor, patch.\n", | ||
); | ||
@@ -337,3 +335,2 @@ } | ||
files: [testTextSpecialTwo], | ||
//@ts-expect-error | ||
config: configSpecial, | ||
@@ -344,3 +341,3 @@ }); | ||
"explosions specified for @namespaced/assemble2 is invalid.\n" + | ||
"Try one of the following: major, minor, patch, housekeeping, workflows.\n" | ||
"Try one of the following: major, minor, patch, housekeeping, workflows.\n", | ||
); | ||
@@ -353,3 +350,2 @@ } | ||
files: [testTextSpecialOne], | ||
//@ts-expect-error | ||
config: configSpecial, | ||
@@ -356,0 +352,0 @@ }); |
@@ -123,4 +123,4 @@ import { it } from "@effection/jest"; | ||
it("merges version", function* () { | ||
//@ts-expect-error | ||
const mergedVersionConfig = yield mergeChangesToConfig({ | ||
//@ts-expect-error | ||
config, | ||
@@ -144,4 +144,4 @@ assembledChanges, | ||
//@ts-expect-error | ||
const mergedVersionConfig = yield mergeChangesToConfig({ | ||
//@ts-expect-error | ||
config: modifiedConfig, | ||
@@ -211,4 +211,4 @@ assembledChanges, | ||
//@ts-expect-error | ||
const mergedVersionConfig = yield mergeChangesToConfig({ | ||
//@ts-expect-error | ||
config: nestedConfig, | ||
@@ -226,3 +226,2 @@ assembledChanges: nestedAssembledChanges, | ||
cwd: configFolder, | ||
//@ts-expect-error | ||
config, | ||
@@ -239,4 +238,4 @@ //@ts-expect-error | ||
it("merges version", function* () { | ||
//@ts-expect-error | ||
const mergedVersionConfig = yield mergeChangesToConfig({ | ||
//@ts-expect-error | ||
config, | ||
@@ -253,5 +252,5 @@ assembledChanges, | ||
//@ts-expect-error | ||
const mergedPublishConfig = yield mergeIntoConfig({ | ||
cwd: configFolder, | ||
//@ts-expect-error | ||
config, | ||
@@ -258,0 +257,0 @@ assembledChanges, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172593
2560
+ Added@covector/files@0.7.0(transitive)
+ Addedzod@3.23.8(transitive)
+ Addedzod-validation-error@1.5.0(transitive)
- Removed@covector/files@0.6.2(transitive)
Updated@covector/files@0.7.0