@lovrabet/rabetbase-cli 2.2.3-beta.2 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/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_0x520cfd=a62_0x594f;(function(_0x162be7,_0x30ae61){const _0x1b3d53=a62_0x594f,_0x1f9038=_0x162be7();while(!![]){try{const _0x48ce2d=-parseInt(_0x1b3d53(0x14b))/0x1*(-parseInt(_0x1b3d53(0x141))/0x2)+parseInt(_0x1b3d53(0x159))/0x3+-parseInt(_0x1b3d53(0x11b))/0x4*(parseInt(_0x1b3d53(0x15b))/0x5)+parseInt(_0x1b3d53(0x142))/0x6+-parseInt(_0x1b3d53(0x122))/0x7*(-parseInt(_0x1b3d53(0x156))/0x8)+parseInt(_0x1b3d53(0x130))/0x9+parseInt(_0x1b3d53(0x112))/0xa*(-parseInt(_0x1b3d53(0x132))/0xb);if(_0x48ce2d===_0x30ae61)break;else _0x1f9038['push'](_0x1f9038['shift']());}catch(_0x32c28c){_0x1f9038['push'](_0x1f9038['shift']());}}}(a62_0x12df,0xe8e5f));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_0x520cfd(0x121),a62_0x520cfd(0x155)],DEFAULT_DO_VERSION='v2';export const DATASET_RELATIONS_PROTOCOL='dataset-relations.v1';export const datasetRelations={'service':a62_0x520cfd(0x154),'command':a62_0x520cfd(0x14c),'description':a62_0x520cfd(0x14a)+a62_0x520cfd(0x15a),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a62_0x520cfd(0x11d),'type':a62_0x520cfd(0x10f),'required':![],'enum':[...SOURCE_TYPES],'description':a62_0x520cfd(0x149)},{'name':a62_0x520cfd(0x153),'type':a62_0x520cfd(0x10f),'required':![],'enum':[...SOURCE_TYPES],'description':a62_0x520cfd(0x12a)},{'name':'do-version','type':a62_0x520cfd(0x10f),'required':![],'enum':['v1','v2'],'description':a62_0x520cfd(0x111)}],async 'validate'(_0x567c9f){const _0x2b0f63=a62_0x520cfd;readSourceFilter(_0x567c9f['str'](_0x2b0f63(0x11d)),_0x2b0f63(0x15c)),readSourceFilter(_0x567c9f[_0x2b0f63(0x14d)](_0x2b0f63(0x153)),_0x2b0f63(0x13b)),rejectUnsupportedDirection(readSourceFilter(_0x567c9f[_0x2b0f63(0x14d)]('from-source'),_0x2b0f63(0x15c)),readSourceFilter(_0x567c9f[_0x2b0f63(0x14d)](_0x2b0f63(0x153)),_0x2b0f63(0x13b)));},async 'execute'(_0x13b9df){const _0xfd3fc=a62_0x520cfd,_0x2a34ba=trim(_0x13b9df[_0xfd3fc(0x14d)](_0xfd3fc(0x128))),_0xd83a71=readSourceFilter(_0x13b9df[_0xfd3fc(0x14d)]('from-source'),'--from-source'),_0x114b50=readSourceFilter(_0x13b9df[_0xfd3fc(0x14d)](_0xfd3fc(0x153)),'--to-source'),_0x1315d2=trim(_0x13b9df[_0xfd3fc(0x14d)](_0xfd3fc(0x14f))||DEFAULT_DO_VERSION)[_0xfd3fc(0x152)]();rejectUnsupportedDirection(_0xd83a71,_0x114b50);const _0x109ea1=await listDatasets(_0x13b9df[_0xfd3fc(0x138)],{..._0x2a34ba?{'code':_0x2a34ba}:{}}),_0x362969=new Map();for(const _0x3ef8b5 of _0x109ea1){const _0x374460=datasetCodeOf(_0x3ef8b5);if(_0x374460)_0x362969[_0xfd3fc(0x150)](_0x374460,_0x3ef8b5);}const _0x4728bf=_0x2a34ba?[toDatasetInfo(await getDatasetDetail(_0x2a34ba),_0x362969['get'](_0x2a34ba))]:await Promise[_0xfd3fc(0x143)](_0x109ea1['map'](async _0x4e4479=>toDatasetInfo(await getDatasetDetail(datasetCodeOf(_0x4e4479)),_0x4e4479))),_0x258f09=_0x4728bf[_0xfd3fc(0x145)](_0x4b9ac4=>{const _0x54b21c=_0xfd3fc;if(_0x1315d2&&normalizeDoVersion(_0x4b9ac4[_0x54b21c(0x144)])!==_0x1315d2)return![];return!![];}),_0x267c57=new Map(_0x258f09[_0xfd3fc(0x137)](_0x180361=>[_0x180361[_0xfd3fc(0x117)],_0x180361])),_0x5c8dbc=_0x258f09[_0xfd3fc(0x11a)](_0xeaa193=>{const _0x138607=_0xfd3fc,_0x684ff8=Array[_0x138607(0x140)](_0xeaa193[_0x138607(0x13e)][_0x138607(0x14c)])?_0xeaa193['detail'][_0x138607(0x14c)]:[];return _0x684ff8[_0x138607(0x11a)](_0x1eba75=>{const _0x25bf70=_0x138607,_0xbb6e7=trim(_0x1eba75[_0x25bf70(0x14e)]??_0x1eba75[_0x25bf70(0x12f)]??_0x1eba75[_0x25bf70(0x127)]),_0x34da2d=trim(_0x1eba75[_0x25bf70(0x123)]??_0x1eba75[_0x25bf70(0x120)]??_0x1eba75[_0x25bf70(0x110)]??_0x1eba75[_0x25bf70(0x13f)]),_0x9fa23f=trim(_0x1eba75[_0x25bf70(0x133)]??_0x1eba75['toColumn']??_0x1eba75[_0x25bf70(0x114)]);if(!_0xbb6e7||!_0x34da2d||!_0x9fa23f)return[];const _0x1a6e94=_0x267c57[_0x25bf70(0x148)](_0x34da2d)??(_0x362969['has'](_0x34da2d)?toDatasetInfo(_0x362969['get'](_0x34da2d)??{},_0x362969[_0x25bf70(0x148)](_0x34da2d)):undefined),_0x536bf3=_0x1a6e94?.[_0x25bf70(0x135)]??sourceOf(_0x1eba75[_0x25bf70(0x13a)]??_0x1eba75[_0x25bf70(0x158)]??_0x1eba75[_0x25bf70(0x136)],_0x1eba75[_0x25bf70(0x139)]);if(_0xeaa193[_0x25bf70(0x135)]===_0x25bf70(0x155)&&_0x536bf3===_0x25bf70(0x121))return[];if(_0xd83a71&&_0xeaa193[_0x25bf70(0x135)]!==_0xd83a71)return[];if(_0x114b50&&_0x536bf3!==_0x114b50)return[];const _0x22bc04=readRelationLabelField(_0x1eba75),_0x186ca1=normalizeCardinality(_0x1eba75[_0x25bf70(0x119)]??_0x1eba75[_0x25bf70(0x157)]);return[{'from':{'source':_0xeaa193[_0x25bf70(0x135)],'datasetCode':_0xeaa193[_0x25bf70(0x117)],..._0xeaa193['name']?{'datasetName':_0xeaa193[_0x25bf70(0x113)]}:{},..._0xeaa193[_0x25bf70(0x12e)]?{'table':_0xeaa193[_0x25bf70(0x12e)]}:{},'field':_0xbb6e7},'to':{'source':_0x536bf3,'datasetCode':_0x34da2d,'datasetName':_0x1a6e94?.[_0x25bf70(0x113)]??trim(_0x1eba75[_0x25bf70(0x131)]),..._0x1a6e94?.[_0x25bf70(0x12e)]?{'table':_0x1a6e94[_0x25bf70(0x12e)]}:{},'field':_0x9fa23f,..._0x22bc04?{'labelField':_0x22bc04}:{}},..._0x186ca1?{'relation':{'cardinality':_0x186ca1}}:{}}];});});return{'ok':!![],'data':{'protocol':DATASET_RELATIONS_PROTOCOL,'appCode':_0x13b9df[_0xfd3fc(0x138)],'total':_0x5c8dbc[_0xfd3fc(0x147)],'relations':_0x5c8dbc},'message':_0xfd3fc(0x12c)+_0x5c8dbc[_0xfd3fc(0x147)]+_0xfd3fc(0x12d)};}};function toDatasetInfo(_0x4f4a7f,_0x5ae370){const _0x532c3e=a62_0x520cfd,_0x14536a=_0x4f4a7f[_0x532c3e(0x154)]??{},_0x14429a=_0x4f4a7f['dbtableConfig']??_0x5ae370?.[_0x532c3e(0x118)]??{},_0x39ae1d=datasetCodeOf(_0x4f4a7f)||datasetCodeOf(_0x5ae370??{});return{'code':_0x39ae1d,'name':_0x4f4a7f[_0x532c3e(0x113)]??_0x14536a['datasetName']??_0x5ae370?.[_0x532c3e(0x113)],'source':sourceOf(_0x4f4a7f[_0x532c3e(0x135)]??_0x14536a[_0x532c3e(0x136)]??_0x5ae370?.[_0x532c3e(0x135)],_0x14429a[_0x532c3e(0x13d)]),'table':_0x14429a[_0x532c3e(0x13d)]??_0x14536a[_0x532c3e(0x13d)],'doVersion':_0x4f4a7f[_0x532c3e(0x144)]??_0x14536a['doVersion']??_0x5ae370?.[_0x532c3e(0x144)],'detail':_0x4f4a7f};}function datasetCodeOf(_0x2d4f63){const _0x2a157c=a62_0x520cfd;return trim(_0x2d4f63[_0x2a157c(0x151)]??_0x2d4f63[_0x2a157c(0x117)]??_0x2d4f63[_0x2a157c(0x12b)]);}function sourceOf(_0x2373dd,_0x2e624a){const _0x44d517=a62_0x520cfd,_0x45b2bb=trim(_0x2373dd)[_0x44d517(0x129)]();if(_0x45b2bb===_0x44d517(0x121)||_0x45b2bb===_0x44d517(0x155))return _0x45b2bb;return _0x2e624a?_0x44d517(0x121):'METADATA';}function readSourceFilter(_0x3ad092,_0x39734f){const _0x34b80c=a62_0x520cfd,_0x5d73fa=trim(_0x3ad092)[_0x34b80c(0x129)]();if(!_0x5d73fa)return undefined;if(_0x5d73fa===_0x34b80c(0x121)||_0x5d73fa==='METADATA')return _0x5d73fa;throw CliErrors[_0x34b80c(0x126)](_0x34b80c(0x115)+_0x39734f+':\x20'+_0x3ad092,_0x34b80c(0x134));}function a62_0x12df(){const _0x5c25d0=['toSourceType','--to-source','refTableLabelName','tableName','detail','targetDatasetCode','isArray','6542npIjgt','1102086GInZrQ','all','doVersion','filter','trim','length','get','Filter\x20source\x20dataset\x20type:\x20DB_TABLE\x20or\x20METADATA','List\x20V2\x20dataset\x20relation\x20facts\x20using\x20datasetCode\x20+\x20field\x20as\x20the\x20primary\x20locator.\x20','425SRlTMb','relations','str','fromField','do-version','set','modelCode','toLowerCase','to-source','dataset','METADATA','8JKgRed','cardinality','toSource','315477IGrOlk','Supports\x20DB_TABLE\x20->\x20DB_TABLE,\x20DB_TABLE\x20->\x20METADATA,\x20and\x20METADATA\x20->\x20METADATA.','15QxEnPK','--from-source','string','toDataset','Legacy\x20troubleshooting\x20filter\x20for\x20dataset\x20version;\x20defaults\x20to\x20v2','2972380FEVRHl','name','targetField','Invalid\x20','MANY_TO_MANY','code','dbtableConfig','joinType','flatMap','1353204RrxGGO','toFieldLabel','from-source','METADATA\x20to\x20DB_TABLE\x20dataset\x20relation\x20is\x20not\x20supported','labelField','toCode','DB_TABLE','2327374SFjmui','toDatasetCode','ONE_TO_MANY','MANY_TO_ONE','validation','field','datasetcode','toUpperCase','Filter\x20target\x20dataset\x20type:\x20DB_TABLE\x20or\x20METADATA','datasetCode','Dataset\x20relations:\x20','\x20relation(s)','table','fromColumn','2291355WhMtDd','toDatasetName','11Ohoxcv','toField','Allowed\x20values:\x20DB_TABLE,\x20METADATA.','source','sourceType','map','appCode','toTableName'];a62_0x12df=function(){return _0x5c25d0;};return a62_0x12df();}function rejectUnsupportedDirection(_0x1391ca,_0x21231e){const _0x4de566=a62_0x520cfd;if(_0x1391ca===_0x4de566(0x155)&&_0x21231e===_0x4de566(0x121))throw CliErrors[_0x4de566(0x126)](_0x4de566(0x11e));}function normalizeDoVersion(_0x2b4b64){const _0x151c4a=a62_0x520cfd;return trim(_0x2b4b64)[_0x151c4a(0x152)]();}function a62_0x594f(_0x199bfa,_0x5a61c2){_0x199bfa=_0x199bfa-0x10f;const _0x12df83=a62_0x12df();let _0x594f79=_0x12df83[_0x199bfa];return _0x594f79;}function normalizeCardinality(_0x89eb62){const _0x5da4ff=a62_0x520cfd,_0x34d414=trim(_0x89eb62)[_0x5da4ff(0x129)]();if(!_0x34d414)return undefined;return['ONE_TO_ONE',_0x5da4ff(0x124),_0x5da4ff(0x125),_0x5da4ff(0x116)]['includes'](_0x34d414)?_0x34d414:undefined;}function readRelationLabelField(_0x1009f8){const _0x5d7c9f=a62_0x520cfd;return trim(_0x1009f8[_0x5d7c9f(0x11c)]??_0x1009f8[_0x5d7c9f(0x13c)]??_0x1009f8[_0x5d7c9f(0x11f)]);}function trim(_0x5d59f8){const _0x26bfcb=a62_0x520cfd;return typeof _0x5d59f8===_0x26bfcb(0x10f)?_0x5d59f8[_0x26bfcb(0x146)]():'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x277006=a63_0x4274;(function(_0x2d3bd3,_0x97dfbf){const _0x32ea33=a63_0x4274,_0x5b2e3c=_0x2d3bd3();while(!![]){try{const _0x2d8280=-parseInt(_0x32ea33(0x196))/0x1+-parseInt(_0x32ea33(0x1a2))/0x2+-parseInt(_0x32ea33(0x193))/0x3*(parseInt(_0x32ea33(0x1a3))/0x4)+parseInt(_0x32ea33(0x1ba))/0x5*(parseInt(_0x32ea33(0x1a1))/0x6)+-parseInt(_0x32ea33(0x1b0))/0x7+parseInt(_0x32ea33(0x199))/0x8*(-parseInt(_0x32ea33(0x19f))/0x9)+parseInt(_0x32ea33(0x19d))/0xa;if(_0x2d8280===_0x97dfbf)break;else _0x5b2e3c['push'](_0x5b2e3c['shift']());}catch(_0x40b261){_0x5b2e3c['push'](_0x5b2e3c['shift']());}}}(a63_0x2cd4,0xd740e));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a63_0x4274(_0x277668,_0x5d1ed1){_0x277668=_0x277668-0x190;const _0x2cd4e9=a63_0x2cd4();let _0x4274ad=_0x2cd4e9[_0x277668];return _0x4274ad;}import{CliErrors}from'../../errors.js';export async function buildDatasetRenameResult({input:_0x5862b4,dryRun:_0x5087a6}){const _0x105be5=a63_0x4274;validateInput(_0x5862b4);const _0x19dad2=await getDatasetDetail(_0x5862b4['code']),_0x422acd=resolveCurrentName(_0x19dad2);if(_0x422acd!==_0x5862b4[_0x105be5(0x1be)])throw CliErrors[_0x105be5(0x19c)](_0x105be5(0x191),_0x105be5(0x1ad)+JSON[_0x105be5(0x1b6)](_0x5862b4['expectName'])+_0x105be5(0x1a0)+JSON[_0x105be5(0x1b6)](_0x422acd));const _0x201f48=buildRenameRequest(_0x19dad2,_0x5862b4),_0xdeaa6b=_0x422acd!==_0x5862b4[_0x105be5(0x194)];let _0x1ae65a;return _0xdeaa6b&&!_0x5087a6&&(_0x1ae65a=await updateDrivenData(_0x201f48)),{'ok':!![],'data':{'protocol':_0x105be5(0x1b4),'dataset':{'id':_0x201f48['modelId'],'code':_0x201f48[_0x105be5(0x1b2)]},'dryRun':_0x5087a6,'changed':_0xdeaa6b,'before':{'name':_0x422acd},'after':{'name':_0x5862b4[_0x105be5(0x194)]},'request':_0x201f48,'submitted':_0xdeaa6b&&!_0x5087a6,..._0x1ae65a!==undefined?{'version':_0x1ae65a}:{}},'message':_0xdeaa6b?_0x5087a6?_0x105be5(0x19b)+_0x201f48[_0x105be5(0x1b2)]+_0x105be5(0x1a7)+_0x5862b4[_0x105be5(0x194)]:_0x105be5(0x1b9)+_0x201f48[_0x105be5(0x1b2)]+_0x105be5(0x19e)+_0x5862b4[_0x105be5(0x194)]:_0x105be5(0x1b1)+_0x201f48[_0x105be5(0x1b2)]};}export const datasetRename={'service':a63_0x277006(0x1bb),'command':a63_0x277006(0x1b7),'description':a63_0x277006(0x197),'risk':a63_0x277006(0x1a9),'flags':[CODE_FLAG,{'name':a63_0x277006(0x194),'type':a63_0x277006(0x1ae),'required':!![],'description':a63_0x277006(0x1aa)},{'name':a63_0x277006(0x1af),'type':a63_0x277006(0x1ae),'required':!![],'description':'Expected\x20current\x20dataset\x20display\x20name;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x743ddb){validateInput(readDatasetRenameInput(_0x743ddb));},async 'dryRun'(_0x51542c){const _0x49060f=a63_0x277006,_0x7dbeb1=await buildDatasetRenameResult({'input':readDatasetRenameInput(_0x51542c),'dryRun':!![]});return{'method':_0x49060f(0x1bd),'url':_0x49060f(0x195),'body':_0x7dbeb1[_0x49060f(0x1a5)][_0x49060f(0x1a4)],'description':_0x7dbeb1[_0x49060f(0x1b8)]};},async 'execute'(_0x1c1f30){return buildDatasetRenameResult({'input':readDatasetRenameInput(_0x1c1f30),'dryRun':![]});}};function readDatasetRenameInput(_0x22df79){const _0x4aa063=a63_0x277006;return{'code':trim(_0x22df79['str']('code')),'name':trim(_0x22df79['str'](_0x4aa063(0x194))),'expectName':trim(_0x22df79['str']('expect-name'))};}function validateInput(_0x42e2e7){const _0x32fd05=a63_0x277006;if(!_0x42e2e7[_0x32fd05(0x1b5)])throw CliErrors[_0x32fd05(0x19c)](_0x32fd05(0x190));if(!_0x42e2e7['name'])throw CliErrors['validation'](_0x32fd05(0x19a));if(!_0x42e2e7['expectName'])throw CliErrors[_0x32fd05(0x19c)](_0x32fd05(0x1ab));}function resolveCurrentName(_0x35aeb7){const _0x51d8e9=a63_0x277006;return String(_0x35aeb7[_0x51d8e9(0x1bb)]?.[_0x51d8e9(0x1a6)]??_0x35aeb7[_0x51d8e9(0x194)]??'')['trim']();}function a63_0x2cd4(){const _0xe67b00=['datasetCode','1752ogmFtl','--name\x20is\x20required','Dry-run:\x20dataset\x20','validation','52298760EEpvyi','\x20to\x20','13491PgFxYw',',\x20actual\x20','716748hrWYtF','391368qNDeSK','305440yXPjgb','request','data','datasetName','\x20would\x20be\x20renamed\x20to\x20','modelId','write','New\x20dataset\x20display\x20name','--expect-name\x20is\x20required','isArray','Expected\x20','string','expect-name','10682112dYVpfK','No\x20changes\x20for\x20dataset\x20','modelCode','Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20id','dataset-rename.v1','code','stringify','rename','message','Renamed\x20dataset\x20','10kpebCl','dataset','trim','POST','expectName','--code\x20is\x20required','Expectation\x20mismatch\x20at\x20dataset.name','datasetId','48fHnNzz','name','/smartapi/dataset/update-driven-data','1315373MexArU','Rename\x20dataset\x20display\x20name\x20safely'];a63_0x2cd4=function(){return _0xe67b00;};return a63_0x2cd4();}function buildRenameRequest(_0x472ee3,_0x2a11f8){const _0x4cab4b=a63_0x277006,_0x1df732=isPlainObject(_0x472ee3['dataset'])?_0x472ee3['dataset']:{},_0x54173b=_0x472ee3[_0x4cab4b(0x1a8)]??_0x472ee3['id']??_0x1df732[_0x4cab4b(0x192)];if(_0x54173b===undefined||_0x54173b===null||_0x54173b==='')throw CliErrors['validation'](_0x4cab4b(0x1b3));const _0x3541dd=String(_0x472ee3[_0x4cab4b(0x1b2)]??_0x472ee3['code']??_0x1df732[_0x4cab4b(0x198)]??_0x2a11f8[_0x4cab4b(0x1b5)])[_0x4cab4b(0x1bc)]();if(!_0x3541dd)throw CliErrors['validation']('Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20code');return{'modelId':_0x54173b,'modelCode':_0x3541dd,'name':_0x2a11f8[_0x4cab4b(0x194)],'dataset':{'datasetId':_0x54173b,'datasetCode':_0x3541dd,'datasetName':_0x2a11f8[_0x4cab4b(0x194)]}};}function isPlainObject(_0x56f725){const _0x38841b=a63_0x277006;return Boolean(_0x56f725)&&typeof _0x56f725==='object'&&!Array[_0x38841b(0x1ac)](_0x56f725);}function trim(_0x4f525a){const _0x3fa9b2=a63_0x277006;return String(_0x4f525a||'')[_0x3fa9b2(0x1bc)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a64_0x4eeb(_0x4deef5,_0x317ee3){_0x4deef5=_0x4deef5-0x151;const _0x347929=a64_0x3479();let _0x4eebb4=_0x347929[_0x4deef5];return _0x4eebb4;}function a64_0x3479(){const _0x5aec26=['28OQJEjx','861666TpFKWX','12TJPJmx','58176JGZtSc','validation','write','Analysis\x20plan\x20/\x20trace\x20id\x20(optional\x20—\x20defaults\x20to\x20latest\x20trace\x20from\x20db\x20list/detail)','126xnJVjy','182cKHjeM','plan','latestAnalysisTraceId','analyze-cancel','18088004HXmJPB','337700sFvRhB','No\x20latestAnalysisTraceId\x20on\x20this\x20link.\x20Pass\x20--plan\x20<traceId>\x20from\x20db\x20list/detail.','string','str','2804AcMrVu','594852mxcCiM','Cancel\x20a\x20running\x20schema\x20analysis.\x20Omit\x20--plan\x20to\x20use\x20latestAnalysisTraceId\x20from\x20the\x20link','Cancel\x20requested\x20for\x20plan\x20','1611200bqrYAy'];a64_0x3479=function(){return _0x5aec26;};return a64_0x3479();}const a64_0x2bd33c=a64_0x4eeb;(function(_0x58e353,_0x38c69b){const _0x510cd5=a64_0x4eeb,_0x27b45d=_0x58e353();while(!![]){try{const _0x341517=-parseInt(_0x510cd5(0x154))/0x1*(-parseInt(_0x510cd5(0x15d))/0x2)+-parseInt(_0x510cd5(0x164))/0x3*(-parseInt(_0x510cd5(0x15e))/0x4)+parseInt(_0x510cd5(0x161))/0x5+parseInt(_0x510cd5(0x163))/0x6*(parseInt(_0x510cd5(0x162))/0x7)+parseInt(_0x510cd5(0x165))/0x8+-parseInt(_0x510cd5(0x153))/0x9*(-parseInt(_0x510cd5(0x159))/0xa)+-parseInt(_0x510cd5(0x158))/0xb;if(_0x341517===_0x38c69b)break;else _0x27b45d['push'](_0x27b45d['shift']());}catch(_0x4bf219){_0x27b45d['push'](_0x27b45d['shift']());}}}(a64_0x3479,0x8e2f4));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_0x2bd33c(0x157),'description':a64_0x2bd33c(0x15f),'risk':a64_0x2bd33c(0x151),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a64_0x2bd33c(0x155),'type':a64_0x2bd33c(0x15b),'description':a64_0x2bd33c(0x152)}],async 'execute'(_0x54243b){const _0x2e743a=a64_0x2bd33c,_0x19f7ba=_0x54243b['num']('id');let _0x4544ae=_0x54243b[_0x2e743a(0x15c)](_0x2e743a(0x155))||undefined;if(!_0x4544ae){const _0x1d5d3f=await getDbLinkInfo(_0x19f7ba);_0x4544ae=_0x1d5d3f[_0x2e743a(0x156)]??undefined;if(!_0x4544ae)throw CliErrors[_0x2e743a(0x166)](_0x2e743a(0x15a),'Analysis\x20may\x20already\x20be\x20finished\x20or\x20never\x20started.');}return await cancelDbAnalysis(_0x4544ae),{'ok':!![],'data':{'dbLinkId':_0x19f7ba,'planId':_0x4544ae},'message':_0x2e743a(0x160)+_0x4544ae};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a65_0x374f45=a65_0x4f4c;(function(_0x361de8,_0x30c6fc){const _0x14e1e5=a65_0x4f4c,_0x3c4dca=_0x361de8();while(!![]){try{const _0x265783=parseInt(_0x14e1e5(0x1c3))/0x1*(-parseInt(_0x14e1e5(0x1c6))/0x2)+parseInt(_0x14e1e5(0x1cc))/0x3*(parseInt(_0x14e1e5(0x1ca))/0x4)+-parseInt(_0x14e1e5(0x1ba))/0x5*(-parseInt(_0x14e1e5(0x1c1))/0x6)+parseInt(_0x14e1e5(0x1c2))/0x7+parseInt(_0x14e1e5(0x1c4))/0x8*(parseInt(_0x14e1e5(0x1bb))/0x9)+-parseInt(_0x14e1e5(0x1c7))/0xa*(parseInt(_0x14e1e5(0x1cd))/0xb)+parseInt(_0x14e1e5(0x1cb))/0xc*(-parseInt(_0x14e1e5(0x1c0))/0xd);if(_0x265783===_0x30c6fc)break;else _0x3c4dca['push'](_0x3c4dca['shift']());}catch(_0x228fb7){_0x3c4dca['push'](_0x3c4dca['shift']());}}}(a65_0x441d,0x22d5d));import{startDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';export const dbAnalyzeStart={'service':'db','command':a65_0x374f45(0x1c5),'description':'Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','risk':a65_0x374f45(0x1cf),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a65_0x374f45(0x1c8),'type':a65_0x374f45(0x1d3),'description':a65_0x374f45(0x1be)}],async 'execute'(_0xb5c283){const _0x2ad6ae=a65_0x374f45,_0x5171e1=_0xb5c283[_0x2ad6ae(0x1ce)]('id'),_0x2f856b=_0xb5c283[_0x2ad6ae(0x1d1)](_0x2ad6ae(0x1c8)),_0x2d313b=_0x2f856b?_0x2f856b[_0x2ad6ae(0x1c9)](',')[_0x2ad6ae(0x1d2)](_0x5846ce=>_0x5846ce[_0x2ad6ae(0x1bf)]())[_0x2ad6ae(0x1bc)](Boolean):undefined,_0x1f8791=await startDbAnalysis(_0x5171e1,_0x2d313b),_0x258bf3=buildDbPageLinks(_0xb5c283[_0x2ad6ae(0x1d0)],_0x5171e1);return{'ok':!![],'data':{'dbLinkId':_0x5171e1,'planId':_0x1f8791,'tableNames':_0x2d313b??[],..._0x258bf3?{'links':_0x258bf3}:{}},'message':_0x2ad6ae(0x1bd)+_0x5171e1};}};function a65_0x4f4c(_0x156f57,_0x506bfe){_0x156f57=_0x156f57-0x1ba;const _0x441d56=a65_0x441d();let _0x4f4c5a=_0x441d56[_0x156f57];return _0x4f4c5a;}function a65_0x441d(){const _0x2c0c3c=['string','1103415ugbgwa','7299rgqKiE','filter','Started\x20analysis\x20for\x20db\x20link\x20','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','trim','151749VVlIzn','6YaGwzf','1650299yZXpPG','71oURrcL','64QLzEHJ','analyze-start','5622DHvJfd','190TfkjAT','tables','split','6516nTdEGf','12saLHIr','288gmDlDX','153637kfRkvp','num','write','appCode','str','map'];a65_0x441d=function(){return _0x2c0c3c;};return a65_0x441d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a66_0x14ac2c=a66_0x1f8d;(function(_0x1c36be,_0x4b8c4d){const _0x4eb508=a66_0x1f8d,_0x40d9a3=_0x1c36be();while(!![]){try{const _0x2d99e1=parseInt(_0x4eb508(0xba))/0x1*(-parseInt(_0x4eb508(0xbf))/0x2)+-parseInt(_0x4eb508(0xb3))/0x3+parseInt(_0x4eb508(0xb2))/0x4*(-parseInt(_0x4eb508(0xb1))/0x5)+parseInt(_0x4eb508(0xb9))/0x6*(parseInt(_0x4eb508(0xbc))/0x7)+-parseInt(_0x4eb508(0xb5))/0x8+-parseInt(_0x4eb508(0xb6))/0x9*(-parseInt(_0x4eb508(0xc1))/0xa)+-parseInt(_0x4eb508(0xb0))/0xb*(-parseInt(_0x4eb508(0xbe))/0xc);if(_0x2d99e1===_0x4b8c4d)break;else _0x40d9a3['push'](_0x40d9a3['shift']());}catch(_0x1e6eda){_0x40d9a3['push'](_0x40d9a3['shift']());}}}(a66_0x2a06,0xf2d8e));function a66_0x1f8d(_0x54e78a,_0x2590a5){_0x54e78a=_0x54e78a-0xb0;const _0x2a0630=a66_0x2a06();let _0x1f8d2b=_0x2a0630[_0x54e78a];return _0x1f8d2b;}function a66_0x2a06(){const _0x1d0843=['Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','appCode','827472GRQHpi','96521DWzpFH','string','28KmNGtx','str','140004AnTeLA','26jcnamp','analyze-status','410zcMUIw','plan','read','2629xKhfJy','4198155qNuYzH','4mhJgAn','612876IerSVA','Analysis\x20status\x20for\x20','8421768PURSNH','220842NohyFh'];a66_0x2a06=function(){return _0x1d0843;};return a66_0x2a06();}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_0x14ac2c(0xc0),'description':'Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','risk':a66_0x14ac2c(0xc3),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a66_0x14ac2c(0xc2),'type':a66_0x14ac2c(0xbb),'required':!![],'description':a66_0x14ac2c(0xb7)}],async 'execute'(_0x5e3ab6){const _0x6db06b=a66_0x14ac2c,_0x239a30=_0x5e3ab6['num']('id'),_0x4de669=_0x5e3ab6[_0x6db06b(0xbd)]('plan'),_0x3c222d=await getDbAnalysisStatus(_0x4de669),_0x27b20f=buildDbPageLinks(_0x5e3ab6[_0x6db06b(0xb8)],_0x239a30);return{'ok':!![],'data':{'dbLinkId':_0x239a30,'planId':_0x4de669,'status':_0x3c222d,..._0x27b20f?{'links':_0x27b20f}:{}},'message':_0x6db06b(0xb4)+_0x4de669};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a67_0x1a68(_0x29083c,_0x31042b){_0x29083c=_0x29083c-0x136;const _0x18de40=a67_0x18de();let _0x1a68a1=_0x18de40[_0x29083c];return _0x1a68a1;}const a67_0x1585a4=a67_0x1a68;(function(_0x31f190,_0x1b67d8){const _0x3fa30a=a67_0x1a68,_0x7417d4=_0x31f190();while(!![]){try{const _0x52ffe2=parseInt(_0x3fa30a(0x15f))/0x1+-parseInt(_0x3fa30a(0x153))/0x2+-parseInt(_0x3fa30a(0x157))/0x3+parseInt(_0x3fa30a(0x15b))/0x4*(parseInt(_0x3fa30a(0x142))/0x5)+parseInt(_0x3fa30a(0x137))/0x6+parseInt(_0x3fa30a(0x138))/0x7+-parseInt(_0x3fa30a(0x163))/0x8;if(_0x52ffe2===_0x1b67d8)break;else _0x7417d4['push'](_0x7417d4['shift']());}catch(_0x19449e){_0x7417d4['push'](_0x7417d4['shift']());}}}(a67_0x18de,0x7b6c7));import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';function a67_0x18de(){const _0x38769f=['autostart','message','8.0','Human-readable\x20description','Host\x20and\x20port:\x20host:port','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','dburl','dbtype','databasePage','1250734lvCbJe','dbname','Create\x20dblink','/smartapi/dblink/create','925905hymCDC','dbdesc','boolean','trim','3966484LmFOsZ','Extra\x20JDBC-style\x20connection\x20parameters\x20string','[redacted]','No\x20follow-up\x20analysis','95025vGosVk','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','dbversion','Created\x20db\x20link\x20','5970496gXbpdo','join','5487060gBxyHp','1292907aGNwuK','validation','write','POST','\x20and\x20started\x20analysis','dbparam','Database\x20password','string','str','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','5pQvwID','create','password','username',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','bool','appCode','After\x20create,\x20start\x20schema\x20analysis'];a67_0x18de=function(){return _0x38769f;};return a67_0x18de();}import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':a67_0x1585a4(0x143),'description':a67_0x1585a4(0x14f),'risk':a67_0x1585a4(0x13a),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':'string','required':!![],'description':'Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server'},DB_TYPE_FLAG,{'name':a67_0x1585a4(0x161),'type':a67_0x1585a4(0x13f),'description':'Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','default':a67_0x1585a4(0x14c)},{'name':'dburl','type':'string','required':!![],'description':a67_0x1585a4(0x14e)},{'name':a67_0x1585a4(0x145),'type':'string','required':!![],'description':'Database\x20username'},{'name':a67_0x1585a4(0x144),'type':a67_0x1585a4(0x13f),'required':!![],'description':a67_0x1585a4(0x13e)},{'name':a67_0x1585a4(0x13d),'type':'string','description':a67_0x1585a4(0x15c)},{'name':'dbdesc','type':a67_0x1585a4(0x13f),'description':a67_0x1585a4(0x14d)},{'name':a67_0x1585a4(0x14a),'type':a67_0x1585a4(0x159),'description':a67_0x1585a4(0x149),'default':![]}],async 'validate'(_0x519838){const _0x137f42=a67_0x1585a4,_0x5b82fa=_0x519838[_0x137f42(0x140)](_0x137f42(0x150))['trim']();if(!validateDbUrl(_0x5b82fa))throw CliErrors[_0x137f42(0x139)](_0x137f42(0x141)+_0x5b82fa+'\x22',_0x137f42(0x160));},async 'dryRun'(_0x219818){const _0x4c7350=a67_0x1585a4,_0x37c7dd={'appCode':_0x219818[_0x4c7350(0x148)],'dbName':_0x219818[_0x4c7350(0x140)](_0x4c7350(0x154)),'dbType':_0x219818[_0x4c7350(0x140)](_0x4c7350(0x151)),'dbVersion':_0x219818[_0x4c7350(0x140)]('dbversion')||_0x4c7350(0x14c),'dbUrl':_0x219818[_0x4c7350(0x140)]('dburl')[_0x4c7350(0x15a)](),'username':_0x219818['str'](_0x4c7350(0x145)),'password':_0x4c7350(0x15d),..._0x219818[_0x4c7350(0x140)]('dbparam')?{'dbParam':_0x219818[_0x4c7350(0x140)](_0x4c7350(0x13d))}:{},..._0x219818[_0x4c7350(0x140)]('dbdesc')?{'dbDesc':_0x219818[_0x4c7350(0x140)](_0x4c7350(0x158))}:{}};return{'method':_0x4c7350(0x13b),'url':_0x4c7350(0x156),'body':_0x37c7dd,'description':[_0x4c7350(0x155),_0x219818[_0x4c7350(0x147)](_0x4c7350(0x14a))?'Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id':_0x4c7350(0x15e)][_0x4c7350(0x136)]('\x0a')};},async 'execute'(_0x21e121){const _0x1018ed=a67_0x1585a4,_0x12ca41={'appCode':_0x21e121[_0x1018ed(0x148)],'dbName':_0x21e121[_0x1018ed(0x140)](_0x1018ed(0x154)),'dbType':_0x21e121[_0x1018ed(0x140)](_0x1018ed(0x151)),'dbVersion':_0x21e121['str'](_0x1018ed(0x161))||_0x1018ed(0x14c),'dbUrl':_0x21e121[_0x1018ed(0x140)]('dburl')['trim'](),'username':_0x21e121[_0x1018ed(0x140)](_0x1018ed(0x145)),'password':_0x21e121[_0x1018ed(0x140)](_0x1018ed(0x144)),..._0x21e121[_0x1018ed(0x140)]('dbparam')?{'dbParam':_0x21e121[_0x1018ed(0x140)]('dbparam')}:{},..._0x21e121[_0x1018ed(0x140)](_0x1018ed(0x158))?{'dbDesc':_0x21e121['str'](_0x1018ed(0x158))}:{}},{id:_0xc9bc71,entity:_0x203b35}=normalizeEntityWithIdResponse(await createDbLink(_0x12ca41));if(!_0xc9bc71)return{'ok':![],'message':'Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','data':sanitizeDbLinkForOutput(_0x203b35)};let _0x2cffe8,_0x22bf59;if(_0x21e121[_0x1018ed(0x147)]('autostart'))try{_0x2cffe8=await startDbAnalysis(_0xc9bc71);}catch(_0x53eaf4){_0x22bf59=_0x53eaf4 instanceof Error?_0x53eaf4[_0x1018ed(0x14b)]:String(_0x53eaf4);}const _0xb366db=buildDbPageLinks(_0x21e121[_0x1018ed(0x148)],_0xc9bc71),_0x2dc3be={'connection':sanitizeDbLinkForOutput(_0x203b35),..._0xb366db?{'links':{'databasePage':_0xb366db[_0x1018ed(0x152)]}}:{},..._0x2cffe8?{'analysisPlanId':_0x2cffe8}:{},..._0x22bf59?{'analysisStartWarning':_0x22bf59}:{}};let _0x16dc9e;return _0x21e121[_0x1018ed(0x147)](_0x1018ed(0x14a))?_0x22bf59?_0x16dc9e=_0x1018ed(0x162)+_0xc9bc71+_0x1018ed(0x146):_0x16dc9e=_0x1018ed(0x162)+_0xc9bc71+_0x1018ed(0x13c):_0x16dc9e=_0x1018ed(0x162)+_0xc9bc71,{'ok':!![],'data':_0x2dc3be,'message':_0x16dc9e};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x424a01=a68_0x5eb8;function a68_0x43e5(){const _0x5f2bc3=['4207566DeMGEJ','14680WiSPQZ','238KYTUjE','130128ECwbOl','132QBGcLW','432jwqKBJ','21911650qSwjcC','8592425fOIYdX','num','10663200BpWChL','high-risk-write','198898OayrdT','Delete\x20a\x20database\x20connection\x20(dblink)\x20permanently'];a68_0x43e5=function(){return _0x5f2bc3;};return a68_0x43e5();}(function(_0x35804c,_0x3d1420){const _0x1340bf=a68_0x5eb8,_0x405ef6=_0x35804c();while(!![]){try{const _0x270a2f=-parseInt(_0x1340bf(0x150))/0x1*(-parseInt(_0x1340bf(0x151))/0x2)+parseInt(_0x1340bf(0x152))/0x3*(-parseInt(_0x1340bf(0x153))/0x4)+parseInt(_0x1340bf(0x156))/0x5+parseInt(_0x1340bf(0x14f))/0x6+-parseInt(_0x1340bf(0x14d))/0x7*(-parseInt(_0x1340bf(0x154))/0x8)+-parseInt(_0x1340bf(0x158))/0x9+-parseInt(_0x1340bf(0x155))/0xa;if(_0x270a2f===_0x3d1420)break;else _0x405ef6['push'](_0x405ef6['shift']());}catch(_0x1ca789){_0x405ef6['push'](_0x405ef6['shift']());}}}(a68_0x43e5,0xda2d1));function a68_0x5eb8(_0x2d5c50,_0xc7c729){_0x2d5c50=_0x2d5c50-0x14c;const _0x43e5f8=a68_0x43e5();let _0x5eb82a=_0x43e5f8[_0x2d5c50];return _0x5eb82a;}import{deleteDbLink}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDelete={'service':'db','command':'delete','description':a68_0x424a01(0x14e),'risk':a68_0x424a01(0x14c),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x21b9b5){const _0x886fed=a68_0x424a01,_0x1e5dcd=_0x21b9b5[_0x886fed(0x157)]('id');return await deleteDbLink(_0x1e5dcd),{'ok':!![],'data':{'id':_0x1e5dcd,'deleted':!![]},'message':'Deleted\x20db\x20link\x20'+_0x1e5dcd};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x41d777=a69_0x5044;function a69_0x5044(_0x1e0f91,_0x21c559){_0x1e0f91=_0x1e0f91-0x1ed;const _0x1ce29f=a69_0x1ce2();let _0x504493=_0x1ce29f[_0x1e0f91];return _0x504493;}(function(_0x4b91cb,_0x46a8ce){const _0x24d36d=a69_0x5044,_0x42f4b1=_0x4b91cb();while(!![]){try{const _0x48efaf=parseInt(_0x24d36d(0x1f2))/0x1*(-parseInt(_0x24d36d(0x1f8))/0x2)+parseInt(_0x24d36d(0x1f3))/0x3*(parseInt(_0x24d36d(0x1f6))/0x4)+-parseInt(_0x24d36d(0x1ef))/0x5+parseInt(_0x24d36d(0x1fc))/0x6*(parseInt(_0x24d36d(0x1f5))/0x7)+parseInt(_0x24d36d(0x1ed))/0x8*(parseInt(_0x24d36d(0x1fd))/0x9)+-parseInt(_0x24d36d(0x1f1))/0xa*(-parseInt(_0x24d36d(0x1fb))/0xb)+-parseInt(_0x24d36d(0x1f0))/0xc;if(_0x48efaf===_0x46a8ce)break;else _0x42f4b1['push'](_0x42f4b1['shift']());}catch(_0xc3aafb){_0x42f4b1['push'](_0x42f4b1['shift']());}}}(a69_0x1ce2,0x1f580));import{getDbLinkInfo}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbDetail={'service':'db','command':'detail','description':a69_0x41d777(0x1f4),'risk':a69_0x41d777(0x1f7),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4391f3){const _0x23777c=a69_0x41d777,_0x4500c5=_0x4391f3[_0x23777c(0x1f9)]('id'),_0x21eedd=await getDbLinkInfo(_0x4500c5);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x21eedd),'message':_0x23777c(0x1fa)+_0x4500c5+':\x20'+_0x21eedd[_0x23777c(0x1ee)]};}};function a69_0x1ce2(){const _0x153042=['num','db\x20link\x20','6611ikbSKS','3084RFEySs','1131381NKGIAS','8BNAhkz','dbName','475895ueBtFF','1755696USFDtp','2100mPIVMJ','11245UPzunD','7761XYPFuw','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','1589ObwBFZ','228rjBKcX','read','26KSScAH'];a69_0x1ce2=function(){return _0x153042;};return a69_0x1ce2();}
|
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a70_0x52df(){const _0x3cb51f=['number','diff','pagesize','page','table','num','read','10097559oGIVMC','443338Vrusjz','appCode','2087365GqBmFN','length','48XCyPTa','4oVKLDI','1910004AAMBUF','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','Page\x20index\x20(1-based)','string','str','1294222PLkDEL','\x20(db\x20link\x20','850614kQxLOp','649806ENcmrG'];a70_0x52df=function(){return _0x3cb51f;};return a70_0x52df();}const a70_0x2dce95=a70_0xc6d8;(function(_0x417e08,_0x5e454b){const _0x167742=a70_0xc6d8,_0x19f56d=_0x417e08();while(!![]){try{const _0x39d94e=parseInt(_0x167742(0x195))/0x1+-parseInt(_0x167742(0x192))/0x2+-parseInt(_0x167742(0x18d))/0x3*(parseInt(_0x167742(0x18c))/0x4)+parseInt(_0x167742(0x189))/0x5+-parseInt(_0x167742(0x194))/0x6+parseInt(_0x167742(0x187))/0x7*(-parseInt(_0x167742(0x18b))/0x8)+parseInt(_0x167742(0x186))/0x9;if(_0x39d94e===_0x5e454b)break;else _0x19f56d['push'](_0x19f56d['shift']());}catch(_0x2704dd){_0x19f56d['push'](_0x19f56d['shift']());}}}(a70_0x52df,0x5dabe));import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a70_0xc6d8(_0x44b080,_0x5e5938){_0x44b080=_0x44b080-0x17f;const _0x52df2f=a70_0x52df();let _0xc6d8ee=_0x52df2f[_0x44b080];return _0xc6d8ee;}export const dbDiff={'service':'db','command':a70_0x2dce95(0x180),'description':'Paged\x20diff\x20between\x20live\x20database\x20schema\x20and\x20last\x20analyzed\x20snapshot\x20(new\x20/\x20deleted\x20/\x20modified\x20tables)','risk':a70_0x2dce95(0x185),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a70_0x2dce95(0x183),'type':a70_0x2dce95(0x190),'description':a70_0x2dce95(0x18e)},{'name':a70_0x2dce95(0x182),'type':a70_0x2dce95(0x17f),'description':a70_0x2dce95(0x18f),'default':0x1},{'name':a70_0x2dce95(0x181),'type':a70_0x2dce95(0x17f),'description':'Page\x20size','default':0x14}],async 'execute'(_0x269f66){const _0x44682b=a70_0x2dce95,_0x206d3e=_0x269f66[_0x44682b(0x184)]('id'),_0x38d8b7=_0x269f66['num'](_0x44682b(0x182),0x1)||0x1,_0x2b386a=_0x269f66[_0x44682b(0x184)]('pagesize',0x14)||0x14,_0x40cfc6=_0x269f66[_0x44682b(0x191)](_0x44682b(0x183))||undefined,{totalCount:_0x31ce42,tableList:_0xad94c2}=await getDbTableDiff(_0x269f66[_0x44682b(0x188)],_0x206d3e,{'pageIndex':_0x38d8b7,'pageSize':_0x2b386a,'tableName':_0x40cfc6});return{'ok':!![],'data':{'dbLinkId':_0x206d3e,'page':_0x38d8b7,'pageSize':_0x2b386a,'totalCount':_0x31ce42,'tableList':_0xad94c2},'message':_0xad94c2[_0x44682b(0x18a)]+'\x20row(s),\x20total\x20'+_0x31ce42+_0x44682b(0x193)+_0x206d3e+')'};}};
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a71_0x50cf(){const _0x5e6979=['90cgvnza','72172PnFosv','625006QLSJpj','1118034bqOfIe','179234ivNEri','54nwRMJR','14824qsUJUf','1541470nalNyi','4mboqMR','7752DZqwwq','147TFGUYU'];a71_0x50cf=function(){return _0x5e6979;};return a71_0x50cf();}(function(_0x4eaf17,_0xefac4c){const _0x33bc39=a71_0x23fd,_0xed4692=_0x4eaf17();while(!![]){try{const _0x58eaa0=-parseInt(_0x33bc39(0x9a))/0x1+parseInt(_0x33bc39(0x99))/0x2*(parseInt(_0x33bc39(0x92))/0x3)+-parseInt(_0x33bc39(0x95))/0x4*(-parseInt(_0x33bc39(0x94))/0x5)+-parseInt(_0x33bc39(0x96))/0x6+-parseInt(_0x33bc39(0x97))/0x7*(-parseInt(_0x33bc39(0x93))/0x8)+parseInt(_0x33bc39(0x9b))/0x9+parseInt(_0x33bc39(0x98))/0xa*(-parseInt(_0x33bc39(0x9c))/0xb);if(_0x58eaa0===_0xefac4c)break;else _0xed4692['push'](_0xed4692['shift']());}catch(_0x1c1df5){_0xed4692['push'](_0xed4692['shift']());}}}(a71_0x50cf,0x54f85));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';function a71_0x23fd(_0x3d93a7,_0x410965){_0x3d93a7=_0x3d93a7-0x92;const _0x50cfa9=a71_0x50cf();let _0x23fdc8=_0x50cfa9[_0x3d93a7];return _0x23fdc8;}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_0x33f8ae=a72_0x3b30;(function(_0x4ac4e6,_0x48b5d2){const _0x5282df=a72_0x3b30,_0xe6f4b8=_0x4ac4e6();while(!![]){try{const _0x46f0ee=-parseInt(_0x5282df(0x19d))/0x1+parseInt(_0x5282df(0x194))/0x2*(-parseInt(_0x5282df(0x195))/0x3)+parseInt(_0x5282df(0x190))/0x4+parseInt(_0x5282df(0x199))/0x5+-parseInt(_0x5282df(0x1a1))/0x6*(parseInt(_0x5282df(0x19f))/0x7)+-parseInt(_0x5282df(0x1a3))/0x8*(parseInt(_0x5282df(0x196))/0x9)+parseInt(_0x5282df(0x191))/0xa;if(_0x46f0ee===_0x48b5d2)break;else _0xe6f4b8['push'](_0xe6f4b8['shift']());}catch(_0x2468ab){_0xe6f4b8['push'](_0xe6f4b8['shift']());}}}(a72_0x2bd0,0x9c46c));function a72_0x2bd0(){const _0x5dcfd2=['page','330umobdi','Found\x20','3488Fwlooc','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','length','Page\x20index\x20(1-based)','1671712FzwXWg','10609620PPyVKT','num','appCode','10dvPTEL','529548KHHPAc','108IfIjQk','\x20database\x20connection(s)','read','4318975YUqpak','list','Page\x20size','pagesize','594490paCRvW','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','28035bbWoid'];a72_0x2bd0=function(){return _0x5dcfd2;};return a72_0x2bd0();}import{listDbLinks}from'../../core/api-client.js';function a72_0x3b30(_0x3b06b6,_0x2a9560){_0x3b06b6=_0x3b06b6-0x18e;const _0x2bd097=a72_0x2bd0();let _0x3b30bf=_0x2bd097[_0x3b06b6];return _0x3b30bf;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a72_0x33f8ae(0x19a),'description':a72_0x33f8ae(0x19e),'risk':a72_0x33f8ae(0x198),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a72_0x33f8ae(0x1a0),'type':'number','description':a72_0x33f8ae(0x18f),'default':0x1},{'name':a72_0x33f8ae(0x19c),'type':'number','description':a72_0x33f8ae(0x19b),'default':0x64}],async 'execute'(_0x3024f1){const _0x44fe93=a72_0x33f8ae,_0xddf30b=_0x3024f1[_0x44fe93(0x192)]('page',0x1)||0x1,_0x467ced=_0x3024f1[_0x44fe93(0x192)](_0x44fe93(0x19c),0x64)||0x64,{items:_0x21539d,paging:_0x474a8f}=await listDbLinks(_0x3024f1[_0x44fe93(0x193)],{'currentPage':_0xddf30b,'pageSize':_0x467ced}),_0x1236f3=sanitizeDbLinkList(_0x21539d),_0x78da68=_0x474a8f?_0x474a8f:{'currentPage':_0xddf30b,'pageSize':_0x467ced,'rowsOnPage':_0x1236f3['length'],'totalCount':null,'note':_0x44fe93(0x1a4)};return{'ok':!![],'data':{'connections':_0x1236f3,'paging':_0x78da68},'message':_0x44fe93(0x1a2)+_0x1236f3[_0x44fe93(0x18e)]+_0x44fe93(0x197)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a73_0xe7b8(_0x37e3e4,_0x1e6d25){_0x37e3e4=_0x37e3e4-0xba;const _0x2f41ff=a73_0x2f41();let _0xe7b8f7=_0x2f41ff[_0x37e3e4];return _0xe7b8f7;}(function(_0x2eb6ab,_0x3c0870){const _0x5ccd80=a73_0xe7b8,_0x280646=_0x2eb6ab();while(!![]){try{const _0x57f3a7=-parseInt(_0x5ccd80(0xc4))/0x1*(parseInt(_0x5ccd80(0xbd))/0x2)+-parseInt(_0x5ccd80(0xbf))/0x3*(parseInt(_0x5ccd80(0xc5))/0x4)+-parseInt(_0x5ccd80(0xd0))/0x5*(-parseInt(_0x5ccd80(0xc8))/0x6)+-parseInt(_0x5ccd80(0xd4))/0x7+-parseInt(_0x5ccd80(0xbb))/0x8+parseInt(_0x5ccd80(0xcc))/0x9+parseInt(_0x5ccd80(0xd2))/0xa*(parseInt(_0x5ccd80(0xcf))/0xb);if(_0x57f3a7===_0x3c0870)break;else _0x280646['push'](_0x280646['shift']());}catch(_0x56266c){_0x280646['push'](_0x280646['shift']());}}}(a73_0x2f41,0xef0d4));import{getAppBaseUrl}from'../../constant/domain.js';function shouldRedactKey(_0x54ef48){const _0x303aff=a73_0xe7b8,_0x20aa04=_0x54ef48[_0x303aff(0xd6)]();if(_0x20aa04===_0x303aff(0xbe)||_0x20aa04===_0x303aff(0xba)||_0x20aa04===_0x303aff(0xc6))return!![];if(_0x20aa04[_0x303aff(0xc2)]('secret')||_0x20aa04[_0x303aff(0xc2)](_0x303aff(0xc1))||_0x20aa04[_0x303aff(0xc2)](_0x303aff(0xbc)))return!![];if(_0x20aa04[_0x303aff(0xc2)](_0x303aff(0xd7))||_0x20aa04[_0x303aff(0xc2)](_0x303aff(0xcd)))return!![];if(_0x20aa04===_0x303aff(0xc7)||_0x20aa04===_0x303aff(0xd3)||_0x20aa04===_0x303aff(0xc3))return!![];return![];}export function sanitizeDbLinkForOutput(_0x2319e7){const _0x9a4989=a73_0xe7b8,_0x5b99fb={..._0x2319e7};for(const _0x531f57 of Object[_0x9a4989(0xd1)](_0x5b99fb)){if(!shouldRedactKey(_0x531f57))continue;const _0x4ae9a2=_0x5b99fb[_0x531f57];_0x4ae9a2!=null&&String(_0x4ae9a2)[_0x9a4989(0xd5)]>0x0&&(_0x5b99fb[_0x531f57]=_0x9a4989(0xca));}return _0x5b99fb;}export function sanitizeDbLinkList(_0x5d56c1){return _0x5d56c1['map'](_0xc5cba9=>sanitizeDbLinkForOutput(_0xc5cba9));}function a73_0x2f41(){const _0x1b0507=['12691359lLHvye','accesskey','/data/er?dbId=','7912102GgKTCj','185lToTsM','keys','70fsECPE','connectionstring','12245492rbHbBX','length','toLowerCase','privatekey','passwd','9137712NxMqDM','credential','3260378KxVASM','password','49965gVymQq','trim','token','includes','jdbcurl','1VLcXJj','420RbOHVh','dbpassword','authorization','130470PRghYz','test','[redacted]','number'];a73_0x2f41=function(){return _0x1b0507;};return a73_0x2f41();}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x3f7ee1){const _0x2ce4fd=a73_0xe7b8,_0x74a9b9=_0x3f7ee1[_0x2ce4fd(0xc0)]();if(!_0x74a9b9)return![];return DB_URL_PATTERN[_0x2ce4fd(0xc9)](_0x74a9b9);}export function buildDbPageLinks(_0x5a7c2b,_0x46c005){const _0x5ce75d=a73_0xe7b8,_0x1ae2e0=_0x5a7c2b?.['trim']();if(!_0x1ae2e0)return undefined;const _0x123e77=typeof _0x46c005===_0x5ce75d(0xcb)?String(_0x46c005):String(_0x46c005??'')[_0x5ce75d(0xc0)]();if(!_0x123e77)return undefined;const _0x440462=Number(_0x123e77);if(!Number['isFinite'](_0x440462)||_0x440462<=0x0)return undefined;const _0x50f92d=getAppBaseUrl(_0x1ae2e0),_0x43ae3c=encodeURIComponent(String(_0x440462));return{'databasePage':_0x50f92d+'/data/database','erPage':_0x50f92d+_0x5ce75d(0xce)+_0x43ae3c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a74_0x1d3558=a74_0x8a05;function a74_0x569c(){const _0xd6ef0f=['606HZnOis','48385eynJrx','length','30472430rUvaaF','read','tables','5154057AQfGMV','1702197oQhyiB','583726aDbSeh','4ajnCtd','330894pXOVBO','424vdilTn','num','585718UQvieP'];a74_0x569c=function(){return _0xd6ef0f;};return a74_0x569c();}(function(_0x53996f,_0x35535e){const _0x45fa3b=a74_0x8a05,_0xb283ec=_0x53996f();while(!![]){try{const _0x4e2589=parseInt(_0x45fa3b(0x1f7))/0x1+parseInt(_0x45fa3b(0x1f2))/0x2+-parseInt(_0x45fa3b(0x1f0))/0x3*(parseInt(_0x45fa3b(0x1f3))/0x4)+-parseInt(_0x45fa3b(0x1f9))/0x5*(-parseInt(_0x45fa3b(0x1f8))/0x6)+-parseInt(_0x45fa3b(0x1f1))/0x7+-parseInt(_0x45fa3b(0x1f5))/0x8*(parseInt(_0x45fa3b(0x1f4))/0x9)+parseInt(_0x45fa3b(0x1ed))/0xa;if(_0x4e2589===_0x35535e)break;else _0xb283ec['push'](_0xb283ec['shift']());}catch(_0x6f806a){_0xb283ec['push'](_0xb283ec['shift']());}}}(a74_0x569c,0xf249d));import{getDbAllTableList}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a74_0x8a05(_0x573ea3,_0x2e5f28){_0x573ea3=_0x573ea3-0x1ec;const _0x569cf1=a74_0x569c();let _0x8a05e4=_0x569cf1[_0x573ea3];return _0x8a05e4;}export const dbTables={'service':'db','command':a74_0x1d3558(0x1ef),'description':'List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','risk':a74_0x1d3558(0x1ee),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x535a77){const _0x33b1e8=a74_0x1d3558,_0x378a4a=_0x535a77[_0x33b1e8(0x1f6)]('id'),_0x508370=await getDbAllTableList(_0x535a77['appCode'],_0x378a4a);return{'ok':!![],'data':{'dbLinkId':_0x378a4a,'total':_0x508370[_0x33b1e8(0x1ec)],'tables':_0x508370},'message':_0x508370[_0x33b1e8(0x1ec)]+'\x20table(s)\x20on\x20db\x20link\x20'+_0x378a4a};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a75_0x5a3851=a75_0x4008;(function(_0x5803b5,_0x240a5b){const _0x48d9ac=a75_0x4008,_0x29ab47=_0x5803b5();while(!![]){try{const _0x46f35d=-parseInt(_0x48d9ac(0x1b5))/0x1*(-parseInt(_0x48d9ac(0x1af))/0x2)+-parseInt(_0x48d9ac(0x1b1))/0x3+-parseInt(_0x48d9ac(0x1b4))/0x4+parseInt(_0x48d9ac(0x1b8))/0x5+parseInt(_0x48d9ac(0x1b0))/0x6+parseInt(_0x48d9ac(0x1bd))/0x7*(-parseInt(_0x48d9ac(0x1c0))/0x8)+-parseInt(_0x48d9ac(0x1b2))/0x9;if(_0x46f35d===_0x240a5b)break;else _0x29ab47['push'](_0x29ab47['shift']());}catch(_0x325d22){_0x29ab47['push'](_0x29ab47['shift']());}}}(a75_0x5bb9,0xee033));import{testDbLinkConnect}from'../../core/api-client.js';function a75_0x4008(_0x1cd758,_0x512319){_0x1cd758=_0x1cd758-0x1ad;const _0x5bb94b=a75_0x5bb9();let _0x400851=_0x5bb94b[_0x1cd758];return _0x400851;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x5c4a17){const _0x1781b7=a75_0x4008;if(_0x5c4a17===!![]||_0x5c4a17===![])return{'success':_0x5c4a17};if(_0x5c4a17===null||_0x5c4a17===undefined)return{'type':typeof _0x5c4a17};if(typeof _0x5c4a17!==_0x1781b7(0x1b7))return{'type':typeof _0x5c4a17};const _0x59cc38=_0x5c4a17,_0xe43205=[_0x1781b7(0x1bf),'message',_0x1781b7(0x1b6),_0x1781b7(0x1ad),_0x1781b7(0x1ae),_0x1781b7(0x1c3)],_0x5387ad={};for(const _0x2e8dc6 of _0xe43205){if(_0x2e8dc6 in _0x59cc38)_0x5387ad[_0x2e8dc6]=_0x59cc38[_0x2e8dc6];}return Object[_0x1781b7(0x1bb)](_0x5387ad)[_0x1781b7(0x1bc)]===0x0&&(_0x5387ad[_0x1781b7(0x1bb)]=Object[_0x1781b7(0x1bb)](_0x59cc38)[_0x1781b7(0x1b9)](0x0,0x14)),_0x5387ad;}export const dbTest={'service':'db','command':a75_0x5a3851(0x1c2),'description':a75_0x5a3851(0x1c1),'risk':a75_0x5a3851(0x1be),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5ae67c){const _0x3eff9a=a75_0x5a3851,_0x2ea9ca=_0x5ae67c[_0x3eff9a(0x1b3)]('id'),_0x27214b=await testDbLinkConnect(_0x2ea9ca),_0x41af7d=_0x27214b===!![]||typeof _0x27214b===_0x3eff9a(0x1b7)&&_0x27214b!==null&&_0x27214b[_0x3eff9a(0x1bf)]===!![],_0x31fbe7=summarizeTestConnectResult(_0x27214b);return{'ok':!![],'data':{'id':_0x2ea9ca,'connected':Boolean(_0x41af7d),'result':_0x31fbe7},'message':_0x41af7d?_0x3eff9a(0x1ba)+_0x2ea9ca:_0x3eff9a(0x1c4)+_0x2ea9ca+'\x20(see\x20data.result)'};}};function a75_0x5bb9(){const _0x47baa9=['3XGGZMt','code','object','9642710EFffMT','slice','Connection\x20OK\x20for\x20db\x20link\x20','keys','length','56DFMned','read','success','105784cUvNjR','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','test','data','Connection\x20check\x20finished\x20for\x20db\x20link\x20','error','msg','822538ingijJ','1208244ukoBzm','5427894GuAmRu','4225077EjIDLY','num','17156wtaPot'];a75_0x5bb9=function(){return _0x47baa9;};return a75_0x5bb9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a76_0x58e8(){const _0x4726ed=['dbname','dburl','365498BgqdRc','dbdesc','dbName','string','Update\x20an\x20existing\x20database\x20connection.\x20Only\x20supplied\x20fields\x20are\x20overwritten;\x20others\x20keep\x20server\x20values','POST','str','dbparam','New\x20host:port','1722430XewZaH','63mvVtlt','715540AxIdZR','/smartapi/dblink/update','168918dpWNzW','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','password','trim','2208120bvvmYv','validation','num','dbParam','dbUrl','45qmasxt','304066FurikJ','New\x20connection\x20parameter\x20string','New\x20description','6ZQgJzi','dbDesc','983990ZOoxwZ','username','write','New\x20database\x20name'];a76_0x58e8=function(){return _0x4726ed;};return a76_0x58e8();}const a76_0xef45dd=a76_0x1e9d;(function(_0x4865eb,_0x2589dc){const _0x3ad364=a76_0x1e9d,_0x140f59=_0x4865eb();while(!![]){try{const _0x5b0c42=parseInt(_0x3ad364(0x1f3))/0x1+-parseInt(_0x3ad364(0x1e8))/0x2+-parseInt(_0x3ad364(0x1eb))/0x3*(-parseInt(_0x3ad364(0x1fe))/0x4)+-parseInt(_0x3ad364(0x1fc))/0x5+parseInt(_0x3ad364(0x200))/0x6*(-parseInt(_0x3ad364(0x1fd))/0x7)+-parseInt(_0x3ad364(0x205))/0x8+parseInt(_0x3ad364(0x1e7))/0x9*(parseInt(_0x3ad364(0x1ed))/0xa);if(_0x5b0c42===_0x2589dc)break;else _0x140f59['push'](_0x140f59['shift']());}catch(_0x3880af){_0x140f59['push'](_0x140f59['shift']());}}}(a76_0x58e8,0x2e3a8));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a76_0x1e9d(_0x56a622,_0xf29611){_0x56a622=_0x56a622-0x1e4;const _0x58e8a0=a76_0x58e8();let _0x1e9d0b=_0x58e8a0[_0x56a622];return _0x1e9d0b;}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':'update','description':a76_0xef45dd(0x1f7),'risk':a76_0xef45dd(0x1ef),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a76_0xef45dd(0x1f1),'type':a76_0xef45dd(0x1f6),'description':a76_0xef45dd(0x1f0)},{'name':a76_0xef45dd(0x1f2),'type':a76_0xef45dd(0x1f6),'description':a76_0xef45dd(0x1fb)},{'name':a76_0xef45dd(0x1ee),'type':a76_0xef45dd(0x1f6),'description':'New\x20username'},{'name':'password','type':a76_0xef45dd(0x1f6),'description':'New\x20password\x20(omit\x20to\x20leave\x20unchanged).\x20Empty\x20string\x20may\x20be\x20treated\x20as\x20no-op\x20or\x20rejected\x20by\x20API'},{'name':a76_0xef45dd(0x1fa),'type':a76_0xef45dd(0x1f6),'description':a76_0xef45dd(0x1e9)},{'name':a76_0xef45dd(0x1f4),'type':a76_0xef45dd(0x1f6),'description':a76_0xef45dd(0x1ea)}],async 'validate'(_0x69f4b6){const _0x2773e0=a76_0xef45dd,_0x2053ee=_0x69f4b6[_0x2773e0(0x1f9)]('dburl');if(_0x2053ee&&!validateDbUrl(_0x2053ee['trim']()))throw CliErrors[_0x2773e0(0x206)](_0x2773e0(0x201)+_0x2053ee+'\x22');},async 'dryRun'(_0x2893f1){const _0x544e56=a76_0xef45dd,_0x481e40=_0x2893f1[_0x544e56(0x1e4)]('id'),_0x1b30bc=await getDbLinkInfo(_0x481e40),_0xab445a={..._0x1b30bc},_0x23b7bf=_0x2893f1['str'](_0x544e56(0x1f1));if(_0x23b7bf)_0xab445a['dbName']=_0x23b7bf;const _0x53781c=_0x2893f1[_0x544e56(0x1f9)](_0x544e56(0x1f2));if(_0x53781c)_0xab445a[_0x544e56(0x1e6)]=_0x53781c[_0x544e56(0x204)]();const _0x2761c0=_0x2893f1[_0x544e56(0x1f9)](_0x544e56(0x1ee));if(_0x2761c0)_0xab445a['username']=_0x2761c0;const _0xbae1a6=_0x2893f1[_0x544e56(0x1f9)](_0x544e56(0x203));if(_0xbae1a6)_0xab445a['password']=_0xbae1a6;const _0x54e335=_0x2893f1[_0x544e56(0x1f9)](_0x544e56(0x1fa));if(_0x54e335)_0xab445a[_0x544e56(0x1e5)]=_0x54e335;const _0x1da6c4=_0x2893f1['str'](_0x544e56(0x1f4));if(_0x1da6c4)_0xab445a[_0x544e56(0x1ec)]=_0x1da6c4;const _0x456ef1=sanitizeDbLinkForOutput(_0xab445a);return{'method':_0x544e56(0x1f8),'url':_0x544e56(0x1ff),'body':_0x456ef1,'description':_0x544e56(0x202)};},async 'execute'(_0x17716b){const _0x4829bd=a76_0xef45dd,_0x32097c=_0x17716b['num']('id'),_0x2790b1=await getDbLinkInfo(_0x32097c),_0x5856a8={..._0x2790b1},_0x3fa344=_0x17716b[_0x4829bd(0x1f9)](_0x4829bd(0x1f1));if(_0x3fa344)_0x5856a8[_0x4829bd(0x1f5)]=_0x3fa344;const _0x39e149=_0x17716b[_0x4829bd(0x1f9)](_0x4829bd(0x1f2));if(_0x39e149)_0x5856a8[_0x4829bd(0x1e6)]=_0x39e149['trim']();const _0x4c5345=_0x17716b[_0x4829bd(0x1f9)]('username');if(_0x4c5345)_0x5856a8['username']=_0x4c5345;const _0x59a404=_0x17716b['str'](_0x4829bd(0x203));if(_0x59a404)_0x5856a8[_0x4829bd(0x203)]=_0x59a404;const _0x52bf22=_0x17716b[_0x4829bd(0x1f9)](_0x4829bd(0x1fa));if(_0x52bf22)_0x5856a8[_0x4829bd(0x1e5)]=_0x52bf22;const _0x2f95dd=_0x17716b[_0x4829bd(0x1f9)]('dbdesc');if(_0x2f95dd)_0x5856a8[_0x4829bd(0x1ec)]=_0x2f95dd;const {id:_0x41e0c1,entity:_0x299759}=normalizeEntityWithIdResponse(await updateDbLink(_0x5856a8));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x299759),'message':'Updated\x20db\x20link\x20'+(_0x41e0c1??_0x32097c)};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a77_0x59cc21=a77_0x1bb5;function a77_0x1bb5(_0x405d0c,_0x19f2dc){_0x405d0c=_0x405d0c-0x8c;const _0x5de5ee=a77_0x5de5();let _0x1bb570=_0x5de5ee[_0x405d0c];return _0x1bb570;}(function(_0x3f62af,_0x22996c){const _0x238594=a77_0x1bb5,_0x19ba58=_0x3f62af();while(!![]){try{const _0x11095e=parseInt(_0x238594(0xa3))/0x1+parseInt(_0x238594(0x97))/0x2+-parseInt(_0x238594(0xb5))/0x3*(-parseInt(_0x238594(0xa8))/0x4)+parseInt(_0x238594(0xd1))/0x5+parseInt(_0x238594(0xa2))/0x6+parseInt(_0x238594(0x92))/0x7*(-parseInt(_0x238594(0xaf))/0x8)+parseInt(_0x238594(0x8e))/0x9*(-parseInt(_0x238594(0x99))/0xa);if(_0x11095e===_0x22996c)break;else _0x19ba58['push'](_0x19ba58['shift']());}catch(_0x190751){_0x19ba58['push'](_0x19ba58['shift']());}}}(a77_0x5de5,0x31dcb));import a77_0x5ed719 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a77_0x5de5(){const _0x57962e=['red','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default:\x20','explicitAppName','(none)','622360njcoqP','⚠\x20Empty\x20(treated\x20as\x20{})','platform','(not\x20set)','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','cookie','3vmtHTK','currentApp','✗\x20Not\x20logged\x20in','check','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20←\x20current','✗\x20Invalid\x20JSON','unknown','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','locale','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','defaultApp','raw','log','padEnd','\x20\x20Config\x20Files','length','(not\x20found)','(set,\x20length=','empty','Project','\x20\x20runtimeDomain:\x20\x20\x20','✗\x20Expired','repeat','gray','1973080QEBivP','status','yellow','apiDir','appCode','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','bold','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','green','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(no\x20file)','\x20\x20explicitAppName:\x20','read','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20accessKey:\x20\x20','pageSize','(missing)','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','6777081aUhUUc','format','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(default)','7vNlaup','env','riskLevel','missing','accessKey','505592hijKIu','✓\x20Valid\x20JSON','10taYHjh','\x20\x20Config\x20JSON','\x20doctor','Global','value','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','\x20\x20Auth','586266CbQdNz','33386YoZTLT','source','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','apps','1026120nhdYhI','keys'];a77_0x5de5=function(){return _0x57962e;};return a77_0x5de5();}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(_0x4f62ab){const _0x5541ac=a77_0x1bb5,_0x15806a=GIT_COMMIT!==_0x5541ac(0xbe)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION,_0x143dec=buildConfigFromFlags({}),_0x22781e=getCookie();console['log'](),console[_0x5541ac(0xc5)](a77_0x5ed719[_0x5541ac(0xda)](CLI_BIN_NAME+_0x5541ac(0x9b))),console[_0x5541ac(0xc5)](a77_0x5ed719[_0x5541ac(0xd0)]('─'[_0x5541ac(0xcf)](0x32))),console[_0x5541ac(0xc5)](_0x5541ac(0xbb)+_0x15806a),console[_0x5541ac(0xc5)](_0x5541ac(0x90)+process['version']),console['log'](_0x5541ac(0xa6)+process[_0x5541ac(0xb1)]+'\x20'+process['arch']),console[_0x5541ac(0xc5)](),console[_0x5541ac(0xc5)](a77_0x5ed719[_0x5541ac(0xda)](_0x5541ac(0xc7))),console[_0x5541ac(0xc5)](a77_0x5ed719[_0x5541ac(0xd0)](_0x5541ac(0xa0)['repeat'](0x1e)));const _0xa278bf=getGlobalConfigPath(),_0x246023=getProjectConfigPath();console[_0x5541ac(0xc5)](_0x5541ac(0xdb)+(_0xa278bf||a77_0x5ed719[_0x5541ac(0xd0)](_0x5541ac(0xc9)))),console[_0x5541ac(0xc5)](_0x5541ac(0x8d)+(_0x246023||a77_0x5ed719[_0x5541ac(0xd0)](_0x5541ac(0xc9)))),console['log'](),console['log'](a77_0x5ed719['bold'](_0x5541ac(0x9a))),console[_0x5541ac(0xc5)](a77_0x5ed719[_0x5541ac(0xd0)](_0x5541ac(0xa0)[_0x5541ac(0xcf)](0x1e)));const _0x23db1c=(_0x4aea68,_0x102433)=>{const _0x1c2d56=_0x5541ac;if(!_0x102433){console[_0x1c2d56(0xc5)]('\x20\x20'+_0x4aea68[_0x1c2d56(0xc6)](0x11)+'\x20'+a77_0x5ed719[_0x1c2d56(0xd0)](_0x1c2d56(0xde)));return;}const _0x38483b=inspectCliConfigJsonFile(_0x102433);if(_0x38483b[_0x1c2d56(0xd2)]==='ok')console[_0x1c2d56(0xc5)]('\x20\x20'+_0x4aea68[_0x1c2d56(0xc6)](0x11)+'\x20'+a77_0x5ed719[_0x1c2d56(0xdc)](_0x1c2d56(0x98)));else{if(_0x38483b[_0x1c2d56(0xd2)]===_0x1c2d56(0xcb))console['log']('\x20\x20'+_0x4aea68[_0x1c2d56(0xc6)](0x11)+'\x20'+a77_0x5ed719[_0x1c2d56(0xd3)](_0x1c2d56(0xb0)));else _0x38483b[_0x1c2d56(0xd2)]===_0x1c2d56(0x95)?console[_0x1c2d56(0xc5)]('\x20\x20'+_0x4aea68['padEnd'](0x11)+'\x20'+a77_0x5ed719[_0x1c2d56(0xd0)](_0x1c2d56(0x8c))):(console['log']('\x20\x20'+_0x4aea68[_0x1c2d56(0xc6)](0x11)+'\x20'+a77_0x5ed719[_0x1c2d56(0xaa)](_0x1c2d56(0xbd))),console[_0x1c2d56(0xc5)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a77_0x5ed719[_0x1c2d56(0xaa)](_0x38483b['message'])));}};_0x23db1c(_0x5541ac(0x9c),_0xa278bf),_0x23db1c(_0x5541ac(0xcc),_0x246023),console[_0x5541ac(0xc5)](),console[_0x5541ac(0xc5)](a77_0x5ed719[_0x5541ac(0xda)]('\x20\x20Merged\x20Config')),console[_0x5541ac(0xc5)](a77_0x5ed719[_0x5541ac(0xd0)](_0x5541ac(0xa0)['repeat'](0x1e))),console[_0x5541ac(0xc5)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x143dec[_0x5541ac(0xd5)]||a77_0x5ed719['red'](_0x5541ac(0xb2)))),console[_0x5541ac(0xc5)](_0x5541ac(0xb9)+_0x143dec[_0x5541ac(0x93)]),console[_0x5541ac(0xc5)](_0x5541ac(0x9e)+_0x143dec[_0x5541ac(0xc1)]),console[_0x5541ac(0xc5)](_0x5541ac(0xab)+_0x143dec[_0x5541ac(0xd4)]),console[_0x5541ac(0xc5)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x143dec[_0x5541ac(0xc3)]||a77_0x5ed719['gray'](_0x5541ac(0xae)))),console[_0x5541ac(0xc5)](_0x5541ac(0xd7)+(_0x143dec[_0x5541ac(0xb6)]||a77_0x5ed719[_0x5541ac(0xd0)](_0x5541ac(0xae)))),console[_0x5541ac(0xc5)](_0x5541ac(0xdf)+(_0x143dec[_0x5541ac(0xad)]||a77_0x5ed719[_0x5541ac(0xd0)](_0x5541ac(0xae)))),console['log'](_0x5541ac(0xe1)+(_0x143dec[_0x5541ac(0x8f)]||a77_0x5ed719[_0x5541ac(0xd0)](_0x5541ac(0xac)+DEFAULT_CONFIG_VALUES[_0x5541ac(0x8f)]+')'))),console[_0x5541ac(0xc5)](_0x5541ac(0x9f)+(_0x143dec[_0x5541ac(0xe3)]??a77_0x5ed719[_0x5541ac(0xd0)]('(default)'))),console[_0x5541ac(0xc5)](_0x5541ac(0xba)+_0x143dec[_0x5541ac(0x94)]),console[_0x5541ac(0xc5)](_0x5541ac(0xdd)+_0x143dec['verbose']),console['log']('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x143dec[_0x5541ac(0xb4)]?a77_0x5ed719[_0x5541ac(0xdc)](_0x5541ac(0xca)+_0x143dec[_0x5541ac(0xb4)][_0x5541ac(0xc8)]+')'):_0x22781e?a77_0x5ed719[_0x5541ac(0xdc)]('(set\x20via\x20file,\x20length='+_0x22781e[_0x5541ac(0xc8)]+')'):a77_0x5ed719[_0x5541ac(0xd0)](_0x5541ac(0xae))));const _0x5c1492=Object[_0x5541ac(0xa9)](_0x143dec[_0x5541ac(0xa7)]);if(_0x5c1492[_0x5541ac(0xc8)]>0x0){console['log'](),console[_0x5541ac(0xc5)](a77_0x5ed719[_0x5541ac(0xda)]('\x20\x20Apps')),console[_0x5541ac(0xc5)](a77_0x5ed719[_0x5541ac(0xd0)](_0x5541ac(0xa0)[_0x5541ac(0xcf)](0x1e)));for(const _0x5c68bf of _0x5c1492){const _0x3f8f15=_0x143dec[_0x5541ac(0xa7)][_0x5c68bf],_0x319527=_0x5c68bf===_0x143dec[_0x5541ac(0xc3)],_0x528fdb=_0x5c68bf===_0x143dec['currentApp'],_0xc8d1a3=_0x528fdb?a77_0x5ed719[_0x5541ac(0xdc)](_0x5541ac(0xbc)):'',_0x1a299c=_0x319527?_0x5541ac(0x91):'';console[_0x5541ac(0xc5)]('\x20\x20'+_0x5c68bf+_0x1a299c+_0xc8d1a3),console[_0x5541ac(0xc5)](_0x5541ac(0xc0)+_0x3f8f15['appcode']);const _0x29c49b=buildAppDoctorFields(_0x3f8f15,{'env':_0x143dec['env'],'apiDir':_0x143dec[_0x5541ac(0xc4)][_0x5541ac(0xd4)]||DEFAULT_CONFIG_VALUES[_0x5541ac(0xd4)],'cookie':_0x143dec['cookie']||_0x22781e||undefined,'accessKey':_0x143dec[_0x5541ac(0x96)]});console[_0x5541ac(0xc5)](_0x5541ac(0xb3)+_0x29c49b[_0x5541ac(0x93)][_0x5541ac(0x9d)]+'\x20\x20'+a77_0x5ed719[_0x5541ac(0xd0)]('('+_0x29c49b[_0x5541ac(0x93)]['source']+')')),console[_0x5541ac(0xc5)](_0x5541ac(0xbf)+_0x29c49b[_0x5541ac(0xd4)][_0x5541ac(0x9d)]+'\x20\x20'+a77_0x5ed719[_0x5541ac(0xd0)]('('+_0x29c49b['apiDir'][_0x5541ac(0xa4)]+')'));const _0x3910c2=_0x29c49b['cookie'][_0x5541ac(0x9d)]?a77_0x5ed719[_0x5541ac(0xdc)](_0x5541ac(0xca)+_0x29c49b[_0x5541ac(0xb4)]['value']['length']+')'):a77_0x5ed719[_0x5541ac(0xd0)](_0x5541ac(0xae));console[_0x5541ac(0xc5)](_0x5541ac(0xd6)+_0x3910c2+'\x20\x20'+a77_0x5ed719[_0x5541ac(0xd0)]('('+_0x29c49b[_0x5541ac(0xb4)]['source']+')'));const _0xc8e981=_0x29c49b[_0x5541ac(0x96)]['value']?a77_0x5ed719[_0x5541ac(0xdc)](_0x5541ac(0xca)+_0x29c49b['accessKey'][_0x5541ac(0x9d)][_0x5541ac(0xc8)]+')'):a77_0x5ed719[_0x5541ac(0xd0)](_0x5541ac(0xae));console[_0x5541ac(0xc5)](_0x5541ac(0xe2)+_0xc8e981+'\x20\x20'+a77_0x5ed719[_0x5541ac(0xd0)]('('+_0x29c49b[_0x5541ac(0x96)][_0x5541ac(0xa4)]+')'));}}console[_0x5541ac(0xc5)](),console[_0x5541ac(0xc5)](a77_0x5ed719[_0x5541ac(0xda)](_0x5541ac(0xd8))),console[_0x5541ac(0xc5)](a77_0x5ed719[_0x5541ac(0xd0)](_0x5541ac(0xa0)[_0x5541ac(0xcf)](0x1e))),console[_0x5541ac(0xc5)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x5541ac(0xc5)](_0x5541ac(0xc2)+getUserDomain()),console[_0x5541ac(0xc5)](_0x5541ac(0xcd)+getRuntimeDomain()),console['log'](),console[_0x5541ac(0xc5)](a77_0x5ed719['bold'](_0x5541ac(0xa1))),console['log'](a77_0x5ed719[_0x5541ac(0xd0)]('\x20\x20─'['repeat'](0x1e)));if(_0x22781e){const _0x10058d=await getIsSessionValid();console[_0x5541ac(0xc5)](_0x5541ac(0xa5)+(_0x10058d?a77_0x5ed719['green']('✓\x20Valid'):a77_0x5ed719['red'](_0x5541ac(0xce))));}else console[_0x5541ac(0xc5)](_0x5541ac(0xa5)+a77_0x5ed719[_0x5541ac(0xaa)](_0x5541ac(0xb7)));return console[_0x5541ac(0xc5)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':a77_0x59cc21(0xb8),'description':a77_0x59cc21(0xd9),'risk':a77_0x59cc21(0xe0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a77_0x310231=a77_0x3bcc;function a77_0x3bcc(_0x413596,_0x1cf1f7){_0x413596=_0x413596-0x1e3;const _0x279041=a77_0x2790();let _0x3bccbc=_0x279041[_0x413596];return _0x3bccbc;}(function(_0x2825d0,_0xd87ef7){const _0x36230=a77_0x3bcc,_0x18b692=_0x2825d0();while(!![]){try{const _0x3c7be4=-parseInt(_0x36230(0x1f1))/0x1+-parseInt(_0x36230(0x205))/0x2*(-parseInt(_0x36230(0x218))/0x3)+parseInt(_0x36230(0x20c))/0x4+-parseInt(_0x36230(0x1e9))/0x5*(-parseInt(_0x36230(0x1fd))/0x6)+parseInt(_0x36230(0x1e6))/0x7+parseInt(_0x36230(0x216))/0x8*(parseInt(_0x36230(0x221))/0x9)+-parseInt(_0x36230(0x211))/0xa;if(_0x3c7be4===_0xd87ef7)break;else _0x18b692['push'](_0x18b692['shift']());}catch(_0x1a1803){_0x18b692['push'](_0x18b692['shift']());}}}(a77_0x2790,0xd29b2));import a77_0x52a1cf 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(_0x3a8b94){const _0x90d621=a77_0x3bcc,_0x5299ae=GIT_COMMIT!==_0x90d621(0x22e)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x90d621(0x20b)](0x0,0xa)+')':VERSION,_0x2c79b8=buildConfigFromFlags({}),_0xc79f55=getCookie();console[_0x90d621(0x1fb)](),console['log'](a77_0x52a1cf[_0x90d621(0x209)](CLI_BIN_NAME+_0x90d621(0x1fe))),console[_0x90d621(0x1fb)](a77_0x52a1cf['gray']('─'[_0x90d621(0x228)](0x32))),console[_0x90d621(0x1fb)](_0x90d621(0x21d)+_0x5299ae),console[_0x90d621(0x1fb)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x90d621(0x1e3)]),console[_0x90d621(0x1fb)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x90d621(0x1f6)]+'\x20'+process['arch']),console[_0x90d621(0x1fb)](),console[_0x90d621(0x1fb)](a77_0x52a1cf[_0x90d621(0x209)](_0x90d621(0x213))),console[_0x90d621(0x1fb)](a77_0x52a1cf['gray'](_0x90d621(0x210)[_0x90d621(0x228)](0x1e)));const _0x367d98=getGlobalConfigPath(),_0x574061=getProjectConfigPath();console[_0x90d621(0x1fb)](_0x90d621(0x220)+(_0x367d98||a77_0x52a1cf['gray']('(not\x20found)'))),console[_0x90d621(0x1fb)](_0x90d621(0x230)+(_0x574061||a77_0x52a1cf['gray'](_0x90d621(0x1f8)))),console[_0x90d621(0x1fb)](),console[_0x90d621(0x1fb)](a77_0x52a1cf['bold'](_0x90d621(0x20f))),console[_0x90d621(0x1fb)](a77_0x52a1cf[_0x90d621(0x1f3)]('\x20\x20─'[_0x90d621(0x228)](0x1e)));const _0x485229=(_0x3386b9,_0x272ae6)=>{const _0x2ea55b=_0x90d621;if(!_0x272ae6){console[_0x2ea55b(0x1fb)]('\x20\x20'+_0x3386b9[_0x2ea55b(0x1ec)](0x11)+'\x20'+a77_0x52a1cf[_0x2ea55b(0x1f3)](_0x2ea55b(0x1ed)));return;}const _0x4eb3fe=inspectCliConfigJsonFile(_0x272ae6);if(_0x4eb3fe[_0x2ea55b(0x20d)]==='ok')console[_0x2ea55b(0x1fb)]('\x20\x20'+_0x3386b9[_0x2ea55b(0x1ec)](0x11)+'\x20'+a77_0x52a1cf[_0x2ea55b(0x21e)]('✓\x20Valid\x20JSON'));else{if(_0x4eb3fe[_0x2ea55b(0x20d)]==='empty')console[_0x2ea55b(0x1fb)]('\x20\x20'+_0x3386b9['padEnd'](0x11)+'\x20'+a77_0x52a1cf['yellow'](_0x2ea55b(0x223)));else _0x4eb3fe['status']===_0x2ea55b(0x219)?console[_0x2ea55b(0x1fb)]('\x20\x20'+_0x3386b9[_0x2ea55b(0x1ec)](0x11)+'\x20'+a77_0x52a1cf[_0x2ea55b(0x1f3)]('(missing)')):(console[_0x2ea55b(0x1fb)]('\x20\x20'+_0x3386b9[_0x2ea55b(0x1ec)](0x11)+'\x20'+a77_0x52a1cf[_0x2ea55b(0x1ff)]('✗\x20Invalid\x20JSON')),console[_0x2ea55b(0x1fb)]('\x20\x20'+''[_0x2ea55b(0x1ec)](0x11)+'\x20'+a77_0x52a1cf[_0x2ea55b(0x1ff)](_0x4eb3fe[_0x2ea55b(0x215)])));}};_0x485229('Global',_0x367d98),_0x485229('Project',_0x574061),console['log'](),console[_0x90d621(0x1fb)](a77_0x52a1cf['bold'](_0x90d621(0x1f9))),console[_0x90d621(0x1fb)](a77_0x52a1cf[_0x90d621(0x1f3)](_0x90d621(0x210)[_0x90d621(0x228)](0x1e))),console[_0x90d621(0x1fb)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x2c79b8['appCode']||a77_0x52a1cf[_0x90d621(0x1ff)](_0x90d621(0x208)))),console[_0x90d621(0x1fb)](_0x90d621(0x201)+_0x2c79b8['env']),console[_0x90d621(0x1fb)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2c79b8['locale']),console[_0x90d621(0x1fb)](_0x90d621(0x1e5)+_0x2c79b8[_0x90d621(0x1ea)]),console[_0x90d621(0x1fb)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x2c79b8[_0x90d621(0x1e7)]||a77_0x52a1cf['gray'](_0x90d621(0x1e4)))),console[_0x90d621(0x1fb)](_0x90d621(0x207)+(_0x2c79b8[_0x90d621(0x1ee)]||a77_0x52a1cf['gray'](_0x90d621(0x1e4)))),console[_0x90d621(0x1fb)](_0x90d621(0x225)+(_0x2c79b8[_0x90d621(0x1f7)]||a77_0x52a1cf[_0x90d621(0x1f3)](_0x90d621(0x1e4)))),console[_0x90d621(0x1fb)](_0x90d621(0x22d)+(_0x2c79b8[_0x90d621(0x232)]||a77_0x52a1cf['gray']('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x90d621(0x232)]+')'))),console[_0x90d621(0x1fb)](_0x90d621(0x1fa)+(_0x2c79b8[_0x90d621(0x229)]??a77_0x52a1cf[_0x90d621(0x1f3)](_0x90d621(0x1fc)))),console[_0x90d621(0x1fb)](_0x90d621(0x224)+_0x2c79b8[_0x90d621(0x1e8)]),console['log'](_0x90d621(0x20e)+_0x2c79b8[_0x90d621(0x214)]),console[_0x90d621(0x1fb)](_0x90d621(0x21b)+(_0x2c79b8[_0x90d621(0x204)]?a77_0x52a1cf['green']('(set,\x20length='+_0x2c79b8[_0x90d621(0x204)]['length']+')'):_0xc79f55?a77_0x52a1cf[_0x90d621(0x21e)](_0x90d621(0x22c)+_0xc79f55[_0x90d621(0x21c)]+')'):a77_0x52a1cf[_0x90d621(0x1f3)](_0x90d621(0x1e4))));const _0x649e84=Object['keys'](_0x2c79b8[_0x90d621(0x1f2)]);if(_0x649e84[_0x90d621(0x21c)]>0x0){console[_0x90d621(0x1fb)](),console['log'](a77_0x52a1cf['bold'](_0x90d621(0x203))),console[_0x90d621(0x1fb)](a77_0x52a1cf['gray'](_0x90d621(0x210)[_0x90d621(0x228)](0x1e)));for(const _0x3ea451 of _0x649e84){const _0x55d0cc=_0x2c79b8[_0x90d621(0x1f2)][_0x3ea451],_0x25b1e5=_0x3ea451===_0x2c79b8[_0x90d621(0x1e7)],_0x35c3b3=_0x3ea451===_0x2c79b8[_0x90d621(0x1ee)],_0x6d6e67=_0x35c3b3?a77_0x52a1cf['green']('\x20←\x20current'):'',_0x3487e7=_0x25b1e5?_0x90d621(0x22b):'';console[_0x90d621(0x1fb)]('\x20\x20'+_0x3ea451+_0x3487e7+_0x6d6e67),console[_0x90d621(0x1fb)](_0x90d621(0x1eb)+_0x55d0cc[_0x90d621(0x222)]);const _0x4ddb7a=buildAppDoctorFields(_0x55d0cc,{'env':_0x2c79b8['env'],'apiDir':_0x2c79b8[_0x90d621(0x231)]['apiDir']||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0x2c79b8[_0x90d621(0x204)]||_0xc79f55||undefined,'accessKey':_0x2c79b8[_0x90d621(0x233)]});console[_0x90d621(0x1fb)](_0x90d621(0x200)+_0x4ddb7a[_0x90d621(0x212)][_0x90d621(0x206)]+'\x20\x20'+a77_0x52a1cf[_0x90d621(0x1f3)]('('+_0x4ddb7a[_0x90d621(0x212)][_0x90d621(0x21f)]+')')),console[_0x90d621(0x1fb)](_0x90d621(0x1ef)+_0x4ddb7a[_0x90d621(0x1ea)][_0x90d621(0x206)]+'\x20\x20'+a77_0x52a1cf['gray']('('+_0x4ddb7a[_0x90d621(0x1ea)][_0x90d621(0x21f)]+')'));const _0x11d3e4=_0x4ddb7a[_0x90d621(0x204)][_0x90d621(0x206)]?a77_0x52a1cf[_0x90d621(0x21e)]('(set,\x20length='+_0x4ddb7a['cookie'][_0x90d621(0x206)][_0x90d621(0x21c)]+')'):a77_0x52a1cf[_0x90d621(0x1f3)](_0x90d621(0x1e4));console['log'](_0x90d621(0x21a)+_0x11d3e4+'\x20\x20'+a77_0x52a1cf[_0x90d621(0x1f3)]('('+_0x4ddb7a[_0x90d621(0x204)]['source']+')'));const _0x274bdb=_0x4ddb7a['accessKey'][_0x90d621(0x206)]?a77_0x52a1cf[_0x90d621(0x21e)](_0x90d621(0x226)+_0x4ddb7a['accessKey'][_0x90d621(0x206)][_0x90d621(0x21c)]+')'):a77_0x52a1cf[_0x90d621(0x1f3)]('(none)');console[_0x90d621(0x1fb)](_0x90d621(0x227)+_0x274bdb+'\x20\x20'+a77_0x52a1cf[_0x90d621(0x1f3)]('('+_0x4ddb7a[_0x90d621(0x233)][_0x90d621(0x21f)]+')'));}}console[_0x90d621(0x1fb)](),console[_0x90d621(0x1fb)](a77_0x52a1cf[_0x90d621(0x209)](_0x90d621(0x22a))),console[_0x90d621(0x1fb)](a77_0x52a1cf[_0x90d621(0x1f3)](_0x90d621(0x210)['repeat'](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x90d621(0x1fb)](_0x90d621(0x22f)+getUserDomain()),console['log'](_0x90d621(0x20a)+getRuntimeDomain()),console[_0x90d621(0x1fb)](),console['log'](a77_0x52a1cf[_0x90d621(0x209)](_0x90d621(0x1f0))),console[_0x90d621(0x1fb)](a77_0x52a1cf[_0x90d621(0x1f3)]('\x20\x20─'[_0x90d621(0x228)](0x1e)));if(_0xc79f55){const _0x404c4b=await getIsSessionValid();console['log'](_0x90d621(0x217)+(_0x404c4b?a77_0x52a1cf[_0x90d621(0x21e)]('✓\x20Valid'):a77_0x52a1cf[_0x90d621(0x1ff)](_0x90d621(0x1f5))));}else console['log'](_0x90d621(0x217)+a77_0x52a1cf[_0x90d621(0x1ff)]('✗\x20Not\x20logged\x20in'));return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a77_0x310231(0x1f4),'command':a77_0x310231(0x202),'description':'Diagnose\x20CLI\x20configuration\x20and\x20connectivity','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};function a77_0x2790(){const _0x4d6f7e=['5271664npdLGf','status','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','\x20\x20─','51879580rtHxzH','env','\x20\x20Config\x20Files','verbose','message','6304vYIyxo','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','4732473IZNObf','missing','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','green','source','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','12204BniqJg','appcode','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20explicitAppName:\x20','(set,\x20length=','\x20\x20\x20\x20accessKey:\x20\x20','repeat','pageSize','\x20\x20API\x20Endpoints','\x20(default)','(set\x20via\x20file,\x20length=','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','unknown','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','raw','format','accessKey','version','(none)','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','7870415ZsBlHw','defaultApp','riskLevel','6815tpXnnC','apiDir','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','padEnd','(no\x20file)','currentApp','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20\x20Auth','737341bhguPS','apps','gray','doctor','✗\x20Expired','platform','explicitAppName','(not\x20found)','\x20\x20Merged\x20Config','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','log','(default)','7482vQpAwy','\x20doctor','red','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','check','\x20\x20Apps','cookie','2SfdZpH','value','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','(not\x20set)','bold','\x20\x20runtimeDomain:\x20\x20\x20','slice'];a77_0x2790=function(){return _0x4d6f7e;};return a77_0x2790();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a78_0x2f49(){const _0x5589a5=['\x0a✓\x20Successfully\x20initialized\x20','str','\x20config','Auto-confirm\x20prompts','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','defaultApp','nonInteractive','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','run','20JWnuQb','env','Target\x20environment','toLocaleString','project','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','init','appCode','\x20\x20Apps:\x20','appcode','global','\x20\x20Config:\x20','129906gzCNhP','检测到旧配置文件,正在自动升级...\x0a','14tQycCP','flagMissing','log','Use\x20`','Write\x20to\x20global\x20config\x20instead\x20of\x20project','3vfFOuA','valid','message','yes','2947554JXTRDs','bool','550932yRpOue','1498860vybexa','some','boolean','string','production','cwd','join','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','validation','../../commands/project/init.js','383848qrEeWq','33DuviYg','App\x20code\x20to\x20initialize\x20with','1153150QTYbId','write','323047qobpSh'];a78_0x2f49=function(){return _0x5589a5;};return a78_0x2f49();}const a78_0x14f9a2=a78_0x31ac;(function(_0x177f46,_0xab3204){const _0x49818c=a78_0x31ac,_0x33426b=_0x177f46();while(!![]){try{const _0x14e363=parseInt(_0x49818c(0x1fd))/0x1+-parseInt(_0x49818c(0x214))/0x2*(parseInt(_0x49818c(0x21b))/0x3)+parseInt(_0x49818c(0x222))/0x4+-parseInt(_0x49818c(0x208))/0x5*(parseInt(_0x49818c(0x221))/0x6)+-parseInt(_0x49818c(0x216))/0x7*(parseInt(_0x49818c(0x1f8))/0x8)+-parseInt(_0x49818c(0x21f))/0x9+parseInt(_0x49818c(0x1fb))/0xa*(parseInt(_0x49818c(0x1f9))/0xb);if(_0x14e363===_0xab3204)break;else _0x33426b['push'](_0x33426b['shift']());}catch(_0x537df5){_0x33426b['push'](_0x33426b['shift']());}}}(a78_0x2f49,0x2de5e));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_0x31ac(_0x2365a7,_0x4dedc8){_0x2365a7=_0x2365a7-0x1f4;const _0x2f49b1=a78_0x2f49();let _0x31ace9=_0x2f49b1[_0x2365a7];return _0x31ace9;}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(_0x2f6bf8){return{'appCode':_0x2f6bf8,'appName':_0x2f6bf8};}function writeInitConfig(_0x5e174b,_0x4cd29f,_0x17a7e2){const _0x3dfcb1=a78_0x31ac,_0x236f99=resolveWriteConfigPath(_0x5e174b),_0x4f9f81=buildCanonicalProjectConfig({},{'appCodes':_0x4cd29f['map'](_0x359fed=>_0x359fed[_0x3dfcb1(0x20f)]),'env':_0x17a7e2,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x3dfcb1(0x20b)]()}});writeConfigFile(_0x236f99,_0x4f9f81);const _0x3d0e15=_0x5e174b==='global'?_0x3dfcb1(0x212):'project';console[_0x3dfcb1(0x218)](_0x3dfcb1(0x1fe)+_0x3d0e15+_0x3dfcb1(0x200)),console[_0x3dfcb1(0x218)](_0x3dfcb1(0x210)+_0x4cd29f['map'](_0x81545c=>_0x81545c[_0x3dfcb1(0x20f)])[_0x3dfcb1(0x1f4)](',\x20')),console[_0x3dfcb1(0x218)]('\x20\x20Default:\x20'+_0x4f9f81[_0x3dfcb1(0x204)]),console[_0x3dfcb1(0x218)]('\x20\x20Env:\x20'+_0x4f9f81[_0x3dfcb1(0x209)]),console[_0x3dfcb1(0x218)](_0x3dfcb1(0x213)+_0x236f99);}async function runSmartInit(_0x15dd59){const _0xd230e8=a78_0x31ac,_0x109328=process[_0xd230e8(0x227)](),_0x36473e=_0x15dd59[_0xd230e8(0x220)](_0xd230e8(0x212))?_0xd230e8(0x212):_0xd230e8(0x20c),_0x4a1d39=_0x15dd59[_0xd230e8(0x1ff)]('env')||_0xd230e8(0x226),_0x4c04c4=_0x15dd59[_0xd230e8(0x1ff)]('appcode')||undefined,_0x3aebd4=_0x15dd59[_0xd230e8(0x220)](_0xd230e8(0x20c));if(_0x3aebd4){const {initConfig:_0x18edc8}=await import(_0xd230e8(0x1f7));return _0x18edc8({'appcode':_0x4c04c4,'env':_0x4a1d39,'autoYes':_0x15dd59[_0xd230e8(0x220)]('yes')});}if(_0x36473e===_0xd230e8(0x20c)){const _0x49a16b=existsSync(resolve(_0x109328,NEW_CONFIG_NAME)),_0x1074f7=LEGACY_CONFIG_NAMES[_0xd230e8(0x223)](_0x4a95da=>existsSync(resolve(_0x109328,_0x4a95da)));if(_0x1074f7&&!_0x49a16b)return console[_0xd230e8(0x218)](_0xd230e8(0x215)),upgradeApp(_0x15dd59['nonInteractive'],{'yes':_0x15dd59['bool'](_0xd230e8(0x21e))});if(_0x49a16b)throw CliErrors['validation'](_0xd230e8(0x202),_0xd230e8(0x219)+CLI_BIN_NAME+_0xd230e8(0x206));}if(_0x4c04c4){const _0x4caef3=validateAppcode(_0x4c04c4);if(!_0x4caef3[_0xd230e8(0x21c)])throw CliErrors[_0xd230e8(0x1f6)](_0x4caef3[_0xd230e8(0x21d)]);writeInitConfig(_0x36473e,[syntheticApp(_0x4c04c4)],_0x4a1d39);return;}if(_0x15dd59[_0xd230e8(0x205)])throw CliErrors[_0xd230e8(0x217)](_0xd230e8(0x211),'Usage:\x20'+CLI_BIN_NAME+_0xd230e8(0x20d));const _0x2a9397=getCookie(),_0x569437=await selectMultipleApps(_0x2a9397),_0x3b7fe0=_0x569437==='custom'?[syntheticApp(await promptCustomAppcode())]:_0x569437;writeInitConfig(_0x36473e,_0x3b7fe0,_0x4a1d39);}const initFlags=[{'name':a78_0x14f9a2(0x212),'type':a78_0x14f9a2(0x224),'description':a78_0x14f9a2(0x21a),'default':![]},{'name':a78_0x14f9a2(0x209),'type':a78_0x14f9a2(0x225),'description':a78_0x14f9a2(0x20a),'default':a78_0x14f9a2(0x226),'enum':[...RABETBASE_ENV_VALUES]},{'name':a78_0x14f9a2(0x211),'type':a78_0x14f9a2(0x225),'description':a78_0x14f9a2(0x1fa)},{'name':a78_0x14f9a2(0x20c),'type':'boolean','description':a78_0x14f9a2(0x203),'default':![]},{'name':a78_0x14f9a2(0x21e),'type':a78_0x14f9a2(0x224),'description':a78_0x14f9a2(0x201),'default':![]}];export const initDefinitions=[{'service':a78_0x14f9a2(0x20e),'command':a78_0x14f9a2(0x207),'description':a78_0x14f9a2(0x1f5),'risk':a78_0x14f9a2(0x1fc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x5b1265){return await runSmartInit(_0x5b1265),{'ok':!![]};}}];
|