@lovrabet/rabetbase-cli 2.3.4-beta.2 → 2.3.4-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -0
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -0
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/dry-run.js +1 -0
- 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/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/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/permit/index.js +1 -0
- package/lib/commands/permit/page-get.js +1 -0
- package/lib/commands/permit/page-set.js +1 -0
- package/lib/commands/permit/role-apis-set.js +1 -0
- package/lib/commands/permit/role-menus-set.js +1 -0
- package/lib/commands/permit/role-menus.js +1 -0
- package/lib/commands/permit/shared.js +1 -0
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -0
- package/lib/commands/role/delete.js +1 -0
- package/lib/commands/role/detail.js +1 -0
- package/lib/commands/role/index.js +1 -0
- package/lib/commands/role/list.js +1 -0
- package/lib/commands/role/shared.js +1 -0
- package/lib/commands/role/update.js +1 -0
- package/lib/commands/role/user-add.js +1 -0
- package/lib/commands/role/user-remove.js +1 -0
- package/lib/commands/role/user-resolve.js +1 -0
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/workspace/add.js +1 -0
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.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 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -2
- package/lib/commands/app/discover.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a75_0xbebca2=a75_0x4bb2;function a75_0x4bb2(_0x344dd8,_0x29676c){_0x344dd8=_0x344dd8-0x196;const _0x570d8e=a75_0x570d();let _0x4bb2f6=_0x570d8e[_0x344dd8];return _0x4bb2f6;}(function(_0x29917c,_0x4b72f0){const _0x13562b=a75_0x4bb2,_0x430ef1=_0x29917c();while(!![]){try{const _0x33cfb4=-parseInt(_0x13562b(0x1ac))/0x1+-parseInt(_0x13562b(0x1bc))/0x2*(-parseInt(_0x13562b(0x1c5))/0x3)+parseInt(_0x13562b(0x1a0))/0x4*(parseInt(_0x13562b(0x1c9))/0x5)+parseInt(_0x13562b(0x1c2))/0x6+-parseInt(_0x13562b(0x1a3))/0x7*(parseInt(_0x13562b(0x1c3))/0x8)+parseInt(_0x13562b(0x1ba))/0x9+-parseInt(_0x13562b(0x19d))/0xa*(parseInt(_0x13562b(0x1a8))/0xb);if(_0x33cfb4===_0x4b72f0)break;else _0x430ef1['push'](_0x430ef1['shift']());}catch(_0x3399ee){_0x430ef1['push'](_0x430ef1['shift']());}}}(a75_0x570d,0x1daf5));import{listDatasets,restoreDataset}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a75_0x570d(){const _0x4a6093=['dataset','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','tableName','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','Restored\x20','isArray','Matched\x20','/smartapi/dataset/restore-dataset','dbtableConfig','num','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','Dataset\x20id','1234197UVEQwd','str','172YyRYRN','\x20deleted\x20dataset(s)\x20and\x20related\x20deleted\x20page/menu\x20records.','id=','length','Required\x20to\x20execute\x20dataset\x20restore','dbid','946872SDrLKo','16yUTYbN','name','8124rKcwnJ','validation','high-risk-write','number','10pIRIDR','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','No\x20deleted\x20dataset\x20found\x20for\x20','--confirm\x20is\x20required\x20to\x20restore\x20datasets.','dbName','\x20dataset(s)','description','boolean','push','10UtwzmQ','Restore\x20deleted\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20deleted\x20datasets\x20under\x20a\x20db\x20id','confirm','271088IkaoEI','filter','dbid=','368207EqETHt','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','code','dbId','restore','3127597BTTQHR','expected-count','appCode','\x20dataset(s);\x20','152259IKWpSV','message'];a75_0x570d=function(){return _0x4a6093;};return a75_0x570d();}const DATASET_ID_FLAG={'name':'id','type':a75_0xbebca2(0x1c8),'description':a75_0xbebca2(0x1b9)},DBID_FLAG={'name':'dbid','type':a75_0xbebca2(0x1c8),'description':'Restore\x20all\x20deleted\x20datasets\x20under\x20this\x20database\x20connection\x20id'},CONFIRM_FLAG={'name':'confirm','type':a75_0xbebca2(0x19b),'description':a75_0xbebca2(0x1c0)},EXPECTED_COUNT_FLAG={'name':a75_0xbebca2(0x1a9),'type':'number','description':a75_0xbebca2(0x1b8)};export const datasetRestore={'service':a75_0xbebca2(0x1ae),'command':a75_0xbebca2(0x1a7),'description':a75_0xbebca2(0x19e),'risk':a75_0xbebca2(0x1c7),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1ad19e){const _0x3f6307=a75_0xbebca2,_0x4b07d7=_0x1ad19e[_0x3f6307(0x1b7)]('id'),_0x34e6f6=_0x1ad19e['str'](_0x3f6307(0x1a5)),_0x3d1c25=_0x1ad19e[_0x3f6307(0x1b7)](_0x3f6307(0x1c1)),_0x2742e1=[_0x4b07d7>0x0,Boolean(_0x34e6f6),_0x3d1c25>0x0][_0x3f6307(0x1a1)](Boolean);if(_0x2742e1['length']===0x0)throw CliErrors['validation'](_0x3f6307(0x1a4));if(_0x2742e1['length']>0x1)throw CliErrors[_0x3f6307(0x1c6)](_0x3f6307(0x1af));},async 'dryRun'(_0x459aa5){const _0xc4c44d=a75_0xbebca2,_0x275bd7=await resolveTargets(_0x459aa5);return{'method':'POST','url':_0xc4c44d(0x1b5),'body':{'appCode':_0x459aa5[_0xc4c44d(0x1aa)],'count':_0x275bd7['length'],'datasets':_0x275bd7},'description':'Would\x20restore\x20'+_0x275bd7[_0xc4c44d(0x1bf)]+_0xc4c44d(0x1bd)};},async 'execute'(_0x55f3dd){const _0x191673=a75_0xbebca2;if(!_0x55f3dd['bool'](_0x191673(0x19f)))throw CliErrors['validation'](_0x191673(0x197),_0x191673(0x1ca));const _0x621a52=await resolveTargets(_0x55f3dd),_0x1dc876=[],_0x15128a=[];for(const _0x35db3a of _0x621a52){try{await restoreDataset(_0x55f3dd[_0x191673(0x1aa)],_0x35db3a['id']),_0x1dc876[_0x191673(0x19c)](_0x35db3a);}catch(_0x50504e){_0x15128a[_0x191673(0x19c)]({..._0x35db3a,'error':_0x50504e instanceof Error?_0x50504e[_0x191673(0x1ad)]:String(_0x50504e)});}}if(_0x15128a[_0x191673(0x1bf)]>0x0)return{'ok':![],'data':{'requested':_0x621a52['length'],'restoredCount':_0x1dc876['length'],'failedCount':_0x15128a[_0x191673(0x1bf)],'restored':_0x1dc876,'failed':_0x15128a},'message':'Restored\x20'+_0x1dc876['length']+'/'+_0x621a52[_0x191673(0x1bf)]+_0x191673(0x1ab)+_0x15128a[_0x191673(0x1bf)]+'\x20failed'};return{'ok':!![],'data':{'requested':_0x621a52[_0x191673(0x1bf)],'restoredCount':_0x1dc876[_0x191673(0x1bf)],'restored':_0x1dc876},'message':_0x191673(0x1b2)+_0x1dc876[_0x191673(0x1bf)]+_0x191673(0x199)};}};async function resolveTargets(_0x4848df){const _0x59f09c=a75_0xbebca2,_0x2de53d=_0x4848df[_0x59f09c(0x1b7)]('id'),_0x265097=_0x4848df[_0x59f09c(0x1bb)]('code'),_0x4e7e83=_0x4848df[_0x59f09c(0x1b7)]('dbid');let _0x5392ba;_0x265097?(_0x5392ba=await listDatasets(_0x4848df[_0x59f09c(0x1aa)],{'code':_0x265097,'deleted':!![]}),_0x5392ba=_0x5392ba[_0x59f09c(0x1a1)](_0x37b5b4=>_0x37b5b4[_0x59f09c(0x1a5)]===_0x265097)):(_0x5392ba=await listDatasets(_0x4848df[_0x59f09c(0x1aa)],{'deleted':!![]}),_0x2de53d>0x0&&(_0x5392ba=_0x5392ba[_0x59f09c(0x1a1)](_0xf87e53=>_0xf87e53['id']===_0x2de53d)),_0x4e7e83>0x0&&(_0x5392ba=_0x5392ba['filter'](_0x4c0bb3=>_0x4c0bb3[_0x59f09c(0x1b6)]?.[_0x59f09c(0x1a6)]===_0x4e7e83)));const _0x4c0a67=_0x5392ba['map'](normalizeTarget);if(_0x4c0a67['length']===0x0){const _0x4e4859=_0x265097||(_0x2de53d>0x0?_0x59f09c(0x1be)+_0x2de53d:_0x59f09c(0x1a2)+_0x4e7e83);throw CliErrors[_0x59f09c(0x1c6)](_0x59f09c(0x196)+_0x4e4859+'.');}const _0x4850c0=_0x4848df[_0x59f09c(0x1b7)](_0x59f09c(0x1a9));if(_0x4850c0>0x0&&_0x4c0a67[_0x59f09c(0x1bf)]!==_0x4850c0)throw CliErrors['validation'](_0x59f09c(0x1b4)+_0x4c0a67['length']+_0x59f09c(0x1b1)+_0x4850c0+'.');return _0x4c0a67;}function normalizeTarget(_0x59f2fe){const _0x2fd43f=a75_0xbebca2,_0x3745cc=_0x59f2fe[_0x2fd43f(0x1b6)]??{};return{'id':_0x59f2fe['id'],'code':_0x59f2fe[_0x2fd43f(0x1a5)],'name':_0x59f2fe[_0x2fd43f(0x1c4)],'description':_0x59f2fe[_0x2fd43f(0x19a)],'source':_0x59f2fe['source'],'dbId':_0x3745cc[_0x2fd43f(0x1a6)],'dbName':_0x3745cc[_0x2fd43f(0x198)],'tableName':_0x3745cc[_0x2fd43f(0x1b0)],'relatedPageCount':Array[_0x2fd43f(0x1b3)](_0x59f2fe['relationPages'])?_0x59f2fe['relationPages'][_0x2fd43f(0x1bf)]:undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a76_0x4663a1=a76_0x10ea;(function(_0x2fef05,_0x1de9b3){const _0x5408ab=a76_0x10ea,_0x11b6e7=_0x2fef05();while(!![]){try{const _0x33fe73=parseInt(_0x5408ab(0x113))/0x1+parseInt(_0x5408ab(0x11b))/0x2*(-parseInt(_0x5408ab(0x111))/0x3)+parseInt(_0x5408ab(0x110))/0x4+-parseInt(_0x5408ab(0x112))/0x5+parseInt(_0x5408ab(0x122))/0x6+parseInt(_0x5408ab(0x117))/0x7*(-parseInt(_0x5408ab(0x120))/0x8)+-parseInt(_0x5408ab(0x119))/0x9*(-parseInt(_0x5408ab(0x114))/0xa);if(_0x33fe73===_0x1de9b3)break;else _0x11b6e7['push'](_0x11b6e7['shift']());}catch(_0x3a5560){_0x11b6e7['push'](_0x11b6e7['shift']());}}}(a76_0x3e2e,0xbe345));function a76_0x10ea(_0x58723b,_0x539088){_0x58723b=_0x58723b-0x110;const _0x3e2e3c=a76_0x3e2e();let _0x10eaa2=_0x3e2e3c[_0x58723b];return _0x10eaa2;}import{cancelDbAnalysis,getDbLinkInfo}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeCancel={'service':'db','command':a76_0x4663a1(0x121),'description':a76_0x4663a1(0x11f),'risk':a76_0x4663a1(0x123),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'plan','type':a76_0x4663a1(0x118),'description':'Analysis\x20plan\x20/\x20trace\x20id\x20(optional\x20—\x20defaults\x20to\x20latest\x20trace\x20from\x20db\x20list/detail)'}],async 'execute'(_0x206bc1){const _0x19a994=a76_0x4663a1,_0x17d5ec=_0x206bc1[_0x19a994(0x11d)]('id');let _0x39276a=_0x206bc1[_0x19a994(0x11e)](_0x19a994(0x11a))||undefined;if(!_0x39276a){const _0x47ef88=await getDbLinkInfo(_0x17d5ec);_0x39276a=_0x47ef88['latestAnalysisTraceId']??undefined;if(!_0x39276a)throw CliErrors[_0x19a994(0x115)]('No\x20latestAnalysisTraceId\x20on\x20this\x20link.\x20Pass\x20--plan\x20<traceId>\x20from\x20db\x20list/detail.',_0x19a994(0x11c));}return await cancelDbAnalysis(_0x39276a),{'ok':!![],'data':{'dbLinkId':_0x17d5ec,'planId':_0x39276a},'message':_0x19a994(0x116)+_0x39276a};}};function a76_0x3e2e(){const _0x172f8c=['90VmLlie','plan','3520IFFwpt','Analysis\x20may\x20already\x20be\x20finished\x20or\x20never\x20started.','num','str','Cancel\x20a\x20running\x20schema\x20analysis.\x20Omit\x20--plan\x20to\x20use\x20latestAnalysisTraceId\x20from\x20the\x20link','52000EznKyh','analyze-cancel','5445912CbBDwg','write','3525624oPLiIZ','2031FFyNNL','519630FHVTgd','125755uLaocf','770710WTePmr','validation','Cancel\x20requested\x20for\x20plan\x20','658HMMrgV','string'];a76_0x3e2e=function(){return _0x172f8c;};return a76_0x3e2e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a77_0x53d5(){const _0x5c3d9e=['3139824fYUaXm','Started\x20analysis\x20for\x20db\x20link\x20','split','28500dEADRf','filter','1500874yGMyWx','508HoVMBQ','117MkgfpV','str','trim','963TMrDDV','603946PTWtNQ','3564oUZyuf','6DiJHYe','33630WtjeRS','tables','8400vXFqtl','write','Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','string','num','765339cOgudN','3gDFtpj','analyze-start','map'];a77_0x53d5=function(){return _0x5c3d9e;};return a77_0x53d5();}const a77_0xa826e0=a77_0xb1cd;(function(_0x1cd55a,_0x11748d){const _0x857164=a77_0xb1cd,_0x46c5a8=_0x1cd55a();while(!![]){try{const _0x5e5199=-parseInt(_0x857164(0x1a4))/0x1+parseInt(_0x857164(0x194))/0x2*(parseInt(_0x857164(0x1a5))/0x3)+parseInt(_0x857164(0x195))/0x4*(-parseInt(_0x857164(0x19d))/0x5)+parseInt(_0x857164(0x19c))/0x6*(-parseInt(_0x857164(0x19a))/0x7)+-parseInt(_0x857164(0x19f))/0x8*(-parseInt(_0x857164(0x199))/0x9)+-parseInt(_0x857164(0x1ab))/0xa*(parseInt(_0x857164(0x19b))/0xb)+-parseInt(_0x857164(0x1a8))/0xc*(-parseInt(_0x857164(0x196))/0xd);if(_0x5e5199===_0x11748d)break;else _0x46c5a8['push'](_0x46c5a8['shift']());}catch(_0x598094){_0x46c5a8['push'](_0x46c5a8['shift']());}}}(a77_0x53d5,0x8fa94));function a77_0xb1cd(_0x47a549,_0x5ada64){_0x47a549=_0x47a549-0x194;const _0x53d5b1=a77_0x53d5();let _0xb1cd48=_0x53d5b1[_0x47a549];return _0xb1cd48;}import{startDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';export const dbAnalyzeStart={'service':'db','command':a77_0xa826e0(0x1a6),'description':a77_0xa826e0(0x1a1),'risk':a77_0xa826e0(0x1a0),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'tables','type':a77_0xa826e0(0x1a2),'description':'Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)'}],async 'execute'(_0xb2b71d){const _0x15a381=a77_0xa826e0,_0x5640fe=_0xb2b71d[_0x15a381(0x1a3)]('id'),_0x180acd=_0xb2b71d[_0x15a381(0x197)](_0x15a381(0x19e)),_0x4c7cf5=_0x180acd?_0x180acd[_0x15a381(0x1aa)](',')[_0x15a381(0x1a7)](_0x5c7685=>_0x5c7685[_0x15a381(0x198)]())[_0x15a381(0x1ac)](Boolean):undefined,_0x2b3eeb=await startDbAnalysis(_0x5640fe,_0x4c7cf5),_0x418efe=buildDbPageLinks(_0xb2b71d['appCode'],_0x5640fe);return{'ok':!![],'data':{'dbLinkId':_0x5640fe,'planId':_0x2b3eeb,'tableNames':_0x4c7cf5??[],..._0x418efe?{'links':_0x418efe}:{}},'message':_0x15a381(0x1a9)+_0x5640fe};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a78_0x35d75b=a78_0x2066;(function(_0x3f5053,_0x5b959f){const _0x4690a6=a78_0x2066,_0x2d010c=_0x3f5053();while(!![]){try{const _0x16ee28=-parseInt(_0x4690a6(0x11a))/0x1+-parseInt(_0x4690a6(0x128))/0x2*(parseInt(_0x4690a6(0x114))/0x3)+parseInt(_0x4690a6(0x113))/0x4*(-parseInt(_0x4690a6(0x117))/0x5)+parseInt(_0x4690a6(0x129))/0x6+parseInt(_0x4690a6(0x116))/0x7+-parseInt(_0x4690a6(0x11d))/0x8+parseInt(_0x4690a6(0x119))/0x9*(parseInt(_0x4690a6(0x123))/0xa);if(_0x16ee28===_0x5b959f)break;else _0x2d010c['push'](_0x2d010c['shift']());}catch(_0x2e0d66){_0x2d010c['push'](_0x2d010c['shift']());}}}(a78_0x49f0,0x621cf));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';const TERMINAL_STATUSES=new Set([a78_0x35d75b(0x11f),'PARTIAL_SUCCESS',a78_0x35d75b(0x121),'CANCELLED']);export const dbAnalyzeStatus={'service':'db','command':'analyze-status','description':a78_0x35d75b(0x115),'risk':a78_0x35d75b(0x126),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a78_0x35d75b(0x118),'type':a78_0x35d75b(0x12a),'required':!![],'description':'Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)'}],async 'execute'(_0x28a4f1){const _0x82d8a=a78_0x35d75b,_0x305ee6=_0x28a4f1[_0x82d8a(0x11c)]('id'),_0x40bcbe=_0x28a4f1[_0x82d8a(0x122)]('plan'),_0x3b3708=await getDbAnalysisStatus(_0x40bcbe),_0xe010f5=TERMINAL_STATUSES[_0x82d8a(0x125)](_0x3b3708[_0x82d8a(0x12b)]??''),{parsedJobContext:_0x3edc45,jobContextParseWarning:_0x3a0458}=parseJobContext(_0x3b3708[_0x82d8a(0x127)]),_0x18c097=buildDbPageLinks(_0x28a4f1['appCode'],_0x305ee6);return{'ok':!![],'data':{'dbLinkId':_0x305ee6,'planId':_0x40bcbe,'status':_0x3b3708,'parsedJobContext':_0x3edc45,'isTerminal':_0xe010f5,'isRetrying':_0x3b3708[_0x82d8a(0x12b)]==='RETRYING','elapsedMs':calculateElapsedMs(_0x3b3708,_0xe010f5),'jobContextParseWarning':_0x3a0458,..._0x18c097?{'links':_0x18c097}:{}},'message':_0x82d8a(0x120)+_0x40bcbe};}};function parseJobContext(_0xee4574){const _0x134e8c=a78_0x35d75b;if(!_0xee4574?.[_0x134e8c(0x11e)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x31e840=JSON['parse'](_0xee4574);if(_0x31e840&&typeof _0x31e840===_0x134e8c(0x110)&&!Array[_0x134e8c(0x12c)](_0x31e840))return{'parsedJobContext':_0x31e840,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':'jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.'};}function calculateElapsedMs(_0x3478bb,_0xde8d72){const _0xb09b3b=a78_0x35d75b;if(typeof _0x3478bb[_0xb09b3b(0x11b)]==='number'&&Number[_0xb09b3b(0x124)](_0x3478bb[_0xb09b3b(0x11b)])&&_0x3478bb[_0xb09b3b(0x11b)]>=0x0)return _0x3478bb['costTimeMs'];const _0x4ada4e=toTimestamp(_0x3478bb['startTime']);if(_0x4ada4e===null)return null;const _0x1bd9e3=toTimestamp(_0x3478bb['endTime']),_0x55d04f=_0x1bd9e3??(_0xde8d72?null:Date[_0xb09b3b(0x112)]());if(_0x55d04f===null||_0x55d04f<_0x4ada4e)return null;return _0x55d04f-_0x4ada4e;}function a78_0x2066(_0x44f179,_0x4f570b){_0x44f179=_0x44f179-0x110;const _0x49f019=a78_0x49f0();let _0x20662f=_0x49f019[_0x44f179];return _0x20662f;}function toTimestamp(_0x1bfdcd){const _0x2f3b04=a78_0x35d75b;if(typeof _0x1bfdcd==='number')return Number[_0x2f3b04(0x124)](_0x1bfdcd)?_0x1bfdcd:null;if(typeof _0x1bfdcd!==_0x2f3b04(0x12a)||_0x1bfdcd['trim']()==='')return null;const _0x213ab1=Number(_0x1bfdcd);if(Number[_0x2f3b04(0x124)](_0x213ab1))return _0x213ab1;const _0x3da9ac=Date[_0x2f3b04(0x111)](_0x1bfdcd);return Number['isNaN'](_0x3da9ac)?null:_0x3da9ac;}function a78_0x49f0(){const _0x2f9f47=['isArray','object','parse','now','4NpkzQD','5043OJFFbk','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','4540669tXsnPN','2617875giCats','plan','9omhPMd','611928ufqiIX','costTimeMs','num','181072acWPXm','trim','SUCCESS','Analysis\x20status\x20for\x20','FAILED','str','7697080QOXnrR','isFinite','has','read','jobContext','132iWnnEa','1515474KzaKgu','string','status'];a78_0x49f0=function(){return _0x2f9f47;};return a78_0x49f0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a79_0x16d75e=a79_0x3b7e;(function(_0x42dc55,_0x3d1e3c){const _0x40686a=a79_0x3b7e,_0x1130c0=_0x42dc55();while(!![]){try{const _0x42c7f2=parseInt(_0x40686a(0x192))/0x1*(parseInt(_0x40686a(0x183))/0x2)+-parseInt(_0x40686a(0x1a5))/0x3+parseInt(_0x40686a(0x18b))/0x4*(parseInt(_0x40686a(0x17c))/0x5)+parseInt(_0x40686a(0x181))/0x6*(parseInt(_0x40686a(0x1a3))/0x7)+parseInt(_0x40686a(0x17f))/0x8*(-parseInt(_0x40686a(0x194))/0x9)+-parseInt(_0x40686a(0x1a1))/0xa+parseInt(_0x40686a(0x18c))/0xb;if(_0x42c7f2===_0x3d1e3c)break;else _0x1130c0['push'](_0x1130c0['shift']());}catch(_0x1f76a4){_0x1130c0['push'](_0x1130c0['shift']());}}}(a79_0x3dbe,0x8c1b1));function a79_0x3b7e(_0x541c70,_0x3b431a){_0x541c70=_0x541c70-0x17b;const _0x3dbed8=a79_0x3dbe();let _0x3b7e60=_0x3dbed8[_0x541c70];return _0x3b7e60;}import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':a79_0x16d75e(0x184),'description':a79_0x16d75e(0x1a0),'risk':a79_0x16d75e(0x19e),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a79_0x16d75e(0x19f),'type':a79_0x16d75e(0x19b),'required':!![],'description':a79_0x16d75e(0x197)},DB_TYPE_FLAG,{'name':'dbversion','type':a79_0x16d75e(0x19b),'description':a79_0x16d75e(0x1a4),'default':a79_0x16d75e(0x180)},{'name':a79_0x16d75e(0x193),'type':a79_0x16d75e(0x19b),'required':!![],'description':a79_0x16d75e(0x196)},{'name':'username','type':a79_0x16d75e(0x19b),'required':!![],'description':'Database\x20username'},{'name':'password','type':a79_0x16d75e(0x19b),'required':!![],'description':a79_0x16d75e(0x191)},{'name':a79_0x16d75e(0x18f),'type':a79_0x16d75e(0x19b),'description':'Extra\x20JDBC-style\x20connection\x20parameters\x20string'},{'name':'dbdesc','type':'string','description':'Human-readable\x20description'},{'name':a79_0x16d75e(0x19c),'type':a79_0x16d75e(0x195),'description':a79_0x16d75e(0x19a),'default':![]}],async 'validate'(_0x1b9383){const _0x3b9701=a79_0x16d75e,_0x20f5df=_0x1b9383['str'](_0x3b9701(0x193))[_0x3b9701(0x17d)]();if(!validateDbUrl(_0x20f5df))throw CliErrors[_0x3b9701(0x18a)]('Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22'+_0x20f5df+'\x22',_0x3b9701(0x189));},async 'dryRun'(_0xd07f91){const _0x16ddc3=a79_0x16d75e,_0x4759b7={'appCode':_0xd07f91[_0x16ddc3(0x186)],'dbName':_0xd07f91[_0x16ddc3(0x188)]('dbname'),'dbType':_0xd07f91[_0x16ddc3(0x188)](_0x16ddc3(0x187)),'dbVersion':_0xd07f91[_0x16ddc3(0x188)](_0x16ddc3(0x182))||_0x16ddc3(0x180),'dbUrl':_0xd07f91[_0x16ddc3(0x188)]('dburl')[_0x16ddc3(0x17d)](),'username':_0xd07f91['str']('username'),'password':'[redacted]',..._0xd07f91[_0x16ddc3(0x188)](_0x16ddc3(0x18f))?{'dbParam':_0xd07f91['str'](_0x16ddc3(0x18f))}:{},..._0xd07f91[_0x16ddc3(0x188)](_0x16ddc3(0x18d))?{'dbDesc':_0xd07f91[_0x16ddc3(0x188)]('dbdesc')}:{}};return{'method':_0x16ddc3(0x17e),'url':'/smartapi/dblink/create','body':_0x4759b7,'description':['Create\x20dblink',_0xd07f91[_0x16ddc3(0x17b)](_0x16ddc3(0x19c))?_0x16ddc3(0x198):'No\x20follow-up\x20analysis'][_0x16ddc3(0x185)]('\x0a')};},async 'execute'(_0x39ef13){const _0x27a227=a79_0x16d75e,_0x15dac2={'appCode':_0x39ef13[_0x27a227(0x186)],'dbName':_0x39ef13['str'](_0x27a227(0x19f)),'dbType':_0x39ef13['str'](_0x27a227(0x187)),'dbVersion':_0x39ef13[_0x27a227(0x188)](_0x27a227(0x182))||_0x27a227(0x180),'dbUrl':_0x39ef13['str'](_0x27a227(0x193))[_0x27a227(0x17d)](),'username':_0x39ef13[_0x27a227(0x188)](_0x27a227(0x19d)),'password':_0x39ef13[_0x27a227(0x188)](_0x27a227(0x18e)),..._0x39ef13[_0x27a227(0x188)](_0x27a227(0x18f))?{'dbParam':_0x39ef13[_0x27a227(0x188)](_0x27a227(0x18f))}:{},..._0x39ef13[_0x27a227(0x188)](_0x27a227(0x18d))?{'dbDesc':_0x39ef13[_0x27a227(0x188)](_0x27a227(0x18d))}:{}},{id:_0x577811,entity:_0x4c53eb}=normalizeEntityWithIdResponse(await createDbLink(_0x15dac2));if(!_0x577811)return{'ok':![],'message':_0x27a227(0x199),'data':sanitizeDbLinkForOutput(_0x4c53eb)};let _0x3ae3d3,_0x15d763;if(_0x39ef13[_0x27a227(0x17b)]('autostart'))try{_0x3ae3d3=await startDbAnalysis(_0x577811);}catch(_0x2065ef){_0x15d763=_0x2065ef instanceof Error?_0x2065ef[_0x27a227(0x190)]:String(_0x2065ef);}const _0x1f036f=buildDbPageLinks(_0x39ef13[_0x27a227(0x186)],_0x577811),_0x2f944f={'connection':sanitizeDbLinkForOutput(_0x4c53eb),..._0x1f036f?{'links':{'databasePage':_0x1f036f['databasePage']}}:{},..._0x3ae3d3?{'analysisPlanId':_0x3ae3d3}:{},..._0x15d763?{'analysisStartWarning':_0x15d763}:{}};let _0x370807;return _0x39ef13[_0x27a227(0x17b)](_0x27a227(0x19c))?_0x15d763?_0x370807=_0x27a227(0x1a2)+_0x577811+_0x27a227(0x1a6):_0x370807=_0x27a227(0x1a2)+_0x577811+'\x20and\x20started\x20analysis':_0x370807=_0x27a227(0x1a2)+_0x577811,{'ok':!![],'data':_0x2f944f,'message':_0x370807};}};function a79_0x3dbe(){const _0x1837d9=['POST','11176GZEEja','8.0','18444qziWOy','dbversion','1527826nVymPc','create','join','appCode','dbtype','str','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','validation','956hGvfVg','468578jZwVNi','dbdesc','password','dbparam','message','Database\x20password','1wnaIif','dburl','5706lDFMFb','boolean','Host\x20and\x20port:\x20host:port','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','After\x20create,\x20start\x20schema\x20analysis','string','autostart','username','write','dbname','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','2356990wgvIMD','Created\x20db\x20link\x20','1442AyIuEd','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','2297196oSurbP',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','bool','21365UzaALk','trim'];a79_0x3dbe=function(){return _0x1837d9;};return a79_0x3dbe();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a80_0x3b21(){const _0x499cdf=['3834JOiakG','delete','50131VbGVrB','3770XMfmeZ','505406LeRPmG','834668dOTaoJ','1209816AmTDVh','69594jyzXGV','high-risk-write','num','2EOGRfH','446550VyHNSl','55gerhmT','Deleted\x20db\x20link\x20','7ZnDXEE'];a80_0x3b21=function(){return _0x499cdf;};return a80_0x3b21();}const a80_0x4dda0d=a80_0x82ef;(function(_0x54673b,_0x2f5539){const _0xfcd89a=a80_0x82ef,_0x41d2a3=_0x54673b();while(!![]){try{const _0x34e13a=-parseInt(_0xfcd89a(0xf5))/0x1*(-parseInt(_0xfcd89a(0xfd))/0x2)+parseInt(_0xfcd89a(0xfe))/0x3+-parseInt(_0xfcd89a(0xf8))/0x4+-parseInt(_0xfcd89a(0xff))/0x5*(-parseInt(_0xfcd89a(0xfa))/0x6)+-parseInt(_0xfcd89a(0x101))/0x7*(parseInt(_0xfcd89a(0xf9))/0x8)+parseInt(_0xfcd89a(0xf3))/0x9*(parseInt(_0xfcd89a(0xf6))/0xa)+parseInt(_0xfcd89a(0xf7))/0xb;if(_0x34e13a===_0x2f5539)break;else _0x41d2a3['push'](_0x41d2a3['shift']());}catch(_0x2618b0){_0x41d2a3['push'](_0x41d2a3['shift']());}}}(a80_0x3b21,0x2a4a8));import{deleteDbLink}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a80_0x82ef(_0x49e986,_0xbaa762){_0x49e986=_0x49e986-0xf3;const _0x3b2111=a80_0x3b21();let _0x82ef5a=_0x3b2111[_0x49e986];return _0x82ef5a;}export const dbDelete={'service':'db','command':a80_0x4dda0d(0xf4),'description':'Delete\x20a\x20database\x20connection\x20(dblink)\x20permanently','risk':a80_0x4dda0d(0xfb),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5da25c){const _0x5a3f40=a80_0x4dda0d,_0x5026eb=_0x5da25c[_0x5a3f40(0xfc)]('id');return await deleteDbLink(_0x5026eb),{'ok':!![],'data':{'id':_0x5026eb,'deleted':!![]},'message':_0x5a3f40(0x100)+_0x5026eb};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a81_0x65f0(_0x243903,_0x405e51){_0x243903=_0x243903-0x95;const _0x38afec=a81_0x38af();let _0x65f07b=_0x38afec[_0x243903];return _0x65f07b;}const a81_0x623748=a81_0x65f0;(function(_0x5d50c8,_0x5e47f7){const _0x2f7157=a81_0x65f0,_0x502f38=_0x5d50c8();while(!![]){try{const _0x4a444b=-parseInt(_0x2f7157(0x9d))/0x1*(-parseInt(_0x2f7157(0xa3))/0x2)+-parseInt(_0x2f7157(0x96))/0x3+-parseInt(_0x2f7157(0xa4))/0x4*(parseInt(_0x2f7157(0xa2))/0x5)+parseInt(_0x2f7157(0xa1))/0x6*(parseInt(_0x2f7157(0x9c))/0x7)+parseInt(_0x2f7157(0x9a))/0x8*(-parseInt(_0x2f7157(0x9e))/0x9)+parseInt(_0x2f7157(0x9b))/0xa+-parseInt(_0x2f7157(0xa0))/0xb*(parseInt(_0x2f7157(0x99))/0xc);if(_0x4a444b===_0x5e47f7)break;else _0x502f38['push'](_0x502f38['shift']());}catch(_0x5ec429){_0x502f38['push'](_0x502f38['shift']());}}}(a81_0x38af,0x7c487));function a81_0x38af(){const _0x1b15f8=['1343718xnNyRq','read','dbName','8724mPuCZZ','1016Jotrjn','5110220GhffVr','1397907coCWWI','562XwNsHj','45522Zlixiv','db\x20link\x20','2024HdfBkT','24dITQdC','100935ECcpNJ','3446ZvdrGB','108oUzjNR','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','detail'];a81_0x38af=function(){return _0x1b15f8;};return a81_0x38af();}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';export const dbDetail={'service':'db','command':a81_0x623748(0x95),'description':a81_0x623748(0xa5),'risk':a81_0x623748(0x97),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x52d23e){const _0x2099e6=a81_0x623748,_0x52fbbf=_0x52d23e['num']('id'),_0x54095e=await getDbLinkInfo(_0x52fbbf);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x54095e),'message':_0x2099e6(0x9f)+_0x52fbbf+':\x20'+_0x54095e[_0x2099e6(0x98)]};}};
|
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a82_0x306e(_0x308e6a,_0x37279c){_0x308e6a=_0x308e6a-0x9e;const _0x276234=a82_0x2762();let _0x306e94=_0x276234[_0x308e6a];return _0x306e94;}const a82_0xb9c80=a82_0x306e;(function(_0x385945,_0x57e5f1){const _0x5c7cfb=a82_0x306e,_0x400a0b=_0x385945();while(!![]){try{const _0x50d9ae=-parseInt(_0x5c7cfb(0xc4))/0x1+parseInt(_0x5c7cfb(0xad))/0x2*(-parseInt(_0x5c7cfb(0xaa))/0x3)+-parseInt(_0x5c7cfb(0xa2))/0x4+parseInt(_0x5c7cfb(0xbd))/0x5*(parseInt(_0x5c7cfb(0xc2))/0x6)+parseInt(_0x5c7cfb(0x9f))/0x7+-parseInt(_0x5c7cfb(0xbb))/0x8*(-parseInt(_0x5c7cfb(0xb6))/0x9)+parseInt(_0x5c7cfb(0xcc))/0xa;if(_0x50d9ae===_0x57e5f1)break;else _0x400a0b['push'](_0x400a0b['shift']());}catch(_0x5e04ba){_0x400a0b['push'](_0x400a0b['shift']());}}}(a82_0x2762,0x9041c));import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const ALL_PAGE_SIZE=0x64,DIFF_TYPES=[a82_0xb9c80(0xb2),'MODIFIED_TABLE',a82_0xb9c80(0xac),'ALREADY_ANALYZED'];export const dbDiff={'service':'db','command':a82_0xb9c80(0xcb),'description':a82_0xb9c80(0xb1),'risk':a82_0xb9c80(0xb9),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a82_0xb9c80(0xb3),'type':'string','description':a82_0xb9c80(0xc6)},{'name':a82_0xb9c80(0xd0),'type':a82_0xb9c80(0xa3),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a82_0xb9c80(0xa0),'type':a82_0xb9c80(0xa3),'description':a82_0xb9c80(0xbc),'default':0x14},{'name':a82_0xb9c80(0xbf),'type':a82_0xb9c80(0xa8),'description':a82_0xb9c80(0xa4)},{'name':'changed-only','type':a82_0xb9c80(0xa8),'description':a82_0xb9c80(0xc7)}],async 'execute'(_0x494a3){const _0x2e3948=a82_0xb9c80,_0x45b7e9=_0x494a3[_0x2e3948(0xb8)]('id'),_0x984351=_0x494a3['bool'](_0x2e3948(0xbf)),_0x6634d8=_0x494a3['bool'](_0x2e3948(0xc1)),_0x4274ec=_0x984351?0x1:_0x494a3[_0x2e3948(0xb8)](_0x2e3948(0xd0),0x1)||0x1,_0x2d3f3b=_0x984351?ALL_PAGE_SIZE:_0x494a3[_0x2e3948(0xb8)](_0x2e3948(0xa0),0x14)||0x14,_0x2ebe22=_0x494a3[_0x2e3948(0xc5)](_0x2e3948(0xb3))||undefined,_0x3f9b6f=_0x984351?await getAllDbTableDiff(_0x494a3['appCode'],_0x45b7e9,_0x2ebe22):await getDbTableDiff(_0x494a3[_0x2e3948(0xae)],_0x45b7e9,{'pageIndex':_0x4274ec,'pageSize':_0x2d3f3b,'tableName':_0x2ebe22}),_0x54695f=_0x3f9b6f[_0x2e3948(0xaf)],_0x281505=_0x6634d8?_0x54695f[_0x2e3948(0xb4)](_0x76ced5=>_0x76ced5['diffType']!=='ALREADY_ANALYZED'):_0x54695f,_0x49e090=Object[_0x2e3948(0xcf)](DIFF_TYPES[_0x2e3948(0xb0)](_0x15a3b3=>[_0x15a3b3,_0x54695f[_0x2e3948(0xb4)](_0x4e3293=>_0x4e3293[_0x2e3948(0xbe)]===_0x15a3b3)['length']])),_0x39b514=_0x54695f[_0x2e3948(0xb4)](_0x2e79cc=>_0x2e79cc[_0x2e3948(0xbe)]===_0x2e3948(0xb2)||_0x2e79cc[_0x2e3948(0xbe)]===_0x2e3948(0xcd))[_0x2e3948(0xb0)](_0x459764=>_0x459764['tableName']),_0x3f7936=_0x54695f[_0x2e3948(0xb4)](_0x5ee6cf=>_0x5ee6cf['diffType']===_0x2e3948(0xac))[_0x2e3948(0xb0)](_0xda085d=>_0xda085d['tableName']),_0x32dbb9=_0x54695f[_0x2e3948(0xb4)](_0x45a3ac=>_0x45a3ac[_0x2e3948(0xbe)]===_0x2e3948(0xcd))[_0x2e3948(0xb0)](_0x55e455=>({'tableName':_0x55e455[_0x2e3948(0xb5)],'addedColumns':_0x55e455[_0x2e3948(0xc3)]?.[_0x2e3948(0xa6)]??[],'deletedColumns':_0x55e455['fieldDiff']?.[_0x2e3948(0xc0)]??[],'modifiedColumns':_0x55e455[_0x2e3948(0xc3)]?.[_0x2e3948(0xa9)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x45b7e9,'page':_0x4274ec,'pageSize':_0x2d3f3b,'totalCount':_0x3f9b6f['totalCount'],'physicalTableCount':_0x3f9b6f[_0x2e3948(0xc9)],'datasetTableCount':_0x3f9b6f['datasetTableCount'],..._0x3f9b6f['summary']?{'summary':_0x3f9b6f[_0x2e3948(0x9e)]}:{},'summaryByType':_0x49e090,'toAnalyzeTables':_0x39b514,'deletedTables':_0x3f7936,'modifiedFieldDiffs':_0x32dbb9,'tables':_0x281505,'tableList':_0x281505},'message':_0x281505[_0x2e3948(0xba)]+_0x2e3948(0xc8)+_0x3f9b6f[_0x2e3948(0xa7)]+'\x20(db\x20link\x20'+_0x45b7e9+')'};}};async function getAllDbTableDiff(_0x1b01ff,_0x2c39ca,_0x1e88e8){const _0x4bf3df=a82_0xb9c80,_0x46d18b=new Map();let _0x20224f=0x1,_0x40b8a4=null;while(!![]){_0x40b8a4=await getDbTableDiff(_0x1b01ff,_0x2c39ca,{'pageIndex':_0x20224f,'pageSize':ALL_PAGE_SIZE,'tableName':_0x1e88e8});const _0x377475=_0x46d18b[_0x4bf3df(0xa1)];for(const _0x32f083 of _0x40b8a4['tableList']){_0x46d18b[_0x4bf3df(0xce)](_0x32f083[_0x4bf3df(0xb5)],_0x32f083);}if(_0x46d18b[_0x4bf3df(0xa1)]>=_0x40b8a4['totalCount'])break;if(_0x40b8a4[_0x4bf3df(0xaf)][_0x4bf3df(0xba)]===0x0||_0x46d18b[_0x4bf3df(0xa1)]===_0x377475)throw CliErrors['validation'](_0x4bf3df(0xab)+_0x46d18b[_0x4bf3df(0xa1)]+_0x4bf3df(0xb7)+_0x40b8a4[_0x4bf3df(0xa7)]+'\x20row(s).');_0x20224f+=0x1;}return{'totalCount':_0x40b8a4?.[_0x4bf3df(0xa7)]??0x0,'physicalTableCount':_0x40b8a4?.[_0x4bf3df(0xc9)]??0x0,'datasetTableCount':_0x40b8a4?.[_0x4bf3df(0xca)]??0x0,..._0x40b8a4?.[_0x4bf3df(0x9e)]?{'summary':_0x40b8a4[_0x4bf3df(0x9e)]}:{},'tableList':[..._0x46d18b[_0x4bf3df(0xa5)]()]};}function a82_0x2762(){const _0x2d66ca=['set','fromEntries','page','summary','5266863Ppwrsa','pagesize','size','3112796CZyXBR','number','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','values','addedColumns','totalCount','boolean','modifiedColumns','738807juIMMz','Incomplete\x20db\x20diff\x20pagination:\x20collected\x20','DELETED_TABLE','4SMHHwx','appCode','tableList','map','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','NEW_TABLE','table','filter','tableName','4203xqRLWp','\x20of\x20','num','read','length','7360iqFgUx','Page\x20size','15jgSovS','diffType','all','deletedColumns','changed-only','510666WNoLHF','fieldDiff','657285hTIJBR','str','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','Exclude\x20ALREADY_ANALYZED\x20rows\x20while\x20keeping\x20deleted\x20tables','\x20row(s),\x20total\x20','physicalTableCount','datasetTableCount','diff','10815160HndjJb','MODIFIED_TABLE'];a82_0x2762=function(){return _0x2d66ca;};return a82_0x2762();}
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a83_0x59f0(_0x503a4f,_0x28c6ce){_0x503a4f=_0x503a4f-0x16a;const _0x34edbb=a83_0x34ed();let _0x59f0c5=_0x34edbb[_0x503a4f];return _0x59f0c5;}(function(_0x2869cd,_0x9893fa){const _0x1b5a6a=a83_0x59f0,_0x373d9e=_0x2869cd();while(!![]){try{const _0xa4463c=parseInt(_0x1b5a6a(0x16f))/0x1+parseInt(_0x1b5a6a(0x16e))/0x2*(parseInt(_0x1b5a6a(0x16c))/0x3)+parseInt(_0x1b5a6a(0x16a))/0x4+parseInt(_0x1b5a6a(0x16d))/0x5+-parseInt(_0x1b5a6a(0x170))/0x6*(-parseInt(_0x1b5a6a(0x173))/0x7)+parseInt(_0x1b5a6a(0x171))/0x8+parseInt(_0x1b5a6a(0x16b))/0x9*(-parseInt(_0x1b5a6a(0x172))/0xa);if(_0xa4463c===_0x9893fa)break;else _0x373d9e['push'](_0x373d9e['shift']());}catch(_0xf88c4b){_0x373d9e['push'](_0x373d9e['shift']());}}}(a83_0x34ed,0x83136));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';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';function a83_0x34ed(){const _0x39896a=['1701042GagyEt','1347370dmaFxq','2DIYwZP','231437nKepOj','546jdhMZQ','4197160rNoRAX','22476040hABzRi','70854SQLJpU','1083272qkxDOK','9deySlx'];a83_0x34ed=function(){return _0x39896a;};return a83_0x34ed();}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];
|
package/lib/commands/db/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a84_0x2079c5=a84_0x1720;(function(_0x4061ed,_0x143f74){const _0x80cf1a=a84_0x1720,_0x1bcc2a=_0x4061ed();while(!![]){try{const _0x1901b0=parseInt(_0x80cf1a(0x1cb))/0x1+-parseInt(_0x80cf1a(0x1c9))/0x2+-parseInt(_0x80cf1a(0x1c1))/0x3+-parseInt(_0x80cf1a(0x1d0))/0x4+parseInt(_0x80cf1a(0x1ca))/0x5*(-parseInt(_0x80cf1a(0x1d3))/0x6)+parseInt(_0x80cf1a(0x1be))/0x7+parseInt(_0x80cf1a(0x1c6))/0x8*(parseInt(_0x80cf1a(0x1c5))/0x9);if(_0x1901b0===_0x143f74)break;else _0x1bcc2a['push'](_0x1bcc2a['shift']());}catch(_0x3be3a1){_0x1bcc2a['push'](_0x1bcc2a['shift']());}}}(a84_0x18de,0x40e41));import{listDbLinks}from'../../core/api-client.js';function a84_0x1720(_0x4fa1a7,_0x45c474){_0x4fa1a7=_0x4fa1a7-0x1be;const _0x18de85=a84_0x18de();let _0x172067=_0x18de85[_0x4fa1a7];return _0x172067;}function a84_0x18de(){const _0xccabab=['790170xIeZTE','Found\x20','appCode','List\x20database\x20connections\x20(dblinks)\x20for\x20the\x20current\x20app\x20with\x20analysis\x20status\x20—\x20for\x20AI\x20to\x20pick\x20ids\x20before\x20db\x20detail\x20/\x20analyze\x20/\x20tables','9DWEdfS','6203784fRpgPG','pagesize','list','579184ZIdGxW','7835xUbHDI','450644cbMLFO','num','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','\x20database\x20connection(s)','number','498264grxkny','length','Page\x20size','1266UXIijU','335027MVCaLo','page','Page\x20index\x20(1-based)'];a84_0x18de=function(){return _0xccabab;};return a84_0x18de();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a84_0x2079c5(0x1c8),'description':a84_0x2079c5(0x1c4),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a84_0x2079c5(0x1bf),'type':a84_0x2079c5(0x1cf),'description':a84_0x2079c5(0x1c0),'default':0x1},{'name':a84_0x2079c5(0x1c7),'type':a84_0x2079c5(0x1cf),'description':a84_0x2079c5(0x1d2),'default':0x64}],async 'execute'(_0x2547fc){const _0x4f8951=a84_0x2079c5,_0x37de9c=_0x2547fc['num'](_0x4f8951(0x1bf),0x1)||0x1,_0x4f675d=_0x2547fc[_0x4f8951(0x1cc)](_0x4f8951(0x1c7),0x64)||0x64,{items:_0x18a969,paging:_0x295c47}=await listDbLinks(_0x2547fc[_0x4f8951(0x1c3)],{'currentPage':_0x37de9c,'pageSize':_0x4f675d}),_0x314218=sanitizeDbLinkList(_0x18a969),_0x3fc913=_0x295c47?_0x295c47:{'currentPage':_0x37de9c,'pageSize':_0x4f675d,'rowsOnPage':_0x314218['length'],'totalCount':null,'note':_0x4f8951(0x1cd)};return{'ok':!![],'data':{'connections':_0x314218,'paging':_0x3fc913},'message':_0x4f8951(0x1c2)+_0x314218[_0x4f8951(0x1d1)]+_0x4f8951(0x1ce)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a85_0x3d5f(_0x1018b4,_0x5e737d){_0x1018b4=_0x1018b4-0x10a;const _0x4c2d8b=a85_0x4c2d();let _0x3d5fa2=_0x4c2d8b[_0x1018b4];return _0x3d5fa2;}(function(_0x1fac28,_0xc590fd){const _0x5e6082=a85_0x3d5f,_0x3078c5=_0x1fac28();while(!![]){try{const _0xeb376b=parseInt(_0x5e6082(0x114))/0x1+-parseInt(_0x5e6082(0x11a))/0x2+parseInt(_0x5e6082(0x11b))/0x3*(-parseInt(_0x5e6082(0x11d))/0x4)+parseInt(_0x5e6082(0x11e))/0x5+-parseInt(_0x5e6082(0x10d))/0x6+-parseInt(_0x5e6082(0x11f))/0x7+parseInt(_0x5e6082(0x11c))/0x8;if(_0xeb376b===_0xc590fd)break;else _0x3078c5['push'](_0x3078c5['shift']());}catch(_0x10a146){_0x3078c5['push'](_0x3078c5['shift']());}}}(a85_0x4c2d,0xd1168));import{getAppBaseUrl}from'../../constant/domain.js';function a85_0x4c2d(){const _0x35f373=['2271375tZfbBN','3843035bLEIcq','credential','[redacted]','includes','passwd','password','keys','3423864ptPqiH','toLowerCase','accesskey','jdbcurl','connectionstring','length','/data/er?dbId=','690659tGdYLN','privatekey','/data/database','trim','number','secret','223020UUlxHB','6jxLtqr','17554808ABYEFo','2503404AjTvMH'];a85_0x4c2d=function(){return _0x35f373;};return a85_0x4c2d();}function shouldRedactKey(_0x3f1b1d){const _0x3741f5=a85_0x3d5f,_0x5dc16b=_0x3f1b1d[_0x3741f5(0x10e)]();if(_0x5dc16b===_0x3741f5(0x10b)||_0x5dc16b===_0x3741f5(0x10a)||_0x5dc16b==='dbpassword')return!![];if(_0x5dc16b['includes'](_0x3741f5(0x119))||_0x5dc16b[_0x3741f5(0x122)]('token')||_0x5dc16b[_0x3741f5(0x122)](_0x3741f5(0x120)))return!![];if(_0x5dc16b['includes'](_0x3741f5(0x115))||_0x5dc16b[_0x3741f5(0x122)](_0x3741f5(0x10f)))return!![];if(_0x5dc16b==='authorization'||_0x5dc16b===_0x3741f5(0x111)||_0x5dc16b===_0x3741f5(0x110))return!![];return![];}export function sanitizeDbLinkForOutput(_0x4cfa39){const _0x249cc2=a85_0x3d5f,_0x4e8338={..._0x4cfa39};for(const _0x3fa3d1 of Object[_0x249cc2(0x10c)](_0x4e8338)){if(!shouldRedactKey(_0x3fa3d1))continue;const _0x2459a6=_0x4e8338[_0x3fa3d1];_0x2459a6!=null&&String(_0x2459a6)[_0x249cc2(0x112)]>0x0&&(_0x4e8338[_0x3fa3d1]=_0x249cc2(0x121));}return _0x4e8338;}export function sanitizeDbLinkList(_0x2da75a){return _0x2da75a['map'](_0x6ece30=>sanitizeDbLinkForOutput(_0x6ece30));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x5bed0c){const _0x9019bf=a85_0x3d5f,_0x2b731f=_0x5bed0c[_0x9019bf(0x117)]();if(!_0x2b731f)return![];return DB_URL_PATTERN['test'](_0x2b731f);}export function buildDbPageLinks(_0x23b432,_0x4767e7){const _0x1bd757=a85_0x3d5f,_0x412d84=_0x23b432?.[_0x1bd757(0x117)]();if(!_0x412d84)return undefined;const _0x59381b=typeof _0x4767e7===_0x1bd757(0x118)?String(_0x4767e7):String(_0x4767e7??'')[_0x1bd757(0x117)]();if(!_0x59381b)return undefined;const _0x3f91ed=Number(_0x59381b);if(!Number['isFinite'](_0x3f91ed)||_0x3f91ed<=0x0)return undefined;const _0x1c71f6=getAppBaseUrl(_0x412d84),_0x5860be=encodeURIComponent(String(_0x3f91ed));return{'databasePage':_0x1c71f6+_0x1bd757(0x116),'erPage':_0x1c71f6+_0x1bd757(0x113)+_0x5860be};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a86_0x59b584=a86_0x5135;function a86_0x5135(_0x1b0301,_0x46ff94){_0x1b0301=_0x1b0301-0x8d;const _0x3c33d3=a86_0x3c33();let _0x5135d2=_0x3c33d3[_0x1b0301];return _0x5135d2;}function a86_0x3c33(){const _0x56ec69=['length','\x20table(s)\x20on\x20db\x20link\x20','866730OdhjEU','num','12BXFjUG','27002qClOrg','267177zYSjuG','49FcsVya','464348tWuEDE','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','150896PVxtAu','3283119jamTQH','851040HWwDPo','appCode'];a86_0x3c33=function(){return _0x56ec69;};return a86_0x3c33();}(function(_0x22d794,_0x5dc209){const _0x446bd1=a86_0x5135,_0x42b14c=_0x22d794();while(!![]){try{const _0xc0acc2=-parseInt(_0x446bd1(0x93))/0x1*(-parseInt(_0x446bd1(0x92))/0x2)+parseInt(_0x446bd1(0x94))/0x3+parseInt(_0x446bd1(0x96))/0x4+parseInt(_0x446bd1(0x9a))/0x5+-parseInt(_0x446bd1(0x90))/0x6+parseInt(_0x446bd1(0x95))/0x7*(parseInt(_0x446bd1(0x98))/0x8)+-parseInt(_0x446bd1(0x99))/0x9;if(_0xc0acc2===_0x5dc209)break;else _0x42b14c['push'](_0x42b14c['shift']());}catch(_0x5adee6){_0x42b14c['push'](_0x42b14c['shift']());}}}(a86_0x3c33,0x2719a));import{getDbAllTableList}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbTables={'service':'db','command':'tables','description':a86_0x59b584(0x97),'risk':'read','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x467e4f){const _0x664c80=a86_0x59b584,_0x20391c=_0x467e4f[_0x664c80(0x91)]('id'),_0x14935f=await getDbAllTableList(_0x467e4f[_0x664c80(0x8d)],_0x20391c);return{'ok':!![],'data':{'dbLinkId':_0x20391c,'total':_0x14935f[_0x664c80(0x8e)],'tables':_0x14935f},'message':_0x14935f[_0x664c80(0x8e)]+_0x664c80(0x8f)+_0x20391c};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a87_0x20ad54=a87_0x1826;(function(_0x2e2129,_0x3214be){const _0x16df9e=a87_0x1826,_0x4b1ba1=_0x2e2129();while(!![]){try{const _0x587a22=parseInt(_0x16df9e(0x118))/0x1*(parseInt(_0x16df9e(0x117))/0x2)+-parseInt(_0x16df9e(0x10d))/0x3+-parseInt(_0x16df9e(0x109))/0x4+-parseInt(_0x16df9e(0x111))/0x5*(-parseInt(_0x16df9e(0x110))/0x6)+parseInt(_0x16df9e(0x112))/0x7+parseInt(_0x16df9e(0x10b))/0x8+-parseInt(_0x16df9e(0x116))/0x9*(parseInt(_0x16df9e(0x113))/0xa);if(_0x587a22===_0x3214be)break;else _0x4b1ba1['push'](_0x4b1ba1['shift']());}catch(_0xa8fcf4){_0x4b1ba1['push'](_0x4b1ba1['shift']());}}}(a87_0x13a6,0x238ea));import{testDbLinkConnect}from'../../core/api-client.js';function a87_0x13a6(){const _0x2ac418=['990JQYoSu','test','message','9549iaDxft','2SIqOqt','61867IIvbon','success','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','read','\x20(see\x20data.result)','Connection\x20OK\x20for\x20db\x20link\x20','keys','code','796568YYrcXr','data','2024816hjabFd','object','817005rvBBFW','msg','length','4266oCfsud','1655JHpxll','1202936GRsRYn'];a87_0x13a6=function(){return _0x2ac418;};return a87_0x13a6();}function a87_0x1826(_0x2c5855,_0x3f947b){_0x2c5855=_0x2c5855-0x109;const _0x13a6e2=a87_0x13a6();let _0x182639=_0x13a6e2[_0x2c5855];return _0x182639;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x54b03d){const _0x12069d=a87_0x1826;if(_0x54b03d===!![]||_0x54b03d===![])return{'success':_0x54b03d};if(_0x54b03d===null||_0x54b03d===undefined)return{'type':typeof _0x54b03d};if(typeof _0x54b03d!=='object')return{'type':typeof _0x54b03d};const _0x2f44ab=_0x54b03d,_0x45a188=[_0x12069d(0x119),_0x12069d(0x115),_0x12069d(0x11f),'error',_0x12069d(0x10e),_0x12069d(0x10a)],_0x18aede={};for(const _0x7035e8 of _0x45a188){if(_0x7035e8 in _0x2f44ab)_0x18aede[_0x7035e8]=_0x2f44ab[_0x7035e8];}return Object['keys'](_0x18aede)[_0x12069d(0x10f)]===0x0&&(_0x18aede[_0x12069d(0x11e)]=Object[_0x12069d(0x11e)](_0x2f44ab)['slice'](0x0,0x14)),_0x18aede;}export const dbTest={'service':'db','command':a87_0x20ad54(0x114),'description':a87_0x20ad54(0x11a),'risk':a87_0x20ad54(0x11b),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5d6b40){const _0x192b13=a87_0x20ad54,_0x1f5837=_0x5d6b40['num']('id'),_0x4253b7=await testDbLinkConnect(_0x1f5837),_0x5a1193=_0x4253b7===!![]||typeof _0x4253b7===_0x192b13(0x10c)&&_0x4253b7!==null&&_0x4253b7[_0x192b13(0x119)]===!![],_0x5883ab=summarizeTestConnectResult(_0x4253b7);return{'ok':!![],'data':{'id':_0x1f5837,'connected':Boolean(_0x5a1193),'result':_0x5883ab},'message':_0x5a1193?_0x192b13(0x11d)+_0x1f5837:'Connection\x20check\x20finished\x20for\x20db\x20link\x20'+_0x1f5837+_0x192b13(0x11c)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a88_0x2c28cf=a88_0x118d;(function(_0x45fece,_0x5c4d74){const _0x310e1b=a88_0x118d,_0x32cfc5=_0x45fece();while(!![]){try{const _0x191066=parseInt(_0x310e1b(0xc3))/0x1*(parseInt(_0x310e1b(0xbe))/0x2)+-parseInt(_0x310e1b(0xac))/0x3*(-parseInt(_0x310e1b(0xbb))/0x4)+parseInt(_0x310e1b(0xa5))/0x5*(-parseInt(_0x310e1b(0xb3))/0x6)+-parseInt(_0x310e1b(0xab))/0x7*(-parseInt(_0x310e1b(0xb2))/0x8)+parseInt(_0x310e1b(0xb5))/0x9+parseInt(_0x310e1b(0xbd))/0xa+-parseInt(_0x310e1b(0xb0))/0xb;if(_0x191066===_0x5c4d74)break;else _0x32cfc5['push'](_0x32cfc5['shift']());}catch(_0x5ec8d6){_0x32cfc5['push'](_0x32cfc5['shift']());}}}(a88_0x3d10,0xf1912));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbUpdate={'service':'db','command':a88_0x2c28cf(0xa4),'description':a88_0x2c28cf(0xa6),'risk':a88_0x2c28cf(0xc0),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a88_0x2c28cf(0xc5),'type':a88_0x2c28cf(0xc1),'description':a88_0x2c28cf(0xb1)},{'name':a88_0x2c28cf(0xc7),'type':a88_0x2c28cf(0xc1),'description':a88_0x2c28cf(0xad)},{'name':a88_0x2c28cf(0xba),'type':a88_0x2c28cf(0xc1),'description':a88_0x2c28cf(0xb4)},{'name':a88_0x2c28cf(0xb6),'type':a88_0x2c28cf(0xc1),'description':a88_0x2c28cf(0xbc)},{'name':a88_0x2c28cf(0xaa),'type':a88_0x2c28cf(0xc1),'description':a88_0x2c28cf(0xc4)},{'name':a88_0x2c28cf(0xa7),'type':a88_0x2c28cf(0xc1),'description':'New\x20description'}],async 'validate'(_0x103634){const _0x4bbf7f=a88_0x2c28cf,_0x52ed2e=_0x103634[_0x4bbf7f(0xc8)]('dburl');if(_0x52ed2e&&!validateDbUrl(_0x52ed2e[_0x4bbf7f(0xa9)]()))throw CliErrors[_0x4bbf7f(0xa8)](_0x4bbf7f(0xb7)+_0x52ed2e+'\x22');},async 'dryRun'(_0x246341){const _0x57fe27=a88_0x2c28cf,_0x199852=_0x246341[_0x57fe27(0xae)]('id'),_0xe4d7e1=await getDbLinkInfo(_0x199852),_0x318bec={..._0xe4d7e1},_0x447904=_0x246341[_0x57fe27(0xc8)]('dbname');if(_0x447904)_0x318bec['dbName']=_0x447904;const _0x93430d=_0x246341[_0x57fe27(0xc8)](_0x57fe27(0xc7));if(_0x93430d)_0x318bec['dbUrl']=_0x93430d[_0x57fe27(0xa9)]();const _0x15eb11=_0x246341['str']('username');if(_0x15eb11)_0x318bec['username']=_0x15eb11;const _0x10bd8e=_0x246341[_0x57fe27(0xc8)](_0x57fe27(0xb6));if(_0x10bd8e)_0x318bec[_0x57fe27(0xb6)]=_0x10bd8e;const _0x204747=_0x246341[_0x57fe27(0xc8)](_0x57fe27(0xaa));if(_0x204747)_0x318bec[_0x57fe27(0xb9)]=_0x204747;const _0x42d3fc=_0x246341[_0x57fe27(0xc8)]('dbdesc');if(_0x42d3fc)_0x318bec['dbDesc']=_0x42d3fc;const _0x3224f7=sanitizeDbLinkForOutput(_0x318bec);return{'method':_0x57fe27(0xaf),'url':_0x57fe27(0xc6),'body':_0x3224f7,'description':'Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview'};},async 'execute'(_0xe0cb66){const _0x5a528d=a88_0x2c28cf,_0x416c6b=_0xe0cb66[_0x5a528d(0xae)]('id'),_0x534d85=await getDbLinkInfo(_0x416c6b),_0x864bc={..._0x534d85},_0x2de643=_0xe0cb66[_0x5a528d(0xc8)](_0x5a528d(0xc5));if(_0x2de643)_0x864bc[_0x5a528d(0xa3)]=_0x2de643;const _0x3fd4bf=_0xe0cb66[_0x5a528d(0xc8)](_0x5a528d(0xc7));if(_0x3fd4bf)_0x864bc[_0x5a528d(0xc2)]=_0x3fd4bf[_0x5a528d(0xa9)]();const _0x36bb6d=_0xe0cb66[_0x5a528d(0xc8)](_0x5a528d(0xba));if(_0x36bb6d)_0x864bc[_0x5a528d(0xba)]=_0x36bb6d;const _0x2235a2=_0xe0cb66['str'](_0x5a528d(0xb6));if(_0x2235a2)_0x864bc[_0x5a528d(0xb6)]=_0x2235a2;const _0x4c748d=_0xe0cb66[_0x5a528d(0xc8)]('dbparam');if(_0x4c748d)_0x864bc[_0x5a528d(0xb9)]=_0x4c748d;const _0x23b2d5=_0xe0cb66[_0x5a528d(0xc8)](_0x5a528d(0xa7));if(_0x23b2d5)_0x864bc[_0x5a528d(0xb8)]=_0x23b2d5;const {id:_0x20f0f1,entity:_0xb502fc}=normalizeEntityWithIdResponse(await updateDbLink(_0x864bc));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0xb502fc),'message':_0x5a528d(0xbf)+(_0x20f0f1??_0x416c6b)};}};function a88_0x118d(_0x2d1a2c,_0x43193f){_0x2d1a2c=_0x2d1a2c-0xa3;const _0x3d10e6=a88_0x3d10();let _0x118d83=_0x3d10e6[_0x2d1a2c];return _0x118d83;}function a88_0x3d10(){const _0x3eec7f=['dbparam','7oPOPpE','16230DHKEKp','New\x20host:port','num','POST','5174422bUBTqV','New\x20database\x20name','1220136vRYhIE','9973542ChfxFw','New\x20username','2851812FjxaDA','password','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','dbDesc','dbParam','username','400RClXWT','New\x20password\x20(omit\x20to\x20leave\x20unchanged).\x20Empty\x20string\x20may\x20be\x20treated\x20as\x20no-op\x20or\x20rejected\x20by\x20API','3941650RjuERO','3435134jzFbfd','Updated\x20db\x20link\x20','write','string','dbUrl','1EHuPMI','New\x20connection\x20parameter\x20string','dbname','/smartapi/dblink/update','dburl','str','dbName','update','5eTMKWO','Update\x20an\x20existing\x20database\x20connection.\x20Only\x20supplied\x20fields\x20are\x20overwritten;\x20others\x20keep\x20server\x20values','dbdesc','validation','trim'];a88_0x3d10=function(){return _0x3eec7f;};return a88_0x3d10();}
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a87_0x2bdbfd=a87_0x441c;function a87_0x4178(){const _0x41d08b=['\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','locale','riskLevel','message','✗\x20Not\x20logged\x20in','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','yellow','(set,\x20length=','\x20\x20\x20\x20accessKey:\x20\x20','raw','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','doctor','✓\x20Valid\x20JSON','apiDir','✓\x20Valid','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','source','✗\x20Expired','5946000OKWSRs','(not\x20found)','Project','72IQVeiX','padEnd','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20(default)','\x20\x20Apps','✗\x20Invalid\x20JSON','17259624PnaymZ','value','\x20doctor','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','green','appCode','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','425DhajpX','\x20\x20API\x20Endpoints','\x20\x20Config\x20Files','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','gray','4512378KkVcQV','2893FnhnZF','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','verbose','(none)','cookie','repeat','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','957964tecdLG','(default:\x20','appcode','accessKey','\x20\x20─','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','explicitAppName','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(set\x20via\x20file,\x20length=','bold','arch','log','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','(no\x20file)','⚠\x20Empty\x20(treated\x20as\x20{})','missing','109580rYhHpK','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(missing)','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','56ZHbodi','29505wFpFTA','(default)','apps','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20Auth','currentApp','slice','env','61724EScAVW','red','read','version','length','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'];a87_0x4178=function(){return _0x41d08b;};return a87_0x4178();}(function(_0x4a659d,_0x4f7e31){const _0x1ec806=a87_0x441c,_0x5040ee=_0x4a659d();while(!![]){try{const _0x2d7fff=-parseInt(_0x1ec806(0x154))/0x1*(-parseInt(_0x1ec806(0x17b))/0x2)+parseInt(_0x1ec806(0x18e))/0x3+-parseInt(_0x1ec806(0x15f))/0x4*(-parseInt(_0x1ec806(0x189))/0x5)+-parseInt(_0x1ec806(0x178))/0x6+parseInt(_0x1ec806(0x196))/0x7*(-parseInt(_0x1ec806(0x153))/0x8)+parseInt(_0x1ec806(0x181))/0x9+-parseInt(_0x1ec806(0x1a7))/0xa*(parseInt(_0x1ec806(0x18f))/0xb);if(_0x2d7fff===_0x4f7e31)break;else _0x5040ee['push'](_0x5040ee['shift']());}catch(_0x43a76e){_0x5040ee['push'](_0x5040ee['shift']());}}}(a87_0x4178,0xeb897));import a87_0x3e6c65 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';function a87_0x441c(_0x4162dc,_0x16c7f0){_0x4162dc=_0x4162dc-0x150;const _0x417809=a87_0x4178();let _0x441cf4=_0x417809[_0x4162dc];return _0x441cf4;}import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x24c895){const _0x5c2c67=a87_0x441c,_0x12f454=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x5c2c67(0x15d)](0x0,0xa)+')':VERSION,_0x5c6ff1=buildConfigFromFlags({}),_0x487bec=getCookie();console[_0x5c2c67(0x1a2)](),console[_0x5c2c67(0x1a2)](a87_0x3e6c65[_0x5c2c67(0x1a0)](CLI_BIN_NAME+_0x5c2c67(0x183))),console[_0x5c2c67(0x1a2)](a87_0x3e6c65['gray']('─'[_0x5c2c67(0x194)](0x32))),console[_0x5c2c67(0x1a2)](_0x5c2c67(0x164)+_0x12f454),console[_0x5c2c67(0x1a2)](_0x5c2c67(0x150)+process[_0x5c2c67(0x162)]),console['log']('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process['platform']+'\x20'+process[_0x5c2c67(0x1a1)]),console['log'](),console[_0x5c2c67(0x1a2)](a87_0x3e6c65['bold'](_0x5c2c67(0x18b))),console[_0x5c2c67(0x1a2)](a87_0x3e6c65[_0x5c2c67(0x18d)]('\x20\x20─'[_0x5c2c67(0x194)](0x1e)));const _0x144143=getGlobalConfigPath(),_0x3c9164=getProjectConfigPath();console[_0x5c2c67(0x1a2)](_0x5c2c67(0x158)+(_0x144143||a87_0x3e6c65[_0x5c2c67(0x18d)](_0x5c2c67(0x179)))),console['log']('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3c9164||a87_0x3e6c65[_0x5c2c67(0x18d)](_0x5c2c67(0x179)))),console[_0x5c2c67(0x1a2)](),console[_0x5c2c67(0x1a2)](a87_0x3e6c65['bold'](_0x5c2c67(0x185))),console[_0x5c2c67(0x1a2)](a87_0x3e6c65[_0x5c2c67(0x18d)](_0x5c2c67(0x19a)[_0x5c2c67(0x194)](0x1e)));const _0xb023fa=(_0x3ba51f,_0x7c8da0)=>{const _0x502175=_0x5c2c67;if(!_0x7c8da0){console[_0x502175(0x1a2)]('\x20\x20'+_0x3ba51f[_0x502175(0x17c)](0x11)+'\x20'+a87_0x3e6c65[_0x502175(0x18d)](_0x502175(0x1a4)));return;}const _0x2ee3fa=inspectCliConfigJsonFile(_0x7c8da0);if(_0x2ee3fa[_0x502175(0x19c)]==='ok')console[_0x502175(0x1a2)]('\x20\x20'+_0x3ba51f[_0x502175(0x17c)](0x11)+'\x20'+a87_0x3e6c65[_0x502175(0x186)](_0x502175(0x171)));else{if(_0x2ee3fa[_0x502175(0x19c)]==='empty')console['log']('\x20\x20'+_0x3ba51f['padEnd'](0x11)+'\x20'+a87_0x3e6c65[_0x502175(0x16b)](_0x502175(0x1a5)));else _0x2ee3fa[_0x502175(0x19c)]===_0x502175(0x1a6)?console[_0x502175(0x1a2)]('\x20\x20'+_0x3ba51f[_0x502175(0x17c)](0x11)+'\x20'+a87_0x3e6c65[_0x502175(0x18d)](_0x502175(0x151))):(console[_0x502175(0x1a2)]('\x20\x20'+_0x3ba51f['padEnd'](0x11)+'\x20'+a87_0x3e6c65['red'](_0x502175(0x180))),console[_0x502175(0x1a2)]('\x20\x20'+''[_0x502175(0x17c)](0x11)+'\x20'+a87_0x3e6c65['red'](_0x2ee3fa[_0x502175(0x168)])));}};_0xb023fa('Global',_0x144143),_0xb023fa(_0x5c2c67(0x17a),_0x3c9164),console[_0x5c2c67(0x1a2)](),console['log'](a87_0x3e6c65[_0x5c2c67(0x1a0)]('\x20\x20Merged\x20Config')),console[_0x5c2c67(0x1a2)](a87_0x3e6c65[_0x5c2c67(0x18d)]('\x20\x20─'['repeat'](0x1e))),console[_0x5c2c67(0x1a2)](_0x5c2c67(0x16a)+(_0x5c6ff1[_0x5c2c67(0x187)]||a87_0x3e6c65[_0x5c2c67(0x160)]('(not\x20set)'))),console['log'](_0x5c2c67(0x184)+_0x5c6ff1['env']),console[_0x5c2c67(0x1a2)](_0x5c2c67(0x18c)+_0x5c6ff1[_0x5c2c67(0x166)]),console[_0x5c2c67(0x1a2)](_0x5c2c67(0x152)+_0x5c6ff1['apiDir']),console[_0x5c2c67(0x1a2)](_0x5c2c67(0x1a3)+(_0x5c6ff1['defaultApp']||a87_0x3e6c65['gray'](_0x5c2c67(0x192)))),console['log'](_0x5c2c67(0x190)+(_0x5c6ff1[_0x5c2c67(0x15c)]||a87_0x3e6c65[_0x5c2c67(0x18d)](_0x5c2c67(0x192)))),console[_0x5c2c67(0x1a2)]('\x20\x20explicitAppName:\x20'+(_0x5c6ff1[_0x5c2c67(0x19d)]||a87_0x3e6c65[_0x5c2c67(0x18d)](_0x5c2c67(0x192)))),console['log'](_0x5c2c67(0x19e)+(_0x5c6ff1['format']||a87_0x3e6c65[_0x5c2c67(0x18d)](_0x5c2c67(0x197)+DEFAULT_CONFIG_VALUES['format']+')'))),console['log'](_0x5c2c67(0x159)+(_0x5c6ff1['pageSize']??a87_0x3e6c65[_0x5c2c67(0x18d)](_0x5c2c67(0x155)))),console[_0x5c2c67(0x1a2)](_0x5c2c67(0x175)+_0x5c6ff1[_0x5c2c67(0x167)]),console['log'](_0x5c2c67(0x188)+_0x5c6ff1[_0x5c2c67(0x191)]),console['log'](_0x5c2c67(0x19b)+(_0x5c6ff1[_0x5c2c67(0x193)]?a87_0x3e6c65[_0x5c2c67(0x186)](_0x5c2c67(0x16c)+_0x5c6ff1[_0x5c2c67(0x193)][_0x5c2c67(0x163)]+')'):_0x487bec?a87_0x3e6c65[_0x5c2c67(0x186)](_0x5c2c67(0x19f)+_0x487bec[_0x5c2c67(0x163)]+')'):a87_0x3e6c65[_0x5c2c67(0x18d)]('(none)')));const _0x9c4326=Object['keys'](_0x5c6ff1[_0x5c2c67(0x156)]);if(_0x9c4326[_0x5c2c67(0x163)]>0x0){console[_0x5c2c67(0x1a2)](),console[_0x5c2c67(0x1a2)](a87_0x3e6c65[_0x5c2c67(0x1a0)](_0x5c2c67(0x17f))),console[_0x5c2c67(0x1a2)](a87_0x3e6c65[_0x5c2c67(0x18d)](_0x5c2c67(0x19a)[_0x5c2c67(0x194)](0x1e)));for(const _0x22385d of _0x9c4326){const _0x34b677=_0x5c6ff1[_0x5c2c67(0x156)][_0x22385d],_0xddbd67=_0x22385d===_0x5c6ff1['defaultApp'],_0x11ef11=_0x22385d===_0x5c6ff1[_0x5c2c67(0x15c)],_0x29dc68=_0x11ef11?a87_0x3e6c65[_0x5c2c67(0x186)]('\x20←\x20current'):'',_0x1e0bb9=_0xddbd67?_0x5c2c67(0x17e):'';console[_0x5c2c67(0x1a2)]('\x20\x20'+_0x22385d+_0x1e0bb9+_0x29dc68),console[_0x5c2c67(0x1a2)](_0x5c2c67(0x157)+_0x34b677[_0x5c2c67(0x198)]);const _0x3d68f8=buildAppDoctorFields(_0x34b677,{'env':_0x5c6ff1[_0x5c2c67(0x15e)],'apiDir':_0x5c6ff1[_0x5c2c67(0x16e)]['apiDir']||DEFAULT_CONFIG_VALUES[_0x5c2c67(0x172)],'cookie':_0x5c6ff1[_0x5c2c67(0x193)]||_0x487bec||undefined,'accessKey':_0x5c6ff1[_0x5c2c67(0x199)]});console['log'](_0x5c2c67(0x174)+_0x3d68f8[_0x5c2c67(0x15e)][_0x5c2c67(0x182)]+'\x20\x20'+a87_0x3e6c65['gray']('('+_0x3d68f8[_0x5c2c67(0x15e)]['source']+')')),console['log'](_0x5c2c67(0x165)+_0x3d68f8[_0x5c2c67(0x172)]['value']+'\x20\x20'+a87_0x3e6c65[_0x5c2c67(0x18d)]('('+_0x3d68f8[_0x5c2c67(0x172)][_0x5c2c67(0x176)]+')'));const _0x534fcf=_0x3d68f8[_0x5c2c67(0x193)]['value']?a87_0x3e6c65[_0x5c2c67(0x186)](_0x5c2c67(0x16c)+_0x3d68f8['cookie'][_0x5c2c67(0x182)][_0x5c2c67(0x163)]+')'):a87_0x3e6c65[_0x5c2c67(0x18d)](_0x5c2c67(0x192));console[_0x5c2c67(0x1a2)](_0x5c2c67(0x195)+_0x534fcf+'\x20\x20'+a87_0x3e6c65[_0x5c2c67(0x18d)]('('+_0x3d68f8[_0x5c2c67(0x193)][_0x5c2c67(0x176)]+')'));const _0x3c4b71=_0x3d68f8['accessKey'][_0x5c2c67(0x182)]?a87_0x3e6c65[_0x5c2c67(0x186)](_0x5c2c67(0x16c)+_0x3d68f8[_0x5c2c67(0x199)][_0x5c2c67(0x182)][_0x5c2c67(0x163)]+')'):a87_0x3e6c65[_0x5c2c67(0x18d)]('(none)');console['log'](_0x5c2c67(0x16d)+_0x3c4b71+'\x20\x20'+a87_0x3e6c65[_0x5c2c67(0x18d)]('('+_0x3d68f8[_0x5c2c67(0x199)][_0x5c2c67(0x176)]+')'));}}console[_0x5c2c67(0x1a2)](),console['log'](a87_0x3e6c65[_0x5c2c67(0x1a0)](_0x5c2c67(0x18a))),console[_0x5c2c67(0x1a2)](a87_0x3e6c65[_0x5c2c67(0x18d)](_0x5c2c67(0x19a)['repeat'](0x1e))),console[_0x5c2c67(0x1a2)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x5c2c67(0x1a2)](_0x5c2c67(0x17d)+getUserDomain()),console[_0x5c2c67(0x1a2)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x5c2c67(0x1a2)](),console['log'](a87_0x3e6c65['bold'](_0x5c2c67(0x15b))),console['log'](a87_0x3e6c65[_0x5c2c67(0x18d)](_0x5c2c67(0x19a)[_0x5c2c67(0x194)](0x1e)));if(_0x487bec){const _0x4dcd43=await getIsSessionValid();console[_0x5c2c67(0x1a2)](_0x5c2c67(0x16f)+(_0x4dcd43?a87_0x3e6c65[_0x5c2c67(0x186)](_0x5c2c67(0x173)):a87_0x3e6c65[_0x5c2c67(0x160)](_0x5c2c67(0x177))));}else console[_0x5c2c67(0x1a2)](_0x5c2c67(0x16f)+a87_0x3e6c65[_0x5c2c67(0x160)](_0x5c2c67(0x169)));return console[_0x5c2c67(0x1a2)](),{'ok':!![]};}export const doctorDefinition={'service':a87_0x2bdbfd(0x170),'command':'check','description':a87_0x2bdbfd(0x15a),'risk':a87_0x2bdbfd(0x161),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a89_0x2b9b4c=a89_0x29c1;(function(_0x11723c,_0x473695){const _0x19f589=a89_0x29c1,_0x368a5c=_0x11723c();while(!![]){try{const _0x536c6a=-parseInt(_0x19f589(0x213))/0x1+-parseInt(_0x19f589(0x23d))/0x2*(-parseInt(_0x19f589(0x20f))/0x3)+-parseInt(_0x19f589(0x232))/0x4+-parseInt(_0x19f589(0x202))/0x5*(parseInt(_0x19f589(0x1f5))/0x6)+-parseInt(_0x19f589(0x20c))/0x7*(-parseInt(_0x19f589(0x234))/0x8)+-parseInt(_0x19f589(0x241))/0x9*(parseInt(_0x19f589(0x22c))/0xa)+parseInt(_0x19f589(0x211))/0xb;if(_0x536c6a===_0x473695)break;else _0x368a5c['push'](_0x368a5c['shift']());}catch(_0x483a5c){_0x368a5c['push'](_0x368a5c['shift']());}}}(a89_0x1b54,0xc276d));function a89_0x29c1(_0x38e7f5,_0x4de526){_0x38e7f5=_0x38e7f5-0x1f2;const _0x1b54b5=a89_0x1b54();let _0x29c103=_0x1b54b5[_0x38e7f5];return _0x29c103;}function a89_0x1b54(){const _0x10d8fb=['\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','\x20doctor','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','6286844JXQtkO','\x20\x20─','184GlHgoS','\x20\x20Merged\x20Config','\x20\x20Config\x20JSON','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','env','message','\x20\x20Apps','locale','2bXtiaZ','(default)','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','(none)','12288501paEmWU','riskLevel','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','cookie','red','yellow','green','raw','24VfyUiK','log','\x20\x20Config\x20Files','arch','explicitAppName','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','read','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','Global','(not\x20set)','appcode','354940nsbdVQ','✗\x20Not\x20logged\x20in','✗\x20Invalid\x20JSON','repeat','\x20\x20runtimeDomain:\x20\x20\x20','Project','slice','(no\x20file)','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','389137JpygLg','format','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','3866199cwlRRq','length','23974214iWIuuu','keys','729223lyITus','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','✓\x20Valid','✗\x20Expired','bold','gray','source','doctor','defaultApp','version','(missing)','verbose','\x20←\x20current','apps','status','⚠\x20Empty\x20(treated\x20as\x20{})','(not\x20found)','missing','accessKey','check','value','✓\x20Valid\x20JSON','(set,\x20length=','apiDir','unknown','10dCWhrQ'];a89_0x1b54=function(){return _0x10d8fb;};return a89_0x1b54();}import a89_0x4f24f0 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x2eea7d){const _0x2c1a49=a89_0x29c1,_0x2ae088=GIT_COMMIT!==_0x2c1a49(0x22b)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x2c1a49(0x208)](0x0,0xa)+')':VERSION,_0x377d48=buildConfigFromFlags({}),_0x49fb15=getCookie();console[_0x2c1a49(0x1f6)](),console[_0x2c1a49(0x1f6)](a89_0x4f24f0[_0x2c1a49(0x217)](CLI_BIN_NAME+_0x2c1a49(0x230))),console[_0x2c1a49(0x1f6)](a89_0x4f24f0['gray']('─'[_0x2c1a49(0x205)](0x32))),console[_0x2c1a49(0x1f6)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x2ae088),console['log'](_0x2c1a49(0x243)+process[_0x2c1a49(0x21c)]),console[_0x2c1a49(0x1f6)](_0x2c1a49(0x20b)+process['platform']+'\x20'+process[_0x2c1a49(0x1f8)]),console[_0x2c1a49(0x1f6)](),console[_0x2c1a49(0x1f6)](a89_0x4f24f0[_0x2c1a49(0x217)](_0x2c1a49(0x1f7))),console[_0x2c1a49(0x1f6)](a89_0x4f24f0['gray']('\x20\x20─'[_0x2c1a49(0x205)](0x1e)));const _0xde52f=getGlobalConfigPath(),_0x50a03c=getProjectConfigPath();console[_0x2c1a49(0x1f6)](_0x2c1a49(0x22e)+(_0xde52f||a89_0x4f24f0[_0x2c1a49(0x218)](_0x2c1a49(0x223)))),console['log']('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x50a03c||a89_0x4f24f0[_0x2c1a49(0x218)](_0x2c1a49(0x223)))),console[_0x2c1a49(0x1f6)](),console['log'](a89_0x4f24f0[_0x2c1a49(0x217)](_0x2c1a49(0x236))),console[_0x2c1a49(0x1f6)](a89_0x4f24f0[_0x2c1a49(0x218)]('\x20\x20─'[_0x2c1a49(0x205)](0x1e)));const _0x42455e=(_0x44b0d9,_0x2d50bc)=>{const _0x2c443f=_0x2c1a49;if(!_0x2d50bc){console[_0x2c443f(0x1f6)]('\x20\x20'+_0x44b0d9[_0x2c443f(0x244)](0x11)+'\x20'+a89_0x4f24f0[_0x2c443f(0x218)](_0x2c443f(0x209)));return;}const _0x37d3c2=inspectCliConfigJsonFile(_0x2d50bc);if(_0x37d3c2[_0x2c443f(0x221)]==='ok')console[_0x2c443f(0x1f6)]('\x20\x20'+_0x44b0d9[_0x2c443f(0x244)](0x11)+'\x20'+a89_0x4f24f0[_0x2c443f(0x1f3)](_0x2c443f(0x228)));else{if(_0x37d3c2[_0x2c443f(0x221)]==='empty')console[_0x2c443f(0x1f6)]('\x20\x20'+_0x44b0d9[_0x2c443f(0x244)](0x11)+'\x20'+a89_0x4f24f0[_0x2c443f(0x1f2)](_0x2c443f(0x222)));else _0x37d3c2[_0x2c443f(0x221)]===_0x2c443f(0x224)?console[_0x2c443f(0x1f6)]('\x20\x20'+_0x44b0d9[_0x2c443f(0x244)](0x11)+'\x20'+a89_0x4f24f0[_0x2c443f(0x218)](_0x2c443f(0x21d))):(console['log']('\x20\x20'+_0x44b0d9[_0x2c443f(0x244)](0x11)+'\x20'+a89_0x4f24f0['red'](_0x2c443f(0x204))),console[_0x2c443f(0x1f6)]('\x20\x20'+''[_0x2c443f(0x244)](0x11)+'\x20'+a89_0x4f24f0[_0x2c443f(0x246)](_0x37d3c2[_0x2c443f(0x23a)])));}};_0x42455e(_0x2c1a49(0x1ff),_0xde52f),_0x42455e(_0x2c1a49(0x207),_0x50a03c),console[_0x2c1a49(0x1f6)](),console[_0x2c1a49(0x1f6)](a89_0x4f24f0[_0x2c1a49(0x217)](_0x2c1a49(0x235))),console[_0x2c1a49(0x1f6)](a89_0x4f24f0[_0x2c1a49(0x218)]('\x20\x20─'[_0x2c1a49(0x205)](0x1e))),console[_0x2c1a49(0x1f6)](_0x2c1a49(0x1fd)+(_0x377d48['appCode']||a89_0x4f24f0[_0x2c1a49(0x246)](_0x2c1a49(0x200)))),console[_0x2c1a49(0x1f6)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x377d48[_0x2c1a49(0x239)]),console[_0x2c1a49(0x1f6)](_0x2c1a49(0x20e)+_0x377d48[_0x2c1a49(0x23c)]),console[_0x2c1a49(0x1f6)]('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x377d48['apiDir']),console['log'](_0x2c1a49(0x22d)+(_0x377d48[_0x2c1a49(0x21b)]||a89_0x4f24f0[_0x2c1a49(0x218)]('(none)'))),console[_0x2c1a49(0x1f6)](_0x2c1a49(0x214)+(_0x377d48[_0x2c1a49(0x22f)]||a89_0x4f24f0[_0x2c1a49(0x218)]('(none)'))),console[_0x2c1a49(0x1f6)]('\x20\x20explicitAppName:\x20'+(_0x377d48[_0x2c1a49(0x1f9)]||a89_0x4f24f0[_0x2c1a49(0x218)](_0x2c1a49(0x240)))),console['log']('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x377d48[_0x2c1a49(0x20d)]||a89_0x4f24f0['gray']('(default:\x20'+DEFAULT_CONFIG_VALUES['format']+')'))),console['log']('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x377d48['pageSize']??a89_0x4f24f0[_0x2c1a49(0x218)](_0x2c1a49(0x23e)))),console['log'](_0x2c1a49(0x1fb)+_0x377d48[_0x2c1a49(0x242)]),console[_0x2c1a49(0x1f6)](_0x2c1a49(0x1fe)+_0x377d48[_0x2c1a49(0x21e)]),console[_0x2c1a49(0x1f6)](_0x2c1a49(0x237)+(_0x377d48[_0x2c1a49(0x245)]?a89_0x4f24f0['green']('(set,\x20length='+_0x377d48[_0x2c1a49(0x245)][_0x2c1a49(0x210)]+')'):_0x49fb15?a89_0x4f24f0[_0x2c1a49(0x1f3)]('(set\x20via\x20file,\x20length='+_0x49fb15[_0x2c1a49(0x210)]+')'):a89_0x4f24f0[_0x2c1a49(0x218)](_0x2c1a49(0x240))));const _0x2ca322=Object[_0x2c1a49(0x212)](_0x377d48[_0x2c1a49(0x220)]);if(_0x2ca322['length']>0x0){console[_0x2c1a49(0x1f6)](),console[_0x2c1a49(0x1f6)](a89_0x4f24f0[_0x2c1a49(0x217)](_0x2c1a49(0x23b))),console[_0x2c1a49(0x1f6)](a89_0x4f24f0[_0x2c1a49(0x218)](_0x2c1a49(0x233)[_0x2c1a49(0x205)](0x1e)));for(const _0x2cf936 of _0x2ca322){const _0x317daf=_0x377d48['apps'][_0x2cf936],_0x26a44b=_0x2cf936===_0x377d48['defaultApp'],_0xa89e94=_0x2cf936===_0x377d48[_0x2c1a49(0x22f)],_0x1468c2=_0xa89e94?a89_0x4f24f0[_0x2c1a49(0x1f3)](_0x2c1a49(0x21f)):'',_0x497ff3=_0x26a44b?'\x20(default)':'';console[_0x2c1a49(0x1f6)]('\x20\x20'+_0x2cf936+_0x497ff3+_0x1468c2),console[_0x2c1a49(0x1f6)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x317daf[_0x2c1a49(0x201)]);const _0x9ed446=buildAppDoctorFields(_0x317daf,{'env':_0x377d48['env'],'apiDir':_0x377d48[_0x2c1a49(0x1f4)][_0x2c1a49(0x22a)]||DEFAULT_CONFIG_VALUES[_0x2c1a49(0x22a)],'cookie':_0x377d48[_0x2c1a49(0x245)]||_0x49fb15||undefined,'accessKey':_0x377d48[_0x2c1a49(0x225)]});console['log'](_0x2c1a49(0x23f)+_0x9ed446['env']['value']+'\x20\x20'+a89_0x4f24f0[_0x2c1a49(0x218)]('('+_0x9ed446['env']['source']+')')),console['log']('\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20'+_0x9ed446[_0x2c1a49(0x22a)][_0x2c1a49(0x227)]+'\x20\x20'+a89_0x4f24f0[_0x2c1a49(0x218)]('('+_0x9ed446[_0x2c1a49(0x22a)][_0x2c1a49(0x219)]+')'));const _0x4087f1=_0x9ed446['cookie'][_0x2c1a49(0x227)]?a89_0x4f24f0[_0x2c1a49(0x1f3)](_0x2c1a49(0x229)+_0x9ed446[_0x2c1a49(0x245)][_0x2c1a49(0x227)][_0x2c1a49(0x210)]+')'):a89_0x4f24f0['gray'](_0x2c1a49(0x240));console['log'](_0x2c1a49(0x1fa)+_0x4087f1+'\x20\x20'+a89_0x4f24f0['gray']('('+_0x9ed446[_0x2c1a49(0x245)][_0x2c1a49(0x219)]+')'));const _0x543f7f=_0x9ed446[_0x2c1a49(0x225)][_0x2c1a49(0x227)]?a89_0x4f24f0['green'](_0x2c1a49(0x229)+_0x9ed446['accessKey'][_0x2c1a49(0x227)][_0x2c1a49(0x210)]+')'):a89_0x4f24f0['gray'](_0x2c1a49(0x240));console[_0x2c1a49(0x1f6)]('\x20\x20\x20\x20accessKey:\x20\x20'+_0x543f7f+'\x20\x20'+a89_0x4f24f0[_0x2c1a49(0x218)]('('+_0x9ed446[_0x2c1a49(0x225)][_0x2c1a49(0x219)]+')'));}}console['log'](),console[_0x2c1a49(0x1f6)](a89_0x4f24f0['bold']('\x20\x20API\x20Endpoints')),console['log'](a89_0x4f24f0['gray'](_0x2c1a49(0x233)[_0x2c1a49(0x205)](0x1e))),console[_0x2c1a49(0x1f6)](_0x2c1a49(0x20a)+getApiDomain()),console['log'](_0x2c1a49(0x238)+getUserDomain()),console['log'](_0x2c1a49(0x206)+getRuntimeDomain()),console[_0x2c1a49(0x1f6)](),console[_0x2c1a49(0x1f6)](a89_0x4f24f0['bold']('\x20\x20Auth')),console[_0x2c1a49(0x1f6)](a89_0x4f24f0['gray'](_0x2c1a49(0x233)[_0x2c1a49(0x205)](0x1e)));if(_0x49fb15){const _0x3d9603=await getIsSessionValid();console[_0x2c1a49(0x1f6)](_0x2c1a49(0x231)+(_0x3d9603?a89_0x4f24f0[_0x2c1a49(0x1f3)](_0x2c1a49(0x215)):a89_0x4f24f0[_0x2c1a49(0x246)](_0x2c1a49(0x216))));}else console[_0x2c1a49(0x1f6)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a89_0x4f24f0[_0x2c1a49(0x246)](_0x2c1a49(0x203)));return console[_0x2c1a49(0x1f6)](),{'ok':!![]};}export const doctorDefinition={'service':a89_0x2b9b4c(0x21a),'command':a89_0x2b9b4c(0x226),'description':'Diagnose\x20CLI\x20configuration\x20and\x20connectivity','risk':a89_0x2b9b4c(0x1fc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0x50f946=a90_0x420e;(function(_0x2dab96,_0x18db59){const _0x22db3f=a90_0x420e,_0x4911b1=_0x2dab96();while(!![]){try{const _0x580e9e=-parseInt(_0x22db3f(0x14e))/0x1+parseInt(_0x22db3f(0x140))/0x2+parseInt(_0x22db3f(0x149))/0x3*(parseInt(_0x22db3f(0x132))/0x4)+parseInt(_0x22db3f(0x158))/0x5+-parseInt(_0x22db3f(0x143))/0x6+-parseInt(_0x22db3f(0x15b))/0x7+-parseInt(_0x22db3f(0x13d))/0x8;if(_0x580e9e===_0x18db59)break;else _0x4911b1['push'](_0x4911b1['shift']());}catch(_0x398a4c){_0x4911b1['push'](_0x4911b1['shift']());}}}(a90_0x4799,0x877c9));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';function a90_0x4799(){const _0x1622e8=['1567152yBeJUi','boolean','App\x20code\x20to\x20initialize\x20with','env','project','1047449NumVhS','run','log','map','Use\x20`','some','nonInteractive','valid','cwd','init','4295610zNzHws','\x20\x20Default:\x20','检测到旧配置文件,正在自动升级...\x0a','2720844fUJNvO','Target\x20environment','Auto-confirm\x20prompts','production','8KfURPf','str','validation','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','appcode','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','../../commands/project/init.js','Usage:\x20','appCode','4244368vvSNdi','defaultApp','\x20config','1918188mYJEsN','global','flagMissing','2048064sWdplZ','\x0a✓\x20Successfully\x20initialized\x20','bool','\x20\x20Apps:\x20','yes','string'];a90_0x4799=function(){return _0x1622e8;};return a90_0x4799();}function a90_0x420e(_0x1b30e3,_0x3d0168){_0x1b30e3=_0x1b30e3-0x130;const _0x47993b=a90_0x4799();let _0x420ebb=_0x47993b[_0x1b30e3];return _0x420ebb;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x50b93e){return{'appCode':_0x50b93e,'appName':_0x50b93e};}function writeInitConfig(_0x26b036,_0x4e0b88,_0x35185e){const _0x203cf5=a90_0x420e,_0x118746=resolveWriteConfigPath(_0x26b036),_0x1f898c=buildCanonicalProjectConfig({},{'appCodes':_0x4e0b88[_0x203cf5(0x151)](_0x20842f=>_0x20842f[_0x203cf5(0x13c)]),'env':_0x35185e,'metadata':{'version':getCliVersion(),'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x118746,_0x1f898c);const _0x4e034e=_0x26b036==='global'?_0x203cf5(0x141):_0x203cf5(0x14d);console['log'](_0x203cf5(0x144)+_0x4e034e+_0x203cf5(0x13f)),console[_0x203cf5(0x150)](_0x203cf5(0x146)+_0x4e0b88[_0x203cf5(0x151)](_0x5714b1=>_0x5714b1[_0x203cf5(0x13c)])['join'](',\x20')),console[_0x203cf5(0x150)](_0x203cf5(0x159)+_0x1f898c[_0x203cf5(0x13e)]),console[_0x203cf5(0x150)]('\x20\x20Env:\x20'+_0x1f898c[_0x203cf5(0x14c)]),console[_0x203cf5(0x150)]('\x20\x20Config:\x20'+_0x118746);}async function runSmartInit(_0x3b9404){const _0x321802=a90_0x420e,_0x3bf2c6=process[_0x321802(0x156)](),_0x2ee4ae=_0x3b9404[_0x321802(0x145)]('global')?_0x321802(0x141):_0x321802(0x14d),_0x919c36=_0x3b9404[_0x321802(0x133)](_0x321802(0x14c))||_0x321802(0x131),_0x111989=_0x3b9404['str'](_0x321802(0x137))||undefined,_0x2c6f30=_0x3b9404['bool'](_0x321802(0x14d));if(_0x2c6f30){const {initConfig:_0x135e0b}=await import(_0x321802(0x13a));return _0x135e0b({'appcode':_0x111989,'env':_0x919c36,'autoYes':_0x3b9404[_0x321802(0x145)](_0x321802(0x147))});}if(_0x2ee4ae===_0x321802(0x14d)){const _0x409379=existsSync(resolve(_0x3bf2c6,NEW_CONFIG_NAME)),_0x5b6e8c=LEGACY_CONFIG_NAMES[_0x321802(0x153)](_0x583c42=>existsSync(resolve(_0x3bf2c6,_0x583c42)));if(_0x5b6e8c&&!_0x409379)return console['log'](_0x321802(0x15a)),upgradeApp(_0x3b9404[_0x321802(0x154)],{'yes':_0x3b9404[_0x321802(0x145)](_0x321802(0x147))});if(_0x409379)throw CliErrors['validation'](_0x321802(0x139),_0x321802(0x152)+CLI_BIN_NAME+_0x321802(0x135));}if(_0x111989){const _0x1ca689=validateAppcode(_0x111989);if(!_0x1ca689[_0x321802(0x155)])throw CliErrors[_0x321802(0x134)](_0x1ca689['message']);writeInitConfig(_0x2ee4ae,[syntheticApp(_0x111989)],_0x919c36);return;}if(_0x3b9404['nonInteractive'])throw CliErrors[_0x321802(0x142)]('appcode',_0x321802(0x13b)+CLI_BIN_NAME+_0x321802(0x138));const _0x461af4=getCookie(),_0x53c348=await selectMultipleApps(_0x461af4),_0x18ee33=_0x53c348==='custom'?[syntheticApp(await promptCustomAppcode())]:_0x53c348;writeInitConfig(_0x2ee4ae,_0x18ee33,_0x919c36);}const initFlags=[{'name':a90_0x50f946(0x141),'type':a90_0x50f946(0x14a),'description':'Write\x20to\x20global\x20config\x20instead\x20of\x20project','default':![]},{'name':a90_0x50f946(0x14c),'type':'string','description':a90_0x50f946(0x15c),'default':a90_0x50f946(0x131),'enum':[...RABETBASE_ENV_VALUES]},{'name':a90_0x50f946(0x137),'type':a90_0x50f946(0x148),'description':a90_0x50f946(0x14b)},{'name':a90_0x50f946(0x14d),'type':'boolean','description':a90_0x50f946(0x136),'default':![]},{'name':a90_0x50f946(0x147),'type':a90_0x50f946(0x14a),'description':a90_0x50f946(0x130),'default':![]}];export const initDefinitions=[{'service':a90_0x50f946(0x157),'command':a90_0x50f946(0x14f),'description':'Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x3ec65b){return await runSmartInit(_0x3ec65b),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a91_0x26f2(){const _0x1e9a83=['10TPNUqZ','36gUjKIk','1952qWmgWG','6SaAqIz','294301lHGdRm','335410BRGNLo','54068vsPUnf','286jpwCjN','2726311gwDUCl','29250PHyFcf','325exJHBL','376008YQnGZh','7441499ydwIFj'];a91_0x26f2=function(){return _0x1e9a83;};return a91_0x26f2();}function a91_0x1c4b(_0x20b822,_0x355ffd){_0x20b822=_0x20b822-0xdf;const _0x26f2c5=a91_0x26f2();let _0x1c4b9a=_0x26f2c5[_0x20b822];return _0x1c4b9a;}(function(_0x5e260d,_0xac11c0){const _0x2d2c09=a91_0x1c4b,_0x2bc13b=_0x5e260d();while(!![]){try{const _0x40a8d1=parseInt(_0x2d2c09(0xe2))/0x1+parseInt(_0x2d2c09(0xeb))/0x2*(parseInt(_0x2d2c09(0xe9))/0x3)+-parseInt(_0x2d2c09(0xe4))/0x4*(-parseInt(_0x2d2c09(0xe8))/0x5)+-parseInt(_0x2d2c09(0xe1))/0x6*(-parseInt(_0x2d2c09(0xe6))/0x7)+parseInt(_0x2d2c09(0xe0))/0x8*(-parseInt(_0x2d2c09(0xe7))/0x9)+parseInt(_0x2d2c09(0xe3))/0xa*(parseInt(_0x2d2c09(0xe5))/0xb)+parseInt(_0x2d2c09(0xdf))/0xc*(-parseInt(_0x2d2c09(0xea))/0xd);if(_0x40a8d1===_0xac11c0)break;else _0x2bc13b['push'](_0x2bc13b['shift']());}catch(_0x4f7875){_0x2bc13b['push'](_0x2bc13b['shift']());}}}(a91_0x26f2,0x867c8));import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a92_0x1cf9de=a92_0x408d;(function(_0x5d3bf8,_0x24a3de){const _0x11c01f=a92_0x408d,_0x56982a=_0x5d3bf8();while(!![]){try{const _0x35a42d=-parseInt(_0x11c01f(0x124))/0x1*(parseInt(_0x11c01f(0x115))/0x2)+-parseInt(_0x11c01f(0x126))/0x3+parseInt(_0x11c01f(0x127))/0x4*(-parseInt(_0x11c01f(0x11d))/0x5)+-parseInt(_0x11c01f(0x119))/0x6+-parseInt(_0x11c01f(0x11f))/0x7+-parseInt(_0x11c01f(0x11a))/0x8*(parseInt(_0x11c01f(0x113))/0x9)+parseInt(_0x11c01f(0x122))/0xa*(parseInt(_0x11c01f(0x10a))/0xb);if(_0x35a42d===_0x24a3de)break;else _0x56982a['push'](_0x56982a['shift']());}catch(_0x22fb97){_0x56982a['push'](_0x56982a['shift']());}}}(a92_0x4235,0xe97d0));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV='RABETBASE_DISABLE_ISSUE_NUDGE';const NUDGE_SUPPRESSED_CODES=new Set(['cancelled','auth_required','config_missing','not_in_project','unknown_command',a92_0x1cf9de(0x10b),a92_0x1cf9de(0x11e),a92_0x1cf9de(0x10c)]),defaultWriter=_0x2b139=>{const _0x10a977=a92_0x1cf9de;process[_0x10a977(0x109)]['write'](_0x2b139);};function a92_0x4235(){const _0xd78d6e=['\x20bug?\x20Help\x20us\x20fix\x20it:','has','stderr','15961ZASOoz','flag_missing','network_error','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','\x22\x20\x5c','length','=1\x20to\x20silence\x20this\x20hint.','issue','\x20issue\x20report\x20\x5c','8111151KvcTuP','trim','862418nCRUdl','service','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','command','7226952RzhHes','8mEyeSW','\x20\x20\x20\x20--title\x20\x22','report','2838445JHbpxE','validation_error','8263528AbkSsw','replace','message','46780uDrlfW','slice','1fgQMsW','code','1232697KMTyRS','12fJWfWC'];a92_0x4235=function(){return _0xd78d6e;};return a92_0x4235();}export function shouldNudgeForError(_0x266dba,_0x577e20){const _0x2a3740=a92_0x1cf9de;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x577e20[_0x2a3740(0x116)]===_0x2a3740(0x111)&&_0x577e20[_0x2a3740(0x118)]===_0x2a3740(0x11c))return![];if(_0x266dba instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x2a3740(0x108)](_0x266dba[_0x2a3740(0x125)]);return!![];}function a92_0x408d(_0x4e7ab6,_0x59619d){_0x4e7ab6=_0x4e7ab6-0x107;const _0x42359e=a92_0x4235();let _0x408d4e=_0x42359e[_0x4e7ab6];return _0x408d4e;}export function printIssueReportNudgeForError(_0x1fc163,_0x4260a4,_0x5dcd7f=defaultWriter){if(!shouldNudgeForError(_0x1fc163,_0x4260a4))return;const _0x33fb4e=buildSuggestedTitle(_0x1fc163,_0x4260a4);_0x5dcd7f(formatNudge(_0x33fb4e));}function buildSuggestedTitle(_0x1b7371,_0xfdadaa){const _0x263cb6=a92_0x1cf9de,_0x285415=_0x1b7371 instanceof Error?_0x1b7371[_0x263cb6(0x121)]:String(_0x1b7371),_0x9a945=_0x285415[_0x263cb6(0x120)](/[\r\n]+/g,'\x20')[_0x263cb6(0x120)](/\s+/g,'\x20')[_0x263cb6(0x114)]()[_0x263cb6(0x123)](0x0,0x78)[_0x263cb6(0x120)](/"/g,'\x5c\x22'),_0x96ca0d=CLI_BIN_NAME+'\x20'+_0xfdadaa[_0x263cb6(0x116)]+'\x20'+_0xfdadaa[_0x263cb6(0x118)];return _0x9a945[_0x263cb6(0x10f)]>0x0?_0x96ca0d+':\x20'+_0x9a945:_0x96ca0d;}function formatNudge(_0x128e8a){const _0x507777=a92_0x1cf9de;return['','Hit\x20a\x20'+CLI_BIN_NAME+_0x507777(0x107),'\x20\x20'+CLI_BIN_NAME+_0x507777(0x112),_0x507777(0x11b)+_0x128e8a+_0x507777(0x10e),_0x507777(0x117),_0x507777(0x10d),'\x20\x20Set\x20'+NUDGE_OPT_OUT_ENV+_0x507777(0x110),'']['join']('\x0a');}
|