@lovrabet/rabetbase-cli 2.3.6 → 2.3.7-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -0
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -0
- package/lib/commands/db/analyze-batch-plan.js +1 -0
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -0
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a185_0x5d27(_0x45c85c,_0xabb00d){_0x45c85c=_0x45c85c-0x9a;const _0x513a20=a185_0x513a();let _0x5d274d=_0x513a20[_0x45c85c];return _0x5d274d;}const a185_0x409d46=a185_0x5d27;(function(_0x159fe5,_0x141694){const _0xc71e07=a185_0x5d27,_0x2f4b24=_0x159fe5();while(!![]){try{const _0x8b89ff=-parseInt(_0xc71e07(0xa8))/0x1+parseInt(_0xc71e07(0xbd))/0x2+parseInt(_0xc71e07(0xb8))/0x3*(parseInt(_0xc71e07(0xa9))/0x4)+parseInt(_0xc71e07(0xaf))/0x5+-parseInt(_0xc71e07(0xb2))/0x6*(-parseInt(_0xc71e07(0xac))/0x7)+parseInt(_0xc71e07(0xad))/0x8+-parseInt(_0xc71e07(0x9c))/0x9;if(_0x8b89ff===_0x141694)break;else _0x2f4b24['push'](_0x2f4b24['shift']());}catch(_0x3be626){_0x2f4b24['push'](_0x2f4b24['shift']());}}}(a185_0x513a,0xef961));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';function a185_0x513a(){const _0x5b5d76=['afterScriptId','split','ENDPOINT','includes','after','isDirectory','name','datasetCode','618527bYlghs','260JeoAiY','.js','all','343QSHRbi','7613880UwULOC','scriptsRootDir','845070IBuSlc','before','beforeScriptId','30678TIOarF','push','ENOENT','operationType','toUpperCase','set','76755VOPSxi','HOOK/','trim','scriptType','functionName','3115406fBGoLf','code','F_OK','endsWith','HOOK','COMMON','isFile','replace','26929278gtEMVK','functionNode','get','alias'];a185_0x513a=function(){return _0x5b5d76;};return a185_0x513a();}import{dirname,join}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a185_0x409d46(0xc2),a185_0x409d46(0xa2),a185_0x409d46(0xc1)];export function normalizeBffType(_0x46a65f){const _0x26cddf=a185_0x409d46;if(!_0x46a65f)return undefined;const _0x864cb4=_0x46a65f[_0x26cddf(0xba)]()[_0x26cddf(0xb6)]();return SUPPORTED_BFF_TYPES[_0x26cddf(0xa3)](_0x864cb4)?_0x864cb4:undefined;}async function scanJsFilesRecursively(_0x1e5ce1,_0x252f55){const _0x1e0b27=a185_0x409d46,_0x50e8cc=[];try{const _0x485d7a=await readdir(_0x1e5ce1,{'withFileTypes':!![]});for(const _0x48bf88 of _0x485d7a){const _0x2bf404=join(_0x1e5ce1,_0x48bf88[_0x1e0b27(0xa6)]);if(_0x48bf88[_0x1e0b27(0xa5)]())_0x50e8cc['push'](...await scanJsFilesRecursively(_0x2bf404,_0x252f55+'/'+_0x48bf88[_0x1e0b27(0xa6)]));else _0x48bf88[_0x1e0b27(0x9a)]()&&_0x48bf88[_0x1e0b27(0xa6)][_0x1e0b27(0xc0)]('.js')&&_0x50e8cc[_0x1e0b27(0xb3)]({'lockKey':_0x252f55+'/'+_0x48bf88[_0x1e0b27(0xa6)][_0x1e0b27(0x9b)](/\.js$/,''),'filePath':_0x2bf404});}}catch(_0x9358df){if(_0x9358df['code']!==_0x1e0b27(0xb4))throw _0x9358df;}return _0x50e8cc;}async function scanFlatFunctions(_0x2c4858,_0x4025c4){const _0x5763c7=a185_0x409d46,_0x32cd0d=join(_0x2c4858['scriptsRootDir'],_0x4025c4),_0x505c2f=await scanJsFilesRecursively(_0x32cd0d,_0x4025c4);return _0x505c2f['map'](({lockKey:_0x598732,filePath:_0x131b4c})=>({'type':_0x4025c4,'name':_0x598732[_0x5763c7(0xa1)]('/')['at'](-0x1)??'','filePath':_0x131b4c,'lockKey':_0x598732}));}async function scanHookFunctions(_0x159878){const _0x9f236a=a185_0x409d46,_0x25581f=join(_0x159878['scriptsRootDir'],_0x9f236a(0xc1)),_0x51893c=[];try{const _0x41f42b=await readdir(_0x25581f,{'withFileTypes':!![]});for(const _0x3686e1 of _0x41f42b){if(!_0x3686e1['isDirectory']())continue;const _0x35978f=_0x3686e1['name'],_0x3b4acc=join(_0x25581f,_0x35978f),_0x579ab0=await readdir(_0x3b4acc,{'withFileTypes':!![]});for(const _0x313952 of _0x579ab0){if(!_0x313952['isDirectory']())continue;const _0x3a7cf8=_0x313952['name'],_0xcdf055=join(_0x3b4acc,_0x3a7cf8),_0xe59f96=await readdir(_0xcdf055,{'withFileTypes':!![]});for(const _0x58952c of _0xe59f96){if(!_0x58952c['isDirectory']())continue;const _0x5eb52d=_0x58952c[_0x9f236a(0xa6)],_0x2bc451=join(_0xcdf055,_0x5eb52d),_0x1fd1e2=await readdir(_0x2bc451,{'withFileTypes':!![]});for(const _0x1447f9 of _0x1fd1e2){if(!_0x1447f9[_0x9f236a(0x9a)]()||!_0x1447f9[_0x9f236a(0xa6)]['endsWith']('.js'))continue;const _0x312153=_0x1447f9[_0x9f236a(0xa6)][_0x9f236a(0x9b)](/\.js$/,'');_0x51893c[_0x9f236a(0xb3)]({'type':_0x9f236a(0xc1),'name':_0x312153,'filePath':join(_0x2bc451,_0x1447f9[_0x9f236a(0xa6)]),'lockKey':'HOOK/'+_0x35978f+'/'+_0x3a7cf8+'/'+_0x5eb52d+'/'+_0x312153,'alias':_0x35978f,'operationType':_0x3a7cf8,'functionNode':_0x5eb52d});}}}}}catch(_0x455344){if(_0x455344[_0x9f236a(0xbe)]!==_0x9f236a(0xb4))throw _0x455344;}return _0x51893c;}export async function scanLocalBffFunctions(_0x208d80,_0x19e511){const _0xb0c679=a185_0x409d46;if(_0x19e511===_0xb0c679(0xc2)||_0x19e511===_0xb0c679(0xa2))return scanFlatFunctions(_0x208d80,_0x19e511);if(_0x19e511==='HOOK')return scanHookFunctions(_0x208d80);const [_0x5db2b1,_0x4226ec,_0x1dbd83]=await Promise[_0xb0c679(0xab)]([scanFlatFunctions(_0x208d80,_0xb0c679(0xc2)),scanFlatFunctions(_0x208d80,'ENDPOINT'),scanHookFunctions(_0x208d80)]);return[..._0x5db2b1,..._0x4226ec,..._0x1dbd83];}export function resolveLocalFilePathFromLockKey(_0x45a873,_0x2ab637){const _0x52337c=a185_0x409d46;return join(_0x45a873[_0x52337c(0xae)],..._0x2ab637[_0x52337c(0xa1)]('/'))+_0x52337c(0xaa);}export function createHookLocationMap(_0x58191f){const _0x3bce14=a185_0x409d46,_0x4301db=new Map();for(const _0x184692 of _0x58191f){_0x184692['beforeScriptId']&&_0x4301db['set'](_0x184692[_0x3bce14(0xb1)],{'datasetCode':_0x184692['datasetCode'],'operationType':snakeToCamel(_0x184692[_0x3bce14(0xb5)]),'functionNode':_0x3bce14(0xb0)}),_0x184692[_0x3bce14(0xa0)]&&_0x4301db[_0x3bce14(0xb7)](_0x184692[_0x3bce14(0xa0)],{'datasetCode':_0x184692[_0x3bce14(0xa7)],'operationType':snakeToCamel(_0x184692[_0x3bce14(0xb5)]),'functionNode':_0x3bce14(0xa4)});}return _0x4301db;}export function resolveRemoteScriptTarget(_0x21d2f2,_0x48c5e3,_0x342ce8,_0x22579a,_0x4ea74f){const _0xd4deba=a185_0x409d46,_0x2e0c03=normalizeBffType(_0x48c5e3[_0xd4deba(0xbb)]);if(!_0x2e0c03||!_0x48c5e3[_0xd4deba(0xbc)])return null;if(_0x2e0c03===_0xd4deba(0xc1)){const _0x4816c9=(_0x48c5e3['id']?_0x342ce8[_0xd4deba(0x9e)](_0x48c5e3['id']):undefined)??findHookLocationByRemoteId(_0x22579a,_0x48c5e3['id']);if(!_0x4816c9)return null;const _0xd05fe7=_0x4816c9[_0xd4deba(0x9f)]||_0x4ea74f['get'](_0x4816c9[_0xd4deba(0xa7)]),_0x22e4c0=_0xd05fe7??_0x4816c9[_0xd4deba(0xa7)],_0x451c04={..._0x4816c9,'alias':_0xd05fe7},_0x10c61f=_0xd4deba(0xb9)+_0x22e4c0+'/'+_0x451c04[_0xd4deba(0xb5)]+'/'+_0x451c04[_0xd4deba(0x9d)]+'/'+_0x48c5e3['functionName'];return{'lockKey':_0x10c61f,'filePath':resolveLocalFilePathFromLockKey(_0x21d2f2,_0x10c61f),'type':_0xd4deba(0xc1),'hookLocation':_0x451c04};}const _0x41118d=_0x2e0c03+'/'+_0x48c5e3[_0xd4deba(0xbc)];return{'lockKey':_0x41118d,'filePath':resolveLocalFilePathFromLockKey(_0x21d2f2,_0x41118d),'type':_0x2e0c03};}export async function ensureParentDirectory(_0x23c875){await mkdir(dirname(_0x23c875),{'recursive':!![]});}export async function fileExists(_0x4da231){const _0x5dc824=a185_0x409d46;try{return await access(_0x4da231,constants[_0x5dc824(0xbf)]),!![];}catch{return![];}}export async function directoryExists(_0x2b1c36){const _0x301ea9=a185_0x409d46;try{const _0x693a3f=await stat(_0x2b1c36);return _0x693a3f[_0x301ea9(0xa5)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5d653e,_0x4e7616){const _0x189a88=a186_0x1fa6,_0x1d2c44=_0x5d653e();while(!![]){try{const _0x124f20=parseInt(_0x189a88(0x1d4))/0x1*(parseInt(_0x189a88(0x1e0))/0x2)+parseInt(_0x189a88(0x1d5))/0x3*(-parseInt(_0x189a88(0x1dc))/0x4)+-parseInt(_0x189a88(0x1db))/0x5+-parseInt(_0x189a88(0x1e1))/0x6+parseInt(_0x189a88(0x1d8))/0x7*(parseInt(_0x189a88(0x1d6))/0x8)+parseInt(_0x189a88(0x1dd))/0x9*(-parseInt(_0x189a88(0x1de))/0xa)+parseInt(_0x189a88(0x1da))/0xb;if(_0x124f20===_0x4e7616)break;else _0x1d2c44['push'](_0x1d2c44['shift']());}catch(_0x32158f){_0x1d2c44['push'](_0x1d2c44['shift']());}}}(a186_0x33f5,0xb93f7));import{readFile}from'node:fs/promises';function a186_0x33f5(){const _0x1480dd=['403384SXivVY','utf8','84XWZsot','digest','30661125kJgegE','1804910cDpGKP','4iXEwjb','4741479ZNRQfs','10qElZtB','createHash','1544qFKRWK','5968068dUOLie','update','416puUfuO','3217011MygDlx'];a186_0x33f5=function(){return _0x1480dd;};return a186_0x33f5();}function a186_0x1fa6(_0xe853b2,_0x2d5c46){_0xe853b2=_0xe853b2-0x1d3;const _0x33f550=a186_0x33f5();let _0x1fa631=_0x33f550[_0xe853b2];return _0x1fa631;}import a186_0x4341d9 from'node:crypto';export function computeContentHash(_0x3e7910){const _0x46388f=a186_0x1fa6;return a186_0x4341d9[_0x46388f(0x1df)]('md5')[_0x46388f(0x1d3)](_0x3e7910)[_0x46388f(0x1d9)]('hex');}export async function computeFileHash(_0x578592){const _0x1c4aca=a186_0x1fa6,_0x4bfb4d=await readFile(_0x578592,_0x1c4aca(0x1d7));return computeContentHash(_0x4bfb4d);}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a187_0x1a43(_0x452ad8,_0x5ed52d){_0x452ad8=_0x452ad8-0x1e0;const _0x3fe275=a187_0x3fe2();let _0x1a430f=_0x3fe275[_0x452ad8];return _0x1a430f;}function a187_0x3fe2(){const _0x4aa901=['code','apps','29771aEHNUr','\x22.\x20','88ecrZkP','3974940HeCtli','506670EGUnuw','5559SdsdbH','functions','stringify','19011wjyfso','176OyTjeb','187992gkEZzH','108AKSaVX','ENOENT','scriptsRoot','current\x20\x22',':\x20scriptsRoot\x20mismatch\x20—\x20','lastSync','utf8','3373890BmpQjH','\x22\x20vs\x20lock\x20\x22','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20'];a187_0x3fe2=function(){return _0x4aa901;};return a187_0x3fe2();}(function(_0x79f999,_0x3c9903){const _0x463036=a187_0x1a43,_0x4ff75d=_0x79f999();while(!![]){try{const _0x4c8123=parseInt(_0x463036(0x1e0))/0x1*(parseInt(_0x463036(0x1e6))/0x2)+-parseInt(_0x463036(0x1e3))/0x3*(-parseInt(_0x463036(0x1e4))/0x4)+-parseInt(_0x463036(0x1ed))/0x5+parseInt(_0x463036(0x1f6))/0x6+parseInt(_0x463036(0x1f2))/0x7*(parseInt(_0x463036(0x1f4))/0x8)+-parseInt(_0x463036(0x1e5))/0x9+parseInt(_0x463036(0x1f5))/0xa;if(_0x4c8123===_0x3c9903)break;else _0x4ff75d['push'](_0x4ff75d['shift']());}catch(_0x4469c1){_0x4ff75d['push'](_0x4ff75d['shift']());}}}(a187_0x3fe2,0x649a6));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x3b8e1a,_0x5d2d71,_0x4ec51f,_0x995bb0){const _0x493986=a187_0x1a43,_0x179372={'apps':_0x3b8e1a[_0x493986(0x1f1)]&&typeof _0x3b8e1a[_0x493986(0x1f1)]==='object'?_0x3b8e1a[_0x493986(0x1f1)]:{}};let _0x2ccb15=_0x179372[_0x493986(0x1f1)][_0x5d2d71];if(!_0x2ccb15)return _0x2ccb15={'scriptsRoot':_0x4ec51f,'lastSync':'','functions':{}},_0x179372['apps'][_0x5d2d71]=_0x2ccb15,{'lockData':_0x179372,'appLock':_0x2ccb15};if(!_0x2ccb15[_0x493986(0x1e8)])_0x2ccb15[_0x493986(0x1e8)]=_0x4ec51f;else{if(_0x2ccb15['scriptsRoot']!==_0x4ec51f)throw new Error(_0x995bb0+_0x493986(0x1ea)+(_0x493986(0x1e9)+_0x4ec51f+_0x493986(0x1ee)+_0x2ccb15[_0x493986(0x1e8)]+_0x493986(0x1f3))+'Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x2ccb15[_0x493986(0x1e1)]&&(_0x2ccb15['functions']={}),!_0x2ccb15['lastSync']&&(_0x2ccb15[_0x493986(0x1eb)]=''),{'lockData':_0x179372,'appLock':_0x2ccb15};}export async function readBffLockFile(_0xa98273){const _0x5b2f16=a187_0x1a43;try{const _0x234a87=await readFile(_0xa98273,_0x5b2f16(0x1ec)),_0x4f8c5c=JSON['parse'](_0x234a87);return{'apps':_0x4f8c5c['apps']&&typeof _0x4f8c5c[_0x5b2f16(0x1f1)]==='object'?_0x4f8c5c[_0x5b2f16(0x1f1)]:{}};}catch(_0x5dd5af){if(_0x5dd5af[_0x5b2f16(0x1f0)]===_0x5b2f16(0x1e7))return null;throw new Error(_0x5b2f16(0x1ef)+String(_0x5dd5af));}}export async function writeBffLockFile(_0x1b7d83,_0xfbb890){const _0x24d6e3=a187_0x1a43;await mkdir(dirname(_0x1b7d83),{'recursive':!![]}),await writeFile(_0x1b7d83,JSON[_0x24d6e3(0x1e2)](_0xfbb890,null,0x2),'utf8');}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a189_0x2e4e(){const _0x1337c8=['datasetCode','88710JKrPKx','2031vAxAPz','1510446jrgYlZ','10FRRUgN','3357630jqNWuB','replace','38654ZZrxpe','before','toUpperCase','8HdDvZR','2490LKgbGn','remoteId','357612SpPxhv','after','functionNode','test','2728xlWZBU','1361458cpksdh','operationType','trim','values','toLowerCase'];a189_0x2e4e=function(){return _0x1337c8;};return a189_0x2e4e();}(function(_0x3a6bd7,_0x4dc060){const _0x663a03=a189_0x311b,_0x37af94=_0x3a6bd7();while(!![]){try{const _0x4f8e5a=-parseInt(_0x663a03(0xba))/0x1+-parseInt(_0x663a03(0xc5))/0x2+-parseInt(_0x663a03(0xc6))/0x3*(-parseInt(_0x663a03(0xbe))/0x4)+parseInt(_0x663a03(0xc8))/0x5*(parseInt(_0x663a03(0xc7))/0x6)+parseInt(_0x663a03(0xbf))/0x7*(parseInt(_0x663a03(0xce))/0x8)+parseInt(_0x663a03(0xc9))/0x9+parseInt(_0x663a03(0xcf))/0xa*(-parseInt(_0x663a03(0xcb))/0xb);if(_0x4f8e5a===_0x4dc060)break;else _0x37af94['push'](_0x37af94['shift']());}catch(_0x2c5a8a){_0x37af94['push'](_0x37af94['shift']());}}}(a189_0x2e4e,0x3e73f));export function snakeToCamel(_0x1cf18c){const _0xed53d3=a189_0x311b;return _0x1cf18c['toLowerCase']()[_0xed53d3(0xca)](/_([a-z])/g,(_0x1bdd9b,_0x326e1e)=>_0x326e1e[_0xed53d3(0xcd)]());}export function findHookLocationByRemoteId(_0x5738ea,_0x281611){const _0x22ca00=a189_0x311b;if(!_0x281611)return undefined;for(const _0x4f92d7 of Object[_0x22ca00(0xc2)](_0x5738ea)){if(_0x4f92d7[_0x22ca00(0xd0)]===_0x281611&&_0x4f92d7[_0x22ca00(0xc4)]&&_0x4f92d7[_0x22ca00(0xc0)]&&_0x4f92d7[_0x22ca00(0xbc)])return{'datasetCode':_0x4f92d7[_0x22ca00(0xc4)],'operationType':_0x4f92d7[_0x22ca00(0xc0)],'functionNode':_0x4f92d7[_0x22ca00(0xbc)]};}return undefined;}function a189_0x311b(_0x3eaa73,_0x31bd7d){_0x3eaa73=_0x3eaa73-0xba;const _0x2e4e69=a189_0x2e4e();let _0x311b90=_0x2e4e69[_0x3eaa73];return _0x311b90;}export function extractScriptDescription(_0x17f5f3){const _0x1cdaac=a189_0x311b,_0x530d59=_0x17f5f3['match'](/\[\s*脚本描述\s*]\s*(.+)/);return _0x530d59?.[0x1]?.[_0x1cdaac(0xc1)]()||undefined;}export function isValidBffFunctionName(_0x511a07){const _0x46b323=a189_0x311b;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x46b323(0xbd)](_0x511a07);}export function normalizeHookFunctionNode(_0x467595){const _0x5dce3e=a189_0x311b;if(!_0x467595)return undefined;const _0x3fae61=_0x467595['trim']()[_0x5dce3e(0xc3)]();if(_0x3fae61===_0x5dce3e(0xcc)||_0x3fae61===_0x5dce3e(0xbb))return _0x3fae61;return undefined;}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a190_0x1129(_0x21b7b7,_0x5e0aa8){_0x21b7b7=_0x21b7b7-0x197;const _0x2c85d9=a190_0x2c85();let _0x11290c=_0x2c85d9[_0x21b7b7];return _0x11290c;}(function(_0x275498,_0x5b359d){const _0x46403a=a190_0x1129,_0x350b8c=_0x275498();while(!![]){try{const _0x564578=parseInt(_0x46403a(0x19c))/0x1*(-parseInt(_0x46403a(0x199))/0x2)+-parseInt(_0x46403a(0x1ad))/0x3+-parseInt(_0x46403a(0x1a6))/0x4+-parseInt(_0x46403a(0x1a7))/0x5+parseInt(_0x46403a(0x1a9))/0x6+-parseInt(_0x46403a(0x19f))/0x7+-parseInt(_0x46403a(0x1ab))/0x8*(-parseInt(_0x46403a(0x1a8))/0x9);if(_0x564578===_0x5b359d)break;else _0x350b8c['push'](_0x350b8c['shift']());}catch(_0x3c1e79){_0x350b8c['push'](_0x350b8c['shift']());}}}(a190_0x2c85,0x32885));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x37d3cc){const _0x5c3f56=a190_0x1129;if(cache['has'](_0x37d3cc))return cache[_0x5c3f56(0x1af)](_0x37d3cc);const _0x1d727e=await listDatasets(_0x37d3cc),_0x5affad=new Map();for(const _0x4ad8de of _0x1d727e){const _0x2c3b06=_0x4ad8de['dbtableConfig'];_0x2c3b06?.[_0x5c3f56(0x1b1)]!=null&&_0x5affad[_0x5c3f56(0x1b0)](_0x2c3b06[_0x5c3f56(0x1b1)],_0x2c3b06['dbName']??_0x5c3f56(0x198)+_0x2c3b06[_0x5c3f56(0x1b1)]);}const _0xa98ac8=[..._0x5affad['entries']()][_0x5c3f56(0x19a)](([_0x3b039e,_0x39cb5a])=>({'dbId':_0x3b039e,'dbName':_0x39cb5a}));return cache[_0x5c3f56(0x1b0)](_0x37d3cc,_0xa98ac8),_0xa98ac8;}function a190_0x2c85(){const _0x2f9652=['1614BzYZaC','filter','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','118580JdAgMw','No\x20database\x20matching\x20\x22','join','find','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','\x22\x20under\x20app\x20\x22','includes','183444pBZDjU','863930xVJdcA','6941529RuMAyo','871248TvzDfg','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','8jeYEBg','dbName','835881sjRwWO','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','get','set','dbId','\x22\x20matches\x20multiple\x20databases:\x20','length','.\x20Be\x20more\x20specific.','db-','242wATGqN','map','toLowerCase'];a190_0x2c85=function(){return _0x2f9652;};return a190_0x2c85();}export async function resolveDb(_0x3d63cb,_0x54bea3){const _0x28572f=a190_0x1129,_0x281fb7=await listDatabases(_0x3d63cb);if(_0x281fb7[_0x28572f(0x1b3)]===0x0)return{'resolved':[],'error':_0x28572f(0x1a3)+_0x3d63cb+_0x28572f(0x1ae)};if(!_0x54bea3)return{'resolved':_0x281fb7};const _0x5dbfc4=Number(_0x54bea3);if(!Number['isNaN'](_0x5dbfc4)){const _0x3d62de=_0x281fb7[_0x28572f(0x1a2)](_0x37b187=>_0x37b187[_0x28572f(0x1b1)]===_0x5dbfc4);if(_0x3d62de)return{'resolved':[_0x3d62de]};}const _0xfd6062=_0x54bea3[_0x28572f(0x19b)](),_0x51395d=_0x281fb7[_0x28572f(0x19d)](_0x3aea44=>_0x3aea44[_0x28572f(0x1ac)][_0x28572f(0x19b)]()[_0x28572f(0x1a5)](_0xfd6062));if(_0x51395d[_0x28572f(0x1b3)]>0x0)return{'resolved':_0x51395d};const _0x183f9d=_0x281fb7[_0x28572f(0x19a)](_0x43afe7=>_0x43afe7['dbName']+'\x20('+_0x43afe7[_0x28572f(0x1b1)]+')')[_0x28572f(0x1a1)](',\x20');return{'resolved':[],'error':_0x28572f(0x1a0)+_0x54bea3+_0x28572f(0x1a4)+_0x3d63cb+'\x22.\x20Available:\x20'+_0x183f9d+_0x28572f(0x1aa)};}export async function resolveOneDb(_0x1724fd,_0x308441){const _0x26b540=a190_0x1129,{resolved:_0x19d8e2,error:_0x536bea}=await resolveDb(_0x1724fd,_0x308441);if(_0x536bea)return{'db':null,'error':_0x536bea};if(_0x19d8e2[_0x26b540(0x1b3)]===0x1)return{'db':_0x19d8e2[0x0]};if(!_0x308441){const _0x1fd844=_0x19d8e2[_0x26b540(0x19a)](_0x34f76c=>_0x34f76c[_0x26b540(0x1ac)]+'\x20('+_0x34f76c[_0x26b540(0x1b1)]+')')[_0x26b540(0x1a1)](',\x20');return{'db':null,'error':_0x26b540(0x19e)+_0x1fd844};}const _0x2c18a7=_0x19d8e2[_0x26b540(0x19a)](_0x4330ef=>_0x4330ef[_0x26b540(0x1ac)]+'\x20('+_0x4330ef[_0x26b540(0x1b1)]+')')[_0x26b540(0x1a1)](',\x20');return{'db':null,'error':'\x22'+_0x308441+_0x26b540(0x1b2)+_0x2c18a7+_0x26b540(0x197)};}export async function getDbName(_0x273407,_0xa1f97e){const _0x1e1107=a190_0x1129,_0x1f8e78=await listDatabases(_0x273407);return _0x1f8e78[_0x1e1107(0x1a2)](_0x1f4082=>_0x1f4082[_0x1e1107(0x1b1)]===_0xa1f97e)?.[_0x1e1107(0x1ac)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a191_0x3d76(_0xb87782,_0x3e9af3){_0xb87782=_0xb87782-0x1e4;const _0x1da851=a191_0x1da8();let _0x3d768d=_0x1da851[_0xb87782];return _0x3d768d;}const a191_0x2cc83f=a191_0x3d76;(function(_0x30e01e,_0x1458a1){const _0x5b2891=a191_0x3d76,_0x2eae7d=_0x30e01e();while(!![]){try{const _0x237baf=parseInt(_0x5b2891(0x1ed))/0x1*(-parseInt(_0x5b2891(0x1ef))/0x2)+parseInt(_0x5b2891(0x1e4))/0x3*(-parseInt(_0x5b2891(0x1f5))/0x4)+parseInt(_0x5b2891(0x1f2))/0x5+parseInt(_0x5b2891(0x1ee))/0x6+-parseInt(_0x5b2891(0x1e6))/0x7*(parseInt(_0x5b2891(0x1f4))/0x8)+parseInt(_0x5b2891(0x1e7))/0x9*(parseInt(_0x5b2891(0x1e8))/0xa)+parseInt(_0x5b2891(0x1f1))/0xb*(parseInt(_0x5b2891(0x1f3))/0xc);if(_0x237baf===_0x1458a1)break;else _0x2eae7d['push'](_0x2eae7d['shift']());}catch(_0x1b0e25){_0x2eae7d['push'](_0x2eae7d['shift']());}}}(a191_0x1da8,0xa8fff));import{constants}from'node:fs';import{access,mkdir}from'node:fs/promises';import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0xaa5c4a,_0x4063d0=process[a191_0x2cc83f(0x1f0)]()){const _0x3fed8c=a191_0x2cc83f,_0x32c9dd=resolve(_0x4063d0),_0x2ef636=join(_0x32c9dd,'.rabetbase',_0x3fed8c(0x1ec));return{'projectRoot':_0x32c9dd,'pagesBaseDir':_0x2ef636,'appPagesDir':join(_0x2ef636,_0xaa5c4a),'lockFilePath':join(_0x32c9dd,_0x3fed8c(0x1ea),_0x3fed8c(0x1f7))};}export function buildPageFileName(_0x47904b,_0x38aa59){const _0x879ddd=a191_0x2cc83f;return _0x47904b+'-'+String(_0x38aa59)[_0x879ddd(0x1f6)]()+_0x879ddd(0x1e9);}function a191_0x1da8(){const _0x3ae5b0=['504UZLFGu','736lklpBo','4cxttpb','toUpperCase','page.lock.json','1043409PvBalK','appPagesDir','84014YEzkOU','86895mUphNO','970feBQom','.json','.rabetbase','F_OK','page','9GLDmBd','3287652FDOzuD','243422XNNhZD','cwd','251042RAukHs','3983040CEuQnr'];a191_0x1da8=function(){return _0x3ae5b0;};return a191_0x1da8();}export function resolvePageFilePath(_0x250e2a,_0x28506e,_0x2082b8){const _0x580472=a191_0x2cc83f;return join(_0x250e2a[_0x580472(0x1e5)],buildPageFileName(_0x28506e,_0x2082b8));}export async function ensureParentDirectory(_0x15e7b9){await mkdir(dirname(_0x15e7b9),{'recursive':!![]});}export async function fileExists(_0x32ca29){const _0x4a082b=a191_0x2cc83f;try{return await access(_0x32ca29,constants[_0x4a082b(0x1eb)]),!![];}catch{return![];}}
|
package/lib/core/page/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a192_0x4e93(){const _0x5c6896=['1814250RVUiPD','11081511hAqNHP','stringify','20276pLJmLQ','812454tIpsRI','update','870qobhre','12432qccyvT','utf8','digest','parse','369819BeDhqn','md5','7dlYIYJ','hex','7462448IZVBTg'];a192_0x4e93=function(){return _0x5c6896;};return a192_0x4e93();}(function(_0x199704,_0x23d14e){const _0x5d272a=a192_0x11ef,_0x101d79=_0x199704();while(!![]){try{const _0xfe22c3=parseInt(_0x5d272a(0x18f))/0x1+-parseInt(_0x5d272a(0x18b))/0x2+-parseInt(_0x5d272a(0x194))/0x3+-parseInt(_0x5d272a(0x197))/0x4*(-parseInt(_0x5d272a(0x18a))/0x5)+-parseInt(_0x5d272a(0x188))/0x6*(-parseInt(_0x5d272a(0x191))/0x7)+parseInt(_0x5d272a(0x193))/0x8+-parseInt(_0x5d272a(0x195))/0x9;if(_0xfe22c3===_0x23d14e)break;else _0x101d79['push'](_0x101d79['shift']());}catch(_0x253391){_0x101d79['push'](_0x101d79['shift']());}}}(a192_0x4e93,0x74a63));function a192_0x11ef(_0x5c5995,_0x123770){_0x5c5995=_0x5c5995-0x188;const _0x4e93b1=a192_0x4e93();let _0x11efd3=_0x4e93b1[_0x5c5995];return _0x11efd3;}import a192_0x204e69 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x499fd4){const _0x3b6853=a192_0x11ef;return JSON[_0x3b6853(0x196)](JSON[_0x3b6853(0x18e)](_0x499fd4),null,0x2)+'\x0a';}export function computePageContentHash(_0x46c953){const _0x3c07d9=a192_0x11ef;return a192_0x204e69['createHash'](_0x3c07d9(0x190))[_0x3c07d9(0x189)](_0x46c953)[_0x3c07d9(0x18d)](_0x3c07d9(0x192));}export function computeSerializedSchemaHash(_0x355f10){return computePageContentHash(serializePageSchemaForFile(_0x355f10));}export async function computePageFileHash(_0x14a800){const _0x59584d=a192_0x11ef,_0xf3b4db=await readFile(_0x14a800,_0x59584d(0x18c));return computePageContentHash(_0xf3b4db);}
|
package/lib/core/page/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a193_0x3a81(_0x719165,_0x20804f){_0x719165=_0x719165-0x155;const _0x501abe=a193_0x501a();let _0x3a81ca=_0x501abe[_0x719165];return _0x3a81ca;}(function(_0x42236f,_0x1fe593){const _0x4c09d5=a193_0x3a81,_0x203d39=_0x42236f();while(!![]){try{const _0x1574e0=parseInt(_0x4c09d5(0x15d))/0x1*(-parseInt(_0x4c09d5(0x155))/0x2)+-parseInt(_0x4c09d5(0x157))/0x3*(-parseInt(_0x4c09d5(0x162))/0x4)+parseInt(_0x4c09d5(0x15e))/0x5*(-parseInt(_0x4c09d5(0x166))/0x6)+parseInt(_0x4c09d5(0x164))/0x7+parseInt(_0x4c09d5(0x167))/0x8*(-parseInt(_0x4c09d5(0x15f))/0x9)+parseInt(_0x4c09d5(0x15a))/0xa*(parseInt(_0x4c09d5(0x158))/0xb)+parseInt(_0x4c09d5(0x15b))/0xc;if(_0x1574e0===_0x1fe593)break;else _0x203d39['push'](_0x203d39['shift']());}catch(_0x339fd7){_0x203d39['push'](_0x203d39['shift']());}}}(a193_0x501a,0x5d38a));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a193_0x501a(){const _0x420abb=['object','utf8','217260cFqGbb','code','778498RUbdJD','lastSync','234246dqSpWf','16VrXfTk','pages','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','88CKfDTt','apps','24OdeFNt','5819VTvEYi','stringify','7370CifknD','9882108wewjmC','ENOENT','16501tbyvOo','20nAwbzS','2227833UbFvTs'];a193_0x501a=function(){return _0x420abb;};return a193_0x501a();}export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0xdfdd0a,_0x2293df){const _0xb5f067=a193_0x3a81,_0x43ba68={'apps':_0xdfdd0a[_0xb5f067(0x156)]&&typeof _0xdfdd0a['apps']===_0xb5f067(0x160)?_0xdfdd0a[_0xb5f067(0x156)]:{}};let _0x1b7b50=_0x43ba68[_0xb5f067(0x156)][_0x2293df];if(!_0x1b7b50)return _0x1b7b50={'lastSync':'','pages':{}},_0x43ba68['apps'][_0x2293df]=_0x1b7b50,{'lockData':_0x43ba68,'appLock':_0x1b7b50};return!_0x1b7b50[_0xb5f067(0x165)]&&(_0x1b7b50[_0xb5f067(0x165)]=''),(!_0x1b7b50[_0xb5f067(0x168)]||typeof _0x1b7b50[_0xb5f067(0x168)]!=='object')&&(_0x1b7b50[_0xb5f067(0x168)]={}),{'lockData':_0x43ba68,'appLock':_0x1b7b50};}export async function readPageLockFile(_0x397687){const _0x19418d=a193_0x3a81;try{const _0x2dcc9a=await readFile(_0x397687,_0x19418d(0x161)),_0x324f45=JSON['parse'](_0x2dcc9a);return{'apps':_0x324f45[_0x19418d(0x156)]&&typeof _0x324f45[_0x19418d(0x156)]===_0x19418d(0x160)?_0x324f45[_0x19418d(0x156)]:{}};}catch(_0x33e016){if(_0x33e016[_0x19418d(0x163)]===_0x19418d(0x15c))return null;throw new Error(_0x19418d(0x169)+String(_0x33e016));}}export async function writePageLockFile(_0x124aae,_0x1ab2f3){const _0x22e2d5=a193_0x3a81;await mkdir(dirname(_0x124aae),{'recursive':!![]}),await writeFile(_0x124aae,JSON[_0x22e2d5(0x159)](_0x1ab2f3,null,0x2),'utf8');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a195_0x51b17b=a195_0x3ad4;(function(_0x4d32b8,_0x52bd59){const _0x3b4b05=a195_0x3ad4,_0x31b984=_0x4d32b8();while(!![]){try{const _0xe14568=parseInt(_0x3b4b05(0x9b))/0x1*(parseInt(_0x3b4b05(0xa7))/0x2)+parseInt(_0x3b4b05(0x9e))/0x3*(-parseInt(_0x3b4b05(0xa1))/0x4)+-parseInt(_0x3b4b05(0xa8))/0x5*(-parseInt(_0x3b4b05(0xa0))/0x6)+-parseInt(_0x3b4b05(0x9c))/0x7+parseInt(_0x3b4b05(0xa4))/0x8*(-parseInt(_0x3b4b05(0x9f))/0x9)+parseInt(_0x3b4b05(0xa2))/0xa+parseInt(_0x3b4b05(0xa5))/0xb;if(_0xe14568===_0x52bd59)break;else _0x31b984['push'](_0x31b984['shift']());}catch(_0x2ca587){_0x31b984['push'](_0x31b984['shift']());}}}(a195_0x2a70,0x619f9));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a195_0x3ad4(_0x29a02d,_0x3ba947){_0x29a02d=_0x29a02d-0x9b;const _0x2a70aa=a195_0x2a70();let _0x3ad46f=_0x2a70aa[_0x29a02d];return _0x3ad46f;}function a195_0x2a70(){const _0x4232f2=['27WHZYsz','13830zLHoQV','19612JMGmdX','2136840PVCPIh','sql-trash','2009288iUutoP','12171192jOrtaw','/sql','3228ZOmYYj','1420bXBHsN','.rabetbase','233LgXjKo','5533787DycRyE','sql.lock.json','249AErdlt'];a195_0x2a70=function(){return _0x4232f2;};return a195_0x2a70();}const DOT_DIR=a195_0x51b17b(0xa9),LOCK_FILE_NAME=a195_0x51b17b(0x9d),TRASH_DIR_NAME=a195_0x51b17b(0xa3);export function loadSqlProjectConfig(_0x16c4c9,_0x4896a2){const _0xa41abf=a195_0x51b17b,_0x3879d2=resolve(_0x4896a2??findProjectRootDirectory()),_0x18b8f5=DOT_DIR+_0xa41abf(0xa6),_0x49d9f5=_0x18b8f5+'/'+_0x16c4c9;return{'projectRoot':_0x3879d2,'appCode':_0x16c4c9,'sqlWorkspaceRoot':_0x18b8f5,'sqlRoot':_0x49d9f5,'sqlRootDir':resolve(_0x3879d2,DOT_DIR,'sql',_0x16c4c9),'lockFilePath':resolve(_0x3879d2,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x3879d2,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xfd552e,_0x58fb7a){const _0x56bc55=a196_0x1514,_0xe62b64=_0xfd552e();while(!![]){try{const _0x16a56e=-parseInt(_0x56bc55(0x1a0))/0x1+-parseInt(_0x56bc55(0x1aa))/0x2*(-parseInt(_0x56bc55(0x1a5))/0x3)+parseInt(_0x56bc55(0x1b7))/0x4+parseInt(_0x56bc55(0x1b9))/0x5*(parseInt(_0x56bc55(0x1a6))/0x6)+-parseInt(_0x56bc55(0x1b6))/0x7+parseInt(_0x56bc55(0x1a2))/0x8*(parseInt(_0x56bc55(0x1b0))/0x9)+-parseInt(_0x56bc55(0x19f))/0xa;if(_0x16a56e===_0x58fb7a)break;else _0xe62b64['push'](_0xe62b64['shift']());}catch(_0xa6d880){_0xe62b64['push'](_0xe62b64['shift']());}}}(a196_0x3dac,0xb9dbc));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x3aecc5){const _0x28956d=a196_0x1514;if(_0x3aecc5===_0x28956d(0x1bd))return _0x28956d(0x1a4);if(_0x3aecc5===_0x28956d(0x1a9))return _0x28956d(0x1b2);return undefined;}async function scanSqlFilesRecursively(_0x486833,_0x14b9a5){const _0xadad87=a196_0x1514,_0x11670a=[];try{const _0xeaa183=await readdir(_0x486833,{'withFileTypes':!![]});for(const _0x10ec51 of _0xeaa183){const _0x54d07a=join(_0x486833,_0x10ec51[_0xadad87(0x1ad)]);if(_0x10ec51[_0xadad87(0x1be)]()){_0x11670a[_0xadad87(0x1a7)](...await scanSqlFilesRecursively(_0x54d07a,_0x14b9a5));continue;}if(!_0x10ec51[_0xadad87(0x1ab)]())continue;const _0x3e4d1e=extname(_0x10ec51[_0xadad87(0x1ad)])[_0xadad87(0x1bb)](),_0x59c865=extensionToMode(_0x3e4d1e);if(!_0x59c865)continue;const _0x34aa33=relative(_0x14b9a5,_0x54d07a)['replace'](/\\/g,'/'),_0x2f178a=_0x34aa33['split']('/')[_0xadad87(0x1a3)](Boolean),_0x3cd3d8=parseSqlPath(_0x2f178a,_0x10ec51[_0xadad87(0x1ad)],_0x3e4d1e);if(!_0x3cd3d8)continue;_0x11670a[_0xadad87(0x1a7)]({'sqlCode':_0x3cd3d8[_0xadad87(0x1a8)],'sqlName':_0x3cd3d8['sqlName'],'dbDirectory':_0x2f178a[0x0],'filePath':_0x54d07a,'relativePath':_0x34aa33,'lockKey':_0x3cd3d8['sqlCode'],'mode':_0x59c865});}}catch(_0x5de0a9){if(_0x5de0a9[_0xadad87(0x1bc)]!==_0xadad87(0x1b5))throw _0x5de0a9;}return _0x11670a;}function a196_0x1514(_0x19fdd6,_0x3ee389){_0x19fdd6=_0x19fdd6-0x19f;const _0x3dac05=a196_0x3dac();let _0x1514eb=_0x3dac05[_0x19fdd6];return _0x1514eb;}export async function scanLocalSqlQueries(_0xc207cd){const _0x5778ec=a196_0x1514;return scanSqlFilesRecursively(_0xc207cd[_0x5778ec(0x1b8)],_0xc207cd['sqlRootDir']);}export function resolveLocalSqlFilePath(_0x57952d,_0xa37f15,_0x30774a){const _0xd4a58b=a196_0x1514,_0x85b7e3=_0x30774a?.[_0xd4a58b(0x1b1)]||(_0x30774a?.[_0xd4a58b(0x1ae)]||_0x30774a?.[_0xd4a58b(0x1b3)]?buildSqlRelativePath(_0xa37f15,_0x30774a?.[_0xd4a58b(0x1ae)],_0x30774a?.['dbName'],_0x30774a?.['mode']||_0xd4a58b(0x1a4),_0x30774a?.['dbId']):buildDefaultSqlFileName(_0xa37f15,_0x30774a?.[_0xd4a58b(0x1af)]||'sql'));return join(_0x57952d[_0xd4a58b(0x1b8)],_0x85b7e3);}export async function directoryExists(_0x4220e9){try{const _0x34f49d=await stat(_0x4220e9);return _0x34f49d['isDirectory']();}catch{return![];}}function parseSqlPath(_0x2a2779,_0x13ee40,_0x3fb4f6){const _0x2af860=a196_0x1514,_0x250863=_0x13ee40[_0x2af860(0x1ac)](0x0,-_0x3fb4f6[_0x2af860(0x1a1)]);if(_0x2a2779[_0x2af860(0x1a1)]<0x2)return null;const _0x35056e=_0x250863[_0x2af860(0x1b4)]('_');if(_0x35056e<=0x0||_0x35056e>=_0x250863[_0x2af860(0x1a1)]-0x1)return null;const _0x5c1e32=_0x250863[_0x2af860(0x1ac)](0x0,_0x35056e);if(!isLikelySqlCode(_0x5c1e32))return null;return{'sqlCode':_0x5c1e32,'sqlName':_0x250863[_0x2af860(0x1ac)](_0x35056e+0x1)};}function isLikelySqlCode(_0xec433d){const _0x58d6dc=a196_0x1514;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x58d6dc(0x1ba)](_0xec433d);}function a196_0x3dac(){const _0x22a132=['.xml','2giiSpj','isFile','slice','name','sqlName','mode','470115PIMbHi','path','mybatisXml','dbName','indexOf','ENOENT','8837738IAYlbM','2285084gOyMoa','sqlRootDir','2560955keCtCU','test','toLowerCase','code','.sql','isDirectory','7495130PmpVeo','831536TCDxdp','length','216sajNTB','filter','sql','3333156hHudjX','6RpzIiN','push','sqlCode'];a196_0x3dac=function(){return _0x22a132;};return a196_0x3dac();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x326c5e,_0x4e817b){const _0x6d7cb6=a197_0xad04,_0x5847d1=_0x326c5e();while(!![]){try{const _0x1d8bee=parseInt(_0x6d7cb6(0xae))/0x1+parseInt(_0x6d7cb6(0xa6))/0x2+parseInt(_0x6d7cb6(0xa8))/0x3*(parseInt(_0x6d7cb6(0xaa))/0x4)+-parseInt(_0x6d7cb6(0xa7))/0x5+-parseInt(_0x6d7cb6(0xa5))/0x6+parseInt(_0x6d7cb6(0xab))/0x7*(parseInt(_0x6d7cb6(0xa3))/0x8)+parseInt(_0x6d7cb6(0xa4))/0x9*(-parseInt(_0x6d7cb6(0xad))/0xa);if(_0x1d8bee===_0x4e817b)break;else _0x5847d1['push'](_0x5847d1['shift']());}catch(_0x4dc1a8){_0x5847d1['push'](_0x5847d1['shift']());}}}(a197_0x49a0,0xb1e06));import{readFile}from'node:fs/promises';function a197_0x49a0(){const _0x2c696e=['731008PniBCx','createHash','8frfQkn','9xeLmAl','194262NCALLE','2365992aqzSiw','5273685lxiCFL','147ZMnOaH','update','13204RDVDbI','3210431dqEzPG','digest','7186900prdjMt'];a197_0x49a0=function(){return _0x2c696e;};return a197_0x49a0();}import a197_0x5f4372 from'node:crypto';function a197_0xad04(_0x492ade,_0x10bec3){_0x492ade=_0x492ade-0xa3;const _0x49a018=a197_0x49a0();let _0xad04d4=_0x49a018[_0x492ade];return _0xad04d4;}export function computeSqlContentHash(_0x44d9aa){const _0x371db3=a197_0xad04;return a197_0x5f4372[_0x371db3(0xaf)]('md5')[_0x371db3(0xa9)](_0x44d9aa)[_0x371db3(0xac)]('hex');}export async function computeSqlFileHash(_0x38436f){const _0x4b51e3=await readFile(_0x38436f,'utf8');return computeSqlContentHash(_0x4b51e3);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x564d0b,_0x5ad181){const _0x2deccc=a198_0x552c,_0xdb2832=_0x564d0b();while(!![]){try{const _0x229b8a=parseInt(_0x2deccc(0xeb))/0x1*(parseInt(_0x2deccc(0xec))/0x2)+parseInt(_0x2deccc(0xe3))/0x3+-parseInt(_0x2deccc(0xe1))/0x4+parseInt(_0x2deccc(0xe9))/0x5+parseInt(_0x2deccc(0xde))/0x6+-parseInt(_0x2deccc(0xe8))/0x7*(parseInt(_0x2deccc(0xe0))/0x8)+-parseInt(_0x2deccc(0xe6))/0x9;if(_0x229b8a===_0x5ad181)break;else _0xdb2832['push'](_0xdb2832['shift']());}catch(_0x4cafd7){_0xdb2832['push'](_0xdb2832['shift']());}}}(a198_0x5c36,0xe4c7b));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}function a198_0x552c(_0x126ab6,_0x1469cc){_0x126ab6=_0x126ab6-0xd8;const _0x5c36d9=a198_0x5c36();let _0x552c38=_0x5c36d9[_0x126ab6];return _0x552c38;}export function ensureSqlLockScope(_0x415179,_0x10a95c,_0x36497b,_0x7755a){const _0x2b0563=a198_0x552c,_0x28ed3f=_0x415179??createEmptySqlLock();let _0x355e2b=_0x28ed3f['apps'][_0x10a95c];if(!_0x355e2b)return _0x355e2b={'sqlRoot':_0x36497b,'lastSync':'','sqls':{}},_0x28ed3f[_0x2b0563(0xd9)][_0x10a95c]=_0x355e2b,{'lockData':_0x28ed3f,'appLock':_0x355e2b};if(!_0x355e2b[_0x2b0563(0xdb)])_0x355e2b[_0x2b0563(0xdb)]=_0x36497b;else{if(_0x355e2b[_0x2b0563(0xdb)]!==_0x36497b)throw new Error(_0x7755a+_0x2b0563(0xe2)+_0x36497b+_0x2b0563(0xe7)+_0x355e2b[_0x2b0563(0xdb)]+_0x2b0563(0xe5)+_0x2b0563(0xda));}return!_0x355e2b['sqls']&&(_0x355e2b[_0x2b0563(0xe4)]={}),!_0x355e2b[_0x2b0563(0xed)]&&(_0x355e2b[_0x2b0563(0xed)]=''),{'lockData':_0x28ed3f,'appLock':_0x355e2b};}export async function readSqlLockFile(_0x3d0a6f){const _0xcde3b2=a198_0x552c;try{const _0x69bb23=await readFile(_0x3d0a6f,_0xcde3b2(0xdf));return JSON[_0xcde3b2(0xea)](_0x69bb23);}catch(_0x6abbef){if(_0x6abbef[_0xcde3b2(0xdc)]===_0xcde3b2(0xdd))return null;throw new Error(_0xcde3b2(0xd8)+String(_0x6abbef));}}export async function writeSqlLockFile(_0x3aa84f,_0x563341){const _0x294ce5=a198_0x552c;await mkdir(dirname(_0x3aa84f),{'recursive':!![]}),await writeFile(_0x3aa84f,JSON['stringify'](_0x563341,null,0x2),_0x294ce5(0xdf));}function a198_0x5c36(){const _0x11e1f4=['sqlRoot','code','ENOENT','7115562BbykIR','utf8','88840qhiWJk','2962048FMulni',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','2360607sIOxzE','sqls','\x22.\x20','27416574SShePz','\x22\x20vs\x20lock\x20\x22','413QsxTzL','8288920CfLpMe','parse','48QPqGln','72854dOgwKf','lastSync','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','apps','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.'];a198_0x5c36=function(){return _0x11e1f4;};return a198_0x5c36();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a9a4d,_0x2c64a5){const _0x1d2c08=a200_0x5cad,_0x1a454c=_0x4a9a4d();while(!![]){try{const _0x36ba3a=parseInt(_0x1d2c08(0xe3))/0x1+-parseInt(_0x1d2c08(0xe0))/0x2+-parseInt(_0x1d2c08(0xe1))/0x3+-parseInt(_0x1d2c08(0xea))/0x4*(-parseInt(_0x1d2c08(0xf2))/0x5)+parseInt(_0x1d2c08(0xef))/0x6*(-parseInt(_0x1d2c08(0xeb))/0x7)+-parseInt(_0x1d2c08(0xe5))/0x8*(parseInt(_0x1d2c08(0xe2))/0x9)+-parseInt(_0x1d2c08(0xed))/0xa*(-parseInt(_0x1d2c08(0xf1))/0xb);if(_0x36ba3a===_0x2c64a5)break;else _0x1a454c['push'](_0x1a454c['shift']());}catch(_0x245899){_0x1a454c['push'](_0x1a454c['shift']());}}}(a200_0x2285,0xd0d70));function a200_0x2285(){const _0x37778c=['9UVZxAg','1493706KAdxSh','unknown-db','10743896xRmEsA','test','mybatisXml','replace','db-','5418664HdiHEe','7pyZunv','unknown-sql','120050NVyqsd','.xml','4182522sGTTQL','.sql','1485bzvmty','5xPQsIf','24yQUPTf','4720659fMBATf'];a200_0x2285=function(){return _0x37778c;};return a200_0x2285();}export function detectSqlMode(_0x435cbc){const _0x55d952=a200_0x5cad,_0x1d631d=_0x435cbc['trimStart']();if(/^<(select|insert|update|delete)\b/i[_0x55d952(0xe6)](_0x1d631d))return _0x55d952(0xe7);return'sql';}function a200_0x5cad(_0x550888,_0x4b0c34){_0x550888=_0x550888-0xe0;const _0x228588=a200_0x2285();let _0x5cadd3=_0x228588[_0x550888];return _0x5cadd3;}export function getSqlFileExtension(_0x120b06){const _0x40350c=a200_0x5cad;return _0x120b06===_0x40350c(0xe7)?_0x40350c(0xee):_0x40350c(0xf0);}export function buildDefaultSqlFileName(_0x47396d,_0x34f75e){return''+_0x47396d+getSqlFileExtension(_0x34f75e);}export function sanitizeSqlPathSegment(_0x4cf315,_0x3a0985){const _0x4d3516=a200_0x5cad,_0x16a7e5=String(_0x4cf315??'')['trim'](),_0x15db40=_0x16a7e5[_0x4d3516(0xe8)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x4d3516(0xe8)](/\s+/g,'-')['replace'](/-+/g,'-')['replace'](/^\.+/,'')[_0x4d3516(0xe8)](/\.+$/,'')['replace'](/^-+/,'')['replace'](/-+$/,'');return _0x15db40||_0x3a0985;}export function buildDbDirectoryName(_0x3afed6,_0x2352f0){const _0xa287e3=a200_0x5cad;return sanitizeSqlPathSegment(_0x3afed6,_0x2352f0!=null?_0xa287e3(0xe9)+_0x2352f0:_0xa287e3(0xe4));}export function buildSqlRelativePath(_0x4cb9ea,_0x17eb97,_0x109c15,_0x5bf8ce,_0x25595e){const _0x44fcb3=a200_0x5cad,_0x19a6a5=buildDbDirectoryName(_0x109c15,_0x25595e),_0x1bd9e5=sanitizeSqlPathSegment(_0x4cb9ea,_0x44fcb3(0xec)),_0x2c4851=sanitizeSqlPathSegment(_0x17eb97,_0x1bd9e5);return _0x19a6a5+'/'+_0x1bd9e5+'_'+_0x2c4851+getSqlFileExtension(_0x5bf8ce);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a201_0x215c(){const _0x1996d9=['match','3010ppZphj','matchAll','add','24QeeXwT','458ImSIJL','UPDATE','1272206tAjiKy','INSERT','from','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','11xguHAk','join','length','4zxOJcA','8JQYrEE','596001toESEg','722iASvOh','type','\x20with\x20parameters:\x20','UNKNOWN','replace','1375857nZmPny','SELECT','trim','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','915432IprbSR','2718yGZCDf','DDL','includes','2490000tKzwwV','startsWith','unknown\x20table(s)','reason','WITH','push','SQL\x20content\x20is\x20empty','toUpperCase','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.'];a201_0x215c=function(){return _0x1996d9;};return a201_0x215c();}function a201_0x10fc(_0x473dc2,_0x3b937d){_0x473dc2=_0x473dc2-0x103;const _0x215c44=a201_0x215c();let _0x10fca8=_0x215c44[_0x473dc2];return _0x10fca8;}(function(_0x281fea,_0x2bae83){const _0x3a180d=a201_0x10fc,_0xdc6f86=_0x281fea();while(!![]){try{const _0x5cba9c=parseInt(_0x3a180d(0x116))/0x1*(parseInt(_0x3a180d(0x10a))/0x2)+parseInt(_0x3a180d(0x115))/0x3*(-parseInt(_0x3a180d(0x113))/0x4)+parseInt(_0x3a180d(0x106))/0x5*(parseInt(_0x3a180d(0x121))/0x6)+-parseInt(_0x3a180d(0x120))/0x7*(-parseInt(_0x3a180d(0x114))/0x8)+-parseInt(_0x3a180d(0x11b))/0x9+-parseInt(_0x3a180d(0x124))/0xa*(parseInt(_0x3a180d(0x110))/0xb)+parseInt(_0x3a180d(0x109))/0xc*(parseInt(_0x3a180d(0x10c))/0xd);if(_0x5cba9c===_0x2bae83)break;else _0xdc6f86['push'](_0xdc6f86['shift']());}catch(_0x518b0c){_0xdc6f86['push'](_0xdc6f86['shift']());}}}(a201_0x215c,0x280a4));export function detectSqlType(_0x40b0e6){const _0x4d5a32=a201_0x10fc;if(!_0x40b0e6?.[_0x4d5a32(0x11d)]())return{'type':_0x4d5a32(0x119),'isSelectOnly':![],'isDangerous':![],'reason':_0x4d5a32(0x12a)};const _0xa9e93d=_0x40b0e6[_0x4d5a32(0x11a)](/#\{[^}]*\}/g,'?')[_0x4d5a32(0x11a)](/\$\{[^}]*\}/g,'?')[_0x4d5a32(0x11a)](/@[^(\s]+(\([^)]*\))?/g,'')['replace'](/\/\*[\s\S]*?\*\//g,'')[_0x4d5a32(0x11d)](),_0x465afd=_0xa9e93d['split']('\x0a');let _0x5e7dd4='';for(const _0x377fc1 of _0x465afd){const _0x181071=_0x377fc1['trim']();if(!_0x181071||_0x181071[_0x4d5a32(0x125)]('--')||_0x181071['startsWith']('/*'))continue;_0x5e7dd4=_0x181071;break;}const _0x1df514=_0x5e7dd4[_0x4d5a32(0x103)]();if(_0x1df514[_0x4d5a32(0x125)](_0x4d5a32(0x11c))||_0x1df514[_0x4d5a32(0x125)](_0x4d5a32(0x128))){const _0x82f82e=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i['test'](_0xa9e93d);return{'type':_0x4d5a32(0x11c),'isSelectOnly':!_0x82f82e,'isDangerous':_0x82f82e,'reason':_0x82f82e?_0x4d5a32(0x11f):undefined};}if(_0x1df514[_0x4d5a32(0x125)](_0x4d5a32(0x10d)))return{'type':_0x4d5a32(0x10d),'isSelectOnly':![],'isDangerous':![]};if(_0x1df514[_0x4d5a32(0x125)](_0x4d5a32(0x10b)))return{'type':'UPDATE','isSelectOnly':![],'isDangerous':![]};if(_0x1df514[_0x4d5a32(0x125)]('DELETE'))return{'type':'DELETE','isSelectOnly':![],'isDangerous':!![],'reason':_0x4d5a32(0x10f)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i['test'](_0x1df514))return{'type':_0x4d5a32(0x122),'isSelectOnly':![],'isDangerous':!![],'reason':_0x4d5a32(0x11e)};return{'type':_0x4d5a32(0x119),'isSelectOnly':![],'isDangerous':![]};}function extractTables(_0x528674){const _0x4d371a=a201_0x10fc,_0x409077=_0x528674[_0x4d371a(0x11a)](/#\{[^}]*\}/g,'?')[_0x4d371a(0x11a)](/\$\{[^}]*\}/g,'?')[_0x4d371a(0x11a)](/'[^']*'/g,'\x27\x27')[_0x4d371a(0x11a)](/--.*$/gm,'')[_0x4d371a(0x11a)](/\/\*[\s\S]*?\*\//g,''),_0x2e32a8=[],_0x32653d=_0x409077[_0x4d371a(0x105)](/FROM\s+([^\s,)(]+)/i);if(_0x32653d?.[0x1])_0x2e32a8['push'](_0x32653d[0x1][_0x4d371a(0x11a)](/[`"]/g,''));for(const _0x578a5c of _0x409077['matchAll'](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){const _0x137716=_0x578a5c[0x1]?.[_0x4d371a(0x11a)](/[`"]/g,'');if(_0x137716&&!_0x2e32a8[_0x4d371a(0x123)](_0x137716))_0x2e32a8[_0x4d371a(0x129)](_0x137716);}const _0x440a20=_0x409077[_0x4d371a(0x105)](/INTO\s+([^\s(]+)/i);if(_0x440a20?.[0x1]){const _0x13f08b=_0x440a20[0x1]['replace'](/[`"]/g,'');if(!_0x2e32a8[_0x4d371a(0x123)](_0x13f08b))_0x2e32a8[_0x4d371a(0x129)](_0x13f08b);}const _0x1a84b7=_0x409077[_0x4d371a(0x105)](/UPDATE\s+([^\s,)(]+)/i);if(_0x1a84b7?.[0x1]){const _0x5dc8c8=_0x1a84b7[0x1][_0x4d371a(0x11a)](/[`"]/g,'');if(!_0x2e32a8[_0x4d371a(0x123)](_0x5dc8c8))_0x2e32a8[_0x4d371a(0x129)](_0x5dc8c8);}return _0x2e32a8;}function extractParameters(_0x5bcc06){const _0x2901cf=a201_0x10fc,_0x1364f2=new Set();for(const _0x573404 of _0x5bcc06[_0x2901cf(0x107)](/#\{(\w+)\}/g))if(_0x573404[0x1])_0x1364f2[_0x2901cf(0x108)](_0x573404[0x1]);for(const _0x1df8f9 of _0x5bcc06[_0x2901cf(0x107)](/\$\{(\w+)\}/g))if(_0x1df8f9[0x1])_0x1364f2[_0x2901cf(0x108)](_0x1df8f9[0x1]);return Array[_0x2901cf(0x10e)](_0x1364f2);}export function validateSql(_0x2ff17a){const _0x37d2d0=a201_0x10fc,_0x15d2f3=detectSqlType(_0x2ff17a),_0x2aa5a8=extractTables(_0x2ff17a),_0x153632=extractParameters(_0x2ff17a);if(_0x15d2f3['isDangerous'])return{'valid':![],'sqlType':_0x15d2f3,'tables':_0x2aa5a8,'parameters':_0x153632,'message':_0x15d2f3[_0x37d2d0(0x127)]||_0x15d2f3[_0x37d2d0(0x117)]+'\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.'};if(_0x15d2f3['type']==='UNKNOWN')return{'valid':![],'sqlType':_0x15d2f3,'tables':_0x2aa5a8,'parameters':_0x153632,'message':_0x37d2d0(0x104)};return{'valid':!![],'sqlType':_0x15d2f3,'tables':_0x2aa5a8,'parameters':_0x153632,'message':_0x15d2f3[_0x37d2d0(0x117)]+'\x20query\x20targeting\x20'+(_0x2aa5a8['length']?_0x2aa5a8[_0x37d2d0(0x111)](',\x20'):_0x37d2d0(0x126))+(_0x153632[_0x37d2d0(0x112)]?_0x37d2d0(0x118)+_0x153632[_0x37d2d0(0x111)](',\x20'):'')};}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a202_0x4cfb61=a202_0x19f8;function a202_0x19f8(_0x5285bf,_0x1b3a67){_0x5285bf=_0x5285bf-0x1c7;const _0x88aaeb=a202_0x88aa();let _0x19f8dc=_0x88aaeb[_0x5285bf];return _0x19f8dc;}(function(_0x4a6de6,_0x58d30b){const _0x47a98d=a202_0x19f8,_0x34330d=_0x4a6de6();while(!![]){try{const _0x45d62b=parseInt(_0x47a98d(0x1d2))/0x1+-parseInt(_0x47a98d(0x1d6))/0x2+-parseInt(_0x47a98d(0x1cf))/0x3*(parseInt(_0x47a98d(0x1d7))/0x4)+parseInt(_0x47a98d(0x1cc))/0x5*(parseInt(_0x47a98d(0x1c7))/0x6)+parseInt(_0x47a98d(0x1c9))/0x7*(parseInt(_0x47a98d(0x1d5))/0x8)+-parseInt(_0x47a98d(0x1d4))/0x9+-parseInt(_0x47a98d(0x1d1))/0xa*(-parseInt(_0x47a98d(0x1ce))/0xb);if(_0x45d62b===_0x58d30b)break;else _0x34330d['push'](_0x34330d['shift']());}catch(_0x22b9cf){_0x34330d['push'](_0x34330d['shift']());}}}(a202_0x88aa,0x384f8));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a202_0x4cfb61(0x1d9)+CLI_BIN_NAME+a202_0x4cfb61(0x1d0),'configMissingHint':['Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+a202_0x4cfb61(0x1cb),a202_0x4cfb61(0x1d3)+CLI_BIN_NAME+a202_0x4cfb61(0x1ca)][a202_0x4cfb61(0x1d8)](a202_0x4cfb61(0x1c8)),'notInProjectHint':a202_0x4cfb61(0x1cd)});function a202_0x88aa(){const _0x4ca0ab=['3tJgCFR','\x20auth`\x20to\x20login\x20first.','650930AoGSpH','200327AbYiCz','Tip:\x20`','2456856elRoqQ','8qBjAgH','897686ReLfwK','7804VPrikL','join','Run\x20`','66642bIgGSE','\x0a\x20\x20\x20\x20\x20\x20\x20','346129SNSfEt','\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','200KfbYFq','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','44HPQPLy'];a202_0x88aa=function(){return _0x4ca0ab;};return a202_0x88aa();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a203_0x5cbd(_0x546728,_0x3b3e9e){_0x546728=_0x546728-0x6a;var _0x27ec28=a203_0x27ec();var _0x5cbd68=_0x27ec28[_0x546728];return _0x5cbd68;}(function(_0xdb6d78,_0x58bec5){var _0x4a6e2e=a203_0x5cbd,_0x31b341=_0xdb6d78();while(!![]){try{var _0x30a084=parseInt(_0x4a6e2e(0x71))/0x1+-parseInt(_0x4a6e2e(0x6e))/0x2+-parseInt(_0x4a6e2e(0x72))/0x3+parseInt(_0x4a6e2e(0x6f))/0x4*(parseInt(_0x4a6e2e(0x6d))/0x5)+parseInt(_0x4a6e2e(0x6b))/0x6+parseInt(_0x4a6e2e(0x6c))/0x7+-parseInt(_0x4a6e2e(0x70))/0x8*(parseInt(_0x4a6e2e(0x6a))/0x9);if(_0x30a084===_0x58bec5)break;else _0x31b341['push'](_0x31b341['shift']());}catch(_0x4f0b72){_0x31b341['push'](_0x31b341['shift']());}}}(a203_0x27ec,0x9b332));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';function a203_0x27ec(){var _0x3a86ca=['8YayEfK','18354912TADYNK','1270705PFwfTT','743187ZjtdIQ','9ferpqN','7269006STWrex','2451085fRHxFR','2530660kRGfIo','1333668wylQYP'];a203_0x27ec=function(){return _0x3a86ca;};return a203_0x27ec();}import{buildAllFlags as a203_0x14e97c}from'@lovrabet/cli-framework';export function buildAllFlags(_0x455318){return a203_0x14e97c(_0x455318,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x258137,_0x5864f7){const _0x3e487a=a204_0x5669,_0x341247=_0x258137();while(!![]){try{const _0x3d21c1=-parseInt(_0x3e487a(0x144))/0x1+-parseInt(_0x3e487a(0x142))/0x2+-parseInt(_0x3e487a(0x146))/0x3*(parseInt(_0x3e487a(0x147))/0x4)+parseInt(_0x3e487a(0x149))/0x5*(parseInt(_0x3e487a(0x145))/0x6)+-parseInt(_0x3e487a(0x14b))/0x7*(-parseInt(_0x3e487a(0x14a))/0x8)+-parseInt(_0x3e487a(0x148))/0x9+parseInt(_0x3e487a(0x143))/0xa;if(_0x3d21c1===_0x5864f7)break;else _0x341247['push'](_0x341247['shift']());}catch(_0x41795b){_0x341247['push'](_0x341247['shift']());}}}(a204_0x2228,0x57d11));function a204_0x5669(_0x2c92ca,_0x204c6b){_0x2c92ca=_0x2c92ca-0x142;const _0x2228af=a204_0x2228();let _0x5669af=_0x2228af[_0x2c92ca];return _0x5669af;}import{createFlagHelpers}from'@lovrabet/cli-framework';function a204_0x2228(){const _0x14693b=['19605QBhOPX','348NhRdQF','2080341nHtjro','1240505EFQwEn','272akuVqi','33873jBQlNa','947280bkzery','19121190nuyfeW','691715AYcarL','6vFBQoX'];a204_0x2228=function(){return _0x14693b;};return a204_0x2228();}import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers['parseFlags'];export const validateFlags=helpers['validateFlags'];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a205_0x3f3890=a205_0x40bc;(function(_0x3efc12,_0xf900fa){const _0x2aac30=a205_0x40bc,_0xec9a0f=_0x3efc12();while(!![]){try{const _0xf0c96e=-parseInt(_0x2aac30(0x9e))/0x1*(-parseInt(_0x2aac30(0x93))/0x2)+-parseInt(_0x2aac30(0x9d))/0x3+parseInt(_0x2aac30(0x96))/0x4*(parseInt(_0x2aac30(0x92))/0x5)+parseInt(_0x2aac30(0x97))/0x6*(-parseInt(_0x2aac30(0x9a))/0x7)+-parseInt(_0x2aac30(0x9b))/0x8+parseInt(_0x2aac30(0x9c))/0x9+-parseInt(_0x2aac30(0x9f))/0xa;if(_0xf0c96e===_0xf900fa)break;else _0xec9a0f['push'](_0xec9a0f['shift']());}catch(_0x5a4040){_0xec9a0f['push'](_0xec9a0f['shift']());}}}(a205_0xa75b,0xc5a35));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';function a205_0xa75b(){const _0x3146fd=['2ougkLQ','generateCommandHelp','get','98720BkehWE','12hbnMNY','Requires\x20appcode\x20(set\x20via\x20`','generateFullHelp','1556303OnoHWZ','2016536bZPLdQ','8729946WmJrrp','1819878RaOnnb','1510255kNRWSG','3920530QFyCbr','generateServiceHelp','5hfBdOk'];a205_0xa75b=function(){return _0x3146fd;};return a205_0xa75b();}import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';const generators=createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0xd02b0b=>serviceGroups[a205_0x3f3890(0x95)](_0xd02b0b),'buildAllFlags':buildAllFlags,'appPrerequisiteText':a205_0x3f3890(0x98)+CLI_BIN_NAME+'\x20workspace\x20init`\x20or\x20--appcode).','serviceUsageSuffix':'\x20[args]\x20[flags]'});export function generateCommandHelp(_0x552ba7){const _0x3d0498=a205_0x3f3890;return generators[_0x3d0498(0x94)](_0x552ba7);}function a205_0x40bc(_0x5e372b,_0x233831){_0x5e372b=_0x5e372b-0x92;const _0xa75bb3=a205_0xa75b();let _0x40bc71=_0xa75bb3[_0x5e372b];return _0x40bc71;}export const generateServiceHelp=generators[a205_0x3f3890(0xa0)];export const generateFullHelp=generators[a205_0x3f3890(0x99)];
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b6182,_0x542c8b){var _0x4e2ee3=a206_0x2ed0,_0x4fc13d=_0x2b6182();while(!![]){try{var _0xd31710=parseInt(_0x4e2ee3(0x1c6))/0x1*(parseInt(_0x4e2ee3(0x1c7))/0x2)+-parseInt(_0x4e2ee3(0x1bf))/0x3+-parseInt(_0x4e2ee3(0x1be))/0x4*(-parseInt(_0x4e2ee3(0x1c5))/0x5)+parseInt(_0x4e2ee3(0x1c4))/0x6+parseInt(_0x4e2ee3(0x1c2))/0x7+-parseInt(_0x4e2ee3(0x1c3))/0x8*(parseInt(_0x4e2ee3(0x1c0))/0x9)+-parseInt(_0x4e2ee3(0x1c1))/0xa;if(_0xd31710===_0x542c8b)break;else _0x4fc13d['push'](_0x4fc13d['shift']());}catch(_0x11cdf6){_0x4fc13d['push'](_0x4fc13d['shift']());}}}(a206_0xa1b4,0xeee76));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';function a206_0x2ed0(_0x1435d5,_0x4dab39){_0x1435d5=_0x1435d5-0x1be;var _0xa1b4f4=a206_0xa1b4();var _0x2ed022=_0xa1b4f4[_0x1435d5];return _0x2ed022;}export{riskLevelOrder}from'../framework/types.js';function a206_0xa1b4(){var _0x13b87f=['2816812tOCrYG','5614772jRvAMp','5089644dgeYsy','20799htJRjM','19543420WtDsQi','4206671XOZBAh','1544KbCpfo','9974466pXbtmd','5uglWvH','1xyOmCY'];a206_0xa1b4=function(){return _0x13b87f;};return a206_0xa1b4();}
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x25c75a,_0x4a0303){const _0x1829ba=a207_0x59a2,_0x343e3d=_0x25c75a();while(!![]){try{const _0x3d5cb2=parseInt(_0x1829ba(0x1cb))/0x1*(-parseInt(_0x1829ba(0x1c1))/0x2)+-parseInt(_0x1829ba(0x1c7))/0x3*(-parseInt(_0x1829ba(0x1c4))/0x4)+-parseInt(_0x1829ba(0x1c8))/0x5+-parseInt(_0x1829ba(0x1ca))/0x6*(-parseInt(_0x1829ba(0x1c0))/0x7)+-parseInt(_0x1829ba(0x1bf))/0x8+parseInt(_0x1829ba(0x1c9))/0x9*(parseInt(_0x1829ba(0x1c6))/0xa)+parseInt(_0x1829ba(0x1be))/0xb;if(_0x3d5cb2===_0x4a0303)break;else _0x343e3d['push'](_0x343e3d['shift']());}catch(_0x5218f2){_0x343e3d['push'](_0x343e3d['shift']());}}}(a207_0x4f60,0x2d458));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});function a207_0x59a2(_0x41353a,_0x83fc8e){_0x41353a=_0x41353a-0x1bc;const _0x4f6068=a207_0x4f60();let _0x59a2a3=_0x4f6068[_0x41353a];return _0x59a2a3;}function a207_0x4f60(){const _0x595e9d=['10VCQXdc','976029CimMJh','196845vRrAjk','3220659fLxOLg','3426hUMHpY','321844VyEVlF','message','update','url','222508pcgGAr','1395824HiLbCS','217GoQSXe','2NcszrD','_notice','error','4nsADds','pretty'];a207_0x4f60=function(){return _0x595e9d;};return a207_0x4f60();}export function formatOutput(_0x20b190,_0xb472c6){const _0x216f5d=a207_0x59a2,_0x571032=_0x20b190[_0x216f5d(0x1c2)],{_notice:_0x5a4ebf,..._0x57a85b}=_0x20b190;void _0x5a4ebf,baseFormatOutput(_0x57a85b,_0xb472c6),_0xb472c6['format']===_0x216f5d(0x1c5)&&printPrettyNotice(_0x571032);}function printPrettyNotice(_0x3734c1){const _0x9b9cc0=a207_0x59a2;if(!_0x3734c1?.[_0x9b9cc0(0x1bc)])return;console[_0x9b9cc0(0x1c3)](_0x3734c1[_0x9b9cc0(0x1bc)][_0x9b9cc0(0x1cc)]+'\x20('+_0x3734c1[_0x9b9cc0(0x1bc)][_0x9b9cc0(0x1bd)]+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x18e823,_0x331560){var _0x48795f=a208_0x16ed,_0x1d7a59=_0x18e823();while(!![]){try{var _0x49358d=parseInt(_0x48795f(0x1e2))/0x1*(-parseInt(_0x48795f(0x1e9))/0x2)+-parseInt(_0x48795f(0x1e1))/0x3+parseInt(_0x48795f(0x1e3))/0x4+parseInt(_0x48795f(0x1ea))/0x5+parseInt(_0x48795f(0x1e7))/0x6*(-parseInt(_0x48795f(0x1e5))/0x7)+-parseInt(_0x48795f(0x1e4))/0x8*(-parseInt(_0x48795f(0x1e6))/0x9)+parseInt(_0x48795f(0x1e8))/0xa;if(_0x49358d===_0x331560)break;else _0x1d7a59['push'](_0x1d7a59['shift']());}catch(_0x33957f){_0x1d7a59['push'](_0x1d7a59['shift']());}}}(a208_0xed2f,0xddde5));function a208_0x16ed(_0x268b5c,_0x5e7c96){_0x268b5c=_0x268b5c-0x1e1;var _0xed2f7=a208_0xed2f();var _0x16edc3=_0xed2f7[_0x268b5c];return _0x16edc3;}function a208_0xed2f(){var _0x41078e=['1842992ICUwCh','993464hnaZrL','7FLSIjT','117HrlyND','9829818CcUeMO','3864760SzmEls','557432qQClnu','4098330HSUmbX','1366431ZYGNkz','1GtnYOj'];a208_0xed2f=function(){return _0x41078e;};return a208_0xed2f();}export{extractList,extractPaging}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x59b4c5,_0x1634cf){const _0x4f3e35=a209_0x4574,_0x1930d9=_0x59b4c5();while(!![]){try{const _0x12577c=-parseInt(_0x4f3e35(0x100))/0x1+-parseInt(_0x4f3e35(0x109))/0x2*(parseInt(_0x4f3e35(0x114))/0x3)+-parseInt(_0x4f3e35(0x119))/0x4*(parseInt(_0x4f3e35(0x10d))/0x5)+-parseInt(_0x4f3e35(0x106))/0x6*(parseInt(_0x4f3e35(0x111))/0x7)+-parseInt(_0x4f3e35(0x110))/0x8*(-parseInt(_0x4f3e35(0x10e))/0x9)+parseInt(_0x4f3e35(0x113))/0xa+parseInt(_0x4f3e35(0xff))/0xb;if(_0x12577c===_0x1634cf)break;else _0x1930d9['push'](_0x1930d9['shift']());}catch(_0x52b4b8){_0x1930d9['push'](_0x1930d9['shift']());}}}(a209_0x27bf,0xdf8a4));function a209_0x4574(_0x19d553,_0x3beb3b){_0x19d553=_0x19d553-0xff;const _0x27bf8e=a209_0x27bf();let _0x45740=_0x27bf8e[_0x19d553];return _0x45740;}function a209_0x27bf(){const _0x9c6341=['join','\x22.\x20','.\x20Run\x20`','map','164908xhuEaX','27078832LusPtB','1709005LiqAyU','Unknown\x20alias\x20\x22','some','string','Available\x20aliases:\x20','alias','72UBkwoM','name','length','59478vQwrQy','validation','code','type','10NXxCTa','1160559seJLSY','No\x20api.ts\x20found\x20in\x20','56MJXMNQ','206983mqgpUv','flags','544060JJNYmd','36ANNLHo'];a209_0x27bf=function(){return _0x9c6341;};return a209_0x27bf();}import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveAliasToCode(_0x85fb42,_0x349e0d,_0x4374af,_0x3c8ac6){const _0x29060d=a209_0x4574,_0x1b534c=_0x85fb42[_0x29060d(0x112)][_0x29060d(0x102)](_0x1fc4a9=>_0x1fc4a9[_0x29060d(0x107)]===_0x29060d(0x10b)&&_0x1fc4a9[_0x29060d(0x10c)]===_0x29060d(0x103)),_0x509b30=_0x85fb42[_0x29060d(0x112)][_0x29060d(0x102)](_0x2d10c3=>_0x2d10c3[_0x29060d(0x107)]===_0x29060d(0x105)&&_0x2d10c3[_0x29060d(0x10c)]==='string');if(!_0x1b534c||!_0x509b30)return;const _0x568193=_0x349e0d['code']?String(_0x349e0d['code']):'',_0x2e34ab=_0x349e0d[_0x29060d(0x105)]?String(_0x349e0d[_0x29060d(0x105)]):'';if(!_0x568193&&!_0x2e34ab)throw CliErrors[_0x29060d(0x10a)]('`'+_0x3c8ac6+'`\x20requires\x20either\x20--code\x20or\x20--alias.');if(_0x2e34ab&&!_0x568193){const _0x38495a=resolveAlias(_0x4374af,_0x2e34ab);if(!_0x38495a){const _0x1f06ce=listAliases(_0x4374af)[_0x29060d(0x118)](_0x543559=>_0x543559[_0x29060d(0x105)]),_0x48654c=_0x1f06ce[_0x29060d(0x108)]?_0x29060d(0x104)+_0x1f06ce[_0x29060d(0x115)](',\x20'):_0x29060d(0x10f)+_0x4374af+_0x29060d(0x117)+CLI_BIN_NAME+'\x20api\x20pull`\x20first.';throw CliErrors['validation'](_0x29060d(0x101)+_0x2e34ab+_0x29060d(0x116)+_0x48654c);}_0x349e0d[_0x29060d(0x10b)]=_0x38495a;}}
|