@ozdao/prometheus-framework 0.2.144 → 0.2.146

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. package/dist/auth.server.js +1 -1
  2. package/dist/auth.server.mjs +1 -1
  3. package/dist/community.server.js +1 -1
  4. package/dist/community.server.mjs +1 -1
  5. package/dist/events.server.js +1 -1
  6. package/dist/events.server.mjs +1 -1
  7. package/dist/files.server.js +1 -1
  8. package/dist/files.server.mjs +1 -1
  9. package/dist/gallery.server.js +1 -1
  10. package/dist/gallery.server.mjs +1 -1
  11. package/dist/index-DahVPg_G.mjs +255 -0
  12. package/dist/index-oS9yx2Kv.js +254 -0
  13. package/dist/main-BFKp44Ze.mjs +14509 -0
  14. package/dist/main-By5Tbyui.js +92 -0
  15. package/dist/main-CEoQQpJV.js +92 -0
  16. package/dist/main-D_RRsfEH.mjs +14509 -0
  17. package/dist/orders.server.js +1 -1
  18. package/dist/orders.server.mjs +1 -1
  19. package/dist/organizations.server.js +1 -1
  20. package/dist/organizations.server.mjs +1 -1
  21. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  23. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  25. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
  27. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
  31. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
  33. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -2
  35. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +2 -2
  37. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
  39. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/auth/store/auth.js +50 -50
  41. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
  47. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
  49. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
  51. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
  57. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
  61. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
  63. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
  67. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  71. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  73. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +4 -4
  77. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
  79. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +2 -2
  81. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  87. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  89. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
  91. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  93. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +4 -4
  95. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
  97. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  99. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  101. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -6
  103. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
  105. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  107. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  109. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  111. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  113. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
  115. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
  117. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  119. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  123. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  125. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  127. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  129. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +2 -2
  131. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +2 -2
  133. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +1 -1
  135. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +4 -4
  137. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  139. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
  141. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  143. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
  145. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -5
  147. package/dist/prometheus-framework.cjs.js +1 -1
  148. package/dist/prometheus-framework.es.js +1 -1
  149. package/dist/wallet.server.js +1 -1
  150. package/dist/wallet.server.mjs +1 -1
  151. package/dist/web-BmdKi_fZ.js +1 -0
  152. package/dist/web-Cw0ijzjY.js +1 -0
  153. package/dist/web-CwTWV4ca.mjs +54 -0
  154. package/dist/web-nqFW_Sd1.mjs +54 -0
  155. package/package.json +1 -1
  156. package/src/modules/auth/middlewares/authJwt.js +5 -11
  157. package/src/modules/auth/store/auth.js +6 -2
@@ -0,0 +1,54 @@
1
+ import { W as p } from "./main-D_RRsfEH.mjs";
2
+ class f extends p {
3
+ constructor() {
4
+ super(...arguments), this.group = "CapacitorStorage";
5
+ }
6
+ async configure({ group: e }) {
7
+ typeof e == "string" && (this.group = e);
8
+ }
9
+ async get(e) {
10
+ return { value: this.impl.getItem(this.applyPrefix(e.key)) };
11
+ }
12
+ async set(e) {
13
+ this.impl.setItem(this.applyPrefix(e.key), e.value);
14
+ }
15
+ async remove(e) {
16
+ this.impl.removeItem(this.applyPrefix(e.key));
17
+ }
18
+ async keys() {
19
+ return { keys: this.rawKeys().map((t) => t.substring(this.prefix.length)) };
20
+ }
21
+ async clear() {
22
+ for (const e of this.rawKeys())
23
+ this.impl.removeItem(e);
24
+ }
25
+ async migrate() {
26
+ var e;
27
+ const t = [], s = [], n = "_cap_", o = Object.keys(this.impl).filter((i) => i.indexOf(n) === 0);
28
+ for (const i of o) {
29
+ const r = i.substring(n.length), a = (e = this.impl.getItem(i)) !== null && e !== void 0 ? e : "", { value: l } = await this.get({ key: r });
30
+ typeof l == "string" ? s.push(r) : (await this.set({ key: r, value: a }), t.push(r));
31
+ }
32
+ return { migrated: t, existing: s };
33
+ }
34
+ async removeOld() {
35
+ const e = "_cap_", t = Object.keys(this.impl).filter((s) => s.indexOf(e) === 0);
36
+ for (const s of t)
37
+ this.impl.removeItem(s);
38
+ }
39
+ get impl() {
40
+ return window.localStorage;
41
+ }
42
+ get prefix() {
43
+ return this.group === "NativeStorage" ? "" : `${this.group}.`;
44
+ }
45
+ rawKeys() {
46
+ return Object.keys(this.impl).filter((e) => e.indexOf(this.prefix) === 0);
47
+ }
48
+ applyPrefix(e) {
49
+ return this.prefix + e;
50
+ }
51
+ }
52
+ export {
53
+ f as PreferencesWeb
54
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ozdao/prometheus-framework",
3
- "version": "0.2.144",
3
+ "version": "0.2.146",
4
4
  "description": "Web3 Framework focused on user experience and ease of development.",
5
5
  "author": "OZ DAO <hello@ozdao.dev>",
6
6
  "license": "GPL-3.0-or-later",
@@ -7,19 +7,13 @@ const middlewareFactory = (db) => {
7
7
  const verifyToken = (continueOnFail = false) => {
8
8
  return async (req, res, next) => {
9
9
  try {
10
- if (!req.cookies.user) {
11
- console.log('NO COOKIE BITCH')
12
- req.userId = null;
13
- if (continueOnFail) {
14
- return next();
15
- } else {
16
- return res.status(401).send({ message: "Unauthorized: No user cookie" });
17
- }
10
+ let token = req.headers["x-access-token"];
11
+
12
+ if (!token && req.cookies.user) {
13
+ let user = JSON.parse(req.cookies.user);
14
+ token = user.accessToken;
18
15
  }
19
16
 
20
- let user = JSON.parse(req.cookies.user);
21
- let token = req.headers["x-access-token"] || user.accessToken;
22
-
23
17
  if (!token) {
24
18
  req.userId = null;
25
19
  if (continueOnFail) {
@@ -34,11 +34,15 @@
34
34
  try {
35
35
  const userCookie = await getCookie('user');
36
36
 
37
+ console.log('cookie is', userCookie)
38
+
37
39
  if (userCookie) {
38
40
  const { _id, email, phone, roles, accessToken } = userCookie;
39
41
 
42
+ console.log('accessToken is', accessToken)
43
+
40
44
  // Установка токена в Axios интерцептор для всех запросов
41
- axios.interceptors.request.use(config => {
45
+ $axios.interceptors.request.use(config => {
42
46
  config.headers['x-access-token'] = accessToken;
43
47
  return config;
44
48
  }, error => {
@@ -46,7 +50,7 @@
46
50
  });
47
51
 
48
52
  // Проверка токена через серверный маршрут
49
- const response = await axios.get('/api/auth/check-accesses');
53
+ const response = await $axios.get('/api/auth/check-accesses');
50
54
  const userAccesses = response.data;
51
55
 
52
56
  // Обновление состояния приложения с информацией о пользователе и его правах доступа