@budibase/server 1.1.16 → 1.1.17

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.
Files changed (163) hide show
  1. package/builder/assets/{index.c7fcf112.js → index.efac36d9.js} +1 -1
  2. package/builder/index.html +1 -1
  3. package/coverage/clover.xml +115 -120
  4. package/coverage/coverage-final.json +1 -1
  5. package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
  6. package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
  7. package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
  8. package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
  9. package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
  10. package/coverage/lcov-report/api/controllers/component.js.html +1 -1
  11. package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
  12. package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
  13. package/coverage/lcov-report/api/controllers/index.html +1 -1
  14. package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
  15. package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
  16. package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
  17. package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
  18. package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
  19. package/coverage/lcov-report/api/controllers/query/index.html +1 -1
  20. package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
  21. package/coverage/lcov-report/api/controllers/role.js.html +1 -1
  22. package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
  23. package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
  24. package/coverage/lcov-report/api/controllers/row/index.html +1 -1
  25. package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
  26. package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
  27. package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
  28. package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
  29. package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
  30. package/coverage/lcov-report/api/controllers/script.js.html +1 -1
  31. package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
  32. package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
  33. package/coverage/lcov-report/api/controllers/table/index.html +1 -1
  34. package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
  35. package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
  36. package/coverage/lcov-report/api/controllers/user.js.html +1 -1
  37. package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
  38. package/coverage/lcov-report/api/controllers/view/index.html +1 -1
  39. package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
  40. package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
  41. package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
  42. package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
  43. package/coverage/lcov-report/api/index.html +1 -1
  44. package/coverage/lcov-report/api/index.js.html +1 -1
  45. package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
  46. package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
  47. package/coverage/lcov-report/api/routes/auth.js.html +1 -1
  48. package/coverage/lcov-report/api/routes/automation.js.html +1 -1
  49. package/coverage/lcov-report/api/routes/backup.js.html +1 -1
  50. package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
  51. package/coverage/lcov-report/api/routes/component.js.html +1 -1
  52. package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
  53. package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
  54. package/coverage/lcov-report/api/routes/dev.js.html +1 -1
  55. package/coverage/lcov-report/api/routes/index.html +1 -1
  56. package/coverage/lcov-report/api/routes/integration.js.html +1 -1
  57. package/coverage/lcov-report/api/routes/layout.js.html +1 -1
  58. package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
  59. package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
  60. package/coverage/lcov-report/api/routes/permission.js.html +1 -1
  61. package/coverage/lcov-report/api/routes/query.js.html +1 -1
  62. package/coverage/lcov-report/api/routes/role.js.html +1 -1
  63. package/coverage/lcov-report/api/routes/routing.js.html +1 -1
  64. package/coverage/lcov-report/api/routes/screen.js.html +1 -1
  65. package/coverage/lcov-report/api/routes/script.js.html +1 -1
  66. package/coverage/lcov-report/api/routes/table.js.html +1 -1
  67. package/coverage/lcov-report/api/routes/templates.js.html +1 -1
  68. package/coverage/lcov-report/api/routes/user.js.html +1 -1
  69. package/coverage/lcov-report/api/routes/utils/index.html +1 -1
  70. package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
  71. package/coverage/lcov-report/api/routes/view.js.html +1 -1
  72. package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
  73. package/coverage/lcov-report/automations/actions.js.html +1 -1
  74. package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
  75. package/coverage/lcov-report/automations/bullboard.js.html +1 -1
  76. package/coverage/lcov-report/automations/index.html +1 -1
  77. package/coverage/lcov-report/automations/index.js.html +1 -1
  78. package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
  79. package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
  80. package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
  81. package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
  82. package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
  83. package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
  84. package/coverage/lcov-report/automations/steps/index.html +1 -1
  85. package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
  86. package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
  87. package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
  88. package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
  89. package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
  90. package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
  91. package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
  92. package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
  93. package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
  94. package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
  95. package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
  96. package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
  97. package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
  98. package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
  99. package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
  100. package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
  101. package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
  102. package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
  103. package/coverage/lcov-report/automations/triggers.js.html +1 -1
  104. package/coverage/lcov-report/constants/index.html +1 -1
  105. package/coverage/lcov-report/constants/index.js.html +1 -1
  106. package/coverage/lcov-report/constants/layouts.js.html +1 -1
  107. package/coverage/lcov-report/constants/screens.js.html +1 -1
  108. package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
  109. package/coverage/lcov-report/db/index.html +1 -1
  110. package/coverage/lcov-report/db/index.js.html +1 -1
  111. package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
  112. package/coverage/lcov-report/db/linkedRows/index.html +1 -1
  113. package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
  114. package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
  115. package/coverage/lcov-report/db/newid.js.html +1 -1
  116. package/coverage/lcov-report/db/utils.js.html +1 -1
  117. package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
  118. package/coverage/lcov-report/events/index.html +1 -1
  119. package/coverage/lcov-report/events/index.js.html +1 -1
  120. package/coverage/lcov-report/events/utils.js.html +1 -1
  121. package/coverage/lcov-report/index.html +19 -19
  122. package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
  123. package/coverage/lcov-report/integrations/tests/index.html +1 -1
  124. package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
  125. package/coverage/lcov-report/middleware/builder.js.html +1 -1
  126. package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
  127. package/coverage/lcov-report/middleware/index.html +1 -1
  128. package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
  129. package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
  130. package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
  131. package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
  132. package/coverage/lcov-report/middleware/utils.js.html +1 -1
  133. package/coverage/lcov-report/threads/automation.js.html +25 -43
  134. package/coverage/lcov-report/threads/index.html +20 -20
  135. package/coverage/lcov-report/threads/query.js.html +1 -1
  136. package/coverage/lcov-report/threads/utils.js.html +1 -1
  137. package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
  138. package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
  139. package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
  140. package/coverage/lcov-report/utilities/global.js.html +1 -1
  141. package/coverage/lcov-report/utilities/index.html +1 -1
  142. package/coverage/lcov-report/utilities/index.js.html +1 -1
  143. package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
  144. package/coverage/lcov-report/utilities/queue/index.html +1 -1
  145. package/coverage/lcov-report/utilities/routing/index.html +1 -1
  146. package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
  147. package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
  148. package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
  149. package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
  150. package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
  151. package/coverage/lcov-report/utilities/security.js.html +1 -1
  152. package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
  153. package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
  154. package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
  155. package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
  156. package/coverage/lcov-report/utilities/users.js.html +1 -1
  157. package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
  158. package/coverage/lcov.info +197 -206
  159. package/dist/package.json +6 -6
  160. package/dist/threads/automation.js +5 -11
  161. package/dist/tsconfig.build.tsbuildinfo +1 -1
  162. package/package.json +7 -7
  163. package/src/threads/automation.js +5 -11
@@ -916,7 +916,7 @@ function print() { __p += __j.call(arguments, '') }
916
916
  `),t=D("i"),i=U(n),l=U("?"),s=U(`
