Updates
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -13,4 +13,4 @@ Date: ${l.toDateString()}
|
||||
|
||||
|
||||
|
||||
${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},52854:(e,t,a)=>{a.d(t,{A:()=>d});var r=a(71205);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function n({unparsedResults:e,tableSchema:t}){let a=[];try{for(let n=0;n<e.length;n++){let l=e[n],i=Object.keys(l);for(let e=0;e<i.length;e++){let a=i[e],n=t?.fields[e];if(a?.match(s))continue;let c=l[a];("number"==typeof c||c)&&n?.encrypted&&c?.match(/./)&&(l[a]=(0,r.A)({encryptedString:c}))}a.push(l)}return a}catch(t){return console.log("ERROR in parseDbResults Function =>",t.message),e}}var l=a(77047),i=a(51779),c=a(84640);async function d({queryString:e,queryValuesArray:t,database:a,tableSchema:r,debug:s}){let d=(0,i.A)({fa:!0});global.DSQL_USE_LOCAL&&(d=(0,i.A)({local:!0})),a?.match(/^datasquirel$/)&&(d=(0,i.A)()),s&&(console.log("varDatabaseDbHandler:query:",e),console.log("varDatabaseDbHandler:values:",t),console.log("varDatabaseDbHandler:CONNECTION:",d.getConfig()));let o=await (0,c.A)(d,e,t);if(s&&console.log("varDatabaseDbHandler:results:",o),o&&r)try{return await n({unparsedResults:o,tableSchema:r})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",a,e),(0,l.A)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(o)return o;else return null}},84640:(e,t,a)=>{async function r(e,t,a){try{if(!e)throw Error("No Connection Found!");if(!t)throw Error("Query String Required!");if("string"==typeof t){let r=await e.query(s(t),a);return JSON.parse(JSON.stringify(r))}if("object"!=typeof t)return null;{let a=[];for(let r=0;r<t.length;r++)try{let n=t[r],l=await e.query(s(n.query),n.values);a.push(JSON.parse(JSON.stringify(l)))}catch(e){console.log(`connDbHandler Query Error: ${e.message}`),a.push(null)}return a}}catch(e){return console.log(`connDbHandler Error: ${e.message}`),null}finally{e?.end()}}function s(e){return e.replace(/\n/gm,"").replace(/ {2,}/g,"").trim()}a.d(t,{A:()=>r})},60374:(e,t,a)=>{a.d(t,{A:()=>r});let r={parse:function(e,t){if(e){if("object"==typeof e)return e;if("string"==typeof e)try{return JSON.parse(e,t)}catch(e){return}}},stringify:function(e,t,a){try{return JSON.stringify(e,t||void 0,a)}catch(e){return}}}},50436:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{DatabaseSchemaContext:()=>g,default:()=>f,getServerSideProps:()=>x});var s=a(8732),n=a(82015),l=a.n(n),i=a(25562),c=a(92702),d=a(55880),o=a(44387),u=a(52854),m=a(71934),h=a(72272),p=e([d,o]);[d,o]=p.then?(await p)():p;let g=l().createContext({});function f({user:e,database:t,query:a,dbSchemaData:r,tables:n}){let c=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Add Database | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Add a database"})]}),[u,m]=l().useState(t.db_image);return(0,s.jsx)(i.A,{head:c,user:e,extraHeaderContent:(0,s.jsx)(d.A,{database:t,query:a,user:e}),aceEditor:!0,children:(0,s.jsx)(g.Provider,{value:{user:e,database:t,dbImage:u,setDbImage:m,dbSchemaData:r,tables:n},children:(0,s.jsx)(o.A,{})})})}async function x({req:e,res:t,query:a}){try{let r=await (0,c.A)(e,t);if(!r?.logged_in_status||!r?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let s=await (0,m.A)(`SELECT * FROM user_databases WHERE user_id='${r.id}' AND db_slug='${a.single}'`);if(!s||!s[0])return{redirect:{destination:`/admin/${r?.id}/databases`,permanent:!1}};let n=await (0,u.A)({queryString:`SHOW TABLES FROM ${s[0].db_full_name}`}),l=(0,h.A)({userId:r.id});if(!l)throw Error("User schema data not found!");return{props:{user:r,database:s[0],query:a,dbSchemaData:l||[],tables:n&&n[0]?n.map(e=>{let t=Object.keys(e)[0];return{tableSlug:e[t]}}):[]}}}catch(e){return console.log(e),{redirect:{destination:"/",permanent:!1}}}}r()}catch(e){r(e)}})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},39383:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/actions/users/user-auth")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[883,9821,6521,9796,5392,7769,6247],()=>a(7463));module.exports=r})();
|
||||
${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},52854:(e,t,a)=>{a.d(t,{A:()=>d});var r=a(71205);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function n({unparsedResults:e,tableSchema:t}){let a=[];try{for(let n=0;n<e.length;n++){let l=e[n],i=Object.keys(l);for(let e=0;e<i.length;e++){let a=i[e],n=t?.fields[e];if(a?.match(s))continue;let c=l[a];("number"==typeof c||c)&&n?.encrypted&&c?.match(/./)&&(l[a]=(0,r.A)({encryptedString:c}))}a.push(l)}return a}catch(t){return console.log("ERROR in parseDbResults Function =>",t.message),e}}var l=a(77047),i=a(51779),c=a(84640);async function d({queryString:e,queryValuesArray:t,database:a,tableSchema:r,debug:s}){let d=(0,i.A)({fa:!0});global.DSQL_USE_LOCAL&&(d=(0,i.A)({local:!0})),a?.match(/^datasquirel$/)&&(d=(0,i.A)()),s&&(console.log("varDatabaseDbHandler:query:",e),console.log("varDatabaseDbHandler:values:",t),console.log("varDatabaseDbHandler:CONNECTION:",d.getConfig()));let o=await (0,c.A)(d,e,t);if(s&&console.log("varDatabaseDbHandler:results:",o),o&&r)try{return await n({unparsedResults:o,tableSchema:r})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",a,e),(0,l.A)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(o)return o;else return null}},84640:(e,t,a)=>{async function r(e,t,a){try{if(!e)throw Error("No Connection Found!");if(!t)throw Error("Query String Required!");if("string"==typeof t){let r=await e.query(s(t),a);return JSON.parse(JSON.stringify(r))}if("object"!=typeof t)return null;{let a=[];for(let r=0;r<t.length;r++)try{let n=t[r],l=await e.query(s(n.query),n.values);a.push(JSON.parse(JSON.stringify(l)))}catch(e){console.log(`connDbHandler Query Error: ${e.message}`),a.push(null)}return a}}catch(t){return console.log(`connDbHandler Error: ${t.message}`),console.log(e?.config()),null}finally{e?.end()}}function s(e){return e.replace(/\n/gm,"").replace(/ {2,}/g,"").trim()}a.d(t,{A:()=>r})},60374:(e,t,a)=>{a.d(t,{A:()=>r});let r={parse:function(e,t){if(e){if("object"==typeof e)return e;if("string"==typeof e)try{return JSON.parse(e,t)}catch(e){return}}},stringify:function(e,t,a){try{return JSON.stringify(e,t||void 0,a)}catch(e){return}}}},50436:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{DatabaseSchemaContext:()=>g,default:()=>f,getServerSideProps:()=>x});var s=a(8732),n=a(82015),l=a.n(n),i=a(25562),c=a(92702),d=a(8949),o=a(44387),u=a(52854),m=a(71934),h=a(72272),p=e([d,o]);[d,o]=p.then?(await p)():p;let g=l().createContext({});function f({user:e,database:t,query:a,dbSchemaData:r,tables:n}){let c=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Add Database | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Add a database"})]}),[u,m]=l().useState(t.db_image);return(0,s.jsx)(i.A,{head:c,user:e,extraHeaderContent:(0,s.jsx)(d.A,{database:t,query:a,user:e}),aceEditor:!0,children:(0,s.jsx)(g.Provider,{value:{user:e,database:t,dbImage:u,setDbImage:m,dbSchemaData:r,tables:n},children:(0,s.jsx)(o.A,{})})})}async function x({req:e,res:t,query:a}){try{let r=await (0,c.A)(e,t);if(!r?.logged_in_status||!r?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let s=await (0,m.A)(`SELECT * FROM user_databases WHERE user_id='${r.id}' AND db_slug='${a.single}'`);if(!s||!s[0])return{redirect:{destination:`/admin/${r?.id}/databases`,permanent:!1}};let n=await (0,u.A)({queryString:`SHOW TABLES FROM ${s[0].db_full_name}`}),l=(0,h.A)({userId:r.id});if(!l)throw Error("User schema data not found!");return{props:{user:r,database:s[0],query:a,dbSchemaData:l||[],tables:n&&n[0]?n.map(e=>{let t=Object.keys(e)[0];return{tableSlug:e[t]}}):[]}}}catch(e){return console.log(e),{redirect:{destination:"/",permanent:!1}}}}r()}catch(e){r(e)}})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},39383:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/actions/users/user-auth")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[883,9821,6521,9796,5392,5868,6247],()=>a(7463));module.exports=r})();
|
||||
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+3
-3
@@ -1,5 +1,5 @@
|
||||
"use strict";(()=>{var e={};e.id=6930,e.ids=[6930],e.modules={52738:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{config:()=>h,default:()=>m,getServerSideProps:()=>g,getStaticPaths:()=>p,getStaticProps:()=>c,reportWebVitals:()=>x,routeModule:()=>v,unstable_getServerProps:()=>f,unstable_getServerSideProps:()=>N,unstable_getStaticParams:()=>S,unstable_getStaticPaths:()=>I,unstable_getStaticProps:()=>T});var i=r(63865),s=r(9455),n=r(30671),l=r(5583),o=r(19796),d=r(78704),u=e([d]);d=(u.then?(await u)():u)[0];let m=(0,n.M)(d,"default"),c=(0,n.M)(d,"getStaticProps"),p=(0,n.M)(d,"getStaticPaths"),g=(0,n.M)(d,"getServerSideProps"),h=(0,n.M)(d,"config"),x=(0,n.M)(d,"reportWebVitals"),T=(0,n.M)(d,"unstable_getStaticProps"),I=(0,n.M)(d,"unstable_getStaticPaths"),S=(0,n.M)(d,"unstable_getStaticParams"),f=(0,n.M)(d,"unstable_getServerProps"),N=(0,n.M)(d,"unstable_getServerSideProps"),v=new i.PagesRouteModule({definition:{kind:s.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables/[single_table]/entries",pathname:"/admin/[user_id]/databases/[single]/tables/[single_table]/entries",bundlePath:"",filename:""},components:{App:o.default,Document:l.default},userland:d});a()}catch(e){a(e)}})},60424:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(42960);function i({paradigm:e,table:t,query:r,user:i}){let s="";try{let i=`DSQL_${r.single}_${r.single_table}`.toUpperCase(),l=t.fields;function n(e){return e?.match(/int/i)?"number":(e?.match(/text|varchar|timestamp/i),"string")}let o=[],d=[];o.push(`type ${i} = {`),d.push(`/**
|
||||
* @typedef {object} ${i}`),l.forEach(e=>{let t=e.nullValue?"?":e.fieldName?.match(a.A)?"?":"";o.push(` ${e.fieldName}${t}: ${n(e.dataType||"")};`),d.push(` * @property {${n(e.dataType||"")}${t}} ${e.fieldName}`)}),o.push("}"),d.push(" */"),e?.match(/javascript/i)&&(s=d.join("\n")),e?.match(/typescript/i)&&(s=o.join("\n"))}catch(e){console.log(e.message),s=null}return s}},51339:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(8732);function i({collapse:e,setCollapse:t}){return(0,a.jsxs)("div",{className:"collapse-block"+(e?" -mt-16 -mb-6 pt-10":" mt-0 mb-0 p-0"),onClick:r=>{e?t(!1):t(!0)},children:[(0,a.jsx)("span",{children:e?"Expand":"Collapse"}),(0,a.jsx)("img",{src:"/images/down-arrow-dark.svg",alt:"Down Arrow",width:16,className:"dark:hidden opacity-30 "+(e?"":"rotate-180")}),(0,a.jsx)("img",{src:"/images/down-arrow-white.svg",alt:"Down Arrow",width:16,className:"opacity-30 hidden dark:flex "+(e?"":"rotate-180")})]})}r(82015)},84483:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(8732);function i({children:e,open:t,setOpen:r,onClose:i,maxWidth:s}){return(0,a.jsx)(a.Fragment,{})}r(82015),r(1976),r(58150)},42960:(e,t,r)=>{r.d(t,{A:()=>a});let a=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},77047:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(29021),i=r.n(a);async function s({user:e,message:t,component:r,noMail:a,req:s}){let n=new Date,l=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],t=s.headers["x-real-ip"],r=s.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],i=r||a||t||s.socket.remoteAddress;if(!i)return null;return String(i)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR ===========================
|
||||
"use strict";(()=>{var e={};e.id=6930,e.ids=[6930],e.modules={52738:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{config:()=>h,default:()=>m,getServerSideProps:()=>g,getStaticPaths:()=>p,getStaticProps:()=>c,reportWebVitals:()=>x,routeModule:()=>v,unstable_getServerProps:()=>f,unstable_getServerSideProps:()=>N,unstable_getStaticParams:()=>S,unstable_getStaticPaths:()=>I,unstable_getStaticProps:()=>T});var i=r(63865),s=r(9455),n=r(30671),l=r(5583),o=r(19796),d=r(78704),u=e([d]);d=(u.then?(await u)():u)[0];let m=(0,n.M)(d,"default"),c=(0,n.M)(d,"getStaticProps"),p=(0,n.M)(d,"getStaticPaths"),g=(0,n.M)(d,"getServerSideProps"),h=(0,n.M)(d,"config"),x=(0,n.M)(d,"reportWebVitals"),T=(0,n.M)(d,"unstable_getStaticProps"),I=(0,n.M)(d,"unstable_getStaticPaths"),S=(0,n.M)(d,"unstable_getStaticParams"),f=(0,n.M)(d,"unstable_getServerProps"),N=(0,n.M)(d,"unstable_getServerSideProps"),v=new i.PagesRouteModule({definition:{kind:s.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables/[single_table]/entries",pathname:"/admin/[user_id]/databases/[single]/tables/[single_table]/entries",bundlePath:"",filename:""},components:{App:o.default,Document:l.default},userland:d});a()}catch(e){a(e)}})},60424:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(42960);function i({paradigm:e,table:t,query:r,typeDefName:i,allValuesOptional:s,addExport:n}){let l="";try{let d=i||`DSQL_${r.single}_${r.single_table}`.toUpperCase(),u=t.fields;function o(e){return e?.match(/int/i)?"number":(e?.match(/text|varchar|timestamp/i),"string")}let m=[],c=[];m.push(`${n?"export ":""}type ${d} = {`),c.push(`/**
|
||||
* @typedef {object} ${d}`),u.forEach(e=>{let t=s?"?":e.nullValue?"?":e.fieldName?.match(a.A)?"?":"";m.push(` ${e.fieldName}${t}: ${o(e.dataType||"")};`),c.push(` * @property {${o(e.dataType||"")}${t}} ${e.fieldName}`)}),m.push("}"),c.push(" */"),e?.match(/javascript/i)&&(l=c.join("\n")),e?.match(/typescript/i)&&(l=m.join("\n"))}catch(e){console.log(e.message),l=null}return l}},51339:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(8732);function i({collapse:e,setCollapse:t}){return(0,a.jsxs)("div",{className:"collapse-block"+(e?" -mt-16 -mb-6 pt-10":" mt-0 mb-0 p-0"),onClick:r=>{e?t(!1):t(!0)},children:[(0,a.jsx)("span",{children:e?"Expand":"Collapse"}),(0,a.jsx)("img",{src:"/images/down-arrow-dark.svg",alt:"Down Arrow",width:16,className:"dark:hidden opacity-30 "+(e?"":"rotate-180")}),(0,a.jsx)("img",{src:"/images/down-arrow-white.svg",alt:"Down Arrow",width:16,className:"opacity-30 hidden dark:flex "+(e?"":"rotate-180")})]})}r(82015)},84483:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(8732);function i({children:e,open:t,setOpen:r,onClose:i,maxWidth:s}){return(0,a.jsx)(a.Fragment,{})}r(82015),r(1976),r(58150)},42960:(e,t,r)=>{r.d(t,{A:()=>a});let a=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},77047:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(29021),i=r.n(a);async function s({user:e,message:t,component:r,noMail:a,req:s}){let n=new Date,l=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],t=s.headers["x-real-ip"],r=s.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],i=r||a||t||s.socket.remoteAddress;if(!i)return null;return String(i)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR ===========================
|
||||
Error Message: ${t}
|
||||
Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=`
|
||||
User Id: ${e?.id}
|
||||
@@ -14,4 +14,4 @@ Date: ${n.toDateString()}
|
||||
|
||||
|
||||
|
||||
${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},39383:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/actions/users/user-auth")},40373:e=>{e.exports=require("@tinymce/tinymce-react")},90317:e=>{e.exports=require("html-prettify")},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},41836:e=>{e.exports=require("react-tiny-popover")},8732:e=>{e.exports=require("react/jsx-runtime")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")},94327:e=>{e.exports=JSON.parse('[{"title":"VARCHAR","name":"VARCHAR","value":"0-255","argument":true,"description":"Varchar is simply letters and numbers within the range 0 - 255","maxValue":255},{"title":"TINYINT","name":"TINYINT","value":"0-100","description":"TINYINT means Integers: 0 to 100","maxValue":127},{"title":"SMALLINT","name":"SMALLINT","value":"0-255","description":"SMALLINT means Integers: 0 to 240933","maxValue":32767},{"title":"MEDIUMINT","name":"MEDIUMINT","value":"0-255","description":"MEDIUMINT means Integers: 0 to 1245568545560","maxValue":8388607},{"title":"INT","name":"INT","value":"0-255","description":"INT means Integers: 0 to 12560","maxValue":2147483647},{"title":"BIGINT","name":"BIGINT","value":"0-255","description":"BIGINT means Integers: 0 to 1245569056767568545560","maxValue":2e+63},{"title":"TINYTEXT","name":"TINYTEXT","value":"0-255","description":"Text with 255 max characters","maxValue":127},{"title":"TEXT","name":"TEXT","value":"0-100","description":"MEDIUMTEXT is just text with max length 16,777,215"},{"title":"MEDIUMTEXT","name":"MEDIUMTEXT","value":"0-255","description":"MEDIUMTEXT is just text with max length 16,777,215"},{"title":"LONGTEXT","name":"LONGTEXT","value":"0-255","description":"LONGTEXT is just text with max length 4,294,967,295"},{"title":"DECIMAL","name":"DECIMAL","description":"Numbers with decimals","integer":"1-100","decimals":"1-4"},{"title":"FLOAT","name":"FLOAT","description":"Numbers with decimals","integer":"1-100","decimals":"1-4"},{"title":"DOUBLE","name":"DOUBLE","description":"Numbers with decimals","integer":"1-100","decimals":"1-4"},{"title":"UUID","name":"UUID","valueLiteral":"UUID()","description":"A Unique ID"}]')}};var t=require("../../../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,6521,9796,5392,7769,3155,6247,725,4627,8704],()=>r(52738));module.exports=a})();
|
||||
${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},39383:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/actions/users/user-auth")},40373:e=>{e.exports=require("@tinymce/tinymce-react")},90317:e=>{e.exports=require("html-prettify")},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},41836:e=>{e.exports=require("react-tiny-popover")},8732:e=>{e.exports=require("react/jsx-runtime")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")},94327:e=>{e.exports=JSON.parse('[{"title":"VARCHAR","name":"VARCHAR","value":"0-255","argument":true,"description":"Varchar is simply letters and numbers within the range 0 - 255","maxValue":255},{"title":"TINYINT","name":"TINYINT","value":"0-100","description":"TINYINT means Integers: 0 to 100","maxValue":127},{"title":"SMALLINT","name":"SMALLINT","value":"0-255","description":"SMALLINT means Integers: 0 to 240933","maxValue":32767},{"title":"MEDIUMINT","name":"MEDIUMINT","value":"0-255","description":"MEDIUMINT means Integers: 0 to 1245568545560","maxValue":8388607},{"title":"INT","name":"INT","value":"0-255","description":"INT means Integers: 0 to 12560","maxValue":2147483647},{"title":"BIGINT","name":"BIGINT","value":"0-255","description":"BIGINT means Integers: 0 to 1245569056767568545560","maxValue":2e+63},{"title":"TINYTEXT","name":"TINYTEXT","value":"0-255","description":"Text with 255 max characters","maxValue":127},{"title":"TEXT","name":"TEXT","value":"0-100","description":"MEDIUMTEXT is just text with max length 16,777,215"},{"title":"MEDIUMTEXT","name":"MEDIUMTEXT","value":"0-255","description":"MEDIUMTEXT is just text with max length 16,777,215"},{"title":"LONGTEXT","name":"LONGTEXT","value":"0-255","description":"LONGTEXT is just text with max length 4,294,967,295"},{"title":"DECIMAL","name":"DECIMAL","description":"Numbers with decimals","integer":"1-100","decimals":"1-4"},{"title":"FLOAT","name":"FLOAT","description":"Numbers with decimals","integer":"1-100","decimals":"1-4"},{"title":"DOUBLE","name":"DOUBLE","description":"Numbers with decimals","integer":"1-100","decimals":"1-4"},{"title":"UUID","name":"UUID","valueLiteral":"UUID()","description":"A Unique ID"}]')}};var t=require("../../../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,6521,9796,5392,5868,3155,6247,725,4627,8704],()=>r(52738));module.exports=a})();
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+3
-3
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -13,4 +13,4 @@ Date: ${l.toDateString()}
|
||||
|
||||
|
||||
|
||||
${d}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},62130:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{AddTableEntryContext:()=>N,default:()=>f,getServerSideProps:()=>T});var s=a(8732),i=a(82015),l=a.n(i),n=a(29021),d=a.n(n),c=a(92702),u=a(25562),o=a(20356),m=a(55880),p=a(22873),g=a(77047),b=a(71934),x=a(52854),h=e([o,m]);[o,m]=h.then?(await h)():h;let N=l().createContext({});function f({user:e,database:t,table:a,dbSchemaData:r,query:i,confirmedDelegetedUser:n,duplicateEntry:d}){let c=`${a.tableFullName} Table New Entry | Datasquirel`,p=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:c}),(0,s.jsx)("meta",{name:"description",content:"Single Table"})]}),g=l().useRef([]),b=l().useRef([]);return(0,s.jsx)(u.A,{head:p,user:e,extraHeaderContent:(0,s.jsx)(m.A,{database:t,query:i,confirmedDelegetedUser:n,user:e}),children:(0,s.jsx)(N.Provider,{value:{user:e,database:t,table:a,dbSchemaData:r,richTextEditors:g,jsonTextEditors:b,query:i,confirmedDelegetedUser:n,duplicateEntry:d},children:(0,s.jsx)(o.A,{})})})}async function T({req:e,res:t,query:a}){let r=await (0,c.A)(e,t);if(!r?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};try{let t;let s=a.single,i=await (0,p.A)({request:e,user:r,databaseSlug:s,query:a});if(!i)throw Error("No Db Object Found!");let{dbUserId:l}=i,n=await (0,b.A)(`SELECT * FROM user_databases WHERE user_id='${l}' AND db_slug='${a.single}'`);if(!n||!n[0])return{redirect:{destination:`/admin/${r?.id}/databases`,permanent:!1}};let c=JSON.parse(d().readFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${l}/main.json`,"utf-8")),u=(c.filter(e=>e.dbFullName===n[0].db_full_name)[0]?.tables).filter(e=>e.tableName===a.single_table)[0];if(a.duplicate&&a.id){let e=n[0].db_full_name,r=u.tableName,s=await (0,x.A)({database:e,queryString:`SELECT * FROM ${e}.${r} WHERE id='${a.id}'`,tableSchema:u});t=s?.[0]}return{props:{user:r,database:n[0],table:u,dbSchemaData:c,query:a,confirmedDelegetedUser:i,duplicateEntry:t||null}}}catch(e){return(0,g.A)({component:"add-entry-page-component/getServerSideProps/catch-error",message:e.message,user:r}),{props:{user:r,database:null,table:null}}}}r()}catch(e){r(e)}})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},39383:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/actions/users/user-auth")},40373:e=>{e.exports=require("@tinymce/tinymce-react")},90317:e=>{e.exports=require("html-prettify")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},8732:e=>{e.exports=require("react/jsx-runtime")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")},94327:e=>{e.exports=JSON.parse('[{"title":"VARCHAR","name":"VARCHAR","value":"0-255","argument":true,"description":"Varchar is simply letters and numbers within the range 0 - 255","maxValue":255},{"title":"TINYINT","name":"TINYINT","value":"0-100","description":"TINYINT means Integers: 0 to 100","maxValue":127},{"title":"SMALLINT","name":"SMALLINT","value":"0-255","description":"SMALLINT means Integers: 0 to 240933","maxValue":32767},{"title":"MEDIUMINT","name":"MEDIUMINT","value":"0-255","description":"MEDIUMINT means Integers: 0 to 1245568545560","maxValue":8388607},{"title":"INT","name":"INT","value":"0-255","description":"INT means Integers: 0 to 12560","maxValue":2147483647},{"title":"BIGINT","name":"BIGINT","value":"0-255","description":"BIGINT means Integers: 0 to 1245569056767568545560","maxValue":2e+63},{"title":"TINYTEXT","name":"TINYTEXT","value":"0-255","description":"Text with 255 max characters","maxValue":127},{"title":"TEXT","name":"TEXT","value":"0-100","description":"MEDIUMTEXT is just text with max length 16,777,215"},{"title":"MEDIUMTEXT","name":"MEDIUMTEXT","value":"0-255","description":"MEDIUMTEXT is just text with max length 16,777,215"},{"title":"LONGTEXT","name":"LONGTEXT","value":"0-255","description":"LONGTEXT is just text with max length 4,294,967,295"},{"title":"DECIMAL","name":"DECIMAL","description":"Numbers with decimals","integer":"1-100","decimals":"1-4"},{"title":"FLOAT","name":"FLOAT","description":"Numbers with decimals","integer":"1-100","decimals":"1-4"},{"title":"DOUBLE","name":"DOUBLE","description":"Numbers with decimals","integer":"1-100","decimals":"1-4"},{"title":"UUID","name":"UUID","valueLiteral":"UUID()","description":"A Unique ID"}]')}};var t=require("../../../../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[883,9821,6521,9796,5392,7769,6247,725],()=>a(17723));module.exports=r})();
|
||||
${d}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},62130:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{AddTableEntryContext:()=>N,default:()=>f,getServerSideProps:()=>T});var s=a(8732),i=a(82015),l=a.n(i),n=a(29021),d=a.n(n),c=a(92702),u=a(25562),o=a(20356),m=a(8949),p=a(22873),g=a(77047),b=a(71934),x=a(52854),h=e([o,m]);[o,m]=h.then?(await h)():h;let N=l().createContext({});function f({user:e,database:t,table:a,dbSchemaData:r,query:i,confirmedDelegetedUser:n,duplicateEntry:d}){let c=`${a.tableFullName} Table New Entry | Datasquirel`,p=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:c}),(0,s.jsx)("meta",{name:"description",content:"Single Table"})]}),g=l().useRef([]),b=l().useRef([]);return(0,s.jsx)(u.A,{head:p,user:e,extraHeaderContent:(0,s.jsx)(m.A,{database:t,query:i,confirmedDelegetedUser:n,user:e}),children:(0,s.jsx)(N.Provider,{value:{user:e,database:t,table:a,dbSchemaData:r,richTextEditors:g,jsonTextEditors:b,query:i,confirmedDelegetedUser:n,duplicateEntry:d},children:(0,s.jsx)(o.A,{})})})}async function T({req:e,res:t,query:a}){let r=await (0,c.A)(e,t);if(!r?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};try{let t;let s=a.single,i=await (0,p.A)({request:e,user:r,databaseSlug:s,query:a});if(!i)throw Error("No Db Object Found!");let{dbUserId:l}=i,n=await (0,b.A)(`SELECT * FROM user_databases WHERE user_id='${l}' AND db_slug='${a.single}'`);if(!n||!n[0])return{redirect:{destination:`/admin/${r?.id}/databases`,permanent:!1}};let c=JSON.parse(d().readFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${l}/main.json`,"utf-8")),u=(c.filter(e=>e.dbFullName===n[0].db_full_name)[0]?.tables).filter(e=>e.tableName===a.single_table)[0];if(a.duplicate&&a.id){let e=n[0].db_full_name,r=u.tableName,s=await (0,x.A)({database:e,queryString:`SELECT * FROM ${e}.${r} WHERE id='${a.id}'`,tableSchema:u});t=s?.[0]}return{props:{user:r,database:n[0],table:u,dbSchemaData:c,query:a,confirmedDelegetedUser:i,duplicateEntry:t||null}}}catch(e){return(0,g.A)({component:"add-entry-page-component/getServerSideProps/catch-error",message:e.message,user:r}),{props:{user:r,database:null,table:null}}}}r()}catch(e){r(e)}})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},39383:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/actions/users/user-auth")},40373:e=>{e.exports=require("@tinymce/tinymce-react")},90317:e=>{e.exports=require("html-prettify")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},8732:e=>{e.exports=require("react/jsx-runtime")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")},94327:e=>{e.exports=JSON.parse('[{"title":"VARCHAR","name":"VARCHAR","value":"0-255","argument":true,"description":"Varchar is simply letters and numbers within the range 0 - 255","maxValue":255},{"title":"TINYINT","name":"TINYINT","value":"0-100","description":"TINYINT means Integers: 0 to 100","maxValue":127},{"title":"SMALLINT","name":"SMALLINT","value":"0-255","description":"SMALLINT means Integers: 0 to 240933","maxValue":32767},{"title":"MEDIUMINT","name":"MEDIUMINT","value":"0-255","description":"MEDIUMINT means Integers: 0 to 1245568545560","maxValue":8388607},{"title":"INT","name":"INT","value":"0-255","description":"INT means Integers: 0 to 12560","maxValue":2147483647},{"title":"BIGINT","name":"BIGINT","value":"0-255","description":"BIGINT means Integers: 0 to 1245569056767568545560","maxValue":2e+63},{"title":"TINYTEXT","name":"TINYTEXT","value":"0-255","description":"Text with 255 max characters","maxValue":127},{"title":"TEXT","name":"TEXT","value":"0-100","description":"MEDIUMTEXT is just text with max length 16,777,215"},{"title":"MEDIUMTEXT","name":"MEDIUMTEXT","value":"0-255","description":"MEDIUMTEXT is just text with max length 16,777,215"},{"title":"LONGTEXT","name":"LONGTEXT","value":"0-255","description":"LONGTEXT is just text with max length 4,294,967,295"},{"title":"DECIMAL","name":"DECIMAL","description":"Numbers with decimals","integer":"1-100","decimals":"1-4"},{"title":"FLOAT","name":"FLOAT","description":"Numbers with decimals","integer":"1-100","decimals":"1-4"},{"title":"DOUBLE","name":"DOUBLE","description":"Numbers with decimals","integer":"1-100","decimals":"1-4"},{"title":"UUID","name":"UUID","valueLiteral":"UUID()","description":"A Unique ID"}]')}};var t=require("../../../../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[883,9821,6521,9796,5392,5868,6247,725],()=>a(17723));module.exports=r})();
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
"use strict";(()=>{var e={};e.id=2602,e.ids=[2602],e.modules={82960:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{config:()=>S,default:()=>l,getServerSideProps:()=>m,getStaticPaths:()=>g,getStaticProps:()=>c,reportWebVitals:()=>x,routeModule:()=>f,unstable_getServerProps:()=>h,unstable_getServerSideProps:()=>M,unstable_getStaticParams:()=>b,unstable_getStaticPaths:()=>q,unstable_getStaticProps:()=>P});var a=r(63865),i=r(9455),u=r(30671),o=r(5583),d=r(19796),p=r(50264),n=e([p]);p=(n.then?(await n)():n)[0];let l=(0,u.M)(p,"default"),c=(0,u.M)(p,"getStaticProps"),g=(0,u.M)(p,"getStaticPaths"),m=(0,u.M)(p,"getServerSideProps"),S=(0,u.M)(p,"config"),x=(0,u.M)(p,"reportWebVitals"),P=(0,u.M)(p,"unstable_getStaticProps"),q=(0,u.M)(p,"unstable_getStaticPaths"),b=(0,u.M)(p,"unstable_getStaticParams"),h=(0,u.M)(p,"unstable_getServerProps"),M=(0,u.M)(p,"unstable_getServerSideProps"),f=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/databases/[single]/users/[user]",pathname:"/admin/[user_id]/databases/[single]/users/[user]",bundlePath:"",filename:""},components:{App:d.default,Document:o.default},userland:p});s()}catch(e){s(e)}})},76102:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},39383:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/actions/users/user-auth")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9796,5392,7769,3474],()=>r(82960));module.exports=s})();
|
||||
"use strict";(()=>{var e={};e.id=2602,e.ids=[2602],e.modules={82960:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{config:()=>S,default:()=>l,getServerSideProps:()=>m,getStaticPaths:()=>g,getStaticProps:()=>c,reportWebVitals:()=>x,routeModule:()=>f,unstable_getServerProps:()=>h,unstable_getServerSideProps:()=>M,unstable_getStaticParams:()=>b,unstable_getStaticPaths:()=>q,unstable_getStaticProps:()=>P});var a=r(63865),i=r(9455),u=r(30671),o=r(5583),d=r(19796),p=r(50264),n=e([p]);p=(n.then?(await n)():n)[0];let l=(0,u.M)(p,"default"),c=(0,u.M)(p,"getStaticProps"),g=(0,u.M)(p,"getStaticPaths"),m=(0,u.M)(p,"getServerSideProps"),S=(0,u.M)(p,"config"),x=(0,u.M)(p,"reportWebVitals"),P=(0,u.M)(p,"unstable_getStaticProps"),q=(0,u.M)(p,"unstable_getStaticPaths"),b=(0,u.M)(p,"unstable_getStaticParams"),h=(0,u.M)(p,"unstable_getServerProps"),M=(0,u.M)(p,"unstable_getServerSideProps"),f=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/databases/[single]/users/[user]",pathname:"/admin/[user_id]/databases/[single]/users/[user]",bundlePath:"",filename:""},components:{App:d.default,Document:o.default},userland:p});s()}catch(e){s(e)}})},76102:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},39383:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/actions/users/user-auth")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9796,5392,5868,3474],()=>r(82960));module.exports=s})();
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
"use strict";(()=>{var e={};e.id=6377,e.ids=[6377],e.modules={6231:(e,s,t)=>{t.a(e,async(e,r)=>{try{t.r(s),t.d(s,{config:()=>g,default:()=>c,getServerSideProps:()=>x,getStaticPaths:()=>m,getStaticProps:()=>p,reportWebVitals:()=>h,routeModule:()=>b,unstable_getServerProps:()=>P,unstable_getServerSideProps:()=>S,unstable_getStaticParams:()=>v,unstable_getStaticPaths:()=>f,unstable_getStaticProps:()=>w});var a=t(63865),i=t(9455),d=t(30671),n=t(5583),l=t(19796),o=t(58262),u=e([o]);o=(u.then?(await u)():u)[0];let c=(0,d.M)(o,"default"),p=(0,d.M)(o,"getStaticProps"),m=(0,d.M)(o,"getStaticPaths"),x=(0,d.M)(o,"getServerSideProps"),g=(0,d.M)(o,"config"),h=(0,d.M)(o,"reportWebVitals"),w=(0,d.M)(o,"unstable_getStaticProps"),f=(0,d.M)(o,"unstable_getStaticPaths"),v=(0,d.M)(o,"unstable_getStaticParams"),P=(0,d.M)(o,"unstable_getServerProps"),S=(0,d.M)(o,"unstable_getServerSideProps"),b=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/databases/[single]/users/[user]/change-password",pathname:"/admin/[user_id]/databases/[single]/users/[user]/change-password",bundlePath:"",filename:""},components:{App:l.default,Document:n.default},userland:o});r()}catch(e){r(e)}})},63378:(e,s,t)=>{t.d(s,{A:()=>u});var r=t(8732),a=t(82015),i=t.n(a),d=t(53926),n=t(59023),l=t(46169),o=t(16757);function u({singleUser:e,database:s,user:t}){let[a,u]=i().useState(!1);return(0,r.jsxs)(i().Fragment,{children:[a&&(0,r.jsx)(o.A,{width:"20px"}),(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsx)("div",{className:"w-full justify-between flex-wrap",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(n.A,{}),(0,r.jsxs)("h1",{className:"text-3xl m-0",children:["Change Password For"," ",(0,r.jsxs)("u",{children:[e.first_name," ",e.last_name]})]})]})}),(0,r.jsx)(d.A,{user:t})]}),(0,r.jsx)("section",{className:"paper",children:(0,r.jsx)("div",{className:"w-full flex-col items-stretch",children:(0,r.jsxs)("form",{className:"flex flex-col items-stretch gap-4",onSubmit:r=>{r.preventDefault(),u(!0);let a=document.getElementById("password"),i=document.getElementById("password-repeat"),d=RegExp(`${a.value}`);if(!i?.value?.match(d)){window.alert("Passwords dont Match!");return}if(!window.confirm("change this User's password?")){u(!1);return}(0,l.A)("/api/changeDbUserPassword",{method:"POST",body:{userId:e.id,password:a.value,dbId:s.id}},!0).then(r=>{r.success&&(window.location.pathname=`/admin/${t?.id}/databases/${s.db_slug}/users/${e.id}`)}).catch(e=>{console.log(e.message)}).finally(()=>{setTimeout(()=>{u(!1)},2e3)})},children:[(0,r.jsx)("input",{id:"password",name:"password",type:"password",placeholder:"New Password",required:!0}),(0,r.jsx)("input",{id:"password-repeat",name:"password-repeat",type:"password",placeholder:"Repeat New Password",onInput:e=>{let s=document.getElementById("password"),t=document.getElementById("password-repeat"),r=s?.value?RegExp(`${s.value}`):null;r&&(t?.value?.match(r)?t.classList.remove("warning"):t.classList.add("warning"))},required:!0}),(0,r.jsx)("button",{children:"Change Password"})]})})})]})}},58262:(e,s,t)=>{t.a(e,async(e,r)=>{try{t.r(s),t.d(s,{default:()=>u,getServerSideProps:()=>c});var a=t(8732);t(82015);var i=t(25562),d=t(55880),n=t(50264),l=t(63378),o=e([d,n]);function u({user:e,database:s,table:t,dbSchemaData:r,singleUser:n,query:o,confirmedDelegetedUser:u}){let c=`${n.first_name} ${n.last_name} Users | Datasquirel"`,p=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:c}),(0,a.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,a.jsx)(i.A,{head:p,user:e,extraHeaderContent:(0,a.jsx)(d.A,{database:s,query:o,confirmedDelegetedUser:u,user:e}),children:(0,a.jsx)(l.A,{singleUser:n,database:s,user:e})})}[d,n]=o.then?(await o)():o;let c=n.getServerSideProps;r()}catch(e){r(e)}})},76102:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},39383:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/actions/users/user-auth")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var s=require("../../../../../../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),r=s.X(0,[883,9821,9796,5392,7769,3474],()=>t(6231));module.exports=r})();
|
||||
"use strict";(()=>{var e={};e.id=6377,e.ids=[6377],e.modules={6231:(e,s,t)=>{t.a(e,async(e,r)=>{try{t.r(s),t.d(s,{config:()=>g,default:()=>c,getServerSideProps:()=>x,getStaticPaths:()=>m,getStaticProps:()=>p,reportWebVitals:()=>h,routeModule:()=>b,unstable_getServerProps:()=>P,unstable_getServerSideProps:()=>S,unstable_getStaticParams:()=>v,unstable_getStaticPaths:()=>f,unstable_getStaticProps:()=>w});var a=t(63865),i=t(9455),d=t(30671),n=t(5583),l=t(19796),o=t(58262),u=e([o]);o=(u.then?(await u)():u)[0];let c=(0,d.M)(o,"default"),p=(0,d.M)(o,"getStaticProps"),m=(0,d.M)(o,"getStaticPaths"),x=(0,d.M)(o,"getServerSideProps"),g=(0,d.M)(o,"config"),h=(0,d.M)(o,"reportWebVitals"),w=(0,d.M)(o,"unstable_getStaticProps"),f=(0,d.M)(o,"unstable_getStaticPaths"),v=(0,d.M)(o,"unstable_getStaticParams"),P=(0,d.M)(o,"unstable_getServerProps"),S=(0,d.M)(o,"unstable_getServerSideProps"),b=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/databases/[single]/users/[user]/change-password",pathname:"/admin/[user_id]/databases/[single]/users/[user]/change-password",bundlePath:"",filename:""},components:{App:l.default,Document:n.default},userland:o});r()}catch(e){r(e)}})},63378:(e,s,t)=>{t.d(s,{A:()=>u});var r=t(8732),a=t(82015),i=t.n(a),d=t(53926),n=t(59023),l=t(46169),o=t(16757);function u({singleUser:e,database:s,user:t}){let[a,u]=i().useState(!1);return(0,r.jsxs)(i().Fragment,{children:[a&&(0,r.jsx)(o.A,{width:"20px"}),(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsx)("div",{className:"w-full justify-between flex-wrap",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(n.A,{}),(0,r.jsxs)("h1",{className:"text-3xl m-0",children:["Change Password For"," ",(0,r.jsxs)("u",{children:[e.first_name," ",e.last_name]})]})]})}),(0,r.jsx)(d.A,{user:t})]}),(0,r.jsx)("section",{className:"paper",children:(0,r.jsx)("div",{className:"w-full flex-col items-stretch",children:(0,r.jsxs)("form",{className:"flex flex-col items-stretch gap-4",onSubmit:r=>{r.preventDefault(),u(!0);let a=document.getElementById("password"),i=document.getElementById("password-repeat"),d=RegExp(`${a.value}`);if(!i?.value?.match(d)){window.alert("Passwords dont Match!");return}if(!window.confirm("change this User's password?")){u(!1);return}(0,l.A)("/api/changeDbUserPassword",{method:"POST",body:{userId:e.id,password:a.value,dbId:s.id}},!0).then(r=>{r.success&&(window.location.pathname=`/admin/${t?.id}/databases/${s.db_slug}/users/${e.id}`)}).catch(e=>{console.log(e.message)}).finally(()=>{setTimeout(()=>{u(!1)},2e3)})},children:[(0,r.jsx)("input",{id:"password",name:"password",type:"password",placeholder:"New Password",required:!0}),(0,r.jsx)("input",{id:"password-repeat",name:"password-repeat",type:"password",placeholder:"Repeat New Password",onInput:e=>{let s=document.getElementById("password"),t=document.getElementById("password-repeat"),r=s?.value?RegExp(`${s.value}`):null;r&&(t?.value?.match(r)?t.classList.remove("warning"):t.classList.add("warning"))},required:!0}),(0,r.jsx)("button",{children:"Change Password"})]})})})]})}},58262:(e,s,t)=>{t.a(e,async(e,r)=>{try{t.r(s),t.d(s,{default:()=>u,getServerSideProps:()=>c});var a=t(8732);t(82015);var i=t(25562),d=t(8949),n=t(50264),l=t(63378),o=e([d,n]);function u({user:e,database:s,table:t,dbSchemaData:r,singleUser:n,query:o,confirmedDelegetedUser:u}){let c=`${n.first_name} ${n.last_name} Users | Datasquirel"`,p=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:c}),(0,a.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,a.jsx)(i.A,{head:p,user:e,extraHeaderContent:(0,a.jsx)(d.A,{database:s,query:o,confirmedDelegetedUser:u,user:e}),children:(0,a.jsx)(l.A,{singleUser:n,database:s,user:e})})}[d,n]=o.then?(await o)():o;let c=n.getServerSideProps;r()}catch(e){r(e)}})},76102:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},39383:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/actions/users/user-auth")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var s=require("../../../../../../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),r=s.X(0,[883,9821,9796,5392,5868,3474],()=>t(6231));module.exports=r})();
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user