@axway/axway-central-cli 2.22.0 → 2.23.0-rc.0
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/README.md +0 -44
- package/dist/commands/install/gitHubSaasAgents.js +14 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -229,50 +229,6 @@ The ability to create/update proxies have been deprecated from the CLI verison 2
|
|
|
229
229
|
|
|
230
230
|
---
|
|
231
231
|
|
|
232
|
-
- **v0**
|
|
233
|
-
|
|
234
|
-
```yaml
|
|
235
|
-
apiVersion: v1
|
|
236
|
-
proxy:
|
|
237
|
-
name: 'Musical Instruments'
|
|
238
|
-
basePath: /api/v1
|
|
239
|
-
swagger: 'https://ec062a054a2977120b7e721801edb38ca24dfbb3.cloudapp-enterprise.appcelerator.com/apidoc/swagger.json'
|
|
240
|
-
policy:
|
|
241
|
-
type: api-key
|
|
242
|
-
app: 'Sample App'
|
|
243
|
-
tags: ['musical', 'instruments']
|
|
244
|
-
team:
|
|
245
|
-
name: 'Default Team'
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
- **v1**
|
|
249
|
-
|
|
250
|
-
```yaml
|
|
251
|
-
apiVersion: v1
|
|
252
|
-
version: v1
|
|
253
|
-
proxy:
|
|
254
|
-
name: 'Musical Instruments'
|
|
255
|
-
basePath: /api/v1
|
|
256
|
-
swagger: 'https://ec062a054a2977120b7e721801edb38ca24dfbb3.cloudapp-enterprise.appcelerator.com/apidoc/swagger.json'
|
|
257
|
-
policies:
|
|
258
|
-
clientAuth:
|
|
259
|
-
type: api-key
|
|
260
|
-
app: 'Sample App'
|
|
261
|
-
backendAuth:
|
|
262
|
-
type: auth-http-basic
|
|
263
|
-
username: Joe
|
|
264
|
-
password: changeme
|
|
265
|
-
rateLimit:
|
|
266
|
-
perProxy: 5
|
|
267
|
-
perProxyAndApp: 3
|
|
268
|
-
apps:
|
|
269
|
-
- name: 'Second Sample App'
|
|
270
|
-
team:
|
|
271
|
-
name: 'Default Team'
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
---
|
|
275
|
-
|
|
276
232
|
## GET
|
|
277
233
|
|
|
278
234
|
Prints a table of the most important information about the specified resources.
|
|
@@ -37,10 +37,12 @@ class GitHubDataplaneConfig extends DataplaneConfig {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
class GitHubFilterConfig {
|
|
40
|
-
constructor(paths, pattern) {
|
|
40
|
+
constructor(paths, branch, pattern) {
|
|
41
41
|
_defineProperty(this, "paths", void 0);
|
|
42
|
+
_defineProperty(this, "branch", void 0);
|
|
42
43
|
_defineProperty(this, "pattern", void 0);
|
|
43
44
|
this.paths = paths;
|
|
45
|
+
this.branch = branch;
|
|
44
46
|
this.pattern = pattern;
|
|
45
47
|
}
|
|
46
48
|
}
|
|
@@ -53,6 +55,7 @@ class SaasAgentValues {
|
|
|
53
55
|
_defineProperty(this, "centralConfig", void 0);
|
|
54
56
|
_defineProperty(this, "repositoryOwner", void 0);
|
|
55
57
|
_defineProperty(this, "repositoryName", void 0);
|
|
58
|
+
_defineProperty(this, "repositoryBranch", void 0);
|
|
56
59
|
_defineProperty(this, "filePaths", void 0);
|
|
57
60
|
_defineProperty(this, "filePatterns", void 0);
|
|
58
61
|
this.frequencyDA = '';
|
|
@@ -62,6 +65,7 @@ class SaasAgentValues {
|
|
|
62
65
|
this.centralConfig = new _types.CentralAgentConfig();
|
|
63
66
|
this.repositoryOwner = '';
|
|
64
67
|
this.repositoryName = '';
|
|
68
|
+
this.repositoryBranch = '';
|
|
65
69
|
this.filePaths = [];
|
|
66
70
|
this.filePatterns = [];
|
|
67
71
|
}
|
|
@@ -88,6 +92,7 @@ const SaasPrompts = {
|
|
|
88
92
|
ACCESS_TOKEN: 'Enter the GitHub Access Token the agent will use',
|
|
89
93
|
REPOSITORY_OWNER: 'Enter the GitHub Repository Owner the agent will use',
|
|
90
94
|
REPOSITORY_NAME: 'Enter the Repository Name the agent will use',
|
|
95
|
+
REPOSITORY_BRANCH: 'Enter the Repository Branch the agent will use',
|
|
91
96
|
FILE_PATHS: 'Enter a File Path within the repository that the agent will use',
|
|
92
97
|
FILE_PATTERNS: 'Enter a File Pattern that the agent will use (Optional)',
|
|
93
98
|
DA_FREQUENCY: 'How often should the discovery run, leave blank for integrating in CI/CD process',
|
|
@@ -166,7 +171,13 @@ const gatewayConnectivity = async installConfig => {
|
|
|
166
171
|
hostedAgentValues.repositoryName = await (0, _basicPrompts.askInput)({
|
|
167
172
|
msg: SaasPrompts.REPOSITORY_NAME,
|
|
168
173
|
defaultValue: hostedAgentValues.repositoryName !== '' ? hostedAgentValues.repositoryName : undefined,
|
|
169
|
-
validate: (0, _basicPrompts.validateRegex)(helpers.GitHubRegexPatterns.
|
|
174
|
+
validate: (0, _basicPrompts.validateRegex)(helpers.GitHubRegexPatterns.gitHubRepositoryNameRegex, helpers.invalidValueExampleErrMsg('Repository Name', 'axway-github-repo-name'))
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
// get repository branch
|
|
178
|
+
hostedAgentValues.repositoryBranch = await (0, _basicPrompts.askInput)({
|
|
179
|
+
msg: SaasPrompts.REPOSITORY_BRANCH,
|
|
180
|
+
defaultValue: hostedAgentValues.repositoryBranch !== '' ? hostedAgentValues.repositoryBranch : undefined
|
|
170
181
|
});
|
|
171
182
|
|
|
172
183
|
// get File Paths
|
|
@@ -241,7 +252,7 @@ const completeInstall = async (installConfig, apiServerClient, defsManager) => {
|
|
|
241
252
|
production: installConfig.centralConfig.production
|
|
242
253
|
}) : installConfig.centralConfig.ampcEnvInfo.name;
|
|
243
254
|
if (installConfig.gatewayType === _types.GatewayTypes.GITHUB) {
|
|
244
|
-
gitHubAgentValues.dataplaneConfig = new GitHubDataplaneConfig(gitHubAgentValues.repositoryName, gitHubAgentValues.repositoryOwner, new GitHubFilterConfig(gitHubAgentValues.filePaths, gitHubAgentValues.filePatterns));
|
|
255
|
+
gitHubAgentValues.dataplaneConfig = new GitHubDataplaneConfig(gitHubAgentValues.repositoryName, gitHubAgentValues.repositoryOwner, new GitHubFilterConfig(gitHubAgentValues.filePaths, gitHubAgentValues.repositoryBranch, gitHubAgentValues.filePatterns));
|
|
245
256
|
}
|
|
246
257
|
|
|
247
258
|
// create the data plane resource
|