917
917
  This action cannot be undone.`)},m(o,a){b(o,e,a),b(o,t,a),L(t,i),L(t,l),b(o,s,a)},p(o,a){a&1&&n!==(n=o[0].name+"")&&Se(i,n)},d(o){o&&v(e),o&&v(t),o&&v(s)}}}function z_e(r){let e,t,n,i,l,s;e=new Pr({props:{$$slots:{control:[B_e],default:[D_e]},$$scope:{ctx:r}}});let o={okText:"Delete Automation",onOk:r[3],title:"Confirm Deletion",$$slots:{default:[j_e]},$$scope:{ctx:r}};n=new wr({props:o}),r[4](n);let a={automation:r[0]};return l=new N_e({props:a}),r[5](l),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment),i=R(),k(l.$$.fragment)},m(u,f){C(e,u,f),b(u,t,f),C(n,u,f),b(u,i,f),C(l,u,f),s=!0},p(u,[f]){const c={};f&134&&(c.$$scope={dirty:f,ctx:u}),e.$set(c);const p={};f&129&&(p.$$scope={dirty:f,ctx:u}),n.$set(p);const d={};f&1&&(d.automation=u[0]),l.$set(d)},i(u){s||(m(e.$$.fragment,u),m(n.$$.fragment,u),m(l.$$.fragment,u),s=!0)},o(u){_(e.$$.fragment,u),_(n.$$.fragment,u),_(l.$$.fragment,u),s=!1},d(u){S(e,u),u&&v(t),r[4](null),S(n,u),u&&v(i),r[5](null),S(l,u)}}}function q_e(r,e,t){let n;ae(r,Qt,f=>t(6,n=f));let{automation:i}=e,l,s;async function o(){try{await Pt.actions.delete(i),be.success("Automation deleted successfully"),n("../automate")}catch{be.error("Error deleting automation")}}function a(f){x[f?"unshift":"push"](()=>{l=f,t(1,l)})}function u(f){x[f?"unshift":"push"](()=>{s=f,t(2,s)})}return r.$$set=f=>{"automation"in f&&t(0,i=f.automation)},[i,l,s,o,a,u]}class U_e extends se{constructor(e){super();oe(this,e,q_e,z_e,ie,{automation:0})}}function Gk(r,e,t){const n=r.slice();return n[5]=e[t],n[7]=t,n}function F_e(r){let e,t,n;return e=new U_e({props:{automation:r[5]}}),{c(){k(e.$$.fragment),t=R()},m(i,l){C(e,i,l),b(i,t,l),n=!0},p(i,l){const s={};l&1&&(s.automation=i[5]),e.$set(s)},i(i){n||(m(e.$$.fragment,i),n=!0)},o(i){_(e.$$.fragment,i),n=!1},d(i){S(e,i),i&&v(t)}}}function Yk(r){let e,t;function n(){return r[3](r[5])}return e=new Fl({props:{border:r[7]>0,icon:"ShareAndroid",text:r[5].name,selected:r[5]._id===r[1],$$slots:{default:[F_e]},$$scope:{ctx:r}}}),e.$on("click",n),{c(){k(e.$$.fragment)},m(i,l){C(e,i,l),t=!0},p(i,l){r=i;const s={};l&1&&(s.text=r[5].name),l&3&&(s.selected=r[5]._id===r[1]),l&257&&(s.$$scope={dirty:l,ctx:r}),e.$set(s)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){S(e,i)}}}function V_e(r){let e,t,n=r[0].automations,i=[];for(let s=0;s<n.length;s+=1)i[s]=Yk(Gk(r,n,s));const l=s=>_(i[s],1,1,()=>{i[s]=null});return{c(){e=D("div");for(let s=0;s<i.length;s+=1)i[s].c();y(e,"class","automations-list svelte-g64vb")},m(s,o){b(s,e,o);for(let a=0;a<i.length;a+=1)i[a].m(e,null);t=!0},p(s,[o]){if(o&7){n=s[0].automations;let a;for(a=0;a<n.length;a+=1){const u=Gk(s,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=Yk(u),i[a].c(),m(i[a],1),i[a].m(e,null))}for(K(),a=n.length;a<i.length;a+=1)l(a);Z()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(s){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(s){s&&v(e),dt(i,s)}}}function H_e(r,e,t){let n,i,l;ae(r,Qt,a=>t(4,i=a)),ae(r,Pt,a=>t(0,l=a)),Et(async()=>{try{await Pt.actions.fetch()}catch{be.error("Error getting automations list")}});function s(a){Pt.actions.select(a),i(`./${a._id}`)}const o=a=>s(a);return r.$$.update=()=>{var a,u;r.$$.dirty&1&&t(1,n=(u=(a=l.selectedAutomation)==null?void 0:a.automation)==null?void 0:u._id)},[l,n,s,o]}class W_e extends se{constructor(e){super();oe(this,e,H_e,V_e,ie,{})}}function Jk(r,e,t){const n=r.slice();return n[17]=e[t][0],n[18]=e[t][1],n}function G_e(r){let e;return{c(){e=U(`Please name your automation, then select a trigger. Every automation must
