@opengis/fcore 0.0.1-beta.4 → 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.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 +3 -0
- 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 -5
- 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
|
-
|
|
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
|
-
(function(
|
|
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
|
-
|
|
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
|
-
(function(
|
|
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(_0x1af561,_0x15288e){const _0x52c573=_0x374b,_0x58582d=_0x1af561();while(!![]){try{const _0x362c82=parseInt(_0x52c573(0xd8))/0x1*(-parseInt(_0x52c573(0xf3))/0x2)+-parseInt(_0x52c573(0x101))/0x3*(-parseInt(_0x52c573(0x132))/0x4)+parseInt(_0x52c573(0x13d))/0x5+parseInt(_0x52c573(0x12b))/0x6+-parseInt(_0x52c573(0x12d))/0x7*(parseInt(_0x52c573(0x116))/0x8)+parseInt(_0x52c573(0x11a))/0x9+-parseInt(_0x52c573(0x135))/0xa;if(_0x362c82===_0x15288e)break;else _0x58582d['push'](_0x58582d['shift']());}catch(_0x120ad5){_0x58582d['push'](_0x58582d['shift']());}}}(_0x2401,0x892cb));import{ConflictError,NotFoundError,ValidationError}from'../errors.js';const dictionaryName=/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/;export function createDictionary({pg:_0x561a54,dictionaries:dictionaries=[]}){const _0xb891ab=_0x374b,_0x56cac8={'RZGTR':function(_0xdef1f9,_0x565f3a){return _0xdef1f9===_0x565f3a;},'NCQSi':function(_0x3f4ee3,_0x3bf17d){return _0x3f4ee3!==_0x3bf17d;},'LaZjl':_0xb891ab(0xf8),'nQlaG':_0xb891ab(0x142),'oPJjE':function(_0x5edc3c,_0x351f27){return _0x5edc3c===_0x351f27;},'PAZMV':_0xb891ab(0xdc),'sdjQi':_0xb891ab(0x13e),'ceYch':function(_0x59fda,_0x218d58){return _0x59fda(_0x218d58);},'MJMAs':_0xb891ab(0xe2),'YiQVT':_0xb891ab(0xed),'WNDpy':_0xb891ab(0x106),'vvEnH':_0xb891ab(0xe8),'wtCiI':function(_0x1b7c9e){return _0x1b7c9e();},'eLKzC':_0xb891ab(0xe9),'dsDzA':_0xb891ab(0x11e),'LOwvl':_0xb891ab(0x122),'uaDnv':function(_0x9f5e11,_0x529318){return _0x9f5e11!==_0x529318;},'XjpRh':_0xb891ab(0x136),'TyxwI':_0xb891ab(0xec),'Dvlbc':_0xb891ab(0x127),'eHrFa':function(_0x1d2e93,_0x561352){return _0x1d2e93(_0x561352);},'JHEqz':function(_0x1329db,_0x7ed506){return _0x1329db!==_0x7ed506;},'SdUCn':_0xb891ab(0x140),'ssjAw':_0xb891ab(0x111),'oSoon':_0xb891ab(0xfa),'tWpNy':_0xb891ab(0x114),'nFhuG':_0xb891ab(0x115),'sDFlF':_0xb891ab(0x10a),'dwOUR':function(_0x319e63,_0x8adbea){return _0x319e63(_0x8adbea);},'DwbOh':function(_0x3330b2,_0xf1a9db){return _0x3330b2(_0xf1a9db);},'ypYqZ':_0xb891ab(0x130),'dKLsP':function(_0xbac54b){return _0xbac54b();},'HUQrq':_0xb891ab(0xf4)},_0x398d15=new Map();let _0x1957fa,_0x51d102;async function _0x47b3fd(){const _0x15b354=_0xb891ab;if(_0x56cac8[_0x15b354(0x141)](_0x1957fa,undefined))return _0x1957fa;if(!_0x561a54){if(_0x56cac8[_0x15b354(0x12f)](_0x56cac8[_0x15b354(0x103)],_0x15b354(0x108)))throw new _0x30dc06(_0x15b354(0x12e)+_0x3bbdc6[_0x15b354(0xea)]);else throw new Error(_0x56cac8[_0x15b354(0x123)]);}return _0x51d102??=_0x561a54[_0x15b354(0xe7)](_0x15b354(0x10c))[_0x15b354(0x110)](_0x37cf8d=>{const _0x3bc136=_0x15b354,_0x5d0e65=_0x37cf8d[_0x3bc136(0x10b)][0x0]?.[_0x3bc136(0xd9)];_0x1957fa=_0x56cac8[_0x3bc136(0x12f)](_0x5d0e65,_0x3bc136(0x131))?_0x5d0e65:null;}),await _0x51d102,_0x1957fa;}function _0x36c77d(_0x351a1e){const _0x5d07d1=_0xb891ab,_0x5619b7={};_0x5619b7[_0x5d07d1(0xde)]=_0x5d07d1(0x142);const _0x1037bf=_0x5619b7;if(!dictionaryName[_0x5d07d1(0xf7)](_0x351a1e)){if(_0x56cac8[_0x5d07d1(0x102)](_0x56cac8[_0x5d07d1(0x11f)],_0x56cac8[_0x5d07d1(0x11f)]))throw new ValidationError(_0x5d07d1(0x118)+_0x351a1e);else throw new _0x286194(TWAxID[_0x5d07d1(0xde)]);}}function _0x276625(_0x5cf9cd){const _0x5117de=_0xb891ab;if(_0x56cac8[_0x5117de(0x12f)](_0x56cac8[_0x5117de(0xef)],_0x5117de(0x10e)))throw new _0x190341(_0x5117de(0x139)+_0x48ab78);else for(const _0x73a2b2 of Array[_0x5117de(0xe6)](_0x5cf9cd)?_0x5cf9cd:[_0x5cf9cd]){_0x56cac8[_0x5117de(0x11d)](_0x36c77d,_0x73a2b2[_0x5117de(0xea)]);if(!Array[_0x5117de(0xe6)](_0x73a2b2[_0x5117de(0xfe)]))throw new ValidationError(_0x5117de(0xe5)+_0x73a2b2[_0x5117de(0xea)]);if(_0x398d15[_0x5117de(0x113)](_0x73a2b2[_0x5117de(0xea)]))throw new ConflictError(_0x5117de(0x12e)+_0x73a2b2[_0x5117de(0xea)]);_0x398d15[_0x5117de(0xdb)](_0x73a2b2[_0x5117de(0xea)],{..._0x73a2b2,'source':_0x56cac8[_0x5117de(0x134)]});}}async function _0x5c18fb(_0x28e682){const _0x4851fc=_0xb891ab,_0xbd36ff={'WcPvG':function(_0x555f12,_0x15b0c0){return _0x555f12(_0x15b0c0);},'ehPWC':_0x56cac8[_0x4851fc(0x134)]};if(_0x56cac8[_0x4851fc(0x141)](_0x56cac8[_0x4851fc(0x12c)],_0x56cac8[_0x4851fc(0x12c)]))for(const _0x57a586 of _0x3423a7[_0x4851fc(0xe6)](_0x3fa13c)?_0x312a73:[_0x3617d3]){HpgMwZ[_0x4851fc(0x126)](_0x58077c,_0x57a586[_0x4851fc(0xea)]);if(!_0x1448d2[_0x4851fc(0xe6)](_0x57a586[_0x4851fc(0xfe)]))throw new _0x52df87(_0x4851fc(0xe5)+_0x57a586[_0x4851fc(0xea)]);if(_0x1a58bc[_0x4851fc(0x113)](_0x57a586[_0x4851fc(0xea)]))throw new _0xeba20b(_0x4851fc(0x12e)+_0x57a586[_0x4851fc(0xea)]);_0x1030fa[_0x4851fc(0xdb)](_0x57a586[_0x4851fc(0xea)],{..._0x57a586,'source':HpgMwZ[_0x4851fc(0xe0)]});}else{_0x36c77d(_0x28e682);const _0x51e560=_0x398d15[_0x4851fc(0xe3)](_0x28e682);if(_0x51e560){if(_0x56cac8[_0x4851fc(0xff)]!==_0x56cac8[_0x4851fc(0xff)])throw new _0x1c2dcd(_0x56cac8[_0x4851fc(0x13a)]);else return _0x51e560[_0x4851fc(0xfe)];}const _0x3591f9=await _0x56cac8[_0x4851fc(0xf5)](_0x47b3fd);if(!_0x3591f9)throw new NotFoundError(_0x56cac8[_0x4851fc(0x125)]);if(!_0x561a54){if(_0x56cac8[_0x4851fc(0x12f)](_0x56cac8[_0x4851fc(0xfd)],_0x56cac8[_0x4851fc(0xf2)]))!_0x455aff[_0x4851fc(0x113)](_0x51ec35[_0x4851fc(0xea)])&&_0x337740[_0x4851fc(0xeb)](_0x5f1d18);else throw new Error(_0x56cac8[_0x4851fc(0x123)]);}const _0x5ecd3e=await _0x561a54[_0x4851fc(0xe7)](_0x4851fc(0x105),[_0x28e682]);if(!_0x5ecd3e[_0x4851fc(0x10b)][_0x4851fc(0x119)]){if(_0x56cac8[_0x4851fc(0xdf)](_0x56cac8[_0x4851fc(0x128)],_0x56cac8[_0x4851fc(0x11b)]))throw new NotFoundError(_0x4851fc(0x139)+_0x28e682);else return _0x4b0af4;}const _0x10dac8=_0x5ecd3e[_0x4851fc(0x10b)];return _0x398d15[_0x4851fc(0xdb)](_0x28e682,{'code':_0x28e682,'name':_0x28e682,'items':_0x10dac8,'source':_0x56cac8[_0x4851fc(0x13f)]}),_0x10dac8;}}async function _0x43072d(_0x24f5a5,_0x2ff862){const _0x276fdf=_0xb891ab;_0x56cac8[_0x276fdf(0x13c)](_0x36c77d,_0x24f5a5);if(!Array[_0x276fdf(0xe6)](_0x2ff862))throw new ValidationError(_0x276fdf(0xed));const _0x3a4e4e=await _0x56cac8[_0x276fdf(0xf5)](_0x47b3fd);if(!_0x3a4e4e){if(_0x56cac8[_0x276fdf(0x13b)](_0x276fdf(0x129),_0x56cac8[_0x276fdf(0x10d)]))throw new NotFoundError(_0x276fdf(0xe9));else{if(!_0x437922[_0x276fdf(0xf7)](_0x4796c4))throw new _0x17340d(_0x276fdf(0x118)+_0x406dc3);}}if(!_0x561a54)throw new Error(_0x56cac8[_0x276fdf(0x123)]);const _0x1f7988=await _0x561a54[_0x276fdf(0xf9)]();try{await _0x1f7988[_0x276fdf(0xe7)](_0x56cac8[_0x276fdf(0x107)]);const _0x1984ac=await _0x1f7988[_0x276fdf(0xe7)](_0x276fdf(0xfc),[_0x24f5a5,_0x24f5a5,_0x56cac8[_0x276fdf(0xda)],_0x56cac8[_0x276fdf(0xe4)],!![]]),_0x142909=_0x1984ac[_0x276fdf(0x10b)][0x0]['id'];await _0x1f7988[_0x276fdf(0xe7)](_0x56cac8[_0x276fdf(0x143)],[_0x142909]);for(const _0x562e3b of _0x2ff862){await _0x1f7988[_0x276fdf(0xe7)](_0x276fdf(0x11c),[_0x142909,_0x562e3b[_0x276fdf(0xea)],_0x562e3b[_0x276fdf(0x100)],_0x562e3b[_0x276fdf(0x112)]??null]);}await _0x1f7988[_0x276fdf(0xe7)](_0x276fdf(0x109));}catch(_0x3af3dc){await _0x1f7988[_0x276fdf(0xe7)](_0x276fdf(0xdd));throw _0x3af3dc;}finally{if(_0x56cac8[_0x276fdf(0x12a)]!==_0x56cac8[_0x276fdf(0x12a)])throw new _0x3614fa(_0x276fdf(0xe9));else _0x1f7988[_0x276fdf(0x10f)]();}_0x56cac8[_0x276fdf(0x138)](_0x3f4696,_0x24f5a5);}function _0x3f4696(_0x3ad1a5){const _0x556fe8=_0xb891ab;return _0x56cac8[_0x556fe8(0x133)](_0x36c77d,_0x3ad1a5),_0x398d15[_0x556fe8(0x120)](_0x3ad1a5);}async function _0x4cf0a5(){const _0x255d98=_0xb891ab,_0x4e2290={};_0x4e2290[_0x255d98(0x121)]=_0x56cac8[_0x255d98(0x125)];const _0x19183f=_0x4e2290;if(_0x56cac8[_0x255d98(0x102)](_0x56cac8[_0x255d98(0xfb)],_0x56cac8[_0x255d98(0xfb)])){const _0x327065=[..._0x398d15[_0x255d98(0xf1)]()][_0x255d98(0xf6)](({code:_0x3ca3f3,name:_0x598539,source:_0x5f2811})=>({'code':_0x3ca3f3,'name':_0x598539??_0x3ca3f3,'source':_0x5f2811})),_0x141126=await _0x56cac8[_0x255d98(0x124)](_0x47b3fd);if(!_0x141126){if(_0x56cac8[_0x255d98(0x137)]!==_0x255d98(0xf4))throw new _0x547bbd(lpYOQV[_0x255d98(0x121)]);else return _0x327065;}if(!_0x561a54)throw new Error(_0x56cac8[_0x255d98(0x123)]);const _0x5d659b=await _0x561a54[_0x255d98(0xe7)](_0x255d98(0x104));for(const _0x32a1c2 of _0x5d659b[_0x255d98(0x10b)]){!_0x398d15[_0x255d98(0x113)](_0x32a1c2[_0x255d98(0xea)])&&_0x327065[_0x255d98(0xeb)](_0x32a1c2);}return _0x327065;}else throw new _0x18dffa(_0x255d98(0xe5)+_0x1af5ff[_0x255d98(0xea)]);}_0x276625(dictionaries);const _0x2b6dff={};return _0x2b6dff[_0xb891ab(0xe1)]=_0x276625,_0x2b6dff[_0xb891ab(0xe3)]=_0x5c18fb,_0x2b6dff[_0xb891ab(0x117)]=_0x43072d,_0x2b6dff[_0xb891ab(0xf0)]=_0x3f4696,_0x2b6dff[_0xb891ab(0xee)]=_0x4cf0a5,_0x2b6dff;}function _0x374b(_0x349a8a,_0x244179){_0x349a8a=_0x349a8a-0xd8;const _0x2401ae=_0x2401();let _0x374b1b=_0x2401ae[_0x349a8a];return _0x374b1b;}function _0x2401(){const _0xdb12da=['DwbOh','MJMAs','10079260izRjRf','UvLcB','HUQrq','dwOUR','Dictionary\x20not\x20found:\x20','YiQVT','JHEqz','eHrFa','3149755ngOuBl','bpTvj','Dvlbc','Arbsn','NCQSi','empty\x20pg','nFhuG','19SuNYQZ','table_name','oSoon','set','jQFRZ','ROLLBACK','dmevZ','uaDnv','ehPWC','register','static','get','tWpNy','Invalid\x20dictionary\x20items:\x20','isArray','query','usDVd','Dictionary\x20table\x20not\x20found','code','push','RxICd','Dictionary\x20items\x20must\x20be\x20an\x20array','list','sdjQi','clear','values','LOwvl','17702OzIeDH','jgXdB','wtCiI','map','test','euMth','connect','fcore','ypYqZ','\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','dsDzA','items','vvEnH','name','27ZLVlRg','oPJjE','LaZjl','\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','\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','EEYcM','ssjAw','cMwhG','COMMIT','HyLgp','rows','\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','SdUCn','hHCPF','release','then','BEGIN','parentId','has','custom','DELETE\x20FROM\x20admin.dictionary_items\x20WHERE\x20dictionary_id\x20=\x20$1','391232hXYGpQ','put','Invalid\x20dictionary\x20name:\x20','length','6770133XxnSPV','TyxwI','\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','ceYch','VYwtW','PAZMV','delete','dRXHs','PBJBO','nQlaG','dKLsP','eLKzC','WcPvG','database','XjpRh','OpEXG','sDFlF','3233106hrMzfo','WNDpy','35SqbvZH','Dictionary\x20already\x20registered:\x20','RZGTR','hzOlI','dictionaries','27308jQgCOo'];_0x2401=function(){return _0xdb12da;};return _0x2401();}
|
|
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(_0x47934e,_0x2b2bb0){const _0x83ed4e=_0x5f14,_0x56b211=_0x47934e();while(!![]){try{const _0x6140bb=parseInt(_0x83ed4e(0x1b4))/0x1+parseInt(_0x83ed4e(0x1e6))/0x2*(-parseInt(_0x83ed4e(0x19f))/0x3)+-parseInt(_0x83ed4e(0x1bb))/0x4*(-parseInt(_0x83ed4e(0x19a))/0x5)+-parseInt(_0x83ed4e(0x190))/0x6*(-parseInt(_0x83ed4e(0x1b2))/0x7)+-parseInt(_0x83ed4e(0x1bf))/0x8*(parseInt(_0x83ed4e(0x1b1))/0x9)+-parseInt(_0x83ed4e(0x1e0))/0xa+parseInt(_0x83ed4e(0x18e))/0xb;if(_0x6140bb===_0x2b2bb0)break;else _0x56b211['push'](_0x56b211['shift']());}catch(_0x5a1dd5){_0x56b211['push'](_0x56b211['shift']());}}}(_0x210b,0x7e561));import{DeleteObjectCommand,GetObjectCommand,HeadObjectCommand,PutObjectCommand,S3Client}from'@aws-sdk/client-s3';import _0x144b1c from'node:crypto';import{ValidationError}from'../errors.js';function _0x210b(){const _0x59fae3=['uTDwt','EpuAg','iTnne','ljDRe','10507959ayJcGW','YsEme','1074XoCGEf','region','name','isInteger','BFODH','ssvaZ','concat','alloc','Fitlf','utf8','1266630hYzndy','RQSnh','LFBcR','transformToByteArray','tokenSecret','21627TrcCxy','Body','hFcvg','bucket','parse','TavdZ','wjXjb','credentials','JgriG','secretKey','us-east-1','endpoint','createHmac','Invalid\x20file\x20path','httpStatusCode','vgHig','faXDq','secretAccessKey','1026soMxYD','1085FvuCaI','NCGdo','802152eKRGpN','send','accessKeyId','NCjRs','WcTAv','length','OkiKX','8Bfznnu','from','FVAXw','RdiYb','67528zrHjOw','split','CtrGG','arOcd','tokenTtl','mIjIi','exp','TTkRA','yGibs','Invalid\x20file\x20token','ESHmY','hfGWK','aHECB','replace','stringify','fUOAV','LYBZn','now','iTRDE','vgoYk','fBFpt','DLGct','floor','WRltn','NotFound','toString','accessKey','KDTOD','timingSafeEqual','startsWith','folder','qLLHM','update','1416340HqAqrt','includes','digest','tNBGP','wAaiS','base64url','186xseOSi','utLiH','File\x20token\x20expired','forcePathStyle','push','MbWZU','$metadata','oDvCu','YJnLC','QPrwR','NAoUV','function','HsLKB','sha256','randomBytes','tEvMo','hex'];_0x210b=function(){return _0x59fae3;};return _0x210b();}import{UnauthorizedError}from'../errors.js';function keyFor(_0x31cace,_0x1ee115){const _0x515229=_0x5f14,_0x26df3e={};_0x26df3e[_0x515229(0x1de)]=function(_0x5ed57e,_0x34877b){return _0x5ed57e/_0x34877b;},_0x26df3e[_0x515229(0x18c)]=_0x515229(0x1e5),_0x26df3e[_0x515229(0x1d4)]=_0x515229(0x1f3),_0x26df3e[_0x515229(0x1ae)]=function(_0x31ab8d,_0x189518){return _0x31ab8d!==_0x189518;},_0x26df3e[_0x515229(0x195)]=_0x515229(0x1cf),_0x26df3e[_0x515229(0x1d6)]=function(_0x569dcc,_0x3c894c){return _0x569dcc??_0x3c894c;};const _0x1afa3f=_0x26df3e;if(!_0x1ee115||_0x1ee115[_0x515229(0x1dc)]('/')||_0x1ee115[_0x515229(0x1e1)]('..')){if(_0x1afa3f[_0x515229(0x1ae)](_0x1afa3f[_0x515229(0x195)],_0x1afa3f[_0x515229(0x195)])){const _0x291f1d={'p':_0x12c47b,'exp':_0x4f6778[_0x515229(0x1d5)](_0x1afa3f[_0x515229(0x1de)](_0x3a48ac[_0x515229(0x1d0)](),0x3e8))+_0x246325},_0x511638=_0x4586f6[_0x515229(0x1bc)](_0x24bccb[_0x515229(0x1cd)](_0x291f1d))[_0x515229(0x1d8)](_0x1afa3f[_0x515229(0x18c)]),_0x316bbf=_0x5099ad[_0x515229(0x1ab)](_0x1afa3f[_0x515229(0x1d4)],_0x3ecc3e)[_0x515229(0x1df)](_0x511638)[_0x515229(0x1e2)](_0x1afa3f[_0x515229(0x18c)]);return _0x511638+'.'+_0x316bbf;}else throw new ValidationError(_0x515229(0x1ac));}const _0x2f6385=_0x1ee115[_0x515229(0x1cc)](/\\/g,'/')[_0x515229(0x1cc)](/^\/+/,''),_0x4455df=_0x1afa3f[_0x515229(0x1d6)](_0x31cace,'')[_0x515229(0x1cc)](/^\/+|\/+$/g,'');return _0x4455df?_0x4455df+'/'+_0x2f6385:_0x2f6385;}function _0x5f14(_0x17ff46,_0x355064){_0x17ff46=_0x17ff46-0x187;const _0x210b94=_0x210b();let _0x5f14b5=_0x210b94[_0x17ff46];return _0x5f14b5;}async function bodyToBuffer(_0x4ebc31){const _0x52d5e5=_0x5f14,_0x1ba03c={};_0x1ba03c[_0x52d5e5(0x188)]=function(_0x4ae146,_0x2d7e87){return _0x4ae146===_0x2d7e87;},_0x1ba03c[_0x52d5e5(0x1c2)]=function(_0x228437,_0x5131a8){return _0x228437??_0x5131a8;},_0x1ba03c[_0x52d5e5(0x1c7)]=_0x52d5e5(0x1f2),_0x1ba03c[_0x52d5e5(0x1a7)]=_0x52d5e5(0x19b),_0x1ba03c[_0x52d5e5(0x1e4)]=function(_0x1f054e,_0x136e5c){return _0x1f054e===_0x136e5c;},_0x1ba03c[_0x52d5e5(0x1ba)]=function(_0x2ea647,_0x5222f1){return _0x2ea647===_0x5222f1;},_0x1ba03c[_0x52d5e5(0x1da)]=_0x52d5e5(0x1ca),_0x1ba03c[_0x52d5e5(0x1b7)]=_0x52d5e5(0x1eb);const _0x32c7be=_0x1ba03c;if(!_0x4ebc31){if(_0x32c7be[_0x52d5e5(0x188)](_0x32c7be[_0x52d5e5(0x1c7)],_0x32c7be[_0x52d5e5(0x1a7)])){const _0x4c8b5e=_0x19f6e2;if(_0x32c7be[_0x52d5e5(0x188)](_0x4c8b5e[_0x52d5e5(0x1ec)]?.[_0x52d5e5(0x1ad)],0x194)||_0x4c8b5e[_0x52d5e5(0x192)]===_0x52d5e5(0x1d7))return![];throw _0x552f83;}else return Buffer[_0x52d5e5(0x197)](0x0);}const _0x2e3787=_0x4ebc31;if(_0x32c7be[_0x52d5e5(0x1e4)](typeof _0x2e3787[_0x52d5e5(0x19d)],_0x52d5e5(0x1f1))){if(_0x32c7be[_0x52d5e5(0x1ba)](_0x32c7be[_0x52d5e5(0x1da)],_0x32c7be[_0x52d5e5(0x1da)]))return Buffer[_0x52d5e5(0x1bc)](await _0x2e3787[_0x52d5e5(0x19d)]());else{if(!_0x252815||_0x20cbb4[_0x52d5e5(0x1dc)]('/')||_0x28b4f8[_0x52d5e5(0x1e1)]('..'))throw new _0x3cee0a(_0x52d5e5(0x1ac));const _0x5adbbd=_0x34030d[_0x52d5e5(0x1cc)](/\\/g,'/')[_0x52d5e5(0x1cc)](/^\/+/,''),_0x3b2e77=fgcpNu[_0x52d5e5(0x1c2)](_0x1122be,'')[_0x52d5e5(0x1cc)](/^\/+|\/+$/g,'');return _0x3b2e77?_0x3b2e77+'/'+_0x5adbbd:_0x5adbbd;}}const _0x569fd0=[];for await(const _0x5bccbf of _0x4ebc31){_0x32c7be[_0x52d5e5(0x1ba)](_0x32c7be[_0x52d5e5(0x1b7)],_0x32c7be[_0x52d5e5(0x1b7)])?_0x569fd0[_0x52d5e5(0x1ea)](Buffer[_0x52d5e5(0x1bc)](_0x5bccbf)):_0x3380c3[_0x52d5e5(0x1ea)](_0x2c5aec[_0x52d5e5(0x1bc)](_0x3c4f66));}return Buffer[_0x52d5e5(0x196)](_0x569fd0);}export function createFileS3(_0xa1d608){const _0x129dd0=_0x5f14,_0xc872d6={'oDvCu':function(_0x5f4765,_0x26b514){return _0x5f4765!==_0x26b514;},'aHECB':_0x129dd0(0x1bd),'mIjIi':_0x129dd0(0x1e3),'TTkRA':function(_0x378a8b,_0x5e9d8a){return _0x378a8b(_0x5e9d8a);},'BFODH':function(_0x3448ed,_0xa9ccf1){return _0x3448ed(_0xa9ccf1);},'ESHmY':function(_0x3752c4,_0x53b464){return _0x3752c4(_0x53b464);},'faXDq':function(_0x557ceb,_0x35d012){return _0x557ceb===_0x35d012;},'fUOAV':function(_0x284b56,_0x844cb0){return _0x284b56+_0x844cb0;},'iTRDE':function(_0x38df49,_0x304ee0){return _0x38df49/_0x304ee0;},'hFcvg':_0x129dd0(0x1f3),'YsEme':_0x129dd0(0x1e5),'YJnLC':_0x129dd0(0x199),'WcTAv':_0x129dd0(0x1e8),'QPrwR':_0x129dd0(0x1d2),'NCGdo':_0x129dd0(0x1e7),'CtrGG':_0x129dd0(0x18a),'ljDRe':_0x129dd0(0x1be),'Fitlf':_0x129dd0(0x1c8),'wjXjb':function(_0x59ccf4,_0x29da33){return _0x59ccf4===_0x29da33;},'EpuAg':_0x129dd0(0x1a4)},_0x196bd2=_0xa1d608[_0x129dd0(0x19e)]??process.env.FILE_TOKEN_SECRET??_0x144b1c[_0x129dd0(0x187)](0x20)[_0x129dd0(0x1d8)](_0x129dd0(0x189)),_0x989345={};_0x989345[_0x129dd0(0x1aa)]=_0xa1d608[_0x129dd0(0x1aa)],_0x989345[_0x129dd0(0x191)]=_0xa1d608[_0x129dd0(0x191)]??_0x129dd0(0x1a9),_0x989345[_0x129dd0(0x1e9)]=_0xa1d608[_0x129dd0(0x1e9)]??!![],_0x989345[_0x129dd0(0x1a6)]=_0xa1d608[_0x129dd0(0x1b6)]||_0xa1d608[_0x129dd0(0x1d9)]?{'accessKeyId':_0xa1d608[_0x129dd0(0x1b6)]??_0xa1d608[_0x129dd0(0x1d9)],'secretAccessKey':_0xa1d608[_0x129dd0(0x1b0)]??_0xa1d608[_0x129dd0(0x1a8)]}:undefined;const _0x481d29=new S3Client(_0x989345),_0xeddaba=_0x4111d7=>keyFor(_0xa1d608[_0x129dd0(0x1dd)],_0x4111d7);return{async 'put'(_0x80079,_0x27ba71){const _0x4ec99c=_0x129dd0;if(_0xc872d6[_0x4ec99c(0x1ed)](_0xc872d6[_0x4ec99c(0x1cb)],_0xc872d6[_0x4ec99c(0x1c4)]))await _0x481d29[_0x4ec99c(0x1b5)](new PutObjectCommand({'Bucket':_0xa1d608[_0x4ec99c(0x1a2)],'Key':_0xc872d6[_0x4ec99c(0x1c6)](_0xeddaba,_0x80079),'Body':_0x27ba71}));else return![];},async 'get'(_0xb1f30d){const _0x3d2c55=_0x129dd0,_0x215144=await _0x481d29[_0x3d2c55(0x1b5)](new GetObjectCommand({'Bucket':_0xa1d608[_0x3d2c55(0x1a2)],'Key':_0xc872d6[_0x3d2c55(0x194)](_0xeddaba,_0xb1f30d)}));return _0xc872d6[_0x3d2c55(0x1c9)](bodyToBuffer,_0x215144[_0x3d2c55(0x1a0)]);},async 'exists'(_0x255949){const _0x3c13a9=_0x129dd0;try{return await _0x481d29[_0x3c13a9(0x1b5)](new HeadObjectCommand({'Bucket':_0xa1d608[_0x3c13a9(0x1a2)],'Key':_0xc872d6[_0x3c13a9(0x1c9)](_0xeddaba,_0x255949)})),!![];}catch(_0x20a4e4){const _0x1fa3b5=_0x20a4e4;if(_0xc872d6[_0x3c13a9(0x1af)](_0x1fa3b5[_0x3c13a9(0x1ec)]?.[_0x3c13a9(0x1ad)],0x194)||_0xc872d6[_0x3c13a9(0x1af)](_0x1fa3b5[_0x3c13a9(0x192)],_0x3c13a9(0x1d7)))return![];throw _0x20a4e4;}},async 'delete'(_0x42aa01){const _0x1ffb82=_0x129dd0;await _0x481d29[_0x1ffb82(0x1b5)](new DeleteObjectCommand({'Bucket':_0xa1d608[_0x1ffb82(0x1a2)],'Key':_0xc872d6[_0x1ffb82(0x1c9)](_0xeddaba,_0x42aa01)}));},'create'(_0x34a6f0,_0x5166e9=_0xa1d608[_0x129dd0(0x1c3)]??0xe10){const _0x37d438=_0x129dd0;if(_0xc872d6[_0x37d438(0x1af)](_0x37d438(0x1d3),_0x37d438(0x1d3))){const _0x11056c={'p':_0x34a6f0,'exp':_0xc872d6[_0x37d438(0x1ce)](Math[_0x37d438(0x1d5)](_0xc872d6[_0x37d438(0x1d1)](Date[_0x37d438(0x1d0)](),0x3e8)),_0x5166e9)},_0x2ef074=Buffer[_0x37d438(0x1bc)](JSON[_0x37d438(0x1cd)](_0x11056c))[_0x37d438(0x1d8)](_0x37d438(0x1e5)),_0xf39503=_0x144b1c[_0x37d438(0x1ab)](_0xc872d6[_0x37d438(0x1a1)],_0x196bd2)[_0x37d438(0x1df)](_0x2ef074)[_0x37d438(0x1e2)](_0x37d438(0x1e5));return _0x2ef074+'.'+_0xf39503;}else throw new _0x3bdbf1(_0x37d438(0x1ac));},'verify'(_0xa7c70a){const _0x3d6fed=_0x129dd0,_0x3749dd={};_0x3749dd[_0x3d6fed(0x1f0)]=_0x3d6fed(0x1c8),_0x3749dd[_0x3d6fed(0x19c)]=_0xc872d6[_0x3d6fed(0x1b8)];const _0x437b83=_0x3749dd;if(_0xc872d6[_0x3d6fed(0x1af)](_0xc872d6[_0x3d6fed(0x1ef)],_0xc872d6[_0x3d6fed(0x1b3)]))_0x1dcd58=_0x26eb4c[_0x3d6fed(0x1a3)](_0x57fe90[_0x3d6fed(0x1bc)](_0x15f390,_0xc872d6[_0x3d6fed(0x18f)])[_0x3d6fed(0x1d8)](_0xc872d6[_0x3d6fed(0x1ee)]));else{const [_0x25a1d0,_0xa8ea5f]=_0xa7c70a[_0x3d6fed(0x1c0)]('.');if(!_0x25a1d0||!_0xa8ea5f){if(_0xc872d6[_0x3d6fed(0x1c1)]!==_0x3d6fed(0x18a))throw new _0x15e055(_0x437b83[_0x3d6fed(0x1f0)]);else throw new UnauthorizedError(_0x3d6fed(0x1c8));}const _0x2df351=_0x144b1c[_0x3d6fed(0x1ab)](_0xc872d6[_0x3d6fed(0x1a1)],_0x196bd2)[_0x3d6fed(0x1df)](_0x25a1d0)[_0x3d6fed(0x1e2)](),_0x579789=Buffer[_0x3d6fed(0x1bc)](_0xa8ea5f,_0xc872d6[_0x3d6fed(0x18f)]);if(_0x2df351[_0x3d6fed(0x1b9)]!==_0x579789[_0x3d6fed(0x1b9)]||!_0x144b1c[_0x3d6fed(0x1db)](_0x2df351,_0x579789)){if(_0xc872d6[_0x3d6fed(0x18d)]!==_0xc872d6[_0x3d6fed(0x18d)])return _0x42e839[_0x3d6fed(0x197)](0x0);else throw new UnauthorizedError(_0xc872d6[_0x3d6fed(0x198)]);}let _0x422eed;try{_0x422eed=JSON[_0x3d6fed(0x1a3)](Buffer[_0x3d6fed(0x1bc)](_0x25a1d0,_0x3d6fed(0x1e5))[_0x3d6fed(0x1d8)](_0xc872d6[_0x3d6fed(0x1ee)]));}catch{if(_0xc872d6[_0x3d6fed(0x1a5)](_0xc872d6[_0x3d6fed(0x18b)],_0xc872d6[_0x3d6fed(0x18b)]))throw new UnauthorizedError(_0xc872d6[_0x3d6fed(0x198)]);else throw new _0x3d9f6f(_0x437b83[_0x3d6fed(0x19c)]);}if(!_0x422eed['p']||!Number[_0x3d6fed(0x193)](_0x422eed[_0x3d6fed(0x1c5)]))throw new UnauthorizedError(_0x3d6fed(0x1c8));if(_0x422eed[_0x3d6fed(0x1c5)]<Math[_0x3d6fed(0x1d5)](_0xc872d6[_0x3d6fed(0x1d1)](Date[_0x3d6fed(0x1d0)](),0x3e8)))throw new UnauthorizedError(_0xc872d6[_0x3d6fed(0x1b8)]);return _0x422eed;}}};}
|
|
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
|
-
|
|
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)});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x4991(){const _0x2675dd=['mkdirSync','date','10mZgIfy','7520472wBICDM','values','slice','write','dXIlf','4WVubvd','KPiQi','DMoDs','file','3691885AEuVtH','stream','KDnaK','1159341ZxWSBl','createWriteStream','1555149ZPhIfB','info','log','18523611SVtuRQ','end','.log','join','warn','eNYvE','flags','3033023uxmolX','logs','KGNQQ','recursive','resolve','hqHfe','set','toISOString','roXcQ','4hoHAmK','tgtwM','get','ZReJd','PYKKr','stringify','1891544qpuEeZ','error','clear','level'];_0x4991=function(){return _0x2675dd;};return _0x4991();}const _0x353f81=_0x5ed5;(function(_0x48d2c0,_0x56525e){const _0xeb8710=_0x5ed5,_0x4ee204=_0x48d2c0();while(!![]){try{const _0x50d320=-parseInt(_0xeb8710(0xb6))/0x1+parseInt(_0xeb8710(0xc9))/0x2*(-parseInt(_0xeb8710(0xb4))/0x3)+parseInt(_0xeb8710(0xdb))/0x4*(-parseInt(_0xeb8710(0xdf))/0x5)+parseInt(_0xeb8710(0xd6))/0x6+parseInt(_0xeb8710(0xc0))/0x7+parseInt(_0xeb8710(0xcf))/0x8+parseInt(_0xeb8710(0xb9))/0x9*(parseInt(_0xeb8710(0xd5))/0xa);if(_0x50d320===_0x56525e)break;else _0x4ee204['push'](_0x4ee204['shift']());}catch(_0x22a89d){_0x4ee204['push'](_0x4ee204['shift']());}}}(_0x4991,0xdf5d7));import _0x1d0b7e from'node:fs';function _0x5ed5(_0x5817ed,_0x3c1487){_0x5817ed=_0x5817ed-0xb4;const _0x49919f=_0x4991();let _0x5ed589=_0x49919f[_0x5817ed];return _0x5ed589;}import _0x248c8d from'node:path';import _0x14152f from'pino-abstract-transport';const _0xc054a6={};_0xc054a6['30']=_0x353f81(0xb7),_0xc054a6['40']=_0x353f81(0xbd),_0xc054a6['50']=_0x353f81(0xd0),_0xc054a6['60']=_0x353f81(0xd0);const LEVELS=_0xc054a6,streams=new Map();function getDate(){const _0x1282bb=_0x353f81;return new Date()[_0x1282bb(0xc7)]()[_0x1282bb(0xd8)](0x0,0xa);}function createStream(_0x35b75f,_0x3a1517){const _0x3c08f7=_0x353f81,_0x1039e2={};_0x1039e2[_0x3c08f7(0xca)]=_0x3c08f7(0xc1);const _0x56d3a4=_0x1039e2,_0x36a0e3=_0x248c8d[_0x3c08f7(0xc4)](_0x56d3a4[_0x3c08f7(0xca)],_0x35b75f),_0x5349e2={};_0x5349e2[_0x3c08f7(0xc3)]=!![],_0x1d0b7e[_0x3c08f7(0xd3)](_0x36a0e3,_0x5349e2);const _0x54437a={};return _0x54437a[_0x3c08f7(0xbf)]='a',_0x1d0b7e[_0x3c08f7(0xb5)](_0x248c8d[_0x3c08f7(0xbc)](_0x36a0e3,_0x3a1517+_0x3c08f7(0xbb)),_0x54437a);}function getStream(_0x39dcf5){const _0x79a33f=_0x353f81,_0x457099={'KDnaK':function(_0x3a4938){return _0x3a4938();},'KPiQi':function(_0xf52ccf,_0x16861a){return _0xf52ccf===_0x16861a;}},_0x32875d=_0x457099[_0x79a33f(0xe1)](getDate),_0x2c885c=streams[_0x79a33f(0xcb)](_0x39dcf5);if(_0x2c885c&&_0x457099[_0x79a33f(0xdc)](_0x2c885c[_0x79a33f(0xd4)],_0x32875d))return _0x2c885c[_0x79a33f(0xe0)];_0x2c885c?.[_0x79a33f(0xe0)][_0x79a33f(0xba)]();const _0x566379=createStream(_0x39dcf5,_0x32875d),_0xeeae05={};return _0xeeae05[_0x79a33f(0xd4)]=_0x32875d,_0xeeae05[_0x79a33f(0xe0)]=_0x566379,streams[_0x79a33f(0xc6)](_0x39dcf5,_0xeeae05),_0x566379;}function closeStreams(){const _0x10a460=_0x353f81,_0xca60d9={};_0xca60d9[_0x10a460(0xcd)]=function(_0x139b55,_0x104ac8){return _0x139b55!==_0x104ac8;},_0xca60d9[_0x10a460(0xbe)]=_0x10a460(0xcc),_0xca60d9[_0x10a460(0xc5)]=_0x10a460(0xc8);const _0xba93dc=_0xca60d9;for(const {stream:_0x27a0b9}of streams[_0x10a460(0xd7)]()){if(_0xba93dc[_0x10a460(0xcd)](_0xba93dc[_0x10a460(0xbe)],_0xba93dc[_0x10a460(0xc5)]))_0x27a0b9[_0x10a460(0xba)]();else return new _0x4e7e7d()[_0x10a460(0xc7)]()[_0x10a460(0xd8)](0x0,0xa);}streams[_0x10a460(0xd1)]();}export default async function loggerTransport(){const _0xa9395c=_0x353f81,_0x1bae5c={'dXIlf':function(_0x1c061f){return _0x1c061f();},'DMoDs':function(_0xa508c1,_0xe07cb,_0x13764b){return _0xa508c1(_0xe07cb,_0x13764b);}};return _0x1bae5c[_0xa9395c(0xdd)](_0x14152f,writeLogs,{'close':async()=>{const _0x5dc948=_0xa9395c;_0x1bae5c[_0x5dc948(0xda)](closeStreams);}});}async function writeLogs(_0x471b3f){const _0x3fb8fd=_0x353f81,_0xdf4fca={'KGNQQ':function(_0x399e1f,_0x5ae37e){return _0x399e1f(_0x5ae37e);}};for await(const _0x438840 of _0x471b3f){const _0x4eee12=LEVELS[_0x438840[_0x3fb8fd(0xd2)]];if(!_0x4eee12)continue;const _0x399ceb=_0xdf4fca[_0x3fb8fd(0xc2)](getStream,_0x438840[_0x3fb8fd(0xde)]||_0x4eee12);console[_0x3fb8fd(0xb8)](_0x438840),delete _0x438840[_0x3fb8fd(0xde)],_0x399ceb[_0x3fb8fd(0xd9)](JSON[_0x3fb8fd(0xce)](_0x438840)+'\x0a');}}
|
package/dist/plugins/pg.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x18ff91,_0x544f08){const _0x5c879d=_0x4218,_0x5d0f35=_0x18ff91();while(!![]){try{const _0x3f9c7a=-parseInt(_0x5c879d(0xff))/0x1+parseInt(_0x5c879d(0x101))/0x2+parseInt(_0x5c879d(0xfc))/0x3*(parseInt(_0x5c879d(0xf8))/0x4)+-parseInt(_0x5c879d(0xfe))/0x5*(parseInt(_0x5c879d(0xfb))/0x6)+-parseInt(_0x5c879d(0xfd))/0x7*(parseInt(_0x5c879d(0x100))/0x8)+-parseInt(_0x5c879d(0xf9))/0x9+parseInt(_0x5c879d(0xfa))/0xa;if(_0x3f9c7a===_0x544f08)break;else _0x5d0f35['push'](_0x5d0f35['shift']());}catch(_0x3a8b91){_0x5d0f35['push'](_0x5d0f35['shift']());}}}(_0xaa14,0x7ef54));import _0xe433c4 from'pg';function _0x4218(_0x18b87f,_0x83a686){_0x18b87f=_0x18b87f-0xf8;const _0xaa14b0=_0xaa14();let _0x421800=_0xaa14b0[_0x18b87f];return _0x421800;}function _0xaa14(){const _0x85e969=['7805350SreQbG','66keEuzZ','1110yuLKOu','559027fTTfVc','408065HVjCNU','555806KFlyOd','8KkmPAt','1782192ekiojI','8732HLtNbI','3833199cnnAZz'];_0xaa14=function(){return _0x85e969;};return _0xaa14();}const {Pool}=_0xe433c4;export function createDatabase(_0x2eaefa){return new Pool(_0x2eaefa);}
|