@opengis/fcore 0.0.1-beta.3 → 0.0.1-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +3 -3
- package/README.md +71 -71
- package/dist/config.d.ts +2 -10
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -1
- package/dist/context.js +1 -1
- package/dist/errors.js +1 -1
- package/dist/fastify.d.ts +4 -5
- package/dist/fastify.d.ts.map +1 -1
- package/dist/fastify.js +1 -1
- package/dist/fcore.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/migrations/cli.js +1 -1
- package/dist/migrations/runner.js +1 -1
- package/dist/modules/auth/adduser-cli.d.ts +3 -0
- package/dist/modules/auth/adduser-cli.d.ts.map +1 -0
- package/dist/modules/auth/adduser-cli.js +2 -0
- package/dist/modules/auth/passwd-cli.d.ts +3 -0
- package/dist/modules/auth/passwd-cli.d.ts.map +1 -0
- package/dist/modules/auth/passwd-cli.js +2 -0
- package/dist/modules/auth/permission-cli.d.ts +3 -0
- package/dist/modules/auth/permission-cli.d.ts.map +1 -0
- package/dist/modules/auth/permission-cli.js +2 -0
- package/dist/modules/auth/route.d.ts.map +1 -1
- package/dist/modules/auth/route.js +1 -1
- package/dist/modules/auth/schema.d.ts +7 -1
- package/dist/modules/auth/schema.d.ts.map +1 -1
- package/dist/modules/auth/schema.js +1 -1
- package/dist/modules/auth/services/change-password.d.ts +9 -0
- package/dist/modules/auth/services/change-password.d.ts.map +1 -0
- package/dist/modules/auth/services/change-password.js +1 -0
- package/dist/modules/auth/services/get-current-user.js +1 -1
- package/dist/modules/auth/services/registration.d.ts +14 -0
- package/dist/modules/auth/services/registration.d.ts.map +1 -0
- package/dist/modules/auth/services/registration.js +1 -0
- package/dist/modules/auth/services/verify-two-factor.js +1 -1
- package/dist/modules/file/route.js +1 -1
- package/dist/modules/file/schema.js +1 -1
- package/dist/modules/file/services/get-file.js +1 -1
- package/dist/modules/file/services/resize-file.js +1 -1
- package/dist/modules/file/services/upload-file.js +1 -1
- package/dist/modules/resource/route.d.ts.map +1 -1
- package/dist/modules/resource/route.js +1 -1
- package/dist/modules/resource/schema.js +1 -1
- package/dist/modules/resource/services/add-note.js +1 -1
- package/dist/modules/resource/services/add-resource-file.js +1 -1
- package/dist/modules/resource/services/create-resource-relation.d.ts +8 -2
- package/dist/modules/resource/services/create-resource-relation.d.ts.map +1 -1
- package/dist/modules/resource/services/create-resource-relation.js +1 -1
- package/dist/modules/resource/services/create-resource.js +1 -1
- package/dist/modules/resource/services/delete-resource-relation.d.ts +8 -1
- package/dist/modules/resource/services/delete-resource-relation.d.ts.map +1 -1
- package/dist/modules/resource/services/delete-resource-relation.js +1 -1
- package/dist/modules/resource/services/delete-resource.js +1 -1
- package/dist/modules/resource/services/export-resource.js +1 -1
- package/dist/modules/resource/services/get-resource.js +1 -1
- package/dist/modules/resource/services/list-resource-relation.d.ts +7 -2
- package/dist/modules/resource/services/list-resource-relation.d.ts.map +1 -1
- package/dist/modules/resource/services/list-resource-relation.js +1 -1
- package/dist/modules/resource/services/list-resources.js +1 -1
- package/dist/modules/resource/services/search-resource.js +1 -1
- package/dist/modules/resource/services/suggest-resource.d.ts +10 -4
- package/dist/modules/resource/services/suggest-resource.d.ts.map +1 -1
- package/dist/modules/resource/services/suggest-resource.js +1 -1
- package/dist/modules/resource/services/update-resource.js +1 -1
- package/dist/modules/resource/services/upload-resource-file.js +1 -1
- package/dist/modules/system/route.d.ts +2 -1
- package/dist/modules/system/route.d.ts.map +1 -1
- package/dist/modules/system/route.js +1 -1
- package/dist/modules/system/schema.d.ts +22 -1
- package/dist/modules/system/schema.d.ts.map +1 -1
- package/dist/modules/system/schema.js +1 -1
- package/dist/modules/system/services/check-system.d.ts.map +1 -1
- package/dist/modules/system/services/check-system.js +1 -1
- package/dist/modules/system/services/get-access.d.ts +14 -0
- package/dist/modules/system/services/get-access.d.ts.map +1 -0
- package/dist/modules/system/services/get-access.js +1 -0
- package/dist/modules/system/services/get-api-list.d.ts +4 -1
- package/dist/modules/system/services/get-api-list.d.ts.map +1 -1
- package/dist/modules/system/services/get-api-list.js +1 -1
- package/dist/modules/system/services/get-audit-log.js +1 -1
- package/dist/modules/system/services/get-dictionary.js +1 -1
- package/dist/modules/system/services/get-system-log.d.ts +9 -5
- package/dist/modules/system/services/get-system-log.d.ts.map +1 -1
- package/dist/modules/system/services/get-system-log.js +1 -1
- package/dist/modules/system/services/get-system-settings.js +1 -1
- package/dist/modules/system/services/list-dictionaries.js +1 -1
- package/dist/modules/system/services/set-access.d.ts +16 -0
- package/dist/modules/system/services/set-access.d.ts.map +1 -0
- package/dist/modules/system/services/set-access.js +1 -0
- package/dist/modules/system/services/update-dictionary.d.ts +13 -0
- package/dist/modules/system/services/update-dictionary.d.ts.map +1 -0
- package/dist/modules/system/services/update-dictionary.js +1 -0
- package/dist/modules/system/services/update-system-settings.js +1 -1
- package/dist/modules/utils/require-admin.js +1 -1
- package/dist/modules/utils/safe-user.js +1 -1
- package/dist/modules/utils/unsupported.js +1 -1
- package/dist/plugins/audit/audit.js +1 -1
- package/dist/plugins/audit/index.js +1 -1
- package/dist/plugins/audit/services/write-audit.js +1 -1
- package/dist/plugins/auth/get-user-permissions.d.ts +3 -0
- package/dist/plugins/auth/get-user-permissions.d.ts.map +1 -0
- package/dist/plugins/auth/get-user-permissions.js +1 -0
- package/dist/plugins/auth/index.d.ts +4 -0
- package/dist/plugins/auth/index.d.ts.map +1 -1
- package/dist/plugins/auth/index.js +1 -1
- package/dist/plugins/auth/verifyUser.d.ts +9 -0
- package/dist/plugins/auth/verifyUser.d.ts.map +1 -0
- package/dist/plugins/auth/verifyUser.js +1 -0
- package/dist/plugins/dictionary.js +1 -1
- package/dist/plugins/file.js +1 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/logger/index.js +1 -1
- package/dist/plugins/logger/transport.js +1 -1
- package/dist/plugins/pg.js +1 -1
- package/dist/plugins/redis.js +1 -1
- package/dist/plugins/resource/index.js +1 -1
- package/dist/plugins/resource/resource.d.ts.map +1 -1
- package/dist/plugins/resource/resource.js +1 -1
- package/dist/plugins/resource/resource.registry.js +1 -1
- package/dist/plugins/resource/resource.types.d.ts +23 -0
- package/dist/plugins/resource/resource.types.d.ts.map +1 -1
- package/dist/plugins/resource/services/create-relation.d.ts +13 -0
- package/dist/plugins/resource/services/create-relation.d.ts.map +1 -0
- package/dist/plugins/resource/services/create-relation.js +1 -0
- package/dist/plugins/resource/services/create.js +1 -1
- package/dist/plugins/resource/services/delete-relation.d.ts +15 -0
- package/dist/plugins/resource/services/delete-relation.d.ts.map +1 -0
- package/dist/plugins/resource/services/delete-relation.js +1 -0
- package/dist/plugins/resource/services/delete.js +1 -1
- package/dist/plugins/resource/services/find-one.js +1 -1
- package/dist/plugins/resource/services/find-relation.d.ts +12 -0
- package/dist/plugins/resource/services/find-relation.d.ts.map +1 -0
- package/dist/plugins/resource/services/find-relation.js +1 -0
- package/dist/plugins/resource/services/find.js +1 -1
- package/dist/plugins/resource/services/update.js +1 -1
- package/dist/plugins/resource/utils/fields.js +1 -1
- package/dist/plugins/resource/utils/filters.js +1 -1
- package/dist/plugins/resource/utils/permissions.js +1 -1
- package/dist/plugins/resource/utils/sort.js +1 -1
- package/dist/plugins/resource/utils/sql.js +1 -1
- package/dist/shared/getIP.js +1 -1
- package/dist/type.d.ts +14 -0
- package/dist/type.d.ts.map +1 -1
- package/migrations/20260903120000_core_schema.sql +22 -19
- package/migrations/20260903130000_move_notes_files_to_admin.sql +17 -17
- package/migrations/20260903140000_settings_nulls_not_distinct.sql +18 -18
- package/migrations/20260905120000_add_user_foreign_keys.sql +43 -0
- package/package.json +10 -6
- package/dist/modules/auth/index.d.ts +0 -9
- package/dist/modules/auth/index.d.ts.map +0 -1
- package/dist/modules/auth/index.js +0 -1
- package/dist/modules/auth/services/login.d.ts +0 -10
- package/dist/modules/auth/services/login.d.ts.map +0 -1
- package/dist/modules/auth/services/login.js +0 -1
- package/dist/modules/auth/services/logout.d.ts +0 -9
- package/dist/modules/auth/services/logout.d.ts.map +0 -1
- package/dist/modules/auth/services/logout.js +0 -1
- package/dist/modules/auth/services/verifyPassword.d.ts +0 -11
- package/dist/modules/auth/services/verifyPassword.d.ts.map +0 -1
- package/dist/modules/auth/services/verifyPassword.js +0 -1
- package/dist/modules/file/index.d.ts +0 -8
- package/dist/modules/file/index.d.ts.map +0 -1
- package/dist/modules/file/index.js +0 -1
- package/dist/modules/resource/index.d.ts +0 -20
- package/dist/modules/resource/index.d.ts.map +0 -1
- package/dist/modules/resource/index.js +0 -1
- package/dist/modules/resource/services/list-children.d.ts +0 -6
- package/dist/modules/resource/services/list-children.d.ts.map +0 -1
- package/dist/modules/resource/services/list-children.js +0 -1
- package/dist/modules/system/index.d.ts +0 -13
- package/dist/modules/system/index.d.ts.map +0 -1
- package/dist/modules/system/index.js +0 -1
- package/dist/modules/utils/get-user-permissions.d.ts +0 -3
- package/dist/modules/utils/get-user-permissions.d.ts.map +0 -1
- package/dist/modules/utils/get-user-permissions.js +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AppContext, User } from "../../../context.js";
|
|
2
|
+
import { type AccessRecord } from "./get-access.js";
|
|
3
|
+
type AccessInput = {
|
|
4
|
+
resource: string;
|
|
5
|
+
actions: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare function setAccess(params: {
|
|
8
|
+
type: "user" | "role";
|
|
9
|
+
id: string;
|
|
10
|
+
access: AccessInput[];
|
|
11
|
+
user: User;
|
|
12
|
+
}, ctx: AppContext): Promise<{
|
|
13
|
+
access: AccessRecord[];
|
|
14
|
+
}>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=set-access.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-access.d.ts","sourceRoot":"","sources":["../../../../src/modules/system/services/set-access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/D,KAAK,WAAW,GAAG;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,wBAAsB,SAAS,CAC3B,MAAM,EAAE;IACJ,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,IAAI,EAAE,IAAI,CAAC;CACd,EACD,GAAG,EAAE,UAAU,GAChB,OAAO,CAAC;IAAE,MAAM,EAAE,YAAY,EAAE,CAAA;CAAE,CAAC,CA8CrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0xb50de2,_0x2262e7){const _0x13890d=_0x371d,_0x353da0=_0xb50de2();while(!![]){try{const _0x1ebad3=-parseInt(_0x13890d(0x99))/0x1+-parseInt(_0x13890d(0xa1))/0x2*(-parseInt(_0x13890d(0xa5))/0x3)+parseInt(_0x13890d(0x97))/0x4+-parseInt(_0x13890d(0xa8))/0x5+-parseInt(_0x13890d(0xb2))/0x6+-parseInt(_0x13890d(0xad))/0x7+parseInt(_0x13890d(0xa6))/0x8;if(_0x1ebad3===_0x2262e7)break;else _0x353da0['push'](_0x353da0['shift']());}catch(_0x3d1e5f){_0x353da0['push'](_0x353da0['shift']());}}}(_0x220e,0x42225));import{requireAdmin}from'../../utils/require-admin.js';function _0x371d(_0x339f21,_0x52403b){_0x339f21=_0x339f21-0x96;const _0x220e11=_0x220e();let _0x371d98=_0x220e11[_0x339f21];return _0x371d98;}import{getAccess}from'./get-access.js';function _0x220e(){const _0x582258=['UIjnA','102662sGcvMN','zkSOm','connect','DELETE\x20FROM\x20admin.role_access\x20WHERE\x20role_id\x20=\x20$1\x20AND\x20user_uid\x20IS\x20NULL','rkxIU','system:access','access','UEMnU','27730yFVrOO','BEGIN','VeKjP','FcKGP','9aQGKKq','9771024aHjlfo','fGeRu','2354950LeQqcX','release','DELETE\x20FROM\x20admin.role_access\x20WHERE\x20user_uid\x20=\x20$1\x20AND\x20role_id\x20IS\x20NULL','COMMIT','INSERT\x20INTO\x20admin.role_access\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(\x20resource,\x20actions,\x20user_uid,\x20created_by,\x20updated_by)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4,\x20$5)','1873599zFMDBD','actions','type','rWCma','resource','2498190FAIOQe','YrEwB','user','ROLLBACK','query','INSERT\x20INTO\x20admin.role_access\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(\x20resource,\x20actions,\x20role_id,\x20created_by,\x20updated_by)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4,\x20$5)','1062344MSaJNa'];_0x220e=function(){return _0x582258;};return _0x220e();}export async function setAccess(_0x4f943a,_0x5b504b){const _0x205bbc=_0x371d,_0x2a7505={'YrEwB':function(_0xbee1ab,_0x4b52a0,_0x17b149){return _0xbee1ab(_0x4b52a0,_0x17b149);},'FcKGP':_0x205bbc(0x9e),'VeKjP':_0x205bbc(0xa2),'fGeRu':function(_0x331080,_0x1e1a9b){return _0x331080===_0x1e1a9b;},'UIjnA':_0x205bbc(0xb4),'rWCma':_0x205bbc(0xaa),'rkxIU':function(_0x1e7982,_0x42ed75){return _0x1e7982===_0x42ed75;},'UEMnU':_0x205bbc(0xb5),'zkSOm':function(_0x54951e,_0x22cb83,_0x1f339b){return _0x54951e(_0x22cb83,_0x1f339b);}};_0x2a7505[_0x205bbc(0xb3)](requireAdmin,_0x4f943a[_0x205bbc(0xb4)],_0x2a7505[_0x205bbc(0xa4)]);const _0x3b4582=await _0x5b504b['pg'][_0x205bbc(0x9b)]();try{await _0x3b4582[_0x205bbc(0xb6)](_0x2a7505[_0x205bbc(0xa3)]);_0x2a7505[_0x205bbc(0xa7)](_0x4f943a[_0x205bbc(0xaf)],_0x2a7505[_0x205bbc(0x98)])?await _0x3b4582[_0x205bbc(0xb6)](_0x2a7505[_0x205bbc(0xb0)],[_0x4f943a['id']]):await _0x3b4582[_0x205bbc(0xb6)](_0x205bbc(0x9c),[_0x4f943a['id']]);for(const _0x877461 of _0x4f943a[_0x205bbc(0x9f)]){_0x2a7505[_0x205bbc(0x9d)](_0x4f943a[_0x205bbc(0xaf)],_0x2a7505[_0x205bbc(0x98)])?await _0x3b4582[_0x205bbc(0xb6)](_0x205bbc(0xac),[_0x877461[_0x205bbc(0xb1)],_0x877461[_0x205bbc(0xae)],_0x4f943a['id'],_0x4f943a[_0x205bbc(0xb4)]['id'],_0x4f943a[_0x205bbc(0xb4)]['id']]):await _0x3b4582[_0x205bbc(0xb6)](_0x205bbc(0x96),[_0x877461[_0x205bbc(0xb1)],_0x877461[_0x205bbc(0xae)],_0x4f943a['id'],_0x4f943a[_0x205bbc(0xb4)]['id'],_0x4f943a[_0x205bbc(0xb4)]['id']]);}await _0x3b4582[_0x205bbc(0xb6)](_0x205bbc(0xab));}catch(_0x1b264a){await _0x3b4582[_0x205bbc(0xb6)](_0x2a7505[_0x205bbc(0xa0)]);throw _0x1b264a;}finally{_0x3b4582[_0x205bbc(0xa9)]();}return _0x2a7505[_0x205bbc(0x9a)](getAccess,_0x4f943a,_0x5b504b);}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Implements the update dictionary application service for the System module.
|
|
3
|
+
*/
|
|
4
|
+
import type { AppContext, User } from "../../../context.js";
|
|
5
|
+
import type { DictionaryItem } from "../../../plugins/dictionary.js";
|
|
6
|
+
export declare function updateDictionary(params: {
|
|
7
|
+
name: string;
|
|
8
|
+
items: DictionaryItem[];
|
|
9
|
+
user: User;
|
|
10
|
+
}, ctx: AppContext): Promise<{
|
|
11
|
+
success: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
//# sourceMappingURL=update-dictionary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-dictionary.d.ts","sourceRoot":"","sources":["../../../../src/modules/system/services/update-dictionary.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,wBAAsB,gBAAgB,CACpC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,EAC7D,GAAG,EAAE,UAAU,GACd,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAK/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x1a68cc,_0xa211d){var _0x70731d=_0x28ee,_0x38dc60=_0x1a68cc();while(!![]){try{var _0x42889d=parseInt(_0x70731d(0x18b))/0x1*(-parseInt(_0x70731d(0x17e))/0x2)+parseInt(_0x70731d(0x17d))/0x3*(-parseInt(_0x70731d(0x182))/0x4)+-parseInt(_0x70731d(0x184))/0x5*(parseInt(_0x70731d(0x17c))/0x6)+-parseInt(_0x70731d(0x181))/0x7+parseInt(_0x70731d(0x186))/0x8+parseInt(_0x70731d(0x185))/0x9+parseInt(_0x70731d(0x17b))/0xa*(parseInt(_0x70731d(0x189))/0xb);if(_0x42889d===_0xa211d)break;else _0x38dc60['push'](_0x38dc60['shift']());}catch(_0x43e466){_0x38dc60['push'](_0x38dc60['shift']());}}}(_0x3ec2,0xcc95b));import{requireAdmin}from'../../utils/require-admin.js';function _0x28ee(_0xf287fe,_0x1a999c){_0xf287fe=_0xf287fe-0x179;var _0x3ec254=_0x3ec2();var _0x28eeff=_0x3ec254[_0xf287fe];return _0x28eeff;}export async function updateDictionary(_0x28090b,_0x26dcd0){var _0x48958a=_0x28ee,_0x2568a4={'aQDMd':function(_0x53b3f9,_0x1a343d,_0x292951){return _0x53b3f9(_0x1a343d,_0x292951);},'rpuoc':_0x48958a(0x179)};_0x2568a4[_0x48958a(0x188)](requireAdmin,_0x28090b[_0x48958a(0x17a)],_0x2568a4[_0x48958a(0x183)]),await _0x26dcd0[_0x48958a(0x18c)][_0x48958a(0x187)](_0x28090b[_0x48958a(0x18a)],_0x28090b[_0x48958a(0x180)]);var _0x2bac38={};return _0x2bac38[_0x48958a(0x17f)]=!![],_0x2bac38;}function _0x3ec2(){var _0x59342a=['items','291655vvfuXP','1911064prpajZ','rpuoc','26150COwtPx','13521159dzeduc','487896QpyWnd','put','aQDMd','190586ZCXxCZ','name','332YQZKZz','dictionary','system:dictionaries','user','1670KsnVuU','1788gFlEJt','6metRnv','6404KQLgwC','success'];_0x3ec2=function(){return _0x59342a;};return _0x3ec2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14c413,_0x9334e4){const _0x1809eb=_0x50e8,_0x182946=_0x14c413();while(!![]){try{const _0x2335c7=-parseInt(_0x1809eb(0x8f))/0x1+parseInt(_0x1809eb(0x81))/0x2+parseInt(_0x1809eb(0x94))/0x3*(parseInt(_0x1809eb(0x88))/0x4)+-parseInt(_0x1809eb(0x91))/0x5+-parseInt(_0x1809eb(0x84))/0x6*(-parseInt(_0x1809eb(0x8d))/0x7)+parseInt(_0x1809eb(0x80))/0x8+-parseInt(_0x1809eb(0x85))/0x9;if(_0x2335c7===_0x9334e4)break;else _0x182946['push'](_0x182946['shift']());}catch(_0x3d6ab3){_0x182946['push'](_0x182946['shift']());}}}(_0x5b89,0xa9753));function _0x5b89(){const _0x1ca977=['emraa','4295816wAWRrb','586020NtdGqt','query','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.settings\x20(resource,\x20resource_id,\x20key,\x20value,\x20updated_by)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20(\x27system\x27,\x20NULL,\x20$1,\x20$2::jsonb,\x20$3)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ON\x20CONFLICT\x20(resource,\x20resource_id,\x20key)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20DO\x20UPDATE\x20SET\x20value\x20=\x20EXCLUDED.value,\x20updated_by\x20=\x20EXCLUDED.updated_by,\x20updated_at\x20=\x20now()\x0a\x20\x20\x20\x20\x20\x20\x20\x20','2418qKbePm','3496554iBIQSY','patch','length','118748nXsiki','Settings\x20patch\x20is\x20empty','OiwmY','entries','keys','9597fryVur','success','886651HFilWC','includes','183355wJESwf','system:settings','PXQOo','63pcpKxP','user','Invalid\x20setting\x20key:\x20','stringify','trim'];_0x5b89=function(){return _0x1ca977;};return _0x5b89();}import{requireAdmin}from'../../utils/require-admin.js';function _0x50e8(_0xa82e04,_0x4547ee){_0xa82e04=_0xa82e04-0x7f;const _0x5b8981=_0x5b89();let _0x50e831=_0x5b8981[_0xa82e04];return _0x50e831;}import{ValidationError}from'../../../errors.js';export async function updateSystemSettings(_0x56c182,_0x520e51){const _0x3671b7=_0x50e8,_0x23c93c={'PXQOo':function(_0x5051ae,_0x5a26c7,_0x785d19){return _0x5051ae(_0x5a26c7,_0x785d19);},'OiwmY':_0x3671b7(0x92),'emraa':_0x3671b7(0x89)};_0x23c93c[_0x3671b7(0x93)](requireAdmin,_0x56c182[_0x3671b7(0x95)],_0x23c93c[_0x3671b7(0x8a)]);if(!Object[_0x3671b7(0x8c)](_0x56c182[_0x3671b7(0x86)])[_0x3671b7(0x87)])throw new ValidationError(_0x23c93c[_0x3671b7(0x7f)]);for(const [_0x490c2a,_0x580a56]of Object[_0x3671b7(0x8b)](_0x56c182[_0x3671b7(0x86)])){if(!_0x490c2a[_0x3671b7(0x98)]()||_0x490c2a[_0x3671b7(0x90)]('..'))throw new ValidationError(_0x3671b7(0x96)+_0x490c2a);await _0x520e51['pg'][_0x3671b7(0x82)](_0x3671b7(0x83),[_0x490c2a,JSON[_0x3671b7(0x97)](_0x580a56),_0x56c182[_0x3671b7(0x95)]['id']]);}const _0x52444f={};return _0x52444f[_0x3671b7(0x8e)]=!![],_0x52444f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x3894(_0x321af9,_0xb9b37a){_0x321af9=_0x321af9-0x1cc;var _0x16ae53=_0x16ae();var _0x389429=_0x16ae53[_0x321af9];return _0x389429;}(function(_0x13d005,_0x19f391){var _0x500223=_0x3894,_0x51c9bb=_0x13d005();while(!![]){try{var _0x3c7623=-parseInt(_0x500223(0x1dd))/0x1+-parseInt(_0x500223(0x1df))/0x2*(-parseInt(_0x500223(0x1d1))/0x3)+-parseInt(_0x500223(0x1cc))/0x4+parseInt(_0x500223(0x1d0))/0x5+parseInt(_0x500223(0x1d7))/0x6*(parseInt(_0x500223(0x1d5))/0x7)+parseInt(_0x500223(0x1dc))/0x8*(parseInt(_0x500223(0x1d3))/0x9)+-parseInt(_0x500223(0x1d9))/0xa;if(_0x3c7623===_0x19f391)break;else _0x51c9bb['push'](_0x51c9bb['shift']());}catch(_0x4d09ef){_0x51c9bb['push'](_0x51c9bb['shift']());}}}(_0x16ae,0x2dc7c));function _0x16ae(){var _0x383237=['admin','9BmBbby','Admin\x20access\x20required','29085ARJdqB','type','282BHNqOt','jgBYR','1817680nQSsUE','includes','User\x20required','1331240vnOdFg','112775fyMIeD','Missing\x20permission:\x20','5602yCXBQD','815364gXUwDx','permissions','hGNOV','YiMsO','1551025ZqldKZ','15GxEfEf'];_0x16ae=function(){return _0x383237;};return _0x16ae();}import{ForbiddenError}from'../../errors.js';export function requireAdmin(_0x20b44a,_0x2978a2){var _0x4c38c8=_0x3894,_0x59c61a={};_0x59c61a[_0x4c38c8(0x1cf)]=_0x4c38c8(0x1db),_0x59c61a[_0x4c38c8(0x1d8)]=function(_0x51e988,_0x1048d9){return _0x51e988!==_0x1048d9;},_0x59c61a[_0x4c38c8(0x1ce)]=_0x4c38c8(0x1d2);var _0x28bd47=_0x59c61a;if(!_0x20b44a)throw new ForbiddenError(_0x28bd47[_0x4c38c8(0x1cf)]);if(_0x28bd47[_0x4c38c8(0x1d8)](_0x20b44a[_0x4c38c8(0x1d6)],_0x28bd47[_0x4c38c8(0x1ce)]))throw new ForbiddenError(_0x4c38c8(0x1d4));if(_0x20b44a[_0x4c38c8(0x1d6)]!==_0x28bd47[_0x4c38c8(0x1ce)]&&_0x2978a2&&!_0x20b44a[_0x4c38c8(0x1cd)]?.[_0x4c38c8(0x1da)](_0x2978a2))throw new ForbiddenError(_0x4c38c8(0x1de)+_0x2978a2);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x233a53,_0x27ae40){const _0x574388=_0x2e72,_0xe9ec8c=_0x233a53();while(!![]){try{const _0x2ed5d5=parseInt(_0x574388(0xb9))/0x1*(parseInt(_0x574388(0xa7))/0x2)+parseInt(_0x574388(0xac))/0x3*(parseInt(_0x574388(0xa5))/0x4)+-parseInt(_0x574388(0xad))/0x5+-parseInt(_0x574388(0xb1))/0x6+-parseInt(_0x574388(0xa9))/0x7*(-parseInt(_0x574388(0xa6))/0x8)+-parseInt(_0x574388(0xae))/0x9+parseInt(_0x574388(0xab))/0xa*(parseInt(_0x574388(0xb5))/0xb);if(_0x2ed5d5===_0x27ae40)break;else _0xe9ec8c['push'](_0xe9ec8c['shift']());}catch(_0x4ca634){_0xe9ec8c['push'](_0xe9ec8c['shift']());}}}(_0x3c36,0x69e61));function _0x2e72(_0x5041f7,_0x5e5e9a){_0x5041f7=_0x5041f7-0xa2;const _0x3c36d4=_0x3c36();let _0x2e72c1=_0x3c36d4[_0x5041f7];return _0x2e72c1;}function _0x3c36(){const _0x3a52b1=['secret','password','WoLuJ','token','3093016GvWLoY','1485592yeyPeI','2uVuDij','qjfKl','21EDQQXm','toLowerCase','10PaWSPC','3ANWGQS','3639415SGdNfN','3403926xjIZrU','entries','credentials','4260078WDGbkf','includes','VYyMC','some','8892191TovBAm','filter','fromEntries','salt','111139NAlVGu'];_0x3c36=function(){return _0x3a52b1;};return _0x3c36();}export const safeUser=_0x2b2d9e=>{const _0x507ac7=_0x2e72,_0x56e320={};_0x56e320[_0x507ac7(0xa3)]=_0x507ac7(0xa2),_0x56e320[_0x507ac7(0xa8)]=_0x507ac7(0xba),_0x56e320[_0x507ac7(0xb3)]=_0x507ac7(0xb0);const _0x777357=_0x56e320,_0x437626=[_0x777357[_0x507ac7(0xa3)],_0x507ac7(0xb8),_0x507ac7(0xa4),_0x777357[_0x507ac7(0xa8)],_0x777357[_0x507ac7(0xb3)]];return Object[_0x507ac7(0xb7)](Object[_0x507ac7(0xaf)](_0x2b2d9e)[_0x507ac7(0xb6)](([_0x5c70f4])=>!_0x437626[_0x507ac7(0xb4)](_0x2e6a30=>_0x5c70f4[_0x507ac7(0xaa)]()[_0x507ac7(0xb2)](_0x2e6a30))));};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x420090,_0x105480){var _0x48580d=_0x3680,_0x4c6fb2=_0x420090();while(!![]){try{var _0x59a7ba=-parseInt(_0x48580d(0x1e3))/0x1+parseInt(_0x48580d(0x1e1))/0x2+-parseInt(_0x48580d(0x1de))/0x3*(-parseInt(_0x48580d(0x1e2))/0x4)+-parseInt(_0x48580d(0x1e0))/0x5*(parseInt(_0x48580d(0x1e4))/0x6)+parseInt(_0x48580d(0x1e7))/0x7*(-parseInt(_0x48580d(0x1e6))/0x8)+parseInt(_0x48580d(0x1e9))/0x9+parseInt(_0x48580d(0x1e5))/0xa*(parseInt(_0x48580d(0x1df))/0xb);if(_0x59a7ba===_0x105480)break;else _0x4c6fb2['push'](_0x4c6fb2['shift']());}catch(_0x1e3160){_0x4c6fb2['push'](_0x4c6fb2['shift']());}}}(_0x2833,0xeeddf));function _0x2833(){var _0x4ba437=['16OisPTr','699217uoyniL','8335158sNKGhj','1010VUzlRJ','1249664fsKEkM','14MRjztc','\x20requires\x20a\x20project/provider\x20implementation','7023123WYhtIp','402342NlfuaB','182402NTehpF','5eKnoBP','775280UvJAzA'];_0x2833=function(){return _0x4ba437;};return _0x2833();}import{UnsupportedError}from'../../errors.js';function _0x3680(_0x8465b4,_0x25ef52){_0x8465b4=_0x8465b4-0x1de;var _0x28338b=_0x2833();var _0x3680a0=_0x28338b[_0x8465b4];return _0x3680a0;}export function unsupported(_0x42cc7f){var _0xc20b71=_0x3680;throw new UnsupportedError(_0x42cc7f+_0xc20b71(0x1e8));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x542822,_0x57887d){const _0x58e4ab=_0x56bb,_0x26d303=_0x542822();while(!![]){try{const _0x28ab4c=parseInt(_0x58e4ab(0x104))/0x1+-parseInt(_0x58e4ab(0x101))/0x2+parseInt(_0x58e4ab(0x105))/0x3+parseInt(_0x58e4ab(0x107))/0x4*(-parseInt(_0x58e4ab(0xfe))/0x5)+parseInt(_0x58e4ab(0xff))/0x6*(-parseInt(_0x58e4ab(0x108))/0x7)+-parseInt(_0x58e4ab(0x102))/0x8+-parseInt(_0x58e4ab(0x103))/0x9*(-parseInt(_0x58e4ab(0x100))/0xa);if(_0x28ab4c===_0x57887d)break;else _0x26d303['push'](_0x26d303['shift']());}catch(_0x21c01a){_0x26d303['push'](_0x26d303['shift']());}}}(_0x473e,0xd980e));import{writeAudit}from'./services/write-audit.js';function _0x56bb(_0x1b4c88,_0x411bc9){_0x1b4c88=_0x1b4c88-0xfd;const _0x473e83=_0x473e();let _0x56bbed=_0x473e83[_0x1b4c88];return _0x56bbed;}export function createAudit(_0x1bf917){const _0x2a2c50=_0x56bb,_0x5a75df={'MtkoF':function(_0x162fb4,_0x303b22){return _0x162fb4(_0x303b22);}},_0x454c2c=_0x5a75df[_0x2a2c50(0xfd)](writeAudit,_0x1bf917),_0x5911cd={};return _0x5911cd[_0x2a2c50(0x106)]=_0x454c2c,_0x5911cd;}function _0x473e(){const _0x198c74=['2247231faSaXn','write','3243188maDhel','791SJnsgA','MtkoF','5RjlANk','84108bGyOux','600YhGJWK','2852002boEekz','3236792UcTpVD','514872RyHmIJ','934768GAHlhz'];_0x473e=function(){return _0x198c74;};return _0x473e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x5816(_0x2ec9b4,_0x2d744c){_0x2ec9b4=_0x2ec9b4-0x1cc;var _0x216842=_0x2168();var _0x581610=_0x216842[_0x2ec9b4];return _0x581610;}(function(_0x29d3c6,_0x340962){var _0x33239e=_0x5816,_0x477a71=_0x29d3c6();while(!![]){try{var _0x5dd294=-parseInt(_0x33239e(0x1d0))/0x1+-parseInt(_0x33239e(0x1d1))/0x2+-parseInt(_0x33239e(0x1cd))/0x3+-parseInt(_0x33239e(0x1d3))/0x4+parseInt(_0x33239e(0x1d2))/0x5+-parseInt(_0x33239e(0x1ce))/0x6*(parseInt(_0x33239e(0x1cf))/0x7)+-parseInt(_0x33239e(0x1cc))/0x8*(-parseInt(_0x33239e(0x1d4))/0x9);if(_0x5dd294===_0x340962)break;else _0x477a71['push'](_0x477a71['shift']());}catch(_0x25bbe2){_0x477a71['push'](_0x477a71['shift']());}}}(_0x2168,0x97830));export*from'./audit.types.js';export*from'./audit.js';function _0x2168(){var _0x24c597=['403021NTcFQx','524148rqrVjQ','1234165UtVrIc','2265492MKnFOY','18fveMfJ','11813992mFGPmy','2949777fuAYJz','2190072snyazS','7wYjzFG'];_0x2168=function(){return _0x24c597;};return _0x2168();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1cde2a,_0x14ace5){const _0x115a05=_0x1060,_0x98a10a=_0x1cde2a();while(!![]){try{const _0x1b484d=-parseInt(_0x115a05(0x1d0))/0x1*(-parseInt(_0x115a05(0x1db))/0x2)+parseInt(_0x115a05(0x1f4))/0x3+-parseInt(_0x115a05(0x1f9))/0x4+-parseInt(_0x115a05(0x1ec))/0x5*(-parseInt(_0x115a05(0x1f7))/0x6)+parseInt(_0x115a05(0x1d9))/0x7*(parseInt(_0x115a05(0x1e7))/0x8)+parseInt(_0x115a05(0x214))/0x9+-parseInt(_0x115a05(0x1d3))/0xa;if(_0x1b484d===_0x14ace5)break;else _0x98a10a['push'](_0x98a10a['shift']());}catch(_0x504555){_0x98a10a['push'](_0x98a10a['shift']());}}}(_0x5563,0x60e8b));const secretPattern=/password|token|secret|credential|salt/i;function _0x5563(){const _0x58088f=['KCLaF','MrBsE','gdidv','MXaHd','rows','\x0a\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.audit_log\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20user_id,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20module,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20resource,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20resource_id,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fields,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20action,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20request_id,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ip_address,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20metadata\x0a\x20\x20\x20\x20\x20\x20\x20\x20)\x0a\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4,\x20$5,\x20$6,\x20$7,\x20$8,\x20$9)\x0a\x20\x20\x20\x20\x20\x20\x20\x20RETURNING\x20id\x0a\x20\x20\x20\x20\x20\x20','72272tYlWDQ','ipAddress','VhtJN','requestId','rHJSE','70LEhqou','admin.audit_log_data','empty\x20pg','Yypom','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.audit_log_data\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20audit_log_id,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20field,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20old_value,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20new_value\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4)\x0a\x20\x20\x20\x20\x20\x20\x20\x20','fromEntries','hWKxS','qkzSn','959367kFpRwl','expectedTables','oldValue','32106hQLiUU','tpucT','206440HgJfgo','xqoUP','uaKzt','RSUfc','nfiqm','query','object','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_schema\x20=\x20\x27admin\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_name\x20IN\x20(\x27audit_log\x27,\x20\x27audit_log_data\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20','action','RgVMf','vRdHz','iOGHo','info','Lqhpl','warn','nhiXF','logger','test','map','resourceId','changes','LwxUb','KXYNj','module','Xdoib','audit','Unable\x20to\x20check\x20audit\x20tables;\x20audit\x20writes\x20are\x20disabled','892548FYuheP','BLQwz','Audit\x20tables\x20are\x20unavailable;\x20audit\x20writes\x20are\x20disabled','iEHZX','then','err','entries','oyKFt','catch','mciFy','userId','isArray','has','fPsqn','table_name','stringify','fields','[REDACTED]','field','metadata','17IrHCVS','YMzYy','IUEQA','8691650ypVnrR','hTcEQ','rZJHZ','MEmIY','audit_log_data','resource','427gGOodK','admin.audit_log','32090KDxQPT','newValue','ZhoaR','nqIsM','audit_log','foundTables'];_0x5563=function(){return _0x58088f;};return _0x5563();}function clean(_0x3e4776){const _0x39915d=_0x1060,_0x23ec0c={};_0x23ec0c[_0x39915d(0x1e9)]=function(_0x3ba40d,_0x1fcabb){return _0x3ba40d===_0x1fcabb;},_0x23ec0c[_0x39915d(0x215)]=_0x39915d(0x1ff);const _0x441cd3=_0x23ec0c;if(Array[_0x39915d(0x21f)](_0x3e4776))return _0x3e4776[_0x39915d(0x20b)](clean);if(_0x3e4776&&_0x441cd3[_0x39915d(0x1e9)](typeof _0x3e4776,_0x441cd3[_0x39915d(0x215)]))return Object[_0x39915d(0x1f1)](Object[_0x39915d(0x21a)](_0x3e4776)[_0x39915d(0x20b)](([_0x1201bb,_0x4bcbd7])=>[_0x1201bb,secretPattern[_0x39915d(0x20a)](_0x1201bb)?_0x39915d(0x1cd):clean(_0x4bcbd7)]));return _0x3e4776;}function _0x1060(_0x3688c8,_0x2dcf7f){_0x3688c8=_0x3688c8-0x1cd;const _0x556349=_0x5563();let _0x106056=_0x556349[_0x3688c8];return _0x106056;}export function writeAudit(_0x1429f5){const _0x3e6ac3=_0x1060,_0x575459={'nhiXF':_0x3e6ac3(0x213),'MEmIY':_0x3e6ac3(0x1df),'iEHZX':_0x3e6ac3(0x1ed),'hTcEQ':_0x3e6ac3(0x216),'LwxUb':function(_0x495d0e,_0x5dd62e){return _0x495d0e===_0x5dd62e;},'Yypom':_0x3e6ac3(0x1d5),'nqIsM':function(_0x472eb6,_0x6a226a){return _0x472eb6!==_0x6a226a;},'qkzSn':_0x3e6ac3(0x1d2),'MrBsE':_0x3e6ac3(0x1d7),'ZhoaR':_0x3e6ac3(0x1ee),'Lqhpl':function(_0x207309){return _0x207309();},'RgVMf':_0x3e6ac3(0x1fd),'oyKFt':function(_0x1fb0a5,_0x3e4f7c){return _0x1fb0a5==_0x3e4f7c;},'uaKzt':function(_0x52acf4,_0x4c3c30){return _0x52acf4(_0x4c3c30);},'Xdoib':function(_0x45b1fc,_0xfccd70){return _0x45b1fc===_0xfccd70;},'rHJSE':_0x3e6ac3(0x1fc),'vRdHz':_0x3e6ac3(0x1f2),'fPsqn':_0x3e6ac3(0x1e1),'YMzYy':_0x3e6ac3(0x204),'tpucT':function(_0x1c9caf,_0x1a8948){return _0x1c9caf(_0x1a8948);}};let _0x55c99c,_0x1dad25;async function _0x425973(){const _0x23af2f=_0x3e6ac3,_0xc5749c={};_0xc5749c[_0x23af2f(0x20f)]=_0x575459[_0x23af2f(0x208)],_0xc5749c[_0x23af2f(0x1e3)]=_0x575459[_0x23af2f(0x1d6)],_0xc5749c[_0x23af2f(0x1e4)]=_0x575459[_0x23af2f(0x217)],_0xc5749c[_0x23af2f(0x21d)]=_0x575459[_0x23af2f(0x1d4)];const _0x53ed70=_0xc5749c;if(_0x575459[_0x23af2f(0x20e)](_0x575459[_0x23af2f(0x1ef)],_0x23af2f(0x1d5))){if(!_0x1429f5['pg'])return![];if(_0x55c99c!==undefined){if(_0x575459[_0x23af2f(0x1de)](_0x23af2f(0x1fa),_0x575459[_0x23af2f(0x1f3)]))return _0x55c99c;else{_0x107b44=![];const _0x11ca58={};return _0x11ca58[_0x23af2f(0x219)]=_0xf54777,_0x42a18e[_0x23af2f(0x209)][_0x23af2f(0x207)](_0x11ca58,_0x53ed70[_0x23af2f(0x20f)]),![];}}return _0x1dad25??=_0x1429f5['pg'][_0x23af2f(0x1fe)](_0x23af2f(0x200))[_0x23af2f(0x218)](_0x11120b=>{const _0x4cadb2=_0x23af2f,_0x2a7af4=new Set(_0x11120b[_0x4cadb2(0x1e5)][_0x4cadb2(0x20b)](_0x13d562=>_0x13d562[_0x4cadb2(0x222)]));_0x55c99c=_0x2a7af4[_0x4cadb2(0x220)](_0x53ed70[_0x4cadb2(0x1e3)])&&_0x2a7af4[_0x4cadb2(0x220)](_0x4cadb2(0x1d7));if(!_0x55c99c){const _0xd5d5b8={};_0xd5d5b8[_0x4cadb2(0x1f5)]=[_0x4cadb2(0x1da),_0x53ed70[_0x4cadb2(0x1e4)]],_0xd5d5b8[_0x4cadb2(0x1e0)]=[..._0x2a7af4],_0x1429f5[_0x4cadb2(0x209)][_0x4cadb2(0x207)](_0xd5d5b8,_0x53ed70[_0x4cadb2(0x21d)]);}return _0x55c99c;})[_0x23af2f(0x21c)](_0xf44ae=>{const _0x39b08c=_0x23af2f;_0x55c99c=![];const _0x15190c={};return _0x15190c[_0x39b08c(0x219)]=_0xf44ae,_0x1429f5[_0x39b08c(0x209)][_0x39b08c(0x207)](_0x15190c,_0x39b08c(0x213)),![];}),_0x1dad25;}else return _0x157063[_0x23af2f(0x1f1)](_0x285cdb[_0x23af2f(0x21a)](_0xb3334c)[_0x23af2f(0x20b)](([_0x345d72,_0x16cd6a])=>[_0x345d72,_0xb8d4da[_0x23af2f(0x20a)](_0x345d72)?_0x23af2f(0x1cd):_0x1efb74(_0x16cd6a)]));}return async function _0x584a21(_0x1b6c3a){const _0xfd2fd8=_0x3e6ac3;if(!await _0x575459[_0xfd2fd8(0x206)](_0x425973))return _0x1429f5[_0xfd2fd8(0x209)][_0xfd2fd8(0x205)]({'auditFallback':!![],'event':clean({..._0x1b6c3a,'changes':_0x1b6c3a[_0xfd2fd8(0x20d)]?.[_0xfd2fd8(0x20b)](_0x590968=>({..._0x590968,'oldValue':clean(_0x590968[_0xfd2fd8(0x1f6)]),'newValue':clean(_0x590968[_0xfd2fd8(0x1dc)])}))})},_0xfd2fd8(0x212)),0x0;if(!_0x1429f5['pg']){if(_0x575459[_0xfd2fd8(0x202)]!==_0x575459[_0xfd2fd8(0x202)])return _0x4b63ec[_0xfd2fd8(0x20b)](_0x28e23c);else throw new Error(_0x575459[_0xfd2fd8(0x1dd)]);}const _0x36090a=await _0x1429f5['pg'][_0xfd2fd8(0x1fe)](_0xfd2fd8(0x1e6),[_0x1b6c3a[_0xfd2fd8(0x21e)]??null,_0x1b6c3a[_0xfd2fd8(0x210)],_0x1b6c3a[_0xfd2fd8(0x1d8)],_0x575459[_0xfd2fd8(0x21b)](_0x1b6c3a[_0xfd2fd8(0x20c)],null)?null:String(_0x1b6c3a[_0xfd2fd8(0x20c)]),_0x1b6c3a[_0xfd2fd8(0x224)]??null,_0x1b6c3a[_0xfd2fd8(0x201)],_0x1b6c3a[_0xfd2fd8(0x1ea)]??null,_0x1b6c3a[_0xfd2fd8(0x1e8)]??null,_0x575459[_0xfd2fd8(0x1fb)](clean,_0x1b6c3a[_0xfd2fd8(0x1cf)]??{})]),_0x1c52c8=_0x36090a[_0xfd2fd8(0x1e5)][0x0]['id'];for(const _0x311b3d of _0x1b6c3a[_0xfd2fd8(0x20d)]??[]){if(_0x575459[_0xfd2fd8(0x211)](_0x575459[_0xfd2fd8(0x1eb)],_0x575459[_0xfd2fd8(0x203)])){const _0x2e51df=new _0x4b9df9(_0x39ddb1[_0xfd2fd8(0x1e5)][_0xfd2fd8(0x20b)](_0x30323b=>_0x30323b[_0xfd2fd8(0x222)]));_0x21af0d=_0x2e51df[_0xfd2fd8(0x220)](_0x575459[_0xfd2fd8(0x1d6)])&&_0x2e51df[_0xfd2fd8(0x220)](_0x575459[_0xfd2fd8(0x1e2)]);if(!_0x56a354){const _0x4190b7={};_0x4190b7[_0xfd2fd8(0x1f5)]=[_0xfd2fd8(0x1da),_0xfd2fd8(0x1ed)],_0x4190b7[_0xfd2fd8(0x1e0)]=[..._0x2e51df],_0x30fdba[_0xfd2fd8(0x209)][_0xfd2fd8(0x207)](_0x4190b7,_0x575459[_0xfd2fd8(0x1d4)]);}return _0x425fa0;}else{if(secretPattern[_0xfd2fd8(0x20a)](_0x311b3d[_0xfd2fd8(0x1ce)])){if(_0x575459[_0xfd2fd8(0x20e)](_0x575459[_0xfd2fd8(0x221)],_0x575459[_0xfd2fd8(0x1d1)]))throw new _0x55426f(_0x575459[_0xfd2fd8(0x1dd)]);else continue;}await _0x1429f5['pg'][_0xfd2fd8(0x1fe)](_0xfd2fd8(0x1f0),[_0x1c52c8,_0x311b3d[_0xfd2fd8(0x1ce)],JSON[_0xfd2fd8(0x223)](clean(_0x311b3d[_0xfd2fd8(0x1f6)])),JSON[_0xfd2fd8(0x223)](_0x575459[_0xfd2fd8(0x1f8)](clean,_0x311b3d[_0xfd2fd8(0x1dc)]))]);}}return _0x1c52c8;};}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-user-permissions.d.ts","sourceRoot":"","sources":["../../../src/plugins/auth/get-user-permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,GACnC,OAAO,CAAC,MAAM,EAAE,CAAC,CAenB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x4559d9,_0x2140b9){const _0x171d98=_0x548a,_0x3a064f=_0x4559d9();while(!![]){try{const _0x36e4b8=-parseInt(_0x171d98(0x1f4))/0x1*(parseInt(_0x171d98(0x1f3))/0x2)+parseInt(_0x171d98(0x1f5))/0x3*(parseInt(_0x171d98(0x1ff))/0x4)+-parseInt(_0x171d98(0x1fb))/0x5*(parseInt(_0x171d98(0x1fa))/0x6)+-parseInt(_0x171d98(0x1f6))/0x7*(parseInt(_0x171d98(0x1f9))/0x8)+-parseInt(_0x171d98(0x1ee))/0x9+-parseInt(_0x171d98(0x1f7))/0xa*(parseInt(_0x171d98(0x1f0))/0xb)+parseInt(_0x171d98(0x1f8))/0xc*(parseInt(_0x171d98(0x1fe))/0xd);if(_0x36e4b8===_0x2140b9)break;else _0x3a064f['push'](_0x3a064f['shift']());}catch(_0x1f7969){_0x3a064f['push'](_0x3a064f['shift']());}}}(_0x8a59,0xc1072));function _0x548a(_0x1e2e6f,_0x1010a2){_0x1e2e6f=_0x1e2e6f-0x1ee;const _0x8a597a=_0x8a59();let _0x548add=_0x8a597a[_0x1e2e6f];return _0x548add;}function _0x8a59(){const _0x283b61=['558371IVtjvW','\x0a\x20\x20\x20\x20\x20\x20SELECT\x20DISTINCT\x20ra.resource\x20||\x20\x27:\x27\x20||\x20action\x20AS\x20permission\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\x20CROSS\x20JOIN\x20LATERAL\x20unnest(COALESCE(ra.actions,\x20\x27{}\x27::text[]))\x20AS\x20action\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','permission','2QplUdJ','665900fnwyFX','12cXQias','56JytlyC','60zjAVPE','6121344xuKXdv','1188712VuejXq','5766630UPQhjj','5mpZzQp','query','map','117DmmMsx','865168vdxbNd','13907259gMeBSj','rows'];_0x8a59=function(){return _0x283b61;};return _0x8a59();}export async function getUserPermissions(_0x4a2bae,_0x44b9cb){const _0x285059=_0x548a,_0x1c11b8=await _0x44b9cb['pg'][_0x285059(0x1fc)](_0x285059(0x1f1),[_0x4a2bae]);return _0x1c11b8[_0x285059(0x1ef)][_0x285059(0x1fd)](_0x4adb9c=>_0x4adb9c[_0x285059(0x1f2)]);}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export * from "./auth.types.js";
|
|
2
2
|
import { type FastifyInstance } from "fastify";
|
|
3
3
|
import { type ContextDependencies } from "../../context.js";
|
|
4
|
+
export * from "./verifyUser.js";
|
|
5
|
+
export * from "./get-user-permissions.js";
|
|
6
|
+
export declare function hashPassword(password: string): Promise<string>;
|
|
7
|
+
export declare function verifyPassword(password: string, stored: string): Promise<boolean>;
|
|
4
8
|
export declare function createSessionStore(app: FastifyInstance, ctx: ContextDependencies): Promise<void>;
|
|
5
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAUhC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAO/C,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAI5D,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAE1C,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAKpE;AAED,wBAAsB,cAAc,CAClC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,OAAO,CAAC,CAiBlB;AAED,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,mBAAmB,iBA6CzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x797def,_0x33f89f){const _0x3cc2e1=_0x4049,_0x594485=_0x797def();while(!![]){try{const _0x260309=-parseInt(_0x3cc2e1(0x1d5))/0x1*(-parseInt(_0x3cc2e1(0x1d9))/0x2)+parseInt(_0x3cc2e1(0x1bf))/0x3*(parseInt(_0x3cc2e1(0x1c2))/0x4)+parseInt(_0x3cc2e1(0x1ca))/0x5*(parseInt(_0x3cc2e1(0x1ce))/0x6)+parseInt(_0x3cc2e1(0x1cc))/0x7+-parseInt(_0x3cc2e1(0x1b4))/0x8+parseInt(_0x3cc2e1(0x1cd))/0x9*(parseInt(_0x3cc2e1(0x1d0))/0xa)+parseInt(_0x3cc2e1(0x1b6))/0xb*(-parseInt(_0x3cc2e1(0x1bb))/0xc);if(_0x260309===_0x33f89f)break;else _0x594485['push'](_0x594485['shift']());}catch(_0x1a2b02){_0x594485['push'](_0x594485['shift']());}}}(_0x466b,0x4f280));export*from'./auth.types.js';import{randomBytes,scrypt as _0x5677bc,timingSafeEqual}from'node:crypto';import{promisify}from'node:util';const scrypt=promisify(_0x5677bc);import _0x26d3c1 from'@fastify/cookie';import _0x15f004 from'@fastify/session';function _0x466b(){const _0x6dd4fd=['scrypt$','split','97700EgJyKu','register','ibGJA','BHzCy','permissions','registerUserDeserializer','secret','5083952cXSTfi','from','451TZSjDk','warn','toString','user','qRvLG','174396hbAwDK','Missing\x20config\x20or\x20redis\x20-\x20skipping\x20session\x20store\x20creation','cookieName','length','186JrJRul','initialize','HKkif','21592EyYnuy','secureSession','hex','qxwsJ','database','test','KiKFh','registerUserSerializer','111890SsBlTn','HXoXJ','2496410mXHJvd','1561221fPtqNn','66tvlUlD','ZJlqL','30jFNeGM','auth','cookieOptions','parseOptions','yuQKS','2BrZOtZ','scrypt'];_0x466b=function(){return _0x6dd4fd;};return _0x466b();}import{Authenticator}from'@fastify/passport';import _0x3ad01c from'fastify-session-redis-store';import{getUserPermissions}from'./get-user-permissions.js';function _0x4049(_0x4820ff,_0xba4116){_0x4820ff=_0x4820ff-0x1af;const _0x466b81=_0x466b();let _0x40490b=_0x466b81[_0x4820ff];return _0x40490b;}const fastifyPassport=new Authenticator();export*from'./verifyUser.js';export*from'./get-user-permissions.js';export async function hashPassword(_0x37615e){const _0x24142f=_0x4049,_0x481f27={};_0x481f27[_0x24142f(0x1cf)]=_0x24142f(0x1c4);const _0x256697=_0x481f27,_0x5f26a1=randomBytes(0x10),_0x598fcd=await scrypt(_0x37615e,_0x5f26a1,0x40);return _0x24142f(0x1d7)+_0x5f26a1[_0x24142f(0x1b8)](_0x256697[_0x24142f(0x1cf)])+'$'+_0x598fcd[_0x24142f(0x1b8)](_0x24142f(0x1c4));}export async function verifyPassword(_0x5852b9,_0x422409){const _0x40532a=_0x4049,_0x4a83e7={'HKkif':function(_0x16f51b,_0x8340ef){return _0x16f51b!==_0x8340ef;},'HXoXJ':_0x40532a(0x1c4),'qRvLG':function(_0x43f964,_0x469c2e,_0x51a4bf,_0x35eda9){return _0x43f964(_0x469c2e,_0x51a4bf,_0x35eda9);},'KiKFh':function(_0x5dae23,_0xceed48,_0x567dbb){return _0x5dae23(_0xceed48,_0x567dbb);}},[_0x143c55,_0x3971f7,_0x5bece4]=_0x422409[_0x40532a(0x1d8)]('$');if(_0x4a83e7[_0x40532a(0x1c1)](_0x143c55,_0x40532a(0x1d6))||!_0x3971f7||!_0x5bece4)return![];const _0x21ae0b=Buffer[_0x40532a(0x1b5)](_0x3971f7,_0x4a83e7[_0x40532a(0x1cb)]),_0x4bef58=Buffer[_0x40532a(0x1b5)](_0x5bece4,_0x4a83e7[_0x40532a(0x1cb)]),_0x4a3518=await _0x4a83e7[_0x40532a(0x1ba)](scrypt,_0x5852b9,_0x21ae0b,_0x4bef58[_0x40532a(0x1be)]);return _0x4a83e7[_0x40532a(0x1c8)](timingSafeEqual,_0x4a3518,_0x4bef58);}export async function createSessionStore(_0x32faf1,_0x63d607){const _0x2656c9=_0x4049,_0x3dce78={'yuQKS':function(_0x52ce2b,_0x3af2a2,_0x5c0d97){return _0x52ce2b(_0x3af2a2,_0x5c0d97);},'ibGJA':function(_0x30d941,_0x392209){return _0x30d941||_0x392209;},'qxwsJ':_0x2656c9(0x1bc),'BHzCy':_0x2656c9(0x1c7)},{config:_0x40e10f,redis:_0x2aab68}=_0x63d607;if(_0x3dce78[_0x2656c9(0x1af)](!_0x40e10f,!_0x2aab68)){console[_0x2656c9(0x1b7)](_0x3dce78[_0x2656c9(0x1c5)]);return;}if(process.env.NODE_ENV===_0x3dce78[_0x2656c9(0x1b0)]||process.env.VITEST)return;const _0xbd1249={};_0xbd1249[_0x2656c9(0x1d3)]=_0x40e10f[_0x2656c9(0x1d1)][_0x2656c9(0x1d2)],await _0x32faf1[_0x2656c9(0x1da)](_0x26d3c1,_0xbd1249),await _0x32faf1[_0x2656c9(0x1da)](_0x15f004,{'secret':_0x40e10f[_0x2656c9(0x1d1)][_0x2656c9(0x1b3)],'cookieName':_0x40e10f[_0x2656c9(0x1d1)][_0x2656c9(0x1bd)],'cookie':_0x40e10f[_0x2656c9(0x1d1)][_0x2656c9(0x1d2)],'store':new _0x3ad01c({'prefix':_0x40e10f[_0x2656c9(0x1d1)][_0x2656c9(0x1bd)]+':'+(_0x40e10f['pg']?.[_0x2656c9(0x1c6)]||'db')+':','client':_0x2aab68})}),await _0x32faf1[_0x2656c9(0x1da)](fastifyPassport[_0x2656c9(0x1c0)]()),await _0x32faf1[_0x2656c9(0x1da)](fastifyPassport[_0x2656c9(0x1c3)]()),fastifyPassport[_0x2656c9(0x1c9)](async _0x593006=>({'user':_0x593006})),fastifyPassport[_0x2656c9(0x1b2)](async _0x5abe35=>{const _0x5b208b=_0x2656c9,_0x4ab90a=_0x5abe35?.[_0x5b208b(0x1b9)]||_0x5abe35;return _0x4ab90a?.['id']&&(_0x4ab90a[_0x5b208b(0x1b1)]=await _0x3dce78[_0x5b208b(0x1d4)](getUserPermissions,_0x4ab90a['id'],_0x63d607)),_0x4ab90a;});}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ContextDependencies } from "../../context.js";
|
|
2
|
+
type params = {
|
|
3
|
+
user: string;
|
|
4
|
+
password: string;
|
|
5
|
+
ip?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function verifyUser({ user, password, ip, }: params, { pg, logger }: Pick<ContextDependencies, "pg" | "logger">): Promise<import("./auth.types.js").AuthUser>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=verifyUser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyUser.d.ts","sourceRoot":"","sources":["../../../src/plugins/auth/verifyUser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAQ,MAAM,kBAAkB,CAAC;AAI7D,KAAK,MAAM,GAAG;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,wBAAsB,UAAU,CAC9B,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,MAAM,EAC/B,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,mBAAmB,EAAE,IAAI,GAAG,QAAQ,CAAC,+CAgC3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x58059a,_0x2074dd){const _0x479d40=_0x4e11,_0x527589=_0x58059a();while(!![]){try{const _0x34e10c=-parseInt(_0x479d40(0x139))/0x1+-parseInt(_0x479d40(0x14a))/0x2*(-parseInt(_0x479d40(0x140))/0x3)+-parseInt(_0x479d40(0x13a))/0x4*(parseInt(_0x479d40(0x136))/0x5)+-parseInt(_0x479d40(0x14c))/0x6*(parseInt(_0x479d40(0x12d))/0x7)+parseInt(_0x479d40(0x141))/0x8*(parseInt(_0x479d40(0x130))/0x9)+-parseInt(_0x479d40(0x14f))/0xa*(parseInt(_0x479d40(0x13d))/0xb)+parseInt(_0x479d40(0x144))/0xc;if(_0x34e10c===_0x2074dd)break;else _0x527589['push'](_0x527589['shift']());}catch(_0x4b274c){_0x527589['push'](_0x527589['shift']());}}}(_0x5274,0x1a50a));import{BadRequestError}from'../../errors.js';function _0x4e11(_0x50714b,_0x479c4e){_0x50714b=_0x50714b-0x12d;const _0x5274f3=_0x5274();let _0x4e11cb=_0x5274f3[_0x50714b];return _0x4e11cb;}import{verifyPassword}from'./index.js';function _0x5274(){const _0x35d55e=['162PaPyzH','1816ZeMMtP','error','rows','1757952GusGuC','jeJml','auth/warn','user','then','query','5462OaUGbe','info','73806YmiYBy','not\x20enough\x20params:\x20user','user\x20not\x20found','30usjSFS','91EEajKH','IQtti','password_hash','8298QWKGId','select\x20uid\x20as\x20id,\x20user_type\x20as\x20type,\x20password_hash,\x20twofa\x20from\x20admin.users\x20where\x20$1\x20in\x20(login,email,phone)\x20and\x20enabled\x20limit\x201','rAuRl','qAISz','Wrong\x20password','not\x20enough\x20params:\x20password','2435hMOpbA','file','Xpybb','69855xQwCvv','740yszEUQ','user.login','MlauL','277255QDlZvb','metrics','TnZkB'];_0x5274=function(){return _0x35d55e;};return _0x5274();}export async function verifyUser({user:_0x391424,password:_0x162049,ip:_0x123b0f},{pg:_0x5048bb,logger:_0x49e37b}){const _0x5de9e1=_0x4e11,_0x5a7b9c={'jeJml':function(_0x162f28,_0x23ec79){return _0x162f28===_0x23ec79;},'TnZkB':_0x5de9e1(0x135),'rAuRl':_0x5de9e1(0x13b),'IQtti':_0x5de9e1(0x14e),'qAISz':_0x5de9e1(0x146),'Xpybb':function(_0x283b70,_0x3bd6be,_0x2c495e){return _0x283b70(_0x3bd6be,_0x2c495e);},'MlauL':_0x5de9e1(0x134)};if(!_0x391424||_0x5a7b9c[_0x5de9e1(0x145)](_0x391424,''))throw new BadRequestError(_0x5de9e1(0x14d));if(!_0x162049||_0x5a7b9c[_0x5de9e1(0x145)](_0x162049,''))throw new BadRequestError(_0x5a7b9c[_0x5de9e1(0x13f)]);_0x49e37b[_0x5de9e1(0x13e)](_0x5a7b9c[_0x5de9e1(0x132)]);const _0x19f4dc=_0x5de9e1(0x131),_0x5832c1=await _0x5048bb[_0x5de9e1(0x149)](_0x19f4dc,[_0x391424])[_0x5de9e1(0x148)](_0x5b648a=>_0x5b648a[_0x5de9e1(0x143)]?.[0x0]);if(!_0x5832c1){const _0x2c1300=_0x5a7b9c[_0x5de9e1(0x12e)],_0x5f5201={};_0x5f5201[_0x5de9e1(0x137)]=_0x5a7b9c[_0x5de9e1(0x133)],_0x5f5201[_0x5de9e1(0x142)]=_0x2c1300,_0x5f5201[_0x5de9e1(0x147)]=_0x391424,_0x5f5201['ip']=_0x123b0f,_0x49e37b[_0x5de9e1(0x14b)](_0x5f5201);throw new BadRequestError(_0x2c1300);}const _0x11be3b=await _0x5a7b9c[_0x5de9e1(0x138)](verifyPassword,_0x162049,_0x5832c1[_0x5de9e1(0x12f)]);if(!_0x11be3b){const _0x295a41=_0x5a7b9c[_0x5de9e1(0x13c)],_0x1ee9be={};_0x1ee9be[_0x5de9e1(0x137)]=_0x5a7b9c[_0x5de9e1(0x133)],_0x1ee9be[_0x5de9e1(0x142)]=_0x295a41,_0x1ee9be[_0x5de9e1(0x147)]=_0x391424,_0x1ee9be['ip']=_0x123b0f,_0x49e37b[_0x5de9e1(0x14b)](_0x1ee9be);throw new BadRequestError(_0x295a41);}return delete _0x5832c1[_0x5de9e1(0x12f)],_0x5832c1;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x290b48,_0x360b81){const _0x36b07f=_0x3c65,_0x59fc85=_0x290b48();while(!![]){try{const _0x34932e=parseInt(_0x36b07f(0x242))/0x1*(parseInt(_0x36b07f(0x1f2))/0x2)+-parseInt(_0x36b07f(0x252))/0x3+-parseInt(_0x36b07f(0x220))/0x4+parseInt(_0x36b07f(0x214))/0x5*(parseInt(_0x36b07f(0x23b))/0x6)+-parseInt(_0x36b07f(0x236))/0x7+-parseInt(_0x36b07f(0x253))/0x8+-parseInt(_0x36b07f(0x21d))/0x9;if(_0x34932e===_0x360b81)break;else _0x59fc85['push'](_0x59fc85['shift']());}catch(_0x3ff6e0){_0x59fc85['push'](_0x59fc85['shift']());}}}(_0x1373,0xe46d4));function _0x1373(){const _0x4e8e8b=['XJtjW','hwdTC','then','SAWfc','6bbAPXi','Invalid\x20dictionary\x20items:\x20','Dictionary\x20table\x20not\x20found','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20di.id,\x20di.code,\x20di.name,\x20di.parent_id\x20AS\x20\x22parentId\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20admin.dictionary_items\x20di\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20JOIN\x20admin.dictionaries\x20d\x20ON\x20d.id\x20=\x20di.dictionary_id\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20d.code\x20=\x20$1\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20di.name\x0a\x20\x20\x20\x20\x20\x20\x20\x20','oTFWm','baElX','release','1219KMghCM','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.dictionary_items\x20(dictionary_id,\x20code,\x20name,\x20parent_id)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Invalid\x20dictionary\x20name:\x20','Dictionary\x20not\x20found:\x20','TMKbm','length','kbKTo','DELETE\x20FROM\x20admin.dictionary_items\x20WHERE\x20dictionary_id\x20=\x20$1','Kuane','code','QfmEk','ZPrig','gzuxQ','dCZHP','get','uloPV','3747840dOMRKf','105776JolZyb','LSulM','YMrPG','table_name','nhqXi','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20code,\x20name,\x20\x27database\x27\x20AS\x20source\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20admin.dictionaries\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20name\x0a\x20\x20\x20\x20\x20\x20\x20\x20','cKXRN','connect','LLDgN','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.dictionaries\x20(code,\x20name,\x20module,\x20source,\x20editable)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4,\x20$5)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ON\x20CONFLICT\x20(code)\x20DO\x20UPDATE\x20SET\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20name\x20=\x20EXCLUDED.name,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20module\x20=\x20EXCLUDED.module,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20source\x20=\x20EXCLUDED.source,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20editable\x20=\x20EXCLUDED.editable,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updated_at\x20=\x20now()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20RETURNING\x20id\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','2914jgUoSa','JDkOy','VyKDe','XTpag','BEGIN','SQylw','items','ikEpN','name','mrdDr','test','jgAmF','empty\x20pg','ROLLBACK','punDe','Jvxuo','fcore','PYskT','list','isArray','map','zMrhW','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_schema\x20=\x20\x27admin\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_name\x20=\x20\x27dictionaries\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20LIMIT\x201\x0a\x20\x20\x20\x20\x20\x20\x20\x20','TsaII','aOEmD','register','push','delete','clear','ZOURG','YRJUq','set','AurCr','yNKon','8411695FQstLJ','static','IFvyR','database','rows','dictionaries','FeUEh','znrAz','has','4776750iWdrsP','values','zGFiN','1586236nqGulV','YlDuf','parentId','put','TbSUE','Dictionary\x20already\x20registered:\x20','CFoUE','COMMIT','KgZON','hFFcr','fDVGi','fpSKO','tQXpZ','HanWr','aXYXP','Bcufb','Dictionary\x20items\x20must\x20be\x20an\x20array','custom','qnjvr','jYwBY','DCWAv','query','2330825UYFJYU'];_0x1373=function(){return _0x4e8e8b;};return _0x1373();}import{ConflictError,NotFoundError,ValidationError}from'../errors.js';const dictionaryName=/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/;function _0x3c65(_0x431639,_0x121a1a){_0x431639=_0x431639-0x1ee;const _0x1373b2=_0x1373();let _0x3c65f1=_0x1373b2[_0x431639];return _0x3c65f1;}export function createDictionary({pg:_0x4c6ac4,dictionaries:dictionaries=[]}){const _0x30e554=_0x3c65,_0x234d50={'KgZON':_0x30e554(0x1fe),'yNKon':function(_0x2788aa,_0x16aa52){return _0x2788aa===_0x16aa52;},'SQylw':_0x30e554(0x219),'DCWAv':function(_0x7a40d9,_0x17d319){return _0x7a40d9!==_0x17d319;},'fpSKO':_0x30e554(0x207),'CFoUE':_0x30e554(0x1f3),'YlDuf':_0x30e554(0x24a),'qnjvr':_0x30e554(0x215),'ikEpN':function(_0x57dd2e,_0x153bd8){return _0x57dd2e(_0x153bd8);},'mrdDr':function(_0x123100,_0x1b95b4){return _0x123100===_0x1b95b4;},'QfmEk':_0x30e554(0x1f4),'aXYXP':_0x30e554(0x23d),'gzuxQ':_0x30e554(0x1fd),'YRJUq':_0x30e554(0x217),'IFvyR':function(_0x1c5e03,_0x88ee6c){return _0x1c5e03(_0x88ee6c);},'ZPrig':function(_0x2c19dd,_0x4c8b0d){return _0x2c19dd(_0x4c8b0d);},'XJtjW':_0x30e554(0x238),'SAWfc':_0x30e554(0x257),'ZOURG':function(_0x9b91ef){return _0x9b91ef();},'jYwBY':_0x30e554(0x1f6),'fDVGi':_0x30e554(0x231),'kbKTo':_0x30e554(0x249),'cKXRN':_0x30e554(0x1f0),'uloPV':_0x30e554(0x227),'TMKbm':_0x30e554(0x21b),'oTFWm':_0x30e554(0x240),'PYskT':_0x30e554(0x1ff),'LSulM':_0x30e554(0x229),'Jvxuo':function(_0x2d2c58,_0x139bff){return _0x2d2c58(_0x139bff);},'FeUEh':_0x30e554(0x224),'HanWr':function(_0x3390e1,_0x55a261){return _0x3390e1!==_0x55a261;},'TsaII':_0x30e554(0x20a),'punDe':_0x30e554(0x212),'Bcufb':function(_0x375578,_0x3798a9){return _0x375578(_0x3798a9);}},_0x39d76f=new Map();let _0x89fc01,_0x23efbc;async function _0x29dc85(){const _0x45737c=_0x30e554,_0x51990b={'XTpag':_0x234d50[_0x45737c(0x228)],'zGFiN':function(_0x5209e7,_0x369b3f){const _0x4d5e5a=_0x45737c;return _0x234d50[_0x4d5e5a(0x213)](_0x5209e7,_0x369b3f);},'YMrPG':_0x234d50[_0x45737c(0x1f7)]};if(_0x234d50[_0x45737c(0x234)](_0x89fc01,undefined)){if(_0x234d50[_0x45737c(0x22b)]!==_0x234d50[_0x45737c(0x22b)])throw new _0x18d855(_0x51990b[_0x45737c(0x1f5)]);else return _0x89fc01;}if(!_0x4c6ac4)throw new Error(_0x45737c(0x1fe));return _0x23efbc??=_0x4c6ac4[_0x45737c(0x235)](_0x45737c(0x208))[_0x45737c(0x239)](_0x42c8a5=>{const _0x3205f1=_0x45737c,_0x1e80ae=_0x42c8a5[_0x3205f1(0x218)][0x0]?.[_0x3205f1(0x256)];_0x89fc01=_0x51990b[_0x3205f1(0x21f)](_0x1e80ae,_0x51990b[_0x3205f1(0x255)])?_0x1e80ae:null;}),await _0x23efbc,_0x89fc01;}function _0x41aa40(_0x558543){const _0x4c2cb2=_0x30e554,_0x5b00ac={};_0x5b00ac[_0x4c2cb2(0x22c)]=_0x4c2cb2(0x1fe);const _0x313553=_0x5b00ac;if(!dictionaryName[_0x4c2cb2(0x1fc)](_0x558543)){if(_0x234d50[_0x4c2cb2(0x234)](_0x234d50[_0x4c2cb2(0x226)],_0x234d50[_0x4c2cb2(0x226)]))throw new _0x3fc7cb(_0x313553[_0x4c2cb2(0x22c)]);else throw new ValidationError(_0x4c2cb2(0x244)+_0x558543);}}function _0x34f8cd(_0x4e9ae1){const _0x4d6417=_0x30e554;for(const _0x1f148c of Array[_0x4d6417(0x205)](_0x4e9ae1)?_0x4e9ae1:[_0x4e9ae1]){_0x41aa40(_0x1f148c[_0x4d6417(0x24b)]);if(!Array[_0x4d6417(0x205)](_0x1f148c[_0x4d6417(0x1f8)])){if(_0x234d50[_0x4d6417(0x221)]===_0x4d6417(0x24a))throw new ValidationError(_0x4d6417(0x23c)+_0x1f148c[_0x4d6417(0x24b)]);else throw new _0xdedf33(_0x4d6417(0x245)+_0xcb0e87);}if(_0x39d76f[_0x4d6417(0x21c)](_0x1f148c[_0x4d6417(0x24b)]))throw new ConflictError(_0x4d6417(0x225)+_0x1f148c[_0x4d6417(0x24b)]);_0x39d76f[_0x4d6417(0x211)](_0x1f148c[_0x4d6417(0x24b)],{..._0x1f148c,'source':_0x234d50[_0x4d6417(0x232)]});}}async function _0x3437aa(_0x4640a4){const _0x5bbbbb=_0x30e554;_0x234d50[_0x5bbbbb(0x1f9)](_0x41aa40,_0x4640a4);const _0x10d133=_0x39d76f[_0x5bbbbb(0x250)](_0x4640a4);if(_0x10d133)return _0x10d133[_0x5bbbbb(0x1f8)];const _0x4f890d=await _0x29dc85();if(!_0x4f890d){if(_0x234d50[_0x5bbbbb(0x1fb)](_0x234d50[_0x5bbbbb(0x24c)],_0x234d50[_0x5bbbbb(0x24c)]))throw new NotFoundError(_0x234d50[_0x5bbbbb(0x22e)]);else{const _0x2523f9=_0x148fed[_0x5bbbbb(0x218)][0x0]?.[_0x5bbbbb(0x256)];_0x2a4525=_0x2523f9===_0x5bbbbb(0x219)?_0x2523f9:null;}}if(!_0x4c6ac4){if(_0x234d50[_0x5bbbbb(0x213)](_0x234d50[_0x5bbbbb(0x24e)],_0x5bbbbb(0x1fd)))throw new Error(_0x5bbbbb(0x1fe));else!_0x37a20a[_0x5bbbbb(0x21c)](_0x3251d1[_0x5bbbbb(0x24b)])&&_0x1a05f3[_0x5bbbbb(0x20c)](_0x2138f9);}const _0x4ef481=await _0x4c6ac4[_0x5bbbbb(0x235)](_0x5bbbbb(0x23e),[_0x4640a4]);if(!_0x4ef481[_0x5bbbbb(0x218)][_0x5bbbbb(0x247)])throw new NotFoundError(_0x5bbbbb(0x245)+_0x4640a4);const _0x267ac0=_0x4ef481[_0x5bbbbb(0x218)];return _0x39d76f[_0x5bbbbb(0x211)](_0x4640a4,{'code':_0x4640a4,'name':_0x4640a4,'items':_0x267ac0,'source':_0x234d50[_0x5bbbbb(0x210)]}),_0x267ac0;}async function _0x20c30d(_0x396f3b,_0x583b2e){const _0x58a431=_0x30e554;_0x234d50[_0x58a431(0x24d)](_0x41aa40,_0x396f3b);if(!Array[_0x58a431(0x205)](_0x583b2e)){if(_0x234d50[_0x58a431(0x237)]!==_0x234d50[_0x58a431(0x23a)])throw new ValidationError(_0x58a431(0x230));else throw new _0x2ec4b2(_0x234d50[_0x58a431(0x22e)]);}const _0x4f4929=await _0x234d50[_0x58a431(0x20f)](_0x29dc85);if(!_0x4f4929)throw new NotFoundError(_0x234d50[_0x58a431(0x22e)]);if(!_0x4c6ac4)throw new Error(_0x234d50[_0x58a431(0x228)]);const _0x5f55f5=await _0x4c6ac4[_0x58a431(0x1ef)]();try{await _0x5f55f5[_0x58a431(0x235)](_0x234d50[_0x58a431(0x233)]);const _0x454c16=await _0x5f55f5[_0x58a431(0x235)](_0x58a431(0x1f1),[_0x396f3b,_0x396f3b,_0x58a431(0x202),_0x234d50[_0x58a431(0x22a)],!![]]),_0x3d97f9=_0x454c16[_0x58a431(0x218)][0x0]['id'];await _0x5f55f5[_0x58a431(0x235)](_0x234d50[_0x58a431(0x248)],[_0x3d97f9]);for(const _0x32fb5a of _0x583b2e){_0x234d50[_0x58a431(0x1ee)]===_0x234d50[_0x58a431(0x1ee)]?await _0x5f55f5[_0x58a431(0x235)](_0x58a431(0x243),[_0x3d97f9,_0x32fb5a[_0x58a431(0x24b)],_0x32fb5a[_0x58a431(0x1fa)],_0x32fb5a[_0x58a431(0x222)]??null]):_0xa79a6f[_0x58a431(0x241)]();}await _0x5f55f5[_0x58a431(0x235)](_0x234d50[_0x58a431(0x251)]);}catch(_0x1e5a92){if(_0x234d50[_0x58a431(0x246)]!==_0x234d50[_0x58a431(0x23f)]){await _0x5f55f5[_0x58a431(0x235)](_0x234d50[_0x58a431(0x203)]);throw _0x1e5a92;}else return _0x5d65d7[_0x58a431(0x1f8)];}finally{if(_0x234d50[_0x58a431(0x1fb)](_0x234d50[_0x58a431(0x254)],_0x58a431(0x229)))_0x5f55f5[_0x58a431(0x241)]();else return _0x234d50[_0x58a431(0x216)](_0x15aa3f,_0x5e5ea3),_0x5da23d[_0x58a431(0x20d)](_0x5ea0d2);}_0x234d50[_0x58a431(0x201)](_0x2f74f5,_0x396f3b);}function _0x2f74f5(_0x3c2a9c){const _0x25d335=_0x30e554;return _0x234d50[_0x25d335(0x216)](_0x41aa40,_0x3c2a9c),_0x39d76f[_0x25d335(0x20d)](_0x3c2a9c);}async function _0x31e7e5(){const _0x58a313=_0x30e554;if(_0x234d50[_0x58a313(0x234)](_0x234d50[_0x58a313(0x21a)],_0x58a313(0x24f))){const _0x475686=[..._0x39d76f[_0x58a313(0x21e)]()][_0x58a313(0x206)](({code:_0x20933c,name:_0x2b9468,source:_0x1c3e3b})=>({'code':_0x20933c,'name':_0x2b9468??_0x20933c,'source':_0x1c3e3b})),_0x32d88c=await _0x234d50[_0x58a313(0x20f)](_0x29dc85);if(!_0x32d88c){if(_0x234d50[_0x58a313(0x22d)](_0x234d50[_0x58a313(0x209)],_0x234d50[_0x58a313(0x200)]))return _0x475686;else throw new _0x1920a9(_0x58a313(0x225)+_0x36ebf1[_0x58a313(0x24b)]);}if(!_0x4c6ac4)throw new Error(_0x234d50[_0x58a313(0x228)]);const _0xc4df03=await _0x4c6ac4[_0x58a313(0x235)](_0x58a313(0x258));for(const _0x30457f of _0xc4df03[_0x58a313(0x218)]){!_0x39d76f[_0x58a313(0x21c)](_0x30457f[_0x58a313(0x24b)])&&_0x475686[_0x58a313(0x20c)](_0x30457f);}return _0x475686;}else for(const _0x20930b of _0x2df3df[_0x58a313(0x205)](_0x3c7649)?_0x171b86:[_0x48c62d]){_0x234d50[_0x58a313(0x201)](_0x4269ef,_0x20930b[_0x58a313(0x24b)]);if(!_0x5f4913[_0x58a313(0x205)](_0x20930b[_0x58a313(0x1f8)]))throw new _0x2911b5(_0x58a313(0x23c)+_0x20930b[_0x58a313(0x24b)]);if(_0x54856c[_0x58a313(0x21c)](_0x20930b[_0x58a313(0x24b)]))throw new _0x49ea03(_0x58a313(0x225)+_0x20930b[_0x58a313(0x24b)]);_0x4b9f95[_0x58a313(0x211)](_0x20930b[_0x58a313(0x24b)],{..._0x20930b,'source':_0x58a313(0x215)});}}_0x234d50[_0x30e554(0x22f)](_0x34f8cd,dictionaries);const _0xda75b={};return _0xda75b[_0x30e554(0x20b)]=_0x34f8cd,_0xda75b[_0x30e554(0x250)]=_0x3437aa,_0xda75b[_0x30e554(0x223)]=_0x20c30d,_0xda75b[_0x30e554(0x20e)]=_0x2f74f5,_0xda75b[_0x30e554(0x204)]=_0x31e7e5,_0xda75b;}
|
|
1
|
+
(function(_0x29bbe5,_0x40888b){const _0x674b6c=_0x4266,_0x282d18=_0x29bbe5();while(!![]){try{const _0x1b293b=-parseInt(_0x674b6c(0x155))/0x1+-parseInt(_0x674b6c(0x179))/0x2+-parseInt(_0x674b6c(0x18a))/0x3+parseInt(_0x674b6c(0x189))/0x4+parseInt(_0x674b6c(0x14b))/0x5*(-parseInt(_0x674b6c(0x1ba))/0x6)+-parseInt(_0x674b6c(0x170))/0x7+parseInt(_0x674b6c(0x14f))/0x8;if(_0x1b293b===_0x40888b)break;else _0x282d18['push'](_0x282d18['shift']());}catch(_0xb41cab){_0x282d18['push'](_0x282d18['shift']());}}}(_0x2ef7,0xdc261));import{ConflictError,NotFoundError,ValidationError}from'../errors.js';function _0x2ef7(){const _0x2e4a22=['rkcUN','sNmXU','NQIeF','NgOcH','values','test','xYujU','viADQ','source','connect','iWbJO','ZCXuP','YzsIj','IiClm','has','Invalid\x20dictionary\x20name:\x20','DkSfQ','Dictionary\x20items\x20must\x20be\x20an\x20array','OKFBv','xgDBv','6JHUwWZ','Dictionary\x20not\x20found:\x20','DRSUO','NPuWH','rpKbz','TOfzb','DyEBT','rows','parentId','sjnLr','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_schema\x20=\x20\x27admin\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_name\x20=\x20\x27dictionaries\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20LIMIT\x201\x0a\x20\x20\x20\x20\x20\x20\x20\x20','put','Dictionary\x20already\x20registered:\x20','xAqqR','xszQr','DBApu','Dictionary\x20table\x20not\x20found','wVpLr','3517550NFdTGg','twXXd','DELETE\x20FROM\x20admin.dictionary_items\x20WHERE\x20dictionary_id\x20=\x20$1','mIlrf','47221952hlIKNZ','CTjlh','yQKOX','eWGda','code','GvdfO','1298398kBUvya','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20di.id,\x20di.code,\x20di.name,\x20di.parent_id\x20AS\x20\x22parentId\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20admin.dictionary_items\x20di\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20JOIN\x20admin.dictionaries\x20d\x20ON\x20d.id\x20=\x20di.dictionary_id\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20d.code\x20=\x20$1\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20di.name\x0a\x20\x20\x20\x20\x20\x20\x20\x20','dictionaries','zekBw','LLIBa','hzoqD','ROLLBACK','zvNvb','map','eRVxK','IrWfY','XiKzh','Invalid\x20dictionary\x20items:\x20','gLWJX','COMMIT','vqamN','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.dictionary_items\x20(dictionary_id,\x20code,\x20name,\x20parent_id)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','PquLL','delete','rWiPp','nJPND','then','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.dictionaries\x20(code,\x20name,\x20module,\x20source,\x20editable)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4,\x20$5)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ON\x20CONFLICT\x20(code)\x20DO\x20UPDATE\x20SET\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20name\x20=\x20EXCLUDED.name,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20module\x20=\x20EXCLUDED.module,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20source\x20=\x20EXCLUDED.source,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20editable\x20=\x20EXCLUDED.editable,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updated_at\x20=\x20now()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20RETURNING\x20id\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','empty\x20pg','ucGkO','ZmimF','LXDoJ','4545275LElLcM','opDxk','hKmmY','list','SEYVY','wTGtu','QWpav','mFAbi','PXoOa','2575082cRXUIu','table_name','query','fcore','HOklT','ZfRgp','AnEQD','DzqQS','JmmpW','oWKaC','jPLow','custom','ZoYAg','ZpcTl','BEGIN','get','1739628tkPgkh','4491444iBFBLg','static','ebmBs','TyGwy','hJAim','release','push','YAtsM','register','lbkBk','items','QBWVC','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20code,\x20name,\x20\x27database\x27\x20AS\x20source\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20admin.dictionaries\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20name\x0a\x20\x20\x20\x20\x20\x20\x20\x20','QsZdi','isArray','clear','xqODo','UniMA','set','WncPX','eqdnd','database','jChAu','KdcNT','gOnmG','length','name','dkwOU'];_0x2ef7=function(){return _0x2e4a22;};return _0x2ef7();}function _0x4266(_0x3fbeef,_0x14169f){_0x3fbeef=_0x3fbeef-0x147;const _0x2ef7b7=_0x2ef7();let _0x426668=_0x2ef7b7[_0x3fbeef];return _0x426668;}const dictionaryName=/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/;export function createDictionary({pg:_0x46918f,dictionaries:dictionaries=[]}){const _0x25cf0c=_0x4266,_0x33c57e={'IrWfY':_0x25cf0c(0x16c),'HOklT':function(_0x1e3dda,_0x2ee71b){return _0x1e3dda===_0x2ee71b;},'QWpav':function(_0x546ba0,_0x402ded){return _0x546ba0===_0x402ded;},'UniMA':_0x25cf0c(0x16e),'rkcUN':function(_0x519a7f,_0x33a6f6){return _0x519a7f===_0x33a6f6;},'hzoqD':_0x25cf0c(0x157),'xqODo':function(_0x38ee94,_0x4fea47){return _0x38ee94!==_0x4fea47;},'YzsIj':_0x25cf0c(0x154),'JmmpW':function(_0x2d2075,_0xc4ffd2){return _0x2d2075!==_0xc4ffd2;},'lbkBk':_0x25cf0c(0x150),'xAqqR':_0x25cf0c(0x149),'zvNvb':function(_0x18efd2,_0x45bba9){return _0x18efd2===_0x45bba9;},'LXDoJ':_0x25cf0c(0x15e),'rWiPp':_0x25cf0c(0x174),'sjnLr':_0x25cf0c(0x1c0),'QsZdi':function(_0x6b740e,_0x4a3e69){return _0x6b740e!==_0x4a3e69;},'OKFBv':_0x25cf0c(0x186),'IiClm':_0x25cf0c(0x16d),'PquLL':function(_0x209efb,_0x3c495e){return _0x209efb!==_0x3c495e;},'viADQ':_0x25cf0c(0x1a8),'jChAu':_0x25cf0c(0x183),'mIlrf':_0x25cf0c(0x19e),'opDxk':_0x25cf0c(0x1ac),'mFAbi':function(_0x2f6cf0){return _0x2f6cf0();},'YAtsM':_0x25cf0c(0x172),'ZfRgp':_0x25cf0c(0x19f),'dkwOU':_0x25cf0c(0x1b7),'WncPX':function(_0x22c786,_0x48efb3){return _0x22c786(_0x48efb3);},'iWbJO':function(_0x5f2d89,_0x48ab53){return _0x5f2d89!==_0x48ab53;},'TyGwy':_0x25cf0c(0x1bc),'gOnmG':_0x25cf0c(0x178),'DzqQS':function(_0x439e0e){return _0x439e0e();},'ZCXuP':_0x25cf0c(0x187),'KdcNT':_0x25cf0c(0x17c),'gLWJX':_0x25cf0c(0x14d),'TOfzb':function(_0x49b051,_0x242fbb){return _0x49b051===_0x242fbb;},'NgOcH':_0x25cf0c(0x148),'eWGda':_0x25cf0c(0x15b),'NPuWH':function(_0x40b09e,_0x35b45a){return _0x40b09e===_0x35b45a;},'twXXd':_0x25cf0c(0x158),'sNmXU':function(_0xfb3afa,_0x3e115f){return _0xfb3afa(_0x3e115f);},'nJPND':function(_0x2fdf4a,_0x5cc0f3){return _0x2fdf4a(_0x5cc0f3);},'ebmBs':_0x25cf0c(0x18b),'oWKaC':function(_0x53dc18){return _0x53dc18();},'QBWVC':function(_0x3f92fc,_0x4a6542){return _0x3f92fc===_0x4a6542;},'LLIBa':_0x25cf0c(0x164),'xszQr':_0x25cf0c(0x151)},_0x2a6dcc=new Map();let _0x2b431e,_0x49c23c;async function _0x2e6e89(){const _0x402c4f=_0x25cf0c;if(_0x33c57e[_0x402c4f(0x19a)](_0x33c57e[_0x402c4f(0x1b2)],_0x33c57e[_0x402c4f(0x1b2)]))return _0x4d205a[_0x402c4f(0x194)];else{if(_0x33c57e[_0x402c4f(0x19a)](_0x2b431e,undefined)){if(_0x33c57e[_0x402c4f(0x181)](_0x33c57e[_0x402c4f(0x193)],_0x402c4f(0x1be)))return _0x2b431e;else throw new _0x5c9044(_0x33c57e[_0x402c4f(0x15f)]);}if(!_0x46918f)throw new Error(_0x33c57e[_0x402c4f(0x15f)]);return _0x49c23c??=_0x46918f[_0x402c4f(0x17b)](_0x402c4f(0x1c4))[_0x402c4f(0x16a)](_0x2f73cb=>{const _0x1fc919=_0x402c4f,_0x2b0f8e={'hJAim':function(_0x2fa94a,_0x387756){const _0x5adf82=_0x4266;return _0x33c57e[_0x5adf82(0x17d)](_0x2fa94a,_0x387756);}};if(_0x33c57e[_0x1fc919(0x176)](_0x33c57e[_0x1fc919(0x19b)],_0x33c57e[_0x1fc919(0x19b)])){const _0x120d2a=_0x2f73cb[_0x1fc919(0x1c1)][0x0]?.[_0x1fc919(0x17a)];_0x2b431e=_0x33c57e[_0x1fc919(0x1a6)](_0x120d2a,_0x33c57e[_0x1fc919(0x15a)])?_0x120d2a:null;}else{const _0x2caade=_0x56400c[_0x1fc919(0x1c1)][0x0]?.[_0x1fc919(0x17a)];_0x3f8ecf=_0x2b0f8e[_0x1fc919(0x18e)](_0x2caade,_0x1fc919(0x157))?_0x2caade:null;}}),await _0x49c23c,_0x2b431e;}}function _0x173d99(_0x225064){const _0x48de7f=_0x25cf0c;if(_0x33c57e[_0x48de7f(0x15c)](_0x48de7f(0x175),_0x33c57e[_0x48de7f(0x16f)]))throw new _0x147c8f(_0x33c57e[_0x48de7f(0x1c7)]);else{if(!dictionaryName[_0x48de7f(0x1ab)](_0x225064)){if(_0x33c57e[_0x48de7f(0x15c)](_0x33c57e[_0x48de7f(0x168)],_0x33c57e[_0x48de7f(0x1c3)]))throw new _0x2c4f5c(_0x48de7f(0x1b5)+_0x3724e1);else throw new ValidationError(_0x48de7f(0x1b5)+_0x225064);}}}function _0x524d2e(_0x2c8162){const _0x5dee2e=_0x25cf0c,_0x514677={};_0x514677[_0x5dee2e(0x1b9)]=_0x5dee2e(0x16c);const _0x3ae7c4=_0x514677;if(_0x33c57e[_0x5dee2e(0x197)](_0x33c57e[_0x5dee2e(0x1b8)],_0x33c57e[_0x5dee2e(0x1b3)]))for(const _0x507dcd of Array[_0x5dee2e(0x198)](_0x2c8162)?_0x2c8162:[_0x2c8162]){if(_0x33c57e[_0x5dee2e(0x166)](_0x33c57e[_0x5dee2e(0x1ad)],_0x33c57e[_0x5dee2e(0x1ad)]))_0x9a5b33[_0x5dee2e(0x190)](_0x1c9eed);else{_0x173d99(_0x507dcd[_0x5dee2e(0x153)]);if(!Array[_0x5dee2e(0x198)](_0x507dcd[_0x5dee2e(0x194)])){if(_0x33c57e[_0x5dee2e(0x1a0)]===_0x33c57e[_0x5dee2e(0x1a0)])throw new ValidationError(_0x5dee2e(0x161)+_0x507dcd[_0x5dee2e(0x153)]);else throw new _0x38c07c(_0x5dee2e(0x149));}if(_0x2a6dcc[_0x5dee2e(0x1b4)](_0x507dcd[_0x5dee2e(0x153)])){if(_0x33c57e[_0x5dee2e(0x14e)]!==_0x5dee2e(0x160))throw new ConflictError(_0x5dee2e(0x1c6)+_0x507dcd[_0x5dee2e(0x153)]);else throw new _0x34ef03(_0x3ae7c4[_0x5dee2e(0x1b9)]);}_0x2a6dcc[_0x5dee2e(0x19c)](_0x507dcd[_0x5dee2e(0x153)],{..._0x507dcd,'source':_0x5dee2e(0x18b)});}}else{if(!_0x471c55[_0x5dee2e(0x1ab)](_0x23d10d))throw new _0x1b74fa(_0x5dee2e(0x1b5)+_0x51cb95);}}async function _0xaba5e5(_0x123e5f){const _0x1c61ef=_0x25cf0c;if(_0x33c57e[_0x1c61ef(0x166)](_0x1c61ef(0x17f),_0x33c57e[_0x1c61ef(0x171)])){_0x173d99(_0x123e5f);const _0x7e8a29=_0x2a6dcc[_0x1c61ef(0x188)](_0x123e5f);if(_0x7e8a29)return _0x7e8a29[_0x1c61ef(0x194)];const _0x1eadd3=await _0x33c57e[_0x1c61ef(0x177)](_0x2e6e89);if(!_0x1eadd3)throw new NotFoundError(_0x33c57e[_0x1c61ef(0x1c7)]);if(!_0x46918f)throw new Error(_0x33c57e[_0x1c61ef(0x15f)]);const _0x190273=await _0x46918f[_0x1c61ef(0x17b)](_0x1c61ef(0x156),[_0x123e5f]);if(!_0x190273[_0x1c61ef(0x1c1)][_0x1c61ef(0x1a3)]){if(_0x33c57e[_0x1c61ef(0x176)](_0x33c57e[_0x1c61ef(0x191)],_0x33c57e[_0x1c61ef(0x191)]))throw new NotFoundError(_0x1c61ef(0x1bb)+_0x123e5f);else throw new _0x2e1623(_0x1c61ef(0x1bb)+_0x51e956);}const _0x23fc52=_0x190273[_0x1c61ef(0x1c1)];return _0x2a6dcc[_0x1c61ef(0x19c)](_0x123e5f,{'code':_0x123e5f,'name':_0x123e5f,'items':_0x23fc52,'source':_0x33c57e[_0x1c61ef(0x17e)]}),_0x23fc52;}else _0x2622a0[_0x1c61ef(0x18f)]();}async function _0x2227ef(_0x3a7445,_0xed1bcc){const _0x1ea0c9=_0x25cf0c,_0x2d8973={};_0x2d8973[_0x1ea0c9(0x185)]=_0x33c57e[_0x1ea0c9(0x1a5)];const _0x59dd29=_0x2d8973;if(_0x33c57e[_0x1ea0c9(0x166)](_0x1ea0c9(0x1b6),_0x1ea0c9(0x1b6)))return _0x572bea;else{_0x33c57e[_0x1ea0c9(0x19d)](_0x173d99,_0x3a7445);if(!Array[_0x1ea0c9(0x198)](_0xed1bcc)){if(_0x33c57e[_0x1ea0c9(0x1b0)](_0x33c57e[_0x1ea0c9(0x18d)],_0x33c57e[_0x1ea0c9(0x1a2)]))throw new ValidationError(_0x33c57e[_0x1ea0c9(0x1a5)]);else throw new _0x575bb5(_0x59dd29[_0x1ea0c9(0x185)]);}const _0x35e157=await _0x33c57e[_0x1ea0c9(0x180)](_0x2e6e89);if(!_0x35e157)throw new NotFoundError(_0x33c57e[_0x1ea0c9(0x1c7)]);if(!_0x46918f)throw new Error(_0x33c57e[_0x1ea0c9(0x15f)]);const _0x4f2e34=await _0x46918f[_0x1ea0c9(0x1af)]();try{await _0x4f2e34[_0x1ea0c9(0x17b)](_0x33c57e[_0x1ea0c9(0x1b1)]);const _0x3726d2=await _0x4f2e34[_0x1ea0c9(0x17b)](_0x1ea0c9(0x16b),[_0x3a7445,_0x3a7445,_0x33c57e[_0x1ea0c9(0x1a1)],_0x1ea0c9(0x184),!![]]),_0x18b124=_0x3726d2[_0x1ea0c9(0x1c1)][0x0]['id'];await _0x4f2e34[_0x1ea0c9(0x17b)](_0x33c57e[_0x1ea0c9(0x162)],[_0x18b124]);for(const _0x4a6bb7 of _0xed1bcc){await _0x4f2e34[_0x1ea0c9(0x17b)](_0x1ea0c9(0x165),[_0x18b124,_0x4a6bb7[_0x1ea0c9(0x153)],_0x4a6bb7[_0x1ea0c9(0x1a4)],_0x4a6bb7[_0x1ea0c9(0x1c2)]??null]);}await _0x4f2e34[_0x1ea0c9(0x17b)](_0x1ea0c9(0x163));}catch(_0x1a714a){if(_0x33c57e[_0x1ea0c9(0x1bf)](_0x1ea0c9(0x14a),_0x33c57e[_0x1ea0c9(0x1a9)]))throw new _0x438b9a(_0x1ea0c9(0x161)+_0x22f7d9[_0x1ea0c9(0x153)]);else{await _0x4f2e34[_0x1ea0c9(0x17b)](_0x33c57e[_0x1ea0c9(0x152)]);throw _0x1a714a;}}finally{if(_0x33c57e[_0x1ea0c9(0x1bd)](_0x1ea0c9(0x158),_0x33c57e[_0x1ea0c9(0x14c)]))_0x4f2e34[_0x1ea0c9(0x18f)]();else throw new _0x1ce61b(_0x1ea0c9(0x16c));}_0x33c57e[_0x1ea0c9(0x19d)](_0x4a5858,_0x3a7445);}}function _0x4a5858(_0x5938e1){const _0x3bdafb=_0x25cf0c;return _0x33c57e[_0x3bdafb(0x1a7)](_0x173d99,_0x5938e1),_0x2a6dcc[_0x3bdafb(0x167)](_0x5938e1);}async function _0x3aa563(){const _0x4938c8=_0x25cf0c,_0x598a84=[..._0x2a6dcc[_0x4938c8(0x1aa)]()][_0x4938c8(0x15d)](({code:_0x2089c6,name:_0x500cb5,source:_0x1ae24b})=>({'code':_0x2089c6,'name':_0x500cb5??_0x2089c6,'source':_0x1ae24b})),_0x40fc0f=await _0x33c57e[_0x4938c8(0x182)](_0x2e6e89);if(!_0x40fc0f)return _0x598a84;if(!_0x46918f)throw new Error(_0x33c57e[_0x4938c8(0x15f)]);const _0x322f9f=await _0x46918f[_0x4938c8(0x17b)](_0x4938c8(0x196));for(const _0x5d068e of _0x322f9f[_0x4938c8(0x1c1)]){if(_0x33c57e[_0x4938c8(0x195)](_0x33c57e[_0x4938c8(0x159)],_0x33c57e[_0x4938c8(0x147)])){_0x33c57e[_0x4938c8(0x169)](_0x4fd6df,_0x1213ee[_0x4938c8(0x153)]);if(!_0x28dbcc[_0x4938c8(0x198)](_0x483535[_0x4938c8(0x194)]))throw new _0x4c8a7b(_0x4938c8(0x161)+_0x17ee2e[_0x4938c8(0x153)]);if(_0x46a5cb[_0x4938c8(0x1b4)](_0x49fcb3[_0x4938c8(0x153)]))throw new _0x435cf1(_0x4938c8(0x1c6)+_0x20cc90[_0x4938c8(0x153)]);const _0x441eda={..._0x3543c3};_0x441eda[_0x4938c8(0x1ae)]=_0x33c57e[_0x4938c8(0x18c)],_0x4177b7[_0x4938c8(0x19c)](_0x36b6b1[_0x4938c8(0x153)],_0x441eda);}else!_0x2a6dcc[_0x4938c8(0x1b4)](_0x5d068e[_0x4938c8(0x153)])&&_0x598a84[_0x4938c8(0x190)](_0x5d068e);}return _0x598a84;}_0x524d2e(dictionaries);const _0x284d31={};return _0x284d31[_0x25cf0c(0x192)]=_0x524d2e,_0x284d31[_0x25cf0c(0x188)]=_0xaba5e5,_0x284d31[_0x25cf0c(0x1c5)]=_0x2227ef,_0x284d31[_0x25cf0c(0x199)]=_0x4a5858,_0x284d31[_0x25cf0c(0x173)]=_0x3aa563,_0x284d31;}
|
package/dist/plugins/file.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x760e97,_0x32ffbf){const _0x5af28a=_0x20de,_0x34d5c3=_0x760e97();while(!![]){try{const _0x423d9c=-parseInt(_0x5af28a(0x1d7))/0x1+-parseInt(_0x5af28a(0x211))/0x2+-parseInt(_0x5af28a(0x210))/0x3*(-parseInt(_0x5af28a(0x20c))/0x4)+parseInt(_0x5af28a(0x1ca))/0x5*(-parseInt(_0x5af28a(0x1e2))/0x6)+parseInt(_0x5af28a(0x1cd))/0x7*(parseInt(_0x5af28a(0x1ec))/0x8)+parseInt(_0x5af28a(0x215))/0x9+parseInt(_0x5af28a(0x1d4))/0xa;if(_0x423d9c===_0x32ffbf)break;else _0x34d5c3['push'](_0x34d5c3['shift']());}catch(_0x53476f){_0x34d5c3['push'](_0x34d5c3['shift']());}}}(_0x252f,0x1c028));import{DeleteObjectCommand,GetObjectCommand,HeadObjectCommand,PutObjectCommand,S3Client}from'@aws-sdk/client-s3';import _0x2dba6e from'node:crypto';function _0x20de(_0xdbe19c,_0x2d875e){_0xdbe19c=_0xdbe19c-0x1bc;const _0x252f5d=_0x252f();let _0x20de0e=_0x252f5d[_0xdbe19c];return _0x20de0e;}import{ValidationError}from'../errors.js';import{UnauthorizedError}from'../errors.js';function _0x252f(){const _0x2aa696=['randomBytes','toString','188833skejYu','kgEVx','alloc','name','length','PYojj','transformToByteArray','floor','secretAccessKey','OboTK','ZYhoQ','6LUvXjc','from','pptPY','XRvtO','startsWith','SeuMI','parse','LTfBh','split','XPYVT','8jbuFMM','VIojj','iEGye','XtxZH','mXCzv','dYdIB','accessKeyId','EpjHr','wrZoC','httpStatusCode','OVMPX','TlAul','Kzvvw','endpoint','push','HuXYM','NotFound','forcePathStyle','Invalid\x20file\x20token','CFJWl','ZDzwi','File\x20token\x20expired','eJDVk','us-east-1','digest','folder','Zfush','includes','cZHFK','replace','stringify','ZlKzn','28vRpgpW','update','MtLNd','createHmac','47133jRlYIr','407464pZJCjH','jwYuE','sha256','bucket','370593woXLtI','isInteger','voSoS','HPziO','Invalid\x20file\x20path','BcbBK','bHMDB','utf8','tokenSecret','hex','send','concat','gsPOd','Body','MUPNL','EODTq','UbDyU','iCWqD','xTWdH','$metadata','exp','bjKrK','fQbtZ','now','region','KpvGU','timingSafeEqual','fYiRg','748675OAwuTX','accessKey','function','785526ZofiSL','credentials','tokenTtl','secretKey','KeDND','FUKGS','base64url','3936560zqOnkQ'];_0x252f=function(){return _0x2aa696;};return _0x252f();}function keyFor(_0x16b603,_0x1903e3){const _0x4b3246=_0x20de,_0x41e4bd={};_0x41e4bd[_0x4b3246(0x1f3)]=_0x4b3246(0x219),_0x41e4bd[_0x4b3246(0x206)]=function(_0x937867,_0x576c73){return _0x937867??_0x576c73;};const _0x134402=_0x41e4bd;if(!_0x1903e3||_0x1903e3[_0x4b3246(0x1e6)]('/')||_0x1903e3[_0x4b3246(0x207)]('..'))throw new ValidationError(_0x134402[_0x4b3246(0x1f3)]);const _0x2b8b3e=_0x1903e3[_0x4b3246(0x209)](/\\/g,'/')[_0x4b3246(0x209)](/^\/+/,''),_0x324652=_0x134402[_0x4b3246(0x206)](_0x16b603,'')[_0x4b3246(0x209)](/^\/+|\/+$/g,'');return _0x324652?_0x324652+'/'+_0x2b8b3e:_0x2b8b3e;}async function bodyToBuffer(_0x2af573){const _0x3c8066=_0x20de,_0x111feb={};_0x111feb[_0x3c8066(0x1eb)]=_0x3c8066(0x1fe),_0x111feb[_0x3c8066(0x1d8)]=function(_0x59308e,_0x2ae6f7){return _0x59308e===_0x2ae6f7;},_0x111feb[_0x3c8066(0x1e5)]=_0x3c8066(0x1cc),_0x111feb[_0x3c8066(0x1e4)]=function(_0x2305ff,_0x7b2286){return _0x2305ff!==_0x7b2286;},_0x111feb[_0x3c8066(0x217)]=_0x3c8066(0x1c4);const _0x3b747c=_0x111feb;if(!_0x2af573)return Buffer[_0x3c8066(0x1d9)](0x0);const _0x29afe2=_0x2af573;if(_0x3b747c[_0x3c8066(0x1d8)](typeof _0x29afe2[_0x3c8066(0x1dd)],_0x3b747c[_0x3c8066(0x1e5)]))return Buffer[_0x3c8066(0x1e3)](await _0x29afe2[_0x3c8066(0x1dd)]());const _0x141c82=[];for await(const _0x5d0ba0 of _0x2af573){if(_0x3b747c[_0x3c8066(0x1e4)](_0x3c8066(0x1c4),_0x3b747c[_0x3c8066(0x217)]))throw new _0xdc0e24(_0x3b747c[_0x3c8066(0x1eb)]);else _0x141c82[_0x3c8066(0x1fa)](Buffer[_0x3c8066(0x1e3)](_0x5d0ba0));}return Buffer[_0x3c8066(0x220)](_0x141c82);}export function createFileS3(_0x3c37be){const _0x234e4d=_0x20de,_0x55082b={'KeDND':function(_0xcc8b7c,_0x5b2d8a){return _0xcc8b7c(_0x5b2d8a);},'MtLNd':function(_0xcf8685,_0x419045){return _0xcf8685(_0x419045);},'mXCzv':function(_0x47746b,_0x29e816){return _0x47746b===_0x29e816;},'Kzvvw':_0x234e4d(0x1fc),'dYdIB':function(_0x59dc8e,_0x545401){return _0x59dc8e===_0x545401;},'PYojj':_0x234e4d(0x1c3),'fYiRg':_0x234e4d(0x1fe),'VIojj':function(_0x30cadf,_0x232548){return _0x30cadf===_0x232548;},'cZHFK':_0x234e4d(0x212),'OVMPX':function(_0x405039,_0x305feb){return _0x405039+_0x305feb;},'ZDzwi':_0x234e4d(0x1d3),'HuXYM':_0x234e4d(0x213),'MUPNL':_0x234e4d(0x21c),'OboTK':function(_0x37a8c2,_0x2925e2){return _0x37a8c2===_0x2925e2;},'ZlKzn':_0x234e4d(0x1e1),'HPziO':function(_0x4a3f95,_0x1b4ee6){return _0x4a3f95||_0x1b4ee6;},'bHMDB':function(_0x2754fe,_0x33f3c2){return _0x2754fe!==_0x33f3c2;},'FUKGS':_0x234e4d(0x221),'LTfBh':function(_0x46dc07,_0x1a50f3){return _0x46dc07!==_0x1a50f3;},'wrZoC':_0x234e4d(0x1bd),'eJDVk':_0x234e4d(0x1c0),'BcbBK':function(_0x1f7159,_0x313a92){return _0x1f7159<_0x313a92;},'iEGye':function(_0x3a63b2,_0x22f008){return _0x3a63b2/_0x22f008;},'XtxZH':_0x234e4d(0x201),'UbDyU':_0x234e4d(0x21e),'SeuMI':_0x234e4d(0x203)},_0x4869b7=_0x3c37be[_0x234e4d(0x21d)]??process.env.FILE_TOKEN_SECRET??_0x2dba6e[_0x234e4d(0x1d5)](0x20)[_0x234e4d(0x1d6)](_0x55082b[_0x234e4d(0x1be)]),_0x5bf9c9={};_0x5bf9c9[_0x234e4d(0x1f9)]=_0x3c37be[_0x234e4d(0x1f9)],_0x5bf9c9[_0x234e4d(0x1c6)]=_0x3c37be[_0x234e4d(0x1c6)]??_0x55082b[_0x234e4d(0x1e7)],_0x5bf9c9[_0x234e4d(0x1fd)]=_0x3c37be[_0x234e4d(0x1fd)]??!![],_0x5bf9c9[_0x234e4d(0x1ce)]=_0x3c37be[_0x234e4d(0x1f2)]||_0x3c37be[_0x234e4d(0x1cb)]?{'accessKeyId':_0x3c37be[_0x234e4d(0x1f2)]??_0x3c37be[_0x234e4d(0x1cb)],'secretAccessKey':_0x3c37be[_0x234e4d(0x1df)]??_0x3c37be[_0x234e4d(0x1d0)]}:undefined;const _0x4a6920=new S3Client(_0x5bf9c9),_0x4d8882=_0x52a7d8=>keyFor(_0x3c37be[_0x234e4d(0x205)],_0x52a7d8);return{async 'put'(_0xf18a01,_0x2950f2){const _0x2f2701=_0x234e4d;await _0x4a6920[_0x2f2701(0x21f)](new PutObjectCommand({'Bucket':_0x3c37be[_0x2f2701(0x214)],'Key':_0x55082b[_0x2f2701(0x1d1)](_0x4d8882,_0xf18a01),'Body':_0x2950f2}));},async 'get'(_0x5c3364){const _0xc23412=_0x234e4d,_0x118dbf=await _0x4a6920[_0xc23412(0x21f)](new GetObjectCommand({'Bucket':_0x3c37be[_0xc23412(0x214)],'Key':_0x4d8882(_0x5c3364)}));return _0x55082b[_0xc23412(0x1d1)](bodyToBuffer,_0x118dbf[_0xc23412(0x222)]);},async 'exists'(_0x2e349a){const _0x591baa=_0x234e4d;try{return await _0x4a6920[_0x591baa(0x21f)](new HeadObjectCommand({'Bucket':_0x3c37be[_0x591baa(0x214)],'Key':_0x55082b[_0x591baa(0x20e)](_0x4d8882,_0x2e349a)})),!![];}catch(_0x2ee13c){const _0x8f2d7a=_0x2ee13c;if(_0x55082b[_0x591baa(0x1f0)](_0x8f2d7a[_0x591baa(0x1c1)]?.[_0x591baa(0x1f5)],0x194)||_0x55082b[_0x591baa(0x1f0)](_0x8f2d7a[_0x591baa(0x1da)],_0x55082b[_0x591baa(0x1f8)]))return![];throw _0x2ee13c;}},async 'delete'(_0x281adb){const _0x13d119=_0x234e4d,_0x3cbe93={'iCWqD':function(_0xae4ee1,_0x51ee39){const _0xa61f57=_0x20de;return _0x55082b[_0xa61f57(0x1f1)](_0xae4ee1,_0x51ee39);}};if(_0x55082b[_0x13d119(0x1f0)](_0x55082b[_0x13d119(0x1dc)],_0x13d119(0x1c3)))await _0x4a6920[_0x13d119(0x21f)](new DeleteObjectCommand({'Bucket':_0x3c37be[_0x13d119(0x214)],'Key':_0x55082b[_0x13d119(0x20e)](_0x4d8882,_0x281adb)}));else{const _0x50d51d=_0x257b7b;if(feYlDO[_0x13d119(0x1bf)](_0x50d51d[_0x13d119(0x1c1)]?.[_0x13d119(0x1f5)],0x194)||feYlDO[_0x13d119(0x1bf)](_0x50d51d[_0x13d119(0x1da)],_0x13d119(0x1fc)))return![];throw _0x36d3b5;}},'create'(_0x96b36,_0x486443=_0x3c37be[_0x234e4d(0x1cf)]??0xe10){const _0x3f07f2=_0x234e4d,_0x34ed40={};_0x34ed40[_0x3f07f2(0x1f7)]=_0x55082b[_0x3f07f2(0x1c9)];const _0x24b7ba=_0x34ed40;if(_0x55082b[_0x3f07f2(0x1ed)](_0x55082b[_0x3f07f2(0x208)],_0x55082b[_0x3f07f2(0x208)])){const _0x3d6323={'p':_0x96b36,'exp':_0x55082b[_0x3f07f2(0x1f6)](Math[_0x3f07f2(0x1de)](Date[_0x3f07f2(0x1c5)]()/0x3e8),_0x486443)},_0x251856=Buffer[_0x3f07f2(0x1e3)](JSON[_0x3f07f2(0x20a)](_0x3d6323))[_0x3f07f2(0x1d6)](_0x55082b[_0x3f07f2(0x200)]),_0x24c8e4=_0x2dba6e[_0x3f07f2(0x20f)](_0x55082b[_0x3f07f2(0x1fb)],_0x4869b7)[_0x3f07f2(0x20d)](_0x251856)[_0x3f07f2(0x204)](_0x55082b[_0x3f07f2(0x200)]);return _0x251856+'.'+_0x24c8e4;}else throw new _0x2f2a72(_0x24b7ba[_0x3f07f2(0x1f7)]);},'verify'(_0x582337){const _0x35e5e8=_0x234e4d,_0x5471ac={};_0x5471ac[_0x35e5e8(0x1ff)]=_0x55082b[_0x35e5e8(0x200)],_0x5471ac[_0x35e5e8(0x1c7)]=_0x55082b[_0x35e5e8(0x1bc)];const _0x10f955=_0x5471ac;if(_0x55082b[_0x35e5e8(0x1e0)](_0x55082b[_0x35e5e8(0x20b)],_0x55082b[_0x35e5e8(0x20b)])){const [_0x17d252,_0x421bff]=_0x582337[_0x35e5e8(0x1ea)]('.');if(_0x55082b[_0x35e5e8(0x218)](!_0x17d252,!_0x421bff)){if(_0x55082b[_0x35e5e8(0x21b)](_0x55082b[_0x35e5e8(0x1d2)],_0x55082b[_0x35e5e8(0x1d2)]))throw new _0x134586(_0x35e5e8(0x1fe));else throw new UnauthorizedError(_0x55082b[_0x35e5e8(0x1c9)]);}const _0x5807ff=_0x2dba6e[_0x35e5e8(0x20f)](_0x55082b[_0x35e5e8(0x1fb)],_0x4869b7)[_0x35e5e8(0x20d)](_0x17d252)[_0x35e5e8(0x204)](),_0x2a0c4e=Buffer[_0x35e5e8(0x1e3)](_0x421bff,_0x55082b[_0x35e5e8(0x200)]);if(_0x55082b[_0x35e5e8(0x21b)](_0x5807ff[_0x35e5e8(0x1db)],_0x2a0c4e[_0x35e5e8(0x1db)])||!_0x2dba6e[_0x35e5e8(0x1c8)](_0x5807ff,_0x2a0c4e))throw new UnauthorizedError(_0x55082b[_0x35e5e8(0x1c9)]);let _0x5007df;try{_0x55082b[_0x35e5e8(0x1e9)](_0x55082b[_0x35e5e8(0x1f4)],_0x55082b[_0x35e5e8(0x202)])?_0x5007df=JSON[_0x35e5e8(0x1e8)](Buffer[_0x35e5e8(0x1e3)](_0x17d252,_0x55082b[_0x35e5e8(0x200)])[_0x35e5e8(0x1d6)](_0x35e5e8(0x21c))):_0x2f0243=_0x15ec30[_0x35e5e8(0x1e8)](_0x5dd1df[_0x35e5e8(0x1e3)](_0x3c5ef4,_0x10f955[_0x35e5e8(0x1ff)])[_0x35e5e8(0x1d6)](_0x10f955[_0x35e5e8(0x1c7)]));}catch{throw new UnauthorizedError(_0x55082b[_0x35e5e8(0x1c9)]);}if(!_0x5007df['p']||!Number[_0x35e5e8(0x216)](_0x5007df[_0x35e5e8(0x1c2)]))throw new UnauthorizedError(_0x55082b[_0x35e5e8(0x1c9)]);if(_0x55082b[_0x35e5e8(0x21a)](_0x5007df[_0x35e5e8(0x1c2)],Math[_0x35e5e8(0x1de)](_0x55082b[_0x35e5e8(0x1ee)](Date[_0x35e5e8(0x1c5)](),0x3e8))))throw new UnauthorizedError(_0x55082b[_0x35e5e8(0x1ef)]);return _0x5007df;}else _0x4b0d5d[_0x35e5e8(0x1fa)](_0x3c323d[_0x35e5e8(0x1e3)](_0xe66809));}};}
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
|
package/dist/plugins/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x501972,_0x2a517a){var _0x2649ac=_0x32c3,_0x536156=_0x501972();while(!![]){try{var _0x37bd10=parseInt(_0x2649ac(0xb3))/0x1*(parseInt(_0x2649ac(0xae))/0x2)+parseInt(_0x2649ac(0xb2))/0x3*(-parseInt(_0x2649ac(0xad))/0x4)+-parseInt(_0x2649ac(0xb1))/0x5*(parseInt(_0x2649ac(0xb0))/0x6)+parseInt(_0x2649ac(0xb5))/0x7+parseInt(_0x2649ac(0xb4))/0x8+-parseInt(_0x2649ac(0xaf))/0x9+parseInt(_0x2649ac(0xb6))/0xa;if(_0x37bd10===_0x2a517a)break;else _0x536156['push'](_0x536156['shift']());}catch(_0x11ebd3){_0x536156['push'](_0x536156['shift']());}}}(_0x4226,0x92693));function _0x32c3(_0x25b483,_0x15cd30){_0x25b483=_0x25b483-0xad;var _0x4226c2=_0x4226();var _0x32c37a=_0x4226c2[_0x25b483];return _0x32c37a;}export*from'./logger/index.js';function _0x4226(){var _0x2464a3=['3222927JASsLr','52518rXHuqF','335DYZKnF','2862GjenJB','13FdkBCC','2736944PRwGmA','5888610YGzUes','3314380NHSUpR','232CMSAGR','13046dBvlsC'];_0x4226=function(){return _0x2464a3;};return _0x4226();}export*from'./redis.js';export*from'./pg.js';export*from'./auth/index.js';export*from'./file.js';export*from'./dictionary.js';export*from'./audit/index.js';export*from'./resource/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x19c3(){const _0x2d70dc=['refreshToken','JKuxH','qDhNi','pgeuj','125wBlVsW','BaKwc','end','401223kKGldk','target','info','56202DcAfbU','[REDACTED]','assign','password','accessToken','714380fHYoeY','stdTimeFunctions','transport','YVhXD','isoTime','1093624znBlVw','FFRpt','app','9btGDLr','MKAvv','44bTwLaE','nrgHD','service','834384rHdKTh','151QzoeuA','jrFWM','bind','token','req.headers.authorization','1406930ylizSK','WVpOe','MJdBw','1704YZgcxu','./transport.js'];_0x19c3=function(){return _0x2d70dc;};return _0x19c3();}(function(_0x5dec40,_0x4244d8){const _0x1150cf=_0x1d0c,_0x3057ee=_0x5dec40();while(!![]){try{const _0x459f03=-parseInt(_0x1150cf(0x112))/0x1*(parseInt(_0x1150cf(0x11a))/0x2)+-parseInt(_0x1150cf(0x123))/0x3+-parseInt(_0x1150cf(0x12b))/0x4+-parseInt(_0x1150cf(0x120))/0x5*(parseInt(_0x1150cf(0x126))/0x6)+parseInt(_0x1150cf(0x109))/0x7+-parseInt(_0x1150cf(0x111))/0x8*(-parseInt(_0x1150cf(0x10c))/0x9)+-parseInt(_0x1150cf(0x117))/0xa*(-parseInt(_0x1150cf(0x10e))/0xb);if(_0x459f03===_0x4244d8)break;else _0x3057ee['push'](_0x3057ee['shift']());}catch(_0x2a3330){_0x3057ee['push'](_0x3057ee['shift']());}}}(_0x19c3,0x242ab));import _0x73eef4 from'pino';function _0x1d0c(_0x16851f,_0xdccbf4){_0x16851f=_0x16851f-0x108;const _0x19c329=_0x19c3();let _0x1d0c9d=_0x19c329[_0x16851f];return _0x1d0c9d;}export function createLogger(){const _0x1d85b8=_0x1d0c,_0x2f843a={'MJdBw':function(_0xe1683c,_0x3a137b){return _0xe1683c===_0x3a137b;},'nrgHD':function(_0x47782c,_0xdd25ec){return _0x47782c+_0xdd25ec;},'jrFWM':function(_0x4f689a,_0x31b22b){return _0x4f689a??_0x31b22b;},'YVhXD':function(_0x15f5f7,_0x1ceb2c,_0x46c20d){return _0x15f5f7(_0x1ceb2c,_0x46c20d);},'WVpOe':_0x1d85b8(0x125),'JKuxH':_0x1d85b8(0x116),'FFRpt':_0x1d85b8(0x129),'pgeuj':_0x1d85b8(0x115),'qDhNi':_0x1d85b8(0x12a),'BaKwc':_0x1d85b8(0x11c),'MKAvv':_0x1d85b8(0x127)},_0x47bf40={};_0x47bf40[_0x1d85b8(0x124)]=_0x1d85b8(0x11b);const _0x5d0f53=_0x73eef4[_0x1d85b8(0x12d)](_0x47bf40),_0xaafba5={};_0xaafba5[_0x1d85b8(0x110)]=_0x1d85b8(0x10b);const _0x15f643=_0x2f843a[_0x1d85b8(0x12e)](_0x73eef4,{'level':_0x2f843a[_0x1d85b8(0x118)],'timestamp':_0x73eef4[_0x1d85b8(0x12c)][_0x1d85b8(0x108)],'base':_0xaafba5,'redact':{'paths':[_0x2f843a[_0x1d85b8(0x11d)],_0x2f843a[_0x1d85b8(0x10a)],_0x2f843a[_0x1d85b8(0x11f)],_0x2f843a[_0x1d85b8(0x11e)],_0x2f843a[_0x1d85b8(0x121)]],'censor':_0x2f843a[_0x1d85b8(0x10d)]}},_0x5d0f53),_0x1b497b={};function _0x98c8a1(_0x11d87d,_0x39488d){const _0x22a9a9=_0x1d85b8;if(_0x2f843a[_0x22a9a9(0x119)](_0x11d87d,undefined)){const _0x2d339f={..._0x1b497b};return _0x2d339f;}_0x1b497b[_0x11d87d]=_0x2f843a[_0x22a9a9(0x10f)](_0x1b497b[_0x11d87d]??0x0,_0x2f843a[_0x22a9a9(0x113)](_0x39488d,0x1));}return Object[_0x1d85b8(0x128)](_0x15f643,{'close':async()=>_0x5d0f53[_0x1d85b8(0x122)](),'metrics':_0x98c8a1,'file':()=>_0x15f643[_0x1d85b8(0x125)][_0x1d85b8(0x114)](_0x15f643)});}
|