@opengis/fcore 0.0.1-beta.2 → 0.0.1-beta.20

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 (248) hide show
  1. package/LICENSE +3 -3
  2. package/README.md +71 -71
  3. package/dist/config.d.ts +2 -10
  4. package/dist/config.d.ts.map +1 -1
  5. package/dist/config.js +1 -1
  6. package/dist/context.js +1 -1
  7. package/dist/errors.js +1 -1
  8. package/dist/fastify.d.ts +2 -5
  9. package/dist/fastify.d.ts.map +1 -1
  10. package/dist/fastify.js +1 -1
  11. package/dist/fcore.js +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/migrations/cli.js +1 -1
  14. package/dist/migrations/runner.js +1 -1
  15. package/dist/modules/auth/adduser-cli.d.ts +3 -0
  16. package/dist/modules/auth/adduser-cli.d.ts.map +1 -0
  17. package/dist/modules/auth/adduser-cli.js +2 -0
  18. package/dist/modules/auth/passwd-cli.d.ts +3 -0
  19. package/dist/modules/auth/passwd-cli.d.ts.map +1 -0
  20. package/dist/modules/auth/passwd-cli.js +2 -0
  21. package/dist/modules/auth/permission-cli.d.ts +3 -0
  22. package/dist/modules/auth/permission-cli.d.ts.map +1 -0
  23. package/dist/modules/auth/permission-cli.js +2 -0
  24. package/dist/modules/auth/route.d.ts.map +1 -1
  25. package/dist/modules/auth/route.js +1 -1
  26. package/dist/modules/auth/schema.d.ts +10 -1
  27. package/dist/modules/auth/schema.d.ts.map +1 -1
  28. package/dist/modules/auth/schema.js +1 -1
  29. package/dist/modules/auth/services/change-password.d.ts +9 -0
  30. package/dist/modules/auth/services/change-password.d.ts.map +1 -0
  31. package/dist/modules/auth/services/change-password.js +1 -0
  32. package/dist/modules/auth/services/get-current-user.d.ts +1 -0
  33. package/dist/modules/auth/services/get-current-user.d.ts.map +1 -1
  34. package/dist/modules/auth/services/get-current-user.js +1 -1
  35. package/dist/modules/auth/services/registration.d.ts +14 -0
  36. package/dist/modules/auth/services/registration.d.ts.map +1 -0
  37. package/dist/modules/auth/services/registration.js +1 -0
  38. package/dist/modules/auth/services/verify-two-factor.js +1 -1
  39. package/dist/modules/file/mime.d.ts +3 -0
  40. package/dist/modules/file/mime.d.ts.map +1 -0
  41. package/dist/modules/file/mime.js +1 -0
  42. package/dist/modules/file/route.d.ts.map +1 -1
  43. package/dist/modules/file/route.js +1 -1
  44. package/dist/modules/file/schema.d.ts +3 -0
  45. package/dist/modules/file/schema.d.ts.map +1 -1
  46. package/dist/modules/file/schema.js +1 -1
  47. package/dist/modules/file/services/get-file.js +1 -1
  48. package/dist/modules/file/services/resize-file.d.ts.map +1 -1
  49. package/dist/modules/file/services/resize-file.js +1 -1
  50. package/dist/modules/file/services/upload-file.d.ts +4 -6
  51. package/dist/modules/file/services/upload-file.d.ts.map +1 -1
  52. package/dist/modules/file/services/upload-file.js +1 -1
  53. package/dist/modules/resource/route.d.ts +0 -3
  54. package/dist/modules/resource/route.d.ts.map +1 -1
  55. package/dist/modules/resource/route.js +1 -1
  56. package/dist/modules/resource/schema.d.ts +3 -0
  57. package/dist/modules/resource/schema.d.ts.map +1 -1
  58. package/dist/modules/resource/schema.js +1 -1
  59. package/dist/modules/resource/services/add-note.js +1 -1
  60. package/dist/modules/resource/services/add-resource-file.js +1 -1
  61. package/dist/modules/resource/services/create-resource-relation.d.ts +8 -2
  62. package/dist/modules/resource/services/create-resource-relation.d.ts.map +1 -1
  63. package/dist/modules/resource/services/create-resource-relation.js +1 -1
  64. package/dist/modules/resource/services/create-resource.js +1 -1
  65. package/dist/modules/resource/services/delete-resource-relation.d.ts +8 -1
  66. package/dist/modules/resource/services/delete-resource-relation.d.ts.map +1 -1
  67. package/dist/modules/resource/services/delete-resource-relation.js +1 -1
  68. package/dist/modules/resource/services/delete-resource.js +1 -1
  69. package/dist/modules/resource/services/export-resource.d.ts.map +1 -1
  70. package/dist/modules/resource/services/export-resource.js +1 -1
  71. package/dist/modules/resource/services/get-resource.d.ts.map +1 -1
  72. package/dist/modules/resource/services/get-resource.js +1 -1
  73. package/dist/modules/resource/services/list-resource-relation.d.ts +9 -2
  74. package/dist/modules/resource/services/list-resource-relation.d.ts.map +1 -1
  75. package/dist/modules/resource/services/list-resource-relation.js +1 -1
  76. package/dist/modules/resource/services/list-resources.d.ts.map +1 -1
  77. package/dist/modules/resource/services/list-resources.js +1 -1
  78. package/dist/modules/resource/services/search-resource.d.ts.map +1 -1
  79. package/dist/modules/resource/services/search-resource.js +1 -1
  80. package/dist/modules/resource/services/suggest-resource.d.ts +10 -4
  81. package/dist/modules/resource/services/suggest-resource.d.ts.map +1 -1
  82. package/dist/modules/resource/services/suggest-resource.js +1 -1
  83. package/dist/modules/resource/services/update-resource-relation.d.ts +10 -0
  84. package/dist/modules/resource/services/update-resource-relation.d.ts.map +1 -0
  85. package/dist/modules/resource/services/update-resource-relation.js +1 -0
  86. package/dist/modules/resource/services/update-resource.js +1 -1
  87. package/dist/modules/resource/services/upload-resource-file.js +1 -1
  88. package/dist/modules/system/route.d.ts +2 -1
  89. package/dist/modules/system/route.d.ts.map +1 -1
  90. package/dist/modules/system/route.js +1 -1
  91. package/dist/modules/system/schema.d.ts +23 -1
  92. package/dist/modules/system/schema.d.ts.map +1 -1
  93. package/dist/modules/system/schema.js +1 -1
  94. package/dist/modules/system/services/check-system.d.ts.map +1 -1
  95. package/dist/modules/system/services/check-system.js +1 -1
  96. package/dist/modules/system/services/get-access.d.ts +15 -0
  97. package/dist/modules/system/services/get-access.d.ts.map +1 -0
  98. package/dist/modules/system/services/get-access.js +1 -0
  99. package/dist/modules/system/services/get-api-list.d.ts +4 -1
  100. package/dist/modules/system/services/get-api-list.d.ts.map +1 -1
  101. package/dist/modules/system/services/get-api-list.js +1 -1
  102. package/dist/modules/system/services/get-audit-log.d.ts.map +1 -1
  103. package/dist/modules/system/services/get-audit-log.js +1 -1
  104. package/dist/modules/system/services/get-dictionary.js +1 -1
  105. package/dist/modules/system/services/get-system-log.d.ts +9 -5
  106. package/dist/modules/system/services/get-system-log.d.ts.map +1 -1
  107. package/dist/modules/system/services/get-system-log.js +1 -1
  108. package/dist/modules/system/services/get-system-settings.d.ts.map +1 -1
  109. package/dist/modules/system/services/get-system-settings.js +1 -1
  110. package/dist/modules/system/services/list-dictionaries.js +1 -1
  111. package/dist/modules/system/services/set-access.d.ts +17 -0
  112. package/dist/modules/system/services/set-access.d.ts.map +1 -0
  113. package/dist/modules/system/services/set-access.js +1 -0
  114. package/dist/modules/system/services/update-dictionary.d.ts +13 -0
  115. package/dist/modules/system/services/update-dictionary.d.ts.map +1 -0
  116. package/dist/modules/system/services/update-dictionary.js +1 -0
  117. package/dist/modules/system/services/update-system-settings.d.ts.map +1 -1
  118. package/dist/modules/system/services/update-system-settings.js +1 -1
  119. package/dist/modules/utils/require-admin.js +1 -1
  120. package/dist/modules/utils/safe-user.js +1 -1
  121. package/dist/modules/utils/unsupported.js +1 -1
  122. package/dist/plugins/audit/audit.js +1 -1
  123. package/dist/plugins/audit/audit.types.d.ts +1 -1
  124. package/dist/plugins/audit/audit.types.d.ts.map +1 -1
  125. package/dist/plugins/audit/index.js +1 -1
  126. package/dist/plugins/audit/services/write-audit.js +1 -1
  127. package/dist/plugins/auth/get-user-permissions.d.ts +3 -0
  128. package/dist/plugins/auth/get-user-permissions.d.ts.map +1 -0
  129. package/dist/plugins/auth/get-user-permissions.js +1 -0
  130. package/dist/plugins/auth/index.d.ts +4 -0
  131. package/dist/plugins/auth/index.d.ts.map +1 -1
  132. package/dist/plugins/auth/index.js +1 -1
  133. package/dist/plugins/auth/verifyUser.d.ts +9 -0
  134. package/dist/plugins/auth/verifyUser.d.ts.map +1 -0
  135. package/dist/plugins/auth/verifyUser.js +1 -0
  136. package/dist/plugins/dictionary.d.ts +3 -0
  137. package/dist/plugins/dictionary.d.ts.map +1 -1
  138. package/dist/plugins/dictionary.js +1 -1
  139. package/dist/plugins/file.d.ts +3 -6
  140. package/dist/plugins/file.d.ts.map +1 -1
  141. package/dist/plugins/file.js +1 -1
  142. package/dist/plugins/index.d.ts +2 -0
  143. package/dist/plugins/index.d.ts.map +1 -1
  144. package/dist/plugins/index.js +1 -1
  145. package/dist/plugins/jwt.d.ts +4 -0
  146. package/dist/plugins/jwt.d.ts.map +1 -0
  147. package/dist/plugins/jwt.js +1 -0
  148. package/dist/plugins/logger/index.js +1 -1
  149. package/dist/plugins/logger/transport.js +1 -1
  150. package/dist/plugins/pg.d.ts +4 -2
  151. package/dist/plugins/pg.d.ts.map +1 -1
  152. package/dist/plugins/pg.js +1 -1
  153. package/dist/plugins/redis.js +1 -1
  154. package/dist/plugins/resource/index.js +1 -1
  155. package/dist/plugins/resource/resource.d.ts.map +1 -1
  156. package/dist/plugins/resource/resource.js +1 -1
  157. package/dist/plugins/resource/resource.registry.js +1 -1
  158. package/dist/plugins/resource/resource.types.d.ts +71 -15
  159. package/dist/plugins/resource/resource.types.d.ts.map +1 -1
  160. package/dist/plugins/resource/services/add-dictionary-lookup-data.d.ts +3 -0
  161. package/dist/plugins/resource/services/add-dictionary-lookup-data.d.ts.map +1 -0
  162. package/dist/plugins/resource/services/add-dictionary-lookup-data.js +1 -0
  163. package/dist/plugins/resource/services/add-file-token.d.ts +3 -0
  164. package/dist/plugins/resource/services/add-file-token.d.ts.map +1 -0
  165. package/dist/plugins/resource/services/add-file-token.js +1 -0
  166. package/dist/plugins/resource/services/add-table-lookup-data.d.ts +4 -0
  167. package/dist/plugins/resource/services/add-table-lookup-data.d.ts.map +1 -0
  168. package/dist/plugins/resource/services/add-table-lookup-data.js +1 -0
  169. package/dist/plugins/resource/services/create-relation.d.ts +16 -0
  170. package/dist/plugins/resource/services/create-relation.d.ts.map +1 -0
  171. package/dist/plugins/resource/services/create-relation.js +1 -0
  172. package/dist/plugins/resource/services/create.d.ts +5 -2
  173. package/dist/plugins/resource/services/create.d.ts.map +1 -1
  174. package/dist/plugins/resource/services/create.js +1 -1
  175. package/dist/plugins/resource/services/delete-relation.d.ts +18 -0
  176. package/dist/plugins/resource/services/delete-relation.d.ts.map +1 -0
  177. package/dist/plugins/resource/services/delete-relation.js +1 -0
  178. package/dist/plugins/resource/services/delete.d.ts +9 -2
  179. package/dist/plugins/resource/services/delete.d.ts.map +1 -1
  180. package/dist/plugins/resource/services/delete.js +1 -1
  181. package/dist/plugins/resource/services/find-one.d.ts +3 -2
  182. package/dist/plugins/resource/services/find-one.d.ts.map +1 -1
  183. package/dist/plugins/resource/services/find-one.js +1 -1
  184. package/dist/plugins/resource/services/find-relation.d.ts +13 -0
  185. package/dist/plugins/resource/services/find-relation.d.ts.map +1 -0
  186. package/dist/plugins/resource/services/find-relation.js +1 -0
  187. package/dist/plugins/resource/services/find.d.ts.map +1 -1
  188. package/dist/plugins/resource/services/find.js +1 -1
  189. package/dist/plugins/resource/services/update-relation.d.ts +14 -0
  190. package/dist/plugins/resource/services/update-relation.d.ts.map +1 -0
  191. package/dist/plugins/resource/services/update-relation.js +1 -0
  192. package/dist/plugins/resource/services/update.d.ts +9 -2
  193. package/dist/plugins/resource/services/update.d.ts.map +1 -1
  194. package/dist/plugins/resource/services/update.js +1 -1
  195. package/dist/plugins/resource/utils/auto-index.d.ts +4 -0
  196. package/dist/plugins/resource/utils/auto-index.d.ts.map +1 -0
  197. package/dist/plugins/resource/utils/auto-index.js +1 -0
  198. package/dist/plugins/resource/utils/fields.d.ts +8 -1
  199. package/dist/plugins/resource/utils/fields.d.ts.map +1 -1
  200. package/dist/plugins/resource/utils/fields.js +1 -1
  201. package/dist/plugins/resource/utils/filters.d.ts +3 -2
  202. package/dist/plugins/resource/utils/filters.d.ts.map +1 -1
  203. package/dist/plugins/resource/utils/filters.js +1 -1
  204. package/dist/plugins/resource/utils/permissions.d.ts.map +1 -1
  205. package/dist/plugins/resource/utils/permissions.js +1 -1
  206. package/dist/plugins/resource/utils/sort.d.ts +1 -1
  207. package/dist/plugins/resource/utils/sort.d.ts.map +1 -1
  208. package/dist/plugins/resource/utils/sort.js +1 -1
  209. package/dist/plugins/resource/utils/sql.d.ts +1 -1
  210. package/dist/plugins/resource/utils/sql.d.ts.map +1 -1
  211. package/dist/plugins/resource/utils/sql.js +1 -1
  212. package/dist/shared/getIP.js +1 -1
  213. package/dist/type.d.ts +14 -0
  214. package/dist/type.d.ts.map +1 -1
  215. package/migrations/20260903120000_core_schema.sql +27 -21
  216. package/migrations/20260903130000_move_notes_files_to_admin.sql +17 -17
  217. package/migrations/20260903130001_add_file_fields.sql +5 -0
  218. package/migrations/20260903140000_settings_nulls_not_distinct.sql +18 -18
  219. package/migrations/20260905120000_add_user_foreign_keys.sql +43 -0
  220. package/migrations/20260907090000_core_schema.sql +32 -0
  221. package/package.json +93 -88
  222. package/dist/modules/auth/index.d.ts +0 -9
  223. package/dist/modules/auth/index.d.ts.map +0 -1
  224. package/dist/modules/auth/index.js +0 -1
  225. package/dist/modules/auth/services/login.d.ts +0 -10
  226. package/dist/modules/auth/services/login.d.ts.map +0 -1
  227. package/dist/modules/auth/services/login.js +0 -1
  228. package/dist/modules/auth/services/logout.d.ts +0 -9
  229. package/dist/modules/auth/services/logout.d.ts.map +0 -1
  230. package/dist/modules/auth/services/logout.js +0 -1
  231. package/dist/modules/auth/services/verifyPassword.d.ts +0 -11
  232. package/dist/modules/auth/services/verifyPassword.d.ts.map +0 -1
  233. package/dist/modules/auth/services/verifyPassword.js +0 -1
  234. package/dist/modules/file/index.d.ts +0 -8
  235. package/dist/modules/file/index.d.ts.map +0 -1
  236. package/dist/modules/file/index.js +0 -1
  237. package/dist/modules/resource/index.d.ts +0 -20
  238. package/dist/modules/resource/index.d.ts.map +0 -1
  239. package/dist/modules/resource/index.js +0 -1
  240. package/dist/modules/resource/services/list-children.d.ts +0 -6
  241. package/dist/modules/resource/services/list-children.d.ts.map +0 -1
  242. package/dist/modules/resource/services/list-children.js +0 -1
  243. package/dist/modules/system/index.d.ts +0 -13
  244. package/dist/modules/system/index.d.ts.map +0 -1
  245. package/dist/modules/system/index.js +0 -1
  246. package/dist/modules/utils/get-user-permissions.d.ts +0 -3
  247. package/dist/modules/utils/get-user-permissions.d.ts.map +0 -1
  248. package/dist/modules/utils/get-user-permissions.js +0 -1
