syncpack 9.8.6 → 10.1.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/README.md +22 -19
- package/dist/bin-fix-mismatches/fix-mismatches-cli.d.ts +2 -2
- package/dist/bin-fix-mismatches/fix-mismatches-cli.js +3 -1
- package/dist/bin-fix-mismatches/fix-mismatches.d.ts +2 -2
- package/dist/bin-fix-mismatches/fix-mismatches.js +42 -24
- package/dist/bin-format/format-cli.d.ts +2 -2
- package/dist/bin-format/format-cli.js +2 -1
- package/dist/bin-format/format.d.ts +2 -2
- package/dist/bin-format/format.js +4 -1
- package/dist/bin-lint/index.d.ts +2 -0
- package/dist/bin-lint/index.js +39 -0
- package/dist/bin-lint/lint-cli.d.ts +3 -0
- package/dist/bin-lint/lint-cli.js +11 -0
- package/dist/bin-lint/lint.d.ts +2 -0
- package/dist/bin-lint/lint.js +116 -0
- package/dist/bin-lint-semver-ranges/lint-semver-ranges-cli.d.ts +2 -2
- package/dist/bin-lint-semver-ranges/lint-semver-ranges-cli.js +2 -1
- package/dist/bin-lint-semver-ranges/lint-semver-ranges.d.ts +2 -2
- package/dist/bin-lint-semver-ranges/lint-semver-ranges.js +29 -25
- package/dist/bin-list/list-cli.d.ts +2 -2
- package/dist/bin-list/list-cli.js +2 -1
- package/dist/bin-list/list.d.ts +2 -2
- package/dist/bin-list/list.js +58 -54
- package/dist/bin-list-mismatches/list-mismatches-cli.d.ts +2 -2
- package/dist/bin-list-mismatches/list-mismatches-cli.js +2 -1
- package/dist/bin-list-mismatches/list-mismatches.d.ts +2 -2
- package/dist/bin-list-mismatches/list-mismatches.js +72 -106
- package/dist/bin-set-semver-ranges/set-semver-ranges-cli.d.ts +2 -2
- package/dist/bin-set-semver-ranges/set-semver-ranges-cli.js +2 -1
- package/dist/bin-set-semver-ranges/set-semver-ranges.d.ts +2 -2
- package/dist/bin-set-semver-ranges/set-semver-ranges.js +17 -3
- package/dist/bin.js +3 -0
- package/dist/config/get-custom-types.d.ts +9 -0
- package/dist/config/get-custom-types.js +49 -0
- package/dist/config/get-enabled-types.d.ts +3 -0
- package/dist/config/get-enabled-types.js +48 -0
- package/dist/config/get-filter.d.ts +2 -0
- package/dist/config/get-filter.js +13 -0
- package/dist/config/get-indent.d.ts +2 -0
- package/dist/config/get-indent.js +12 -0
- package/dist/config/get-semver-range.d.ts +3 -0
- package/dist/config/get-semver-range.js +12 -0
- package/dist/config/get-sort-az.d.ts +2 -0
- package/dist/config/get-sort-az.js +18 -0
- package/dist/config/get-sort-first.d.ts +2 -0
- package/dist/config/get-sort-first.js +10 -0
- package/dist/config/get-source.d.ts +2 -0
- package/dist/config/get-source.js +13 -0
- package/dist/config/types.d.ts +106 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/get-context/index.d.ts +8 -16
- package/dist/get-context/index.js +7 -33
- package/dist/{get-context/get-package-json-files → get-package-json-files}/get-file-paths.d.ts +3 -3
- package/dist/{get-context/get-package-json-files → get-package-json-files}/get-file-paths.js +4 -4
- package/dist/{get-context/get-package-json-files → get-package-json-files}/get-patterns/get-lerna-patterns.d.ts +1 -1
- package/dist/{get-context/get-package-json-files → get-package-json-files}/get-patterns/get-lerna-patterns.js +1 -1
- package/dist/{get-context/get-package-json-files → get-package-json-files}/get-patterns/get-pnpm-patterns.d.ts +1 -1
- package/dist/{get-context/get-package-json-files → get-package-json-files}/get-patterns/get-pnpm-patterns.js +1 -1
- package/dist/{get-context/get-package-json-files → get-package-json-files}/get-patterns/get-yarn-patterns.d.ts +1 -1
- package/dist/{get-context/get-package-json-files → get-package-json-files}/get-patterns/get-yarn-patterns.js +1 -1
- package/dist/{get-context/get-package-json-files → get-package-json-files}/get-patterns/index.d.ts +3 -3
- package/dist/{get-context/get-package-json-files → get-package-json-files}/get-patterns/index.js +4 -3
- package/dist/{get-context/get-package-json-files → get-package-json-files}/get-patterns/read-json-safe.d.ts +1 -1
- package/dist/{get-context/get-package-json-files → get-package-json-files}/get-patterns/read-yaml-safe.d.ts +1 -1
- package/dist/{get-context/get-package-json-files → get-package-json-files}/index.d.ts +3 -3
- package/dist/{get-context/get-package-json-files → get-package-json-files}/index.js +1 -1
- package/dist/{get-context/get-package-json-files/package-json-file → get-package-json-files}/instance.d.ts +6 -8
- package/dist/get-package-json-files/instance.js +23 -0
- package/dist/{get-context/get-package-json-files/package-json-file/index.d.ts → get-package-json-files/package-json-file.d.ts} +7 -9
- package/dist/get-package-json-files/package-json-file.js +45 -0
- package/dist/get-semver-groups/catch-all.d.ts +4 -0
- package/dist/get-semver-groups/catch-all.js +11 -0
- package/dist/get-semver-groups/filtered-out.d.ts +13 -0
- package/dist/get-semver-groups/filtered-out.js +29 -0
- package/dist/get-semver-groups/ignored.d.ts +11 -0
- package/dist/get-semver-groups/ignored.js +22 -0
- package/dist/get-semver-groups/index.d.ts +32 -0
- package/dist/get-semver-groups/index.js +90 -0
- package/dist/get-semver-groups/with-range.d.ts +11 -0
- package/dist/get-semver-groups/with-range.js +55 -0
- package/dist/get-version-groups/banned.d.ts +11 -0
- package/dist/get-version-groups/banned.js +24 -0
- package/dist/get-version-groups/catch-all.d.ts +4 -0
- package/dist/get-version-groups/catch-all.js +11 -0
- package/dist/get-version-groups/filtered-out.d.ts +13 -0
- package/dist/get-version-groups/filtered-out.js +31 -0
- package/dist/get-version-groups/ignored.d.ts +11 -0
- package/dist/get-version-groups/ignored.js +24 -0
- package/dist/get-version-groups/index.d.ts +57 -0
- package/dist/get-version-groups/index.js +119 -0
- package/dist/get-version-groups/lib/delete.d.ts +2 -0
- package/dist/get-version-groups/lib/delete.js +4 -0
- package/dist/get-version-groups/lib/get-highest-version.js +13 -0
- package/dist/get-version-groups/lib/get-lowest-version.js +13 -0
- package/dist/{get-context/get-groups/version-group/instance-group → get-version-groups}/lib/get-range-score.js +3 -2
- package/dist/get-version-groups/lib/get-unique-versions.d.ts +2 -0
- package/dist/get-version-groups/lib/get-unique-versions.js +8 -0
- package/dist/get-version-groups/lib/group-by.d.ts +1 -0
- package/dist/get-version-groups/lib/group-by.js +11 -0
- package/dist/get-version-groups/lib/sort.d.ts +1 -0
- package/dist/get-version-groups/lib/sort.js +44 -0
- package/dist/get-version-groups/pinned.d.ts +11 -0
- package/dist/get-version-groups/pinned.js +43 -0
- package/dist/get-version-groups/snapped-to.d.ts +11 -0
- package/dist/get-version-groups/snapped-to.js +52 -0
- package/dist/get-version-groups/standard.d.ts +11 -0
- package/dist/get-version-groups/standard.js +95 -0
- package/dist/index.d.ts +2 -0
- package/dist/{get-context → lib}/$R.d.ts +2 -2
- package/dist/{get-context → lib}/$R.js +3 -4
- package/dist/lib/disk.d.ts +3 -2
- package/dist/lib/exit-if-invalid.d.ts +2 -2
- package/dist/lib/is-semver.d.ts +5 -3
- package/dist/lib/is-semver.js +17 -3
- package/dist/lib/log.d.ts +4 -8
- package/dist/lib/log.js +3 -29
- package/dist/lib/set-semver-range.d.ts +2 -2
- package/dist/lib/write-if-changed.d.ts +2 -2
- package/dist/lib/write-if-changed.js +6 -25
- package/dist/{get-context/get-config/path-strategy → strategy}/lib/get-non-empty-string-prop.d.ts +1 -1
- package/dist/{get-context/get-config/path-strategy → strategy}/lib/get-non-empty-string-prop.js +1 -2
- package/dist/strategy/name-and-version-props.d.ts +12 -0
- package/dist/strategy/name-and-version-props.js +50 -0
- package/dist/strategy/named-version-string.d.ts +11 -0
- package/dist/{get-context/get-config/path-strategy/name-and-version-string.js → strategy/named-version-string.js} +26 -22
- package/dist/strategy/unnamed-version-string.d.ts +11 -0
- package/dist/strategy/unnamed-version-string.js +48 -0
- package/dist/strategy/versions-by-name.d.ts +11 -0
- package/dist/strategy/versions-by-name.js +29 -0
- package/package.json +8 -4
- package/dist/get-context/get-config/get-core-types.d.ts +0 -36
- package/dist/get-context/get-config/get-core-types.js +0 -38
- package/dist/get-context/get-config/get-custom-types.d.ts +0 -4
- package/dist/get-context/get-config/get-custom-types.js +0 -16
- package/dist/get-context/get-config/get-enabled-types.d.ts +0 -4
- package/dist/get-context/get-config/get-enabled-types.js +0 -17
- package/dist/get-context/get-config/index.d.ts +0 -8
- package/dist/get-context/get-config/index.js +0 -98
- package/dist/get-context/get-config/path-strategy/index.d.ts +0 -8
- package/dist/get-context/get-config/path-strategy/index.js +0 -18
- package/dist/get-context/get-config/path-strategy/name-and-version-props.d.ts +0 -2
- package/dist/get-context/get-config/path-strategy/name-and-version-props.js +0 -44
- package/dist/get-context/get-config/path-strategy/name-and-version-string.d.ts +0 -2
- package/dist/get-context/get-config/path-strategy/types.d.ts +0 -14
- package/dist/get-context/get-config/path-strategy/version-string.d.ts +0 -2
- package/dist/get-context/get-config/path-strategy/version-string.js +0 -49
- package/dist/get-context/get-config/path-strategy/versions-by-name.d.ts +0 -2
- package/dist/get-context/get-config/path-strategy/versions-by-name.js +0 -21
- package/dist/get-context/get-config/schema/base-group.d.ts +0 -7
- package/dist/get-context/get-config/schema/base-group.js +0 -10
- package/dist/get-context/get-config/schema/index.d.ts +0 -1540
- package/dist/get-context/get-config/schema/index.js +0 -81
- package/dist/get-context/get-config/schema/lib/non-empty-string.d.ts +0 -2
- package/dist/get-context/get-config/schema/lib/non-empty-string.js +0 -5
- package/dist/get-context/get-config/schema/paths.d.ts +0 -89
- package/dist/get-context/get-config/schema/paths.js +0 -33
- package/dist/get-context/get-config/schema/semver-group.d.ts +0 -119
- package/dist/get-context/get-config/schema/semver-group.js +0 -43
- package/dist/get-context/get-config/schema/semver-range.d.ts +0 -2
- package/dist/get-context/get-config/schema/semver-range.js +0 -16
- package/dist/get-context/get-config/schema/version-group.d.ts +0 -230
- package/dist/get-context/get-config/schema/version-group.js +0 -36
- package/dist/get-context/get-groups/base-group.d.ts +0 -22
- package/dist/get-context/get-groups/base-group.js +0 -39
- package/dist/get-context/get-groups/index.d.ts +0 -11
- package/dist/get-context/get-groups/index.js +0 -53
- package/dist/get-context/get-groups/semver-group.d.ts +0 -15
- package/dist/get-context/get-groups/semver-group.js +0 -46
- package/dist/get-context/get-groups/version-group/index.d.ts +0 -15
- package/dist/get-context/get-groups/version-group/index.js +0 -40
- package/dist/get-context/get-groups/version-group/instance-group/get-highest-version.js +0 -42
- package/dist/get-context/get-groups/version-group/instance-group/get-lowest-version.js +0 -44
- package/dist/get-context/get-groups/version-group/instance-group/index.d.ts +0 -34
- package/dist/get-context/get-groups/version-group/instance-group/index.js +0 -103
- package/dist/get-context/get-groups/version-group/instance-group/lib/compare-semver.d.ts +0 -4
- package/dist/get-context/get-groups/version-group/instance-group/lib/compare-semver.js +0 -38
- package/dist/get-context/get-package-json-files/package-json-file/index.js +0 -65
- package/dist/get-context/get-package-json-files/package-json-file/instance.js +0 -46
- package/dist/lib/error.d.ts +0 -12
- package/dist/lib/error.js +0 -25
- package/dist/types.d.ts +0 -90
- /package/dist/{get-context/get-config/path-strategy → config}/types.js +0 -0
- /package/dist/{get-context/get-package-json-files → get-package-json-files}/get-patterns/read-json-safe.js +0 -0
- /package/dist/{get-context/get-package-json-files → get-package-json-files}/get-patterns/read-yaml-safe.js +0 -0
- /package/dist/{get-context/get-groups/version-group/instance-group → get-version-groups}/lib/clean.d.ts +0 -0
- /package/dist/{get-context/get-groups/version-group/instance-group → get-version-groups}/lib/clean.js +0 -0
- /package/dist/{get-context/get-groups/version-group/instance-group → get-version-groups/lib}/get-highest-version.d.ts +0 -0
- /package/dist/{get-context/get-groups/version-group/instance-group → get-version-groups/lib}/get-lowest-version.d.ts +0 -0
- /package/dist/{get-context/get-groups/version-group/instance-group → get-version-groups}/lib/get-range-score.d.ts +0 -0
- /package/dist/{types.js → index.js} +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnnamedVersionStringStrategy = void 0;
|
|
4
|
+
const get_1 = require("tightrope/fn/get");
|
|
5
|
+
const pipe_1 = require("tightrope/fn/pipe");
|
|
6
|
+
const from_try_1 = require("tightrope/result/from-try");
|
|
7
|
+
const map_1 = require("tightrope/result/map");
|
|
8
|
+
const tap_1 = require("tightrope/result/tap");
|
|
9
|
+
const delete_1 = require("../get-version-groups/lib/delete");
|
|
10
|
+
const get_non_empty_string_prop_1 = require("./lib/get-non-empty-string-prop");
|
|
11
|
+
class UnnamedVersionStringStrategy {
|
|
12
|
+
constructor(name, path) {
|
|
13
|
+
this._tag = 'version';
|
|
14
|
+
this.name = name;
|
|
15
|
+
this.path = path;
|
|
16
|
+
}
|
|
17
|
+
read(file) {
|
|
18
|
+
const path = this.path;
|
|
19
|
+
return (0, pipe_1.pipe)(
|
|
20
|
+
// get version prop
|
|
21
|
+
(0, get_non_empty_string_prop_1.getNonEmptyStringProp)(path, file),
|
|
22
|
+
// if it is a non empty string, we can read it
|
|
23
|
+
(0, map_1.map)((version) => {
|
|
24
|
+
const name = path.split('.').slice(-1).join('');
|
|
25
|
+
return [[name, version]];
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
write(file, [, version]) {
|
|
29
|
+
const path = this.path;
|
|
30
|
+
const { contents } = file;
|
|
31
|
+
const isNestedPath = path.includes('.');
|
|
32
|
+
const nextValue = version === delete_1.DELETE ? undefined : version;
|
|
33
|
+
if (isNestedPath) {
|
|
34
|
+
const fullPath = path.split('.');
|
|
35
|
+
const pathToParent = fullPath.slice(0, fullPath.length - 1).join('.');
|
|
36
|
+
const key = fullPath.slice(-1).join('');
|
|
37
|
+
return (0, pipe_1.pipe)((0, get_1.get)(contents, ...pathToParent.split('.')), (0, tap_1.tap)((parent) => {
|
|
38
|
+
parent[key] = nextValue;
|
|
39
|
+
}), (0, map_1.map)(() => file));
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return (0, pipe_1.pipe)((0, from_try_1.fromTry)(() => {
|
|
43
|
+
contents[path] = nextValue;
|
|
44
|
+
}), (0, map_1.map)(() => file));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.UnnamedVersionStringStrategy = UnnamedVersionStringStrategy;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Result } from 'tightrope/result';
|
|
2
|
+
import type { PackageJsonFile } from '../get-package-json-files/package-json-file';
|
|
3
|
+
import type { Delete } from '../get-version-groups/lib/delete';
|
|
4
|
+
export declare class VersionsByNameStrategy {
|
|
5
|
+
_tag: string;
|
|
6
|
+
name: string;
|
|
7
|
+
path: string;
|
|
8
|
+
constructor(name: string, path: string);
|
|
9
|
+
read(file: PackageJsonFile): Result<[string, string][]>;
|
|
10
|
+
write(file: PackageJsonFile, [name, version]: [string, string | Delete]): Result<PackageJsonFile>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VersionsByNameStrategy = void 0;
|
|
4
|
+
const get_1 = require("tightrope/fn/get");
|
|
5
|
+
const pipe_1 = require("tightrope/fn/pipe");
|
|
6
|
+
const is_non_empty_object_1 = require("tightrope/guard/is-non-empty-object");
|
|
7
|
+
const filter_1 = require("tightrope/result/filter");
|
|
8
|
+
const map_1 = require("tightrope/result/map");
|
|
9
|
+
const tap_1 = require("tightrope/result/tap");
|
|
10
|
+
const delete_1 = require("../get-version-groups/lib/delete");
|
|
11
|
+
class VersionsByNameStrategy {
|
|
12
|
+
constructor(name, path) {
|
|
13
|
+
this._tag = 'versionsByName';
|
|
14
|
+
this.name = name;
|
|
15
|
+
this.path = path;
|
|
16
|
+
}
|
|
17
|
+
read(file) {
|
|
18
|
+
const path = this.path;
|
|
19
|
+
return (0, pipe_1.pipe)((0, get_1.get)(file.contents, ...path.split('.')), (0, filter_1.filter)((is_non_empty_object_1.isNonEmptyObject), ''), (0, map_1.map)((Object.entries)));
|
|
20
|
+
}
|
|
21
|
+
write(file, [name, version]) {
|
|
22
|
+
const path = this.path;
|
|
23
|
+
const nextValue = version === delete_1.DELETE ? undefined : version;
|
|
24
|
+
return (0, pipe_1.pipe)((0, get_1.get)(file.contents, ...path.split('.')), (0, tap_1.tap)((parent) => {
|
|
25
|
+
parent[name] = nextValue;
|
|
26
|
+
}), (0, map_1.map)(() => file));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.VersionsByNameStrategy = VersionsByNameStrategy;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "syncpack",
|
|
3
3
|
"description": "Consistent dependency versions in large JavaScript Monorepos",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "10.1.0",
|
|
5
5
|
"author": "Jamie Mason <jamie@foldleft.io> (https://github.com/JamieMason)",
|
|
6
6
|
"bin": {
|
|
7
7
|
"syncpack": "dist/bin.js",
|
|
@@ -18,11 +18,13 @@
|
|
|
18
18
|
"Aparajita Fishman (https://github.com/aparajita)",
|
|
19
19
|
"Artur Wierzbicki (https://github.com/ArturWierzbicki)",
|
|
20
20
|
"Daniel Silva (https://github.com/dsilvasc)",
|
|
21
|
+
"Jamie Haywood (https://github.com/jamiehaywood)",
|
|
21
22
|
"Jamie Mason (https://github.com/JamieMason)",
|
|
22
23
|
"Jody Heavener (https://github.com/jodyheavener)",
|
|
23
24
|
"Luis Vieira (https://github.com/luisvieiragmr)",
|
|
24
25
|
"Marais Rossouw (https://github.com/maraisr)",
|
|
25
26
|
"Matt Sprague (https://github.com/uforic)",
|
|
27
|
+
"Siraj (https://github.com/Syhner)",
|
|
26
28
|
"Tom Fletcher (https://github.com/tom-fletcher)"
|
|
27
29
|
],
|
|
28
30
|
"dependencies": {
|
|
@@ -35,7 +37,7 @@
|
|
|
35
37
|
"read-yaml-file": "2.1.0",
|
|
36
38
|
"semver": "7.5.0",
|
|
37
39
|
"tightrope": "0.1.0",
|
|
38
|
-
"
|
|
40
|
+
"ts-toolbelt": "9.6.0"
|
|
39
41
|
},
|
|
40
42
|
"devDependencies": {
|
|
41
43
|
"@tsconfig/node14": "1.0.3",
|
|
@@ -55,7 +57,7 @@
|
|
|
55
57
|
"rimraf": "4.4.1",
|
|
56
58
|
"ts-jest": "29.1.0",
|
|
57
59
|
"ts-node": "10.9.1",
|
|
58
|
-
"typescript": "
|
|
60
|
+
"typescript": "5.0.4"
|
|
59
61
|
},
|
|
60
62
|
"engines": {
|
|
61
63
|
"node": ">=14"
|
|
@@ -85,6 +87,7 @@
|
|
|
85
87
|
"yarn"
|
|
86
88
|
],
|
|
87
89
|
"license": "MIT",
|
|
90
|
+
"main": "dist/index.js",
|
|
88
91
|
"repository": "JamieMason/syncpack",
|
|
89
92
|
"resolutions": {
|
|
90
93
|
"chalk": "4.1.2"
|
|
@@ -97,5 +100,6 @@
|
|
|
97
100
|
"lint": "eslint --ext .ts .",
|
|
98
101
|
"prepack": "yarn build",
|
|
99
102
|
"test": "jest src test"
|
|
100
|
-
}
|
|
103
|
+
},
|
|
104
|
+
"types": "dist/index.d.ts"
|
|
101
105
|
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { Syncpack } from '../../types';
|
|
2
|
-
type CoreTypes = typeof coreTypes;
|
|
3
|
-
export type CoreTypeName = keyof CoreTypes;
|
|
4
|
-
declare const coreTypes: {
|
|
5
|
-
readonly dev: {
|
|
6
|
-
readonly path: "devDependencies";
|
|
7
|
-
readonly strategy: "versionsByName";
|
|
8
|
-
};
|
|
9
|
-
readonly overrides: {
|
|
10
|
-
readonly path: "overrides";
|
|
11
|
-
readonly strategy: "versionsByName";
|
|
12
|
-
};
|
|
13
|
-
readonly peer: {
|
|
14
|
-
readonly path: "peerDependencies";
|
|
15
|
-
readonly strategy: "versionsByName";
|
|
16
|
-
};
|
|
17
|
-
readonly pnpmOverrides: {
|
|
18
|
-
readonly path: "pnpm.overrides";
|
|
19
|
-
readonly strategy: "versionsByName";
|
|
20
|
-
};
|
|
21
|
-
readonly prod: {
|
|
22
|
-
readonly path: "dependencies";
|
|
23
|
-
readonly strategy: "versionsByName";
|
|
24
|
-
};
|
|
25
|
-
readonly resolutions: {
|
|
26
|
-
readonly path: "resolutions";
|
|
27
|
-
readonly strategy: "versionsByName";
|
|
28
|
-
};
|
|
29
|
-
readonly workspace: {
|
|
30
|
-
readonly namePath: "name";
|
|
31
|
-
readonly path: "version";
|
|
32
|
-
readonly strategy: "name~version";
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
export declare function getCoreTypes(): Syncpack.PathDefinition[];
|
|
36
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCoreTypes = void 0;
|
|
4
|
-
const coreTypes = {
|
|
5
|
-
dev: {
|
|
6
|
-
path: 'devDependencies',
|
|
7
|
-
strategy: 'versionsByName',
|
|
8
|
-
},
|
|
9
|
-
overrides: {
|
|
10
|
-
path: 'overrides',
|
|
11
|
-
strategy: 'versionsByName',
|
|
12
|
-
},
|
|
13
|
-
peer: {
|
|
14
|
-
path: 'peerDependencies',
|
|
15
|
-
strategy: 'versionsByName',
|
|
16
|
-
},
|
|
17
|
-
pnpmOverrides: {
|
|
18
|
-
path: 'pnpm.overrides',
|
|
19
|
-
strategy: 'versionsByName',
|
|
20
|
-
},
|
|
21
|
-
prod: {
|
|
22
|
-
path: 'dependencies',
|
|
23
|
-
strategy: 'versionsByName',
|
|
24
|
-
},
|
|
25
|
-
resolutions: {
|
|
26
|
-
path: 'resolutions',
|
|
27
|
-
strategy: 'versionsByName',
|
|
28
|
-
},
|
|
29
|
-
workspace: {
|
|
30
|
-
namePath: 'name',
|
|
31
|
-
path: 'version',
|
|
32
|
-
strategy: 'name~version',
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
function getCoreTypes() {
|
|
36
|
-
return Object.entries(coreTypes).map(([name, pathDef]) => ({ ...pathDef, name }));
|
|
37
|
-
}
|
|
38
|
-
exports.getCoreTypes = getCoreTypes;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCustomTypes = void 0;
|
|
4
|
-
const is_object_1 = require("tightrope/guard/is-object");
|
|
5
|
-
function getCustomTypes({ customTypes, }) {
|
|
6
|
-
return customTypes
|
|
7
|
-
? Object.keys(customTypes)
|
|
8
|
-
.map((name) => {
|
|
9
|
-
const pathDef = customTypes[name];
|
|
10
|
-
if (pathDef)
|
|
11
|
-
return { ...pathDef, name };
|
|
12
|
-
})
|
|
13
|
-
.filter((is_object_1.isObject))
|
|
14
|
-
: [];
|
|
15
|
-
}
|
|
16
|
-
exports.getCustomTypes = getCustomTypes;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Syncpack } from '../../types';
|
|
2
|
-
type Options = Pick<Partial<Syncpack.Config.Public>, 'dependencyTypes' | 'types'>;
|
|
3
|
-
export declare function getEnabledTypes(allTypes: Syncpack.PathDefinition[], { dependencyTypes, types }: Options): Syncpack.PathDefinition[];
|
|
4
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getEnabledTypes = void 0;
|
|
4
|
-
const is_array_of_strings_1 = require("tightrope/guard/is-array-of-strings");
|
|
5
|
-
const is_non_empty_array_1 = require("tightrope/guard/is-non-empty-array");
|
|
6
|
-
const is_non_empty_string_1 = require("tightrope/guard/is-non-empty-string");
|
|
7
|
-
function getEnabledTypes(allTypes, { dependencyTypes, types }) {
|
|
8
|
-
const enabledNames = (0, is_non_empty_string_1.isNonEmptyString)(types)
|
|
9
|
-
? types.split(',')
|
|
10
|
-
: (0, is_array_of_strings_1.isArrayOfStrings)(dependencyTypes)
|
|
11
|
-
? dependencyTypes
|
|
12
|
-
: [];
|
|
13
|
-
return (0, is_non_empty_array_1.isNonEmptyArray)(enabledNames)
|
|
14
|
-
? allTypes.filter(({ name }) => enabledNames.includes(name))
|
|
15
|
-
: allTypes;
|
|
16
|
-
}
|
|
17
|
-
exports.getEnabledTypes = getEnabledTypes;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Result } from 'tightrope/result';
|
|
2
|
-
import type { Disk } from '../../lib/disk';
|
|
3
|
-
import type { Syncpack } from '../../types';
|
|
4
|
-
/**
|
|
5
|
-
* Take all configuration from the command line and config file, combine it, and
|
|
6
|
-
* set defaults for anything which hasn't been defined.
|
|
7
|
-
*/
|
|
8
|
-
export declare function getConfig(disk: Disk, fromCli: Partial<Syncpack.Config.Cli>): Result<Syncpack.Config.Private>;
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.getConfig = void 0;
|
|
27
|
-
const pipe_1 = require("tightrope/fn/pipe");
|
|
28
|
-
const is_array_of_objects_1 = require("tightrope/guard/is-array-of-objects");
|
|
29
|
-
const is_array_of_strings_1 = require("tightrope/guard/is-array-of-strings");
|
|
30
|
-
const is_non_empty_object_1 = require("tightrope/guard/is-non-empty-object");
|
|
31
|
-
const is_non_empty_string_1 = require("tightrope/guard/is-non-empty-string");
|
|
32
|
-
const is_string_1 = require("tightrope/guard/is-string");
|
|
33
|
-
const from_try_1 = require("tightrope/result/from-try");
|
|
34
|
-
const map_err_1 = require("tightrope/result/map-err");
|
|
35
|
-
const error_1 = require("../../lib/error");
|
|
36
|
-
const log_1 = require("../../lib/log");
|
|
37
|
-
const get_core_types_1 = require("./get-core-types");
|
|
38
|
-
const get_custom_types_1 = require("./get-custom-types");
|
|
39
|
-
const get_enabled_types_1 = require("./get-enabled-types");
|
|
40
|
-
const ConfigSchema = __importStar(require("./schema"));
|
|
41
|
-
/**
|
|
42
|
-
* Take all configuration from the command line and config file, combine it, and
|
|
43
|
-
* set defaults for anything which hasn't been defined.
|
|
44
|
-
*/
|
|
45
|
-
function getConfig(disk, fromCli) {
|
|
46
|
-
const ERR_READING_CONFIG = 'Error reading config';
|
|
47
|
-
return (0, pipe_1.pipe)((0, from_try_1.fromTry)(() => unSafeGetConfig(disk, fromCli)), (0, map_err_1.mapErr)(error_1.BaseError.map(ERR_READING_CONFIG)));
|
|
48
|
-
}
|
|
49
|
-
exports.getConfig = getConfig;
|
|
50
|
-
function unSafeGetConfig(disk, fromCli) {
|
|
51
|
-
(0, log_1.verbose)('cli arguments:', fromCli);
|
|
52
|
-
const fromRcFile = disk.readConfigFileSync(fromCli.configPath);
|
|
53
|
-
(0, log_1.verbose)('rcfile contents:', fromRcFile);
|
|
54
|
-
const fromPublic = ConfigSchema.Public.parse({
|
|
55
|
-
customTypes: getConfigByName('customTypes', is_non_empty_object_1.isNonEmptyObject),
|
|
56
|
-
dependencyTypes: fromRcFile?.dependencyTypes,
|
|
57
|
-
filter: getConfigByName('filter', is_non_empty_string_1.isNonEmptyString),
|
|
58
|
-
indent: getConfigByName('indent', is_string_1.isString),
|
|
59
|
-
semverGroups: getConfigByName('semverGroups', is_array_of_objects_1.isArrayOfObjects),
|
|
60
|
-
semverRange: getConfigByName('semverRange', is_string_1.isString),
|
|
61
|
-
sortAz: getConfigByName('sortAz', is_array_of_strings_1.isArrayOfStrings),
|
|
62
|
-
sortFirst: getConfigByName('sortFirst', is_array_of_strings_1.isArrayOfStrings),
|
|
63
|
-
source: getConfigByName('source', is_array_of_strings_1.isArrayOfStrings),
|
|
64
|
-
types: fromCli?.types,
|
|
65
|
-
versionGroups: getConfigByName('versionGroups', is_array_of_objects_1.isArrayOfObjects),
|
|
66
|
-
});
|
|
67
|
-
(0, log_1.verbose)('user config:', fromPublic);
|
|
68
|
-
const coreTypes = (0, get_core_types_1.getCoreTypes)();
|
|
69
|
-
const customTypes = (0, get_custom_types_1.getCustomTypes)(fromPublic);
|
|
70
|
-
const allTypes = [...coreTypes, ...customTypes];
|
|
71
|
-
const enabledTypes = (0, get_enabled_types_1.getEnabledTypes)(allTypes, fromPublic);
|
|
72
|
-
const allConfig = ConfigSchema.Private.parse({
|
|
73
|
-
...fromPublic,
|
|
74
|
-
allTypes,
|
|
75
|
-
enabledTypes,
|
|
76
|
-
defaultSemverGroup: {
|
|
77
|
-
dependencies: ['**'],
|
|
78
|
-
isDefault: true,
|
|
79
|
-
packages: ['**'],
|
|
80
|
-
range: fromPublic.semverRange,
|
|
81
|
-
},
|
|
82
|
-
defaultVersionGroup: {
|
|
83
|
-
dependencies: ['**'],
|
|
84
|
-
isDefault: true,
|
|
85
|
-
packages: ['**'],
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
allConfig.semverGroups.push(allConfig.defaultSemverGroup);
|
|
89
|
-
allConfig.versionGroups.push(allConfig.defaultVersionGroup);
|
|
90
|
-
(0, log_1.verbose)('final config:', allConfig);
|
|
91
|
-
return allConfig;
|
|
92
|
-
function getConfigByName(name, isValid) {
|
|
93
|
-
if (isValid(fromCli[name]))
|
|
94
|
-
return fromCli[name];
|
|
95
|
-
if (isValid(fromRcFile[name]))
|
|
96
|
-
return fromRcFile[name];
|
|
97
|
-
}
|
|
98
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type StrategyByName = typeof strategyByName;
|
|
2
|
-
export declare const strategyByName: {
|
|
3
|
-
readonly 'name@version': import("./types").Strategy<"name@version">;
|
|
4
|
-
readonly 'name~version': import("./types").Strategy<"name~version">;
|
|
5
|
-
readonly version: import("./types").Strategy<"version">;
|
|
6
|
-
readonly versionsByName: import("./types").Strategy<"versionsByName">;
|
|
7
|
-
};
|
|
8
|
-
export declare function exhaustiveCheck(strategyName: never): never;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.exhaustiveCheck = exports.strategyByName = void 0;
|
|
4
|
-
const error_1 = require("../../../lib/error");
|
|
5
|
-
const name_and_version_props_1 = require("./name-and-version-props");
|
|
6
|
-
const name_and_version_string_1 = require("./name-and-version-string");
|
|
7
|
-
const version_string_1 = require("./version-string");
|
|
8
|
-
const versions_by_name_1 = require("./versions-by-name");
|
|
9
|
-
exports.strategyByName = {
|
|
10
|
-
'name@version': name_and_version_string_1.nameAndVersionString,
|
|
11
|
-
'name~version': name_and_version_props_1.nameAndVersionProps,
|
|
12
|
-
'version': version_string_1.versionString,
|
|
13
|
-
'versionsByName': versions_by_name_1.versionsByName,
|
|
14
|
-
};
|
|
15
|
-
function exhaustiveCheck(strategyName) {
|
|
16
|
-
throw new error_1.BaseError(`Unrecognised strategy "${strategyName}"`);
|
|
17
|
-
}
|
|
18
|
-
exports.exhaustiveCheck = exhaustiveCheck;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.nameAndVersionProps = void 0;
|
|
4
|
-
const get_1 = require("tightrope/fn/get");
|
|
5
|
-
const pipe_1 = require("tightrope/fn/pipe");
|
|
6
|
-
const and_then_1 = require("tightrope/result/and-then");
|
|
7
|
-
const from_try_1 = require("tightrope/result/from-try");
|
|
8
|
-
const map_1 = require("tightrope/result/map");
|
|
9
|
-
const map_err_1 = require("tightrope/result/map-err");
|
|
10
|
-
const tap_1 = require("tightrope/result/tap");
|
|
11
|
-
const error_1 = require("../../../lib/error");
|
|
12
|
-
const get_non_empty_string_prop_1 = require("./lib/get-non-empty-string-prop");
|
|
13
|
-
exports.nameAndVersionProps = {
|
|
14
|
-
read(file, pathDef) {
|
|
15
|
-
return (0, pipe_1.pipe)(
|
|
16
|
-
// get name prop
|
|
17
|
-
(0, get_non_empty_string_prop_1.getNonEmptyStringProp)(pathDef.namePath, file), (0, map_err_1.mapErr)(() => new error_1.BaseError(`Strategy<name~version> failed to get ${pathDef.namePath} in ${file.shortPath}`)),
|
|
18
|
-
// add the version prop
|
|
19
|
-
(0, and_then_1.andThen)((name) => (0, pipe_1.pipe)((0, get_non_empty_string_prop_1.getNonEmptyStringProp)(pathDef.path, file), (0, map_1.map)((version) => ({ name, version })), (0, map_err_1.mapErr)(() => new error_1.BaseError(`Strategy<name~version> failed to get ${pathDef.path} in ${file.shortPath}`)))),
|
|
20
|
-
// if both are non empty strings, we can return them
|
|
21
|
-
(0, map_1.map)(({ name, version }) => [[name, version]]));
|
|
22
|
-
},
|
|
23
|
-
write(file, pathDef, [, version]) {
|
|
24
|
-
const { contents, shortPath } = file;
|
|
25
|
-
const isNestedPath = pathDef.path.includes('.');
|
|
26
|
-
if (isNestedPath) {
|
|
27
|
-
const fullPath = pathDef.path.split('.');
|
|
28
|
-
const pathToParent = fullPath.slice(0, fullPath.length - 1).join('.');
|
|
29
|
-
const key = fullPath.slice(-1).join('');
|
|
30
|
-
return (0, pipe_1.pipe)((0, get_1.get)(contents, ...pathToParent.split('.')), (0, tap_1.tap)((parent) => {
|
|
31
|
-
parent[key] = version;
|
|
32
|
-
}), (0, map_err_1.mapErr)(onError), (0, map_1.map)(() => file));
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
return (0, pipe_1.pipe)((0, from_try_1.fromTry)(() => {
|
|
36
|
-
contents[pathDef.path] = version;
|
|
37
|
-
}), (0, map_err_1.mapErr)(onError), (0, map_1.map)(() => file));
|
|
38
|
-
}
|
|
39
|
-
function onError() {
|
|
40
|
-
const msg = `Strategy<name~version> failed to set ${pathDef.path} in ${shortPath}`;
|
|
41
|
-
return new error_1.BaseError(msg);
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Result } from 'tightrope/result';
|
|
2
|
-
import type { Syncpack } from '../../../types';
|
|
3
|
-
import type { PackageJsonFile } from '../../get-package-json-files/package-json-file';
|
|
4
|
-
export type PathDef<T extends Syncpack.PathDefinition['strategy']> = Syncpack.PathDefinition & {
|
|
5
|
-
strategy: T;
|
|
6
|
-
};
|
|
7
|
-
/** A name/version pair */
|
|
8
|
-
export type Entry = [string, string];
|
|
9
|
-
export interface Strategy<T extends Syncpack.PathDefinition['strategy']> {
|
|
10
|
-
/** Read from in-memory package.json file */
|
|
11
|
-
read(file: PackageJsonFile, pathDef: PathDef<T>): Result<Entry[]>;
|
|
12
|
-
/** Mutate in-memory package.json file */
|
|
13
|
-
write(file: PackageJsonFile, pathDef: PathDef<T>, entry: [string, string | undefined]): Result<PackageJsonFile>;
|
|
14
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.versionString = void 0;
|
|
4
|
-
const get_1 = require("tightrope/fn/get");
|
|
5
|
-
const pipe_1 = require("tightrope/fn/pipe");
|
|
6
|
-
const is_non_empty_string_1 = require("tightrope/guard/is-non-empty-string");
|
|
7
|
-
const result_1 = require("tightrope/result");
|
|
8
|
-
const and_then_1 = require("tightrope/result/and-then");
|
|
9
|
-
const from_try_1 = require("tightrope/result/from-try");
|
|
10
|
-
const map_1 = require("tightrope/result/map");
|
|
11
|
-
const map_err_1 = require("tightrope/result/map-err");
|
|
12
|
-
const tap_1 = require("tightrope/result/tap");
|
|
13
|
-
const error_1 = require("../../../lib/error");
|
|
14
|
-
const get_non_empty_string_prop_1 = require("./lib/get-non-empty-string-prop");
|
|
15
|
-
exports.versionString = {
|
|
16
|
-
read(file, pathDef) {
|
|
17
|
-
return (0, pipe_1.pipe)(
|
|
18
|
-
// get version prop
|
|
19
|
-
(0, get_non_empty_string_prop_1.getNonEmptyStringProp)(pathDef.path, file),
|
|
20
|
-
// if it is a non empty string, we can read it
|
|
21
|
-
(0, and_then_1.andThen)((version) => {
|
|
22
|
-
const name = pathDef.path.split('.').slice(-1).join('');
|
|
23
|
-
return (0, is_non_empty_string_1.isNonEmptyString)(version)
|
|
24
|
-
? new result_1.Ok([[name, version]])
|
|
25
|
-
: new result_1.Err(new error_1.BaseError(`Strategy<version> failed to get ${pathDef.path} in ${file.shortPath}`));
|
|
26
|
-
}));
|
|
27
|
-
},
|
|
28
|
-
write(file, pathDef, [, version]) {
|
|
29
|
-
const { contents, shortPath } = file;
|
|
30
|
-
const isNestedPath = pathDef.path.includes('.');
|
|
31
|
-
if (isNestedPath) {
|
|
32
|
-
const fullPath = pathDef.path.split('.');
|
|
33
|
-
const pathToParent = fullPath.slice(0, fullPath.length - 1).join('.');
|
|
34
|
-
const key = fullPath.slice(-1).join('');
|
|
35
|
-
return (0, pipe_1.pipe)((0, get_1.get)(contents, ...pathToParent.split('.')), (0, tap_1.tap)((parent) => {
|
|
36
|
-
parent[key] = version;
|
|
37
|
-
}), (0, map_err_1.mapErr)(onError), (0, map_1.map)(() => file));
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
return (0, pipe_1.pipe)((0, from_try_1.fromTry)(() => {
|
|
41
|
-
contents[pathDef.path] = version;
|
|
42
|
-
}), (0, map_err_1.mapErr)(onError), (0, map_1.map)(() => file));
|
|
43
|
-
}
|
|
44
|
-
function onError() {
|
|
45
|
-
const msg = `Strategy<version> failed to set ${pathDef.path} in ${shortPath}`;
|
|
46
|
-
return new error_1.BaseError(msg);
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.versionsByName = void 0;
|
|
4
|
-
const get_1 = require("tightrope/fn/get");
|
|
5
|
-
const pipe_1 = require("tightrope/fn/pipe");
|
|
6
|
-
const is_non_empty_object_1 = require("tightrope/guard/is-non-empty-object");
|
|
7
|
-
const filter_1 = require("tightrope/result/filter");
|
|
8
|
-
const map_1 = require("tightrope/result/map");
|
|
9
|
-
const map_err_1 = require("tightrope/result/map-err");
|
|
10
|
-
const tap_1 = require("tightrope/result/tap");
|
|
11
|
-
const error_1 = require("../../../lib/error");
|
|
12
|
-
exports.versionsByName = {
|
|
13
|
-
read(file, pathDef) {
|
|
14
|
-
return (0, pipe_1.pipe)((0, get_1.get)(file.contents, ...pathDef.path.split('.')), (0, filter_1.filter)((is_non_empty_object_1.isNonEmptyObject), ''), (0, map_1.map)((Object.entries)), (0, map_err_1.mapErr)(() => new error_1.BaseError(`Strategy<versionsByName> failed to get ${pathDef.path} in ${file.shortPath}`)));
|
|
15
|
-
},
|
|
16
|
-
write(file, pathDef, [name, version]) {
|
|
17
|
-
return (0, pipe_1.pipe)((0, get_1.get)(file.contents, ...pathDef.path.split('.')), (0, tap_1.tap)((parent) => {
|
|
18
|
-
parent[name] = version;
|
|
19
|
-
}), (0, map_err_1.mapErr)(() => new error_1.BaseError(`Strategy<versionsByName> failed to set ${pathDef.path} in ${file.shortPath}`)), (0, map_1.map)(() => file));
|
|
20
|
-
},
|
|
21
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const baseGroupFields: {
|
|
3
|
-
dependencies: z.ZodArray<z.ZodString, "many">;
|
|
4
|
-
dependencyTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
|
|
5
|
-
label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
6
|
-
packages: z.ZodArray<z.ZodString, "many">;
|
|
7
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.baseGroupFields = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.baseGroupFields = {
|
|
6
|
-
dependencies: zod_1.z.array(zod_1.z.string()).min(1),
|
|
7
|
-
dependencyTypes: zod_1.z.array(zod_1.z.string()).default([]).optional(),
|
|
8
|
-
label: zod_1.z.string().default('').optional(),
|
|
9
|
-
packages: zod_1.z.array(zod_1.z.string()).min(1),
|
|
10
|
-
};
|