@devtron-labs/devtron-fe-common-lib 0.0.96-beta-2 → 0.0.97

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.
Files changed (39) hide show
  1. package/dist/Common/Constants.d.ts +1 -0
  2. package/dist/Common/Helper.d.ts +5 -34
  3. package/dist/Common/Reload.d.ts +3 -0
  4. package/dist/Shared/Components/ArtifactInfoModal/ArtifactInfoModal.component.d.ts +4 -0
  5. package/dist/Shared/Components/ArtifactInfoModal/index.d.ts +2 -0
  6. package/dist/Shared/Components/ArtifactInfoModal/types.d.ts +15 -0
  7. package/dist/Shared/Components/CommitChipCell/CommitChipCell.d.ts +4 -0
  8. package/dist/Shared/Components/CommitChipCell/index.d.ts +2 -0
  9. package/dist/Shared/Components/CommitChipCell/types.d.ts +6 -0
  10. package/dist/Shared/Components/ImageChipCell/ImageChipCell.component.d.ts +4 -0
  11. package/dist/Shared/Components/ImageChipCell/index.d.ts +2 -0
  12. package/dist/Shared/Components/ImageChipCell/types.d.ts +9 -0
  13. package/dist/Shared/Components/MaterialHistory/MaterialHistory.component.d.ts +4 -0
  14. package/dist/Shared/Components/MaterialHistory/index.d.ts +2 -0
  15. package/dist/Shared/Components/MaterialHistory/types.d.ts +8 -0
  16. package/dist/Shared/Components/index.d.ts +4 -0
  17. package/dist/Shared/Services/app.service.d.ts +7 -0
  18. package/dist/Shared/Services/app.types.d.ts +96 -0
  19. package/dist/Shared/Services/index.d.ts +2 -0
  20. package/dist/Shared/Services/utils.d.ts +3 -0
  21. package/dist/assets/index.css +1 -1
  22. package/dist/{cssMode-3a879c62.js → cssMode-9807600c.js} +1 -1
  23. package/dist/{freemarker2-c100bd3c.js → freemarker2-a98a7613.js} +1 -1
  24. package/dist/{handlebars-49acdc0c.js → handlebars-c0053d6d.js} +1 -1
  25. package/dist/{html-a14c9542.js → html-f3a981ae.js} +1 -1
  26. package/dist/{htmlMode-2d1abd6a.js → htmlMode-b78f2ee0.js} +1 -1
  27. package/dist/{index-7bca5b17.js → index-27281b6f.js} +23740 -22607
  28. package/dist/index.js +410 -406
  29. package/dist/{javascript-966a9944.js → javascript-04ab0963.js} +1 -1
  30. package/dist/{jsonMode-e1043735.js → jsonMode-3b633511.js} +1 -1
  31. package/dist/{liquid-49ca7c68.js → liquid-58d1493f.js} +1 -1
  32. package/dist/{mdx-a1b5db5b.js → mdx-ff13a9da.js} +1 -1
  33. package/dist/{python-6837345e.js → python-17d433e7.js} +1 -1
  34. package/dist/{razor-d1b46f00.js → razor-ea89ee1b.js} +1 -1
  35. package/dist/{tsMode-0e41a9db.js → tsMode-c29189b9.js} +1 -1
  36. package/dist/{typescript-166ee2dc.js → typescript-95fb6627.js} +1 -1
  37. package/dist/{xml-c8179c9d.js → xml-50ee6035.js} +1 -1
  38. package/dist/{yaml-0334b788.js → yaml-b00a0181.js} +1 -1
  39. package/package.json +2 -1
@@ -3,6 +3,7 @@ import { RegistryTypeDetailType } from './Types';
3
3
  export declare const FALLBACK_REQUEST_TIMEOUT = 60000;
4
4
  export declare const Host: string;
5
5
  export declare const DOCUMENTATION_HOME_PAGE = "https://docs.devtron.ai";
