kempo 4.9.0 → 4.9.2

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 (201) hide show
  1. package/dist/admin/component-overrides.js +1 -1
  2. package/dist/admin/components/AddGroupControl.js +1 -1
  3. package/dist/admin/components/AdminTableControl.js +1 -1
  4. package/dist/admin/components/ClearExpiredSessionsControl.js +1 -1
  5. package/dist/admin/components/Dashboard.js +1 -1
  6. package/dist/admin/components/EmailTemplates.js +1 -1
  7. package/dist/admin/components/Emails.js +1 -1
  8. package/dist/admin/components/FragmentEditor.js +1 -1
  9. package/dist/admin/components/GlobalContentEditor.js +1 -1
  10. package/dist/admin/components/GroupDeleteSelected.js +1 -1
  11. package/dist/admin/components/GroupRemoveRecord.js +1 -1
  12. package/dist/admin/components/Menus.js +1 -1
  13. package/dist/admin/components/Monaco.js +1 -1
  14. package/dist/admin/components/PageEditor.js +1 -1
  15. package/dist/admin/components/TableRowDelete.js +1 -1
  16. package/dist/admin/components/TableRowLink.js +1 -1
  17. package/dist/admin/components/TemplateEditor.js +1 -1
  18. package/dist/admin/components/Updates.js +1 -1
  19. package/dist/admin/components/ValueEditor.js +1 -1
  20. package/dist/admin/components/dashboardLayout.js +1 -1
  21. package/dist/admin/components/settings/AdminSettings.js +1 -1
  22. package/dist/admin/components/settings/BooleanSetting.js +1 -1
  23. package/dist/admin/components/settings/JsonSetting.js +1 -1
  24. package/dist/admin/components/settings/NumberSetting.js +1 -1
  25. package/dist/admin/components/settings/SecretSetting.js +1 -1
  26. package/dist/admin/components/settings/Setting.js +1 -1
  27. package/dist/admin/components/settings/SettingEditor.js +1 -1
  28. package/dist/admin/components/settings/SettingsPanel.js +1 -1
  29. package/dist/admin/components/settings/StringSetting.js +1 -1
  30. package/dist/admin/components/settings/humanize.js +1 -1
  31. package/dist/admin/components/tableControls/AddMember.js +1 -1
  32. package/dist/admin/components/tableControls/AddPermission.js +1 -1
  33. package/dist/admin/components/tableControls/ExtensionDetails.js +1 -1
  34. package/dist/admin/components/tableControls/InstallExtension.js +1 -1
  35. package/dist/admin/components/tableControls/ToggleExtension.js +1 -1
  36. package/dist/admin/components/tableControls/UninstallExtension.js +1 -1
  37. package/dist/admin/components/widgets/Content.js +1 -1
  38. package/dist/admin/components/widgets/Extensions.js +1 -1
  39. package/dist/admin/components/widgets/Notifications.js +1 -1
  40. package/dist/admin/components/widgets/Pages.js +1 -1
  41. package/dist/admin/components/widgets/Users.js +1 -1
  42. package/dist/admin/init.js +1 -1
  43. package/dist/admin/updates/index.page.html +1 -1
  44. package/dist/kempo/api/admin-globals/DELETE.js +1 -1
  45. package/dist/kempo/api/admin-globals/GET.js +1 -1
  46. package/dist/kempo/api/admin-globals/POST.js +1 -1
  47. package/dist/kempo/api/admin-globals/[id]/GET.js +1 -1
  48. package/dist/kempo/api/admin-globals/[id]/PUT.js +1 -1
  49. package/dist/kempo/api/admin-globals/[id]/disable/PUT.js +1 -1
  50. package/dist/kempo/api/admin-globals/[id]/enable/PUT.js +1 -1
  51. package/dist/kempo/api/auth/change-password/POST.js +1 -1
  52. package/dist/kempo/api/auth/login/email/POST.js +1 -1
  53. package/dist/kempo/api/auth/logout/POST.js +1 -1
  54. package/dist/kempo/api/auth/register/email/POST.js +1 -1
  55. package/dist/kempo/api/auth/reset-password/POST.js +1 -1
  56. package/dist/kempo/api/auth/session/GET.js +1 -1
  57. package/dist/kempo/api/auth/verify-email/POST.js +1 -1
  58. package/dist/kempo/api/dashboard/widgets/GET.js +1 -1
  59. package/dist/kempo/api/email-templates/GET.js +1 -1
  60. package/dist/kempo/api/email-templates/file/DELETE.js +1 -1
  61. package/dist/kempo/api/email-templates/file/GET.js +1 -1
  62. package/dist/kempo/api/email-templates/file/PUT.js +1 -1
  63. package/dist/kempo/api/email-templates/preview/GET.js +1 -1
  64. package/dist/kempo/api/emails/GET.js +1 -1
  65. package/dist/kempo/api/emails/[id]/GET.js +1 -1
  66. package/dist/kempo/api/emails/[id]/retry/POST.js +1 -1
  67. package/dist/kempo/api/emails/test/POST.js +1 -1
  68. package/dist/kempo/api/extensions/DELETE.js +1 -1
  69. package/dist/kempo/api/extensions/GET.js +1 -1
  70. package/dist/kempo/api/extensions/POST.js +1 -1
  71. package/dist/kempo/api/extensions/[name]/dependents/GET.js +1 -1
  72. package/dist/kempo/api/extensions/[name]/disable/POST.js +1 -1
  73. package/dist/kempo/api/extensions/[name]/enable/POST.js +1 -1
  74. package/dist/kempo/api/extensions/[name]/requirements/GET.js +1 -1
  75. package/dist/kempo/api/extensions/[name]/update/POST.js +1 -1
  76. package/dist/kempo/api/extensions/[name]/update-check/GET.js +1 -1
  77. package/dist/kempo/api/extensions/available/GET.js +1 -1
  78. package/dist/kempo/api/extensions/known/GET.js +1 -1
  79. package/dist/kempo/api/extensions/rating/PUT.js +1 -1
  80. package/dist/kempo/api/forgot-password/POST.js +1 -1
  81. package/dist/kempo/api/fragments/DELETE.js +1 -1
  82. package/dist/kempo/api/fragments/GET.js +1 -1
  83. package/dist/kempo/api/fragments/POST.js +1 -1
  84. package/dist/kempo/api/fragments/disable/PUT.js +1 -1
  85. package/dist/kempo/api/fragments/enable/PUT.js +1 -1
  86. package/dist/kempo/api/fragments/file/GET.js +1 -1
  87. package/dist/kempo/api/fragments/file/PATCH.js +1 -1
  88. package/dist/kempo/api/fragments/file/PUT.js +1 -1
  89. package/dist/kempo/api/fragments/lock/PUT.js +1 -1
  90. package/dist/kempo/api/globals/DELETE.js +1 -1
  91. package/dist/kempo/api/globals/GET.js +1 -1
  92. package/dist/kempo/api/globals/POST.js +1 -1
  93. package/dist/kempo/api/globals/disable/PUT.js +1 -1
  94. package/dist/kempo/api/globals/enable/PUT.js +1 -1
  95. package/dist/kempo/api/globals/entry/GET.js +1 -1
  96. package/dist/kempo/api/globals/entry/PUT.js +1 -1
  97. package/dist/kempo/api/globals/lock/PUT.js +1 -1
  98. package/dist/kempo/api/groups/DELETE.js +1 -1
  99. package/dist/kempo/api/groups/GET.js +1 -1
  100. package/dist/kempo/api/groups/PATCH.js +1 -1
  101. package/dist/kempo/api/groups/POST.js +1 -1
  102. package/dist/kempo/api/groups/[name]/GET.js +1 -1
  103. package/dist/kempo/api/groups/[name]/members/DELETE.js +1 -1
  104. package/dist/kempo/api/groups/[name]/members/GET.js +1 -1
  105. package/dist/kempo/api/groups/[name]/members/POST.js +1 -1
  106. package/dist/kempo/api/groups/[name]/permissions/DELETE.js +1 -1
  107. package/dist/kempo/api/groups/[name]/permissions/GET.js +1 -1
  108. package/dist/kempo/api/groups/[name]/permissions/POST.js +1 -1
  109. package/dist/kempo/api/menus/DELETE.js +1 -1
  110. package/dist/kempo/api/menus/GET.js +1 -1
  111. package/dist/kempo/api/menus/POST.js +1 -1
  112. package/dist/kempo/api/menus/adopt/PUT.js +1 -1
  113. package/dist/kempo/api/menus/items/DELETE.js +1 -1
  114. package/dist/kempo/api/menus/items/POST.js +1 -1
  115. package/dist/kempo/api/menus/items/enabled/PUT.js +1 -1
  116. package/dist/kempo/api/menus/items/order/PUT.js +1 -1
  117. package/dist/kempo/api/menus/location/PUT.js +1 -1
  118. package/dist/kempo/api/notifications/GET.js +1 -1
  119. package/dist/kempo/api/notifications/[id]/DELETE.js +1 -1
  120. package/dist/kempo/api/notifications/[id]/handled/POST.js +1 -1
  121. package/dist/kempo/api/notifications/[id]/read/POST.js +1 -1
  122. package/dist/kempo/api/notifications/count/GET.js +1 -1
  123. package/dist/kempo/api/notifications/read-all/POST.js +1 -1
  124. package/dist/kempo/api/pages/DELETE.js +1 -1
  125. package/dist/kempo/api/pages/GET.js +1 -1
  126. package/dist/kempo/api/pages/POST.js +1 -1
  127. package/dist/kempo/api/pages/directories/GET.js +1 -1
  128. package/dist/kempo/api/pages/disable/PUT.js +1 -1
  129. package/dist/kempo/api/pages/enable/PUT.js +1 -1
  130. package/dist/kempo/api/pages/file/GET.js +1 -1
  131. package/dist/kempo/api/pages/file/PATCH.js +1 -1
  132. package/dist/kempo/api/pages/file/PUT.js +1 -1
  133. package/dist/kempo/api/pages/lock/PUT.js +1 -1
  134. package/dist/kempo/api/pages/rescan/POST.js +1 -1
  135. package/dist/kempo/api/pages/search/GET.js +1 -1
  136. package/dist/kempo/api/pages/templates/GET.js +1 -1
  137. package/dist/kempo/api/permissions/DELETE.js +1 -1
  138. package/dist/kempo/api/permissions/GET.js +1 -1
  139. package/dist/kempo/api/permissions/PATCH.js +1 -1
  140. package/dist/kempo/api/permissions/POST.js +1 -1
  141. package/dist/kempo/api/realtime/WS.js +1 -1
  142. package/dist/kempo/api/realtime/connections/GET.js +1 -1
  143. package/dist/kempo/api/settings/[owner]/GET.js +1 -1
  144. package/dist/kempo/api/settings/[owner]/[name]/DELETE.js +1 -1
  145. package/dist/kempo/api/settings/[owner]/[name]/GET.js +1 -1
  146. package/dist/kempo/api/settings/[owner]/[name]/POST.js +1 -1
  147. package/dist/kempo/api/settings/public/GET.js +1 -1
  148. package/dist/kempo/api/templates/DELETE.js +1 -1
  149. package/dist/kempo/api/templates/GET.js +1 -1
  150. package/dist/kempo/api/templates/POST.js +1 -1
  151. package/dist/kempo/api/templates/disable/PUT.js +1 -1
  152. package/dist/kempo/api/templates/enable/PUT.js +1 -1
  153. package/dist/kempo/api/templates/file/GET.js +1 -1
  154. package/dist/kempo/api/templates/file/PATCH.js +1 -1
  155. package/dist/kempo/api/templates/file/PUT.js +1 -1
  156. package/dist/kempo/api/templates/lock/PUT.js +1 -1
  157. package/dist/kempo/api/updates/GET.js +1 -1
  158. package/dist/kempo/api/updates/apply/POST.js +1 -1
  159. package/dist/kempo/api/updates/check/POST.js +1 -1
  160. package/dist/kempo/api/updates/discard/POST.js +1 -1
  161. package/dist/kempo/api/updates/prepare/POST.js +1 -1
  162. package/dist/kempo/api/updates/rollback/POST.js +1 -1
  163. package/dist/kempo/api/user/DELETE.js +1 -1
  164. package/dist/kempo/api/user/GET.js +1 -1
  165. package/dist/kempo/api/user/PATCH.js +1 -1
  166. package/dist/kempo/api/user/[userid]/GET.js +1 -1
  167. package/dist/kempo/api/user/[userid]/groups/DELETE.js +1 -1
  168. package/dist/kempo/api/user/[userid]/groups/GET.js +1 -1
  169. package/dist/kempo/api/user/[userid]/groups/POST.js +1 -1
  170. package/dist/kempo/api/user/[userid]/name/GET.js +1 -1
  171. package/dist/kempo/api/user/[userid]/permissions/GET.js +1 -1
  172. package/dist/kempo/api/user/[userid]/permissions/all/GET.js +1 -1
  173. package/dist/kempo/api/user/[userid]/permissions/list/GET.js +1 -1
  174. package/dist/kempo/api/user/[userid]/permissions/some/GET.js +1 -1
  175. package/dist/kempo/api/user/[userid]/sessions/DELETE.js +1 -1
  176. package/dist/kempo/api/user/[userid]/sessions/GET.js +1 -1
  177. package/dist/kempo/api/user/[userid]/sessions/expired/DELETE.js +1 -1
  178. package/dist/kempo/api/user/create/POST.js +1 -1
  179. package/dist/kempo/api/user/search/GET.js +1 -1
  180. package/dist/kempo/components/AdminNavFooter.js +1 -1
  181. package/dist/kempo/components/DashboardWidget.js +1 -1
  182. package/dist/kempo/components/Login.js +1 -1
  183. package/dist/kempo/components/LogoutBtn.js +1 -1
  184. package/dist/kempo/components/Menu.js +1 -1
  185. package/dist/kempo/components/NotificationBell.js +1 -1
  186. package/dist/kempo/components/NotificationList.js +1 -1
  187. package/dist/kempo/components/Permission.js +1 -1
  188. package/dist/kempo/components/PermissionTarget.js +1 -1
  189. package/dist/kempo/components/Register.js +1 -1
  190. package/dist/kempo/components/Role.js +1 -1
  191. package/dist/kempo/components/UserCreatedAt.js +1 -1
  192. package/dist/kempo/components/UserDisplayName.js +1 -1
  193. package/dist/kempo/components/UserEmail.js +1 -1
  194. package/dist/kempo/components/UserEmailVerified.js +1 -1
  195. package/dist/kempo/components/UserName.js +1 -1
  196. package/dist/kempo/fetch.js +1 -1
  197. package/dist/kempo/realtime.js +1 -1
  198. package/dist/kempo/sdk.js +1 -1
  199. package/dist/kempo/utils/safeNext.js +1 -1
  200. package/docker/entrypoint.mjs +1 -1
  201. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