918
918
  start with a trigger.`)},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function Y_e(r){let e;return{c(){e=U("Triggers")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function J_e(r){let e=r[18].name+"",t;return{c(){t=U(e)},m(n,i){b(n,t,i)},p(n,i){i&8&&e!==(e=n[18].name+"")&&Se(t,e)},d(n){n&&v(t)}}}function Xk(r){let e,t,n,i,l,s,o,a,u,f;n=new tt({props:{name:r[18].icon}}),s=new Ue({props:{size:"S",$$slots:{default:[J_e]},$$scope:{ctx:r}}});function c(){return r[13](r[18])}return{c(){e=D("div"),t=D("div"),k(n.$$.fragment),i=R(),l=D("span"),k(s.$$.fragment),o=R(),y(l,"class","icon-spacing svelte-d3iboa"),y(t,"class","item-body svelte-d3iboa"),y(e,"class","item svelte-d3iboa"),te(e,"selected",r[2]===r[18].name)},m(p,d){b(p,e,d),L(e,t),C(n,t,null),L(t,i),L(t,l),C(s,l,null),L(e,o),a=!0,u||(f=Le(e,"click",c),u=!0)},p(p,d){r=p;const g={};d&8&&(g.name=r[18].icon),n.$set(g);const h={};d&2097160&&(h.$$scope={dirty:d,ctx:r}),s.$set(h),d&12&&te(e,"selected",r[2]===r[18].name)},i(p){a||(m(n.$$.fragment,p),m(s.$$.fragment,p),a=!0)},o(p){_(n.$$.fragment,p),_(s.$$.fragment,p),a=!1},d(p){p&&v(e),S(n),S(s),u=!1,f()}}}function X_e(r){let e,t,n,i;e=new Ue({props:{size:"S",$$slots:{default:[Y_e]},$$scope:{ctx:r}}});let l=r[3],s=[];for(let a=0;a<l.length;a+=1)s[a]=Xk(Jk(r,l,a));const o=a=>_(s[a],1,1,()=>{s[a]=null});return{c(){k(e.$$.fragment),t=R(),n=D("div");for(let a=0;a<s.length;a+=1)s[a].c();y(n,"class","item-list svelte-d3iboa")},m(a,u){C(e,a,u),b(a,t,u),b(a,n,u);for(let f=0;f<s.length;f+=1)s[f].m(n,null);i=!0},p(a,u){const f={};if(u&2097152&&(f.$$scope={dirty:u,ctx:a}),e.$set(f),u&76){l=a[3];let c;for(c=0;c<l.length;c+=1){const p=Jk(a,l,c);s[c]?(s[c].p(p,u),m(s[c],1)):(s[c]=Xk(p),s[c].c(),m(s[c],1),s[c].m(n,null))}for(K(),c=l.length;c<s.length;c+=1)o(c);Z()}},i(a){if(!i){m(e.$$.fragment,a);for(let u=0;u<l.length;u+=1)m(s[u]);i=!0}},o(a){_(e.$$.fragment,a),s=s.filter(Boolean);for(let u=0;u<s.length;u+=1)_(s[u]);i=!1},d(a){S(e,a),a&&v(t),a&&v(n),dt(s,a)}}}function Q_e(r){let e,t,n,i,l,s,o,a,u,f;e=new Am({props:{header:"You must publish your app to activate your automations.",message:"To test your automation before publishing, you can use the 'Run Test' functionality on the next screen."}}),n=new Ue({props:{size:"XS",$$slots:{default:[G_e]},$$scope:{ctx:r}}});function c(g){r[10](g)}function p(g){r[11](g)}let d={label:"Name"};return r[0]!==void 0&&(d.value=r[0]),r[4]!==void 0&&(d.error=r[4]),l=new et({props:d}),x.push(()=>pe(l,"value",c)),x.push(()=>pe(l,"error",p)),l.$on("change",r[12]),u=new Me({props:{noPadding:!0,$$slots:{default:[X_e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment),i=R(),k(l.$$.fragment),a=R(),k(u.$$.fragment)},m(g,h){C(e,g,h),b(g,t,h),C(n,g,h),b(g,i,h),C(l,g,h),b(g,a,h),C(u,g,h),f=!0},p(g,h){const $={};h&2097152&&($.$$scope={dirty:h,ctx:g}),n.$set($);const w={};!s&&h&1&&(s=!0,w.value=g[0],de(()=>s=!1)),!o&&h&16&&(o=!0,w.error=g[4],de(()=>o=!1)),l.$set(w);const A={};h&2097164&&(A.$$scope={dirty:h,ctx:g}),u.$set(A)},i(g){f||(m(e.$$.fragment,g),m(n.$$.fragment,g),m(l.$$.fragment,g),m(u.$$.fragment,g),f=!0)},o(g){_(e.$$.fragment,g),_(n.$$.fragment,g),_(l.$$.fragment,g),_(u.$$.fragment,g),f=!1},d(g){S(e,g),g&&v(t),S(n,g),g&&v(i),S(l,g),g&&v(a),S(u,g)}}}function K_e(r){let e,t;return e=new zt({props:{title:"Create Automation",confirmText:"Save",size:"M",onConfirm:r[5],disabled:!r[2]||!r[0],$$slots:{default:[Q_e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,[i]){const l={};i&5&&(l.disabled=!n[2]||!n[0]),i&2097183&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function Z_e(r,e,t){let n,i,l,s,o,a;ae(r,Pt,I=>t(8,s=I)),ae(r,Qt,I=>t(16,o=I)),ae(r,Hs,I=>t(9,a=I));let u,f,c=!1,p,{webhookModal:d}=e;async function g(){var I;try{await Pt.actions.create({name:u,instanceId:n});const T=s.selectedAutomation.constructBlock("TRIGGER",p.stepId,p);Pt.actions.addBlockToAutomation(T),p.stepId===Ys.WEBHOOK&&d.show,await Pt.actions.save((I=s.selectedAutomation)==null?void 0:I.automation),be.success(`Automation ${u} created`),o(`./${s.selectedAutomation.automation._id}`)}catch{be.error("Error creating automation")}}const h=I=>{p=I,t(2,f=I.name)};function $(I){u=I,t(0,u)}function w(I){i=I,t(4,i),t(1,c),t(0,u)}const A=()=>t(1,c=!0),E=I=>h(I);return r.$$set=I=>{"webhookModal"in I&&t(7,d=I.webhookModal)},r.$$.update=()=>{r.$$.dirty&512&&(n=a._id),r.$$.dirty&3&&t(4,i=c&&!u?"Please specify a name for the automation.":null),r.$$.dirty&256&&t(3,l=Object.entries(s.blockDefinitions.TRIGGER))},[u,c,f,l,i,g,h,d,s,a,$,w,A,E]}class Qk extends se{constructor(e){super();oe(this,e,Z_e,K_e,ie,{webhookModal:7})}}function x_e(r){let e,t;return e=new Qk({props:{webhookModal:r[1]}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,i){const l={};i&2&&(l.webhookModal=n[1]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function ehe(r){let e,t,n,i;e=new W_e({});let l={$$slots:{default:[x_e]},$$scope:{ctx:r}};return n=new Ct({props:l}),r[2](n),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment)},m(s,o){C(e,s,o),b(s,t,o),C(n,s,o),i=!0},p(s,o){const a={};o&10&&(a.$$scope={dirty:o,ctx:s}),n.$set(a)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){S(e,s),s&&v(t),r[2](null),S(n,s)}}}function the(r){let e,t;return e=new hn({props:{title:"Automations",$$slots:{default:[ehe]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,i){const l={};i&11&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function nhe(r){let e,t,n,i,l,s;return t=new Kr({props:{selected:"Automations",$$slots:{default:[the]},$$scope:{ctx:r}}}),l=new tt({props:{hoverable:!0,name:"AddCircle"}}),l.$on("click",function(){pt(r[0].show)&&r[0].show.apply(this,arguments)}),{c(){e=D("div"),k(t.$$.fragment),n=R(),i=D("div"),k(l.$$.fragment),y(i,"class","add-button svelte-mcmub4"),y(e,"class","title svelte-mcmub4")},m(o,a){b(o,e,a),C(t,e,null),L(e,n),L(e,i),C(l,i,null),s=!0},p(o,[a]){r=o;const u={};a&11&&(u.$$scope={dirty:a,ctx:r}),t.$set(u)},i(o){s||(m(t.$$.fragment,o),m(l.$$.fragment,o),s=!0)},o(o){_(t.$$.fragment,o),_(l.$$.fragment,o),s=!1},d(o){o&&v(e),S(t),S(l)}}}function rhe(r,e,t){let{modal:n}=e,{webhookModal:i}=e;function l(s){x[s?"unshift":"push"](()=>{n=s,t(0,n)})}return r.$$set=s=>{"modal"in s&&t(0,n=s.modal),"webhookModal"in s&&t(1,i=s.webhookModal)},[n,i,l]}class ihe extends se{constructor(e){super();oe(this,e,rhe,nhe,ie,{modal:0,webhookModal:1})}}function Kk(r,e,t){const n=r.slice();return n[8]=e[t],n[10]=t,n}function Zk(r){var u;let e,t,n,i,l;function s(f){r[6](f)}let o={showTestStatus:!0,block:r[8],isTrigger:r[10]===0,testResult:(u=r[2])==null?void 0:u[r[10]]};r[3]!==void 0&&(o.showParameters=r[3]),e=new Pk({props:o}),x.push(()=>pe(e,"showParameters",s));let a=r[3]&&r[3][r[8].id]&&xk(r);return{c(){k(e.$$.fragment),n=R(),a&&a.c(),i=Oe()},m(f,c){C(e,f,c),b(f,n,c),a&&a.m(f,c),b(f,i,c),l=!0},p(f,c){var d;const p={};c&2&&(p.block=f[8]),c&4&&(p.testResult=(d=f[2])==null?void 0:d[f[10]]),!t&&c&8&&(t=!0,p.showParameters=f[3],de(()=>t=!1)),e.$set(p),f[3]&&f[3][f[8].id]?a?(a.p(f,c),c&10&&m(a,1)):(a=xk(f),a.c(),m(a,1),a.m(i.parentNode,i)):a&&(K(),_(a,1,1,()=>{a=null}),Z())},i(f){l||(m(e.$$.fragment,f),m(a),l=!0)},o(f){_(e.$$.fragment,f),_(a),l=!1},d(f){S(e,f),f&&v(n),a&&a.d(f),f&&v(i)}}}function xk(r){var a,u;let e,t,n,i,l,s;e=new Gt({props:{noMargin:!0}});let o=((u=(a=r[2])==null?void 0:a[r[10]])==null?void 0:u.outputs.iterations)&&e7(r);return l=new Kr({props:{noHorizPadding:!0,selected:"Input",$$slots:{default:[ahe]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment),t=R(),o&&o.c(),n=R(),i=D("div"),k(l.$$.fragment),y(i,"class","tabs svelte-1iblsnb")},m(f,c){C(e,f,c),b(f,t,c),o&&o.m(f,c),b(f,n,c),b(f,i,c),C(l,i,null),s=!0},p(f,c){var d,g;((g=(d=f[2])==null?void 0:d[f[10]])==null?void 0:g.outputs.iterations)?o?(o.p(f,c),c&4&&m(o,1)):(o=e7(f),o.c(),m(o,1),o.m(n.parentNode,n)):o&&(K(),_(o,1,1,()=>{o=null}),Z());const p={};c&2052&&(p.$$scope={dirty:c,ctx:f}),l.$set(p)},i(f){s||(m(e.$$.fragment,f),m(o),m(l.$$.fragment,f),s=!0)},o(f){_(e.$$.fragment,f),_(o),_(l.$$.fragment,f),s=!1},d(f){S(e,f),f&&v(t),o&&o.d(f),f&&v(n),f&&v(i),S(l)}}}function e7(r){let e,t,n,i,l,s;return t=new tt({props:{name:"Reuse"}}),l=new Ge({props:{$$slots:{default:[lhe]},$$scope:{ctx:r}}}),{c(){e=D("div"),k(t.$$.fragment),n=R(),i=D("div"),k(l.$$.fragment),ft(i,"margin-left","10px"),ft(e,"display","flex"),ft(e,"padding","10px 10px 0px 12px")},m(o,a){b(o,e,a),C(t,e,null),L(e,n),L(e,i),C(l,i,null),s=!0},p(o,a){const u={};a&2052&&(u.$$scope={dirty:a,ctx:o}),l.$set(u)},i(o){s||(m(t.$$.fragment,o),m(l.$$.fragment,o),s=!0)},o(o){_(t.$$.fragment,o),_(l.$$.fragment,o),s=!1},d(o){o&&v(e),S(t),S(l)}}}function lhe(r){var l,s;let e,t=((s=(l=r[2])==null?void 0:l[r[10]])==null?void 0:s.outputs.iterations)+"",n,i;return{c(){e=U("This loop ran "),n=U(t),i=U(" times.")},m(o,a){b(o,e,a),b(o,n,a),b(o,i,a)},p(o,a){var u,f;a&4&&t!==(t=((f=(u=o[2])==null?void 0:u[o[10]])==null?void 0:f.outputs.iterations)+"")&&Se(n,t)},d(o){o&&v(e),o&&v(n),o&&v(i)}}}function she(r){var n,i;let e,t;return e=new bi({props:{minHeight:"80px",disabled:!0,value:Nc((i=(n=r[2])==null?void 0:n[r[10]])==null?void 0:i.inputs,"No input")}}),{c(){k(e.$$.fragment)},m(l,s){C(e,l,s),t=!0},p(l,s){var a,u;const o={};s&4&&(o.value=Nc((u=(a=l[2])==null?void 0:a[l[10]])==null?void 0:u.inputs,"No input")),e.$set(o)},i(l){t||(m(e.$$.fragment,l),t=!0)},o(l){_(e.$$.fragment,l),t=!1},d(l){S(e,l)}}}function ohe(r){var n,i;let e,t;return e=new bi({props:{minHeight:"100px",disabled:!0,value:Nc((i=(n=r[2])==null?void 0:n[r[10]])==null?void 0:i.outputs,"No output")}}),{c(){k(e.$$.fragment)},m(l,s){C(e,l,s),t=!0},p(l,s){var a,u;const o={};s&4&&(o.value=Nc((u=(a=l[2])==null?void 0:a[l[10]])==null?void 0:u.outputs,"No output")),e.$set(o)},i(l){t||(m(e.$$.fragment,l),t=!0)},o(l){_(e.$$.fragment,l),t=!1},d(l){S(e,l)}}}function ahe(r){let e,t,n,i;return e=new hn({props:{title:"Input",$$slots:{default:[she]},$$scope:{ctx:r}}}),n=new hn({props:{title:"Output",$$slots:{default:[ohe]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment)},m(l,s){C(e,l,s),b(l,t,s),C(n,l,s),i=!0},p(l,s){const o={};s&2052&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const a={};s&2052&&(a.$$scope={dirty:s,ctx:l}),n.$set(a)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){S(e,l),l&&v(t),S(n,l)}}}function t7(r){let e;return{c(){e=D("div"),y(e,"class","separator svelte-1iblsnb")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function n7(r){let e,t,n,i,l,s=r[8].stepId!==Yi.LOOP&&Zk(r),o=r[1].length-1!==r[10]&&t7();return{c(){e=D("div"),s&&s.c(),n=R(),o&&o.c(),i=Oe(),y(e,"class","block svelte-1iblsnb"),y(e,"style",t=r[0]?`width: ${r[0]}`:"")},m(a,u){b(a,e,u),s&&s.m(e,null),b(a,n,u),o&&o.m(a,u),b(a,i,u),l=!0},p(a,u){a[8].stepId!==Yi.LOOP?s?(s.p(a,u),u&2&&m(s,1)):(s=Zk(a),s.c(),m(s,1),s.m(e,null)):s&&(K(),_(s,1,1,()=>{s=null}),Z()),(!l||u&1&&t!==(t=a[0]?`width: ${a[0]}`:""))&&y(e,"style",t),a[1].length-1!==a[10]?o||(o=t7(),o.c(),o.m(i.parentNode,i)):o&&(o.d(1),o=null)},i(a){l||(m(s),l=!0)},o(a){_(s),l=!1},d(a){a&&v(e),s&&s.d(),a&&v(n),o&&o.d(a),a&&v(i)}}}function uhe(r){let e,t,n=r[1],i=[];for(let s=0;s<n.length;s+=1)i[s]=n7(Kk(r,n,s));const l=s=>_(i[s],1,1,()=>{i[s]=null});return{c(){e=D("div");for(let s=0;s<i.length;s+=1)i[s].c();y(e,"class","container svelte-1iblsnb")},m(s,o){b(s,e,o);for(let a=0;a<i.length;a+=1)i[a].m(e,null);t=!0},p(s,[o]){if(o&15){n=s[1];let a;for(a=0;a<n.length;a+=1){const u=Kk(s,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=n7(u),i[a].c(),m(i[a],1),i[a].m(e,null))}for(K(),a=n.length;a<i.length;a+=1)l(a);Z()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(s){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(s){s&&v(e),dt(i,s)}}}function Nc(r,e){return r?JSON.stringify(r,null,2):e}function fhe(r,e,t){let n,{automation:i}=e,{testResults:l}=e,{width:s="400px"}=e,o,a;function u(c){return c==null?void 0:c.steps.filter(p=>p.stepId!==Yi.LOOP||[])}function f(c){o=c,t(3,o)}return r.$$set=c=>{"automation"in c&&t(4,i=c.automation),"testResults"in c&&t(5,l=c.testResults),"width"in c&&t(0,s=c.width)},r.$$.update=()=>{if(r.$$.dirty&32&&t(2,n=u(l)),r.$$.dirty&22){if(t(1,a=[]),i)i.definition.trigger&&a.push(i.definition.trigger),t(1,a=a.concat(i.definition.steps||[]).filter(c=>c.stepId!==Yi.LOOP));else if(n){t(1,a=n||[]);let c=0;for(let p of a)p.id=c++}}},[s,a,n,o,i,l,f]}class r7 extends se{constructor(e){super();oe(this,e,fhe,uhe,ie,{automation:4,testResults:5,width:0})}}function che(r){let e,t,n,i,l,s,o,a,u,f,c,p,d;return n=new tt({props:{name:"MultipleCheck"}}),a=new tt({props:{hoverable:!0,name:"Close"}}),a.$on("click",r[4]),f=new Gt({}),p=new r7({props:{automation:r[1],testResults:r[0]}}),{c(){e=D("div"),t=D("div"),k(n.$$.fragment),i=R(),l=D("div"),l.textContent="Test Details",s=R(),o=D("div"),k(a.$$.fragment),u=R(),k(f.$$.fragment),c=R(),k(p.$$.fragment),ft(l,"padding-left","var(--spacing-l)"),y(t,"class","title-text svelte-nwwj95"),ft(o,"padding-right","var(--spacing-xl)"),y(e,"class","title svelte-nwwj95")},m(g,h){b(g,e,h),L(e,t),C(n,t,null),L(t,i),L(t,l),L(e,s),L(e,o),C(a,o,null),b(g,u,h),C(f,g,h),b(g,c,h),C(p,g,h),d=!0},p(g,[h]){const $={};h&2&&($.automation=g[1]),h&1&&($.testResults=g[0]),p.$set($)},i(g){d||(m(n.$$.fragment,g),m(a.$$.fragment,g),m(f.$$.fragment,g),m(p.$$.fragment,g),d=!0)},o(g){_(n.$$.fragment,g),_(a.$$.fragment,g),_(f.$$.fragment,g),_(p.$$.fragment,g),d=!1},d(g){g&&v(e),S(n),S(a),g&&v(u),S(f,g),g&&v(c),S(p,g)}}}function phe(r,e,t){let n;ae(r,Pt,a=>t(2,n=a));let{automation:i}=e,{testResults:l}=e,s;const o=async()=>{gn(Pt,n.showTestPanel=!1,n)};return r.$$set=a=>{"automation"in a&&t(1,i=a.automation),"testResults"in a&&t(0,l=a.testResults)},r.$$.update=()=>{var a;r.$$.dirty&5&&(l||t(0,l=(a=n.selectedAutomation)==null?void 0:a.testResults)),r.$$.dirty&11&&(t(3,s=[]),i?(i.definition.trigger&&s.push(i.definition.trigger),t(3,s=s.concat(i.definition.steps||[]).filter(u=>u.stepId!==Yi.LOOP))):l&&t(3,s=l.steps||[]))},[l,i,n,s,o]}class dhe extends se{constructor(e){super();oe(this,e,phe,che,ie,{automation:1,testResults:0})}}function mhe(r){let e,t,n,i;return n=new Me({props:{gap:"S",justifyItems:"center",$$slots:{default:[bhe]},$$scope:{ctx:r}}}),{c(){e=D("div"),t=D("div"),k(n.$$.fragment),y(t,"class","main svelte-374m3f"),y(e,"class","centered svelte-374m3f")},m(l,s){b(l,e,s),L(e,t),C(n,t,null),i=!0},p(l,s){const o={};s&258&&(o.$$scope={dirty:s,ctx:l}),n.$set(o)},i(l){i||(m(n.$$.fragment,l),i=!0)},o(l){_(n.$$.fragment,l),i=!1},d(l){l&&v(e),S(n)}}}function ghe(r){let e;const t=r[4].default,n=ht(t,r,r[8],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,l){n&&n.p&&(!e||l&256)&&$t(n,t,i,i[8],e?vt(t,i[8],l,null):bt(i[8]),null)},i(i){e||(m(n,i),e=!0)},o(i){_(n,i),e=!1},d(i){n&&n.d(i)}}}function _he(r){let e;return{c(){e=U("You have no automations")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function hhe(r){let e;return{c(){e=U("Let's fix that. Call the bots!")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function $he(r){let e;return{c(){e=U("Create automation")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function bhe(r){let e,t,n,i,l,s,o,a,u;return i=new ut({props:{size:"M",$$slots:{default:[_he]},$$scope:{ctx:r}}}),s=new Ue({props:{size:"M",$$slots:{default:[hhe]},$$scope:{ctx:r}}}),a=new nt({props:{size:"M",cta:!0,$$slots:{default:[$he]},$$scope:{ctx:r}}}),a.$on("click",r[5]),{c(){e=me("svg"),t=me("use"),n=R(),k(i.$$.fragment),l=R(),k(s.$$.fragment),o=R(),k(a.$$.fragment),Ht(t,"xlink:href","#spectrum-icon-18-WorkflowAdd"),y(e,"width","60px"),y(e,"height","60px"),y(e,"class","spectrum-Icon"),y(e,"focusable","false")},m(f,c){b(f,e,c),L(e,t),b(f,n,c),C(i,f,c),b(f,l,c),C(s,f,c),b(f,o,c),C(a,f,c),u=!0},p(f,c){const p={};c&256&&(p.$$scope={dirty:c,ctx:f}),i.$set(p);const d={};c&256&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const g={};c&256&&(g.$$scope={dirty:c,ctx:f}),a.$set(g)},i(f){u||(m(i.$$.fragment,f),m(s.$$.fragment,f),m(a.$$.fragment,f),u=!0)},o(f){_(i.$$.fragment,f),_(s.$$.fragment,f),_(a.$$.fragment,f),u=!1},d(f){f&&v(e),f&&v(n),S(i,f),f&&v(l),S(s,f),f&&v(o),S(a,f)}}}function i7(r){let e,t,n;return t=new dhe({props:{automation:r[3]}}),{c(){e=D("div"),k(t.$$.fragment),y(e,"class","setup svelte-374m3f")},m(i,l){b(i,e,l),C(t,e,null),n=!0},p(i,l){const s={};l&8&&(s.automation=i[3]),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&v(e),S(t)}}}function vhe(r){let e,t;return e=new Qk({props:{webhookModal:r[2]}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,i){const l={};i&4&&(l.webhookModal=n[2]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function whe(r){let e,t;return e=new u1({}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function yhe(r){let e,t,n,i,l,s,o,a,u,f,c,p,d;n=new ihe({props:{modal:r[1],webhookModal:r[2]}});const g=[ghe,mhe],h=[];function $(I,T){return I[3]?0:1}s=$(r),o=h[s]=g[s](r);let w=r[0].showTestPanel&&i7(r),A={$$slots:{default:[vhe]},$$scope:{ctx:r}};f=new Ct({props:A}),r[6](f);let E={width:"30%",$$slots:{default:[whe]},$$scope:{ctx:r}};return p=new Ct({props:E}),r[7](p),{c(){e=D("div"),t=D("div"),k(n.$$.fragment),i=R(),l=D("div"),o.c(),a=R(),w&&w.c(),u=R(),k(f.$$.fragment),c=R(),k(p.$$.fragment),y(t,"class","nav svelte-374m3f"),y(l,"class","content svelte-374m3f"),y(e,"class","root svelte-374m3f")},m(I,T){b(I,e,T),L(e,t),C(n,t,null),L(e,i),L(e,l),h[s].m(l,null),L(e,a),w&&w.m(e,null),L(e,u),C(f,e,null),L(e,c),C(p,e,null),d=!0},p(I,[T]){const P={};T&2&&(P.modal=I[1]),T&4&&(P.webhookModal=I[2]),n.$set(P);let M=s;s=$(I),s===M?h[s].p(I,T):(K(),_(h[M],1,1,()=>{h[M]=null}),Z(),o=h[s],o?o.p(I,T):(o=h[s]=g[s](I),o.c()),m(o,1),o.m(l,null)),I[0].showTestPanel?w?(w.p(I,T),T&1&&m(w,1)):(w=i7(I),w.c(),m(w,1),w.m(e,u)):w&&(K(),_(w,1,1,()=>{w=null}),Z());const B={};T&260&&(B.$$scope={dirty:T,ctx:I}),f.$set(B);const j={};T&256&&(j.$$scope={dirty:T,ctx:I}),p.$set(j)},i(I){d||(m(n.$$.fragment,I),m(o),m(w),m(f.$$.fragment,I),m(p.$$.fragment,I),d=!0)},o(I){_(n.$$.fragment,I),_(o),_(w),_(f.$$.fragment,I),_(p.$$.fragment,I),d=!1},d(I){I&&v(e),S(n),h[s].d(),w&&w.d(),r[6](null),S(f),r[7](null),S(p)}}}function khe(r,e,t){let n,i;ae(r,Pt,p=>t(0,i=p));let{$$slots:l={},$$scope:s}=e,o,a;Et(()=>{gn(Pt,i.showTestPanel=!1,i)});const u=()=>o.show();function f(p){x[p?"unshift":"push"](()=>{o=p,t(1,o)})}function c(p){x[p?"unshift":"push"](()=>{a=p,t(2,a)})}return r.$$set=p=>{"$$scope"in p&&t(8,s=p.$$scope)},r.$$.update=()=>{var p;r.$$.dirty&1&&t(3,n=((p=i.selectedAutomation)==null?void 0:p.automation)||i.automations[0])},[i,o,a,n,l,u,f,c,s]}class Che extends se{constructor(e){super();oe(this,e,khe,yhe,ie,{})}}function She(r){let e,t,n,i,l,s,o;function a(f){r[4](f)}let u={};return r[2]!==void 0&&(u.value=r[2]),l=new et({props:u}),x.push(()=>pe(l,"value",a)),{c(){e=D("span"),e.textContent=`The changes you have made will be deleted and the application reverted
