@lovrabet/rabetbase-cli 2.1.14-beta.3 → 2.2.0
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/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 -1
- package/lib/commands/dataset/field-update.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-create.js +1 -0
- package/lib/commands/dataset/relation-delete.js +1 -0
- package/lib/commands/dataset/relation-shared.js +1 -0
- package/lib/commands/dataset/relation-update.js +1 -0
- package/lib/commands/dataset/relations.js +1 -0
- 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/relation-audit.js +1 -0
- 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/update-notice.js +1 -0
- 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
- package/lib/commands/dataset/link-create.js +0 -1
- package/lib/commands/dataset/link-delete.js +0 -1
- package/lib/commands/dataset/link-shared.js +0 -1
- package/lib/commands/dataset/link-update.js +0 -1
- package/lib/commands/dataset/links.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a146_0x1d9bc1=a146_0x2efb;(function(_0x69f889,_0x2acb09){const _0x53b696=a146_0x2efb,_0x50a6e1=_0x69f889();while(!![]){try{const _0x31ac1b=parseInt(_0x53b696(0x1d1))/0x1*(-parseInt(_0x53b696(0x1b6))/0x2)+-parseInt(_0x53b696(0x1b5))/0x3+parseInt(_0x53b696(0x1bb))/0x4*(parseInt(_0x53b696(0x1be))/0x5)+-parseInt(_0x53b696(0x1d4))/0x6+-parseInt(_0x53b696(0x1cf))/0x7*(-parseInt(_0x53b696(0x1d3))/0x8)+-parseInt(_0x53b696(0x1cd))/0x9*(parseInt(_0x53b696(0x1c5))/0xa)+parseInt(_0x53b696(0x1c9))/0xb;if(_0x31ac1b===_0x2acb09)break;else _0x50a6e1['push'](_0x50a6e1['shift']());}catch(_0x58cf39){_0x50a6e1['push'](_0x50a6e1['shift']());}}}(a146_0x5ee2,0x18da6));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';function a146_0x5ee2(){const _0x327c74=['endsWith','push','map','3788114TwNgqC','functionNode','get','after','153NkSNrE','functionName','475489eesaAU','beforeScriptId','1jjNYzi','F_OK','16huxtQN','773718ZFiCMt','toUpperCase','.js','isDirectory','scriptsRootDir','HOOK/','set','datasetCode','246165nqheBb','246052ILbqOL','replace','split','before','COMMON','4lznBMb','HOOK','isFile','412375ByphTC','scriptType','all','ENDPOINT','ENOENT','operationType','name','74630IeFZzX'];a146_0x5ee2=function(){return _0x327c74;};return a146_0x5ee2();}export const SUPPORTED_BFF_TYPES=[a146_0x1d9bc1(0x1ba),a146_0x1d9bc1(0x1c1),a146_0x1d9bc1(0x1bc)];export function normalizeBffType(_0x2d4575){const _0x203964=a146_0x1d9bc1;if(!_0x2d4575)return undefined;const _0x3503f4=_0x2d4575['trim']()[_0x203964(0x1d5)]();return SUPPORTED_BFF_TYPES['includes'](_0x3503f4)?_0x3503f4:undefined;}async function scanJsFilesRecursively(_0x54d194,_0x483b40){const _0x5174bf=a146_0x1d9bc1,_0x5bf2ed=[];try{const _0xdd9bb3=await readdir(_0x54d194,{'withFileTypes':!![]});for(const _0x40f5be of _0xdd9bb3){const _0x31bc1f=join(_0x54d194,_0x40f5be[_0x5174bf(0x1c4)]);if(_0x40f5be[_0x5174bf(0x1d7)]())_0x5bf2ed[_0x5174bf(0x1c7)](...await scanJsFilesRecursively(_0x31bc1f,_0x483b40+'/'+_0x40f5be[_0x5174bf(0x1c4)]));else _0x40f5be[_0x5174bf(0x1bd)]()&&_0x40f5be[_0x5174bf(0x1c4)][_0x5174bf(0x1c6)](_0x5174bf(0x1d6))&&_0x5bf2ed[_0x5174bf(0x1c7)]({'lockKey':_0x483b40+'/'+_0x40f5be[_0x5174bf(0x1c4)][_0x5174bf(0x1b7)](/\.js$/,''),'filePath':_0x31bc1f});}}catch(_0x1e3bb8){if(_0x1e3bb8['code']!==_0x5174bf(0x1c2))throw _0x1e3bb8;}return _0x5bf2ed;}async function scanFlatFunctions(_0x3c3180,_0x20d047){const _0x2225d0=a146_0x1d9bc1,_0x335645=join(_0x3c3180[_0x2225d0(0x1d8)],_0x20d047),_0x1af7fb=await scanJsFilesRecursively(_0x335645,_0x20d047);return _0x1af7fb[_0x2225d0(0x1c8)](({lockKey:_0xadc7ed,filePath:_0x58f2eb})=>({'type':_0x20d047,'name':_0xadc7ed['split']('/')['at'](-0x1)??'','filePath':_0x58f2eb,'lockKey':_0xadc7ed}));}async function scanHookFunctions(_0x5d9b6b){const _0x3bf808=a146_0x1d9bc1,_0x140855=join(_0x5d9b6b[_0x3bf808(0x1d8)],_0x3bf808(0x1bc)),_0x3603ac=[];try{const _0x5a636c=await readdir(_0x140855,{'withFileTypes':!![]});for(const _0x5eebd6 of _0x5a636c){if(!_0x5eebd6[_0x3bf808(0x1d7)]())continue;const _0x2191ff=_0x5eebd6['name'],_0x2929ed=join(_0x140855,_0x2191ff),_0x54eeb2=await readdir(_0x2929ed,{'withFileTypes':!![]});for(const _0x11894f of _0x54eeb2){if(!_0x11894f['isDirectory']())continue;const _0x16d2db=_0x11894f[_0x3bf808(0x1c4)],_0x1f6ea5=join(_0x2929ed,_0x16d2db),_0x5e35d6=await readdir(_0x1f6ea5,{'withFileTypes':!![]});for(const _0x370326 of _0x5e35d6){if(!_0x370326[_0x3bf808(0x1d7)]())continue;const _0x2c430a=_0x370326[_0x3bf808(0x1c4)],_0x3bfb78=join(_0x1f6ea5,_0x2c430a),_0x3dd718=await readdir(_0x3bfb78,{'withFileTypes':!![]});for(const _0x24c6e8 of _0x3dd718){if(!_0x24c6e8[_0x3bf808(0x1bd)]()||!_0x24c6e8[_0x3bf808(0x1c4)][_0x3bf808(0x1c6)](_0x3bf808(0x1d6)))continue;const _0x3ab1b3=_0x24c6e8['name']['replace'](/\.js$/,'');_0x3603ac[_0x3bf808(0x1c7)]({'type':_0x3bf808(0x1bc),'name':_0x3ab1b3,'filePath':join(_0x3bfb78,_0x24c6e8[_0x3bf808(0x1c4)]),'lockKey':_0x3bf808(0x1d9)+_0x2191ff+'/'+_0x16d2db+'/'+_0x2c430a+'/'+_0x3ab1b3,'alias':_0x2191ff,'operationType':_0x16d2db,'functionNode':_0x2c430a});}}}}}catch(_0x4de455){if(_0x4de455['code']!=='ENOENT')throw _0x4de455;}return _0x3603ac;}export async function scanLocalBffFunctions(_0x353bad,_0x3c71f5){const _0x5d3673=a146_0x1d9bc1;if(_0x3c71f5===_0x5d3673(0x1ba)||_0x3c71f5===_0x5d3673(0x1c1))return scanFlatFunctions(_0x353bad,_0x3c71f5);if(_0x3c71f5==='HOOK')return scanHookFunctions(_0x353bad);const [_0x248a5f,_0x13df77,_0xe1d59b]=await Promise[_0x5d3673(0x1c0)]([scanFlatFunctions(_0x353bad,_0x5d3673(0x1ba)),scanFlatFunctions(_0x353bad,_0x5d3673(0x1c1)),scanHookFunctions(_0x353bad)]);return[..._0x248a5f,..._0x13df77,..._0xe1d59b];}function a146_0x2efb(_0x176358,_0x5aac10){_0x176358=_0x176358-0x1b5;const _0x5ee28e=a146_0x5ee2();let _0x2efbcf=_0x5ee28e[_0x176358];return _0x2efbcf;}export function resolveLocalFilePathFromLockKey(_0x197b94,_0x51806b){const _0x492760=a146_0x1d9bc1;return join(_0x197b94[_0x492760(0x1d8)],..._0x51806b[_0x492760(0x1b8)]('/'))+_0x492760(0x1d6);}export function createHookLocationMap(_0x561f17){const _0xd826a8=a146_0x1d9bc1,_0x2d74ea=new Map();for(const _0x2bbd0a of _0x561f17){_0x2bbd0a['beforeScriptId']&&_0x2d74ea[_0xd826a8(0x1da)](_0x2bbd0a[_0xd826a8(0x1d0)],{'datasetCode':_0x2bbd0a[_0xd826a8(0x1db)],'operationType':snakeToCamel(_0x2bbd0a[_0xd826a8(0x1c3)]),'functionNode':_0xd826a8(0x1b9)}),_0x2bbd0a['afterScriptId']&&_0x2d74ea['set'](_0x2bbd0a['afterScriptId'],{'datasetCode':_0x2bbd0a['datasetCode'],'operationType':snakeToCamel(_0x2bbd0a[_0xd826a8(0x1c3)]),'functionNode':_0xd826a8(0x1cc)});}return _0x2d74ea;}export function resolveRemoteScriptTarget(_0x5847e5,_0x2bc83d,_0x3dfb63,_0x244b24,_0x38f1e6){const _0x322b91=a146_0x1d9bc1,_0x579510=normalizeBffType(_0x2bc83d[_0x322b91(0x1bf)]);if(!_0x579510||!_0x2bc83d[_0x322b91(0x1ce)])return null;if(_0x579510===_0x322b91(0x1bc)){const _0x39e33f=(_0x2bc83d['id']?_0x3dfb63[_0x322b91(0x1cb)](_0x2bc83d['id']):undefined)??findHookLocationByRemoteId(_0x244b24,_0x2bc83d['id']);if(!_0x39e33f)return null;const _0x4ffddc=_0x39e33f['alias']||_0x38f1e6[_0x322b91(0x1cb)](_0x39e33f[_0x322b91(0x1db)]),_0x187e69=_0x4ffddc??_0x39e33f[_0x322b91(0x1db)],_0x2f284c={..._0x39e33f,'alias':_0x4ffddc},_0x33013b=_0x322b91(0x1d9)+_0x187e69+'/'+_0x2f284c[_0x322b91(0x1c3)]+'/'+_0x2f284c[_0x322b91(0x1ca)]+'/'+_0x2bc83d[_0x322b91(0x1ce)];return{'lockKey':_0x33013b,'filePath':resolveLocalFilePathFromLockKey(_0x5847e5,_0x33013b),'type':_0x322b91(0x1bc),'hookLocation':_0x2f284c};}const _0x329f77=_0x579510+'/'+_0x2bc83d[_0x322b91(0x1ce)];return{'lockKey':_0x329f77,'filePath':resolveLocalFilePathFromLockKey(_0x5847e5,_0x329f77),'type':_0x579510};}export async function ensureParentDirectory(_0x2de4cb){await mkdir(dirname(_0x2de4cb),{'recursive':!![]});}export async function fileExists(_0x5c9c16){const _0x309144=a146_0x1d9bc1;try{return await access(_0x5c9c16,constants[_0x309144(0x1d2)]),!![];}catch{return![];}}export async function directoryExists(_0x34a572){const _0x336baf=a146_0x1d9bc1;try{const _0xaf845b=await stat(_0x34a572);return _0xaf845b[_0x336baf(0x1d7)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x319525,_0x346380){const _0x38ed2f=a147_0x1d15,_0x39f37b=_0x319525();while(!![]){try{const _0xfdebbd=parseInt(_0x38ed2f(0x8c))/0x1*(-parseInt(_0x38ed2f(0x87))/0x2)+parseInt(_0x38ed2f(0x82))/0x3*(parseInt(_0x38ed2f(0x85))/0x4)+parseInt(_0x38ed2f(0x90))/0x5*(-parseInt(_0x38ed2f(0x8f))/0x6)+parseInt(_0x38ed2f(0x8d))/0x7*(parseInt(_0x38ed2f(0x8a))/0x8)+parseInt(_0x38ed2f(0x84))/0x9+parseInt(_0x38ed2f(0x8b))/0xa+-parseInt(_0x38ed2f(0x88))/0xb;if(_0xfdebbd===_0x346380)break;else _0x39f37b['push'](_0x39f37b['shift']());}catch(_0x16b89a){_0x39f37b['push'](_0x39f37b['shift']());}}}(a147_0x44c8,0x8cf48));import{readFile}from'node:fs/promises';function a147_0x1d15(_0x407d9e,_0x4aa4b1){_0x407d9e=_0x407d9e-0x82;const _0x44c89e=a147_0x44c8();let _0x1d15c3=_0x44c89e[_0x407d9e];return _0x1d15c3;}import a147_0x3b53fa from'node:crypto';export function computeContentHash(_0x2db5c2){const _0x1ec41d=a147_0x1d15;return a147_0x3b53fa[_0x1ec41d(0x91)](_0x1ec41d(0x83))['update'](_0x2db5c2)[_0x1ec41d(0x89)](_0x1ec41d(0x86));}function a147_0x44c8(){const _0x49ac1e=['7756785aldEiL','2440tsHocD','hex','2GUmKAZ','13950244oxtaoI','digest','24EzhPHj','3522070GxHmqN','94988xLoVyz','1570751pSzfDm','utf8','66JOPtVm','245285rRTsMp','createHash','2916KhIoMm','md5'];a147_0x44c8=function(){return _0x49ac1e;};return a147_0x44c8();}export async function computeFileHash(_0x5dbe4f){const _0x330684=a147_0x1d15,_0x300cb2=await readFile(_0x5dbe4f,_0x330684(0x8e));return computeContentHash(_0x300cb2);}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x201a8b,_0x569d91){const _0x2c391f=a148_0x1536,_0x60f225=_0x201a8b();while(!![]){try{const _0x5da6ee=parseInt(_0x2c391f(0x122))/0x1+parseInt(_0x2c391f(0x12c))/0x2+-parseInt(_0x2c391f(0x123))/0x3*(-parseInt(_0x2c391f(0x126))/0x4)+-parseInt(_0x2c391f(0x12b))/0x5+-parseInt(_0x2c391f(0x127))/0x6*(-parseInt(_0x2c391f(0x119))/0x7)+-parseInt(_0x2c391f(0x128))/0x8+parseInt(_0x2c391f(0x12d))/0x9*(parseInt(_0x2c391f(0x125))/0xa);if(_0x5da6ee===_0x569d91)break;else _0x60f225['push'](_0x60f225['shift']());}catch(_0x3d736b){_0x60f225['push'](_0x60f225['shift']());}}}(a148_0x3f90,0xa7516));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}function a148_0x1536(_0x27ead3,_0x1a4ac5){_0x27ead3=_0x27ead3-0x117;const _0x3f9047=a148_0x3f90();let _0x153614=_0x3f9047[_0x27ead3];return _0x153614;}function a148_0x3f90(){const _0x5d4856=['ENOENT','lastSync','7066801oqubCQ','current\x20\x22','code','scriptsRoot','\x22.\x20','stringify','utf8','functions','object','218784Uocxyu','124167gHDvNE','parse','11096070qzsGkH','76sjiISG','6UekniS','10227408SPnhGg','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','\x22\x20vs\x20lock\x20\x22','6305535uIfPhx','201084JmBibq','9bEbgGN',':\x20scriptsRoot\x20mismatch\x20—\x20','apps'];a148_0x3f90=function(){return _0x5d4856;};return a148_0x3f90();}export function ensureLockScope(_0x1029af,_0x5baaf9,_0x117e0c,_0x5a1c78){const _0x1997cc=a148_0x1536,_0x493fad={'apps':_0x1029af['apps']&&typeof _0x1029af[_0x1997cc(0x12f)]===_0x1997cc(0x121)?_0x1029af[_0x1997cc(0x12f)]:{}};let _0x3f6358=_0x493fad[_0x1997cc(0x12f)][_0x5baaf9];if(!_0x3f6358)return _0x3f6358={'scriptsRoot':_0x117e0c,'lastSync':'','functions':{}},_0x493fad[_0x1997cc(0x12f)][_0x5baaf9]=_0x3f6358,{'lockData':_0x493fad,'appLock':_0x3f6358};if(!_0x3f6358[_0x1997cc(0x11c)])_0x3f6358[_0x1997cc(0x11c)]=_0x117e0c;else{if(_0x3f6358[_0x1997cc(0x11c)]!==_0x117e0c)throw new Error(_0x5a1c78+_0x1997cc(0x12e)+(_0x1997cc(0x11a)+_0x117e0c+_0x1997cc(0x12a)+_0x3f6358['scriptsRoot']+_0x1997cc(0x11d))+'Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x3f6358[_0x1997cc(0x120)]&&(_0x3f6358['functions']={}),!_0x3f6358[_0x1997cc(0x118)]&&(_0x3f6358[_0x1997cc(0x118)]=''),{'lockData':_0x493fad,'appLock':_0x3f6358};}export async function readBffLockFile(_0x15e113){const _0x5a48b4=a148_0x1536;try{const _0x2148fc=await readFile(_0x15e113,'utf8'),_0x4ad768=JSON[_0x5a48b4(0x124)](_0x2148fc);return{'apps':_0x4ad768['apps']&&typeof _0x4ad768['apps']===_0x5a48b4(0x121)?_0x4ad768['apps']:{}};}catch(_0x5ed9b7){if(_0x5ed9b7[_0x5a48b4(0x11b)]===_0x5a48b4(0x117))return null;throw new Error(_0x5a48b4(0x129)+String(_0x5ed9b7));}}export async function writeBffLockFile(_0x41d7df,_0x5eed91){const _0x883b42=a148_0x1536;await mkdir(dirname(_0x41d7df),{'recursive':!![]}),await writeFile(_0x41d7df,JSON[_0x883b42(0x11e)](_0x5eed91,null,0x2),_0x883b42(0x11f));}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x52b1b4,_0x412fc3){const _0x426970=a150_0xa662,_0x54375d=_0x52b1b4();while(!![]){try{const _0x36fd00=-parseInt(_0x426970(0x153))/0x1+-parseInt(_0x426970(0x151))/0x2*(-parseInt(_0x426970(0x14d))/0x3)+-parseInt(_0x426970(0x158))/0x4*(parseInt(_0x426970(0x15e))/0x5)+-parseInt(_0x426970(0x15a))/0x6*(parseInt(_0x426970(0x14e))/0x7)+-parseInt(_0x426970(0x15f))/0x8*(-parseInt(_0x426970(0x155))/0x9)+parseInt(_0x426970(0x14b))/0xa+parseInt(_0x426970(0x159))/0xb;if(_0x36fd00===_0x412fc3)break;else _0x54375d['push'](_0x54375d['shift']());}catch(_0x3f1d2e){_0x54375d['push'](_0x54375d['shift']());}}}(a150_0x1d5a,0x3d709));function a150_0xa662(_0x588c1f,_0x49d61d){_0x588c1f=_0x588c1f-0x14a;const _0x1d5a33=a150_0x1d5a();let _0xa662d2=_0x1d5a33[_0x588c1f];return _0xa662d2;}export function snakeToCamel(_0x388ed8){const _0x2fd638=a150_0xa662;return _0x388ed8[_0x2fd638(0x157)]()[_0x2fd638(0x15d)](/_([a-z])/g,(_0x35318f,_0x11e717)=>_0x11e717[_0x2fd638(0x152)]());}export function findHookLocationByRemoteId(_0x463ec0,_0x4f1ece){const _0x52283c=a150_0xa662;if(!_0x4f1ece)return undefined;for(const _0x11919e of Object[_0x52283c(0x14f)](_0x463ec0)){if(_0x11919e[_0x52283c(0x161)]===_0x4f1ece&&_0x11919e['datasetCode']&&_0x11919e[_0x52283c(0x14a)]&&_0x11919e[_0x52283c(0x160)])return{'datasetCode':_0x11919e[_0x52283c(0x14c)],'operationType':_0x11919e[_0x52283c(0x14a)],'functionNode':_0x11919e[_0x52283c(0x160)]};}return undefined;}export function extractScriptDescription(_0x30e4a9){const _0x4ac40f=a150_0xa662,_0x2e4c9e=_0x30e4a9[_0x4ac40f(0x154)](/\[\s*脚本描述\s*]\s*(.+)/);return _0x2e4c9e?.[0x1]?.['trim']()||undefined;}export function isValidBffFunctionName(_0xb98a0b){const _0x4423a0=a150_0xa662;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x4423a0(0x15c)](_0xb98a0b);}function a150_0x1d5a(){const _0x124ffe=['operationType','844150dBjzqj','datasetCode','15IIPqoA','21KWWPRM','values','before','32206UZAJaA','toUpperCase','92758wgOomE','match','37512DYxmkb','after','toLowerCase','2116nihQoy','4922599LpNobu','489828nxYMUW','trim','test','replace','2070XMXjRM','376kcAoMp','functionNode','remoteId'];a150_0x1d5a=function(){return _0x124ffe;};return a150_0x1d5a();}export function normalizeHookFunctionNode(_0x3cd36c){const _0x1e3857=a150_0xa662;if(!_0x3cd36c)return undefined;const _0x131985=_0x3cd36c[_0x1e3857(0x15b)]()[_0x1e3857(0x157)]();if(_0x131985===_0x1e3857(0x150)||_0x131985===_0x1e3857(0x156))return _0x131985;return undefined;}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x409674,_0x3b8deb){const _0x30b178=a151_0x38ce,_0x58cc2b=_0x409674();while(!![]){try{const _0x322152=parseInt(_0x30b178(0x198))/0x1+-parseInt(_0x30b178(0x1a9))/0x2*(parseInt(_0x30b178(0x1ac))/0x3)+parseInt(_0x30b178(0x19b))/0x4+-parseInt(_0x30b178(0x19e))/0x5+parseInt(_0x30b178(0x19a))/0x6*(parseInt(_0x30b178(0x194))/0x7)+-parseInt(_0x30b178(0x1a8))/0x8*(-parseInt(_0x30b178(0x1a3))/0x9)+-parseInt(_0x30b178(0x1ad))/0xa;if(_0x322152===_0x3b8deb)break;else _0x58cc2b['push'](_0x58cc2b['shift']());}catch(_0x4d4074){_0x58cc2b['push'](_0x58cc2b['shift']());}}}(a151_0xb9c3,0x59929));function a151_0xb9c3(){const _0x883ed=['Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','entries','147HKCrBx','find','includes','\x22\x20under\x20app\x20\x22','612446LdvzBd','get','44406HBSBHl','993256QQphbN','has','dbName','1038655CPyiHX','toLowerCase','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','map','\x22\x20matches\x20multiple\x20databases:\x20','36PxolXb','\x22.\x20Available:\x20','join','length','isNaN','291976iBDmhz','26294iDsDYr','filter','set','57aLDhJr','3377560Ivnzcx','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','.\x20Be\x20more\x20specific.','dbtableConfig','dbId'];a151_0xb9c3=function(){return _0x883ed;};return a151_0xb9c3();}import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0xc03a97){const _0x18d95a=a151_0x38ce;if(cache[_0x18d95a(0x19c)](_0xc03a97))return cache[_0x18d95a(0x199)](_0xc03a97);const _0x1362d1=await listDatasets(_0xc03a97),_0x11fb92=new Map();for(const _0x5388c8 of _0x1362d1){const _0x232ba8=_0x5388c8[_0x18d95a(0x190)];_0x232ba8?.[_0x18d95a(0x191)]!=null&&_0x11fb92[_0x18d95a(0x1ab)](_0x232ba8[_0x18d95a(0x191)],_0x232ba8[_0x18d95a(0x19d)]??'db-'+_0x232ba8[_0x18d95a(0x191)]);}const _0x25c843=[..._0x11fb92[_0x18d95a(0x193)]()]['map'](([_0x5c4c09,_0x14a378])=>({'dbId':_0x5c4c09,'dbName':_0x14a378}));return cache[_0x18d95a(0x1ab)](_0xc03a97,_0x25c843),_0x25c843;}export async function resolveDb(_0x3de984,_0x147379){const _0x419e50=a151_0x38ce,_0x50e646=await listDatabases(_0x3de984);if(_0x50e646[_0x419e50(0x1a6)]===0x0)return{'resolved':[],'error':_0x419e50(0x1af)+_0x3de984+_0x419e50(0x1a0)};if(!_0x147379)return{'resolved':_0x50e646};const _0x20ae01=Number(_0x147379);if(!Number[_0x419e50(0x1a7)](_0x20ae01)){const _0x21467d=_0x50e646[_0x419e50(0x195)](_0x2164ae=>_0x2164ae[_0x419e50(0x191)]===_0x20ae01);if(_0x21467d)return{'resolved':[_0x21467d]};}const _0x4258dd=_0x147379[_0x419e50(0x19f)](),_0x36a379=_0x50e646[_0x419e50(0x1aa)](_0x39ce55=>_0x39ce55[_0x419e50(0x19d)][_0x419e50(0x19f)]()[_0x419e50(0x196)](_0x4258dd));if(_0x36a379['length']>0x0)return{'resolved':_0x36a379};const _0x854628=_0x50e646[_0x419e50(0x1a1)](_0x11a768=>_0x11a768['dbName']+'\x20('+_0x11a768[_0x419e50(0x191)]+')')[_0x419e50(0x1a5)](',\x20');return{'resolved':[],'error':'No\x20database\x20matching\x20\x22'+_0x147379+_0x419e50(0x197)+_0x3de984+_0x419e50(0x1a4)+_0x854628+_0x419e50(0x1ae)};}function a151_0x38ce(_0x5e0a85,_0x570a0e){_0x5e0a85=_0x5e0a85-0x18f;const _0xb9c3f6=a151_0xb9c3();let _0x38ce09=_0xb9c3f6[_0x5e0a85];return _0x38ce09;}export async function resolveOneDb(_0x21d9b8,_0x54d4f5){const _0x222a01=a151_0x38ce,{resolved:_0x40b40b,error:_0x50e339}=await resolveDb(_0x21d9b8,_0x54d4f5);if(_0x50e339)return{'db':null,'error':_0x50e339};if(_0x40b40b['length']===0x1)return{'db':_0x40b40b[0x0]};if(!_0x54d4f5){const _0x27e186=_0x40b40b['map'](_0x1b7e14=>_0x1b7e14[_0x222a01(0x19d)]+'\x20('+_0x1b7e14[_0x222a01(0x191)]+')')[_0x222a01(0x1a5)](',\x20');return{'db':null,'error':_0x222a01(0x192)+_0x27e186};}const _0x36b9fa=_0x40b40b[_0x222a01(0x1a1)](_0x2c0792=>_0x2c0792[_0x222a01(0x19d)]+'\x20('+_0x2c0792['dbId']+')')[_0x222a01(0x1a5)](',\x20');return{'db':null,'error':'\x22'+_0x54d4f5+_0x222a01(0x1a2)+_0x36b9fa+_0x222a01(0x18f)};}export async function getDbName(_0x2c1598,_0x296059){const _0x2d1fc5=a151_0x38ce,_0xaebaab=await listDatabases(_0x2c1598);return _0xaebaab[_0x2d1fc5(0x195)](_0x11237f=>_0x11237f[_0x2d1fc5(0x191)]===_0x296059)?.[_0x2d1fc5(0x19d)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2cc59f,_0x478ddd){const _0x1e0949=a152_0x4ffc,_0x171579=_0x2cc59f();while(!![]){try{const _0x4306de=-parseInt(_0x1e0949(0x181))/0x1+-parseInt(_0x1e0949(0x17c))/0x2+parseInt(_0x1e0949(0x177))/0x3+parseInt(_0x1e0949(0x182))/0x4+-parseInt(_0x1e0949(0x180))/0x5*(parseInt(_0x1e0949(0x179))/0x6)+parseInt(_0x1e0949(0x176))/0x7*(parseInt(_0x1e0949(0x17b))/0x8)+-parseInt(_0x1e0949(0x178))/0x9;if(_0x4306de===_0x478ddd)break;else _0x171579['push'](_0x171579['shift']());}catch(_0x4a1834){_0x171579['push'](_0x171579['shift']());}}}(a152_0x1548,0xabe06));import{constants}from'node:fs';import{access,mkdir}from'node:fs/promises';function a152_0x4ffc(_0x22f386,_0x1b5a4f){_0x22f386=_0x22f386-0x175;const _0x154894=a152_0x1548();let _0x4ffc88=_0x154894[_0x22f386];return _0x4ffc88;}import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0x2b6f5d,_0x2b56cc=process['cwd']()){const _0x31af1e=a152_0x4ffc,_0x3385cc=resolve(_0x2b56cc),_0x572fa9=join(_0x3385cc,_0x31af1e(0x17d),_0x31af1e(0x17f));return{'projectRoot':_0x3385cc,'pagesBaseDir':_0x572fa9,'appPagesDir':join(_0x572fa9,_0x2b6f5d),'lockFilePath':join(_0x3385cc,_0x31af1e(0x17d),_0x31af1e(0x17a))};}export function buildPageFileName(_0xe431d9,_0x27f114){const _0x41e445=a152_0x4ffc;return _0xe431d9+'-'+String(_0x27f114)[_0x41e445(0x175)]()+'.json';}export function resolvePageFilePath(_0x4dae2c,_0x1ddb6e,_0x3fd3e5){const _0x468603=a152_0x4ffc;return join(_0x4dae2c[_0x468603(0x183)],buildPageFileName(_0x1ddb6e,_0x3fd3e5));}export async function ensureParentDirectory(_0x56bbf0){await mkdir(dirname(_0x56bbf0),{'recursive':!![]});}export async function fileExists(_0x1bac1a){const _0x54350f=a152_0x4ffc;try{return await access(_0x1bac1a,constants[_0x54350f(0x17e)]),!![];}catch{return![];}}function a152_0x1548(){const _0x4bddd3=['332406yzUUpZ','page.lock.json','71032SmrmWT','2163200fdPFrI','.rabetbase','F_OK','page','5rNAjdo','1291882KBUfMu','2746544LKnWmD','appPagesDir','toUpperCase','854oLTcUv','4193559KZXyia','313542cGdQBE'];a152_0x1548=function(){return _0x4bddd3;};return a152_0x1548();}
|
package/lib/core/page/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a153_0x89e1(){const _0x180042=['createHash','1850824ohGodo','940158QGVzlB','7022190GelpWX','4cjxWIg','2094778HWCkaq','md5','digest','utf8','18371673IsOrLN','parse','4803185RIvkJk','8ZIEKda','hex','255627jenfbi','10zSrGVF','update'];a153_0x89e1=function(){return _0x180042;};return a153_0x89e1();}(function(_0x55bce7,_0x4c34dc){const _0x2b54ea=a153_0x23aa,_0x1343d7=_0x55bce7();while(!![]){try{const _0x42145f=parseInt(_0x2b54ea(0xb9))/0x1+parseInt(_0x2b54ea(0xbd))/0x2+-parseInt(_0x2b54ea(0xbe))/0x3+-parseInt(_0x2b54ea(0xc0))/0x4*(-parseInt(_0x2b54ea(0xb6))/0x5)+parseInt(_0x2b54ea(0xbf))/0x6+-parseInt(_0x2b54ea(0xb0))/0x7*(parseInt(_0x2b54ea(0xb7))/0x8)+parseInt(_0x2b54ea(0xb4))/0x9*(-parseInt(_0x2b54ea(0xba))/0xa);if(_0x42145f===_0x4c34dc)break;else _0x1343d7['push'](_0x1343d7['shift']());}catch(_0x45ee06){_0x1343d7['push'](_0x1343d7['shift']());}}}(a153_0x89e1,0xa0ab8));import a153_0x29f242 from'node:crypto';function a153_0x23aa(_0x38873a,_0x1ba157){_0x38873a=_0x38873a-0xb0;const _0x89e185=a153_0x89e1();let _0x23aad3=_0x89e185[_0x38873a];return _0x23aad3;}import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x4c8dc6){const _0x2182b6=a153_0x23aa;return JSON['stringify'](JSON[_0x2182b6(0xb5)](_0x4c8dc6),null,0x2)+'\x0a';}export function computePageContentHash(_0x32a8db){const _0x5cee59=a153_0x23aa;return a153_0x29f242[_0x5cee59(0xbc)](_0x5cee59(0xb1))[_0x5cee59(0xbb)](_0x32a8db)[_0x5cee59(0xb2)](_0x5cee59(0xb8));}export function computeSerializedSchemaHash(_0x5d4e70){return computePageContentHash(serializePageSchemaForFile(_0x5d4e70));}export async function computePageFileHash(_0x5e9b4b){const _0x3efa85=a153_0x23aa,_0x50e1a9=await readFile(_0x5e9b4b,_0x3efa85(0xb3));return computePageContentHash(_0x50e1a9);}
|
package/lib/core/page/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5dff05,_0x58410b){const _0x2cf588=a154_0x5e37,_0x299f3b=_0x5dff05();while(!![]){try{const _0x467b67=-parseInt(_0x2cf588(0x87))/0x1*(-parseInt(_0x2cf588(0x88))/0x2)+-parseInt(_0x2cf588(0x84))/0x3*(parseInt(_0x2cf588(0x81))/0x4)+parseInt(_0x2cf588(0x80))/0x5+-parseInt(_0x2cf588(0x8c))/0x6*(-parseInt(_0x2cf588(0x85))/0x7)+parseInt(_0x2cf588(0x7b))/0x8*(-parseInt(_0x2cf588(0x89))/0x9)+-parseInt(_0x2cf588(0x8e))/0xa*(-parseInt(_0x2cf588(0x86))/0xb)+parseInt(_0x2cf588(0x7c))/0xc*(-parseInt(_0x2cf588(0x82))/0xd);if(_0x467b67===_0x58410b)break;else _0x299f3b['push'](_0x299f3b['shift']());}catch(_0x5692df){_0x299f3b['push'](_0x299f3b['shift']());}}}(a154_0x1305,0x8fe7a));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x29479d,_0x216e52){const _0x27d82b=a154_0x5e37,_0x5b709e={'apps':_0x29479d[_0x27d82b(0x7d)]&&typeof _0x29479d[_0x27d82b(0x7d)]===_0x27d82b(0x7e)?_0x29479d['apps']:{}};let _0x1bd147=_0x5b709e[_0x27d82b(0x7d)][_0x216e52];if(!_0x1bd147)return _0x1bd147={'lastSync':'','pages':{}},_0x5b709e['apps'][_0x216e52]=_0x1bd147,{'lockData':_0x5b709e,'appLock':_0x1bd147};return!_0x1bd147[_0x27d82b(0x8b)]&&(_0x1bd147['lastSync']=''),(!_0x1bd147['pages']||typeof _0x1bd147[_0x27d82b(0x79)]!==_0x27d82b(0x7e))&&(_0x1bd147['pages']={}),{'lockData':_0x5b709e,'appLock':_0x1bd147};}function a154_0x1305(){const _0x1ce341=['8NBQKhm','211748KYBfsN','9JbeGRi','code','lastSync','2203698LeOUaS','ENOENT','329590sfexFQ','stringify','pages','parse','1471088dVHihR','439044QolNks','apps','object','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','180340YBuJkm','812gfeHja','533ECtlHM','utf8','2973QpWEID','14APyQtE','286lvBPUB'];a154_0x1305=function(){return _0x1ce341;};return a154_0x1305();}function a154_0x5e37(_0x4a4051,_0x523560){_0x4a4051=_0x4a4051-0x79;const _0x1305eb=a154_0x1305();let _0x5e37dc=_0x1305eb[_0x4a4051];return _0x5e37dc;}export async function readPageLockFile(_0x5ab710){const _0x2b5056=a154_0x5e37;try{const _0x40cddd=await readFile(_0x5ab710,'utf8'),_0x7c01eb=JSON[_0x2b5056(0x7a)](_0x40cddd);return{'apps':_0x7c01eb['apps']&&typeof _0x7c01eb[_0x2b5056(0x7d)]===_0x2b5056(0x7e)?_0x7c01eb['apps']:{}};}catch(_0x642e47){if(_0x642e47[_0x2b5056(0x8a)]===_0x2b5056(0x8d))return null;throw new Error(_0x2b5056(0x7f)+String(_0x642e47));}}export async function writePageLockFile(_0x51f990,_0xc77c66){const _0x248da0=a154_0x5e37;await mkdir(dirname(_0x51f990),{'recursive':!![]}),await writeFile(_0x51f990,JSON[_0x248da0(0x8f)](_0xc77c66,null,0x2),_0x248da0(0x83));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a156_0x181f(_0x43a86d,_0x86ef7e){_0x43a86d=_0x43a86d-0x13a;const _0x3e38f6=a156_0x3e38();let _0x181f94=_0x3e38f6[_0x43a86d];return _0x181f94;}const a156_0x183328=a156_0x181f;(function(_0x415e30,_0x2c1aa3){const _0xa4c047=a156_0x181f,_0x16918a=_0x415e30();while(!![]){try{const _0x784b12=parseInt(_0xa4c047(0x13b))/0x1*(-parseInt(_0xa4c047(0x145))/0x2)+parseInt(_0xa4c047(0x142))/0x3*(parseInt(_0xa4c047(0x13e))/0x4)+-parseInt(_0xa4c047(0x13c))/0x5+-parseInt(_0xa4c047(0x141))/0x6+-parseInt(_0xa4c047(0x146))/0x7*(parseInt(_0xa4c047(0x140))/0x8)+parseInt(_0xa4c047(0x13f))/0x9+parseInt(_0xa4c047(0x143))/0xa;if(_0x784b12===_0x2c1aa3)break;else _0x16918a['push'](_0x16918a['shift']());}catch(_0x9b8f79){_0x16918a['push'](_0x16918a['shift']());}}}(a156_0x3e38,0xa8696));import{resolve}from'node:path';function a156_0x3e38(){const _0x36e8bf=['3ejljla','16262490znNtEx','.rabetbase','2TQQzbV','35YHBRnp','/sql','sql','sql.lock.json','708886pZgaXk','1638320XXCOOE','sql-trash','584044JxRwzl','8242758aBwpTs','190024DRNdnd','5057958SeQNTF'];a156_0x3e38=function(){return _0x36e8bf;};return a156_0x3e38();}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a156_0x183328(0x144),LOCK_FILE_NAME=a156_0x183328(0x13a),TRASH_DIR_NAME=a156_0x183328(0x13d);export function loadSqlProjectConfig(_0x150c58,_0x134f86){const _0x1e14f2=a156_0x183328,_0x2c6ed3=resolve(_0x134f86??findProjectRootDirectory()),_0x4e73d2=DOT_DIR+_0x1e14f2(0x147),_0xa92a9e=_0x4e73d2+'/'+_0x150c58;return{'projectRoot':_0x2c6ed3,'appCode':_0x150c58,'sqlWorkspaceRoot':_0x4e73d2,'sqlRoot':_0xa92a9e,'sqlRootDir':resolve(_0x2c6ed3,DOT_DIR,_0x1e14f2(0x148),_0x150c58),'lockFilePath':resolve(_0x2c6ed3,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x2c6ed3,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5e5d92,_0x3ddb9f){const _0x51f5ef=a157_0x11ea,_0xb99477=_0x5e5d92();while(!![]){try{const _0x23450b=-parseInt(_0x51f5ef(0x1c3))/0x1*(parseInt(_0x51f5ef(0x1cd))/0x2)+parseInt(_0x51f5ef(0x1db))/0x3*(-parseInt(_0x51f5ef(0x1d5))/0x4)+-parseInt(_0x51f5ef(0x1d3))/0x5+parseInt(_0x51f5ef(0x1d0))/0x6+-parseInt(_0x51f5ef(0x1d4))/0x7+-parseInt(_0x51f5ef(0x1c6))/0x8*(parseInt(_0x51f5ef(0x1e0))/0x9)+parseInt(_0x51f5ef(0x1de))/0xa;if(_0x23450b===_0x3ddb9f)break;else _0xb99477['push'](_0xb99477['shift']());}catch(_0x7468a4){_0xb99477['push'](_0xb99477['shift']());}}}(a157_0x4687,0x9f90b));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x25dd3d){const _0x53de12=a157_0x11ea;if(_0x25dd3d==='.sql')return _0x53de12(0x1ca);if(_0x25dd3d==='.xml')return _0x53de12(0x1dc);return undefined;}async function scanSqlFilesRecursively(_0x483d40,_0x38ecb8){const _0x41ce65=a157_0x11ea,_0x11ca20=[];try{const _0x1d9975=await readdir(_0x483d40,{'withFileTypes':!![]});for(const _0x2f5d79 of _0x1d9975){const _0x4f1912=join(_0x483d40,_0x2f5d79[_0x41ce65(0x1c5)]);if(_0x2f5d79[_0x41ce65(0x1c4)]()){_0x11ca20[_0x41ce65(0x1d7)](...await scanSqlFilesRecursively(_0x4f1912,_0x38ecb8));continue;}if(!_0x2f5d79['isFile']())continue;const _0x1c92be=extname(_0x2f5d79[_0x41ce65(0x1c5)])[_0x41ce65(0x1ce)](),_0x569fb8=extensionToMode(_0x1c92be);if(!_0x569fb8)continue;const _0x3f7294=relative(_0x38ecb8,_0x4f1912)[_0x41ce65(0x1dd)](/\\/g,'/'),_0x1882c6=_0x3f7294[_0x41ce65(0x1cb)]('/')['filter'](Boolean),_0x767e86=parseSqlPath(_0x1882c6,_0x2f5d79[_0x41ce65(0x1c5)],_0x1c92be);if(!_0x767e86)continue;_0x11ca20[_0x41ce65(0x1d7)]({'sqlCode':_0x767e86[_0x41ce65(0x1df)],'sqlName':_0x767e86[_0x41ce65(0x1d8)],'dbDirectory':_0x1882c6[0x0],'filePath':_0x4f1912,'relativePath':_0x3f7294,'lockKey':_0x767e86[_0x41ce65(0x1df)],'mode':_0x569fb8});}}catch(_0x1640d5){if(_0x1640d5[_0x41ce65(0x1da)]!=='ENOENT')throw _0x1640d5;}return _0x11ca20;}export async function scanLocalSqlQueries(_0x124542){const _0x5181f2=a157_0x11ea;return scanSqlFilesRecursively(_0x124542[_0x5181f2(0x1cf)],_0x124542[_0x5181f2(0x1cf)]);}function a157_0x4687(){const _0x3155b2=['dbId','code','341433HiXDjk','mybatisXml','replace','43951280SABLum','sqlCode','36HeaUUy','24511rPjiAj','isDirectory','name','2591392CMeGXN','slice','test','mode','sql','split','indexOf','18YgnZHm','toLowerCase','sqlRootDir','553002uZOpRC','length','dbName','4695020rpTfQr','8852242QLMtGg','4dWdBJL','path','push','sqlName'];a157_0x4687=function(){return _0x3155b2;};return a157_0x4687();}export function resolveLocalSqlFilePath(_0x470b0a,_0x560dce,_0x33f800){const _0x4ecbd3=a157_0x11ea,_0x49fb6b=_0x33f800?.[_0x4ecbd3(0x1d6)]||(_0x33f800?.[_0x4ecbd3(0x1d8)]||_0x33f800?.[_0x4ecbd3(0x1d2)]?buildSqlRelativePath(_0x560dce,_0x33f800?.[_0x4ecbd3(0x1d8)],_0x33f800?.[_0x4ecbd3(0x1d2)],_0x33f800?.['mode']||'sql',_0x33f800?.[_0x4ecbd3(0x1d9)]):buildDefaultSqlFileName(_0x560dce,_0x33f800?.[_0x4ecbd3(0x1c9)]||'sql'));return join(_0x470b0a[_0x4ecbd3(0x1cf)],_0x49fb6b);}function a157_0x11ea(_0x54637f,_0xa0d07e){_0x54637f=_0x54637f-0x1c3;const _0x468722=a157_0x4687();let _0x11ea43=_0x468722[_0x54637f];return _0x11ea43;}export async function directoryExists(_0x13dbc6){const _0x3bfd32=a157_0x11ea;try{const _0x247f83=await stat(_0x13dbc6);return _0x247f83[_0x3bfd32(0x1c4)]();}catch{return![];}}function parseSqlPath(_0x45fb63,_0x38bb0c,_0x4bfa74){const _0x3532e5=a157_0x11ea,_0x31eeb3=_0x38bb0c['slice'](0x0,-_0x4bfa74[_0x3532e5(0x1d1)]);if(_0x45fb63[_0x3532e5(0x1d1)]<0x2)return null;const _0x39275b=_0x31eeb3[_0x3532e5(0x1cc)]('_');if(_0x39275b<=0x0||_0x39275b>=_0x31eeb3[_0x3532e5(0x1d1)]-0x1)return null;const _0x28b3da=_0x31eeb3[_0x3532e5(0x1c7)](0x0,_0x39275b);if(!isLikelySqlCode(_0x28b3da))return null;return{'sqlCode':_0x28b3da,'sqlName':_0x31eeb3['slice'](_0x39275b+0x1)};}function isLikelySqlCode(_0x19121e){const _0x2a418c=a157_0x11ea;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x2a418c(0x1c8)](_0x19121e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a158_0xdc25(){const _0x4b3889=['945434nEuCCQ','hex','384834gsfVhI','md5','1833166XYhTFK','64bvJVbd','23522970oMAMfe','9YysMGv','digest','3977928vtSsGi','update','25nEAOvn','154772pQfcmF','3049545HlHBaO'];a158_0xdc25=function(){return _0x4b3889;};return a158_0xdc25();}function a158_0x1f8a(_0x1466e3,_0x706d84){_0x1466e3=_0x1466e3-0x178;const _0xdc256c=a158_0xdc25();let _0x1f8a2a=_0xdc256c[_0x1466e3];return _0x1f8a2a;}(function(_0x3588c4,_0x227f83){const _0x2fa78e=a158_0x1f8a,_0x553163=_0x3588c4();while(!![]){try{const _0x26da09=parseInt(_0x2fa78e(0x185))/0x1+parseInt(_0x2fa78e(0x179))/0x2+parseInt(_0x2fa78e(0x182))/0x3+parseInt(_0x2fa78e(0x181))/0x4*(parseInt(_0x2fa78e(0x180))/0x5)+-parseInt(_0x2fa78e(0x17e))/0x6+-parseInt(_0x2fa78e(0x183))/0x7*(-parseInt(_0x2fa78e(0x17a))/0x8)+-parseInt(_0x2fa78e(0x17c))/0x9*(parseInt(_0x2fa78e(0x17b))/0xa);if(_0x26da09===_0x227f83)break;else _0x553163['push'](_0x553163['shift']());}catch(_0x9f30b1){_0x553163['push'](_0x553163['shift']());}}}(a158_0xdc25,0x8cc60));import{readFile}from'node:fs/promises';import a158_0x26ed6a from'node:crypto';export function computeSqlContentHash(_0x471e42){const _0xf9cb42=a158_0x1f8a;return a158_0x26ed6a['createHash'](_0xf9cb42(0x178))[_0xf9cb42(0x17f)](_0x471e42)[_0xf9cb42(0x17d)](_0xf9cb42(0x184));}export async function computeSqlFileHash(_0x10dbd9){const _0x1e769f=await readFile(_0x10dbd9,'utf8');return computeSqlContentHash(_0x1e769f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2c4375,_0x3132bf){const _0x483648=a159_0x3557,_0x48cfa2=_0x2c4375();while(!![]){try{const _0x569281=-parseInt(_0x483648(0xfc))/0x1*(parseInt(_0x483648(0xeb))/0x2)+-parseInt(_0x483648(0xea))/0x3*(parseInt(_0x483648(0xfd))/0x4)+parseInt(_0x483648(0xf7))/0x5*(-parseInt(_0x483648(0xec))/0x6)+parseInt(_0x483648(0xf9))/0x7*(-parseInt(_0x483648(0xf5))/0x8)+parseInt(_0x483648(0xf4))/0x9*(-parseInt(_0x483648(0xf3))/0xa)+parseInt(_0x483648(0xee))/0xb+parseInt(_0x483648(0xf0))/0xc*(parseInt(_0x483648(0xe9))/0xd);if(_0x569281===_0x3132bf)break;else _0x48cfa2['push'](_0x48cfa2['shift']());}catch(_0x48ff2b){_0x48cfa2['push'](_0x48cfa2['shift']());}}}(a159_0x69c0,0x1d420));import{mkdir,readFile,writeFile}from'node:fs/promises';function a159_0x3557(_0x4a8f8d,_0x3a1e89){_0x4a8f8d=_0x4a8f8d-0xe9;const _0x69c041=a159_0x69c0();let _0x3557fb=_0x69c041[_0x4a8f8d];return _0x3557fb;}import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}function a159_0x69c0(){const _0x867cd9=['1558018bQTSjM','stringify','12aYYKkV','lastSync','sqls','9300GlNEAI','180oSwgOa','104HJpkun','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','20495QymZiM','apps','125419ibRBxs','sqlRoot','code','38543fjoHMg','94444Kouuzi','utf8','ENOENT','\x22\x20vs\x20lock\x20\x22','4881617gQiyvb','3pNcqpB','4gSTxuq','66UHKUiW','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.'];a159_0x69c0=function(){return _0x867cd9;};return a159_0x69c0();}export function ensureSqlLockScope(_0x2fd6bd,_0x141220,_0xaba654,_0x4530b4){const _0x5a0d2e=a159_0x3557,_0x762ced=_0x2fd6bd??createEmptySqlLock();let _0xcf156c=_0x762ced[_0x5a0d2e(0xf8)][_0x141220];if(!_0xcf156c)return _0xcf156c={'sqlRoot':_0xaba654,'lastSync':'','sqls':{}},_0x762ced[_0x5a0d2e(0xf8)][_0x141220]=_0xcf156c,{'lockData':_0x762ced,'appLock':_0xcf156c};if(!_0xcf156c[_0x5a0d2e(0xfa)])_0xcf156c[_0x5a0d2e(0xfa)]=_0xaba654;else{if(_0xcf156c[_0x5a0d2e(0xfa)]!==_0xaba654)throw new Error(_0x4530b4+':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22'+_0xaba654+_0x5a0d2e(0x100)+_0xcf156c[_0x5a0d2e(0xfa)]+'\x22.\x20'+_0x5a0d2e(0xed));}return!_0xcf156c[_0x5a0d2e(0xf2)]&&(_0xcf156c[_0x5a0d2e(0xf2)]={}),!_0xcf156c['lastSync']&&(_0xcf156c[_0x5a0d2e(0xf1)]=''),{'lockData':_0x762ced,'appLock':_0xcf156c};}export async function readSqlLockFile(_0x230f4c){const _0x14068c=a159_0x3557;try{const _0x2d538a=await readFile(_0x230f4c,_0x14068c(0xfe));return JSON['parse'](_0x2d538a);}catch(_0x4096c7){if(_0x4096c7[_0x14068c(0xfb)]===_0x14068c(0xff))return null;throw new Error(_0x14068c(0xf6)+String(_0x4096c7));}}export async function writeSqlLockFile(_0x5009a6,_0x2d234){const _0x6a86e3=a159_0x3557;await mkdir(dirname(_0x5009a6),{'recursive':!![]}),await writeFile(_0x5009a6,JSON[_0x6a86e3(0xef)](_0x2d234,null,0x2),_0x6a86e3(0xfe));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x45530a,_0xa8793c){const _0x547d1c=a161_0x53a9,_0x699fab=_0x45530a();while(!![]){try{const _0x3cc72e=-parseInt(_0x547d1c(0xc6))/0x1+-parseInt(_0x547d1c(0xc7))/0x2+-parseInt(_0x547d1c(0xc2))/0x3*(parseInt(_0x547d1c(0xc5))/0x4)+parseInt(_0x547d1c(0xcb))/0x5+-parseInt(_0x547d1c(0xc8))/0x6+-parseInt(_0x547d1c(0xc3))/0x7*(parseInt(_0x547d1c(0xce))/0x8)+parseInt(_0x547d1c(0xd0))/0x9;if(_0x3cc72e===_0xa8793c)break;else _0x699fab['push'](_0x699fab['shift']());}catch(_0x215eab){_0x699fab['push'](_0x699fab['shift']());}}}(a161_0x829a,0x2b61c));function a161_0x829a(){const _0x170501=['replace','test','867200fPpCBX','trimStart','trim','8zGRRVS','unknown-db','7037307OUEFic','.sql','627zzMqvf','96488VbqnNn','db-','5116ugYIdN','122652MkGknY','339206vddhtp','1225926qUaZOL'];a161_0x829a=function(){return _0x170501;};return a161_0x829a();}export function detectSqlMode(_0x580ce7){const _0x3c3d33=a161_0x53a9,_0x59c15d=_0x580ce7[_0x3c3d33(0xcc)]();if(/^<(select|insert|update|delete)\b/i[_0x3c3d33(0xca)](_0x59c15d))return'mybatisXml';return'sql';}export function getSqlFileExtension(_0x35b048){const _0x1d1308=a161_0x53a9;return _0x35b048==='mybatisXml'?'.xml':_0x1d1308(0xd1);}export function buildDefaultSqlFileName(_0x1b727d,_0x16e510){return''+_0x1b727d+getSqlFileExtension(_0x16e510);}export function sanitizeSqlPathSegment(_0x2b2a03,_0x3a8618){const _0x3684da=a161_0x53a9,_0x2edf90=String(_0x2b2a03??'')[_0x3684da(0xcd)](),_0x252155=_0x2edf90['replace'](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x3684da(0xc9)](/\s+/g,'-')[_0x3684da(0xc9)](/-+/g,'-')[_0x3684da(0xc9)](/^\.+/,'')[_0x3684da(0xc9)](/\.+$/,'')[_0x3684da(0xc9)](/^-+/,'')['replace'](/-+$/,'');return _0x252155||_0x3a8618;}function a161_0x53a9(_0x47bad3,_0x1cc563){_0x47bad3=_0x47bad3-0xc2;const _0x829a34=a161_0x829a();let _0x53a993=_0x829a34[_0x47bad3];return _0x53a993;}export function buildDbDirectoryName(_0x47a3d8,_0x4bd9ce){const _0x33f153=a161_0x53a9;return sanitizeSqlPathSegment(_0x47a3d8,_0x4bd9ce!=null?_0x33f153(0xc4)+_0x4bd9ce:_0x33f153(0xcf));}export function buildSqlRelativePath(_0x367057,_0x252bf9,_0x361d31,_0xfa1f78,_0x1033dd){const _0x46e5ef=buildDbDirectoryName(_0x361d31,_0x1033dd),_0x76d3ea=sanitizeSqlPathSegment(_0x367057,'unknown-sql'),_0x2d3467=sanitizeSqlPathSegment(_0x252bf9,_0x76d3ea);return _0x46e5ef+'/'+_0x76d3ea+'_'+_0x2d3467+getSqlFileExtension(_0xfa1f78);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a162_0x5dda(_0x41b5e3,_0x660c93){_0x41b5e3=_0x41b5e3-0x9b;const _0x3cf6e6=a162_0x3cf6();let _0x5dda13=_0x3cf6e6[_0x41b5e3];return _0x5dda13;}function a162_0x3cf6(){const _0x4cb7ed=['\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','reason','isDangerous','matchAll','24906iEnMQp','join','type','1571427VUisHR','match','550nBuuPh','replace','1521vNfZbl','143150CezrPq','UPDATE','add','878oAHNKZ','startsWith','60oPgFHE','SQL\x20content\x20is\x20empty','SELECT','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','length','4076941cJPWUX','test','includes','push','1504TFIxIf','5076728cIlrhS','DDL','INSERT','876xfXnyQ','trim','WITH','split','36DzLsmt'];a162_0x3cf6=function(){return _0x4cb7ed;};return a162_0x3cf6();}(function(_0x1c2cd6,_0x25894b){const _0x302553=a162_0x5dda,_0x4a13dd=_0x1c2cd6();while(!![]){try{const _0x448c0c=parseInt(_0x302553(0x9f))/0x1*(-parseInt(_0x302553(0xb7))/0x2)+parseInt(_0x302553(0xaf))/0x3+parseInt(_0x302553(0xb9))/0x4*(parseInt(_0x302553(0xb4))/0x5)+parseInt(_0x302553(0xa3))/0x6*(parseInt(_0x302553(0xac))/0x7)+parseInt(_0x302553(0xa0))/0x8+parseInt(_0x302553(0xb3))/0x9*(parseInt(_0x302553(0xb1))/0xa)+parseInt(_0x302553(0x9b))/0xb*(-parseInt(_0x302553(0xa7))/0xc);if(_0x448c0c===_0x25894b)break;else _0x4a13dd['push'](_0x4a13dd['shift']());}catch(_0x9a3914){_0x4a13dd['push'](_0x4a13dd['shift']());}}}(a162_0x3cf6,0x54190));export function detectSqlType(_0x8ff19c){const _0x44a8a6=a162_0x5dda;if(!_0x8ff19c?.[_0x44a8a6(0xa4)]())return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![],'reason':_0x44a8a6(0xba)};const _0x57ad5=_0x8ff19c[_0x44a8a6(0xb2)](/#\{[^}]*\}/g,'?')[_0x44a8a6(0xb2)](/\$\{[^}]*\}/g,'?')['replace'](/@[^(\s]+(\([^)]*\))?/g,'')[_0x44a8a6(0xb2)](/\/\*[\s\S]*?\*\//g,'')[_0x44a8a6(0xa4)](),_0x57ab64=_0x57ad5[_0x44a8a6(0xa6)]('\x0a');let _0x584698='';for(const _0x5d4d87 of _0x57ab64){const _0x5c8fa2=_0x5d4d87['trim']();if(!_0x5c8fa2||_0x5c8fa2['startsWith']('--')||_0x5c8fa2[_0x44a8a6(0xb8)]('/*'))continue;_0x584698=_0x5c8fa2;break;}const _0x2b1c34=_0x584698['toUpperCase']();if(_0x2b1c34[_0x44a8a6(0xb8)]('SELECT')||_0x2b1c34['startsWith'](_0x44a8a6(0xa5))){const _0x29d8ad=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x44a8a6(0x9c)](_0x57ad5);return{'type':_0x44a8a6(0xbb),'isSelectOnly':!_0x29d8ad,'isDangerous':_0x29d8ad,'reason':_0x29d8ad?'SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT':undefined};}if(_0x2b1c34[_0x44a8a6(0xb8)](_0x44a8a6(0xa2)))return{'type':_0x44a8a6(0xa2),'isSelectOnly':![],'isDangerous':![]};if(_0x2b1c34[_0x44a8a6(0xb8)](_0x44a8a6(0xb5)))return{'type':_0x44a8a6(0xb5),'isSelectOnly':![],'isDangerous':![]};if(_0x2b1c34['startsWith']('DELETE'))return{'type':'DELETE','isSelectOnly':![],'isDangerous':!![],'reason':'DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save'};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x44a8a6(0x9c)](_0x2b1c34))return{'type':_0x44a8a6(0xa1),'isSelectOnly':![],'isDangerous':!![],'reason':_0x44a8a6(0xbc)};return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![]};}function extractTables(_0x1d02d1){const _0xe9f330=a162_0x5dda,_0x4b5619=_0x1d02d1[_0xe9f330(0xb2)](/#\{[^}]*\}/g,'?')[_0xe9f330(0xb2)](/\$\{[^}]*\}/g,'?')[_0xe9f330(0xb2)](/'[^']*'/g,'\x27\x27')[_0xe9f330(0xb2)](/--.*$/gm,'')[_0xe9f330(0xb2)](/\/\*[\s\S]*?\*\//g,''),_0x1d1389=[],_0xfda84d=_0x4b5619[_0xe9f330(0xb0)](/FROM\s+([^\s,)(]+)/i);if(_0xfda84d?.[0x1])_0x1d1389['push'](_0xfda84d[0x1][_0xe9f330(0xb2)](/[`"]/g,''));for(const _0xeb11cd of _0x4b5619[_0xe9f330(0xab)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){const _0x660d37=_0xeb11cd[0x1]?.[_0xe9f330(0xb2)](/[`"]/g,'');if(_0x660d37&&!_0x1d1389[_0xe9f330(0x9d)](_0x660d37))_0x1d1389[_0xe9f330(0x9e)](_0x660d37);}const _0x1f1242=_0x4b5619[_0xe9f330(0xb0)](/INTO\s+([^\s(]+)/i);if(_0x1f1242?.[0x1]){const _0x3baf7b=_0x1f1242[0x1][_0xe9f330(0xb2)](/[`"]/g,'');if(!_0x1d1389[_0xe9f330(0x9d)](_0x3baf7b))_0x1d1389['push'](_0x3baf7b);}const _0x4f0351=_0x4b5619[_0xe9f330(0xb0)](/UPDATE\s+([^\s,)(]+)/i);if(_0x4f0351?.[0x1]){const _0x45142c=_0x4f0351[0x1][_0xe9f330(0xb2)](/[`"]/g,'');if(!_0x1d1389[_0xe9f330(0x9d)](_0x45142c))_0x1d1389['push'](_0x45142c);}return _0x1d1389;}function extractParameters(_0x30bf78){const _0x2e7309=a162_0x5dda,_0x5d4b77=new Set();for(const _0x4505b2 of _0x30bf78[_0x2e7309(0xab)](/#\{(\w+)\}/g))if(_0x4505b2[0x1])_0x5d4b77[_0x2e7309(0xb6)](_0x4505b2[0x1]);for(const _0x4f3d2d of _0x30bf78[_0x2e7309(0xab)](/\$\{(\w+)\}/g))if(_0x4f3d2d[0x1])_0x5d4b77['add'](_0x4f3d2d[0x1]);return Array['from'](_0x5d4b77);}export function validateSql(_0x3bc5d9){const _0x56e3d5=a162_0x5dda,_0x4072f6=detectSqlType(_0x3bc5d9),_0x2743fa=extractTables(_0x3bc5d9),_0x388438=extractParameters(_0x3bc5d9);if(_0x4072f6[_0x56e3d5(0xaa)])return{'valid':![],'sqlType':_0x4072f6,'tables':_0x2743fa,'parameters':_0x388438,'message':_0x4072f6[_0x56e3d5(0xa9)]||_0x4072f6[_0x56e3d5(0xae)]+_0x56e3d5(0xa8)};if(_0x4072f6[_0x56e3d5(0xae)]==='UNKNOWN')return{'valid':![],'sqlType':_0x4072f6,'tables':_0x2743fa,'parameters':_0x388438,'message':_0x56e3d5(0xbd)};return{'valid':!![],'sqlType':_0x4072f6,'tables':_0x2743fa,'parameters':_0x388438,'message':_0x4072f6[_0x56e3d5(0xae)]+'\x20query\x20targeting\x20'+(_0x2743fa[_0x56e3d5(0xbe)]?_0x2743fa['join'](',\x20'):'unknown\x20table(s)')+(_0x388438[_0x56e3d5(0xbe)]?'\x20with\x20parameters:\x20'+_0x388438[_0x56e3d5(0xad)](',\x20'):'')};}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a163_0xbb04(_0x3c3435,_0x18ff25){_0x3c3435=_0x3c3435-0xde;const _0x2c33a5=a163_0x2c33();let _0xbb04e8=_0x2c33a5[_0x3c3435];return _0xbb04e8;}function a163_0x2c33(){const _0xf49575=['2999862QweXUw','572860sSndOS','1874245uYsfyR','Tip:\x20`','1927701DWORcV','Run\x20`','3hwXGxA','Set\x20appcode\x20via\x20`','2207611pPCKgQ','394056KpupIy','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','join','659328janxfZ','4bBudvE'];a163_0x2c33=function(){return _0xf49575;};return a163_0x2c33();}const a163_0xcac258=a163_0xbb04;(function(_0x17607a,_0x4e4287){const _0x1de48f=a163_0xbb04,_0xc9d3a=_0x17607a();while(!![]){try{const _0x11685d=parseInt(_0x1de48f(0xe6))/0x1+-parseInt(_0x1de48f(0xde))/0x2*(-parseInt(_0x1de48f(0xe3))/0x3)+-parseInt(_0x1de48f(0xea))/0x4*(parseInt(_0x1de48f(0xdf))/0x5)+-parseInt(_0x1de48f(0xeb))/0x6+parseInt(_0x1de48f(0xe5))/0x7+-parseInt(_0x1de48f(0xe9))/0x8+parseInt(_0x1de48f(0xe1))/0x9;if(_0x11685d===_0x4e4287)break;else _0xc9d3a['push'](_0xc9d3a['shift']());}catch(_0x425a3e){_0xc9d3a['push'](_0xc9d3a['shift']());}}}(a163_0x2c33,0x3db86));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':a163_0xcac258(0xe2)+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.','configMissingHint':[a163_0xcac258(0xe4)+CLI_BIN_NAME+a163_0xcac258(0xe7),a163_0xcac258(0xe0)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.'][a163_0xcac258(0xe8)]('\x0a\x20\x20\x20\x20\x20\x20\x20'),'notInProjectHint':'Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.'});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x40524a,_0x316377){var _0x3e14ac=a164_0x5198,_0x5488cd=_0x40524a();while(!![]){try{var _0x2ff293=parseInt(_0x3e14ac(0x11d))/0x1*(-parseInt(_0x3e14ac(0x120))/0x2)+-parseInt(_0x3e14ac(0x11f))/0x3+parseInt(_0x3e14ac(0x125))/0x4*(-parseInt(_0x3e14ac(0x124))/0x5)+parseInt(_0x3e14ac(0x122))/0x6*(-parseInt(_0x3e14ac(0x123))/0x7)+parseInt(_0x3e14ac(0x11e))/0x8+-parseInt(_0x3e14ac(0x121))/0x9+parseInt(_0x3e14ac(0x11c))/0xa;if(_0x2ff293===_0x316377)break;else _0x5488cd['push'](_0x5488cd['shift']());}catch(_0x4c5f96){_0x5488cd['push'](_0x5488cd['shift']());}}}(a164_0x3ccc,0x30f0e));function a164_0x3ccc(){var _0x397ab2=['3129616GsfjMd','577065TDoeod','87426MDMfpt','1744974MFioqX','15636XLCGkR','329qYrIbJ','40IpQnZL','138884nOcvbg','8580290zwvVQt','6CMbgAv'];a164_0x3ccc=function(){return _0x397ab2;};return a164_0x3ccc();}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a164_0x4d8552}from'@lovrabet/cli-framework';function a164_0x5198(_0xe90af8,_0x37ea14){_0xe90af8=_0xe90af8-0x11c;var _0x3ccc5c=a164_0x3ccc();var _0x51983a=_0x3ccc5c[_0xe90af8];return _0x51983a;}export function buildAllFlags(_0x4c48e6){return a164_0x4d8552(_0x4c48e6,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x19bd93=a165_0x27a8;(function(_0x6b886e,_0x32422e){const _0x1b6086=a165_0x27a8,_0x497b9c=_0x6b886e();while(!![]){try{const _0x496944=parseInt(_0x1b6086(0x9e))/0x1*(parseInt(_0x1b6086(0x9f))/0x2)+-parseInt(_0x1b6086(0xa4))/0x3+-parseInt(_0x1b6086(0xa5))/0x4+-parseInt(_0x1b6086(0x9d))/0x5+parseInt(_0x1b6086(0xa0))/0x6+-parseInt(_0x1b6086(0xa2))/0x7*(parseInt(_0x1b6086(0xa1))/0x8)+parseInt(_0x1b6086(0xa3))/0x9;if(_0x496944===_0x32422e)break;else _0x497b9c['push'](_0x497b9c['shift']());}catch(_0x596bf6){_0x497b9c['push'](_0x497b9c['shift']());}}}(a165_0x5e95,0xe58c8));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);function a165_0x5e95(){const _0xf08c6f=['22942845wtWZhs','3645147NIlDjk','2333576wljFPv','parseFlags','validateFlags','7739080RLJDUj','550QIckHs','4138QhzCVC','6915774vgJplN','113496nyfEik','273HVBRvk'];a165_0x5e95=function(){return _0xf08c6f;};return a165_0x5e95();}function a165_0x27a8(_0x3440ca,_0x2f4d0b){_0x3440ca=_0x3440ca-0x9d;const _0x5e950f=a165_0x5e95();let _0x27a8f8=_0x5e950f[_0x3440ca];return _0x27a8f8;}export const parseFlags=helpers[a165_0x19bd93(0xa6)];export const validateFlags=helpers[a165_0x19bd93(0xa7)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a166_0x5ce981=a166_0x4aeb;(function(_0x1f5821,_0x3de171){const _0x4bf30f=a166_0x4aeb,_0x1e08f2=_0x1f5821();while(!![]){try{const _0x5ca70c=-parseInt(_0x4bf30f(0x135))/0x1*(-parseInt(_0x4bf30f(0x13c))/0x2)+parseInt(_0x4bf30f(0x139))/0x3+parseInt(_0x4bf30f(0x137))/0x4+parseInt(_0x4bf30f(0x13b))/0x5+-parseInt(_0x4bf30f(0x13f))/0x6*(-parseInt(_0x4bf30f(0x143))/0x7)+-parseInt(_0x4bf30f(0x13e))/0x8+parseInt(_0x4bf30f(0x142))/0x9*(-parseInt(_0x4bf30f(0x140))/0xa);if(_0x5ca70c===_0x3de171)break;else _0x1e08f2['push'](_0x1e08f2['shift']());}catch(_0x39aaa1){_0x1e08f2['push'](_0x1e08f2['shift']());}}}(a166_0x3f47,0x8c192));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';function a166_0x4aeb(_0x54f706,_0x486c38){_0x54f706=_0x54f706-0x135;const _0x3f47f7=a166_0x3f47();let _0x4aeb9a=_0x3f47f7[_0x54f706];return _0x4aeb9a;}import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';function a166_0x3f47(){const _0x7fd821=['223524NOFESN','generateFullHelp','4279020OcbaDf','593238bAbndW','\x20project\x20init`\x20or\x20--appcode).','7761624DRLmiE','24yFazCH','4206520kYvFse','Requires\x20appcode\x20(set\x20via\x20`','9yetVnG','287021YkDMVk','get','1TXuFIo','generateCommandHelp','2295016XJdueV','generateServiceHelp'];a166_0x3f47=function(){return _0x7fd821;};return a166_0x3f47();}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':_0x36ca03=>serviceGroups[a166_0x5ce981(0x144)](_0x36ca03),'buildAllFlags':buildAllFlags,'appPrerequisiteText':a166_0x5ce981(0x141)+CLI_BIN_NAME+a166_0x5ce981(0x13d),'serviceUsageSuffix':'\x20[args]\x20[flags]','includeWildcardExtraInFullHelp':!![]});export function generateCommandHelp(_0x1ad277){const _0x4f0598=a166_0x5ce981;return generators[_0x4f0598(0x136)](_0x1ad277);}export const generateServiceHelp=generators[a166_0x5ce981(0x138)];export const generateFullHelp=generators[a166_0x5ce981(0x13a)];
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a167_0x58e8(){var _0x13d2c4=['50TxvGqp','12596976mPcGkM','207768ZQXvxh','6744JfGYTb','4356dEpiRs','7370pmZFJX','1626YplLHf','21466iBFukD','9qeJZau','4efRNqW','1337028JUSyQl','82665PkDjbE'];a167_0x58e8=function(){return _0x13d2c4;};return a167_0x58e8();}(function(_0x28ee4c,_0x3ef94d){var _0x37cc19=a167_0x1cee,_0x185aed=_0x28ee4c();while(!![]){try{var _0x4e4636=-parseInt(_0x37cc19(0x1c9))/0x1*(-parseInt(_0x37cc19(0x1c8))/0x2)+-parseInt(_0x37cc19(0x1cf))/0x3*(-parseInt(_0x37cc19(0x1ca))/0x4)+parseInt(_0x37cc19(0x1c6))/0x5*(-parseInt(_0x37cc19(0x1c7))/0x6)+-parseInt(_0x37cc19(0x1cb))/0x7+-parseInt(_0x37cc19(0x1c4))/0x8*(parseInt(_0x37cc19(0x1c5))/0x9)+-parseInt(_0x37cc19(0x1cd))/0xa*(-parseInt(_0x37cc19(0x1cc))/0xb)+parseInt(_0x37cc19(0x1ce))/0xc;if(_0x4e4636===_0x3ef94d)break;else _0x185aed['push'](_0x185aed['shift']());}catch(_0x4bb957){_0x185aed['push'](_0x185aed['shift']());}}}(a167_0x58e8,0x3e2f2));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';function a167_0x1cee(_0x4e4878,_0x16c405){_0x4e4878=_0x4e4878-0x1c4;var _0x58e8f9=a167_0x58e8();var _0x1cee6d=_0x58e8f9[_0x4e4878];return _0x1cee6d;}export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';export{riskLevelOrder}from'../framework/types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x394722,_0x261114){const _0x166532=a168_0x29b9,_0x2349ac=_0x394722();while(!![]){try{const _0x128c49=parseInt(_0x166532(0x165))/0x1+parseInt(_0x166532(0x166))/0x2*(-parseInt(_0x166532(0x160))/0x3)+parseInt(_0x166532(0x164))/0x4*(-parseInt(_0x166532(0x167))/0x5)+parseInt(_0x166532(0x15f))/0x6*(-parseInt(_0x166532(0x16b))/0x7)+-parseInt(_0x166532(0x16e))/0x8+-parseInt(_0x166532(0x163))/0x9+parseInt(_0x166532(0x162))/0xa;if(_0x128c49===_0x261114)break;else _0x2349ac['push'](_0x2349ac['shift']());}catch(_0x375628){_0x2349ac['push'](_0x2349ac['shift']());}}}(a168_0x1843,0xef11c));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a168_0x29b9(_0x34098d,_0x48219c){_0x34098d=_0x34098d-0x15f;const _0x184325=a168_0x1843();let _0x29b91f=_0x184325[_0x34098d];return _0x29b91f;}const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});function a168_0x1843(){const _0x46f107=['format','pretty','14252608irrqMm','12BNuDPO','64467VqNeRA','message','72067990EmwMuC','8249787LcEOxy','4522060WGlrSr','760090gBOSKn','154TqJpkx','5aeNxpc','update','error','url','5264959QmpMpx'];a168_0x1843=function(){return _0x46f107;};return a168_0x1843();}export function formatOutput(_0x60e5b3,_0x6d85b6){const _0x3fdfd2=a168_0x29b9,_0xd31d3=_0x60e5b3['_notice'],{_notice:_0x4d7a4f,..._0x516c23}=_0x60e5b3;void _0x4d7a4f,baseFormatOutput(_0x516c23,_0x6d85b6),_0x6d85b6[_0x3fdfd2(0x16c)]===_0x3fdfd2(0x16d)&&printPrettyNotice(_0xd31d3);}function printPrettyNotice(_0x29655c){const _0x2e88da=a168_0x29b9;if(!_0x29655c?.[_0x2e88da(0x168)])return;console[_0x2e88da(0x169)](_0x29655c[_0x2e88da(0x168)][_0x2e88da(0x161)]+'\x20('+_0x29655c[_0x2e88da(0x168)][_0x2e88da(0x16a)]+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3fe187,_0x163e2d){var _0x4a0f3b=a169_0x3b16,_0x1ab3a4=_0x3fe187();while(!![]){try{var _0x52656f=parseInt(_0x4a0f3b(0xb8))/0x1*(parseInt(_0x4a0f3b(0xb3))/0x2)+parseInt(_0x4a0f3b(0xae))/0x3*(parseInt(_0x4a0f3b(0xb0))/0x4)+parseInt(_0x4a0f3b(0xb6))/0x5+parseInt(_0x4a0f3b(0xaf))/0x6+-parseInt(_0x4a0f3b(0xb2))/0x7+-parseInt(_0x4a0f3b(0xb1))/0x8*(-parseInt(_0x4a0f3b(0xb4))/0x9)+-parseInt(_0x4a0f3b(0xb5))/0xa*(parseInt(_0x4a0f3b(0xb7))/0xb);if(_0x52656f===_0x163e2d)break;else _0x1ab3a4['push'](_0x1ab3a4['shift']());}catch(_0x29bee9){_0x1ab3a4['push'](_0x1ab3a4['shift']());}}}(a169_0x560c,0xc45f9));export{extractList,extractPaging}from'@lovrabet/cli-framework';function a169_0x3b16(_0x45b50a,_0x420481){_0x45b50a=_0x45b50a-0xae;var _0x560c7d=a169_0x560c();var _0x3b16c4=_0x560c7d[_0x45b50a];return _0x3b16c4;}function a169_0x560c(){var _0x51ae8c=['16EJeRFT','3609NjtqZY','147270LfncmJ','88965HlJfsT','1881mJUIWi','134735ITfuma','3SNDESn','2683698rRubms','5451688tRzoZZ','20600dFNUAd','4310537ABZQQl'];a169_0x560c=function(){return _0x51ae8c;};return a169_0x560c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40de38,_0x423ada){const _0x555e0a=a170_0xdbf6,_0x3140a4=_0x40de38();while(!![]){try{const _0x586e88=-parseInt(_0x555e0a(0x1ad))/0x1*(parseInt(_0x555e0a(0x1af))/0x2)+-parseInt(_0x555e0a(0x1a8))/0x3*(parseInt(_0x555e0a(0x1b1))/0x4)+parseInt(_0x555e0a(0x1a1))/0x5*(-parseInt(_0x555e0a(0x1a9))/0x6)+parseInt(_0x555e0a(0x1a0))/0x7+parseInt(_0x555e0a(0x1a2))/0x8*(-parseInt(_0x555e0a(0x1a6))/0x9)+-parseInt(_0x555e0a(0x1b2))/0xa+parseInt(_0x555e0a(0x1a4))/0xb;if(_0x586e88===_0x423ada)break;else _0x3140a4['push'](_0x3140a4['shift']());}catch(_0x70f6e9){_0x3140a4['push'](_0x3140a4['shift']());}}}(a170_0x5139,0xb8c6f));import{CliErrors}from'../errors.js';function a170_0xdbf6(_0x30cefa,_0x444ede){_0x30cefa=_0x30cefa-0x198;const _0x5139be=a170_0x5139();let _0xdbf615=_0x5139be[_0x30cefa];return _0xdbf615;}import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a170_0x5139(){const _0x2a4785=['85bigWup','808sOmGEN','Unknown\x20alias\x20\x22','31356094ZcCVnb','`\x20requires\x20either\x20--code\x20or\x20--alias.','129501pwoFZU','length','3yLEZkL','70206uMiPJW','alias','some','type','550eYaJGY','map','964RQbcFD','.\x20Run\x20`','1404772HtoBiB','7216190yYFEvB','validation','\x20api\x20pull`\x20first.','No\x20api.ts\x20found\x20in\x20','name','code','flags','\x22.\x20','string','6274877GIisKL'];a170_0x5139=function(){return _0x2a4785;};return a170_0x5139();}export function resolveAliasToCode(_0x49ee1c,_0x337f54,_0x4a7ecd,_0x442568){const _0x1a8977=a170_0xdbf6,_0x1a67e9=_0x49ee1c[_0x1a8977(0x19d)][_0x1a8977(0x1ab)](_0x35f9c8=>_0x35f9c8[_0x1a8977(0x19b)]===_0x1a8977(0x19c)&&_0x35f9c8['type']===_0x1a8977(0x19f)),_0x24d532=_0x49ee1c[_0x1a8977(0x19d)]['some'](_0x2debc0=>_0x2debc0['name']==='alias'&&_0x2debc0[_0x1a8977(0x1ac)]===_0x1a8977(0x19f));if(!_0x1a67e9||!_0x24d532)return;const _0x16ed98=_0x337f54[_0x1a8977(0x19c)]?String(_0x337f54['code']):'',_0x3bc4c2=_0x337f54[_0x1a8977(0x1aa)]?String(_0x337f54['alias']):'';if(!_0x16ed98&&!_0x3bc4c2)throw CliErrors[_0x1a8977(0x198)]('`'+_0x442568+_0x1a8977(0x1a5));if(_0x3bc4c2&&!_0x16ed98){const _0x5e2e5c=resolveAlias(_0x4a7ecd,_0x3bc4c2);if(!_0x5e2e5c){const _0x5ed804=listAliases(_0x4a7ecd)[_0x1a8977(0x1ae)](_0x1a6da2=>_0x1a6da2[_0x1a8977(0x1aa)]),_0x4bbcdc=_0x5ed804[_0x1a8977(0x1a7)]?'Available\x20aliases:\x20'+_0x5ed804['join'](',\x20'):_0x1a8977(0x19a)+_0x4a7ecd+_0x1a8977(0x1b0)+CLI_BIN_NAME+_0x1a8977(0x199);throw CliErrors[_0x1a8977(0x198)](_0x1a8977(0x1a3)+_0x3bc4c2+_0x1a8977(0x19e)+_0x4bbcdc);}_0x337f54[_0x1a8977(0x19c)]=_0x5e2e5c;}}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a171_0x466771=a171_0xb06b;(function(_0x4ad59c,_0x3436df){const _0x4ec621=a171_0xb06b,_0x1b7f46=_0x4ad59c();while(!![]){try{const _0x278797=-parseInt(_0x4ec621(0x1e7))/0x1+parseInt(_0x4ec621(0x1d6))/0x2*(parseInt(_0x4ec621(0x1c1))/0x3)+parseInt(_0x4ec621(0x1c0))/0x4+parseInt(_0x4ec621(0x1e1))/0x5+parseInt(_0x4ec621(0x1e3))/0x6+-parseInt(_0x4ec621(0x1db))/0x7*(-parseInt(_0x4ec621(0x1d1))/0x8)+-parseInt(_0x4ec621(0x1c8))/0x9;if(_0x278797===_0x3436df)break;else _0x1b7f46['push'](_0x1b7f46['shift']());}catch(_0x3c2211){_0x1b7f46['push'](_0x1b7f46['shift']());}}}(a171_0x3e1f,0x1a916));function a171_0xb06b(_0x7ded93,_0xd7a85a){_0x7ded93=_0x7ded93-0x1be;const _0x3e1f5f=a171_0x3e1f();let _0xb06b1a=_0x3e1f5f[_0x7ded93];return _0xb06b1a;}import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{DEFAULT_API_DIR}from'../constant/paths.js';function a171_0x3e1f(){const _0x29243e=['name','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','riskLevel','3153348IVnwMa','format','nonInteractive','map','configMissing','../core/api-client.js','catch','selectedAppName','⚠\x20\x20High-risk\x20operation:\x20','132328IJvXZB','Set\x20appcode\x20via\x20`','validation','defaultPageSize','doctor','68zxWRsx','update','defaultVerbose','_notice','pageSize','49TivUmX','resolveApiDomain','execute','explicitAppName','resolveCookie','verbose','995760RahLNG','service','609390NHEiNQ','appcode','isNonInteractive','appCode','140851WdoyUM','schema','pretty','object','defaultApp','cancelled','High-risk\x20operation\x20`','requiresAppCode','filter','mergedCli','39612ZqXlet','15321xgvAlV','command','authRequired'];a171_0x3e1f=function(){return _0x29243e;};return a171_0x3e1f();}import{isNonInteractive as a171_0x9a7825}from'../utils/is-non-interactive.js';import{resolveAliasToCode}from'../framework/runner-alias.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';export function createPipelineEnv(_0x177b4e,_0x4890a5,_0x287986=[]){const _0x2e0d23=a171_0xb06b;return{'rawFlags':_0x4890a5,'args':_0x287986,'resolveAppCode':()=>_0x177b4e[_0x2e0d23(0x1e6)]||_0x4890a5[_0x2e0d23(0x1e4)]||process.env.RABETBASE_APPCODE||process.env.LOVRABET_APPCODE||undefined,'resolveCookie':()=>_0x177b4e['cookie']||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a171_0x9a7825(_0x4890a5),'defaultFormat':_0x177b4e[_0x2e0d23(0x1c9)],'defaultPageSize':_0x177b4e[_0x2e0d23(0x1da)],'defaultVerbose':_0x177b4e[_0x2e0d23(0x1e0)],'apiDir':_0x177b4e['apiDir'],'riskLevel':_0x177b4e[_0x2e0d23(0x1c7)],'selectedAppName':_0x177b4e[_0x2e0d23(0x1de)],'mergedCli':{'defaultApp':_0x177b4e[_0x2e0d23(0x1eb)],'currentApp':_0x177b4e['currentApp'],'appCode':_0x177b4e[_0x2e0d23(0x1e6)],'apps':_0x177b4e['apps']}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a171_0x466771(0x1be)](_0x1cba31=>PIPELINE_FLAG_NAMES['has'](_0x1cba31[a171_0x466771(0x1c4)]))[a171_0x466771(0x1cb)](({name:_0x4c5aff,type:_0x2efd63,description:_0x5b9043})=>({'name':_0x4c5aff,'type':_0x2efd63,'description':_0x5b9043})),'formatOutput':formatOutput,'getCommandLabel'(_0x1761f3){const _0x3216f0=a171_0x466771;return CLI_BIN_NAME+'\x20'+_0x1761f3[_0x3216f0(0x1e2)]+'\x20'+_0x1761f3[_0x3216f0(0x1c2)];},'riskPolicy':{'skipWhenDryRun':!![],'createError'(_0x10cbd8){const _0xae881c=a171_0x466771;return CliErrors[_0xae881c(0x1d3)](_0x10cbd8);}},async 'prepare'(_0x480233,_0x50e0f6,_0x11d77e,_0x2c7c4a){const _0x40d3bd=a171_0x466771,_0x27336b=_0x50e0f6['apiDir']||DEFAULT_API_DIR;resolveAliasToCode(_0x480233,_0x11d77e,_0x27336b,_0x2c7c4a);let _0x27f3a1='';if(_0x480233['requiresAuth']!==![]){_0x27f3a1=_0x50e0f6[_0x40d3bd(0x1df)]();if(!_0x27f3a1)throw CliErrors[_0x40d3bd(0x1c3)]();const {setActiveCookie:_0x3b2c8e}=await import(_0x40d3bd(0x1cd));_0x3b2c8e(_0x27f3a1);}const _0x244db4=_0x50e0f6['resolveAppCode']()??'';if(_0x480233[_0x40d3bd(0x1ee)]!==![]){if(!_0x244db4)throw CliErrors[_0x40d3bd(0x1cc)](_0x40d3bd(0x1d2)+CLI_BIN_NAME+_0x40d3bd(0x1c5));}return{'defaults':{'booleans':{'verbose':_0x50e0f6[_0x40d3bd(0x1d8)]},'numbers':{'pagesize':_0x50e0f6[_0x40d3bd(0x1d4)]}},'extras':{'appCode':_0x244db4,'cookie':_0x27f3a1,'apiDomain':_0x50e0f6[_0x40d3bd(0x1dc)](),'apiDir':_0x27336b,'selectedAppName':_0x50e0f6[_0x40d3bd(0x1cf)],'mergedCli':_0x50e0f6[_0x40d3bd(0x1bf)]}};},async 'confirmHighRisk'({env:_0x5ec7fe,commandLabel:_0x5c9bf4}){const _0x426546=a171_0x466771;if(_0x5ec7fe[_0x426546(0x1e5)])throw CliErrors['validation'](_0x426546(0x1ed)+_0x5c9bf4+_0x426546(0x1c6));await requireConfirmationPrompt({'lines':[_0x426546(0x1d0)+_0x5c9bf4,'\x20\x20\x20Continue?\x20[y/N]\x20'],'createCancelledError':_0x302da6=>CliErrors[_0x426546(0x1ec)](_0x302da6)});},async 'finalize'(){const _0x4cd2b2=a171_0x466771,{clearActiveCookie:_0x3a394f}=await import(_0x4cd2b2(0x1cd));_0x3a394f();}};export async function runCommand(_0x29b586,_0x555cfc){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x29b586)?withUpdateNotice(_0x29b586):_0x29b586,_0x555cfc,runnerAdapter);}function shouldAttachUpdateNotice(_0x400561){const _0x35fa9b=a171_0x466771;return![_0x35fa9b(0x1d7),_0x35fa9b(0x1e8),_0x35fa9b(0x1d5)]['includes'](_0x400561[_0x35fa9b(0x1e2)]);}function withUpdateNotice(_0x43e4af){return{..._0x43e4af,async 'execute'(_0x3dccd4){const _0x2e66c5=a171_0xb06b,_0x299a53=shouldResolveUpdateNotice(_0x3dccd4)?resolveLatestUpdateNotice()[_0x2e66c5(0x1ce)](()=>null):Promise['resolve'](null),_0x205f13=await _0x43e4af[_0x2e66c5(0x1dd)](_0x3dccd4);return attachUpdateNotice(_0x205f13,await _0x299a53);}};}function shouldResolveUpdateNotice(_0x2c07d1){const _0x445222=a171_0x466771;return _0x2c07d1['format']===_0x445222(0x1e9)&&!_0x2c07d1[_0x445222(0x1ca)];}function attachUpdateNotice(_0x7543d0,_0x18a095){const _0x23f260=a171_0x466771;if(!_0x18a095||!_0x7543d0||typeof _0x7543d0!==_0x23f260(0x1ea))return _0x7543d0;const _0x4dd37f=_0x7543d0,_0x4e4182=typeof _0x4dd37f['_notice']===_0x23f260(0x1ea)&&_0x4dd37f[_0x23f260(0x1d9)]!==null?_0x4dd37f[_0x23f260(0x1d9)]:{};return{..._0x4dd37f,'_notice':{..._0x4e4182,'update':_0x18a095}};}
|