1
  export const registerComponentOverride=(e,o)=>{window.kempo=window.kempo||{},window.kempo.componentOverrides=window.kempo.componentOverrides||{},window.kempo.componentOverrides[e]=o};export const getComponentOverride=(e,o)=>window.kempo?.componentOverrides?.[e]||o;
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\component-overrides.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\component-overrides.js.map
@@ -1,2 +1,2 @@
1
1
  import t from"./AdminTableControl.js";import{html as e}from"/kempo-ui/lit-all.min.js";import"/kempo-ui/components/Icon.js";export default class o extends t{connectedCallback(){super.connectedCallback(),this.hasAttribute("title")||(this.title="Add to Group")}render(){return e`<k-icon name="add"></k-icon>`}}customElements.define("admin-add-group-control",o);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\AddGroupControl.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\AddGroupControl.js.map
@@ -1,2 +1,2 @@
1
1
  import t from"/kempo-ui/components/controls/ButtonControl.js";export default class o extends t{get table(){return this.host}get record(){const t=this.closest(".record"),o=t?.dataset?.index;return void 0===o?null:this.host?.records?.[o]??null}}
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\AdminTableControl.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\AdminTableControl.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"./AdminTableControl.js";import{html as t}from"/kempo-ui/lit-all.min.js";import"/kempo-ui/components/Icon.js";export default class i extends e{connectedCallback(){super.connectedCallback(),this.hasAttribute("title")||(this.title="Clear Expired Sessions")}render(){return t`<k-icon name="timer_off"></k-icon>`}}customElements.define("admin-clear-expired-sessions",i);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\ClearExpiredSessionsControl.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\ClearExpiredSessionsControl.js.map
@@ -64,4 +64,4 @@ import t from"/kempo-ui/components/LightComponent.js";import{html as e,nothing a
64
64
  </div>
65
65
  ${this.renderCustomizeDialog()}
66
66
  `}}customElements.define("k-dashboard",p);
67
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\Dashboard.js.map
67
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\Dashboard.js.map
@@ -22,4 +22,4 @@ import t from"/kempo-ui/components/ShadowComponent.js";import{html as e,nothing
22
22
  </table>
23
23
  ${this.renderDialog()}
24
24
  `:e`<p class="tc-muted">There are no email templates here.</p>`:e`<k-spinner></k-spinner>`}}customElements.define("k-email-templates",l);
25
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\EmailTemplates.js.map
25
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\EmailTemplates.js.map
@@ -46,4 +46,4 @@ import t from"/kempo-ui/components/ShadowComponent.js";import{html as s,nothing
46
46
  ${this.renderDetail()}
47
47
  ${this.renderTest()}
48
48
  `}}customElements.define("k-admin-emails",d);
49
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\Emails.js.map
49
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\Emails.js.map
@@ -98,4 +98,4 @@ import e from"/kempo-ui/components/ShadowComponent.js";import{html as t}from"/ke
98
98
  </k-accordion-panel>
99
99
  </k-accordion>
100
100
  `}}customElements.define("admin-fragment-editor",d);
101
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\FragmentEditor.js.map
101
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\FragmentEditor.js.map
@@ -82,4 +82,4 @@ import e from"/kempo-ui/components/ShadowComponent.js";import{html as t}from"/ke
82
82
  </k-accordion-panel>
83
83
  </k-accordion>
