trm-core 9.5.0 → 9.5.1
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/changelog.txt
CHANGED
|
@@ -17,7 +17,7 @@ const stopWarning_1 = require("../stopWarning");
|
|
|
17
17
|
exports.generateDevclass = {
|
|
18
18
|
name: 'generate-devclass',
|
|
19
19
|
filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
-
if (context.rawInput.installData.installDevclass.keepOriginal) {
|
|
20
|
+
if (context.rawInput.installData.installDevclass.keepOriginal || context.runtime.isTrmServerRest) {
|
|
21
21
|
trm_commons_1.Logger.log(`Skipping generate devclass devclass (user input)`, true);
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
@@ -61,6 +61,7 @@ exports.init = {
|
|
|
61
61
|
}
|
|
62
62
|
context.runtime = {
|
|
63
63
|
stopWarningShown: context.rawInput.contextData.noStopWarning ? true : false,
|
|
64
|
+
isTrmServerRest: false,
|
|
64
65
|
registry: actualRegistry || registry,
|
|
65
66
|
update: undefined,
|
|
66
67
|
remotePackageData: {
|
|
@@ -106,6 +107,7 @@ exports.init = {
|
|
|
106
107
|
tmsTxtRefresh: []
|
|
107
108
|
}
|
|
108
109
|
};
|
|
110
|
+
context.runtime.isTrmServerRest = (context.runtime.remotePackageData.data.name === systemConnector_1.TRM_SERVER_PACKAGE_NAME || context.runtime.remotePackageData.data.name === systemConnector_1.TRM_REST_PACKAGE_NAME) && context.runtime.registry.getRegistryType() === registry_1.RegistryType.PUBLIC;
|
|
109
111
|
if (context.rawInput.packageData.overwrite === undefined) {
|
|
110
112
|
context.rawInput.packageData.overwrite = false;
|
|
111
113
|
}
|
|
@@ -132,6 +134,9 @@ exports.init = {
|
|
|
132
134
|
if (!context.rawInput.installData.skipPostActivities) {
|
|
133
135
|
context.rawInput.installData.skipPostActivities = false;
|
|
134
136
|
}
|
|
137
|
+
if (context.runtime.isTrmServerRest) {
|
|
138
|
+
context.rawInput.installData.installDevclass.keepOriginal = false;
|
|
139
|
+
}
|
|
135
140
|
if (context.rawInput.installData.installDevclass.keepOriginal === undefined) {
|
|
136
141
|
if (!context.rawInput.contextData.noInquirer) {
|
|
137
142
|
context.rawInput.installData.installDevclass.keepOriginal = (yield trm_commons_1.Inquirer.prompt([{
|
|
@@ -59,7 +59,7 @@ exports.setInstallDevclass = {
|
|
|
59
59
|
var adaptDevclassName = t.devclass;
|
|
60
60
|
const replacement = context.rawInput.installData.installDevclass.replacements.find(o => o.originalDevclass === t.devclass);
|
|
61
61
|
if (updateNamespace) {
|
|
62
|
-
if (!replacement && updateNamespace === '$' &&
|
|
62
|
+
if (!replacement && updateNamespace === '$' && context.runtime.isTrmServerRest) {
|
|
63
63
|
adaptDevclassName = adaptDevclassName.replace(new RegExp(`^/ATRM/SERVER`, 'gmi'), '$TRM');
|
|
64
64
|
adaptDevclassName = adaptDevclassName.replace(new RegExp(`^/ATRM/REST`, 'gmi'), '$TRM_REST');
|
|
65
65
|
}
|
|
@@ -69,7 +69,7 @@ exports.setInstallDevclass = {
|
|
|
69
69
|
}
|
|
70
70
|
const packageExists = yield systemConnector_1.SystemConnector.getDevclass(adaptDevclassName);
|
|
71
71
|
if (!replacement) {
|
|
72
|
-
if (context.rawInput.contextData.noInquirer) {
|
|
72
|
+
if (context.rawInput.contextData.noInquirer || context.runtime.isTrmServerRest) {
|
|
73
73
|
const automaticValue = _validateDevclass(adaptDevclassName, [updateNamespace || originalNamespace, '$', originalNamespace]);
|
|
74
74
|
if (automaticValue === true) {
|
|
75
75
|
context.rawInput.installData.installDevclass.replacements.push({
|