6
+ export declare const DOCUMENTATION_VERSION = "/v/v0.7";
6
7
  export declare const DISCORD_LINK = "https://discord.devtron.ai/";
7
8
  export declare const DOCUMENTATION: {
8
9
  APP_TAGS: string;
@@ -60,40 +60,11 @@ export declare const customStyles: {
60
60
  dropdownIndicator: (base: any, state: any) => any;
61
61
  };
62
62
  export declare const getFilteredChartVersions: (charts: any, selectedChartType: any) => any;
63
- /**
64
- * Removes nulls from the arrays in the provided object
65
- * @param {object} object from which we need to delete nulls in its arrays
66
- * @returns object after removing (in-place) the null items in arrays
67
- */
68
- export declare const recursivelyRemoveNullsFromArraysInObject: (object: object) => object;
69
- /**
70
- * Merges the objects into one object
71
- * @param {object[]} objects list of js objects
72
- * @returns object after the merge
73
- */
74
- export declare const joinObjects: (objects: object[]) => {};
75
- /**
76
- * Builds an object from the provided path
77
- * @param {string} path JSON pointer path of the form /path/to/1/...
78
- * @param {any} value property value
79
- * @returns final object formed from the path
80
- */
81
- export declare const buildObjectFromPath: (path: string, value: any) => any;
82
- /**
83
- * Returns the list of indices at which the regex matched
84
- * @param string the string to process
85
- * @param regex @RegExp
86
- * @returns array of indices where the @regex matched in @string
87
- */
88
- export declare const getRegexMatchPositions: (string: string, regex: RegExp) => number[];
89
- /**
90
- * Returns all the substrings from 0th index to progressively next regex match position
91
- * Eg. Suppose a string is /path/to/folder then it will return [/path, /path/to, /path/to/folder]
92
- * @param strings list of strings
93
- * @param regex that matches the separators for the substrings
94
- * @returns set of substrings
95
- */
96
- export declare const powerSetOfSubstringsFromStart: (strings: string[], regex: RegExp) => string[];
63
+ export declare function getUnlockedJSON(json: any, jsonPathArray: any, removeParentKeysAndEmptyArrays?: boolean): {
64
+ newDocument: any;
65
+ removedPatches: any[];
66
+ };
67
+ export declare function getLockedJSON(json: any, jsonPathArray: string[]): any;
97
68
  /**
98
69
  * Returns a debounced variant of the function
99
70
  */
@@ -1,3 +1,6 @@
1
1
  import { ReloadType } from './Types';
2
2
 
3
+ /**
4
+ * @deprecated Use APIResponseHandler (Preferred) or error screen manager instead
5
+ */
3
6
  export default function Reload({ reload, className, heightToDeduct }: ReloadType): JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { ArtifactInfoModalProps } from './types';
2
+
3
+ declare const ArtifactInfoModal: ({ envId, ciArtifactId, handleClose, renderCIListHeader, fetchOnlyArtifactInfo, }: ArtifactInfoModalProps) => JSX.Element;
4
+ export default ArtifactInfoModal;
@@ -0,0 +1,2 @@
1
+ export { default as ArtifactInfoModal } from './ArtifactInfoModal.component';
2
+ export type { ArtifactInfoModalProps } from './types';
@@ -0,0 +1,15 @@
1
+ import { ArtifactType } from '../CICDHistory';
2
+
3
+ export type ArtifactInfoModalProps = Pick<ArtifactType, 'renderCIListHeader'> & {
4
+ ciArtifactId: number;
5
+ handleClose: () => void;
6
+ } & ({
7
+ envId: number | string;
8
+ fetchOnlyArtifactInfo?: false;
9
+ } | {
10
+ envId?: never;
11
+ /**
12
+ * If true, the env and trigger meta data is not fetched
13
+ */
14
+ fetchOnlyArtifactInfo: true;
15
+ });
@@ -0,0 +1,4 @@
1
+ import { CommitChipCellProps } from './types';
2
+
3
+ declare const CommitChipCell: ({ handleClick, commits }: CommitChipCellProps) => JSX.Element;
4
+ export default CommitChipCell;
@@ -0,0 +1,2 @@
1
+ export { default as CommitChipCell } from './CommitChipCell';
2
+ export type { CommitChipCellProps } from './types';
@@ -0,0 +1,6 @@
1
+ import { SyntheticEvent } from 'react';
2
+
3
+ export interface CommitChipCellProps {
4
+ handleClick: (e: SyntheticEvent) => void;
5
+ commits?: string[];
6
+ }
@@ -0,0 +1,4 @@
1
+ import { ImageChipCellProps } from './types';
2
+
3
+ declare const ImageChipCell: ({ handleClick, imagePath, isExpanded, registryType }: ImageChipCellProps) => JSX.Element;
4
+ export default ImageChipCell;
@@ -0,0 +1,2 @@
1
+ export { default as ImageChipCell } from './ImageChipCell.component';
2
+ export type { ImageChipCellProps } from './types';
@@ -0,0 +1,9 @@
1
+ import { RegistryType } from '../../types';
2
+ import { SyntheticEvent } from 'react';
3
+
4
+ export interface ImageChipCellProps {
5
+ handleClick: (e: SyntheticEvent) => void;
6
+ imagePath: string;
7
+ isExpanded: boolean;
8
+ registryType: RegistryType;
9
+ }
@@ -0,0 +1,4 @@
1
+ import { MaterialHistoryProps } from './types';
2
+
3
+ declare const MaterialHistory: ({ material, pipelineName, ciPipelineId, selectCommit }: MaterialHistoryProps) => JSX.Element;
4
+ export default MaterialHistory;
@@ -0,0 +1,2 @@
1
+ export { default as MaterialHistory } from './MaterialHistory.component';
2
+ export type { MaterialHistoryProps } from './types';
@@ -0,0 +1,8 @@
1
+ import { CIMaterialType } from '../../Services/app.types';
2
+
3
+ export interface MaterialHistoryProps {
4
+ material: CIMaterialType;
5
+ pipelineName: string;
6
+ ciPipelineId?: string;
7
+ selectCommit?: (materialId: string, commit: string, ciPipelineId?: string) => void;
8
+ }
@@ -24,4 +24,8 @@ export * from './FeatureDescription';
24
24
  export * from './CICDHistory';
25
25
  export * from './GitCommitInfoGeneric';
26
26
  export * from './Error';
27
+ export * from './CommitChipCell';
28
+ export * from './ImageChipCell';
29
+ export * from './ArtifactInfoModal';
30
+ export * from './MaterialHistory';
27
31
  export * from './IframeContainer';
@@ -0,0 +1,7 @@
1
+ import { CIMaterialInfoType, GetCITriggerInfoParamsType } from './app.types';
2
+
3
+ export declare const getCITriggerInfo: (params: GetCITriggerInfoParamsType) => Promise<CIMaterialInfoType>;
4
+ /**
5
+ * The only difference between this and getCITriggerInfo is it doesn't have env and trigger related meta info
6
+ */
7
+ export declare const getArtifactInfo: (params: Pick<GetCITriggerInfoParamsType, 'ciArtifactId'>) => Promise<CIMaterialInfoType>;
@@ -0,0 +1,96 @@
1
+ import { ReleaseTag } from '../../Common';
2
+
3
+ interface WebhookDataType {
4
+ id: number;
5
+ eventActionType: string;
6
+ data: any;
7
+ }
8
+ interface MaterialHistoryDTO {
9
+ Commit: string;
10
+ Author: string;
11
+ Date: string;
12
+ Message: string;
13
+ Changes: unknown[];
14
+ WebhookData: WebhookDataType;
15
+ }
16
+ interface MaterialHistoryType {
17
+ commitURL: string;
18
+ commit: MaterialHistoryDTO['Commit'];
19
+ author: MaterialHistoryDTO['Author'];
20
+ date: MaterialHistoryDTO['Date'];
21
+ message: MaterialHistoryDTO['Message'];
22
+ changes: MaterialHistoryDTO['Changes'];
23
+ webhookData: MaterialHistoryDTO['WebhookData'];
24
+ showChanges: boolean;
25
+ isSelected: boolean;
26
+ excluded?: boolean;
27
+ }
28
+ interface CIMaterialDTO {
29
+ id: number;
30
+ gitMaterialId: number;
31
+ gitMaterialName: string;
32
+ type: string;
33
+ value: string;
34
+ active: boolean;
35
+ history: MaterialHistoryDTO[];
36
+ lastFetchTime: string;
37
+ url: string;
38
+ }
39
+ interface CIMaterialMetaType {
40
+ isRepoError?: boolean;
41
+ repoErrorMsg?: string;
42
+ isBranchError?: boolean;
43
+ branchErrorMsg?: string;
44
+ isMaterialLoading?: boolean;
45
+ regex?: string;
46
+ searchText?: string;
47
+ noSearchResultsMsg?: string;
48
+ noSearchResult?: boolean;
49
+ isRegex?: boolean;
50
+ isDockerFileError?: boolean;
51
+ dockerFileErrorMsg?: string;
52
+ showAllCommits?: boolean;
53
+ isMaterialSelectionError?: boolean;
54
+ materialSelectionErrorMsg?: string;
55
+ }
56
+ export interface CIMaterialType extends Pick<CIMaterialDTO, 'id' | 'gitMaterialId' | 'gitMaterialName' | 'type' | 'value' | 'active' | 'lastFetchTime'>, CIMaterialMetaType {
57
+ gitURL: CIMaterialDTO['url'];
58
+ history: MaterialHistoryType[];
59
+ isSelected: boolean;
60
+ }
61
+ interface ImageCommentDTO {
62
+ id: number;
63
+ comment: string;
64
+ artifactId: number;
65
+ }
66
+ interface ImageCommentType extends ImageCommentDTO {
67
+ }
68
+ interface ImageTaggingDataDTO {
69
+ imageReleaseTags: ReleaseTag[];
70
+ appReleaseTags: string[];
71
+ imageComment: ImageCommentDTO;
72
+ tagsEditable: boolean;
73
+ }
74
+ interface ImageTaggingDataType extends Pick<ImageTaggingDataDTO, 'imageReleaseTags' | 'appReleaseTags' | 'tagsEditable'> {
75
+ imageComment: ImageCommentType;
76
+ }
77
+ export interface CIMaterialInfoDTO {
78
+ ciPipelineId: number;
79
+ ciMaterials: CIMaterialDTO[];
80
+ triggeredByEmail: string;
81
+ lastDeployedTime: string;
82
+ appId: number;
83
+ appName: string;
84
+ environmentId: number;
85
+ environmentName: string;
86
+ imageTaggingData: ImageTaggingDataDTO;
87
+ image: string;
88
+ }
89
+ export interface CIMaterialInfoType extends Pick<CIMaterialInfoDTO, 'triggeredByEmail' | 'lastDeployedTime' | 'appId' | 'appName' | 'environmentId' | 'environmentName' | 'image' | 'ciPipelineId'>, ImageTaggingDataType {
90
+ materials: CIMaterialType[];
91
+ }
92
+ export interface GetCITriggerInfoParamsType {
93
+ envId: number | string;
94
+ ciArtifactId: number | string;
95
+ }
96
+ export {};
@@ -1,2 +1,4 @@
1
1
  export * from './types';
2
+ export * from './app.types';
3
+ export * from './app.service';
2
4
  export * from './common.service';
@@ -0,0 +1,3 @@
1
+ import { CIMaterialInfoDTO, CIMaterialInfoType } from './app.types';
2
+
3
+ export declare const getParsedCIMaterialInfo: (ciMaterialData: CIMaterialInfoDTO) => CIMaterialInfoType;