84
84
  `}}customElements.define("admin-global-content-editor",r);
85
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\GlobalContentEditor.js.map
85
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\GlobalContentEditor.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"./AdminTableControl.js";import{html as t}from"/kempo-ui/lit-all.min.js";import"/kempo-ui/components/Icon.js";export default class s extends e{static hostEvents=["selectionChange"];connectedCallback(){super.connectedCallback(),this.hasAttribute("title")||(this.title="Remove Selected")}get deletableCount(){return this.table?this.table.getSelectedRecords().filter(e=>"system:Users"!==e.name).length:0}willUpdate(){this.disabled=0===this.deletableCount}handleAction(){if(!this.table)return;const e=this.table.getSelectedRecords(),t=e.filter(e=>"system:Users"!==e.name);t.length&&this.dispatchEvent(new CustomEvent("groupRemoveSelected",{detail:{records:t,systemUsersSkipped:e.some(e=>"system:Users"===e.name)},bubbles:!0}))}render(){return t`<k-icon name="delete"></k-icon>`}}customElements.define("admin-group-delete-selected",s);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\GroupDeleteSelected.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\GroupDeleteSelected.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"./AdminTableControl.js";import{html as t}from"/kempo-ui/lit-all.min.js";import"/kempo-ui/components/Icon.js";export default class o extends e{connectedCallback(){super.connectedCallback(),this.hasAttribute("title")||(this.title="Remove from Group")}handleAction(){this.record&&"system:Users"!==this.record.name&&this.table.deleteRecord(this.record)}render(){return"system:Users"===this.record?.name?t``:t`<k-icon name="delete"></k-icon>`}}customElements.define("admin-group-remove-record",o);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\GroupRemoveRecord.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\GroupRemoveRecord.js.map
@@ -100,4 +100,4 @@ import e from"/kempo-ui/components/ShadowComponent.js";import{html as t,nothing
100
100
  <p class="tc-muted">Mark a place in your navigation, for example <code>&lt;location name="main-nav-links" label="Main menu" menu="true" /&gt;</code> in your navigation fragment, and it will be listed here.</p>
101
101
  `}
102
102
  `}}customElements.define("admin-menus",b);
103
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\Menus.js.map
103
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\Menus.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"/kempo-ui/components/LightComponent.js";import{html as t}from"/kempo-ui/lit-all.min.js";let i=null;export default class n extends e{static get properties(){return{language:{type:String},readOnly:{type:Boolean,attribute:"readonly"},height:{type:String}}}#e=null;#t=!1;#i="";constructor(){super(),this.language="json",this.readOnly=!1,this.height="400px"}get value(){return this.#e?this.#e.getValue():this.#i}set value(e){this.#e?this.#e.getValue()!==e&&this.#e.setValue(e):this.#i=e}updated(e){super.updated(e),this.#e||this.#t||(this.#t=!0,this.#n()),this.#e&&(e.has("readOnly")&&this.#e.updateOptions({readOnly:this.readOnly}),e.has("language")&&monaco.editor.setModelLanguage(this.#e.getModel(),this.language))}disconnectedCallback(){super.disconnectedCallback(),this.#e&&(this.#e.dispose(),this.#e=null)}#n=async()=>{await(i||(i=new Promise(e=>{if(window.monaco)return void e();const t=document.createElement("script");t.src="/monaco-editor/vs/loader.js",t.onload=()=>{require.config({paths:{vs:"/monaco-editor/vs"}}),require(["vs/editor/editor.main"],()=>e())},document.head.appendChild(t)}),i));const e=this.querySelector("[data-monaco-container]");if(!e)return;const t="dark"===document.documentElement.getAttribute("theme")||"auto"===document.documentElement.getAttribute("theme")&&window.matchMedia("(prefers-color-scheme: dark)").matches;this.#e=monaco.editor.create(e,{value:this.#i,language:this.language,minimap:{enabled:!1},automaticLayout:!0,theme:t?"vs-dark":"vs",scrollBeyondLastLine:!1,fontSize:14,tabSize:2,readOnly:this.readOnly}),this.#e.onDidChangeModelContent(()=>{this.dispatchEvent(new Event("change"))})};renderLightDom(){return t`<div data-monaco-container style="height: ${this.height}; border: 1px solid var(--c_border); border-radius: var(--radius);"></div>`}}customElements.define("admin-monaco",n);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\Monaco.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\Monaco.js.map
@@ -149,4 +149,4 @@ import e from"/kempo-ui/components/ShadowComponent.js";import{html as t,repeat a
149
149
  `})}
150
150
  </k-accordion>
151
151
  `}}customElements.define("admin-page-editor",v);
152
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\PageEditor.js.map
152
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\PageEditor.js.map
@@ -1,2 +1,2 @@
1
1
  import{html as e}from"/kempo-ui/lit-all.min.js";import t from"./AdminTableControl.js";import o from"/kempo-ui/components/Dialog.js";import r from"/kempo-ui/components/Toast.js";import"/kempo-ui/components/Icon.js";export default class i extends t{static properties={sdkMethod:{type:String,attribute:"sdk-method"},primaryKey:{type:String,attribute:"primary-key"}};constructor(){super(),this.sdkMethod="deleteUsers",this.idField="id"}connectedCallback(){super.connectedCallback(),this.hasAttribute("title")||(this.title="Delete Record")}delete=()=>{this.record&&o.confirm("Are you sure you want to delete this record? This action cannot be undone.",async e=>{if(!e)return;const t=(await(import("../../kempo/sdk.js")))[this.sdkMethod];if(!t)return void r.error("Delete method not found");const[o]=await t([this.record[this.primaryKey]]);o?r.error(o.msg||"Failed to delete record"):(this.table.deleteRecord(this.record),r.success("Record deleted successfully"))})};handleAction(){this.delete()}render(){return e`<slot><k-icon name="delete"></k-icon></slot>`}}customElements.define("admin-table-row-delete",i);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\TableRowDelete.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\TableRowDelete.js.map
@@ -1,2 +1,2 @@
1
1
  import t from"./AdminTableControl.js";import{html as e}from"/kempo-ui/lit-all.min.js";import"/kempo-ui/components/Icon.js";export default class i extends t{static properties={urlPattern:{type:String,attribute:"url-pattern"},fieldName:{type:String,attribute:"field-name"}};constructor(){super(),this.fieldName="id"}connectedCallback(){super.connectedCallback(),this.hasAttribute("title")||(this.title="View")}handleAction(){if(!this.record)return;const t=this.record[this.fieldName];t&&(window.location.href=this.urlPattern.replace(`{${this.fieldName}}`,t))}render(){return e`<slot><k-icon name="visibility"></k-icon></slot>`}}customElements.define("admin-table-row-link",i);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\TableRowLink.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\TableRowLink.js.map
@@ -122,4 +122,4 @@ import e from"/kempo-ui/components/ShadowComponent.js";import{html as t}from"/ke
122
122
  </k-accordion-panel>
123
123
  </k-accordion>
124
124
  `}}customElements.define("admin-template-editor",c);
125
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\TemplateEditor.js.map
125
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\TemplateEditor.js.map
@@ -114,4 +114,4 @@ import e from"/kempo-ui/components/ShadowComponent.js";import{html as t,nothing
114
114
  `:s}
115
115
  ${this.renderDialog(e)}
116
116
  `}}customElements.define("k-admin-updates",u);
117
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\Updates.js.map
117
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\Updates.js.map
@@ -37,4 +37,4 @@ import t from"/kempo-ui/components/ShadowComponent.js";import{html as e,nothing
37
37
  @change="${this.#h}"
38
38
  .value="${String(this.#t)}"
39
39
  ></textarea>`}}customElements.define("admin-value-editor",n);
40
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\ValueEditor.js.map
40
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\ValueEditor.js.map
@@ -1,2 +1,2 @@
1
1
  export const STORAGE_KEY="kempo:admin:dashboard";const e=(e,t,i,r)=>Number.isInteger(e)?Math.min(Math.max(e,t),i):r;export const resolveLayout=(t,i)=>{const r=new Map(t.map(e=>[e.id,e])),d=i&&"object"==typeof i?i:{},s=(Array.isArray(d.order)?d.order:[]).filter((e,t,i)=>r.has(e)&&i.indexOf(e)===t),o=new Set(s),a=new Set(Array.isArray(d.hidden)?d.hidden:[]),n=d.sizes&&"object"==typeof d.sizes?d.sizes:{};return[...s,...t.map(e=>e.id).filter(e=>!o.has(e))].map(t=>{const i=r.get(t),d=n[t]&&"object"==typeof n[t]?n[t]:{};return{widget:i,visible:o.has(t)?!a.has(t):!1!==i.defaultVisible,width:e(d.width,i.minWidth,i.maxWidth,i.defaultWidth),height:e(d.height,i.minHeight,i.maxHeight,i.defaultHeight)}})};export const serializeLayout=(e,{stored:t,unavailable:i=[]}={})=>{const r=e.map(({widget:e})=>e.id),d=e.filter(({visible:e})=>!e).map(({widget:e})=>e.id),s=Object.fromEntries(e.filter(({widget:e,width:t,height:i})=>t!==e.defaultWidth||i!==e.defaultHeight).map(({widget:e,width:t,height:i})=>[e.id,{width:t,height:i}])),o=t&&"object"==typeof t?t:{},a=Array.isArray(o.order)?o.order:[],n=new Set(i);return a.forEach((e,t)=>{if(!n.has(e)||r.includes(e))return;const i=a.slice(0,t).reverse().find(e=>r.includes(e));r.splice(void 0===i?0:r.indexOf(i)+1,0,e),Array.isArray(o.hidden)&&o.hidden.includes(e)&&d.push(e),o.sizes?.[e]&&(s[e]=o.sizes[e])}),{order:r,hidden:d,sizes:s}};export const reorder=(e,t)=>{const i=e=>-1===t.indexOf(e)?t.length:t.indexOf(e);return e.slice().sort((e,t)=>i(e.widget.id)-i(t.widget.id))};export const readStored=()=>{try{return JSON.parse(localStorage.getItem(STORAGE_KEY))}catch{return null}};export const writeStored=e=>{try{localStorage.setItem(STORAGE_KEY,JSON.stringify(e))}catch{}};export const clearStored=()=>{try{localStorage.removeItem(STORAGE_KEY)}catch{}};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\dashboardLayout.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\dashboardLayout.js.map
@@ -4,4 +4,4 @@ import t from"/kempo-ui/components/ShadowComponent.js";import{html as e}from"/ke
4
4
  ${t.map(t=>e`<k-tab-content name=${t.id} class="pt">${t.extension?e`<slot name=${t.slotName}></slot>`:t.content()}</k-tab-content>`)}
5
5
  </k-tabs>
6
6
  `}}customElements.define("k-admin-settings",n);
