@lovrabet/rabetbase-cli 2.1.14-beta.0 → 2.1.14-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/README.md +18 -0
- 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/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.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-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-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- 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/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 -0
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -1
- package/lib/commands/dataset/link-delete.js +1 -1
- package/lib/commands/dataset/link-shared.js +1 -1
- package/lib/commands/dataset/link-update.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- 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/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/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/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/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/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.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/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.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/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 +3 -3
package/lib/core/bff/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a144_0x503e(){const _0x4cdb3d=['bff','4028472IWtxtC','91085PpsSgJ','3711248qJfKuw','3404727sjjuJe','1804956BgAObn','/bff','318NViJij','60hXgYKJ','4236364AgikFn','bff.lock.json','607372HDWZvS','2nJmDVt','32YllXSN'];a144_0x503e=function(){return _0x4cdb3d;};return a144_0x503e();}const a144_0x5ae0b4=a144_0x5bcb;(function(_0x39c9e8,_0x21c9ba){const _0x2450b9=a144_0x5bcb,_0x5925d9=_0x39c9e8();while(!![]){try{const _0x202a88=parseInt(_0x2450b9(0x7a))/0x1*(-parseInt(_0x2450b9(0x7b))/0x2)+-parseInt(_0x2450b9(0x82))/0x3+parseInt(_0x2450b9(0x80))/0x4+parseInt(_0x2450b9(0x7f))/0x5*(parseInt(_0x2450b9(0x76))/0x6)+-parseInt(_0x2450b9(0x7e))/0x7+-parseInt(_0x2450b9(0x7c))/0x8*(parseInt(_0x2450b9(0x81))/0x9)+-parseInt(_0x2450b9(0x77))/0xa*(-parseInt(_0x2450b9(0x78))/0xb);if(_0x202a88===_0x21c9ba)break;else _0x5925d9['push'](_0x5925d9['shift']());}catch(_0x5259b4){_0x5925d9['push'](_0x5925d9['shift']());}}}(a144_0x503e,0xdd455));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a144_0x5bcb(_0x1f0eff,_0x371eb0){_0x1f0eff=_0x1f0eff-0x75;const _0x503ec9=a144_0x503e();let _0x5bcb5a=_0x503ec9[_0x1f0eff];return _0x5bcb5a;}const DOT_DIR='.rabetbase',LOCK_FILE_NAME=a144_0x5ae0b4(0x79),TRASH_DIR_NAME='bff-trash';export function loadBffProjectConfig(_0x37661b,_0x2a7a39){const _0x57e708=a144_0x5ae0b4,_0x3c8271=resolve(_0x2a7a39??findProjectRootDirectory()),_0x3b7899=DOT_DIR+_0x57e708(0x75),_0xfa224a=_0x3b7899+'/'+_0x37661b;return{'projectRoot':_0x3c8271,'appCode':_0x37661b,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x3b7899,'scriptsRoot':_0xfa224a,'scriptsRootDir':resolve(_0x3c8271,DOT_DIR,_0x57e708(0x7d),_0x37661b),'lockFilePath':resolve(_0x3c8271,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x3c8271,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a145_0x2305bf=a145_0x2d2c;(function(_0xd41ab,_0x427c79){const _0xd76177=a145_0x2d2c,_0x189e24=_0xd41ab();while(!![]){try{const _0x4c2b35=parseInt(_0xd76177(0xc4))/0x1+parseInt(_0xd76177(0xcc))/0x2*(-parseInt(_0xd76177(0xb8))/0x3)+-parseInt(_0xd76177(0xbf))/0x4+parseInt(_0xd76177(0xc3))/0x5+-parseInt(_0xd76177(0xb4))/0x6*(-parseInt(_0xd76177(0xb1))/0x7)+-parseInt(_0xd76177(0xc1))/0x8*(-parseInt(_0xd76177(0xd3))/0x9)+-parseInt(_0xd76177(0xb3))/0xa*(parseInt(_0xd76177(0xb5))/0xb);if(_0x4c2b35===_0x427c79)break;else _0x189e24['push'](_0x189e24['shift']());}catch(_0x54f359){_0x189e24['push'](_0x189e24['shift']());}}}(a145_0x2239,0x74507));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';function a145_0x2d2c(_0x3bcabb,_0x14624a){_0x3bcabb=_0x3bcabb-0xaf;const _0x2239ab=a145_0x2239();let _0x2d2c68=_0x2239ab[_0x3bcabb];return _0x2d2c68;}import{dirname,join}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a145_0x2305bf(0xcb),'ENDPOINT',a145_0x2305bf(0xc0)];export function normalizeBffType(_0xb74623){const _0x557770=a145_0x2305bf;if(!_0xb74623)return undefined;const _0x1abdc0=_0xb74623['trim']()[_0x557770(0xd5)]();return SUPPORTED_BFF_TYPES['includes'](_0x1abdc0)?_0x1abdc0:undefined;}function a145_0x2239(){const _0x528cf8=['code','alias','F_OK','isDirectory','scriptsRootDir','COMMON','4cWHcII','afterScriptId','after','replace','beforeScriptId','ENDPOINT','isFile','3133377OShmDR','.js','toUpperCase','endsWith','operationType','2289TdFuXX','datasetCode','313710XdgCox','1188jDLgld','77WNkSDU','functionNode','push','71853wgPtxQ','HOOK/','name','set','functionName','get','split','1743176gaXUPQ','HOOK','16PAKoKt','all','404070MyAqcB','337850Pqjfoe','before'];a145_0x2239=function(){return _0x528cf8;};return a145_0x2239();}async function scanJsFilesRecursively(_0x2e438c,_0x3630bb){const _0x94ebdd=a145_0x2305bf,_0xce067e=[];try{const _0x5364ca=await readdir(_0x2e438c,{'withFileTypes':!![]});for(const _0x3dd3f9 of _0x5364ca){const _0x3ea3c9=join(_0x2e438c,_0x3dd3f9[_0x94ebdd(0xba)]);if(_0x3dd3f9[_0x94ebdd(0xc9)]())_0xce067e[_0x94ebdd(0xb7)](...await scanJsFilesRecursively(_0x3ea3c9,_0x3630bb+'/'+_0x3dd3f9[_0x94ebdd(0xba)]));else _0x3dd3f9[_0x94ebdd(0xd2)]()&&_0x3dd3f9[_0x94ebdd(0xba)][_0x94ebdd(0xaf)](_0x94ebdd(0xd4))&&_0xce067e[_0x94ebdd(0xb7)]({'lockKey':_0x3630bb+'/'+_0x3dd3f9['name'][_0x94ebdd(0xcf)](/\.js$/,''),'filePath':_0x3ea3c9});}}catch(_0x1b32f4){if(_0x1b32f4[_0x94ebdd(0xc6)]!=='ENOENT')throw _0x1b32f4;}return _0xce067e;}async function scanFlatFunctions(_0x40225b,_0x3fe288){const _0x500f15=a145_0x2305bf,_0x357f0a=join(_0x40225b[_0x500f15(0xca)],_0x3fe288),_0x1f6f91=await scanJsFilesRecursively(_0x357f0a,_0x3fe288);return _0x1f6f91['map'](({lockKey:_0x3989c3,filePath:_0x5578ac})=>({'type':_0x3fe288,'name':_0x3989c3[_0x500f15(0xbe)]('/')['at'](-0x1)??'','filePath':_0x5578ac,'lockKey':_0x3989c3}));}async function scanHookFunctions(_0x259a9c){const _0x390b24=a145_0x2305bf,_0x5c8e4a=join(_0x259a9c[_0x390b24(0xca)],_0x390b24(0xc0)),_0xc24326=[];try{const _0x3af446=await readdir(_0x5c8e4a,{'withFileTypes':!![]});for(const _0x15512b of _0x3af446){if(!_0x15512b[_0x390b24(0xc9)]())continue;const _0x28798b=_0x15512b[_0x390b24(0xba)],_0x27bcf6=join(_0x5c8e4a,_0x28798b),_0x8873d4=await readdir(_0x27bcf6,{'withFileTypes':!![]});for(const _0x291ad6 of _0x8873d4){if(!_0x291ad6[_0x390b24(0xc9)]())continue;const _0x1d5b12=_0x291ad6['name'],_0x5f13b0=join(_0x27bcf6,_0x1d5b12),_0x170f2c=await readdir(_0x5f13b0,{'withFileTypes':!![]});for(const _0x65e7ac of _0x170f2c){if(!_0x65e7ac[_0x390b24(0xc9)]())continue;const _0x582ea0=_0x65e7ac['name'],_0x42ae16=join(_0x5f13b0,_0x582ea0),_0x3179bf=await readdir(_0x42ae16,{'withFileTypes':!![]});for(const _0x45f76b of _0x3179bf){if(!_0x45f76b[_0x390b24(0xd2)]()||!_0x45f76b[_0x390b24(0xba)]['endsWith'](_0x390b24(0xd4)))continue;const _0x44c731=_0x45f76b[_0x390b24(0xba)][_0x390b24(0xcf)](/\.js$/,'');_0xc24326[_0x390b24(0xb7)]({'type':'HOOK','name':_0x44c731,'filePath':join(_0x42ae16,_0x45f76b[_0x390b24(0xba)]),'lockKey':_0x390b24(0xb9)+_0x28798b+'/'+_0x1d5b12+'/'+_0x582ea0+'/'+_0x44c731,'alias':_0x28798b,'operationType':_0x1d5b12,'functionNode':_0x582ea0});}}}}}catch(_0x36a6b1){if(_0x36a6b1[_0x390b24(0xc6)]!=='ENOENT')throw _0x36a6b1;}return _0xc24326;}export async function scanLocalBffFunctions(_0x1c3ccf,_0x584ad8){const _0x2f5835=a145_0x2305bf;if(_0x584ad8==='COMMON'||_0x584ad8==='ENDPOINT')return scanFlatFunctions(_0x1c3ccf,_0x584ad8);if(_0x584ad8===_0x2f5835(0xc0))return scanHookFunctions(_0x1c3ccf);const [_0x31dfeb,_0x429959,_0x101ecb]=await Promise[_0x2f5835(0xc2)]([scanFlatFunctions(_0x1c3ccf,_0x2f5835(0xcb)),scanFlatFunctions(_0x1c3ccf,_0x2f5835(0xd1)),scanHookFunctions(_0x1c3ccf)]);return[..._0x31dfeb,..._0x429959,..._0x101ecb];}export function resolveLocalFilePathFromLockKey(_0x1def8e,_0x2fbd56){const _0x1c693b=a145_0x2305bf;return join(_0x1def8e[_0x1c693b(0xca)],..._0x2fbd56[_0x1c693b(0xbe)]('/'))+_0x1c693b(0xd4);}export function createHookLocationMap(_0x37e7f8){const _0x54ed17=a145_0x2305bf,_0xb3a1d5=new Map();for(const _0x149274 of _0x37e7f8){_0x149274[_0x54ed17(0xd0)]&&_0xb3a1d5['set'](_0x149274[_0x54ed17(0xd0)],{'datasetCode':_0x149274[_0x54ed17(0xb2)],'operationType':snakeToCamel(_0x149274[_0x54ed17(0xb0)]),'functionNode':_0x54ed17(0xc5)}),_0x149274['afterScriptId']&&_0xb3a1d5[_0x54ed17(0xbb)](_0x149274[_0x54ed17(0xcd)],{'datasetCode':_0x149274[_0x54ed17(0xb2)],'operationType':snakeToCamel(_0x149274[_0x54ed17(0xb0)]),'functionNode':_0x54ed17(0xce)});}return _0xb3a1d5;}export function resolveRemoteScriptTarget(_0x1a7e22,_0x34d1d5,_0x5a062b,_0x3501c8,_0x3581d0){const _0x239b90=a145_0x2305bf,_0x312dfe=normalizeBffType(_0x34d1d5['scriptType']);if(!_0x312dfe||!_0x34d1d5['functionName'])return null;if(_0x312dfe===_0x239b90(0xc0)){const _0xe837b3=(_0x34d1d5['id']?_0x5a062b[_0x239b90(0xbd)](_0x34d1d5['id']):undefined)??findHookLocationByRemoteId(_0x3501c8,_0x34d1d5['id']);if(!_0xe837b3)return null;const _0x4a4df4=_0xe837b3[_0x239b90(0xc7)]||_0x3581d0[_0x239b90(0xbd)](_0xe837b3[_0x239b90(0xb2)]),_0x46b82f=_0x4a4df4??_0xe837b3['datasetCode'],_0x81f0ad={..._0xe837b3,'alias':_0x4a4df4},_0x211f55='HOOK/'+_0x46b82f+'/'+_0x81f0ad[_0x239b90(0xb0)]+'/'+_0x81f0ad[_0x239b90(0xb6)]+'/'+_0x34d1d5[_0x239b90(0xbc)];return{'lockKey':_0x211f55,'filePath':resolveLocalFilePathFromLockKey(_0x1a7e22,_0x211f55),'type':_0x239b90(0xc0),'hookLocation':_0x81f0ad};}const _0xd11796=_0x312dfe+'/'+_0x34d1d5[_0x239b90(0xbc)];return{'lockKey':_0xd11796,'filePath':resolveLocalFilePathFromLockKey(_0x1a7e22,_0xd11796),'type':_0x312dfe};}export async function ensureParentDirectory(_0x3d3605){await mkdir(dirname(_0x3d3605),{'recursive':!![]});}export async function fileExists(_0x11dbe3){const _0x2d4790=a145_0x2305bf;try{return await access(_0x11dbe3,constants[_0x2d4790(0xc8)]),!![];}catch{return![];}}export async function directoryExists(_0xb14e1){try{const _0x282099=await stat(_0xb14e1);return _0x282099['isDirectory']();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1e158a,_0x1ec03c){const _0x505591=a146_0x2215,_0x57fcb9=_0x1e158a();while(!![]){try{const _0xa293be=parseInt(_0x505591(0x75))/0x1+parseInt(_0x505591(0x7c))/0x2+parseInt(_0x505591(0x74))/0x3*(-parseInt(_0x505591(0x72))/0x4)+-parseInt(_0x505591(0x78))/0x5*(parseInt(_0x505591(0x73))/0x6)+parseInt(_0x505591(0x7f))/0x7+parseInt(_0x505591(0x7e))/0x8+-parseInt(_0x505591(0x76))/0x9;if(_0xa293be===_0x1ec03c)break;else _0x57fcb9['push'](_0x57fcb9['shift']());}catch(_0xf629d5){_0x57fcb9['push'](_0x57fcb9['shift']());}}}(a146_0x1da9,0xcd895));import{readFile}from'node:fs/promises';import a146_0x4f02fb from'node:crypto';function a146_0x2215(_0x104079,_0x49e34c){_0x104079=_0x104079-0x71;const _0x1da9c0=a146_0x1da9();let _0x2215e4=_0x1da9c0[_0x104079];return _0x2215e4;}export function computeContentHash(_0x2ddb7c){const _0x3de7b1=a146_0x2215;return a146_0x4f02fb[_0x3de7b1(0x7b)](_0x3de7b1(0x77))[_0x3de7b1(0x79)](_0x2ddb7c)[_0x3de7b1(0x7d)](_0x3de7b1(0x71));}function a146_0x1da9(){const _0x69b627=['3463128fJtMCB','md5','3187215nRZEXZ','update','utf8','createHash','1669030RhCGnC','digest','10725432fxqDqT','8502459wMihhw','hex','4NgdJqw','12OXSHUl','3748119LTqYdQ','361097jZIlAn'];a146_0x1da9=function(){return _0x69b627;};return a146_0x1da9();}export async function computeFileHash(_0x46cb45){const _0x43ee7e=a146_0x2215,_0x40c1e5=await readFile(_0x46cb45,_0x43ee7e(0x7a));return computeContentHash(_0x40c1e5);}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51b73c,_0x48078e){const _0xbfde80=a147_0xffd4,_0x5a699f=_0x51b73c();while(!![]){try{const _0xce8aab=-parseInt(_0xbfde80(0xc7))/0x1*(-parseInt(_0xbfde80(0xb4))/0x2)+-parseInt(_0xbfde80(0xb9))/0x3+parseInt(_0xbfde80(0xc0))/0x4*(-parseInt(_0xbfde80(0xb0))/0x5)+-parseInt(_0xbfde80(0xbd))/0x6+parseInt(_0xbfde80(0xb6))/0x7*(parseInt(_0xbfde80(0xc1))/0x8)+parseInt(_0xbfde80(0xb8))/0x9*(parseInt(_0xbfde80(0xaf))/0xa)+parseInt(_0xbfde80(0xb5))/0xb;if(_0xce8aab===_0x48078e)break;else _0x5a699f['push'](_0x5a699f['shift']());}catch(_0x4a7093){_0x5a699f['push'](_0x5a699f['shift']());}}}(a147_0x4339,0x7bfd7));function a147_0xffd4(_0x3d9a78,_0x2514f4){_0x3d9a78=_0x3d9a78-0xaf;const _0x4339a7=a147_0x4339();let _0xffd4b2=_0x4339a7[_0x3d9a78];return _0xffd4b2;}import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x382ccb,_0x58e7e5,_0x1f2938,_0x2f7311){const _0x259e76=a147_0xffd4,_0x2264c9={'apps':_0x382ccb[_0x259e76(0xbf)]&&typeof _0x382ccb[_0x259e76(0xbf)]===_0x259e76(0xc2)?_0x382ccb[_0x259e76(0xbf)]:{}};let _0x2c553d=_0x2264c9[_0x259e76(0xbf)][_0x58e7e5];if(!_0x2c553d)return _0x2c553d={'scriptsRoot':_0x1f2938,'lastSync':'','functions':{}},_0x2264c9['apps'][_0x58e7e5]=_0x2c553d,{'lockData':_0x2264c9,'appLock':_0x2c553d};if(!_0x2c553d[_0x259e76(0xbb)])_0x2c553d['scriptsRoot']=_0x1f2938;else{if(_0x2c553d[_0x259e76(0xbb)]!==_0x1f2938)throw new Error(_0x2f7311+_0x259e76(0xba)+(_0x259e76(0xc6)+_0x1f2938+_0x259e76(0xbe)+_0x2c553d[_0x259e76(0xbb)]+_0x259e76(0xb3))+'Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x2c553d[_0x259e76(0xc4)]&&(_0x2c553d[_0x259e76(0xc4)]={}),!_0x2c553d[_0x259e76(0xc5)]&&(_0x2c553d[_0x259e76(0xc5)]=''),{'lockData':_0x2264c9,'appLock':_0x2c553d};}export async function readBffLockFile(_0xa68ba6){const _0x30ae83=a147_0xffd4;try{const _0x504d79=await readFile(_0xa68ba6,'utf8'),_0x49aa32=JSON['parse'](_0x504d79);return{'apps':_0x49aa32[_0x30ae83(0xbf)]&&typeof _0x49aa32[_0x30ae83(0xbf)]===_0x30ae83(0xc2)?_0x49aa32[_0x30ae83(0xbf)]:{}};}catch(_0x584b0a){if(_0x584b0a[_0x30ae83(0xc3)]===_0x30ae83(0xb2))return null;throw new Error(_0x30ae83(0xbc)+String(_0x584b0a));}}export async function writeBffLockFile(_0xb90158,_0x10da88){const _0x5c4a5e=a147_0xffd4;await mkdir(dirname(_0xb90158),{'recursive':!![]}),await writeFile(_0xb90158,JSON[_0x5c4a5e(0xb7)](_0x10da88,null,0x2),_0x5c4a5e(0xb1));}function a147_0x4339(){const _0x39a6e3=['apps','8ZjjzFa','2826424svDfit','object','code','functions','lastSync','current\x20\x22','14102whIYkb','7632250hkWDde','753495GKFNvk','utf8','ENOENT','\x22.\x20','8zyYcsH','5447486ItcInc','7nBwnZq','stringify','9jMADxO','1780482Nhuuxj',':\x20scriptsRoot\x20mismatch\x20—\x20','scriptsRoot','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','1592442gHDeAe','\x22\x20vs\x20lock\x20\x22'];a147_0x4339=function(){return _0x39a6e3;};return a147_0x4339();}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x138fcf,_0x5c0438){const _0x116168=a149_0x1e33,_0x50dd03=_0x138fcf();while(!![]){try{const _0x385852=-parseInt(_0x116168(0x139))/0x1*(parseInt(_0x116168(0x13f))/0x2)+parseInt(_0x116168(0x132))/0x3*(parseInt(_0x116168(0x136))/0x4)+parseInt(_0x116168(0x13a))/0x5+parseInt(_0x116168(0x140))/0x6+parseInt(_0x116168(0x145))/0x7+parseInt(_0x116168(0x13e))/0x8*(-parseInt(_0x116168(0x143))/0x9)+parseInt(_0x116168(0x138))/0xa*(-parseInt(_0x116168(0x134))/0xb);if(_0x385852===_0x5c0438)break;else _0x50dd03['push'](_0x50dd03['shift']());}catch(_0x336e12){_0x50dd03['push'](_0x50dd03['shift']());}}}(a149_0x433b,0x5a847));export function snakeToCamel(_0x37a5ba){const _0x41d3db=a149_0x1e33;return _0x37a5ba[_0x41d3db(0x142)]()['replace'](/_([a-z])/g,(_0x17b507,_0x35911c)=>_0x35911c['toUpperCase']());}function a149_0x1e33(_0x4123fb,_0x6158dc){_0x4123fb=_0x4123fb-0x132;const _0x433bd9=a149_0x433b();let _0x1e335c=_0x433bd9[_0x4123fb];return _0x1e335c;}export function findHookLocationByRemoteId(_0x2ea8fe,_0x3a3aaf){const _0x5ef74e=a149_0x1e33;if(!_0x3a3aaf)return undefined;for(const _0x37037d of Object[_0x5ef74e(0x141)](_0x2ea8fe)){if(_0x37037d[_0x5ef74e(0x137)]===_0x3a3aaf&&_0x37037d[_0x5ef74e(0x13b)]&&_0x37037d[_0x5ef74e(0x135)]&&_0x37037d[_0x5ef74e(0x133)])return{'datasetCode':_0x37037d['datasetCode'],'operationType':_0x37037d['operationType'],'functionNode':_0x37037d[_0x5ef74e(0x133)]};}return undefined;}export function extractScriptDescription(_0x4f8a1a){const _0x3bb6a2=a149_0x1e33,_0x45fa8c=_0x4f8a1a[_0x3bb6a2(0x13d)](/\[\s*脚本描述\s*]\s*(.+)/);return _0x45fa8c?.[0x1]?.[_0x3bb6a2(0x144)]()||undefined;}function a149_0x433b(){const _0x3894c7=['4006842wDiBue','63573ZvnadW','functionNode','18205DpVHgj','operationType','76RWvAur','remoteId','7270TiSNlw','147034dzttJE','2899555YkAWyE','datasetCode','before','match','56XHbltV','2bCjLJF','2331414yhumgH','values','toLowerCase','286119whbTEf','trim'];a149_0x433b=function(){return _0x3894c7;};return a149_0x433b();}export function isValidBffFunctionName(_0x33a61a){return/^[A-Za-z_$][A-Za-z0-9_$]*$/['test'](_0x33a61a);}export function normalizeHookFunctionNode(_0x451420){const _0x106ef0=a149_0x1e33;if(!_0x451420)return undefined;const _0x2d7f80=_0x451420[_0x106ef0(0x144)]()[_0x106ef0(0x142)]();if(_0x2d7f80===_0x106ef0(0x13c)||_0x2d7f80==='after')return _0x2d7f80;return undefined;}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x48d164,_0x1238a4){const _0x1d3d47=a150_0x5f47,_0x2abf5b=_0x48d164();while(!![]){try{const _0x33046e=-parseInt(_0x1d3d47(0x18f))/0x1+parseInt(_0x1d3d47(0x1a1))/0x2*(-parseInt(_0x1d3d47(0x191))/0x3)+-parseInt(_0x1d3d47(0x19e))/0x4*(-parseInt(_0x1d3d47(0x1a6))/0x5)+-parseInt(_0x1d3d47(0x1a5))/0x6*(parseInt(_0x1d3d47(0x199))/0x7)+parseInt(_0x1d3d47(0x18c))/0x8+parseInt(_0x1d3d47(0x18b))/0x9+-parseInt(_0x1d3d47(0x18d))/0xa;if(_0x33046e===_0x1238a4)break;else _0x2abf5b['push'](_0x2abf5b['shift']());}catch(_0x5d697b){_0x2abf5b['push'](_0x2abf5b['shift']());}}}(a150_0x2019,0x8cb07));import{listDatasets}from'../core/api-client.js';function a150_0x2019(){const _0x427bdc=['db-','.\x20Be\x20more\x20specific.','138320LwavZc','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','dbId','2vGNnax','\x22\x20matches\x20multiple\x20databases:\x20','join','has','3888174zmmHTY','65LXPTEC','dbtableConfig','get','includes','9251793dACaGM','4292888PBGpTc','2964050IBEMkB','map','456242HlfZlN','No\x20database\x20matching\x20\x22','111567zfFSLB','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','toLowerCase','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','dbName','\x22.\x20Available:\x20','\x22\x20under\x20app\x20\x22','find','7JXxAZo','filter','length'];a150_0x2019=function(){return _0x427bdc;};return a150_0x2019();}const cache=new Map();function a150_0x5f47(_0x4c9ea3,_0xac1a55){_0x4c9ea3=_0x4c9ea3-0x189;const _0x201961=a150_0x2019();let _0x5f471f=_0x201961[_0x4c9ea3];return _0x5f471f;}export async function listDatabases(_0x513fd6){const _0x479972=a150_0x5f47;if(cache[_0x479972(0x1a4)](_0x513fd6))return cache[_0x479972(0x189)](_0x513fd6);const _0x346629=await listDatasets(_0x513fd6),_0x488fcd=new Map();for(const _0x12f60b of _0x346629){const _0x2d2b75=_0x12f60b[_0x479972(0x1a7)];_0x2d2b75?.[_0x479972(0x1a0)]!=null&&_0x488fcd['set'](_0x2d2b75[_0x479972(0x1a0)],_0x2d2b75['dbName']??_0x479972(0x19c)+_0x2d2b75[_0x479972(0x1a0)]);}const _0x21065f=[..._0x488fcd['entries']()][_0x479972(0x18e)](([_0x423e31,_0x2c5338])=>({'dbId':_0x423e31,'dbName':_0x2c5338}));return cache['set'](_0x513fd6,_0x21065f),_0x21065f;}export async function resolveDb(_0xf0e69b,_0x4c60d8){const _0x18f3d3=a150_0x5f47,_0x4f367a=await listDatabases(_0xf0e69b);if(_0x4f367a[_0x18f3d3(0x19b)]===0x0)return{'resolved':[],'error':'No\x20linked\x20databases\x20found\x20under\x20app\x20\x22'+_0xf0e69b+_0x18f3d3(0x19f)};if(!_0x4c60d8)return{'resolved':_0x4f367a};const _0x86ccc2=Number(_0x4c60d8);if(!Number['isNaN'](_0x86ccc2)){const _0x31ed08=_0x4f367a[_0x18f3d3(0x198)](_0x4df156=>_0x4df156['dbId']===_0x86ccc2);if(_0x31ed08)return{'resolved':[_0x31ed08]};}const _0x459788=_0x4c60d8[_0x18f3d3(0x193)](),_0x4d45dd=_0x4f367a[_0x18f3d3(0x19a)](_0x23c916=>_0x23c916[_0x18f3d3(0x195)][_0x18f3d3(0x193)]()[_0x18f3d3(0x18a)](_0x459788));if(_0x4d45dd[_0x18f3d3(0x19b)]>0x0)return{'resolved':_0x4d45dd};const _0xe3655e=_0x4f367a[_0x18f3d3(0x18e)](_0x3604e2=>_0x3604e2[_0x18f3d3(0x195)]+'\x20('+_0x3604e2['dbId']+')')[_0x18f3d3(0x1a3)](',\x20');return{'resolved':[],'error':_0x18f3d3(0x190)+_0x4c60d8+_0x18f3d3(0x197)+_0xf0e69b+_0x18f3d3(0x196)+_0xe3655e+_0x18f3d3(0x194)};}export async function resolveOneDb(_0x5452cc,_0x13d1ae){const _0x2b1348=a150_0x5f47,{resolved:_0x4ef61d,error:_0x2527e1}=await resolveDb(_0x5452cc,_0x13d1ae);if(_0x2527e1)return{'db':null,'error':_0x2527e1};if(_0x4ef61d['length']===0x1)return{'db':_0x4ef61d[0x0]};if(!_0x13d1ae){const _0x13f2eb=_0x4ef61d[_0x2b1348(0x18e)](_0x1916d3=>_0x1916d3[_0x2b1348(0x195)]+'\x20('+_0x1916d3[_0x2b1348(0x1a0)]+')')[_0x2b1348(0x1a3)](',\x20');return{'db':null,'error':_0x2b1348(0x192)+_0x13f2eb};}const _0x47256d=_0x4ef61d['map'](_0x1b86ed=>_0x1b86ed[_0x2b1348(0x195)]+'\x20('+_0x1b86ed[_0x2b1348(0x1a0)]+')')[_0x2b1348(0x1a3)](',\x20');return{'db':null,'error':'\x22'+_0x13d1ae+_0x2b1348(0x1a2)+_0x47256d+_0x2b1348(0x19d)};}export async function getDbName(_0x49fae1,_0x18df6a){const _0x10d3bb=a150_0x5f47,_0x52f088=await listDatabases(_0x49fae1);return _0x52f088[_0x10d3bb(0x198)](_0x150837=>_0x150837[_0x10d3bb(0x1a0)]===_0x18df6a)?.[_0x10d3bb(0x195)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x424fd6,_0x5bf90f){const _0xd68e5c=a151_0xeaae,_0x5215b3=_0x424fd6();while(!![]){try{const _0x111c21=-parseInt(_0xd68e5c(0xab))/0x1+-parseInt(_0xd68e5c(0xa2))/0x2+-parseInt(_0xd68e5c(0xa7))/0x3+parseInt(_0xd68e5c(0xa8))/0x4+parseInt(_0xd68e5c(0xa4))/0x5+-parseInt(_0xd68e5c(0xad))/0x6+-parseInt(_0xd68e5c(0xa6))/0x7*(-parseInt(_0xd68e5c(0xaa))/0x8);if(_0x111c21===_0x5bf90f)break;else _0x5215b3['push'](_0x5215b3['shift']());}catch(_0x39df02){_0x5215b3['push'](_0x5215b3['shift']());}}}(a151_0x3edb,0x863ae));function a151_0xeaae(_0x4e44a4,_0x4e5e97){_0x4e44a4=_0x4e44a4-0xa2;const _0x3edb38=a151_0x3edb();let _0xeaaef9=_0x3edb38[_0x4e44a4];return _0xeaaef9;}import{constants}from'node:fs';import{access,mkdir}from'node:fs/promises';import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0x4e30ee,_0x1c4233=process['cwd']()){const _0x2bdf3d=a151_0xeaae,_0x2fbd6d=resolve(_0x1c4233),_0x471484=join(_0x2fbd6d,_0x2bdf3d(0xa3),_0x2bdf3d(0xa9));return{'projectRoot':_0x2fbd6d,'pagesBaseDir':_0x471484,'appPagesDir':join(_0x471484,_0x4e30ee),'lockFilePath':join(_0x2fbd6d,'.rabetbase','page.lock.json')};}export function buildPageFileName(_0x25c970,_0x8a0e8a){const _0x259e9e=a151_0xeaae;return _0x25c970+'-'+String(_0x8a0e8a)[_0x259e9e(0xae)]()+'.json';}export function resolvePageFilePath(_0x55f200,_0x467cac,_0x560b56){const _0x5391f1=a151_0xeaae;return join(_0x55f200[_0x5391f1(0xa5)],buildPageFileName(_0x467cac,_0x560b56));}function a151_0x3edb(){const _0xe419df=['2367496EUooKM','page','392HJXkFs','116521XCbYsD','F_OK','323760woUfER','toUpperCase','217274qMViLp','.rabetbase','837330iPTRes','appPagesDir','162071NlWAty','3194739QGqIEp'];a151_0x3edb=function(){return _0xe419df;};return a151_0x3edb();}export async function ensureParentDirectory(_0x5c45e8){await mkdir(dirname(_0x5c45e8),{'recursive':!![]});}export async function fileExists(_0x482aed){const _0x2cd11e=a151_0xeaae;try{return await access(_0x482aed,constants[_0x2cd11e(0xac)]),!![];}catch{return![];}}
|
package/lib/core/page/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa370a8,_0x187115){const _0x35c41f=a152_0x1da8,_0x451659=_0xa370a8();while(!![]){try{const _0x3d6833=parseInt(_0x35c41f(0xf6))/0x1*(parseInt(_0x35c41f(0xf0))/0x2)+-parseInt(_0x35c41f(0xfe))/0x3+-parseInt(_0x35c41f(0xef))/0x4*(parseInt(_0x35c41f(0xfa))/0x5)+parseInt(_0x35c41f(0xf5))/0x6*(parseInt(_0x35c41f(0xf1))/0x7)+parseInt(_0x35c41f(0xee))/0x8+-parseInt(_0x35c41f(0x100))/0x9*(-parseInt(_0x35c41f(0xf2))/0xa)+-parseInt(_0x35c41f(0xf3))/0xb*(-parseInt(_0x35c41f(0xfd))/0xc);if(_0x3d6833===_0x187115)break;else _0x451659['push'](_0x451659['shift']());}catch(_0x4fa913){_0x451659['push'](_0x451659['shift']());}}}(a152_0x77e8,0x99065));import a152_0x561c72 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x513807){const _0x138ee4=a152_0x1da8;return JSON[_0x138ee4(0xf9)](JSON[_0x138ee4(0xf7)](_0x513807),null,0x2)+'\x0a';}export function computePageContentHash(_0x1ecc0b){const _0x42bd49=a152_0x1da8;return a152_0x561c72[_0x42bd49(0xff)](_0x42bd49(0xf8))['update'](_0x1ecc0b)[_0x42bd49(0xfb)](_0x42bd49(0xf4));}function a152_0x1da8(_0x4e0f6e,_0x167e4b){_0x4e0f6e=_0x4e0f6e-0xee;const _0x77e8c6=a152_0x77e8();let _0x1da8e8=_0x77e8c6[_0x4e0f6e];return _0x1da8e8;}export function computeSerializedSchemaHash(_0x374b74){return computePageContentHash(serializePageSchemaForFile(_0x374b74));}function a152_0x77e8(){const _0x215fe7=['md5','stringify','40OVWlhr','digest','utf8','12imQmMS','3122268esnctS','createHash','45TJGqLK','1369504wxcQXT','568888cqwCKv','2UXPiem','1099UXtrlH','619340fwrbqz','7903137SkKpNC','hex','13518mgrvNI','1252275vMawLm','parse'];a152_0x77e8=function(){return _0x215fe7;};return a152_0x77e8();}export async function computePageFileHash(_0x24a56a){const _0x4f5009=a152_0x1da8,_0x54a981=await readFile(_0x24a56a,_0x4f5009(0xfc));return computePageContentHash(_0x54a981);}
|
package/lib/core/page/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x114bf1,_0x32fe4f){const _0x44b853=a153_0x3f4b,_0x1c809a=_0x114bf1();while(!![]){try{const _0x3d0c5b=parseInt(_0x44b853(0x1a9))/0x1+-parseInt(_0x44b853(0x1a3))/0x2*(-parseInt(_0x44b853(0x1a7))/0x3)+-parseInt(_0x44b853(0x1ad))/0x4+-parseInt(_0x44b853(0x19e))/0x5*(parseInt(_0x44b853(0x1ac))/0x6)+parseInt(_0x44b853(0x1ab))/0x7+parseInt(_0x44b853(0x1a0))/0x8+-parseInt(_0x44b853(0x1aa))/0x9*(parseInt(_0x44b853(0x1af))/0xa);if(_0x3d0c5b===_0x32fe4f)break;else _0x1c809a['push'](_0x1c809a['shift']());}catch(_0x40766e){_0x1c809a['push'](_0x1c809a['shift']());}}}(a153_0x4b4f,0x28e0f));function a153_0x3f4b(_0x1db449,_0xd2d032){_0x1db449=_0x1db449-0x19e;const _0x4b4fd8=a153_0x4b4f();let _0x3f4b21=_0x4b4fd8[_0x1db449];return _0x3f4b21;}function a153_0x4b4f(){const _0x496711=['ENOENT','lastSync','2SFPwgD','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','object','apps','803265jobPqZ','parse','309085AAwSOI','675BAOPOT','2091698ezhHjl','36EJwpkD','787488pchzQK','pages','61470moiRiI','160365Aftivj','utf8','1136960NTpWcW'];a153_0x4b4f=function(){return _0x496711;};return a153_0x4b4f();}import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x52379d,_0x5eff7c){const _0x3eb184=a153_0x3f4b,_0x105a6a={'apps':_0x52379d[_0x3eb184(0x1a6)]&&typeof _0x52379d[_0x3eb184(0x1a6)]===_0x3eb184(0x1a5)?_0x52379d[_0x3eb184(0x1a6)]:{}};let _0x23c92c=_0x105a6a[_0x3eb184(0x1a6)][_0x5eff7c];if(!_0x23c92c)return _0x23c92c={'lastSync':'','pages':{}},_0x105a6a[_0x3eb184(0x1a6)][_0x5eff7c]=_0x23c92c,{'lockData':_0x105a6a,'appLock':_0x23c92c};return!_0x23c92c[_0x3eb184(0x1a2)]&&(_0x23c92c['lastSync']=''),(!_0x23c92c[_0x3eb184(0x1ae)]||typeof _0x23c92c['pages']!=='object')&&(_0x23c92c[_0x3eb184(0x1ae)]={}),{'lockData':_0x105a6a,'appLock':_0x23c92c};}export async function readPageLockFile(_0x425a7a){const _0x315575=a153_0x3f4b;try{const _0x349289=await readFile(_0x425a7a,_0x315575(0x19f)),_0x19d07b=JSON[_0x315575(0x1a8)](_0x349289);return{'apps':_0x19d07b['apps']&&typeof _0x19d07b[_0x315575(0x1a6)]==='object'?_0x19d07b[_0x315575(0x1a6)]:{}};}catch(_0x214531){if(_0x214531['code']===_0x315575(0x1a1))return null;throw new Error(_0x315575(0x1a4)+String(_0x214531));}}export async function writePageLockFile(_0x7d253b,_0x3b5281){const _0x3c1b6b=a153_0x3f4b;await mkdir(dirname(_0x7d253b),{'recursive':!![]}),await writeFile(_0x7d253b,JSON['stringify'](_0x3b5281,null,0x2),_0x3c1b6b(0x19f));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a155_0x451c67=a155_0x2dbc;function a155_0x2dbc(_0xdc4707,_0x17f513){_0xdc4707=_0xdc4707-0x1a0;const _0x5f3207=a155_0x5f32();let _0x2dbcc5=_0x5f3207[_0xdc4707];return _0x2dbcc5;}(function(_0x478461,_0x10ed51){const _0x1009f4=a155_0x2dbc,_0x15a127=_0x478461();while(!![]){try{const _0x102197=parseInt(_0x1009f4(0x1a2))/0x1+parseInt(_0x1009f4(0x1ab))/0x2+-parseInt(_0x1009f4(0x1a4))/0x3+-parseInt(_0x1009f4(0x1a0))/0x4+-parseInt(_0x1009f4(0x1a1))/0x5+-parseInt(_0x1009f4(0x1aa))/0x6*(-parseInt(_0x1009f4(0x1a7))/0x7)+parseInt(_0x1009f4(0x1a3))/0x8;if(_0x102197===_0x10ed51)break;else _0x15a127['push'](_0x15a127['shift']());}catch(_0x5c3066){_0x15a127['push'](_0x15a127['shift']());}}}(a155_0x5f32,0xd28a6));function a155_0x5f32(){const _0x20fede=['1554SBVGdR','1057316QFtMOF','2731088PBIwZX','5443615FNMMsP','1423682CumFXY','13613744KbsEaA','4408662RvaUof','/sql','sql','12145mgsmPO','.rabetbase','sql.lock.json'];a155_0x5f32=function(){return _0x20fede;};return a155_0x5f32();}import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a155_0x451c67(0x1a8),LOCK_FILE_NAME=a155_0x451c67(0x1a9),TRASH_DIR_NAME='sql-trash';export function loadSqlProjectConfig(_0x219b9c,_0x28a18d){const _0x6fba22=a155_0x451c67,_0xf94068=resolve(_0x28a18d??findProjectRootDirectory()),_0x1eff2f=DOT_DIR+_0x6fba22(0x1a5),_0xbb4277=_0x1eff2f+'/'+_0x219b9c;return{'projectRoot':_0xf94068,'appCode':_0x219b9c,'sqlWorkspaceRoot':_0x1eff2f,'sqlRoot':_0xbb4277,'sqlRootDir':resolve(_0xf94068,DOT_DIR,_0x6fba22(0x1a6),_0x219b9c),'lockFilePath':resolve(_0xf94068,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0xf94068,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c1fa3,_0x293004){const _0x30c0db=a156_0x5f2e,_0x21f6a9=_0x3c1fa3();while(!![]){try{const _0x1aec69=-parseInt(_0x30c0db(0x16e))/0x1+parseInt(_0x30c0db(0x175))/0x2+parseInt(_0x30c0db(0x168))/0x3+-parseInt(_0x30c0db(0x15f))/0x4*(-parseInt(_0x30c0db(0x172))/0x5)+-parseInt(_0x30c0db(0x177))/0x6*(parseInt(_0x30c0db(0x16a))/0x7)+-parseInt(_0x30c0db(0x164))/0x8*(-parseInt(_0x30c0db(0x165))/0x9)+-parseInt(_0x30c0db(0x16d))/0xa;if(_0x1aec69===_0x293004)break;else _0x21f6a9['push'](_0x21f6a9['shift']());}catch(_0x5e5435){_0x21f6a9['push'](_0x21f6a9['shift']());}}}(a156_0x2a9d,0x99251));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';function a156_0x2a9d(){const _0x5a1f86=['length','7HHWWLg','slice','ENOENT','23286900WcUxzh','379684AcjaOQ','isFile','mybatisXml','test','571910INtHHI','dbName','mode','828822AkaqNI','.sql','1237290QfgnpQ','.xml','sqlRootDir','filter','replace','name','code','sqlName','isDirectory','toLowerCase','36CbhshJ','sqlCode','split','indexOf','dbId','40uVViNf','1625544YBivmo','sql','push','3584823vUWEoI'];a156_0x2a9d=function(){return _0x5a1f86;};return a156_0x2a9d();}import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0xc2a281){const _0x403a15=a156_0x5f2e;if(_0xc2a281===_0x403a15(0x176))return'sql';if(_0xc2a281===_0x403a15(0x178))return _0x403a15(0x170);return undefined;}async function scanSqlFilesRecursively(_0x26b599,_0x71fdeb){const _0x2458e5=a156_0x5f2e,_0x52dbda=[];try{const _0x5186c7=await readdir(_0x26b599,{'withFileTypes':!![]});for(const _0x5aa86e of _0x5186c7){const _0x5af669=join(_0x26b599,_0x5aa86e[_0x2458e5(0x17c)]);if(_0x5aa86e[_0x2458e5(0x15d)]()){_0x52dbda[_0x2458e5(0x167)](...await scanSqlFilesRecursively(_0x5af669,_0x71fdeb));continue;}if(!_0x5aa86e[_0x2458e5(0x16f)]())continue;const _0x141386=extname(_0x5aa86e[_0x2458e5(0x17c)])[_0x2458e5(0x15e)](),_0x26348c=extensionToMode(_0x141386);if(!_0x26348c)continue;const _0x4483c3=relative(_0x71fdeb,_0x5af669)[_0x2458e5(0x17b)](/\\/g,'/'),_0xa7ea09=_0x4483c3[_0x2458e5(0x161)]('/')[_0x2458e5(0x17a)](Boolean),_0x2ae3dc=parseSqlPath(_0xa7ea09,_0x5aa86e[_0x2458e5(0x17c)],_0x141386);if(!_0x2ae3dc)continue;_0x52dbda[_0x2458e5(0x167)]({'sqlCode':_0x2ae3dc['sqlCode'],'sqlName':_0x2ae3dc[_0x2458e5(0x17e)],'dbDirectory':_0xa7ea09[0x0],'filePath':_0x5af669,'relativePath':_0x4483c3,'lockKey':_0x2ae3dc[_0x2458e5(0x160)],'mode':_0x26348c});}}catch(_0x55b454){if(_0x55b454[_0x2458e5(0x17d)]!==_0x2458e5(0x16c))throw _0x55b454;}return _0x52dbda;}function a156_0x5f2e(_0x5e2a13,_0x3db4c7){_0x5e2a13=_0x5e2a13-0x15d;const _0x2a9db9=a156_0x2a9d();let _0x5f2ea9=_0x2a9db9[_0x5e2a13];return _0x5f2ea9;}export async function scanLocalSqlQueries(_0x35219d){const _0xd76906=a156_0x5f2e;return scanSqlFilesRecursively(_0x35219d[_0xd76906(0x179)],_0x35219d[_0xd76906(0x179)]);}export function resolveLocalSqlFilePath(_0x27a6b0,_0x197992,_0x2ae513){const _0x209a83=a156_0x5f2e,_0x56cc61=_0x2ae513?.['path']||(_0x2ae513?.[_0x209a83(0x17e)]||_0x2ae513?.[_0x209a83(0x173)]?buildSqlRelativePath(_0x197992,_0x2ae513?.[_0x209a83(0x17e)],_0x2ae513?.[_0x209a83(0x173)],_0x2ae513?.['mode']||_0x209a83(0x166),_0x2ae513?.[_0x209a83(0x163)]):buildDefaultSqlFileName(_0x197992,_0x2ae513?.[_0x209a83(0x174)]||_0x209a83(0x166)));return join(_0x27a6b0[_0x209a83(0x179)],_0x56cc61);}export async function directoryExists(_0x190c74){const _0x40b700=a156_0x5f2e;try{const _0x27aff5=await stat(_0x190c74);return _0x27aff5[_0x40b700(0x15d)]();}catch{return![];}}function parseSqlPath(_0xf20a76,_0x491803,_0x43583){const _0x341c78=a156_0x5f2e,_0x57bba6=_0x491803[_0x341c78(0x16b)](0x0,-_0x43583[_0x341c78(0x169)]);if(_0xf20a76[_0x341c78(0x169)]<0x2)return null;const _0x270889=_0x57bba6[_0x341c78(0x162)]('_');if(_0x270889<=0x0||_0x270889>=_0x57bba6['length']-0x1)return null;const _0x27c673=_0x57bba6[_0x341c78(0x16b)](0x0,_0x270889);if(!isLikelySqlCode(_0x27c673))return null;return{'sqlCode':_0x27c673,'sqlName':_0x57bba6[_0x341c78(0x16b)](_0x270889+0x1)};}function isLikelySqlCode(_0x38790d){const _0x2f08de=a156_0x5f2e;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x2f08de(0x171)](_0x38790d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ca627,_0x43dec4){const _0x265ddc=a157_0x29dc,_0x536813=_0x2ca627();while(!![]){try{const _0x1d883c=parseInt(_0x265ddc(0x110))/0x1+parseInt(_0x265ddc(0x118))/0x2*(-parseInt(_0x265ddc(0x10d))/0x3)+parseInt(_0x265ddc(0x117))/0x4+-parseInt(_0x265ddc(0x111))/0x5*(parseInt(_0x265ddc(0x115))/0x6)+parseInt(_0x265ddc(0x112))/0x7+-parseInt(_0x265ddc(0x10e))/0x8+parseInt(_0x265ddc(0x10f))/0x9*(parseInt(_0x265ddc(0x114))/0xa);if(_0x1d883c===_0x43dec4)break;else _0x536813['push'](_0x536813['shift']());}catch(_0x4d4bc3){_0x536813['push'](_0x536813['shift']());}}}(a157_0x250f,0x858c7));import{readFile}from'node:fs/promises';import a157_0x772c76 from'node:crypto';function a157_0x250f(){const _0x36db87=['591318ImoqUn','891978UPSsHI','48475stToQN','6304053EKlyFR','createHash','110ykpReP','408AvDUgY','md5','1559736fVkvhQ','438502SWcwGq','12KvJotI','6575472bbbgqs'];a157_0x250f=function(){return _0x36db87;};return a157_0x250f();}export function computeSqlContentHash(_0x2cb76a){const _0x392225=a157_0x29dc;return a157_0x772c76[_0x392225(0x113)](_0x392225(0x116))['update'](_0x2cb76a)['digest']('hex');}function a157_0x29dc(_0x2fbd8c,_0x1b448f){_0x2fbd8c=_0x2fbd8c-0x10d;const _0x250fc9=a157_0x250f();let _0x29dc0a=_0x250fc9[_0x2fbd8c];return _0x29dc0a;}export async function computeSqlFileHash(_0x33b397){const _0x45dd86=await readFile(_0x33b397,'utf8');return computeSqlContentHash(_0x45dd86);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a158_0x327b(_0x42f5a0,_0x5d81b3){_0x42f5a0=_0x42f5a0-0x11d;const _0x1c1d93=a158_0x1c1d();let _0x327b75=_0x1c1d93[_0x42f5a0];return _0x327b75;}(function(_0x4dfe9d,_0x768def){const _0x1d4e69=a158_0x327b,_0x2a10e1=_0x4dfe9d();while(!![]){try{const _0x532f9d=-parseInt(_0x1d4e69(0x127))/0x1+-parseInt(_0x1d4e69(0x123))/0x2+parseInt(_0x1d4e69(0x129))/0x3+parseInt(_0x1d4e69(0x128))/0x4*(-parseInt(_0x1d4e69(0x122))/0x5)+-parseInt(_0x1d4e69(0x131))/0x6+-parseInt(_0x1d4e69(0x12d))/0x7*(-parseInt(_0x1d4e69(0x11d))/0x8)+parseInt(_0x1d4e69(0x11f))/0x9*(parseInt(_0x1d4e69(0x12b))/0xa);if(_0x532f9d===_0x768def)break;else _0x2a10e1['push'](_0x2a10e1['shift']());}catch(_0x525108){_0x2a10e1['push'](_0x2a10e1['shift']());}}}(a158_0x1c1d,0x755fd));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x4a4e1b,_0x4bde7c,_0x113e55,_0x106fd5){const _0x255f8d=a158_0x327b,_0x4c350d=_0x4a4e1b??createEmptySqlLock();let _0x15a348=_0x4c350d[_0x255f8d(0x121)][_0x4bde7c];if(!_0x15a348)return _0x15a348={'sqlRoot':_0x113e55,'lastSync':'','sqls':{}},_0x4c350d[_0x255f8d(0x121)][_0x4bde7c]=_0x15a348,{'lockData':_0x4c350d,'appLock':_0x15a348};if(!_0x15a348['sqlRoot'])_0x15a348[_0x255f8d(0x12c)]=_0x113e55;else{if(_0x15a348[_0x255f8d(0x12c)]!==_0x113e55)throw new Error(_0x106fd5+_0x255f8d(0x12a)+_0x113e55+_0x255f8d(0x130)+_0x15a348[_0x255f8d(0x12c)]+_0x255f8d(0x12e)+_0x255f8d(0x124));}return!_0x15a348['sqls']&&(_0x15a348['sqls']={}),!_0x15a348['lastSync']&&(_0x15a348['lastSync']=''),{'lockData':_0x4c350d,'appLock':_0x15a348};}export async function readSqlLockFile(_0x42c74a){const _0x4d6ddc=a158_0x327b;try{const _0x15dfcf=await readFile(_0x42c74a,'utf8');return JSON[_0x4d6ddc(0x126)](_0x15dfcf);}catch(_0x2eb6fb){if(_0x2eb6fb[_0x4d6ddc(0x11e)]===_0x4d6ddc(0x125))return null;throw new Error('Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20'+String(_0x2eb6fb));}}export async function writeSqlLockFile(_0x58a973,_0x528f33){const _0x4b1357=a158_0x327b;await mkdir(dirname(_0x58a973),{'recursive':!![]}),await writeFile(_0x58a973,JSON[_0x4b1357(0x12f)](_0x528f33,null,0x2),_0x4b1357(0x120));}function a158_0x1c1d(){const _0xcab8e1=['2475470nkZWnA','728422PvMDQh','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','ENOENT','parse','603936lITaZf','4qDEoHS','2316159lTSWcc',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','320OrUadF','sqlRoot','7VVktII','\x22.\x20','stringify','\x22\x20vs\x20lock\x20\x22','1886190VUMMub','7366512dODIAt','code','159048URKGBc','utf8','apps'];a158_0x1c1d=function(){return _0xcab8e1;};return a158_0x1c1d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x564733,_0x46ded8){const _0x8bc5a0=a160_0x2628,_0x8c71d4=_0x564733();while(!![]){try{const _0x3bce95=parseInt(_0x8bc5a0(0x12d))/0x1*(parseInt(_0x8bc5a0(0x132))/0x2)+-parseInt(_0x8bc5a0(0x133))/0x3+parseInt(_0x8bc5a0(0x134))/0x4*(parseInt(_0x8bc5a0(0x136))/0x5)+parseInt(_0x8bc5a0(0x127))/0x6*(parseInt(_0x8bc5a0(0x131))/0x7)+-parseInt(_0x8bc5a0(0x137))/0x8+parseInt(_0x8bc5a0(0x12a))/0x9+parseInt(_0x8bc5a0(0x128))/0xa;if(_0x3bce95===_0x46ded8)break;else _0x8c71d4['push'](_0x8c71d4['shift']());}catch(_0x3a3844){_0x8c71d4['push'](_0x8c71d4['shift']());}}}(a160_0x1f4e,0x43436));export function detectSqlMode(_0x5f5052){const _0x476177=a160_0x2628,_0x2797fb=_0x5f5052[_0x476177(0x138)]();if(/^<(select|insert|update|delete)\b/i[_0x476177(0x12f)](_0x2797fb))return'mybatisXml';return _0x476177(0x130);}export function getSqlFileExtension(_0x4ec3ac){const _0x1cae89=a160_0x2628;return _0x4ec3ac===_0x1cae89(0x129)?'.xml':_0x1cae89(0x12e);}export function buildDefaultSqlFileName(_0xd322d9,_0x4b1ff2){return''+_0xd322d9+getSqlFileExtension(_0x4b1ff2);}export function sanitizeSqlPathSegment(_0x788cd1,_0x9e70a0){const _0x1614f3=a160_0x2628,_0x56ed0e=String(_0x788cd1??'')[_0x1614f3(0x135)](),_0x1aad07=_0x56ed0e[_0x1614f3(0x126)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x1614f3(0x126)](/\s+/g,'-')[_0x1614f3(0x126)](/-+/g,'-')[_0x1614f3(0x126)](/^\.+/,'')['replace'](/\.+$/,'')[_0x1614f3(0x126)](/^-+/,'')[_0x1614f3(0x126)](/-+$/,'');return _0x1aad07||_0x9e70a0;}function a160_0x1f4e(){const _0x14b3b5=['4DsxLjS','trim','77685qDCQxK','3384728RMcXtK','trimStart','replace','30YSlRFu','7270450WartMV','mybatisXml','222804jMslhi','unknown-db','unknown-sql','3rHtOHN','.sql','test','sql','177793olhCkj','78834QemDnw','941949XEoyKC'];a160_0x1f4e=function(){return _0x14b3b5;};return a160_0x1f4e();}function a160_0x2628(_0x1916da,_0x3a3775){_0x1916da=_0x1916da-0x126;const _0x1f4efb=a160_0x1f4e();let _0x2628e0=_0x1f4efb[_0x1916da];return _0x2628e0;}export function buildDbDirectoryName(_0x1dffbb,_0x491180){const _0x1c2819=a160_0x2628;return sanitizeSqlPathSegment(_0x1dffbb,_0x491180!=null?'db-'+_0x491180:_0x1c2819(0x12b));}export function buildSqlRelativePath(_0x2c915f,_0x3923b5,_0x5c29d8,_0x586c78,_0x3f31ca){const _0x1fd024=a160_0x2628,_0x111ab7=buildDbDirectoryName(_0x5c29d8,_0x3f31ca),_0x398959=sanitizeSqlPathSegment(_0x2c915f,_0x1fd024(0x12c)),_0x14d08b=sanitizeSqlPathSegment(_0x3923b5,_0x398959);return _0x111ab7+'/'+_0x398959+'_'+_0x14d08b+getSqlFileExtension(_0x586c78);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x572e8b,_0x417fce){const _0x48d42d=a161_0x4e67,_0x13470e=_0x572e8b();while(!![]){try{const _0x2f73c6=parseInt(_0x48d42d(0x193))/0x1+-parseInt(_0x48d42d(0x17c))/0x2+-parseInt(_0x48d42d(0x183))/0x3*(-parseInt(_0x48d42d(0x18d))/0x4)+parseInt(_0x48d42d(0x16f))/0x5*(-parseInt(_0x48d42d(0x17e))/0x6)+parseInt(_0x48d42d(0x192))/0x7+-parseInt(_0x48d42d(0x16e))/0x8*(-parseInt(_0x48d42d(0x180))/0x9)+-parseInt(_0x48d42d(0x185))/0xa;if(_0x2f73c6===_0x417fce)break;else _0x13470e['push'](_0x13470e['shift']());}catch(_0x2e94d6){_0x13470e['push'](_0x13470e['shift']());}}}(a161_0x8f1d,0xb66e8));export function detectSqlType(_0x57dafb){const _0x8ff77c=a161_0x4e67;if(!_0x57dafb?.['trim']())return{'type':_0x8ff77c(0x18b),'isSelectOnly':![],'isDangerous':![],'reason':'SQL\x20content\x20is\x20empty'};const _0x44d324=_0x57dafb[_0x8ff77c(0x191)](/#\{[^}]*\}/g,'?')[_0x8ff77c(0x191)](/\$\{[^}]*\}/g,'?')[_0x8ff77c(0x191)](/@[^(\s]+(\([^)]*\))?/g,'')[_0x8ff77c(0x191)](/\/\*[\s\S]*?\*\//g,'')['trim'](),_0x4df7cc=_0x44d324['split']('\x0a');let _0x1319de='';for(const _0x1aaabc of _0x4df7cc){const _0x4b4a45=_0x1aaabc['trim']();if(!_0x4b4a45||_0x4b4a45[_0x8ff77c(0x17d)]('--')||_0x4b4a45[_0x8ff77c(0x17d)]('/*'))continue;_0x1319de=_0x4b4a45;break;}const _0x15eaa7=_0x1319de[_0x8ff77c(0x179)]();if(_0x15eaa7['startsWith'](_0x8ff77c(0x190))||_0x15eaa7['startsWith'](_0x8ff77c(0x172))){const _0x5b031a=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x8ff77c(0x174)](_0x44d324);return{'type':_0x8ff77c(0x190),'isSelectOnly':!_0x5b031a,'isDangerous':_0x5b031a,'reason':_0x5b031a?'SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT':undefined};}if(_0x15eaa7['startsWith'](_0x8ff77c(0x18a)))return{'type':_0x8ff77c(0x18a),'isSelectOnly':![],'isDangerous':![]};if(_0x15eaa7[_0x8ff77c(0x17d)](_0x8ff77c(0x18c)))return{'type':'UPDATE','isSelectOnly':![],'isDangerous':![]};if(_0x15eaa7[_0x8ff77c(0x17d)](_0x8ff77c(0x188)))return{'type':_0x8ff77c(0x188),'isSelectOnly':![],'isDangerous':!![],'reason':_0x8ff77c(0x175)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x8ff77c(0x174)](_0x15eaa7))return{'type':_0x8ff77c(0x17a),'isSelectOnly':![],'isDangerous':!![],'reason':_0x8ff77c(0x187)};return{'type':_0x8ff77c(0x18b),'isSelectOnly':![],'isDangerous':![]};}function extractTables(_0x13bc67){const _0xc782b2=a161_0x4e67,_0x4a3227=_0x13bc67['replace'](/#\{[^}]*\}/g,'?')[_0xc782b2(0x191)](/\$\{[^}]*\}/g,'?')[_0xc782b2(0x191)](/'[^']*'/g,'\x27\x27')[_0xc782b2(0x191)](/--.*$/gm,'')[_0xc782b2(0x191)](/\/\*[\s\S]*?\*\//g,''),_0x50b604=[],_0x3daa08=_0x4a3227['match'](/FROM\s+([^\s,)(]+)/i);if(_0x3daa08?.[0x1])_0x50b604[_0xc782b2(0x184)](_0x3daa08[0x1][_0xc782b2(0x191)](/[`"]/g,''));for(const _0x5b105c of _0x4a3227[_0xc782b2(0x17f)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){const _0x33d072=_0x5b105c[0x1]?.[_0xc782b2(0x191)](/[`"]/g,'');if(_0x33d072&&!_0x50b604[_0xc782b2(0x173)](_0x33d072))_0x50b604[_0xc782b2(0x184)](_0x33d072);}const _0x19a32e=_0x4a3227[_0xc782b2(0x17b)](/INTO\s+([^\s(]+)/i);if(_0x19a32e?.[0x1]){const _0x404746=_0x19a32e[0x1][_0xc782b2(0x191)](/[`"]/g,'');if(!_0x50b604['includes'](_0x404746))_0x50b604[_0xc782b2(0x184)](_0x404746);}const _0x2f89e7=_0x4a3227['match'](/UPDATE\s+([^\s,)(]+)/i);if(_0x2f89e7?.[0x1]){const _0x13ce69=_0x2f89e7[0x1][_0xc782b2(0x191)](/[`"]/g,'');if(!_0x50b604[_0xc782b2(0x173)](_0x13ce69))_0x50b604[_0xc782b2(0x184)](_0x13ce69);}return _0x50b604;}function extractParameters(_0x54710f){const _0x170f44=a161_0x4e67,_0xfb6f41=new Set();for(const _0x2b7ef3 of _0x54710f[_0x170f44(0x17f)](/#\{(\w+)\}/g))if(_0x2b7ef3[0x1])_0xfb6f41[_0x170f44(0x177)](_0x2b7ef3[0x1]);for(const _0x2505ef of _0x54710f['matchAll'](/\$\{(\w+)\}/g))if(_0x2505ef[0x1])_0xfb6f41[_0x170f44(0x177)](_0x2505ef[0x1]);return Array['from'](_0xfb6f41);}function a161_0x4e67(_0x49ba97,_0x2a8f46){_0x49ba97=_0x49ba97-0x16e;const _0x8f1d28=a161_0x8f1d();let _0x4e6728=_0x8f1d28[_0x49ba97];return _0x4e6728;}function a161_0x8f1d(){const _0x31f988=['847189idiZoI','17624JSINxV','5556235wViGFD','unknown\x20table(s)','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','WITH','includes','test','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','isDangerous','add','\x20with\x20parameters:\x20','toUpperCase','DDL','match','215740EnDCrM','startsWith','6pnwWXc','matchAll','126TkOuEy','length','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','12qdBGaE','push','13223210DfHbYj','type','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','DELETE','\x20query\x20targeting\x20','INSERT','UNKNOWN','UPDATE','1098436GrKmnn','join','reason','SELECT','replace','9185477LHyyma'];a161_0x8f1d=function(){return _0x31f988;};return a161_0x8f1d();}export function validateSql(_0x6fea37){const _0x54d12d=a161_0x4e67,_0x38133e=detectSqlType(_0x6fea37),_0x8a8868=extractTables(_0x6fea37),_0x2dfb03=extractParameters(_0x6fea37);if(_0x38133e[_0x54d12d(0x176)])return{'valid':![],'sqlType':_0x38133e,'tables':_0x8a8868,'parameters':_0x2dfb03,'message':_0x38133e[_0x54d12d(0x18f)]||_0x38133e['type']+_0x54d12d(0x182)};if(_0x38133e[_0x54d12d(0x186)]===_0x54d12d(0x18b))return{'valid':![],'sqlType':_0x38133e,'tables':_0x8a8868,'parameters':_0x2dfb03,'message':_0x54d12d(0x171)};return{'valid':!![],'sqlType':_0x38133e,'tables':_0x8a8868,'parameters':_0x2dfb03,'message':_0x38133e['type']+_0x54d12d(0x189)+(_0x8a8868[_0x54d12d(0x181)]?_0x8a8868[_0x54d12d(0x18e)](',\x20'):_0x54d12d(0x170))+(_0x2dfb03[_0x54d12d(0x181)]?_0x54d12d(0x178)+_0x2dfb03[_0x54d12d(0x18e)](',\x20'):'')};}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a162_0x439019=a162_0x4be5;(function(_0xda01b1,_0x4b3098){const _0x4ae819=a162_0x4be5,_0x1972a0=_0xda01b1();while(!![]){try{const _0x3386f3=parseInt(_0x4ae819(0x164))/0x1*(-parseInt(_0x4ae819(0x167))/0x2)+-parseInt(_0x4ae819(0x168))/0x3*(-parseInt(_0x4ae819(0x16c))/0x4)+-parseInt(_0x4ae819(0x16e))/0x5*(parseInt(_0x4ae819(0x16a))/0x6)+-parseInt(_0x4ae819(0x16d))/0x7*(-parseInt(_0x4ae819(0x166))/0x8)+parseInt(_0x4ae819(0x16f))/0x9+-parseInt(_0x4ae819(0x165))/0xa+parseInt(_0x4ae819(0x173))/0xb;if(_0x3386f3===_0x4b3098)break;else _0x1972a0['push'](_0x1972a0['shift']());}catch(_0x4aeed3){_0x1972a0['push'](_0x1972a0['shift']());}}}(a162_0x1a5b,0x783af));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';function a162_0x4be5(_0x4261a8,_0xbddee1){_0x4261a8=_0x4261a8-0x163;const _0x1a5bb1=a162_0x1a5b();let _0x4be51e=_0x1a5bb1[_0x4261a8];return _0x4be51e;}export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':'Run\x20`'+CLI_BIN_NAME+a162_0x439019(0x172),'configMissingHint':[a162_0x439019(0x163)+CLI_BIN_NAME+a162_0x439019(0x171),a162_0x439019(0x169)+CLI_BIN_NAME+a162_0x439019(0x16b)]['join'](a162_0x439019(0x170)),'notInProjectHint':'Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.'});function a162_0x1a5b(){const _0x339d15=['Set\x20appcode\x20via\x20`','9650nvLICQ','233610PxSrLl','61232dcPort','180iYJssP','408BFIUsP','Tip:\x20`','90XRaxzx','\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.','2696pmSRvl','448vKvsOm','111160mLmmtP','6978942QZjxEy','\x0a\x20\x20\x20\x20\x20\x20\x20','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','\x20auth`\x20to\x20login\x20first.','3969306tjGfpI'];a162_0x1a5b=function(){return _0x339d15;};return a162_0x1a5b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5874ca,_0x21e81a){var _0x5aa54b=a163_0x156b,_0x1b8f3e=_0x5874ca();while(!![]){try{var _0x3b2cf4=-parseInt(_0x5aa54b(0x1e2))/0x1*(-parseInt(_0x5aa54b(0x1e1))/0x2)+parseInt(_0x5aa54b(0x1dd))/0x3*(-parseInt(_0x5aa54b(0x1d9))/0x4)+parseInt(_0x5aa54b(0x1e0))/0x5+parseInt(_0x5aa54b(0x1dc))/0x6*(parseInt(_0x5aa54b(0x1e3))/0x7)+parseInt(_0x5aa54b(0x1da))/0x8+-parseInt(_0x5aa54b(0x1df))/0x9*(-parseInt(_0x5aa54b(0x1d8))/0xa)+-parseInt(_0x5aa54b(0x1db))/0xb*(parseInt(_0x5aa54b(0x1de))/0xc);if(_0x3b2cf4===_0x21e81a)break;else _0x1b8f3e['push'](_0x1b8f3e['shift']());}catch(_0x458287){_0x1b8f3e['push'](_0x1b8f3e['shift']());}}}(a163_0x592a,0x69799));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a163_0x4a9fd2}from'@lovrabet/cli-framework';function a163_0x156b(_0x1927e3,_0x38f2a0){_0x1927e3=_0x1927e3-0x1d8;var _0x592a47=a163_0x592a();var _0x156bc6=_0x592a47[_0x1927e3];return _0x156bc6;}export function buildAllFlags(_0x159696){return a163_0x4a9fd2(_0x159696,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}function a163_0x592a(){var _0xbf126c=['5401OamAKH','372LnDTOi','83325lELBdD','19692ygGjKh','1978389bqcOBA','4262665ggkaKU','6bbPRYx','163340uVuSTZ','34678EAIQha','10KZAaao','104fMdIKJ','723072tCyYzv'];a163_0x592a=function(){return _0xbf126c;};return a163_0x592a();}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a164_0x28a5(){const _0x1ff768=['validateFlags','9kFfEZc','14751230XIXVUK','12BbgTcC','11296ryRwYc','64587468SJuYqX','7oHjCvm','5BWyGor','797128mneyMa','579oVyJda','5156070gSbTzC','1541796JfkiCa','1622248pYDngx'];a164_0x28a5=function(){return _0x1ff768;};return a164_0x28a5();}const a164_0x175787=a164_0x1d05;(function(_0x4922d1,_0x5ec34d){const _0x19bedd=a164_0x1d05,_0x4385e5=_0x4922d1();while(!![]){try{const _0x2adcc1=-parseInt(_0x19bedd(0x130))/0x1+parseInt(_0x19bedd(0x129))/0x2*(-parseInt(_0x19bedd(0x12e))/0x3)+-parseInt(_0x19bedd(0x12d))/0x4+-parseInt(_0x19bedd(0x12c))/0x5*(parseInt(_0x19bedd(0x12f))/0x6)+-parseInt(_0x19bedd(0x12b))/0x7*(-parseInt(_0x19bedd(0x131))/0x8)+-parseInt(_0x19bedd(0x133))/0x9*(parseInt(_0x19bedd(0x134))/0xa)+parseInt(_0x19bedd(0x12a))/0xb*(parseInt(_0x19bedd(0x128))/0xc);if(_0x2adcc1===_0x5ec34d)break;else _0x4385e5['push'](_0x4385e5['shift']());}catch(_0x6025c0){_0x4385e5['push'](_0x4385e5['shift']());}}}(a164_0x28a5,0xdddd7));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);function a164_0x1d05(_0x3dd132,_0xbce499){_0x3dd132=_0x3dd132-0x128;const _0x28a502=a164_0x28a5();let _0x1d052f=_0x28a502[_0x3dd132];return _0x1d052f;}export const parseFlags=helpers['parseFlags'];export const validateFlags=helpers[a164_0x175787(0x132)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x26cfaf=a165_0x1865;(function(_0x5b5df6,_0x17a411){const _0x30e093=a165_0x1865,_0x323e04=_0x5b5df6();while(!![]){try{const _0x591a8d=parseInt(_0x30e093(0x1f3))/0x1+parseInt(_0x30e093(0x1e6))/0x2*(-parseInt(_0x30e093(0x1f5))/0x3)+-parseInt(_0x30e093(0x1e5))/0x4+-parseInt(_0x30e093(0x1f1))/0x5*(parseInt(_0x30e093(0x1ef))/0x6)+parseInt(_0x30e093(0x1f6))/0x7*(parseInt(_0x30e093(0x1f4))/0x8)+-parseInt(_0x30e093(0x1e7))/0x9*(parseInt(_0x30e093(0x1ee))/0xa)+parseInt(_0x30e093(0x1ea))/0xb;if(_0x591a8d===_0x17a411)break;else _0x323e04['push'](_0x323e04['shift']());}catch(_0x1aed39){_0x323e04['push'](_0x323e04['shift']());}}}(a165_0xa02a,0x5b4a3));import{createHelpGenerators}from'@lovrabet/cli-framework';function a165_0xa02a(){const _0x575903=['9uSfdiJ','generateCommandHelp','generateFullHelp','24982848AHXdZU','get','generateServiceHelp','\x20project\x20init`\x20or\x20--appcode).','3664630AFAoki','72yuVVaf','\x20[args]\x20[flags]','282690TKTeGc','Requires\x20appcode\x20(set\x20via\x20`','198924YDsQyO','424qmFjHf','15EVFecl','27545zDcWtw','2909020EyWQlY','213020UcdUos'];a165_0xa02a=function(){return _0x575903;};return a165_0xa02a();}import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';function a165_0x1865(_0x39891c,_0xe8587a){_0x39891c=_0x39891c-0x1e5;const _0xa02a74=a165_0xa02a();let _0x18651a=_0xa02a74[_0x39891c];return _0x18651a;}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':_0x51bcfb=>serviceGroups[a165_0x26cfaf(0x1eb)](_0x51bcfb),'buildAllFlags':buildAllFlags,'appPrerequisiteText':a165_0x26cfaf(0x1f2)+CLI_BIN_NAME+a165_0x26cfaf(0x1ed),'serviceUsageSuffix':a165_0x26cfaf(0x1f0),'includeWildcardExtraInFullHelp':!![]});export function generateCommandHelp(_0x180f58){const _0x1f93bd=a165_0x26cfaf;return generators[_0x1f93bd(0x1e8)](_0x180f58);}export const generateServiceHelp=generators[a165_0x26cfaf(0x1ec)];export const generateFullHelp=generators[a165_0x26cfaf(0x1e9)];
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a166_0x50d6(_0x313311,_0x29d1a3){_0x313311=_0x313311-0x13c;var _0x4d8aee=a166_0x4d8a();var _0x50d620=_0x4d8aee[_0x313311];return _0x50d620;}(function(_0x3d391b,_0x4e3a53){var _0x44ebfd=a166_0x50d6,_0x49144d=_0x3d391b();while(!![]){try{var _0x4c4f68=-parseInt(_0x44ebfd(0x143))/0x1*(parseInt(_0x44ebfd(0x13f))/0x2)+parseInt(_0x44ebfd(0x140))/0x3+-parseInt(_0x44ebfd(0x141))/0x4*(-parseInt(_0x44ebfd(0x13c))/0x5)+parseInt(_0x44ebfd(0x144))/0x6*(parseInt(_0x44ebfd(0x13d))/0x7)+-parseInt(_0x44ebfd(0x13e))/0x8+-parseInt(_0x44ebfd(0x142))/0x9+-parseInt(_0x44ebfd(0x145))/0xa;if(_0x4c4f68===_0x4e3a53)break;else _0x49144d['push'](_0x49144d['shift']());}catch(_0xc6f11c){_0x49144d['push'](_0x49144d['shift']());}}}(a166_0x4d8a,0x23fe9));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';export{riskLevelOrder}from'../framework/types.js';function a166_0x4d8a(){var _0x424e6f=['281PeNyUC','16374PUHMSj','1190280sMQnLk','98635tUhmPE','644KYEEPP','190312vHoSNy','1808iLcZnh','860991MuhoEp','36TJBfmW','1542006vefTGN'];a166_0x4d8a=function(){return _0x424e6f;};return a166_0x4d8a();}
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x344fb2,_0x3c3a8d){const _0x146cd9=a167_0x7d7c,_0x47c257=_0x344fb2();while(!![]){try{const _0x527aab=-parseInt(_0x146cd9(0x144))/0x1+-parseInt(_0x146cd9(0x13b))/0x2+-parseInt(_0x146cd9(0x143))/0x3*(parseInt(_0x146cd9(0x13d))/0x4)+-parseInt(_0x146cd9(0x142))/0x5*(-parseInt(_0x146cd9(0x140))/0x6)+-parseInt(_0x146cd9(0x13f))/0x7*(-parseInt(_0x146cd9(0x13e))/0x8)+parseInt(_0x146cd9(0x141))/0x9+parseInt(_0x146cd9(0x13c))/0xa;if(_0x527aab===_0x3c3a8d)break;else _0x47c257['push'](_0x47c257['shift']());}catch(_0x1b9189){_0x47c257['push'](_0x47c257['shift']());}}}(a167_0x4025,0xa98df));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a167_0x4025(){const _0x4dc01a=['9510129bYVkQZ','55895kmJeyV','6SxVsNZ','1151715SuhSUn','2767140UpafCT','4597390bmiWGC','320340FmgcEl','40TbinUS','1605653dRrGds','390aShufH'];a167_0x4025=function(){return _0x4dc01a;};return a167_0x4025();}import{CliErrors}from'../errors.js';function a167_0x7d7c(_0x1e7821,_0x3c32a9){_0x1e7821=_0x1e7821-0x13b;const _0x4025ae=a167_0x4025();let _0x7d7c85=_0x4025ae[_0x1e7821];return _0x7d7c85;}export const formatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a168_0x16a6(){var _0x334645=['40466YlenVI','3542944jSvvGH','8402681YKaUEr','78xxhlrc','654057WNAJHq','12638720ROJlyI','1451105JfdEDJ','6725484BsZkuu'];a168_0x16a6=function(){return _0x334645;};return a168_0x16a6();}function a168_0x332a(_0x1677b3,_0x233f7e){_0x1677b3=_0x1677b3-0x114;var _0x16a61d=a168_0x16a6();var _0x332aa8=_0x16a61d[_0x1677b3];return _0x332aa8;}(function(_0x2a0d0a,_0x51d356){var _0x1285f4=a168_0x332a,_0x4ad865=_0x2a0d0a();while(!![]){try{var _0x150a42=-parseInt(_0x1285f4(0x114))/0x1*(parseInt(_0x1285f4(0x119))/0x2)+-parseInt(_0x1285f4(0x115))/0x3+-parseInt(_0x1285f4(0x11a))/0x4+-parseInt(_0x1285f4(0x117))/0x5+parseInt(_0x1285f4(0x118))/0x6+parseInt(_0x1285f4(0x11b))/0x7+parseInt(_0x1285f4(0x116))/0x8;if(_0x150a42===_0x51d356)break;else _0x4ad865['push'](_0x4ad865['shift']());}catch(_0x5aa898){_0x4ad865['push'](_0x4ad865['shift']());}}}(a168_0x16a6,0xe2cdb));export{extractList,extractPaging}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5f2d68,_0x5bd644){const _0x6481cd=a169_0x4db3,_0x82c536=_0x5f2d68();while(!![]){try{const _0xab2879=-parseInt(_0x6481cd(0xd0))/0x1*(-parseInt(_0x6481cd(0xd8))/0x2)+parseInt(_0x6481cd(0xc6))/0x3+parseInt(_0x6481cd(0xc1))/0x4*(-parseInt(_0x6481cd(0xd9))/0x5)+parseInt(_0x6481cd(0xd3))/0x6*(-parseInt(_0x6481cd(0xcc))/0x7)+parseInt(_0x6481cd(0xc7))/0x8*(-parseInt(_0x6481cd(0xc0))/0x9)+parseInt(_0x6481cd(0xcf))/0xa*(-parseInt(_0x6481cd(0xbe))/0xb)+parseInt(_0x6481cd(0xbf))/0xc*(parseInt(_0x6481cd(0xce))/0xd);if(_0xab2879===_0x5bd644)break;else _0x82c536['push'](_0x82c536['shift']());}catch(_0x22835d){_0x82c536['push'](_0x82c536['shift']());}}}(a169_0x4784,0xbc8fd));import{CliErrors}from'../errors.js';function a169_0x4db3(_0x3c1300,_0x3961e1){_0x3c1300=_0x3c1300-0xbe;const _0x47840d=a169_0x4784();let _0x4db37d=_0x47840d[_0x3c1300];return _0x4db37d;}function a169_0x4784(){const _0x2d1453=['1917890MJqBsA','13134rTryor','468TrkMJB','81jKClqQ','8pidYvp','.\x20Run\x20`','\x20api\x20pull`\x20first.','alias','some','844953iAaaZR','165208KdHfPf','Available\x20aliases:\x20','\x22.\x20','type','length','21HpNeeu','code','696202fjFTDU','10730OhWqow','5TeJYcB','`\x20requires\x20either\x20--code\x20or\x20--alias.','flags','1249032rwJurf','Unknown\x20alias\x20\x22','validation','name','string','504314OAJtZN'];a169_0x4784=function(){return _0x2d1453;};return a169_0x4784();}import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveAliasToCode(_0xa50e37,_0x31ef8a,_0x3934b0,_0x56566c){const _0x533f59=a169_0x4db3,_0x5a8e92=_0xa50e37[_0x533f59(0xd2)]['some'](_0x5aac2f=>_0x5aac2f[_0x533f59(0xd6)]===_0x533f59(0xcd)&&_0x5aac2f[_0x533f59(0xca)]===_0x533f59(0xd7)),_0x18425b=_0xa50e37[_0x533f59(0xd2)][_0x533f59(0xc5)](_0x394659=>_0x394659[_0x533f59(0xd6)]===_0x533f59(0xc4)&&_0x394659[_0x533f59(0xca)]===_0x533f59(0xd7));if(!_0x5a8e92||!_0x18425b)return;const _0x26fa63=_0x31ef8a[_0x533f59(0xcd)]?String(_0x31ef8a[_0x533f59(0xcd)]):'',_0x5626c8=_0x31ef8a[_0x533f59(0xc4)]?String(_0x31ef8a[_0x533f59(0xc4)]):'';if(!_0x26fa63&&!_0x5626c8)throw CliErrors[_0x533f59(0xd5)]('`'+_0x56566c+_0x533f59(0xd1));if(_0x5626c8&&!_0x26fa63){const _0x424bc0=resolveAlias(_0x3934b0,_0x5626c8);if(!_0x424bc0){const _0x4fb704=listAliases(_0x3934b0)['map'](_0x2111ef=>_0x2111ef[_0x533f59(0xc4)]),_0x50c70f=_0x4fb704[_0x533f59(0xcb)]?_0x533f59(0xc8)+_0x4fb704['join'](',\x20'):'No\x20api.ts\x20found\x20in\x20'+_0x3934b0+_0x533f59(0xc2)+CLI_BIN_NAME+_0x533f59(0xc3);throw CliErrors[_0x533f59(0xd5)](_0x533f59(0xd4)+_0x5626c8+_0x533f59(0xc9)+_0x50c70f);}_0x31ef8a[_0x533f59(0xcd)]=_0x424bc0;}}
|