919
- back to its production state.`,t=R(),n=D("span"),n.textContent="Please enter your app name to continue.",i=R(),k(l.$$.fragment)},m(f,c){b(f,e,c),b(f,t,c),b(f,n,c),b(f,i,c),C(l,f,c),o=!0},p(f,c){const p={};!s&&c&4&&(s=!0,p.value=f[2],de(()=>s=!1)),l.$set(p)},i(f){o||(m(l.$$.fragment,f),o=!0)},o(f){_(l.$$.fragment,f),o=!1},d(f){f&&v(e),f&&v(t),f&&v(n),f&&v(i),S(l,f)}}}function Ahe(r){let e,t;return e=new zt({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:r[3],disabled:r[2]!==r[0].name,$$slots:{default:[She]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,i){const l={};i&5&&(l.disabled=n[2]!==n[0].name),i&132&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function Ohe(r){let e,t,n,i;e=new tt({props:{name:"Revert",hoverable:!0,tooltip:"Revert changes",dataCy:"revert-application-topnav"}}),e.$on("click",function(){pt(r[1].show)&&r[1].show.apply(this,arguments)});let l={$$slots:{default:[Ahe]},$$scope:{ctx:r}};return n=new Ct({props:l}),r[5](n),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment)},m(s,o){C(e,s,o),b(s,t,o),C(n,s,o),i=!0},p(s,[o]){r=s;const a={};o&133&&(a.$$scope={dirty:o,ctx:r}),n.$set(a)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){S(e,s),s&&v(t),r[5](null),S(n,s)}}}function Ehe(r,e,t){let n,i;ae(r,qe,f=>t(0,i=f));let l,s;const o=async()=>{try{await He.revertAppChanges(n);const f=await He.fetchAppPackage(n);await qe.actions.initialise(f),be.info("Changes reverted successfully")}catch(f){be.error(`Error reverting changes: ${f}`)}};function a(f){s=f,t(2,s)}function u(f){x[f?"unshift":"push"](()=>{l=f,t(1,l)})}return r.$$.update=()=>{r.$$.dirty&1&&(n=i.appId)},[i,l,s,o,a,u]}class Ihe extends se{constructor(e){super();oe(this,e,Ehe,Ohe,ie,{})}}const The="@budibase/client",Lhe="1.1.15",Phe="MPL-2.0",Nhe="dist/budibase-client.js",Rhe="dist/budibase-client.js",Mhe="module",Dhe="src/index.js",Bhe={".":{import:"./dist/budibase-client.js",require:"./dist/budibase-client.js"},"./package.json":"./package.json","./manifest.json":"./manifest.json"},jhe={build:"rollup -c","dev:builder":"rollup -cw"},zhe={"@budibase/bbui":"^1.1.15","@budibase/frontend-core":"^1.1.15","@budibase/string-templates":"^1.1.15","@spectrum-css/button":"^3.0.3","@spectrum-css/card":"^3.0.3","@spectrum-css/divider":"^1.0.3","@spectrum-css/link":"^3.1.3","@spectrum-css/page":"^3.0.1","@spectrum-css/tag":"^3.1.4","@spectrum-css/typography":"^3.0.2","@spectrum-css/vars":"^3.0.1",apexcharts:"^3.22.1",dayjs:"^1.10.5",downloadjs:"1.4.7",leaflet:"^1.7.1",regexparam:"^1.3.0","rollup-plugin-polyfill-node":"^0.8.0","sanitize-html":"^2.7.0",screenfull:"^6.0.1",shortid:"^2.2.15",svelte:"^3.38.2","svelte-apexcharts":"^1.0.2","svelte-flatpickr":"^3.1.0","svelte-spa-router":"^3.0.5"},qhe={"@rollup/plugin-alias":"^3.1.5","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-node-resolve":"^11.2.1",postcss:"^8.2.10",rollup:"^2.44.0","rollup-plugin-json":"^4.0.0","rollup-plugin-postcss":"^4.0.0","rollup-plugin-svelte":"^7.1.0","rollup-plugin-svg":"^2.0.0","rollup-plugin-terser":"^7.0.2","rollup-plugin-visualizer":"^5.5.4"},Uhe="d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc";var Xs={name:The,version:Lhe,license:Phe,module:Nhe,main:Rhe,type:Mhe,svelte:Dhe,exports:Bhe,scripts:jhe,dependencies:zhe,devDependencies:qhe,gitHead:Uhe};function l7(r){let e,t,n;return t=new tt({props:{name:"Refresh",hoverable:!0,tooltip:r[4]?"An update is available":"No updates are available"}}),t.$on("click",function(){pt(r[2].show)&&r[2].show.apply(this,arguments)}),{c(){e=D("div"),k(t.$$.fragment),y(e,"class","icon-wrapper svelte-18djg2h"),te(e,"highlight",r[4])},m(i,l){b(i,e,l),C(t,e,null),n=!0},p(i,l){r=i;const s={};l&16&&(s.tooltip=r[4]?"An update is available":"No updates are available"),t.$set(s),l&16&&te(e,"highlight",r[4])},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&v(e),S(t)}}}function Fhe(r){let e,t;return e=new Ue({props:{size:"S",$$slots:{default:[Hhe]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,i){const l={};i&4098&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function Vhe(r){let e,t;return e=new Ue({props:{size:"S",$$slots:{default:[Whe]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,i){const l={};i&4098&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function Hhe(r){let e,t,n=r[1].version+"",i,l;return{c(){e=U("This app is currently using version "),t=D("b"),i=U(n),l=U(` which is the
919
+ back to its production state.`,t=R(),n=D("span"),n.textContent="Please enter your app name to continue.",i=R(),k(l.$$.fragment)},m(f,c){b(f,e,c),b(f,t,c),b(f,n,c),b(f,i,c),C(l,f,c),o=!0},p(f,c){const p={};!s&&c&4&&(s=!0,p.value=f[2],de(()=>s=!1)),l.$set(p)},i(f){o||(m(l.$$.fragment,f),o=!0)},o(f){_(l.$$.fragment,f),o=!1},d(f){f&&v(e),f&&v(t),f&&v(n),f&&v(i),S(l,f)}}}function Ahe(r){let e,t;return e=new zt({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:r[3],disabled:r[2]!==r[0].name,$$slots:{default:[She]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,i){const l={};i&5&&(l.disabled=n[2]!==n[0].name),i&132&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function Ohe(r){let e,t,n,i;e=new tt({props:{name:"Revert",hoverable:!0,tooltip:"Revert changes",dataCy:"revert-application-topnav"}}),e.$on("click",function(){pt(r[1].show)&&r[1].show.apply(this,arguments)});let l={$$slots:{default:[Ahe]},$$scope:{ctx:r}};return n=new Ct({props:l}),r[5](n),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment)},m(s,o){C(e,s,o),b(s,t,o),C(n,s,o),i=!0},p(s,[o]){r=s;const a={};o&133&&(a.$$scope={dirty:o,ctx:r}),n.$set(a)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){S(e,s),s&&v(t),r[5](null),S(n,s)}}}function Ehe(r,e,t){let n,i;ae(r,qe,f=>t(0,i=f));let l,s;const o=async()=>{try{await He.revertAppChanges(n);const f=await He.fetchAppPackage(n);await qe.actions.initialise(f),be.info("Changes reverted successfully")}catch(f){be.error(`Error reverting changes: ${f}`)}};function a(f){s=f,t(2,s)}function u(f){x[f?"unshift":"push"](()=>{l=f,t(1,l)})}return r.$$.update=()=>{r.$$.dirty&1&&(n=i.appId)},[i,l,s,o,a,u]}class Ihe extends se{constructor(e){super();oe(this,e,Ehe,Ohe,ie,{})}}const The="@budibase/client",Lhe="1.1.16",Phe="MPL-2.0",Nhe="dist/budibase-client.js",Rhe="dist/budibase-client.js",Mhe="module",Dhe="src/index.js",Bhe={".":{import:"./dist/budibase-client.js",require:"./dist/budibase-client.js"},"./package.json":"./package.json","./manifest.json":"./manifest.json"},jhe={build:"rollup -c","dev:builder":"rollup -cw"},zhe={"@budibase/bbui":"^1.1.16","@budibase/frontend-core":"^1.1.16","@budibase/string-templates":"^1.1.16","@spectrum-css/button":"^3.0.3","@spectrum-css/card":"^3.0.3","@spectrum-css/divider":"^1.0.3","@spectrum-css/link":"^3.1.3","@spectrum-css/page":"^3.0.1","@spectrum-css/tag":"^3.1.4","@spectrum-css/typography":"^3.0.2","@spectrum-css/vars":"^3.0.1",apexcharts:"^3.22.1",dayjs:"^1.10.5",downloadjs:"1.4.7",leaflet:"^1.7.1",regexparam:"^1.3.0","rollup-plugin-polyfill-node":"^0.8.0","sanitize-html":"^2.7.0",screenfull:"^6.0.1",shortid:"^2.2.15",svelte:"^3.38.2","svelte-apexcharts":"^1.0.2","svelte-flatpickr":"^3.1.0","svelte-spa-router":"^3.0.5"},qhe={"@rollup/plugin-alias":"^3.1.5","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-node-resolve":"^11.2.1",postcss:"^8.2.10",rollup:"^2.44.0","rollup-plugin-json":"^4.0.0","rollup-plugin-postcss":"^4.0.0","rollup-plugin-svelte":"^7.1.0","rollup-plugin-svg":"^2.0.0","rollup-plugin-terser":"^7.0.2","rollup-plugin-visualizer":"^5.5.4"},Uhe="d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc";var Xs={name:The,version:Lhe,license:Phe,module:Nhe,main:Rhe,type:Mhe,svelte:Dhe,exports:Bhe,scripts:jhe,dependencies:zhe,devDependencies:qhe,gitHead:Uhe};function l7(r){let e,t,n;return t=new tt({props:{name:"Refresh",hoverable:!0,tooltip:r[4]?"An update is available":"No updates are available"}}),t.$on("click",function(){pt(r[2].show)&&r[2].show.apply(this,arguments)}),{c(){e=D("div"),k(t.$$.fragment),y(e,"class","icon-wrapper svelte-18djg2h"),te(e,"highlight",r[4])},m(i,l){b(i,e,l),C(t,e,null),n=!0},p(i,l){r=i;const s={};l&16&&(s.tooltip=r[4]?"An update is available":"No updates are available"),t.$set(s),l&16&&te(e,"highlight",r[4])},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&v(e),S(t)}}}function Fhe(r){let e,t;return e=new Ue({props:{size:"S",$$slots:{default:[Hhe]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,i){const l={};i&4098&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function Vhe(r){let e,t;return e=new Ue({props:{size:"S",$$slots:{default:[Whe]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,i){const l={};i&4098&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function Hhe(r){let e,t,n=r[1].version+"",i,l;return{c(){e=U("This app is currently using version "),t=D("b"),i=U(n),l=U(` which is the
920
920
  latest version available.`)},m(s,o){b(s,e,o),b(s,t,o),L(t,i),b(s,l,o)},p(s,o){o&2&&n!==(n=s[1].version+"")&&Se(i,n)},d(s){s&&v(e),s&&v(t),s&&v(l)}}}function Whe(r){let e,t,n=r[1].version+"",i,l,s,o;return{c(){e=U("This app is currently using version "),t=D("b"),i=U(n),l=U(`, but version
