@prismatic-io/spectral 9.0.2 → 9.0.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.
|
@@ -17,6 +17,7 @@ const path_1 = __importDefault(require("path"));
|
|
|
17
17
|
const helpers_1 = require("./helpers");
|
|
18
18
|
const createTemplate_1 = require("../utils/createTemplate");
|
|
19
19
|
const createStaticFiles = (_a) => __awaiter(void 0, [_a], void 0, function* ({ component, dryRun, signature, packageName, dependencies, verbose, sourceDir, destinationDir, registry, }) {
|
|
20
|
+
var _b, _c, _d, _e;
|
|
20
21
|
if (verbose) {
|
|
21
22
|
console.info("Creating static files...");
|
|
22
23
|
}
|
|
@@ -52,22 +53,22 @@ const createStaticFiles = (_a) => __awaiter(void 0, [_a], void 0, function* ({ c
|
|
|
52
53
|
label: component.display.label,
|
|
53
54
|
description: component.display.description,
|
|
54
55
|
isPublic: Boolean(component.public),
|
|
55
|
-
action: Object.keys(component.actions).length
|
|
56
|
+
action: Object.keys((_b = component.actions) !== null && _b !== void 0 ? _b : {}).length
|
|
56
57
|
? {
|
|
57
58
|
key: Object.keys(component.actions)[0],
|
|
58
59
|
}
|
|
59
60
|
: null,
|
|
60
|
-
trigger: Object.keys(component.triggers).length
|
|
61
|
+
trigger: Object.keys((_c = component.triggers) !== null && _c !== void 0 ? _c : {}).length
|
|
61
62
|
? {
|
|
62
63
|
key: Object.keys(component.triggers)[0],
|
|
63
64
|
}
|
|
64
65
|
: null,
|
|
65
|
-
connection: component.connections.length
|
|
66
|
+
connection: ((_d = component.connections) !== null && _d !== void 0 ? _d : []).length
|
|
66
67
|
? {
|
|
67
68
|
key: component.connections[0].key,
|
|
68
69
|
}
|
|
69
70
|
: null,
|
|
70
|
-
dataSource: Object.keys(component.dataSources).length
|
|
71
|
+
dataSource: Object.keys((_e = component.dataSources) !== null && _e !== void 0 ? _e : {}).length
|
|
71
72
|
? {
|
|
72
73
|
key: Object.keys(component.dataSources)[0],
|
|
73
74
|
type: component.dataSources[Object.keys(component.dataSources)[0]].dataSourceType,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prismatic-io/spectral",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.3",
|
|
4
4
|
"description": "Utility library for building Prismatic components",
|
|
5
5
|
"keywords": ["prismatic"],
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"jest-mock": "29.7.0",
|
|
49
49
|
"lodash": "4.17.21",
|
|
50
50
|
"object-sizeof": "^2.6.4",
|
|
51
|
+
"prettier": "2.6.2",
|
|
51
52
|
"safe-stable-stringify": "2.3.1",
|
|
52
53
|
"serialize-error": "8.1.0",
|
|
53
54
|
"url-join": "5.0.0",
|