@trpc-panel/core 1.0.5 → 1.0.7
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 +5 -2
- package/lib/index.mjs +5 -2
- package/lib/react-app/bundle.js +405 -202
- package/lib/react-app/index.css +2 -2
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -19098,13 +19098,16 @@ function injectParams(string5, injectionParams) {
|
|
|
19098
19098
|
}
|
|
19099
19099
|
function injectInString(searchFor, string5, injectString) {
|
|
19100
19100
|
const startIndex = string5.indexOf(searchFor);
|
|
19101
|
+
if (startIndex === -1) {
|
|
19102
|
+
throw new Error(`trpc-panel: Failed to find placeholder ${searchFor} in bundle`);
|
|
19103
|
+
}
|
|
19101
19104
|
return string5.slice(0, startIndex) + injectString + string5.slice(startIndex + searchFor.length);
|
|
19102
19105
|
}
|
|
19103
19106
|
var cache = {
|
|
19104
19107
|
val: null
|
|
19105
19108
|
};
|
|
19106
19109
|
function safeStringify(value) {
|
|
19107
|
-
return JSON.stringify(value).replace(/</g, "\\u003c").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
19110
|
+
return JSON.stringify(value).replace(/</g, "\\u003c").replace(/>/g, "\\u003e").replace(/\//g, "\\u002f").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
19108
19111
|
}
|
|
19109
19112
|
function renderTrpcPanel(router, options) {
|
|
19110
19113
|
if (options.cache === true && cache.val)
|
|
@@ -19123,7 +19126,7 @@ function renderTrpcPanel(router, options) {
|
|
|
19123
19126
|
}
|
|
19124
19127
|
];
|
|
19125
19128
|
const bundleInjected = injectParams(bundleJs, bundleInjectionParams);
|
|
19126
|
-
const script = `<script type="module">${bundleInjected}</script>`;
|
|
19129
|
+
const script = `<script type="module">${bundleInjected.replace(/<\/script>/g, "<\\/script>")}</script>`;
|
|
19127
19130
|
const css = `<style>${indexCss}</style>`;
|
|
19128
19131
|
const htmlReplaceParams = [
|
|
19129
19132
|
{
|
package/lib/index.mjs
CHANGED
|
@@ -19060,13 +19060,16 @@ function injectParams(string5, injectionParams) {
|
|
|
19060
19060
|
}
|
|
19061
19061
|
function injectInString(searchFor, string5, injectString) {
|
|
19062
19062
|
const startIndex = string5.indexOf(searchFor);
|
|
19063
|
+
if (startIndex === -1) {
|
|
19064
|
+
throw new Error(`trpc-panel: Failed to find placeholder ${searchFor} in bundle`);
|
|
19065
|
+
}
|
|
19063
19066
|
return string5.slice(0, startIndex) + injectString + string5.slice(startIndex + searchFor.length);
|
|
19064
19067
|
}
|
|
19065
19068
|
var cache = {
|
|
19066
19069
|
val: null
|
|
19067
19070
|
};
|
|
19068
19071
|
function safeStringify(value) {
|
|
19069
|
-
return JSON.stringify(value).replace(/</g, "\\u003c").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
19072
|
+
return JSON.stringify(value).replace(/</g, "\\u003c").replace(/>/g, "\\u003e").replace(/\//g, "\\u002f").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
19070
19073
|
}
|
|
19071
19074
|
function renderTrpcPanel(router, options) {
|
|
19072
19075
|
if (options.cache === true && cache.val)
|
|
@@ -19085,7 +19088,7 @@ function renderTrpcPanel(router, options) {
|
|
|
19085
19088
|
}
|
|
19086
19089
|
];
|
|
19087
19090
|
const bundleInjected = injectParams(bundleJs, bundleInjectionParams);
|
|
19088
|
-
const script = `<script type="module">${bundleInjected}</script>`;
|
|
19091
|
+
const script = `<script type="module">${bundleInjected.replace(/<\/script>/g, "<\\/script>")}</script>`;
|
|
19089
19092
|
const css = `<style>${indexCss}</style>`;
|
|
19090
19093
|
const htmlReplaceParams = [
|
|
19091
19094
|
{
|