@har-analyzer/components 0.0.10 → 0.0.11

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 (61) hide show
  1. package/README.md +125 -43
  2. package/dist/chunks/har.js +27 -27
  3. package/dist/chunks/index.js +186 -44
  4. package/dist/chunks/json.js +10 -0
  5. package/dist/components/collapsible-key-value-list.d.ts +9 -0
  6. package/dist/components/collapsible-section.d.ts +5 -0
  7. package/dist/components/enhanced-board/constants/i18n.d.ts +21 -0
  8. package/dist/components/enhanced-board/index.d.ts +15 -0
  9. package/dist/components/enhanced-table.d.ts +47 -0
  10. package/dist/components/enhanced-top-navigation.d.ts +7 -0
  11. package/dist/components/error-boundary.d.ts +1 -0
  12. package/dist/components/horizontal-gap.d.ts +6 -0
  13. package/dist/components/json-viewer.d.ts +3 -0
  14. package/dist/components/simple-app-layout.d.ts +6 -0
  15. package/dist/components/simple-app-preferences/content-width-switcher.d.ts +1 -0
  16. package/dist/components/simple-app-preferences/index.d.ts +1 -0
  17. package/dist/components/simple-app-preferences/theme-switcher.d.ts +1 -0
  18. package/dist/components/vertical-gap.d.ts +6 -0
  19. package/dist/features/har-analyzer/index.d.ts +5 -0
  20. package/dist/features/har-analyzer-preferences/index.d.ts +7 -0
  21. package/dist/features/har-entries-viewer/components/har-entries-filters/components/content-type-filter.d.ts +7 -0
  22. package/dist/features/har-entries-viewer/components/har-entries-filters/components/errors-filter.d.ts +6 -0
  23. package/dist/features/har-entries-viewer/components/har-entries-filters/index.d.ts +1 -0
  24. package/dist/features/har-entries-viewer/hooks/preferences.d.ts +2 -0
  25. package/dist/features/har-entries-viewer/index.d.ts +7 -0
  26. package/dist/features/har-file-uploader/file-upload-error.d.ts +5 -0
  27. package/dist/features/har-file-uploader/index.d.ts +8 -0
  28. package/dist/features/list-har-entries/index.d.ts +8 -0
  29. package/dist/features/view-har-entry/components/content-viewer.d.ts +7 -0
  30. package/dist/features/view-har-entry/components/headers-viewer.d.ts +6 -0
  31. package/dist/features/view-har-entry/components/payload-viewer.d.ts +6 -0
  32. package/dist/features/view-har-entry/components/response-viewer.d.ts +6 -0
  33. package/dist/features/view-har-entry/index.d.ts +5 -0
  34. package/dist/har-analyzer-preferences.js +21 -92
  35. package/dist/har-analyzer.js +72 -75
  36. package/dist/har-entries-viewer.js +7 -2117
  37. package/dist/har-file-uploader.js +18 -18
  38. package/dist/hooks/app-preferences.d.ts +2 -0
  39. package/dist/hooks/board-preferences.d.ts +2 -0
  40. package/dist/hooks/table-preferences.d.ts +12 -0
  41. package/dist/index.d.ts +8 -77
  42. package/dist/index.js +17 -16
  43. package/dist/list-har-entries.js +2131 -0
  44. package/dist/utils/common.d.ts +2 -0
  45. package/dist/utils/content-type.d.ts +4 -0
  46. package/dist/utils/date.d.ts +2 -0
  47. package/dist/utils/file-upload.d.ts +3 -0
  48. package/dist/utils/har.d.ts +17 -0
  49. package/dist/utils/json.d.ts +1 -0
  50. package/dist/view-har-entry.js +3130 -0
  51. package/package.json +3 -3
  52. package/dist/har-analyzer-preferences.d.ts +0 -18
  53. package/dist/har-analyzer.d.ts +0 -11
  54. package/dist/har-content-viewer.d.ts +0 -14
  55. package/dist/har-content-viewer.js +0 -150
  56. package/dist/har-entries-filters.d.ts +0 -23
  57. package/dist/har-entries-filters.js +0 -7
  58. package/dist/har-entries-viewer.d.ts +0 -26
  59. package/dist/har-entry-viewer.d.ts +0 -24
  60. package/dist/har-entry-viewer.js +0 -1145
  61. package/dist/har-file-uploader.d.ts +0 -16
@@ -0,0 +1,2 @@
1
+ export declare function objectKeys<T extends object>(obj: T): Array<keyof T>;
2
+ export declare function objectEntries<T extends object>(obj: T): Array<[keyof T, T[keyof T]]>;
@@ -0,0 +1,4 @@
1
+ export declare const CONTENT_TYPE_GROUPS: readonly [...("JSON" | "XML" | "JS" | "CSS" | "HTML" | "Doc" | "Img" | "Font" | "Media")[], "Other"];
2
+ export type ContentTypeGroup = (typeof CONTENT_TYPE_GROUPS)[number];
3
+ export declare function getContentTypeGroup(mimeType?: string): ContentTypeGroup;
4
+ export declare function getSyntaxHighlight(mimeType?: string): ((code: string) => import('react').ReactNode) | undefined;
@@ -0,0 +1,2 @@
1
+ export declare function getFormattedCurrentTimeZone(): string;
2
+ export declare function getFormattedDateTime(dateString: string, timeZone?: string): string;
@@ -0,0 +1,3 @@
1
+ export declare const SUPPORT_FILE_EXT = ".har";
2
+ export declare function getFilesErrors(files: File[]): string[];
3
+ export declare function readFileContents(file: File | undefined): Promise<unknown>;
@@ -0,0 +1,17 @@
1
+ import { Har } from 'har-format';
2
+ import { ContentTypeGroup } from './content-type';
3
+ export type HARContent = Har;
4
+ export declare function getHARContentFromFile(fileContent: unknown): HARContent;
5
+ type HAREntryWithoutError = HARContent['log']['entries'][number];
6
+ type HARResponseWithError = HAREntryWithoutError['response'] & {
7
+ _error?: string;
8
+ };
9
+ export type HAREntry = Omit<HAREntryWithoutError, 'response'> & {
10
+ response: HARResponseWithError;
11
+ };
12
+ export declare function getHAREntriesFilteredByContentType(harEntries: HAREntry[], contentTypeFilters: ContentTypeGroup[]): HAREntry[];
13
+ export declare function isErrorResponse(harEntry: HAREntry): boolean;
14
+ export declare function getHAREntriesWithErrorResponse(harEntries: HAREntry[]): HAREntry[];
15
+ export declare function getUniqueHeaderNames(harEntries: HAREntry[], type: 'request' | 'response'): string[];
16
+ export declare function getHAREntryId(harEntry: HAREntry): string;
17
+ export {};
@@ -0,0 +1 @@
1
+ export declare function safeDeserialize<T>(jsonString: string): readonly [T, undefined] | readonly [undefined, unknown];