@prismatic-io/spectral 9.0.0-rc.1 → 9.0.0-rc.3
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.
|
@@ -12,15 +12,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.getComponentSignatureWithPrism = void 0;
|
|
13
13
|
const child_process_1 = require("child_process");
|
|
14
14
|
const util_1 = require("util");
|
|
15
|
-
const
|
|
15
|
+
const exec = (0, util_1.promisify)(child_process_1.exec);
|
|
16
16
|
const getComponentSignatureWithPrism = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
17
|
if (!(yield isPrismAvailable())) {
|
|
18
18
|
console.log("Prism must be installed");
|
|
19
19
|
process.exit(1);
|
|
20
20
|
}
|
|
21
|
-
const { stdout: signatureKey } = yield
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
const { stdout: signatureKey } = yield exec("prism components:signature", {
|
|
22
|
+
windowsHide: true,
|
|
23
|
+
});
|
|
24
24
|
if (!signatureKey) {
|
|
25
25
|
console.log("Failed to get component signature. Please verify your Component has been published.");
|
|
26
26
|
process.exit(1);
|
|
@@ -30,7 +30,9 @@ const getComponentSignatureWithPrism = () => __awaiter(void 0, void 0, void 0, f
|
|
|
30
30
|
exports.getComponentSignatureWithPrism = getComponentSignatureWithPrism;
|
|
31
31
|
const isPrismAvailable = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
32
32
|
try {
|
|
33
|
-
yield
|
|
33
|
+
yield exec("prism --version", {
|
|
34
|
+
windowsHide: true,
|
|
35
|
+
});
|
|
34
36
|
}
|
|
35
37
|
catch (_a) {
|
|
36
38
|
return false;
|