921
921
  `),s=D("b"),s.textContent=`${Xs.version}`,o=U(` is available. Updates can contain new features,
922
922
  performance improvements and bug fixes.`)},m(a,u){b(a,e,u),b(a,t,u),L(t,i),b(a,l,u),b(a,s,u),b(a,o,u)},p(a,u){u&2&&n!==(n=a[1].version+"")&&Se(i,n)},d(a){a&&v(e),a&&v(t),a&&v(l),a&&v(s),a&&v(o)}}}function s7(r){let e,t;return e=new Ue({props:{size:"S",$$slots:{default:[Ghe]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,i){const l={};i&4098&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function Ghe(r){let e,t,n=r[1].revertableVersion+"",i,l;return{c(){e=U(`You can revert this app to version
@@ -10,7 +10,7 @@
10
10
  href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap"
11
11
  rel="stylesheet"
12
12
  />
13
- <script type="module" crossorigin src="/builder/assets/index.c7fcf112.js"></script>
13
+ <script type="module" crossorigin src="/builder/assets/index.efac36d9.js"></script>
14
14
  <link rel="modulepreload" href="/builder/assets/vendor.7f11b0ca.js">
15
15
  <link rel="stylesheet" href="/builder/assets/vendor.5e1fe644.css">
16
16
  <link rel="stylesheet" href="/builder/assets/index.5c0ce502.css">
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1658154256857" clover="3.2.0">
3
- <project timestamp="1658154256857" name="All files">
4
- <metrics statements="4377" coveredstatements="3163" conditionals="1829" coveredconditionals="964" methods="632" coveredmethods="446" elements="6838" coveredelements="4573" complexity="0" loc="4377" ncloc="4377" packages="23" files="129" classes="129"/>
2
+ <coverage generated="1658166650401" clover="3.2.0">
3
+ <project timestamp="1658166650401" name="All files">
4
+ <metrics statements="4372" coveredstatements="3154" conditionals="1827" coveredconditionals="962" methods="631" coveredmethods="444" elements="6830" coveredelements="4560" complexity="0" loc="4372" ncloc="4372" packages="23" files="129" classes="129"/>
5
5
  <package name="api">
