@budibase/server 1.0.219-alpha.14 → 1.0.219-alpha.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.
- package/builder/assets/{index.bd82fcd4.js → index.df61d17f.js} +2 -2
- package/builder/index.html +1 -1
- package/coverage/clover.xml +107 -103
- package/coverage/coverage-final.json +2 -2
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
- package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
- package/coverage/lcov-report/api/controllers/component.js.html +1 -1
- package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
- package/coverage/lcov-report/api/controllers/index.html +1 -1
- package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
- package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
- package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
- package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
- package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.html +1 -1
- package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/role.js.html +1 -1
- package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
- package/coverage/lcov-report/api/controllers/script.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
- package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/routes/auth.js.html +1 -1
- package/coverage/lcov-report/api/routes/automation.js.html +1 -1
- package/coverage/lcov-report/api/routes/backup.js.html +1 -1
- package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
- package/coverage/lcov-report/api/routes/component.js.html +1 -1
- package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
- package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
- package/coverage/lcov-report/api/routes/dev.js.html +1 -1
- package/coverage/lcov-report/api/routes/index.html +1 -1
- package/coverage/lcov-report/api/routes/integration.js.html +1 -1
- package/coverage/lcov-report/api/routes/layout.js.html +1 -1
- package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
- package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
- package/coverage/lcov-report/api/routes/permission.js.html +1 -1
- package/coverage/lcov-report/api/routes/query.js.html +1 -1
- package/coverage/lcov-report/api/routes/role.js.html +1 -1
- package/coverage/lcov-report/api/routes/routing.js.html +1 -1
- package/coverage/lcov-report/api/routes/screen.js.html +1 -1
- package/coverage/lcov-report/api/routes/script.js.html +1 -1
- package/coverage/lcov-report/api/routes/table.js.html +1 -1
- package/coverage/lcov-report/api/routes/templates.js.html +1 -1
- package/coverage/lcov-report/api/routes/user.js.html +1 -1
- package/coverage/lcov-report/api/routes/utils/index.html +1 -1
- package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
- package/coverage/lcov-report/api/routes/view.js.html +1 -1
- package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/actions.js.html +1 -1
- package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +1 -1
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +2 -2
- package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
- package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
- package/coverage/lcov-report/automations/steps/index.html +1 -1
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
- package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
- package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
- package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
- package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
- package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/triggers.js.html +1 -1
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/index.js.html +1 -1
- package/coverage/lcov-report/constants/layouts.js.html +1 -1
- package/coverage/lcov-report/constants/screens.js.html +1 -1
- package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +1 -1
- package/coverage/lcov-report/db/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +1 -1
- package/coverage/lcov-report/db/utils.js.html +1 -1
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +1 -1
- package/coverage/lcov-report/events/utils.js.html +1 -1
- package/coverage/lcov-report/index.html +13 -13
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
- package/coverage/lcov-report/middleware/builder.js.html +1 -1
- package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
- package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
- package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +1 -1
- package/coverage/lcov-report/threads/automation.js.html +1 -1
- package/coverage/lcov-report/threads/index.html +14 -14
- package/coverage/lcov-report/threads/query.js.html +40 -25
- package/coverage/lcov-report/threads/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
- package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
- package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
- package/coverage/lcov-report/utilities/global.js.html +1 -1
- package/coverage/lcov-report/utilities/index.html +1 -1
- package/coverage/lcov-report/utilities/index.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
- package/coverage/lcov-report/utilities/security.js.html +1 -1
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +1 -1
- package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
- package/coverage/lcov.info +167 -161
- package/dist/api/controllers/query/index.js +7 -4
- package/dist/automations/steps/executeQuery.js +1 -1
- package/dist/package.json +6 -6
- package/dist/threads/query.js +20 -13
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/api/controllers/query/index.ts +13 -5
- package/src/api/routes/tests/query.spec.js +0 -1
- package/src/automations/steps/executeQuery.js +1 -1
- package/src/threads/query.js +20 -15
|
@@ -910,7 +910,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
910
910
|
`),t=D("i"),i=F(n),l=F("?"),s=F(`
|
|
911
911
|
This action cannot be undone.`)},m(o,a){$(o,e,a),$(o,t,a),P(t,i),P(t,l),$(o,s,a)},p(o,a){a&1&&n!==(n=o[0].name+"")&&ke(i,n)},d(o){o&&b(e),o&&b(t),o&&b(s)}}}function y1e(r){let e,t,n,i,l,s;e=new Cr({props:{$$slots:{control:[v1e],default:[b1e]},$$scope:{ctx:r}}});let o={okText:"Delete Automation",onOk:r[3],title:"Confirm Deletion",$$slots:{default:[w1e]},$$scope:{ctx:r}};n=new pr({props:o}),r[4](n);let a={automation:r[0]};return l=new _1e({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),$(u,t,f),C(n,u,f),$(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&&b(t),r[4](null),S(n,u),u&&b(i),r[5](null),S(l,u)}}}function k1e(r,e,t){let n;fe(r,jt,f=>t(6,n=f));let{automation:i}=e,l,s;async function o(){try{await Nt.actions.delete(i),be.success("Automation deleted successfully"),n("../automate")}catch{be.error("Error deleting automation")}}function a(f){K[f?"unshift":"push"](()=>{l=f,t(1,l)})}function u(f){K[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 C1e extends oe{constructor(e){super();ae(this,e,k1e,y1e,le,{automation:0})}}function hk(r,e,t){const n=r.slice();return n[5]=e[t],n[7]=t,n}function S1e(r){let e,t,n;return e=new C1e({props:{automation:r[5]}}),{c(){k(e.$$.fragment),t=R()},m(i,l){C(e,i,l),$(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&&b(t)}}}function $k(r){let e,t;function n(){return r[3](r[5])}return e=new zl({props:{border:r[7]>0,icon:"ShareAndroid",text:r[5].name,selected:r[5]._id===r[1],$$slots:{default:[S1e]},$$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 A1e(r){let e,t,n=r[0].automations,i=[];for(let s=0;s<n.length;s+=1)i[s]=$k(hk(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){$(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=hk(s,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=$k(u),i[a].c(),m(i[a],1),i[a].m(e,null))}for(ee(),a=n.length;a<i.length;a+=1)l(a);te()}},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&&b(e),pt(i,s)}}}function E1e(r,e,t){let n,i,l;fe(r,jt,a=>t(4,i=a)),fe(r,Nt,a=>t(0,l=a)),Pt(async()=>{try{await Nt.actions.fetch()}catch{be.error("Error getting automations list")}});function s(a){Nt.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 O1e extends oe{constructor(e){super();ae(this,e,E1e,A1e,le,{})}}function bk(r,e,t){const n=r.slice();return n[17]=e[t][0],n[18]=e[t][1],n}function T1e(r){let e;return{c(){e=F(`Please name your automation, then select a trigger. Every automation must
|
|
912
912
|
start with a trigger.`)},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function I1e(r){let e;return{c(){e=F("Triggers")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function L1e(r){let e=r[18].name+"",t;return{c(){t=F(e)},m(n,i){$(n,t,i)},p(n,i){i&8&&e!==(e=n[18].name+"")&&ke(t,e)},d(n){n&&b(t)}}}function vk(r){let e,t,n,i,l,s,o,a,u,f;n=new ot({props:{name:r[18].icon}}),s=new He({props:{size:"S",$$slots:{default:[L1e]},$$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"),se(e,"selected",r[2]===r[18].name)},m(p,d){$(p,e,d),P(e,t),C(n,t,null),P(t,i),P(t,l),C(s,l,null),P(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&&se(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&&b(e),S(n),S(s),u=!1,f()}}}function P1e(r){let e,t,n,i;e=new He({props:{size:"S",$$slots:{default:[I1e]},$$scope:{ctx:r}}});let l=r[3],s=[];for(let a=0;a<l.length;a+=1)s[a]=vk(bk(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),$(a,t,u),$(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=bk(a,l,c);s[c]?(s[c].p(p,u),m(s[c],1)):(s[c]=vk(p),s[c].c(),m(s[c],1),s[c].m(n,null))}for(ee(),c=l.length;c<s.length;c+=1)o(c);te()}},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&&b(t),a&&b(n),pt(s,a)}}}function N1e(r){let e,t,n,i,l,s,o,a,u,f;e=new bm({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 He({props:{size:"XS",$$slots:{default:[T1e]},$$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}),K.push(()=>pe(l,"value",c)),K.push(()=>pe(l,"error",p)),l.$on("change",r[12]),u=new Be({props:{noPadding:!0,$$slots:{default:[P1e]},$$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),$(g,t,h),C(n,g,h),$(g,i,h),C(l,g,h),$(g,a,h),C(u,g,h),f=!0},p(g,h){const v={};h&2097152&&(v.$$scope={dirty:h,ctx:g}),n.$set(v);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 E={};h&2097164&&(E.$$scope={dirty:h,ctx:g}),u.$set(E)},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&&b(t),S(n,g),g&&b(i),S(l,g),g&&b(a),S(u,g)}}}function R1e(r){let e,t;return e=new Rt({props:{title:"Create Automation",confirmText:"Save",size:"M",onConfirm:r[5],disabled:!r[2]||!r[0],$$slots:{default:[N1e]},$$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 M1e(r,e,t){let n,i,l,s,o,a;fe(r,Nt,I=>t(8,s=I)),fe(r,jt,I=>t(16,o=I)),fe(r,Bs,I=>t(9,a=I));let u,f,c=!1,p,{webhookModal:d}=e;async function g(){var I;try{await Nt.actions.create({name:u,instanceId:n});const O=s.selectedAutomation.constructBlock("TRIGGER",p.stepId,p);Nt.actions.addBlockToAutomation(O),p.stepId==="WEBHOOK"&&d.show,await Nt.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 v(I){u=I,t(0,u)}function w(I){i=I,t(4,i),t(1,c),t(0,u)}const E=()=>t(1,c=!0),T=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,v,w,E,T]}class wk extends oe{constructor(e){super();ae(this,e,M1e,R1e,le,{webhookModal:7})}}function D1e(r){let e,t;return e=new wk({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 j1e(r){let e,t,n,i;e=new O1e({});let l={$$slots:{default:[D1e]},$$scope:{ctx:r}};return n=new kt({props:l}),r[2](n),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment)},m(s,o){C(e,s,o),$(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&&b(t),r[2](null),S(n,s)}}}function B1e(r){let e,t;return e=new mn({props:{title:"Automations",$$slots:{default:[j1e]},$$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 z1e(r){let e,t,n,i,l,s;return t=new Ar({props:{selected:"Automations",$$slots:{default:[B1e]},$$scope:{ctx:r}}}),l=new ot({props:{hoverable:!0,name:"AddCircle"}}),l.$on("click",function(){ut(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){$(o,e,a),C(t,e,null),P(e,n),P(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&&b(e),S(t),S(l)}}}function q1e(r,e,t){let{modal:n}=e,{webhookModal:i}=e;function l(s){K[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 U1e extends oe{constructor(e){super();ae(this,e,q1e,z1e,le,{modal:0,webhookModal:1})}}function yk(r,e,t){const n=r.slice();return n[7]=e[t],n[9]=t,n}function kk(r){var u;let e,t,n,i,l;function s(f){r[6](f)}let o={showTestStatus:!0,block:r[7],isTrigger:r[9]===0,testResult:(u=r[2])==null?void 0:u[r[9]]};r[3]!==void 0&&(o.showParameters=r[3]),e=new ik({props:o}),K.push(()=>pe(e,"showParameters",s));let a=r[3]&&r[3][r[7].id]&&Ck(r);return{c(){k(e.$$.fragment),n=R(),a&&a.c(),i=Ee()},m(f,c){C(e,f,c),$(f,n,c),a&&a.m(f,c),$(f,i,c),l=!0},p(f,c){var d;const p={};c&2&&(p.block=f[7]),c&4&&(p.testResult=(d=f[2])==null?void 0:d[f[9]]),!t&&c&8&&(t=!0,p.showParameters=f[3],de(()=>t=!1)),e.$set(p),f[3]&&f[3][f[7].id]?a?(a.p(f,c),c&10&&m(a,1)):(a=Ck(f),a.c(),m(a,1),a.m(i.parentNode,i)):a&&(ee(),_(a,1,1,()=>{a=null}),te())},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&&b(n),a&&a.d(f),f&&b(i)}}}function Ck(r){var a,u;let e,t,n,i,l,s;e=new Yt({props:{noMargin:!0}});let o=((u=(a=r[2])==null?void 0:a[r[9]])==null?void 0:u.outputs.iterations)&&Sk(r);return l=new Ar({props:{quiet:!0,noPadding:!0,selected:"Input",$$slots:{default:[W1e]},$$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-1d49z3j")},m(f,c){C(e,f,c),$(f,t,c),o&&o.m(f,c),$(f,n,c),$(f,i,c),C(l,i,null),s=!0},p(f,c){var d,g;((g=(d=f[2])==null?void 0:d[f[9]])==null?void 0:g.outputs.iterations)?o?(o.p(f,c),c&4&&m(o,1)):(o=Sk(f),o.c(),m(o,1),o.m(n.parentNode,n)):o&&(ee(),_(o,1,1,()=>{o=null}),te());const p={};c&1028&&(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&&b(t),o&&o.d(f),f&&b(n),f&&b(i),S(l)}}}function Sk(r){let e,t,n,i,l,s;return t=new ot({props:{name:"Reuse"}}),l=new Je({props:{$$slots:{default:[F1e]},$$scope:{ctx:r}}}),{c(){e=D("div"),k(t.$$.fragment),n=R(),i=D("div"),k(l.$$.fragment),_t(i,"margin-left","10px"),_t(e,"display","flex"),_t(e,"padding","10px 10px 0px 12px")},m(o,a){$(o,e,a),C(t,e,null),P(e,n),P(e,i),C(l,i,null),s=!0},p(o,a){const u={};a&1028&&(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&&b(e),S(t),S(l)}}}function F1e(r){var l,s;let e,t=((s=(l=r[2])==null?void 0:l[r[9]])==null?void 0:s.outputs.iterations)+"",n,i;return{c(){e=F("This loop ran "),n=F(t),i=F(" times.")},m(o,a){$(o,e,a),$(o,n,a),$(o,i,a)},p(o,a){var u,f;a&4&&t!==(t=((f=(u=o[2])==null?void 0:u[o[9]])==null?void 0:f.outputs.iterations)+"")&&ke(n,t)},d(o){o&&b(e),o&&b(n),o&&b(i)}}}function V1e(r){var i,l;let e,t,n;return t=new bi({props:{minHeight:"80px",disabled:!0,value:kc((l=(i=r[2])==null?void 0:i[r[9]])==null?void 0:l.inputs,"No input")}}),{c(){e=D("div"),k(t.$$.fragment),_t(e,"padding","10px 10px 10px 10px")},m(s,o){$(s,e,o),C(t,e,null),n=!0},p(s,o){var u,f;const a={};o&4&&(a.value=kc((f=(u=s[2])==null?void 0:u[s[9]])==null?void 0:f.inputs,"No input")),t.$set(a)},i(s){n||(m(t.$$.fragment,s),n=!0)},o(s){_(t.$$.fragment,s),n=!1},d(s){s&&b(e),S(t)}}}function H1e(r){var i,l;let e,t,n;return t=new bi({props:{minHeight:"100px",disabled:!0,value:kc((l=(i=r[2])==null?void 0:i[r[9]])==null?void 0:l.outputs,"No output")}}),{c(){e=D("div"),k(t.$$.fragment),_t(e,"padding","10px 10px 10px 10px")},m(s,o){$(s,e,o),C(t,e,null),n=!0},p(s,o){var u,f;const a={};o&4&&(a.value=kc((f=(u=s[2])==null?void 0:u[s[9]])==null?void 0:f.outputs,"No output")),t.$set(a)},i(s){n||(m(t.$$.fragment,s),n=!0)},o(s){_(t.$$.fragment,s),n=!1},d(s){s&&b(e),S(t)}}}function W1e(r){let e,t,n,i;return e=new mn({props:{title:"Input",$$slots:{default:[V1e]},$$scope:{ctx:r}}}),n=new mn({props:{title:"Output",$$slots:{default:[H1e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment)},m(l,s){C(e,l,s),$(l,t,s),C(n,l,s),i=!0},p(l,s){const o={};s&1028&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const a={};s&1028&&(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&&b(t),S(n,l)}}}function Ak(r){let e;return{c(){e=D("div"),y(e,"class","separator svelte-1d49z3j")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Ek(r){let e,t,n,i,l,s=r[7].stepId!=="LOOP"&&kk(r),o=r[1].length-1!==r[9]&&Ak();return{c(){e=D("div"),s&&s.c(),n=R(),o&&o.c(),i=Ee(),y(e,"class","block svelte-1d49z3j"),y(e,"style",t=r[0]?`width: ${r[0]}`:"")},m(a,u){$(a,e,u),s&&s.m(e,null),$(a,n,u),o&&o.m(a,u),$(a,i,u),l=!0},p(a,u){a[7].stepId!=="LOOP"?s?(s.p(a,u),u&2&&m(s,1)):(s=kk(a),s.c(),m(s,1),s.m(e,null)):s&&(ee(),_(s,1,1,()=>{s=null}),te()),(!l||u&1&&t!==(t=a[0]?`width: ${a[0]}`:""))&&y(e,"style",t),a[1].length-1!==a[9]?o||(o=Ak(),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&&b(e),s&&s.d(),a&&b(n),o&&o.d(a),a&&b(i)}}}function G1e(r){let e,t,n=r[1],i=[];for(let s=0;s<n.length;s+=1)i[s]=Ek(yk(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-1d49z3j")},m(s,o){$(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=yk(s,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=Ek(u),i[a].c(),m(i[a],1),i[a].m(e,null))}for(ee(),a=n.length;a<i.length;a+=1)l(a);te()}},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&&b(e),pt(i,s)}}}function Y1e(r){return r==null?void 0:r.steps.filter(e=>e.stepId!=="LOOP"||[])}function kc(r,e){return r?JSON.stringify(r,null,2):e}function J1e(r,e,t){let n,{automation:i}=e,{testResults:l}=e,{width:s="400px"}=e,o,a;function u(f){o=f,t(3,o)}return r.$$set=f=>{"automation"in f&&t(4,i=f.automation),"testResults"in f&&t(5,l=f.testResults),"width"in f&&t(0,s=f.width)},r.$$.update=()=>{if(r.$$.dirty&32&&t(2,n=Y1e(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(f=>f.stepId!=="LOOP"));else if(n){t(1,a=n||[]);let f=0;for(let c of a)c.id=f++}}},[s,a,n,o,i,l,u]}class Ok extends oe{constructor(e){super();ae(this,e,J1e,G1e,le,{automation:4,testResults:5,width:0})}}function X1e(r){let e,t,n,i,l,s,o,a,u,f,c,p,d;return n=new ot({props:{name:"MultipleCheck"}}),a=new ot({props:{hoverable:!0,name:"Close"}}),a.$on("click",r[4]),f=new Yt({}),p=new Ok({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),_t(l,"padding-left","var(--spacing-l)"),y(t,"class","title-text svelte-nwwj95"),_t(o,"padding-right","var(--spacing-xl)"),y(e,"class","title svelte-nwwj95")},m(g,h){$(g,e,h),P(e,t),C(n,t,null),P(t,i),P(t,l),P(e,s),P(e,o),C(a,o,null),$(g,u,h),C(f,g,h),$(g,c,h),C(p,g,h),d=!0},p(g,[h]){const v={};h&2&&(v.automation=g[1]),h&1&&(v.testResults=g[0]),p.$set(v)},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&&b(e),S(n),S(a),g&&b(u),S(f,g),g&&b(c),S(p,g)}}}function Q1e(r,e,t){let n;fe(r,Nt,a=>t(2,n=a));let{automation:i}=e,{testResults:l}=e,s;const o=async()=>{kn(Nt,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!=="LOOP"))):l&&t(3,s=l.steps||[]))},[l,i,n,s,o]}class K1e extends oe{constructor(e){super();ae(this,e,Q1e,X1e,le,{automation:1,testResults:0})}}function Z1e(r){let e,t,n,i;return n=new Be({props:{gap:"S",justifyItems:"center",$$slots:{default:[rge]},$$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){$(l,e,s),P(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&&b(e),S(n)}}}function x1e(r){let e;const t=r[4].default,n=$t(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)&&bt(n,t,i,i[8],e?wt(t,i[8],l,null):vt(i[8]),null)},i(i){e||(m(n,i),e=!0)},o(i){_(n,i),e=!1},d(i){n&&n.d(i)}}}function ege(r){let e;return{c(){e=F("You have no automations")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function tge(r){let e;return{c(){e=F("Let's fix that. Call the bots!")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function nge(r){let e;return{c(){e=F("Create automation")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function rge(r){let e,t,n,i,l,s,o,a,u;return i=new ft({props:{size:"M",$$slots:{default:[ege]},$$scope:{ctx:r}}}),s=new He({props:{size:"M",$$slots:{default:[tge]},$$scope:{ctx:r}}}),a=new lt({props:{size:"M",cta:!0,$$slots:{default:[nge]},$$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),Wt(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){$(f,e,c),P(e,t),$(f,n,c),C(i,f,c),$(f,l,c),C(s,f,c),$(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&&b(e),f&&b(n),S(i,f),f&&b(l),S(s,f),f&&b(o),S(a,f)}}}function Tk(r){let e,t,n;return t=new K1e({props:{automation:r[3]}}),{c(){e=D("div"),k(t.$$.fragment),y(e,"class","setup svelte-374m3f")},m(i,l){$(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&&b(e),S(t)}}}function ige(r){let e,t;return e=new wk({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 lge(r){let e,t;return e=new n1({}),{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 sge(r){let e,t,n,i,l,s,o,a,u,f,c,p,d;n=new U1e({props:{modal:r[1],webhookModal:r[2]}});const g=[x1e,Z1e],h=[];function v(I,O){return I[3]?0:1}s=v(r),o=h[s]=g[s](r);let w=r[0].showTestPanel&&Tk(r),E={$$slots:{default:[ige]},$$scope:{ctx:r}};f=new kt({props:E}),r[6](f);let T={width:"30%",$$slots:{default:[lge]},$$scope:{ctx:r}};return p=new kt({props:T}),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,O){$(I,e,O),P(e,t),C(n,t,null),P(e,i),P(e,l),h[s].m(l,null),P(e,a),w&&w.m(e,null),P(e,u),C(f,e,null),P(e,c),C(p,e,null),d=!0},p(I,[O]){const L={};O&2&&(L.modal=I[1]),O&4&&(L.webhookModal=I[2]),n.$set(L);let M=s;s=v(I),s===M?h[s].p(I,O):(ee(),_(h[M],1,1,()=>{h[M]=null}),te(),o=h[s],o?o.p(I,O):(o=h[s]=g[s](I),o.c()),m(o,1),o.m(l,null)),I[0].showTestPanel?w?(w.p(I,O),O&1&&m(w,1)):(w=Tk(I),w.c(),m(w,1),w.m(e,u)):w&&(ee(),_(w,1,1,()=>{w=null}),te());const j={};O&260&&(j.$$scope={dirty:O,ctx:I}),f.$set(j);const B={};O&256&&(B.$$scope={dirty:O,ctx:I}),p.$set(B)},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&&b(e),S(n),h[s].d(),w&&w.d(),r[6](null),S(f),r[7](null),S(p)}}}function oge(r,e,t){let n,i;fe(r,Nt,p=>t(0,i=p));let{$$slots:l={},$$scope:s}=e,o,a;Pt(()=>{kn(Nt,i.showTestPanel=!1,i)});const u=()=>o.show();function f(p){K[p?"unshift":"push"](()=>{o=p,t(1,o)})}function c(p){K[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 age extends oe{constructor(e){super();ae(this,e,oge,sge,le,{})}}function uge(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}),K.push(()=>pe(l,"value",a)),{c(){e=D("span"),e.textContent=`The changes you have made will be deleted and the application reverted
|
|
913
|
-
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){$(f,e,c),$(f,t,c),$(f,n,c),$(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&&b(e),f&&b(t),f&&b(n),f&&b(i),S(l,f)}}}function fge(r){let e,t;return e=new Rt({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:r[3],disabled:r[2]!==r[0].name,$$slots:{default:[uge]},$$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 cge(r){let e,t,n,i;e=new ot({props:{name:"Revert",hoverable:!0}}),e.$on("click",function(){ut(r[1].show)&&r[1].show.apply(this,arguments)});let l={$$slots:{default:[fge]},$$scope:{ctx:r}};return n=new kt({props:l}),r[5](n),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment)},m(s,o){C(e,s,o),$(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&&b(t),r[5](null),S(n,s)}}}function pge(r,e,t){let n,i;fe(r,Fe,f=>t(0,i=f));let l,s;const o=async()=>{try{await We.revertAppChanges(n);const f=await We.fetchAppPackage(n);await Fe.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){K[f?"unshift":"push"](()=>{l=f,t(1,l)})}return r.$$.update=()=>{r.$$.dirty&1&&(n=i.appId)},[i,l,s,o,a,u]}class dge extends oe{constructor(e){super();ae(this,e,pge,cge,le,{})}}const mge="@budibase/client",gge="1.0.219-alpha.
|
|
913
|
+
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){$(f,e,c),$(f,t,c),$(f,n,c),$(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&&b(e),f&&b(t),f&&b(n),f&&b(i),S(l,f)}}}function fge(r){let e,t;return e=new Rt({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:r[3],disabled:r[2]!==r[0].name,$$slots:{default:[uge]},$$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 cge(r){let e,t,n,i;e=new ot({props:{name:"Revert",hoverable:!0}}),e.$on("click",function(){ut(r[1].show)&&r[1].show.apply(this,arguments)});let l={$$slots:{default:[fge]},$$scope:{ctx:r}};return n=new kt({props:l}),r[5](n),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment)},m(s,o){C(e,s,o),$(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&&b(t),r[5](null),S(n,s)}}}function pge(r,e,t){let n,i;fe(r,Fe,f=>t(0,i=f));let l,s;const o=async()=>{try{await We.revertAppChanges(n);const f=await We.fetchAppPackage(n);await Fe.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){K[f?"unshift":"push"](()=>{l=f,t(1,l)})}return r.$$.update=()=>{r.$$.dirty&1&&(n=i.appId)},[i,l,s,o,a,u]}class dge extends oe{constructor(e){super();ae(this,e,pge,cge,le,{})}}const mge="@budibase/client",gge="1.0.219-alpha.16",_ge="MPL-2.0",hge="dist/budibase-client.js",$ge="dist/budibase-client.js",bge="module",vge="src/index.js",wge={".":{import:"./dist/budibase-client.js",require:"./dist/budibase-client.js"},"./package.json":"./package.json","./manifest.json":"./manifest.json"},yge={build:"rollup -c","dev:builder":"rollup -cw"},kge={"@budibase/bbui":"^1.0.219-alpha.16","@budibase/frontend-core":"^1.0.219-alpha.16","@budibase/string-templates":"^1.0.219-alpha.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"},Cge={"@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"},Sge="d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc";var Fs={name:mge,version:gge,license:_ge,module:hge,main:$ge,type:bge,svelte:vge,exports:wge,scripts:yge,dependencies:kge,devDependencies:Cge,gitHead:Sge};function Ik(r){let e,t,n;return t=new ot({props:{name:"Refresh",hoverable:!0}}),t.$on("click",function(){ut(r[2].show)&&r[2].show.apply(this,arguments)}),{c(){e=D("div"),k(t.$$.fragment),y(e,"class","icon-wrapper svelte-18djg2h"),se(e,"highlight",r[4])},m(i,l){$(i,e,l),C(t,e,null),n=!0},p(i,l){r=i,l&16&&se(e,"highlight",r[4])},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),S(t)}}}function Age(r){let e,t;return e=new He({props:{size:"S",$$slots:{default:[Oge]},$$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 Ege(r){let e,t;return e=new He({props:{size:"S",$$slots:{default:[Tge]},$$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 Oge(r){let e,t,n=r[1].version+"",i,l;return{c(){e=F("This app is currently using version "),t=D("b"),i=F(n),l=F(` which is the
|
|
914
914
|
latest version available.`)},m(s,o){$(s,e,o),$(s,t,o),P(t,i),$(s,l,o)},p(s,o){o&2&&n!==(n=s[1].version+"")&&ke(i,n)},d(s){s&&b(e),s&&b(t),s&&b(l)}}}function Tge(r){let e,t,n=r[1].version+"",i,l,s,o;return{c(){e=F("This app is currently using version "),t=D("b"),i=F(n),l=F(`, but version
|
|
915
915
|
`),s=D("b"),s.textContent=`${Fs.version}`,o=F(` is available. Updates can contain new features,
|
|
916
916
|
performance improvements and bug fixes.`)},m(a,u){$(a,e,u),$(a,t,u),P(t,i),$(a,l,u),$(a,s,u),$(a,o,u)},p(a,u){u&2&&n!==(n=a[1].version+"")&&ke(i,n)},d(a){a&&b(e),a&&b(t),a&&b(l),a&&b(s),a&&b(o)}}}function Lk(r){let e,t;return e=new He({props:{size:"S",$$slots:{default:[Ige]},$$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 Ige(r){let e,t,n=r[1].revertableVersion+"",i,l;return{c(){e=F(`You can revert this app to version
|
|
@@ -947,7 +947,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
947
947
|
as password recovery. To setup automated auth emails, simply add the
|
|
948
948
|
values below and click activate.`)},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function r2e(r){let e,t,n,i;return e=new ft({props:{size:"M",$$slots:{default:[t2e]},$$scope:{ctx:r}}}),n=new He({props:{$$slots:{default:[n2e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment)},m(l,s){C(e,l,s),$(l,t,s),C(n,l,s),i=!0},p(l,s){const o={};s&1048576&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const a={};s&1048576&&(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&&b(t),S(n,l)}}}function Q7(r){let e,t,n,i,l,s,o,a,u,f,c,p,d,g,h;return e=new Be({props:{gap:"XS",noPadding:!0,$$slots:{default:[s2e]},$$scope:{ctx:r}}}),n=new Be({props:{gap:"XS",noPadding:!0,$$slots:{default:[d2e]},$$scope:{ctx:r}}}),s=new lt({props:{cta:!0,$$slots:{default:[m2e]},$$scope:{ctx:r}}}),s.$on("click",r[7]),a=new lt({props:{secondary:!0,disabled:!r[4].checklist.smtp.checked,$$slots:{default:[g2e]},$$scope:{ctx:r}}}),a.$on("click",r[8]),f=new Yt({props:{size:"S"}}),p=new Be({props:{gap:"XS",noPadding:!0,$$slots:{default:[$2e]},$$scope:{ctx:r}}}),g=new Si({props:{data:r[3],schema:r[6],loading:r[1],allowEditRows:!1,allowSelectRows:!1,allowEditColumns:!1}}),g.$on("click",r[17]),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment),i=R(),l=D("div"),k(s.$$.fragment),o=R(),k(a.$$.fragment),u=R(),k(f.$$.fragment),c=R(),k(p.$$.fragment),d=R(),k(g.$$.fragment),y(l,"class","spectrum-ButtonGroup spectrum-Settings-buttonGroup svelte-1q10q2l")},m(v,w){C(e,v,w),$(v,t,w),C(n,v,w),$(v,i,w),$(v,l,w),C(s,l,null),P(l,o),C(a,l,null),$(v,u,w),C(f,v,w),$(v,c,w),C(p,v,w),$(v,d,w),C(g,v,w),h=!0},p(v,w){const E={};w&1048576&&(E.$$scope={dirty:w,ctx:v}),e.$set(E);const T={};w&1048581&&(T.$$scope={dirty:w,ctx:v}),n.$set(T);const I={};w&1048576&&(I.$$scope={dirty:w,ctx:v}),s.$set(I);const O={};w&16&&(O.disabled=!v[4].checklist.smtp.checked),w&1048576&&(O.$$scope={dirty:w,ctx:v}),a.$set(O);const L={};w&1048576&&(L.$$scope={dirty:w,ctx:v}),p.$set(L);const M={};w&8&&(M.data=v[3]),w&2&&(M.loading=v[1]),g.$set(M)},i(v){h||(m(e.$$.fragment,v),m(n.$$.fragment,v),m(s.$$.fragment,v),m(a.$$.fragment,v),m(f.$$.fragment,v),m(p.$$.fragment,v),m(g.$$.fragment,v),h=!0)},o(v){_(e.$$.fragment,v),_(n.$$.fragment,v),_(s.$$.fragment,v),_(a.$$.fragment,v),_(f.$$.fragment,v),_(p.$$.fragment,v),_(g.$$.fragment,v),h=!1},d(v){S(e,v),v&&b(t),S(n,v),v&&b(i),v&&b(l),S(s),S(a),v&&b(u),S(f,v),v&&b(c),S(p,v),v&&b(d),S(g,v)}}}function i2e(r){let e;return{c(){e=F("SMTP")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function l2e(r){let e;return{c(){e=F(`To allow your app to benefit from automated auth emails, add your SMTP
|
|
949
949
|
details below.`)},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function s2e(r){let e,t,n,i;return e=new ft({props:{size:"S",$$slots:{default:[i2e]},$$scope:{ctx:r}}}),n=new He({props:{size:"S",$$slots:{default:[l2e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment)},m(l,s){C(e,l,s),$(l,t,s),C(n,l,s),i=!0},p(l,s){const o={};s&1048576&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const a={};s&1048576&&(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&&b(t),S(n,l)}}}function o2e(r){let e;return{c(){e=F("Host")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function a2e(r){let e;return{c(){e=F("Security type")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function u2e(r){let e;return{c(){e=F("Port")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function f2e(r){let e;return{c(){e=F("From email address")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function K7(r){let e,t,n,i,l,s,o,a,u,f,c,p;t=new Je({props:{size:"L",$$slots:{default:[c2e]},$$scope:{ctx:r}}});function d(w){r[15](w)}let g={};r[0].config.auth.user!==void 0&&(g.value=r[0].config.auth.user),i=new et({props:g}),K.push(()=>pe(i,"value",d)),a=new Je({props:{size:"L",$$slots:{default:[p2e]},$$scope:{ctx:r}}});function h(w){r[16](w)}let v={type:"password"};return r[0].config.auth.pass!==void 0&&(v.value=r[0].config.auth.pass),f=new et({props:v}),K.push(()=>pe(f,"value",h)),{c(){e=D("div"),k(t.$$.fragment),n=R(),k(i.$$.fragment),s=R(),o=D("div"),k(a.$$.fragment),u=R(),k(f.$$.fragment),y(e,"class","form-row svelte-1q10q2l"),y(o,"class","form-row svelte-1q10q2l")},m(w,E){$(w,e,E),C(t,e,null),P(e,n),C(i,e,null),$(w,s,E),$(w,o,E),C(a,o,null),P(o,u),C(f,o,null),p=!0},p(w,E){const T={};E&1048576&&(T.$$scope={dirty:E,ctx:w}),t.$set(T);const I={};!l&&E&1&&(l=!0,I.value=w[0].config.auth.user,de(()=>l=!1)),i.$set(I);const O={};E&1048576&&(O.$$scope={dirty:E,ctx:w}),a.$set(O);const L={};!c&&E&1&&(c=!0,L.value=w[0].config.auth.pass,de(()=>c=!1)),f.$set(L)},i(w){p||(m(t.$$.fragment,w),m(i.$$.fragment,w),m(a.$$.fragment,w),m(f.$$.fragment,w),p=!0)},o(w){_(t.$$.fragment,w),_(i.$$.fragment,w),_(a.$$.fragment,w),_(f.$$.fragment,w),p=!1},d(w){w&&b(e),S(t),S(i),w&&b(s),w&&b(o),S(a),S(f)}}}function c2e(r){let e;return{c(){e=F("User")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function p2e(r){let e;return{c(){e=F("Password")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function d2e(r){let e,t,n,i,l,s,o,a,u,f,c,p,d,g,h,v,w,E,T,I,O,L,M,j,B,U,q,G,Y;t=new Je({props:{size:"L",$$slots:{default:[o2e]},$$scope:{ctx:r}}});function H($e){r[10]($e)}let V={};r[0].config.host!==void 0&&(V.value=r[0].config.host),i=new et({props:V}),K.push(()=>pe(i,"value",H)),a=new Je({props:{size:"L",$$slots:{default:[a2e]},$$scope:{ctx:r}}});function W($e){r[11]($e)}let X={options:[{label:"SSL/TLS",value:!0},{label:"None/STARTTLS",value:!1}]};r[0].config.secure!==void 0&&(X.value=r[0].config.secure),f=new Ge({props:X}),K.push(()=>pe(f,"value",W)),g=new Je({props:{size:"L",$$slots:{default:[u2e]},$$scope:{ctx:r}}});function ne($e){r[12]($e)}let x={type:"number"};r[0].config.port!==void 0&&(x.value=r[0].config.port),v=new et({props:x}),K.push(()=>pe(v,"value",ne)),I=new Je({props:{size:"L",$$slots:{default:[f2e]},$$scope:{ctx:r}}});function Q($e){r[13]($e)}let re={type:"email"};r[0].config.from!==void 0&&(re.value=r[0].config.from),L=new et({props:re}),K.push(()=>pe(L,"value",Q));function he($e){r[14]($e)}let Ne={text:"Require sign-in"};r[2]!==void 0&&(Ne.value=r[2]),B=new ri({props:Ne}),K.push(()=>pe(B,"value",he));let Te=r[2]&&K7(r);return{c(){e=D("div"),k(t.$$.fragment),n=R(),k(i.$$.fragment),s=R(),o=D("div"),k(a.$$.fragment),u=R(),k(f.$$.fragment),p=R(),d=D("div"),k(g.$$.fragment),h=R(),k(v.$$.fragment),E=R(),T=D("div"),k(I.$$.fragment),O=R(),k(L.$$.fragment),j=R(),k(B.$$.fragment),q=R(),Te&&Te.c(),G=Ee(),y(e,"class","form-row svelte-1q10q2l"),y(o,"class","form-row svelte-1q10q2l"),y(d,"class","form-row svelte-1q10q2l"),y(T,"class","form-row svelte-1q10q2l")},m($e,ve){$($e,e,ve),C(t,e,null),P(e,n),C(i,e,null),$($e,s,ve),$($e,o,ve),C(a,o,null),P(o,u),C(f,o,null),$($e,p,ve),$($e,d,ve),C(g,d,null),P(d,h),C(v,d,null),$($e,E,ve),$($e,T,ve),C(I,T,null),P(T,O),C(L,T,null),$($e,j,ve),C(B,$e,ve),$($e,q,ve),Te&&Te.m($e,ve),$($e,G,ve),Y=!0},p($e,ve){const Pe={};ve&1048576&&(Pe.$$scope={dirty:ve,ctx:$e}),t.$set(Pe);const Ve={};!l&&ve&1&&(l=!0,Ve.value=$e[0].config.host,de(()=>l=!1)),i.$set(Ve);const ce={};ve&1048576&&(ce.$$scope={dirty:ve,ctx:$e}),a.$set(ce);const Xe={};!c&&ve&1&&(c=!0,Xe.value=$e[0].config.secure,de(()=>c=!1)),f.$set(Xe);const ue={};ve&1048576&&(ue.$$scope={dirty:ve,ctx:$e}),g.$set(ue);const _e={};!w&&ve&1&&(w=!0,_e.value=$e[0].config.port,de(()=>w=!1)),v.$set(_e);const Se={};ve&1048576&&(Se.$$scope={dirty:ve,ctx:$e}),I.$set(Se);const ye={};!M&&ve&1&&(M=!0,ye.value=$e[0].config.from,de(()=>M=!1)),L.$set(ye);const Ue={};!U&&ve&4&&(U=!0,Ue.value=$e[2],de(()=>U=!1)),B.$set(Ue),$e[2]?Te?(Te.p($e,ve),ve&4&&m(Te,1)):(Te=K7($e),Te.c(),m(Te,1),Te.m(G.parentNode,G)):Te&&(ee(),_(Te,1,1,()=>{Te=null}),te())},i($e){Y||(m(t.$$.fragment,$e),m(i.$$.fragment,$e),m(a.$$.fragment,$e),m(f.$$.fragment,$e),m(g.$$.fragment,$e),m(v.$$.fragment,$e),m(I.$$.fragment,$e),m(L.$$.fragment,$e),m(B.$$.fragment,$e),m(Te),Y=!0)},o($e){_(t.$$.fragment,$e),_(i.$$.fragment,$e),_(a.$$.fragment,$e),_(f.$$.fragment,$e),_(g.$$.fragment,$e),_(v.$$.fragment,$e),_(I.$$.fragment,$e),_(L.$$.fragment,$e),_(B.$$.fragment,$e),_(Te),Y=!1},d($e){$e&&b(e),S(t),S(i),$e&&b(s),$e&&b(o),S(a),S(f),$e&&b(p),$e&&b(d),S(g),S(v),$e&&b(E),$e&&b(T),S(I),S(L),$e&&b(j),S(B,$e),$e&&b(q),Te&&Te.d($e),$e&&b(G)}}}function m2e(r){let e;return{c(){e=F("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function g2e(r){let e;return{c(){e=F("Reset")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function _2e(r){let e;return{c(){e=F("Templates")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function h2e(r){let e;return{c(){e=F(`Budibase comes out of the box with ready-made email templates to help
|
|
950
|
-
with user onboarding. Please refrain from changing the links.`)},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function $2e(r){let e,t,n,i;return e=new ft({props:{size:"S",$$slots:{default:[_2e]},$$scope:{ctx:r}}}),n=new He({props:{size:"S",$$slots:{default:[h2e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment)},m(l,s){C(e,l,s),$(l,t,s),C(n,l,s),i=!0},p(l,s){const o={};s&1048576&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const a={};s&1048576&&(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&&b(t),S(n,l)}}}function b2e(r){let e,t,n,i,l,s;e=new Be({props:{noPadding:!0,gap:"XS",$$slots:{default:[r2e]},$$scope:{ctx:r}}}),n=new Yt({props:{size:"S"}});let o=r[0]&&Q7(r);return{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment),i=R(),o&&o.c(),l=Ee()},m(a,u){C(e,a,u),$(a,t,u),C(n,a,u),$(a,i,u),o&&o.m(a,u),$(a,l,u),s=!0},p(a,u){const f={};u&1048576&&(f.$$scope={dirty:u,ctx:a}),e.$set(f),a[0]?o?(o.p(a,u),u&1&&m(o,1)):(o=Q7(a),o.c(),m(o,1),o.m(l.parentNode,l)):o&&(ee(),_(o,1,1,()=>{o=null}),te())},i(a){s||(m(e.$$.fragment,a),m(n.$$.fragment,a),m(o),s=!0)},o(a){_(e.$$.fragment,a),_(n.$$.fragment,a),_(o),s=!1},d(a){S(e,a),a&&b(t),S(n,a),a&&b(i),o&&o.d(a),a&&b(l)}}}function v2e(r){let e,t;return e=new Be({props:{noPadding:!0,$$slots:{default:[b2e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,[i]){const l={};i&1048639&&(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 w2e(r){return r?Object.entries(r.info).map(([t,n])=>Ae({purpose:t},n)):[]}function y2e(r,e,t){let n,i,l,s;fe(r,dc,M=>t(9,i=M)),fe(r,vn,M=>t(4,l=M)),fe(r,jt,M=>t(5,s=M));const o={SMTP:"smtp"},a={name:{displayName:"Name",editable:!1},category:{displayName:"Category",editable:!1}};let u,f,c=!1;async function p(){const M=$n.cloneDeep(u);c||delete M.config.auth;try{const j=await We.saveConfig(M);t(0,u._rev=j._rev,u),t(0,u._id=j._id,u),await vn.getChecklist(),be.success("Settings saved")}catch(j){be.error(`Failed to save email settings, reason: ${(j==null?void 0:j.message)||"Unknown"}`)}}async function d(){try{await We.deleteConfig({id:u._id,rev:u._rev}),t(0,u={config:{}}),await vn.getChecklist(),be.success("Settings cleared")}catch(M){be.error(`Failed to clear email settings, reason: ${(M==null?void 0:M.message)||"Unknown"}`)}}async function g(){t(1,f=!0);try{const M=await We.getConfig(o.SMTP);M._id?t(0,u=M):t(0,u={type:o.SMTP,config:{secure:!0}}),t(1,f=!1),t(2,c=u.config.auth!=null),M.config||(M.config={}),M.config.auth||t(0,u.config.auth={type:"login"},u)}catch{be.error("Error fetching SMTP config")}}g();function h(M){r.$$.not_equal(u.config.host,M)&&(u.config.host=M,t(0,u))}function v(M){r.$$.not_equal(u.config.secure,M)&&(u.config.secure=M,t(0,u))}function w(M){r.$$.not_equal(u.config.port,M)&&(u.config.port=M,t(0,u))}function E(M){r.$$.not_equal(u.config.from,M)&&(u.config.from=M,t(0,u))}function T(M){c=M,t(2,c)}function I(M){r.$$.not_equal(u.config.auth.user,M)&&(u.config.auth.user=M,t(0,u))}function O(M){r.$$.not_equal(u.config.auth.pass,M)&&(u.config.auth.pass=M,t(0,u))}const L=({detail:M})=>s(`./${M.purpose}`);return r.$$.update=()=>{r.$$.dirty&512&&t(3,n=w2e(i.definitions))},[u,f,c,n,l,s,a,p,d,i,h,v,w,E,T,I,O,L]}class k2e extends oe{constructor(e){super();ae(this,e,y2e,v2e,le,{})}}function C2e(r){let e;const t=r[1].default,n=$t(t,r,r[0],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,[l]){n&&n.p&&(!e||l&1)&&bt(n,t,i,i[0],e?wt(t,i[0],l,null):vt(i[0]),null)},i(i){e||(m(n,i),e=!0)},o(i){_(n,i),e=!1},d(i){n&&n.d(i)}}}function S2e(r,e,t){let{$$slots:n={},$$scope:i}=e;return Pt(async()=>{try{await dc.templates.fetch()}catch{be.error("Error fetching email templates")}}),r.$$set=l=>{"$$scope"in l&&t(0,i=l.$$scope)},[i,n]}class A2e extends oe{constructor(e){super();ae(this,e,S2e,C2e,le,{})}}function Z7(r,e,t){const n=r.slice();return n[4]=e[t],n}function E2e(r){let e=r[4]+"",t;return{c(){t=F(e)},m(n,i){$(n,t,i)},p(n,i){i&1&&e!==(e=n[4]+"")&&ke(t,e)},d(n){n&&b(t)}}}function x7(r){let e,t;return e=new jp({props:{$$slots:{default:[E2e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,i){const l={};i&129&&(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 e9(r){let e,t;return e=new jp({props:{$$slots:{default:[O2e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,i){const l={};i&130&&(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 O2e(r){let e,t,n;return{c(){e=F("+"),t=F(r[1]),n=F(" more")},m(i,l){$(i,e,l),$(i,t,l),$(i,n,l)},p(i,l){l&2&&ke(t,i[1])},d(i){i&&b(e),i&&b(t),i&&b(n)}}}function T2e(r){let e,t,n,i=r[0],l=[];for(let a=0;a<i.length;a+=1)l[a]=x7(Z7(r,i,a));const s=a=>_(l[a],1,1,()=>{l[a]=null});let o=r[1]&&e9(r);return{c(){for(let a=0;a<l.length;a+=1)l[a].c();e=R(),o&&o.c(),t=Ee()},m(a,u){for(let f=0;f<l.length;f+=1)l[f].m(a,u);$(a,e,u),o&&o.m(a,u),$(a,t,u),n=!0},p(a,u){if(u&1){i=a[0];let f;for(f=0;f<i.length;f+=1){const c=Z7(a,i,f);l[f]?(l[f].p(c,u),m(l[f],1)):(l[f]=x7(c),l[f].c(),m(l[f],1),l[f].m(e.parentNode,e))}for(ee(),f=i.length;f<l.length;f+=1)s(f);te()}a[1]?o?(o.p(a,u),u&2&&m(o,1)):(o=e9(a),o.c(),m(o,1),o.m(t.parentNode,t)):o&&(ee(),_(o,1,1,()=>{o=null}),te())},i(a){if(!n){for(let u=0;u<i.length;u+=1)m(l[u]);m(o),n=!0}},o(a){l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)_(l[u]);_(o),n=!1},d(a){pt(l,a),a&&b(e),o&&o.d(a),a&&b(t)}}}function I2e(r){let e,t,n;return t=new gh({props:{$$slots:{default:[T2e]},$$scope:{ctx:r}}}),{c(){e=D("div"),k(t.$$.fragment),y(e,"class","tag-renderer svelte-k8pdj6")},m(i,l){$(i,e,l),C(t,e,null),n=!0},p(i,[l]){const s={};l&131&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),S(t)}}}const L2e=5;function P2e(r,e,t){let n,i,l,{value:s}=e;return r.$$set=o=>{"value"in o&&t(2,s=o.value)},r.$$.update=()=>{var o;r.$$.dirty&4&&t(3,n=(o=s==null?void 0:s.filter(a=>a!=null))!=null?o:[]),r.$$.dirty&8&&t(0,i=n.slice(0,L2e)),r.$$.dirty&9&&t(1,l=n.length-i.length)},[i,l,s,n]}class t9 extends oe{constructor(e){super();ae(this,e,P2e,I2e,le,{value:2})}}function N2e(r){let e,t;return e=new t9({props:{value:r[0]}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,[i]){const l={};i&1&&(l.value=n[0]),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 R2e(r,e,t){let n,{value:i}=e;return r.$$set=l=>{"value"in l&&t(1,i=l.value)},r.$$.update=()=>{var l;r.$$.dirty&2&&t(0,n=(l=i==null?void 0:i.filter(s=>s!=null).map(s=>s.name))!=null?l:[])},[n,i]}class M2e extends oe{constructor(e){super();ae(this,e,R2e,N2e,le,{value:1})}}function D2e(r){let e,t=r[1].email+"",n,i,l,s=r[0].name+"",o,a;return{c(){e=F("Update "),n=F(t),i=F("'s role for "),l=D("strong"),o=F(s),a=F(".")},m(u,f){$(u,e,f),$(u,n,f),$(u,i,f),$(u,l,f),P(l,o),$(u,a,f)},p(u,f){f&2&&t!==(t=u[1].email+"")&&ke(n,t),f&1&&s!==(s=u[0].name+"")&&ke(o,s)},d(u){u&&b(e),u&&b(n),u&&b(i),u&&b(l),u&&b(a)}}}function j2e(r){let e,t,n,i,l;e=new He({props:{$$slots:{default:[D2e]},$$scope:{ctx:r}}});function s(a){r[5](a)}let o={placeholder:null,options:r[3],label:"Role",getOptionLabel:z2e,getOptionValue:q2e};return r[2]!==void 0&&(o.value=r[2]),n=new Ge({props:o}),K.push(()=>pe(n,"value",s)),n.$on("change",r[6]),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment)},m(a,u){C(e,a,u),$(a,t,u),C(n,a,u),l=!0},p(a,u){const f={};u&515&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const c={};!i&&u&4&&(i=!0,c.value=a[2],de(()=>i=!1)),n.$set(c)},i(a){l||(m(e.$$.fragment,a),m(n.$$.fragment,a),l=!0)},o(a){_(e.$$.fragment,a),_(n.$$.fragment,a),l=!1},d(a){S(e,a),a&&b(t),S(n,a)}}}function B2e(r){let e,t;return e=new Rt({props:{onConfirm:r[4],title:"Update App Role",confirmText:"Update role",cancelText:"Cancel",size:"M",showCloseIcon:!1,$$slots:{default:[j2e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,[i]){const l={};i&519&&(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)}}}const n9="NO_ACCESS",z2e=r=>r.label,q2e=r=>r.value;function U2e(r,e,t){var p,d;let{app:n}=e,{user:i}=e;const l=gt();let o=n.roles.filter(g=>g._id!=="PUBLIC").map(g=>({value:g._id,label:g.name}));((p=i==null?void 0:i.builder)==null?void 0:p.global)||o.push({value:n9,label:"No Access"});let a=(d=i==null?void 0:i.roles)==null?void 0:d[n==null?void 0:n._id];async function u(){try{if(a===n9){const g=Ae({},i.roles);delete g[n==null?void 0:n._id],await fi.save(it(Ae({},i),{roles:Ae({},g)}))}else await fi.save(it(Ae({},i),{roles:it(Ae({},i.roles),{[n._id]:a})}));be.success("Role updated"),l("update")}catch{be.error("Failed to update role")}}function f(g){a=g,t(2,a)}function c(g){dt.call(this,r,g)}return r.$$set=g=>{"app"in g&&t(0,n=g.app),"user"in g&&t(1,i=g.user)},[n,i,a,o,u,f,c]}class F2e extends oe{constructor(e){super();ae(this,e,U2e,B2e,le,{app:0,user:1})}}function V2e(r){let e;return{c(){e=F(`Before you reset the users password, do not forget to copy the new
|
|
950
|
+
with user onboarding. Please refrain from changing the links.`)},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function $2e(r){let e,t,n,i;return e=new ft({props:{size:"S",$$slots:{default:[_2e]},$$scope:{ctx:r}}}),n=new He({props:{size:"S",$$slots:{default:[h2e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment)},m(l,s){C(e,l,s),$(l,t,s),C(n,l,s),i=!0},p(l,s){const o={};s&1048576&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const a={};s&1048576&&(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&&b(t),S(n,l)}}}function b2e(r){let e,t,n,i,l,s;e=new Be({props:{noPadding:!0,gap:"XS",$$slots:{default:[r2e]},$$scope:{ctx:r}}}),n=new Yt({props:{size:"S"}});let o=r[0]&&Q7(r);return{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment),i=R(),o&&o.c(),l=Ee()},m(a,u){C(e,a,u),$(a,t,u),C(n,a,u),$(a,i,u),o&&o.m(a,u),$(a,l,u),s=!0},p(a,u){const f={};u&1048576&&(f.$$scope={dirty:u,ctx:a}),e.$set(f),a[0]?o?(o.p(a,u),u&1&&m(o,1)):(o=Q7(a),o.c(),m(o,1),o.m(l.parentNode,l)):o&&(ee(),_(o,1,1,()=>{o=null}),te())},i(a){s||(m(e.$$.fragment,a),m(n.$$.fragment,a),m(o),s=!0)},o(a){_(e.$$.fragment,a),_(n.$$.fragment,a),_(o),s=!1},d(a){S(e,a),a&&b(t),S(n,a),a&&b(i),o&&o.d(a),a&&b(l)}}}function v2e(r){let e,t;return e=new Be({props:{noPadding:!0,$$slots:{default:[b2e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,[i]){const l={};i&1048639&&(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 w2e(r){return r?Object.entries(r.info).map(([t,n])=>Ae({purpose:t},n)):[]}function y2e(r,e,t){let n,i,l,s;fe(r,dc,M=>t(9,i=M)),fe(r,vn,M=>t(4,l=M)),fe(r,jt,M=>t(5,s=M));const o={SMTP:"smtp"},a={name:{displayName:"Name",editable:!1},category:{displayName:"Category",editable:!1}};let u,f,c=!1;async function p(){const M=$n.cloneDeep(u);c||delete M.config.auth;try{const j=await We.saveConfig(M);t(0,u._rev=j._rev,u),t(0,u._id=j._id,u),await vn.getChecklist(),be.success("Settings saved")}catch(j){be.error(`Failed to save email settings, reason: ${(j==null?void 0:j.message)||"Unknown"}`)}}async function d(){try{await We.deleteConfig({id:u._id,rev:u._rev}),t(0,u={type:o.SMTP,config:{secure:!0}}),await vn.getChecklist(),be.success("Settings cleared")}catch(M){be.error(`Failed to clear email settings, reason: ${(M==null?void 0:M.message)||"Unknown"}`)}}async function g(){t(1,f=!0);try{const M=await We.getConfig(o.SMTP);M._id?t(0,u=M):t(0,u={type:o.SMTP,config:{secure:!0}}),t(1,f=!1),t(2,c=u.config.auth!=null),M.config||(M.config={}),M.config.auth||t(0,u.config.auth={type:"login"},u)}catch{be.error("Error fetching SMTP config")}}g();function h(M){r.$$.not_equal(u.config.host,M)&&(u.config.host=M,t(0,u))}function v(M){r.$$.not_equal(u.config.secure,M)&&(u.config.secure=M,t(0,u))}function w(M){r.$$.not_equal(u.config.port,M)&&(u.config.port=M,t(0,u))}function E(M){r.$$.not_equal(u.config.from,M)&&(u.config.from=M,t(0,u))}function T(M){c=M,t(2,c)}function I(M){r.$$.not_equal(u.config.auth.user,M)&&(u.config.auth.user=M,t(0,u))}function O(M){r.$$.not_equal(u.config.auth.pass,M)&&(u.config.auth.pass=M,t(0,u))}const L=({detail:M})=>s(`./${M.purpose}`);return r.$$.update=()=>{r.$$.dirty&512&&t(3,n=w2e(i.definitions))},[u,f,c,n,l,s,a,p,d,i,h,v,w,E,T,I,O,L]}class k2e extends oe{constructor(e){super();ae(this,e,y2e,v2e,le,{})}}function C2e(r){let e;const t=r[1].default,n=$t(t,r,r[0],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,[l]){n&&n.p&&(!e||l&1)&&bt(n,t,i,i[0],e?wt(t,i[0],l,null):vt(i[0]),null)},i(i){e||(m(n,i),e=!0)},o(i){_(n,i),e=!1},d(i){n&&n.d(i)}}}function S2e(r,e,t){let{$$slots:n={},$$scope:i}=e;return Pt(async()=>{try{await dc.templates.fetch()}catch{be.error("Error fetching email templates")}}),r.$$set=l=>{"$$scope"in l&&t(0,i=l.$$scope)},[i,n]}class A2e extends oe{constructor(e){super();ae(this,e,S2e,C2e,le,{})}}function Z7(r,e,t){const n=r.slice();return n[4]=e[t],n}function E2e(r){let e=r[4]+"",t;return{c(){t=F(e)},m(n,i){$(n,t,i)},p(n,i){i&1&&e!==(e=n[4]+"")&&ke(t,e)},d(n){n&&b(t)}}}function x7(r){let e,t;return e=new jp({props:{$$slots:{default:[E2e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,i){const l={};i&129&&(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 e9(r){let e,t;return e=new jp({props:{$$slots:{default:[O2e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,i){const l={};i&130&&(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 O2e(r){let e,t,n;return{c(){e=F("+"),t=F(r[1]),n=F(" more")},m(i,l){$(i,e,l),$(i,t,l),$(i,n,l)},p(i,l){l&2&&ke(t,i[1])},d(i){i&&b(e),i&&b(t),i&&b(n)}}}function T2e(r){let e,t,n,i=r[0],l=[];for(let a=0;a<i.length;a+=1)l[a]=x7(Z7(r,i,a));const s=a=>_(l[a],1,1,()=>{l[a]=null});let o=r[1]&&e9(r);return{c(){for(let a=0;a<l.length;a+=1)l[a].c();e=R(),o&&o.c(),t=Ee()},m(a,u){for(let f=0;f<l.length;f+=1)l[f].m(a,u);$(a,e,u),o&&o.m(a,u),$(a,t,u),n=!0},p(a,u){if(u&1){i=a[0];let f;for(f=0;f<i.length;f+=1){const c=Z7(a,i,f);l[f]?(l[f].p(c,u),m(l[f],1)):(l[f]=x7(c),l[f].c(),m(l[f],1),l[f].m(e.parentNode,e))}for(ee(),f=i.length;f<l.length;f+=1)s(f);te()}a[1]?o?(o.p(a,u),u&2&&m(o,1)):(o=e9(a),o.c(),m(o,1),o.m(t.parentNode,t)):o&&(ee(),_(o,1,1,()=>{o=null}),te())},i(a){if(!n){for(let u=0;u<i.length;u+=1)m(l[u]);m(o),n=!0}},o(a){l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)_(l[u]);_(o),n=!1},d(a){pt(l,a),a&&b(e),o&&o.d(a),a&&b(t)}}}function I2e(r){let e,t,n;return t=new gh({props:{$$slots:{default:[T2e]},$$scope:{ctx:r}}}),{c(){e=D("div"),k(t.$$.fragment),y(e,"class","tag-renderer svelte-k8pdj6")},m(i,l){$(i,e,l),C(t,e,null),n=!0},p(i,[l]){const s={};l&131&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),S(t)}}}const L2e=5;function P2e(r,e,t){let n,i,l,{value:s}=e;return r.$$set=o=>{"value"in o&&t(2,s=o.value)},r.$$.update=()=>{var o;r.$$.dirty&4&&t(3,n=(o=s==null?void 0:s.filter(a=>a!=null))!=null?o:[]),r.$$.dirty&8&&t(0,i=n.slice(0,L2e)),r.$$.dirty&9&&t(1,l=n.length-i.length)},[i,l,s,n]}class t9 extends oe{constructor(e){super();ae(this,e,P2e,I2e,le,{value:2})}}function N2e(r){let e,t;return e=new t9({props:{value:r[0]}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,[i]){const l={};i&1&&(l.value=n[0]),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 R2e(r,e,t){let n,{value:i}=e;return r.$$set=l=>{"value"in l&&t(1,i=l.value)},r.$$.update=()=>{var l;r.$$.dirty&2&&t(0,n=(l=i==null?void 0:i.filter(s=>s!=null).map(s=>s.name))!=null?l:[])},[n,i]}class M2e extends oe{constructor(e){super();ae(this,e,R2e,N2e,le,{value:1})}}function D2e(r){let e,t=r[1].email+"",n,i,l,s=r[0].name+"",o,a;return{c(){e=F("Update "),n=F(t),i=F("'s role for "),l=D("strong"),o=F(s),a=F(".")},m(u,f){$(u,e,f),$(u,n,f),$(u,i,f),$(u,l,f),P(l,o),$(u,a,f)},p(u,f){f&2&&t!==(t=u[1].email+"")&&ke(n,t),f&1&&s!==(s=u[0].name+"")&&ke(o,s)},d(u){u&&b(e),u&&b(n),u&&b(i),u&&b(l),u&&b(a)}}}function j2e(r){let e,t,n,i,l;e=new He({props:{$$slots:{default:[D2e]},$$scope:{ctx:r}}});function s(a){r[5](a)}let o={placeholder:null,options:r[3],label:"Role",getOptionLabel:z2e,getOptionValue:q2e};return r[2]!==void 0&&(o.value=r[2]),n=new Ge({props:o}),K.push(()=>pe(n,"value",s)),n.$on("change",r[6]),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment)},m(a,u){C(e,a,u),$(a,t,u),C(n,a,u),l=!0},p(a,u){const f={};u&515&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const c={};!i&&u&4&&(i=!0,c.value=a[2],de(()=>i=!1)),n.$set(c)},i(a){l||(m(e.$$.fragment,a),m(n.$$.fragment,a),l=!0)},o(a){_(e.$$.fragment,a),_(n.$$.fragment,a),l=!1},d(a){S(e,a),a&&b(t),S(n,a)}}}function B2e(r){let e,t;return e=new Rt({props:{onConfirm:r[4],title:"Update App Role",confirmText:"Update role",cancelText:"Cancel",size:"M",showCloseIcon:!1,$$slots:{default:[j2e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,[i]){const l={};i&519&&(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)}}}const n9="NO_ACCESS",z2e=r=>r.label,q2e=r=>r.value;function U2e(r,e,t){var p,d;let{app:n}=e,{user:i}=e;const l=gt();let o=n.roles.filter(g=>g._id!=="PUBLIC").map(g=>({value:g._id,label:g.name}));((p=i==null?void 0:i.builder)==null?void 0:p.global)||o.push({value:n9,label:"No Access"});let a=(d=i==null?void 0:i.roles)==null?void 0:d[n==null?void 0:n._id];async function u(){try{if(a===n9){const g=Ae({},i.roles);delete g[n==null?void 0:n._id],await fi.save(it(Ae({},i),{roles:Ae({},g)}))}else await fi.save(it(Ae({},i),{roles:it(Ae({},i.roles),{[n._id]:a})}));be.success("Role updated"),l("update")}catch{be.error("Failed to update role")}}function f(g){a=g,t(2,a)}function c(g){dt.call(this,r,g)}return r.$$set=g=>{"app"in g&&t(0,n=g.app),"user"in g&&t(1,i=g.user)},[n,i,a,o,u,f,c]}class F2e extends oe{constructor(e){super();ae(this,e,U2e,B2e,le,{app:0,user:1})}}function V2e(r){let e;return{c(){e=F(`Before you reset the users password, do not forget to copy the new
|
|
951
951
|
password. The user will need this to login. Once the user has logged in they
|
|
952
952
|
will be asked to create a new password that is more secure.`)},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function H2e(r){let e,t,n,i;return e=new He({props:{noPadding:!0,$$slots:{default:[V2e]},$$scope:{ctx:r}}}),n=new et({props:{disabled:!0,label:"Password",value:r[0]}}),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment)},m(l,s){C(e,l,s),$(l,t,s),C(n,l,s),i=!0},p(l,s){const o={};s&16&&(o.$$scope={dirty:s,ctx:l}),e.$set(o)},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&&b(t),S(n,l)}}}function W2e(r){let e,t;return e=new Rt({props:{onConfirm:r[1],size:"M",title:"Force Reset User Password",confirmText:"Reset password",cancelText:"Cancel",showCloseIcon:!1,$$slots:{default:[H2e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,[i]){const l={};i&16&&(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 G2e(r,e,t){const n=gt();let{user:i}=e;const l=Math.random().toString(36).slice(2,20);async function s(){try{await fi.save(it(Ae({},i),{password:l,forceResetPassword:!0})),be.success("Password reset successfully"),n("update")}catch{be.error("Error resetting password")}}return r.$$set=o=>{"user"in o&&t(2,i=o.user)},[l,s,i]}class Y2e extends oe{constructor(e){super();ae(this,e,G2e,W2e,le,{user:2})}}function J2e(r){let e;return{c(){e=F("Back to users")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function X2e(r){var i,l;let e,t=((l=(i=r[1])==null?void 0:i.data)==null?void 0:l.email)+"",n;return{c(){e=F("User: "),n=F(t)},m(s,o){$(s,e,o),$(s,n,o)},p(s,o){var a,u;o&2&&t!==(t=((u=(a=s[1])==null?void 0:a.data)==null?void 0:u.email)+"")&&ke(n,t)},d(s){s&&b(e),s&&b(n)}}}function Q2e(r){let e;return{c(){e=F(`Change user settings and update their app roles. Also contains the ability
|
|
953
953
|
to delete the user as well as force reset their password.`)},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function K2e(r){let e,t,n,i,l,s,o;return t=new Bt({props:{quiet:!0,size:"S",icon:"BackAndroid",$$slots:{default:[J2e]},$$scope:{ctx:r}}}),t.$on("click",r[24]),i=new ft({props:{$$slots:{default:[X2e]},$$scope:{ctx:r}}}),s=new He({props:{$$slots:{default:[Q2e]},$$scope:{ctx:r}}}),{c(){e=D("div"),k(t.$$.fragment),n=R(),k(i.$$.fragment),l=R(),k(s.$$.fragment)},m(a,u){$(a,e,u),C(t,e,null),$(a,n,u),C(i,a,u),$(a,l,u),C(s,a,u),o=!0},p(a,u){const f={};u&536870912&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const c={};u&536870914&&(c.$$scope={dirty:u,ctx:a}),i.$set(c);const p={};u&536870912&&(p.$$scope={dirty:u,ctx:a}),s.$set(p)},i(a){o||(m(t.$$.fragment,a),m(i.$$.fragment,a),m(s.$$.fragment,a),o=!0)},o(a){_(t.$$.fragment,a),_(i.$$.fragment,a),_(s.$$.fragment,a),o=!1},d(a){a&&b(e),S(t),a&&b(n),S(i,a),a&&b(l),S(s,a)}}}function Z2e(r){let e;return{c(){e=F("General")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function x2e(r){let e;return{c(){e=F("Email")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function eve(r){let e;return{c(){e=F("Group(s)")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function tve(r){let e;return{c(){e=F("First name")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function nve(r){let e;return{c(){e=F("Last name")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function r9(r){var c,p,d,g,h,v;let e,t,n,i,l,s,o,a,u,f;return t=new Je({props:{size:"L",$$slots:{default:[rve]},$$scope:{ctx:r}}}),i=new Hn({props:{text:"",value:(d=(p=(c=r[1])==null?void 0:c.data)==null?void 0:p.builder)==null?void 0:d.global,disabled:r[6]}}),i.$on("change",r[18]),o=new Je({props:{size:"L",$$slots:{default:[ive]},$$scope:{ctx:r}}}),u=new Hn({props:{text:"",value:(v=(h=(g=r[1])==null?void 0:g.data)==null?void 0:h.admin)==null?void 0:v.global,disabled:r[6]}}),u.$on("change",r[19]),{c(){e=D("div"),k(t.$$.fragment),n=R(),k(i.$$.fragment),l=R(),s=D("div"),k(o.$$.fragment),a=R(),k(u.$$.fragment),y(e,"class","field svelte-1fvdtls"),y(s,"class","field svelte-1fvdtls")},m(w,E){$(w,e,E),C(t,e,null),P(e,n),C(i,e,null),$(w,l,E),$(w,s,E),C(o,s,null),P(s,a),C(u,s,null),f=!0},p(w,E){var M,j,B,U,q,G;const T={};E&536870912&&(T.$$scope={dirty:E,ctx:w}),t.$set(T);const I={};E&2&&(I.value=(B=(j=(M=w[1])==null?void 0:M.data)==null?void 0:j.builder)==null?void 0:B.global),E&64&&(I.disabled=w[6]),i.$set(I);const O={};E&536870912&&(O.$$scope={dirty:E,ctx:w}),o.$set(O);const L={};E&2&&(L.value=(G=(q=(U=w[1])==null?void 0:U.data)==null?void 0:q.admin)==null?void 0:G.global),E&64&&(L.disabled=w[6]),u.$set(L)},i(w){f||(m(t.$$.fragment,w),m(i.$$.fragment,w),m(o.$$.fragment,w),m(u.$$.fragment,w),f=!0)},o(w){_(t.$$.fragment,w),_(i.$$.fragment,w),_(o.$$.fragment,w),_(u.$$.fragment,w),f=!1},d(w){w&&b(e),S(t),S(i),w&&b(l),w&&b(s),S(o),S(u)}}}function rve(r){let e;return{c(){e=F("Development access")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function ive(r){let e;return{c(){e=F("Administration access")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function lve(r){let e;return{c(){e=F("Force password reset")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function sve(r){var Y,H,V,W,X,ne;let e,t,n,i,l,s,o,a,u,f,c,p,d,g,h,v,w,E,T,I,O,L,M,j,B,U,q;e=new ft({props:{size:"S",$$slots:{default:[Z2e]},$$scope:{ctx:r}}}),l=new Je({props:{size:"L",$$slots:{default:[x2e]},$$scope:{ctx:r}}}),o=new et({props:{disabled:!0,thin:!0,value:(H=(Y=r[1])==null?void 0:Y.data)==null?void 0:H.email}}),f=new Je({props:{size:"L",$$slots:{default:[eve]},$$scope:{ctx:r}}}),p=new Ge({props:{disabled:!0,options:["All users"],value:"All users"}}),h=new Je({props:{size:"L",$$slots:{default:[tve]},$$scope:{ctx:r}}}),w=new et({props:{thin:!0,value:(W=(V=r[1])==null?void 0:V.data)==null?void 0:W.firstName}}),w.$on("blur",r[16]),I=new Je({props:{size:"L",$$slots:{default:[nve]},$$scope:{ctx:r}}}),L=new et({props:{thin:!0,value:(ne=(X=r[1])==null?void 0:X.data)==null?void 0:ne.lastName}}),L.$on("blur",r[17]);let G=r[0]!==r[10].user._id&&r9(r);return U=new Bt({props:{size:"S",icon:"Refresh",quiet:!0,$$slots:{default:[lve]},$$scope:{ctx:r}}}),U.$on("click",function(){ut(r[4].show)&&r[4].show.apply(this,arguments)}),{c(){k(e.$$.fragment),t=R(),n=D("div"),i=D("div"),k(l.$$.fragment),s=R(),k(o.$$.fragment),a=R(),u=D("div"),k(f.$$.fragment),c=R(),k(p.$$.fragment),d=R(),g=D("div"),k(h.$$.fragment),v=R(),k(w.$$.fragment),E=R(),T=D("div"),k(I.$$.fragment),O=R(),k(L.$$.fragment),M=R(),G&&G.c(),j=R(),B=D("div"),k(U.$$.fragment),y(i,"class","field svelte-1fvdtls"),y(u,"class","field svelte-1fvdtls"),y(g,"class","field svelte-1fvdtls"),y(T,"class","field svelte-1fvdtls"),y(n,"class","fields svelte-1fvdtls"),y(B,"class","regenerate svelte-1fvdtls")},m(x,Q){C(e,x,Q),$(x,t,Q),$(x,n,Q),P(n,i),C(l,i,null),P(i,s),C(o,i,null),P(n,a),P(n,u),C(f,u,null),P(u,c),C(p,u,null),P(n,d),P(n,g),C(h,g,null),P(g,v),C(w,g,null),P(n,E),P(n,T),C(I,T,null),P(T,O),C(L,T,null),P(n,M),G&&G.m(n,null),$(x,j,Q),$(x,B,Q),C(U,B,null),q=!0},p(x,Q){var Xe,ue,_e,Se,ye,Ue;r=x;const re={};Q&536870912&&(re.$$scope={dirty:Q,ctx:r}),e.$set(re);const he={};Q&536870912&&(he.$$scope={dirty:Q,ctx:r}),l.$set(he);const Ne={};Q&2&&(Ne.value=(ue=(Xe=r[1])==null?void 0:Xe.data)==null?void 0:ue.email),o.$set(Ne);const Te={};Q&536870912&&(Te.$$scope={dirty:Q,ctx:r}),f.$set(Te);const $e={};Q&536870912&&($e.$$scope={dirty:Q,ctx:r}),h.$set($e);const ve={};Q&2&&(ve.value=(Se=(_e=r[1])==null?void 0:_e.data)==null?void 0:Se.firstName),w.$set(ve);const Pe={};Q&536870912&&(Pe.$$scope={dirty:Q,ctx:r}),I.$set(Pe);const Ve={};Q&2&&(Ve.value=(Ue=(ye=r[1])==null?void 0:ye.data)==null?void 0:Ue.lastName),L.$set(Ve),r[0]!==r[10].user._id?G?(G.p(r,Q),Q&1025&&m(G,1)):(G=r9(r),G.c(),m(G,1),G.m(n,null)):G&&(ee(),_(G,1,1,()=>{G=null}),te());const ce={};Q&536870912&&(ce.$$scope={dirty:Q,ctx:r}),U.$set(ce)},i(x){q||(m(e.$$.fragment,x),m(l.$$.fragment,x),m(o.$$.fragment,x),m(f.$$.fragment,x),m(p.$$.fragment,x),m(h.$$.fragment,x),m(w.$$.fragment,x),m(I.$$.fragment,x),m(L.$$.fragment,x),m(G),m(U.$$.fragment,x),q=!0)},o(x){_(e.$$.fragment,x),_(l.$$.fragment,x),_(o.$$.fragment,x),_(f.$$.fragment,x),_(p.$$.fragment,x),_(h.$$.fragment,x),_(w.$$.fragment,x),_(I.$$.fragment,x),_(L.$$.fragment,x),_(G),_(U.$$.fragment,x),q=!1},d(x){S(e,x),x&&b(t),x&&b(n),S(l),S(o),S(f),S(p),S(h),S(w),S(I),S(L),G&&G.d(),x&&b(j),x&&b(B),S(U)}}}function ove(r){let e;return{c(){e=F("Configure roles")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function ave(r){let e;return{c(){e=F("Specify a role to grant access to an app.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function uve(r){let e,t,n,i,l,s;return e=new ft({props:{size:"S",$$slots:{default:[ove]},$$scope:{ctx:r}}}),n=new He({props:{$$slots:{default:[ave]},$$scope:{ctx:r}}}),l=new Si({props:{schema:r[11],data:r[8],allowEditColumns:!1,allowEditRows:!1,allowSelectRows:!1,customRenderers:[{column:"role",component:M2e}]}}),l.$on("click",r[20]),{c(){k(e.$$.fragment),t=R(),k(n.$$.fragment),i=R(),k(l.$$.fragment)},m(o,a){C(e,o,a),$(o,t,a),C(n,o,a),$(o,i,a),C(l,o,a),s=!0},p(o,a){const u={};a&536870912&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const f={};a&536870912&&(f.$$scope={dirty:a,ctx:o}),n.$set(f);const c={};a&256&&(c.data=o[8]),l.$set(c)},i(o){s||(m(e.$$.fragment,o),m(n.$$.fragment,o),m(l.$$.fragment,o),s=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),_(l.$$.fragment,o),s=!1},d(o){S(e,o),o&&b(t),S(n,o),o&&b(i),S(l,o)}}}function fve(r){let e;return{c(){e=F("No Access")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function cve(r){let e;return{c(){e=F(`Apps do not appear in the users portal. Public pages may still be viewed
|
package/builder/index.html
CHANGED
|
@@ -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.
|
|
13
|
+
<script type="module" crossorigin src="/builder/assets/index.df61d17f.js"></script>
|
|
14
14
|
<link rel="modulepreload" href="/builder/assets/vendor.001dcf8c.js">
|
|
15
15
|
<link rel="stylesheet" href="/builder/assets/vendor.5e1fe644.css">
|
|
16
16
|
<link rel="stylesheet" href="/builder/assets/index.7786f497.css">
|
package/coverage/clover.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
4
|
-
<metrics statements="
|
|
2
|
+
<coverage generated="1657291374530" clover="3.2.0">
|
|
3
|
+
<project timestamp="1657291374530" name="All files">
|
|
4
|
+
<metrics statements="4386" coveredstatements="3151" conditionals="1829" coveredconditionals="957" methods="632" coveredmethods="446" elements="6847" coveredelements="4554" complexity="0" loc="4386" ncloc="4386" 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">
|
|
@@ -3857,7 +3857,7 @@
|
|
|
3857
3857
|
</file>
|
|
3858
3858
|
</package>
|
|
3859
3859
|
<package name="threads">
|
|
3860
|
-
<metrics statements="
|
|
3860
|
+
<metrics statements="331" coveredstatements="220" conditionals="149" coveredconditionals="68" methods="35" coveredmethods="27"/>
|
|
3861
3861
|
<file name="automation.js" path="/home/runner/work/budibase/budibase/packages/server/src/threads/automation.js">
|
|
3862
3862
|
<metrics statements="165" coveredstatements="84" conditionals="75" coveredconditionals="20" methods="13" coveredmethods="9"/>
|
|
3863
3863
|
<line num="1" count="3" type="stmt"/>
|
|
@@ -4027,7 +4027,7 @@
|
|
|
4027
4027
|
<line num="346" count="0" type="stmt"/>
|
|
4028
4028
|
</file>
|
|
4029
4029
|
<file name="query.js" path="/home/runner/work/budibase/budibase/packages/server/src/threads/query.js">
|
|
4030
|
-
<metrics statements="
|
|
4030
|
+
<metrics statements="130" coveredstatements="106" conditionals="59" coveredconditionals="38" methods="13" coveredmethods="10"/>
|
|
4031
4031
|
<line num="1" count="2" type="stmt"/>
|
|
4032
4032
|
<line num="2" count="2" type="stmt"/>
|
|
4033
4033
|
<line num="3" count="2" type="stmt"/>
|
|
@@ -4037,9 +4037,9 @@
|
|
|
4037
4037
|
<line num="10" count="2" type="stmt"/>
|
|
4038
4038
|
<line num="11" count="2" type="stmt"/>
|
|
4039
4039
|
<line num="12" count="2" type="stmt"/>
|
|
4040
|
-
<line num="
|
|
4041
|
-
<line num="
|
|
4042
|
-
<line num="
|
|
4040
|
+
<line num="13" count="2" type="stmt"/>
|
|
4041
|
+
<line num="15" count="2" type="stmt"/>
|
|
4042
|
+
<line num="19" count="2" type="stmt"/>
|
|
4043
4043
|
<line num="23" count="22" type="stmt"/>
|
|
4044
4044
|
<line num="24" count="22" type="stmt"/>
|
|
4045
4045
|
<line num="25" count="22" type="stmt"/>
|
|
@@ -4048,112 +4048,116 @@
|
|
|
4048
4048
|
<line num="28" count="22" type="stmt"/>
|
|
4049
4049
|
<line num="29" count="22" type="stmt"/>
|
|
4050
4050
|
<line num="30" count="22" type="stmt"/>
|
|
4051
|
-
<line num="
|
|
4052
|
-
<line num="
|
|
4051
|
+
<line num="31" count="22" type="stmt"/>
|
|
4052
|
+
<line num="33" count="22" type="stmt"/>
|
|
4053
4053
|
<line num="37" count="22" type="stmt"/>
|
|
4054
4054
|
<line num="38" count="22" type="stmt"/>
|
|
4055
|
-
<line num="
|
|
4056
|
-
<line num="
|
|
4057
|
-
<line num="45" count="23" type="
|
|
4058
|
-
<line num="46" count="
|
|
4059
|
-
<line num="
|
|
4060
|
-
<line num="
|
|
4061
|
-
<line num="
|
|
4062
|
-
<line num="
|
|
4055
|
+
<line num="39" count="22" type="stmt"/>
|
|
4056
|
+
<line num="43" count="23" type="stmt"/>
|
|
4057
|
+
<line num="45" count="23" type="stmt"/>
|
|
4058
|
+
<line num="46" count="23" type="stmt"/>
|
|
4059
|
+
<line num="48" count="23" type="stmt"/>
|
|
4060
|
+
<line num="49" count="23" type="cond" truecount="2" falsecount="0"/>
|
|
4061
|
+
<line num="50" count="2" type="stmt"/>
|
|
4062
|
+
<line num="53" count="21" type="cond" truecount="1" falsecount="1"/>
|
|
4063
|
+
<line num="54" count="0" type="stmt"/>
|
|
4064
|
+
<line num="56" count="0" type="stmt"/>
|
|
4063
4065
|
<line num="60" count="21" type="stmt"/>
|
|
4064
|
-
<line num="
|
|
4065
|
-
<line num="
|
|
4066
|
-
<line num="68" count="21" type="
|
|
4067
|
-
<line num="
|
|
4068
|
-
<line num="
|
|
4069
|
-
<line num="
|
|
4070
|
-
<line num="
|
|
4071
|
-
<line num="
|
|
4072
|
-
<line num="
|
|
4073
|
-
<line num="88" count="
|
|
4074
|
-
<line num="89" count="21" type="stmt"/>
|
|
4075
|
-
<line num="90" count="21" type="stmt"/>
|
|
4066
|
+
<line num="63" count="21" type="stmt"/>
|
|
4067
|
+
<line num="67" count="21" type="stmt"/>
|
|
4068
|
+
<line num="68" count="21" type="stmt"/>
|
|
4069
|
+
<line num="71" count="21" type="cond" truecount="2" falsecount="0"/>
|
|
4070
|
+
<line num="72" count="1" type="stmt"/>
|
|
4071
|
+
<line num="80" count="21" type="cond" truecount="2" falsecount="0"/>
|
|
4072
|
+
<line num="81" count="2" type="stmt"/>
|
|
4073
|
+
<line num="83" count="19" type="stmt"/>
|
|
4074
|
+
<line num="87" count="21" type="cond" truecount="1" falsecount="1"/>
|
|
4075
|
+
<line num="88" count="0" type="stmt"/>
|
|
4076
4076
|
<line num="91" count="21" type="stmt"/>
|
|
4077
4077
|
<line num="92" count="21" type="stmt"/>
|
|
4078
|
-
<line num="93" count="21" type="
|
|
4079
|
-
<line num="94" count="
|
|
4080
|
-
<line num="95" count="
|
|
4081
|
-
<line num="96" count="
|
|
4078
|
+
<line num="93" count="21" type="stmt"/>
|
|
4079
|
+
<line num="94" count="21" type="stmt"/>
|
|
4080
|
+
<line num="95" count="21" type="stmt"/>
|
|
4081
|
+
<line num="96" count="21" type="cond" truecount="2" falsecount="0"/>
|
|
4082
4082
|
<line num="97" count="19" type="stmt"/>
|
|
4083
|
-
<line num="
|
|
4084
|
-
<line num="
|
|
4085
|
-
<line num="
|
|
4086
|
-
<line num="
|
|
4087
|
-
<line num="
|
|
4088
|
-
<line num="
|
|
4089
|
-
<line num="
|
|
4090
|
-
<line num="
|
|
4091
|
-
<line num="
|
|
4083
|
+
<line num="98" count="19" type="stmt"/>
|
|
4084
|
+
<line num="99" count="19" type="stmt"/>
|
|
4085
|
+
<line num="100" count="19" type="stmt"/>
|
|
4086
|
+
<line num="104" count="21" type="cond" truecount="1" falsecount="1"/>
|
|
4087
|
+
<line num="105" count="0" type="stmt"/>
|
|
4088
|
+
<line num="109" count="0" type="stmt"/>
|
|
4089
|
+
<line num="113" count="21" type="cond" truecount="5" falsecount="0"/>
|
|
4090
|
+
<line num="114" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
4091
|
+
<line num="119" count="0" type="stmt"/>
|
|
4092
|
+
<line num="121" count="0" type="stmt"/>
|
|
4092
4093
|
<line num="123" count="1" type="stmt"/>
|
|
4093
|
-
<line num="
|
|
4094
|
-
<line num="
|
|
4095
|
-
<line num="
|
|
4096
|
-
<line num="
|
|
4097
|
-
<line num="
|
|
4098
|
-
<line num="
|
|
4099
|
-
<line num="
|
|
4100
|
-
<line num="
|
|
4101
|
-
<line num="
|
|
4102
|
-
<line num="148" count="20" type="
|
|
4103
|
-
<line num="
|
|
4104
|
-
<line num="
|
|
4105
|
-
<line num="
|
|
4106
|
-
<line num="
|
|
4107
|
-
<line num="
|
|
4108
|
-
<line num="
|
|
4109
|
-
<line num="171" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
4094
|
+
<line num="126" count="1" type="stmt"/>
|
|
4095
|
+
<line num="127" count="1" type="stmt"/>
|
|
4096
|
+
<line num="131" count="20" type="cond" truecount="1" falsecount="1"/>
|
|
4097
|
+
<line num="132" count="0" type="stmt"/>
|
|
4098
|
+
<line num="136" count="20" type="cond" truecount="2" falsecount="0"/>
|
|
4099
|
+
<line num="137" count="18" type="stmt"/>
|
|
4100
|
+
<line num="141" count="20" type="cond" truecount="1" falsecount="1"/>
|
|
4101
|
+
<line num="142" count="0" type="stmt"/>
|
|
4102
|
+
<line num="146" count="20" type="stmt"/>
|
|
4103
|
+
<line num="148" count="20" type="cond" truecount="1" falsecount="1"/>
|
|
4104
|
+
<line num="149" count="0" type="stmt"/>
|
|
4105
|
+
<line num="152" count="20" type="stmt"/>
|
|
4106
|
+
<line num="156" count="5" type="stmt"/>
|
|
4107
|
+
<line num="157" count="5" type="stmt"/>
|
|
4108
|
+
<line num="158" count="5" type="stmt"/>
|
|
4109
|
+
<line num="159" count="5" type="stmt"/>
|
|
4110
4110
|
<line num="172" count="0" type="stmt"/>
|
|
4111
|
-
<line num="
|
|
4112
|
-
<line num="
|
|
4113
|
-
<line num="
|
|
4114
|
-
<line num="
|
|
4115
|
-
<line num="
|
|
4111
|
+
<line num="173" count="0" type="stmt"/>
|
|
4112
|
+
<line num="175" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
4113
|
+
<line num="176" count="0" type="stmt"/>
|
|
4114
|
+
<line num="179" count="0" type="stmt"/>
|
|
4115
|
+
<line num="187" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
4116
|
+
<line num="188" count="0" type="stmt"/>
|
|
4117
|
+
<line num="189" count="0" type="stmt"/>
|
|
4116
4118
|
<line num="190" count="0" type="stmt"/>
|
|
4119
|
+
<line num="194" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
4117
4120
|
<line num="195" count="0" type="stmt"/>
|
|
4118
|
-
<line num="
|
|
4119
|
-
<line num="
|
|
4120
|
-
<line num="
|
|
4121
|
-
<line num="
|
|
4122
|
-
<line num="
|
|
4123
|
-
<line num="
|
|
4124
|
-
<line num="
|
|
4125
|
-
<line num="
|
|
4126
|
-
<line num="
|
|
4127
|
-
<line num="
|
|
4128
|
-
<line num="
|
|
4129
|
-
<line num="
|
|
4130
|
-
<line num="
|
|
4131
|
-
<line num="
|
|
4132
|
-
<line num="
|
|
4133
|
-
<line num="
|
|
4134
|
-
<line num="
|
|
4135
|
-
<line num="
|
|
4136
|
-
<line num="
|
|
4137
|
-
<line num="
|
|
4138
|
-
<line num="
|
|
4139
|
-
<line num="
|
|
4140
|
-
<line num="
|
|
4141
|
-
<line num="
|
|
4142
|
-
<line num="
|
|
4143
|
-
<line num="240" count="16" type="stmt"/>
|
|
4144
|
-
<line num="241" count="16" type="stmt"/>
|
|
4145
|
-
<line num="242" count="16" type="stmt"/>
|
|
4121
|
+
<line num="200" count="0" type="stmt"/>
|
|
4122
|
+
<line num="204" count="6" type="stmt"/>
|
|
4123
|
+
<line num="205" count="6" type="stmt"/>
|
|
4124
|
+
<line num="206" count="6" type="stmt"/>
|
|
4125
|
+
<line num="207" count="6" type="stmt"/>
|
|
4126
|
+
<line num="208" count="6" type="cond" truecount="2" falsecount="0"/>
|
|
4127
|
+
<line num="209" count="5" type="cond" truecount="1" falsecount="1"/>
|
|
4128
|
+
<line num="213" count="5" type="stmt"/>
|
|
4129
|
+
<line num="214" count="5" type="stmt"/>
|
|
4130
|
+
<line num="216" count="1" type="stmt"/>
|
|
4131
|
+
<line num="218" count="6" type="stmt"/>
|
|
4132
|
+
<line num="222" count="21" type="stmt"/>
|
|
4133
|
+
<line num="223" count="21" type="cond" truecount="3" falsecount="1"/>
|
|
4134
|
+
<line num="224" count="0" type="stmt"/>
|
|
4135
|
+
<line num="226" count="21" type="cond" truecount="2" falsecount="0"/>
|
|
4136
|
+
<line num="227" count="21" type="cond" truecount="2" falsecount="0"/>
|
|
4137
|
+
<line num="228" count="21" type="stmt"/>
|
|
4138
|
+
<line num="229" count="2" type="cond" truecount="1" falsecount="1"/>
|
|
4139
|
+
<line num="230" count="2" type="stmt"/>
|
|
4140
|
+
<line num="233" count="21" type="cond" truecount="2" falsecount="0"/>
|
|
4141
|
+
<line num="235" count="16" type="stmt"/>
|
|
4142
|
+
<line num="236" count="16" type="stmt"/>
|
|
4143
|
+
<line num="238" count="6" type="cond" truecount="1" falsecount="1"/>
|
|
4144
|
+
<line num="239" count="0" type="stmt"/>
|
|
4145
|
+
<line num="242" count="6" type="stmt"/>
|
|
4146
4146
|
<line num="243" count="6" type="stmt"/>
|
|
4147
|
-
<line num="
|
|
4148
|
-
<line num="
|
|
4149
|
-
<line num="
|
|
4150
|
-
<line num="
|
|
4151
|
-
<line num="
|
|
4152
|
-
<line num="
|
|
4153
|
-
<line num="
|
|
4154
|
-
<line num="
|
|
4155
|
-
<line num="
|
|
4156
|
-
<line num="269" count="
|
|
4147
|
+
<line num="245" count="16" type="stmt"/>
|
|
4148
|
+
<line num="246" count="16" type="stmt"/>
|
|
4149
|
+
<line num="247" count="16" type="stmt"/>
|
|
4150
|
+
<line num="248" count="6" type="stmt"/>
|
|
4151
|
+
<line num="249" count="6" type="stmt"/>
|
|
4152
|
+
<line num="260" count="6" type="stmt"/>
|
|
4153
|
+
<line num="263" count="21" type="stmt"/>
|
|
4154
|
+
<line num="267" count="2" type="stmt"/>
|
|
4155
|
+
<line num="268" count="17" type="stmt"/>
|
|
4156
|
+
<line num="269" count="17" type="stmt"/>
|
|
4157
|
+
<line num="270" count="17" type="stmt"/>
|
|
4158
|
+
<line num="271" count="17" type="stmt"/>
|
|
4159
|
+
<line num="272" count="15" type="stmt"/>
|
|
4160
|
+
<line num="274" count="2" type="stmt"/>
|
|
4157
4161
|
</file>
|
|
4158
4162
|
<file name="utils.js" path="/home/runner/work/budibase/budibase/packages/server/src/threads/utils.js">
|
|
4159
4163
|
<metrics statements="36" coveredstatements="30" conditionals="15" coveredconditionals="10" methods="9" coveredmethods="8"/>
|