@uniformdev/cli 20.57.2-alpha.24 → 20.57.2-alpha.25
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/dist/index.mjs +1 -21
- package/package.json +9 -9
package/dist/index.mjs
CHANGED
|
@@ -603,32 +603,12 @@ function normalizeCriteria(criteria) {
|
|
|
603
603
|
}
|
|
604
604
|
var VALID_FILTER_TYPES = ["ids", "nameContains"];
|
|
605
605
|
var VALID_FILTER_FIELDS = ["include", "exclude"];
|
|
606
|
-
var VALID_DIRECTION_KEYS = ["pull", "push"];
|
|
607
|
-
var VALID_ENTITY_CONFIG_KEYS = /* @__PURE__ */ new Set([...VALID_DIRECTION_KEYS, ...VALID_FILTER_FIELDS]);
|
|
608
606
|
var VALID_FILTER_BLOCK_KEYS = ["filters"];
|
|
609
607
|
function validateEntityConfig(entityConfig, operation) {
|
|
610
|
-
const validKeysLabel = [...VALID_ENTITY_CONFIG_KEYS].join(", ");
|
|
611
|
-
for (const key of Object.keys(entityConfig)) {
|
|
612
|
-
if (!VALID_ENTITY_CONFIG_KEYS.has(key)) {
|
|
613
|
-
const suggestion = VALID_DIRECTION_KEYS.find((valid) => key.startsWith(valid));
|
|
614
|
-
const hint = suggestion ? ` Did you mean "${suggestion}"?` : "";
|
|
615
|
-
throw new Error(`Unknown entity filter key "${key}".${hint} Valid keys are: ${validKeysLabel}.`);
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
const directional = entityConfig[operation];
|
|
619
|
-
if (directional && typeof directional === "object") {
|
|
620
|
-
const validFilterLabel = VALID_FILTER_FIELDS.join(", ");
|
|
621
|
-
for (const key of Object.keys(directional)) {
|
|
622
|
-
if (!VALID_FILTER_FIELDS.includes(key)) {
|
|
623
|
-
throw new Error(
|
|
624
|
-
`Unknown key "${key}" in ${operation} filter config. Valid keys are: ${validFilterLabel}.`
|
|
625
|
-
);
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
608
|
for (const field of VALID_FILTER_FIELDS) {
|
|
630
609
|
validateFilterBlock(entityConfig[field], field);
|
|
631
610
|
}
|
|
611
|
+
const directional = entityConfig[operation];
|
|
632
612
|
if (directional && typeof directional === "object") {
|
|
633
613
|
for (const field of VALID_FILTER_FIELDS) {
|
|
634
614
|
validateFilterBlock(directional[field], `${operation}.${field}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/cli",
|
|
3
|
-
"version": "20.57.2-alpha.
|
|
3
|
+
"version": "20.57.2-alpha.25+6cfe36b730",
|
|
4
4
|
"description": "Uniform command line interface tool",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./cli.js",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@inquirer/prompts": "^7.10.1",
|
|
30
30
|
"@thi.ng/mime": "^2.2.23",
|
|
31
|
-
"@uniformdev/assets": "20.57.2-alpha.
|
|
32
|
-
"@uniformdev/canvas": "20.57.2-alpha.
|
|
33
|
-
"@uniformdev/context": "20.57.2-alpha.
|
|
34
|
-
"@uniformdev/files": "20.57.2-alpha.
|
|
35
|
-
"@uniformdev/project-map": "20.57.2-alpha.
|
|
36
|
-
"@uniformdev/redirect": "20.57.2-alpha.
|
|
37
|
-
"@uniformdev/richtext": "20.57.2-alpha.
|
|
31
|
+
"@uniformdev/assets": "20.57.2-alpha.25+6cfe36b730",
|
|
32
|
+
"@uniformdev/canvas": "20.57.2-alpha.25+6cfe36b730",
|
|
33
|
+
"@uniformdev/context": "20.57.2-alpha.25+6cfe36b730",
|
|
34
|
+
"@uniformdev/files": "20.57.2-alpha.25+6cfe36b730",
|
|
35
|
+
"@uniformdev/project-map": "20.57.2-alpha.25+6cfe36b730",
|
|
36
|
+
"@uniformdev/redirect": "20.57.2-alpha.25+6cfe36b730",
|
|
37
|
+
"@uniformdev/richtext": "20.57.2-alpha.25+6cfe36b730",
|
|
38
38
|
"call-bind": "^1.0.2",
|
|
39
39
|
"colorette": "2.0.20",
|
|
40
40
|
"cosmiconfig": "9.0.0",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"publishConfig": {
|
|
82
82
|
"access": "public"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "6cfe36b730e744edc041607347cc10e7a8b1b5ff"
|
|
85
85
|
}
|