7
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\settings\AdminSettings.js.map
7
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\settings\AdminSettings.js.map
@@ -1,2 +1,2 @@
1
1
  import{html as e}from"/kempo-ui/lit-all.min.js";import"/kempo-ui/components/Toggle.js";import t from"./SettingEditor.js";export default class i extends t{render(){return e`<div class="mb"><k-toggle ?disabled=${this.disabled} .value=${!0===this.value||"true"===this.value} @change=${e=>this.announce(!0===e.target.value)}>${this.heading}</k-toggle>${this.renderHint()}</div>`}}customElements.define("k-setting-boolean",i);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\settings\BooleanSetting.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\settings\BooleanSetting.js.map
@@ -1,2 +1,2 @@
1
1
  import{html as t}from"/kempo-ui/lit-all.min.js";import e from"./SettingEditor.js";export default class i extends e{text="";willUpdate(t){if(!t.has("value"))return;let e;try{e=JSON.parse(this.text)}catch{e=void 0}void 0!==e&&JSON.stringify(e)===JSON.stringify(this.value)||(this.text=JSON.stringify(this.value??null,null,2))}change=t=>{this.text=t.target.value;try{this.announce(JSON.parse(this.text))}catch{this.announce(this.value,"That is not valid JSON")}};renderControl(){return t`<textarea class="ff-mono" rows="8" ?disabled=${this.disabled} .value=${this.text} @input=${this.change}></textarea>`}}customElements.define("k-setting-json",i);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\settings\JsonSetting.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\settings\JsonSetting.js.map
@@ -1,2 +1,2 @@
1
1
  import{html as e}from"/kempo-ui/lit-all.min.js";import t from"./SettingEditor.js";export default class n extends t{change=e=>{const t=e.target.value,n=Number(t);""!==t.trim()&&Number.isFinite(n)?this.announce(n):this.announce(this.value,"Enter a number")};renderControl(){return e`<input type="number" step="any" ?disabled=${this.disabled} .value=${String(this.value??0)} @input=${this.change}>`}}customElements.define("k-setting-number",n);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\settings\NumberSetting.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\settings\NumberSetting.js.map
