@devtron-labs/devtron-fe-common-lib 0.0.14 → 0.0.16

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.
@@ -1,3 +1,4 @@
1
+ import { RegistryTypeDetailType } from "./Types";
1
2
  export declare const RequestTimeout = 60000;
2
3
  export declare const Host: string;
3
4
  export declare const DOCUMENTATION_HOME_PAGE = "https://docs.devtron.ai";
@@ -55,3 +56,4 @@ export declare const BuildStageVariable: {
55
56
  Build: string;
56
57
  PostBuild: string;
57
58
  };
59
+ export declare const REGISTRY_TYPE_MAP: Record<string, RegistryTypeDetailType>;
@@ -267,6 +267,7 @@ export interface CommonNodeAttr {
267
267
  showPluginWarning?: boolean;
268
268
  helmPackageName?: string;
269
269
  isVirtualEnvironment?: boolean;
270
+ deploymentAppType?: DeploymentAppTypes;
270
271
  isCITriggerBlocked?: boolean;
271
272
  ciBlockState?: {
272
273
  action: any;
@@ -275,6 +276,12 @@ export interface CommonNodeAttr {
275
276
  appReleaseTagNames?: string[];
276
277
  tagsEditable?: boolean;
277
278
  }
279
+ export declare enum DeploymentAppTypes {
280
+ HELM = "helm",
281
+ GITOPS = "argo_cd",
282
+ MANIFEST_DOWNLOAD = "manifest_download",
283
+ MANIFEST_PUSH = "manifest_push"
284
+ }
278
285
  export interface VulnerabilityType {
279
286
  name: string;
280
287
  severity: 'CRITICAL' | 'MODERATE' | 'LOW';
@@ -308,4 +315,20 @@ export interface CDMaterialResponseType {
308
315
  appReleaseTagNames: string[];
309
316
  hideImageTaggingHardDelete: boolean;
310
317
  }
318
+ export interface InputDetailType {
319
+ label: string;
320
+ defaultValue: string;
321
+ placeholder: string;
322
+ }
323
+ export interface RegistryTypeDetailType {
324
+ value: string;
325
+ label: string;
326
+ desiredFormat: string;
327
+ placeholderText: string;
328
+ gettingStartedLink: string;
329
+ defaultRegistryURL: string;
330
+ registryURL: InputDetailType;
331
+ id: InputDetailType;
332
+ password: InputDetailType;
333
+ }
311
334
  export {};
package/dist/index.js CHANGED
@@ -82,6 +82,169 @@ var BuildStageVariable = {
82
82
  PreBuild: 'preBuildStage',
83
83
  Build: 'buildStage',
84
84
  PostBuild: 'postBuildStage',
85
+ };
86
+ var REGISTRY_TYPE_MAP = {
87
+ ecr: {
88
+ value: 'ecr',
89
+ label: 'ECR',
90
+ desiredFormat: '(desired format: repo-name)',
91
+ placeholderText: 'Eg. repo_name',
92
+ gettingStartedLink: 'https://docs.aws.amazon.com/AmazonECR/latest/userguide/get-set-up-for-amazon-ecr.html',
93
+ defaultRegistryURL: '',
94
+ registryURL: {
95
+ label: 'Registry URL',
96
+ defaultValue: '',
97
+ placeholder: 'Eg. xxxxxxxxxxxx.dkr.ecr.region.amazonaws.com',
98
+ },
99
+ id: {
100
+ label: 'Access key ID',
101
+ defaultValue: '',
102
+ placeholder: '',
103
+ },
104
+ password: {
105
+ label: 'Secret access key',
106
+ defaultValue: '',
107
+ placeholder: '',
108
+ },
109
+ },
110
+ 'docker-hub': {
111
+ value: 'docker-hub',
112
+ label: 'Docker',
113
+ desiredFormat: '(desired format: username/repo-name)',
114
+ placeholderText: 'Eg. username/repo_name',
115
+ gettingStartedLink: 'https://docs.docker.com/docker-hub/',
116
+ defaultRegistryURL: 'docker.io',
117
+ registryURL: {
118
+ label: 'Registry URL',
119
+ defaultValue: 'docker.io',
120
+ placeholder: '',
121
+ },
122
+ id: {
123
+ label: 'Username',
124
+ defaultValue: '',
125
+ placeholder: '',
126
+ },
127
+ password: {
128
+ label: 'Password/Token (Recommended: Token)',
129
+ defaultValue: '',
130
+ placeholder: '',
131
+ },
132
+ },
133
+ acr: {
134
+ value: 'acr',
135
+ label: 'Azure',
136
+ desiredFormat: '(desired format: repo-name)',
137
+ placeholderText: 'Eg. repo_name',
138
+ gettingStartedLink: 'https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal',
139
+ defaultRegistryURL: '',
140
+ registryURL: {
141
+ label: 'Registry URL/Login Server',
142
+ defaultValue: '',
143
+ placeholder: 'Eg. xxx.azurecr.io',
144
+ },
145
+ id: {
146
+ label: 'Username/Registry Name',
147
+ defaultValue: '',
148
+ placeholder: '',
149
+ },
150
+ password: {
151
+ label: 'Password',
152
+ defaultValue: '',
153
+ placeholder: '',
154
+ },
155
+ },
156
+ 'artifact-registry': {
157
+ value: 'artifact-registry',
158
+ label: 'Artifact Registry (GCP)',
159
+ desiredFormat: '(desired format: project-id/artifacts-repo/repo-name)',
160
+ placeholderText: 'Eg. project-id/artifacts-repo/repo-name',
161
+ gettingStartedLink: 'https://cloud.google.com/artifact-registry/docs/manage-repos?hl=en_US',
162
+ defaultRegistryURL: '',
163
+ registryURL: {
164
+ label: 'Registry URL',
165
+ defaultValue: '',
166
+ placeholder: 'Eg. region-docker.pkg.dev',
167
+ },
168
+ id: {
169
+ label: 'Username',
170
+ defaultValue: '_json_key',
171
+ placeholder: '',
172
+ },
173
+ password: {
174
+ label: 'Service Account JSON File',
175
+ defaultValue: '',
176
+ placeholder: 'Paste json file content here',
177
+ },
178
+ },
179
+ gcr: {
180
+ value: 'gcr',
181
+ label: 'GCR',
182
+ desiredFormat: '(desired format: project-id/repo-name)',
183
+ placeholderText: 'Eg. project-id/repo_name',
184
+ gettingStartedLink: 'https://cloud.google.com/container-registry/docs/quickstart',
185
+ defaultRegistryURL: 'gcr.io',
186
+ registryURL: {
187
+ label: 'Registry URL',
188
+ defaultValue: 'gcr.io',
189
+ placeholder: '',
190
+ },
191
+ id: {
192
+ label: 'Username',
193
+ defaultValue: '_json_key',
194
+ placeholder: '',
195
+ },
196
+ password: {
197
+ label: 'Service Account JSON File',
198
+ defaultValue: '',
199
+ placeholder: 'Paste json file content here',
200
+ },
201
+ },
202
+ quay: {
203
+ value: 'quay',
204
+ label: 'Quay',
205
+ desiredFormat: '(desired format: username/repo-name)',
206
+ placeholderText: 'Eg. username/repo_name',
207
+ gettingStartedLink: '',
208
+ defaultRegistryURL: 'quay.io',
209
+ registryURL: {
210
+ label: 'Registry URL',
211
+ defaultValue: 'quay.io',
212
+ placeholder: '',
213
+ },
214
+ id: {
215
+ label: 'Username',
216
+ defaultValue: '',
217
+ placeholder: '',
218
+ },
219
+ password: {
220
+ label: 'Token',
221
+ defaultValue: '',
222
+ placeholder: '',
223
+ },
224
+ },
225
+ other: {
226
+ value: 'other',
227
+ label: 'Other',
228
+ desiredFormat: '',
229
+ placeholderText: '',
230
+ gettingStartedLink: '',
231
+ defaultRegistryURL: '',
232
+ registryURL: {
233
+ label: 'Registry URL',
234
+ defaultValue: '',
235
+ placeholder: '',
236
+ },
237
+ id: {
238
+ label: 'Username',
239
+ defaultValue: '',
240
+ placeholder: '',
241
+ },
242
+ password: {
243
+ label: 'Password/Token',
244
+ defaultValue: '',
245
+ placeholder: '',
246
+ },
247
+ },
85
248
  };
86
249
 
87
250
  /******************************************************************************
@@ -255,7 +418,14 @@ exports.DeploymentNodeType = void 0;
255
418
  DeploymentNodeType["CD"] = "CD";
256
419
  DeploymentNodeType["POSTCD"] = "POSTCD";
257
420
  DeploymentNodeType["APPROVAL"] = "APPROVAL";
258
- })(exports.DeploymentNodeType || (exports.DeploymentNodeType = {}));
421
+ })(exports.DeploymentNodeType || (exports.DeploymentNodeType = {}));
422
+ exports.DeploymentAppTypes = void 0;
423
+ (function (DeploymentAppTypes) {
424
+ DeploymentAppTypes["HELM"] = "helm";
425
+ DeploymentAppTypes["GITOPS"] = "argo_cd";
426
+ DeploymentAppTypes["MANIFEST_DOWNLOAD"] = "manifest_download";
427
+ DeploymentAppTypes["MANIFEST_PUSH"] = "manifest_push";
428
+ })(exports.DeploymentAppTypes || (exports.DeploymentAppTypes = {}));
259
429
 
260
430
  var responseMessages = {
261
431
  100: 'Continue',
@@ -23053,6 +23223,7 @@ exports.PATTERNS = PATTERNS;
23053
23223
  exports.PopupMenu = PopupMenu;
23054
23224
  exports.Progressing = Progressing;
23055
23225
  exports.PropagateTagInfo = PropagateTagInfo;
23226
+ exports.REGISTRY_TYPE_MAP = REGISTRY_TYPE_MAP;
23056
23227
  exports.ROUTES = ROUTES;
23057
23228
  exports.RadioGroup = RadioGroup$1;
23058
23229
  exports.RadioGroupItem = RadioGroupItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1,3 +1,5 @@
1
+ import { RegistryTypeDetailType } from "./Types"
2
+
1
3
  export const RequestTimeout = 60000
2
4
  export const Host = process.env.REACT_APP_ORCHESTRATOR_ROOT
3
5
 
@@ -65,4 +67,169 @@ export const BuildStageVariable = {
65
67
  PreBuild: 'preBuildStage',
66
68
  Build: 'buildStage',
67
69
  PostBuild: 'postBuildStage',
70
+ }
71
+
72
+ export const REGISTRY_TYPE_MAP: Record<string, RegistryTypeDetailType> = {
73
+ ecr: {
74
+ value: 'ecr',
75
+ label: 'ECR',
76
+ desiredFormat: '(desired format: repo-name)',
77
+ placeholderText: 'Eg. repo_name',
78
+ gettingStartedLink: 'https://docs.aws.amazon.com/AmazonECR/latest/userguide/get-set-up-for-amazon-ecr.html',
79
+ defaultRegistryURL: '',
80
+ registryURL: {
81
+ label: 'Registry URL',
82
+ defaultValue: '',
83
+ placeholder: 'Eg. xxxxxxxxxxxx.dkr.ecr.region.amazonaws.com',
84
+ },
85
+ id: {
86
+ label: 'Access key ID',
87
+ defaultValue: '',
88
+ placeholder: '',
89
+ },
90
+ password: {
91
+ label: 'Secret access key',
92
+ defaultValue: '',
93
+ placeholder: '',
94
+ },
95
+ },
96
+ 'docker-hub': {
97
+ value: 'docker-hub',
98
+ label: 'Docker',
99
+ desiredFormat: '(desired format: username/repo-name)',
100
+ placeholderText: 'Eg. username/repo_name',
101
+ gettingStartedLink: 'https://docs.docker.com/docker-hub/',
102
+ defaultRegistryURL: 'docker.io',
103
+ registryURL: {
104
+ label: 'Registry URL',
105
+ defaultValue: 'docker.io',
106
+ placeholder: '',
107
+ },
108
+ id: {
109
+ label: 'Username',
110
+ defaultValue: '',
111
+ placeholder: '',
112
+ },
113
+ password: {
114
+ label: 'Password/Token (Recommended: Token)',
115
+ defaultValue: '',
116
+ placeholder: '',
117
+ },
118
+ },
119
+ acr: {
120
+ value: 'acr',
121
+ label: 'Azure',
122
+ desiredFormat: '(desired format: repo-name)',
123
+ placeholderText: 'Eg. repo_name',
124
+ gettingStartedLink:
125
+ 'https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal',
126
+ defaultRegistryURL: '',
127
+ registryURL: {
128
+ label: 'Registry URL/Login Server',
129
+ defaultValue: '',
130
+ placeholder: 'Eg. xxx.azurecr.io',
131
+ },
132
+ id: {
133
+ label: 'Username/Registry Name',
134
+ defaultValue: '',
135
+ placeholder: '',
136
+ },
137
+ password: {
138
+ label: 'Password',
139
+ defaultValue: '',
140
+ placeholder: '',
141
+ },
142
+ },
143
+ 'artifact-registry': {
144
+ value: 'artifact-registry',
145
+ label: 'Artifact Registry (GCP)',
146
+ desiredFormat: '(desired format: project-id/artifacts-repo/repo-name)',
147
+ placeholderText: 'Eg. project-id/artifacts-repo/repo-name',
148
+ gettingStartedLink: 'https://cloud.google.com/artifact-registry/docs/manage-repos?hl=en_US',
149
+ defaultRegistryURL: '',
150
+ registryURL: {
151
+ label: 'Registry URL',
152
+ defaultValue: '',
153
+ placeholder: 'Eg. region-docker.pkg.dev',
154
+ },
155
+ id: {
156
+ label: 'Username',
157
+ defaultValue: '_json_key',
158
+ placeholder: '',
159
+ },
160
+ password: {
161
+ label: 'Service Account JSON File',
162
+ defaultValue: '',
163
+ placeholder: 'Paste json file content here',
164
+ },
165
+ },
166
+ gcr: {
167
+ value: 'gcr',
168
+ label: 'GCR',
169
+ desiredFormat: '(desired format: project-id/repo-name)',
170
+ placeholderText: 'Eg. project-id/repo_name',
171
+ gettingStartedLink: 'https://cloud.google.com/container-registry/docs/quickstart',
172
+ defaultRegistryURL: 'gcr.io',
173
+ registryURL: {
174
+ label: 'Registry URL',
175
+ defaultValue: 'gcr.io',
176
+ placeholder: '',
177
+ },
178
+ id: {
179
+ label: 'Username',
180
+ defaultValue: '_json_key',
181
+ placeholder: '',
182
+ },
183
+ password: {
184
+ label: 'Service Account JSON File',
185
+ defaultValue: '',
186
+ placeholder: 'Paste json file content here',
187
+ },
188
+ },
189
+ quay: {
190
+ value: 'quay',
191
+ label: 'Quay',
192
+ desiredFormat: '(desired format: username/repo-name)',
193
+ placeholderText: 'Eg. username/repo_name',
194
+ gettingStartedLink: '',
195
+ defaultRegistryURL: 'quay.io',
196
+ registryURL: {
197
+ label: 'Registry URL',
198
+ defaultValue: 'quay.io',
199
+ placeholder: '',
200
+ },
201
+ id: {
202
+ label: 'Username',
203
+ defaultValue: '',
204
+ placeholder: '',
205
+ },
206
+ password: {
207
+ label: 'Token',
208
+ defaultValue: '',
209
+ placeholder: '',
210
+ },
211
+ },
212
+ other: {
213
+ value: 'other',
214
+ label: 'Other',
215
+ desiredFormat: '',
216
+ placeholderText: '',
217
+ gettingStartedLink: '',
218
+ defaultRegistryURL: '',
219
+ registryURL: {
220
+ label: 'Registry URL',
221
+ defaultValue: '',
222
+ placeholder: '',
223
+ },
224
+ id: {
225
+ label: 'Username',
226
+ defaultValue: '',
227
+ placeholder: '',
228
+ },
229
+ password: {
230
+ label: 'Password/Token',
231
+ defaultValue: '',
232
+ placeholder: '',
233
+ },
234
+ },
68
235
  }
@@ -292,6 +292,7 @@ export interface CommonNodeAttr {
292
292
  showPluginWarning?: boolean
293
293
  helmPackageName?: string
294
294
  isVirtualEnvironment?: boolean
295
+ deploymentAppType?: DeploymentAppTypes
295
296
  isCITriggerBlocked?: boolean
296
297
  ciBlockState?: {
297
298
  action: any,
@@ -301,6 +302,13 @@ export interface CommonNodeAttr {
301
302
  tagsEditable?: boolean
302
303
  }
303
304
 
305
+ export enum DeploymentAppTypes {
306
+ HELM = 'helm',
307
+ GITOPS = 'argo_cd',
308
+ MANIFEST_DOWNLOAD = 'manifest_download',
309
+ MANIFEST_PUSH='manifest_push'
310
+ }
311
+
304
312
  export interface VulnerabilityType {
305
313
  name: string
306
314
  severity: 'CRITICAL' | 'MODERATE' | 'LOW'
@@ -339,4 +347,20 @@ export interface CDMaterialResponseType {
339
347
  }
340
348
 
341
349
 
350
+ export interface InputDetailType {
351
+ label: string
352
+ defaultValue: string
353
+ placeholder: string
354
+ }
342
355
 
356
+ export interface RegistryTypeDetailType {
357
+ value: string
358
+ label: string
359
+ desiredFormat: string
360
+ placeholderText: string
361
+ gettingStartedLink: string
362
+ defaultRegistryURL: string
363
+ registryURL: InputDetailType
364
+ id: InputDetailType
365
+ password: InputDetailType
366
+ }