mysqlsyncr 1.0.8 → 1.0.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mysqlsyncr",
3
- "version": "1.0.8",
3
+ "version": "1.0.12",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -5,6 +5,8 @@ import { compareAllDatabases } from './compare.js';
5
5
  import { DBStructureChecker } from './index.js'; // Import your DBStructureChecker class
6
6
  import { applyDifferences } from './apply.js';
7
7
  import cors from 'cors';
8
+ import { fileURLToPath } from 'url';
9
+ import { dirname, join } from 'path';
8
10
 
9
11
  export const startApiServer = (port) => {
10
12
  const app = express();
@@ -12,6 +14,10 @@ export const startApiServer = (port) => {
12
14
  const server = http.createServer(app);
13
15
  app.use(express.json()); // Middleware to parse JSON requests
14
16
 
17
+ const __filename = fileURLToPath(import.meta.url);
18
+ const __dirname = dirname(__filename);
19
+ app.use(express.static(join(__dirname, '../ui/dist/spa')));
20
+
15
21
  app.post('/api/getDatabasesFromExistingDumps', async (req, res) => {
16
22
  const { config } = req.body;
17
23
  const databases = await getDatabasesFromExistingDumps(config);
@@ -86,9 +92,6 @@ export const startApiServer = (port) => {
86
92
  });
87
93
  });
88
94
 
89
- //serve the app from the ui folder
90
- app.use(express.static('ui/dist/spa'));
91
-
92
95
  // Start the server
93
96
  server.listen(port, () => {
94
97
  console.log(`Server is running on http://localhost:${port}`);
@@ -1 +1 @@
1
- import{c as L,i as I,e as P,l as D,p as N,b as g,h as m,f as J,g as C,j as X,s as Y,w as _,k as Z,o as T,m as H,n as V,q,r as ee,t as te,u as y,v as A,x as F,y as R,z as x,A as ne,B as oe,_ as ie,C as le,D as re,E as ae,F as k,G as B}from"./index-DKK0oGss.js";const se=L({name:"QPageContainer",setup(e,{slots:p}){const{proxy:{$q:n}}=C(),t=I(D,P);if(t===P)return console.error("QPageContainer needs to be child of QLayout"),P;N(X,!0);const r=g(()=>{const a={};return t.header.space===!0&&(a.paddingTop=`${t.header.size}px`),t.right.space===!0&&(a[`padding${n.lang.rtl===!0?"Left":"Right"}`]=`${t.right.size}px`),t.footer.space===!0&&(a.paddingBottom=`${t.footer.size}px`),t.left.space===!0&&(a[`padding${n.lang.rtl===!0?"Right":"Left"}`]=`${t.left.size}px`),a});return()=>m("div",{class:"q-page-container",style:r.value},J(p.default))}}),{passive:M}=q,ce=["both","horizontal","vertical"],ue=L({name:"QScrollObserver",props:{axis:{type:String,validator:e=>ce.includes(e),default:"vertical"},debounce:[String,Number],scrollTarget:Y},emits:["scroll"],setup(e,{emit:p}){const n={position:{top:0,left:0},direction:"down",directionChanged:!1,delta:{top:0,left:0},inflectionPoint:{top:0,left:0}};let t=null,r,a;_(()=>e.scrollTarget,()=>{l(),v()});function s(){t!==null&&t();const c=Math.max(0,ee(r)),w=te(r),d={top:c-n.position.top,left:w-n.position.left};if(e.axis==="vertical"&&d.top===0||e.axis==="horizontal"&&d.left===0)return;const z=Math.abs(d.top)>=Math.abs(d.left)?d.top<0?"up":"down":d.left<0?"left":"right";n.position={top:c,left:w},n.directionChanged=n.direction!==z,n.delta=d,n.directionChanged===!0&&(n.direction=z,n.inflectionPoint=n.position),p("scroll",{...n})}function v(){r=Z(a,e.scrollTarget),r.addEventListener("scroll",i,M),i(!0)}function l(){r!==void 0&&(r.removeEventListener("scroll",i,M),r=void 0)}function i(c){if(c===!0||e.debounce===0||e.debounce==="0")s();else if(t===null){const[w,d]=e.debounce?[setTimeout(s,e.debounce),clearTimeout]:[requestAnimationFrame(s),cancelAnimationFrame];t=()=>{d(w),t=null}}}const{proxy:h}=C();return _(()=>h.$q.lang.rtl,s),T(()=>{a=h.$el.parentNode,v()}),H(()=>{t!==null&&t(),l()}),Object.assign(h,{trigger:i,getPosition:()=>n}),V}});function de(){const e=y(!A.value);return e.value===!1&&T(()=>{e.value=!0}),{isHydrated:e}}const K=typeof ResizeObserver<"u",W=K===!0?{}:{style:"display:block;position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1;",url:"about:blank"},j=L({name:"QResizeObserver",props:{debounce:{type:[String,Number],default:100}},emits:["resize"],setup(e,{emit:p}){let n=null,t,r={width:-1,height:-1};function a(l){l===!0||e.debounce===0||e.debounce==="0"?s():n===null&&(n=setTimeout(s,e.debounce))}function s(){if(n!==null&&(clearTimeout(n),n=null),t){const{offsetWidth:l,offsetHeight:i}=t;(l!==r.width||i!==r.height)&&(r={width:l,height:i},p("resize",r))}}const{proxy:v}=C();if(v.trigger=a,K===!0){let l;const i=h=>{t=v.$el.parentNode,t?(l=new ResizeObserver(a),l.observe(t),s()):h!==!0&&F(()=>{i(!0)})};return T(()=>{i()}),H(()=>{n!==null&&clearTimeout(n),l!==void 0&&(l.disconnect!==void 0?l.disconnect():t&&l.unobserve(t))}),V}else{let l=function(){n!==null&&(clearTimeout(n),n=null),c!==void 0&&(c.removeEventListener!==void 0&&c.removeEventListener("resize",a,q.passive),c=void 0)},i=function(){l(),t&&t.contentDocument&&(c=t.contentDocument.defaultView,c.addEventListener("resize",a,q.passive),s())};const{isHydrated:h}=de();let c;return T(()=>{F(()=>{t=v.$el,t&&i()})}),H(l),()=>{if(h.value===!0)return m("object",{class:"q--avoid-card-border",style:W.style,tabindex:-1,type:"text/html",data:W.url,"aria-hidden":"true",onLoad:i})}}}}),fe=L({name:"QLayout",props:{container:Boolean,view:{type:String,default:"hhh lpr fff",validator:e=>/^(h|l)h(h|r) lpr (f|l)f(f|r)$/.test(e.toLowerCase())},onScroll:Function,onScrollHeight:Function,onResize:Function},setup(e,{slots:p,emit:n}){const{proxy:{$q:t}}=C(),r=y(null),a=y(t.screen.height),s=y(e.container===!0?0:t.screen.width),v=y({position:0,direction:"down",inflectionPoint:0}),l=y(0),i=y(A.value===!0?0:R()),h=g(()=>"q-layout q-layout--"+(e.container===!0?"containerized":"standard")),c=g(()=>e.container===!1?{minHeight:t.screen.height+"px"}:null),w=g(()=>i.value!==0?{[t.lang.rtl===!0?"left":"right"]:`${i.value}px`}:null),d=g(()=>i.value!==0?{[t.lang.rtl===!0?"right":"left"]:0,[t.lang.rtl===!0?"left":"right"]:`-${i.value}px`,width:`calc(100% + ${i.value}px)`}:null);function z(o){if(e.container===!0||document.qScrollPrevented!==!0){const u={position:o.position.top,direction:o.direction,directionChanged:o.directionChanged,inflectionPoint:o.inflectionPoint.top,delta:o.delta.top};v.value=u,e.onScroll!==void 0&&n("scroll",u)}}function U(o){const{height:u,width:b}=o;let f=!1;a.value!==u&&(f=!0,a.value=u,e.onScrollHeight!==void 0&&n("scrollHeight",u),E()),s.value!==b&&(f=!0,s.value=b),f===!0&&e.onResize!==void 0&&n("resize",o)}function G({height:o}){l.value!==o&&(l.value=o,E())}function E(){if(e.container===!0){const o=a.value>l.value?R():0;i.value!==o&&(i.value=o)}}let S=null;const O={instances:{},view:g(()=>e.view),isContainer:g(()=>e.container),rootRef:r,height:a,containerHeight:l,scrollbarWidth:i,totalWidth:g(()=>s.value+i.value),rows:g(()=>{const o=e.view.toLowerCase().split(" ");return{top:o[0].split(""),middle:o[1].split(""),bottom:o[2].split("")}}),header:x({size:0,offset:0,space:!1}),right:x({size:300,offset:0,space:!1}),footer:x({size:0,offset:0,space:!1}),left:x({size:300,offset:0,space:!1}),scroll:v,animate(){S!==null?clearTimeout(S):document.body.classList.add("q-body--layout-animate"),S=setTimeout(()=>{S=null,document.body.classList.remove("q-body--layout-animate")},155)},update(o,u,b){O[o][u]=b}};if(N(D,O),R()>0){let o=function(){f=null,$.classList.remove("hide-scrollbar")},u=function(){if(f===null){if($.scrollHeight>t.screen.height)return;$.classList.add("hide-scrollbar")}else clearTimeout(f);f=setTimeout(o,300)},b=function(Q){f!==null&&Q==="remove"&&(clearTimeout(f),o()),window[`${Q}EventListener`]("resize",u)},f=null;const $=document.body;_(()=>e.container!==!0?"add":"remove",b),e.container!==!0&&b("add"),ne(()=>{b("remove")})}return()=>{const o=oe(p.default,[m(ue,{onScroll:z}),m(j,{onResize:U})]),u=m("div",{class:h.value,style:c.value,ref:e.container===!0?void 0:r,tabindex:-1},o);return e.container===!0?m("div",{class:"q-layout-container overflow-hidden",ref:r},[m(j,{onResize:G}),m("div",{class:"absolute-full",style:w.value},[m("div",{class:"scroll",style:d.value},[u])])]):u}}}),ve={};function he(e,p){const n=le("router-view");return re(),ae(fe,{view:"lHh Lpr lFf"},{default:k(()=>[B(se,null,{default:k(()=>[B(n)]),_:1})]),_:1})}const me=ie(ve,[["render",he]]);export{me as default};
1
+ import{c as L,i as I,e as P,l as D,p as N,b as g,h as m,f as J,g as C,j as X,s as Y,w as _,k as Z,o as T,m as H,n as V,q,r as ee,t as te,u as y,v as A,x as F,y as R,z as x,A as ne,B as oe,_ as ie,C as le,D as re,E as ae,F as k,G as B}from"./index-C4-Ja7SU.js";const se=L({name:"QPageContainer",setup(e,{slots:p}){const{proxy:{$q:n}}=C(),t=I(D,P);if(t===P)return console.error("QPageContainer needs to be child of QLayout"),P;N(X,!0);const r=g(()=>{const a={};return t.header.space===!0&&(a.paddingTop=`${t.header.size}px`),t.right.space===!0&&(a[`padding${n.lang.rtl===!0?"Left":"Right"}`]=`${t.right.size}px`),t.footer.space===!0&&(a.paddingBottom=`${t.footer.size}px`),t.left.space===!0&&(a[`padding${n.lang.rtl===!0?"Right":"Left"}`]=`${t.left.size}px`),a});return()=>m("div",{class:"q-page-container",style:r.value},J(p.default))}}),{passive:M}=q,ce=["both","horizontal","vertical"],ue=L({name:"QScrollObserver",props:{axis:{type:String,validator:e=>ce.includes(e),default:"vertical"},debounce:[String,Number],scrollTarget:Y},emits:["scroll"],setup(e,{emit:p}){const n={position:{top:0,left:0},direction:"down",directionChanged:!1,delta:{top:0,left:0},inflectionPoint:{top:0,left:0}};let t=null,r,a;_(()=>e.scrollTarget,()=>{l(),v()});function s(){t!==null&&t();const c=Math.max(0,ee(r)),w=te(r),d={top:c-n.position.top,left:w-n.position.left};if(e.axis==="vertical"&&d.top===0||e.axis==="horizontal"&&d.left===0)return;const z=Math.abs(d.top)>=Math.abs(d.left)?d.top<0?"up":"down":d.left<0?"left":"right";n.position={top:c,left:w},n.directionChanged=n.direction!==z,n.delta=d,n.directionChanged===!0&&(n.direction=z,n.inflectionPoint=n.position),p("scroll",{...n})}function v(){r=Z(a,e.scrollTarget),r.addEventListener("scroll",i,M),i(!0)}function l(){r!==void 0&&(r.removeEventListener("scroll",i,M),r=void 0)}function i(c){if(c===!0||e.debounce===0||e.debounce==="0")s();else if(t===null){const[w,d]=e.debounce?[setTimeout(s,e.debounce),clearTimeout]:[requestAnimationFrame(s),cancelAnimationFrame];t=()=>{d(w),t=null}}}const{proxy:h}=C();return _(()=>h.$q.lang.rtl,s),T(()=>{a=h.$el.parentNode,v()}),H(()=>{t!==null&&t(),l()}),Object.assign(h,{trigger:i,getPosition:()=>n}),V}});function de(){const e=y(!A.value);return e.value===!1&&T(()=>{e.value=!0}),{isHydrated:e}}const K=typeof ResizeObserver<"u",W=K===!0?{}:{style:"display:block;position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1;",url:"about:blank"},j=L({name:"QResizeObserver",props:{debounce:{type:[String,Number],default:100}},emits:["resize"],setup(e,{emit:p}){let n=null,t,r={width:-1,height:-1};function a(l){l===!0||e.debounce===0||e.debounce==="0"?s():n===null&&(n=setTimeout(s,e.debounce))}function s(){if(n!==null&&(clearTimeout(n),n=null),t){const{offsetWidth:l,offsetHeight:i}=t;(l!==r.width||i!==r.height)&&(r={width:l,height:i},p("resize",r))}}const{proxy:v}=C();if(v.trigger=a,K===!0){let l;const i=h=>{t=v.$el.parentNode,t?(l=new ResizeObserver(a),l.observe(t),s()):h!==!0&&F(()=>{i(!0)})};return T(()=>{i()}),H(()=>{n!==null&&clearTimeout(n),l!==void 0&&(l.disconnect!==void 0?l.disconnect():t&&l.unobserve(t))}),V}else{let l=function(){n!==null&&(clearTimeout(n),n=null),c!==void 0&&(c.removeEventListener!==void 0&&c.removeEventListener("resize",a,q.passive),c=void 0)},i=function(){l(),t&&t.contentDocument&&(c=t.contentDocument.defaultView,c.addEventListener("resize",a,q.passive),s())};const{isHydrated:h}=de();let c;return T(()=>{F(()=>{t=v.$el,t&&i()})}),H(l),()=>{if(h.value===!0)return m("object",{class:"q--avoid-card-border",style:W.style,tabindex:-1,type:"text/html",data:W.url,"aria-hidden":"true",onLoad:i})}}}}),fe=L({name:"QLayout",props:{container:Boolean,view:{type:String,default:"hhh lpr fff",validator:e=>/^(h|l)h(h|r) lpr (f|l)f(f|r)$/.test(e.toLowerCase())},onScroll:Function,onScrollHeight:Function,onResize:Function},setup(e,{slots:p,emit:n}){const{proxy:{$q:t}}=C(),r=y(null),a=y(t.screen.height),s=y(e.container===!0?0:t.screen.width),v=y({position:0,direction:"down",inflectionPoint:0}),l=y(0),i=y(A.value===!0?0:R()),h=g(()=>"q-layout q-layout--"+(e.container===!0?"containerized":"standard")),c=g(()=>e.container===!1?{minHeight:t.screen.height+"px"}:null),w=g(()=>i.value!==0?{[t.lang.rtl===!0?"left":"right"]:`${i.value}px`}:null),d=g(()=>i.value!==0?{[t.lang.rtl===!0?"right":"left"]:0,[t.lang.rtl===!0?"left":"right"]:`-${i.value}px`,width:`calc(100% + ${i.value}px)`}:null);function z(o){if(e.container===!0||document.qScrollPrevented!==!0){const u={position:o.position.top,direction:o.direction,directionChanged:o.directionChanged,inflectionPoint:o.inflectionPoint.top,delta:o.delta.top};v.value=u,e.onScroll!==void 0&&n("scroll",u)}}function U(o){const{height:u,width:b}=o;let f=!1;a.value!==u&&(f=!0,a.value=u,e.onScrollHeight!==void 0&&n("scrollHeight",u),E()),s.value!==b&&(f=!0,s.value=b),f===!0&&e.onResize!==void 0&&n("resize",o)}function G({height:o}){l.value!==o&&(l.value=o,E())}function E(){if(e.container===!0){const o=a.value>l.value?R():0;i.value!==o&&(i.value=o)}}let S=null;const O={instances:{},view:g(()=>e.view),isContainer:g(()=>e.container),rootRef:r,height:a,containerHeight:l,scrollbarWidth:i,totalWidth:g(()=>s.value+i.value),rows:g(()=>{const o=e.view.toLowerCase().split(" ");return{top:o[0].split(""),middle:o[1].split(""),bottom:o[2].split("")}}),header:x({size:0,offset:0,space:!1}),right:x({size:300,offset:0,space:!1}),footer:x({size:0,offset:0,space:!1}),left:x({size:300,offset:0,space:!1}),scroll:v,animate(){S!==null?clearTimeout(S):document.body.classList.add("q-body--layout-animate"),S=setTimeout(()=>{S=null,document.body.classList.remove("q-body--layout-animate")},155)},update(o,u,b){O[o][u]=b}};if(N(D,O),R()>0){let o=function(){f=null,$.classList.remove("hide-scrollbar")},u=function(){if(f===null){if($.scrollHeight>t.screen.height)return;$.classList.add("hide-scrollbar")}else clearTimeout(f);f=setTimeout(o,300)},b=function(Q){f!==null&&Q==="remove"&&(clearTimeout(f),o()),window[`${Q}EventListener`]("resize",u)},f=null;const $=document.body;_(()=>e.container!==!0?"add":"remove",b),e.container!==!0&&b("add"),ne(()=>{b("remove")})}return()=>{const o=oe(p.default,[m(ue,{onScroll:z}),m(j,{onResize:U})]),u=m("div",{class:h.value,style:c.value,ref:e.container===!0?void 0:r,tabindex:-1},o);return e.container===!0?m("div",{class:"q-layout-container overflow-hidden",ref:r},[m(j,{onResize:G}),m("div",{class:"absolute-full",style:w.value},[m("div",{class:"scroll",style:d.value},[u])])]):u}}}),ve={};function he(e,p){const n=le("router-view");return re(),ae(fe,{view:"lHh Lpr lFf"},{default:k(()=>[B(se,null,{default:k(()=>[B(n)]),_:1})]),_:1})}const me=ie(ve,[["render",he]]);export{me as default};
@@ -1 +1 @@
1
- import{d as e,a}from"./index-DKK0oGss.js";const i=a.create({baseURL:"https://api.example.com"}),t=e(({app:o})=>{o.config.globalProperties.$axios=a,o.config.globalProperties.$api=i});export{i as api,t as default};
1
+ import{d as e,a}from"./index-C4-Ja7SU.js";const i=a.create({baseURL:"https://api.example.com"}),t=e(({app:o})=>{o.config.globalProperties.$axios=a,o.config.globalProperties.$api=i});export{i as api,t as default};