@@ -1,2 +1,2 @@
1
1
  import{html as e}from"/kempo-ui/lit-all.min.js";import t from"./SettingEditor.js";export default class s extends t{static properties={...t.properties,saved:{type:Boolean}};constructor(){super(),this.saved=!0,this.value=""}renderHint(){return e`${super.renderHint()}<small class="tc-muted d-b">${this.saved?"A value is saved. It is stored encrypted and never shown. Type a new one to replace it.":"Not set yet. It is stored encrypted and never shown again."}</small>`}renderControl(){return e`<input type="password" autocomplete="new-password" ?disabled=${this.disabled} .value=${this.value??""} @input=${e=>this.announce(e.target.value)}>`}}customElements.define("k-setting-secret",s);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\settings\SecretSetting.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\settings\SecretSetting.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"/kempo-ui/components/ShadowComponent.js";import{html as t}from"/kempo-ui/lit-all.min.js";import"./StringSetting.js";import"./NumberSetting.js";import"./BooleanSetting.js";import"./JsonSetting.js";import"./SecretSetting.js";export default class s extends e{static properties={setting:{attribute:!1},disabled:{type:Boolean}};constructor(){super(),this.setting=null,this.disabled=!1}render(){const{name:e,value:s,type:i,description:n}=this.setting??{};if(!e)return null;switch(i){case"number":return t`<k-setting-number name=${e} description=${n??""} ?disabled=${this.disabled} .value=${s}></k-setting-number>`;case"boolean":return t`<k-setting-boolean name=${e} description=${n??""} ?disabled=${this.disabled} .value=${s}></k-setting-boolean>`;case"json":return t`<k-setting-json name=${e} description=${n??""} ?disabled=${this.disabled} .value=${s}></k-setting-json>`;case"secret":return t`<k-setting-secret name=${e} description=${n??""} ?disabled=${this.disabled} .saved=${null!=s} .value=${""}></k-setting-secret>`;default:return t`<k-setting-string name=${e} description=${n??""} ?disabled=${this.disabled} .value=${s??""}></k-setting-string>`}}}customElements.define("k-setting",s);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\settings\Setting.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\settings\Setting.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"/kempo-ui/components/ShadowComponent.js";import{html as t,nothing as r}from"/kempo-ui/lit-all.min.js";import s from"./humanize.js";export default class i extends e{static properties={name:{type:String},label:{type:String},description:{type:String},value:{attribute:!1},disabled:{type:Boolean},problem:{state:!0}};constructor(){super(),this.name="",this.label="",this.description="",this.value="",this.disabled=!1,this.problem=""}get heading(){return this.label||s(this.name)}announce=(e,t="")=>{this.problem=t,this.dispatchEvent(new CustomEvent("setting-change",{detail:{name:this.name,value:e,valid:!t},bubbles:!0,composed:!0}))};renderControl(){return r}renderHint(){return this.description?t`<small class="tc-muted d-b">${this.description}</small>`:r}renderProblem(){return this.problem?t`<small class="tc-danger d-b" role="alert">${this.problem}</small>`:r}render(){return t`<label class="mb d-b">${this.heading}${this.renderHint()}${this.renderControl()}</label>${this.renderProblem()}`}}
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\settings\SettingEditor.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\settings\SettingEditor.js.map
@@ -21,4 +21,4 @@ import e from"/kempo-ui/components/ShadowComponent.js";import{html as t,nothing
21
21
  ${this.settings.length?this.settings.map(e=>this.renderSetting(e)):t`<p class="tc-muted mb">${"custom"===this.owner?"There are no custom settings yet.":"There are no settings here."}</p>`}
22
22
  ${this.canEdit&&this.settings.length?t`<button class="primary" ?disabled=${!this.dirty||this.blocked||this.busy} @click=${this.save}>${this.busy?"Saving…":"Save settings"}</button>`:s}
23
23
  `}firstUpdated(){this.renderRoot.addEventListener("setting-change",this.record)}}customElements.define("k-settings-panel",p);
24
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\settings\SettingsPanel.js.map
24
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\settings\SettingsPanel.js.map
@@ -1,2 +1,2 @@
1
1
  import{html as t}from"/kempo-ui/lit-all.min.js";import e from"./SettingEditor.js";export default class i extends e{renderControl(){const e=String(this.value??"");return e.length>120||e.includes("\n")?t`<textarea rows="4" ?disabled=${this.disabled} .value=${e} @input=${t=>this.announce(t.target.value)}></textarea>`:t`<input type="text" ?disabled=${this.disabled} .value=${e} @input=${t=>this.announce(t.target.value)}>`}}customElements.define("k-setting-string",i);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\settings\StringSetting.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\settings\StringSetting.js.map
@@ -1,2 +1,2 @@
1
1
  const s=new Set(["api","css","html","id","ip","js","json","seo","smtp","sms","sql","ssl","tls","ui","uri","url","utc","uuid","xml"]);export default e=>String(e??"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[\s_\-.:]+/).filter(Boolean).map(e=>s.has(e.toLowerCase())?e.toUpperCase():e[0].toUpperCase()+e.slice(1)).join(" ");
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\settings\humanize.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\settings\humanize.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"../AdminTableControl.js";import{html as t}from"/kempo-ui/lit-all.min.js";import o from"/kempo-ui/components/Dialog.js";import s from"/kempo-ui/components/Toast.js";import"/kempo-ui/components/Icon.js";import"/kempo-ui/components/Combobox.js";import"/kempo-ui/components/Spinner.js";export default class m extends e{groupName="";addMember=()=>{let e=null;const t=document.createElement("k-combobox");t.setAttribute("placeholder","Search users..."),t.setAttribute("debounce-ms","350"),t.setAttribute("require-match",""),t.addEventListener("search",async e=>{t.searching=!0;const{searchUsers:o}=await(import("/kempo/sdk.js")),[s,m]=await o({q:e.detail.value,notInGroup:this.groupName,limit:20});t.searching=!1,!s&&m&&t.setOptions(m.users.map(e=>({label:`${e.name} (${e.email})`,value:e.id})))}),t.addEventListener("select",t=>{e=t.detail.value});const m=document.createElement("div");m.className="p",m.appendChild(t),o.create(m,{title:"Add Member",confirmText:"Add",confirmAction:async()=>{if(!e)return;const{addMemberToGroup:t}=await(import("/kempo/sdk.js")),[o]=await t(this.groupName,e);o?s.error(o.msg||"Failed to add member"):(s.success("Member added"),this.dispatchEvent(new CustomEvent("memberAdded",{bubbles:!0,composed:!0})))},cancelText:"Cancel"})};connectedCallback(){super.connectedCallback(),this.hasAttribute("title")||(this.title="Add Member")}handleAction(){this.addMember()}render(){return t`<k-icon name="person_add"></k-icon>`}}customElements.define("admin-add-member",m);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\tableControls\AddMember.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\tableControls\AddMember.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"../AdminTableControl.js";import{html as o}from"/kempo-ui/lit-all.min.js";import s from"/kempo-ui/components/Dialog.js";import i from"/kempo-ui/components/Toast.js";import"/kempo-ui/components/Icon.js";import"/kempo-ui/components/Combobox.js";export default class t extends e{groupName="";addPermission=async()=>{const{listPermissions:e,getGroupPermissions:o,addPermissionToGroup:t}=await(import("/kempo/sdk.js")),[[n,r],[m,a]]=await Promise.all([e({limit:1e3}),o(this.groupName)]);if(n)return void i.error(n.msg||"Failed to load permissions");if(m)return void i.error(m.msg||"Failed to load group permissions");const d=new Set(a.permissions),l=r.permissions.filter(e=>!d.has(e.name));let c=null;const p=document.createElement("k-combobox");p.setAttribute("placeholder","Search permissions..."),p.setAttribute("require-match",""),p.setOptions(l.map(e=>({label:e.name,value:e.name}))),p.addEventListener("select",e=>{c=e.detail.value});const u=document.createElement("div");u.className="p",u.appendChild(p),s.create(u,{title:"Add Permission",confirmText:"Add",confirmAction:async()=>{if(!c)return;const[e]=await t(this.groupName,c);e?i.error(e.msg||"Failed to add permission"):(i.success("Permission added"),this.dispatchEvent(new CustomEvent("permissionAdded",{bubbles:!0,composed:!0})))},cancelText:"Cancel"})};connectedCallback(){super.connectedCallback(),this.hasAttribute("title")||(this.title="Add Permission")}handleAction(){this.addPermission()}render(){return o`<k-icon name="lock_add"></k-icon>`}}customElements.define("admin-add-permission",t);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\tableControls\AddPermission.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\tableControls\AddPermission.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"../AdminTableControl.js";import{html as n}from"/kempo-ui/lit-all.min.js";import"/kempo-ui/components/Icon.js";export default class t extends e{connectedCallback(){super.connectedCallback(),this.hasAttribute("title")||(this.title="View in Store")}handleAction(){this.record&&(window.location.href=`/admin/extensions/details/?name=${encodeURIComponent(this.record.name)}`)}render(){return n`<k-icon name="storefront"></k-icon>`}}customElements.define("admin-extension-details",t);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\tableControls\ExtensionDetails.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\tableControls\ExtensionDetails.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"../AdminTableControl.js";import{html as t}from"/kempo-ui/lit-all.min.js";import n from"/kempo-ui/components/Dialog.js";import s from"/kempo-ui/components/Toast.js";import"/kempo-ui/components/Icon.js";export default class o extends e{install=async()=>{this.record&&n.confirm(`Install "${this.record.name}"?`,async e=>{if(!e)return;const{installExtension:t}=await(import("/kempo/sdk.js")),[n]=await t(this.record.name);n?s.error(n.msg||"Failed to install extension"):(s.success(`"${this.record.name}" installed successfully`),this.table.deleteRecord(this.record))})};connectedCallback(){super.connectedCallback(),this.hasAttribute("title")||(this.title="Install Extension")}handleAction(){this.install()}render(){return t`<k-icon name="extension_add"></k-icon>`}}customElements.define("admin-install-extension",o);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\tableControls\InstallExtension.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\tableControls\InstallExtension.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"../AdminTableControl.js";import{html as n}from"/kempo-ui/lit-all.min.js";import t from"/kempo-ui/components/Dialog.js";import s from"/kempo-ui/components/Toast.js";import"/kempo-ui/components/Icon.js";export default class i extends e{#e=({title:e,intro:n,items:s,confirmText:i,danger:a})=>{const o=document.createElement("div");o.className="p";const l=document.createElement("p");if(l.textContent=n,o.append(l),s.length){const e=document.createElement("ul");for(const n of s){const t=document.createElement("li");t.textContent=n,e.append(t)}o.append(e)}return new Promise(n=>{t.create(o,{title:e,closeBtn:!1,overlayClose:!1,confirmText:i,confirmClasses:a?"danger ml":"primary ml",cancelText:"Cancel",confirmAction:()=>n(!0),cancelAction:()=>n(!1)})})};#n=(e,n)=>{for(const t of e){const e=this.table.records.find(e=>e.name===t);e&&this.table.updateRecord(e,{enabled:n})}};#t=async(e,n)=>{const[t,i]=await n.getExtensionRequirements(e.name);if(t)return void s.error(t.msg||"Failed to check what this extension requires");if(i.missing.length)return void s.error(`"${e.name}" requires ${i.missing.join(", ")}, which ${1===i.missing.length?"is":"are"} not installed`);const a=i.disabled;if(a.length){if(!await this.#e({title:`Enable ${a.length+1} Extensions`,intro:`"${e.name}" cannot run without these, which are switched off. Enabling it also enables:`,items:a.map(e=>e.requires.length?`${e.name} (needs ${e.requires.join(", ")})`:e.name),confirmText:`Enable ${a.length+1} extensions`,danger:!1}))return}const[o,l]=await n.enableExtension(e.name,{cascade:!0});o?s.error(o.msg||"Failed to enable extension"):(this.#n(l.enabledNames,!0),s.success(l.enabledNames.length>1?`Enabled ${l.enabledNames.join(", ")}`:`"${e.name}" enabled`),this.requestUpdate())};#s=async(e,n)=>{const[t,i]=await n.getExtensionDependents(e.name);if(t)return void s.error(t.msg||"Failed to check what depends on this extension");const a=i.dependents;if(!await this.#e({title:a.length?`Disable ${a.length+1} Extensions`:"Disable Extension",intro:a.length?`Disabling "${e.name}" also disables everything that depends on it:`:`Disable "${e.name}"? It stays installed and keeps its data, but its pages, files, widgets and hooks stop being used until you enable it again.`,items:a.map(e=>`${e.name} (needs ${e.requires.join(", ")})`),confirmText:a.length?`Disable ${a.length+1} extensions`:"Disable",danger:!0}))return;const[o,l]=await n.disableExtension(e.name,{cascade:!0});o?s.error(o.msg||"Failed to disable extension"):(this.#n(l.disabled,!1),s.success(l.disabled.length>1?`Disabled ${l.disabled.join(", ")}`:`"${e.name}" disabled`),this.requestUpdate())};toggle=async()=>{const e=this.record;if(!e)return;const n=await(import("/kempo/sdk.js"));!1===e.enabled?await this.#t(e,n):await this.#s(e,n)};handleAction(){this.toggle()}render(){const e=!1===this.record?.enabled;return this.title=e?"Enable Extension":"Disable Extension",n`<k-icon name="${e?"play":"pause"}"></k-icon>`}}customElements.define("admin-toggle-extension",i);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\tableControls\ToggleExtension.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\tableControls\ToggleExtension.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"../AdminTableControl.js";import{html as n}from"/kempo-ui/lit-all.min.js";import t from"/kempo-ui/components/Dialog.js";import s from"/kempo-ui/components/Toast.js";import"/kempo-ui/components/Icon.js";export default class a extends e{uninstall=async()=>{const e=this.record;if(!e)return;const{uninstallExtension:n,getExtensionDependents:a}=await(import("/kempo/sdk.js")),[l,o]=await a(e.name,{includeDisabled:!0});if(l)return void s.error(l.msg||"Failed to check what depends on this extension");const i=o.dependents,c=i.length+1,d=document.createElement("div");d.className="p";const r=document.createElement("p");if(r.textContent=i.length?`Uninstalling "${e.name}" also uninstalls everything that depends on it:`:`Uninstall "${e.name}"?`,d.append(r),i.length){const e=document.createElement("ul");for(const n of i){const t=document.createElement("li");t.textContent=`${n.name} (needs ${n.requires.join(", ")})${n.enabled?"":" - disabled"}`,e.append(t)}d.append(e)}const m=document.createElement("p");m.className="tc-muted",m.textContent=c>1?"Their data is kept by default, so reinstalling restores everything.":"Its data is kept by default, so reinstalling restores everything.",d.append(m);const p=document.createElement("label");p.className="d-f";const u=document.createElement("input");u.type="checkbox",u.name="purge-data";const h=document.createElement("span");h.className="tc-danger",h.textContent=c>1?`Also permanently delete all of the data of these ${c} extensions`:"Also permanently delete all of its data",p.append(u,h),d.append(p),t.create(d,{title:c>1?`Uninstall ${c} Extensions`:"Uninstall Extension",closeBtn:!1,overlayClose:!1,confirmText:c>1?`Uninstall ${c} extensions`:"Uninstall",confirmClasses:"danger ml",cancelText:"Cancel",confirmAction:async()=>{const t=u.checked,[a,l]=await n(e.name,t,{cascade:!0});if(a)return void s.error(a.msg||"Failed to uninstall extension");for(const e of l.uninstalled){const n=this.table.records.find(n=>n.name===e);n&&this.table.deleteRecord(n)}const o=l.uninstalled.length>1,i=o?l.uninstalled.join(", "):`"${e.name}"`;s.success(t?`${i} uninstalled and ${o?"their":"its"} data deleted`:`${i} uninstalled, data kept`)}})};connectedCallback(){super.connectedCallback(),this.hasAttribute("title")||(this.title="Uninstall Extension")}handleAction(){this.uninstall()}render(){return n`<k-icon name="extension_remove"></k-icon>`}}customElements.define("admin-uninstall-extension",a);
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\tableControls\UninstallExtension.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\tableControls\UninstallExtension.js.map
@@ -1,4 +1,4 @@
1
1
  import t from"/kempo/components/DashboardWidget.js";import{html as e}from"/kempo-ui/lit-all.min.js";import{listTemplates as a,listFragments as o,listGlobalContent as n}from"/kempo/sdk.js";export default class s extends t{static properties={...t.properties,counts:{state:!0}};constructor(){super(),this.counts=[],this.cta={label:"Manage content",icon:"content",href:"/admin/content/templates"}}load=async()=>{const[t,e,s]=await Promise.all([this.unwrap(a()),this.unwrap(o()),this.unwrap(n())]);this.counts=[{label:"Templates",total:t.total,href:"/admin/content/templates"},{label:"Fragments",total:e.total,href:"/admin/content/fragments"},{label:"Global content",total:s.total,href:"/admin/content/globals"}]};renderContent(){return this.counts.some(({total:t})=>t)?e`${this.counts.map(({label:t,total:a,href:o})=>e`
2
2
  <a class="d-f pyq bb" href=${o}><span class="flex">${t}</span><strong>${a}</strong></a>
3
3
  `)}`:e`<p class="tc-muted">No templates, fragments or global content yet.</p>`}}customElements.define("k-widget-content",s);
4
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\widgets\Content.js.map
4
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\widgets\Content.js.map
@@ -2,4 +2,4 @@ import t from"/kempo/components/DashboardWidget.js";import{html as s}from"/kempo
2
2
  <div class="h1 m0">${this.total}</div>
3
3
  <div class="tc-muted">${1===this.total?"Extension":"Extensions"}${this.disabled?s`, ${this.disabled} disabled`:""}</div>
4
4
  `:s`<p class="tc-muted">No extensions installed.</p>`}}customElements.define("k-widget-extensions",i);
