@lovrabet/rabetbase-cli 2.2.4-beta.4 → 2.2.4-beta.6
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 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/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/list.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/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/commands/workspace/index.js +1 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -0
- package/lib/context/auth-resolver.js +1 -0
- package/lib/context/config-loader.js +1 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a151_0x4f40(_0x43ab69,_0xc4944f){_0x43ab69=_0x43ab69-0x152;const _0x4f214d=a151_0x4f21();let _0x4f40ed=_0x4f214d[_0x43ab69];return _0x4f40ed;}const a151_0x52e12d=a151_0x4f40;(function(_0x341c0f,_0x53931a){const _0x1dc4a3=a151_0x4f40,_0x57d3d9=_0x341c0f();while(!![]){try{const _0x54a450=parseInt(_0x1dc4a3(0x154))/0x1+-parseInt(_0x1dc4a3(0x15f))/0x2+-parseInt(_0x1dc4a3(0x164))/0x3*(parseInt(_0x1dc4a3(0x165))/0x4)+parseInt(_0x1dc4a3(0x175))/0x5+parseInt(_0x1dc4a3(0x153))/0x6*(parseInt(_0x1dc4a3(0x16a))/0x7)+-parseInt(_0x1dc4a3(0x160))/0x8+-parseInt(_0x1dc4a3(0x15a))/0x9;if(_0x54a450===_0x53931a)break;else _0x57d3d9['push'](_0x57d3d9['shift']());}catch(_0x1fea71){_0x57d3d9['push'](_0x57d3d9['shift']());}}}(a151_0x4f21,0x348f3));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';export const SUPPORTED_BFF_TYPES=[a151_0x52e12d(0x166),a151_0x52e12d(0x178),a151_0x52e12d(0x16c)];export function normalizeBffType(_0x22e0a7){const _0x28215f=a151_0x52e12d;if(!_0x22e0a7)return undefined;const _0x591681=_0x22e0a7['trim']()[_0x28215f(0x15d)]();return SUPPORTED_BFF_TYPES[_0x28215f(0x16f)](_0x591681)?_0x591681:undefined;}async function scanJsFilesRecursively(_0x40899a,_0x4e9270){const _0x1d7165=a151_0x52e12d,_0x298f75=[];try{const _0x4994e3=await readdir(_0x40899a,{'withFileTypes':!![]});for(const _0x5b6e7b of _0x4994e3){const _0x170758=join(_0x40899a,_0x5b6e7b[_0x1d7165(0x171)]);if(_0x5b6e7b[_0x1d7165(0x168)]())_0x298f75[_0x1d7165(0x16b)](...await scanJsFilesRecursively(_0x170758,_0x4e9270+'/'+_0x5b6e7b[_0x1d7165(0x171)]));else _0x5b6e7b[_0x1d7165(0x16e)]()&&_0x5b6e7b[_0x1d7165(0x171)][_0x1d7165(0x170)](_0x1d7165(0x158))&&_0x298f75[_0x1d7165(0x16b)]({'lockKey':_0x4e9270+'/'+_0x5b6e7b[_0x1d7165(0x171)][_0x1d7165(0x169)](/\.js$/,''),'filePath':_0x170758});}}catch(_0x3fbb74){if(_0x3fbb74['code']!==_0x1d7165(0x173))throw _0x3fbb74;}return _0x298f75;}async function scanFlatFunctions(_0x8eec72,_0x41ffa5){const _0x235eea=a151_0x52e12d,_0x30017a=join(_0x8eec72[_0x235eea(0x163)],_0x41ffa5),_0x24944a=await scanJsFilesRecursively(_0x30017a,_0x41ffa5);return _0x24944a[_0x235eea(0x162)](({lockKey:_0x24ce14,filePath:_0x2b6aa6})=>({'type':_0x41ffa5,'name':_0x24ce14[_0x235eea(0x161)]('/')['at'](-0x1)??'','filePath':_0x2b6aa6,'lockKey':_0x24ce14}));}async function scanHookFunctions(_0x16b3db){const _0x5ab587=a151_0x52e12d,_0x409b89=join(_0x16b3db[_0x5ab587(0x163)],'HOOK'),_0x378b8c=[];try{const _0x381ebc=await readdir(_0x409b89,{'withFileTypes':!![]});for(const _0x5ccd1d of _0x381ebc){if(!_0x5ccd1d[_0x5ab587(0x168)]())continue;const _0x467218=_0x5ccd1d['name'],_0x221213=join(_0x409b89,_0x467218),_0x5dabaa=await readdir(_0x221213,{'withFileTypes':!![]});for(const _0x16555c of _0x5dabaa){if(!_0x16555c['isDirectory']())continue;const _0x3fc7f0=_0x16555c[_0x5ab587(0x171)],_0xf285c9=join(_0x221213,_0x3fc7f0),_0x58cdf2=await readdir(_0xf285c9,{'withFileTypes':!![]});for(const _0x430014 of _0x58cdf2){if(!_0x430014[_0x5ab587(0x168)]())continue;const _0x4f986d=_0x430014[_0x5ab587(0x171)],_0x34960b=join(_0xf285c9,_0x4f986d),_0x1966fc=await readdir(_0x34960b,{'withFileTypes':!![]});for(const _0x490d29 of _0x1966fc){if(!_0x490d29[_0x5ab587(0x16e)]()||!_0x490d29[_0x5ab587(0x171)][_0x5ab587(0x170)](_0x5ab587(0x158)))continue;const _0x23bc3c=_0x490d29[_0x5ab587(0x171)][_0x5ab587(0x169)](/\.js$/,'');_0x378b8c['push']({'type':'HOOK','name':_0x23bc3c,'filePath':join(_0x34960b,_0x490d29['name']),'lockKey':'HOOK/'+_0x467218+'/'+_0x3fc7f0+'/'+_0x4f986d+'/'+_0x23bc3c,'alias':_0x467218,'operationType':_0x3fc7f0,'functionNode':_0x4f986d});}}}}}catch(_0x10d12f){if(_0x10d12f[_0x5ab587(0x16d)]!=='ENOENT')throw _0x10d12f;}return _0x378b8c;}export async function scanLocalBffFunctions(_0x194333,_0x19272e){const _0x99de08=a151_0x52e12d;if(_0x19272e===_0x99de08(0x166)||_0x19272e===_0x99de08(0x178))return scanFlatFunctions(_0x194333,_0x19272e);if(_0x19272e===_0x99de08(0x16c))return scanHookFunctions(_0x194333);const [_0xcc4fe9,_0x3d7905,_0x26e735]=await Promise[_0x99de08(0x155)]([scanFlatFunctions(_0x194333,_0x99de08(0x166)),scanFlatFunctions(_0x194333,_0x99de08(0x178)),scanHookFunctions(_0x194333)]);return[..._0xcc4fe9,..._0x3d7905,..._0x26e735];}export function resolveLocalFilePathFromLockKey(_0x4e78c3,_0x260eb5){const _0x39115e=a151_0x52e12d;return join(_0x4e78c3[_0x39115e(0x163)],..._0x260eb5[_0x39115e(0x161)]('/'))+_0x39115e(0x158);}export function createHookLocationMap(_0x56e439){const _0x36c77e=a151_0x52e12d,_0x9b8891=new Map();for(const _0x55bb5c of _0x56e439){_0x55bb5c['beforeScriptId']&&_0x9b8891[_0x36c77e(0x157)](_0x55bb5c[_0x36c77e(0x15e)],{'datasetCode':_0x55bb5c[_0x36c77e(0x156)],'operationType':snakeToCamel(_0x55bb5c['operationType']),'functionNode':'before'}),_0x55bb5c[_0x36c77e(0x177)]&&_0x9b8891['set'](_0x55bb5c['afterScriptId'],{'datasetCode':_0x55bb5c['datasetCode'],'operationType':snakeToCamel(_0x55bb5c[_0x36c77e(0x172)]),'functionNode':_0x36c77e(0x15b)});}return _0x9b8891;}export function resolveRemoteScriptTarget(_0x11c766,_0x2e2567,_0x31c808,_0x2892c3,_0x3616f3){const _0x1595e6=a151_0x52e12d,_0x463233=normalizeBffType(_0x2e2567[_0x1595e6(0x159)]);if(!_0x463233||!_0x2e2567[_0x1595e6(0x174)])return null;if(_0x463233===_0x1595e6(0x16c)){const _0x257d06=(_0x2e2567['id']?_0x31c808[_0x1595e6(0x176)](_0x2e2567['id']):undefined)??findHookLocationByRemoteId(_0x2892c3,_0x2e2567['id']);if(!_0x257d06)return null;const _0x4718ae=_0x257d06[_0x1595e6(0x167)]||_0x3616f3[_0x1595e6(0x176)](_0x257d06[_0x1595e6(0x156)]),_0x226542=_0x4718ae??_0x257d06['datasetCode'],_0xab87f={..._0x257d06,'alias':_0x4718ae},_0x53cd17=_0x1595e6(0x15c)+_0x226542+'/'+_0xab87f[_0x1595e6(0x172)]+'/'+_0xab87f['functionNode']+'/'+_0x2e2567[_0x1595e6(0x174)];return{'lockKey':_0x53cd17,'filePath':resolveLocalFilePathFromLockKey(_0x11c766,_0x53cd17),'type':_0x1595e6(0x16c),'hookLocation':_0xab87f};}const _0x27cc5c=_0x463233+'/'+_0x2e2567[_0x1595e6(0x174)];return{'lockKey':_0x27cc5c,'filePath':resolveLocalFilePathFromLockKey(_0x11c766,_0x27cc5c),'type':_0x463233};}export async function ensureParentDirectory(_0x19caf5){await mkdir(dirname(_0x19caf5),{'recursive':!![]});}function a151_0x4f21(){const _0x34eb2e=['alias','isDirectory','replace','1329062XBISCR','push','HOOK','code','isFile','includes','endsWith','name','operationType','ENOENT','functionName','1851825XDgxbD','get','afterScriptId','ENDPOINT','F_OK','12IQsVUq','212248EVBbPI','all','datasetCode','set','.js','scriptType','1501578khmUVj','after','HOOK/','toUpperCase','beforeScriptId','430760SPHKoU','451936zikrEj','split','map','scriptsRootDir','942aSxOaN','3928iNYwkj','COMMON'];a151_0x4f21=function(){return _0x34eb2e;};return a151_0x4f21();}export async function fileExists(_0x486f8b){const _0x325332=a151_0x52e12d;try{return await access(_0x486f8b,constants[_0x325332(0x152)]),!![];}catch{return![];}}export async function directoryExists(_0x2fad1e){const _0x53781b=a151_0x52e12d;try{const _0x31eab4=await stat(_0x2fad1e);return _0x31eab4[_0x53781b(0x168)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5ec9d1,_0x1a62f4){const _0x4d6f27=a152_0x50c9,_0x7e8d84=_0x5ec9d1();while(!![]){try{const _0x5c1eec=-parseInt(_0x4d6f27(0x82))/0x1+parseInt(_0x4d6f27(0x71))/0x2*(-parseInt(_0x4d6f27(0x7c))/0x3)+-parseInt(_0x4d6f27(0x80))/0x4+parseInt(_0x4d6f27(0x81))/0x5*(parseInt(_0x4d6f27(0x76))/0x6)+parseInt(_0x4d6f27(0x78))/0x7*(parseInt(_0x4d6f27(0x79))/0x8)+parseInt(_0x4d6f27(0x77))/0x9*(-parseInt(_0x4d6f27(0x75))/0xa)+parseInt(_0x4d6f27(0x7f))/0xb*(parseInt(_0x4d6f27(0x73))/0xc);if(_0x5c1eec===_0x1a62f4)break;else _0x7e8d84['push'](_0x7e8d84['shift']());}catch(_0x1a8474){_0x7e8d84['push'](_0x7e8d84['shift']());}}}(a152_0x6f32,0x703b9));function a152_0x50c9(_0x5cbf4c,_0x433180){_0x5cbf4c=_0x5cbf4c-0x71;const _0x6f32eb=a152_0x6f32();let _0x50c990=_0x6f32eb[_0x5cbf4c];return _0x50c990;}import{readFile}from'node:fs/promises';import a152_0x642807 from'node:crypto';export function computeContentHash(_0xe78911){const _0x3bdcb2=a152_0x50c9;return a152_0x642807[_0x3bdcb2(0x7a)](_0x3bdcb2(0x7d))[_0x3bdcb2(0x72)](_0xe78911)[_0x3bdcb2(0x7e)](_0x3bdcb2(0x7b));}function a152_0x6f32(){const _0x721130=['md5','digest','55mDKNgx','3063272nHfFtl','10VBWVUD','490833kNKuJc','226684PhOZEO','update','2427276CHKKRS','utf8','7060ciNiGh','973506yHOpkX','3132cTGgNy','553gDjQBq','74888RlNteE','createHash','hex','3arauyE'];a152_0x6f32=function(){return _0x721130;};return a152_0x6f32();}export async function computeFileHash(_0x564d24){const _0x4ef44f=a152_0x50c9,_0x3a0ae1=await readFile(_0x564d24,_0x4ef44f(0x74));return computeContentHash(_0x3a0ae1);}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a153_0x23fa(){const _0x1410e3=['Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','5637191MGNpWU','6DVJqxY','code',':\x20scriptsRoot\x20mismatch\x20—\x20','parse','3489345ICADpP','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','lastSync','scriptsRoot','stringify','58285LzQAiD','8JcmzTr','1042253RPXaVB','1181799aSgdRJ','4GmZpLZ','84986gCzrnU','925346JXtjwt','current\x20\x22','2630HAcGrB','object','apps','ENOENT','utf8'];a153_0x23fa=function(){return _0x1410e3;};return a153_0x23fa();}(function(_0x1f72ef,_0x4666c8){const _0x3e5454=a153_0x3cb6,_0xed0eea=_0x1f72ef();while(!![]){try{const _0x540912=-parseInt(_0x3e5454(0x1c0))/0x1+-parseInt(_0x3e5454(0x1c4))/0x2+-parseInt(_0x3e5454(0x1c1))/0x3*(parseInt(_0x3e5454(0x1c2))/0x4)+parseInt(_0x3e5454(0x1be))/0x5*(-parseInt(_0x3e5454(0x1b5))/0x6)+-parseInt(_0x3e5454(0x1b4))/0x7*(-parseInt(_0x3e5454(0x1bf))/0x8)+-parseInt(_0x3e5454(0x1b9))/0x9+-parseInt(_0x3e5454(0x1c6))/0xa*(-parseInt(_0x3e5454(0x1c3))/0xb);if(_0x540912===_0x4666c8)break;else _0xed0eea['push'](_0xed0eea['shift']());}catch(_0x46f4fa){_0xed0eea['push'](_0xed0eea['shift']());}}}(a153_0x23fa,0x83996));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}function a153_0x3cb6(_0x41c3db,_0x26c5a0){_0x41c3db=_0x41c3db-0x1b0;const _0x23fadf=a153_0x23fa();let _0x3cb6aa=_0x23fadf[_0x41c3db];return _0x3cb6aa;}export function ensureLockScope(_0x5a55ec,_0x569645,_0x52de31,_0x1d79a6){const _0x52d71a=a153_0x3cb6,_0x5765d3={'apps':_0x5a55ec[_0x52d71a(0x1b0)]&&typeof _0x5a55ec[_0x52d71a(0x1b0)]==='object'?_0x5a55ec['apps']:{}};let _0x2fc369=_0x5765d3[_0x52d71a(0x1b0)][_0x569645];if(!_0x2fc369)return _0x2fc369={'scriptsRoot':_0x52de31,'lastSync':'','functions':{}},_0x5765d3[_0x52d71a(0x1b0)][_0x569645]=_0x2fc369,{'lockData':_0x5765d3,'appLock':_0x2fc369};if(!_0x2fc369[_0x52d71a(0x1bc)])_0x2fc369['scriptsRoot']=_0x52de31;else{if(_0x2fc369[_0x52d71a(0x1bc)]!==_0x52de31)throw new Error(_0x1d79a6+_0x52d71a(0x1b7)+(_0x52d71a(0x1c5)+_0x52de31+'\x22\x20vs\x20lock\x20\x22'+_0x2fc369[_0x52d71a(0x1bc)]+'\x22.\x20')+_0x52d71a(0x1b3));}return!_0x2fc369['functions']&&(_0x2fc369['functions']={}),!_0x2fc369['lastSync']&&(_0x2fc369[_0x52d71a(0x1bb)]=''),{'lockData':_0x5765d3,'appLock':_0x2fc369};}export async function readBffLockFile(_0x5dce30){const _0xf77823=a153_0x3cb6;try{const _0x15def1=await readFile(_0x5dce30,_0xf77823(0x1b2)),_0x3e71ee=JSON[_0xf77823(0x1b8)](_0x15def1);return{'apps':_0x3e71ee[_0xf77823(0x1b0)]&&typeof _0x3e71ee[_0xf77823(0x1b0)]===_0xf77823(0x1c7)?_0x3e71ee[_0xf77823(0x1b0)]:{}};}catch(_0x298e49){if(_0x298e49[_0xf77823(0x1b6)]===_0xf77823(0x1b1))return null;throw new Error(_0xf77823(0x1ba)+String(_0x298e49));}}export async function writeBffLockFile(_0xce129c,_0x27612e){const _0x122a83=a153_0x3cb6;await mkdir(dirname(_0xce129c),{'recursive':!![]}),await writeFile(_0xce129c,JSON[_0x122a83(0x1bd)](_0x27612e,null,0x2),'utf8');}
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a155_0x47d4(_0x4e8082,_0xaaec3){_0x4e8082=_0x4e8082-0x196;const _0x477302=a155_0x4773();let _0x47d4c6=_0x477302[_0x4e8082];return _0x47d4c6;}(function(_0x1f1834,_0x4cc592){const _0x15cac5=a155_0x47d4,_0x5414e8=_0x1f1834();while(!![]){try{const _0x268db7=-parseInt(_0x15cac5(0x1a8))/0x1+-parseInt(_0x15cac5(0x19d))/0x2+parseInt(_0x15cac5(0x19b))/0x3*(parseInt(_0x15cac5(0x1a5))/0x4)+parseInt(_0x15cac5(0x1a2))/0x5+parseInt(_0x15cac5(0x196))/0x6*(-parseInt(_0x15cac5(0x19a))/0x7)+-parseInt(_0x15cac5(0x1a6))/0x8+parseInt(_0x15cac5(0x199))/0x9*(parseInt(_0x15cac5(0x1a4))/0xa);if(_0x268db7===_0x4cc592)break;else _0x5414e8['push'](_0x5414e8['shift']());}catch(_0x4b26e4){_0x5414e8['push'](_0x5414e8['shift']());}}}(a155_0x4773,0x83671));export function snakeToCamel(_0x1021dc){const _0x6bb105=a155_0x47d4;return _0x1021dc[_0x6bb105(0x197)]()[_0x6bb105(0x1a1)](/_([a-z])/g,(_0x5a11fe,_0x90ba4d)=>_0x90ba4d[_0x6bb105(0x1a0)]());}export function findHookLocationByRemoteId(_0xac7221,_0x304ba1){const _0x230cd0=a155_0x47d4;if(!_0x304ba1)return undefined;for(const _0x57f7e0 of Object['values'](_0xac7221)){if(_0x57f7e0['remoteId']===_0x304ba1&&_0x57f7e0[_0x230cd0(0x1a9)]&&_0x57f7e0['operationType']&&_0x57f7e0['functionNode'])return{'datasetCode':_0x57f7e0[_0x230cd0(0x1a9)],'operationType':_0x57f7e0[_0x230cd0(0x1a3)],'functionNode':_0x57f7e0[_0x230cd0(0x198)]};}return undefined;}function a155_0x4773(){const _0x4105ae=['520596tQSfFk','2191CZQDzg','325425JxJGXt','before','1802556ZiiNJC','test','match','toUpperCase','replace','2739280ZHTytU','operationType','230mbXwbs','20elvelf','259616DoMhxS','trim','326757xpuxOk','datasetCode','11922bBbpWN','toLowerCase','functionNode'];a155_0x4773=function(){return _0x4105ae;};return a155_0x4773();}export function extractScriptDescription(_0x2a6668){const _0x8bc950=a155_0x47d4,_0x216a18=_0x2a6668[_0x8bc950(0x19f)](/\[\s*脚本描述\s*]\s*(.+)/);return _0x216a18?.[0x1]?.[_0x8bc950(0x1a7)]()||undefined;}export function isValidBffFunctionName(_0x24908d){const _0xc07bf7=a155_0x47d4;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0xc07bf7(0x19e)](_0x24908d);}export function normalizeHookFunctionNode(_0x6b13f){const _0x4e71fa=a155_0x47d4;if(!_0x6b13f)return undefined;const _0x126698=_0x6b13f['trim']()['toLowerCase']();if(_0x126698===_0x4e71fa(0x19c)||_0x126698==='after')return _0x126698;return undefined;}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a156_0x1f3e(){const _0x35b812=['dbName','dbId','7009555TcDobz','map','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','3577236UHBbjC','length','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','set','join','3336486LzayNv','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','entries','includes','isNaN','toLowerCase','1608908VKmDja','3935632dDgyZy','find','\x22.\x20Available:\x20','get','6259310KeWEsQ','1020304XDbAnh','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22'];a156_0x1f3e=function(){return _0x35b812;};return a156_0x1f3e();}(function(_0x177a8d,_0x4e46ed){const _0x6d86e=a156_0xab6d,_0x540940=_0x177a8d();while(!![]){try{const _0x23e941=parseInt(_0x6d86e(0x18a))/0x1+-parseInt(_0x6d86e(0x184))/0x2+parseInt(_0x6d86e(0x191))/0x3+-parseInt(_0x6d86e(0x185))/0x4+-parseInt(_0x6d86e(0x189))/0x5+parseInt(_0x6d86e(0x17e))/0x6+parseInt(_0x6d86e(0x18e))/0x7;if(_0x23e941===_0x4e46ed)break;else _0x540940['push'](_0x540940['shift']());}catch(_0x29d662){_0x540940['push'](_0x540940['shift']());}}}(a156_0x1f3e,0xb2352));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x16901f){const _0x35e6c1=a156_0xab6d;if(cache['has'](_0x16901f))return cache[_0x35e6c1(0x188)](_0x16901f);const _0x4c59c6=await listDatasets(_0x16901f),_0x4726db=new Map();for(const _0x257985 of _0x4c59c6){const _0x4056b2=_0x257985['dbtableConfig'];_0x4056b2?.[_0x35e6c1(0x18d)]!=null&&_0x4726db['set'](_0x4056b2[_0x35e6c1(0x18d)],_0x4056b2[_0x35e6c1(0x18c)]??'db-'+_0x4056b2[_0x35e6c1(0x18d)]);}const _0x23d606=[..._0x4726db[_0x35e6c1(0x180)]()]['map'](([_0x230fa4,_0x5a1ab2])=>({'dbId':_0x230fa4,'dbName':_0x5a1ab2}));return cache[_0x35e6c1(0x194)](_0x16901f,_0x23d606),_0x23d606;}export async function resolveDb(_0x2043dd,_0x9ba713){const _0x116c33=a156_0xab6d,_0x36cd51=await listDatabases(_0x2043dd);if(_0x36cd51[_0x116c33(0x192)]===0x0)return{'resolved':[],'error':_0x116c33(0x18b)+_0x2043dd+_0x116c33(0x17f)};if(!_0x9ba713)return{'resolved':_0x36cd51};const _0x3dd617=Number(_0x9ba713);if(!Number[_0x116c33(0x182)](_0x3dd617)){const _0x2ee7ce=_0x36cd51[_0x116c33(0x186)](_0x284b7e=>_0x284b7e[_0x116c33(0x18d)]===_0x3dd617);if(_0x2ee7ce)return{'resolved':[_0x2ee7ce]};}const _0x1579e6=_0x9ba713[_0x116c33(0x183)](),_0x46507c=_0x36cd51['filter'](_0x1f4d33=>_0x1f4d33[_0x116c33(0x18c)][_0x116c33(0x183)]()[_0x116c33(0x181)](_0x1579e6));if(_0x46507c[_0x116c33(0x192)]>0x0)return{'resolved':_0x46507c};const _0x25cf40=_0x36cd51[_0x116c33(0x18f)](_0x381827=>_0x381827['dbName']+'\x20('+_0x381827[_0x116c33(0x18d)]+')')[_0x116c33(0x17d)](',\x20');return{'resolved':[],'error':'No\x20database\x20matching\x20\x22'+_0x9ba713+'\x22\x20under\x20app\x20\x22'+_0x2043dd+_0x116c33(0x187)+_0x25cf40+_0x116c33(0x190)};}export async function resolveOneDb(_0x2092f5,_0x21b440){const _0x372d6c=a156_0xab6d,{resolved:_0x130051,error:_0x186181}=await resolveDb(_0x2092f5,_0x21b440);if(_0x186181)return{'db':null,'error':_0x186181};if(_0x130051[_0x372d6c(0x192)]===0x1)return{'db':_0x130051[0x0]};if(!_0x21b440){const _0x18e290=_0x130051[_0x372d6c(0x18f)](_0x43f1d4=>_0x43f1d4['dbName']+'\x20('+_0x43f1d4[_0x372d6c(0x18d)]+')')['join'](',\x20');return{'db':null,'error':_0x372d6c(0x193)+_0x18e290};}const _0x5d55ac=_0x130051[_0x372d6c(0x18f)](_0x50a21e=>_0x50a21e[_0x372d6c(0x18c)]+'\x20('+_0x50a21e[_0x372d6c(0x18d)]+')')[_0x372d6c(0x17d)](',\x20');return{'db':null,'error':'\x22'+_0x21b440+'\x22\x20matches\x20multiple\x20databases:\x20'+_0x5d55ac+'.\x20Be\x20more\x20specific.'};}function a156_0xab6d(_0x917ec7,_0x8f7ee0){_0x917ec7=_0x917ec7-0x17d;const _0x1f3ef5=a156_0x1f3e();let _0xab6ddc=_0x1f3ef5[_0x917ec7];return _0xab6ddc;}export async function getDbName(_0x208242,_0x42de2c){const _0x1c7250=a156_0xab6d,_0x325d0c=await listDatabases(_0x208242);return _0x325d0c[_0x1c7250(0x186)](_0x123a4c=>_0x123a4c[_0x1c7250(0x18d)]===_0x42de2c)?.[_0x1c7250(0x18c)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a157_0x37ad57=a157_0x53f7;(function(_0x5797ab,_0x280d74){const _0x2682cc=a157_0x53f7,_0x526250=_0x5797ab();while(!![]){try{const _0x3ffdbb=-parseInt(_0x2682cc(0x111))/0x1*(-parseInt(_0x2682cc(0x101))/0x2)+parseInt(_0x2682cc(0x104))/0x3*(parseInt(_0x2682cc(0x110))/0x4)+parseInt(_0x2682cc(0x10d))/0x5*(parseInt(_0x2682cc(0x10c))/0x6)+parseInt(_0x2682cc(0x109))/0x7*(parseInt(_0x2682cc(0x107))/0x8)+-parseInt(_0x2682cc(0x108))/0x9+-parseInt(_0x2682cc(0x10e))/0xa*(parseInt(_0x2682cc(0x105))/0xb)+parseInt(_0x2682cc(0x10b))/0xc*(-parseInt(_0x2682cc(0x106))/0xd);if(_0x3ffdbb===_0x280d74)break;else _0x526250['push'](_0x526250['shift']());}catch(_0x88b808){_0x526250['push'](_0x526250['shift']());}}}(a157_0x4858,0x92c2b));import{constants}from'node:fs';function a157_0x4858(){const _0x2ba7f5=['3489WJonma','2585IqTknS','25873627amYeQy','9446328ttcroq','6158025XCmFgo','7XVPhtY','.rabetbase','12LUkCgR','29286PajPSc','1175FUtZAA','15490NcfQiW','page','3392XLInLd','592luAitU','F_OK','cwd','1100ZobJIj','.json','toUpperCase'];a157_0x4858=function(){return _0x2ba7f5;};return a157_0x4858();}import{access,mkdir}from'node:fs/promises';function a157_0x53f7(_0x5d288f,_0x4fb184){_0x5d288f=_0x5d288f-0x101;const _0x485850=a157_0x4858();let _0x53f7b5=_0x485850[_0x5d288f];return _0x53f7b5;}import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0x33c0e9,_0x391e6e=process[a157_0x37ad57(0x113)]()){const _0x183662=a157_0x37ad57,_0x32b9f2=resolve(_0x391e6e),_0x44b1ec=join(_0x32b9f2,_0x183662(0x10a),_0x183662(0x10f));return{'projectRoot':_0x32b9f2,'pagesBaseDir':_0x44b1ec,'appPagesDir':join(_0x44b1ec,_0x33c0e9),'lockFilePath':join(_0x32b9f2,_0x183662(0x10a),'page.lock.json')};}export function buildPageFileName(_0x1675d3,_0x4c793e){const _0x356cd6=a157_0x37ad57;return _0x1675d3+'-'+String(_0x4c793e)[_0x356cd6(0x103)]()+_0x356cd6(0x102);}export function resolvePageFilePath(_0x254566,_0x52e555,_0x79436e){return join(_0x254566['appPagesDir'],buildPageFileName(_0x52e555,_0x79436e));}export async function ensureParentDirectory(_0x3b274){await mkdir(dirname(_0x3b274),{'recursive':!![]});}export async function fileExists(_0xe817c4){const _0x2b5ad0=a157_0x37ad57;try{return await access(_0xe817c4,constants[_0x2b5ad0(0x112)]),!![];}catch{return![];}}
|
package/lib/core/page/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1a0c28,_0x5c4361){const _0x5c76f9=a158_0x5d50,_0x193338=_0x1a0c28();while(!![]){try{const _0x5c0aad=parseInt(_0x5c76f9(0x1eb))/0x1+parseInt(_0x5c76f9(0x1e8))/0x2+-parseInt(_0x5c76f9(0x1ed))/0x3+parseInt(_0x5c76f9(0x1f0))/0x4+parseInt(_0x5c76f9(0x1f1))/0x5*(-parseInt(_0x5c76f9(0x1ee))/0x6)+parseInt(_0x5c76f9(0x1ec))/0x7+-parseInt(_0x5c76f9(0x1f3))/0x8*(parseInt(_0x5c76f9(0x1ea))/0x9);if(_0x5c0aad===_0x5c4361)break;else _0x193338['push'](_0x193338['shift']());}catch(_0xc66b5a){_0x193338['push'](_0x193338['shift']());}}}(a158_0x4ad1,0x97743));function a158_0x5d50(_0x555fc5,_0x1c162e){_0x555fc5=_0x555fc5-0x1e7;const _0x4ad12c=a158_0x4ad1();let _0x5d5061=_0x4ad12c[_0x555fc5];return _0x5d5061;}import a158_0x207960 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x1526a2){const _0x582bd7=a158_0x5d50;return JSON[_0x582bd7(0x1e7)](JSON['parse'](_0x1526a2),null,0x2)+'\x0a';}export function computePageContentHash(_0x374968){const _0x220318=a158_0x5d50;return a158_0x207960[_0x220318(0x1f2)](_0x220318(0x1ef))['update'](_0x374968)['digest']('hex');}export function computeSerializedSchemaHash(_0x554c20){return computePageContentHash(serializePageSchemaForFile(_0x554c20));}function a158_0x4ad1(){const _0x527379=['md5','3346644Jzzfvw','5MjCZUF','createHash','8UEFlPa','stringify','2391434WisLMd','utf8','8055576wVnJtO','519535BdlmSV','506933VBsKhW','2014167vhTHtU','2625144YeWDif'];a158_0x4ad1=function(){return _0x527379;};return a158_0x4ad1();}export async function computePageFileHash(_0x5020a3){const _0xb9d708=a158_0x5d50,_0x13d0c5=await readFile(_0x5020a3,_0xb9d708(0x1e9));return computePageContentHash(_0x13d0c5);}
|
package/lib/core/page/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4e8910,_0x27b075){const _0x53385d=a159_0x305c,_0x59cf34=_0x4e8910();while(!![]){try{const _0x5f0fc5=parseInt(_0x53385d(0x1a7))/0x1*(-parseInt(_0x53385d(0x1a9))/0x2)+parseInt(_0x53385d(0x1ac))/0x3*(parseInt(_0x53385d(0x1a4))/0x4)+-parseInt(_0x53385d(0x1b4))/0x5*(parseInt(_0x53385d(0x1aa))/0x6)+parseInt(_0x53385d(0x1b6))/0x7*(parseInt(_0x53385d(0x1b2))/0x8)+-parseInt(_0x53385d(0x1b5))/0x9+parseInt(_0x53385d(0x1b0))/0xa+-parseInt(_0x53385d(0x1af))/0xb*(parseInt(_0x53385d(0x1b3))/0xc);if(_0x5f0fc5===_0x27b075)break;else _0x59cf34['push'](_0x59cf34['shift']());}catch(_0x4a82b5){_0x59cf34['push'](_0x59cf34['shift']());}}}(a159_0x163b,0xd3831));import{mkdir,readFile,writeFile}from'node:fs/promises';function a159_0x305c(_0x3c88ec,_0x3bd799){_0x3c88ec=_0x3c88ec-0x1a3;const _0x163bcb=a159_0x163b();let _0x305c19=_0x163bcb[_0x3c88ec];return _0x305c19;}import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x3c6343,_0x56d5f2){const _0x376143=a159_0x305c,_0x144522={'apps':_0x3c6343['apps']&&typeof _0x3c6343[_0x376143(0x1ad)]===_0x376143(0x1b1)?_0x3c6343[_0x376143(0x1ad)]:{}};let _0x377c5d=_0x144522[_0x376143(0x1ad)][_0x56d5f2];if(!_0x377c5d)return _0x377c5d={'lastSync':'','pages':{}},_0x144522[_0x376143(0x1ad)][_0x56d5f2]=_0x377c5d,{'lockData':_0x144522,'appLock':_0x377c5d};return!_0x377c5d['lastSync']&&(_0x377c5d[_0x376143(0x1a3)]=''),(!_0x377c5d['pages']||typeof _0x377c5d[_0x376143(0x1a8)]!==_0x376143(0x1b1))&&(_0x377c5d['pages']={}),{'lockData':_0x144522,'appLock':_0x377c5d};}export async function readPageLockFile(_0x5cc187){const _0x31e2a6=a159_0x305c;try{const _0x28d4bd=await readFile(_0x5cc187,_0x31e2a6(0x1a6)),_0x108768=JSON[_0x31e2a6(0x1ab)](_0x28d4bd);return{'apps':_0x108768[_0x31e2a6(0x1ad)]&&typeof _0x108768[_0x31e2a6(0x1ad)]===_0x31e2a6(0x1b1)?_0x108768[_0x31e2a6(0x1ad)]:{}};}catch(_0x592127){if(_0x592127['code']===_0x31e2a6(0x1a5))return null;throw new Error('Failed\x20to\x20read\x20page\x20lock\x20file:\x20'+String(_0x592127));}}function a159_0x163b(){const _0x47a0e6=['16eUaOxa','pages','26252UsrsgB','6FntPSP','parse','9237JTwTEq','apps','stringify','3391311noJqTz','12060440iyjomF','object','59832rzFUjj','60KoqlDH','485795zKwcNf','13839687kltYII','1379sMNgSX','lastSync','2044rYjnSz','ENOENT','utf8'];a159_0x163b=function(){return _0x47a0e6;};return a159_0x163b();}export async function writePageLockFile(_0x29cd8f,_0x1d988d){const _0x522522=a159_0x305c;await mkdir(dirname(_0x29cd8f),{'recursive':!![]}),await writeFile(_0x29cd8f,JSON[_0x522522(0x1ae)](_0x1d988d,null,0x2),_0x522522(0x1a6));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a161_0x2559f5=a161_0x1f70;function a161_0x1f70(_0x375631,_0x2ee957){_0x375631=_0x375631-0xcb;const _0x1c9415=a161_0x1c94();let _0x1f7083=_0x1c9415[_0x375631];return _0x1f7083;}(function(_0x524f74,_0x2f29fa){const _0x11d43e=a161_0x1f70,_0x562c45=_0x524f74();while(!![]){try{const _0x57dc09=-parseInt(_0x11d43e(0xcf))/0x1+parseInt(_0x11d43e(0xd1))/0x2+parseInt(_0x11d43e(0xd2))/0x3+parseInt(_0x11d43e(0xcc))/0x4+-parseInt(_0x11d43e(0xcd))/0x5+-parseInt(_0x11d43e(0xd4))/0x6+-parseInt(_0x11d43e(0xd6))/0x7*(-parseInt(_0x11d43e(0xce))/0x8);if(_0x57dc09===_0x2f29fa)break;else _0x562c45['push'](_0x562c45['shift']());}catch(_0x22e273){_0x562c45['push'](_0x562c45['shift']());}}}(a161_0x1c94,0x86681));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a161_0x2559f5(0xd7),LOCK_FILE_NAME=a161_0x2559f5(0xd3),TRASH_DIR_NAME=a161_0x2559f5(0xcb);function a161_0x1c94(){const _0x2d9638=['/sql','1714592xLHGyn','1568097bXwdfF','sql.lock.json','6299124yXumsd','sql','4732kBjGwP','.rabetbase','sql-trash','3040000YJnGOL','1100530qHnTQK','2824tRpNsZ','558134HYbsxS'];a161_0x1c94=function(){return _0x2d9638;};return a161_0x1c94();}export function loadSqlProjectConfig(_0x47abc3,_0x579d41){const _0x209306=a161_0x2559f5,_0x248b38=resolve(_0x579d41??findProjectRootDirectory()),_0x515b8a=DOT_DIR+_0x209306(0xd0),_0x57a1ed=_0x515b8a+'/'+_0x47abc3;return{'projectRoot':_0x248b38,'appCode':_0x47abc3,'sqlWorkspaceRoot':_0x515b8a,'sqlRoot':_0x57a1ed,'sqlRootDir':resolve(_0x248b38,DOT_DIR,_0x209306(0xd5),_0x47abc3),'lockFilePath':resolve(_0x248b38,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x248b38,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x74caf3,_0x159d4f){const _0x27edae=a162_0x15e4,_0x2fca46=_0x74caf3();while(!![]){try{const _0xcaf86c=parseInt(_0x27edae(0x10d))/0x1+-parseInt(_0x27edae(0x124))/0x2+parseInt(_0x27edae(0x127))/0x3+-parseInt(_0x27edae(0x117))/0x4*(-parseInt(_0x27edae(0x115))/0x5)+-parseInt(_0x27edae(0x125))/0x6*(-parseInt(_0x27edae(0x128))/0x7)+-parseInt(_0x27edae(0x10f))/0x8+parseInt(_0x27edae(0x11a))/0x9*(-parseInt(_0x27edae(0x109))/0xa);if(_0xcaf86c===_0x159d4f)break;else _0x2fca46['push'](_0x2fca46['shift']());}catch(_0x69ddfd){_0x2fca46['push'](_0x2fca46['shift']());}}}(a162_0x114f,0xe53b6));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function a162_0x15e4(_0x440c2e,_0x21d103){_0x440c2e=_0x440c2e-0x109;const _0x114fb5=a162_0x114f();let _0x15e44b=_0x114fb5[_0x440c2e];return _0x15e44b;}function extensionToMode(_0x599180){const _0x456330=a162_0x15e4;if(_0x599180===_0x456330(0x110))return _0x456330(0x126);if(_0x599180===_0x456330(0x11d))return'mybatisXml';return undefined;}async function scanSqlFilesRecursively(_0x3bc4e5,_0x461f85){const _0x170043=a162_0x15e4,_0x1a8b63=[];try{const _0x1010f9=await readdir(_0x3bc4e5,{'withFileTypes':!![]});for(const _0x5d7b06 of _0x1010f9){const _0x1f9747=join(_0x3bc4e5,_0x5d7b06[_0x170043(0x11b)]);if(_0x5d7b06[_0x170043(0x11e)]()){_0x1a8b63[_0x170043(0x116)](...await scanSqlFilesRecursively(_0x1f9747,_0x461f85));continue;}if(!_0x5d7b06[_0x170043(0x10a)]())continue;const _0x210687=extname(_0x5d7b06[_0x170043(0x11b)])[_0x170043(0x119)](),_0x42677e=extensionToMode(_0x210687);if(!_0x42677e)continue;const _0x54e571=relative(_0x461f85,_0x1f9747)[_0x170043(0x11f)](/\\/g,'/'),_0x1da1fa=_0x54e571[_0x170043(0x11c)]('/')['filter'](Boolean),_0x18a9d5=parseSqlPath(_0x1da1fa,_0x5d7b06[_0x170043(0x11b)],_0x210687);if(!_0x18a9d5)continue;_0x1a8b63['push']({'sqlCode':_0x18a9d5[_0x170043(0x10b)],'sqlName':_0x18a9d5['sqlName'],'dbDirectory':_0x1da1fa[0x0],'filePath':_0x1f9747,'relativePath':_0x54e571,'lockKey':_0x18a9d5[_0x170043(0x10b)],'mode':_0x42677e});}}catch(_0xe0f1a7){if(_0xe0f1a7[_0x170043(0x112)]!=='ENOENT')throw _0xe0f1a7;}return _0x1a8b63;}export async function scanLocalSqlQueries(_0x11f6b1){const _0x4a84f0=a162_0x15e4;return scanSqlFilesRecursively(_0x11f6b1['sqlRootDir'],_0x11f6b1[_0x4a84f0(0x10c)]);}function a162_0x114f(){const _0x285dc9=['2613620IQuTwn','isFile','sqlCode','sqlRootDir','362983zpQtwK','test','12561368qUhzeW','.sql','length','code','mode','dbId','4380040ZFHiKW','push','4rvgbZv','slice','toLowerCase','36OpmaUi','name','split','.xml','isDirectory','replace','sqlName','indexOf','dbName','path','542928NecVqz','108Bnfvju','sql','5621436Kujfmq','277361WMWNby'];a162_0x114f=function(){return _0x285dc9;};return a162_0x114f();}export function resolveLocalSqlFilePath(_0x4166b3,_0x2a553a,_0x4f4499){const _0xaae530=a162_0x15e4,_0x5b846c=_0x4f4499?.[_0xaae530(0x123)]||(_0x4f4499?.[_0xaae530(0x120)]||_0x4f4499?.[_0xaae530(0x122)]?buildSqlRelativePath(_0x2a553a,_0x4f4499?.[_0xaae530(0x120)],_0x4f4499?.[_0xaae530(0x122)],_0x4f4499?.[_0xaae530(0x113)]||_0xaae530(0x126),_0x4f4499?.[_0xaae530(0x114)]):buildDefaultSqlFileName(_0x2a553a,_0x4f4499?.[_0xaae530(0x113)]||_0xaae530(0x126)));return join(_0x4166b3[_0xaae530(0x10c)],_0x5b846c);}export async function directoryExists(_0xce8b40){const _0x4f4680=a162_0x15e4;try{const _0x54600d=await stat(_0xce8b40);return _0x54600d[_0x4f4680(0x11e)]();}catch{return![];}}function parseSqlPath(_0x1a9f75,_0x4ee7d1,_0x41e33f){const _0x20757a=a162_0x15e4,_0x1ee697=_0x4ee7d1[_0x20757a(0x118)](0x0,-_0x41e33f[_0x20757a(0x111)]);if(_0x1a9f75[_0x20757a(0x111)]<0x2)return null;const _0x4e4f63=_0x1ee697[_0x20757a(0x121)]('_');if(_0x4e4f63<=0x0||_0x4e4f63>=_0x1ee697[_0x20757a(0x111)]-0x1)return null;const _0x1aada6=_0x1ee697[_0x20757a(0x118)](0x0,_0x4e4f63);if(!isLikelySqlCode(_0x1aada6))return null;return{'sqlCode':_0x1aada6,'sqlName':_0x1ee697['slice'](_0x4e4f63+0x1)};}function isLikelySqlCode(_0x652c84){const _0x20842a=a162_0x15e4;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x20842a(0x10e)](_0x652c84);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x167617,_0x5cbfe2){const _0x42e889=a163_0x41e5,_0x24d40a=_0x167617();while(!![]){try{const _0x3c7b52=-parseInt(_0x42e889(0x1c2))/0x1+-parseInt(_0x42e889(0x1bc))/0x2*(parseInt(_0x42e889(0x1c1))/0x3)+-parseInt(_0x42e889(0x1b5))/0x4+-parseInt(_0x42e889(0x1bf))/0x5*(-parseInt(_0x42e889(0x1bd))/0x6)+parseInt(_0x42e889(0x1be))/0x7*(parseInt(_0x42e889(0x1ba))/0x8)+parseInt(_0x42e889(0x1c0))/0x9+parseInt(_0x42e889(0x1b7))/0xa;if(_0x3c7b52===_0x5cbfe2)break;else _0x24d40a['push'](_0x24d40a['shift']());}catch(_0x414270){_0x24d40a['push'](_0x24d40a['shift']());}}}(a163_0x1c07,0xec153));import{readFile}from'node:fs/promises';function a163_0x41e5(_0x4e92e9,_0x48a233){_0x4e92e9=_0x4e92e9-0x1b5;const _0x1c078f=a163_0x1c07();let _0x41e5b3=_0x1c078f[_0x4e92e9];return _0x41e5b3;}import a163_0x2d9e19 from'node:crypto';export function computeSqlContentHash(_0x189a97){const _0x5a9398=a163_0x41e5;return a163_0x2d9e19[_0x5a9398(0x1bb)]('md5')['update'](_0x189a97)[_0x5a9398(0x1b9)](_0x5a9398(0x1b8));}export async function computeSqlFileHash(_0x26c1d9){const _0x2d9d5c=a163_0x41e5,_0x2ca449=await readFile(_0x26c1d9,_0x2d9d5c(0x1b6));return computeSqlContentHash(_0x2ca449);}function a163_0x1c07(){const _0x3e4768=['utf8','6978310dyOkYt','hex','digest','317864HLBHxy','createHash','94vKNxvI','3392322QEAFiS','329HALSEb','5AbzHbW','9706932AokoIf','113628wvtsTy','529257ikXpRy','3731172oeUfyc'];a163_0x1c07=function(){return _0x3e4768;};return a163_0x1c07();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5b36e6,_0x41a48c){const _0x3f4175=a164_0x11b9,_0x5748b3=_0x5b36e6();while(!![]){try{const _0x2b4b66=parseInt(_0x3f4175(0x93))/0x1*(parseInt(_0x3f4175(0x8e))/0x2)+-parseInt(_0x3f4175(0x94))/0x3+parseInt(_0x3f4175(0x89))/0x4*(parseInt(_0x3f4175(0x8a))/0x5)+parseInt(_0x3f4175(0x8c))/0x6+-parseInt(_0x3f4175(0x92))/0x7*(parseInt(_0x3f4175(0x9a))/0x8)+-parseInt(_0x3f4175(0x99))/0x9*(-parseInt(_0x3f4175(0x98))/0xa)+-parseInt(_0x3f4175(0x91))/0xb;if(_0x2b4b66===_0x41a48c)break;else _0x5748b3['push'](_0x5748b3['shift']());}catch(_0x3283fa){_0x5748b3['push'](_0x5748b3['shift']());}}}(a164_0x48cb,0x6d10a));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x441964,_0x5dcec5,_0x32cb2e,_0x5b90e8){const _0x151925=a164_0x11b9,_0x388438=_0x441964??createEmptySqlLock();let _0x58202e=_0x388438[_0x151925(0x88)][_0x5dcec5];if(!_0x58202e)return _0x58202e={'sqlRoot':_0x32cb2e,'lastSync':'','sqls':{}},_0x388438['apps'][_0x5dcec5]=_0x58202e,{'lockData':_0x388438,'appLock':_0x58202e};if(!_0x58202e[_0x151925(0x90)])_0x58202e[_0x151925(0x90)]=_0x32cb2e;else{if(_0x58202e[_0x151925(0x90)]!==_0x32cb2e)throw new Error(_0x5b90e8+_0x151925(0x95)+_0x32cb2e+'\x22\x20vs\x20lock\x20\x22'+_0x58202e['sqlRoot']+'\x22.\x20'+_0x151925(0x97));}return!_0x58202e['sqls']&&(_0x58202e[_0x151925(0x96)]={}),!_0x58202e['lastSync']&&(_0x58202e[_0x151925(0x8b)]=''),{'lockData':_0x388438,'appLock':_0x58202e};}function a164_0x48cb(){const _0x208f71=['35hxuUoH','lastSync','5299368zQFzvh','code','3074naiadj','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','sqlRoot','14748041inGIfe','7sHCMPX','103BoVTde','574926hTembh',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','sqls','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','12830xmVgov','5715RUrcpp','518096gordNe','stringify','apps','107212AJrMaP'];a164_0x48cb=function(){return _0x208f71;};return a164_0x48cb();}export async function readSqlLockFile(_0x1e9690){const _0x34aa1e=a164_0x11b9;try{const _0x58db15=await readFile(_0x1e9690,'utf8');return JSON['parse'](_0x58db15);}catch(_0x4496a8){if(_0x4496a8[_0x34aa1e(0x8d)]==='ENOENT')return null;throw new Error(_0x34aa1e(0x8f)+String(_0x4496a8));}}function a164_0x11b9(_0x16fdc0,_0x15dfd1){_0x16fdc0=_0x16fdc0-0x87;const _0x48cb9e=a164_0x48cb();let _0x11b979=_0x48cb9e[_0x16fdc0];return _0x11b979;}export async function writeSqlLockFile(_0x169be6,_0x5b1be0){const _0xb150d9=a164_0x11b9;await mkdir(dirname(_0x169be6),{'recursive':!![]}),await writeFile(_0x169be6,JSON[_0xb150d9(0x87)](_0x5b1be0,null,0x2),'utf8');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x56fefe,_0x47c747){const _0x1e01d5=a166_0xc0d6,_0x53fa6d=_0x56fefe();while(!![]){try{const _0x54ba61=parseInt(_0x1e01d5(0xce))/0x1*(parseInt(_0x1e01d5(0xbf))/0x2)+parseInt(_0x1e01d5(0xc4))/0x3*(parseInt(_0x1e01d5(0xc3))/0x4)+parseInt(_0x1e01d5(0xcb))/0x5+parseInt(_0x1e01d5(0xc0))/0x6*(parseInt(_0x1e01d5(0xcc))/0x7)+-parseInt(_0x1e01d5(0xc2))/0x8+-parseInt(_0x1e01d5(0xd1))/0x9*(parseInt(_0x1e01d5(0xc1))/0xa)+parseInt(_0x1e01d5(0xcf))/0xb;if(_0x54ba61===_0x47c747)break;else _0x53fa6d['push'](_0x53fa6d['shift']());}catch(_0xfa8cdb){_0x53fa6d['push'](_0x53fa6d['shift']());}}}(a166_0x4b7a,0x39c08));export function detectSqlMode(_0x59b85a){const _0x2ed7ad=a166_0xc0d6,_0x5d2cd0=_0x59b85a[_0x2ed7ad(0xc7)]();if(/^<(select|insert|update|delete)\b/i[_0x2ed7ad(0xc5)](_0x5d2cd0))return _0x2ed7ad(0xd0);return'sql';}export function getSqlFileExtension(_0x18e1ba){return _0x18e1ba==='mybatisXml'?'.xml':'.sql';}export function buildDefaultSqlFileName(_0x306190,_0x562906){return''+_0x306190+getSqlFileExtension(_0x562906);}function a166_0x4b7a(){const _0x1dac26=['unknown-sql','replace','db-','210875zktWry','7LPxFmY','unknown-db','8605GcjaMQ','4046119QViHdr','mybatisXml','9euKAsl','6hUXocO','757098adolxS','2705020KWqcRx','3773744JDcrAX','20vKewUm','250062jBInQj','test','trim','trimStart'];a166_0x4b7a=function(){return _0x1dac26;};return a166_0x4b7a();}export function sanitizeSqlPathSegment(_0x44ee99,_0x11d510){const _0x2d07ff=a166_0xc0d6,_0x39d063=String(_0x44ee99??'')[_0x2d07ff(0xc6)](),_0x20a753=_0x39d063['replace'](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x2d07ff(0xc9)](/\s+/g,'-')[_0x2d07ff(0xc9)](/-+/g,'-')[_0x2d07ff(0xc9)](/^\.+/,'')[_0x2d07ff(0xc9)](/\.+$/,'')[_0x2d07ff(0xc9)](/^-+/,'')['replace'](/-+$/,'');return _0x20a753||_0x11d510;}function a166_0xc0d6(_0x43e2a8,_0x3b2031){_0x43e2a8=_0x43e2a8-0xbf;const _0x4b7a39=a166_0x4b7a();let _0xc0d65e=_0x4b7a39[_0x43e2a8];return _0xc0d65e;}export function buildDbDirectoryName(_0x5e04a7,_0x5e21a0){const _0x532eb2=a166_0xc0d6;return sanitizeSqlPathSegment(_0x5e04a7,_0x5e21a0!=null?_0x532eb2(0xca)+_0x5e21a0:_0x532eb2(0xcd));}export function buildSqlRelativePath(_0x47c01b,_0x40e044,_0x15c6e4,_0x2418a8,_0x4cb78b){const _0xa5c363=a166_0xc0d6,_0x185b35=buildDbDirectoryName(_0x15c6e4,_0x4cb78b),_0x55e2fe=sanitizeSqlPathSegment(_0x47c01b,_0xa5c363(0xc8)),_0xfbf046=sanitizeSqlPathSegment(_0x40e044,_0x55e2fe);return _0x185b35+'/'+_0x55e2fe+'_'+_0xfbf046+getSqlFileExtension(_0x2418a8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a167_0x592a(_0x455169,_0x10f31e){_0x455169=_0x455169-0x154;const _0x2d1803=a167_0x2d18();let _0x592aed=_0x2d1803[_0x455169];return _0x592aed;}(function(_0xa4189,_0x10a80c){const _0x43d975=a167_0x592a,_0x57831e=_0xa4189();while(!![]){try{const _0x124aba=parseInt(_0x43d975(0x15b))/0x1+parseInt(_0x43d975(0x16e))/0x2*(parseInt(_0x43d975(0x155))/0x3)+-parseInt(_0x43d975(0x157))/0x4*(-parseInt(_0x43d975(0x173))/0x5)+parseInt(_0x43d975(0x162))/0x6*(parseInt(_0x43d975(0x161))/0x7)+-parseInt(_0x43d975(0x172))/0x8+parseInt(_0x43d975(0x16a))/0x9+parseInt(_0x43d975(0x174))/0xa*(-parseInt(_0x43d975(0x15e))/0xb);if(_0x124aba===_0x10a80c)break;else _0x57831e['push'](_0x57831e['shift']());}catch(_0x1d5162){_0x57831e['push'](_0x57831e['shift']());}}}(a167_0x2d18,0x808a6));export function detectSqlType(_0x5853aa){const _0x219d59=a167_0x592a;if(!_0x5853aa?.[_0x219d59(0x16b)]())return{'type':_0x219d59(0x159),'isSelectOnly':![],'isDangerous':![],'reason':_0x219d59(0x16d)};const _0x591674=_0x5853aa[_0x219d59(0x165)](/#\{[^}]*\}/g,'?')[_0x219d59(0x165)](/\$\{[^}]*\}/g,'?')['replace'](/@[^(\s]+(\([^)]*\))?/g,'')[_0x219d59(0x165)](/\/\*[\s\S]*?\*\//g,'')[_0x219d59(0x16b)](),_0x317a4b=_0x591674[_0x219d59(0x164)]('\x0a');let _0x13a99a='';for(const _0x15fdf7 of _0x317a4b){const _0x5ef860=_0x15fdf7[_0x219d59(0x16b)]();if(!_0x5ef860||_0x5ef860[_0x219d59(0x15d)]('--')||_0x5ef860['startsWith']('/*'))continue;_0x13a99a=_0x5ef860;break;}const _0x1b753f=_0x13a99a[_0x219d59(0x175)]();if(_0x1b753f[_0x219d59(0x15d)]('SELECT')||_0x1b753f['startsWith']('WITH')){const _0x5bfec0=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x219d59(0x178)](_0x591674);return{'type':'SELECT','isSelectOnly':!_0x5bfec0,'isDangerous':_0x5bfec0,'reason':_0x5bfec0?'SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT':undefined};}if(_0x1b753f['startsWith'](_0x219d59(0x167)))return{'type':_0x219d59(0x167),'isSelectOnly':![],'isDangerous':![]};if(_0x1b753f['startsWith'](_0x219d59(0x176)))return{'type':_0x219d59(0x176),'isSelectOnly':![],'isDangerous':![]};if(_0x1b753f[_0x219d59(0x15d)](_0x219d59(0x158)))return{'type':_0x219d59(0x158),'isSelectOnly':![],'isDangerous':!![],'reason':_0x219d59(0x15c)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i['test'](_0x1b753f))return{'type':'DDL','isSelectOnly':![],'isDangerous':!![],'reason':_0x219d59(0x16f)};return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![]};}function extractTables(_0x5ce8ee){const _0x579e64=a167_0x592a,_0x1bb451=_0x5ce8ee[_0x579e64(0x165)](/#\{[^}]*\}/g,'?')[_0x579e64(0x165)](/\$\{[^}]*\}/g,'?')[_0x579e64(0x165)](/'[^']*'/g,'\x27\x27')[_0x579e64(0x165)](/--.*$/gm,'')['replace'](/\/\*[\s\S]*?\*\//g,''),_0x4b2f49=[],_0x103050=_0x1bb451[_0x579e64(0x166)](/FROM\s+([^\s,)(]+)/i);if(_0x103050?.[0x1])_0x4b2f49[_0x579e64(0x163)](_0x103050[0x1][_0x579e64(0x165)](/[`"]/g,''));for(const _0x322613 of _0x1bb451[_0x579e64(0x168)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){const _0x153222=_0x322613[0x1]?.[_0x579e64(0x165)](/[`"]/g,'');if(_0x153222&&!_0x4b2f49[_0x579e64(0x15f)](_0x153222))_0x4b2f49['push'](_0x153222);}const _0x21f57a=_0x1bb451['match'](/INTO\s+([^\s(]+)/i);if(_0x21f57a?.[0x1]){const _0x389d04=_0x21f57a[0x1][_0x579e64(0x165)](/[`"]/g,'');if(!_0x4b2f49['includes'](_0x389d04))_0x4b2f49[_0x579e64(0x163)](_0x389d04);}const _0x266c7b=_0x1bb451['match'](/UPDATE\s+([^\s,)(]+)/i);if(_0x266c7b?.[0x1]){const _0x448411=_0x266c7b[0x1][_0x579e64(0x165)](/[`"]/g,'');if(!_0x4b2f49[_0x579e64(0x15f)](_0x448411))_0x4b2f49[_0x579e64(0x163)](_0x448411);}return _0x4b2f49;}function extractParameters(_0x19f8cc){const _0x284d5e=a167_0x592a,_0x53d059=new Set();for(const _0x5c61b7 of _0x19f8cc[_0x284d5e(0x168)](/#\{(\w+)\}/g))if(_0x5c61b7[0x1])_0x53d059[_0x284d5e(0x156)](_0x5c61b7[0x1]);for(const _0x4d4ba5 of _0x19f8cc[_0x284d5e(0x168)](/\$\{(\w+)\}/g))if(_0x4d4ba5[0x1])_0x53d059[_0x284d5e(0x156)](_0x4d4ba5[0x1]);return Array['from'](_0x53d059);}function a167_0x2d18(){const _0x10b481=['add','330088cxjkYK','DELETE','UNKNOWN','unknown\x20table(s)','164006gdyrGM','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','startsWith','1715604vRdXuG','includes','length','91TqUgoA','115326WxrvPf','push','split','replace','match','INSERT','matchAll','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','9321471noTmoz','trim','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','SQL\x20content\x20is\x20empty','426DxBikX','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','isDangerous','type','6924088zzGMce','60yMtOCl','110FrtnmM','toUpperCase','UPDATE','join','test','\x20with\x20parameters:\x20','reason','9405JMnXod'];a167_0x2d18=function(){return _0x10b481;};return a167_0x2d18();}export function validateSql(_0x2404e1){const _0x15ab56=a167_0x592a,_0x3f6708=detectSqlType(_0x2404e1),_0x283d77=extractTables(_0x2404e1),_0x2a7a5d=extractParameters(_0x2404e1);if(_0x3f6708[_0x15ab56(0x170)])return{'valid':![],'sqlType':_0x3f6708,'tables':_0x283d77,'parameters':_0x2a7a5d,'message':_0x3f6708[_0x15ab56(0x154)]||_0x3f6708[_0x15ab56(0x171)]+_0x15ab56(0x169)};if(_0x3f6708[_0x15ab56(0x171)]===_0x15ab56(0x159))return{'valid':![],'sqlType':_0x3f6708,'tables':_0x283d77,'parameters':_0x2a7a5d,'message':_0x15ab56(0x16c)};return{'valid':!![],'sqlType':_0x3f6708,'tables':_0x283d77,'parameters':_0x2a7a5d,'message':_0x3f6708[_0x15ab56(0x171)]+'\x20query\x20targeting\x20'+(_0x283d77[_0x15ab56(0x160)]?_0x283d77[_0x15ab56(0x177)](',\x20'):_0x15ab56(0x15a))+(_0x2a7a5d['length']?_0x15ab56(0x179)+_0x2a7a5d['join'](',\x20'):'')};}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a168_0x2d3abb=a168_0x3cb8;(function(_0x192138,_0x1bf439){const _0x4e22e7=a168_0x3cb8,_0xe25daf=_0x192138();while(!![]){try{const _0x4c21da=-parseInt(_0x4e22e7(0x1b4))/0x1*(parseInt(_0x4e22e7(0x1ae))/0x2)+-parseInt(_0x4e22e7(0x1ac))/0x3+-parseInt(_0x4e22e7(0x1a4))/0x4*(-parseInt(_0x4e22e7(0x1ab))/0x5)+-parseInt(_0x4e22e7(0x1ad))/0x6*(parseInt(_0x4e22e7(0x1a8))/0x7)+parseInt(_0x4e22e7(0x1aa))/0x8*(parseInt(_0x4e22e7(0x1b2))/0x9)+-parseInt(_0x4e22e7(0x1a6))/0xa+parseInt(_0x4e22e7(0x1a5))/0xb*(parseInt(_0x4e22e7(0x1b0))/0xc);if(_0x4c21da===_0x1bf439)break;else _0xe25daf['push'](_0xe25daf['shift']());}catch(_0x1e733f){_0xe25daf['push'](_0xe25daf['shift']());}}}(a168_0x4fe3,0x81b4a));import{CliError,createCliErrors}from'@lovrabet/cli-framework';function a168_0x3cb8(_0x3a1688,_0x15ac1a){_0x3a1688=_0x3a1688-0x1a4;const _0x4fe33f=a168_0x4fe3();let _0x3cb87e=_0x4fe33f[_0x3a1688];return _0x3cb87e;}function a168_0x4fe3(){const _0x422e09=['8SBAWZh','10CKYtJh','1425852mocZxe','470334JWisIk','3022swwuWt','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','11892jVXXmD','Run\x20`','5038335vhZpAQ','join','12KKrdRS','553848DotRTX','12287BoBjUu','2918840XlRlUV','Tip:\x20`','56VCxmNx','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.'];a168_0x4fe3=function(){return _0x422e09;};return a168_0x4fe3();}import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a168_0x2d3abb(0x1b1)+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.','configMissingHint':['Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+a168_0x2d3abb(0x1af),a168_0x2d3abb(0x1a7)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.'][a168_0x2d3abb(0x1b3)]('\x0a\x20\x20\x20\x20\x20\x20\x20'),'notInProjectHint':a168_0x2d3abb(0x1a9)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a169_0x110b(_0x5eae04,_0x347448){_0x5eae04=_0x5eae04-0xd6;var _0x367dbf=a169_0x367d();var _0x110b0e=_0x367dbf[_0x5eae04];return _0x110b0e;}(function(_0x4a74e2,_0x5c29de){var _0x30188a=a169_0x110b,_0x25a557=_0x4a74e2();while(!![]){try{var _0x52ee3d=parseInt(_0x30188a(0xd8))/0x1+parseInt(_0x30188a(0xdd))/0x2*(-parseInt(_0x30188a(0xde))/0x3)+parseInt(_0x30188a(0xd6))/0x4+-parseInt(_0x30188a(0xd7))/0x5+-parseInt(_0x30188a(0xda))/0x6+-parseInt(_0x30188a(0xdb))/0x7+parseInt(_0x30188a(0xdc))/0x8*(parseInt(_0x30188a(0xd9))/0x9);if(_0x52ee3d===_0x5c29de)break;else _0x25a557['push'](_0x25a557['shift']());}catch(_0x44b409){_0x25a557['push'](_0x25a557['shift']());}}}(a169_0x367d,0x4b743));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a169_0xb7893e}from'@lovrabet/cli-framework';function a169_0x367d(){var _0x57aa3f=['2050136ZpjKeP','6NYMtnr','220818kdiTAB','1007424WNcDbH','103765VfnYtt','369460CSHyyb','18eOHiHb','138324WSvrEM','3921162Evftws'];a169_0x367d=function(){return _0x57aa3f;};return a169_0x367d();}export function buildAllFlags(_0x588acc){return a169_0xb7893e(_0x588acc,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x21dd41,_0x222d80){const _0x1e7b63=a170_0x45b7,_0x241132=_0x21dd41();while(!![]){try{const _0x424d79=parseInt(_0x1e7b63(0xcb))/0x1+-parseInt(_0x1e7b63(0xcc))/0x2*(parseInt(_0x1e7b63(0xc9))/0x3)+-parseInt(_0x1e7b63(0xca))/0x4+parseInt(_0x1e7b63(0xd1))/0x5*(-parseInt(_0x1e7b63(0xd2))/0x6)+-parseInt(_0x1e7b63(0xcd))/0x7*(-parseInt(_0x1e7b63(0xce))/0x8)+-parseInt(_0x1e7b63(0xd3))/0x9+parseInt(_0x1e7b63(0xd0))/0xa*(parseInt(_0x1e7b63(0xcf))/0xb);if(_0x424d79===_0x222d80)break;else _0x241132['push'](_0x241132['shift']());}catch(_0x57b685){_0x241132['push'](_0x241132['shift']());}}}(a170_0x2718,0x51698));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a170_0x2718(){const _0x5a33df=['3376UXLSTw','19283ROhILb','8650XyExWO','3220935glmkNm','6JTODaQ','2888478eGkcio','30hvopqn','2109948xAmrWE','419161lcnGfO','60034kRZRyr','3164dcjrTj'];a170_0x2718=function(){return _0x5a33df;};return a170_0x2718();}const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers['parseFlags'];function a170_0x45b7(_0x4bfd86,_0x33bf0b){_0x4bfd86=_0x4bfd86-0xc9;const _0x2718a4=a170_0x2718();let _0x45b796=_0x2718a4[_0x4bfd86];return _0x45b796;}export const validateFlags=helpers['validateFlags'];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a171_0x32db(){const _0x34a41f=['5hcwfuy','generateCommandHelp','271812WwuDNX','939612SwqYhy','103864oKQuGL','10579206uSfumA','Requires\x20appcode\x20(set\x20via\x20`','2092566IDDsav','\x20project\x20init`\x20or\x20--appcode).','217DBlwUB','9OkcjEO','1809050wsZQcR','2410242OaTnfh','generateServiceHelp','6NLQPxB'];a171_0x32db=function(){return _0x34a41f;};return a171_0x32db();}const a171_0x37f52c=a171_0x426e;(function(_0x47ee67,_0x1d1db8){const _0x49f135=a171_0x426e,_0x2042c5=_0x47ee67();while(!![]){try{const _0x545ac4=-parseInt(_0x49f135(0x1da))/0x1*(parseInt(_0x49f135(0x1d7))/0x2)+parseInt(_0x49f135(0x1e4))/0x3+-parseInt(_0x49f135(0x1db))/0x4*(parseInt(_0x49f135(0x1d8))/0x5)+parseInt(_0x49f135(0x1df))/0x6+-parseInt(_0x49f135(0x1e1))/0x7*(parseInt(_0x49f135(0x1dc))/0x8)+parseInt(_0x49f135(0x1e2))/0x9*(parseInt(_0x49f135(0x1e3))/0xa)+parseInt(_0x49f135(0x1dd))/0xb;if(_0x545ac4===_0x1d1db8)break;else _0x2042c5['push'](_0x2042c5['shift']());}catch(_0x58b0dc){_0x2042c5['push'](_0x2042c5['shift']());}}}(a171_0x32db,0xcd91e));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';const generators=createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x3b1a52=>serviceGroups['get'](_0x3b1a52),'buildAllFlags':buildAllFlags,'appPrerequisiteText':a171_0x37f52c(0x1de)+CLI_BIN_NAME+a171_0x37f52c(0x1e0),'serviceUsageSuffix':'\x20[args]\x20[flags]','includeWildcardExtraInFullHelp':!![]});export function generateCommandHelp(_0x2aedb6){const _0x4c8d75=a171_0x37f52c;return generators[_0x4c8d75(0x1d9)](_0x2aedb6);}function a171_0x426e(_0x49b64d,_0x128ff0){_0x49b64d=_0x49b64d-0x1d7;const _0x32db55=a171_0x32db();let _0x426eec=_0x32db55[_0x49b64d];return _0x426eec;}export const generateServiceHelp=generators[a171_0x37f52c(0x1e5)];export const generateFullHelp=generators['generateFullHelp'];
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x445539,_0x41578f){var _0x56ba7f=a172_0x4b23,_0x9a9608=_0x445539();while(!![]){try{var _0x426313=-parseInt(_0x56ba7f(0xc2))/0x1*(-parseInt(_0x56ba7f(0xc6))/0x2)+-parseInt(_0x56ba7f(0xbf))/0x3*(-parseInt(_0x56ba7f(0xc4))/0x4)+-parseInt(_0x56ba7f(0xc5))/0x5+-parseInt(_0x56ba7f(0xbd))/0x6*(parseInt(_0x56ba7f(0xc8))/0x7)+parseInt(_0x56ba7f(0xc1))/0x8*(-parseInt(_0x56ba7f(0xc7))/0x9)+parseInt(_0x56ba7f(0xc0))/0xa*(parseInt(_0x56ba7f(0xc3))/0xb)+parseInt(_0x56ba7f(0xbe))/0xc;if(_0x426313===_0x41578f)break;else _0x9a9608['push'](_0x9a9608['shift']());}catch(_0x2538e8){_0x9a9608['push'](_0x9a9608['shift']());}}}(a172_0x2b22,0xdaa05));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';function a172_0x2b22(){var _0x1f9436=['5320490MIOOzQ','1269984nUqDkt','3eYIxNS','11Kgoleq','2592YiMlEL','3048295HvSqQv','259410hiTlOs','63yJGUMN','98476imsjfA','288jcQBOt','16291968DuwqJW','4689kGbhMz'];a172_0x2b22=function(){return _0x1f9436;};return a172_0x2b22();}export{formatOutput}from'../framework/output.js';function a172_0x4b23(_0x1d3e88,_0x1e5bee){_0x1d3e88=_0x1d3e88-0xbd;var _0x2b2293=a172_0x2b22();var _0x4b2319=_0x2b2293[_0x1d3e88];return _0x4b2319;}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(_0x18d3a6,_0x295aa6){const _0x4fd64c=a173_0x4794,_0x52670b=_0x18d3a6();while(!![]){try{const _0x20dee2=parseInt(_0x4fd64c(0x155))/0x1*(parseInt(_0x4fd64c(0x159))/0x2)+parseInt(_0x4fd64c(0x15e))/0x3+parseInt(_0x4fd64c(0x15a))/0x4+parseInt(_0x4fd64c(0x154))/0x5+-parseInt(_0x4fd64c(0x156))/0x6*(-parseInt(_0x4fd64c(0x158))/0x7)+parseInt(_0x4fd64c(0x15d))/0x8*(-parseInt(_0x4fd64c(0x152))/0x9)+parseInt(_0x4fd64c(0x157))/0xa*(-parseInt(_0x4fd64c(0x15f))/0xb);if(_0x20dee2===_0x295aa6)break;else _0x52670b['push'](_0x52670b['shift']());}catch(_0x177034){_0x52670b['push'](_0x52670b['shift']());}}}(a173_0x527e,0xe5398));function a173_0x527e(){const _0x3bc95a=['55524zMFzcU','20bEeNwj','595zlZjiX','16wErAmY','4490680Jwdyne','update','_notice','9003544CUCuLS','2015499isqiJF','20129923FQUmFY','format','message','9aPzFkL','pretty','6595320FDOJAH','228022VFRSbM'];a173_0x527e=function(){return _0x3bc95a;};return a173_0x527e();}import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});function a173_0x4794(_0x3cd4b7,_0x584881){_0x3cd4b7=_0x3cd4b7-0x150;const _0x527e6c=a173_0x527e();let _0x479448=_0x527e6c[_0x3cd4b7];return _0x479448;}export function formatOutput(_0x4906f0,_0x321d98){const _0x171029=a173_0x4794,_0x2ee754=_0x4906f0[_0x171029(0x15c)],{_notice:_0x230729,..._0x346ac7}=_0x4906f0;void _0x230729,baseFormatOutput(_0x346ac7,_0x321d98),_0x321d98[_0x171029(0x150)]===_0x171029(0x153)&&printPrettyNotice(_0x2ee754);}function printPrettyNotice(_0x5d5c21){const _0x50862b=a173_0x4794;if(!_0x5d5c21?.[_0x50862b(0x15b)])return;console['error'](_0x5d5c21['update'][_0x50862b(0x151)]+'\x20('+_0x5d5c21[_0x50862b(0x15b)]['url']+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a174_0x3cca(){var _0x551fcd=['8FnKxgF','3421736JvzoZr','3206204uqneKK','1919666BByYiv','20uEMdKC','3411231CcAQZc','11547594fmeefu','2368578LVhrke','15DKrbjr','1066812EyWkOt'];a174_0x3cca=function(){return _0x551fcd;};return a174_0x3cca();}function a174_0x7a4d(_0x20a8db,_0x1d964b){_0x20a8db=_0x20a8db-0xce;var _0x3ccadf=a174_0x3cca();var _0x7a4d8e=_0x3ccadf[_0x20a8db];return _0x7a4d8e;}(function(_0xd58ede,_0x1c4b0d){var _0x10b504=a174_0x7a4d,_0x4c9ee7=_0xd58ede();while(!![]){try{var _0x529931=-parseInt(_0x10b504(0xd2))/0x1+-parseInt(_0x10b504(0xd4))/0x2+-parseInt(_0x10b504(0xce))/0x3+parseInt(_0x10b504(0xd5))/0x4+parseInt(_0x10b504(0xd1))/0x5*(parseInt(_0x10b504(0xd0))/0x6)+parseInt(_0x10b504(0xd6))/0x7*(parseInt(_0x10b504(0xd3))/0x8)+parseInt(_0x10b504(0xcf))/0x9*(parseInt(_0x10b504(0xd7))/0xa);if(_0x529931===_0x1c4b0d)break;else _0x4c9ee7['push'](_0x4c9ee7['shift']());}catch(_0x58369d){_0x4c9ee7['push'](_0x4c9ee7['shift']());}}}(a174_0x3cca,0xde85d));export{extractList,extractPaging}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2f419a,_0x2cc3bc){const _0x25b174=a175_0x2d5e,_0x54c921=_0x2f419a();while(!![]){try{const _0x14b341=-parseInt(_0x25b174(0xd2))/0x1*(parseInt(_0x25b174(0xca))/0x2)+-parseInt(_0x25b174(0xe1))/0x3+parseInt(_0x25b174(0xce))/0x4+parseInt(_0x25b174(0xdd))/0x5+-parseInt(_0x25b174(0xda))/0x6+-parseInt(_0x25b174(0xd8))/0x7*(parseInt(_0x25b174(0xd5))/0x8)+parseInt(_0x25b174(0xcc))/0x9*(parseInt(_0x25b174(0xe0))/0xa);if(_0x14b341===_0x2cc3bc)break;else _0x54c921['push'](_0x54c921['shift']());}catch(_0x5f2656){_0x54c921['push'](_0x54c921['shift']());}}}(a175_0x422f,0xebacb));import{CliErrors}from'../errors.js';function a175_0x422f(){const _0x3e4465=['join','462385YbElMD','name','7272378DFwTDo','validation','type','3589815uhrWsg','\x20api\x20pull`\x20first.','some','10ainUjR','5715420EfbVet','1594288vfAoDR','Unknown\x20alias\x20\x22','24970149yKSAHB','map','5813204VScNrv','code','alias','string','1pmQSZL','\x22.\x20','No\x20api.ts\x20found\x20in\x20','8QfDSLF','flags'];a175_0x422f=function(){return _0x3e4465;};return a175_0x422f();}import{resolveAlias,listAliases}from'../core/alias-resolver.js';function a175_0x2d5e(_0x45e2c5,_0x17323d){_0x45e2c5=_0x45e2c5-0xca;const _0x422fc9=a175_0x422f();let _0x2d5e52=_0x422fc9[_0x45e2c5];return _0x2d5e52;}import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveAliasToCode(_0x21af4b,_0x424910,_0x1692d3,_0xb2d5d8){const _0x286b42=a175_0x2d5e,_0x58ab64=_0x21af4b[_0x286b42(0xd6)][_0x286b42(0xdf)](_0x4ae261=>_0x4ae261[_0x286b42(0xd9)]==='code'&&_0x4ae261[_0x286b42(0xdc)]===_0x286b42(0xd1)),_0x1f461a=_0x21af4b[_0x286b42(0xd6)][_0x286b42(0xdf)](_0x410454=>_0x410454[_0x286b42(0xd9)]===_0x286b42(0xd0)&&_0x410454['type']==='string');if(!_0x58ab64||!_0x1f461a)return;const _0x2df9dc=_0x424910['code']?String(_0x424910[_0x286b42(0xcf)]):'',_0x599f53=_0x424910[_0x286b42(0xd0)]?String(_0x424910[_0x286b42(0xd0)]):'';if(!_0x2df9dc&&!_0x599f53)throw CliErrors['validation']('`'+_0xb2d5d8+'`\x20requires\x20either\x20--code\x20or\x20--alias.');if(_0x599f53&&!_0x2df9dc){const _0x1d76d4=resolveAlias(_0x1692d3,_0x599f53);if(!_0x1d76d4){const _0x368263=listAliases(_0x1692d3)[_0x286b42(0xcd)](_0x52aa4c=>_0x52aa4c['alias']),_0x1a3b49=_0x368263['length']?'Available\x20aliases:\x20'+_0x368263[_0x286b42(0xd7)](',\x20'):_0x286b42(0xd4)+_0x1692d3+'.\x20Run\x20`'+CLI_BIN_NAME+_0x286b42(0xde);throw CliErrors[_0x286b42(0xdb)](_0x286b42(0xcb)+_0x599f53+_0x286b42(0xd3)+_0x1a3b49);}_0x424910['code']=_0x1d76d4;}}
|