@celonis/content-cli 0.5.1 → 0.5.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.
package/content-cli-import.js
CHANGED
|
@@ -31,7 +31,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31
31
|
.option("-p, --profile <profile>", "Profile which you want to use to list packages")
|
|
32
32
|
.option("--spaceMappings <spaceMappings...>", "List of mappings for importing packages to different target spaces. Mappings should follow format 'packageKey:targetSpaceKey'")
|
|
33
33
|
.option("--overwrite", "Flag to allow overwriting of packages")
|
|
34
|
-
.option("--dataModelMappingsFile <dataModelMappingsFile>", "DataModel variable mappings file path")
|
|
34
|
+
.option("--dataModelMappingsFile <dataModelMappingsFile>", "DataModel variable mappings file path. If missing, variables will be mapped from manifest file.")
|
|
35
35
|
.requiredOption("-f, --file <file>", "Exported packages file (relative path)")
|
|
36
36
|
.action((cmd) => __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
yield new package_command_1.PackageCommand().batchImportPackages(cmd.spaceMappings, cmd.dataModelMappingsFile, cmd.file, cmd.overwrite);
|
package/lib/util/tracing.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -173,13 +173,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
173
173
|
}
|
|
174
174
|
nodeInTargetTeam = yield node_api_1.nodeApi.findOneByKeyAndRootNodeKey(packageToImport.packageKey, packageToImport.packageKey);
|
|
175
175
|
if (this.isLatestVersion(versionOfPackageBeingImported, [...packageToImport.dependenciesByVersion.keys()])) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
176
|
+
if (dmTargetIdsBySourceIds.size > 0) {
|
|
177
|
+
const variableAssignments = packageToImport.variables
|
|
178
|
+
.filter(variable => variable.type === package_manager_interfaces_1.PackageManagerVariableType.DATA_MODEL).map(variable => {
|
|
179
|
+
var _a;
|
|
180
|
+
variable.value = dmTargetIdsBySourceIds.get((_a = variable.value) === null || _a === void 0 ? void 0 : _a.toString());
|
|
181
|
+
return variable;
|
|
182
|
+
});
|
|
183
|
+
yield variable_service_1.variableService.assignVariableValues(nodeInTargetTeam.key, variableAssignments);
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
yield variable_service_1.variableService.assignVariableValues(nodeInTargetTeam.key, packageToImport.variables);
|
|
187
|
+
}
|
|
183
188
|
}
|
|
184
189
|
draftIdsByPackageKeyAndVersion.set(`${nodeInTargetTeam.key}_${versionOfPackageBeingImported}`, nodeInTargetTeam.workingDraftId);
|
|
185
190
|
yield this.updateDependencyVersions(packageToImport, versionOfPackageBeingImported, sourceToTargetVersionsByNodeKey, draftIdsByPackageKeyAndVersion);
|
package/util/tracing.js
CHANGED
|
@@ -14,12 +14,16 @@
|
|
|
14
14
|
static getTracingHeaders() {
|
|
15
15
|
return {
|
|
16
16
|
"x-datadog-trace-id": this.getTraceId(),
|
|
17
|
+
"x-datadog-parent-id": this.getParentTraceId(),
|
|
17
18
|
"x-datadog-sampling-priority": "1",
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
21
|
static getTraceId() {
|
|
21
22
|
return process.env.TRACE_ID || this.generateId();
|
|
22
23
|
}
|
|
24
|
+
static getParentTraceId() {
|
|
25
|
+
return process.env.PARENT_TRACE_ID || this.generateId();
|
|
26
|
+
}
|
|
23
27
|
static generateId() {
|
|
24
28
|
return crypto.randomBytes(8).toString("hex");
|
|
25
29
|
}
|