@lovrabet/rabetbase-cli 2.2.0-beta.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -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_0x46cf2b=a62_0x596d;(function(_0x1670dc,_0x899368){const _0x3cd971=a62_0x596d,_0xde76bc=_0x1670dc();while(!![]){try{const _0x29a51c=-parseInt(_0x3cd971(0x1e2))/0x1*(parseInt(_0x3cd971(0x1c4))/0x2)+parseInt(_0x3cd971(0x1dc))/0x3*(parseInt(_0x3cd971(0x1f7))/0x4)+-parseInt(_0x3cd971(0x202))/0x5+parseInt(_0x3cd971(0x1f1))/0x6+parseInt(_0x3cd971(0x1f8))/0x7*(parseInt(_0x3cd971(0x1ed))/0x8)+-parseInt(_0x3cd971(0x1c0))/0x9+parseInt(_0x3cd971(0x1e7))/0xa*(parseInt(_0x3cd971(0x1d7))/0xb);if(_0x29a51c===_0x899368)break;else _0xde76bc['push'](_0xde76bc['shift']());}catch(_0x42195c){_0xde76bc['push'](_0xde76bc['shift']());}}}(a62_0x1cc8,0x8fd7e));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=['DB_TABLE','METADATA'],DEFAULT_DO_VERSION='v2';function a62_0x1cc8(){const _0x381e19=['get','11546aovNxz','read','Filter\x20target\x20dataset\x20type:\x20DB_TABLE\x20or\x20METADATA','toTableName','isArray','set','dbtableConfig','cardinality','map','refTableLabelName','DB_TABLE','dataset','validation','table','tableName','Dataset\x20relations:\x20','datasetName','field','toDatasetName','451tWRXGk','datasetcode','length','appCode','toUpperCase','3aaJnTO','toDataset','labelField','detail','str','targetField','71ZVzxyV','datasetCode','filter','--to-source','Filter\x20source\x20dataset\x20type:\x20DB_TABLE\x20or\x20METADATA','184700QecnDO','to-source','includes','toSource','toSourceType','List\x20V2\x20dataset\x20relation\x20facts\x20using\x20datasetCode\x20+\x20field\x20as\x20the\x20primary\x20locator.\x20','80DiYKsW','\x20relation(s)','toLowerCase','toCode','999918EZIpRn','toField','trim','joinType','METADATA\x20to\x20DB_TABLE\x20dataset\x20relation\x20is\x20not\x20supported','fromField','1975768PqDeLk','133595GfBHTv','flatMap','targetDatasetCode','METADATA','doVersion','Invalid\x20','dataset-relations.v1','from-source','all','string','2693410TbEZIm','toDatasetCode','relations','name','fromColumn','source','code','638712oxxrJa','toFieldLabel','sourceType'];a62_0x1cc8=function(){return _0x381e19;};return a62_0x1cc8();}export const DATASET_RELATIONS_PROTOCOL=a62_0x46cf2b(0x1fe);export const datasetRelations={'service':a62_0x46cf2b(0x1cf),'command':a62_0x46cf2b(0x204),'description':a62_0x46cf2b(0x1ec)+'Supports\x20DB_TABLE\x20->\x20DB_TABLE,\x20DB_TABLE\x20->\x20METADATA,\x20and\x20METADATA\x20->\x20METADATA.','risk':a62_0x46cf2b(0x1c5),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a62_0x46cf2b(0x1ff),'type':a62_0x46cf2b(0x201),'required':![],'enum':[...SOURCE_TYPES],'description':a62_0x46cf2b(0x1e6)},{'name':a62_0x46cf2b(0x1e8),'type':a62_0x46cf2b(0x201),'required':![],'enum':[...SOURCE_TYPES],'description':a62_0x46cf2b(0x1c6)},{'name':'do-version','type':a62_0x46cf2b(0x201),'required':![],'enum':['v1','v2'],'description':'Legacy\x20troubleshooting\x20filter\x20for\x20dataset\x20version;\x20defaults\x20to\x20v2'}],async 'validate'(_0x44a06d){const _0x565dc1=a62_0x46cf2b;readSourceFilter(_0x44a06d['str'](_0x565dc1(0x1ff)),'--from-source'),readSourceFilter(_0x44a06d[_0x565dc1(0x1e0)](_0x565dc1(0x1e8)),_0x565dc1(0x1e5)),rejectUnsupportedDirection(readSourceFilter(_0x44a06d[_0x565dc1(0x1e0)](_0x565dc1(0x1ff)),'--from-source'),readSourceFilter(_0x44a06d[_0x565dc1(0x1e0)](_0x565dc1(0x1e8)),'--to-source'));},async 'execute'(_0x25bf95){const _0x27e9a4=a62_0x46cf2b,_0x478ba5=trim(_0x25bf95[_0x27e9a4(0x1e0)](_0x27e9a4(0x1d8))),_0x355b1b=readSourceFilter(_0x25bf95[_0x27e9a4(0x1e0)](_0x27e9a4(0x1ff)),'--from-source'),_0x2988d4=readSourceFilter(_0x25bf95[_0x27e9a4(0x1e0)](_0x27e9a4(0x1e8)),_0x27e9a4(0x1e5)),_0x146597=trim(_0x25bf95[_0x27e9a4(0x1e0)]('do-version')||DEFAULT_DO_VERSION)[_0x27e9a4(0x1ef)]();rejectUnsupportedDirection(_0x355b1b,_0x2988d4);const _0x556939=await listDatasets(_0x25bf95[_0x27e9a4(0x1da)],{..._0x478ba5?{'code':_0x478ba5}:{}}),_0x2124e1=new Map();for(const _0x3fd3f3 of _0x556939){const _0x1dfa53=datasetCodeOf(_0x3fd3f3);if(_0x1dfa53)_0x2124e1[_0x27e9a4(0x1c9)](_0x1dfa53,_0x3fd3f3);}const _0x37d2d3=_0x478ba5?[toDatasetInfo(await getDatasetDetail(_0x478ba5),_0x2124e1[_0x27e9a4(0x1c3)](_0x478ba5))]:await Promise[_0x27e9a4(0x200)](_0x556939['map'](async _0x3aa3ad=>toDatasetInfo(await getDatasetDetail(datasetCodeOf(_0x3aa3ad)),_0x3aa3ad))),_0x2d07f8=_0x37d2d3[_0x27e9a4(0x1e4)](_0xd75986=>{const _0x1ebfe7=_0x27e9a4;if(_0x146597&&normalizeDoVersion(_0xd75986[_0x1ebfe7(0x1fc)])!==_0x146597)return![];return!![];}),_0x56d66b=new Map(_0x2d07f8[_0x27e9a4(0x1cc)](_0x120573=>[_0x120573[_0x27e9a4(0x1bf)],_0x120573])),_0x501adb=_0x2d07f8[_0x27e9a4(0x1f9)](_0x2990f4=>{const _0x11618d=_0x27e9a4,_0xd5821=Array[_0x11618d(0x1c8)](_0x2990f4[_0x11618d(0x1df)][_0x11618d(0x204)])?_0x2990f4['detail'][_0x11618d(0x204)]:[];return _0xd5821[_0x11618d(0x1f9)](_0x4b5a80=>{const _0x485602=_0x11618d,_0x10ebfc=trim(_0x4b5a80[_0x485602(0x1f6)]??_0x4b5a80[_0x485602(0x206)]??_0x4b5a80[_0x485602(0x1d5)]),_0x3b39aa=trim(_0x4b5a80[_0x485602(0x203)]??_0x4b5a80[_0x485602(0x1f0)]??_0x4b5a80[_0x485602(0x1dd)]??_0x4b5a80[_0x485602(0x1fa)]),_0x4abe15=trim(_0x4b5a80[_0x485602(0x1f2)]??_0x4b5a80['toColumn']??_0x4b5a80[_0x485602(0x1e1)]);if(!_0x10ebfc||!_0x3b39aa||!_0x4abe15)return[];const _0x3e016a=_0x56d66b['get'](_0x3b39aa)??(_0x2124e1['has'](_0x3b39aa)?toDatasetInfo(_0x2124e1[_0x485602(0x1c3)](_0x3b39aa)??{},_0x2124e1[_0x485602(0x1c3)](_0x3b39aa)):undefined),_0x19d261=_0x3e016a?.[_0x485602(0x1be)]??sourceOf(_0x4b5a80[_0x485602(0x1eb)]??_0x4b5a80[_0x485602(0x1ea)]??_0x4b5a80[_0x485602(0x1c2)],_0x4b5a80[_0x485602(0x1c7)]);if(_0x2990f4[_0x485602(0x1be)]===_0x485602(0x1fb)&&_0x19d261===_0x485602(0x1ce))return[];if(_0x355b1b&&_0x2990f4[_0x485602(0x1be)]!==_0x355b1b)return[];if(_0x2988d4&&_0x19d261!==_0x2988d4)return[];const _0x2fbedf=readRelationLabelField(_0x4b5a80),_0xfa7db0=normalizeCardinality(_0x4b5a80[_0x485602(0x1f4)]??_0x4b5a80[_0x485602(0x1cb)]);return[{'from':{'source':_0x2990f4[_0x485602(0x1be)],'datasetCode':_0x2990f4[_0x485602(0x1bf)],..._0x2990f4[_0x485602(0x205)]?{'datasetName':_0x2990f4[_0x485602(0x205)]}:{},..._0x2990f4[_0x485602(0x1d1)]?{'table':_0x2990f4[_0x485602(0x1d1)]}:{},'field':_0x10ebfc},'to':{'source':_0x19d261,'datasetCode':_0x3b39aa,'datasetName':_0x3e016a?.[_0x485602(0x205)]??trim(_0x4b5a80[_0x485602(0x1d6)]),..._0x3e016a?.[_0x485602(0x1d1)]?{'table':_0x3e016a[_0x485602(0x1d1)]}:{},'field':_0x4abe15,..._0x2fbedf?{'labelField':_0x2fbedf}:{}},..._0xfa7db0?{'relation':{'cardinality':_0xfa7db0}}:{}}];});});return{'ok':!![],'data':{'protocol':DATASET_RELATIONS_PROTOCOL,'appCode':_0x25bf95[_0x27e9a4(0x1da)],'total':_0x501adb[_0x27e9a4(0x1d9)],'relations':_0x501adb},'message':_0x27e9a4(0x1d3)+_0x501adb[_0x27e9a4(0x1d9)]+_0x27e9a4(0x1ee)};}};function toDatasetInfo(_0x4ce31f,_0x419d10){const _0x4deecf=a62_0x46cf2b,_0xaefe82=_0x4ce31f['dataset']??{},_0x28a9e5=_0x4ce31f[_0x4deecf(0x1ca)]??_0x419d10?.['dbtableConfig']??{},_0x368c2a=datasetCodeOf(_0x4ce31f)||datasetCodeOf(_0x419d10??{});return{'code':_0x368c2a,'name':_0x4ce31f[_0x4deecf(0x205)]??_0xaefe82[_0x4deecf(0x1d4)]??_0x419d10?.['name'],'source':sourceOf(_0x4ce31f[_0x4deecf(0x1be)]??_0xaefe82[_0x4deecf(0x1c2)]??_0x419d10?.[_0x4deecf(0x1be)],_0x28a9e5[_0x4deecf(0x1d2)]),'table':_0x28a9e5['tableName']??_0xaefe82[_0x4deecf(0x1d2)],'doVersion':_0x4ce31f[_0x4deecf(0x1fc)]??_0xaefe82[_0x4deecf(0x1fc)]??_0x419d10?.[_0x4deecf(0x1fc)],'detail':_0x4ce31f};}function datasetCodeOf(_0x4c76fe){const _0x3daa1d=a62_0x46cf2b;return trim(_0x4c76fe['modelCode']??_0x4c76fe[_0x3daa1d(0x1bf)]??_0x4c76fe[_0x3daa1d(0x1e3)]);}function sourceOf(_0x38aab7,_0x28c38b){const _0x1019c7=a62_0x46cf2b,_0x2aad58=trim(_0x38aab7)[_0x1019c7(0x1db)]();if(_0x2aad58===_0x1019c7(0x1ce)||_0x2aad58==='METADATA')return _0x2aad58;return _0x28c38b?_0x1019c7(0x1ce):_0x1019c7(0x1fb);}function readSourceFilter(_0x201405,_0x2458f2){const _0x272b0b=a62_0x46cf2b,_0x2a5d62=trim(_0x201405)[_0x272b0b(0x1db)]();if(!_0x2a5d62)return undefined;if(_0x2a5d62===_0x272b0b(0x1ce)||_0x2a5d62===_0x272b0b(0x1fb))return _0x2a5d62;throw CliErrors[_0x272b0b(0x1d0)](_0x272b0b(0x1fd)+_0x2458f2+':\x20'+_0x201405,'Allowed\x20values:\x20DB_TABLE,\x20METADATA.');}function rejectUnsupportedDirection(_0x48d820,_0x5c1b19){const _0x1f0a44=a62_0x46cf2b;if(_0x48d820==='METADATA'&&_0x5c1b19===_0x1f0a44(0x1ce))throw CliErrors[_0x1f0a44(0x1d0)](_0x1f0a44(0x1f5));}function normalizeDoVersion(_0x50d75e){return trim(_0x50d75e)['toLowerCase']();}function normalizeCardinality(_0xc503ec){const _0x55b0ce=a62_0x46cf2b,_0xcc8258=trim(_0xc503ec)[_0x55b0ce(0x1db)]();if(!_0xcc8258)return undefined;return['ONE_TO_ONE','ONE_TO_MANY','MANY_TO_ONE','MANY_TO_MANY'][_0x55b0ce(0x1e9)](_0xcc8258)?_0xcc8258:undefined;}function a62_0x596d(_0x2be2ac,_0x431a29){_0x2be2ac=_0x2be2ac-0x1be;const _0x1cc817=a62_0x1cc8();let _0x596d64=_0x1cc817[_0x2be2ac];return _0x596d64;}function readRelationLabelField(_0x1a9be9){const _0x3e3d53=a62_0x46cf2b;return trim(_0x1a9be9[_0x3e3d53(0x1c1)]??_0x1a9be9[_0x3e3d53(0x1cd)]??_0x1a9be9[_0x3e3d53(0x1de)]);}function trim(_0x5406e){const _0x4d1220=a62_0x46cf2b;return typeof _0x5406e===_0x4d1220(0x201)?_0x5406e[_0x4d1220(0x1f3)]():'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x352f66=a63_0x30f2;function a63_0x30f2(_0x433cc8,_0x59f950){_0x433cc8=_0x433cc8-0x163;const _0x28d1f7=a63_0x28d1();let _0x30f257=_0x28d1f7[_0x433cc8];return _0x30f257;}(function(_0x417584,_0x2301d8){const _0x3fdb9d=a63_0x30f2,_0x25e407=_0x417584();while(!![]){try{const _0x45de1e=parseInt(_0x3fdb9d(0x178))/0x1*(parseInt(_0x3fdb9d(0x180))/0x2)+-parseInt(_0x3fdb9d(0x171))/0x3*(parseInt(_0x3fdb9d(0x165))/0x4)+parseInt(_0x3fdb9d(0x186))/0x5*(parseInt(_0x3fdb9d(0x16d))/0x6)+-parseInt(_0x3fdb9d(0x16f))/0x7*(parseInt(_0x3fdb9d(0x166))/0x8)+parseInt(_0x3fdb9d(0x175))/0x9*(-parseInt(_0x3fdb9d(0x16c))/0xa)+-parseInt(_0x3fdb9d(0x170))/0xb*(-parseInt(_0x3fdb9d(0x17e))/0xc)+parseInt(_0x3fdb9d(0x17c))/0xd;if(_0x45de1e===_0x2301d8)break;else _0x25e407['push'](_0x25e407['shift']());}catch(_0x5d6c2a){_0x25e407['push'](_0x25e407['shift']());}}}(a63_0x28d1,0x81540));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';function a63_0x28d1(){const _0x2b81eb=['str','object','POST','dataset','6145mSOgni','datasetId',',\x20actual\x20','data','\x20to\x20','--code\x20is\x20required','Expected\x20current\x20dataset\x20display\x20name;\x20mismatch\x20aborts\x20without\x20writing','--expect-name\x20is\x20required','188ZfyXkF','320TSxkXV','stringify','/smartapi/dataset/update-driven-data','isArray','name','message','238040DVFNUT','618DXVXSc','Expectation\x20mismatch\x20at\x20dataset.name','125881rIEgVk','671lSdzvW','11085KomSML','modelCode','request','code','54hPZCqJ','Expected\x20','datasetCode','363tTFqoE','dataset-rename.v1','validation','expect-name','6976151iZvkmu','expectName','18048PjOwix','trim','4466lGeqNi','Renamed\x20dataset\x20'];a63_0x28d1=function(){return _0x2b81eb;};return a63_0x28d1();}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';export async function buildDatasetRenameResult({input:_0x2a5afb,dryRun:_0x2ff00c}){const _0x265fe7=a63_0x30f2;validateInput(_0x2a5afb);const _0x52aeeb=await getDatasetDetail(_0x2a5afb[_0x265fe7(0x174)]),_0x39a8b0=resolveCurrentName(_0x52aeeb);if(_0x39a8b0!==_0x2a5afb['expectName'])throw CliErrors['validation'](_0x265fe7(0x16e),_0x265fe7(0x176)+JSON[_0x265fe7(0x167)](_0x2a5afb['expectName'])+_0x265fe7(0x188)+JSON['stringify'](_0x39a8b0));const _0x3f67cf=buildRenameRequest(_0x52aeeb,_0x2a5afb),_0xb5f006=_0x39a8b0!==_0x2a5afb[_0x265fe7(0x16a)];let _0x232e6e;return _0xb5f006&&!_0x2ff00c&&(_0x232e6e=await updateDrivenData(_0x3f67cf)),{'ok':!![],'data':{'protocol':_0x265fe7(0x179),'dataset':{'id':_0x3f67cf['modelId'],'code':_0x3f67cf[_0x265fe7(0x172)]},'dryRun':_0x2ff00c,'changed':_0xb5f006,'before':{'name':_0x39a8b0},'after':{'name':_0x2a5afb[_0x265fe7(0x16a)]},'request':_0x3f67cf,'submitted':_0xb5f006&&!_0x2ff00c,..._0x232e6e!==undefined?{'version':_0x232e6e}:{}},'message':_0xb5f006?_0x2ff00c?'Dry-run:\x20dataset\x20'+_0x3f67cf[_0x265fe7(0x172)]+'\x20would\x20be\x20renamed\x20to\x20'+_0x2a5afb[_0x265fe7(0x16a)]:_0x265fe7(0x181)+_0x3f67cf[_0x265fe7(0x172)]+_0x265fe7(0x18a)+_0x2a5afb[_0x265fe7(0x16a)]:'No\x20changes\x20for\x20dataset\x20'+_0x3f67cf['modelCode']};}export const datasetRename={'service':'dataset','command':'rename','description':'Rename\x20dataset\x20display\x20name\x20safely','risk':'write','flags':[CODE_FLAG,{'name':a63_0x352f66(0x16a),'type':'string','required':!![],'description':'New\x20dataset\x20display\x20name'},{'name':a63_0x352f66(0x17b),'type':'string','required':!![],'description':a63_0x352f66(0x163)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x297c7f){validateInput(readDatasetRenameInput(_0x297c7f));},async 'dryRun'(_0x55cb90){const _0x1ca148=a63_0x352f66,_0x3817e7=await buildDatasetRenameResult({'input':readDatasetRenameInput(_0x55cb90),'dryRun':!![]});return{'method':_0x1ca148(0x184),'url':_0x1ca148(0x168),'body':_0x3817e7[_0x1ca148(0x189)][_0x1ca148(0x173)],'description':_0x3817e7[_0x1ca148(0x16b)]};},async 'execute'(_0x266aab){return buildDatasetRenameResult({'input':readDatasetRenameInput(_0x266aab),'dryRun':![]});}};function readDatasetRenameInput(_0x4b6c4d){const _0x87497e=a63_0x352f66;return{'code':trim(_0x4b6c4d['str']('code')),'name':trim(_0x4b6c4d[_0x87497e(0x182)](_0x87497e(0x16a))),'expectName':trim(_0x4b6c4d[_0x87497e(0x182)]('expect-name'))};}function validateInput(_0x37b63b){const _0x3effce=a63_0x352f66;if(!_0x37b63b[_0x3effce(0x174)])throw CliErrors[_0x3effce(0x17a)](_0x3effce(0x18b));if(!_0x37b63b[_0x3effce(0x16a)])throw CliErrors[_0x3effce(0x17a)]('--name\x20is\x20required');if(!_0x37b63b[_0x3effce(0x17d)])throw CliErrors[_0x3effce(0x17a)](_0x3effce(0x164));}function resolveCurrentName(_0x284816){const _0x4ec2ef=a63_0x352f66;return String(_0x284816[_0x4ec2ef(0x185)]?.['datasetName']??_0x284816[_0x4ec2ef(0x16a)]??'')[_0x4ec2ef(0x17f)]();}function buildRenameRequest(_0x4a3349,_0x556a32){const _0x2d538a=a63_0x352f66,_0x3aca18=isPlainObject(_0x4a3349[_0x2d538a(0x185)])?_0x4a3349[_0x2d538a(0x185)]:{},_0x78f295=_0x4a3349['modelId']??_0x4a3349['id']??_0x3aca18[_0x2d538a(0x187)];if(_0x78f295===undefined||_0x78f295===null||_0x78f295==='')throw CliErrors[_0x2d538a(0x17a)]('Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20id');const _0x5f27cc=String(_0x4a3349['modelCode']??_0x4a3349['code']??_0x3aca18[_0x2d538a(0x177)]??_0x556a32[_0x2d538a(0x174)])['trim']();if(!_0x5f27cc)throw CliErrors[_0x2d538a(0x17a)]('Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20code');return{'modelId':_0x78f295,'modelCode':_0x5f27cc,'name':_0x556a32[_0x2d538a(0x16a)],'dataset':{'datasetId':_0x78f295,'datasetCode':_0x5f27cc,'datasetName':_0x556a32[_0x2d538a(0x16a)]}};}function isPlainObject(_0x48fc9c){const _0x46edd0=a63_0x352f66;return Boolean(_0x48fc9c)&&typeof _0x48fc9c===_0x46edd0(0x183)&&!Array[_0x46edd0(0x169)](_0x48fc9c);}function trim(_0xf2504b){return String(_0xf2504b||'')['trim']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a64_0x4444cd=a64_0x2753;(function(_0x2c8853,_0x4a0c8f){const _0x33a6a6=a64_0x2753,_0x415a70=_0x2c8853();while(!![]){try{const _0x3a1817=parseInt(_0x33a6a6(0xcf))/0x1+-parseInt(_0x33a6a6(0xc8))/0x2*(parseInt(_0x33a6a6(0xd3))/0x3)+parseInt(_0x33a6a6(0xc4))/0x4+parseInt(_0x33a6a6(0xcc))/0x5*(-parseInt(_0x33a6a6(0xd1))/0x6)+-parseInt(_0x33a6a6(0xcb))/0x7+parseInt(_0x33a6a6(0xd0))/0x8*(-parseInt(_0x33a6a6(0xce))/0x9)+parseInt(_0x33a6a6(0xd6))/0xa;if(_0x3a1817===_0x4a0c8f)break;else _0x415a70['push'](_0x415a70['shift']());}catch(_0x44b917){_0x415a70['push'](_0x415a70['shift']());}}}(a64_0x39d9,0x29636));function a64_0x2753(_0x2e70a8,_0x88df7e){_0x2e70a8=_0x2e70a8-0xc4;const _0x39d937=a64_0x39d9();let _0x27530a=_0x39d937[_0x2e70a8];return _0x27530a;}function a64_0x39d9(){const _0xe69647=['7903830yZtrrY','validation','1071252MBVZXU','Analysis\x20plan\x20/\x20trace\x20id\x20(optional\x20—\x20defaults\x20to\x20latest\x20trace\x20from\x20db\x20list/detail)','analyze-cancel','plan','2WFTtlK','string','Cancel\x20a\x20running\x20schema\x20analysis.\x20Omit\x20--plan\x20to\x20use\x20latestAnalysisTraceId\x20from\x20the\x20link','1405558sedbWO','3330FdcOGl','No\x20latestAnalysisTraceId\x20on\x20this\x20link.\x20Pass\x20--plan\x20<traceId>\x20from\x20db\x20list/detail.','297qERPCb','211078XOdUkw','74904AyfFZi','2478CknYuf','write','944751BCYyLu','num','str'];a64_0x39d9=function(){return _0xe69647;};return a64_0x39d9();}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':a64_0x4444cd(0xc6),'description':a64_0x4444cd(0xca),'risk':a64_0x4444cd(0xd2),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a64_0x4444cd(0xc7),'type':a64_0x4444cd(0xc9),'description':a64_0x4444cd(0xc5)}],async 'execute'(_0x573ec9){const _0x33310a=a64_0x4444cd,_0xfd91d6=_0x573ec9[_0x33310a(0xd4)]('id');let _0x5f1554=_0x573ec9[_0x33310a(0xd5)](_0x33310a(0xc7))||undefined;if(!_0x5f1554){const _0x378468=await getDbLinkInfo(_0xfd91d6);_0x5f1554=_0x378468['latestAnalysisTraceId']??undefined;if(!_0x5f1554)throw CliErrors[_0x33310a(0xd7)](_0x33310a(0xcd),'Analysis\x20may\x20already\x20be\x20finished\x20or\x20never\x20started.');}return await cancelDbAnalysis(_0x5f1554),{'ok':!![],'data':{'dbLinkId':_0xfd91d6,'planId':_0x5f1554},'message':'Cancel\x20requested\x20for\x20plan\x20'+_0x5f1554};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a65_0x1e10e5=a65_0x4ac7;(function(_0x30c0d5,_0x22e832){const _0x13899c=a65_0x4ac7,_0x4cffee=_0x30c0d5();while(!![]){try{const _0x59a2ce=parseInt(_0x13899c(0x1f9))/0x1+parseInt(_0x13899c(0x1f4))/0x2+parseInt(_0x13899c(0x1f7))/0x3*(-parseInt(_0x13899c(0x1fe))/0x4)+-parseInt(_0x13899c(0x1ff))/0x5*(parseInt(_0x13899c(0x1fa))/0x6)+parseInt(_0x13899c(0x204))/0x7+parseInt(_0x13899c(0x1f3))/0x8+-parseInt(_0x13899c(0x1fb))/0x9*(-parseInt(_0x13899c(0x202))/0xa);if(_0x59a2ce===_0x22e832)break;else _0x4cffee['push'](_0x4cffee['shift']());}catch(_0x5090d8){_0x4cffee['push'](_0x4cffee['shift']());}}}(a65_0x3f4e,0x8ee33));import{startDbAnalysis}from'../../core/api-client.js';function a65_0x3f4e(){const _0x25b310=['split','2170308DjOIqN','str','617202wqoiSL','6YLSpSd','4590soeBhN','Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','filter','4DRnOja','262055eQiGtw','appCode','num','10610fHXXwS','tables','58009aDTFzp','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','1039504rOWxot','129154SBbFDX','Started\x20analysis\x20for\x20db\x20link\x20'];a65_0x3f4e=function(){return _0x25b310;};return a65_0x3f4e();}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';function a65_0x4ac7(_0x24e037,_0x5e656e){_0x24e037=_0x24e037-0x1f3;const _0x3f4e89=a65_0x3f4e();let _0x4ac745=_0x3f4e89[_0x24e037];return _0x4ac745;}export const dbAnalyzeStart={'service':'db','command':'analyze-start','description':a65_0x1e10e5(0x1fc),'risk':'write','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a65_0x1e10e5(0x203),'type':'string','description':a65_0x1e10e5(0x205)}],async 'execute'(_0xb93de8){const _0x3d1414=a65_0x1e10e5,_0x599c73=_0xb93de8[_0x3d1414(0x201)]('id'),_0x52ae72=_0xb93de8[_0x3d1414(0x1f8)](_0x3d1414(0x203)),_0x9a48ee=_0x52ae72?_0x52ae72[_0x3d1414(0x1f6)](',')['map'](_0x42d4ad=>_0x42d4ad['trim']())[_0x3d1414(0x1fd)](Boolean):undefined,_0x52d36e=await startDbAnalysis(_0x599c73,_0x9a48ee),_0x1b5f6f=buildDbPageLinks(_0xb93de8[_0x3d1414(0x200)],_0x599c73);return{'ok':!![],'data':{'dbLinkId':_0x599c73,'planId':_0x52d36e,'tableNames':_0x9a48ee??[],..._0x1b5f6f?{'links':_0x1b5f6f}:{}},'message':_0x3d1414(0x1f5)+_0x599c73};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a66_0x551f(_0x2cd0c8,_0x10b1d3){_0x2cd0c8=_0x2cd0c8-0xb7;const _0x9acd0=a66_0x9acd();let _0x551f6a=_0x9acd0[_0x2cd0c8];return _0x551f6a;}const a66_0x287485=a66_0x551f;function a66_0x9acd(){const _0xa565ae=['21gaSCOg','plan','46542nLfDil','4567101SoGQrk','570ISkZML','str','Analysis\x20status\x20for\x20','994632mouqNk','12OXwwNY','read','125310JCrKbk','appCode','7975584yUYHRq','string','414579OauqFq','2946530xNsepF','32wFqxvu','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','analyze-status'];a66_0x9acd=function(){return _0xa565ae;};return a66_0x9acd();}(function(_0x59da45,_0x3668c9){const _0x795342=a66_0x551f,_0x138456=_0x59da45();while(!![]){try{const _0x280a34=parseInt(_0x795342(0xc8))/0x1*(parseInt(_0x795342(0xb7))/0x2)+-parseInt(_0x795342(0xbb))/0x3*(parseInt(_0x795342(0xbd))/0x4)+-parseInt(_0x795342(0xc4))/0x5*(parseInt(_0x795342(0xc2))/0x6)+-parseInt(_0x795342(0xc0))/0x7*(-parseInt(_0x795342(0xc7))/0x8)+parseInt(_0x795342(0xb9))/0x9+parseInt(_0x795342(0xbc))/0xa+parseInt(_0x795342(0xc3))/0xb;if(_0x280a34===_0x3668c9)break;else _0x138456['push'](_0x138456['shift']());}catch(_0x3aa06b){_0x138456['push'](_0x138456['shift']());}}}(a66_0x9acd,0xb2791));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';export const dbAnalyzeStatus={'service':'db','command':a66_0x287485(0xbf),'description':'Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','risk':a66_0x287485(0xc9),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a66_0x287485(0xc1),'type':a66_0x287485(0xba),'required':!![],'description':a66_0x287485(0xbe)}],async 'execute'(_0x44b73d){const _0x268758=a66_0x287485,_0x5c5acf=_0x44b73d['num']('id'),_0x3a087c=_0x44b73d[_0x268758(0xc5)]('plan'),_0x1dc625=await getDbAnalysisStatus(_0x3a087c),_0x26138f=buildDbPageLinks(_0x44b73d[_0x268758(0xb8)],_0x5c5acf);return{'ok':!![],'data':{'dbLinkId':_0x5c5acf,'planId':_0x3a087c,'status':_0x1dc625,..._0x26138f?{'links':_0x26138f}:{}},'message':_0x268758(0xc6)+_0x3a087c};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a67_0x4e15e6=a67_0x3e4a;(function(_0x4c0c56,_0x70fa03){const _0x7292f4=a67_0x3e4a,_0x45c875=_0x4c0c56();while(!![]){try{const _0x1eee0c=parseInt(_0x7292f4(0x173))/0x1*(parseInt(_0x7292f4(0x161))/0x2)+-parseInt(_0x7292f4(0x15e))/0x3*(parseInt(_0x7292f4(0x170))/0x4)+-parseInt(_0x7292f4(0x186))/0x5+parseInt(_0x7292f4(0x15c))/0x6*(parseInt(_0x7292f4(0x16a))/0x7)+parseInt(_0x7292f4(0x169))/0x8+-parseInt(_0x7292f4(0x158))/0x9+-parseInt(_0x7292f4(0x15b))/0xa*(-parseInt(_0x7292f4(0x17a))/0xb);if(_0x1eee0c===_0x70fa03)break;else _0x45c875['push'](_0x45c875['shift']());}catch(_0x337db4){_0x45c875['push'](_0x45c875['shift']());}}}(a67_0x334b,0xf0bf4));import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a67_0x3e4a(_0x25fde8,_0x57a549){_0x25fde8=_0x25fde8-0x158;const _0x334b93=a67_0x334b();let _0x3e4a39=_0x334b93[_0x25fde8];return _0x3e4a39;}function a67_0x334b(){const _0x401274=['Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','\x20and\x20started\x20analysis','autostart','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','dbparam','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','8.0','boolean','7956955NLITvY','13410738OXZciX','bool','create','11825320zEfHME','5405106ijiIHy','Host\x20and\x20port:\x20host:port','103230hmfHav','message','password','11566AUDJXz','dbtype','databasePage','Database\x20username','/smartapi/dblink/create','dbdesc','Created\x20db\x20link\x20','trim','11029992mhQLkp','7mxYxYG','dbversion','username',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','str','Database\x20password','136VlBuOv','appCode','[redacted]','307gidCAt','Create\x20dblink','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','string','After\x20create,\x20start\x20schema\x20analysis','dbname','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','11ZcqxIm','dburl','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','POST'];a67_0x334b=function(){return _0x401274;};return a67_0x334b();}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':a67_0x4e15e6(0x15a),'description':'Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','risk':'write','flags':[APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':a67_0x4e15e6(0x176),'required':!![],'description':a67_0x4e15e6(0x181)},DB_TYPE_FLAG,{'name':a67_0x4e15e6(0x16b),'type':'string','description':a67_0x4e15e6(0x179),'default':'8.0'},{'name':a67_0x4e15e6(0x17b),'type':a67_0x4e15e6(0x176),'required':!![],'description':a67_0x4e15e6(0x15d)},{'name':'username','type':a67_0x4e15e6(0x176),'required':!![],'description':a67_0x4e15e6(0x164)},{'name':a67_0x4e15e6(0x160),'type':'string','required':!![],'description':a67_0x4e15e6(0x16f)},{'name':'dbparam','type':'string','description':'Extra\x20JDBC-style\x20connection\x20parameters\x20string'},{'name':a67_0x4e15e6(0x166),'type':a67_0x4e15e6(0x176),'description':'Human-readable\x20description'},{'name':a67_0x4e15e6(0x180),'type':a67_0x4e15e6(0x185),'description':a67_0x4e15e6(0x177),'default':![]}],async 'validate'(_0x4601c4){const _0x152fd0=a67_0x4e15e6,_0x348ff0=_0x4601c4[_0x152fd0(0x16e)](_0x152fd0(0x17b))[_0x152fd0(0x168)]();if(!validateDbUrl(_0x348ff0))throw CliErrors['validation'](_0x152fd0(0x17c)+_0x348ff0+'\x22',_0x152fd0(0x17e));},async 'dryRun'(_0x6bd6ab){const _0xd4a319=a67_0x4e15e6,_0x4a9542={'appCode':_0x6bd6ab[_0xd4a319(0x171)],'dbName':_0x6bd6ab[_0xd4a319(0x16e)]('dbname'),'dbType':_0x6bd6ab[_0xd4a319(0x16e)](_0xd4a319(0x162)),'dbVersion':_0x6bd6ab[_0xd4a319(0x16e)](_0xd4a319(0x16b))||_0xd4a319(0x184),'dbUrl':_0x6bd6ab[_0xd4a319(0x16e)]('dburl')[_0xd4a319(0x168)](),'username':_0x6bd6ab[_0xd4a319(0x16e)](_0xd4a319(0x16c)),'password':_0xd4a319(0x172),..._0x6bd6ab[_0xd4a319(0x16e)]('dbparam')?{'dbParam':_0x6bd6ab[_0xd4a319(0x16e)](_0xd4a319(0x182))}:{},..._0x6bd6ab[_0xd4a319(0x16e)](_0xd4a319(0x166))?{'dbDesc':_0x6bd6ab[_0xd4a319(0x16e)](_0xd4a319(0x166))}:{}};return{'method':_0xd4a319(0x17d),'url':_0xd4a319(0x165),'body':_0x4a9542,'description':[_0xd4a319(0x174),_0x6bd6ab[_0xd4a319(0x159)](_0xd4a319(0x180))?_0xd4a319(0x175):'No\x20follow-up\x20analysis']['join']('\x0a')};},async 'execute'(_0x46363f){const _0x3b1ad0=a67_0x4e15e6,_0x51bfaa={'appCode':_0x46363f['appCode'],'dbName':_0x46363f[_0x3b1ad0(0x16e)](_0x3b1ad0(0x178)),'dbType':_0x46363f[_0x3b1ad0(0x16e)]('dbtype'),'dbVersion':_0x46363f[_0x3b1ad0(0x16e)](_0x3b1ad0(0x16b))||_0x3b1ad0(0x184),'dbUrl':_0x46363f['str'](_0x3b1ad0(0x17b))[_0x3b1ad0(0x168)](),'username':_0x46363f[_0x3b1ad0(0x16e)](_0x3b1ad0(0x16c)),'password':_0x46363f['str']('password'),..._0x46363f['str'](_0x3b1ad0(0x182))?{'dbParam':_0x46363f[_0x3b1ad0(0x16e)]('dbparam')}:{},..._0x46363f[_0x3b1ad0(0x16e)]('dbdesc')?{'dbDesc':_0x46363f[_0x3b1ad0(0x16e)](_0x3b1ad0(0x166))}:{}},{id:_0x5ae41e,entity:_0x52f1b7}=normalizeEntityWithIdResponse(await createDbLink(_0x51bfaa));if(!_0x5ae41e)return{'ok':![],'message':_0x3b1ad0(0x183),'data':sanitizeDbLinkForOutput(_0x52f1b7)};let _0x399671,_0x3aaaa4;if(_0x46363f[_0x3b1ad0(0x159)](_0x3b1ad0(0x180)))try{_0x399671=await startDbAnalysis(_0x5ae41e);}catch(_0x220bd7){_0x3aaaa4=_0x220bd7 instanceof Error?_0x220bd7[_0x3b1ad0(0x15f)]:String(_0x220bd7);}const _0x1bc7ba=buildDbPageLinks(_0x46363f['appCode'],_0x5ae41e),_0x1a1bc9={'connection':sanitizeDbLinkForOutput(_0x52f1b7),..._0x1bc7ba?{'links':{'databasePage':_0x1bc7ba[_0x3b1ad0(0x163)]}}:{},..._0x399671?{'analysisPlanId':_0x399671}:{},..._0x3aaaa4?{'analysisStartWarning':_0x3aaaa4}:{}};let _0x5e48d9;return _0x46363f[_0x3b1ad0(0x159)](_0x3b1ad0(0x180))?_0x3aaaa4?_0x5e48d9=_0x3b1ad0(0x167)+_0x5ae41e+_0x3b1ad0(0x16d):_0x5e48d9='Created\x20db\x20link\x20'+_0x5ae41e+_0x3b1ad0(0x17f):_0x5e48d9=_0x3b1ad0(0x167)+_0x5ae41e,{'ok':!![],'data':_0x1a1bc9,'message':_0x5e48d9};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x30b659=a68_0x19e8;function a68_0x19e8(_0x47b706,_0x587140){_0x47b706=_0x47b706-0x180;const _0x1ef205=a68_0x1ef2();let _0x19e84b=_0x1ef205[_0x47b706];return _0x19e84b;}(function(_0x5d6dcf,_0x836259){const _0x4d6534=a68_0x19e8,_0x38ac4e=_0x5d6dcf();while(!![]){try{const _0x4d1bf6=-parseInt(_0x4d6534(0x188))/0x1+-parseInt(_0x4d6534(0x180))/0x2+parseInt(_0x4d6534(0x184))/0x3*(-parseInt(_0x4d6534(0x183))/0x4)+parseInt(_0x4d6534(0x18e))/0x5*(parseInt(_0x4d6534(0x181))/0x6)+parseInt(_0x4d6534(0x186))/0x7*(-parseInt(_0x4d6534(0x18f))/0x8)+-parseInt(_0x4d6534(0x18d))/0x9*(-parseInt(_0x4d6534(0x189))/0xa)+-parseInt(_0x4d6534(0x18c))/0xb*(-parseInt(_0x4d6534(0x18b))/0xc);if(_0x4d1bf6===_0x836259)break;else _0x38ac4e['push'](_0x38ac4e['shift']());}catch(_0x473f63){_0x38ac4e['push'](_0x38ac4e['shift']());}}}(a68_0x1ef2,0x407ec));import{deleteDbLink}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a68_0x1ef2(){const _0x2d7a4c=['high-risk-write','4MlWkLc','1383123TjlIeJ','num','7WeMsMd','Delete\x20a\x20database\x20connection\x20(dblink)\x20permanently','458093KwplPa','40vMwPHL','delete','1203348LCOaNB','88pxTYTf','1182366ECOIgH','5svnzUa','755864XTdmtF','657208dbkwbH','1671990UlKEAN'];a68_0x1ef2=function(){return _0x2d7a4c;};return a68_0x1ef2();}export const dbDelete={'service':'db','command':a68_0x30b659(0x18a),'description':a68_0x30b659(0x187),'risk':a68_0x30b659(0x182),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5d3966){const _0x3e8a68=a68_0x30b659,_0x6a84b4=_0x5d3966[_0x3e8a68(0x185)]('id');return await deleteDbLink(_0x6a84b4),{'ok':!![],'data':{'id':_0x6a84b4,'deleted':!![]},'message':'Deleted\x20db\x20link\x20'+_0x6a84b4};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x43a90b=a69_0x3a01;function a69_0x3a01(_0x199880,_0xec271e){_0x199880=_0x199880-0x1d8;const _0x469c00=a69_0x469c();let _0x3a01b9=_0x469c00[_0x199880];return _0x3a01b9;}(function(_0x55c884,_0x5a2209){const _0x35af2a=a69_0x3a01,_0x4dbc4e=_0x55c884();while(!![]){try{const _0x109777=-parseInt(_0x35af2a(0x1dd))/0x1+parseInt(_0x35af2a(0x1d8))/0x2+parseInt(_0x35af2a(0x1e7))/0x3+parseInt(_0x35af2a(0x1df))/0x4*(-parseInt(_0x35af2a(0x1db))/0x5)+-parseInt(_0x35af2a(0x1de))/0x6*(-parseInt(_0x35af2a(0x1e4))/0x7)+-parseInt(_0x35af2a(0x1dc))/0x8*(-parseInt(_0x35af2a(0x1da))/0x9)+-parseInt(_0x35af2a(0x1e1))/0xa*(parseInt(_0x35af2a(0x1e5))/0xb);if(_0x109777===_0x5a2209)break;else _0x4dbc4e['push'](_0x4dbc4e['shift']());}catch(_0x2a3d60){_0x4dbc4e['push'](_0x4dbc4e['shift']());}}}(a69_0x469c,0x57f7d));import{getDbLinkInfo}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';function a69_0x469c(){const _0x4e2500=['Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','171HdOoLd','40360EXUsoW','110384LvCFPv','72388Mqvgpg','72tINObE','192eFrISr','num','929470KtVQzn','db\x20link\x20','read','236348BfGGnL','77hEiCdG','detail','1614591oUgYTS','530526aOAURA'];a69_0x469c=function(){return _0x4e2500;};return a69_0x469c();}export const dbDetail={'service':'db','command':a69_0x43a90b(0x1e6),'description':a69_0x43a90b(0x1d9),'risk':a69_0x43a90b(0x1e3),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4f11f0){const _0x5b990b=a69_0x43a90b,_0x3dbdfe=_0x4f11f0[_0x5b990b(0x1e0)]('id'),_0x2e58d8=await getDbLinkInfo(_0x3dbdfe);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x2e58d8),'message':_0x5b990b(0x1e2)+_0x3dbdfe+':\x20'+_0x2e58d8['dbName']};}};
|
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x31ebc2=a70_0xe092;function a70_0xe092(_0x3a2e9c,_0x177b43){_0x3a2e9c=_0x3a2e9c-0x16e;const _0x23a385=a70_0x23a3();let _0xe0923e=_0x23a385[_0x3a2e9c];return _0xe0923e;}(function(_0x43289b,_0x573cc7){const _0x3b4195=a70_0xe092,_0x28dfd0=_0x43289b();while(!![]){try{const _0x4c8d78=parseInt(_0x3b4195(0x17b))/0x1+parseInt(_0x3b4195(0x181))/0x2+-parseInt(_0x3b4195(0x17f))/0x3+parseInt(_0x3b4195(0x17a))/0x4*(parseInt(_0x3b4195(0x183))/0x5)+parseInt(_0x3b4195(0x182))/0x6*(parseInt(_0x3b4195(0x172))/0x7)+parseInt(_0x3b4195(0x173))/0x8+-parseInt(_0x3b4195(0x16f))/0x9*(parseInt(_0x3b4195(0x184))/0xa);if(_0x4c8d78===_0x573cc7)break;else _0x28dfd0['push'](_0x28dfd0['shift']());}catch(_0x151a1f){_0x28dfd0['push'](_0x28dfd0['shift']());}}}(a70_0x23a3,0xc2037));function a70_0x23a3(){const _0x244465=['\x20row(s),\x20total\x20','26755452kekJgH','number','Paged\x20diff\x20between\x20live\x20database\x20schema\x20and\x20last\x20analyzed\x20snapshot\x20(new\x20/\x20deleted\x20/\x20modified\x20tables)','70AOvyZx','7427440GfGBnu','length','string','Page\x20index\x20(1-based)','page','num','Page\x20size','19816ovWuEJ','1023211UndwWO','table','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','read','4725690PetyWV','pagesize','1853280nIsphb','679098vxCkBz','1345JHDYba','10dJyKPZ','appCode','str'];a70_0x23a3=function(){return _0x244465;};return a70_0x23a3();}import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDiff={'service':'db','command':'diff','description':a70_0x31ebc2(0x171),'risk':a70_0x31ebc2(0x17e),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a70_0x31ebc2(0x17c),'type':a70_0x31ebc2(0x175),'description':a70_0x31ebc2(0x17d)},{'name':a70_0x31ebc2(0x177),'type':a70_0x31ebc2(0x170),'description':a70_0x31ebc2(0x176),'default':0x1},{'name':a70_0x31ebc2(0x180),'type':a70_0x31ebc2(0x170),'description':a70_0x31ebc2(0x179),'default':0x14}],async 'execute'(_0x1794a8){const _0x1fe41b=a70_0x31ebc2,_0x39bfbf=_0x1794a8[_0x1fe41b(0x178)]('id'),_0xef8272=_0x1794a8['num'](_0x1fe41b(0x177),0x1)||0x1,_0x4b8773=_0x1794a8['num']('pagesize',0x14)||0x14,_0x4d64c0=_0x1794a8[_0x1fe41b(0x186)]('table')||undefined,{totalCount:_0x3c1176,tableList:_0x442f06}=await getDbTableDiff(_0x1794a8[_0x1fe41b(0x185)],_0x39bfbf,{'pageIndex':_0xef8272,'pageSize':_0x4b8773,'tableName':_0x4d64c0});return{'ok':!![],'data':{'dbLinkId':_0x39bfbf,'page':_0xef8272,'pageSize':_0x4b8773,'totalCount':_0x3c1176,'tableList':_0x442f06},'message':_0x442f06[_0x1fe41b(0x174)]+_0x1fe41b(0x16e)+_0x3c1176+'\x20(db\x20link\x20'+_0x39bfbf+')'};}};
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x320e17,_0x372d8c){const _0x6da64e=a71_0x17e5,_0x55edd2=_0x320e17();while(!![]){try{const _0x17c1c9=parseInt(_0x6da64e(0x109))/0x1+-parseInt(_0x6da64e(0x10b))/0x2*(-parseInt(_0x6da64e(0x10a))/0x3)+-parseInt(_0x6da64e(0x10d))/0x4+-parseInt(_0x6da64e(0x107))/0x5*(parseInt(_0x6da64e(0x10f))/0x6)+parseInt(_0x6da64e(0x10c))/0x7*(-parseInt(_0x6da64e(0x110))/0x8)+-parseInt(_0x6da64e(0x10e))/0x9+parseInt(_0x6da64e(0x108))/0xa*(parseInt(_0x6da64e(0x111))/0xb);if(_0x17c1c9===_0x372d8c)break;else _0x55edd2['push'](_0x55edd2['shift']());}catch(_0x2de073){_0x55edd2['push'](_0x55edd2['shift']());}}}(a71_0x68da,0xe6cfa));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 a71_0x17e5(_0x3c05ee,_0x247281){_0x3c05ee=_0x3c05ee-0x107;const _0x68da0e=a71_0x68da();let _0x17e5bc=_0x68da0e[_0x3c05ee];return _0x17e5bc;}import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';function a71_0x68da(){const _0x18bd2d=['5004807dNaCkk','2ibymfZ','21pqlogY','6425340NRKpTS','15072669kRrZye','477774KWBYFb','4246888OFBBpc','186296zNaaFb','65ewXoHG','2330BVdLBY','1239881yKAFAx'];a71_0x68da=function(){return _0x18bd2d;};return a71_0x68da();}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
|
+
function a72_0x5512(_0x596b21,_0x2d43c7){_0x596b21=_0x596b21-0xf1;const _0x15490d=a72_0x1549();let _0x551269=_0x15490d[_0x596b21];return _0x551269;}const a72_0x1b64c0=a72_0x5512;(function(_0x1121c7,_0x3cdfd9){const _0x3abedc=a72_0x5512,_0x2fecb2=_0x1121c7();while(!![]){try{const _0x13af7c=-parseInt(_0x3abedc(0x103))/0x1+-parseInt(_0x3abedc(0xff))/0x2*(parseInt(_0x3abedc(0x104))/0x3)+parseInt(_0x3abedc(0xf7))/0x4+parseInt(_0x3abedc(0xfc))/0x5*(parseInt(_0x3abedc(0x101))/0x6)+parseInt(_0x3abedc(0xf4))/0x7*(parseInt(_0x3abedc(0xf3))/0x8)+-parseInt(_0x3abedc(0xfd))/0x9+parseInt(_0x3abedc(0x105))/0xa*(-parseInt(_0x3abedc(0xfa))/0xb);if(_0x13af7c===_0x3cdfd9)break;else _0x2fecb2['push'](_0x2fecb2['shift']());}catch(_0x91b77b){_0x2fecb2['push'](_0x2fecb2['shift']());}}}(a72_0x1549,0x49f20));import{listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a72_0x1b64c0(0xf1),'description':a72_0x1b64c0(0x108),'risk':a72_0x1b64c0(0x106),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'page','type':'number','description':a72_0x1b64c0(0xf9),'default':0x1},{'name':a72_0x1b64c0(0xf6),'type':a72_0x1b64c0(0xfb),'description':a72_0x1b64c0(0xf8),'default':0x64}],async 'execute'(_0x48b1c2){const _0x5b8a91=a72_0x1b64c0,_0x2c1234=_0x48b1c2[_0x5b8a91(0x100)](_0x5b8a91(0x107),0x1)||0x1,_0x5384cb=_0x48b1c2[_0x5b8a91(0x100)](_0x5b8a91(0xf6),0x64)||0x64,{items:_0x29bcc5,paging:_0x8b8c8a}=await listDbLinks(_0x48b1c2[_0x5b8a91(0xf5)],{'currentPage':_0x2c1234,'pageSize':_0x5384cb}),_0x1385c9=sanitizeDbLinkList(_0x29bcc5),_0x2d32f7=_0x8b8c8a?_0x8b8c8a:{'currentPage':_0x2c1234,'pageSize':_0x5384cb,'rowsOnPage':_0x1385c9['length'],'totalCount':null,'note':_0x5b8a91(0xf2)};return{'ok':!![],'data':{'connections':_0x1385c9,'paging':_0x2d32f7},'message':'Found\x20'+_0x1385c9[_0x5b8a91(0x102)]+_0x5b8a91(0xfe)};}};function a72_0x1549(){const _0x161fa7=['2960455MAoytK','1200303QXSuxl','\x20database\x20connection(s)','2HDRlkb','num','6hYUcjw','length','388011XDXjtD','402447hhRwzz','130McHcnB','read','page','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','list','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','8WGSOro','1157611icvdiB','appCode','pagesize','1428864SYZVjr','Page\x20size','Page\x20index\x20(1-based)','132231xiFWLr','number'];a72_0x1549=function(){return _0x161fa7;};return a72_0x1549();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x472bb5,_0x3b02c8){const _0x4ebe34=a73_0x190e,_0x32af3e=_0x472bb5();while(!![]){try{const _0x46454a=-parseInt(_0x4ebe34(0x1ef))/0x1+-parseInt(_0x4ebe34(0x204))/0x2*(-parseInt(_0x4ebe34(0x1f3))/0x3)+-parseInt(_0x4ebe34(0x1ed))/0x4+-parseInt(_0x4ebe34(0x1eb))/0x5+-parseInt(_0x4ebe34(0x201))/0x6+parseInt(_0x4ebe34(0x202))/0x7*(parseInt(_0x4ebe34(0x1ec))/0x8)+parseInt(_0x4ebe34(0x1f4))/0x9;if(_0x46454a===_0x3b02c8)break;else _0x32af3e['push'](_0x32af3e['shift']());}catch(_0x3ab1c3){_0x32af3e['push'](_0x32af3e['shift']());}}}(a73_0xf9e0,0xe5293));function a73_0x190e(_0x543524,_0x1665fe){_0x543524=_0x543524-0x1e8;const _0xf9e0c5=a73_0xf9e0();let _0x190e45=_0xf9e0c5[_0x543524];return _0x190e45;}import{getEnv,isDaily,normalizeEnv}from'../../constant/env.js';function shouldRedactKey(_0x4b1305){const _0x37f1aa=a73_0x190e,_0x3fde3e=_0x4b1305[_0x37f1aa(0x1f9)]();if(_0x3fde3e==='password'||_0x3fde3e===_0x37f1aa(0x1fa)||_0x3fde3e===_0x37f1aa(0x1e9))return!![];if(_0x3fde3e[_0x37f1aa(0x1f0)](_0x37f1aa(0x203))||_0x3fde3e['includes']('token')||_0x3fde3e[_0x37f1aa(0x1f0)]('credential'))return!![];if(_0x3fde3e[_0x37f1aa(0x1f0)](_0x37f1aa(0x1fc))||_0x3fde3e['includes'](_0x37f1aa(0x1ea)))return!![];if(_0x3fde3e===_0x37f1aa(0x1f1)||_0x3fde3e==='connectionstring'||_0x3fde3e===_0x37f1aa(0x1fb))return!![];return![];}export function sanitizeDbLinkForOutput(_0x110780){const _0x16c800=a73_0x190e,_0x43117f={..._0x110780};for(const _0x142a7c of Object[_0x16c800(0x1f6)](_0x43117f)){if(!shouldRedactKey(_0x142a7c))continue;const _0x35e0ec=_0x43117f[_0x142a7c];_0x35e0ec!=null&&String(_0x35e0ec)[_0x16c800(0x200)]>0x0&&(_0x43117f[_0x142a7c]=_0x16c800(0x1f2));}return _0x43117f;}export function sanitizeDbLinkList(_0x5662e8){const _0x452dde=a73_0x190e;return _0x5662e8[_0x452dde(0x1f7)](_0x38023a=>sanitizeDbLinkForOutput(_0x38023a));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x548e94){const _0x1609c4=a73_0x190e,_0x2e8e0a=_0x548e94[_0x1609c4(0x1fd)]();if(!_0x2e8e0a)return![];return DB_URL_PATTERN[_0x1609c4(0x1fe)](_0x2e8e0a);}function a73_0xf9e0(){const _0x123f7e=['/data/er?dbId=','https://app.lovrabet.com/app/','dbpassword','accesskey','6834420qJrdIh','237624dLqqKb','3381924qbBnek','/data/database','1390497rshKNg','includes','authorization','[redacted]','282VsryXG','40625730KLuGgM','number','keys','map','https://daily.lovrabet.com/web-app/app/','toLowerCase','passwd','jdbcurl','privatekey','trim','test','isFinite','length','10327896KjiPYH','133PNUUiG','secret','25202lNBBpy'];a73_0xf9e0=function(){return _0x123f7e;};return a73_0xf9e0();}export function buildDbPageLinks(_0xc08ddd,_0x423fd8){const _0x18b7cd=a73_0x190e,_0x1d2c81=_0xc08ddd?.[_0x18b7cd(0x1fd)]();if(!_0x1d2c81)return undefined;const _0x4b7429=typeof _0x423fd8===_0x18b7cd(0x1f5)?String(_0x423fd8):String(_0x423fd8??'')['trim']();if(!_0x4b7429)return undefined;const _0x11efdb=Number(_0x4b7429);if(!Number[_0x18b7cd(0x1ff)](_0x11efdb)||_0x11efdb<=0x0)return undefined;const _0x3b553f=isDaily(normalizeEnv(getEnv()))?_0x18b7cd(0x1f8)+encodeURIComponent(_0x1d2c81):_0x18b7cd(0x1e8)+encodeURIComponent(_0x1d2c81),_0x4d7a7b=encodeURIComponent(String(_0x11efdb));return{'databasePage':_0x3b553f+_0x18b7cd(0x1ee),'erPage':_0x3b553f+_0x18b7cd(0x205)+_0x4d7a7b};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a74_0x85936b=a74_0x17c7;function a74_0x440e(){const _0x55097d=['814938gsaaRa','70dYmoma','7496577PlijeE','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','27176UmbhFR','num','133VRIIJS','5gOjgJm','7195536kozBPo','length','28047tVxNIb','104xcqpMJ','370kzOmAi','1278893ntwDeL','1352TNauMy','tables'];a74_0x440e=function(){return _0x55097d;};return a74_0x440e();}(function(_0x17934f,_0x4209c7){const _0x24ce24=a74_0x17c7,_0x1285cf=_0x17934f();while(!![]){try{const _0x12fb3a=-parseInt(_0x24ce24(0x1a9))/0x1*(-parseInt(_0x24ce24(0x1ab))/0x2)+-parseInt(_0x24ce24(0x1a7))/0x3*(parseInt(_0x24ce24(0x1a8))/0x4)+parseInt(_0x24ce24(0x1a4))/0x5*(-parseInt(_0x24ce24(0x1ad))/0x6)+parseInt(_0x24ce24(0x1a3))/0x7*(parseInt(_0x24ce24(0x1a1))/0x8)+-parseInt(_0x24ce24(0x19f))/0x9+parseInt(_0x24ce24(0x1ae))/0xa*(parseInt(_0x24ce24(0x1aa))/0xb)+parseInt(_0x24ce24(0x1a5))/0xc;if(_0x12fb3a===_0x4209c7)break;else _0x1285cf['push'](_0x1285cf['shift']());}catch(_0x6e89d9){_0x1285cf['push'](_0x1285cf['shift']());}}}(a74_0x440e,0x7e0ba));import{getDbAllTableList}from'../../core/api-client.js';function a74_0x17c7(_0xbcb26d,_0x3198fc){_0xbcb26d=_0xbcb26d-0x19f;const _0x440e5d=a74_0x440e();let _0x17c754=_0x440e5d[_0xbcb26d];return _0x17c754;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbTables={'service':'db','command':a74_0x85936b(0x1ac),'description':a74_0x85936b(0x1a0),'risk':'read','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xd4d80d){const _0x44ff7f=a74_0x85936b,_0x598b5f=_0xd4d80d[_0x44ff7f(0x1a2)]('id'),_0x4c4ef8=await getDbAllTableList(_0xd4d80d['appCode'],_0x598b5f);return{'ok':!![],'data':{'dbLinkId':_0x598b5f,'total':_0x4c4ef8[_0x44ff7f(0x1a6)],'tables':_0x4c4ef8},'message':_0x4c4ef8[_0x44ff7f(0x1a6)]+'\x20table(s)\x20on\x20db\x20link\x20'+_0x598b5f};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a75_0x4f31(_0x4b1911,_0x1eb808){_0x4b1911=_0x4b1911-0x68;const _0x3b70a3=a75_0x3b70();let _0x4f3118=_0x3b70a3[_0x4b1911];return _0x4f3118;}const a75_0x3c4259=a75_0x4f31;(function(_0x2c18fc,_0x554a8c){const _0x5c7d02=a75_0x4f31,_0x448b58=_0x2c18fc();while(!![]){try{const _0x37f544=-parseInt(_0x5c7d02(0x7b))/0x1*(-parseInt(_0x5c7d02(0x68))/0x2)+parseInt(_0x5c7d02(0x74))/0x3*(parseInt(_0x5c7d02(0x6e))/0x4)+parseInt(_0x5c7d02(0x7c))/0x5*(parseInt(_0x5c7d02(0x69))/0x6)+parseInt(_0x5c7d02(0x75))/0x7*(parseInt(_0x5c7d02(0x6c))/0x8)+parseInt(_0x5c7d02(0x6b))/0x9+parseInt(_0x5c7d02(0x71))/0xa+-parseInt(_0x5c7d02(0x70))/0xb*(parseInt(_0x5c7d02(0x72))/0xc);if(_0x37f544===_0x554a8c)break;else _0x448b58['push'](_0x448b58['shift']());}catch(_0x213de0){_0x448b58['push'](_0x448b58['shift']());}}}(a75_0x3b70,0xe4a61));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x52bb35){const _0x586ca9=a75_0x4f31;if(_0x52bb35===!![]||_0x52bb35===![])return{'success':_0x52bb35};if(_0x52bb35===null||_0x52bb35===undefined)return{'type':typeof _0x52bb35};if(typeof _0x52bb35!=='object')return{'type':typeof _0x52bb35};const _0x2cf8b6=_0x52bb35,_0x144981=[_0x586ca9(0x6a),'message',_0x586ca9(0x73),_0x586ca9(0x6d),_0x586ca9(0x77),_0x586ca9(0x79)],_0x5577cd={};for(const _0x119669 of _0x144981){if(_0x119669 in _0x2cf8b6)_0x5577cd[_0x119669]=_0x2cf8b6[_0x119669];}return Object[_0x586ca9(0x6f)](_0x5577cd)['length']===0x0&&(_0x5577cd['keys']=Object['keys'](_0x2cf8b6)[_0x586ca9(0x78)](0x0,0x14)),_0x5577cd;}function a75_0x3b70(){const _0xae96d4=['11MIMLhm','12625970jaTwTN','59128308cRFcos','code','381bsnbBY','26600CuPQlB','\x20(see\x20data.result)','msg','slice','data','test','69425HYMMNI','10FtSAQd','34wlETCM','1937010UtZDSN','success','5981094XIBTql','728kPDVkb','error','55592XdOfXT','keys'];a75_0x3b70=function(){return _0xae96d4;};return a75_0x3b70();}export const dbTest={'service':'db','command':a75_0x3c4259(0x7a),'description':'Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3b4f3a){const _0x3e90c8=a75_0x3c4259,_0x498eac=_0x3b4f3a['num']('id'),_0x5f07d3=await testDbLinkConnect(_0x498eac),_0x4a6690=_0x5f07d3===!![]||typeof _0x5f07d3==='object'&&_0x5f07d3!==null&&_0x5f07d3['success']===!![],_0x26c1b8=summarizeTestConnectResult(_0x5f07d3);return{'ok':!![],'data':{'id':_0x498eac,'connected':Boolean(_0x4a6690),'result':_0x26c1b8},'message':_0x4a6690?'Connection\x20OK\x20for\x20db\x20link\x20'+_0x498eac:'Connection\x20check\x20finished\x20for\x20db\x20link\x20'+_0x498eac+_0x3e90c8(0x76)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a76_0x55ad(){const _0x7d9f65=['Updated\x20db\x20link\x20','New\x20database\x20name','write','dbname','108858AxHQHA','New\x20connection\x20parameter\x20string','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','username','dbparam','/smartapi/dblink/update','dbUrl','num','update','31364qNpPVF','2061944aUDYKg','150wkGsOJ','New\x20description','dburl','password','string','1042350xdkRMO','New\x20password\x20(omit\x20to\x20leave\x20unchanged).\x20Empty\x20string\x20may\x20be\x20treated\x20as\x20no-op\x20or\x20rejected\x20by\x20API','dbdesc','167436DSGLJM','trim','dbDesc','27LqCaii','New\x20host:port','str','77JRnxVC','Update\x20an\x20existing\x20database\x20connection.\x20Only\x20supplied\x20fields\x20are\x20overwritten;\x20others\x20keep\x20server\x20values','dbName','339855RBKvwt','POST','New\x20username','1931210XhxKsb'];a76_0x55ad=function(){return _0x7d9f65;};return a76_0x55ad();}const a76_0x23a1d1=a76_0x4dd9;(function(_0xc6ef72,_0x4cede1){const _0x48d143=a76_0x4dd9,_0x245531=_0xc6ef72();while(!![]){try{const _0x371e97=-parseInt(_0x48d143(0x20b))/0x1+-parseInt(_0x48d143(0x202))/0x2+parseInt(_0x48d143(0x1ff))/0x3+parseInt(_0x48d143(0x1f8))/0x4*(-parseInt(_0x48d143(0x1fa))/0x5)+-parseInt(_0x48d143(0x213))/0x6*(-parseInt(_0x48d143(0x208))/0x7)+-parseInt(_0x48d143(0x1f9))/0x8+-parseInt(_0x48d143(0x205))/0x9*(-parseInt(_0x48d143(0x20e))/0xa);if(_0x371e97===_0x4cede1)break;else _0x245531['push'](_0x245531['shift']());}catch(_0x14acd0){_0x245531['push'](_0x245531['shift']());}}}(a76_0x55ad,0x333b0));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a76_0x4dd9(_0x39f476,_0x13b546){_0x39f476=_0x39f476-0x1f1;const _0x55ad58=a76_0x55ad();let _0x4dd91b=_0x55ad58[_0x39f476];return _0x4dd91b;}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':a76_0x23a1d1(0x1f7),'description':a76_0x23a1d1(0x209),'risk':a76_0x23a1d1(0x211),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a76_0x23a1d1(0x212),'type':a76_0x23a1d1(0x1fe),'description':a76_0x23a1d1(0x210)},{'name':a76_0x23a1d1(0x1fc),'type':a76_0x23a1d1(0x1fe),'description':a76_0x23a1d1(0x206)},{'name':a76_0x23a1d1(0x1f2),'type':'string','description':a76_0x23a1d1(0x20d)},{'name':'password','type':'string','description':a76_0x23a1d1(0x200)},{'name':a76_0x23a1d1(0x1f3),'type':'string','description':a76_0x23a1d1(0x214)},{'name':'dbdesc','type':a76_0x23a1d1(0x1fe),'description':a76_0x23a1d1(0x1fb)}],async 'validate'(_0x2905e9){const _0xd6aab=a76_0x23a1d1,_0x25e5eb=_0x2905e9[_0xd6aab(0x207)](_0xd6aab(0x1fc));if(_0x25e5eb&&!validateDbUrl(_0x25e5eb['trim']()))throw CliErrors['validation']('Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22'+_0x25e5eb+'\x22');},async 'dryRun'(_0x594e7d){const _0x457582=a76_0x23a1d1,_0x268075=_0x594e7d['num']('id'),_0x248d4a=await getDbLinkInfo(_0x268075),_0x491c26={..._0x248d4a},_0x241813=_0x594e7d[_0x457582(0x207)](_0x457582(0x212));if(_0x241813)_0x491c26['dbName']=_0x241813;const _0x31e4d0=_0x594e7d[_0x457582(0x207)](_0x457582(0x1fc));if(_0x31e4d0)_0x491c26[_0x457582(0x1f5)]=_0x31e4d0[_0x457582(0x203)]();const _0x2c7c8f=_0x594e7d[_0x457582(0x207)]('username');if(_0x2c7c8f)_0x491c26['username']=_0x2c7c8f;const _0x229c75=_0x594e7d[_0x457582(0x207)]('password');if(_0x229c75)_0x491c26[_0x457582(0x1fd)]=_0x229c75;const _0x139b24=_0x594e7d['str']('dbparam');if(_0x139b24)_0x491c26['dbParam']=_0x139b24;const _0x456628=_0x594e7d[_0x457582(0x207)]('dbdesc');if(_0x456628)_0x491c26[_0x457582(0x204)]=_0x456628;const _0x21d72c=sanitizeDbLinkForOutput(_0x491c26);return{'method':_0x457582(0x20c),'url':_0x457582(0x1f4),'body':_0x21d72c,'description':_0x457582(0x1f1)};},async 'execute'(_0x51b556){const _0x43dee7=a76_0x23a1d1,_0x5d32c2=_0x51b556[_0x43dee7(0x1f6)]('id'),_0x518bf8=await getDbLinkInfo(_0x5d32c2),_0x167edd={..._0x518bf8},_0x51dcac=_0x51b556[_0x43dee7(0x207)](_0x43dee7(0x212));if(_0x51dcac)_0x167edd[_0x43dee7(0x20a)]=_0x51dcac;const _0x495ac6=_0x51b556[_0x43dee7(0x207)](_0x43dee7(0x1fc));if(_0x495ac6)_0x167edd['dbUrl']=_0x495ac6[_0x43dee7(0x203)]();const _0x209cbd=_0x51b556[_0x43dee7(0x207)](_0x43dee7(0x1f2));if(_0x209cbd)_0x167edd['username']=_0x209cbd;const _0x98fb6f=_0x51b556[_0x43dee7(0x207)]('password');if(_0x98fb6f)_0x167edd[_0x43dee7(0x1fd)]=_0x98fb6f;const _0x566905=_0x51b556[_0x43dee7(0x207)](_0x43dee7(0x1f3));if(_0x566905)_0x167edd['dbParam']=_0x566905;const _0x5291dc=_0x51b556['str'](_0x43dee7(0x201));if(_0x5291dc)_0x167edd[_0x43dee7(0x204)]=_0x5291dc;const {id:_0x4c1ea7,entity:_0x480c68}=normalizeEntityWithIdResponse(await updateDbLink(_0x167edd));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x480c68),'message':_0x43dee7(0x20f)+(_0x4c1ea7??_0x5d32c2)};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a77_0x1825(){const _0x4494b3=['locale','\x20\x20Apps','11sGIqPE','\x20\x20Config\x20JSON','padEnd','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','green','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','source','yellow','accessKey','gray','platform','✗\x20Invalid\x20JSON','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20explicitAppName:\x20','env','Project','read','appcode','check','bold','9414dHFJFq','slice','apiDir','8730WujxAo','✓\x20Valid','currentApp','length','repeat','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','183mnsUGx','13757670dBvjRK','\x20\x20─','version','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20←\x20current','(none)','(set\x20via\x20file,\x20length=','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','doctor','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20Auth','value','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','(no\x20file)','(default:\x20','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','defaultApp','message','\x20(default)','(not\x20set)','\x20\x20runtimeDomain:\x20\x20\x20','✓\x20Valid\x20JSON','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','keys','status','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','435KlJtfQ','3473997RJnFJh','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','Global','pageSize','apps','✗\x20Expired','\x20\x20Config\x20Files','appCode','log','924693ricaDR','\x20\x20\x20\x20accessKey:\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','5275488WGqWWW','(set,\x20length=','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','verbose','red','cookie','3552UZNAQk','explicitAppName','44646CYZjCh','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','arch','raw'];a77_0x1825=function(){return _0x4494b3;};return a77_0x1825();}const a77_0x17c06a=a77_0x4f06;(function(_0x4136b5,_0x2a65f8){const _0xc53c1a=a77_0x4f06,_0x2e37c9=_0x4136b5();while(!![]){try{const _0x4290b9=-parseInt(_0xc53c1a(0x1e0))/0x1*(-parseInt(_0xc53c1a(0x1d7))/0x2)+parseInt(_0xc53c1a(0x1a8))/0x3+parseInt(_0xc53c1a(0x1b4))/0x4+-parseInt(_0xc53c1a(0x1a7))/0x5*(parseInt(_0xc53c1a(0x1bc))/0x6)+-parseInt(_0xc53c1a(0x1b1))/0x7+-parseInt(_0xc53c1a(0x1ba))/0x8*(parseInt(_0xc53c1a(0x1da))/0x9)+parseInt(_0xc53c1a(0x1e1))/0xa*(-parseInt(_0xc53c1a(0x1c3))/0xb);if(_0x4290b9===_0x2a65f8)break;else _0x2e37c9['push'](_0x2e37c9['shift']());}catch(_0x1ee611){_0x2e37c9['push'](_0x2e37c9['shift']());}}}(a77_0x1825,0xb7ad3));import a77_0x1363b2 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a77_0x4f06(_0x4bf596,_0x5d8c4d){_0x4bf596=_0x4bf596-0x197;const _0x1825bb=a77_0x1825();let _0x4f06d9=_0x1825bb[_0x4bf596];return _0x4f06d9;}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(_0x1ed3d0){const _0x271507=a77_0x4f06,_0x52ab2c=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x271507(0x1d8)](0x0,0xa)+')':VERSION,_0xc6d31=buildConfigFromFlags({}),_0x4f7a6d=getCookie();console[_0x271507(0x1b0)](),console[_0x271507(0x1b0)](a77_0x1363b2[_0x271507(0x1d6)](CLI_BIN_NAME+'\x20doctor')),console['log'](a77_0x1363b2[_0x271507(0x1cc)]('─'[_0x271507(0x1de)](0x32))),console[_0x271507(0x1b0)](_0x271507(0x1ee)+_0x52ab2c),console[_0x271507(0x1b0)](_0x271507(0x1a1)+process[_0x271507(0x1e3)]),console['log'](_0x271507(0x1c6)+process[_0x271507(0x1cd)]+'\x20'+process[_0x271507(0x1bf)]),console['log'](),console['log'](a77_0x1363b2[_0x271507(0x1d6)](_0x271507(0x1ae))),console[_0x271507(0x1b0)](a77_0x1363b2[_0x271507(0x1cc)](_0x271507(0x1e2)[_0x271507(0x1de)](0x1e)));const _0x499279=getGlobalConfigPath(),_0x32891f=getProjectConfigPath();console[_0x271507(0x1b0)](_0x271507(0x1e8)+(_0x499279||a77_0x1363b2[_0x271507(0x1cc)]('(not\x20found)'))),console[_0x271507(0x1b0)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x32891f||a77_0x1363b2[_0x271507(0x1cc)]('(not\x20found)'))),console['log'](),console[_0x271507(0x1b0)](a77_0x1363b2['bold'](_0x271507(0x1c4))),console[_0x271507(0x1b0)](a77_0x1363b2['gray'](_0x271507(0x1e2)['repeat'](0x1e)));const _0xadf284=(_0x61cbeb,_0x2753fc)=>{const _0x5ce7d0=_0x271507;if(!_0x2753fc){console[_0x5ce7d0(0x1b0)]('\x20\x20'+_0x61cbeb[_0x5ce7d0(0x1c5)](0x11)+'\x20'+a77_0x1363b2['gray'](_0x5ce7d0(0x197)));return;}const _0x152e17=inspectCliConfigJsonFile(_0x2753fc);if(_0x152e17[_0x5ce7d0(0x1a3)]==='ok')console[_0x5ce7d0(0x1b0)]('\x20\x20'+_0x61cbeb[_0x5ce7d0(0x1c5)](0x11)+'\x20'+a77_0x1363b2[_0x5ce7d0(0x1c7)](_0x5ce7d0(0x1a0)));else{if(_0x152e17[_0x5ce7d0(0x1a3)]==='empty')console[_0x5ce7d0(0x1b0)]('\x20\x20'+_0x61cbeb[_0x5ce7d0(0x1c5)](0x11)+'\x20'+a77_0x1363b2[_0x5ce7d0(0x1ca)](_0x5ce7d0(0x1cf)));else _0x152e17[_0x5ce7d0(0x1a3)]==='missing'?console[_0x5ce7d0(0x1b0)]('\x20\x20'+_0x61cbeb['padEnd'](0x11)+'\x20'+a77_0x1363b2[_0x5ce7d0(0x1cc)]('(missing)')):(console[_0x5ce7d0(0x1b0)]('\x20\x20'+_0x61cbeb[_0x5ce7d0(0x1c5)](0x11)+'\x20'+a77_0x1363b2[_0x5ce7d0(0x1b8)](_0x5ce7d0(0x1ce))),console[_0x5ce7d0(0x1b0)]('\x20\x20'+''[_0x5ce7d0(0x1c5)](0x11)+'\x20'+a77_0x1363b2[_0x5ce7d0(0x1b8)](_0x152e17[_0x5ce7d0(0x19c)])));}};_0xadf284(_0x271507(0x1aa),_0x499279),_0xadf284(_0x271507(0x1d2),_0x32891f),console[_0x271507(0x1b0)](),console[_0x271507(0x1b0)](a77_0x1363b2[_0x271507(0x1d6)]('\x20\x20Merged\x20Config')),console['log'](a77_0x1363b2[_0x271507(0x1cc)](_0x271507(0x1e2)['repeat'](0x1e))),console[_0x271507(0x1b0)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0xc6d31[_0x271507(0x1af)]||a77_0x1363b2[_0x271507(0x1b8)](_0x271507(0x19e)))),console[_0x271507(0x1b0)](_0x271507(0x1c8)+_0xc6d31[_0x271507(0x1d1)]),console[_0x271507(0x1b0)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xc6d31[_0x271507(0x1c1)]),console['log'](_0x271507(0x1b6)+_0xc6d31[_0x271507(0x1d9)]),console[_0x271507(0x1b0)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0xc6d31['defaultApp']||a77_0x1363b2[_0x271507(0x1cc)]('(none)'))),console[_0x271507(0x1b0)](_0x271507(0x1df)+(_0xc6d31[_0x271507(0x1dc)]||a77_0x1363b2[_0x271507(0x1cc)](_0x271507(0x1e6)))),console['log'](_0x271507(0x1d0)+(_0xc6d31[_0x271507(0x1bb)]||a77_0x1363b2[_0x271507(0x1cc)](_0x271507(0x1e6)))),console['log'](_0x271507(0x1a5)+(_0xc6d31['format']||a77_0x1363b2[_0x271507(0x1cc)](_0x271507(0x198)+DEFAULT_CONFIG_VALUES[_0x271507(0x1be)]+')'))),console[_0x271507(0x1b0)](_0x271507(0x1ed)+(_0xc6d31[_0x271507(0x1ab)]??a77_0x1363b2[_0x271507(0x1cc)]('(default)'))),console[_0x271507(0x1b0)](_0x271507(0x1a4)+_0xc6d31['riskLevel']),console[_0x271507(0x1b0)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xc6d31[_0x271507(0x1b7)]),console[_0x271507(0x1b0)](_0x271507(0x199)+(_0xc6d31[_0x271507(0x1b9)]?a77_0x1363b2[_0x271507(0x1c7)](_0x271507(0x1b5)+_0xc6d31[_0x271507(0x1b9)][_0x271507(0x1dd)]+')'):_0x4f7a6d?a77_0x1363b2[_0x271507(0x1c7)](_0x271507(0x1e7)+_0x4f7a6d[_0x271507(0x1dd)]+')'):a77_0x1363b2[_0x271507(0x1cc)](_0x271507(0x1e6))));const _0x44dbef=Object[_0x271507(0x1a2)](_0xc6d31['apps']);if(_0x44dbef[_0x271507(0x1dd)]>0x0){console[_0x271507(0x1b0)](),console[_0x271507(0x1b0)](a77_0x1363b2['bold'](_0x271507(0x1c2))),console[_0x271507(0x1b0)](a77_0x1363b2[_0x271507(0x1cc)](_0x271507(0x1e2)[_0x271507(0x1de)](0x1e)));for(const _0x11d381 of _0x44dbef){const _0x38163a=_0xc6d31[_0x271507(0x1ac)][_0x11d381],_0x4ec195=_0x11d381===_0xc6d31[_0x271507(0x19b)],_0x31eb85=_0x11d381===_0xc6d31[_0x271507(0x1dc)],_0x80635a=_0x31eb85?a77_0x1363b2[_0x271507(0x1c7)](_0x271507(0x1e5)):'',_0x4441c5=_0x4ec195?_0x271507(0x19d):'';console[_0x271507(0x1b0)]('\x20\x20'+_0x11d381+_0x4441c5+_0x80635a),console['log']('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x38163a[_0x271507(0x1d4)]);const _0x3f17cd=buildAppDoctorFields(_0x38163a,{'env':_0xc6d31[_0x271507(0x1d1)],'apiDir':_0xc6d31[_0x271507(0x1c0)]['apiDir']||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0xc6d31[_0x271507(0x1b9)]||_0x4f7a6d||undefined,'accessKey':_0xc6d31[_0x271507(0x1cb)]});console[_0x271507(0x1b0)](_0x271507(0x1e4)+_0x3f17cd[_0x271507(0x1d1)][_0x271507(0x1ec)]+'\x20\x20'+a77_0x1363b2['gray']('('+_0x3f17cd[_0x271507(0x1d1)][_0x271507(0x1c9)]+')')),console[_0x271507(0x1b0)]('\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20'+_0x3f17cd[_0x271507(0x1d9)]['value']+'\x20\x20'+a77_0x1363b2['gray']('('+_0x3f17cd[_0x271507(0x1d9)][_0x271507(0x1c9)]+')'));const _0x5a110b=_0x3f17cd[_0x271507(0x1b9)][_0x271507(0x1ec)]?a77_0x1363b2[_0x271507(0x1c7)](_0x271507(0x1b5)+_0x3f17cd[_0x271507(0x1b9)][_0x271507(0x1ec)][_0x271507(0x1dd)]+')'):a77_0x1363b2[_0x271507(0x1cc)](_0x271507(0x1e6));console[_0x271507(0x1b0)](_0x271507(0x1a9)+_0x5a110b+'\x20\x20'+a77_0x1363b2[_0x271507(0x1cc)]('('+_0x3f17cd[_0x271507(0x1b9)]['source']+')'));const _0x5180a5=_0x3f17cd[_0x271507(0x1cb)][_0x271507(0x1ec)]?a77_0x1363b2[_0x271507(0x1c7)](_0x271507(0x1b5)+_0x3f17cd['accessKey'][_0x271507(0x1ec)][_0x271507(0x1dd)]+')'):a77_0x1363b2[_0x271507(0x1cc)](_0x271507(0x1e6));console['log'](_0x271507(0x1b2)+_0x5180a5+'\x20\x20'+a77_0x1363b2[_0x271507(0x1cc)]('('+_0x3f17cd[_0x271507(0x1cb)][_0x271507(0x1c9)]+')'));}}console[_0x271507(0x1b0)](),console[_0x271507(0x1b0)](a77_0x1363b2['bold'](_0x271507(0x1a6))),console[_0x271507(0x1b0)](a77_0x1363b2['gray'](_0x271507(0x1e2)[_0x271507(0x1de)](0x1e))),console[_0x271507(0x1b0)](_0x271507(0x19a)+getApiDomain()),console[_0x271507(0x1b0)](_0x271507(0x1b3)+getUserDomain()),console[_0x271507(0x1b0)](_0x271507(0x19f)+getRuntimeDomain()),console['log'](),console[_0x271507(0x1b0)](a77_0x1363b2[_0x271507(0x1d6)](_0x271507(0x1eb))),console[_0x271507(0x1b0)](a77_0x1363b2[_0x271507(0x1cc)](_0x271507(0x1e2)[_0x271507(0x1de)](0x1e)));if(_0x4f7a6d){const _0xca5223=await getIsSessionValid();console[_0x271507(0x1b0)](_0x271507(0x1bd)+(_0xca5223?a77_0x1363b2['green'](_0x271507(0x1db)):a77_0x1363b2[_0x271507(0x1b8)](_0x271507(0x1ad))));}else console[_0x271507(0x1b0)](_0x271507(0x1bd)+a77_0x1363b2[_0x271507(0x1b8)]('✗\x20Not\x20logged\x20in'));return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a77_0x17c06a(0x1e9),'command':a77_0x17c06a(0x1d5),'description':a77_0x17c06a(0x1ea),'risk':a77_0x17c06a(0x1d3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
function a77_0x59b1(_0x46b1d8,_0x28038b){_0x46b1d8=_0x46b1d8-0x125;const _0x57c953=a77_0x57c9();let _0x59b13a=_0x57c953[_0x46b1d8];return _0x59b13a;}const a77_0x20438f=a77_0x59b1;(function(_0x49d41b,_0x144b7d){const _0x1f286f=a77_0x59b1,_0x432a7e=_0x49d41b();while(!![]){try{const _0x2a2bb0=-parseInt(_0x1f286f(0x16e))/0x1+-parseInt(_0x1f286f(0x12b))/0x2*(parseInt(_0x1f286f(0x166))/0x3)+-parseInt(_0x1f286f(0x175))/0x4+parseInt(_0x1f286f(0x131))/0x5+parseInt(_0x1f286f(0x138))/0x6*(parseInt(_0x1f286f(0x140))/0x7)+-parseInt(_0x1f286f(0x156))/0x8*(-parseInt(_0x1f286f(0x152))/0x9)+parseInt(_0x1f286f(0x14d))/0xa;if(_0x2a2bb0===_0x144b7d)break;else _0x432a7e['push'](_0x432a7e['shift']());}catch(_0x3dea4f){_0x432a7e['push'](_0x432a7e['shift']());}}}(a77_0x57c9,0x32503));import a77_0x1823b2 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(_0x1befd0){const _0x37d28e=a77_0x59b1,_0x4de722=GIT_COMMIT!==_0x37d28e(0x13d)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x37d28e(0x13e)](0x0,0xa)+')':VERSION,_0x43870c=buildConfigFromFlags({}),_0x5be00f=getCookie();console[_0x37d28e(0x15a)](),console['log'](a77_0x1823b2[_0x37d28e(0x15d)](CLI_BIN_NAME+_0x37d28e(0x139))),console[_0x37d28e(0x15a)](a77_0x1823b2[_0x37d28e(0x160)]('─'[_0x37d28e(0x13a)](0x32))),console[_0x37d28e(0x15a)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x4de722),console[_0x37d28e(0x15a)](_0x37d28e(0x174)+process[_0x37d28e(0x16f)]),console[_0x37d28e(0x15a)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x37d28e(0x161)]+'\x20'+process[_0x37d28e(0x145)]),console[_0x37d28e(0x15a)](),console[_0x37d28e(0x15a)](a77_0x1823b2[_0x37d28e(0x15d)](_0x37d28e(0x12e))),console[_0x37d28e(0x15a)](a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x167)['repeat'](0x1e)));const _0x4155da=getGlobalConfigPath(),_0x49248d=getProjectConfigPath();console[_0x37d28e(0x15a)](_0x37d28e(0x165)+(_0x4155da||a77_0x1823b2['gray'](_0x37d28e(0x132)))),console[_0x37d28e(0x15a)](_0x37d28e(0x158)+(_0x49248d||a77_0x1823b2['gray']('(not\x20found)'))),console['log'](),console['log'](a77_0x1823b2[_0x37d28e(0x15d)](_0x37d28e(0x128))),console[_0x37d28e(0x15a)](a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x167)[_0x37d28e(0x13a)](0x1e)));const _0x42871b=(_0x31297b,_0x181bb3)=>{const _0x5a22ed=_0x37d28e;if(!_0x181bb3){console[_0x5a22ed(0x15a)]('\x20\x20'+_0x31297b[_0x5a22ed(0x16d)](0x11)+'\x20'+a77_0x1823b2['gray'](_0x5a22ed(0x153)));return;}const _0x5d9f56=inspectCliConfigJsonFile(_0x181bb3);if(_0x5d9f56['status']==='ok')console[_0x5a22ed(0x15a)]('\x20\x20'+_0x31297b[_0x5a22ed(0x16d)](0x11)+'\x20'+a77_0x1823b2['green']('✓\x20Valid\x20JSON'));else{if(_0x5d9f56['status']===_0x5a22ed(0x133))console[_0x5a22ed(0x15a)]('\x20\x20'+_0x31297b['padEnd'](0x11)+'\x20'+a77_0x1823b2[_0x5a22ed(0x13c)](_0x5a22ed(0x154)));else _0x5d9f56[_0x5a22ed(0x149)]===_0x5a22ed(0x172)?console['log']('\x20\x20'+_0x31297b[_0x5a22ed(0x16d)](0x11)+'\x20'+a77_0x1823b2['gray'](_0x5a22ed(0x173))):(console[_0x5a22ed(0x15a)]('\x20\x20'+_0x31297b[_0x5a22ed(0x16d)](0x11)+'\x20'+a77_0x1823b2[_0x5a22ed(0x12a)](_0x5a22ed(0x127))),console[_0x5a22ed(0x15a)]('\x20\x20'+''[_0x5a22ed(0x16d)](0x11)+'\x20'+a77_0x1823b2[_0x5a22ed(0x12a)](_0x5d9f56['message'])));}};_0x42871b(_0x37d28e(0x170),_0x4155da),_0x42871b(_0x37d28e(0x125),_0x49248d),console[_0x37d28e(0x15a)](),console[_0x37d28e(0x15a)](a77_0x1823b2['bold'](_0x37d28e(0x13b))),console['log'](a77_0x1823b2[_0x37d28e(0x160)]('\x20\x20─'['repeat'](0x1e))),console[_0x37d28e(0x15a)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x43870c[_0x37d28e(0x144)]||a77_0x1823b2[_0x37d28e(0x12a)](_0x37d28e(0x12d)))),console['log'](_0x37d28e(0x126)+_0x43870c[_0x37d28e(0x148)]),console['log'](_0x37d28e(0x15b)+_0x43870c[_0x37d28e(0x141)]),console[_0x37d28e(0x15a)](_0x37d28e(0x14b)+_0x43870c[_0x37d28e(0x14c)]),console[_0x37d28e(0x15a)](_0x37d28e(0x129)+(_0x43870c['defaultApp']||a77_0x1823b2[_0x37d28e(0x160)]('(none)'))),console['log'](_0x37d28e(0x137)+(_0x43870c['currentApp']||a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x164)))),console[_0x37d28e(0x15a)]('\x20\x20explicitAppName:\x20'+(_0x43870c[_0x37d28e(0x151)]||a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x164)))),console[_0x37d28e(0x15a)](_0x37d28e(0x143)+(_0x43870c[_0x37d28e(0x155)]||a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x130)+DEFAULT_CONFIG_VALUES[_0x37d28e(0x155)]+')'))),console[_0x37d28e(0x15a)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x43870c['pageSize']??a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x162)))),console['log'](_0x37d28e(0x157)+_0x43870c['riskLevel']),console[_0x37d28e(0x15a)](_0x37d28e(0x163)+_0x43870c[_0x37d28e(0x168)]),console[_0x37d28e(0x15a)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x43870c['cookie']?a77_0x1823b2[_0x37d28e(0x16b)](_0x37d28e(0x12f)+_0x43870c[_0x37d28e(0x176)][_0x37d28e(0x14a)]+')'):_0x5be00f?a77_0x1823b2[_0x37d28e(0x16b)](_0x37d28e(0x12c)+_0x5be00f[_0x37d28e(0x14a)]+')'):a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x164))));const _0x5e3215=Object[_0x37d28e(0x16a)](_0x43870c[_0x37d28e(0x13f)]);if(_0x5e3215['length']>0x0){console[_0x37d28e(0x15a)](),console[_0x37d28e(0x15a)](a77_0x1823b2['bold']('\x20\x20Apps')),console[_0x37d28e(0x15a)](a77_0x1823b2['gray'](_0x37d28e(0x167)[_0x37d28e(0x13a)](0x1e)));for(const _0x11756a of _0x5e3215){const _0x465c1c=_0x43870c['apps'][_0x11756a],_0x2926a7=_0x11756a===_0x43870c['defaultApp'],_0xd56489=_0x11756a===_0x43870c[_0x37d28e(0x14e)],_0x5ba8f7=_0xd56489?a77_0x1823b2[_0x37d28e(0x16b)]('\x20←\x20current'):'',_0x218314=_0x2926a7?'\x20(default)':'';console[_0x37d28e(0x15a)]('\x20\x20'+_0x11756a+_0x218314+_0x5ba8f7),console[_0x37d28e(0x15a)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x465c1c[_0x37d28e(0x135)]);const _0x48044b=buildAppDoctorFields(_0x465c1c,{'env':_0x43870c['env'],'apiDir':_0x43870c[_0x37d28e(0x15f)][_0x37d28e(0x14c)]||DEFAULT_CONFIG_VALUES[_0x37d28e(0x14c)],'cookie':_0x43870c['cookie']||_0x5be00f||undefined,'accessKey':_0x43870c[_0x37d28e(0x16c)]});console['log'](_0x37d28e(0x147)+_0x48044b[_0x37d28e(0x148)][_0x37d28e(0x142)]+'\x20\x20'+a77_0x1823b2['gray']('('+_0x48044b[_0x37d28e(0x148)]['source']+')')),console[_0x37d28e(0x15a)]('\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20'+_0x48044b['apiDir'][_0x37d28e(0x142)]+'\x20\x20'+a77_0x1823b2['gray']('('+_0x48044b[_0x37d28e(0x14c)][_0x37d28e(0x15c)]+')'));const _0x69d03b=_0x48044b['cookie'][_0x37d28e(0x142)]?a77_0x1823b2[_0x37d28e(0x16b)](_0x37d28e(0x12f)+_0x48044b[_0x37d28e(0x176)][_0x37d28e(0x142)][_0x37d28e(0x14a)]+')'):a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x164));console[_0x37d28e(0x15a)]('\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'+_0x69d03b+'\x20\x20'+a77_0x1823b2[_0x37d28e(0x160)]('('+_0x48044b[_0x37d28e(0x176)][_0x37d28e(0x15c)]+')'));const _0x374677=_0x48044b[_0x37d28e(0x16c)][_0x37d28e(0x142)]?a77_0x1823b2['green']('(set,\x20length='+_0x48044b[_0x37d28e(0x16c)]['value']['length']+')'):a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x164));console[_0x37d28e(0x15a)](_0x37d28e(0x15e)+_0x374677+'\x20\x20'+a77_0x1823b2[_0x37d28e(0x160)]('('+_0x48044b[_0x37d28e(0x16c)][_0x37d28e(0x15c)]+')'));}}console[_0x37d28e(0x15a)](),console['log'](a77_0x1823b2[_0x37d28e(0x15d)]('\x20\x20API\x20Endpoints')),console[_0x37d28e(0x15a)](a77_0x1823b2[_0x37d28e(0x160)]('\x20\x20─'[_0x37d28e(0x13a)](0x1e))),console['log'](_0x37d28e(0x14f)+getApiDomain()),console[_0x37d28e(0x15a)](_0x37d28e(0x171)+getUserDomain()),console['log']('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console['log'](),console[_0x37d28e(0x15a)](a77_0x1823b2[_0x37d28e(0x15d)](_0x37d28e(0x136))),console['log'](a77_0x1823b2[_0x37d28e(0x160)]('\x20\x20─'[_0x37d28e(0x13a)](0x1e)));if(_0x5be00f){const _0x3fb4c7=await getIsSessionValid();console[_0x37d28e(0x15a)](_0x37d28e(0x150)+(_0x3fb4c7?a77_0x1823b2[_0x37d28e(0x16b)](_0x37d28e(0x134)):a77_0x1823b2['red'](_0x37d28e(0x146))));}else console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a77_0x1823b2[_0x37d28e(0x12a)]('✗\x20Not\x20logged\x20in'));return console[_0x37d28e(0x15a)](),{'ok':!![]};}export const doctorDefinition={'service':a77_0x20438f(0x169),'command':'check','description':a77_0x20438f(0x159),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};function a77_0x57c9(){const _0x17f406=['\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','red','32cptyOp','(set\x20via\x20file,\x20length=','(not\x20set)','\x20\x20Config\x20Files','(set,\x20length=','(default:\x20','1117490XDCydm','(not\x20found)','empty','✓\x20Valid','appcode','\x20\x20Auth','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','845454Cozjbp','\x20doctor','repeat','\x20\x20Merged\x20Config','yellow','unknown','slice','apps','7RHujRZ','locale','value','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','appCode','arch','✗\x20Expired','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','env','status','length','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','apiDir','1662730KZMweC','currentApp','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','explicitAppName','4707DTfGrT','(no\x20file)','⚠\x20Empty\x20(treated\x20as\x20{})','format','4024ReGOXa','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','log','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','source','bold','\x20\x20\x20\x20accessKey:\x20\x20','raw','gray','platform','(default)','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','22098HCRYNP','\x20\x20─','verbose','doctor','keys','green','accessKey','padEnd','368543sPWlFz','version','Global','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','missing','(missing)','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','405068IThDAs','cookie','Project','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid\x20JSON','\x20\x20Config\x20JSON'];a77_0x57c9=function(){return _0x17f406;};return a77_0x57c9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a78_0x1bdd(_0x57ffff,_0x38bdf1){_0x57ffff=_0x57ffff-0x11e;const _0x1d648e=a78_0x1d64();let _0x1bdd76=_0x1d648e[_0x57ffff];return _0x1bdd76;}const a78_0x537d03=a78_0x1bdd;(function(_0x474d83,_0x1a8cf9){const _0x4b25f2=a78_0x1bdd,_0x17cc8c=_0x474d83();while(!![]){try{const _0x230a50=parseInt(_0x4b25f2(0x12b))/0x1+parseInt(_0x4b25f2(0x144))/0x2*(-parseInt(_0x4b25f2(0x145))/0x3)+parseInt(_0x4b25f2(0x120))/0x4+-parseInt(_0x4b25f2(0x11f))/0x5+-parseInt(_0x4b25f2(0x12c))/0x6+-parseInt(_0x4b25f2(0x135))/0x7*(-parseInt(_0x4b25f2(0x13a))/0x8)+-parseInt(_0x4b25f2(0x140))/0x9;if(_0x230a50===_0x1a8cf9)break;else _0x17cc8c['push'](_0x17cc8c['shift']());}catch(_0x5d5442){_0x17cc8c['push'](_0x17cc8c['shift']());}}}(a78_0x1d64,0x484e3));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a78_0x1d64(){const _0x359ca0=['374625vUwRCY','1251414FxcVTN','Use\x20`','appcode','../../commands/project/init.js','log','\x20\x20Default:\x20','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','production','Write\x20to\x20global\x20config\x20instead\x20of\x20project','1844367HaVjJK','boolean','global','检测到旧配置文件,正在自动升级...\x0a','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','8qSwfvh','bool','appCode','map','nonInteractive','flagMissing','1496844qsESVl','\x0a✓\x20Successfully\x20initialized\x20','Auto-confirm\x20prompts','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','119182EbYNTI','6RdwfLl','Usage:\x20','Target\x20environment','custom','\x20\x20Apps:\x20','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','project','validation','App\x20code\x20to\x20initialize\x20with','join','run','637785ecubrR','1118724ZHlREJ','yes','defaultApp','string','message','env','init','str','\x20config','cwd','some'];a78_0x1d64=function(){return _0x359ca0;};return a78_0x1d64();}import{getCliVersion}from'../../utils/version.js';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(_0x1d14be){return{'appCode':_0x1d14be,'appName':_0x1d14be};}function writeInitConfig(_0x2f31fd,_0x467cfe,_0x44d46f){const _0x48355f=a78_0x1bdd,_0x25875d=resolveWriteConfigPath(_0x2f31fd),_0x5d68de=buildCanonicalProjectConfig({},{'appCodes':_0x467cfe['map'](_0x5a4853=>_0x5a4853[_0x48355f(0x13c)]),'env':_0x44d46f,'metadata':{'version':getCliVersion(),'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x25875d,_0x5d68de);const _0x46751a=_0x2f31fd===_0x48355f(0x137)?'global':'project';console[_0x48355f(0x130)](_0x48355f(0x141)+_0x46751a+_0x48355f(0x128)),console[_0x48355f(0x130)](_0x48355f(0x149)+_0x467cfe[_0x48355f(0x13d)](_0x1f7b23=>_0x1f7b23[_0x48355f(0x13c)])[_0x48355f(0x14e)](',\x20')),console[_0x48355f(0x130)](_0x48355f(0x131)+_0x5d68de[_0x48355f(0x122)]),console[_0x48355f(0x130)]('\x20\x20Env:\x20'+_0x5d68de['env']),console[_0x48355f(0x130)]('\x20\x20Config:\x20'+_0x25875d);}async function runSmartInit(_0x17d5f9){const _0x11c2e4=a78_0x1bdd,_0x54028c=process[_0x11c2e4(0x129)](),_0x29d5bc=_0x17d5f9['bool'](_0x11c2e4(0x137))?_0x11c2e4(0x137):'project',_0x1e94e0=_0x17d5f9[_0x11c2e4(0x127)](_0x11c2e4(0x125))||_0x11c2e4(0x133),_0x53fad9=_0x17d5f9[_0x11c2e4(0x127)](_0x11c2e4(0x12e))||undefined,_0xa0483=_0x17d5f9[_0x11c2e4(0x13b)](_0x11c2e4(0x14b));if(_0xa0483){const {initConfig:_0x589330}=await import(_0x11c2e4(0x12f));return _0x589330({'appcode':_0x53fad9,'env':_0x1e94e0,'autoYes':_0x17d5f9[_0x11c2e4(0x13b)](_0x11c2e4(0x121))});}if(_0x29d5bc===_0x11c2e4(0x14b)){const _0x4b7bb9=existsSync(resolve(_0x54028c,NEW_CONFIG_NAME)),_0x91914b=LEGACY_CONFIG_NAMES[_0x11c2e4(0x12a)](_0x5c6c18=>existsSync(resolve(_0x54028c,_0x5c6c18)));if(_0x91914b&&!_0x4b7bb9)return console[_0x11c2e4(0x130)](_0x11c2e4(0x138)),upgradeApp(_0x17d5f9[_0x11c2e4(0x13e)],{'yes':_0x17d5f9[_0x11c2e4(0x13b)]('yes')});if(_0x4b7bb9)throw CliErrors[_0x11c2e4(0x14c)](_0x11c2e4(0x132),_0x11c2e4(0x12d)+CLI_BIN_NAME+'\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.');}if(_0x53fad9){const _0x5c8d39=validateAppcode(_0x53fad9);if(!_0x5c8d39['valid'])throw CliErrors[_0x11c2e4(0x14c)](_0x5c8d39[_0x11c2e4(0x124)]);writeInitConfig(_0x29d5bc,[syntheticApp(_0x53fad9)],_0x1e94e0);return;}if(_0x17d5f9[_0x11c2e4(0x13e)])throw CliErrors[_0x11c2e4(0x13f)](_0x11c2e4(0x12e),_0x11c2e4(0x146)+CLI_BIN_NAME+_0x11c2e4(0x143));const _0x3aa334=getCookie(),_0xc0812d=await selectMultipleApps(_0x3aa334),_0x275b5c=_0xc0812d===_0x11c2e4(0x148)?[syntheticApp(await promptCustomAppcode())]:_0xc0812d;writeInitConfig(_0x29d5bc,_0x275b5c,_0x1e94e0);}const initFlags=[{'name':a78_0x537d03(0x137),'type':a78_0x537d03(0x136),'description':a78_0x537d03(0x134),'default':![]},{'name':a78_0x537d03(0x125),'type':'string','description':a78_0x537d03(0x147),'default':'production','enum':[...RABETBASE_ENV_VALUES]},{'name':a78_0x537d03(0x12e),'type':a78_0x537d03(0x123),'description':a78_0x537d03(0x14d)},{'name':'project','type':a78_0x537d03(0x136),'description':a78_0x537d03(0x14a),'default':![]},{'name':'yes','type':a78_0x537d03(0x136),'description':a78_0x537d03(0x142),'default':![]}];export const initDefinitions=[{'service':a78_0x537d03(0x126),'command':a78_0x537d03(0x11e),'description':a78_0x537d03(0x139),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x4bd3ce){return await runSmartInit(_0x4bd3ce),{'ok':!![]};}}];
|