@axway/axway-central-cli 2.21.0 → 2.22.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.
|
@@ -38,8 +38,8 @@ const agentMessages = exports.agentMessages = {
|
|
|
38
38
|
const transactionLoggingMessages = exports.transactionLoggingMessages = {
|
|
39
39
|
askToEnableLogging: 'Would you like to enable transaction logging?',
|
|
40
40
|
transactionLoggingInfoMsg: 'Transaction logging is optional and not required for usage and metrics logging.\nTurning on transaction logging can have an impact on performance.',
|
|
41
|
-
enterSamplingPercentage: 'What sampling rate would you like to use? (1-
|
|
42
|
-
samplingPercentageInfoMsg: 'A sampling rate of 1 will log 1% of transactions, a sampling rate of
|
|
41
|
+
enterSamplingPercentage: 'What sampling rate would you like to use? (1-10)',
|
|
42
|
+
samplingPercentageInfoMsg: 'A sampling rate of 1 will log 1% of transactions, a sampling rate of 10 will log 10% of all transactions.\nWe recommend a sampling rate of 1% which can be increased if needed.',
|
|
43
43
|
askReportAllErrors: 'Would you like to report all errors?',
|
|
44
44
|
reportAllErrorsMsg: 'The agents can take out the error transactions from the sampling rate.'
|
|
45
45
|
};
|
|
@@ -373,11 +373,11 @@ const askToEnableTransactionLogging = async () => {
|
|
|
373
373
|
console.log(_chalk.default.gray(transactionLoggingMessages.samplingPercentageInfoMsg));
|
|
374
374
|
const samplingPercentage = await (0, _basicPrompts.askInput)({
|
|
375
375
|
msg: transactionLoggingMessages.enterSamplingPercentage,
|
|
376
|
-
defaultValue:
|
|
376
|
+
defaultValue: 1,
|
|
377
377
|
validate: (0, _basicPrompts.runValidations)((0, _basicPrompts.validateRegex)(_regex.percentageRegex, _regex.invalidPercentage))
|
|
378
378
|
});
|
|
379
379
|
let shouldReportAllErrors = _types.YesNo.Yes;
|
|
380
|
-
if (samplingPercentage <
|
|
380
|
+
if (samplingPercentage < 10) {
|
|
381
381
|
console.log(_chalk.default.gray(transactionLoggingMessages.reportAllErrorsMsg));
|
|
382
382
|
shouldReportAllErrors = await (0, _basicPrompts.askList)({
|
|
383
383
|
msg: transactionLoggingMessages.askReportAllErrors,
|
|
@@ -8,10 +8,10 @@ const resourceRegex = exports.resourceRegex = '^(?:[a-z0-9]*(?:\\.(?=[a-z0-9])|-
|
|
|
8
8
|
const namespaceRegex = exports.namespaceRegex = '^[a-z0-9]?(?:[-a-z0-9]*[a-z0-9]){1,100}?$';
|
|
9
9
|
const domainNameRegex = exports.domainNameRegex = '^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\\.)+([A-Za-z]){2,}$';
|
|
10
10
|
const dosaRegex = exports.dosaRegex = '^[\\w\\s-()[\\]]{1,100}$';
|
|
11
|
-
const percentageRegex = exports.percentageRegex = '^[1-9]
|
|
11
|
+
const percentageRegex = exports.percentageRegex = '^[1-9]$|10$';
|
|
12
12
|
const frequencyRegex = exports.frequencyRegex = '^(\\d*[d])?(\\d*[h])?(\\d*[m])?$|^$';
|
|
13
13
|
const maskingRegex = exports.maskingRegex = '^[a-zA-Z0-9-*#^~.{}]{0,5}$';
|
|
14
|
-
const invalidPercentage = exports.invalidPercentage = 'Percentage must be an integer between 1-
|
|
14
|
+
const invalidPercentage = exports.invalidPercentage = 'Percentage must be an integer between 1-10';
|
|
15
15
|
const invalidDosaName = exports.invalidDosaName = 'Account name can contain A-z 0-9 _ - ( ) [ ] and can include 1-100 characters.';
|
|
16
16
|
const invalidNamespace = exports.invalidNamespace = `Namespace must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character, and be fewer than 100 characters long.`;
|
|
17
17
|
const invalidDomainName = exports.invalidDomainName = 'The host must be valid according to RFC 1123 specification';
|
|
@@ -31,13 +31,13 @@ const AWSRegexPatterns = exports.AWSRegexPatterns = {
|
|
|
31
31
|
AWS_REGEXP_ACCESS_KEY_ID: '((?:ASIA|AKIA|AROA|AIDA)([A-Z0-7]{16}))',
|
|
32
32
|
AWS_REGEXP_SECRET_ACCESS_KEY: '[a-zA-Z0-9+/]{40}',
|
|
33
33
|
AWS_REGEXP_ROLE_ARN: '^arn:aws[a-zA-Z-]*:iam::\\d{12}:role\\/?[a-zA-Z0-9+=,.@\\-_\\/]{1,128}$',
|
|
34
|
-
AWS_ACCESS_LOG_ARN: '^arn:aws[a-zA-Z-]*:logs:[a-zA-Z0-9
|
|
34
|
+
AWS_ACCESS_LOG_ARN: '^arn:aws[a-zA-Z-]*:logs:[a-zA-Z0-9-]*:\\d{12}:log-group:[a-zA-Z0-9_\\-\\/\\.#]{1,512}$'
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
// APIGEEXRegexPatterns - regex patters to validate user inputs
|
|
38
38
|
const APIGEEXRegexPatterns = exports.APIGEEXRegexPatterns = {
|
|
39
39
|
APIGEEX_REGEXP_PROJECT_ID: '^[a-z][a-z0-9-]{4,28}[a-z0-9]$',
|
|
40
|
-
AWS_REGEXP_EMAIL_ADDRESS: '^(([^<>()[
|
|
40
|
+
AWS_REGEXP_EMAIL_ADDRESS: '^(([^<>()[]\\.,;:s@"]+(.[^<>()[]\\.,;:s@"]+)*)|.(".+"))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}))$'
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
// AzureRegexPatterns - regex patters to validate user inputs
|
|
@@ -49,12 +49,12 @@ const AzureRegexPatterns = exports.AzureRegexPatterns = {
|
|
|
49
49
|
const GitHubRegexPatterns = exports.GitHubRegexPatterns = {
|
|
50
50
|
gitHubAccessTokenRegex: '^ghp_[a-zA-Z0-9]{36}$',
|
|
51
51
|
gitHubRepositoryOwnerRegex: '^(?!-)(?!.*--)[a-zA-Z0-9-]{1,37}(?<!-)$',
|
|
52
|
-
gitHubRepositoryNameRegex: '^[
|
|
53
|
-
gitHubFilePathRegex: '
|
|
52
|
+
gitHubRepositoryNameRegex: '^[w-.]+$',
|
|
53
|
+
gitHubFilePathRegex: '^/.*$'
|
|
54
54
|
};
|
|
55
55
|
const GitLabRegexPatterns = exports.GitLabRegexPatterns = {
|
|
56
|
-
gitLabAccessTokenRegex: '^[0-9a-zA-Z
|
|
57
|
-
gitLabBaseURLRegex: '^(http
|
|
56
|
+
gitLabAccessTokenRegex: '^[0-9a-zA-Z-]{20}$',
|
|
57
|
+
gitLabBaseURLRegex: '^(http://|https://)[a-z0-9]+([-.]{1}[a-z0-9]+)*.[a-z]{2,5}(:[0-9]{1,5})?(/.*)?$',
|
|
58
58
|
gitHubRepositoryIDRegex: '^[0-9]*$',
|
|
59
|
-
gitLabPathRegex: '
|
|
59
|
+
gitLabPathRegex: '^/.*$'
|
|
60
60
|
};
|
|
@@ -69,7 +69,7 @@ const validateValueRange = (lowerLimit, upperLimit) => input => {
|
|
|
69
69
|
if (isNaN(inputNum)) {
|
|
70
70
|
return 'Please provide a number.';
|
|
71
71
|
}
|
|
72
|
-
let msg =
|
|
72
|
+
let msg = '';
|
|
73
73
|
if (typeof lowerLimit !== undefined && typeof upperLimit !== undefined) {
|
|
74
74
|
msg = `Please provide a number from ${lowerLimit} to ${upperLimit}`;
|
|
75
75
|
} else if (typeof lowerLimit !== undefined) {
|
package/dist/common/types.js
CHANGED
|
@@ -443,7 +443,7 @@ class TraceabilityConfig {
|
|
|
443
443
|
_defineProperty(this, "usageReportingOffline", void 0);
|
|
444
444
|
this.host = IngestionHosts.US;
|
|
445
445
|
this.protocol = IngestionProtocol.Lumberjack;
|
|
446
|
-
this.samplingPercentage =
|
|
446
|
+
this.samplingPercentage = 10;
|
|
447
447
|
this.enabled = true;
|
|
448
448
|
this.samplingReportAllErrors = true;
|
|
449
449
|
this.usageReportingOffline = false;
|