@trpc-panel/core 1.0.3 → 1.0.5
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/lib/index.js +9 -3
- package/lib/index.mjs +9 -3
- package/lib/react-app/bundle.js +121 -121
- package/lib/react-app/index.css +4 -0
- package/lib/scripts/debug-render.d.ts +1 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -13670,7 +13670,10 @@ var parseZodEnumDef = (def, refs) => {
|
|
|
13670
13670
|
|
|
13671
13671
|
// src/parse/input-mappers/zod/parsers/parseZodLiteralDef.tsx
|
|
13672
13672
|
var parseZodLiteralDef = (def, refs) => {
|
|
13673
|
-
|
|
13673
|
+
let value = def.values && def.values.length > 0 ? def.values[0] : def.value;
|
|
13674
|
+
if (typeof value === "bigint") {
|
|
13675
|
+
value = value.toString();
|
|
13676
|
+
}
|
|
13674
13677
|
refs.addDataFunctions.addDescriptionIfExists(def, refs);
|
|
13675
13678
|
return {
|
|
13676
13679
|
type: "literal",
|
|
@@ -19100,20 +19103,23 @@ function injectInString(searchFor, string5, injectString) {
|
|
|
19100
19103
|
var cache = {
|
|
19101
19104
|
val: null
|
|
19102
19105
|
};
|
|
19106
|
+
function safeStringify(value) {
|
|
19107
|
+
return JSON.stringify(value).replace(/</g, "\\u003c").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
19108
|
+
}
|
|
19103
19109
|
function renderTrpcPanel(router, options) {
|
|
19104
19110
|
if (options.cache === true && cache.val)
|
|
19105
19111
|
return cache.val;
|
|
19106
19112
|
const bundleInjectionParams = [
|
|
19107
19113
|
{
|
|
19108
19114
|
searchFor: routerReplaceSymbol,
|
|
19109
|
-
injectString:
|
|
19115
|
+
injectString: safeStringify(parseRouterWithOptions(router, {
|
|
19110
19116
|
...defaultParseRouterOptions,
|
|
19111
19117
|
...options
|
|
19112
19118
|
}))
|
|
19113
19119
|
},
|
|
19114
19120
|
{
|
|
19115
19121
|
searchFor: optionsReplaceSymbol,
|
|
19116
|
-
injectString:
|
|
19122
|
+
injectString: safeStringify(options)
|
|
19117
19123
|
}
|
|
19118
19124
|
];
|
|
19119
19125
|
const bundleInjected = injectParams(bundleJs, bundleInjectionParams);
|
package/lib/index.mjs
CHANGED
|
@@ -13632,7 +13632,10 @@ var parseZodEnumDef = (def, refs) => {
|
|
|
13632
13632
|
|
|
13633
13633
|
// src/parse/input-mappers/zod/parsers/parseZodLiteralDef.tsx
|
|
13634
13634
|
var parseZodLiteralDef = (def, refs) => {
|
|
13635
|
-
|
|
13635
|
+
let value = def.values && def.values.length > 0 ? def.values[0] : def.value;
|
|
13636
|
+
if (typeof value === "bigint") {
|
|
13637
|
+
value = value.toString();
|
|
13638
|
+
}
|
|
13636
13639
|
refs.addDataFunctions.addDescriptionIfExists(def, refs);
|
|
13637
13640
|
return {
|
|
13638
13641
|
type: "literal",
|
|
@@ -19062,20 +19065,23 @@ function injectInString(searchFor, string5, injectString) {
|
|
|
19062
19065
|
var cache = {
|
|
19063
19066
|
val: null
|
|
19064
19067
|
};
|
|
19068
|
+
function safeStringify(value) {
|
|
19069
|
+
return JSON.stringify(value).replace(/</g, "\\u003c").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
19070
|
+
}
|
|
19065
19071
|
function renderTrpcPanel(router, options) {
|
|
19066
19072
|
if (options.cache === true && cache.val)
|
|
19067
19073
|
return cache.val;
|
|
19068
19074
|
const bundleInjectionParams = [
|
|
19069
19075
|
{
|
|
19070
19076
|
searchFor: routerReplaceSymbol,
|
|
19071
|
-
injectString:
|
|
19077
|
+
injectString: safeStringify(parseRouterWithOptions(router, {
|
|
19072
19078
|
...defaultParseRouterOptions,
|
|
19073
19079
|
...options
|
|
19074
19080
|
}))
|
|
19075
19081
|
},
|
|
19076
19082
|
{
|
|
19077
19083
|
searchFor: optionsReplaceSymbol,
|
|
19078
|
-
injectString:
|
|
19084
|
+
injectString: safeStringify(options)
|
|
19079
19085
|
}
|
|
19080
19086
|
];
|
|
19081
19087
|
const bundleInjected = injectParams(bundleJs, bundleInjectionParams);
|