@prismatic-io/spectral 10.3.7 → 10.3.9
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.
|
@@ -76,6 +76,11 @@ const runMain = (process) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
76
76
|
}),
|
|
77
77
|
description: "This skips the signature verification process, always returning a component signature in the component manifest.",
|
|
78
78
|
},
|
|
79
|
+
version: {
|
|
80
|
+
flag: ["--version"],
|
|
81
|
+
value: (0, getFlagBooleanValue_1.getFlagsBooleanValue)({ args, flags: ["--version"] }),
|
|
82
|
+
description: "Display the version of @prismatic-io/spectral this component manifest generator uses.",
|
|
83
|
+
},
|
|
79
84
|
help: {
|
|
80
85
|
flag: ["--help", "-h"],
|
|
81
86
|
value: (0, getFlagBooleanValue_1.getFlagsBooleanValue)({
|
|
@@ -85,6 +90,11 @@ const runMain = (process) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
85
90
|
description: "Show this help message.",
|
|
86
91
|
},
|
|
87
92
|
};
|
|
93
|
+
if (flags.version.value) {
|
|
94
|
+
const { version } = require("../../../package.json");
|
|
95
|
+
console.log(version);
|
|
96
|
+
process.exit(0);
|
|
97
|
+
}
|
|
88
98
|
if (flags.help.value) {
|
|
89
99
|
(0, createFlagHelpText_1.createFlagHelpText)({
|
|
90
100
|
command: "component-manifest",
|
|
@@ -87,8 +87,8 @@ const getInputValueType = (input) => {
|
|
|
87
87
|
}
|
|
88
88
|
if (input.collection === "valuelist") {
|
|
89
89
|
return typeof valueType === "string"
|
|
90
|
-
?
|
|
91
|
-
: Object.assign(Object.assign({}, valueType), { type:
|
|
90
|
+
? `Array<${valueType}>`
|
|
91
|
+
: Object.assign(Object.assign({}, valueType), { type: `Array<${valueType.type}>` });
|
|
92
92
|
}
|
|
93
93
|
return valueType;
|
|
94
94
|
};
|
|
@@ -193,7 +193,9 @@ const convertComponentReference = (componentReference, componentRegistry, refere
|
|
|
193
193
|
type: "value",
|
|
194
194
|
value: JSON.stringify(v),
|
|
195
195
|
}))
|
|
196
|
-
: value.value
|
|
196
|
+
: manifestEntryInput.collection === "valuelist" && Array.isArray(value.value)
|
|
197
|
+
? value.value.map((v) => ({ type: "value", value: v }))
|
|
198
|
+
: value.value;
|
|
197
199
|
const formattedValue = type === "complex" || typeof valueExpr === "string"
|
|
198
200
|
? valueExpr
|
|
199
201
|
: JSON.stringify(valueExpr);
|