5
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\widgets\Extensions.js.map
5
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\widgets\Extensions.js.map
@@ -1,4 +1,4 @@
1
1
  import t from"/kempo/components/DashboardWidget.js";import{html as i}from"/kempo-ui/lit-all.min.js";import"/kempo/components/NotificationList.js";import{markAllNotificationsRead as o}from"/kempo/sdk.js";export default class e extends t{constructor(){super(),this.cta={label:"Mark all read",icon:"done_all",onClick:()=>this.markAllRead()}}markAllRead=async()=>{await o(),await(this.querySelector("k-notification-list")?.refresh())};renderContent(){return i`
2
2
  <k-notification-list compact unread-only page-size=${3*this.height}></k-notification-list>
3
3
  `}}customElements.define("k-widget-notifications",e);
4
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\widgets\Notifications.js.map
4
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\widgets\Notifications.js.map
@@ -20,4 +20,4 @@ import e from"/kempo/components/DashboardWidget.js";import{html as t,nothing as
20
20
  `)}
21
21
  `:a}
22
22
  `}}customElements.define("k-widget-pages",d);
23
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\widgets\Pages.js.map
23
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\widgets\Pages.js.map
@@ -2,4 +2,4 @@ import e from"/kempo/components/DashboardWidget.js";import{html as t}from"/kempo
2
2
  <div class="h1 m0">${this.total}</div>
3
3
  <div class="tc-muted">${1===this.total?"User":"Users"}</div>
4
4
  `}}customElements.define("k-widget-users",i);
5
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\components\widgets\Users.js.map
5
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\components\widgets\Users.js.map
@@ -1,2 +1,2 @@
1
1
  window.kempo={pathsToIcons:["/admin/icons","/kempo/icons","/kempo-ui/icons"],monacoUrl:"/monaco-editor",lexicalUrl:"/kempo/vendor/lexical"},window.litDisableBundleWarning=!0,import("/kempo-ui/components/Import.js"),import("/kempo-ui/components/Aside.js"),import("/kempo-ui/components/Main.js");
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\admin\init.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\admin\init.js.map
@@ -6,7 +6,7 @@
6
6
  <script type="module" src="/admin/components/Updates.js"></script>
7
7
 
8
8
  <h1>Updates</h1>
9
- <p class="tc-muted mb">Kempo checks npm for a newer version and tells you here and in your notifications. Installing one downloads it and restarts the server.</p>
9
+ <p class="tc-muted mb">Kempo checks npm for newer versions of itself and of your extensions, and tells you here and in your notifications. Updating downloads what you choose and restarts the server.</p>
10
10
 
11
11
  <k-admin-updates></k-admin-updates>
