@celonis/content-cli 0.3.0 → 0.3.2
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/package.json
CHANGED
|
@@ -66,15 +66,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
66
66
|
}
|
|
67
67
|
getPackagesDependenciesByPackageId(nodeIds, draftIdByNodeId) {
|
|
68
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
const
|
|
69
|
+
const dependenciesByPackageId = new Map();
|
|
70
70
|
const packageWithDependencies = yield this.getPackagesWithDependencies(nodeIds, draftIdByNodeId);
|
|
71
71
|
packageWithDependencies.forEach(packageWithDependency => {
|
|
72
72
|
var _a;
|
|
73
|
-
const dependenciesOfPackage = (_a =
|
|
73
|
+
const dependenciesOfPackage = (_a = dependenciesByPackageId.get(packageWithDependency.rootNodeId)) !== null && _a !== void 0 ? _a : [];
|
|
74
74
|
dependenciesOfPackage.push(packageWithDependency);
|
|
75
|
-
|
|
75
|
+
dependenciesByPackageId.set(packageWithDependency === null || packageWithDependency === void 0 ? void 0 : packageWithDependency.rootNodeId, dependenciesOfPackage);
|
|
76
76
|
});
|
|
77
|
-
return
|
|
77
|
+
return dependenciesByPackageId;
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
getVersionOfPackages(nodes) {
|
|
@@ -93,7 +93,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
93
93
|
return __awaiter(this, void 0, void 0, function* () {
|
|
94
94
|
const promises = [];
|
|
95
95
|
nodeIds.forEach((nodeId) => __awaiter(this, void 0, void 0, function* () { return promises.push(package_dependencies_api_1.packageDependenciesApi.findDependenciesOfPackage(nodeId, draftIdByNodeId.get(nodeId))); }));
|
|
96
|
-
|
|
96
|
+
const results = yield Promise.all(promises);
|
|
97
|
+
const dependencies = [];
|
|
98
|
+
results.forEach(result => dependencies.push(...result));
|
|
99
|
+
return dependencies;
|
|
97
100
|
});
|
|
98
101
|
}
|
|
99
102
|
exportListOfPackages(nodes, fieldsToInclude) {
|