@sap-ux/abap-deploy-config-sub-generator 0.1.4 → 0.1.5
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.
|
@@ -46,5 +46,6 @@ export default class extends DeploymentGenerator {
|
|
|
46
46
|
export { AbapDeployConfigQuestion, AbapDeployConfigAnswersInternal };
|
|
47
47
|
export { getAbapQuestions } from './questions';
|
|
48
48
|
export { indexHtmlExists } from '../utils';
|
|
49
|
-
export { AbapDeployConfigOptions, DeployProjectType
|
|
49
|
+
export { AbapDeployConfigOptions, DeployProjectType } from './types';
|
|
50
|
+
export { AbapDeployConfigPromptOptions } from '@sap-ux/abap-deploy-config-inquirer';
|
|
50
51
|
//# sourceMappingURL=index.d.ts.map
|
package/generators/app/index.js
CHANGED
|
@@ -134,16 +134,21 @@ class default_1 extends deploy_config_generator_shared_1.DeploymentGenerator {
|
|
|
134
134
|
if (!this.launchDeployConfigAsSubGenerator) {
|
|
135
135
|
const appType = await (0, project_access_1.getAppType)(this.destinationPath());
|
|
136
136
|
const isAdp = appType === 'Fiori Adaptation';
|
|
137
|
+
const packageAdditionalValidation = {
|
|
138
|
+
shouldValidatePackageForStartingPrefix: isAdp,
|
|
139
|
+
shouldValidatePackageType: isAdp,
|
|
140
|
+
shouldValidateFormatAndSpecialCharacters: isAdp
|
|
141
|
+
};
|
|
137
142
|
const promptOptions = {
|
|
138
143
|
ui5AbapRepo: { hideIfOnPremise: isAdp },
|
|
139
144
|
transportInputChoice: { hideIfOnPremise: isAdp },
|
|
140
145
|
packageAutocomplete: {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
146
|
+
additionalValidation: packageAdditionalValidation
|
|
147
|
+
},
|
|
148
|
+
packageManual: {
|
|
149
|
+
additionalValidation: packageAdditionalValidation
|
|
144
150
|
},
|
|
145
|
-
|
|
146
|
-
targetSystem: { shouldRestrictDifferentSystemType: isAdp }
|
|
151
|
+
targetSystem: { additionalValidation: { shouldRestrictDifferentSystemType: isAdp } }
|
|
147
152
|
};
|
|
148
153
|
const indexGenerationAllowed = this.indexGenerationAllowed && !isAdp;
|
|
149
154
|
const { prompts: abapDeployConfigPrompts, answers: abapAnswers = {} } = await (0, questions_1.getAbapQuestions)({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { DeployProjectType } from './types';
|
|
1
2
|
import type { ILogWrapper } from '@sap-ux/fiori-generator-shared';
|
|
2
|
-
import type { AbapDeployConfigAnswersInternal, AbapDeployConfigQuestion } from '@sap-ux/abap-deploy-config-inquirer';
|
|
3
|
+
import type { AbapDeployConfigAnswersInternal, AbapDeployConfigPromptOptions, AbapDeployConfigQuestion } from '@sap-ux/abap-deploy-config-inquirer';
|
|
3
4
|
import type { FioriToolsProxyConfigBackend } from '@sap-ux/ui5-config';
|
|
4
5
|
import type { ConnectedSystem } from '@sap-ux/deploy-config-generator-shared';
|
|
5
|
-
import { DeployProjectType, type AbapDeployConfigPromptOptions } from './types';
|
|
6
6
|
/**
|
|
7
7
|
* Retrieves the ABAP prompt questions from the inquirer.
|
|
8
8
|
*
|
|
@@ -92,34 +92,22 @@ async function getAbapQuestions({ appRootPath, connectedSystem, backendConfig, c
|
|
|
92
92
|
},
|
|
93
93
|
ui5AbapRepo: {
|
|
94
94
|
default: deployAppConfig?.name,
|
|
95
|
-
|
|
95
|
+
...promptOptions?.ui5AbapRepo
|
|
96
96
|
},
|
|
97
97
|
description: { default: deployAppConfig?.description },
|
|
98
98
|
packageManual: {
|
|
99
|
-
default: deployAppConfig?.package,
|
|
100
|
-
|
|
101
|
-
shouldValidatePackageType: promptOptions?.packageAutocomplete?.shouldValidatePackageType ?? false,
|
|
102
|
-
shouldValidatePackageForStartingPrefix: promptOptions?.packageAutocomplete?.shouldValidatePackageForStartingPrefix ?? false,
|
|
103
|
-
shouldValidateFormatAndSpecialCharacters: promptOptions?.packageAutocomplete?.shouldValidateFormatAndSpecialCharacters ?? false
|
|
104
|
-
}
|
|
99
|
+
default: deployAppConfig?.package ?? promptOptions?.packageManual?.default,
|
|
100
|
+
...promptOptions?.packageManual
|
|
105
101
|
},
|
|
106
102
|
transportManual: { default: deployAppConfig?.transport },
|
|
107
103
|
index: { indexGenerationAllowed },
|
|
108
104
|
packageAutocomplete: {
|
|
109
105
|
useAutocomplete: true,
|
|
110
|
-
|
|
111
|
-
shouldValidatePackageType: promptOptions?.packageAutocomplete?.shouldValidatePackageType ?? false,
|
|
112
|
-
shouldValidatePackageForStartingPrefix: promptOptions?.packageAutocomplete?.shouldValidatePackageForStartingPrefix ?? false,
|
|
113
|
-
shouldValidateFormatAndSpecialCharacters: promptOptions?.packageAutocomplete?.shouldValidateFormatAndSpecialCharacters ?? false
|
|
114
|
-
}
|
|
106
|
+
...promptOptions?.packageAutocomplete
|
|
115
107
|
},
|
|
116
108
|
overwrite: { hide: !showOverwriteQuestion },
|
|
117
109
|
transportInputChoice: { hideIfOnPremise: promptOptions?.transportInputChoice?.hideIfOnPremise ?? false },
|
|
118
|
-
targetSystem:
|
|
119
|
-
additionalValidation: {
|
|
120
|
-
shouldRestrictDifferentSystemType: promptOptions?.targetSystem?.shouldRestrictDifferentSystemType ?? false
|
|
121
|
-
}
|
|
122
|
-
}
|
|
110
|
+
targetSystem: promptOptions?.targetSystem
|
|
123
111
|
}, logger, (0, fiori_generator_shared_1.getHostEnvironment)() !== fiori_generator_shared_1.hostEnvironment.cli);
|
|
124
112
|
}
|
|
125
113
|
//# sourceMappingURL=questions.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AbapDeployConfigAnswersInternal } from '@sap-ux/abap-deploy-config-inquirer';
|
|
1
|
+
import type { AbapDeployConfigAnswersInternal, AbapDeployConfigPromptOptions } from '@sap-ux/abap-deploy-config-inquirer';
|
|
2
2
|
import type { AppWizard } from '@sap-devx/yeoman-ui-types';
|
|
3
3
|
import type { ConnectedSystem } from '@sap-ux/deploy-config-generator-shared';
|
|
4
4
|
import type { TelemetryData } from '@sap-ux/fiori-generator-shared';
|
|
@@ -47,32 +47,13 @@ export interface AbapDeployConfigOptions extends AbapDeployConfigAnswersInternal
|
|
|
47
47
|
* Telemetry data to be send after deployment configuration has been added
|
|
48
48
|
*/
|
|
49
49
|
telemetryData?: TelemetryData;
|
|
50
|
+
/**
|
|
51
|
+
* Prompts options for the ABAP deploy config inquirer
|
|
52
|
+
*/
|
|
53
|
+
promptOptions?: AbapDeployConfigPromptOptions;
|
|
50
54
|
}
|
|
51
55
|
export declare enum DeployProjectType {
|
|
52
56
|
Application = "application",
|
|
53
57
|
Library = "library"
|
|
54
58
|
}
|
|
55
|
-
/**
|
|
56
|
-
* Enum defining prompt names for ABAP deployment configuration.
|
|
57
|
-
*/
|
|
58
|
-
declare enum promptNames {
|
|
59
|
-
ui5AbapRepo = "ui5AbapRepo",
|
|
60
|
-
packageManual = "packageManual",
|
|
61
|
-
packageAutocomplete = "packageAutocomplete",
|
|
62
|
-
transportInputChoice = "transportInputChoice",
|
|
63
|
-
targetSystem = "targetSystem"
|
|
64
|
-
}
|
|
65
|
-
type HideIfOnPremisePromptOption = {
|
|
66
|
-
hideIfOnPremise?: boolean;
|
|
67
|
-
};
|
|
68
|
-
type TargetSystemPromptOptions = {
|
|
69
|
-
shouldRestrictDifferentSystemType: boolean;
|
|
70
|
-
};
|
|
71
|
-
type PackageAdditionalValidationPrompOptions = {
|
|
72
|
-
shouldValidatePackageType?: boolean;
|
|
73
|
-
shouldValidatePackageForStartingPrefix?: boolean;
|
|
74
|
-
shouldValidateFormatAndSpecialCharacters?: boolean;
|
|
75
|
-
};
|
|
76
|
-
export type AbapDeployConfigPromptOptions = Partial<Record<promptNames.ui5AbapRepo, HideIfOnPremisePromptOption> & Record<promptNames.transportInputChoice, HideIfOnPremisePromptOption> & Record<promptNames.packageManual, PackageAdditionalValidationPrompOptions> & Record<promptNames.packageAutocomplete, PackageAdditionalValidationPrompOptions> & Record<promptNames.targetSystem, TargetSystemPromptOptions>>;
|
|
77
|
-
export {};
|
|
78
59
|
//# sourceMappingURL=types.d.ts.map
|
package/generators/app/types.js
CHANGED
|
@@ -6,15 +6,4 @@ var DeployProjectType;
|
|
|
6
6
|
DeployProjectType["Application"] = "application";
|
|
7
7
|
DeployProjectType["Library"] = "library";
|
|
8
8
|
})(DeployProjectType || (exports.DeployProjectType = DeployProjectType = {}));
|
|
9
|
-
/**
|
|
10
|
-
* Enum defining prompt names for ABAP deployment configuration.
|
|
11
|
-
*/
|
|
12
|
-
var promptNames;
|
|
13
|
-
(function (promptNames) {
|
|
14
|
-
promptNames["ui5AbapRepo"] = "ui5AbapRepo";
|
|
15
|
-
promptNames["packageManual"] = "packageManual";
|
|
16
|
-
promptNames["packageAutocomplete"] = "packageAutocomplete";
|
|
17
|
-
promptNames["transportInputChoice"] = "transportInputChoice";
|
|
18
|
-
promptNames["targetSystem"] = "targetSystem";
|
|
19
|
-
})(promptNames || (promptNames = {}));
|
|
20
9
|
//# sourceMappingURL=types.js.map
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
7
7
|
"directory": "packages/abap-deploy-config-sub-generator"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.5",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "generators/app/index.js",
|
|
12
12
|
"files": [
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"i18next": "23.5.1",
|
|
23
23
|
"@sap-devx/yeoman-ui-types": "1.14.4",
|
|
24
|
-
"@sap-ux/abap-deploy-config-inquirer": "1.4.
|
|
24
|
+
"@sap-ux/abap-deploy-config-inquirer": "1.4.5",
|
|
25
25
|
"@sap-ux/abap-deploy-config-writer": "0.1.2",
|
|
26
26
|
"@sap-ux/btp-utils": "1.1.0",
|
|
27
27
|
"@sap-ux/deploy-config-generator-shared": "0.1.2",
|