12
12
 
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../server/utils/permissions/currentUserHasPermission.js";import e from"../../../../server/utils/admin-global-content/deleteAdminGlobalContent.js";export default async(r,o)=>{const t=r.cookies.session_token,[n,i]=await s(t,"system:globals:delete");if(n)return o.status(n.code).json({error:n.msg});if(!i)return o.status(403).json({error:"Insufficient permissions"});const{ids:a}=r.body,[m,l]=await e({ids:a});if(m)return o.status(m.code).json({error:m.msg});o.json(l)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\admin-globals\DELETE.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\admin-globals\DELETE.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../server/utils/permissions/currentUserHasPermission.js";import r from"../../../../server/utils/admin-global-content/listAdminGlobalContent.js";export default async(o,t)=>{const e=o.cookies.session_token,[n,i]=await s(e,"system:globals:read");if(n)return t.status(n.code).json({error:n.msg});if(!i)return t.status(403).json({error:"Insufficient permissions"});const[a,m]=await r();if(a)return t.status(a.code).json({error:a.msg});t.json(m)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\admin-globals\GET.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\admin-globals\GET.js.map
@@ -1,2 +1,2 @@
1
1
  import r from"../../../../server/utils/permissions/currentUserHasPermission.js";import s from"../../../../server/utils/admin-global-content/createAdminGlobalContent.js";export default async(o,e)=>{const t=o.cookies.session_token,[n,i]=await r(t,"system:globals:create");if(n)return e.status(n.code).json({error:n.msg});if(!i)return e.status(403).json({error:"Insufficient permissions"});const{name:a,location:m,priority:c,owner:u,markup:l}=o.body,[p,f]=await s({name:a,location:m,priority:c,owner:u,markup:l});if(p)return e.status(p.code).json({error:p.msg});e.json(f)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\admin-globals\POST.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\admin-globals\POST.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../server/utils/permissions/currentUserHasPermission.js";import r from"../../../../../server/utils/admin-global-content/getAdminGlobalContent.js";export default async(e,o)=>{const t=e.cookies.session_token,[n,i]=await s(t,"system:globals:read");if(n)return o.status(n.code).json({error:n.msg});if(!i)return o.status(403).json({error:"Insufficient permissions"});const a=e.params.id,[m,u]=await r({id:a});if(m)return o.status(m.code).json({error:m.msg});o.json(u)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\admin-globals\[id]\GET.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\admin-globals\[id]\GET.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../server/utils/permissions/currentUserHasPermission.js";import r from"../../../../../server/utils/admin-global-content/updateAdminGlobalContent.js";export default async(o,t)=>{const e=o.cookies.session_token,[i,n]=await s(e,"system:globals:update");if(i)return t.status(i.code).json({error:i.msg});if(!n)return t.status(403).json({error:"Insufficient permissions"});const a=o.params.id,{name:m,location:u,priority:p,markup:c}=o.body,[l,d]=await r({id:a,name:m,location:u,priority:p,markup:c});if(l)return t.status(l.code).json({error:l.msg});t.json(d)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\admin-globals\[id]\PUT.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\admin-globals\[id]\PUT.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../../server/utils/permissions/currentUserHasPermission.js";import r from"../../../../../../server/utils/admin-global-content/disableAdminGlobalContent.js";export default async(e,o)=>{const t=e.cookies.session_token,[i,n]=await s(t,"system:globals:update");if(i)return o.status(i.code).json({error:i.msg});if(!n)return o.status(403).json({error:"Insufficient permissions"});const a=e.params.id,[m,u]=await r({id:a});if(m)return o.status(m.code).json({error:m.msg});o.json(u)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\admin-globals\[id]\disable\PUT.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\admin-globals\[id]\disable\PUT.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../../server/utils/permissions/currentUserHasPermission.js";import r from"../../../../../../server/utils/admin-global-content/enableAdminGlobalContent.js";export default async(e,o)=>{const t=e.cookies.session_token,[n,i]=await s(t,"system:globals:update");if(n)return o.status(n.code).json({error:n.msg});if(!i)return o.status(403).json({error:"Insufficient permissions"});const a=e.params.id,[m,u]=await r({id:a});if(m)return o.status(m.code).json({error:m.msg});o.json(u)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\admin-globals\[id]\enable\PUT.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\admin-globals\[id]\enable\PUT.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../server/utils/auth/changePassword.js";import r from"../../../../../server/utils/auth/getSession.js";import e from"bcrypt";export default async(t,o)=>{try{const a=t.cookies.session_token,[n,u]=await r({token:a});if(n||!u||!u.user)return o.status(401).json({error:"Not authenticated"});const{currentPassword:c,newPassword:i}=t.body;if(!c||!i)return o.status(400).json({error:"Current password and new password are required"});if(i.length<8)return o.status(400).json({error:"New password must be at least 8 characters"});if(!await e.compare(c,u.user.passwordHash))return o.status(400).json({error:"Current password is incorrect"});const[d,w]=await s(u.user.id,i);if(d)return o.status(d.code).json({error:d.msg});o.json({success:!0,message:"Password changed successfully"})}catch(s){console.error("Change password error:",s),o.status(500).json({error:s.message||"Failed to change password"})}};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\auth\change-password\POST.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\auth\change-password\POST.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"../../../../../../server/utils/auth/loginEmail.js";export default async(r,s)=>{try{const{email:o,password:t}=r.body,[n,a]=await e(o,t);if(n)return s.status(n.code).json({error:n.msg});s.cookie("session_token",a.sessionToken,{httpOnly:!0,secure:"production"===process.env.NODE_ENV,sameSite:"lax",path:"/",maxAge:a.expiresAt.getTime()-Date.now()}),s.json({user:a.user})}catch(e){console.error("Login error:",e),s.status(500).json({error:"Internal server error"})}};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\auth\login\email\POST.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\auth\login\email\POST.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"../../../../../server/utils/auth/logout.js";export default async(t,s)=>{try{const o=t.cookies.session_token,[r,a]=await e({token:o});if(r)return s.status(r.code).json({error:r.msg});s.setHeader("Set-Cookie","session_token=; Path=/; HttpOnly; Secure; SameSite=Strict; Max-Age=0"),s.json(a)}catch(e){s.status(500).json({error:e.message})}};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\auth\logout\POST.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\auth\logout\POST.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"../../../../../../server/utils/auth/registerEmail.js";export default async(r,s)=>{try{const{email:o,password:t,name:i}=r.body,[a,n]=await e({email:o,password:t,name:i});if(a)return s.status(a.code).json({error:a.msg});if(n.requiresVerification)return s.json({user:n.user,requiresVerification:n.requiresVerification});s.cookie("session_token",n.sessionToken,{httpOnly:!0,secure:"production"===process.env.NODE_ENV,sameSite:"lax",path:"/",maxAge:n.expiresAt.getTime()-Date.now()}),s.json({user:n.user})}catch(e){console.error("Registration error:",e),s.status(500).json({error:"Internal server error"})}};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\auth\register\email\POST.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\auth\register\email\POST.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../server/utils/auth/resetPassword.js";import r from"../../../../../server/utils/auth/loginEmail.js";import e from"../../../../../server/db/index.js";import{user as o}from"../../../../../server/db/schema.js";import{eq as t}from"drizzle-orm";export default async(a,n)=>{try{const{token:i,newPassword:u,logoutAll:l=!1}=a.body;console.log("Password reset request - Token:",i);const[d,m]=await s({token:i,password:u,logoutAll:l});if(d)return n.status(d.code).json({error:d.msg});const c=await e.select().from(o).where(t(o.id,m.userId)).limit(1);if(0===c.length)return n.status(500).json({error:"User not found after password reset"});const[p,f]=await r(c[0].email,u);if(p)return n.status(p.code).json({error:p.msg});n.cookie("session_token",f.sessionToken,{httpOnly:!0,secure:"production"===process.env.NODE_ENV,sameSite:"lax",path:"/",maxAge:24*(f.sessionDurationDays||7)*60*60*1e3}),n.json({success:!0,user:f.user})}catch(s){console.error("Password reset error:",s),n.status(500).json({error:"Failed to reset password"})}};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\auth\reset-password\POST.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\auth\reset-password\POST.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../server/utils/auth/getSession.js";export default async(e,o)=>{try{const r=e.cookies.session_token,[n,t]=await s({token:r});if(n||!t||!t.user)return o.json({session:null,user:null});const{passwordHash:i,...u}=t.user;o.json({session:t.session,user:u})}catch(s){console.log("Session API error:",s),o.status(500).json({error:s.message})}};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\auth\session\GET.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\auth\session\GET.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"crypto";import r from"../../../../../server/utils/auth/verifyEmail.js";import t from"../../../../../server/db/index.js";import{session as s,user as o}from"../../../../../server/db/schema.js";import{eq as i}from"drizzle-orm";import n from"../../../../../server/utils/settings/getSetting.js";export default async(a,m)=>{try{const{token:d}=a.body,[c,u]=await r({token:d});if(c)return m.status(c.code).json({error:c.msg});const l=await t.select().from(o).where(i(o.id,u.userId)).limit(1);if(0===l.length)return m.status(500).json({error:"User not found"});const f=e.randomBytes(32).toString("hex"),[p,j]=await n("system","session_duration_days",7);if(p)return m.status(p.code).json({error:p.msg});const v=new Date(Date.now()+24*j*60*60*1e3),y=new Date;await t.insert(s).values({token:f,userId:u.userId,expiresAt:v,createdAt:y}),m.cookie("session_token",f,{httpOnly:!0,secure:"production"===process.env.NODE_ENV,sameSite:"lax",path:"/",maxAge:24*j*60*60*1e3}),m.json({success:!0,user:{id:l[0].id,email:l[0].email,name:l[0].name,emailVerified:l[0].emailVerified}})}catch(e){console.error("Email verification error:",e),m.status(500).json({error:"Internal server error"})}};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\auth\verify-email\POST.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\auth\verify-email\POST.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../server/utils/auth/getSession.js";import e from"../../../../../server/utils/dashboard/listDashboardWidgets.js";export default async(r,t)=>{const[o,i]=await s({token:r.cookies.session_token});if(o)return t.status(500===o.code?500:401).json({error:500===o.code?o.msg:"Authentication required"});const[a,n]=await e({userId:i.user.id});if(a)return t.status(a.code).json({error:a.msg});t.json(n)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\dashboard\widgets\GET.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\dashboard\widgets\GET.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../server/utils/permissions/currentUserHasPermission.js";import e from"../../../../server/utils/email/listEmailTemplates.js";export default async(r,t)=>{const[o,i]=await s(r.cookies.session_token,"system:pages:read");if(o)return t.status(o.code).json({error:o.msg});if(!i)return t.status(403).json({error:"Insufficient permissions"});const[n,a]=await e({owner:r.query.owner||null});if(n)return t.status(n.code).json({error:n.msg});t.json({templates:a})};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\email-templates\GET.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\email-templates\GET.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../server/utils/permissions/currentUserHasPermission.js";import e from"../../../../../server/utils/email/resetEmailTemplate.js";export default async(r,t)=>{const[o,i]=await s(r.cookies.session_token,"system:pages:update");if(o)return t.status(o.code).json({error:o.msg});if(!i)return t.status(403).json({error:"Insufficient permissions"});const[n,a]=await e({template:r.body?.template});if(n)return t.status(n.code).json({error:n.msg});t.json(a)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\email-templates\file\DELETE.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\email-templates\file\DELETE.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../server/utils/permissions/currentUserHasPermission.js";import e from"../../../../../server/utils/email/readEmailTemplate.js";export default async(r,t)=>{const[o,i]=await s(r.cookies.session_token,"system:pages:read");if(o)return t.status(o.code).json({error:o.msg});if(!i)return t.status(403).json({error:"Insufficient permissions"});const[a,n]=await e({template:r.query.template});if(a)return t.status(a.code).json({error:a.msg});t.json(n)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\email-templates\file\GET.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\email-templates\file\GET.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../server/utils/permissions/currentUserHasPermission.js";import e from"../../../../../server/utils/email/saveEmailTemplate.js";export default async(r,t)=>{const[o,i]=await s(r.cookies.session_token,"system:pages:update");if(o)return t.status(o.code).json({error:o.msg});if(!i)return t.status(403).json({error:"Insufficient permissions"});const[a,n]=await e({template:r.body?.template,source:r.body?.source});if(a)return t.status(a.code).json({error:a.msg});t.json(n)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\email-templates\file\PUT.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\email-templates\file\PUT.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../server/utils/permissions/currentUserHasPermission.js";import e from"../../../../../server/utils/email/renderEmailTemplate.js";export default async(r,t)=>{const[o,i]=await s(r.cookies.session_token,"system:pages:read");if(o)return t.status(o.code).json({error:o.msg});if(!i)return t.status(403).json({error:"Insufficient permissions"});const[a,n]=await e({template:r.query.template,data:{}});if(a)return t.status(a.code).json({error:a.msg});t.type("html").send(n)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\email-templates\preview\GET.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\email-templates\preview\GET.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../server/utils/permissions/currentUserHasPermission.js";import e from"../../../../server/utils/email/listEmails.js";export default async(r,t)=>{const[i,o]=await s(r.cookies.session_token,"system:emails:read");if(i)return t.status(i.code).json({error:i.msg});if(!o)return t.status(403).json({error:"Insufficient permissions"});const{status:a,type:n,search:m,limit:u,offset:f}=r.query,[c,l]=await e({status:a,type:n,search:m,limit:u,offset:f});if(c)return t.status(c.code).json({error:c.msg});t.json(l)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\emails\GET.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\emails\GET.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../server/utils/permissions/currentUserHasPermission.js";import r from"../../../../../server/utils/email/getEmail.js";export default async(e,t)=>{const[i,o]=await s(e.cookies.session_token,"system:emails:read");if(i)return t.status(i.code).json({error:i.msg});if(!o)return t.status(403).json({error:"Insufficient permissions"});const[n,a]=await r(e.params.id);if(n)return t.status(n.code).json({error:n.msg});t.json(a)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\emails\[id]\GET.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\emails\[id]\GET.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../../server/utils/permissions/currentUserHasPermission.js";import r from"../../../../../../server/utils/email/retryEmail.js";export default async(e,o)=>{const[t,i]=await s(e.cookies.session_token,"system:emails:manage");if(t)return o.status(t.code).json({error:t.msg});if(!i)return o.status(403).json({error:"Insufficient permissions"});const[n,a]=await r(e.params.id);if(n)return 502===n.code||503===n.code?o.json({sent:!1,error:n.msg}):o.status(n.code).json({error:n.msg});o.json({sent:!0,...a})};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\emails\[id]\retry\POST.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\emails\[id]\retry\POST.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../server/utils/permissions/currentUserHasPermission.js";import e from"../../../../../server/utils/email/sendEmail.js";import t from"../../../../../server/utils/email/isValidSender.js";export default async(r,i)=>{const[o,n]=await s(r.cookies.session_token,"system:emails:manage");if(o)return i.status(o.code).json({error:o.msg});if(!n)return i.status(403).json({error:"Insufficient permissions"});const a=String(r.body?.to??"").trim();if(!t(a)||a.includes("<"))return i.status(400).json({error:"Enter an email address to send the test to"});const[m,l]=await e({to:a,subject:"A test email from Kempo",html:"<p>This is a test email. If you can read it, sending email works.</p>",template:"test"});if(m)return i.json({sent:!1,error:m.msg,emailId:m.emailId});i.json({sent:!0,...l})};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\emails\test\POST.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\emails\test\POST.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../server/utils/permissions/currentUserHasPermission.js";import e from"../../../../server/utils/extensions/uninstallExtensionTree.js";export default async(n,t)=>{const r=n.cookies.session_token,[o,i]=await s(r,"system:extensions:uninstall");if(o)return t.status(o.code).json({error:o.msg});if(!i)return t.status(403).json({error:"Insufficient permissions"});const{name:a,purgeData:u,cascade:c}=n.body,[d,m]=await e({name:a,purgeData:!0===u,cascade:!0===c});if(d)return t.status(d.code).json({error:d.msg,dependents:d.dependents,uninstalled:d.uninstalled});t.json(m)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\extensions\DELETE.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\extensions\DELETE.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../server/utils/permissions/currentUserHasPermission.js";import e from"../../../../server/utils/extensions/listExtensions.js";export default async(r,t)=>{const o=r.cookies.session_token,[i,n]=await s(o,"system:extensions:read");if(i)return t.status(i.code).json({error:i.msg});if(!n)return t.status(403).json({error:"Insufficient permissions"});const a=parseInt(r.query.limit)||50,u=parseInt(r.query.offset)||0,[f,m]=await e({limit:a,offset:u});if(f)return t.status(f.code).json({error:f.msg});t.json(m)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\extensions\GET.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\extensions\GET.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"../../../../server/utils/permissions/currentUserHasPermission.js";export default async(s,t)=>{const i=s.cookies.session_token,[n,r]=await e(i,"system:extensions:install");if(n)return t.status(n.code).json({error:n.msg});if(!r)return t.status(403).json({error:"Insufficient permissions"});const{name:a,withDependencies:o}=s.body||{},{default:l}=await(import("../../../../server/utils/extensions/getSiteMarketplaceClient.js")),{default:u}=await(import("../../../../server/utils/extensions/getSiteInstallId.js")),{default:d}=await(import("../../../../server/utils/extensions/installFromCatalog.js")),[,m]=await u(),[c,f]=await d({name:a,withDependencies:!0===o,client:await l(),installId:m});if(c)return t.status(c.code).json({error:c.msg,needs:c.needs,installed:c.installed});t.json(f)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\extensions\POST.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\extensions\POST.js.map
@@ -1,2 +1,2 @@
1
1
  import e from"../../../../../../server/utils/permissions/currentUserHasPermission.js";import s from"../../../../../../server/utils/extensions/getDependentTree.js";export default async(r,n)=>{const t=r.cookies.session_token,[i,o]=await e(t,"system:extensions:manage");if(i)return n.status(i.code).json({error:i.msg});if(!o)return n.status(403).json({error:"Insufficient permissions"});const a=await s(r.params.name,{includeDisabled:"true"===r.query.includeDisabled});n.json({dependents:a})};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\extensions\[name]\dependents\GET.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\extensions\[name]\dependents\GET.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../../server/utils/permissions/currentUserHasPermission.js";import e from"../../../../../../server/utils/extensions/disableExtensionTree.js";export default async(r,n)=>{const t=r.cookies.session_token,[o,i]=await s(t,"system:extensions:manage");if(o)return n.status(o.code).json({error:o.msg});if(!i)return n.status(403).json({error:"Insufficient permissions"});const a=r.params.name,[m,c]=await e({name:a,cascade:!0===r.body?.cascade});if(m)return n.status(m.code).json({error:m.msg,dependents:m.dependents});n.json(c)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\extensions\[name]\disable\POST.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\extensions\[name]\disable\POST.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../../server/utils/permissions/currentUserHasPermission.js";import e from"../../../../../../server/utils/extensions/enableExtensionTree.js";export default async(r,n)=>{const i=r.cookies.session_token,[t,o]=await s(i,"system:extensions:manage");if(t)return n.status(t.code).json({error:t.msg});if(!o)return n.status(403).json({error:"Insufficient permissions"});const a=r.params.name,[m,u]=await e({name:a,cascade:!0===r.body?.cascade});if(m)return n.status(m.code).json({error:m.msg,requirements:m.requirements,missing:m.missing});n.json(u)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\extensions\[name]\enable\POST.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\extensions\[name]\enable\POST.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../../server/utils/permissions/currentUserHasPermission.js";import e from"../../../../../../server/utils/extensions/getRequirementTree.js";export default async(r,o)=>{const t=r.cookies.session_token,[n,i]=await s(t,"system:extensions:manage");return n?o.status(n.code).json({error:n.msg}):i?void o.json(await e(r.params.name)):o.status(403).json({error:"Insufficient permissions"})};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\extensions\[name]\requirements\GET.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\extensions\[name]\requirements\GET.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../../server/utils/permissions/currentUserHasPermission.js";import e from"../../../../../../server/utils/extensions/updateExtension.js";export default async(r,n)=>{const o=r.cookies.session_token,[t,i]=await s(o,"system:extensions:manage");if(t)return n.status(t.code).json({error:t.msg});if(!i)return n.status(403).json({error:"Insufficient permissions"});const a=r.params.name,m=r.body?.version||"latest",[u,c]=await e({name:a,version:m});if(u)return n.status(u.code).json({error:u.msg});n.json(c)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\extensions\[name]\update\POST.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\extensions\[name]\update\POST.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../../server/utils/permissions/currentUserHasPermission.js";import e from"../../../../../../server/utils/extensions/checkExtensionUpdate.js";export default async(r,n)=>{const t=r.cookies.session_token,[o,i]=await s(t,"system:extensions:manage");if(o)return n.status(o.code).json({error:o.msg});if(!i)return n.status(403).json({error:"Insufficient permissions"});const a=r.params.name,[m,u]=await e({name:a});if(m)return n.status(m.code).json({error:m.msg});n.json(u)};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\extensions\[name]\update-check\GET.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\extensions\[name]\update-check\GET.js.map
@@ -1,2 +1,2 @@
1
1
  import s from"../../../../../server/utils/permissions/currentUserHasPermission.js";import{readFile as e}from"fs/promises";import{existsSync as o}from"fs";import{join as t}from"path";export default async(r,n)=>{const i=r.cookies.session_token,[a,c]=await s(i,"system:extensions:read");if(a)return n.status(a.code).json({error:a.msg});if(!c)return n.status(403).json({error:"Insufficient permissions"});const p=JSON.parse(await e(t(process.cwd(),"package.json"),"utf-8")),m={...p.dependencies,...p.devDependencies},f=t(process.cwd(),"node_modules"),u=[];for(const[s]of Object.entries(m))try{if(!o(t(f,s,"kempo-config.json")))continue;const r=JSON.parse(await e(t(f,s,"package.json"),"utf-8"));u.push({name:s,version:r.version,description:r.description||"",author:("object"==typeof r.author?r.author?.name:r.author)||""})}catch{}n.json({items:u,total:u.length})};
2
- //# sourceMappingURL=C:\Users\dusti\dev\kempo\dist\kempo\api\extensions\available\GET.js.map
2
+ //# sourceMappingURL=c:\Users\dusti\dev\kempo\dist\kempo\api\extensions\available\GET.js.map