6
6
  <metrics statements="35" coveredstatements="34" conditionals="5" coveredconditionals="2" methods="4" coveredmethods="4"/>
7
7
  <file name="index.js" path="/home/runner/work/budibase/budibase/packages/server/src/api/index.js">
@@ -3844,9 +3844,9 @@
3844
3844
  </file>
3845
3845
  </package>
3846
3846
  <package name="threads">
3847
- <metrics statements="331" coveredstatements="220" conditionals="151" coveredconditionals="69" methods="35" coveredmethods="27"/>
3847
+ <metrics statements="326" coveredstatements="211" conditionals="149" coveredconditionals="67" methods="34" coveredmethods="25"/>
3848
3848
  <file name="automation.js" path="/home/runner/work/budibase/budibase/packages/server/src/threads/automation.js">
3849
- <metrics statements="165" coveredstatements="84" conditionals="77" coveredconditionals="21" methods="13" coveredmethods="9"/>
3849
+ <metrics statements="160" coveredstatements="75" conditionals="75" coveredconditionals="19" methods="12" coveredmethods="7"/>
3850
3850
  <line num="1" count="3" type="stmt"/>
3851
3851
  <line num="2" count="3" type="stmt"/>
3852
3852
  <line num="3" count="3" type="stmt"/>
@@ -3859,159 +3859,154 @@
3859
3859
  <line num="10" count="3" type="stmt"/>
