@lovrabet/rabetbase-cli 2.0.13 → 2.1.1-beta.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/README.md +2 -2
- 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/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/doc.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote.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/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/new.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/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -0
- package/lib/commands/db/analyze-start.js +1 -0
- package/lib/commands/db/analyze-status.js +1 -0
- package/lib/commands/db/create.js +1 -0
- package/lib/commands/db/delete.js +1 -0
- package/lib/commands/db/detail.js +1 -0
- package/lib/commands/db/diff.js +1 -0
- package/lib/commands/db/index.js +1 -0
- package/lib/commands/db/list.js +1 -0
- package/lib/commands/db/shared.js +1 -0
- package/lib/commands/db/tables.js +1 -0
- package/lib/commands/db/test.js +1 -0
- package/lib/commands/db/update.js +1 -0
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.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/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/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/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/paths.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/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.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/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/config.js +1 -1
- package/lib/utils/copy-directory.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/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x95a8cb=a33_0x23be;(function(_0x29bc2d,_0xc5d2ae){const _0x5cc8ad=a33_0x23be,_0x63af9=_0x29bc2d();while(!![]){try{const _0x74ac31=-parseInt(_0x5cc8ad(0x1be))/0x1+-parseInt(_0x5cc8ad(0x1b4))/0x2+-parseInt(_0x5cc8ad(0x1c2))/0x3*(parseInt(_0x5cc8ad(0x1d0))/0x4)+parseInt(_0x5cc8ad(0x1b5))/0x5+-parseInt(_0x5cc8ad(0x1c8))/0x6+parseInt(_0x5cc8ad(0x1c3))/0x7*(-parseInt(_0x5cc8ad(0x1cd))/0x8)+-parseInt(_0x5cc8ad(0x1b8))/0x9*(-parseInt(_0x5cc8ad(0x1ca))/0xa);if(_0x74ac31===_0xc5d2ae)break;else _0x63af9['push'](_0x63af9['shift']());}catch(_0x3047d5){_0x63af9['push'](_0x63af9['shift']());}}}(a33_0xfae7,0xbf966));import a33_0x34af23 from'chalk';function a33_0x23be(_0x14403f,_0xbb3461){_0x14403f=_0x14403f-0x1b4;const _0xfae72c=a33_0xfae7();let _0x23be9e=_0xfae72c[_0x14403f];return _0x23be9e;}import a33_0x333631 from'ora';import a33_0x230c2b from'semver';import{execa}from'execa';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getCdnConfig}from'../utils/cdn-config.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x227e19=a33_0x23be,_0x2e4ee9=process['execPath'][_0x227e19(0x1bb)]();if(_0x2e4ee9[_0x227e19(0x1c5)]('bun'))return _0x227e19(0x1b7);return _0x227e19(0x1c0);}function a33_0xfae7(){const _0x40d21a=['coerce','\x20\x20Try\x20manually:\x20','info','Checking\x20for\x20updates...','version','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','start','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','908156nNfATN','4451250YKQTyW','json','bun','34000326ATiHHu','fail','install','toLowerCase','stableVersion','yellow','104541oRrOac','Unable\x20to\x20check\x20for\x20updates','npm','Update\x20failed','12StelBD','14371RYNeYz','log','includes','Version\x20comparison\x20failed','Updated\x20to\x20v','6334230SrGiHh','@latest','10LsTwzY','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','write','3536BGLCNg','gray','https://registry.npmjs.org/','1361572HNUGAn','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','...'];a33_0xfae7=function(){return _0x40d21a;};return a33_0xfae7();}async function fetchLatestNpmVersion(){const _0x31803d=a33_0x23be;try{const _0x39c240=await fetch(_0x31803d(0x1cf)+NPM_PACKAGE_NAME+'/latest',{'signal':AbortSignal['timeout'](0x2710)});if(!_0x39c240['ok'])return null;const _0x57053a=await _0x39c240[_0x31803d(0x1b6)]();return _0x57053a[_0x31803d(0x1d7)]??null;}catch{return null;}}async function fetchLatestVersion(){const _0x2954e9=a33_0x23be,_0x4ec58c=await fetchLatestNpmVersion();if(_0x4ec58c)return _0x4ec58c;const _0xd17d82=await getCdnConfig();return _0xd17d82?.['cli']?.[_0x2954e9(0x1bc)]??null;}async function execute(_0x9067ce){const _0x763833=a33_0x23be,_0x57524c=getCurrentVersion();console[_0x763833(0x1c4)]('Current\x20version:\x20'+_0x57524c);const _0x5bd6dd=a33_0x333631(_0x763833(0x1d6))[_0x763833(0x1d9)](),_0x177974=await fetchLatestVersion();if(!_0x177974)return _0x5bd6dd['fail'](_0x763833(0x1cb)),console['log'](a33_0x34af23[_0x763833(0x1ce)](_0x763833(0x1da)+NPM_PACKAGE_NAME+_0x763833(0x1c9))),{'ok':![],'message':_0x763833(0x1bf)};const _0x2b3580=a33_0x230c2b[_0x763833(0x1d3)](_0x57524c),_0x531d7f=a33_0x230c2b[_0x763833(0x1d3)](_0x177974);if(!_0x2b3580||!_0x531d7f)return _0x5bd6dd['fail'](_0x763833(0x1c6)),{'ok':![],'message':_0x763833(0x1c6)};if(!a33_0x230c2b['lt'](_0x2b3580,_0x531d7f))return _0x5bd6dd['succeed']('Already\x20up\x20to\x20date\x20(v'+_0x177974+')'),{'ok':!![]};_0x5bd6dd[_0x763833(0x1d5)]('Update\x20available:\x20'+a33_0x34af23[_0x763833(0x1bd)](_0x57524c)+'\x20→\x20'+a33_0x34af23['green'](_0x177974));const _0x519a23=detectPackageManager(),_0x2ffaf6=_0x519a23===_0x763833(0x1c0)?resolveNpmBin(_0x763833(0x1c0)):_0x519a23,_0x3cd613=a33_0x333631('Updating\x20via\x20'+_0x519a23+_0x763833(0x1d2))['start']();try{return await execa(_0x2ffaf6,[_0x763833(0x1ba),'-g',NPM_PACKAGE_NAME+_0x763833(0x1c9)],{'stdio':'pipe'}),_0x3cd613['succeed'](_0x763833(0x1c7)+_0x177974),console[_0x763833(0x1c4)](a33_0x34af23['gray'](_0x763833(0x1d8))),{'ok':!![]};}catch(_0x7ae99d){return _0x3cd613[_0x763833(0x1b9)](_0x763833(0x1c1)),console['error'](a33_0x34af23['red']('\x20\x20'+_0x7ae99d['message'])),console[_0x763833(0x1c4)](a33_0x34af23[_0x763833(0x1ce)](_0x763833(0x1d4)+_0x519a23+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x763833(0x1c9))),{'ok':![],'message':_0x7ae99d['message']};}}export const updateDefinition={'service':'update','command':'run','description':a33_0x95a8cb(0x1d1),'risk':a33_0x95a8cb(0x1cc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x563f08,_0x425f6f){const _0x16a0ac=a34_0x1f65,_0x5022a2=_0x563f08();while(!![]){try{const _0x2706c4=-parseInt(_0x16a0ac(0x141))/0x1+parseInt(_0x16a0ac(0x13d))/0x2+parseInt(_0x16a0ac(0x144))/0x3+parseInt(_0x16a0ac(0x142))/0x4+-parseInt(_0x16a0ac(0x140))/0x5*(-parseInt(_0x16a0ac(0x13e))/0x6)+-parseInt(_0x16a0ac(0x13f))/0x7+-parseInt(_0x16a0ac(0x143))/0x8*(parseInt(_0x16a0ac(0x145))/0x9);if(_0x2706c4===_0x425f6f)break;else _0x5022a2['push'](_0x5022a2['shift']());}catch(_0x4cc67f){_0x5022a2['push'](_0x5022a2['shift']());}}}(a34_0x2aa5,0xe7642));function a34_0x1f65(_0x1b7f2d,_0x2d4fb8){_0x1b7f2d=_0x1b7f2d-0x13d;const _0x2aa5bb=a34_0x2aa5();let _0x1f65d2=_0x2aa5bb[_0x1b7f2d];return _0x1f65d2;}import{codegenSdk}from'../../commands/codegen/sdk.js';function a34_0x2aa5(){const _0xfd553f=['1879405PtOkav','598430TRWIvP','5842676WKiqpP','18976SyHLzC','3189414JvnNFo','12591hKUgwc','2583280TBmqgV','24RhVqhp','3180345ZaKBab'];a34_0x2aa5=function(){return _0xfd553f;};return a34_0x2aa5();}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a35_0x35c2(_0x1b5872,_0x5462f){_0x1b5872=_0x1b5872-0xbd;const _0x2edcf0=a35_0x2edc();let _0x35c2e8=_0x2edcf0[_0x1b5872];return _0x35c2e8;}const a35_0x3ad699=a35_0x35c2;(function(_0x2f5a03,_0x269602){const _0x1e13fc=a35_0x35c2,_0x3b9d92=_0x2f5a03();while(!![]){try{const _0x23ae96=parseInt(_0x1e13fc(0xbe))/0x1+parseInt(_0x1e13fc(0xc3))/0x2*(-parseInt(_0x1e13fc(0xd3))/0x3)+parseInt(_0x1e13fc(0xd2))/0x4*(-parseInt(_0x1e13fc(0xd4))/0x5)+-parseInt(_0x1e13fc(0xd5))/0x6*(-parseInt(_0x1e13fc(0xbf))/0x7)+parseInt(_0x1e13fc(0xcf))/0x8+-parseInt(_0x1e13fc(0xca))/0x9*(-parseInt(_0x1e13fc(0xd0))/0xa)+-parseInt(_0x1e13fc(0xd8))/0xb*(parseInt(_0x1e13fc(0xc8))/0xc);if(_0x23ae96===_0x269602)break;else _0x3b9d92['push'](_0x3b9d92['shift']());}catch(_0xa4d340){_0x3b9d92['push'](_0x3b9d92['shift']());}}}(a35_0x2edc,0xc71cf));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a35_0x2edc(){const _0x4f6270=['read','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','code','2UAlzpQ','operation','name','skip-imports','string','7056MgFFQK','alias','27LGgnmu','boolean','sdk','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','bool','1126776tgYZxx','1458850cNBlIB','Omit\x20import\x20statements\x20from\x20generated\x20code','188qPwUuY','182157hzmkzp','65965QLQadp','47004CGsUAs','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','appCode','11462bQFBjN','tableName','418123fpDHyH','994ClXBeL'];a35_0x2edc=function(){return _0x4f6270;};return a35_0x2edc();}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':a35_0x3ad699(0xcc),'description':a35_0x3ad699(0xd6),'risk':a35_0x3ad699(0xc0),'flags':[CODE_FLAG_OPTIONAL,{'name':a35_0x3ad699(0xc9),'type':a35_0x3ad699(0xc7),'description':a35_0x3ad699(0xc1)},{'name':a35_0x3ad699(0xc4),'type':a35_0x3ad699(0xc7),'required':!![],'description':a35_0x3ad699(0xcd)},{'name':a35_0x3ad699(0xc6),'type':a35_0x3ad699(0xcb),'description':a35_0x3ad699(0xd1)}],async 'execute'(_0x564aed){const _0x2709da=a35_0x3ad699,{dataset:_0x8c9a98,operation:_0x50976e}=await getOperationDetail(_0x564aed[_0x2709da(0xd7)],_0x564aed['str'](_0x2709da(0xc2)),_0x564aed['str'](_0x2709da(0xc4))),_0x5b92a0=generateSdkCode(_0x8c9a98,_0x50976e,{'includeImports':!_0x564aed[_0x2709da(0xce)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x8c9a98[_0x2709da(0xc5)],'code':_0x8c9a98[_0x2709da(0xc2)],'tableName':_0x8c9a98[_0x2709da(0xbd)]},'operation':_0x564aed['str'](_0x2709da(0xc4)),'code':_0x5b92a0}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a36_0x50b8(_0x343e00,_0x1e45d6){_0x343e00=_0x343e00-0x72;const _0x328f3b=a36_0x328f();let _0x50b8b6=_0x328f3b[_0x343e00];return _0x50b8b6;}const a36_0x286be4=a36_0x50b8;function a36_0x328f(){const _0x5a275a=['sdk','1392930xzbcUt','sqlcode','string','sqlName','sql','target','boolean','175272vLNqDz','120XsaJqq','bool','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','read','no-imports','215064zhijyZ','bff','appCode','1089834eFQWrV','sqlCode','30BpIRcQ','276083eHXjkt','str','598950zHqGHa','3153654hWtLAO'];a36_0x328f=function(){return _0x5a275a;};return a36_0x328f();}(function(_0x2fa3ac,_0x4f814f){const _0xd71073=a36_0x50b8,_0x153e35=_0x2fa3ac();while(!![]){try{const _0x11a99a=parseInt(_0xd71073(0x73))/0x1+-parseInt(_0xd71073(0x78))/0x2+-parseInt(_0xd71073(0x88))/0x3+-parseInt(_0xd71073(0x85))/0x4+-parseInt(_0xd71073(0x72))/0x5*(parseInt(_0xd71073(0x7f))/0x6)+parseInt(_0xd71073(0x76))/0x7+parseInt(_0xd71073(0x80))/0x8*(parseInt(_0xd71073(0x75))/0x9);if(_0x11a99a===_0x4f814f)break;else _0x153e35['push'](_0x153e35['shift']());}catch(_0x49696a){_0x153e35['push'](_0x153e35['shift']());}}}(a36_0x328f,0x6a76a));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':a36_0x286be4(0x7c),'description':a36_0x286be4(0x82),'risk':a36_0x286be4(0x83),'flags':[SQLCODE_FLAG,{'name':a36_0x286be4(0x7d),'type':a36_0x286be4(0x7a),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a36_0x286be4(0x77),'enum':[a36_0x286be4(0x77),a36_0x286be4(0x86)]},{'name':a36_0x286be4(0x84),'type':a36_0x286be4(0x7e),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x2bb3fe){const _0xf664aa=a36_0x286be4,_0xb2432d=await getSqlQueryInfo(_0x2bb3fe[_0xf664aa(0x87)],_0x2bb3fe[_0xf664aa(0x74)](_0xf664aa(0x79))),_0x5cf2be=_0x2bb3fe[_0xf664aa(0x74)](_0xf664aa(0x7d))||_0xf664aa(0x77),_0x3d49b0=generateSqlCodeTemplate(_0xb2432d,{'target':_0x5cf2be,'includeImports':!_0x2bb3fe[_0xf664aa(0x81)](_0xf664aa(0x84))});return{'ok':!![],'data':{'sqlCode':_0xb2432d[_0xf664aa(0x89)],'sqlName':_0xb2432d[_0xf664aa(0x7b)],'target':_0x5cf2be,'code':_0x3d49b0}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a37_0x4956(){const _0x566c24=['390556XOsAtM','✎\x20手动输入','2229510JlSYWN','99mTrwGQ','appCode','gray','length','请选择要绑定的应用:','未找到可用应用。','\x0a未找到可用应用。','skip','129oAHFGV','Invalid\x20App\x20Code','正在获取可用应用列表...','获取到\x20','includes','yellow','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','\x20\x20(','message','2559641fSbGhp','无法获取远程应用列表,请手动输入。','map','✎\x20自定义输入\x20appcode','valid','\x0a无法获取远程应用列表,请手动输入。','trim','请输入\x20App\x20Code:','136380mhZtVN','manual','appName','custom','571712bNhVYr','1484784wCOvJj','cyan','42608PqCAQc'];a37_0x4956=function(){return _0x566c24;};return a37_0x4956();}function a37_0x380e(_0x56b281,_0x336759){_0x56b281=_0x56b281-0xfd;const _0x49568e=a37_0x4956();let _0x380e52=_0x49568e[_0x56b281];return _0x380e52;}(function(_0x4cd2ee,_0x3d9183){const _0x37bbde=a37_0x380e,_0x58755a=_0x4cd2ee();while(!![]){try{const _0x33088f=-parseInt(_0x37bbde(0x112))/0x1+-parseInt(_0x37bbde(0x11a))/0x2+-parseInt(_0x37bbde(0x101))/0x3*(parseInt(_0x37bbde(0x119))/0x4)+parseInt(_0x37bbde(0x11c))/0x5+parseInt(_0x37bbde(0x117))/0x6+-parseInt(_0x37bbde(0x10a))/0x7+parseInt(_0x37bbde(0x116))/0x8*(parseInt(_0x37bbde(0x11d))/0x9);if(_0x33088f===_0x3d9183)break;else _0x58755a['push'](_0x58755a['shift']());}catch(_0x5d11c1){_0x58755a['push'](_0x58755a['shift']());}}}(a37_0x4956,0x4f211));import{input,checkbox,select}from'@inquirer/prompts';import a37_0x25f3b5 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x171a46=a37_0x380e,_0x446cdf=await input({'message':_0x171a46(0x111),'validate':_0x23dfe0=>{const _0x7f61fe=_0x171a46,_0x55abb2=validateAppcode(_0x23dfe0['trim']());return _0x55abb2[_0x7f61fe(0x10e)]||_0x55abb2[_0x7f61fe(0x109)]||_0x7f61fe(0x102);}});return _0x446cdf[_0x171a46(0x110)]();}export async function promptAppSelection(_0x271bc3){const _0x251c12=a37_0x380e,_0x243293=[{'name':a37_0x25f3b5[_0x251c12(0x106)](_0x251c12(0x10d)),'value':-0x1},..._0x271bc3[_0x251c12(0x10c)]((_0x512df5,_0x536298)=>({'name':_0x512df5[_0x251c12(0x114)]+'\x20\x20'+a37_0x25f3b5[_0x251c12(0x11f)]('('+_0x512df5['appCode']+')'),'value':_0x536298}))],_0x3862be=await checkbox({'message':_0x251c12(0x104)+a37_0x25f3b5[_0x251c12(0x118)](_0x271bc3['length'])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x243293,'loop':![]});if(_0x3862be[_0x251c12(0x105)](-0x1))return _0x251c12(0x115);if(_0x3862be['length']===0x0)return _0x251c12(0x115);return _0x3862be['map'](_0x34a093=>_0x271bc3[_0x34a093]);}export async function promptSingleAppSelection(_0x2aca42){const _0x5cfe00=a37_0x380e,_0x38d3b9=[{'name':a37_0x25f3b5[_0x5cfe00(0x11f)]('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x5cfe00(0x100)},{'name':a37_0x25f3b5[_0x5cfe00(0x106)](_0x5cfe00(0x10d)),'value':_0x5cfe00(0x115)},..._0x2aca42[_0x5cfe00(0x10c)](_0x3184b6=>({'name':_0x3184b6[_0x5cfe00(0x114)]+'\x20\x20'+a37_0x25f3b5[_0x5cfe00(0x11f)]('('+_0x3184b6[_0x5cfe00(0x11e)]+')'),'value':_0x3184b6[_0x5cfe00(0x11e)]}))],_0x2d0141=await select({'message':_0x5cfe00(0xfd),'choices':_0x38d3b9});if(_0x2d0141===_0x5cfe00(0x100))return _0x5cfe00(0x100);if(_0x2d0141===_0x5cfe00(0x115))return _0x5cfe00(0x115);return _0x2aca42['find'](_0x215a90=>_0x215a90[_0x5cfe00(0x11e)]===_0x2d0141);}export async function selectSingleAppcode(_0x5b6fe9){const _0xcc3a44=a37_0x380e;if(!_0x5b6fe9)return writeCliSideChannelLine(a37_0x25f3b5[_0xcc3a44(0x11f)](_0xcc3a44(0x107))),_fallbackOrSkip();writeCliSideChannelLine(_0xcc3a44(0x103));let _0x30f626;try{_0x30f626=await withActiveCookie(_0x5b6fe9,()=>listRemoteApps());}catch(_0x405473){writeCliSideChannelLine(a37_0x25f3b5[_0xcc3a44(0x106)](_0xcc3a44(0x10b)));if(_0x405473 instanceof Error)writeCliSideChannelLine(a37_0x25f3b5[_0xcc3a44(0x11f)]('\x20\x20('+_0x405473[_0xcc3a44(0x109)]+')'));return _fallbackOrSkip();}if(_0x30f626[_0xcc3a44(0x120)]===0x0)return writeCliSideChannelLine(a37_0x25f3b5[_0xcc3a44(0x106)](_0xcc3a44(0xfe))),_fallbackOrSkip();const _0x4a1524=await promptSingleAppSelection(_0x30f626);if(_0x4a1524===_0xcc3a44(0x100))return'';if(_0x4a1524===_0xcc3a44(0x115))return promptCustomAppcode();return _0x4a1524[_0xcc3a44(0x11e)];}export async function selectMultipleApps(_0x5d448a){const _0x33eab6=a37_0x380e;writeCliSideChannelLine('正在获取可用应用列表...');let _0x251aab;try{_0x251aab=await withActiveCookie(_0x5d448a,()=>listRemoteApps());}catch(_0x3bcb43){writeCliSideChannelLine(_0x33eab6(0x10f));if(_0x3bcb43 instanceof Error)writeCliSideChannelLine(_0x33eab6(0x108)+_0x3bcb43[_0x33eab6(0x109)]+')');return _0x33eab6(0x115);}if(_0x251aab['length']===0x0)return writeCliSideChannelLine(_0x33eab6(0xff)),_0x33eab6(0x115);return promptAppSelection(_0x251aab);}async function _fallbackOrSkip(){const _0x418f03=a37_0x380e,_0x534eaf=await select({'message':'App\x20Code:','choices':[{'name':a37_0x25f3b5[_0x418f03(0x11f)]('(跳过,稍后配置)'),'value':_0x418f03(0x100)},{'name':a37_0x25f3b5[_0x418f03(0x106)](_0x418f03(0x11b)),'value':_0x418f03(0x113)}]});if(_0x534eaf===_0x418f03(0x100))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a38_0x507a(_0x35b5cf,_0x878503){_0x35b5cf=_0x35b5cf-0x187;const _0x4f8faa=a38_0x4f8f();let _0x507a17=_0x4f8faa[_0x35b5cf];return _0x507a17;}const a38_0x1a41db=a38_0x507a;(function(_0x5f226d,_0x429e81){const _0x16a43f=a38_0x507a,_0x288e7b=_0x5f226d();while(!![]){try{const _0x349b12=parseInt(_0x16a43f(0x19e))/0x1*(parseInt(_0x16a43f(0x192))/0x2)+parseInt(_0x16a43f(0x197))/0x3*(-parseInt(_0x16a43f(0x18a))/0x4)+parseInt(_0x16a43f(0x18c))/0x5+-parseInt(_0x16a43f(0x18f))/0x6+-parseInt(_0x16a43f(0x193))/0x7*(parseInt(_0x16a43f(0x191))/0x8)+-parseInt(_0x16a43f(0x194))/0x9+-parseInt(_0x16a43f(0x189))/0xa*(-parseInt(_0x16a43f(0x198))/0xb);if(_0x349b12===_0x429e81)break;else _0x288e7b['push'](_0x288e7b['shift']());}catch(_0x557c38){_0x288e7b['push'](_0x288e7b['shift']());}}}(a38_0x4f8f,0x31f1a));function a38_0x4f8f(){const _0x29a44f=['POSTGRESQL','54htfOGQ','11jYfmWU','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','string','appcode','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','1npTYIP','MYSQL','sqlcode','6276230NRuSfo','15388RKimyK','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','1748760sOHeXk','Dataset\x20code\x20(32-char\x20hex\x20UUID)','code','1889232qiOtBt','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','776KZnMRR','299470Kvtckp','21287HpSoEb','2191005govDet','number'];a38_0x4f8f=function(){return _0x29a44f;};return a38_0x4f8f();}export const CODE_FLAG={'name':a38_0x1a41db(0x18e),'type':a38_0x1a41db(0x19b),'required':!![],'description':a38_0x1a41db(0x18d),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a38_0x1a41db(0x18b)}};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const SQLCODE_FLAG={'name':a38_0x1a41db(0x188),'type':a38_0x1a41db(0x19b),'required':!![],'description':a38_0x1a41db(0x19d),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a38_0x1a41db(0x199)}};export const APPCODE_FLAG_OPTIONAL={'name':a38_0x1a41db(0x19c),'type':a38_0x1a41db(0x19b),'required':![],'description':a38_0x1a41db(0x19a)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a38_0x1a41db(0x195),'required':!![],'description':a38_0x1a41db(0x190)};export const DB_TYPE_FLAG={'name':'dbtype','type':a38_0x1a41db(0x19b),'required':!![],'description':'Database\x20product\x20type','enum':[a38_0x1a41db(0x187),a38_0x1a41db(0x196)]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a39_0x1623(_0x21b4b3,_0x1842ef){_0x21b4b3=_0x21b4b3-0xe8;const _0x3aa599=a39_0x3aa5();let _0x162318=_0x3aa599[_0x21b4b3];return _0x162318;}(function(_0x5aa1d7,_0x3f5418){const _0x36d2e0=a39_0x1623,_0x3c126f=_0x5aa1d7();while(!![]){try{const _0x1e7af7=parseInt(_0x36d2e0(0xf0))/0x1+parseInt(_0x36d2e0(0xf4))/0x2+parseInt(_0x36d2e0(0xed))/0x3*(-parseInt(_0x36d2e0(0xea))/0x4)+parseInt(_0x36d2e0(0xf2))/0x5*(parseInt(_0x36d2e0(0xe9))/0x6)+-parseInt(_0x36d2e0(0xee))/0x7*(parseInt(_0x36d2e0(0xef))/0x8)+-parseInt(_0x36d2e0(0xf1))/0x9+parseInt(_0x36d2e0(0xf5))/0xa*(parseInt(_0x36d2e0(0xf3))/0xb);if(_0x1e7af7===_0x3f5418)break;else _0x3c126f['push'](_0x3c126f['shift']());}catch(_0x115590){_0x3c126f['push'](_0x3c126f['shift']());}}}(a39_0x3aa5,0x19abf));function a39_0x3aa5(){const _0x458f4c=['33808vIXnEd','63234NIiUfB','1485819QrFQfV','390865KWkPsl','27093LQmZwE','362078ohMJgP','730owdPcB','length','test','App\x20Code\x20cannot\x20be\x20empty','6dKDeuA','1628Hreluk','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','App\x20Code\x20cannot\x20exceed\x20100\x20characters','651ULfjie','238AgwtuJ'];a39_0x3aa5=function(){return _0x458f4c;};return a39_0x3aa5();}export function validateAppcode(_0x28f851){const _0x3c1a5d=a39_0x1623,_0x44689a=_0x28f851['trim']();if(!_0x44689a)return{'valid':![],'message':_0x3c1a5d(0xe8)};if(_0x44689a[_0x3c1a5d(0xf6)]>0x64)return{'valid':![],'message':_0x3c1a5d(0xec)};if(!/^[A-Za-z0-9_-]+$/[_0x3c1a5d(0xf7)](_0x44689a))return{'valid':![],'message':_0x3c1a5d(0xeb)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a40_0x197f0f=a40_0x2077;(function(_0x27a56e,_0x8e34fa){const _0x121e89=a40_0x2077,_0x1a8adb=_0x27a56e();while(!![]){try{const _0x1afcdf=-parseInt(_0x121e89(0x1d2))/0x1*(-parseInt(_0x121e89(0x1cc))/0x2)+parseInt(_0x121e89(0x1cd))/0x3*(-parseInt(_0x121e89(0x1ca))/0x4)+parseInt(_0x121e89(0x1d1))/0x5*(parseInt(_0x121e89(0x1c5))/0x6)+-parseInt(_0x121e89(0x1c8))/0x7+parseInt(_0x121e89(0x1be))/0x8*(parseInt(_0x121e89(0x1bd))/0x9)+parseInt(_0x121e89(0x1c9))/0xa+-parseInt(_0x121e89(0x1d0))/0xb*(parseInt(_0x121e89(0x1cf))/0xc);if(_0x1afcdf===_0x8e34fa)break;else _0x1a8adb['push'](_0x1a8adb['shift']());}catch(_0x3f72a0){_0x1a8adb['push'](_0x1a8adb['shift']());}}}(a40_0x3ef8,0x9bcbe));function a40_0x2077(_0x1ebb6e,_0x40c16b){_0x1ebb6e=_0x1ebb6e-0x1bd;const _0x3ef852=a40_0x3ef8();let _0x20771e=_0x3ef852[_0x1ebb6e];return _0x20771e;}function a40_0x3ef8(){const _0x1cf78d=['Config\x20key\x20to\x20read','Usage:\x20','get','app','read','Get\x20a\x20config\x20value\x20by\x20key','6SwqQGS','object','config','1169973xSxtnQ','6952360nifsin','1828MpOffj','key','1260802nfXchF','6351LiGzda','\x20config\x20get\x20--key\x20<key>','3195336tNeRlW','55RnInyR','577195EkcmIZ','2QnFeAb','27oAtKbL','2753768ylplZH'];a40_0x3ef8=function(){return _0x1cf78d;};return a40_0x3ef8();}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';async function execute(_0x2c80a2){const _0x40e8a8=a40_0x2077,_0x1445ce=_0x2c80a2['str'](_0x40e8a8(0x1cb));if(!_0x1445ce)throw CliErrors['validation']('Missing\x20key.',_0x40e8a8(0x1c0)+CLI_BIN_NAME+_0x40e8a8(0x1ce));const _0x17b139=readConfig(),_0x542a98=_0x1445ce===_0x40e8a8(0x1c2)?'appcode':_0x1445ce,_0x37d95b=_0x17b139[_0x542a98];if(_0x37d95b===undefined)throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x1445ce);return{'ok':!![],'data':typeof _0x37d95b===_0x40e8a8(0x1c6)?_0x37d95b:{[_0x542a98]:_0x37d95b},'message':typeof _0x37d95b===_0x40e8a8(0x1c6)?undefined:String(_0x37d95b)};}export const configGetDefinition={'service':a40_0x197f0f(0x1c7),'command':a40_0x197f0f(0x1c1),'description':a40_0x197f0f(0x1c4),'risk':a40_0x197f0f(0x1c3),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':'string','description':a40_0x197f0f(0x1bf),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xfe6eb,_0x3b7588){const _0x344cd9=a41_0x3535,_0x37779c=_0xfe6eb();while(!![]){try{const _0x1f227b=parseInt(_0x344cd9(0x182))/0x1+-parseInt(_0x344cd9(0x184))/0x2+parseInt(_0x344cd9(0x181))/0x3+-parseInt(_0x344cd9(0x187))/0x4*(-parseInt(_0x344cd9(0x180))/0x5)+-parseInt(_0x344cd9(0x186))/0x6+-parseInt(_0x344cd9(0x185))/0x7+-parseInt(_0x344cd9(0x188))/0x8*(-parseInt(_0x344cd9(0x183))/0x9);if(_0x1f227b===_0x3b7588)break;else _0x37779c['push'](_0x37779c['shift']());}catch(_0x114948){_0x37779c['push'](_0x37779c['shift']());}}}(a41_0x2d7d,0xae78d));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a41_0x2d7d(){const _0x32ff85=['3064JQYbtl','299615vkUMdS','525504Wxzpzq','1127255mSFFTC','12609xvgEUI','1228232iNZrjf','379225hjVfuC','4893696tJzEJp','24niayRH'];a41_0x2d7d=function(){return _0x32ff85;};return a41_0x2d7d();}import{configSetDefinition}from'../../commands/config/set.js';function a41_0x3535(_0x57687a,_0x5b6f19){_0x57687a=_0x57687a-0x180;const _0x2d7d83=a41_0x2d7d();let _0x353526=_0x2d7d83[_0x57687a];return _0x353526;}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x3293f2=a42_0x43f6;(function(_0x5d44fb,_0x1349c9){const _0x5c6068=a42_0x43f6,_0x16fd8b=_0x5d44fb();while(!![]){try{const _0x4f368d=parseInt(_0x5c6068(0xb8))/0x1+-parseInt(_0x5c6068(0xb4))/0x2+parseInt(_0x5c6068(0xb9))/0x3*(-parseInt(_0x5c6068(0xbb))/0x4)+parseInt(_0x5c6068(0xb3))/0x5+parseInt(_0x5c6068(0xb2))/0x6+-parseInt(_0x5c6068(0xb0))/0x7+-parseInt(_0x5c6068(0xbe))/0x8*(parseInt(_0x5c6068(0xba))/0x9);if(_0x4f368d===_0x1349c9)break;else _0x16fd8b['push'](_0x16fd8b['shift']());}catch(_0x5543fd){_0x16fd8b['push'](_0x16fd8b['shift']());}}}(a42_0x101e,0x4c3e3));function a42_0x101e(){const _0xc233e0=['459517xqHmqX','1695eCJjsO','6453mcxMPw','2316SsgiIO','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','boolean','6104xnFZIP','list','1636299PxyDYS','bool','3488850vLVuxL','2621220PDfzoP','289964IXZmjC','global','config','List\x20all\x20config\x20values'];a42_0x101e=function(){return _0xc233e0;};return a42_0x101e();}function a42_0x43f6(_0x2ba264,_0x447ce5){_0x2ba264=_0x2ba264-0xb0;const _0x101e96=a42_0x101e();let _0x43f657=_0x101e96[_0x2ba264];return _0x43f657;}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x43a36c){const _0x3a4aa1=a42_0x43f6,_0x17fc95=_0x43a36c[_0x3a4aa1(0xb1)]('global')?readScopedConfig(_0x3a4aa1(0xb5)):readConfig();return{'ok':!![],'data':_0x17fc95};}export const configListDefinition={'service':a42_0x3293f2(0xb6),'command':a42_0x3293f2(0xbf),'description':a42_0x3293f2(0xb7),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a42_0x3293f2(0xb5),'type':a42_0x3293f2(0xbd),'description':a42_0x3293f2(0xbc),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a43_0x31528f=a43_0xa575;function a43_0xa575(_0x6050a2,_0x3a4140){_0x6050a2=_0x6050a2-0x128;const _0x1180d9=a43_0x1180();let _0xa57548=_0x1180d9[_0x6050a2];return _0xa57548;}(function(_0x449d7d,_0x1c0196){const _0x39f6ba=a43_0xa575,_0x4fe3ac=_0x449d7d();while(!![]){try{const _0x226c3c=-parseInt(_0x39f6ba(0x131))/0x1*(parseInt(_0x39f6ba(0x142))/0x2)+-parseInt(_0x39f6ba(0x12b))/0x3*(parseInt(_0x39f6ba(0x144))/0x4)+-parseInt(_0x39f6ba(0x145))/0x5*(-parseInt(_0x39f6ba(0x13a))/0x6)+parseInt(_0x39f6ba(0x152))/0x7*(-parseInt(_0x39f6ba(0x14a))/0x8)+parseInt(_0x39f6ba(0x138))/0x9+parseInt(_0x39f6ba(0x13d))/0xa*(parseInt(_0x39f6ba(0x128))/0xb)+parseInt(_0x39f6ba(0x137))/0xc;if(_0x226c3c===_0x1c0196)break;else _0x4fe3ac['push'](_0x4fe3ac['shift']());}catch(_0x3cd399){_0x4fe3ac['push'](_0x4fe3ac['shift']());}}}(a43_0x1180,0xe2658));function a43_0x1180(){const _0x1e2d25=['set','40syViau','appcode','length','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','str','riskLevel','14998476iioFth','3997593IzWTQf','Invalid\x20locale\x20value.','1164Zsyuae','Global','boolean','10oFrpRK','Usage:\x20','locale','Project','write','56458WVSIQR','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','5288008ocpVqS','42990ixpVHS','app','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','global','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','1157704AELMBS','env','Set\x20a\x20config\x20value','value','config','Config\x20key','Missing\x20value.','bool','21kRZdCy','4956149GtDbMa','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','validation','3jZYbiK','Config\x20value','key','\x20set\x20to:\x20','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.'];a43_0x1180=function(){return _0x1e2d25;};return a43_0x1180();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x34837c){const _0x6dc5c2=a43_0xa575,_0x5c6f9c=_0x34837c[_0x6dc5c2(0x135)](_0x6dc5c2(0x12d)),_0x2cfc81=_0x34837c[_0x6dc5c2(0x135)](_0x6dc5c2(0x14d));if(!_0x5c6f9c)throw CliErrors[_0x6dc5c2(0x12a)]('Missing\x20key.','Usage:\x20'+CLI_BIN_NAME+_0x6dc5c2(0x149));if(_0x2cfc81===undefined||_0x2cfc81==='')throw CliErrors['validation'](_0x6dc5c2(0x150),_0x6dc5c2(0x13e)+CLI_BIN_NAME+_0x6dc5c2(0x149));if(_0x2cfc81[_0x6dc5c2(0x133)]>0x1f4)throw CliErrors[_0x6dc5c2(0x12a)](_0x6dc5c2(0x12f));if(_0x5c6f9c===_0x6dc5c2(0x136))throw CliErrors[_0x6dc5c2(0x12a)](_0x6dc5c2(0x129));if(_0x5c6f9c===_0x6dc5c2(0x13f)&&!normalizeLocale(_0x2cfc81))throw CliErrors[_0x6dc5c2(0x12a)](_0x6dc5c2(0x139),_0x6dc5c2(0x143));const _0x2189c5={'global':_0x34837c[_0x6dc5c2(0x151)]('global')},_0x159e4b=resolveWriteScope(_0x2189c5),_0x58d945=readScopedConfig(_0x159e4b);let _0x7429a=_0x5c6f9c,_0x125d10=_0x2cfc81;_0x5c6f9c==='app'&&(_0x7429a=_0x6dc5c2(0x132),delete _0x58d945[_0x6dc5c2(0x146)]);_0x5c6f9c===_0x6dc5c2(0x132)&&delete _0x58d945[_0x6dc5c2(0x146)];_0x5c6f9c===_0x6dc5c2(0x13f)&&(_0x125d10=normalizeLocale(_0x2cfc81));if(_0x5c6f9c===_0x6dc5c2(0x14b)){_0x125d10=normalizeEnv(_0x2cfc81);if(!isProduction(_0x125d10)&&!isDaily(_0x125d10))throw CliErrors[_0x6dc5c2(0x12a)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x6dc5c2(0x134));}_0x58d945[_0x7429a]=_0x125d10,writeScopedConfig(_0x58d945,_0x159e4b);const _0x3ce763=_0x159e4b===_0x6dc5c2(0x148)?_0x6dc5c2(0x13b):_0x6dc5c2(0x140);return{'ok':!![],'message':'✓\x20'+_0x3ce763+'\x20'+_0x7429a+_0x6dc5c2(0x12e)+_0x125d10};}export const configSetDefinition={'service':a43_0x31528f(0x14e),'command':a43_0x31528f(0x130),'description':a43_0x31528f(0x14c),'risk':a43_0x31528f(0x141),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x31528f(0x12d),'type':'string','description':a43_0x31528f(0x14f),'required':!![]},{'name':a43_0x31528f(0x14d),'type':'string','description':a43_0x31528f(0x12c),'required':!![]},{'name':a43_0x31528f(0x148),'type':a43_0x31528f(0x13c),'description':a43_0x31528f(0x147),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0x10381e=a44_0x6c0d;(function(_0x1337f3,_0x43f55d){const _0x5097e3=a44_0x6c0d,_0x17227e=_0x1337f3();while(!![]){try{const _0x15bdf3=-parseInt(_0x5097e3(0x115))/0x1+parseInt(_0x5097e3(0x110))/0x2*(parseInt(_0x5097e3(0x118))/0x3)+-parseInt(_0x5097e3(0x10a))/0x4*(-parseInt(_0x5097e3(0x114))/0x5)+-parseInt(_0x5097e3(0x117))/0x6+parseInt(_0x5097e3(0x10e))/0x7+-parseInt(_0x5097e3(0x10b))/0x8+parseInt(_0x5097e3(0x10c))/0x9;if(_0x15bdf3===_0x43f55d)break;else _0x17227e['push'](_0x17227e['shift']());}catch(_0x6686cf){_0x17227e['push'](_0x17227e['shift']());}}}(a44_0x47e5,0xced10));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';export{CLI_BIN_NAME};const LOCALE_MAP={'zh':a44_0x10381e(0x10d),'zh-cn':a44_0x10381e(0x10d),'zh_cn':'zh-CN','en':a44_0x10381e(0x113),'en-us':a44_0x10381e(0x113),'en_us':a44_0x10381e(0x113)};function a44_0x6c0d(_0x1b9dbe,_0x42fa3d){_0x1b9dbe=_0x1b9dbe-0x10a;const _0x47e5bf=a44_0x47e5();let _0x6c0d1f=_0x47e5bf[_0x1b9dbe];return _0x6c0d1f;}export function normalizeLocale(_0x1f49f0){const _0x7b1ef1=a44_0x10381e;if(!_0x1f49f0)return null;return LOCALE_MAP[_0x1f49f0[_0x7b1ef1(0x111)]()]??null;}export function resolveWriteScope(_0x58113a){const _0x4d6f10=a44_0x10381e;if(_0x58113a[_0x4d6f10(0x112)])return _0x4d6f10(0x112);if(!isInProject())throw CliErrors['validation'](_0x4d6f10(0x116),'Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+_0x4d6f10(0x10f));return'project';}export function readScopedConfig(_0xd347de){return readConfigFile(resolveWriteConfigPath(_0xd347de));}export function writeScopedConfig(_0x43f577,_0x1ed35f){writeConfigFile(resolveWriteConfigPath(_0x1ed35f),_0x43f577);}function a44_0x47e5(){const _0xdbcaa9=['18977229XGFadm','zh-CN','3774904diXsDS','\x20init`\x20first.','2gsdKQY','toLowerCase','global','en-US','1401205KqZNUP','774984XjAtUM','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','8103240vyHzev','2429217oHWITd','4akzCKh','6121512Dkkelb'];a44_0x47e5=function(){return _0xdbcaa9;};return a44_0x47e5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x1897eb=a45_0xb201;(function(_0x3f38c7,_0xc505f6){const _0x2342a0=a45_0xb201,_0x32a040=_0x3f38c7();while(!![]){try{const _0x3a6a53=-parseInt(_0x2342a0(0x160))/0x1*(-parseInt(_0x2342a0(0x140))/0x2)+-parseInt(_0x2342a0(0x167))/0x3+-parseInt(_0x2342a0(0x151))/0x4*(parseInt(_0x2342a0(0x16b))/0x5)+-parseInt(_0x2342a0(0x13b))/0x6*(parseInt(_0x2342a0(0x171))/0x7)+-parseInt(_0x2342a0(0x158))/0x8+parseInt(_0x2342a0(0x143))/0x9+parseInt(_0x2342a0(0x156))/0xa;if(_0x3a6a53===_0xc505f6)break;else _0x32a040['push'](_0x32a040['shift']());}catch(_0xadeed1){_0x32a040['push'](_0x32a040['shift']());}}}(a45_0xad80,0x5d786));function a45_0xb201(_0x4ac430,_0x1594a0){_0x4ac430=_0x4ac430-0x13a;const _0xad8096=a45_0xad80();let _0xb201f2=_0xad8096[_0x4ac430];return _0xb201f2;}import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x269157){const _0xfa5ce9=a45_0xb201;if(_0x269157[_0xfa5ce9(0x17e)])return null;const _0x537133=Boolean(_0x269157[_0xfa5ce9(0x17d)]!==undefined||_0x269157[_0xfa5ce9(0x174)]!==undefined);let _0x3ea816={};if(!_0x537133&&typeof _0x269157[_0xfa5ce9(0x17b)]===_0xfa5ce9(0x180))try{_0x3ea816=JSON[_0xfa5ce9(0x177)](_0x269157[_0xfa5ce9(0x17b)]);}catch{}const _0x23b8c7=_0x537133?_0x269157[_0xfa5ce9(0x170)]:_0x269157[_0xfa5ce9(0x162)],_0xb2ea94=_0x537133?_0x269157[_0xfa5ce9(0x17d)]:_0x269157[_0xfa5ce9(0x170)],_0x4727f3=_0x537133?_0x269157['doType']:_0x269157[_0xfa5ce9(0x14f)]||_0x269157[_0xfa5ce9(0x14a)],_0x1722df=_0x537133?_0x269157[_0xfa5ce9(0x14d)]===!![]:_0x3ea816[_0xfa5ce9(0x14d)]===!![],_0x30249c=_0x537133?_0x269157['required']===!![]:_0x3ea816[_0xfa5ce9(0x154)]===!![],_0x677890=_0x537133?_0x269157[_0xfa5ce9(0x145)]??null:_0x3ea816[_0xfa5ce9(0x145)]??null,_0x470079={'name':_0x23b8c7,'displayName':_0xb2ea94||_0x23b8c7,'type':_0x4727f3,'dbType':_0x269157[_0xfa5ce9(0x16e)],'pk':_0x1722df,'required':_0x30249c,'description':_0x269157[_0xfa5ce9(0x176)]||undefined};return Array['isArray'](_0x677890)&&_0x677890[_0xfa5ce9(0x168)]>0x0&&(_0x470079[_0xfa5ce9(0x145)]=_0x677890),_0x470079;}function parseJsonMaybe(_0x23462e){const _0x42877b=a45_0xb201;if(typeof _0x23462e!==_0x42877b(0x180))return _0x23462e;try{return JSON[_0x42877b(0x177)](_0x23462e);}catch{return _0x23462e;}}function normalizeOperationEntry(_0x39ee03,_0x4b7c25){const _0x15907d=a45_0xb201;if(!_0x4b7c25||typeof _0x4b7c25!==_0x15907d(0x179))return null;if(!_0x4b7c25['method']||!_0x4b7c25['path'])return null;const _0x38c3a0={'name':_0x39ee03,'method':_0x4b7c25[_0x15907d(0x147)],'path':_0x4b7c25[_0x15907d(0x181)]};if(_0x4b7c25[_0x15907d(0x186)])_0x38c3a0[_0x15907d(0x186)]=_0x4b7c25['host'];if(_0x4b7c25['requestBody']!=null){const _0x4b51ef=parseJsonMaybe(_0x4b7c25[_0x15907d(0x14b)]);_0x38c3a0[_0x15907d(0x14b)]=_0x4b51ef;}if(_0x4b7c25['responseBody']!=null){const _0x2e145c=parseJsonMaybe(_0x4b7c25['responseBody']);_0x38c3a0[_0x15907d(0x169)]=_0x2e145c;}if(_0x4b7c25['beforeScriptId']!=null)_0x38c3a0[_0x15907d(0x141)]=_0x4b7c25[_0x15907d(0x141)];if(_0x4b7c25[_0x15907d(0x153)]!=null)_0x38c3a0[_0x15907d(0x153)]=_0x4b7c25[_0x15907d(0x153)];if(Array[_0x15907d(0x15f)](_0x4b7c25[_0x15907d(0x13c)]))_0x38c3a0[_0x15907d(0x13c)]=_0x4b7c25[_0x15907d(0x13c)];if(Array[_0x15907d(0x15f)](_0x4b7c25[_0x15907d(0x15d)]))_0x38c3a0['responseFields']=_0x4b7c25[_0x15907d(0x15d)];return _0x38c3a0;}function summarizeDbtable(_0x5b0e9a){const _0x4a95e1=a45_0xb201,_0x441277={},_0x14c843=[_0x4a95e1(0x13e),_0x4a95e1(0x187),_0x4a95e1(0x152),_0x4a95e1(0x150),'pkField',_0x4a95e1(0x14c),_0x4a95e1(0x16d),_0x4a95e1(0x165),_0x4a95e1(0x185),_0x4a95e1(0x15a),_0x4a95e1(0x146),_0x4a95e1(0x148),_0x4a95e1(0x163),'labelField',_0x4a95e1(0x15c)];for(const _0x414906 of _0x14c843){if(_0x5b0e9a[_0x414906]!==undefined)_0x441277[_0x414906]=_0x5b0e9a[_0x414906];}return typeof _0x441277['allFields']===_0x4a95e1(0x180)&&_0x441277[_0x4a95e1(0x14c)][_0x4a95e1(0x168)]>0x0&&(_0x441277['allFieldNames']=_0x441277[_0x4a95e1(0x14c)][_0x4a95e1(0x166)](',')['map'](_0x718bc7=>_0x718bc7[_0x4a95e1(0x164)]())[_0x4a95e1(0x142)](Boolean)),_0x441277;}function normalizeRelatedPages(_0x182088){const _0x558228=a45_0xb201;if(!Array[_0x558228(0x15f)](_0x182088))return[];return _0x182088[_0x558228(0x142)](_0x20ad82=>_0x20ad82&&typeof _0x20ad82===_0x558228(0x179))[_0x558228(0x172)](_0x298e5a=>({'id':_0x298e5a['id'],'type':_0x298e5a['type'],'code':_0x298e5a[_0x558228(0x162)],'title':_0x298e5a[_0x558228(0x149)],'deleted':_0x298e5a[_0x558228(0x17e)]===!![]}));}function a45_0xad80(){const _0x4e866f=['alias','14782470gVPQSE','operations','4342440IkdxZd','relations','creatorIdField','indexes','dblinkInfoDTO','responseFields','push','isArray','59svCbBt','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','code','modifierNameField','trim','createTimeField','split','739920RBzpfY','length','responseBody','entries','5lgfTmR','source','logicField','dbType','toField','name','154iyucfh','map','validateRules','doType','read','description','parse','dataset','object','toFieldLabel','extend','fields','displayName','deleted','modelCode','string','path','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','columnCodeListWithDeleted','toDatasetName','updateTimeField','host','dbName','modelId','166794ICmCjs','requestFields','sourceType','dbId','relatedPageInfoList','22762JToXLY','beforeScriptId','filter','2268810VCUTYU','properties','options','creatorNameField','method','modifierIdField','title','dataType','requestBody','allFields','pkField','detail','type','datasetKey','2471756WqqJLk','tableName','afterScriptId','required'];a45_0xad80=function(){return _0x4e866f;};return a45_0xad80();}export const datasetDetail={'service':a45_0x1897eb(0x178),'command':a45_0x1897eb(0x14e),'description':a45_0x1897eb(0x161),'risk':a45_0x1897eb(0x175),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a45_0x1897eb(0x155),'type':a45_0x1897eb(0x180),'description':a45_0x1897eb(0x182)}],async 'execute'(_0x5b13dc){const _0xd6c819=a45_0x1897eb,_0xd51892=await getDatasetDetail(_0x5b13dc['str'](_0xd6c819(0x162))),_0x2f1707=Array[_0xd6c819(0x15f)](_0xd51892[_0xd6c819(0x17c)])?_0xd51892[_0xd6c819(0x17c)]:Array[_0xd6c819(0x15f)](_0xd51892[_0xd6c819(0x144)])?_0xd51892[_0xd6c819(0x144)]:[],_0x32411f=_0x2f1707[_0xd6c819(0x172)](_0x2cc414=>normalizeField(_0x2cc414))[_0xd6c819(0x142)](_0x2b479e=>_0x2b479e!==null),_0x58fdc4=_0xd51892[_0xd6c819(0x157)]??{},_0x44a8be=[];for(const [_0x5b6ab2,_0x124ff1]of Object[_0xd6c819(0x16a)](_0x58fdc4)){const _0x35b1f3=normalizeOperationEntry(_0x5b6ab2,_0x124ff1);if(_0x35b1f3)_0x44a8be[_0xd6c819(0x15e)](_0x35b1f3);}const _0x4c40a7=_0xd51892['dbtableConfig']??{},_0x487723=_0xd51892[_0xd6c819(0x178)]??{},_0x3a0f71=_0x4c40a7[_0xd6c819(0x13e)]!=null?{'id':_0x4c40a7[_0xd6c819(0x13e)],'name':_0x4c40a7[_0xd6c819(0x187)]??null}:undefined;let _0x1a96cf;return typeof _0xd51892['extend']===_0xd6c819(0x180)&&(_0x1a96cf=parseJsonMaybe(_0xd51892[_0xd6c819(0x17b)])),{'ok':!![],'data':{'id':_0xd51892[_0xd6c819(0x13a)]??_0xd51892['id'],'name':_0xd51892[_0xd6c819(0x170)],'code':_0xd51892[_0xd6c819(0x17f)]||_0xd51892['code'],'doVersion':_0xd51892['doVersion'],'description':_0xd51892[_0xd6c819(0x176)]||_0x487723['tableComment']||undefined,'source':_0xd51892[_0xd6c819(0x16c)]||_0x487723[_0xd6c819(0x13d)],'table':_0x4c40a7['tableName']||_0x487723[_0xd6c819(0x152)],'datasetKey':_0x4c40a7[_0xd6c819(0x150)],'pk':_0x4c40a7[_0xd6c819(0x14d)],'db':_0x3a0f71,'dbtable':summarizeDbtable(_0x4c40a7),'fields':_0x32411f,'operations':_0x44a8be,'indexes':Array['isArray'](_0x487723['indexes'])?_0x487723[_0xd6c819(0x15b)]:[],'relations':Array[_0xd6c819(0x15f)](_0xd51892[_0xd6c819(0x159)])?_0xd51892[_0xd6c819(0x159)][_0xd6c819(0x172)](_0x45dfb8=>({'fromField':_0x45dfb8['fromField'],'toDataset':_0x45dfb8[_0xd6c819(0x184)],'toCode':_0x45dfb8['toDatasetCode'],'toTable':_0x45dfb8['toTableName'],'toField':_0x45dfb8[_0xd6c819(0x16f)],'labelField':_0x45dfb8[_0xd6c819(0x17a)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0xd51892[_0xd6c819(0x13f)]),...Array[_0xd6c819(0x15f)](_0xd51892[_0xd6c819(0x183)])?{'columnCodeListWithDeleted':_0xd51892[_0xd6c819(0x183)]}:{},'formatRules':Array[_0xd6c819(0x15f)](_0xd51892['formatRules'])?_0xd51892['formatRules']:[],'validateRules':Array['isArray'](_0xd51892[_0xd6c819(0x173)])?_0xd51892['validateRules']:[],..._0x1a96cf!==undefined?{'extend':_0x1a96cf}:{},'stats':{'fieldCount':_0x32411f[_0xd6c819(0x168)],'operationCount':_0x44a8be[_0xd6c819(0x168)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6c0ea8,_0x1a5e9d){const _0x151da2=a46_0x42de,_0xcf6f2d=_0x6c0ea8();while(!![]){try{const _0x3481a5=parseInt(_0x151da2(0xf4))/0x1*(-parseInt(_0x151da2(0xfd))/0x2)+parseInt(_0x151da2(0xf7))/0x3*(-parseInt(_0x151da2(0xf9))/0x4)+parseInt(_0x151da2(0xf8))/0x5+-parseInt(_0x151da2(0xfb))/0x6*(-parseInt(_0x151da2(0xf5))/0x7)+-parseInt(_0x151da2(0xf3))/0x8+parseInt(_0x151da2(0xf6))/0x9+parseInt(_0x151da2(0xfa))/0xa*(-parseInt(_0x151da2(0xfc))/0xb);if(_0x3481a5===_0x1a5e9d)break;else _0xcf6f2d['push'](_0xcf6f2d['shift']());}catch(_0x1c3e8d){_0xcf6f2d['push'](_0xcf6f2d['shift']());}}}(a46_0x229b,0xa090c));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';function a46_0x229b(){const _0x344468=['8718448MAgnha','9341ToDtbX','21Yhxkbt','11803608MIEAsb','30WGldqd','3887820WchAVc','391880rSJSSL','161930IXeagr','1345962lYQxig','11coyLYW','4RUCnrH'];a46_0x229b=function(){return _0x344468;};return a46_0x229b();}import{datasetOperations}from'../../commands/dataset/operations.js';import{datasetLinks}from'../../commands/dataset/links.js';function a46_0x42de(_0x1e1dd3,_0x46953d){_0x1e1dd3=_0x1e1dd3-0xf3;const _0x229bd1=a46_0x229b();let _0x42de65=_0x229bd1[_0x1e1dd3];return _0x42de65;}export const datasetDefinitions=[datasetList,datasetDetail,datasetOperations,datasetLinks];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x44dbcb=a47_0x53e7;(function(_0x183bb7,_0x3edc27){const _0x2875c9=a47_0x53e7,_0x1aa546=_0x183bb7();while(!![]){try{const _0x13f4c4=-parseInt(_0x2875c9(0x8f))/0x1+parseInt(_0x2875c9(0x9b))/0x2*(-parseInt(_0x2875c9(0x92))/0x3)+parseInt(_0x2875c9(0x88))/0x4*(-parseInt(_0x2875c9(0x79))/0x5)+parseInt(_0x2875c9(0x93))/0x6*(parseInt(_0x2875c9(0x81))/0x7)+-parseInt(_0x2875c9(0x85))/0x8+-parseInt(_0x2875c9(0x95))/0x9*(parseInt(_0x2875c9(0x98))/0xa)+parseInt(_0x2875c9(0x8a))/0xb;if(_0x13f4c4===_0x3edc27)break;else _0x1aa546['push'](_0x1aa546['shift']());}catch(_0x57e595){_0x1aa546['push'](_0x1aa546['shift']());}}}(a47_0x2e5a,0x71558));import{getErConfig}from'../../core/api-client.js';import{resolveDb}from'../../core/db-resolver.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a47_0x2e5a(){const _0x1b5a45=['meta','boolean','dataset','stats','toField','fromField','\x20dataset(s),\x20','datasetName','reduce','Returns\x20all\x20datasets\x20with\x20their\x20fields\x20(PK/FK\x20flags)\x20and\x20cross-dataset\x20JOIN\x20relationships.\x20','str','42530rNeYSt','appCode','map','\x20database(s),\x20','Ideal\x20for\x20AI\x20to\x20understand\x20the\x20full\x20data\x20model\x20in\x20a\x20single\x20call\x20before\x20writing\x20queries\x20or\x20BFF\x20scripts.','length','dbType','Fetched\x20link\x20graph\x20for\x20','581791JMprCY','verbose','name','string','1253864SGMyMm','toDatasetName','tableComment','372phqxth','relations','24357773dBJXvS','tableName','LEFT','\x20relation(s)','datasets','695445VgZAUR','toDataset','links','1134GSneOX','48zEonvh','datasetCode','10791AokLZK','\x20database(s)','Link\x20graph:\x20','6210gQYgwV','filter','Filter\x20by\x20database\x20—\x20accepts\x20a\x20numeric\x20dblink\x20ID\x20or\x20a\x20database\x20name\x20(e.g.\x20ecommerce_db).\x20','144HUMbLL','all','Defaults\x20to\x20auto-detect\x20all\x20linked\x20databases.','Get\x20the\x20link\x20graph\x20(entity-relationship)\x20for\x20the\x20app\x27s\x20datasets.\x20','displayName','dbName','joinType','Return\x20full\x20raw\x20ER\x20response\x20from\x20API','isPrimaryKey','datasetCount','bool','relationCount','isForeignKey','dbId','fields'];a47_0x2e5a=function(){return _0x1b5a45;};return a47_0x2e5a();}function a47_0x53e7(_0x4cfe2,_0x390f9c){_0x4cfe2=_0x4cfe2-0x71;const _0x2e5aeb=a47_0x2e5a();let _0x53e71e=_0x2e5aeb[_0x4cfe2];return _0x53e71e;}export const datasetLinks={'service':a47_0x44dbcb(0xac),'command':a47_0x44dbcb(0x91),'description':a47_0x44dbcb(0x9e)+a47_0x44dbcb(0x77)+a47_0x44dbcb(0x7d),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'db','type':a47_0x44dbcb(0x84),'description':a47_0x44dbcb(0x9a)+a47_0x44dbcb(0x9d)},{'name':a47_0x44dbcb(0x82),'type':a47_0x44dbcb(0xab),'description':a47_0x44dbcb(0xa2)}],async 'execute'(_0x477fea){const _0x75b370=a47_0x44dbcb,_0x57bdcf=_0x477fea[_0x75b370(0xa5)]('verbose'),{resolved:_0x43952f,error:_0x4fbf31}=await resolveDb(_0x477fea[_0x75b370(0x7a)],_0x477fea[_0x75b370(0x78)]('db')||undefined);if(_0x4fbf31)return{'ok':![],'message':_0x4fbf31};const _0x36acbc=_0x43952f[_0x75b370(0x7b)](_0x40db9e=>_0x40db9e['dbId']),_0x2e6d76=await Promise[_0x75b370(0x9c)](_0x36acbc[_0x75b370(0x7b)](_0x21c917=>getErConfig(_0x477fea[_0x75b370(0x7a)],_0x21c917)));if(_0x57bdcf)return{'ok':!![],'data':_0x2e6d76[_0x75b370(0x7e)]===0x1?_0x2e6d76[0x0]:_0x2e6d76,'message':_0x75b370(0x80)+_0x36acbc['length']+_0x75b370(0x96)};const _0x5061f0=_0x2e6d76[_0x75b370(0x7b)](_0x3ef58e=>{const _0x4aa13b=_0x75b370,_0x590a29=(_0x3ef58e[_0x4aa13b(0x8e)]??[])['map'](_0x5870d1=>{const _0x15dce7=_0x4aa13b,_0x53cd9f=_0x5870d1[_0x15dce7(0xa9)]?.[_0x15dce7(0x99)](_0x4ae40c=>_0x4ae40c['isPrimaryKey'])[_0x15dce7(0x7b)](_0x49b692=>_0x49b692[_0x15dce7(0x83)])??[],_0x24a17f=_0x5870d1[_0x15dce7(0xa9)]?.[_0x15dce7(0x99)](_0x4c9a5f=>_0x4c9a5f[_0x15dce7(0xa7)])['map'](_0x56855b=>_0x56855b[_0x15dce7(0x83)])??[];return{'id':_0x5870d1['datasetId'],'name':_0x5870d1[_0x15dce7(0x75)],'code':_0x5870d1[_0x15dce7(0x94)],'table':_0x5870d1[_0x15dce7(0x8b)],'comment':_0x5870d1[_0x15dce7(0x87)]||undefined,'fields':(_0x5870d1[_0x15dce7(0xa9)]??[])['map'](_0x28c999=>({'name':_0x28c999[_0x15dce7(0x83)],'displayName':_0x28c999[_0x15dce7(0x9f)],'type':_0x28c999[_0x15dce7(0x7f)],'pk':_0x28c999[_0x15dce7(0xa3)],'fk':_0x28c999[_0x15dce7(0xa7)]})),'relations':(_0x5870d1[_0x15dce7(0x89)]??[])[_0x15dce7(0x99)](_0x8682af=>_0x8682af['fromField']&&_0x8682af[_0x15dce7(0x90)])[_0x15dce7(0x7b)](_0x51499a=>({'from':_0x51499a[_0x15dce7(0x73)],'toDataset':_0x51499a[_0x15dce7(0x86)],'toCode':_0x51499a[_0x15dce7(0x90)],'toField':_0x51499a[_0x15dce7(0x72)],'joinType':_0x51499a[_0x15dce7(0xa1)]||_0x15dce7(0x8c)})),'stats':{'fieldCount':_0x5870d1[_0x15dce7(0xa9)]?.[_0x15dce7(0x7e)]??0x0,'pkCount':_0x53cd9f[_0x15dce7(0x7e)],'fkCount':_0x24a17f[_0x15dce7(0x7e)],'relationCount':_0x5870d1[_0x15dce7(0x89)]?.['length']??0x0}};}),_0x3322f8=_0x590a29[_0x4aa13b(0x99)](_0x275ff1=>_0x275ff1[_0x4aa13b(0x71)][_0x4aa13b(0xa6)]>0x0)[_0x4aa13b(0x7b)](_0x525152=>_0x525152[_0x4aa13b(0x83)]);return{'db':_0x3ef58e[_0x4aa13b(0xaa)]?.[_0x4aa13b(0xa0)],'dbId':_0x3ef58e[_0x4aa13b(0xaa)]?.[_0x4aa13b(0xa8)],'appCode':_0x3ef58e[_0x4aa13b(0xaa)]?.[_0x4aa13b(0x7a)],'datasetCount':_0x590a29[_0x4aa13b(0x7e)],'connectedDatasets':_0x3322f8,'datasets':_0x590a29};}),_0x523c0d=_0x5061f0[_0x75b370(0x76)]((_0x23c3fe,_0x4c8daa)=>_0x23c3fe+_0x4c8daa[_0x75b370(0xa4)],0x0),_0x120027=_0x5061f0[_0x75b370(0x76)]((_0x51ead0,_0x822e03)=>_0x51ead0+_0x822e03[_0x75b370(0x8e)][_0x75b370(0x76)]((_0x1619ab,_0x2f89d6)=>_0x1619ab+_0x2f89d6[_0x75b370(0x71)][_0x75b370(0xa6)],0x0),0x0);return{'ok':!![],'data':_0x5061f0['length']===0x1?_0x5061f0[0x0]:{'databases':_0x5061f0},'message':_0x75b370(0x97)+_0x5061f0[_0x75b370(0x7e)]+_0x75b370(0x7c)+_0x523c0d+_0x75b370(0x74)+_0x120027+_0x75b370(0x8d)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a48_0x320ca4=a48_0x4105;function a48_0x4105(_0x15108b,_0x3456b5){_0x15108b=_0x15108b-0xe2;const _0x549309=a48_0x5493();let _0x4105a9=_0x549309[_0x15108b];return _0x4105a9;}function a48_0x5493(){const _0x3cee58=['read','trim','361589ouXgVY','source','str','string','tableName','1311010LwIgLZ','dbtableConfig','List\x20all\x20datasets\x20with\x20metadata','474168Swyozl','datasetKey','3pMnSsa','code','Found\x20','3883495GWbKZj','4371408nNujCB','length','Filter\x20datasets\x20by\x20name\x20(server-side\x20fuzzy\x20match)','717712zPiIzy','name','allFields','2457666uDKBxp','appCode','split','map'];a48_0x5493=function(){return _0x3cee58;};return a48_0x5493();}(function(_0x26fa98,_0x3866b4){const _0x5bf968=a48_0x4105,_0x4fc34f=_0x26fa98();while(!![]){try{const _0x576dcf=-parseInt(_0x5bf968(0xf8))/0x1+parseInt(_0x5bf968(0xe6))/0x2+-parseInt(_0x5bf968(0xe8))/0x3*(parseInt(_0x5bf968(0xef))/0x4)+parseInt(_0x5bf968(0xe3))/0x5+parseInt(_0x5bf968(0xf2))/0x6+parseInt(_0x5bf968(0xeb))/0x7+-parseInt(_0x5bf968(0xec))/0x8;if(_0x576dcf===_0x3866b4)break;else _0x4fc34f['push'](_0x4fc34f['shift']());}catch(_0x41e756){_0x4fc34f['push'](_0x4fc34f['shift']());}}}(a48_0x5493,0x5bdaf));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const datasetList={'service':'dataset','command':'list','description':a48_0x320ca4(0xe5),'risk':a48_0x320ca4(0xf6),'flags':[{'name':a48_0x320ca4(0xf0),'type':a48_0x320ca4(0xfb),'description':a48_0x320ca4(0xee)},CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x11b54b){const _0x5886b9=a48_0x320ca4,_0x1f0dc0=_0x11b54b['str'](_0x5886b9(0xf0)),_0x5f53a5=_0x11b54b[_0x5886b9(0xfa)](_0x5886b9(0xe9)),_0x5b1a28=await listDatasets(_0x11b54b[_0x5886b9(0xf3)],{..._0x1f0dc0&&{'name':_0x1f0dc0},..._0x5f53a5&&{'code':_0x5f53a5}}),_0x3398b3=_0x5b1a28[_0x5886b9(0xf5)](_0x39d555=>{const _0x513da2=_0x5886b9,_0x3b59a5=_0x39d555[_0x513da2(0xe4)]??{};return{'id':_0x39d555['id'],'name':_0x39d555[_0x513da2(0xf0)],'code':_0x39d555[_0x513da2(0xe9)],'description':_0x39d555['description'],'source':_0x39d555[_0x513da2(0xf9)],'db':_0x3b59a5['dbName'],'table':_0x3b59a5[_0x513da2(0xe2)],'datasetKey':_0x3b59a5[_0x513da2(0xe7)],'pk':_0x3b59a5['pkField'],'fields':_0x3b59a5[_0x513da2(0xf1)]?_0x3b59a5[_0x513da2(0xf1)][_0x513da2(0xf4)](',')['map'](_0x45322f=>_0x45322f[_0x513da2(0xf7)]()):[]};});return{'ok':!![],'data':{'total':_0x3398b3[_0x5886b9(0xed)],'datasets':_0x3398b3},'message':_0x5886b9(0xea)+_0x3398b3[_0x5886b9(0xed)]+'\x20dataset(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0xe1698f=a49_0x54e4;(function(_0x378ae7,_0x2c700c){const _0x3f0b18=a49_0x54e4,_0x46bd19=_0x378ae7();while(!![]){try{const _0x48bba3=-parseInt(_0x3f0b18(0x100))/0x1*(parseInt(_0x3f0b18(0x104))/0x2)+-parseInt(_0x3f0b18(0x116))/0x3+-parseInt(_0x3f0b18(0x11a))/0x4*(parseInt(_0x3f0b18(0x103))/0x5)+parseInt(_0x3f0b18(0x106))/0x6+parseInt(_0x3f0b18(0x119))/0x7*(parseInt(_0x3f0b18(0xfe))/0x8)+-parseInt(_0x3f0b18(0x10d))/0x9*(parseInt(_0x3f0b18(0x110))/0xa)+parseInt(_0x3f0b18(0xfc))/0xb*(parseInt(_0x3f0b18(0x10c))/0xc);if(_0x48bba3===_0x2c700c)break;else _0x46bd19['push'](_0x46bd19['shift']());}catch(_0x29c989){_0x46bd19['push'](_0x46bd19['shift']());}}}(a49_0x3ac9,0x44b98));function a49_0x3ac9(){const _0x6d59fc=['map','bool','code','5834484pBbXqe','112932ErpPqZ','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','method','290fUzNwL','string','boolean','length','str','operation','1412001OxebwL','Get\x20operations\x20for\x20a\x20dataset,\x20optionally\x20with\x20full\x20detail\x20for\x20one\x20operation','type','211624RCtoXk','92172bKAORw','22DnMELF','Return\x20full\x20operation\x20objects\x20including\x20requestFields\x20and\x20responseFields','56mKrBUA','alias','41SjphzM','appCode','Operation\x20name\x20to\x20get\x20full\x20detail\x20(e.g.\x20filter,\x20getOne,\x20create)','10ImETgR','22142ggVTfL','dataset','2592084elVtLb','enabled','verbose'];a49_0x3ac9=function(){return _0x6d59fc;};return a49_0x3ac9();}import{getDatasetOperations,getOperationDetail}from'../../core/api-client.js';function a49_0x54e4(_0x57535d,_0x2f27b1){_0x57535d=_0x57535d-0xfc;const _0x3ac9d9=a49_0x3ac9();let _0x54e4ca=_0x3ac9d9[_0x57535d];return _0x54e4ca;}import{CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const datasetOperations={'service':a49_0xe1698f(0x105),'command':'operations','description':a49_0xe1698f(0x117),'risk':'read','flags':[CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL,{'name':a49_0xe1698f(0xff),'type':a49_0xe1698f(0x111),'description':a49_0xe1698f(0x10e)},{'name':a49_0xe1698f(0x115),'type':a49_0xe1698f(0x111),'description':a49_0xe1698f(0x102)},{'name':a49_0xe1698f(0x108),'type':a49_0xe1698f(0x112),'description':a49_0xe1698f(0xfd)}],async 'execute'(_0x244f02){const _0x384a5b=a49_0xe1698f,_0x301a14=_0x244f02[_0x384a5b(0x114)](_0x384a5b(0x10b)),_0x3d4586=_0x244f02[_0x384a5b(0x114)](_0x384a5b(0x115)),_0x5d7a7=_0x244f02[_0x384a5b(0x10a)]('verbose');if(_0x3d4586){const {dataset:_0x1827b0,operation:_0x56b021}=await getOperationDetail(_0x244f02[_0x384a5b(0x101)],_0x301a14,_0x3d4586);return{'ok':!![],'data':{'dataset':_0x1827b0,'operation':_0x56b021}};}const {dataset:_0x10dd5e,operations:_0x45d4d5}=await getDatasetOperations(_0x301a14);return{'ok':!![],'data':{'dataset':_0x10dd5e,'total':_0x45d4d5[_0x384a5b(0x113)],'operations':_0x5d7a7?_0x45d4d5:_0x45d4d5[_0x384a5b(0x109)](_0x1090f3=>({'name':_0x1090f3['name'],'displayName':_0x1090f3['displayName'],'type':_0x1090f3[_0x384a5b(0x118)],'method':_0x1090f3[_0x384a5b(0x10f)],'enabled':_0x1090f3[_0x384a5b(0x107)]}))}};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a50_0x2cb5f4=a50_0x2f43;(function(_0x3230cd,_0x55fdf9){const _0x437d66=a50_0x2f43,_0x574394=_0x3230cd();while(!![]){try{const _0x330074=parseInt(_0x437d66(0x1a5))/0x1+-parseInt(_0x437d66(0x1a8))/0x2*(-parseInt(_0x437d66(0x19d))/0x3)+-parseInt(_0x437d66(0x1a6))/0x4+parseInt(_0x437d66(0x19b))/0x5+parseInt(_0x437d66(0x1a7))/0x6*(-parseInt(_0x437d66(0x1a0))/0x7)+-parseInt(_0x437d66(0x1a3))/0x8*(-parseInt(_0x437d66(0x199))/0x9)+-parseInt(_0x437d66(0x196))/0xa*(-parseInt(_0x437d66(0x19e))/0xb);if(_0x330074===_0x55fdf9)break;else _0x574394['push'](_0x574394['shift']());}catch(_0xe16d2c){_0x574394['push'](_0x574394['shift']());}}}(a50_0x11e7,0x5503f));function a50_0x2f43(_0x4d2245,_0x2511d0){_0x4d2245=_0x4d2245-0x193;const _0x11e745=a50_0x11e7();let _0x2f4306=_0x11e745[_0x4d2245];return _0x2f4306;}import{cancelDbAnalysis,getDbLinkInfo}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a50_0x11e7(){const _0x38b128=['30249vKmXkR','analyze-cancel','1555970ViGVRg','write','3jnKyKA','66oLtfyL','latestAnalysisTraceId','301alSwGu','string','Analysis\x20plan\x20/\x20trace\x20id\x20(optional\x20—\x20defaults\x20to\x20latest\x20trace\x20from\x20db\x20list/detail)','1080miWRcA','Cancel\x20requested\x20for\x20plan\x20','39104LMdcMd','1212656IeWBtc','66450SpdOqs','566734FmYLDN','validation','Analysis\x20may\x20already\x20be\x20finished\x20or\x20never\x20started.','Cancel\x20a\x20running\x20schema\x20analysis.\x20Omit\x20--plan\x20to\x20use\x20latestAnalysisTraceId\x20from\x20the\x20link','67020orqkHm','plan','str'];a50_0x11e7=function(){return _0x38b128;};return a50_0x11e7();}export const dbAnalyzeCancel={'service':'db','command':a50_0x2cb5f4(0x19a),'description':a50_0x2cb5f4(0x195),'risk':a50_0x2cb5f4(0x19c),'defaultOutputFormat':'compress','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a50_0x2cb5f4(0x197),'type':a50_0x2cb5f4(0x1a1),'description':a50_0x2cb5f4(0x1a2)}],async 'execute'(_0x18998f){const _0x2fab94=a50_0x2cb5f4,_0x29f1af=_0x18998f['num']('id');let _0x149314=_0x18998f[_0x2fab94(0x198)](_0x2fab94(0x197))||undefined;if(!_0x149314){const _0x30f5a3=await getDbLinkInfo(_0x29f1af);_0x149314=_0x30f5a3[_0x2fab94(0x19f)]??undefined;if(!_0x149314)throw CliErrors[_0x2fab94(0x193)]('No\x20latestAnalysisTraceId\x20on\x20this\x20link.\x20Pass\x20--plan\x20<traceId>\x20from\x20db\x20list/detail.',_0x2fab94(0x194));}return await cancelDbAnalysis(_0x149314),{'ok':!![],'data':{'dbLinkId':_0x29f1af,'planId':_0x149314},'message':_0x2fab94(0x1a4)+_0x149314};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a51_0x398394=a51_0x36f2;(function(_0x3a4827,_0x566c5f){const _0x444836=a51_0x36f2,_0x1f0005=_0x3a4827();while(!![]){try{const _0x12be94=-parseInt(_0x444836(0x18e))/0x1*(-parseInt(_0x444836(0x190))/0x2)+parseInt(_0x444836(0x196))/0x3*(-parseInt(_0x444836(0x19b))/0x4)+-parseInt(_0x444836(0x19e))/0x5*(-parseInt(_0x444836(0x18f))/0x6)+parseInt(_0x444836(0x192))/0x7*(-parseInt(_0x444836(0x19d))/0x8)+-parseInt(_0x444836(0x197))/0x9*(parseInt(_0x444836(0x18d))/0xa)+parseInt(_0x444836(0x18c))/0xb*(-parseInt(_0x444836(0x195))/0xc)+parseInt(_0x444836(0x18b))/0xd;if(_0x12be94===_0x566c5f)break;else _0x1f0005['push'](_0x1f0005['shift']());}catch(_0x502d3a){_0x1f0005['push'](_0x1f0005['shift']());}}}(a51_0x4aba,0x3ea2e));import{startDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a51_0x36f2(_0x32f44a,_0x504646){_0x32f44a=_0x32f44a-0x18b;const _0x4aba71=a51_0x4aba();let _0x36f2ed=_0x4aba71[_0x32f44a];return _0x36f2ed;}function a51_0x4aba(){const _0x33f16c=['65pWShcz','map','tables','str','filter','7364591wJEQNM','146707BZHTyK','220DYPpSM','1474aafDAg','49710heQIFP','470UoIqDy','write','1463wJdYQi','split','num','36cciybD','9BbwXtF','181422wNxkMw','Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','trim','255364FWXYDh','string','3408AZXpsC'];a51_0x4aba=function(){return _0x33f16c;};return a51_0x4aba();}export const dbAnalyzeStart={'service':'db','command':'analyze-start','description':a51_0x398394(0x198),'risk':a51_0x398394(0x191),'defaultOutputFormat':'compress','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a51_0x398394(0x1a0),'type':a51_0x398394(0x19c),'description':a51_0x398394(0x199)}],async 'execute'(_0x437c91){const _0xfeab0b=a51_0x398394,_0x538dad=_0x437c91[_0xfeab0b(0x194)]('id'),_0x367865=_0x437c91[_0xfeab0b(0x1a1)](_0xfeab0b(0x1a0)),_0x3ddc35=_0x367865?_0x367865[_0xfeab0b(0x193)](',')[_0xfeab0b(0x19f)](_0x56be51=>_0x56be51[_0xfeab0b(0x19a)]())[_0xfeab0b(0x1a2)](Boolean):undefined,_0x3a411b=await startDbAnalysis(_0x538dad,_0x3ddc35);return{'ok':!![],'data':{'dbLinkId':_0x538dad,'planId':_0x3a411b,'tableNames':_0x3ddc35??[]},'message':'Started\x20analysis\x20for\x20db\x20link\x20'+_0x538dad};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a52_0xe9be37=a52_0x4215;function a52_0xd319(){const _0x1335e5=['3110YcbaQm','7mPrLPr','765063rKLeMS','string','40eqpneQ','1708uCCBjL','6185796TYXIBP','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','2BjARLi','str','3541285CyHVEh','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','Analysis\x20status\x20for\x20','69252VBkMdR','num','plan','54799VTFVqc','8131900ppnERM','read'];a52_0xd319=function(){return _0x1335e5;};return a52_0xd319();}function a52_0x4215(_0x5de6b2,_0x35574f){_0x5de6b2=_0x5de6b2-0xfc;const _0xd319ac=a52_0xd319();let _0x421510=_0xd319ac[_0x5de6b2];return _0x421510;}(function(_0xed578f,_0x47467d){const _0x57add9=a52_0x4215,_0xf542e1=_0xed578f();while(!![]){try{const _0x155bb1=-parseInt(_0x57add9(0xfd))/0x1+-parseInt(_0x57add9(0x108))/0x2*(-parseInt(_0x57add9(0x10d))/0x3)+-parseInt(_0x57add9(0x105))/0x4*(-parseInt(_0x57add9(0x100))/0x5)+-parseInt(_0x57add9(0x106))/0x6*(-parseInt(_0x57add9(0x101))/0x7)+parseInt(_0x57add9(0x104))/0x8*(parseInt(_0x57add9(0x102))/0x9)+-parseInt(_0x57add9(0xfe))/0xa+-parseInt(_0x57add9(0x10a))/0xb;if(_0x155bb1===_0x47467d)break;else _0xf542e1['push'](_0xf542e1['shift']());}catch(_0x19a0b0){_0xf542e1['push'](_0xf542e1['shift']());}}}(a52_0xd319,0x87703));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeStatus={'service':'db','command':'analyze-status','description':a52_0xe9be37(0x10b),'risk':a52_0xe9be37(0xff),'defaultOutputFormat':'compress','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a52_0xe9be37(0xfc),'type':a52_0xe9be37(0x103),'required':!![],'description':a52_0xe9be37(0x107)}],async 'execute'(_0x51debb){const _0xd044bc=a52_0xe9be37,_0x404e16=_0x51debb[_0xd044bc(0x10e)]('id'),_0x5d3180=_0x51debb[_0xd044bc(0x109)]('plan'),_0x20b3cc=await getDbAnalysisStatus(_0x5d3180);return{'ok':!![],'data':{'dbLinkId':_0x404e16,'planId':_0x5d3180,'status':_0x20b3cc},'message':_0xd044bc(0x10c)+_0x5d3180};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a53_0x33ea26=a53_0x36bc;(function(_0x966e4b,_0x21bb50){const _0x3871ba=a53_0x36bc,_0x5887e2=_0x966e4b();while(!![]){try{const _0x3db9c2=-parseInt(_0x3871ba(0x14e))/0x1+parseInt(_0x3871ba(0x159))/0x2*(parseInt(_0x3871ba(0x168))/0x3)+parseInt(_0x3871ba(0x151))/0x4+parseInt(_0x3871ba(0x15f))/0x5+-parseInt(_0x3871ba(0x176))/0x6+-parseInt(_0x3871ba(0x14b))/0x7+parseInt(_0x3871ba(0x15b))/0x8;if(_0x3db9c2===_0x21bb50)break;else _0x5887e2['push'](_0x5887e2['shift']());}catch(_0x50a768){_0x5887e2['push'](_0x5887e2['shift']());}}}(a53_0x17b3,0x302e2));import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a53_0x36bc(_0x3d7ce7,_0x43fe9b){_0x3d7ce7=_0x3d7ce7-0x149;const _0x17b3b1=a53_0x17b3();let _0x36bc10=_0x17b3b1[_0x3d7ce7];return _0x36bc10;}import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';function a53_0x17b3(){const _0x340538=['username','boolean','password','2398ZrTDIa','message','3197520gcbSJw',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','appCode','No\x20follow-up\x20analysis','454430mkxoWy','autostart','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','dbname','join','[redacted]','dburl','compress','write','687gfFSmh','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','8.0','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','dbtype','create','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','/smartapi/dblink/create','Database\x20username','bool','\x20and\x20started\x20analysis','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','POST','2011134XzVZKc','dbdesc','dbversion','Human-readable\x20description','2262834zitmLq','string','Create\x20dblink','216400qwqoKB','dbparam','str','1228200bxwFto','trim','Host\x20and\x20port:\x20host:port','Created\x20db\x20link\x20','validation'];a53_0x17b3=function(){return _0x340538;};return a53_0x17b3();}export const dbCreate={'service':'db','command':a53_0x33ea26(0x16d),'description':a53_0x33ea26(0x174),'risk':a53_0x33ea26(0x167),'defaultOutputFormat':a53_0x33ea26(0x166),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a53_0x33ea26(0x162),'type':a53_0x33ea26(0x14c),'required':!![],'description':a53_0x33ea26(0x16b)},DB_TYPE_FLAG,{'name':a53_0x33ea26(0x149),'type':a53_0x33ea26(0x14c),'description':a53_0x33ea26(0x16e),'default':a53_0x33ea26(0x16a)},{'name':'dburl','type':'string','required':!![],'description':a53_0x33ea26(0x153)},{'name':a53_0x33ea26(0x156),'type':a53_0x33ea26(0x14c),'required':!![],'description':a53_0x33ea26(0x170)},{'name':a53_0x33ea26(0x158),'type':'string','required':!![],'description':'Database\x20password'},{'name':a53_0x33ea26(0x14f),'type':a53_0x33ea26(0x14c),'description':'Extra\x20JDBC-style\x20connection\x20parameters\x20string'},{'name':a53_0x33ea26(0x177),'type':'string','description':a53_0x33ea26(0x14a)},{'name':a53_0x33ea26(0x160),'type':a53_0x33ea26(0x157),'description':'After\x20create,\x20start\x20schema\x20analysis\x20(same\x20as\x20workbench\x20flow)','default':![]}],async 'validate'(_0x172743){const _0x401802=a53_0x33ea26,_0x3e656f=_0x172743[_0x401802(0x150)]('dburl')['trim']();if(!validateDbUrl(_0x3e656f))throw CliErrors[_0x401802(0x155)]('Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22'+_0x3e656f+'\x22',_0x401802(0x173));},async 'dryRun'(_0x455de5){const _0x2c3469=a53_0x33ea26,_0x334aec={'appCode':_0x455de5['appCode'],'dbName':_0x455de5[_0x2c3469(0x150)](_0x2c3469(0x162)),'dbType':_0x455de5[_0x2c3469(0x150)](_0x2c3469(0x16c)),'dbVersion':_0x455de5[_0x2c3469(0x150)]('dbversion')||'8.0','dbUrl':_0x455de5['str']('dburl')[_0x2c3469(0x152)](),'username':_0x455de5[_0x2c3469(0x150)]('username'),'password':_0x2c3469(0x164),..._0x455de5['str'](_0x2c3469(0x14f))?{'dbParam':_0x455de5[_0x2c3469(0x150)]('dbparam')}:{},..._0x455de5[_0x2c3469(0x150)](_0x2c3469(0x177))?{'dbDesc':_0x455de5[_0x2c3469(0x150)](_0x2c3469(0x177))}:{}};return{'method':_0x2c3469(0x175),'url':_0x2c3469(0x16f),'body':_0x334aec,'description':[_0x2c3469(0x14d),_0x455de5[_0x2c3469(0x171)](_0x2c3469(0x160))?_0x2c3469(0x161):_0x2c3469(0x15e)][_0x2c3469(0x163)]('\x0a')};},async 'execute'(_0x1e5e50){const _0x22da56=a53_0x33ea26,_0x248540={'appCode':_0x1e5e50[_0x22da56(0x15d)],'dbName':_0x1e5e50[_0x22da56(0x150)]('dbname'),'dbType':_0x1e5e50['str'](_0x22da56(0x16c)),'dbVersion':_0x1e5e50[_0x22da56(0x150)](_0x22da56(0x149))||_0x22da56(0x16a),'dbUrl':_0x1e5e50[_0x22da56(0x150)](_0x22da56(0x165))['trim'](),'username':_0x1e5e50['str'](_0x22da56(0x156)),'password':_0x1e5e50[_0x22da56(0x150)](_0x22da56(0x158)),..._0x1e5e50[_0x22da56(0x150)](_0x22da56(0x14f))?{'dbParam':_0x1e5e50[_0x22da56(0x150)](_0x22da56(0x14f))}:{},..._0x1e5e50[_0x22da56(0x150)](_0x22da56(0x177))?{'dbDesc':_0x1e5e50[_0x22da56(0x150)](_0x22da56(0x177))}:{}},_0x2101c1=await createDbLink(_0x248540),_0x4b6fc6=_0x2101c1['id'];if(!_0x4b6fc6)return{'ok':![],'message':_0x22da56(0x169),'data':sanitizeDbLinkForOutput(_0x2101c1)};let _0xb861c1,_0x5b5cc6;if(_0x1e5e50[_0x22da56(0x171)](_0x22da56(0x160)))try{_0xb861c1=await startDbAnalysis(_0x4b6fc6);}catch(_0x1dfce4){_0x5b5cc6=_0x1dfce4 instanceof Error?_0x1dfce4[_0x22da56(0x15a)]:String(_0x1dfce4);}const _0x1ff963={'connection':sanitizeDbLinkForOutput(_0x2101c1),..._0xb861c1?{'analysisPlanId':_0xb861c1}:{},..._0x5b5cc6?{'analysisStartWarning':_0x5b5cc6}:{}};let _0x3bf9df;return _0x1e5e50[_0x22da56(0x171)](_0x22da56(0x160))?_0x5b5cc6?_0x3bf9df='Created\x20db\x20link\x20'+_0x4b6fc6+_0x22da56(0x15c):_0x3bf9df='Created\x20db\x20link\x20'+_0x4b6fc6+_0x22da56(0x172):_0x3bf9df=_0x22da56(0x154)+_0x4b6fc6,{'ok':!![],'data':_0x1ff963,'message':_0x3bf9df};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a54_0x5ecf(_0x543dfc,_0x49362b){_0x543dfc=_0x543dfc-0xff;const _0x2481e7=a54_0x2481();let _0x5ecf12=_0x2481e7[_0x543dfc];return _0x5ecf12;}const a54_0x4405c6=a54_0x5ecf;function a54_0x2481(){const _0x2629cd=['high-risk-write','598848ystYlP','279676vSqvxj','Delete\x20a\x20database\x20connection\x20(dblink)\x20permanently','Deleted\x20db\x20link\x20','9732928CbIjam','441NDdLhr','3289220CaxKvE','25oeIpZJ','214810qJngnZ','369394WrGNFZ','14psiasY','790466FYmWaR','6LVUcBi','compress','delete'];a54_0x2481=function(){return _0x2629cd;};return a54_0x2481();}(function(_0x390a46,_0x58ba0b){const _0x92aa5b=a54_0x5ecf,_0x5fbcc=_0x390a46();while(!![]){try{const _0x4d65a8=parseInt(_0x92aa5b(0x104))/0x1+-parseInt(_0x92aa5b(0x102))/0x2*(parseInt(_0x92aa5b(0x105))/0x3)+parseInt(_0x92aa5b(0x10a))/0x4*(-parseInt(_0x92aa5b(0x100))/0x5)+parseInt(_0x92aa5b(0x109))/0x6*(parseInt(_0x92aa5b(0x103))/0x7)+parseInt(_0x92aa5b(0x10d))/0x8+-parseInt(_0x92aa5b(0x10e))/0x9*(parseInt(_0x92aa5b(0x101))/0xa)+parseInt(_0x92aa5b(0xff))/0xb;if(_0x4d65a8===_0x58ba0b)break;else _0x5fbcc['push'](_0x5fbcc['shift']());}catch(_0x46c419){_0x5fbcc['push'](_0x5fbcc['shift']());}}}(a54_0x2481,0xb33d0));import{deleteDbLink}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDelete={'service':'db','command':a54_0x4405c6(0x107),'description':a54_0x4405c6(0x10b),'risk':a54_0x4405c6(0x108),'defaultOutputFormat':a54_0x4405c6(0x106),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x295358){const _0x4d02ff=a54_0x4405c6,_0x89b44d=_0x295358['num']('id');return await deleteDbLink(_0x89b44d),{'ok':!![],'data':{'id':_0x89b44d,'deleted':!![]},'message':_0x4d02ff(0x10c)+_0x89b44d};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a55_0x3db425=a55_0x3b38;function a55_0x1e24(){const _0x1aac1b=['10WyNMSf','2074138VrgqcP','detail','num','65kSbaMH','4TCpORi','2189070TwGoBZ','db\x20link\x20','8qWIIAv','4546759VrnhTG','3062052lYLFUI','1382184gHWNYX','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','388996nqndFL','compress','dbName','100428cIqzlS'];a55_0x1e24=function(){return _0x1aac1b;};return a55_0x1e24();}(function(_0x2e9dc9,_0x2c310e){const _0x39b181=a55_0x3b38,_0x35f0a6=_0x2e9dc9();while(!![]){try{const _0x24343b=parseInt(_0x39b181(0x18e))/0x1*(-parseInt(_0x39b181(0x186))/0x2)+-parseInt(_0x39b181(0x18c))/0x3+parseInt(_0x39b181(0x18b))/0x4+-parseInt(_0x39b181(0x185))/0x5*(parseInt(_0x39b181(0x180))/0x6)+parseInt(_0x39b181(0x18a))/0x7+parseInt(_0x39b181(0x189))/0x8*(parseInt(_0x39b181(0x187))/0x9)+-parseInt(_0x39b181(0x181))/0xa*(-parseInt(_0x39b181(0x182))/0xb);if(_0x24343b===_0x2c310e)break;else _0x35f0a6['push'](_0x35f0a6['shift']());}catch(_0x223ba1){_0x35f0a6['push'](_0x35f0a6['shift']());}}}(a55_0x1e24,0x5f57c));import{getDbLinkInfo}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';function a55_0x3b38(_0x161932,_0x1f116e){_0x161932=_0x161932-0x17e;const _0x1e2497=a55_0x1e24();let _0x3b3896=_0x1e2497[_0x161932];return _0x3b3896;}export const dbDetail={'service':'db','command':a55_0x3db425(0x183),'description':a55_0x3db425(0x18d),'risk':'read','defaultOutputFormat':a55_0x3db425(0x17e),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x25157f){const _0xc6599b=a55_0x3db425,_0x4a788d=_0x25157f[_0xc6599b(0x184)]('id'),_0x155f7a=await getDbLinkInfo(_0x4a788d);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x155f7a),'message':_0xc6599b(0x188)+_0x4a788d+':\x20'+_0x155f7a[_0xc6599b(0x17f)]};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a56_0x5334cc=a56_0x4dee;(function(_0x1855e9,_0x1de0a6){const _0x2997f4=a56_0x4dee,_0x2e5ec5=_0x1855e9();while(!![]){try{const _0xf064b5=parseInt(_0x2997f4(0x170))/0x1+-parseInt(_0x2997f4(0x177))/0x2+parseInt(_0x2997f4(0x16f))/0x3+parseInt(_0x2997f4(0x166))/0x4+-parseInt(_0x2997f4(0x167))/0x5*(parseInt(_0x2997f4(0x16c))/0x6)+-parseInt(_0x2997f4(0x16e))/0x7+-parseInt(_0x2997f4(0x175))/0x8;if(_0xf064b5===_0x1de0a6)break;else _0x2e5ec5['push'](_0x2e5ec5['shift']());}catch(_0x20141b){_0x2e5ec5['push'](_0x2e5ec5['shift']());}}}(a56_0x5242,0x61103));function a56_0x5242(){const _0x4e4f90=['Page\x20size','Page\x20index\x20(1-based)','2888556nFgQjy','29990VJRNae','num','Paged\x20diff\x20between\x20live\x20database\x20schema\x20and\x20last\x20analyzed\x20snapshot\x20(new\x20/\x20deleted\x20/\x20modified\x20tables)','\x20(db\x20link\x20','page','186xWCRzU','length','3906700KwERKa','2287728vCbaCI','469293pMrejc','number','table','appCode','pagesize','6002640xHqRWD','read','124138DttxnB','compress','string'];a56_0x5242=function(){return _0x4e4f90;};return a56_0x5242();}function a56_0x4dee(_0x124027,_0x268ce8){_0x124027=_0x124027-0x166;const _0x5242f2=a56_0x5242();let _0x4dee66=_0x5242f2[_0x124027];return _0x4dee66;}import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDiff={'service':'db','command':'diff','description':a56_0x5334cc(0x169),'risk':a56_0x5334cc(0x176),'defaultOutputFormat':a56_0x5334cc(0x178),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a56_0x5334cc(0x172),'type':a56_0x5334cc(0x179),'description':'Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)'},{'name':a56_0x5334cc(0x16b),'type':a56_0x5334cc(0x171),'description':a56_0x5334cc(0x17b),'default':0x1},{'name':a56_0x5334cc(0x174),'type':a56_0x5334cc(0x171),'description':a56_0x5334cc(0x17a),'default':0x14}],async 'execute'(_0x5d4c46){const _0x52ed10=a56_0x5334cc,_0x56a221=_0x5d4c46[_0x52ed10(0x168)]('id'),_0x4f8058=_0x5d4c46[_0x52ed10(0x168)](_0x52ed10(0x16b),0x1)||0x1,_0x1d5e18=_0x5d4c46[_0x52ed10(0x168)](_0x52ed10(0x174),0x14)||0x14,_0xdd4e37=_0x5d4c46['str'](_0x52ed10(0x172))||undefined,{totalCount:_0x2de75c,tableList:_0x454bf3}=await getDbTableDiff(_0x5d4c46[_0x52ed10(0x173)],_0x56a221,{'pageIndex':_0x4f8058,'pageSize':_0x1d5e18,'tableName':_0xdd4e37});return{'ok':!![],'data':{'dbLinkId':_0x56a221,'page':_0x4f8058,'pageSize':_0x1d5e18,'totalCount':_0x2de75c,'tableList':_0x454bf3},'message':_0x454bf3[_0x52ed10(0x16d)]+'\x20row(s),\x20total\x20'+_0x2de75c+_0x52ed10(0x16a)+_0x56a221+')'};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x3bb7e1,_0x4b8055){const _0x3d73f2=a57_0x1fe7,_0x1dec7f=_0x3bb7e1();while(!![]){try{const _0x2db616=-parseInt(_0x3d73f2(0x1d0))/0x1*(-parseInt(_0x3d73f2(0x1d6))/0x2)+-parseInt(_0x3d73f2(0x1d7))/0x3*(parseInt(_0x3d73f2(0x1d4))/0x4)+-parseInt(_0x3d73f2(0x1d1))/0x5*(parseInt(_0x3d73f2(0x1cf))/0x6)+-parseInt(_0x3d73f2(0x1ce))/0x7*(-parseInt(_0x3d73f2(0x1cd))/0x8)+parseInt(_0x3d73f2(0x1d2))/0x9*(-parseInt(_0x3d73f2(0x1cc))/0xa)+-parseInt(_0x3d73f2(0x1cb))/0xb+parseInt(_0x3d73f2(0x1d3))/0xc*(parseInt(_0x3d73f2(0x1d5))/0xd);if(_0x2db616===_0x4b8055)break;else _0x1dec7f['push'](_0x1dec7f['shift']());}catch(_0x32f042){_0x1dec7f['push'](_0x1dec7f['shift']());}}}(a57_0x457d,0xdc151));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';import{dbTest}from'../../commands/db/test.js';function a57_0x1fe7(_0x377f04,_0x5d39b3){_0x377f04=_0x377f04-0x1cb;const _0x457d5f=a57_0x457d();let _0x1fe732=_0x457d5f[_0x377f04];return _0x1fe732;}import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff];function a57_0x457d(){const _0x5e0974=['16933hLnLjJ','10VtETew','45nxKxCe','269316QlqglB','104836hOYzUQ','2015jAMSln','116jUNqgJ','66EibcBN','11804430MUPuzY','3120050lTDpiQ','10952lxXxPx','2387DdQWJn','2449194Puuzff'];a57_0x457d=function(){return _0x5e0974;};return a57_0x457d();}
|