package/package.json CHANGED
@@ -1,88 +1,93 @@
1
- {
2
- "name": "@opengis/fcore",
3
- "version": "0.0.1-beta.2",
4
- "description": "Reusable backend foundation for OpenGIS Node.js applications",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "types": "./dist/index.d.ts",
8
- "files": [
9
- "dist",
10
- "migrations",
11
- "README.md",
12
- "LICENSE"
13
- ],
14
- "exports": {
15
- ".": {
16
- "types": "./dist/index.d.ts",
17
- "import": "./dist/index.js"
18
- },
19
- "./fastify": {
20
- "types": "./dist/fastify.d.ts",
21
- "import": "./dist/fastify.js"
22
- },
23
- "./migrate": {
24
- "types": "./dist/migrations/runner.d.ts",
25
- "import": "./dist/migrations/runner.js"
26
- }
27
- },
28
- "bin": {
29
- "fcore-migrate": "./dist/migrations/cli.js"
30
- },
31
- "scripts": {
32
- "clean": "rm -rf dist",
33
- "build": "npm run clean && tsc -p tsconfig.json && node scripts/obfuscate.mjs",
34
- "typecheck": "tsc -p tsconfig.json --noEmit",
35
- "test": "node --test --import tsx test/**/*.test.ts",
36
- "test-env": "node --env-file=.env.test --test --import tsx test/**/env.test.ts",
37
- "dev": "tsx server.ts",
38
- "migrate": "node ./dist/migrations/cli.js",
39
- "migration": "node --import tsx src/migrations/cli.ts",
40
- "migration-test": "node --env-file=.env.test --import tsx src/migrations/cli.ts",
41
- "prepublishOnly": "npm run build",
42
- "prepublishOnly1": "npm run build && npm test",
43
- "patch": "npm version patch && git push && npm publish",
44
- "minor": "npm version minor && git push && npm publish",
45
- "major": "npm version major && git push && npm publish"
46
- },
47
- "engines": {
48
- "node": ">=20"
49
- },
50
- "dependencies": {
51
- "@sinclair/typebox": "^0.34.52",
52
- "@aws-sdk/client-s3": "3.1125.0",
53
- "@aws-sdk/lib-storage": "3.1125.0",
54
- "@fastify/cookie": "11.1.2",
55
- "@fastify/multipart": "10.1.1",
56
- "@fastify/passport": "4.0.2",
57
- "@fastify/rate-limit": "11.2.0",
58
- "@fastify/session": "11.1.2",
59
- "apache-crypt": "1.2.6",
60
- "dotenv": "17.4.2",
61
- "fastify-plugin": "6.0.0",
62
- "fastify-session-redis-store": "7.1.2",
63
- "file-type": "22.0.2",
64
- "ioredis": "6.0.0",
65
- "otplib": "13.5.0",
66
- "pg": "8.23.0",
67
- "pino": "10.3.1",
68
- "pino-abstract-transport": "3.0.0",
69
- "qrcode": "1.5.4",
70
- "sharp": "0.35.4"
71
- },
72
- "peerDependencies": {
73
- "fastify": ">=5.12.1"
74
- },
75
- "devDependencies": {
76
- "@types/node": "22.20.1",
77
- "@types/passport": "1.0.17",
78
- "@types/passport-local": "1.0.38",
79
- "@types/pg": "8.23.1",
80
- "@types/qrcode": "1.5.6",
81
- "fastify": "5.12.1",
82
- "javascript-obfuscator": "5.6.0",
83
- "tsx": "4.23.13",
84
- "typescript": "7.0.2",
85
- "vitest": "4.1.11"
86
- },
87
- "license": "UNLICENSED"
88
- }
1
+ {
2
+ "name": "@opengis/fcore",
3
+ "version": "0.0.1-beta.20",
4
+ "description": "Reusable backend foundation for OpenGIS Node.js applications",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "files": [
9
+ "dist",
10
+ "migrations",
11
+ "README.md",
12
+ "LICENSE"
13
+ ],
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/index.js"
18
+ },
19
+ "./fastify": {
20
+ "types": "./dist/fastify.d.ts",
21
+ "import": "./dist/fastify.js"
22
+ },
23
+ "./migrate": {
24
+ "types": "./dist/migrations/runner.d.ts",
25
+ "import": "./dist/migrations/runner.js"
26
+ }
27
+ },
28
+ "bin": {
29
+ "fcore-migrate": "./dist/migrations/cli.js",
30
+ "fcore-adduser": "./dist/modules/auth/adduser-cli.js",
31
+ "fcore-passwd": "./dist/modules/auth/passwd-cli.js",
32
+ "fcore-permission": "./dist/modules/auth/permission-cli.js"
33
+ },
34
+ "scripts": {
35
+ "clean": "rm -rf dist",
36
+ "build": "npm run clean && tsc -p tsconfig.json && node scripts/obfuscate.mjs",
37
+ "typecheck": "tsc -p tsconfig.json --noEmit",
38
+ "test": "node --test --import tsx test/**/*.test.ts",
39
+ "test-env": "node --env-file=.env.test --test --import tsx test/**/env.test.ts",
40
+ "dev": "bun ./server.ts",
41
+ "adduser": "node --import tsx ./src/modules/auth/adduser-cli.ts",
42
+ "passwd": "node --import tsx ./src/modules/auth/passwd-cli.ts",
43
+ "permission": "node --import tsx ./src/modules/auth/permission-cli.ts",
44
+ "migrate": "node --import tsx src/migrations/cli.ts",
45
+ "migration-test": "node --env-file=.env.test --import tsx src/migrations/cli.ts",
46
+ "prepublishOnly": "npm run build",
47
+ "prepublishOnly1": "npm run build && npm test",
48
+ "patch": "npm version patch && git push && npm publish",
49
+ "minor": "npm version minor && git push && npm publish",
50
+ "major": "npm version major && git push && npm publish"
51
+ },
52
+ "engines": {
53
+ "node": ">=20"
54
+ },
55
+ "dependencies": {
56
+ "@aws-sdk/client-s3": "3.1125.0",
57
+ "@aws-sdk/lib-storage": "3.1125.0",
58
+ "@fastify/cookie": "11.1.2",
59
+ "@fastify/multipart": "10.1.1",
60
+ "@fastify/passport": "4.0.2",
61
+ "@fastify/rate-limit": "11.2.0",
62
+ "@fastify/session": "11.1.2",
63
+ "@sinclair/typebox": "^0.34.52",
64
+ "apache-crypt": "1.2.6",
65
+ "dotenv": "17.4.2",
66
+ "fastify-session-redis-store": "7.1.2",
67
+ "file-type": "22.0.2",
68
+ "ioredis": "6.0.0",
69
+ "jose": "^6.2.12",
70
+ "otplib": "13.5.0",
71
+ "pg": "8.23.0",
72
+ "pino": "10.3.1",
73
+ "pino-abstract-transport": "3.0.0",
74
+ "qrcode": "1.5.4",
75
+ "sharp": "0.35.4"
76
+ },
77
+ "peerDependencies": {
78
+ "fastify": ">=5.12.1"
79
+ },
80
+ "devDependencies": {
81
+ "@types/node": "22.20.1",
82
+ "@types/passport": "1.0.17",
83
+ "@types/passport-local": "1.0.38",
84
+ "@types/pg": "8.23.1",
85
+ "@types/qrcode": "1.5.6",
86
+ "fastify": "5.12.1",
87
+ "javascript-obfuscator": "5.6.0",
88
+ "tsx": "4.23.13",
89
+ "typescript": "7.0.2",
90
+ "vitest": "4.1.11"
91
+ },
92
+ "license": "UNLICENSED"
93
+ }
@@ -1,9 +0,0 @@
1
- /**
2
- * Exports the public surface of this FCore module.
3
- */
4
- export * from './route.js';
5
- export * from './services/login.js';
6
- export * from './services/logout.js';
7
- export * from './services/get-current-user.js';
8
- export * from './services/verify-two-factor.js';
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC"}
@@ -1 +0,0 @@
1
- (function(_0x5c39f8,_0xd6c04f){var _0x279e1b=_0xb4de,_0x4e7593=_0x5c39f8();while(!![]){try{var _0x29d586=parseInt(_0x279e1b(0x156))/0x1*(parseInt(_0x279e1b(0x154))/0x2)+-parseInt(_0x279e1b(0x158))/0x3*(-parseInt(_0x279e1b(0x15a))/0x4)+parseInt(_0x279e1b(0x152))/0x5*(parseInt(_0x279e1b(0x15b))/0x6)+-parseInt(_0x279e1b(0x15c))/0x7*(-parseInt(_0x279e1b(0x153))/0x8)+parseInt(_0x279e1b(0x157))/0x9+-parseInt(_0x279e1b(0x155))/0xa*(parseInt(_0x279e1b(0x15d))/0xb)+-parseInt(_0x279e1b(0x159))/0xc;if(_0x29d586===_0xd6c04f)break;else _0x4e7593['push'](_0x4e7593['shift']());}catch(_0xd903f6){_0x4e7593['push'](_0x4e7593['shift']());}}}(_0x4a71,0x1b915));function _0xb4de(_0x382be1,_0x40b2a2){_0x382be1=_0x382be1-0x152;var _0x4a717d=_0x4a71();var _0xb4de9d=_0x4a717d[_0x382be1];return _0xb4de9d;}export*from'./route.js';export*from'./services/login.js';export*from'./services/logout.js';function _0x4a71(){var _0x43d77e=['9046HvVucd','1498158jeDUqo','8121KMDZxw','6450408oTlgQX','12mYfyQS','1130838PUeWGt','462CIMWEn','316811caqPbl','5hQPzus','22976xfjgOr','28pUMrbW','10SSBCSt'];_0x4a71=function(){return _0x43d77e;};return _0x4a71();}export*from'./services/get-current-user.js';export*from'./services/verify-two-factor.js';
@@ -1,10 +0,0 @@
1
- import { ContextDependencies } from "../../../context.js";
2
- export default function login({ ip, login, password }: {
3
- ip: string;
4
- login: string;
5
- password: string;
6
- }, { config, pg, logger, redis, }: Pick<ContextDependencies, "config" | "pg" | "logger" | "redis">): Promise<{
7
- user: any;
8
- redirectUrl: string;
9
- }>;
10
- //# sourceMappingURL=login.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/services/login.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,wBAA8B,KAAK,CACjC,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,EACxE,EACE,MAAM,EACN,EAAE,EACF,MAAM,EACN,KAAK,GACN,EAAE,IAAI,CAAC,mBAAmB,EAAE,QAAQ,GAAG,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC;;;GAiCnE"}
@@ -1 +0,0 @@
1
- function _0x3438(_0x41fdb0,_0x424507){_0x41fdb0=_0x41fdb0-0x80;const _0x254c92=_0x254c();let _0x343863=_0x254c92[_0x41fdb0];return _0x343863;}(function(_0x2ffa12,_0x9c3fb3){const _0x22614c=_0x3438,_0x279a51=_0x2ffa12();while(!![]){try{const _0x3436d6=-parseInt(_0x22614c(0x85))/0x1*(-parseInt(_0x22614c(0x96))/0x2)+-parseInt(_0x22614c(0x97))/0x3+-parseInt(_0x22614c(0x94))/0x4*(parseInt(_0x22614c(0x9d))/0x5)+-parseInt(_0x22614c(0x91))/0x6*(-parseInt(_0x22614c(0x9f))/0x7)+-parseInt(_0x22614c(0x8b))/0x8*(parseInt(_0x22614c(0x8c))/0x9)+-parseInt(_0x22614c(0x88))/0xa*(parseInt(_0x22614c(0x8e))/0xb)+parseInt(_0x22614c(0x9b))/0xc;if(_0x3436d6===_0x9c3fb3)break;else _0x279a51['push'](_0x279a51['shift']());}catch(_0x38a20f){_0x279a51['push'](_0x279a51['shift']());}}}(_0x254c,0xedf53));function _0x254c(){const _0x2efe62=['nPYwU','1455bAHWvB','OwxBs','7tRfOCX','yJOub','logger','FXwMK','password','twoFactor','13SGSAaC','base','metrics','3811010DmvSCz','VRbRf','login','7600216IgUOeq','18IznTSl','link','11YcHTCT','user.login','auth','6383298wDTsnT','empty\x20pg','empty\x20user','364hHlmfU','empty\x20redis','234070gCVVen','5225298oOSGEl','SnxrE','twofa','afterLogin','29264868ibVDpd'];_0x254c=function(){return _0x2efe62;};return _0x254c();}import _0xc9e467 from'./verifyPassword.js';export default async function login({ip:_0x4021d5,login:_0xb4931d,password:_0x3c34c2},{config:_0x3b9e3d,pg:_0x4ac7be,logger:_0xa64d9d,redis:_0x2cdba8}){const _0x396696=_0x3438,_0x56396c={'nPYwU':function(_0x3a1ea3,_0x5e584a){return _0x3a1ea3(_0x5e584a);},'SnxrE':_0x396696(0x92),'FXwMK':function(_0x1d2003,_0x5f353d,_0x319df3){return _0x1d2003(_0x5f353d,_0x319df3);},'VRbRf':_0x396696(0x93),'yJOub':_0x396696(0x8f),'OwxBs':function(_0x2ee62f,_0xc728ed){return _0x2ee62f||_0xc728ed;}};if(!_0x4ac7be)throw _0x56396c[_0x396696(0x9c)](Error,_0x56396c[_0x396696(0x98)]);if(!_0x2cdba8)throw _0x56396c[_0x396696(0x9c)](Error,_0x396696(0x95));const _0x3d7e40={};_0x3d7e40[_0x396696(0x8a)]=_0xb4931d,_0x3d7e40[_0x396696(0x83)]=_0x3c34c2,_0x3d7e40['ip']=_0x4021d5;const _0x5798e5={};_0x5798e5['pg']=_0x4ac7be,_0x5798e5[_0x396696(0x81)]=_0xa64d9d;const {user:_0x468c42}=await _0x56396c[_0x396696(0x82)](_0xc9e467,_0x3d7e40,_0x5798e5);if(!_0x468c42)throw new Error(_0x56396c[_0x396696(0x89)]);_0xa64d9d[_0x396696(0x87)](_0x56396c[_0x396696(0x80)]);const _0x35d3dd=_0x468c42[_0x396696(0x99)]?_0x3b9e3d[_0x396696(0x90)][_0x396696(0x8d)]?.[_0x396696(0x84)]?.[_0x396696(0x8a)]:_0x3b9e3d[_0x396696(0x90)][_0x396696(0x8d)]?.[_0x396696(0x86)][_0x396696(0x9a)];return{'user':_0x468c42,'redirectUrl':_0x56396c[_0x396696(0x9e)](_0x35d3dd,'/')};}
@@ -1,9 +0,0 @@
1
- /**
2
- * Implements the logout application service for its module.
3
- */
4
- import type { AppContext, User } from "../../../context.js";
5
- export default function logout(params: {
6
- sessionId?: string;
7
- user?: User;
8
- }, ctx: AppContext): Promise<void>;
9
- //# sourceMappingURL=logout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/services/logout.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC5D,wBAA8B,MAAM,CAClC,MAAM,EAAE;IACN,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,EACD,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,IAAI,CAAC,CAQf"}
@@ -1 +0,0 @@
1
- function _0x42e0(_0x3f99d4,_0x23a702){_0x3f99d4=_0x3f99d4-0x142;var _0x5241bc=_0x5241();var _0x42e09f=_0x5241bc[_0x3f99d4];return _0x42e09f;}function _0x5241(){var _0x4dde4e=['9dmzJBI','afvgF','6150284xDNfxh','action','25642GFMjcB','audit','fQkQm','sessionId','3414815rSYKMk','723884iYPxXm','userId','resourceId','auth','resource','2659168NhRyIw','198297gcJpQI','6gStagF','module','8698480GBYnDc','session','user','write','logout'];_0x5241=function(){return _0x4dde4e;};return _0x5241();}(function(_0x4b4ccc,_0x2e595c){var _0x53bbb8=_0x42e0,_0x36a1ae=_0x4b4ccc();while(!![]){try{var _0x16cb80=parseInt(_0x53bbb8(0x152))/0x1+-parseInt(_0x53bbb8(0x14d))/0x2*(-parseInt(_0x53bbb8(0x149))/0x3)+-parseInt(_0x53bbb8(0x157))/0x4+-parseInt(_0x53bbb8(0x151))/0x5*(-parseInt(_0x53bbb8(0x142))/0x6)+parseInt(_0x53bbb8(0x14b))/0x7+-parseInt(_0x53bbb8(0x144))/0x8+-parseInt(_0x53bbb8(0x158))/0x9;if(_0x16cb80===_0x2e595c)break;else _0x36a1ae['push'](_0x36a1ae['shift']());}catch(_0x4e1419){_0x36a1ae['push'](_0x36a1ae['shift']());}}}(_0x5241,0x8639b));export default async function logout(_0x1c1dfc,_0x195c3f){var _0x35bd21=_0x42e0,_0x1e63dd={};_0x1e63dd[_0x35bd21(0x14a)]=_0x35bd21(0x155),_0x1e63dd[_0x35bd21(0x14f)]=_0x35bd21(0x145);var _0x172151=_0x1e63dd,_0x1d7a13={};_0x1d7a13[_0x35bd21(0x143)]=_0x172151[_0x35bd21(0x14a)],_0x1d7a13[_0x35bd21(0x156)]=_0x172151[_0x35bd21(0x14f)],_0x1d7a13[_0x35bd21(0x154)]=_0x1c1dfc[_0x35bd21(0x150)],_0x1d7a13[_0x35bd21(0x14c)]=_0x35bd21(0x148),_0x1d7a13[_0x35bd21(0x153)]=_0x1c1dfc[_0x35bd21(0x146)]?.['id'],await _0x195c3f[_0x35bd21(0x14e)]?.[_0x35bd21(0x147)]?.(_0x1d7a13);}
@@ -1,11 +0,0 @@
1
- import { ContextDependencies } from "../../../context.js";
2
- export declare function hashPassword(password: string): string;
3
- export declare function verifyPasswordWithoutSalt(password: string, stored: string): boolean;
4
- export default function verifyPassword({ login, password, ip, }: {
5
- login: string;
6
- password: string;
7
- ip: string;
8
- }, { pg, logger }: Pick<ContextDependencies, "pg" | "logger">): Promise<{
9
- user: any;
10
- }>;
11
- //# sourceMappingURL=verifyPassword.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verifyPassword.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/services/verifyPassword.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAQ,MAAM,qBAAqB,CAAC;AAOhE,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIrD;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAST;AAED,wBAA8B,cAAc,CAC1C,EACE,KAAK,EACL,QAAQ,EACR,EAAE,GACH,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;CACZ,EACD,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,mBAAmB,EAAE,IAAI,GAAG,QAAQ,CAAC;;GAmE3D"}
@@ -1 +0,0 @@
1
- (function(_0x410aad,_0x17baf1){const _0x3f9c36=_0x4906,_0x4af1a7=_0x410aad();while(!![]){try{const _0x1e50bd=-parseInt(_0x3f9c36(0x15b))/0x1+parseInt(_0x3f9c36(0x189))/0x2*(parseInt(_0x3f9c36(0x199))/0x3)+-parseInt(_0x3f9c36(0x167))/0x4+-parseInt(_0x3f9c36(0x14f))/0x5+-parseInt(_0x3f9c36(0x18c))/0x6*(-parseInt(_0x3f9c36(0x184))/0x7)+-parseInt(_0x3f9c36(0x162))/0x8+parseInt(_0x3f9c36(0x197))/0x9*(parseInt(_0x3f9c36(0x15a))/0xa);if(_0x1e50bd===_0x17baf1)break;else _0x4af1a7['push'](_0x4af1a7['shift']());}catch(_0x454722){_0x4af1a7['push'](_0x4af1a7['shift']());}}}(_0x6370,0xf0786));import _0x7205d4 from'apache-crypt';import _0x303b71 from'node:crypto';function _0x4906(_0x4de3e5,_0x5c5258){_0x4de3e5=_0x4de3e5-0x14e;const _0x6370a5=_0x6370();let _0x4906e7=_0x6370a5[_0x4de3e5];return _0x4906e7;}import{BadRequestError}from'../../../errors.js';function md5(_0x147527){const _0x28ff2d=_0x4906,_0x4b8127={};_0x4b8127[_0x28ff2d(0x16a)]=_0x28ff2d(0x150);const _0x5780b4=_0x4b8127;return _0x303b71[_0x28ff2d(0x164)](_0x28ff2d(0x183))[_0x28ff2d(0x173)](_0x147527)[_0x28ff2d(0x195)](_0x5780b4[_0x28ff2d(0x16a)]);}export function hashPassword(_0x34e576){const _0x907763=_0x4906,_0x3401b5={};_0x3401b5[_0x907763(0x161)]=_0x907763(0x150);const _0x3a53eb=_0x3401b5,_0x5162a9=_0x303b71[_0x907763(0x19a)](0x10)[_0x907763(0x169)](_0x907763(0x150)),_0x1bda7f=_0x303b71[_0x907763(0x159)](_0x34e576,_0x5162a9,0x40)[_0x907763(0x169)](_0x3a53eb[_0x907763(0x161)]);return _0x907763(0x17b)+_0x5162a9+'$'+_0x1bda7f;}function _0x6370(){const _0x59d8ec=['scryptSync','1478190YxEseU','1763512ZWhjID','select\x20uid\x20as\x20id,\x20user_type\x20as\x20type,\x20password,\x20salt\x20from\x20admin.users\x20where\x20$1\x20in\x20(login,email,phone)\x20and\x20enabled\x20limit\x201','then','crypt','FnwMY','timingSafeEqual','LgXXm','5493336GjDKRE','password_new_hash_algorithm','createHash','rows','gPlfA','374692hTEzYT','kgkeh','toString','fJtEV','user','from','bmqnz','TIVSr','IGnFs','salt','LjXPc','split','update','not\x20enough\x20params:\x20login','CPjxT','empty\x20pg','bkZXN','PukeX','gQlru','ITdEn','scrypt$','rdhgk','YAjGp','fLcsN','IBXeT','DUcHg','auth/warn','hvKeS','md5','14sGlFuo','loCjL','jfvIO','length','query','132030otQYQh','qzvVl','LSpgv','3600738XvQwbX','scrypt','user\x20not\x20found','login','SELECT\x20public.crypt($1,\x20$2)','pnxXe','NoThf','kLont','password','digest','bfRMV','99OrZQwU','RgBJH','81uFBCGN','randomBytes','jbwUI','error','ihXzN','Wrong\x20password','5399210XhknVP','hex','file','gwQjo','YqCUP','info','fXLio','not\x20enough\x20params:\x20password','XWGGg','CRHEr'];_0x6370=function(){return _0x59d8ec;};return _0x6370();}export function verifyPasswordWithoutSalt(_0x5feb43,_0x3cd009){const _0x460c17=_0x4906,_0x4722a2={};_0x4722a2[_0x460c17(0x17a)]=function(_0x2b5af0,_0x589c68){return _0x2b5af0!==_0x589c68;},_0x4722a2[_0x460c17(0x193)]=_0x460c17(0x18d),_0x4722a2[_0x460c17(0x185)]=_0x460c17(0x150),_0x4722a2[_0x460c17(0x191)]=function(_0x5d352e,_0x25529e){return _0x5d352e===_0x25529e;};const _0x1840ac=_0x4722a2,[_0x241fcf,_0x29507b,_0x6baa59]=_0x3cd009[_0x460c17(0x172)]('$');if(_0x1840ac[_0x460c17(0x17a)](_0x241fcf,_0x1840ac[_0x460c17(0x193)])||!_0x29507b||!_0x6baa59)return![];const _0x333267=_0x303b71[_0x460c17(0x159)](_0x5feb43,_0x29507b,0x40),_0x2da50c=Buffer[_0x460c17(0x16c)](_0x6baa59,_0x1840ac[_0x460c17(0x185)]);return _0x1840ac[_0x460c17(0x191)](_0x2da50c[_0x460c17(0x187)],_0x333267[_0x460c17(0x187)])&&_0x303b71[_0x460c17(0x160)](_0x2da50c,_0x333267);}export default async function verifyPassword({login:_0x5112ad,password:_0x76bc53,ip:_0x424395},{pg:_0x442661,logger:_0x101765}){const _0x104f23=_0x4906,_0x5e4568={'LjXPc':_0x104f23(0x183),'gQlru':_0x104f23(0x150),'DUcHg':_0x104f23(0x174),'jbwUI':function(_0x52b971,_0x5fd818){return _0x52b971+_0x5fd818;},'jfvIO':function(_0x495e46,_0x47ee70){return _0x495e46!==_0x47ee70;},'gwQjo':_0x104f23(0x192),'FnwMY':_0x104f23(0x166),'IGnFs':_0x104f23(0x176),'fXLio':function(_0x5ec883,_0x177c40){return _0x5ec883===_0x177c40;},'YqCUP':function(_0x41e6c4,_0x52a0d7){return _0x41e6c4===_0x52a0d7;},'kgkeh':_0x104f23(0x156),'qzvVl':_0x104f23(0x15c),'bfRMV':_0x104f23(0x181),'ihXzN':function(_0x280412,_0x2b9999){return _0x280412!==_0x2b9999;},'RgBJH':_0x104f23(0x158),'PukeX':_0x104f23(0x157),'CPjxT':_0x104f23(0x18b),'rdhgk':_0x104f23(0x182),'bkZXN':_0x104f23(0x14e),'fLcsN':function(_0x9307ea,_0x4bcee8){return _0x9307ea<_0x4bcee8;},'bmqnz':function(_0x5d739f,_0x5e6989){return _0x5d739f+_0x5e6989;},'IBXeT':function(_0x415cd8,_0x3d9051,_0x426352){return _0x415cd8(_0x3d9051,_0x426352);},'TIVSr':_0x104f23(0x17d)};if(!_0x442661){if(_0x5e4568[_0x104f23(0x186)](_0x5e4568[_0x104f23(0x152)],_0x5e4568[_0x104f23(0x15f)]))throw new Error(_0x5e4568[_0x104f23(0x16f)]);else{const _0x22c845={..._0x2c5726};_0x22c845[_0x104f23(0x194)]=_0x10d8ff,_0x22c845[_0x104f23(0x170)]=_0x360b3a;const _0x3edc94={};return _0x3edc94[_0x104f23(0x16b)]=_0x22c845,_0x3edc94;}}if(!_0x5112ad||_0x5e4568[_0x104f23(0x155)](_0x5112ad,''))throw new BadRequestError(_0x5e4568[_0x104f23(0x180)]);if(!_0x76bc53||_0x5e4568[_0x104f23(0x153)](_0x76bc53,''))throw new BadRequestError(_0x5e4568[_0x104f23(0x168)]);const _0x37620f=_0x5e4568[_0x104f23(0x18a)],_0x1759bb=await _0x442661[_0x104f23(0x188)](_0x37620f,[_0x5112ad])[_0x104f23(0x15d)](_0x233a77=>_0x233a77[_0x104f23(0x165)]?.[0x0]);if(!_0x1759bb){const _0x40990c=_0x104f23(0x18e),_0x31c2b7={};_0x31c2b7[_0x104f23(0x151)]=_0x5e4568[_0x104f23(0x196)],_0x31c2b7[_0x104f23(0x19c)]=_0x40990c,_0x31c2b7[_0x104f23(0x18f)]=_0x5112ad,_0x31c2b7['ip']=_0x424395,_0x101765[_0x104f23(0x154)](_0x31c2b7);throw new BadRequestError(_0x40990c);}if(!_0x1759bb[_0x104f23(0x170)]){const _0x4bcc89=verifyPasswordWithoutSalt(_0x76bc53,_0x1759bb[_0x104f23(0x194)]);if(!_0x4bcc89){if(_0x5e4568[_0x104f23(0x19d)](_0x5e4568[_0x104f23(0x198)],_0x5e4568[_0x104f23(0x178)])){const _0xfd024c=_0x104f23(0x14e),_0x2db24c={};_0x2db24c[_0x104f23(0x151)]=_0x5e4568[_0x104f23(0x196)],_0x2db24c[_0x104f23(0x19c)]=_0xfd024c,_0x2db24c[_0x104f23(0x18f)]=_0x5112ad,_0x2db24c['ip']=_0x424395,_0x101765[_0x104f23(0x154)](_0x2db24c);throw new BadRequestError(_0xfd024c);}else return _0x319009[_0x104f23(0x164)](PhCSpc[_0x104f23(0x171)])[_0x104f23(0x173)](_0x526c55)[_0x104f23(0x195)](PhCSpc[_0x104f23(0x179)]);}const _0x5b2e0d={..._0x1759bb};_0x5b2e0d[_0x104f23(0x194)]=undefined,_0x5b2e0d[_0x104f23(0x170)]=undefined;const _0x2c2211={};return _0x2c2211[_0x104f23(0x16b)]=_0x5b2e0d,_0x2c2211;}if(_0x5e4568[_0x104f23(0x153)](_0x1759bb[_0x104f23(0x163)],!![])){if(_0x5e4568[_0x104f23(0x175)]===_0x5e4568[_0x104f23(0x17c)])throw new _0x294a21(_0x5e4568[_0x104f23(0x180)]);else{const _0x254e24=await _0x442661[_0x104f23(0x188)](_0x104f23(0x190),[_0x76bc53,_0x1759bb[_0x104f23(0x170)]])[_0x104f23(0x15d)](_0xfeeec7=>_0xfeeec7[_0x104f23(0x165)]?.[0x0]?.[_0x104f23(0x15e)]);if(_0x1759bb[_0x104f23(0x194)]===_0x254e24){const _0x229cd6={..._0x1759bb};_0x229cd6[_0x104f23(0x194)]=undefined,_0x229cd6[_0x104f23(0x170)]=undefined;const _0x5b1eca={};return _0x5b1eca[_0x104f23(0x16b)]=_0x229cd6,_0x5b1eca;}const _0x1db5d2=_0x5e4568[_0x104f23(0x177)],_0x323be1={};_0x323be1[_0x104f23(0x151)]=_0x5e4568[_0x104f23(0x196)],_0x323be1[_0x104f23(0x19c)]=_0x1db5d2,_0x323be1[_0x104f23(0x18f)]=_0x5112ad,_0x323be1['ip']=_0x424395,_0x101765[_0x104f23(0x154)](_0x323be1);throw new BadRequestError(_0x1db5d2);}}let _0x5749d9='';for(let _0x316cca=0x0;_0x5e4568[_0x104f23(0x17e)](_0x316cca,0xa);_0x316cca+=0x1){_0x5749d9=md5(_0x5e4568[_0x104f23(0x16d)](_0x5e4568[_0x104f23(0x19b)](_0x76bc53,_0x5749d9),_0x1759bb[_0x104f23(0x170)]));}_0x5749d9=_0x5e4568[_0x104f23(0x17f)](_0x7205d4,_0x5749d9,_0x1759bb[_0x104f23(0x170)]);if(_0x1759bb[_0x104f23(0x194)]===_0x5749d9){if(_0x5e4568[_0x104f23(0x19d)](_0x5e4568[_0x104f23(0x16e)],_0x5e4568[_0x104f23(0x16e)]))_0x32e43f=_0x521aae(_0x5e4568[_0x104f23(0x19b)](_0x5e4568[_0x104f23(0x19b)](_0x267277,_0x596390),_0x1a7081[_0x104f23(0x170)]));else{const _0x59b61f={..._0x1759bb};_0x59b61f[_0x104f23(0x194)]=undefined,_0x59b61f[_0x104f23(0x170)]=undefined;const _0x183f7a={};return _0x183f7a[_0x104f23(0x16b)]=_0x59b61f,_0x183f7a;}}const _0x372e79=_0x104f23(0x14e),_0x54fb80={};_0x54fb80[_0x104f23(0x151)]=_0x5e4568[_0x104f23(0x196)],_0x54fb80[_0x104f23(0x19c)]=_0x372e79,_0x54fb80[_0x104f23(0x18f)]=_0x5112ad,_0x54fb80['ip']=_0x424395,_0x101765[_0x104f23(0x154)](_0x54fb80);throw new BadRequestError(_0x372e79);}
@@ -1,8 +0,0 @@
1
- /**
2
- * Exports the public surface of this FCore module.
3
- */
4
- export * from './route.js';
5
- export * from './services/upload-file.js';
6
- export * from './services/get-file.js';
7
- export * from './services/resize-file.js';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/file/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,YAAY,CAAC;AAC3B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC"}
@@ -1 +0,0 @@
1
- (function(_0x4d4898,_0x1f34d5){var _0x1df7cf=_0x5a4d,_0x57d6f6=_0x4d4898();while(!![]){try{var _0x1cc51a=-parseInt(_0x1df7cf(0x14a))/0x1*(parseInt(_0x1df7cf(0x145))/0x2)+parseInt(_0x1df7cf(0x147))/0x3+parseInt(_0x1df7cf(0x149))/0x4*(parseInt(_0x1df7cf(0x146))/0x5)+parseInt(_0x1df7cf(0x14b))/0x6*(-parseInt(_0x1df7cf(0x148))/0x7)+-parseInt(_0x1df7cf(0x14e))/0x8+-parseInt(_0x1df7cf(0x14d))/0x9+parseInt(_0x1df7cf(0x14c))/0xa;if(_0x1cc51a===_0x1f34d5)break;else _0x57d6f6['push'](_0x57d6f6['shift']());}catch(_0x5842ad){_0x57d6f6['push'](_0x57d6f6['shift']());}}}(_0x3530,0x49ab0));export*from'./route.js';export*from'./services/upload-file.js';export*from'./services/get-file.js';function _0x3530(){var _0x39b322=['36375eqMAll','1450284qHWUJP','21ztURRc','40vgAtzy','19daCoAx','571398tPqcDN','2499100hLaiuT','510624faKyGC','468848TmvxjX','10874oTKEbF'];_0x3530=function(){return _0x39b322;};return _0x3530();}function _0x5a4d(_0x148f2c,_0x2ab836){_0x148f2c=_0x148f2c-0x145;var _0x35304d=_0x3530();var _0x5a4d54=_0x35304d[_0x148f2c];return _0x5a4d54;}export*from'./services/resize-file.js';
@@ -1,20 +0,0 @@
1
- /**
2
- * Exports the public surface of this FCore module.
3
- */
4
- export * from './route.js';
5
- export * from './services/list-resources.js';
6
- export * from './services/get-resource.js';
7
- export * from './services/create-resource.js';
8
- export * from './services/update-resource.js';
9
- export * from './services/delete-resource.js';
10
- export * from './services/list-resource-relation.js';
11
- export * from './services/create-resource-relation.js';
12
- export * from './services/delete-resource-relation.js';
13
- export * from './services/list-children.js';
14
- export * from './services/search-resource.js';
15
- export * from './services/export-resource.js';
16
- export * from './services/suggest-resource.js';
17
- export * from './services/add-note.js';
18
- export * from './services/add-resource-file.js';
19
- export * from './services/upload-resource-file.js';
20
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/resource/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,YAAY,CAAC;AAC3B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC"}
@@ -1 +0,0 @@
1
- function _0x497e(){var _0x289d41=['1962184PZmfOx','2143lKPtkS','1816yENIWz','322876SoZpJR','55zjaNAR','4065066jeTJqw','1049543hcBTjl','6326946IyYjFm','190HzUoAX','17694dpEejt','550Cfqsrs'];_0x497e=function(){return _0x289d41;};return _0x497e();}(function(_0x4f1309,_0x4f3a79){var _0x3fa140=_0x4ba1,_0x2390f8=_0x4f1309();while(!![]){try{var _0xedde71=-parseInt(_0x3fa140(0x16a))/0x1*(-parseInt(_0x3fa140(0x168))/0x2)+-parseInt(_0x3fa140(0x16e))/0x3+-parseInt(_0x3fa140(0x16c))/0x4*(-parseInt(_0x3fa140(0x16d))/0x5)+-parseInt(_0x3fa140(0x170))/0x6+parseInt(_0x3fa140(0x169))/0x7+parseInt(_0x3fa140(0x16b))/0x8*(-parseInt(_0x3fa140(0x167))/0x9)+-parseInt(_0x3fa140(0x171))/0xa*(-parseInt(_0x3fa140(0x16f))/0xb);if(_0xedde71===_0x4f3a79)break;else _0x2390f8['push'](_0x2390f8['shift']());}catch(_0x1202a0){_0x2390f8['push'](_0x2390f8['shift']());}}}(_0x497e,0xae766));export*from'./route.js';function _0x4ba1(_0x5787e6,_0x38fe7c){_0x5787e6=_0x5787e6-0x167;var _0x497ee2=_0x497e();var _0x4ba154=_0x497ee2[_0x5787e6];return _0x4ba154;}export*from'./services/list-resources.js';export*from'./services/get-resource.js';export*from'./services/create-resource.js';export*from'./services/update-resource.js';export*from'./services/delete-resource.js';export*from'./services/list-resource-relation.js';export*from'./services/create-resource-relation.js';export*from'./services/delete-resource-relation.js';export*from'./services/list-children.js';export*from'./services/search-resource.js';export*from'./services/export-resource.js';export*from'./services/suggest-resource.js';export*from'./services/add-note.js';export*from'./services/add-resource-file.js';export*from'./services/upload-resource-file.js';
@@ -1,6 +0,0 @@
1
- /**
2
- * Implements the list children application service for its module.
3
- */
4
- import type { AppContext } from '../../../context.js';
5
- export declare function listChildren(params: any, ctx: AppContext): Promise<never>;
6
- //# sourceMappingURL=list-children.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-children.d.ts","sourceRoot":"","sources":["../../../../src/modules/resource/services/list-children.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,wBAAsB,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,CAE/E"}
@@ -1 +0,0 @@
1
- function _0x57f0(){var _0x3a760f=['RxMrT','4935432XJCSal','910092nGOixQ','76304TayYen','466604rEzwxc','5579720eQtmNN','17933976kZWafY','84mKCVqo','9ckUwkZ','554225tYYHix','zDiSS','Generic\x20Resource\x20children'];_0x57f0=function(){return _0x3a760f;};return _0x57f0();}(function(_0x234923,_0x1a6ec9){var _0xe8caae=_0x3b80,_0x2530e6=_0x234923();while(!![]){try{var _0x394447=-parseInt(_0xe8caae(0x169))/0x1+parseInt(_0xe8caae(0x16b))/0x2+parseInt(_0xe8caae(0x163))/0x3*(parseInt(_0xe8caae(0x16a))/0x4)+-parseInt(_0xe8caae(0x16c))/0x5+-parseInt(_0xe8caae(0x162))/0x6*(-parseInt(_0xe8caae(0x164))/0x7)+-parseInt(_0xe8caae(0x168))/0x8+parseInt(_0xe8caae(0x161))/0x9;if(_0x394447===_0x1a6ec9)break;else _0x2530e6['push'](_0x2530e6['shift']());}catch(_0x3ac13a){_0x2530e6['push'](_0x2530e6['shift']());}}}(_0x57f0,0xb6c87));function _0x3b80(_0x1572d7,_0x4ee5d3){_0x1572d7=_0x1572d7-0x161;var _0x57f0b6=_0x57f0();var _0x3b8052=_0x57f0b6[_0x1572d7];return _0x3b8052;}import{unsupported}from'../../utils/unsupported.js';export async function listChildren(_0x21d658,_0x56b80f){var _0x36a6ac=_0x3b80,_0xbe9dc8={'RxMrT':function(_0x301749,_0x23fdaf){return _0x301749(_0x23fdaf);},'zDiSS':_0x36a6ac(0x166)};return _0xbe9dc8[_0x36a6ac(0x167)](unsupported,_0xbe9dc8[_0x36a6ac(0x165)]);}
@@ -1,13 +0,0 @@
1
- /**
2
- * Exports the public surface of this FCore module.
3
- */
4
- export * from './route.js';
5
- export * from './services/get-system-settings.js';
6
- export * from './services/update-system-settings.js';
7
- export * from './services/get-system-log.js';
8
- export * from './services/get-audit-log.js';
9
- export * from './services/check-system.js';
10
- export * from './services/get-api-list.js';
11
- export * from './services/list-dictionaries.js';
12
- export * from './services/get-dictionary.js';
13
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/system/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,YAAY,CAAC;AAC3B,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC"}
@@ -1 +0,0 @@
1
- (function(_0x3ea55d,_0x5b612c){var _0x32ad9e=_0x598d,_0x29cb5b=_0x3ea55d();while(!![]){try{var _0x50829d=-parseInt(_0x32ad9e(0xaf))/0x1*(-parseInt(_0x32ad9e(0xad))/0x2)+parseInt(_0x32ad9e(0xaa))/0x3*(parseInt(_0x32ad9e(0xb3))/0x4)+-parseInt(_0x32ad9e(0xa9))/0x5+-parseInt(_0x32ad9e(0xb1))/0x6+-parseInt(_0x32ad9e(0xb2))/0x7*(-parseInt(_0x32ad9e(0xae))/0x8)+-parseInt(_0x32ad9e(0xac))/0x9*(parseInt(_0x32ad9e(0xb0))/0xa)+parseInt(_0x32ad9e(0xb4))/0xb*(parseInt(_0x32ad9e(0xab))/0xc);if(_0x50829d===_0x5b612c)break;else _0x29cb5b['push'](_0x29cb5b['shift']());}catch(_0x5c4b97){_0x29cb5b['push'](_0x29cb5b['shift']());}}}(_0x58cc,0xbd611));export*from'./route.js';export*from'./services/get-system-settings.js';export*from'./services/update-system-settings.js';export*from'./services/get-system-log.js';export*from'./services/get-audit-log.js';export*from'./services/check-system.js';export*from'./services/get-api-list.js';export*from'./services/list-dictionaries.js';function _0x598d(_0xe38d7,_0x3d4b9b){_0xe38d7=_0xe38d7-0xa9;var _0x58cc2a=_0x58cc();var _0x598dfe=_0x58cc2a[_0xe38d7];return _0x598dfe;}export*from'./services/get-dictionary.js';function _0x58cc(){var _0x5e9198=['13WjYZul','20zlNovm','5013408kbWwuJ','1179115wQJbQD','1644brEXGa','18358439rTkmFd','7252045wjtYOT','1569SNptjt','12vTUBlO','3752874rVaixs','179926UZPTUN','40KCJqaD'];_0x58cc=function(){return _0x5e9198;};return _0x58cc();}
@@ -1,3 +0,0 @@
1
- import type { AppContext } from "../../context.js";
2
- export declare function getUserPermissions(ctx: AppContext, userId: string): Promise<string[]>;
3
- //# sourceMappingURL=get-user-permissions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-user-permissions.d.ts","sourceRoot":"","sources":["../../../src/modules/utils/get-user-permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,UAAU,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,EAAE,CAAC,CAcnB"}
@@ -1 +0,0 @@
1
- function _0x1a68(_0x124d9a,_0x2ed281){_0x124d9a=_0x124d9a-0x11c;const _0xb112e4=_0xb112();let _0x1a6824=_0xb112e4[_0x124d9a];return _0x1a6824;}(function(_0x517c9e,_0x363f97){const _0x44bce9=_0x1a68,_0x39baff=_0x517c9e();while(!![]){try{const _0x42c0d3=-parseInt(_0x44bce9(0x11e))/0x1+parseInt(_0x44bce9(0x127))/0x2*(parseInt(_0x44bce9(0x123))/0x3)+-parseInt(_0x44bce9(0x125))/0x4*(-parseInt(_0x44bce9(0x121))/0x5)+-parseInt(_0x44bce9(0x122))/0x6*(parseInt(_0x44bce9(0x12b))/0x7)+parseInt(_0x44bce9(0x126))/0x8*(parseInt(_0x44bce9(0x11f))/0x9)+parseInt(_0x44bce9(0x124))/0xa*(-parseInt(_0x44bce9(0x12c))/0xb)+-parseInt(_0x44bce9(0x11c))/0xc;if(_0x42c0d3===_0x363f97)break;else _0x39baff['push'](_0x39baff['shift']());}catch(_0x478ab3){_0x39baff['push'](_0x39baff['shift']());}}}(_0xb112,0x417df));function _0xb112(){const _0x5a9342=['flatMap','actions','5929DjYvSW','33zRzbMY','2321040OcjQrW','rows','101016rPWyPw','99VdkiAf','\x0a\x20\x20\x20\x20\x20\x20SELECT\x20ra.actions\x0a\x20\x20\x20\x20\x20\x20FROM\x20admin.role_access\x20ra\x0a\x20\x20\x20\x20\x20\x20LEFT\x20JOIN\x20admin.user_roles\x20ur\x20ON\x20ur.role_id\x20=\x20ra.role_id\x0a\x20\x20\x20\x20\x20\x20WHERE\x20ra.user_uid\x20=\x20$1\x20OR\x20ur.user_uid\x20=\x20$1\x0a\x20\x20\x20\x20','2048885ccCzbz','1374VxlwWt','3aDvfGu','939220HydxtD','4KVaJyy','279632rDaEwo','488298AEDNSz','query'];_0xb112=function(){return _0x5a9342;};return _0xb112();}export async function getUserPermissions(_0x1d45b7,_0x50577a){const _0x1bd5d2=_0x1a68,_0x1612b1=await _0x1d45b7['pg'][_0x1bd5d2(0x128)](_0x1bd5d2(0x120),[_0x50577a]);return[...new Set(_0x1612b1[_0x1bd5d2(0x11d)][_0x1bd5d2(0x129)](_0xf96176=>_0xf96176[_0x1bd5d2(0x12a)]??[]))];}