@hiiretail/gcp-infra-cli 0.102.5 → 0.102.6
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.
|
@@ -77,29 +77,12 @@ module.exports = class extends BaseGenerator {
|
|
|
77
77
|
message: 'Please provide the project ID:',
|
|
78
78
|
validate: required && validate.projectId,
|
|
79
79
|
},
|
|
80
|
-
{
|
|
81
|
-
when: (response) => ['uptime-checks', 'alerts'].includes(response.monitoringResource),
|
|
82
|
-
type: 'input',
|
|
83
|
-
name: 'systemName',
|
|
84
|
-
message: 'Please provide three-letter system name (ex: sre, pnp, iam...):',
|
|
85
|
-
default: () => {
|
|
86
|
-
const gitPath = path.resolve(process.cwd(), '.git');
|
|
87
|
-
if (fs.existsSync(gitPath)) {
|
|
88
|
-
const repoName = path.basename(process.cwd());
|
|
89
|
-
const regex = /-([a-z]{3})-/i;
|
|
90
|
-
const match = regex.exec(repoName);
|
|
91
|
-
return match ? match[1] : '';
|
|
92
|
-
}
|
|
93
|
-
return '';
|
|
94
|
-
},
|
|
95
|
-
validate: required && validate.systemName,
|
|
96
|
-
},
|
|
97
80
|
{
|
|
98
81
|
when: (response) => response.monitoringResource === 'uptime-checks',
|
|
99
82
|
type: 'input',
|
|
100
83
|
name: 'serviceName',
|
|
101
84
|
message: 'Please provide the namespace where the service resides:',
|
|
102
|
-
default: (response) => `${response.
|
|
85
|
+
default: (response) => `${response.clan}-service`,
|
|
103
86
|
validate: required && validate.serviceName,
|
|
104
87
|
},
|
|
105
88
|
{
|