3860
3860
  <line num="11" count="3" type="stmt"/>
3861
3861
  <line num="12" count="3" type="stmt"/>
3862
- <line num="13" count="3" type="stmt"/>
3863
3862
  <line num="14" count="3" type="stmt"/>
3863
+ <line num="15" count="3" type="stmt"/>
3864
3864
  <line num="16" count="3" type="stmt"/>
3865
3865
  <line num="17" count="3" type="stmt"/>
3866
- <line num="18" count="3" type="stmt"/>
3867
- <line num="19" count="3" type="stmt"/>
3868
- <line num="22" count="0" type="cond" truecount="0" falsecount="4"/>
3866
+ <line num="20" count="0" type="cond" truecount="0" falsecount="4"/>
3867
+ <line num="21" count="0" type="stmt"/>
3869
3868
  <line num="23" count="0" type="stmt"/>
3869
+ <line num="24" count="0" type="stmt"/>
3870
3870
  <line num="25" count="0" type="stmt"/>
3871
- <line num="26" count="0" type="stmt"/>
3872
- <line num="27" count="0" type="stmt"/>
3871
+ <line num="26" count="0" type="cond" truecount="0" falsecount="2"/>
3873
3872
  <line num="28" count="0" type="cond" truecount="0" falsecount="2"/>
3874
- <line num="30" count="0" type="cond" truecount="0" falsecount="2"/>
3873
+ <line num="29" count="0" type="stmt"/>
3875
3874
  <line num="31" count="0" type="stmt"/>
3876
- <line num="33" count="0" type="stmt"/>
3877
- <line num="35" count="0" type="cond" truecount="0" falsecount="2"/>
3875
+ <line num="33" count="0" type="cond" truecount="0" falsecount="2"/>
3876
+ <line num="34" count="0" type="stmt"/>
3878
3877
  <line num="36" count="0" type="stmt"/>
3879
- <line num="38" count="0" type="stmt"/>
3878
+ <line num="39" count="0" type="stmt"/>
3880
3879
  <line num="41" count="0" type="stmt"/>
3881
- <line num="43" count="0" type="stmt"/>
3880
+ <line num="45" count="0" type="stmt"/>
3881
+ <line num="46" count="0" type="cond" truecount="0" falsecount="4"/>
3882
3882
  <line num="47" count="0" type="stmt"/>
3883
- <line num="48" count="0" type="cond" truecount="0" falsecount="4"/>
3884
- <line num="49" count="0" type="stmt"/>
3885
- <line num="51" count="0" type="cond" truecount="0" falsecount="2"/>
3883
+ <line num="49" count="0" type="cond" truecount="0" falsecount="2"/>
3884
+ <line num="61" count="6" type="stmt"/>
3885
+ <line num="62" count="6" type="cond" truecount="2" falsecount="0"/>
3886
3886
  <line num="63" count="6" type="stmt"/>
3887
- <line num="64" count="6" type="cond" truecount="2" falsecount="0"/>
3887
+ <line num="64" count="6" type="stmt"/>
3888
3888
  <line num="65" count="6" type="stmt"/>
3889
3889
  <line num="66" count="6" type="stmt"/>
3890
- <line num="67" count="6" type="stmt"/>
3891
3890
  <line num="68" count="6" type="stmt"/>
3892
- <line num="70" count="6" type="stmt"/>
3891
+ <line num="69" count="6" type="stmt"/>
3893
3892
  <line num="71" count="6" type="stmt"/>
3894
- <line num="73" count="6" type="stmt"/>
3895
- <line num="74" count="6" type="stmt"/>
3896
- <line num="77" count="6" type="stmt"/>
3893
+ <line num="72" count="6" type="stmt"/>
3894
+ <line num="75" count="6" type="stmt"/>
3895
+ <line num="76" count="6" type="stmt"/>
3897
3896
  <line num="78" count="6" type="stmt"/>
3898
- <line num="80" count="6" type="stmt"/>
3899
- <line num="81" count="6" type="stmt"/>
3900
- <line num="85" count="6" type="cond" truecount="1" falsecount="1"/>
3901
- <line num="86" count="0" type="stmt"/>
3902
- <line num="88" count="6" type="stmt"/>
3903
- <line num="92" count="5" type="stmt"/>
3904
- <line num="93" count="5" type="cond" truecount="1" falsecount="1"/>
3905
- <line num="94" count="0" type="stmt"/>
3906
- <line num="96" count="5" type="stmt"/>
3907
- <line num="100" count="6" type="cond" truecount="1" falsecount="1"/>
3897
+ <line num="79" count="6" type="stmt"/>
3898
+ <line num="83" count="6" type="cond" truecount="1" falsecount="1"/>
3899
+ <line num="84" count="0" type="stmt"/>
3900
+ <line num="86" count="6" type="stmt"/>
3901
+ <line num="90" count="5" type="stmt"/>
3902
+ <line num="91" count="5" type="cond" truecount="1" falsecount="1"/>
3903
+ <line num="92" count="0" type="stmt"/>
3904
+ <line num="94" count="5" type="stmt"/>
3905
+ <line num="98" count="0" type="cond" truecount="0" falsecount="2"/>
3906
+ <line num="99" count="0" type="stmt"/>
3908
3907
  <line num="101" count="0" type="stmt"/>
3909
- <line num="103" count="6" type="stmt"/>
3910
- <line num="104" count="6" type="stmt"/>
3911
- <line num="105" count="6" type="stmt"/>
3912
- <line num="109" count="11" type="stmt"/>
3913
- <line num="111" count="11" type="cond" truecount="2" falsecount="0"/>
3914
- <line num="112" count="6" type="stmt"/>
3915
- <line num="114" count="11" type="stmt"/>
3916
- <line num="118" count="0" type="stmt"/>
3917
- <line num="128" count="0" type="stmt"/>
3908
+ <line num="102" count="0" type="stmt"/>
3909
+ <line num="103" count="0" type="stmt"/>
3910
+ <line num="107" count="11" type="stmt"/>
3911
+ <line num="109" count="11" type="cond" truecount="2" falsecount="0"/>
3912
+ <line num="110" count="6" type="stmt"/>
3913
+ <line num="112" count="11" type="stmt"/>
3914
+ <line num="116" count="0" type="stmt"/>
3915
+ <line num="126" count="0" type="stmt"/>
3916
+ <line num="134" count="6" type="stmt"/>
3917
+ <line num="135" count="6" type="stmt"/>
3918
3918
  <line num="136" count="6" type="stmt"/>
3919
- <line num="137" count="6" type="stmt"/>
3920
3919
  <line num="138" count="6" type="stmt"/>
3921
3920
  <line num="139" count="6" type="stmt"/>
3921
+ <line num="140" count="6" type="stmt"/>
3922
3922
  <line num="141" count="6" type="stmt"/>
3923
- <line num="142" count="6" type="stmt"/>
3924
- <line num="143" count="6" type="stmt"/>
3925
- <line num="144" count="6" type="stmt"/>
3923
+ <line num="142" count="5" type="stmt"/>
3924
+ <line num="144" count="5" type="stmt"/>
3926
3925
  <line num="145" count="5" type="stmt"/>
3927
- <line num="147" count="5" type="stmt"/>
3928
- <line num="148" count="5" type="stmt"/>
3929
- <line num="149" count="5" type="cond" truecount="1" falsecount="1"/>
3930
- <line num="150" count="0" type="stmt"/>
3931
- <line num="151" count="0" type="stmt"/>
3932
- <line num="152" count="0" type="stmt"/>
3933
- <line num="155" count="5" type="cond" truecount="1" falsecount="1"/>
3934
- <line num="156" count="0" type="stmt"/>
3935
- <line num="157" count="0" type="stmt"/>
3936
- <line num="160" count="5" type="stmt"/>
3937
- <line num="161" count="5" type="stmt"/>
3938
- <line num="164" count="5" type="cond" truecount="2" falsecount="2"/>
3939
- <line num="165" count="0" type="stmt"/>
3940
- <line num="170" count="0" type="stmt"/>
3926
+ <line num="146" count="5" type="cond" truecount="1" falsecount="1"/>
3927
+ <line num="147" count="0" type="stmt"/>
3928
+ <line num="148" count="0" type="stmt"/>
3929
+ <line num="149" count="0" type="stmt"/>
3930
+ <line num="152" count="5" type="cond" truecount="1" falsecount="1"/>
3931
+ <line num="153" count="0" type="stmt"/>
3932
+ <line num="154" count="0" type="stmt"/>
3933
+ <line num="157" count="5" type="stmt"/>
3934
+ <line num="158" count="5" type="stmt"/>
3935
+ <line num="161" count="5" type="cond" truecount="2" falsecount="2"/>
3936
+ <line num="162" count="0" type="stmt"/>
3937
+ <line num="167" count="0" type="stmt"/>
3938
+ <line num="168" count="0" type="stmt"/>
3939
+ <line num="169" count="0" type="stmt"/>
3941
3940
  <line num="171" count="0" type="stmt"/>
