@sap-ux/abap-deploy-config-inquirer 0.0.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/LICENSE +201 -0
- package/README.md +93 -0
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +7 -0
- package/dist/constants.js.map +1 -0
- package/dist/error-handler.d.ts +13 -0
- package/dist/error-handler.d.ts.map +1 -0
- package/dist/error-handler.js +33 -0
- package/dist/error-handler.js.map +1 -0
- package/dist/i18n.d.ts +14 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +34 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +52 -0
- package/dist/index.js.map +1 -0
- package/dist/logger-helper.d.ts +20 -0
- package/dist/logger-helper.d.ts.map +1 -0
- package/dist/logger-helper.js +27 -0
- package/dist/logger-helper.js.map +1 -0
- package/dist/prompts/conditions.d.ts +117 -0
- package/dist/prompts/conditions.d.ts.map +1 -0
- package/dist/prompts/conditions.js +299 -0
- package/dist/prompts/conditions.js.map +1 -0
- package/dist/prompts/defaults.d.ts +45 -0
- package/dist/prompts/defaults.d.ts.map +1 -0
- package/dist/prompts/defaults.js +91 -0
- package/dist/prompts/defaults.js.map +1 -0
- package/dist/prompts/helpers.d.ts +54 -0
- package/dist/prompts/helpers.d.ts.map +1 -0
- package/dist/prompts/helpers.js +234 -0
- package/dist/prompts/helpers.js.map +1 -0
- package/dist/prompts/index.d.ts +9 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +30 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/prompt-state.d.ts +38 -0
- package/dist/prompts/prompt-state.d.ts.map +1 -0
- package/dist/prompts/prompt-state.js +59 -0
- package/dist/prompts/prompt-state.js.map +1 -0
- package/dist/prompts/questions/abap-target.d.ts +10 -0
- package/dist/prompts/questions/abap-target.d.ts.map +1 -0
- package/dist/prompts/questions/abap-target.js +219 -0
- package/dist/prompts/questions/abap-target.js.map +1 -0
- package/dist/prompts/questions/auth.d.ts +10 -0
- package/dist/prompts/questions/auth.d.ts.map +1 -0
- package/dist/prompts/questions/auth.js +55 -0
- package/dist/prompts/questions/auth.js.map +1 -0
- package/dist/prompts/questions/config/app.d.ts +10 -0
- package/dist/prompts/questions/config/app.d.ts.map +1 -0
- package/dist/prompts/questions/config/app.js +68 -0
- package/dist/prompts/questions/config/app.js.map +1 -0
- package/dist/prompts/questions/config/index.d.ts +4 -0
- package/dist/prompts/questions/config/index.d.ts.map +1 -0
- package/dist/prompts/questions/config/index.js +20 -0
- package/dist/prompts/questions/config/index.js.map +1 -0
- package/dist/prompts/questions/config/package.d.ts +10 -0
- package/dist/prompts/questions/config/package.d.ts.map +1 -0
- package/dist/prompts/questions/config/package.js +91 -0
- package/dist/prompts/questions/config/package.js.map +1 -0
- package/dist/prompts/questions/config/transport.d.ts +10 -0
- package/dist/prompts/questions/config/transport.d.ts.map +1 -0
- package/dist/prompts/questions/config/transport.js +91 -0
- package/dist/prompts/questions/config/transport.js.map +1 -0
- package/dist/prompts/questions/confirm.d.ts +10 -0
- package/dist/prompts/questions/confirm.d.ts.map +1 -0
- package/dist/prompts/questions/confirm.js +55 -0
- package/dist/prompts/questions/confirm.js.map +1 -0
- package/dist/prompts/questions/index.d.ts +5 -0
- package/dist/prompts/questions/index.d.ts.map +1 -0
- package/dist/prompts/questions/index.js +21 -0
- package/dist/prompts/questions/index.js.map +1 -0
- package/dist/prompts/validators.d.ts +138 -0
- package/dist/prompts/validators.d.ts.map +1 -0
- package/dist/prompts/validators.js +459 -0
- package/dist/prompts/validators.js.map +1 -0
- package/dist/service-provider-utils/abap-service-provider.d.ts +19 -0
- package/dist/service-provider-utils/abap-service-provider.d.ts.map +1 -0
- package/dist/service-provider-utils/abap-service-provider.js +89 -0
- package/dist/service-provider-utils/abap-service-provider.js.map +1 -0
- package/dist/service-provider-utils/create-transport.d.ts +12 -0
- package/dist/service-provider-utils/create-transport.d.ts.map +1 -0
- package/dist/service-provider-utils/create-transport.js +35 -0
- package/dist/service-provider-utils/create-transport.js.map +1 -0
- package/dist/service-provider-utils/index.d.ts +6 -0
- package/dist/service-provider-utils/index.d.ts.map +1 -0
- package/dist/service-provider-utils/index.js +22 -0
- package/dist/service-provider-utils/index.js.map +1 -0
- package/dist/service-provider-utils/list-packages.d.ts +11 -0
- package/dist/service-provider-utils/list-packages.d.ts.map +1 -0
- package/dist/service-provider-utils/list-packages.js +37 -0
- package/dist/service-provider-utils/list-packages.js.map +1 -0
- package/dist/service-provider-utils/transport-config.d.ts +18 -0
- package/dist/service-provider-utils/transport-config.d.ts.map +1 -0
- package/dist/service-provider-utils/transport-config.js +211 -0
- package/dist/service-provider-utils/transport-config.js.map +1 -0
- package/dist/service-provider-utils/transport-list.d.ts +16 -0
- package/dist/service-provider-utils/transport-list.d.ts.map +1 -0
- package/dist/service-provider-utils/transport-list.js +56 -0
- package/dist/service-provider-utils/transport-list.js.map +1 -0
- package/dist/translations/abap-deploy-config-inquirer.i18n.json +146 -0
- package/dist/types.d.ts +165 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +46 -0
- package/dist/types.js.map +1 -0
- package/dist/utils.d.ts +90 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +233 -0
- package/dist/utils.js.map +1 -0
- package/dist/validator-utils.d.ts +75 -0
- package/dist/validator-utils.d.ts.map +1 -0
- package/dist/validator-utils.js +172 -0
- package/dist/validator-utils.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"prompts": {
|
|
3
|
+
"target": {
|
|
4
|
+
"destination": {
|
|
5
|
+
"message": "Destination"
|
|
6
|
+
},
|
|
7
|
+
"targetSystem": {
|
|
8
|
+
"message": "Select Target system",
|
|
9
|
+
"breadcrumb": "Target System"
|
|
10
|
+
},
|
|
11
|
+
"url": {
|
|
12
|
+
"message": "Target System URL"
|
|
13
|
+
},
|
|
14
|
+
"scp": {
|
|
15
|
+
"message": "Is this an SAP Business Technology Platform system?",
|
|
16
|
+
"breadcrumb": "SCP"
|
|
17
|
+
},
|
|
18
|
+
"clientChoice": {
|
|
19
|
+
"message": "Client"
|
|
20
|
+
},
|
|
21
|
+
"client": {
|
|
22
|
+
"message": "Enter client",
|
|
23
|
+
"breadcrumb": "Client"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"auth": {
|
|
27
|
+
"username": {
|
|
28
|
+
"message": "Username: "
|
|
29
|
+
},
|
|
30
|
+
"password": {
|
|
31
|
+
"message": "Password: "
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"config": {
|
|
35
|
+
"app": {
|
|
36
|
+
"ui5AbapRepo": {
|
|
37
|
+
"message": "SAPUI5 ABAP Repository",
|
|
38
|
+
"messageMaxLength": "SAPUI5 ABAP Repository (Maximum length: 15 characters, should start with {{ applicationPrefix }})",
|
|
39
|
+
"hint": "Enter the name for the deployed application. The name must follow the rules of creating a BSP application. It must not exceed 15 characters and must consist of alphanumeric characters or underscores only. Name should be unique in the BSP repository and its namespace is compatible with the selected package."
|
|
40
|
+
},
|
|
41
|
+
"description": {
|
|
42
|
+
"message": "Deployment Description",
|
|
43
|
+
"hint": "The description of the deployed application."
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"package": {
|
|
47
|
+
"packageInputChoice": {
|
|
48
|
+
"message": "How do you want to enter the package?"
|
|
49
|
+
},
|
|
50
|
+
"packageManual": {
|
|
51
|
+
"message": "Package",
|
|
52
|
+
"hint": "Provide a package for the deployed application."
|
|
53
|
+
},
|
|
54
|
+
"packageAutocomplete": {
|
|
55
|
+
"message": "Package",
|
|
56
|
+
"messageTypeFilter": " (Type to filter matching records)",
|
|
57
|
+
"hint": "Select a package for the deployed application.",
|
|
58
|
+
"sourceMessage": "More than {{numResults}} results, keep typing to narrow down"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"transport": {
|
|
62
|
+
"common": {
|
|
63
|
+
"transportRequest": "Transport Request",
|
|
64
|
+
"transportRequestMandatory": "Transport Request (mandatory)",
|
|
65
|
+
"provideTransportRequest": "Provide a transport request for your application"
|
|
66
|
+
},
|
|
67
|
+
"transportInputChoice": {
|
|
68
|
+
"message": "How do you want to enter the transport request?"
|
|
69
|
+
},
|
|
70
|
+
"transportCreated": {
|
|
71
|
+
"message": "Created new Transport Request"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"confirm": {
|
|
76
|
+
"index": {
|
|
77
|
+
"message": "Generate standalone index.html during deployment",
|
|
78
|
+
"breadcrumb": "Generate index.html"
|
|
79
|
+
},
|
|
80
|
+
"overwrite": {
|
|
81
|
+
"message": "Editing the deployment configuration will overwrite existing configuration, are you sure you want to continue?",
|
|
82
|
+
"hint": "Deployment config will abort if you choose no. Click Finish to abort."
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"choices": {
|
|
87
|
+
"common": {
|
|
88
|
+
"listExisting": "Choose from existing"
|
|
89
|
+
},
|
|
90
|
+
"targetSystemUrl": "Enter Target System URL",
|
|
91
|
+
"clientChoice": {
|
|
92
|
+
"existing": "Use project defined client {{client}}",
|
|
93
|
+
"new": "Enter client",
|
|
94
|
+
"blank": "Use default system client"
|
|
95
|
+
},
|
|
96
|
+
"transport": {
|
|
97
|
+
"createDuringDeploy": "Create during deployment",
|
|
98
|
+
"createNew": "Create new",
|
|
99
|
+
"enterManually": "Enter manually"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"info": {
|
|
103
|
+
"correctCredentials": "Correct credentials"
|
|
104
|
+
},
|
|
105
|
+
"warnings": {
|
|
106
|
+
"packageNotFound": "Package list cannot be fetched. Please enter the Package manually.",
|
|
107
|
+
"providePackage": "Provide a package",
|
|
108
|
+
"transportConfigFailure": "Cannot get transport configuration from the backend. You can still proceed with deployment configuration by manually providing the package and transport request needed. \nFor more information on this error, please see Guided Answers {{helpLink}}",
|
|
109
|
+
"noTransportReqs": "There are no Transport Requests for the supplied package. You can choose to create a new one now or during deployment",
|
|
110
|
+
"noExistingTransportReqList": "Transport Request list cannot be fetched. Please enter Transport Request manually.",
|
|
111
|
+
"virtualHost": "The destination is using a virtual host, you will need to replace the host in the URL with the internal host that is configured with your SAP Cloud Connector when viewing your deployed application."
|
|
112
|
+
},
|
|
113
|
+
"errors": {
|
|
114
|
+
"abapSystemChoices": "Failed to get ABAP system choices",
|
|
115
|
+
"targetNotDeployable": "{{systemError}} To continue with project generation choose a different deployment target or skip adding deploy config.",
|
|
116
|
+
"cannotReadCapServiceMetadata": "An error occurred reading CAP service metadata: {{serviceName}}. See log for more details.",
|
|
117
|
+
"invalidUrl": "Invalid URL: [{{url}}]",
|
|
118
|
+
"invalidClient": "[{{client}}] is invalid. Enter blank or a value between 000-999",
|
|
119
|
+
"debugAbapTargetSystem": "Error while getting ABAP target system during {{method}}, error {{error}}",
|
|
120
|
+
"s4SystemNoExtensible": "S4 system not configured as Extensibility Development system. Cannot deploy to it.",
|
|
121
|
+
"incorrectAtoSettings": "Incorrect ATO settings. Package or prefix settings mising.",
|
|
122
|
+
"incorrectCredentials": "Incorrect credentials. Try again",
|
|
123
|
+
"atoUnauthorisedSystem": "Authentication required to access the ATO Service",
|
|
124
|
+
"createTransportReqFailed": "Create new Transport Request failed. Please enter Transport Request manually.",
|
|
125
|
+
"requireCredentials": "Please provide credentials to authenticate with backend system",
|
|
126
|
+
"validators": {
|
|
127
|
+
"appNameRequired": "Application name required",
|
|
128
|
+
"appNameInvalid": "Application name invalid",
|
|
129
|
+
"appNameInvalidLength": "Application name limited to 15 characters, entered {{length}}",
|
|
130
|
+
"appNameInvalidPrefix": "Application name needs to be prefixed with [{{prefix}}]",
|
|
131
|
+
"abapAppDescLength": "Deployment Description should not exceed 60 characters",
|
|
132
|
+
"abapTransportNumRequired": "Provide a transport request for your application",
|
|
133
|
+
"abapPackageWarn": "Provide a package",
|
|
134
|
+
"abapInvalidNamespace": "Namespace invalid as there are too many forward slashes",
|
|
135
|
+
"abapInvalidNamespaceLength": "Namespace limited to 10 characters, entered {{length}}",
|
|
136
|
+
"abapInvalidAppNameLength": "Application name limited to 15 characters, entered {{length}}",
|
|
137
|
+
"abapInvalidAppName": "Application name needs to be prefixed with [{{prefix}}]",
|
|
138
|
+
"charactersForbiddenInAppName": "Only alphanumeric, underscore and slash characters are allowed",
|
|
139
|
+
"invalidNamespaceLength": "Namespace limited to 10 characters, entered {{length}}",
|
|
140
|
+
"invalidNamespace": "Namespace invalid as there are too many forward slashes",
|
|
141
|
+
"forbiddenCharacters": "Only alphanumeric, underscore and slash characters are allowed",
|
|
142
|
+
"descriptionLength": "Deployment Description should not exceed 60 characters",
|
|
143
|
+
"transportListPreReqs": "Name (SAPUI5 ABAP Repository) and Package are required to retrieve the existing Transport Requests"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { AbapTarget } from '@sap-ux/system-access';
|
|
2
|
+
import type { ServiceProvider } from '@sap-ux/axios-extension';
|
|
3
|
+
import type { YUIQuestion } from '@sap-ux/inquirer-common';
|
|
4
|
+
export declare const enum TargetSystemType {
|
|
5
|
+
Url = "Url"
|
|
6
|
+
}
|
|
7
|
+
export declare const enum ClientChoiceValue {
|
|
8
|
+
Base = "base",
|
|
9
|
+
New = "new",
|
|
10
|
+
Blank = "blank"
|
|
11
|
+
}
|
|
12
|
+
export interface Credentials {
|
|
13
|
+
username?: string;
|
|
14
|
+
password?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface BackendTarget {
|
|
17
|
+
systemName?: string;
|
|
18
|
+
abapTarget: AbapTarget;
|
|
19
|
+
serviceProvider?: ServiceProvider;
|
|
20
|
+
type?: 'application' | 'library';
|
|
21
|
+
}
|
|
22
|
+
export interface DeployTaskConfig {
|
|
23
|
+
name?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
package?: string;
|
|
26
|
+
transport?: string;
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* AbapDeployConfigPromptOptions
|
|
31
|
+
*
|
|
32
|
+
* @param backendTarget - the backend target which may have been used to generate the application (useful for default values)
|
|
33
|
+
* @param existingDeployTaskConfig - the existing deploy task configuration, will be used to prefill certain prompt answers
|
|
34
|
+
* @param hideUi5AbapRepoPrompt - whether to hide the UI5 ABAP repository prompt
|
|
35
|
+
* @param showOverwriteQuestion - whether to show the overwrite question (this can be determined by the caller)
|
|
36
|
+
* @param indexGenerationAllowed - whether generating an index.html is allowed
|
|
37
|
+
*/
|
|
38
|
+
export interface AbapDeployConfigPromptOptions {
|
|
39
|
+
backendTarget?: BackendTarget;
|
|
40
|
+
existingDeployTaskConfig?: DeployTaskConfig;
|
|
41
|
+
hideUi5AbapRepoPrompt?: boolean;
|
|
42
|
+
showOverwriteQuestion?: boolean;
|
|
43
|
+
indexGenerationAllowed?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface AbapSystemChoice {
|
|
46
|
+
name: string;
|
|
47
|
+
value: string;
|
|
48
|
+
scp?: boolean;
|
|
49
|
+
url?: string;
|
|
50
|
+
client?: string;
|
|
51
|
+
isDefault?: boolean;
|
|
52
|
+
isS4HC?: boolean;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Enumeration of internal prompt names used internally and not supported for modification using ....
|
|
56
|
+
*/
|
|
57
|
+
export declare enum abapDeployConfigInternalPromptNames {
|
|
58
|
+
destination = "destination",
|
|
59
|
+
destinationCliSetter = "destinationCliSetter",
|
|
60
|
+
targetSystem = "targetSystem",
|
|
61
|
+
targetSystemCliSetter = "targetSystemCliSetter",
|
|
62
|
+
url = "url",
|
|
63
|
+
scp = "scp",
|
|
64
|
+
clientChoice = "clientChoice",
|
|
65
|
+
clientChoiceCliSetter = "clientChoiceCliSetter",
|
|
66
|
+
client = "client",
|
|
67
|
+
username = "username",
|
|
68
|
+
password = "password",
|
|
69
|
+
ui5AbapRepo = "ui5AbapRepo",
|
|
70
|
+
description = "description",
|
|
71
|
+
packageInputChoice = "packageInputChoice",
|
|
72
|
+
packageCliExecution = "packageCliExecution",
|
|
73
|
+
packageManual = "packageManual",
|
|
74
|
+
packageAutocomplete = "packageAutocomplete",
|
|
75
|
+
transportInputChoice = "transportInputChoice",
|
|
76
|
+
transportCliExecution = "transportCliExecution",
|
|
77
|
+
transportCreated = "transportCreated",
|
|
78
|
+
transportFromList = "transportFromList",
|
|
79
|
+
transportManual = "transportManual",
|
|
80
|
+
index = "index",
|
|
81
|
+
overwrite = "overwrite"
|
|
82
|
+
}
|
|
83
|
+
export interface TransportAnswers {
|
|
84
|
+
transportRequired?: boolean;
|
|
85
|
+
transportConfig?: TransportConfig;
|
|
86
|
+
transportConfigError?: string;
|
|
87
|
+
transportConfigNeedsCreds?: boolean;
|
|
88
|
+
transportList?: TransportListItem[];
|
|
89
|
+
newTransportNumber?: string;
|
|
90
|
+
}
|
|
91
|
+
export interface AbapDeployConfigAnswers {
|
|
92
|
+
destination?: string;
|
|
93
|
+
targetSystem?: string;
|
|
94
|
+
url?: string;
|
|
95
|
+
client?: string;
|
|
96
|
+
scp?: boolean;
|
|
97
|
+
ui5AbapRepo?: string;
|
|
98
|
+
description?: string;
|
|
99
|
+
package?: string;
|
|
100
|
+
transport?: string;
|
|
101
|
+
index?: boolean;
|
|
102
|
+
overwrite?: boolean;
|
|
103
|
+
}
|
|
104
|
+
export interface AbapDeployConfigAnswersInternal extends AbapDeployConfigAnswers {
|
|
105
|
+
clientChoice?: string;
|
|
106
|
+
username?: string;
|
|
107
|
+
isS4HC?: boolean;
|
|
108
|
+
packageInputChoice?: PackageInputChoices;
|
|
109
|
+
packageManual?: string;
|
|
110
|
+
packageAutocomplete?: string;
|
|
111
|
+
transportInputChoice?: TransportChoices;
|
|
112
|
+
transportCreated?: string;
|
|
113
|
+
transportFromList?: string;
|
|
114
|
+
transportManual?: string;
|
|
115
|
+
abort?: boolean;
|
|
116
|
+
}
|
|
117
|
+
export interface TransportListItem {
|
|
118
|
+
transportReqNumber: string;
|
|
119
|
+
transportReqDescription: string;
|
|
120
|
+
}
|
|
121
|
+
export interface TransportConfig {
|
|
122
|
+
/**
|
|
123
|
+
*
|
|
124
|
+
*/
|
|
125
|
+
getPackage(): string | undefined;
|
|
126
|
+
/**
|
|
127
|
+
*
|
|
128
|
+
*/
|
|
129
|
+
getApplicationPrefix(): string | undefined;
|
|
130
|
+
/**
|
|
131
|
+
*
|
|
132
|
+
*/
|
|
133
|
+
isTransportRequired(): boolean;
|
|
134
|
+
/**
|
|
135
|
+
*
|
|
136
|
+
*/
|
|
137
|
+
getDefaultTransport(): string | undefined;
|
|
138
|
+
/**
|
|
139
|
+
*
|
|
140
|
+
*/
|
|
141
|
+
getOperationsType(): string | undefined;
|
|
142
|
+
}
|
|
143
|
+
export interface InitTransportConfigResult {
|
|
144
|
+
transportConfig?: TransportConfig;
|
|
145
|
+
transportConfigNeedsCreds?: boolean;
|
|
146
|
+
error?: string;
|
|
147
|
+
warning?: string;
|
|
148
|
+
}
|
|
149
|
+
export interface SystemConfig {
|
|
150
|
+
url?: string;
|
|
151
|
+
client?: string;
|
|
152
|
+
destination?: string;
|
|
153
|
+
}
|
|
154
|
+
export declare enum PackageInputChoices {
|
|
155
|
+
EnterManualChoice = "EnterManualChoice",
|
|
156
|
+
ListExistingChoice = "ListExistingChoice"
|
|
157
|
+
}
|
|
158
|
+
export declare enum TransportChoices {
|
|
159
|
+
EnterManualChoice = "EnterManualChoice",
|
|
160
|
+
ListExistingChoice = "ListExistingChoice",
|
|
161
|
+
CreateNewChoice = "CreateNewChoice",
|
|
162
|
+
CreateDuringDeployChoice = "CreateDuringDeployChoice"
|
|
163
|
+
}
|
|
164
|
+
export type AbapDeployConfigQuestion = YUIQuestion<AbapDeployConfigAnswersInternal>;
|
|
165
|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AAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,oBAAY,mBAAmB;IAC3B,iBAAiB,sBAAsB;IACvC,kBAAkB,uBAAuB;CAC5C;AAED,oBAAY,gBAAgB;IACxB,iBAAiB,sBAAsB;IACvC,kBAAkB,uBAAuB;IACzC,eAAe,oBAAoB;IACnC,wBAAwB,6BAA6B;CACxD;AAED,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC,+BAA+B,CAAC,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransportChoices = exports.PackageInputChoices = exports.abapDeployConfigInternalPromptNames = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Enumeration of internal prompt names used internally and not supported for modification using ....
|
|
6
|
+
*/
|
|
7
|
+
var abapDeployConfigInternalPromptNames;
|
|
8
|
+
(function (abapDeployConfigInternalPromptNames) {
|
|
9
|
+
abapDeployConfigInternalPromptNames["destination"] = "destination";
|
|
10
|
+
abapDeployConfigInternalPromptNames["destinationCliSetter"] = "destinationCliSetter";
|
|
11
|
+
abapDeployConfigInternalPromptNames["targetSystem"] = "targetSystem";
|
|
12
|
+
abapDeployConfigInternalPromptNames["targetSystemCliSetter"] = "targetSystemCliSetter";
|
|
13
|
+
abapDeployConfigInternalPromptNames["url"] = "url";
|
|
14
|
+
abapDeployConfigInternalPromptNames["scp"] = "scp";
|
|
15
|
+
abapDeployConfigInternalPromptNames["clientChoice"] = "clientChoice";
|
|
16
|
+
abapDeployConfigInternalPromptNames["clientChoiceCliSetter"] = "clientChoiceCliSetter";
|
|
17
|
+
abapDeployConfigInternalPromptNames["client"] = "client";
|
|
18
|
+
abapDeployConfigInternalPromptNames["username"] = "username";
|
|
19
|
+
abapDeployConfigInternalPromptNames["password"] = "password";
|
|
20
|
+
abapDeployConfigInternalPromptNames["ui5AbapRepo"] = "ui5AbapRepo";
|
|
21
|
+
abapDeployConfigInternalPromptNames["description"] = "description";
|
|
22
|
+
abapDeployConfigInternalPromptNames["packageInputChoice"] = "packageInputChoice";
|
|
23
|
+
abapDeployConfigInternalPromptNames["packageCliExecution"] = "packageCliExecution";
|
|
24
|
+
abapDeployConfigInternalPromptNames["packageManual"] = "packageManual";
|
|
25
|
+
abapDeployConfigInternalPromptNames["packageAutocomplete"] = "packageAutocomplete";
|
|
26
|
+
abapDeployConfigInternalPromptNames["transportInputChoice"] = "transportInputChoice";
|
|
27
|
+
abapDeployConfigInternalPromptNames["transportCliExecution"] = "transportCliExecution";
|
|
28
|
+
abapDeployConfigInternalPromptNames["transportCreated"] = "transportCreated";
|
|
29
|
+
abapDeployConfigInternalPromptNames["transportFromList"] = "transportFromList";
|
|
30
|
+
abapDeployConfigInternalPromptNames["transportManual"] = "transportManual";
|
|
31
|
+
abapDeployConfigInternalPromptNames["index"] = "index";
|
|
32
|
+
abapDeployConfigInternalPromptNames["overwrite"] = "overwrite";
|
|
33
|
+
})(abapDeployConfigInternalPromptNames || (exports.abapDeployConfigInternalPromptNames = abapDeployConfigInternalPromptNames = {}));
|
|
34
|
+
var PackageInputChoices;
|
|
35
|
+
(function (PackageInputChoices) {
|
|
36
|
+
PackageInputChoices["EnterManualChoice"] = "EnterManualChoice";
|
|
37
|
+
PackageInputChoices["ListExistingChoice"] = "ListExistingChoice";
|
|
38
|
+
})(PackageInputChoices || (exports.PackageInputChoices = PackageInputChoices = {}));
|
|
39
|
+
var TransportChoices;
|
|
40
|
+
(function (TransportChoices) {
|
|
41
|
+
TransportChoices["EnterManualChoice"] = "EnterManualChoice";
|
|
42
|
+
TransportChoices["ListExistingChoice"] = "ListExistingChoice";
|
|
43
|
+
TransportChoices["CreateNewChoice"] = "CreateNewChoice";
|
|
44
|
+
TransportChoices["CreateDuringDeployChoice"] = "CreateDuringDeployChoice";
|
|
45
|
+
})(TransportChoices || (exports.TransportChoices = TransportChoices = {}));
|
|
46
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AA6DA;;GAEG;AACH,IAAY,mCAyBX;AAzBD,WAAY,mCAAmC;IAC3C,kEAA2B,CAAA;IAC3B,oFAA6C,CAAA;IAC7C,oEAA6B,CAAA;IAC7B,sFAA+C,CAAA;IAC/C,kDAAW,CAAA;IACX,kDAAW,CAAA;IACX,oEAA6B,CAAA;IAC7B,sFAA+C,CAAA;IAC/C,wDAAiB,CAAA;IACjB,4DAAqB,CAAA;IACrB,4DAAqB,CAAA;IACrB,kEAA2B,CAAA;IAC3B,kEAA2B,CAAA;IAC3B,gFAAyC,CAAA;IACzC,kFAA2C,CAAA;IAC3C,sEAA+B,CAAA;IAC/B,kFAA2C,CAAA;IAC3C,oFAA6C,CAAA;IAC7C,sFAA+C,CAAA;IAC/C,4EAAqC,CAAA;IACrC,8EAAuC,CAAA;IACvC,0EAAmC,CAAA;IACnC,sDAAe,CAAA;IACf,8DAAuB,CAAA;AAC3B,CAAC,EAzBW,mCAAmC,mDAAnC,mCAAmC,QAyB9C;AAgFD,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC3B,8DAAuC,CAAA;IACvC,gEAAyC,CAAA;AAC7C,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B;AAED,IAAY,gBAKX;AALD,WAAY,gBAAgB;IACxB,2DAAuC,CAAA;IACvC,6DAAyC,CAAA;IACzC,uDAAmC,CAAA;IACnC,yEAAqD,CAAA;AACzD,CAAC,EALW,gBAAgB,gCAAhB,gBAAgB,QAK3B"}
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { AbapDeployConfigAnswers, AbapDeployConfigAnswersInternal, BackendTarget, Credentials, DeployTaskConfig, InitTransportConfigResult, SystemConfig } from './types';
|
|
2
|
+
import type { BackendSystem } from '@sap-ux/store';
|
|
3
|
+
import type { Destinations, Destination } from '@sap-ux/btp-utils';
|
|
4
|
+
/**
|
|
5
|
+
* Retrieve the ABAP systems from the store or the destinations from BTP.
|
|
6
|
+
*
|
|
7
|
+
* @returns destinations or backend systems from the store
|
|
8
|
+
*/
|
|
9
|
+
export declare function getAbapSystems(): Promise<{
|
|
10
|
+
destinations: Destinations | undefined;
|
|
11
|
+
backendSystems: BackendSystem[] | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
/**
|
|
14
|
+
* Retrieve a specific Destination, based on the destination name.
|
|
15
|
+
*
|
|
16
|
+
* @param destination - destination name
|
|
17
|
+
* @returns destination if found
|
|
18
|
+
*/
|
|
19
|
+
export declare function findDestination(destination: string): Destination | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Retrieve a specific BackendSystem, based on the URL.
|
|
22
|
+
*
|
|
23
|
+
* @param backendUrl - backend system URL
|
|
24
|
+
* @returns backend system if found
|
|
25
|
+
*/
|
|
26
|
+
export declare function findBackendSystemByUrl(backendUrl: string): BackendSystem | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Check if the current system is the same as the one in the answers.
|
|
29
|
+
*
|
|
30
|
+
* @param abapSystem - system configuration
|
|
31
|
+
* @param url - url
|
|
32
|
+
* @param client - client
|
|
33
|
+
* @param destination - destination
|
|
34
|
+
* @returns true if the system is the same
|
|
35
|
+
*/
|
|
36
|
+
export declare function isSameSystem(abapSystem?: SystemConfig, url?: string, client?: string, destination?: string): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Get transport configuration from the backend.
|
|
39
|
+
*
|
|
40
|
+
* @param transportConfigParams - transport configuration parameters
|
|
41
|
+
* @param transportConfigParams.backendTarget - backend target from prompt options
|
|
42
|
+
* @param transportConfigParams.scp - scp
|
|
43
|
+
* @param transportConfigParams.url - url
|
|
44
|
+
* @param transportConfigParams.client - client
|
|
45
|
+
* @param transportConfigParams.destination - destination
|
|
46
|
+
* @param transportConfigParams.errorHandler - error handler
|
|
47
|
+
* @param transportConfigParams.credentials - user credentials
|
|
48
|
+
* @returns transport configuration
|
|
49
|
+
*/
|
|
50
|
+
export declare function initTransportConfig({ backendTarget, scp, url, client, destination, credentials, errorHandler }: {
|
|
51
|
+
backendTarget?: BackendTarget;
|
|
52
|
+
scp?: boolean;
|
|
53
|
+
url?: string;
|
|
54
|
+
client?: string;
|
|
55
|
+
destination?: string;
|
|
56
|
+
credentials?: Credentials;
|
|
57
|
+
errorHandler: (errorMessage: string) => void;
|
|
58
|
+
}): Promise<InitTransportConfigResult>;
|
|
59
|
+
/**
|
|
60
|
+
* Querying package names that match the user input.
|
|
61
|
+
*
|
|
62
|
+
* @param input - user input
|
|
63
|
+
* @param inputSystemConfig System configuration extracted from user answers for establishing backend connection
|
|
64
|
+
* @param backendTarget - backend target from abap deploy config prompt options
|
|
65
|
+
* @returns list of package names
|
|
66
|
+
*/
|
|
67
|
+
export declare function queryPackages(input: string, inputSystemConfig: SystemConfig, backendTarget?: BackendTarget): Promise<string[]>;
|
|
68
|
+
/**
|
|
69
|
+
* Determines the package from the various package related prompts.
|
|
70
|
+
*
|
|
71
|
+
* @param previousAnswers - previous answers
|
|
72
|
+
* @returns package name
|
|
73
|
+
*/
|
|
74
|
+
export declare function getPackageAnswer(previousAnswers?: AbapDeployConfigAnswersInternal): string;
|
|
75
|
+
/**
|
|
76
|
+
* If a deploy config already exists in the project, check if the config
|
|
77
|
+
* uses option to create transport request number during actual deploy process.
|
|
78
|
+
*
|
|
79
|
+
* @param existingDeployTaskConfig - existing deploy task config
|
|
80
|
+
* @returns true if transport setting is set to 'CreateDuringDeployChoice'.
|
|
81
|
+
*/
|
|
82
|
+
export declare function useCreateTrDuringDeploy(existingDeployTaskConfig?: DeployTaskConfig): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Convert internal answers to external answers to be used for writing deploy config.
|
|
85
|
+
*
|
|
86
|
+
* @param answers - internal abap deploy config answers
|
|
87
|
+
* @returns - external abap deploy config answers
|
|
88
|
+
*/
|
|
89
|
+
export declare function reconcileAnswers(answers: AbapDeployConfigAnswersInternal): AbapDeployConfigAnswers;
|
|
90
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACR,uBAAuB,EACvB,+BAA+B,EAC/B,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,yBAAyB,EACzB,YAAY,EACf,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,aAAa,EAAoB,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAOnE;;;;GAIG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC;IAC5C,YAAY,EAAE,YAAY,GAAG,SAAS,CAAC;IACvC,cAAc,EAAE,aAAa,EAAE,GAAG,SAAS,CAAC;CAC/C,CAAC,CAiBD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAE5E;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAEpF;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,UAAU,CAAC,EAAE,YAAY,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAOpH;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,mBAAmB,CAAC,EACtC,aAAa,EACb,GAAG,EACH,GAAG,EACH,MAAM,EACN,WAAW,EACX,WAAW,EACX,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