@lovrabet/rabetbase-cli 2.2.1-beta.2 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x4e9054=a62_0x5f28;(function(_0xfdf492,_0x5522f5){const _0x53744d=a62_0x5f28,_0x81c6c9=_0xfdf492();while(!![]){try{const _0x4bd4d1=parseInt(_0x53744d(0x130))/0x1*(-parseInt(_0x53744d(0x122))/0x2)+parseInt(_0x53744d(0x110))/0x3*(parseInt(_0x53744d(0x101))/0x4)+parseInt(_0x53744d(0xf4))/0x5+parseInt(_0x53744d(0x104))/0x6*(parseInt(_0x53744d(0x131))/0x7)+-parseInt(_0x53744d(0x11d))/0x8*(-parseInt(_0x53744d(0x107))/0x9)+parseInt(_0x53744d(0x132))/0xa+-parseInt(_0x53744d(0x11b))/0xb;if(_0x4bd4d1===_0x5522f5)break;else _0x81c6c9['push'](_0x81c6c9['shift']());}catch(_0x55753e){_0x81c6c9['push'](_0x81c6c9['shift']());}}}(a62_0x307a,0x8b51a));function a62_0x5f28(_0x34f011,_0x588ce6){_0x34f011=_0x34f011-0xf0;const _0x307a48=a62_0x307a();let _0x5f28e8=_0x307a48[_0x34f011];return _0x5f28e8;}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const SOURCE_TYPES=[a62_0x4e9054(0xf7),a62_0x4e9054(0x123)],DEFAULT_DO_VERSION='v2';export const DATASET_RELATIONS_PROTOCOL=a62_0x4e9054(0xff);export const datasetRelations={'service':'dataset','command':a62_0x4e9054(0x126),'description':a62_0x4e9054(0x120)+a62_0x4e9054(0xfc),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a62_0x4e9054(0x10f),'type':a62_0x4e9054(0x115),'required':![],'enum':[...SOURCE_TYPES],'description':a62_0x4e9054(0x12a)},{'name':'to-source','type':a62_0x4e9054(0x115),'required':![],'enum':[...SOURCE_TYPES],'description':'Filter\x20target\x20dataset\x20type:\x20DB_TABLE\x20or\x20METADATA'},{'name':'do-version','type':a62_0x4e9054(0x115),'required':![],'enum':['v1','v2'],'description':'Legacy\x20troubleshooting\x20filter\x20for\x20dataset\x20version;\x20defaults\x20to\x20v2'}],async 'validate'(_0x39d101){const _0x19f4bf=a62_0x4e9054;readSourceFilter(_0x39d101[_0x19f4bf(0xf0)](_0x19f4bf(0x10f)),_0x19f4bf(0x12b)),readSourceFilter(_0x39d101[_0x19f4bf(0xf0)](_0x19f4bf(0x118)),'--to-source'),rejectUnsupportedDirection(readSourceFilter(_0x39d101['str'](_0x19f4bf(0x10f)),_0x19f4bf(0x12b)),readSourceFilter(_0x39d101[_0x19f4bf(0xf0)](_0x19f4bf(0x118)),'--to-source'));},async 'execute'(_0x17b957){const _0x3c17d2=a62_0x4e9054,_0x304f7f=trim(_0x17b957[_0x3c17d2(0xf0)](_0x3c17d2(0x10e))),_0x40c9b7=readSourceFilter(_0x17b957[_0x3c17d2(0xf0)](_0x3c17d2(0x10f)),'--from-source'),_0x5746da=readSourceFilter(_0x17b957['str'](_0x3c17d2(0x118)),_0x3c17d2(0x10b)),_0xdaf23f=trim(_0x17b957['str'](_0x3c17d2(0x116))||DEFAULT_DO_VERSION)['toLowerCase']();rejectUnsupportedDirection(_0x40c9b7,_0x5746da);const _0x443296=await listDatasets(_0x17b957[_0x3c17d2(0x10d)],{..._0x304f7f?{'code':_0x304f7f}:{}}),_0x141a9a=new Map();for(const _0x2a1385 of _0x443296){const _0x502cf2=datasetCodeOf(_0x2a1385);if(_0x502cf2)_0x141a9a[_0x3c17d2(0x111)](_0x502cf2,_0x2a1385);}const _0xdd1cb=_0x304f7f?[toDatasetInfo(await getDatasetDetail(_0x304f7f),_0x141a9a[_0x3c17d2(0x124)](_0x304f7f))]:await Promise[_0x3c17d2(0x135)](_0x443296[_0x3c17d2(0x129)](async _0x17fce7=>toDatasetInfo(await getDatasetDetail(datasetCodeOf(_0x17fce7)),_0x17fce7))),_0x5eaec0=_0xdd1cb['filter'](_0x43acb2=>{const _0x22dd7e=_0x3c17d2;if(_0xdaf23f&&normalizeDoVersion(_0x43acb2[_0x22dd7e(0x127)])!==_0xdaf23f)return![];return!![];}),_0x219a3e=new Map(_0x5eaec0['map'](_0x263915=>[_0x263915[_0x3c17d2(0xf9)],_0x263915])),_0x11c4f7=_0x5eaec0[_0x3c17d2(0x125)](_0x4bf6a9=>{const _0x58dd1d=_0x3c17d2,_0x53e0e4=Array[_0x58dd1d(0x121)](_0x4bf6a9[_0x58dd1d(0xfb)]['relations'])?_0x4bf6a9['detail']['relations']:[];return _0x53e0e4[_0x58dd1d(0x125)](_0x2fb775=>{const _0x2f6aaa=_0x58dd1d,_0x790348=trim(_0x2fb775['fromField']??_0x2fb775[_0x2f6aaa(0x119)]??_0x2fb775[_0x2f6aaa(0xf1)]),_0xf3056f=trim(_0x2fb775[_0x2f6aaa(0x11e)]??_0x2fb775[_0x2f6aaa(0x11c)]??_0x2fb775[_0x2f6aaa(0x103)]??_0x2fb775['targetDatasetCode']),_0x57d958=trim(_0x2fb775[_0x2f6aaa(0x11a)]??_0x2fb775[_0x2f6aaa(0x113)]??_0x2fb775[_0x2f6aaa(0x106)]);if(!_0x790348||!_0xf3056f||!_0x57d958)return[];const _0x254766=_0x219a3e[_0x2f6aaa(0x124)](_0xf3056f)??(_0x141a9a['has'](_0xf3056f)?toDatasetInfo(_0x141a9a[_0x2f6aaa(0x124)](_0xf3056f)??{},_0x141a9a[_0x2f6aaa(0x124)](_0xf3056f)):undefined),_0x244796=_0x254766?.['source']??sourceOf(_0x2fb775[_0x2f6aaa(0x10a)]??_0x2fb775[_0x2f6aaa(0x128)]??_0x2fb775[_0x2f6aaa(0xf3)],_0x2fb775[_0x2f6aaa(0x133)]);if(_0x4bf6a9[_0x2f6aaa(0x109)]===_0x2f6aaa(0x123)&&_0x244796===_0x2f6aaa(0xf7))return[];if(_0x40c9b7&&_0x4bf6a9[_0x2f6aaa(0x109)]!==_0x40c9b7)return[];if(_0x5746da&&_0x244796!==_0x5746da)return[];const _0x5d618c=readRelationLabelField(_0x2fb775),_0x224ee1=normalizeCardinality(_0x2fb775[_0x2f6aaa(0x11f)]??_0x2fb775['cardinality']);return[{'from':{'source':_0x4bf6a9[_0x2f6aaa(0x109)],'datasetCode':_0x4bf6a9[_0x2f6aaa(0xf9)],..._0x4bf6a9[_0x2f6aaa(0x108)]?{'datasetName':_0x4bf6a9[_0x2f6aaa(0x108)]}:{},..._0x4bf6a9[_0x2f6aaa(0xfd)]?{'table':_0x4bf6a9[_0x2f6aaa(0xfd)]}:{},'field':_0x790348},'to':{'source':_0x244796,'datasetCode':_0xf3056f,'datasetName':_0x254766?.[_0x2f6aaa(0x108)]??trim(_0x2fb775[_0x2f6aaa(0xf8)]),..._0x254766?.[_0x2f6aaa(0xfd)]?{'table':_0x254766['table']}:{},'field':_0x57d958,..._0x5d618c?{'labelField':_0x5d618c}:{}},..._0x224ee1?{'relation':{'cardinality':_0x224ee1}}:{}}];});});return{'ok':!![],'data':{'protocol':DATASET_RELATIONS_PROTOCOL,'appCode':_0x17b957[_0x3c17d2(0x10d)],'total':_0x11c4f7[_0x3c17d2(0xfa)],'relations':_0x11c4f7},'message':_0x3c17d2(0xf2)+_0x11c4f7['length']+_0x3c17d2(0x112)};}};function toDatasetInfo(_0x513401,_0x4b1c16){const _0x5c3213=a62_0x4e9054,_0x15ec07=_0x513401['dataset']??{},_0x73117e=_0x513401['dbtableConfig']??_0x4b1c16?.[_0x5c3213(0x114)]??{},_0x2eb25d=datasetCodeOf(_0x513401)||datasetCodeOf(_0x4b1c16??{});return{'code':_0x2eb25d,'name':_0x513401[_0x5c3213(0x108)]??_0x15ec07[_0x5c3213(0xf5)]??_0x4b1c16?.[_0x5c3213(0x108)],'source':sourceOf(_0x513401[_0x5c3213(0x109)]??_0x15ec07[_0x5c3213(0xf3)]??_0x4b1c16?.[_0x5c3213(0x109)],_0x73117e['tableName']),'table':_0x73117e['tableName']??_0x15ec07[_0x5c3213(0x117)],'doVersion':_0x513401['doVersion']??_0x15ec07['doVersion']??_0x4b1c16?.[_0x5c3213(0x127)],'detail':_0x513401};}function datasetCodeOf(_0x18d4ae){const _0x4a0d55=a62_0x4e9054;return trim(_0x18d4ae[_0x4a0d55(0x10c)]??_0x18d4ae[_0x4a0d55(0xf9)]??_0x18d4ae[_0x4a0d55(0xf6)]);}function sourceOf(_0x34d4fb,_0x1e664f){const _0x8ed796=a62_0x4e9054,_0x4ec4ec=trim(_0x34d4fb)['toUpperCase']();if(_0x4ec4ec==='DB_TABLE'||_0x4ec4ec===_0x8ed796(0x123))return _0x4ec4ec;return _0x1e664f?_0x8ed796(0xf7):_0x8ed796(0x123);}function readSourceFilter(_0x84f185,_0x27a398){const _0x4bb2a8=a62_0x4e9054,_0x6c14ff=trim(_0x84f185)['toUpperCase']();if(!_0x6c14ff)return undefined;if(_0x6c14ff===_0x4bb2a8(0xf7)||_0x6c14ff===_0x4bb2a8(0x123))return _0x6c14ff;throw CliErrors['validation']('Invalid\x20'+_0x27a398+':\x20'+_0x84f185,'Allowed\x20values:\x20DB_TABLE,\x20METADATA.');}function rejectUnsupportedDirection(_0x6d7319,_0x2c8e80){const _0x1610f0=a62_0x4e9054;if(_0x6d7319==='METADATA'&&_0x2c8e80===_0x1610f0(0xf7))throw CliErrors[_0x1610f0(0x102)](_0x1610f0(0x12e));}function a62_0x307a(){const _0x26189f=['do-version','tableName','to-source','fromColumn','toField','9349681xCTGcW','toCode','40WksosQ','toDatasetCode','joinType','List\x20V2\x20dataset\x20relation\x20facts\x20using\x20datasetCode\x20+\x20field\x20as\x20the\x20primary\x20locator.\x20','isArray','1900212TjbAzJ','METADATA','get','flatMap','relations','doVersion','toSource','map','Filter\x20source\x20dataset\x20type:\x20DB_TABLE\x20or\x20METADATA','--from-source','ONE_TO_MANY','MANY_TO_MANY','METADATA\x20to\x20DB_TABLE\x20dataset\x20relation\x20is\x20not\x20supported','includes','1JMZAiF','189WKPkDW','1533770NOWJOR','toTableName','refTableLabelName','all','str','field','Dataset\x20relations:\x20','sourceType','3144070xWZufK','datasetName','datasetCode','DB_TABLE','toDatasetName','code','length','detail','Supports\x20DB_TABLE\x20->\x20DB_TABLE,\x20DB_TABLE\x20->\x20METADATA,\x20and\x20METADATA\x20->\x20METADATA.','table','toFieldLabel','dataset-relations.v1','labelField','37952kXqhNV','validation','toDataset','40494WLtsKK','MANY_TO_ONE','targetField','977229UUNReO','name','source','toSourceType','--to-source','modelCode','appCode','datasetcode','from-source','273ADRKPm','set','\x20relation(s)','toColumn','dbtableConfig','string'];a62_0x307a=function(){return _0x26189f;};return a62_0x307a();}function normalizeDoVersion(_0x441930){return trim(_0x441930)['toLowerCase']();}function normalizeCardinality(_0x4d2038){const _0x320048=a62_0x4e9054,_0x4aa765=trim(_0x4d2038)['toUpperCase']();if(!_0x4aa765)return undefined;return['ONE_TO_ONE',_0x320048(0x12c),_0x320048(0x105),_0x320048(0x12d)][_0x320048(0x12f)](_0x4aa765)?_0x4aa765:undefined;}function readRelationLabelField(_0xda169a){const _0x59f3f1=a62_0x4e9054;return trim(_0xda169a[_0x59f3f1(0xfe)]??_0xda169a[_0x59f3f1(0x134)]??_0xda169a[_0x59f3f1(0x100)]);}function trim(_0x137c16){const _0x2c7239=a62_0x4e9054;return typeof _0x137c16===_0x2c7239(0x115)?_0x137c16['trim']():'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x2892fc=a63_0xb89b;function a63_0x2821(){const _0x53213c=['527992pKvbaH','Renamed\x20dataset\x20','trim','Expected\x20current\x20dataset\x20display\x20name;\x20mismatch\x20aborts\x20without\x20writing','34181wJBqZH','Rename\x20dataset\x20display\x20name\x20safely','4jebDoy','datasetCode','Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20id','--name\x20is\x20required','Dry-run:\x20dataset\x20','isArray','POST','expectName','Expected\x20','663514BVhmTI','str','3hLbZUF','--expect-name\x20is\x20required','expect-name',',\x20actual\x20','stringify','1211139WVmvCB','object','name','validation','modelCode','\x20to\x20','164766QlptsK','rename','code','372vytvwF','modelId','datasetId','\x20would\x20be\x20renamed\x20to\x20','New\x20dataset\x20display\x20name','string','request','872680lcOCOR','message','/smartapi/dataset/update-driven-data','dataset','22HWmrgy','1968310zsIsoZ','--code\x20is\x20required','No\x20changes\x20for\x20dataset\x20','Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20code'];a63_0x2821=function(){return _0x53213c;};return a63_0x2821();}function a63_0xb89b(_0x3fd28d,_0x6a9739){_0x3fd28d=_0x3fd28d-0xd9;const _0x282140=a63_0x2821();let _0xb89b54=_0x282140[_0x3fd28d];return _0xb89b54;}(function(_0x5edc66,_0x56224d){const _0x7654df=a63_0xb89b,_0x33deb0=_0x5edc66();while(!![]){try{const _0x1ef3d2=-parseInt(_0x7654df(0x103))/0x1+parseInt(_0x7654df(0xf6))/0x2*(-parseInt(_0x7654df(0xf8))/0x3)+parseInt(_0x7654df(0xed))/0x4*(parseInt(_0x7654df(0xde))/0x5)+parseInt(_0x7654df(0x106))/0x6*(parseInt(_0x7654df(0xeb))/0x7)+-parseInt(_0x7654df(0xe7))/0x8+-parseInt(_0x7654df(0xfd))/0x9+-parseInt(_0x7654df(0xe3))/0xa*(-parseInt(_0x7654df(0xe2))/0xb);if(_0x1ef3d2===_0x56224d)break;else _0x33deb0['push'](_0x33deb0['shift']());}catch(_0x4edaa3){_0x33deb0['push'](_0x33deb0['shift']());}}}(a63_0x2821,0x2a71b));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';export async function buildDatasetRenameResult({input:_0x5152bd,dryRun:_0x2bc709}){const _0x13d48d=a63_0xb89b;validateInput(_0x5152bd);const _0x541f1c=await getDatasetDetail(_0x5152bd['code']),_0x197beb=resolveCurrentName(_0x541f1c);if(_0x197beb!==_0x5152bd[_0x13d48d(0xf4)])throw CliErrors[_0x13d48d(0x100)]('Expectation\x20mismatch\x20at\x20dataset.name',_0x13d48d(0xf5)+JSON[_0x13d48d(0xfc)](_0x5152bd[_0x13d48d(0xf4)])+_0x13d48d(0xfb)+JSON['stringify'](_0x197beb));const _0x216d3c=buildRenameRequest(_0x541f1c,_0x5152bd),_0xd166b3=_0x197beb!==_0x5152bd[_0x13d48d(0xff)];let _0x3e1ff0;return _0xd166b3&&!_0x2bc709&&(_0x3e1ff0=await updateDrivenData(_0x216d3c)),{'ok':!![],'data':{'protocol':'dataset-rename.v1','dataset':{'id':_0x216d3c['modelId'],'code':_0x216d3c[_0x13d48d(0x101)]},'dryRun':_0x2bc709,'changed':_0xd166b3,'before':{'name':_0x197beb},'after':{'name':_0x5152bd['name']},'request':_0x216d3c,'submitted':_0xd166b3&&!_0x2bc709,..._0x3e1ff0!==undefined?{'version':_0x3e1ff0}:{}},'message':_0xd166b3?_0x2bc709?_0x13d48d(0xf1)+_0x216d3c[_0x13d48d(0x101)]+_0x13d48d(0xda)+_0x5152bd['name']:_0x13d48d(0xe8)+_0x216d3c[_0x13d48d(0x101)]+_0x13d48d(0x102)+_0x5152bd[_0x13d48d(0xff)]:_0x13d48d(0xe5)+_0x216d3c[_0x13d48d(0x101)]};}export const datasetRename={'service':a63_0x2892fc(0xe1),'command':a63_0x2892fc(0x104),'description':a63_0x2892fc(0xec),'risk':'write','flags':[CODE_FLAG,{'name':a63_0x2892fc(0xff),'type':a63_0x2892fc(0xdc),'required':!![],'description':a63_0x2892fc(0xdb)},{'name':a63_0x2892fc(0xfa),'type':a63_0x2892fc(0xdc),'required':!![],'description':a63_0x2892fc(0xea)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3b0745){validateInput(readDatasetRenameInput(_0x3b0745));},async 'dryRun'(_0x3909f8){const _0x548d43=a63_0x2892fc,_0x3e6a75=await buildDatasetRenameResult({'input':readDatasetRenameInput(_0x3909f8),'dryRun':!![]});return{'method':_0x548d43(0xf3),'url':_0x548d43(0xe0),'body':_0x3e6a75['data'][_0x548d43(0xdd)],'description':_0x3e6a75[_0x548d43(0xdf)]};},async 'execute'(_0x588059){return buildDatasetRenameResult({'input':readDatasetRenameInput(_0x588059),'dryRun':![]});}};function readDatasetRenameInput(_0x3bf7cd){const _0x300bf5=a63_0x2892fc;return{'code':trim(_0x3bf7cd[_0x300bf5(0xf7)](_0x300bf5(0x105))),'name':trim(_0x3bf7cd['str'](_0x300bf5(0xff))),'expectName':trim(_0x3bf7cd[_0x300bf5(0xf7)](_0x300bf5(0xfa)))};}function validateInput(_0x540543){const _0x8b5ea9=a63_0x2892fc;if(!_0x540543[_0x8b5ea9(0x105)])throw CliErrors[_0x8b5ea9(0x100)](_0x8b5ea9(0xe4));if(!_0x540543[_0x8b5ea9(0xff)])throw CliErrors[_0x8b5ea9(0x100)](_0x8b5ea9(0xf0));if(!_0x540543[_0x8b5ea9(0xf4)])throw CliErrors['validation'](_0x8b5ea9(0xf9));}function resolveCurrentName(_0x2d9935){const _0x2233fa=a63_0x2892fc;return String(_0x2d9935['dataset']?.['datasetName']??_0x2d9935[_0x2233fa(0xff)]??'')[_0x2233fa(0xe9)]();}function buildRenameRequest(_0x47d48f,_0x2ecb86){const _0x85a7fe=a63_0x2892fc,_0x446b53=isPlainObject(_0x47d48f[_0x85a7fe(0xe1)])?_0x47d48f['dataset']:{},_0x4f0492=_0x47d48f[_0x85a7fe(0x107)]??_0x47d48f['id']??_0x446b53[_0x85a7fe(0xd9)];if(_0x4f0492===undefined||_0x4f0492===null||_0x4f0492==='')throw CliErrors['validation'](_0x85a7fe(0xef));const _0x7dbcbf=String(_0x47d48f[_0x85a7fe(0x101)]??_0x47d48f[_0x85a7fe(0x105)]??_0x446b53[_0x85a7fe(0xee)]??_0x2ecb86[_0x85a7fe(0x105)])[_0x85a7fe(0xe9)]();if(!_0x7dbcbf)throw CliErrors[_0x85a7fe(0x100)](_0x85a7fe(0xe6));return{'modelId':_0x4f0492,'modelCode':_0x7dbcbf,'name':_0x2ecb86['name'],'dataset':{'datasetId':_0x4f0492,'datasetCode':_0x7dbcbf,'datasetName':_0x2ecb86[_0x85a7fe(0xff)]}};}function isPlainObject(_0x13d764){const _0x16f040=a63_0x2892fc;return Boolean(_0x13d764)&&typeof _0x13d764===_0x16f040(0xfe)&&!Array[_0x16f040(0xf2)](_0x13d764);}function trim(_0x284c51){const _0x5d27f8=a63_0x2892fc;return String(_0x284c51||'')[_0x5d27f8(0xe9)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a64_0xa6997c=a64_0x146e;(function(_0x569808,_0x22404d){const _0x54e45e=a64_0x146e,_0x5a6f17=_0x569808();while(!![]){try{const _0x2517db=-parseInt(_0x54e45e(0x155))/0x1+parseInt(_0x54e45e(0x14e))/0x2+parseInt(_0x54e45e(0x15a))/0x3+parseInt(_0x54e45e(0x14f))/0x4*(parseInt(_0x54e45e(0x14c))/0x5)+parseInt(_0x54e45e(0x152))/0x6*(parseInt(_0x54e45e(0x148))/0x7)+-parseInt(_0x54e45e(0x151))/0x8*(parseInt(_0x54e45e(0x154))/0x9)+-parseInt(_0x54e45e(0x15b))/0xa*(-parseInt(_0x54e45e(0x150))/0xb);if(_0x2517db===_0x22404d)break;else _0x5a6f17['push'](_0x5a6f17['shift']());}catch(_0x250f11){_0x5a6f17['push'](_0x5a6f17['shift']());}}}(a64_0x186f,0x7bd8c));import{cancelDbAnalysis,getDbLinkInfo}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a64_0x146e(_0x26c5af,_0x289033){_0x26c5af=_0x26c5af-0x148;const _0x186ff1=a64_0x186f();let _0x146ec6=_0x186ff1[_0x26c5af];return _0x146ec6;}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a64_0x186f(){const _0x5d32ca=['latestAnalysisTraceId','579117aMAobT','10KEQxEq','63tuAhSb','plan','Cancel\x20requested\x20for\x20plan\x20','str','275wbnsns','write','210206TzxDSZ','21380qcfuSC','6840328sfuMRj','11480eqbAaX','504576NWkCjD','string','6300dxCKAW','459053XgkxmQ','analyze-cancel','Analysis\x20plan\x20/\x20trace\x20id\x20(optional\x20—\x20defaults\x20to\x20latest\x20trace\x20from\x20db\x20list/detail)','Cancel\x20a\x20running\x20schema\x20analysis.\x20Omit\x20--plan\x20to\x20use\x20latestAnalysisTraceId\x20from\x20the\x20link'];a64_0x186f=function(){return _0x5d32ca;};return a64_0x186f();}export const dbAnalyzeCancel={'service':'db','command':a64_0xa6997c(0x156),'description':a64_0xa6997c(0x158),'risk':a64_0xa6997c(0x14d),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a64_0xa6997c(0x149),'type':a64_0xa6997c(0x153),'description':a64_0xa6997c(0x157)}],async 'execute'(_0x3e1f4a){const _0x3616eb=a64_0xa6997c,_0x25b19f=_0x3e1f4a['num']('id');let _0xbea4c0=_0x3e1f4a[_0x3616eb(0x14b)](_0x3616eb(0x149))||undefined;if(!_0xbea4c0){const _0x64c1c1=await getDbLinkInfo(_0x25b19f);_0xbea4c0=_0x64c1c1[_0x3616eb(0x159)]??undefined;if(!_0xbea4c0)throw CliErrors['validation']('No\x20latestAnalysisTraceId\x20on\x20this\x20link.\x20Pass\x20--plan\x20<traceId>\x20from\x20db\x20list/detail.','Analysis\x20may\x20already\x20be\x20finished\x20or\x20never\x20started.');}return await cancelDbAnalysis(_0xbea4c0),{'ok':!![],'data':{'dbLinkId':_0x25b19f,'planId':_0xbea4c0},'message':_0x3616eb(0x14a)+_0xbea4c0};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a65_0x51079d=a65_0x3243;function a65_0x3243(_0x501d0c,_0x5b98dd){_0x501d0c=_0x501d0c-0x111;const _0xe2e8f4=a65_0xe2e8();let _0x32436e=_0xe2e8f4[_0x501d0c];return _0x32436e;}(function(_0x668d6,_0x1c2bda){const _0x195383=a65_0x3243,_0x3821a5=_0x668d6();while(!![]){try{const _0x5b1cfa=parseInt(_0x195383(0x11b))/0x1+-parseInt(_0x195383(0x11c))/0x2+parseInt(_0x195383(0x11f))/0x3+-parseInt(_0x195383(0x123))/0x4+parseInt(_0x195383(0x112))/0x5*(parseInt(_0x195383(0x11e))/0x6)+parseInt(_0x195383(0x118))/0x7*(-parseInt(_0x195383(0x121))/0x8)+parseInt(_0x195383(0x115))/0x9*(parseInt(_0x195383(0x119))/0xa);if(_0x5b1cfa===_0x1c2bda)break;else _0x3821a5['push'](_0x3821a5['shift']());}catch(_0x104280){_0x3821a5['push'](_0x3821a5['shift']());}}}(a65_0xe2e8,0x9032f));import{startDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';function a65_0xe2e8(){const _0x5b7200=['526467jSRnYe','521362BMyxBu','tables','201330BKOTAe','1241568MYuZiq','analyze-start','8mbdTvj','filter','3993836nNBnHL','split','120aYAHrd','map','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','1359NbFiKa','str','string','8125537rINgxh','83770yjLtVB','Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status'];a65_0xe2e8=function(){return _0x5b7200;};return a65_0xe2e8();}export const dbAnalyzeStart={'service':'db','command':a65_0x51079d(0x120),'description':a65_0x51079d(0x11a),'risk':'write','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a65_0x51079d(0x11d),'type':a65_0x51079d(0x117),'description':a65_0x51079d(0x114)}],async 'execute'(_0x26ccf7){const _0x347960=a65_0x51079d,_0x2783b1=_0x26ccf7['num']('id'),_0x17ecbc=_0x26ccf7[_0x347960(0x116)](_0x347960(0x11d)),_0x3f75a3=_0x17ecbc?_0x17ecbc[_0x347960(0x111)](',')[_0x347960(0x113)](_0xa03233=>_0xa03233['trim']())[_0x347960(0x122)](Boolean):undefined,_0x40610c=await startDbAnalysis(_0x2783b1,_0x3f75a3),_0x4df046=buildDbPageLinks(_0x26ccf7['appCode'],_0x2783b1);return{'ok':!![],'data':{'dbLinkId':_0x2783b1,'planId':_0x40610c,'tableNames':_0x3f75a3??[],..._0x4df046?{'links':_0x4df046}:{}},'message':'Started\x20analysis\x20for\x20db\x20link\x20'+_0x2783b1};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a66_0x19199e=a66_0x4d56;(function(_0x23bd11,_0x358182){const _0x327446=a66_0x4d56,_0x26fa57=_0x23bd11();while(!![]){try{const _0x4c7669=-parseInt(_0x327446(0x1a9))/0x1+-parseInt(_0x327446(0x1a8))/0x2+parseInt(_0x327446(0x1b0))/0x3+parseInt(_0x327446(0x1ae))/0x4*(parseInt(_0x327446(0x1b5))/0x5)+-parseInt(_0x327446(0x1ad))/0x6+-parseInt(_0x327446(0x1b6))/0x7*(-parseInt(_0x327446(0x1b8))/0x8)+parseInt(_0x327446(0x1ab))/0x9*(parseInt(_0x327446(0x1ac))/0xa);if(_0x4c7669===_0x358182)break;else _0x26fa57['push'](_0x26fa57['shift']());}catch(_0xf1c2bf){_0x26fa57['push'](_0x26fa57['shift']());}}}(a66_0x4c2b,0x1be5e));import{getDbAnalysisStatus}from'../../core/api-client.js';function a66_0x4c2b(){const _0x228f96=['num','appCode','analyze-status','465sQLWBw','7nrVaLj','Analysis\x20status\x20for\x20','783896BVkgsZ','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','str','142178jUQQxT','172711AurjSM','read','417303aQPEzq','10sraPjG','466374FogEke','6008oCYaNc','string','455277dsvBWC','plan'];a66_0x4c2b=function(){return _0x228f96;};return a66_0x4c2b();}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a66_0x4d56(_0x381343,_0x40f673){_0x381343=_0x381343-0x1a8;const _0x4c2b78=a66_0x4c2b();let _0x4d56ce=_0x4c2b78[_0x381343];return _0x4d56ce;}import{buildDbPageLinks}from'../../commands/db/shared.js';export const dbAnalyzeStatus={'service':'db','command':a66_0x19199e(0x1b4),'description':a66_0x19199e(0x1b9),'risk':a66_0x19199e(0x1aa),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a66_0x19199e(0x1b1),'type':a66_0x19199e(0x1af),'required':!![],'description':a66_0x19199e(0x1ba)}],async 'execute'(_0x3e71da){const _0x4211b1=a66_0x19199e,_0x539239=_0x3e71da[_0x4211b1(0x1b2)]('id'),_0x9b6d84=_0x3e71da[_0x4211b1(0x1bb)](_0x4211b1(0x1b1)),_0x18a203=await getDbAnalysisStatus(_0x9b6d84),_0x547580=buildDbPageLinks(_0x3e71da[_0x4211b1(0x1b3)],_0x539239);return{'ok':!![],'data':{'dbLinkId':_0x539239,'planId':_0x9b6d84,'status':_0x18a203,..._0x547580?{'links':_0x547580}:{}},'message':_0x4211b1(0x1b7)+_0x9b6d84};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a67_0x1ec25a=a67_0x558f;(function(_0x18d896,_0x47c660){const _0x1a4f3a=a67_0x558f,_0x47a3ef=_0x18d896();while(!![]){try{const _0x3d5b3c=parseInt(_0x1a4f3a(0x138))/0x1*(-parseInt(_0x1a4f3a(0x14b))/0x2)+parseInt(_0x1a4f3a(0x132))/0x3+parseInt(_0x1a4f3a(0x155))/0x4+-parseInt(_0x1a4f3a(0x12c))/0x5+parseInt(_0x1a4f3a(0x149))/0x6*(parseInt(_0x1a4f3a(0x139))/0x7)+-parseInt(_0x1a4f3a(0x12b))/0x8+parseInt(_0x1a4f3a(0x143))/0x9*(parseInt(_0x1a4f3a(0x14d))/0xa);if(_0x3d5b3c===_0x47c660)break;else _0x47a3ef['push'](_0x47a3ef['shift']());}catch(_0x5560c5){_0x47a3ef['push'](_0x47a3ef['shift']());}}}(a67_0x2cff,0x472ca));import{createDbLink,startDbAnalysis}from'../../core/api-client.js';function a67_0x558f(_0x4052b6,_0x23a15b){_0x4052b6=_0x4052b6-0x12b;const _0x2cffba=a67_0x2cff();let _0x558f0b=_0x2cffba[_0x4052b6];return _0x558f0b;}import{CliErrors}from'../../errors.js';function a67_0x2cff(){const _0x690e85=['POST','join','297987SijZDG','[redacted]','/smartapi/dblink/create','\x20and\x20started\x20analysis','string','Host\x20and\x20port:\x20host:port','617NKTzoO','70oIHBXd','No\x20follow-up\x20analysis','Human-readable\x20description','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','str','password','username','bool','dbdesc','Database\x20password','1850067rvPYrz','validation','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','message','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','1884RAROhM','8.0','1858OjIplS','boolean','50qgNkvS','write','autostart','appCode','trim','dbtype','dbparam','dbname','1179296sEgqlG','dburl','2884016hiaCpW','999415gfSJoP','dbversion','Created\x20db\x20link\x20','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response'];a67_0x2cff=function(){return _0x690e85;};return a67_0x2cff();}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':'create','description':a67_0x1ec25a(0x146),'risk':a67_0x1ec25a(0x14e),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a67_0x1ec25a(0x154),'type':a67_0x1ec25a(0x136),'required':!![],'description':a67_0x1ec25a(0x145)},DB_TYPE_FLAG,{'name':a67_0x1ec25a(0x12d),'type':'string','description':'Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','default':a67_0x1ec25a(0x14a)},{'name':a67_0x1ec25a(0x156),'type':'string','required':!![],'description':a67_0x1ec25a(0x137)},{'name':a67_0x1ec25a(0x13f),'type':a67_0x1ec25a(0x136),'required':!![],'description':'Database\x20username'},{'name':a67_0x1ec25a(0x13e),'type':a67_0x1ec25a(0x136),'required':!![],'description':a67_0x1ec25a(0x142)},{'name':'dbparam','type':a67_0x1ec25a(0x136),'description':'Extra\x20JDBC-style\x20connection\x20parameters\x20string'},{'name':a67_0x1ec25a(0x141),'type':a67_0x1ec25a(0x136),'description':a67_0x1ec25a(0x13b)},{'name':'autostart','type':a67_0x1ec25a(0x14c),'description':'After\x20create,\x20start\x20schema\x20analysis','default':![]}],async 'validate'(_0x2d5083){const _0x2c02cc=a67_0x1ec25a,_0x829083=_0x2d5083[_0x2c02cc(0x13d)]('dburl')[_0x2c02cc(0x151)]();if(!validateDbUrl(_0x829083))throw CliErrors[_0x2c02cc(0x144)](_0x2c02cc(0x148)+_0x829083+'\x22',_0x2c02cc(0x13c));},async 'dryRun'(_0x426371){const _0x2a874c=a67_0x1ec25a,_0x483fe1={'appCode':_0x426371[_0x2a874c(0x150)],'dbName':_0x426371['str'](_0x2a874c(0x154)),'dbType':_0x426371[_0x2a874c(0x13d)](_0x2a874c(0x152)),'dbVersion':_0x426371[_0x2a874c(0x13d)](_0x2a874c(0x12d))||_0x2a874c(0x14a),'dbUrl':_0x426371[_0x2a874c(0x13d)](_0x2a874c(0x156))[_0x2a874c(0x151)](),'username':_0x426371[_0x2a874c(0x13d)](_0x2a874c(0x13f)),'password':_0x2a874c(0x133),..._0x426371[_0x2a874c(0x13d)](_0x2a874c(0x153))?{'dbParam':_0x426371[_0x2a874c(0x13d)](_0x2a874c(0x153))}:{},..._0x426371[_0x2a874c(0x13d)]('dbdesc')?{'dbDesc':_0x426371[_0x2a874c(0x13d)]('dbdesc')}:{}};return{'method':_0x2a874c(0x130),'url':_0x2a874c(0x134),'body':_0x483fe1,'description':['Create\x20dblink',_0x426371[_0x2a874c(0x140)]('autostart')?'Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id':_0x2a874c(0x13a)][_0x2a874c(0x131)]('\x0a')};},async 'execute'(_0x56c2ba){const _0x23572c=a67_0x1ec25a,_0x73614b={'appCode':_0x56c2ba[_0x23572c(0x150)],'dbName':_0x56c2ba[_0x23572c(0x13d)](_0x23572c(0x154)),'dbType':_0x56c2ba[_0x23572c(0x13d)](_0x23572c(0x152)),'dbVersion':_0x56c2ba[_0x23572c(0x13d)](_0x23572c(0x12d))||'8.0','dbUrl':_0x56c2ba[_0x23572c(0x13d)]('dburl')[_0x23572c(0x151)](),'username':_0x56c2ba[_0x23572c(0x13d)](_0x23572c(0x13f)),'password':_0x56c2ba['str'](_0x23572c(0x13e)),..._0x56c2ba[_0x23572c(0x13d)](_0x23572c(0x153))?{'dbParam':_0x56c2ba['str'](_0x23572c(0x153))}:{},..._0x56c2ba[_0x23572c(0x13d)](_0x23572c(0x141))?{'dbDesc':_0x56c2ba[_0x23572c(0x13d)]('dbdesc')}:{}},{id:_0x1c563c,entity:_0x5e8eb0}=normalizeEntityWithIdResponse(await createDbLink(_0x73614b));if(!_0x1c563c)return{'ok':![],'message':_0x23572c(0x12f),'data':sanitizeDbLinkForOutput(_0x5e8eb0)};let _0x35d35f,_0x591e4a;if(_0x56c2ba[_0x23572c(0x140)](_0x23572c(0x14f)))try{_0x35d35f=await startDbAnalysis(_0x1c563c);}catch(_0x4f5dfa){_0x591e4a=_0x4f5dfa instanceof Error?_0x4f5dfa[_0x23572c(0x147)]:String(_0x4f5dfa);}const _0x5d4edb=buildDbPageLinks(_0x56c2ba[_0x23572c(0x150)],_0x1c563c),_0x239294={'connection':sanitizeDbLinkForOutput(_0x5e8eb0),..._0x5d4edb?{'links':{'databasePage':_0x5d4edb['databasePage']}}:{},..._0x35d35f?{'analysisPlanId':_0x35d35f}:{},..._0x591e4a?{'analysisStartWarning':_0x591e4a}:{}};let _0x4c5f7f;return _0x56c2ba[_0x23572c(0x140)](_0x23572c(0x14f))?_0x591e4a?_0x4c5f7f=_0x23572c(0x12e)+_0x1c563c+';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning':_0x4c5f7f=_0x23572c(0x12e)+_0x1c563c+_0x23572c(0x135):_0x4c5f7f='Created\x20db\x20link\x20'+_0x1c563c,{'ok':!![],'data':_0x239294,'message':_0x4c5f7f};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a68_0x53ce(_0x563507,_0x12abf5){_0x563507=_0x563507-0x130;const _0x565d3f=a68_0x565d();let _0x53ce1d=_0x565d3f[_0x563507];return _0x53ce1d;}const a68_0x4a286a=a68_0x53ce;(function(_0x1604c4,_0x31dfcb){const _0x616156=a68_0x53ce,_0x34edd4=_0x1604c4();while(!![]){try{const _0x56683f=parseInt(_0x616156(0x131))/0x1+-parseInt(_0x616156(0x132))/0x2*(-parseInt(_0x616156(0x136))/0x3)+-parseInt(_0x616156(0x13b))/0x4+-parseInt(_0x616156(0x139))/0x5*(parseInt(_0x616156(0x13a))/0x6)+parseInt(_0x616156(0x137))/0x7*(parseInt(_0x616156(0x13e))/0x8)+parseInt(_0x616156(0x134))/0x9*(parseInt(_0x616156(0x135))/0xa)+-parseInt(_0x616156(0x138))/0xb;if(_0x56683f===_0x31dfcb)break;else _0x34edd4['push'](_0x34edd4['shift']());}catch(_0x1c1d84){_0x34edd4['push'](_0x34edd4['shift']());}}}(a68_0x565d,0x2eaab));import{deleteDbLink}from'../../core/api-client.js';function a68_0x565d(){const _0x9780c0=['Delete\x20a\x20database\x20connection\x20(dblink)\x20permanently','8ufBeCZ','delete','113337hRnPJN','2TIygEE','high-risk-write','9YLQTGm','3637530BZrDPh','173253SximFc','140651OehiUk','45815OAZxsU','2215jHKSOv','786jrTTGN','1206356wORPNY','num'];a68_0x565d=function(){return _0x9780c0;};return a68_0x565d();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDelete={'service':'db','command':a68_0x4a286a(0x130),'description':a68_0x4a286a(0x13d),'risk':a68_0x4a286a(0x133),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x165e81){const _0x5a5c88=a68_0x4a286a,_0x1fd09e=_0x165e81[_0x5a5c88(0x13c)]('id');return await deleteDbLink(_0x1fd09e),{'ok':!![],'data':{'id':_0x1fd09e,'deleted':!![]},'message':'Deleted\x20db\x20link\x20'+_0x1fd09e};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x432005=a69_0x89fa;function a69_0x89fa(_0x459152,_0x1a6634){_0x459152=_0x459152-0xb1;const _0x55be37=a69_0x55be();let _0x89fa6b=_0x55be37[_0x459152];return _0x89fa6b;}(function(_0x171511,_0x31965d){const _0x2feeeb=a69_0x89fa,_0x41cd01=_0x171511();while(!![]){try{const _0x59bfcf=-parseInt(_0x2feeeb(0xba))/0x1+-parseInt(_0x2feeeb(0xb8))/0x2+parseInt(_0x2feeeb(0xb4))/0x3*(-parseInt(_0x2feeeb(0xbd))/0x4)+-parseInt(_0x2feeeb(0xb1))/0x5*(-parseInt(_0x2feeeb(0xbf))/0x6)+-parseInt(_0x2feeeb(0xbb))/0x7+parseInt(_0x2feeeb(0xb2))/0x8*(parseInt(_0x2feeeb(0xb6))/0x9)+-parseInt(_0x2feeeb(0xb3))/0xa*(-parseInt(_0x2feeeb(0xb9))/0xb);if(_0x59bfcf===_0x31965d)break;else _0x41cd01['push'](_0x41cd01['shift']());}catch(_0x5c77c5){_0x41cd01['push'](_0x41cd01['shift']());}}}(a69_0x55be,0x6b0f3));import{getDbLinkInfo}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a69_0x55be(){const _0x51dfcc=['10MxmdbN','68559NfDREL','num','1124829PlbgWz','detail','467790lNiuaI','21914893XqIaFA','859114csEcCD','4914868lsbSbh','dbName','100sQmnVm','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','238782iaxvfb','55weoKJC','24CJvZaV'];a69_0x55be=function(){return _0x51dfcc;};return a69_0x55be();}import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbDetail={'service':'db','command':a69_0x432005(0xb7),'description':a69_0x432005(0xbe),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x42f248){const _0x2f386d=a69_0x432005,_0x580513=_0x42f248[_0x2f386d(0xb5)]('id'),_0x2c3034=await getDbLinkInfo(_0x580513);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x2c3034),'message':'db\x20link\x20'+_0x580513+':\x20'+_0x2c3034[_0x2f386d(0xbc)]};}};
|
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a70_0x2df69a=a70_0x343e;(function(_0xa2f50a,_0x483d06){const _0x40e085=a70_0x343e,_0x580e42=_0xa2f50a();while(!![]){try{const _0x2f046f=parseInt(_0x40e085(0x1e6))/0x1*(-parseInt(_0x40e085(0x1e3))/0x2)+parseInt(_0x40e085(0x1e5))/0x3+-parseInt(_0x40e085(0x1d6))/0x4*(-parseInt(_0x40e085(0x1e2))/0x5)+-parseInt(_0x40e085(0x1db))/0x6*(parseInt(_0x40e085(0x1d5))/0x7)+-parseInt(_0x40e085(0x1d1))/0x8+-parseInt(_0x40e085(0x1de))/0x9*(parseInt(_0x40e085(0x1e1))/0xa)+-parseInt(_0x40e085(0x1d3))/0xb*(-parseInt(_0x40e085(0x1e8))/0xc);if(_0x2f046f===_0x483d06)break;else _0x580e42['push'](_0x580e42['shift']());}catch(_0x6ec594){_0x580e42['push'](_0x580e42['shift']());}}}(a70_0x1683,0xe7577));import{getDbTableDiff}from'../../core/api-client.js';function a70_0x1683(){const _0x44e532=['280NgHvcW','556TxFPBn','page','Page\x20size','str','length','225012iUMttz','number','\x20row(s),\x20total\x20','9QmhzJP','num','string','17318770iViOzo','30335gJQCbX','344390gzLBpM','appCode','1449807ryZhhF','7xyyuYU','Page\x20index\x20(1-based)','84hjKbwz','Paged\x20diff\x20between\x20live\x20database\x20schema\x20and\x20last\x20analyzed\x20snapshot\x20(new\x20/\x20deleted\x20/\x20modified\x20tables)','536352IZtkrE','table','6482707xAraAS','pagesize'];a70_0x1683=function(){return _0x44e532;};return a70_0x1683();}function a70_0x343e(_0x558a1b,_0x692f09){_0x558a1b=_0x558a1b-0x1d1;const _0x1683fb=a70_0x1683();let _0x343e88=_0x1683fb[_0x558a1b];return _0x343e88;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDiff={'service':'db','command':'diff','description':a70_0x2df69a(0x1e9),'risk':'read','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a70_0x2df69a(0x1d2),'type':a70_0x2df69a(0x1e0),'description':'Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)'},{'name':a70_0x2df69a(0x1d7),'type':a70_0x2df69a(0x1dc),'description':a70_0x2df69a(0x1e7),'default':0x1},{'name':a70_0x2df69a(0x1d4),'type':a70_0x2df69a(0x1dc),'description':a70_0x2df69a(0x1d8),'default':0x14}],async 'execute'(_0x33e121){const _0x422eba=a70_0x2df69a,_0x30bc09=_0x33e121[_0x422eba(0x1df)]('id'),_0x45f289=_0x33e121[_0x422eba(0x1df)](_0x422eba(0x1d7),0x1)||0x1,_0x2b4d51=_0x33e121[_0x422eba(0x1df)](_0x422eba(0x1d4),0x14)||0x14,_0x4e2080=_0x33e121[_0x422eba(0x1d9)](_0x422eba(0x1d2))||undefined,{totalCount:_0x30c10c,tableList:_0x583aee}=await getDbTableDiff(_0x33e121[_0x422eba(0x1e4)],_0x30bc09,{'pageIndex':_0x45f289,'pageSize':_0x2b4d51,'tableName':_0x4e2080});return{'ok':!![],'data':{'dbLinkId':_0x30bc09,'page':_0x45f289,'pageSize':_0x2b4d51,'totalCount':_0x30c10c,'tableList':_0x583aee},'message':_0x583aee[_0x422eba(0x1da)]+_0x422eba(0x1dd)+_0x30c10c+'\x20(db\x20link\x20'+_0x30bc09+')'};}};
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2f61e0,_0x19c218){const _0x36b79b=a71_0x31ca,_0xe344b3=_0x2f61e0();while(!![]){try{const _0x5d4641=parseInt(_0x36b79b(0x100))/0x1+-parseInt(_0x36b79b(0x104))/0x2+-parseInt(_0x36b79b(0xff))/0x3+-parseInt(_0x36b79b(0x105))/0x4*(-parseInt(_0x36b79b(0x102))/0x5)+-parseInt(_0x36b79b(0x101))/0x6+parseInt(_0x36b79b(0x106))/0x7+parseInt(_0x36b79b(0x103))/0x8;if(_0x5d4641===_0x19c218)break;else _0xe344b3['push'](_0xe344b3['shift']());}catch(_0xe99e60){_0xe344b3['push'](_0xe344b3['shift']());}}}(a71_0x34b7,0x6e708));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';function a71_0x34b7(){const _0x1135dd=['500JSAyBc','12473544HWRXUj','1094512RhOmzz','10796jIxSfr','1757308Bqcbqd','2409567vYWtYY','537311kzrBQG','4887858XFBOEh'];a71_0x34b7=function(){return _0x1135dd;};return a71_0x34b7();}import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';function a71_0x31ca(_0x8bdcc0,_0x459510){_0x8bdcc0=_0x8bdcc0-0xff;const _0x34b720=a71_0x34b7();let _0x31ca42=_0x34b720[_0x8bdcc0];return _0x31ca42;}import{dbTest}from'../../commands/db/test.js';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff];
|
package/lib/commands/db/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a72_0x4e5a41=a72_0x2d28;(function(_0xbefdf,_0x5cac17){const _0x50599a=a72_0x2d28,_0x420ecb=_0xbefdf();while(!![]){try{const _0x3234db=-parseInt(_0x50599a(0xb3))/0x1+parseInt(_0x50599a(0xb9))/0x2*(parseInt(_0x50599a(0xae))/0x3)+-parseInt(_0x50599a(0xb8))/0x4*(-parseInt(_0x50599a(0xbf))/0x5)+-parseInt(_0x50599a(0xad))/0x6+parseInt(_0x50599a(0xb1))/0x7+parseInt(_0x50599a(0xb4))/0x8*(parseInt(_0x50599a(0xb0))/0x9)+-parseInt(_0x50599a(0xb5))/0xa*(-parseInt(_0x50599a(0xbe))/0xb);if(_0x3234db===_0x5cac17)break;else _0x420ecb['push'](_0x420ecb['shift']());}catch(_0x55b431){_0x420ecb['push'](_0x420ecb['shift']());}}}(a72_0x2a73,0x34837));function a72_0x2d28(_0x2a8a97,_0x82c5bd){_0x2a8a97=_0x2a8a97-0xac;const _0x2a7322=a72_0x2a73();let _0x2d287a=_0x2a7322[_0x2a8a97];return _0x2d287a;}import{listDbLinks}from'../../core/api-client.js';function a72_0x2a73(){const _0x5e5179=['length','967656gzRrhf','60GLZshY','pagesize','20295sAyYjf','2972263Hvphqf','Page\x20size','394153uJWMZm','576ZiuoMB','30950guaKkn','number','read','116DSKecw','8052mBtrmc','Found\x20','num','list','Page\x20index\x20(1-based)','242GHaLMG','6025EKVadm','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','\x20database\x20connection(s)','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','page'];a72_0x2a73=function(){return _0x5e5179;};return a72_0x2a73();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a72_0x4e5a41(0xbc),'description':a72_0x4e5a41(0xc1),'risk':a72_0x4e5a41(0xb7),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a72_0x4e5a41(0xc4),'type':a72_0x4e5a41(0xb6),'description':a72_0x4e5a41(0xbd),'default':0x1},{'name':a72_0x4e5a41(0xaf),'type':a72_0x4e5a41(0xb6),'description':a72_0x4e5a41(0xb2),'default':0x64}],async 'execute'(_0x5d3dfe){const _0xaa2ebb=a72_0x4e5a41,_0x3c2d2d=_0x5d3dfe[_0xaa2ebb(0xbb)](_0xaa2ebb(0xc4),0x1)||0x1,_0x1db901=_0x5d3dfe['num']('pagesize',0x64)||0x64,{items:_0x25d7ca,paging:_0x303a34}=await listDbLinks(_0x5d3dfe[_0xaa2ebb(0xc0)],{'currentPage':_0x3c2d2d,'pageSize':_0x1db901}),_0x56f494=sanitizeDbLinkList(_0x25d7ca),_0x1dea85=_0x303a34?_0x303a34:{'currentPage':_0x3c2d2d,'pageSize':_0x1db901,'rowsOnPage':_0x56f494[_0xaa2ebb(0xac)],'totalCount':null,'note':_0xaa2ebb(0xc3)};return{'ok':!![],'data':{'connections':_0x56f494,'paging':_0x1dea85},'message':_0xaa2ebb(0xba)+_0x56f494[_0xaa2ebb(0xac)]+_0xaa2ebb(0xc2)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a73_0x282c(_0x3f3864,_0x475b73){_0x3f3864=_0x3f3864-0x1aa;const _0x3e1da2=a73_0x3e1d();let _0x282caa=_0x3e1da2[_0x3f3864];return _0x282caa;}(function(_0xef153,_0x309155){const _0x4e7ef1=a73_0x282c,_0x2ba3b3=_0xef153();while(!![]){try{const _0x21505c=parseInt(_0x4e7ef1(0x1c2))/0x1*(parseInt(_0x4e7ef1(0x1bf))/0x2)+parseInt(_0x4e7ef1(0x1c1))/0x3+-parseInt(_0x4e7ef1(0x1b7))/0x4+parseInt(_0x4e7ef1(0x1bb))/0x5*(-parseInt(_0x4e7ef1(0x1ac))/0x6)+-parseInt(_0x4e7ef1(0x1c4))/0x7*(-parseInt(_0x4e7ef1(0x1b3))/0x8)+parseInt(_0x4e7ef1(0x1b2))/0x9*(-parseInt(_0x4e7ef1(0x1ab))/0xa)+parseInt(_0x4e7ef1(0x1b1))/0xb;if(_0x21505c===_0x309155)break;else _0x2ba3b3['push'](_0x2ba3b3['shift']());}catch(_0x40a342){_0x2ba3b3['push'](_0x2ba3b3['shift']());}}}(a73_0x3e1d,0xefa75));import{getEnv,isDaily,normalizeEnv}from'../../constant/env.js';function shouldRedactKey(_0x22c87f){const _0x20e14f=a73_0x282c,_0x6f6a4d=_0x22c87f['toLowerCase']();if(_0x6f6a4d===_0x20e14f(0x1c0)||_0x6f6a4d==='passwd'||_0x6f6a4d==='dbpassword')return!![];if(_0x6f6a4d['includes']('secret')||_0x6f6a4d[_0x20e14f(0x1aa)](_0x20e14f(0x1b5))||_0x6f6a4d[_0x20e14f(0x1aa)]('credential'))return!![];if(_0x6f6a4d['includes'](_0x20e14f(0x1bd))||_0x6f6a4d[_0x20e14f(0x1aa)](_0x20e14f(0x1b4)))return!![];if(_0x6f6a4d===_0x20e14f(0x1ad)||_0x6f6a4d===_0x20e14f(0x1b6)||_0x6f6a4d===_0x20e14f(0x1c6))return!![];return![];}export function sanitizeDbLinkForOutput(_0x4c8f8e){const _0x49fc35=a73_0x282c,_0x4fbf8c={..._0x4c8f8e};for(const _0x37f06f of Object[_0x49fc35(0x1be)](_0x4fbf8c)){if(!shouldRedactKey(_0x37f06f))continue;const _0x5b2bb5=_0x4fbf8c[_0x37f06f];_0x5b2bb5!=null&&String(_0x5b2bb5)[_0x49fc35(0x1c5)]>0x0&&(_0x4fbf8c[_0x37f06f]=_0x49fc35(0x1b8));}return _0x4fbf8c;}export function sanitizeDbLinkList(_0x676053){const _0x6aeee6=a73_0x282c;return _0x676053[_0x6aeee6(0x1bc)](_0x3797af=>sanitizeDbLinkForOutput(_0x3797af));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x5b01d2){const _0x3b11a3=_0x5b01d2['trim']();if(!_0x3b11a3)return![];return DB_URL_PATTERN['test'](_0x3b11a3);}export function buildDbPageLinks(_0x152572,_0x4e16b1){const _0x553700=a73_0x282c,_0xead01a=_0x152572?.[_0x553700(0x1c3)]();if(!_0xead01a)return undefined;const _0x3d008b=typeof _0x4e16b1===_0x553700(0x1b9)?String(_0x4e16b1):String(_0x4e16b1??'')[_0x553700(0x1c3)]();if(!_0x3d008b)return undefined;const _0x5d149d=Number(_0x3d008b);if(!Number[_0x553700(0x1ba)](_0x5d149d)||_0x5d149d<=0x0)return undefined;const _0x352fca=isDaily(normalizeEnv(getEnv()))?_0x553700(0x1b0)+encodeURIComponent(_0xead01a):_0x553700(0x1ae)+encodeURIComponent(_0xead01a),_0x5c6aba=encodeURIComponent(String(_0x5d149d));return{'databasePage':_0x352fca+_0x553700(0x1af),'erPage':_0x352fca+'/data/er?dbId='+_0x5c6aba};}function a73_0x3e1d(){const _0x35737b=['13045BHrQIZ','map','privatekey','keys','318022AGLytx','password','772326YrVYER','1jduZRL','trim','11104079CMlSHP','length','jdbcurl','includes','10830PqGTHS','2100broeuY','authorization','https://app.lovrabet.com/app/','/data/database','https://daily.lovrabet.com/web-app/app/','8860357NxetEy','7326rfZvhf','8TknHau','accesskey','token','connectionstring','127616bVZfhB','[redacted]','number','isFinite'];a73_0x3e1d=function(){return _0x35737b;};return a73_0x3e1d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a74_0x9983(_0x2f0777,_0x71241b){_0x2f0777=_0x2f0777-0xc3;const _0x51170f=a74_0x5117();let _0x998335=_0x51170f[_0x2f0777];return _0x998335;}const a74_0x5000c9=a74_0x9983;(function(_0x395c15,_0x46b771){const _0x1e5aa1=a74_0x9983,_0x44da62=_0x395c15();while(!![]){try{const _0x2992be=parseInt(_0x1e5aa1(0xc8))/0x1+parseInt(_0x1e5aa1(0xca))/0x2*(-parseInt(_0x1e5aa1(0xd0))/0x3)+-parseInt(_0x1e5aa1(0xc4))/0x4*(-parseInt(_0x1e5aa1(0xd3))/0x5)+parseInt(_0x1e5aa1(0xcf))/0x6*(parseInt(_0x1e5aa1(0xcc))/0x7)+parseInt(_0x1e5aa1(0xc7))/0x8*(-parseInt(_0x1e5aa1(0xcd))/0x9)+-parseInt(_0x1e5aa1(0xc6))/0xa*(-parseInt(_0x1e5aa1(0xc9))/0xb)+-parseInt(_0x1e5aa1(0xd4))/0xc;if(_0x2992be===_0x46b771)break;else _0x44da62['push'](_0x44da62['shift']());}catch(_0x189cd9){_0x44da62['push'](_0x44da62['shift']());}}}(a74_0x5117,0xecb08));import{getDbAllTableList}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a74_0x5117(){const _0x19072d=['4ljbyVS','appCode','1630dknTFK','848744GkghUb','303678wggHfn','108361YCVbzT','2636lQMVTE','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','9203971CVncPC','9jFluPA','length','6JwQzpn','4263YKmzGI','num','tables','8080665biysKQ','22703112VxNAiY','read'];a74_0x5117=function(){return _0x19072d;};return a74_0x5117();}export const dbTables={'service':'db','command':a74_0x5000c9(0xd2),'description':a74_0x5000c9(0xcb),'risk':a74_0x5000c9(0xc3),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3b2ef4){const _0x4f2994=a74_0x5000c9,_0x3fde40=_0x3b2ef4[_0x4f2994(0xd1)]('id'),_0x49c9d4=await getDbAllTableList(_0x3b2ef4[_0x4f2994(0xc5)],_0x3fde40);return{'ok':!![],'data':{'dbLinkId':_0x3fde40,'total':_0x49c9d4[_0x4f2994(0xce)],'tables':_0x49c9d4},'message':_0x49c9d4[_0x4f2994(0xce)]+'\x20table(s)\x20on\x20db\x20link\x20'+_0x3fde40};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a75_0x3d6b(){const _0x2f1e3b=['3535LaRpat','msg','106EAfEYi','3890yWcnJD','keys','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','23535QaqChC','6376vpJqys','409616WrmlHN','num','3338862XQdOCN','length','success','slice','7703267IlqQsD','76MjRqEJ','test','code','21162BarDJC','object','425695ONdjAK','Connection\x20check\x20finished\x20for\x20db\x20link\x20','data','error','message'];a75_0x3d6b=function(){return _0x2f1e3b;};return a75_0x3d6b();}function a75_0x21f3(_0x20e9e4,_0x16164a){_0x20e9e4=_0x20e9e4-0xff;const _0x3d6b2d=a75_0x3d6b();let _0x21f3f8=_0x3d6b2d[_0x20e9e4];return _0x21f3f8;}const a75_0x21b036=a75_0x21f3;(function(_0x3f8e60,_0x1feae4){const _0x2ab760=a75_0x21f3,_0x2c633b=_0x3f8e60();while(!![]){try{const _0x35bf69=-parseInt(_0x2ab760(0x10f))/0x1+parseInt(_0x2ab760(0x109))/0x2*(parseInt(_0x2ab760(0x100))/0x3)+-parseInt(_0x2ab760(0x116))/0x4*(-parseInt(_0x2ab760(0x102))/0x5)+-parseInt(_0x2ab760(0x111))/0x6+parseInt(_0x2ab760(0x107))/0x7*(-parseInt(_0x2ab760(0x10e))/0x8)+parseInt(_0x2ab760(0x10d))/0x9*(parseInt(_0x2ab760(0x10a))/0xa)+-parseInt(_0x2ab760(0x115))/0xb;if(_0x35bf69===_0x1feae4)break;else _0x2c633b['push'](_0x2c633b['shift']());}catch(_0x42713a){_0x2c633b['push'](_0x2c633b['shift']());}}}(a75_0x3d6b,0xe5757));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x28ba07){const _0xdea66a=a75_0x21f3;if(_0x28ba07===!![]||_0x28ba07===![])return{'success':_0x28ba07};if(_0x28ba07===null||_0x28ba07===undefined)return{'type':typeof _0x28ba07};if(typeof _0x28ba07!==_0xdea66a(0x101))return{'type':typeof _0x28ba07};const _0x4158e0=_0x28ba07,_0x31fe18=[_0xdea66a(0x113),_0xdea66a(0x106),_0xdea66a(0xff),_0xdea66a(0x105),_0xdea66a(0x108),_0xdea66a(0x104)],_0xed5c={};for(const _0x5164e4 of _0x31fe18){if(_0x5164e4 in _0x4158e0)_0xed5c[_0x5164e4]=_0x4158e0[_0x5164e4];}return Object[_0xdea66a(0x10b)](_0xed5c)[_0xdea66a(0x112)]===0x0&&(_0xed5c[_0xdea66a(0x10b)]=Object[_0xdea66a(0x10b)](_0x4158e0)[_0xdea66a(0x114)](0x0,0x14)),_0xed5c;}export const dbTest={'service':'db','command':a75_0x21b036(0x117),'description':a75_0x21b036(0x10c),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xd352fe){const _0x39d851=a75_0x21b036,_0x127ced=_0xd352fe[_0x39d851(0x110)]('id'),_0x43d2cf=await testDbLinkConnect(_0x127ced),_0x345a66=_0x43d2cf===!![]||typeof _0x43d2cf===_0x39d851(0x101)&&_0x43d2cf!==null&&_0x43d2cf[_0x39d851(0x113)]===!![],_0xe9ff98=summarizeTestConnectResult(_0x43d2cf);return{'ok':!![],'data':{'id':_0x127ced,'connected':Boolean(_0x345a66),'result':_0xe9ff98},'message':_0x345a66?'Connection\x20OK\x20for\x20db\x20link\x20'+_0x127ced:_0x39d851(0x103)+_0x127ced+'\x20(see\x20data.result)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a76_0x3103b7=a76_0x2ed9;(function(_0x355547,_0x294342){const _0x14cf9d=a76_0x2ed9,_0x4747d5=_0x355547();while(!![]){try{const _0x4a1b5f=parseInt(_0x14cf9d(0xbb))/0x1*(-parseInt(_0x14cf9d(0xb6))/0x2)+-parseInt(_0x14cf9d(0xa9))/0x3+parseInt(_0x14cf9d(0xb5))/0x4+parseInt(_0x14cf9d(0xc4))/0x5*(parseInt(_0x14cf9d(0xc9))/0x6)+parseInt(_0x14cf9d(0xcc))/0x7*(-parseInt(_0x14cf9d(0xac))/0x8)+parseInt(_0x14cf9d(0xc5))/0x9*(parseInt(_0x14cf9d(0xb2))/0xa)+parseInt(_0x14cf9d(0xc8))/0xb;if(_0x4a1b5f===_0x294342)break;else _0x4747d5['push'](_0x4747d5['shift']());}catch(_0x5e9b5b){_0x4747d5['push'](_0x4747d5['shift']());}}}(a76_0x18b0,0x6f957));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';function a76_0x2ed9(_0x47e369,_0x2848e3){_0x47e369=_0x47e369-0xa9;const _0x18b01f=a76_0x18b0();let _0x2ed9db=_0x18b01f[_0x47e369];return _0x2ed9db;}export const dbUpdate={'service':'db','command':a76_0x3103b7(0xb1),'description':a76_0x3103b7(0xbf),'risk':'write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a76_0x3103b7(0xbc),'type':'string','description':a76_0x3103b7(0xad)},{'name':a76_0x3103b7(0xb4),'type':a76_0x3103b7(0xc1),'description':a76_0x3103b7(0xc2)},{'name':a76_0x3103b7(0xcb),'type':a76_0x3103b7(0xc1),'description':a76_0x3103b7(0xce)},{'name':a76_0x3103b7(0xcd),'type':a76_0x3103b7(0xc1),'description':a76_0x3103b7(0xba)},{'name':a76_0x3103b7(0xb3),'type':a76_0x3103b7(0xc1),'description':a76_0x3103b7(0xaa)},{'name':'dbdesc','type':'string','description':a76_0x3103b7(0xca)}],async 'validate'(_0x9faa51){const _0x42d4b1=a76_0x3103b7,_0x21d7d5=_0x9faa51[_0x42d4b1(0xbd)](_0x42d4b1(0xb4));if(_0x21d7d5&&!validateDbUrl(_0x21d7d5[_0x42d4b1(0xb7)]()))throw CliErrors[_0x42d4b1(0xc0)](_0x42d4b1(0xab)+_0x21d7d5+'\x22');},async 'dryRun'(_0x307595){const _0x3a04b4=a76_0x3103b7,_0x369fe6=_0x307595[_0x3a04b4(0xb9)]('id'),_0x346b5f=await getDbLinkInfo(_0x369fe6),_0x2232da={..._0x346b5f},_0x221dfb=_0x307595['str']('dbname');if(_0x221dfb)_0x2232da[_0x3a04b4(0xc3)]=_0x221dfb;const _0x36aa98=_0x307595[_0x3a04b4(0xbd)](_0x3a04b4(0xb4));if(_0x36aa98)_0x2232da[_0x3a04b4(0xb0)]=_0x36aa98[_0x3a04b4(0xb7)]();const _0x3807ee=_0x307595[_0x3a04b4(0xbd)](_0x3a04b4(0xcb));if(_0x3807ee)_0x2232da[_0x3a04b4(0xcb)]=_0x3807ee;const _0x27d10d=_0x307595[_0x3a04b4(0xbd)](_0x3a04b4(0xcd));if(_0x27d10d)_0x2232da[_0x3a04b4(0xcd)]=_0x27d10d;const _0x1f6c27=_0x307595[_0x3a04b4(0xbd)](_0x3a04b4(0xb3));if(_0x1f6c27)_0x2232da['dbParam']=_0x1f6c27;const _0x2d3580=_0x307595[_0x3a04b4(0xbd)]('dbdesc');if(_0x2d3580)_0x2232da[_0x3a04b4(0xc7)]=_0x2d3580;const _0x23c10e=sanitizeDbLinkForOutput(_0x2232da);return{'method':_0x3a04b4(0xc6),'url':_0x3a04b4(0xb8),'body':_0x23c10e,'description':'Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview'};},async 'execute'(_0x268afc){const _0x14bfea=a76_0x3103b7,_0x53da24=_0x268afc[_0x14bfea(0xb9)]('id'),_0x318b94=await getDbLinkInfo(_0x53da24),_0x285ae1={..._0x318b94},_0x5169dc=_0x268afc['str']('dbname');if(_0x5169dc)_0x285ae1[_0x14bfea(0xc3)]=_0x5169dc;const _0x19edd6=_0x268afc[_0x14bfea(0xbd)]('dburl');if(_0x19edd6)_0x285ae1[_0x14bfea(0xb0)]=_0x19edd6[_0x14bfea(0xb7)]();const _0x54d347=_0x268afc[_0x14bfea(0xbd)](_0x14bfea(0xcb));if(_0x54d347)_0x285ae1[_0x14bfea(0xcb)]=_0x54d347;const _0x5707b4=_0x268afc[_0x14bfea(0xbd)](_0x14bfea(0xcd));if(_0x5707b4)_0x285ae1['password']=_0x5707b4;const _0x3275ff=_0x268afc[_0x14bfea(0xbd)]('dbparam');if(_0x3275ff)_0x285ae1[_0x14bfea(0xae)]=_0x3275ff;const _0x432e84=_0x268afc[_0x14bfea(0xbd)](_0x14bfea(0xaf));if(_0x432e84)_0x285ae1[_0x14bfea(0xc7)]=_0x432e84;const {id:_0x4b66aa,entity:_0x46e16e}=normalizeEntityWithIdResponse(await updateDbLink(_0x285ae1));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x46e16e),'message':_0x14bfea(0xbe)+(_0x4b66aa??_0x53da24)};}};function a76_0x18b0(){const _0xa95fe0=['POST','dbDesc','5792699ZhffIa','37722PTHuNI','New\x20description','username','46571UzXzeW','password','New\x20username','1077642VeZkhw','New\x20connection\x20parameter\x20string','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','584hSZUrP','New\x20database\x20name','dbParam','dbdesc','dbUrl','update','42440fuiJZs','dbparam','dburl','2210720NREEgj','4TQiTmI','trim','/smartapi/dblink/update','num','New\x20password\x20(omit\x20to\x20leave\x20unchanged).\x20Empty\x20string\x20may\x20be\x20treated\x20as\x20no-op\x20or\x20rejected\x20by\x20API','301031HUpEFx','dbname','str','Updated\x20db\x20link\x20','Update\x20an\x20existing\x20database\x20connection.\x20Only\x20supplied\x20fields\x20are\x20overwritten;\x20others\x20keep\x20server\x20values','validation','string','New\x20host:port','dbName','585nmfaSx','189tpAsLf'];a76_0x18b0=function(){return _0xa95fe0;};return a76_0x18b0();}
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a77_0x20cd96=a77_0x1cf4;(function(_0x5880c8,_0xfecc10){const _0x96a7b6=a77_0x1cf4,_0x5a5169=_0x5880c8();while(!![]){try{const _0x593200=parseInt(_0x96a7b6(0x160))/0x1*(-parseInt(_0x96a7b6(0x12e))/0x2)+parseInt(_0x96a7b6(0x11f))/0x3*(-parseInt(_0x96a7b6(0x168))/0x4)+-parseInt(_0x96a7b6(0x12f))/0x5*(parseInt(_0x96a7b6(0x163))/0x6)+parseInt(_0x96a7b6(0x134))/0x7+-parseInt(_0x96a7b6(0x173))/0x8+-parseInt(_0x96a7b6(0x15e))/0x9+parseInt(_0x96a7b6(0x13d))/0xa;if(_0x593200===_0xfecc10)break;else _0x5a5169['push'](_0x5a5169['shift']());}catch(_0x3e8dcd){_0x5a5169['push'](_0x5a5169['shift']());}}}(a77_0x54ac,0x63474));import a77_0x3b0896 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';function a77_0x1cf4(_0xda1d5b,_0x26e632){_0xda1d5b=_0xda1d5b-0x11d;const _0x54acdb=a77_0x54ac();let _0x1cf473=_0x54acdb[_0xda1d5b];return _0x1cf473;}import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x10817b){const _0x5def98=a77_0x1cf4,_0x23a155=GIT_COMMIT!==_0x5def98(0x13f)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x5def98(0x146)](0x0,0xa)+')':VERSION,_0xe3f2f4=buildConfigFromFlags({}),_0x5ba5d7=getCookie();console[_0x5def98(0x153)](),console['log'](a77_0x3b0896[_0x5def98(0x164)](CLI_BIN_NAME+_0x5def98(0x14d))),console[_0x5def98(0x153)](a77_0x3b0896[_0x5def98(0x12b)]('─'['repeat'](0x32))),console[_0x5def98(0x153)](_0x5def98(0x174)+_0x23a155),console[_0x5def98(0x153)](_0x5def98(0x141)+process[_0x5def98(0x14b)]),console[_0x5def98(0x153)](_0x5def98(0x137)+process[_0x5def98(0x15c)]+'\x20'+process[_0x5def98(0x159)]),console[_0x5def98(0x153)](),console[_0x5def98(0x153)](a77_0x3b0896[_0x5def98(0x164)](_0x5def98(0x170))),console[_0x5def98(0x153)](a77_0x3b0896[_0x5def98(0x12b)](_0x5def98(0x12c)[_0x5def98(0x143)](0x1e)));const _0x161101=getGlobalConfigPath(),_0x1310a1=getProjectConfigPath();console[_0x5def98(0x153)](_0x5def98(0x124)+(_0x161101||a77_0x3b0896[_0x5def98(0x12b)](_0x5def98(0x138)))),console[_0x5def98(0x153)](_0x5def98(0x155)+(_0x1310a1||a77_0x3b0896[_0x5def98(0x12b)]('(not\x20found)'))),console[_0x5def98(0x153)](),console[_0x5def98(0x153)](a77_0x3b0896[_0x5def98(0x164)](_0x5def98(0x11e))),console[_0x5def98(0x153)](a77_0x3b0896[_0x5def98(0x12b)](_0x5def98(0x12c)[_0x5def98(0x143)](0x1e)));const _0x48bb20=(_0xb7df57,_0x5e894e)=>{const _0x152ccf=_0x5def98;if(!_0x5e894e){console[_0x152ccf(0x153)]('\x20\x20'+_0xb7df57[_0x152ccf(0x130)](0x11)+'\x20'+a77_0x3b0896['gray'](_0x152ccf(0x179)));return;}const _0x3bb3f3=inspectCliConfigJsonFile(_0x5e894e);if(_0x3bb3f3[_0x152ccf(0x122)]==='ok')console[_0x152ccf(0x153)]('\x20\x20'+_0xb7df57[_0x152ccf(0x130)](0x11)+'\x20'+a77_0x3b0896[_0x152ccf(0x165)](_0x152ccf(0x14c)));else{if(_0x3bb3f3['status']===_0x152ccf(0x135))console[_0x152ccf(0x153)]('\x20\x20'+_0xb7df57[_0x152ccf(0x130)](0x11)+'\x20'+a77_0x3b0896['yellow'](_0x152ccf(0x16d)));else _0x3bb3f3[_0x152ccf(0x122)]===_0x152ccf(0x154)?console[_0x152ccf(0x153)]('\x20\x20'+_0xb7df57[_0x152ccf(0x130)](0x11)+'\x20'+a77_0x3b0896['gray']('(missing)')):(console[_0x152ccf(0x153)]('\x20\x20'+_0xb7df57[_0x152ccf(0x130)](0x11)+'\x20'+a77_0x3b0896['red'](_0x152ccf(0x16c))),console[_0x152ccf(0x153)]('\x20\x20'+''[_0x152ccf(0x130)](0x11)+'\x20'+a77_0x3b0896[_0x152ccf(0x175)](_0x3bb3f3[_0x152ccf(0x151)])));}};_0x48bb20(_0x5def98(0x156),_0x161101),_0x48bb20(_0x5def98(0x12a),_0x1310a1),console[_0x5def98(0x153)](),console[_0x5def98(0x153)](a77_0x3b0896[_0x5def98(0x164)](_0x5def98(0x161))),console['log'](a77_0x3b0896['gray']('\x20\x20─'['repeat'](0x1e))),console[_0x5def98(0x153)](_0x5def98(0x166)+(_0xe3f2f4[_0x5def98(0x177)]||a77_0x3b0896[_0x5def98(0x175)]('(not\x20set)'))),console[_0x5def98(0x153)](_0x5def98(0x171)+_0xe3f2f4[_0x5def98(0x11d)]),console[_0x5def98(0x153)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xe3f2f4[_0x5def98(0x12d)]),console[_0x5def98(0x153)](_0x5def98(0x144)+_0xe3f2f4[_0x5def98(0x121)]),console[_0x5def98(0x153)](_0x5def98(0x136)+(_0xe3f2f4[_0x5def98(0x16f)]||a77_0x3b0896[_0x5def98(0x12b)](_0x5def98(0x13b)))),console[_0x5def98(0x153)](_0x5def98(0x150)+(_0xe3f2f4[_0x5def98(0x13e)]||a77_0x3b0896[_0x5def98(0x12b)](_0x5def98(0x13b)))),console[_0x5def98(0x153)](_0x5def98(0x167)+(_0xe3f2f4[_0x5def98(0x14f)]||a77_0x3b0896[_0x5def98(0x12b)](_0x5def98(0x13b)))),console[_0x5def98(0x153)](_0x5def98(0x129)+(_0xe3f2f4[_0x5def98(0x16b)]||a77_0x3b0896[_0x5def98(0x12b)](_0x5def98(0x158)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x5def98(0x153)](_0x5def98(0x127)+(_0xe3f2f4[_0x5def98(0x125)]??a77_0x3b0896[_0x5def98(0x12b)](_0x5def98(0x145)))),console[_0x5def98(0x153)](_0x5def98(0x176)+_0xe3f2f4[_0x5def98(0x178)]),console[_0x5def98(0x153)](_0x5def98(0x172)+_0xe3f2f4[_0x5def98(0x15b)]),console[_0x5def98(0x153)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0xe3f2f4['cookie']?a77_0x3b0896['green']('(set,\x20length='+_0xe3f2f4[_0x5def98(0x148)][_0x5def98(0x131)]+')'):_0x5ba5d7?a77_0x3b0896[_0x5def98(0x165)](_0x5def98(0x17a)+_0x5ba5d7['length']+')'):a77_0x3b0896['gray'](_0x5def98(0x13b))));const _0x2de593=Object[_0x5def98(0x149)](_0xe3f2f4[_0x5def98(0x139)]);if(_0x2de593['length']>0x0){console['log'](),console[_0x5def98(0x153)](a77_0x3b0896['bold'](_0x5def98(0x128))),console[_0x5def98(0x153)](a77_0x3b0896[_0x5def98(0x12b)](_0x5def98(0x12c)[_0x5def98(0x143)](0x1e)));for(const _0x1ba7a8 of _0x2de593){const _0x37226e=_0xe3f2f4['apps'][_0x1ba7a8],_0x5c5664=_0x1ba7a8===_0xe3f2f4[_0x5def98(0x16f)],_0x5e9c2d=_0x1ba7a8===_0xe3f2f4[_0x5def98(0x13e)],_0x146eaf=_0x5e9c2d?a77_0x3b0896[_0x5def98(0x165)](_0x5def98(0x132)):'',_0x390357=_0x5c5664?_0x5def98(0x147):'';console[_0x5def98(0x153)]('\x20\x20'+_0x1ba7a8+_0x390357+_0x146eaf),console['log'](_0x5def98(0x169)+_0x37226e['appcode']);const _0x4e3256=buildAppDoctorFields(_0x37226e,{'env':_0xe3f2f4[_0x5def98(0x11d)],'apiDir':_0xe3f2f4[_0x5def98(0x142)][_0x5def98(0x121)]||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0xe3f2f4[_0x5def98(0x148)]||_0x5ba5d7||undefined,'accessKey':_0xe3f2f4[_0x5def98(0x15a)]});console[_0x5def98(0x153)]('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4e3256[_0x5def98(0x11d)][_0x5def98(0x157)]+'\x20\x20'+a77_0x3b0896[_0x5def98(0x12b)]('('+_0x4e3256[_0x5def98(0x11d)][_0x5def98(0x17b)]+')')),console[_0x5def98(0x153)](_0x5def98(0x14a)+_0x4e3256[_0x5def98(0x121)]['value']+'\x20\x20'+a77_0x3b0896[_0x5def98(0x12b)]('('+_0x4e3256[_0x5def98(0x121)][_0x5def98(0x17b)]+')'));const _0x32455c=_0x4e3256[_0x5def98(0x148)]['value']?a77_0x3b0896[_0x5def98(0x165)](_0x5def98(0x16a)+_0x4e3256[_0x5def98(0x148)]['value'][_0x5def98(0x131)]+')'):a77_0x3b0896[_0x5def98(0x12b)]('(none)');console[_0x5def98(0x153)]('\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'+_0x32455c+'\x20\x20'+a77_0x3b0896['gray']('('+_0x4e3256[_0x5def98(0x148)]['source']+')'));const _0x33e249=_0x4e3256[_0x5def98(0x15a)]['value']?a77_0x3b0896[_0x5def98(0x165)](_0x5def98(0x16a)+_0x4e3256['accessKey']['value'][_0x5def98(0x131)]+')'):a77_0x3b0896[_0x5def98(0x12b)]('(none)');console[_0x5def98(0x153)](_0x5def98(0x120)+_0x33e249+'\x20\x20'+a77_0x3b0896[_0x5def98(0x12b)]('('+_0x4e3256[_0x5def98(0x15a)][_0x5def98(0x17b)]+')'));}}console['log'](),console[_0x5def98(0x153)](a77_0x3b0896[_0x5def98(0x164)](_0x5def98(0x14e))),console['log'](a77_0x3b0896['gray'](_0x5def98(0x12c)['repeat'](0x1e))),console[_0x5def98(0x153)](_0x5def98(0x133)+getApiDomain()),console[_0x5def98(0x153)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console['log'](_0x5def98(0x16e)+getRuntimeDomain()),console[_0x5def98(0x153)](),console[_0x5def98(0x153)](a77_0x3b0896[_0x5def98(0x164)](_0x5def98(0x123))),console[_0x5def98(0x153)](a77_0x3b0896[_0x5def98(0x12b)](_0x5def98(0x12c)['repeat'](0x1e)));if(_0x5ba5d7){const _0x5796e9=await getIsSessionValid();console[_0x5def98(0x153)](_0x5def98(0x140)+(_0x5796e9?a77_0x3b0896[_0x5def98(0x165)](_0x5def98(0x13a)):a77_0x3b0896['red'](_0x5def98(0x15f))));}else console[_0x5def98(0x153)](_0x5def98(0x140)+a77_0x3b0896[_0x5def98(0x175)](_0x5def98(0x126)));return console[_0x5def98(0x153)](),{'ok':!![]};}function a77_0x54ac(){const _0x3d6d5d=['\x20\x20Merged\x20Config','check','192dHlJRa','bold','green','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20explicitAppName:\x20','4VJJpdX','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','(set,\x20length=','format','✗\x20Invalid\x20JSON','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20runtimeDomain:\x20\x20\x20','defaultApp','\x20\x20Config\x20Files','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','6027232IXlreT','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','red','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','appCode','riskLevel','(no\x20file)','(set\x20via\x20file,\x20length=','source','env','\x20\x20Config\x20JSON','967944bTQAnI','\x20\x20\x20\x20accessKey:\x20\x20','apiDir','status','\x20\x20Auth','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','pageSize','✗\x20Not\x20logged\x20in','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Apps','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Project','gray','\x20\x20─','locale','197674JNJEkS','41740sXJpDY','padEnd','length','\x20←\x20current','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','5386822ajHhfE','empty','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','apps','✓\x20Valid','(none)','doctor','25678540XSQuSj','currentApp','unknown','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','raw','repeat','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default)','slice','\x20(default)','cookie','keys','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','version','✓\x20Valid\x20JSON','\x20doctor','\x20\x20API\x20Endpoints','explicitAppName','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','message','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','log','missing','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','Global','value','(default:\x20','arch','accessKey','verbose','platform','read','7171848EdhbIF','✗\x20Expired','8PQaUGs'];a77_0x54ac=function(){return _0x3d6d5d;};return a77_0x54ac();}export const doctorDefinition={'service':a77_0x20cd96(0x13c),'command':a77_0x20cd96(0x162),'description':a77_0x20cd96(0x152),'risk':a77_0x20cd96(0x15d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a77_0x259282=a77_0x4cc7;(function(_0x209e6e,_0x3c4296){const _0x142ee1=a77_0x4cc7,_0xd02742=_0x209e6e();while(!![]){try{const _0x11b386=-parseInt(_0x142ee1(0x180))/0x1+parseInt(_0x142ee1(0x15a))/0x2*(-parseInt(_0x142ee1(0x194))/0x3)+parseInt(_0x142ee1(0x17d))/0x4+parseInt(_0x142ee1(0x16b))/0x5+-parseInt(_0x142ee1(0x193))/0x6*(parseInt(_0x142ee1(0x17c))/0x7)+-parseInt(_0x142ee1(0x176))/0x8+-parseInt(_0x142ee1(0x184))/0x9*(-parseInt(_0x142ee1(0x19b))/0xa);if(_0x11b386===_0x3c4296)break;else _0xd02742['push'](_0xd02742['shift']());}catch(_0x3bdcf5){_0xd02742['push'](_0xd02742['shift']());}}}(a77_0x4564,0x27ddd));import a77_0x566fbc from'chalk';function a77_0x4cc7(_0x434df3,_0x5dc140){_0x434df3=_0x434df3-0x14e;const _0x456467=a77_0x4564();let _0x4cc773=_0x456467[_0x434df3];return _0x4cc773;}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';function a77_0x4564(){const _0x88224b=['defaultApp','source','(default:\x20','verbose','\x20\x20explicitAppName:\x20','padEnd','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','(not\x20found)','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','109314ktMUKJ','44346RQeThq','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(set,\x20length=','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20doctor','repeat','30NTDOHt','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20set)','format','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','check','empty','log','length','\x20\x20Merged\x20Config','Project','\x20\x20Config\x20JSON','missing','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','gray','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','40WriSqo','raw','keys','env','yellow','cookie','riskLevel','unknown','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','explicitAppName','bold','currentApp','⚠\x20Empty\x20(treated\x20as\x20{})','version','value','platform','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1473315HbcTtr','(missing)','apiDir','accessKey','status','\x20\x20Config\x20Files','appCode','\x20\x20API\x20Endpoints','arch','message','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','1540960ZkRhXP','doctor','\x20\x20─','✓\x20Valid','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','105vDdgjt','859152VzpQqi','apps','green','272372EXTHTV','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','(default)','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','2063277tLpfAa','pageSize','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','red','(none)'];a77_0x4564=function(){return _0x88224b;};return a77_0x4564();}import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x20e630){const _0x41d0fd=a77_0x4cc7,_0x433312=GIT_COMMIT!==_0x41d0fd(0x161)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION,_0x46c834=buildConfigFromFlags({}),_0x2c2b60=getCookie();console[_0x41d0fd(0x151)](),console[_0x41d0fd(0x151)](a77_0x566fbc[_0x41d0fd(0x164)](CLI_BIN_NAME+_0x41d0fd(0x199))),console[_0x41d0fd(0x151)](a77_0x566fbc['gray']('─'[_0x41d0fd(0x19a)](0x32))),console[_0x41d0fd(0x151)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x433312),console[_0x41d0fd(0x151)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x41d0fd(0x167)]),console[_0x41d0fd(0x151)](_0x41d0fd(0x175)+process[_0x41d0fd(0x169)]+'\x20'+process[_0x41d0fd(0x173)]),console[_0x41d0fd(0x151)](),console['log'](a77_0x566fbc[_0x41d0fd(0x164)](_0x41d0fd(0x170))),console[_0x41d0fd(0x151)](a77_0x566fbc[_0x41d0fd(0x158)](_0x41d0fd(0x178)[_0x41d0fd(0x19a)](0x1e)));const _0x1f5660=getGlobalConfigPath(),_0x23c2c4=getProjectConfigPath();console[_0x41d0fd(0x151)](_0x41d0fd(0x198)+(_0x1f5660||a77_0x566fbc[_0x41d0fd(0x158)](_0x41d0fd(0x191)))),console[_0x41d0fd(0x151)](_0x41d0fd(0x17a)+(_0x23c2c4||a77_0x566fbc['gray'](_0x41d0fd(0x191)))),console['log'](),console[_0x41d0fd(0x151)](a77_0x566fbc[_0x41d0fd(0x164)](_0x41d0fd(0x155))),console[_0x41d0fd(0x151)](a77_0x566fbc[_0x41d0fd(0x158)](_0x41d0fd(0x178)[_0x41d0fd(0x19a)](0x1e)));const _0xb9b1d1=(_0x27e1ad,_0x3e3f21)=>{const _0x2d20b8=_0x41d0fd;if(!_0x3e3f21){console[_0x2d20b8(0x151)]('\x20\x20'+_0x27e1ad[_0x2d20b8(0x18f)](0x11)+'\x20'+a77_0x566fbc[_0x2d20b8(0x158)]('(no\x20file)'));return;}const _0x50f5f5=inspectCliConfigJsonFile(_0x3e3f21);if(_0x50f5f5[_0x2d20b8(0x16f)]==='ok')console[_0x2d20b8(0x151)]('\x20\x20'+_0x27e1ad[_0x2d20b8(0x18f)](0x11)+'\x20'+a77_0x566fbc[_0x2d20b8(0x17f)]('✓\x20Valid\x20JSON'));else{if(_0x50f5f5[_0x2d20b8(0x16f)]===_0x2d20b8(0x150))console['log']('\x20\x20'+_0x27e1ad['padEnd'](0x11)+'\x20'+a77_0x566fbc[_0x2d20b8(0x15e)](_0x2d20b8(0x166)));else _0x50f5f5[_0x2d20b8(0x16f)]===_0x2d20b8(0x156)?console[_0x2d20b8(0x151)]('\x20\x20'+_0x27e1ad[_0x2d20b8(0x18f)](0x11)+'\x20'+a77_0x566fbc[_0x2d20b8(0x158)](_0x2d20b8(0x16c))):(console[_0x2d20b8(0x151)]('\x20\x20'+_0x27e1ad['padEnd'](0x11)+'\x20'+a77_0x566fbc[_0x2d20b8(0x188)]('✗\x20Invalid\x20JSON')),console[_0x2d20b8(0x151)]('\x20\x20'+''[_0x2d20b8(0x18f)](0x11)+'\x20'+a77_0x566fbc['red'](_0x50f5f5[_0x2d20b8(0x174)])));}};_0xb9b1d1('Global',_0x1f5660),_0xb9b1d1(_0x41d0fd(0x154),_0x23c2c4),console[_0x41d0fd(0x151)](),console[_0x41d0fd(0x151)](a77_0x566fbc[_0x41d0fd(0x164)](_0x41d0fd(0x153))),console[_0x41d0fd(0x151)](a77_0x566fbc[_0x41d0fd(0x158)](_0x41d0fd(0x178)['repeat'](0x1e))),console[_0x41d0fd(0x151)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x46c834[_0x41d0fd(0x171)]||a77_0x566fbc['red'](_0x41d0fd(0x19e)))),console[_0x41d0fd(0x151)](_0x41d0fd(0x183)+_0x46c834[_0x41d0fd(0x15d)]),console[_0x41d0fd(0x151)](_0x41d0fd(0x159)+_0x46c834['locale']),console['log'](_0x41d0fd(0x186)+_0x46c834[_0x41d0fd(0x16d)]),console[_0x41d0fd(0x151)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x46c834['defaultApp']||a77_0x566fbc[_0x41d0fd(0x158)](_0x41d0fd(0x189)))),console[_0x41d0fd(0x151)](_0x41d0fd(0x162)+(_0x46c834[_0x41d0fd(0x165)]||a77_0x566fbc[_0x41d0fd(0x158)](_0x41d0fd(0x189)))),console['log'](_0x41d0fd(0x18e)+(_0x46c834[_0x41d0fd(0x163)]||a77_0x566fbc[_0x41d0fd(0x158)](_0x41d0fd(0x189)))),console['log'](_0x41d0fd(0x16a)+(_0x46c834[_0x41d0fd(0x19f)]||a77_0x566fbc[_0x41d0fd(0x158)](_0x41d0fd(0x18c)+DEFAULT_CONFIG_VALUES[_0x41d0fd(0x19f)]+')'))),console[_0x41d0fd(0x151)](_0x41d0fd(0x187)+(_0x46c834[_0x41d0fd(0x185)]??a77_0x566fbc[_0x41d0fd(0x158)](_0x41d0fd(0x182)))),console[_0x41d0fd(0x151)](_0x41d0fd(0x195)+_0x46c834[_0x41d0fd(0x160)]),console['log'](_0x41d0fd(0x19d)+_0x46c834[_0x41d0fd(0x18d)]),console[_0x41d0fd(0x151)](_0x41d0fd(0x17b)+(_0x46c834[_0x41d0fd(0x15f)]?a77_0x566fbc[_0x41d0fd(0x17f)](_0x41d0fd(0x197)+_0x46c834[_0x41d0fd(0x15f)][_0x41d0fd(0x152)]+')'):_0x2c2b60?a77_0x566fbc[_0x41d0fd(0x17f)]('(set\x20via\x20file,\x20length='+_0x2c2b60[_0x41d0fd(0x152)]+')'):a77_0x566fbc[_0x41d0fd(0x158)](_0x41d0fd(0x189))));const _0x43b866=Object[_0x41d0fd(0x15c)](_0x46c834[_0x41d0fd(0x17e)]);if(_0x43b866[_0x41d0fd(0x152)]>0x0){console[_0x41d0fd(0x151)](),console[_0x41d0fd(0x151)](a77_0x566fbc[_0x41d0fd(0x164)]('\x20\x20Apps')),console['log'](a77_0x566fbc[_0x41d0fd(0x158)]('\x20\x20─'['repeat'](0x1e)));for(const _0x1d6252 of _0x43b866){const _0x486565=_0x46c834[_0x41d0fd(0x17e)][_0x1d6252],_0x4534a5=_0x1d6252===_0x46c834[_0x41d0fd(0x18a)],_0x15bce3=_0x1d6252===_0x46c834[_0x41d0fd(0x165)],_0x2e2a14=_0x15bce3?a77_0x566fbc[_0x41d0fd(0x17f)]('\x20←\x20current'):'',_0x1913d4=_0x4534a5?'\x20(default)':'';console[_0x41d0fd(0x151)]('\x20\x20'+_0x1d6252+_0x1913d4+_0x2e2a14),console[_0x41d0fd(0x151)](_0x41d0fd(0x157)+_0x486565['appcode']);const _0x16bf3d=buildAppDoctorFields(_0x486565,{'env':_0x46c834[_0x41d0fd(0x15d)],'apiDir':_0x46c834[_0x41d0fd(0x15b)][_0x41d0fd(0x16d)]||DEFAULT_CONFIG_VALUES[_0x41d0fd(0x16d)],'cookie':_0x46c834[_0x41d0fd(0x15f)]||_0x2c2b60||undefined,'accessKey':_0x46c834[_0x41d0fd(0x16e)]});console['log']('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x16bf3d[_0x41d0fd(0x15d)][_0x41d0fd(0x168)]+'\x20\x20'+a77_0x566fbc[_0x41d0fd(0x158)]('('+_0x16bf3d['env']['source']+')')),console[_0x41d0fd(0x151)](_0x41d0fd(0x14e)+_0x16bf3d[_0x41d0fd(0x16d)][_0x41d0fd(0x168)]+'\x20\x20'+a77_0x566fbc['gray']('('+_0x16bf3d[_0x41d0fd(0x16d)][_0x41d0fd(0x18b)]+')'));const _0x2beb2f=_0x16bf3d['cookie']['value']?a77_0x566fbc[_0x41d0fd(0x17f)](_0x41d0fd(0x197)+_0x16bf3d[_0x41d0fd(0x15f)][_0x41d0fd(0x168)][_0x41d0fd(0x152)]+')'):a77_0x566fbc[_0x41d0fd(0x158)](_0x41d0fd(0x189));console[_0x41d0fd(0x151)](_0x41d0fd(0x190)+_0x2beb2f+'\x20\x20'+a77_0x566fbc[_0x41d0fd(0x158)]('('+_0x16bf3d[_0x41d0fd(0x15f)][_0x41d0fd(0x18b)]+')'));const _0x29409c=_0x16bf3d[_0x41d0fd(0x16e)][_0x41d0fd(0x168)]?a77_0x566fbc[_0x41d0fd(0x17f)](_0x41d0fd(0x197)+_0x16bf3d[_0x41d0fd(0x16e)][_0x41d0fd(0x168)]['length']+')'):a77_0x566fbc['gray'](_0x41d0fd(0x189));console['log']('\x20\x20\x20\x20accessKey:\x20\x20'+_0x29409c+'\x20\x20'+a77_0x566fbc[_0x41d0fd(0x158)]('('+_0x16bf3d['accessKey'][_0x41d0fd(0x18b)]+')'));}}console[_0x41d0fd(0x151)](),console[_0x41d0fd(0x151)](a77_0x566fbc[_0x41d0fd(0x164)](_0x41d0fd(0x172))),console[_0x41d0fd(0x151)](a77_0x566fbc[_0x41d0fd(0x158)](_0x41d0fd(0x178)[_0x41d0fd(0x19a)](0x1e))),console[_0x41d0fd(0x151)](_0x41d0fd(0x192)+getApiDomain()),console[_0x41d0fd(0x151)](_0x41d0fd(0x181)+getUserDomain()),console['log']('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console['log'](),console['log'](a77_0x566fbc['bold']('\x20\x20Auth')),console[_0x41d0fd(0x151)](a77_0x566fbc[_0x41d0fd(0x158)](_0x41d0fd(0x178)[_0x41d0fd(0x19a)](0x1e)));if(_0x2c2b60){const _0x21366f=await getIsSessionValid();console['log'](_0x41d0fd(0x196)+(_0x21366f?a77_0x566fbc[_0x41d0fd(0x17f)](_0x41d0fd(0x179)):a77_0x566fbc['red']('✗\x20Expired')));}else console['log'](_0x41d0fd(0x196)+a77_0x566fbc[_0x41d0fd(0x188)]('✗\x20Not\x20logged\x20in'));return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a77_0x259282(0x177),'command':a77_0x259282(0x14f),'description':a77_0x259282(0x19c),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a78_0x3b24ef=a78_0x50bd;(function(_0x3c9b71,_0x2e8668){const _0x14d667=a78_0x50bd,_0xa4e2de=_0x3c9b71();while(!![]){try{const _0x3077db=parseInt(_0x14d667(0x93))/0x1+-parseInt(_0x14d667(0xa9))/0x2+parseInt(_0x14d667(0x8c))/0x3+parseInt(_0x14d667(0xa8))/0x4+-parseInt(_0x14d667(0xa5))/0x5*(parseInt(_0x14d667(0xa7))/0x6)+parseInt(_0x14d667(0xaa))/0x7*(parseInt(_0x14d667(0xab))/0x8)+parseInt(_0x14d667(0x88))/0x9;if(_0x3077db===_0x2e8668)break;else _0xa4e2de['push'](_0xa4e2de['shift']());}catch(_0x15ba34){_0xa4e2de['push'](_0xa4e2de['shift']());}}}(a78_0x243b,0x7a105));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';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a78_0x243b(){const _0x3a2fe0=['run','validation','log','message','393149WfVVHG','Auto-confirm\x20prompts','init','valid','Use\x20`','appcode','toLocaleString','检测到旧配置文件,正在自动升级...\x0a','boolean','bool','\x20\x20Config:\x20','defaultApp','yes','flagMissing','appCode','map','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','App\x20code\x20to\x20initialize\x20with','5KciMIT','write','5914416fJVQDK','2195244fAxPdZ','1732792zbxtLa','6162051qBHlsG','8vSqGgL','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','string','nonInteractive','global','project','env','str','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','2457954MsICFC','\x0a✓\x20Successfully\x20initialized\x20','\x20config','\x20\x20Apps:\x20','770238WBMTaC','Write\x20to\x20global\x20config\x20instead\x20of\x20project','production'];a78_0x243b=function(){return _0x3a2fe0;};return a78_0x243b();}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(_0x258209){return{'appCode':_0x258209,'appName':_0x258209};}function writeInitConfig(_0x46f855,_0x31b6cf,_0x14fe91){const _0x3b9683=a78_0x50bd,_0x8ce9e9=resolveWriteConfigPath(_0x46f855),_0x11eb1a=buildCanonicalProjectConfig({},{'appCodes':_0x31b6cf[_0x3b9683(0xa2)](_0x4bbdeb=>_0x4bbdeb[_0x3b9683(0xa1)]),'env':_0x14fe91,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x3b9683(0x99)]()}});writeConfigFile(_0x8ce9e9,_0x11eb1a);const _0x329838=_0x46f855===_0x3b9683(0x83)?_0x3b9683(0x83):'project';console['log'](_0x3b9683(0x89)+_0x329838+_0x3b9683(0x8a)),console[_0x3b9683(0x91)](_0x3b9683(0x8b)+_0x31b6cf[_0x3b9683(0xa2)](_0xde7e94=>_0xde7e94['appCode'])['join'](',\x20')),console[_0x3b9683(0x91)]('\x20\x20Default:\x20'+_0x11eb1a[_0x3b9683(0x9e)]),console[_0x3b9683(0x91)]('\x20\x20Env:\x20'+_0x11eb1a['env']),console['log'](_0x3b9683(0x9d)+_0x8ce9e9);}async function runSmartInit(_0x57f3be){const _0x313cd6=a78_0x50bd,_0x3fbb14=process['cwd'](),_0x5be746=_0x57f3be[_0x313cd6(0x9c)](_0x313cd6(0x83))?'global':_0x313cd6(0x84),_0x522b2a=_0x57f3be[_0x313cd6(0x86)]('env')||_0x313cd6(0x8e),_0x40f411=_0x57f3be['str'](_0x313cd6(0x98))||undefined,_0xff9960=_0x57f3be[_0x313cd6(0x9c)](_0x313cd6(0x84));if(_0xff9960){const {initConfig:_0x3cc153}=await import('../../commands/project/init.js');return _0x3cc153({'appcode':_0x40f411,'env':_0x522b2a,'autoYes':_0x57f3be['bool'](_0x313cd6(0x9f))});}if(_0x5be746===_0x313cd6(0x84)){const _0x1a5b3e=existsSync(resolve(_0x3fbb14,NEW_CONFIG_NAME)),_0x5d0b70=LEGACY_CONFIG_NAMES['some'](_0x19bc9d=>existsSync(resolve(_0x3fbb14,_0x19bc9d)));if(_0x5d0b70&&!_0x1a5b3e)return console[_0x313cd6(0x91)](_0x313cd6(0x9a)),upgradeApp(_0x57f3be[_0x313cd6(0x82)],{'yes':_0x57f3be[_0x313cd6(0x9c)](_0x313cd6(0x9f))});if(_0x1a5b3e)throw CliErrors[_0x313cd6(0x90)]('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.',_0x313cd6(0x97)+CLI_BIN_NAME+_0x313cd6(0xa3));}if(_0x40f411){const _0xb5adf=validateAppcode(_0x40f411);if(!_0xb5adf[_0x313cd6(0x96)])throw CliErrors[_0x313cd6(0x90)](_0xb5adf[_0x313cd6(0x92)]);writeInitConfig(_0x5be746,[syntheticApp(_0x40f411)],_0x522b2a);return;}if(_0x57f3be[_0x313cd6(0x82)])throw CliErrors[_0x313cd6(0xa0)](_0x313cd6(0x98),'Usage:\x20'+CLI_BIN_NAME+_0x313cd6(0x87));const _0x2fdeb5=getCookie(),_0x24f19a=await selectMultipleApps(_0x2fdeb5),_0x25540e=_0x24f19a==='custom'?[syntheticApp(await promptCustomAppcode())]:_0x24f19a;writeInitConfig(_0x5be746,_0x25540e,_0x522b2a);}const initFlags=[{'name':a78_0x3b24ef(0x83),'type':a78_0x3b24ef(0x9b),'description':a78_0x3b24ef(0x8d),'default':![]},{'name':a78_0x3b24ef(0x85),'type':a78_0x3b24ef(0xad),'description':'Target\x20environment','default':a78_0x3b24ef(0x8e),'enum':[...RABETBASE_ENV_VALUES]},{'name':a78_0x3b24ef(0x98),'type':a78_0x3b24ef(0xad),'description':a78_0x3b24ef(0xa4)},{'name':a78_0x3b24ef(0x84),'type':'boolean','description':a78_0x3b24ef(0xac),'default':![]},{'name':a78_0x3b24ef(0x9f),'type':a78_0x3b24ef(0x9b),'description':a78_0x3b24ef(0x94),'default':![]}];function a78_0x50bd(_0x3eabdb,_0x48e2a4){_0x3eabdb=_0x3eabdb-0x82;const _0x243bc5=a78_0x243b();let _0x50bde7=_0x243bc5[_0x3eabdb];return _0x50bde7;}export const initDefinitions=[{'service':a78_0x3b24ef(0x95),'command':a78_0x3b24ef(0x8f),'description':'Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','risk':a78_0x3b24ef(0xa6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x58ccb2){return await runSmartInit(_0x58ccb2),{'ok':!![]};}}];
|