3942
- <line num="172" count="0" type="stmt"/>
3943
- <line num="174" count="0" type="stmt"/>
3944
- <line num="178" count="0" type="stmt"/>
3945
- <line num="179" count="0" type="stmt"/>
3946
- <line num="180" count="0" type="stmt"/>
3947
- <line num="184" count="0" type="cond" truecount="0" falsecount="2"/>
3948
- <line num="188" count="0" type="stmt"/>
3941
+ <line num="175" count="0" type="stmt"/>
3942
+ <line num="176" count="0" type="stmt"/>
3943
+ <line num="177" count="0" type="stmt"/>
3944
+ <line num="181" count="0" type="cond" truecount="0" falsecount="2"/>
3945
+ <line num="185" count="0" type="stmt"/>
3946
+ <line num="187" count="0" type="stmt"/>
3949
3947
  <line num="190" count="0" type="stmt"/>
3950
- <line num="193" count="0" type="stmt"/>
3951
- <line num="199" count="0" type="stmt"/>
3952
- <line num="200" count="0" type="cond" truecount="0" falsecount="2"/>
3953
- <line num="201" count="0" type="stmt"/>
3954
- <line num="204" count="0" type="cond" truecount="0" falsecount="2"/>
3955
- <line num="205" count="0" type="stmt"/>
3956
- <line num="213" count="0" type="cond" truecount="0" falsecount="2"/>
3957
- <line num="214" count="0" type="stmt"/>
3958
- <line num="221" count="0" type="cond" truecount="0" falsecount="2"/>
3959
- <line num="225" count="0" type="stmt"/>
3960
- <line num="229" count="0" type="stmt"/>
3961
- <line num="230" count="0" type="stmt"/>
3948
+ <line num="196" count="0" type="stmt"/>
3949
+ <line num="197" count="0" type="cond" truecount="0" falsecount="2"/>
3950
+ <line num="198" count="0" type="stmt"/>
3951
+ <line num="201" count="0" type="cond" truecount="0" falsecount="2"/>
3952
+ <line num="202" count="0" type="stmt"/>
3953
+ <line num="210" count="0" type="cond" truecount="0" falsecount="2"/>
3954
+ <line num="211" count="0" type="stmt"/>
3955
+ <line num="218" count="0" type="cond" truecount="0" falsecount="2"/>
3956
+ <line num="222" count="0" type="stmt"/>
3957
+ <line num="226" count="0" type="stmt"/>
3958
+ <line num="227" count="0" type="stmt"/>
3959
+ <line num="228" count="0" type="stmt"/>
3962
3960
  <line num="231" count="0" type="stmt"/>
3961
+ <line num="232" count="0" type="stmt"/>
3962
+ <line num="233" count="0" type="cond" truecount="0" falsecount="4"/>
3963
3963
  <line num="234" count="0" type="stmt"/>
3964
3964
  <line num="235" count="0" type="stmt"/>
3965
- <line num="236" count="0" type="cond" truecount="0" falsecount="4"/>
3966
- <line num="237" count="0" type="stmt"/>
3967
- <line num="238" count="0" type="stmt"/>
3965
+ <line num="238" count="0" type="cond" truecount="0" falsecount="2"/>
3968
3966
  <line num="241" count="0" type="cond" truecount="0" falsecount="2"/>
3969
- <line num="244" count="0" type="cond" truecount="0" falsecount="2"/>
3970
- <line num="245" count="0" type="stmt"/>
3971
- <line num="249" count="0" type="stmt"/>
3972
- <line num="250" count="0" type="stmt"/>
3973
- <line num="251" count="0" type="stmt"/>
3974
- <line num="256" count="5" type="cond" truecount="1" falsecount="1"/>
3975
- <line num="257" count="0" type="stmt"/>
3976
- <line num="258" count="0" type="stmt"/>
3967
+ <line num="242" count="0" type="stmt"/>
3968
+ <line num="246" count="0" type="stmt"/>
3969
+ <line num="247" count="0" type="stmt"/>
3970
+ <line num="248" count="0" type="stmt"/>
3971
+ <line num="253" count="5" type="cond" truecount="1" falsecount="1"/>
3972
+ <line num="254" count="0" type="stmt"/>
3973
+ <line num="255" count="0" type="stmt"/>
3974
+ <line num="259" count="5" type="stmt"/>
3975
+ <line num="260" count="5" type="stmt"/>
3976
+ <line num="261" count="5" type="stmt"/>
3977
3977
  <line num="262" count="5" type="stmt"/>
3978
- <line num="263" count="5" type="stmt"/>
3979
3978
  <line num="264" count="5" type="stmt"/>
3980
- <line num="265" count="5" type="stmt"/>
3981
- <line num="267" count="5" type="cond" truecount="1" falsecount="1"/>
3982
- <line num="268" count="5" type="stmt"/>
3983
- <line num="269" count="5" type="stmt"/>
3984
- <line num="276" count="5" type="stmt"/>
3985
- <line num="279" count="5" type="cond" truecount="2" falsecount="2"/>
3986
- <line num="280" count="0" type="stmt"/>
3987
- <line num="281" count="0" type="stmt"/>
3988
- <line num="285" count="0" type="stmt"/>
3989
- <line num="287" count="5" type="cond" truecount="2" falsecount="2"/>
3990
- <line num="288" count="0" type="stmt"/>
3991
- <line num="290" count="5" type="stmt"/>
3979
+ <line num="270" count="5" type="stmt"/>
3980
+ <line num="273" count="5" type="cond" truecount="2" falsecount="2"/>
3981
+ <line num="274" count="0" type="stmt"/>
3982
+ <line num="275" count="0" type="stmt"/>
3983
+ <line num="279" count="0" type="stmt"/>
3984
+ <line num="281" count="5" type="cond" truecount="2" falsecount="2"/>
3985
+ <line num="282" count="0" type="stmt"/>
3986
+ <line num="284" count="5" type="stmt"/>
3987
+ <line num="292" count="0" type="stmt"/>
3988
+ <line num="293" count="0" type="stmt"/>
3989
+ <line num="295" count="5" type="cond" truecount="1" falsecount="1"/>
3990
+ <line num="296" count="0" type="stmt"/>
3991
+ <line num="297" count="0" type="cond" truecount="0" falsecount="2"/>
3992
3992
  <line num="298" count="0" type="stmt"/>
3993
3993
  <line num="299" count="0" type="stmt"/>
3994
- <line num="301" count="5" type="cond" truecount="1" falsecount="1"/>
3995
- <line num="302" count="0" type="stmt"/>
3996
- <line num="303" count="0" type="cond" truecount="0" falsecount="2"/>
3997
- <line num="304" count="0" type="stmt"/>
3998
- <line num="305" count="0" type="stmt"/>
3994
+ <line num="300" count="0" type="stmt"/>
3995
+ <line num="305" count="5" type="cond" truecount="3" falsecount="1"/>
3999
3996
  <line num="306" count="0" type="stmt"/>
4000
- <line num="311" count="5" type="cond" truecount="3" falsecount="1"/>
4001
- <line num="312" count="0" type="stmt"/>
4002
- <line num="317" count="0" type="stmt"/>
4003
- <line num="324" count="0" type="stmt"/>
4004
- <line num="325" count="0" type="stmt"/>
3997
+ <line num="311" count="0" type="stmt"/>
3998
+ <line num="318" count="0" type="stmt"/>
3999
+ <line num="319" count="0" type="stmt"/>
4000
+ <line num="324" count="6" type="stmt"/>
4001
+ <line num="325" count="6" type="stmt"/>
4002
+ <line num="329" count="3" type="stmt"/>
4005
4003
  <line num="330" count="6" type="stmt"/>
4006
4004
  <line num="331" count="6" type="stmt"/>
4007
- <line num="335" count="3" type="stmt"/>
4005
+ <line num="332" count="6" type="stmt"/>
4008
4006
  <line num="336" count="6" type="stmt"/>
4009
4007
  <line num="337" count="6" type="stmt"/>
4010
4008
  <line num="338" count="6" type="stmt"/>
4011
- <line num="342" count="6" type="stmt"/>
4012
- <line num="343" count="6" type="stmt"/>
4013
- <line num="344" count="6" type="stmt"/>
4014
- <line num="346" count="0" type="stmt"/>
4009
+ <line num="340" count="0" type="stmt"/>
4015
4010
  </file>
4016
4011
  <file name="query.js" path="/home/runner/work/budibase/budibase/packages/server/src/threads/query.js">
4017
4012
  <metrics statements="130" coveredstatements="106" conditionals="59" coveredconditionals="38" methods="13" coveredmethods="10"/>