app-devtools 0.1.0 → 0.3.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.
- package/dist/main.d.ts +62 -0
- package/dist/main.js +2396 -0
- package/dist/main.umd.cjs +753 -0
- package/package.json +21 -16
- package/.eslintignore +0 -3
- package/.eslintrc.cjs +0 -112
- package/.gitattributes +0 -22
- package/.prettierrc +0 -10
- package/.quokka.ts +0 -115
- package/.vscode/settings.json +0 -7
- package/.vscode/snippets.code-snippets +0 -75
- package/.vscode/tasks.json +0 -17
- package/index.html +0 -46
- package/pnpm-lock.yaml +0 -5313
- package/scripts/check-if-is-sync.sh +0 -6
- package/scripts/filterFetchRequests.ts +0 -60
- package/src/Root.tsx +0 -11
- package/src/assets/icons/caret-down.svg +0 -11
- package/src/assets/icons/network.svg +0 -6
- package/src/assets/icons/search.svg +0 -3
- package/src/assets/icons/send.svg +0 -3
- package/src/assets/icons/settings.svg +0 -3
- package/src/components/ButtonElement.tsx +0 -18
- package/src/components/Icon.tsx +0 -44
- package/src/components/Section.tsx +0 -57
- package/src/components/Select.tsx +0 -101
- package/src/components/ValueVisualizer.tsx +0 -397
- package/src/config/icons.tsx +0 -23
- package/src/initializeApp.tsx +0 -28
- package/src/initializeDevTools.ts +0 -33
- package/src/main.ts +0 -42
- package/src/mocks/mockedRequests.json +0 -28391
- package/src/pages/api-explorer/ApiExplorerMenu.tsx +0 -136
- package/src/pages/api-explorer/ApiExplorerMenuItem.tsx +0 -208
- package/src/pages/api-explorer/Diff.tsx +0 -223
- package/src/pages/api-explorer/RequestDetails.tsx +0 -264
- package/src/pages/api-explorer/Timeline.tsx +0 -174
- package/src/pages/api-explorer/api-explorer.tsx +0 -21
- package/src/pages/api-explorer/getRequestPayload.tsx +0 -15
- package/src/pages/app/App.tsx +0 -79
- package/src/stores/callsStore.ts +0 -267
- package/src/stores/uiStore.ts +0 -15
- package/src/style/globalStyle.ts +0 -54
- package/src/style/helpers/allowTextSelection.ts +0 -7
- package/src/style/helpers/anchorColor.ts +0 -9
- package/src/style/helpers/centerContent.ts +0 -5
- package/src/style/helpers/circle.ts +0 -7
- package/src/style/helpers/ellipsis.ts +0 -8
- package/src/style/helpers/fillContainer.ts +0 -7
- package/src/style/helpers/gradientBorder.ts +0 -28
- package/src/style/helpers/gradientText.ts +0 -8
- package/src/style/helpers/inline.ts +0 -34
- package/src/style/helpers/mountAnim.ts +0 -26
- package/src/style/helpers/multilineEllipsis.ts +0 -8
- package/src/style/helpers/outline.ts +0 -5
- package/src/style/helpers/responsiveSize.ts +0 -27
- package/src/style/helpers/stack.ts +0 -36
- package/src/style/helpers/transition.ts +0 -63
- package/src/style/mediaQueries.ts +0 -6
- package/src/style/reset.ts +0 -75
- package/src/style/scrollBar.ts +0 -37
- package/src/style/theme.ts +0 -35
- package/src/types/global.d.ts +0 -8
- package/src/utils/initializeScreenLogger.ts +0 -12
- package/tsconfig.json +0 -36
- package/tsconfig.prod.json +0 -10
- package/tsup.config.ts +0 -7
- package/utils/arrayUtils.ts +0 -29
- package/utils/assertions.ts +0 -7
- package/utils/autoIncrementId.ts +0 -5
- package/utils/createThemev2.ts +0 -64
- package/utils/cx.ts +0 -27
- package/utils/getDiff.ts +0 -15
- package/utils/hexToRgb.ts +0 -14
- package/utils/objectUtils.ts +0 -3
- package/utils/parseUnit.ts +0 -10
- package/utils/solid.ts +0 -76
- package/utils/truncateText.ts +0 -7
- package/utils/tryExpression.ts +0 -14
- package/utils/typed.ts +0 -23
- package/utils/typings.ts +0 -40
- package/utils/urlPattern.ts +0 -25
- package/vite.config.ts +0 -46
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
type RequestSubTypes = 'delete' | 'update' | 'create' | 'custom';
|
|
2
|
+
type RequestTypes = 'fetch' | 'mutation';
|
|
3
|
+
type ApiRequest = {
|
|
4
|
+
id: string;
|
|
5
|
+
alias?: string;
|
|
6
|
+
payload: unknown;
|
|
7
|
+
response: unknown;
|
|
8
|
+
metadata: unknown;
|
|
9
|
+
status: number;
|
|
10
|
+
isError: boolean;
|
|
11
|
+
path: string;
|
|
12
|
+
searchParams: Record<string, string> | null;
|
|
13
|
+
type: RequestTypes;
|
|
14
|
+
subType: RequestSubTypes | undefined;
|
|
15
|
+
method: string | undefined;
|
|
16
|
+
startTime: number;
|
|
17
|
+
duration: number;
|
|
18
|
+
pathParams: Record<string, string | null> | null;
|
|
19
|
+
code: number | undefined;
|
|
20
|
+
tags: string[];
|
|
21
|
+
};
|
|
22
|
+
type Config = {
|
|
23
|
+
callsProcessor: {
|
|
24
|
+
match: ((request: {
|
|
25
|
+
url: URL;
|
|
26
|
+
type: RequestTypes;
|
|
27
|
+
subType: RequestSubTypes | undefined;
|
|
28
|
+
}) => boolean) | string;
|
|
29
|
+
callName?: ((request: {
|
|
30
|
+
url: URL;
|
|
31
|
+
type: RequestTypes;
|
|
32
|
+
subType?: RequestSubTypes;
|
|
33
|
+
}) => string) | string;
|
|
34
|
+
callID?: (request: {
|
|
35
|
+
url: URL;
|
|
36
|
+
type: RequestTypes;
|
|
37
|
+
subType?: RequestSubTypes;
|
|
38
|
+
}) => string;
|
|
39
|
+
payloadAlias?: (payload: any, request: ApiRequest) => string;
|
|
40
|
+
}[];
|
|
41
|
+
};
|
|
42
|
+
declare function addCall(request: {
|
|
43
|
+
payload: unknown;
|
|
44
|
+
response: unknown;
|
|
45
|
+
metadata: unknown;
|
|
46
|
+
status: number;
|
|
47
|
+
isError: boolean;
|
|
48
|
+
path: string;
|
|
49
|
+
type: RequestTypes;
|
|
50
|
+
subType?: RequestSubTypes;
|
|
51
|
+
method?: string;
|
|
52
|
+
startTime?: number;
|
|
53
|
+
duration?: number;
|
|
54
|
+
tags?: string[];
|
|
55
|
+
}): () => void;
|
|
56
|
+
|
|
57
|
+
declare function initializeDevTools({ callsProcessor, shortcut, }: {
|
|
58
|
+
callsProcessor: Config['callsProcessor'];
|
|
59
|
+
shortcut?: string;
|
|
60
|
+
}): void;
|
|
61
|
+
|
|
62
|
+
export { addCall, initializeDevTools };
|