From 11cceaa02c6ddb241f1ccccbd976fbf0443d4836 Mon Sep 17 00:00:00 2001 From: Joe Karow <58997957+JoeKarow@users.noreply.github.com> Date: Mon, 6 Feb 2023 14:47:43 -0500 Subject: [PATCH 1/7] feat: use collapsable JSON viewer --- packages/trpc-panel/package.json | 75 ++++++++++--------- .../form/ProcedureForm/RequestResult.tsx | 4 +- .../form/ProcedureForm/Response.tsx | 11 ++- .../components/form/ProcedureForm/index.tsx | 2 +- 4 files changed, 51 insertions(+), 41 deletions(-) diff --git a/packages/trpc-panel/package.json b/packages/trpc-panel/package.json index 9a86042..5d9eb55 100644 --- a/packages/trpc-panel/package.json +++ b/packages/trpc-panel/package.json @@ -1,36 +1,13 @@ { - "name": "trpc-panel", - "version": "1.0.2", - "description": "UI for testing tRPC backends", - "main": "lib/index.js", - "module": "lib/index.mjs", - "typings": "lib/src/index.d.ts", - "scripts": { - "test": "jest", - "test:watch": "jest --watchAll", - "build": "npx rollup --bundleConfigAsCjs --config rollup.config.js", - "dev": "rollup --config rollup.config.js --watch --bundleConfigAsCjs" - }, "author": "", - "license": "ISC", - "exports": { - ".": { - "types": "./lib/src/index.d.ts", - "import": "./lib/index.mjs", - "require": "./lib/index.js", - "default": "./lib/index.js" - } - }, - "files": [ - "lib/" - ], - "directories": { - "lib": "lib" - }, - "peerDependencies": { - "@trpc/server": "^10.0.0", - "zod": "^3.19.1" + "dependencies": { + "@textea/json-viewer": "^2.13.1", + "fuzzysort": "^2.0.4", + "path": "^0.12.7", + "url": "^0.11.0", + "zod-to-json-schema": "^3.20.0" }, + "description": "UI for testing tRPC backends", "devDependencies": { "@babel/core": "^7.20.2", "@babel/preset-react": "^7.18.6", @@ -87,10 +64,34 @@ "zod": "^3.19.1", "zustand": "^4.1.5" }, - "dependencies": { - "fuzzysort": "^2.0.4", - "path": "^0.12.7", - "url": "^0.11.0", - "zod-to-json-schema": "^3.20.0" - } -} + "directories": { + "lib": "lib" + }, + "exports": { + ".": { + "default": "./lib/index.js", + "import": "./lib/index.mjs", + "require": "./lib/index.js", + "types": "./lib/src/index.d.ts" + } + }, + "files": [ + "lib/" + ], + "license": "ISC", + "main": "lib/index.js", + "module": "lib/index.mjs", + "name": "trpc-panel", + "peerDependencies": { + "@trpc/server": "^10.0.0", + "zod": "^3.19.1" + }, + "scripts": { + "build": "npx rollup --bundleConfigAsCjs --config rollup.config.js", + "dev": "rollup --config rollup.config.js --watch --bundleConfigAsCjs", + "test": "jest", + "test:watch": "jest --watchAll" + }, + "typings": "lib/src/index.d.ts", + "version": "1.0.2" +} \ No newline at end of file diff --git a/packages/trpc-panel/src/react-app/components/form/ProcedureForm/RequestResult.tsx b/packages/trpc-panel/src/react-app/components/form/ProcedureForm/RequestResult.tsx index 981c595..6de358c 100644 --- a/packages/trpc-panel/src/react-app/components/form/ProcedureForm/RequestResult.tsx +++ b/packages/trpc-panel/src/react-app/components/form/ProcedureForm/RequestResult.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Response } from "./Response"; -import json from "json-bigint"; + export function RequestResult({ result }: { result: any }) { - return {`${json.stringify(result, null, 2)}`}; + return {result}; } diff --git a/packages/trpc-panel/src/react-app/components/form/ProcedureForm/Response.tsx b/packages/trpc-panel/src/react-app/components/form/ProcedureForm/Response.tsx index fddaea3..b0a9c97 100644 --- a/packages/trpc-panel/src/react-app/components/form/ProcedureForm/Response.tsx +++ b/packages/trpc-panel/src/react-app/components/form/ProcedureForm/Response.tsx @@ -1,7 +1,16 @@ import React from "react"; import { FormSection } from "./FormSection"; +import { JsonViewer } from "@textea/json-viewer"; + +export function Response({ children }: { children: string | object }) { + if (typeof children === "object") { + return ( + + + + ); + } -export function Response({ children }: { children: string }) { return (

{children}

diff --git a/packages/trpc-panel/src/react-app/components/form/ProcedureForm/index.tsx b/packages/trpc-panel/src/react-app/components/form/ProcedureForm/index.tsx index d96fecf..b4d3884 100644 --- a/packages/trpc-panel/src/react-app/components/form/ProcedureForm/index.tsx +++ b/packages/trpc-panel/src/react-app/components/form/ProcedureForm/index.tsx @@ -205,7 +205,7 @@ export function ProcedureForm({ (isTrpcError(error) ? ( ) : ( - {JSON.stringify(error)} + {error} ))} From 7ebbc3a30f095b87a1f0daaf0181132fc2598c8f Mon Sep 17 00:00:00 2001 From: Joe Karow <58997957+JoeKarow@users.noreply.github.com> Date: Thu, 6 Apr 2023 12:05:07 -0400 Subject: [PATCH 2/7] disable quotes on keys --- .../src/react-app/components/form/ProcedureForm/Response.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/trpc-panel/src/react-app/components/form/ProcedureForm/Response.tsx b/packages/trpc-panel/src/react-app/components/form/ProcedureForm/Response.tsx index b0a9c97..b462e91 100644 --- a/packages/trpc-panel/src/react-app/components/form/ProcedureForm/Response.tsx +++ b/packages/trpc-panel/src/react-app/components/form/ProcedureForm/Response.tsx @@ -6,7 +6,7 @@ export function Response({ children }: { children: string | object }) { if (typeof children === "object") { return ( - + ); } From d87885cd8c874ab7d2a607dde973a572a550f6d1 Mon Sep 17 00:00:00 2001 From: Joe Karow <58997957+JoeKarow@users.noreply.github.com> Date: Thu, 6 Apr 2023 13:52:35 -0400 Subject: [PATCH 3/7] update lock --- yarn.lock | 55 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 13 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7db8cf4..a2ebfc3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -415,7 +415,7 @@ resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.0.tgz#f580f9beb67176fa57aae70b08ed510e1b18980f" integrity sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA== -"@emotion/react@^11.10.5": +"@emotion/react@^11.10.5", "@emotion/react@^11.10.6": version "11.10.6" resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.10.6.tgz#dbe5e650ab0f3b1d2e592e6ab1e006e75fd9ac11" integrity sha512-6HT8jBmcSkfzO7mc+N1L9uwvOnlcGoix8Zn7srt+9ga0MjREo6lRpuVX0kzo6Jp6oTqDhREOFsygN6Ew4fEQbw== @@ -445,7 +445,7 @@ resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.2.1.tgz#0767e0305230e894897cadb6c8df2c51e61a6c2c" integrity sha512-zxRBwl93sHMsOj4zs+OslQKg/uhF38MB+OMKoCrVuS0nyTkqnau+BM3WGEoOptg9Oz45T/aIGs1qbVAsEFo3nA== -"@emotion/styled@^11.10.5": +"@emotion/styled@^11.10.5", "@emotion/styled@^11.10.6": version "11.10.6" resolved "https://registry.yarnpkg.com/@emotion/styled/-/styled-11.10.6.tgz#d886afdc51ef4d66c787ebde848f3cc8b117ebba" integrity sha512-OXtBzOmDSJo5Q0AFemHCfl+bUueT8BIcPSxu0EGTpGk6DmI5dnhSzQANm1e1ze0YZL7TDyAyy6s/b/zmGOS3Og== @@ -825,17 +825,17 @@ dependencies: "@babel/runtime" "^7.21.0" -"@mui/material@^5.10.16": - version "5.12.1" - resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.12.1.tgz#3297ffc6836f426a26568332d68357c1398f0630" - integrity sha512-m+G9J6+FzIMhRqKV2y30yONH97wX107z9EWgiNCeS1/+y1CnytFZNG1ENdOuaJo1NimCRnmB/iXPvoOaSo6dOg== +"@mui/material@^5.10.16", "@mui/material@^5.11.14": + version "5.11.16" + resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.11.16.tgz#958cb7bcfa71d889c2585516f012ab3363af843c" + integrity sha512-++glQqbZ3rMzOWB77yOvqRG+k8+scYTUKVWZpWff+GWsf6L10g9L2wgRhhAS8bDLuxCbXZlPNbSZowXDDw6z6Q== dependencies: "@babel/runtime" "^7.21.0" - "@mui/base" "5.0.0-alpha.126" - "@mui/core-downloads-tracker" "^5.12.1" - "@mui/system" "^5.12.1" - "@mui/types" "^7.2.4" - "@mui/utils" "^5.12.0" + "@mui/base" "5.0.0-alpha.124" + "@mui/core-downloads-tracker" "^5.11.16" + "@mui/system" "^5.11.16" + "@mui/types" "^7.2.3" + "@mui/utils" "^5.11.13" "@types/react-transition-group" "^4.4.5" clsx "^1.2.1" csstype "^3.1.2" @@ -1176,7 +1176,24 @@ resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-14.4.3.tgz#af975e367743fa91989cd666666aec31a8f50591" integrity sha512-kCUc5MEwaEMakkO5x7aoD+DLi02ehmEM2QCGWvNqAS1dV/fAvORWEjnjsEIvml59M7Y5kCkWN6fCCyPOe8OL6Q== -"@trpc/client@^10.0.0", "@trpc/client@^10.18.0", "@trpc/client@^10.2.0": +"@textea/json-viewer@^2.13.1": + version "2.16.2" + resolved "https://registry.yarnpkg.com/@textea/json-viewer/-/json-viewer-2.16.2.tgz#eebb82d63c78959d849b3cb03246c3eca4bfc3c3" + integrity sha512-ZPRNpcLJ+hOO6C8tzkQvltRSp7Ol73j8oJ1+w5mWVWn+JR1QqzZJJgBqnNZvs3S1h/jJAjwyeZUVlb0VtIJcvg== + dependencies: + "@emotion/react" "^11.10.6" + "@emotion/styled" "^11.10.6" + "@mui/material" "^5.11.14" + clsx "^1.2.1" + copy-to-clipboard "^3.3.3" + zustand "^4.3.6" + +"@trpc/client@^10.0.0": + version "10.18.0" + resolved "https://registry.yarnpkg.com/@trpc/client/-/client-10.18.0.tgz#02d03ed47e34d6b8a3d3ee0e1f11e6074c2ece18" + integrity sha512-2d+6r2C/xygTjDWX9jT66defgHzbQP0Z8vrvyT3XtPjqU6JNlRNuS2ZtB8xDPdOQUUVnndzZ43BMr+Zu49K0OQ== + +"@trpc/client@^10.18.0", "@trpc/client@^10.2.0": version "10.21.1" resolved "https://registry.yarnpkg.com/@trpc/client/-/client-10.21.1.tgz#1cc86ffddaabd7368b43b50070f2ca98bbfc460d" integrity sha512-oZgPbghs9y2frTCA9mZPSAlVknV9stCTKYO5nsvRr0aX+oaA0URoXJTKZTSpLZxLfuwWgxBj4iTiCWWWmaVelw== @@ -2756,6 +2773,13 @@ copy-props@^2.0.1: each-props "^1.3.2" is-plain-object "^5.0.0" +copy-to-clipboard@^3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz#55ac43a1db8ae639a4bd99511c148cdd1b83a1b0" + integrity sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA== + dependencies: + toggle-selection "^1.0.6" + core-util-is@~1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" @@ -8616,6 +8640,11 @@ to-through@^2.0.0: dependencies: through2 "^2.0.3" +toggle-selection@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32" + integrity sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ== + toidentifier@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" @@ -9224,7 +9253,7 @@ zod@^3.19.1, zod@^3.21.4: resolved "https://registry.yarnpkg.com/zod/-/zod-3.21.4.tgz#10882231d992519f0a10b5dd58a38c9dabbb64db" integrity sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw== -zustand@^4.1.5: +zustand@^4.1.5, zustand@^4.3.6: version "4.3.7" resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.3.7.tgz#501b1f0393a7f1d103332e45ab574be5747fedce" integrity sha512-dY8ERwB9Nd21ellgkBZFhudER8KVlelZm8388B5nDAXhO/+FZDhYMuRnqDgu5SYyRgz/iaf8RKnbUs/cHfOGlQ== From 6d635b206625aaa2cb732cf011b8ab1ba3411ee6 Mon Sep 17 00:00:00 2001 From: Joe Karow <58997957+JoeKarow@users.noreply.github.com> Date: Thu, 6 Apr 2023 22:26:59 -0400 Subject: [PATCH 4/7] fix lockfile --- yarn.lock | 162 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 106 insertions(+), 56 deletions(-) diff --git a/yarn.lock b/yarn.lock index a2ebfc3..48fae3b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -324,6 +324,13 @@ dependencies: regenerator-runtime "^0.13.11" +"@babel/runtime@^7.23.4": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.5.tgz#11edb98f8aeec529b82b211028177679144242db" + integrity sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/template@^7.20.7", "@babel/template@^7.3.3": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8" @@ -387,7 +394,7 @@ source-map "^0.5.7" stylis "4.1.3" -"@emotion/cache@^11.10.5", "@emotion/cache@^11.10.7": +"@emotion/cache@^11.10.5": version "11.10.7" resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.10.7.tgz#2e3b12d3c7c74db0a020ae79eefc52a1b03a6908" integrity sha512-VLl1/2D6LOjH57Y8Vem1RoZ9haWF4jesHDGiHtKozDQuBIkJm2gimVo0I02sWCuzZtVACeixTVB4jeE8qvCBoQ== @@ -398,6 +405,17 @@ "@emotion/weak-memoize" "^0.3.0" stylis "4.1.3" +"@emotion/cache@^11.11.0": + version "11.11.0" + resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.11.0.tgz#809b33ee6b1cb1a625fef7a45bc568ccd9b8f3ff" + integrity sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ== + dependencies: + "@emotion/memoize" "^0.8.1" + "@emotion/sheet" "^1.2.2" + "@emotion/utils" "^1.2.1" + "@emotion/weak-memoize" "^0.3.1" + stylis "4.2.0" + "@emotion/hash@^0.9.0": version "0.9.0" resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.9.0.tgz#c5153d50401ee3c027a57a177bc269b16d889cb7" @@ -415,6 +433,11 @@ resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.0.tgz#f580f9beb67176fa57aae70b08ed510e1b18980f" integrity sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA== +"@emotion/memoize@^0.8.1": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.1.tgz#c1ddb040429c6d21d38cc945fe75c818cfb68e17" + integrity sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA== + "@emotion/react@^11.10.5", "@emotion/react@^11.10.6": version "11.10.6" resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.10.6.tgz#dbe5e650ab0f3b1d2e592e6ab1e006e75fd9ac11" @@ -445,6 +468,11 @@ resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.2.1.tgz#0767e0305230e894897cadb6c8df2c51e61a6c2c" integrity sha512-zxRBwl93sHMsOj4zs+OslQKg/uhF38MB+OMKoCrVuS0nyTkqnau+BM3WGEoOptg9Oz45T/aIGs1qbVAsEFo3nA== +"@emotion/sheet@^1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.2.2.tgz#d58e788ee27267a14342303e1abb3d508b6d0fec" + integrity sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA== + "@emotion/styled@^11.10.5", "@emotion/styled@^11.10.6": version "11.10.6" resolved "https://registry.yarnpkg.com/@emotion/styled/-/styled-11.10.6.tgz#d886afdc51ef4d66c787ebde848f3cc8b117ebba" @@ -472,11 +500,21 @@ resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.2.0.tgz#9716eaccbc6b5ded2ea5a90d65562609aab0f561" integrity sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw== +"@emotion/utils@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.2.1.tgz#bbab58465738d31ae4cb3dbb6fc00a5991f755e4" + integrity sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg== + "@emotion/weak-memoize@^0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz#ea89004119dc42db2e1dba0f97d553f7372f6fcb" integrity sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg== +"@emotion/weak-memoize@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz#d0fce5d07b0620caa282b5131c297bb60f9d87e6" + integrity sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww== + "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -799,24 +837,24 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" -"@mui/base@5.0.0-alpha.126": - version "5.0.0-alpha.126" - resolved "https://registry.yarnpkg.com/@mui/base/-/base-5.0.0-alpha.126.tgz#99555a5876a60e7dad772d75eb171e3d1336321d" - integrity sha512-I5e52A0Muv9Gaoy2GcqbYrQ6dpRyC2UXeA00brT3HuW0nF0E4fiTOIqdNTN+N5gyaYK0z3O6jtLt/97CCrIxVA== +"@mui/base@5.0.0-alpha.124": + version "5.0.0-alpha.124" + resolved "https://registry.yarnpkg.com/@mui/base/-/base-5.0.0-alpha.124.tgz#164068642e41ba655fd2b9eaf881526909a41201" + integrity sha512-I6M+FrjRCybQCr8I8JTu6L2MkUobSQFgNIpOJyDNKL5zq/73LvZIQXvsKumAzthVGvI1PYaarM9vGDrDYbumKA== dependencies: "@babel/runtime" "^7.21.0" "@emotion/is-prop-valid" "^1.2.0" - "@mui/types" "^7.2.4" - "@mui/utils" "^5.12.0" + "@mui/types" "^7.2.3" + "@mui/utils" "^5.11.13" "@popperjs/core" "^2.11.7" clsx "^1.2.1" prop-types "^15.8.1" react-is "^18.2.0" -"@mui/core-downloads-tracker@^5.12.1": - version "5.12.1" - resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-5.12.1.tgz#f828554889e6ab7345395626bb46e561c113435e" - integrity sha512-rNiQYHtkXljcvCEnhWrJzie1ifff5O98j3uW7ZlchFgD8HWxEcz/QoxZvo+sCKC9aayAgxi9RsVn2VjCyp5CrA== +"@mui/core-downloads-tracker@^5.11.16": + version "5.14.19" + resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.19.tgz#9c04ad047c378d857d529ef9c535b60a10b9a47c" + integrity sha512-y4JseIen5pmZs1n9hHy95HKKioKco8f6N2lford2AmjJigVJOv0KsU0qryiCpyuEUZmi/xCduVilHsK9DSkPcA== "@mui/icons-material@^5.10.16": version "5.11.16" @@ -843,52 +881,51 @@ react-is "^18.2.0" react-transition-group "^4.4.5" -"@mui/private-theming@^5.12.0": - version "5.12.0" - resolved "https://registry.yarnpkg.com/@mui/private-theming/-/private-theming-5.12.0.tgz#5f1e6fd09b1447c387fdac1eef7f23efca5c6d69" - integrity sha512-w5dwMen1CUm1puAtubqxY9BIzrBxbOThsg2iWMvRJmWyJAPdf3Z583fPXpqeA2lhTW79uH2jajk5Ka4FuGlTPg== +"@mui/private-theming@^5.14.19": + version "5.14.19" + resolved "https://registry.yarnpkg.com/@mui/private-theming/-/private-theming-5.14.19.tgz#f3bae7377f987dc5f40d0c43163ae1ed1f892961" + integrity sha512-U9w39VpXLGVM8wZlUU/47YGTsBSk60ZQRRxQZtdqPfN1N7OVllQeN4cEKZKR8PjqqR3aYRcSciQ4dc6CttRoXQ== dependencies: - "@babel/runtime" "^7.21.0" - "@mui/utils" "^5.12.0" + "@babel/runtime" "^7.23.4" + "@mui/utils" "^5.14.19" prop-types "^15.8.1" -"@mui/styled-engine@^5.12.0": - version "5.12.0" - resolved "https://registry.yarnpkg.com/@mui/styled-engine/-/styled-engine-5.12.0.tgz#44640cad961adcc9413ae32116237cd1c8f7ddb0" - integrity sha512-frh8L7CRnvD0RDmIqEv6jFeKQUIXqW90BaZ6OrxJ2j4kIsiVLu29Gss4SbBvvrWwwatR72sBmC3w1aG4fjp9mQ== +"@mui/styled-engine@^5.14.19": + version "5.14.19" + resolved "https://registry.yarnpkg.com/@mui/styled-engine/-/styled-engine-5.14.19.tgz#dee1d16044a5ef3a783b742381ea4348c159b013" + integrity sha512-jtj/Pyn/bS8PM7NXdFNTHWZfE3p+vItO4/HoQbUeAv3u+cnWXcTBGHHY/xdIn446lYGFDczTh1YyX8G4Ts0Rtg== dependencies: - "@babel/runtime" "^7.21.0" - "@emotion/cache" "^11.10.7" + "@babel/runtime" "^7.23.4" + "@emotion/cache" "^11.11.0" csstype "^3.1.2" prop-types "^15.8.1" -"@mui/system@^5.12.1": - version "5.12.1" - resolved "https://registry.yarnpkg.com/@mui/system/-/system-5.12.1.tgz#8452bc03159f0a6725b96bde1dee1316e308231b" - integrity sha512-Po+sicdV3bbRYXdU29XZaHPZrW7HUYUqU1qCu77GCCEMbahC756YpeyefdIYuPMUg0OdO3gKIUfDISBrkjJL+w== - dependencies: - "@babel/runtime" "^7.21.0" - "@mui/private-theming" "^5.12.0" - "@mui/styled-engine" "^5.12.0" - "@mui/types" "^7.2.4" - "@mui/utils" "^5.12.0" - clsx "^1.2.1" +"@mui/system@^5.11.16": + version "5.14.19" + resolved "https://registry.yarnpkg.com/@mui/system/-/system-5.14.19.tgz#f13387c60af129e4d61dfbf168fcee348ebe952a" + integrity sha512-4e3Q+2nx+vgEsd0h5ftxlZGB7XtkkPos/zWqCqnxUs1l/T70s0lF2YNrWHHdSQ7LgtBu0eQ0qweZG2pR7KwkAw== + dependencies: + "@babel/runtime" "^7.23.4" + "@mui/private-theming" "^5.14.19" + "@mui/styled-engine" "^5.14.19" + "@mui/types" "^7.2.10" + "@mui/utils" "^5.14.19" + clsx "^2.0.0" csstype "^3.1.2" prop-types "^15.8.1" -"@mui/types@^7.2.4": - version "7.2.4" - resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.2.4.tgz#b6fade19323b754c5c6de679a38f068fd50b9328" - integrity sha512-LBcwa8rN84bKF+f5sDyku42w1NTxaPgPyYKODsh01U1fVstTClbUoSA96oyRBnSNyEiAVjKm6Gwx9vjR+xyqHA== +"@mui/types@^7.2.10", "@mui/types@^7.2.3": + version "7.2.10" + resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.2.10.tgz#13e3e9aa07ee6d593cfacd538e02e8e896d7a12f" + integrity sha512-wX1vbDC+lzF7FlhT6A3ffRZgEoKWPF8VqRoTu4lZwouFX2t90KyCMsgepMw5DxLak1BSp/KP86CmtZttikb/gQ== -"@mui/utils@^5.12.0": - version "5.12.0" - resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.12.0.tgz#284db48b36ac26f3d34076379072c1dc8aed1ad0" - integrity sha512-RmQwgzF72p7Yr4+AAUO6j1v2uzt6wr7SWXn68KBsnfVpdOHyclCzH2lr/Xu6YOw9su4JRtdAIYfJFXsS6Cjkmw== +"@mui/utils@^5.11.13", "@mui/utils@^5.14.19": + version "5.14.19" + resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.14.19.tgz#39a5846a74ba199f1a2b067ea197dc6b9c8f442f" + integrity sha512-qAHvTXzk7basbyqPvhgWqN6JbmI2wLB/mf97GkSlz5c76MiKYV6Ffjvw9BjKZQ1YRb8rDX9kgdjRezOcoB91oQ== dependencies: - "@babel/runtime" "^7.21.0" - "@types/prop-types" "^15.7.5" - "@types/react-is" "^16.7.1 || ^17.0.0" + "@babel/runtime" "^7.23.4" + "@types/prop-types" "^15.7.11" prop-types "^15.8.1" react-is "^18.2.0" @@ -1194,9 +1231,9 @@ integrity sha512-2d+6r2C/xygTjDWX9jT66defgHzbQP0Z8vrvyT3XtPjqU6JNlRNuS2ZtB8xDPdOQUUVnndzZ43BMr+Zu49K0OQ== "@trpc/client@^10.18.0", "@trpc/client@^10.2.0": - version "10.21.1" - resolved "https://registry.yarnpkg.com/@trpc/client/-/client-10.21.1.tgz#1cc86ffddaabd7368b43b50070f2ca98bbfc460d" - integrity sha512-oZgPbghs9y2frTCA9mZPSAlVknV9stCTKYO5nsvRr0aX+oaA0URoXJTKZTSpLZxLfuwWgxBj4iTiCWWWmaVelw== + version "10.19.1" + resolved "https://registry.yarnpkg.com/@trpc/client/-/client-10.19.1.tgz#3e8aff4abaff38c39ca275052768c957ff217ea3" + integrity sha512-H61dIgoAjiA7/SfuHlUAsqshhaxOSSRFyEfaoBwYvXzLyno+fvQRUXvxpsC4A8IsDuNX2pxiggAK8AwTNKqIzg== "@trpc/next@^10.18.0": version "10.21.1" @@ -1462,11 +1499,16 @@ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== -"@types/prop-types@*", "@types/prop-types@^15.7.5": +"@types/prop-types@*": version "15.7.5" resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== +"@types/prop-types@^15.7.11": + version "15.7.11" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.11.tgz#2596fb352ee96a1379c657734d4b913a613ad563" + integrity sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng== + "@types/q@^1.5.1": version "1.5.5" resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.5.tgz#75a2a8e7d8ab4b230414505d92335d1dcb53a6df" @@ -1489,13 +1531,6 @@ dependencies: "@types/react" "*" -"@types/react-is@^16.7.1 || ^17.0.0": - version "17.0.3" - resolved "https://registry.yarnpkg.com/@types/react-is/-/react-is-17.0.3.tgz#2d855ba575f2fc8d17ef9861f084acc4b90a137a" - integrity sha512-aBTIWg1emtu95bLTLx0cpkxwGW3ueZv71nE2YFBpL8k/z5czEW8yYpOo8Dp+UUAFAtKwNaOsh/ioSeQnWlZcfw== - dependencies: - "@types/react" "*" - "@types/react-transition-group@^4.4.5": version "4.4.5" resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.5.tgz#aae20dcf773c5aa275d5b9f7cdbca638abc5e416" @@ -2577,6 +2612,11 @@ clsx@^1.2.1: resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== +clsx@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.0.0.tgz#12658f3fd98fafe62075595a5c30e43d18f3d00b" + integrity sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q== + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -7517,6 +7557,11 @@ regenerator-runtime@^0.13.11: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== +regenerator-runtime@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" + integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== + regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" @@ -8313,6 +8358,11 @@ stylis@4.1.3: resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.3.tgz#fd2fbe79f5fed17c55269e16ed8da14c84d069f7" integrity sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA== +stylis@4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.2.0.tgz#79daee0208964c8fe695a42fcffcac633a211a51" + integrity sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw== + sucrase@^3.29.0: version "3.32.0" resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.32.0.tgz#c4a95e0f1e18b6847127258a75cf360bc568d4a7" From d2731f127ed9932ead2488542667fd0df6f551dd Mon Sep 17 00:00:00 2001 From: Joe Karow <58997957+JoeKarow@users.noreply.github.com> Date: Mon, 24 Apr 2023 09:39:03 -0400 Subject: [PATCH 5/7] fix lockfile conflicts --- yarn.lock | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/yarn.lock b/yarn.lock index 48fae3b..ad2b050 100644 --- a/yarn.lock +++ b/yarn.lock @@ -864,16 +864,16 @@ "@babel/runtime" "^7.21.0" "@mui/material@^5.10.16", "@mui/material@^5.11.14": - version "5.11.16" - resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.11.16.tgz#958cb7bcfa71d889c2585516f012ab3363af843c" - integrity sha512-++glQqbZ3rMzOWB77yOvqRG+k8+scYTUKVWZpWff+GWsf6L10g9L2wgRhhAS8bDLuxCbXZlPNbSZowXDDw6z6Q== + version "5.12.1" + resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.12.1.tgz#3297ffc6836f426a26568332d68357c1398f0630" + integrity sha512-m+G9J6+FzIMhRqKV2y30yONH97wX107z9EWgiNCeS1/+y1CnytFZNG1ENdOuaJo1NimCRnmB/iXPvoOaSo6dOg== dependencies: "@babel/runtime" "^7.21.0" - "@mui/base" "5.0.0-alpha.124" - "@mui/core-downloads-tracker" "^5.11.16" - "@mui/system" "^5.11.16" - "@mui/types" "^7.2.3" - "@mui/utils" "^5.11.13" + "@mui/base" "5.0.0-alpha.126" + "@mui/core-downloads-tracker" "^5.12.1" + "@mui/system" "^5.12.1" + "@mui/types" "^7.2.4" + "@mui/utils" "^5.12.0" "@types/react-transition-group" "^4.4.5" clsx "^1.2.1" csstype "^3.1.2" @@ -1226,9 +1226,9 @@ zustand "^4.3.6" "@trpc/client@^10.0.0": - version "10.18.0" - resolved "https://registry.yarnpkg.com/@trpc/client/-/client-10.18.0.tgz#02d03ed47e34d6b8a3d3ee0e1f11e6074c2ece18" - integrity sha512-2d+6r2C/xygTjDWX9jT66defgHzbQP0Z8vrvyT3XtPjqU6JNlRNuS2ZtB8xDPdOQUUVnndzZ43BMr+Zu49K0OQ== + version "10.21.1" + resolved "https://registry.yarnpkg.com/@trpc/client/-/client-10.21.1.tgz#1cc86ffddaabd7368b43b50070f2ca98bbfc460d" + integrity sha512-oZgPbghs9y2frTCA9mZPSAlVknV9stCTKYO5nsvRr0aX+oaA0URoXJTKZTSpLZxLfuwWgxBj4iTiCWWWmaVelw== "@trpc/client@^10.18.0", "@trpc/client@^10.2.0": version "10.19.1" From 5ec8eeb4eb7bf2a799de75ef1b4e7f07f041d92e Mon Sep 17 00:00:00 2001 From: Joe Karow <58997957+JoeKarow@users.noreply.github.com> Date: Mon, 1 May 2023 16:42:42 -0400 Subject: [PATCH 6/7] update json-viewer, add response size & time --- packages/trpc-panel/package.json | 7 ++- .../form/ProcedureForm/RequestResult.tsx | 16 ++++- .../form/ProcedureForm/Response.tsx | 24 ++++++- .../components/form/ProcedureForm/index.tsx | 22 ++++++- yarn.lock | 63 ++++++++++++------- 5 files changed, 100 insertions(+), 32 deletions(-) diff --git a/packages/trpc-panel/package.json b/packages/trpc-panel/package.json index 5d9eb55..9b61657 100644 --- a/packages/trpc-panel/package.json +++ b/packages/trpc-panel/package.json @@ -1,9 +1,12 @@ { "author": "", "dependencies": { - "@textea/json-viewer": "^2.13.1", + "@textea/json-viewer": "^3.0.0", "fuzzysort": "^2.0.4", "path": "^0.12.7", + "pretty-bytes": "^6.1.0", + "pretty-ms": "^8.0.0", + "string-byte-length": "^1.6.0", "url": "^0.11.0", "zod-to-json-schema": "^3.20.0" }, @@ -94,4 +97,4 @@ }, "typings": "lib/src/index.d.ts", "version": "1.0.2" -} \ No newline at end of file +} diff --git a/packages/trpc-panel/src/react-app/components/form/ProcedureForm/RequestResult.tsx b/packages/trpc-panel/src/react-app/components/form/ProcedureForm/RequestResult.tsx index 6de358c..1cee7c9 100644 --- a/packages/trpc-panel/src/react-app/components/form/ProcedureForm/RequestResult.tsx +++ b/packages/trpc-panel/src/react-app/components/form/ProcedureForm/RequestResult.tsx @@ -2,6 +2,18 @@ import React from "react"; import { Response } from "./Response"; -export function RequestResult({ result }: { result: any }) { - return {result}; +export function RequestResult({ + result, + size, + time, +}: { + result: any; + size?: number; + time?: number; +}) { + return ( + + {result} + + ); } diff --git a/packages/trpc-panel/src/react-app/components/form/ProcedureForm/Response.tsx b/packages/trpc-panel/src/react-app/components/form/ProcedureForm/Response.tsx index b462e91..971abbd 100644 --- a/packages/trpc-panel/src/react-app/components/form/ProcedureForm/Response.tsx +++ b/packages/trpc-panel/src/react-app/components/form/ProcedureForm/Response.tsx @@ -1,18 +1,36 @@ import React from "react"; import { FormSection } from "./FormSection"; import { JsonViewer } from "@textea/json-viewer"; +import prettyBytes from "pretty-bytes"; +import prettyMs from "pretty-ms"; + +export function Response({ + children, + size, + time, +}: { + children: string | object; + size?: number; + time?: number; +}) { + const title = size + ? time + ? `Response (${prettyBytes(size)}, ${prettyMs(time)})` + : `Response (${prettyBytes(size)})` + : time + ? `Response (${prettyMs(time)})` + : `Response`; -export function Response({ children }: { children: string | object }) { if (typeof children === "object") { return ( - + ); } return ( - +

{children}

); diff --git a/packages/trpc-panel/src/react-app/components/form/ProcedureForm/index.tsx b/packages/trpc-panel/src/react-app/components/form/ProcedureForm/index.tsx index b4d3884..80bbde4 100644 --- a/packages/trpc-panel/src/react-app/components/form/ProcedureForm/index.tsx +++ b/packages/trpc-panel/src/react-app/components/form/ProcedureForm/index.tsx @@ -19,6 +19,7 @@ import type { ParsedInputNode } from "@src/parse/parseNodeTypes"; import { DocumentationSection } from "@src/react-app/components/form/ProcedureForm/DescriptionSection"; import { Field } from "@src/react-app/components/form/Field"; import { ProcedureFormContextProvider } from "@src/react-app/components/form/ProcedureForm/ProcedureFormContext"; +import getSize from "string-byte-length"; const TRPCErrorSchema = z.object({ shape: z.object({ @@ -54,9 +55,12 @@ export function ProcedureForm({ const [queryInput, setQueryInput] = useState(null); const formRef = useRef(null); const context = trpc.useContext(); + const [dataSize, setDataSize] = useState(); + const [startTime, setStartTime] = useState(); + const [opDuration, setOpDuration] = useState(); function getProcedure() { - var cur: typeof trpc | typeof trpc[string] = trpc; + var cur: typeof trpc | (typeof trpc)[string] = trpc; for (var p of procedure.pathFromRootRouter) { // TODO - Maybe figure out these typings? //@ts-ignore @@ -73,6 +77,11 @@ export function ProcedureForm({ initialData: null, retry: false, refetchOnWindowFocus: false, + onSuccess: (data: unknown) => { + if (startTime) setOpDuration(Date.now() - startTime); + setDataSize(getSize(JSON.stringify(data))); + setStartTime(undefined); + }, }); })() as UseQueryResult; @@ -89,6 +98,11 @@ export function ProcedureForm({ //@ts-ignore return router.useMutation({ retry: false, + onSuccess: (data: unknown) => { + if (startTime) setOpDuration(Date.now() - startTime); + setDataSize(getSize(JSON.stringify(data))); + setStartTime(undefined); + }, }); })() as UseMutationResult; @@ -104,8 +118,8 @@ export function ProcedureForm({ [ROOT_VALS_PROPERTY_NAME]: defaultFormValuesForNode(procedure.node), }, }); - function onSubmit(data: { [ROOT_VALS_PROPERTY_NAME]: any }) { + setStartTime(Date.now()); if (procedure.procedureType === "query") { const newData = { ...data }; setQueryInput(newData[ROOT_VALS_PROPERTY_NAME]); @@ -197,7 +211,9 @@ export function ProcedureForm({
- {data && } + {data && ( + + )} {!data && data !== null && ( Successful request but no data was returned )} diff --git a/yarn.lock b/yarn.lock index ad2b050..931e6cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -438,7 +438,7 @@ resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.1.tgz#c1ddb040429c6d21d38cc945fe75c818cfb68e17" integrity sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA== -"@emotion/react@^11.10.5", "@emotion/react@^11.10.6": +"@emotion/react@^11.10.5": version "11.10.6" resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.10.6.tgz#dbe5e650ab0f3b1d2e592e6ab1e006e75fd9ac11" integrity sha512-6HT8jBmcSkfzO7mc+N1L9uwvOnlcGoix8Zn7srt+9ga0MjREo6lRpuVX0kzo6Jp6oTqDhREOFsygN6Ew4fEQbw== @@ -473,7 +473,7 @@ resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.2.2.tgz#d58e788ee27267a14342303e1abb3d508b6d0fec" integrity sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA== -"@emotion/styled@^11.10.5", "@emotion/styled@^11.10.6": +"@emotion/styled@^11.10.5": version "11.10.6" resolved "https://registry.yarnpkg.com/@emotion/styled/-/styled-11.10.6.tgz#d886afdc51ef4d66c787ebde848f3cc8b117ebba" integrity sha512-OXtBzOmDSJo5Q0AFemHCfl+bUueT8BIcPSxu0EGTpGk6DmI5dnhSzQANm1e1ze0YZL7TDyAyy6s/b/zmGOS3Og== @@ -837,21 +837,21 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" -"@mui/base@5.0.0-alpha.124": - version "5.0.0-alpha.124" - resolved "https://registry.yarnpkg.com/@mui/base/-/base-5.0.0-alpha.124.tgz#164068642e41ba655fd2b9eaf881526909a41201" - integrity sha512-I6M+FrjRCybQCr8I8JTu6L2MkUobSQFgNIpOJyDNKL5zq/73LvZIQXvsKumAzthVGvI1PYaarM9vGDrDYbumKA== +"@mui/base@5.0.0-alpha.126": + version "5.0.0-alpha.126" + resolved "https://registry.yarnpkg.com/@mui/base/-/base-5.0.0-alpha.126.tgz#99555a5876a60e7dad772d75eb171e3d1336321d" + integrity sha512-I5e52A0Muv9Gaoy2GcqbYrQ6dpRyC2UXeA00brT3HuW0nF0E4fiTOIqdNTN+N5gyaYK0z3O6jtLt/97CCrIxVA== dependencies: "@babel/runtime" "^7.21.0" "@emotion/is-prop-valid" "^1.2.0" - "@mui/types" "^7.2.3" - "@mui/utils" "^5.11.13" + "@mui/types" "^7.2.4" + "@mui/utils" "^5.12.0" "@popperjs/core" "^2.11.7" clsx "^1.2.1" prop-types "^15.8.1" react-is "^18.2.0" -"@mui/core-downloads-tracker@^5.11.16": +"@mui/core-downloads-tracker@^5.12.1": version "5.14.19" resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.19.tgz#9c04ad047c378d857d529ef9c535b60a10b9a47c" integrity sha512-y4JseIen5pmZs1n9hHy95HKKioKco8f6N2lford2AmjJigVJOv0KsU0qryiCpyuEUZmi/xCduVilHsK9DSkPcA== @@ -863,7 +863,7 @@ dependencies: "@babel/runtime" "^7.21.0" -"@mui/material@^5.10.16", "@mui/material@^5.11.14": +"@mui/material@^5.10.16": version "5.12.1" resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.12.1.tgz#3297ffc6836f426a26568332d68357c1398f0630" integrity sha512-m+G9J6+FzIMhRqKV2y30yONH97wX107z9EWgiNCeS1/+y1CnytFZNG1ENdOuaJo1NimCRnmB/iXPvoOaSo6dOg== @@ -900,7 +900,7 @@ csstype "^3.1.2" prop-types "^15.8.1" -"@mui/system@^5.11.16": +"@mui/system@^5.12.1": version "5.14.19" resolved "https://registry.yarnpkg.com/@mui/system/-/system-5.14.19.tgz#f13387c60af129e4d61dfbf168fcee348ebe952a" integrity sha512-4e3Q+2nx+vgEsd0h5ftxlZGB7XtkkPos/zWqCqnxUs1l/T70s0lF2YNrWHHdSQ7LgtBu0eQ0qweZG2pR7KwkAw== @@ -914,12 +914,12 @@ csstype "^3.1.2" prop-types "^15.8.1" -"@mui/types@^7.2.10", "@mui/types@^7.2.3": +"@mui/types@^7.2.10", "@mui/types@^7.2.4": version "7.2.10" resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.2.10.tgz#13e3e9aa07ee6d593cfacd538e02e8e896d7a12f" integrity sha512-wX1vbDC+lzF7FlhT6A3ffRZgEoKWPF8VqRoTu4lZwouFX2t90KyCMsgepMw5DxLak1BSp/KP86CmtZttikb/gQ== -"@mui/utils@^5.11.13", "@mui/utils@^5.14.19": +"@mui/utils@^5.12.0", "@mui/utils@^5.14.19": version "5.14.19" resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.14.19.tgz#39a5846a74ba199f1a2b067ea197dc6b9c8f442f" integrity sha512-qAHvTXzk7basbyqPvhgWqN6JbmI2wLB/mf97GkSlz5c76MiKYV6Ffjvw9BjKZQ1YRb8rDX9kgdjRezOcoB91oQ== @@ -1213,17 +1213,14 @@ resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-14.4.3.tgz#af975e367743fa91989cd666666aec31a8f50591" integrity sha512-kCUc5MEwaEMakkO5x7aoD+DLi02ehmEM2QCGWvNqAS1dV/fAvORWEjnjsEIvml59M7Y5kCkWN6fCCyPOe8OL6Q== -"@textea/json-viewer@^2.13.1": - version "2.16.2" - resolved "https://registry.yarnpkg.com/@textea/json-viewer/-/json-viewer-2.16.2.tgz#eebb82d63c78959d849b3cb03246c3eca4bfc3c3" - integrity sha512-ZPRNpcLJ+hOO6C8tzkQvltRSp7Ol73j8oJ1+w5mWVWn+JR1QqzZJJgBqnNZvs3S1h/jJAjwyeZUVlb0VtIJcvg== +"@textea/json-viewer@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@textea/json-viewer/-/json-viewer-3.0.0.tgz#0ba440c1e396f54f1cc4ded1e662e5d65f5975b5" + integrity sha512-rO/JdEcr4dfki0B+nZNAcEMCVCAjLfi0tGgZhm1/33Md5dlVbQAtxaR4rFU5W+tHom9tBBnsTT7d7T1JHkmjAg== dependencies: - "@emotion/react" "^11.10.6" - "@emotion/styled" "^11.10.6" - "@mui/material" "^5.11.14" clsx "^1.2.1" copy-to-clipboard "^3.3.3" - zustand "^4.3.6" + zustand "^4.3.7" "@trpc/client@^10.0.0": version "10.21.1" @@ -6791,6 +6788,11 @@ parse-json@^5.0.0, parse-json@^5.2.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" +parse-ms@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-3.0.0.tgz#3ea24a934913345fcc3656deda72df921da3a70e" + integrity sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw== + parse-node-version@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b" @@ -7252,6 +7254,11 @@ prettier@^2.6.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== +pretty-bytes@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-6.1.0.tgz#1d1cc9aae1939012c74180b679da6684616bf804" + integrity sha512-Rk753HI8f4uivXi4ZCIYdhmG1V+WKzvRMg/X+M42a6t7D07RcmopXJMDNk6N++7Bl75URRGsb40ruvg7Hcp2wQ== + pretty-format@^27.0.2: version "27.5.1" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" @@ -7275,6 +7282,13 @@ pretty-hrtime@^1.0.0: resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" integrity sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A== +pretty-ms@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-8.0.0.tgz#a35563b2a02df01e595538f86d7de54ca23194a3" + integrity sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q== + dependencies: + parse-ms "^3.0.0" + process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -8190,6 +8204,11 @@ streamsearch@^1.1.0: resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== +string-byte-length@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/string-byte-length/-/string-byte-length-1.6.0.tgz#86cf5d85b7636e6289f119f0c9313895d6c1fd66" + integrity sha512-h9KzyolUa+9q6yHPCGzvPOta0VpWqG0/x0o1on22PZL0t+8txWXl0JCkRG/Gvi58HnyDvT1YCzDH2bAOpEc++g== + string-hash@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b" @@ -9303,7 +9322,7 @@ zod@^3.19.1, zod@^3.21.4: resolved "https://registry.yarnpkg.com/zod/-/zod-3.21.4.tgz#10882231d992519f0a10b5dd58a38c9dabbb64db" integrity sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw== -zustand@^4.1.5, zustand@^4.3.6: +zustand@^4.1.5, zustand@^4.3.7: version "4.3.7" resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.3.7.tgz#501b1f0393a7f1d103332e45ab574be5747fedce" integrity sha512-dY8ERwB9Nd21ellgkBZFhudER8KVlelZm8388B5nDAXhO/+FZDhYMuRnqDgu5SYyRgz/iaf8RKnbUs/cHfOGlQ== From f08e62474c1a0cc5cfd61331a0fba458db357216 Mon Sep 17 00:00:00 2001 From: Joe Karow <58997957+JoeKarow@users.noreply.github.com> Date: Mon, 18 Dec 2023 17:00:01 -0500 Subject: [PATCH 7/7] reorder exports per @clburlison suggestion Co-authored-by: Clayton Burlison --- packages/trpc-panel/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/trpc-panel/package.json b/packages/trpc-panel/package.json index 9b61657..d5795cf 100644 --- a/packages/trpc-panel/package.json +++ b/packages/trpc-panel/package.json @@ -72,10 +72,10 @@ }, "exports": { ".": { - "default": "./lib/index.js", + "types": "./lib/src/index.d.ts", "import": "./lib/index.mjs", "require": "./lib/index.js", - "types": "./lib/src/index.d.ts" + "default": "./lib/index.js" } }, "files": [