@lovrabet/rabetbase-cli 2.1.6 → 2.1.7-beta.2
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/delete.js +1 -0
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -0
- package/lib/commands/dataset/link-delete.js +1 -0
- package/lib/commands/dataset/link-shared.js +1 -0
- package/lib/commands/dataset/link-update.js +1 -0
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -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 -0
- package/lib/commands/issue/report.js +1 -0
- 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/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 -0
- 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/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0x3032fc=a57_0x372a;(function(_0x46163c,_0x48e44a){const _0x38f50a=a57_0x372a,_0x250086=_0x46163c();while(!![]){try{const _0x156abe=-parseInt(_0x38f50a(0x1e4))/0x1*(parseInt(_0x38f50a(0x1de))/0x2)+parseInt(_0x38f50a(0x1eb))/0x3*(-parseInt(_0x38f50a(0x1dd))/0x4)+-parseInt(_0x38f50a(0x201))/0x5*(parseInt(_0x38f50a(0x1fd))/0x6)+parseInt(_0x38f50a(0x202))/0x7+parseInt(_0x38f50a(0x1f4))/0x8*(parseInt(_0x38f50a(0x208))/0x9)+-parseInt(_0x38f50a(0x1e2))/0xa+parseInt(_0x38f50a(0x20c))/0xb;if(_0x156abe===_0x48e44a)break;else _0x250086['push'](_0x250086['shift']());}catch(_0x16416c){_0x250086['push'](_0x250086['shift']());}}}(a57_0x47af,0x19922));function a57_0x47af(){const _0x1ce963=['808140aHyiRh','\x20database(s),\x20','518pyLvVm','dataset','ONE_TO_MANY','verbose','tableName','includes','Fetched\x20link\x20graph\x20for\x20','3RxzGum','tableComment','\x20dataset(s),\x20','string','relations','Filter\x20by\x20database\x20—\x20accepts\x20a\x20numeric\x20dblink\x20ID\x20or\x20a\x20database\x20name\x20(e.g.\x20ecommerce_db).\x20','appCode','filter','joinType','1808TOuubn','bool','Get\x20the\x20link\x20graph\x20(entity-relationship)\x20for\x20the\x20app\x27s\x20datasets.\x20','get','Returns\x20datasets,\x20fields,\x20and\x20explicit\x20relation\x20selectors\x20(fromTable/fromColumn/toTable/toColumn).\x20','length','isPrimaryKey','map','Ideal\x20for\x20AI\x20to\x20understand\x20the\x20full\x20data\x20model\x20before\x20writing\x20queries,\x20BFF\x20scripts,\x20or\x20dataset\x20link\x20mutations.','30qZytOs','Defaults\x20to\x20auto-detect\x20all\x20linked\x20databases.','dbId','toUpperCase','150295ymZOdP','186669lyxtVK','toDataset','LEFT','fromField','Link\x20graph:\x20','MANY_TO_MANY','846HWAZNy','datasetName','meta','datasetCode','5780115sIgowE','fields','datasets','reduce','links','displayName','relationCount','isForeignKey','datasetCount','name','614452kARXax','324bVIwec','Return\x20full\x20raw\x20ER\x20response\x20from\x20API','dbName','stats'];a57_0x47af=function(){return _0x1ce963;};return a57_0x47af();}import{getErConfig}from'../../core/api-client.js';import{resolveDb}from'../../core/db-resolver.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const datasetLinks={'service':a57_0x3032fc(0x1e5),'command':a57_0x3032fc(0x210),'description':a57_0x3032fc(0x1f6)+a57_0x3032fc(0x1f8)+a57_0x3032fc(0x1fc),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'db','type':a57_0x3032fc(0x1ee),'description':a57_0x3032fc(0x1f0)+a57_0x3032fc(0x1fe)},{'name':a57_0x3032fc(0x1e7),'type':'boolean','description':a57_0x3032fc(0x1df)}],async 'execute'(_0x5564ab){const _0x1cea6e=a57_0x3032fc,_0x1f7e0e=_0x5564ab[_0x1cea6e(0x1f5)](_0x1cea6e(0x1e7)),{resolved:_0x345056,error:_0x15f9ac}=await resolveDb(_0x5564ab[_0x1cea6e(0x1f1)],_0x5564ab['str']('db')||undefined);if(_0x15f9ac)return{'ok':![],'message':_0x15f9ac};const _0x3ed286=_0x345056['map'](_0x28f27e=>_0x28f27e[_0x1cea6e(0x1ff)]),_0x228ce5=await Promise['all'](_0x3ed286[_0x1cea6e(0x1fb)](_0x16646f=>getErConfig(_0x5564ab[_0x1cea6e(0x1f1)],_0x16646f)));if(_0x1f7e0e)return{'ok':!![],'data':_0x228ce5[_0x1cea6e(0x1f9)]===0x1?_0x228ce5[0x0]:_0x228ce5,'message':_0x1cea6e(0x1ea)+_0x3ed286[_0x1cea6e(0x1f9)]+'\x20database(s)'};const _0x2cd5cf=_0x228ce5['map'](_0x46a491=>{const _0x26b399=_0x1cea6e,_0x3337af=new Map((_0x46a491['datasets']??[])[_0x26b399(0x1fb)](_0x146976=>[_0x146976[_0x26b399(0x20b)],_0x146976['tableName']])),_0x3b0652=(_0x46a491[_0x26b399(0x20e)]??[])[_0x26b399(0x1fb)](_0x1fd4af=>{const _0x81464f=_0x26b399,_0x3c4945=_0x1fd4af[_0x81464f(0x20d)]?.[_0x81464f(0x1f2)](_0x4fe410=>_0x4fe410[_0x81464f(0x1fa)])[_0x81464f(0x1fb)](_0x51cb69=>_0x51cb69[_0x81464f(0x1dc)])??[],_0x55676d=_0x1fd4af[_0x81464f(0x20d)]?.[_0x81464f(0x1f2)](_0x3a6ce3=>_0x3a6ce3[_0x81464f(0x213)])[_0x81464f(0x1fb)](_0x514ac9=>_0x514ac9[_0x81464f(0x1dc)])??[],_0xe28344=(_0x1fd4af[_0x81464f(0x1ef)]??[])['flatMap'](_0x3512b7=>{const _0x1be525=_0x81464f;if(!_0x3512b7[_0x1be525(0x205)]||!_0x3512b7[_0x1be525(0x203)]||!_0x3512b7['toField'])return[];const _0x32b624=_0x1fd4af['tableName'],_0xfbb06c=_0x3512b7[_0x1be525(0x205)],_0x526de6=_0x3337af[_0x1be525(0x1f7)](_0x3512b7[_0x1be525(0x203)]);if(!_0x526de6)return[];const _0x5af2c2=_0x3512b7['toField'],_0x10f3c8=normalizeCardinality(_0x3512b7['joinType']);return[{'fromTable':_0x32b624,'fromColumn':_0xfbb06c,'toTable':_0x526de6,'toColumn':_0x5af2c2,'cardinality':_0x10f3c8,'from':_0xfbb06c,'toDataset':_0x3512b7['toDatasetName'],'toCode':_0x3512b7['toDataset'],'toField':_0x5af2c2,'joinType':_0x3512b7[_0x1be525(0x1f3)]||_0x1be525(0x204)}];});return{'id':_0x1fd4af['datasetId'],'name':_0x1fd4af[_0x81464f(0x209)],'code':_0x1fd4af[_0x81464f(0x20b)],'table':_0x1fd4af[_0x81464f(0x1e8)],'comment':_0x1fd4af[_0x81464f(0x1ec)]||undefined,'fields':(_0x1fd4af[_0x81464f(0x20d)]??[])['map'](_0xf99fca=>({'name':_0xf99fca[_0x81464f(0x1dc)],'displayName':_0xf99fca[_0x81464f(0x211)],'type':_0xf99fca['dbType'],'pk':_0xf99fca['isPrimaryKey'],'fk':_0xf99fca['isForeignKey']})),'relations':_0xe28344,'stats':{'fieldCount':_0x1fd4af[_0x81464f(0x20d)]?.[_0x81464f(0x1f9)]??0x0,'pkCount':_0x3c4945['length'],'fkCount':_0x55676d['length'],'relationCount':_0xe28344[_0x81464f(0x1f9)]}};}),_0xe75193=_0x3b0652[_0x26b399(0x1f2)](_0x451658=>_0x451658[_0x26b399(0x1e1)][_0x26b399(0x212)]>0x0)[_0x26b399(0x1fb)](_0x37d863=>_0x37d863[_0x26b399(0x1dc)]);return{'db':_0x46a491[_0x26b399(0x20a)]?.[_0x26b399(0x1e0)],'dbId':_0x46a491[_0x26b399(0x20a)]?.['dbId'],'appCode':_0x46a491[_0x26b399(0x20a)]?.[_0x26b399(0x1f1)],'datasetCount':_0x3b0652[_0x26b399(0x1f9)],'connectedDatasets':_0xe75193,'datasets':_0x3b0652};}),_0x40527a=_0x2cd5cf[_0x1cea6e(0x20f)]((_0x39f1d2,_0x9ba632)=>_0x39f1d2+_0x9ba632[_0x1cea6e(0x1db)],0x0),_0x2b5b87=_0x2cd5cf['reduce']((_0x4d9a6b,_0xbe251f)=>_0x4d9a6b+_0xbe251f[_0x1cea6e(0x20e)][_0x1cea6e(0x20f)]((_0xa61a6a,_0x5eb153)=>_0xa61a6a+_0x5eb153['stats']['relationCount'],0x0),0x0);return{'ok':!![],'data':_0x2cd5cf['length']===0x1?_0x2cd5cf[0x0]:{'databases':_0x2cd5cf},'message':_0x1cea6e(0x206)+_0x2cd5cf[_0x1cea6e(0x1f9)]+_0x1cea6e(0x1e3)+_0x40527a+_0x1cea6e(0x1ed)+_0x2b5b87+'\x20relation(s)'};}};function a57_0x372a(_0x7c4881,_0xd05480){_0x7c4881=_0x7c4881-0x1db;const _0x47af58=a57_0x47af();let _0x372a49=_0x47af58[_0x7c4881];return _0x372a49;}function normalizeCardinality(_0xe30e93){const _0x458740=a57_0x3032fc,_0x52eed7=_0xe30e93?.['trim']()[_0x458740(0x200)]();if(!_0x52eed7)return undefined;return['ONE_TO_ONE',_0x458740(0x1e6),'MANY_TO_ONE',_0x458740(0x207)][_0x458740(0x1e9)](_0x52eed7)?_0x52eed7:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a58_0x32ad(_0x42aaf5,_0x30794c){_0x42aaf5=_0x42aaf5-0x1d1;const _0x21f0d4=a58_0x21f0();let _0x32ad2a=_0x21f0d4[_0x42aaf5];return _0x32ad2a;}function a58_0x21f0(){const _0x4f99eb=['27256hVCiOo','301PSAkjc','63cFMojQ','2424447VMPKKG','tableName','code','5268ExUDIM','split','dbtableConfig','dbName','Found\x20','76811ZldZRT','3361712Unftef','read','pkField','2515260bnweus','2048290kSLnBQ','allFields','\x20dataset(s)','list','description','length','11GHzrYE','appCode','List\x20all\x20datasets\x20with\x20metadata','366RxygCu','str','dataset','datasetKey','name','string'];a58_0x21f0=function(){return _0x4f99eb;};return a58_0x21f0();}const a58_0x1c1b72=a58_0x32ad;(function(_0x234805,_0x4aa401){const _0x264c6b=a58_0x32ad,_0x19a899=_0x234805();while(!![]){try{const _0x4dd59=parseInt(_0x264c6b(0x1e4))/0x1*(-parseInt(_0x264c6b(0x1e9))/0x2)+parseInt(_0x264c6b(0x1e6))/0x3+parseInt(_0x264c6b(0x1ef))/0x4+parseInt(_0x264c6b(0x1d3))/0x5+parseInt(_0x264c6b(0x1dd))/0x6*(-parseInt(_0x264c6b(0x1ee))/0x7)+-parseInt(_0x264c6b(0x1e3))/0x8*(parseInt(_0x264c6b(0x1e5))/0x9)+parseInt(_0x264c6b(0x1d4))/0xa*(-parseInt(_0x264c6b(0x1da))/0xb);if(_0x4dd59===_0x4aa401)break;else _0x19a899['push'](_0x19a899['shift']());}catch(_0x3c7959){_0x19a899['push'](_0x19a899['shift']());}}}(a58_0x21f0,0x707dc));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const datasetList={'service':a58_0x1c1b72(0x1df),'command':a58_0x1c1b72(0x1d7),'description':a58_0x1c1b72(0x1dc),'risk':a58_0x1c1b72(0x1d1),'flags':[{'name':a58_0x1c1b72(0x1e1),'type':a58_0x1c1b72(0x1e2),'description':'Filter\x20datasets\x20by\x20name\x20(server-side\x20fuzzy\x20match)'},CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4fcd0c){const _0x25e41a=a58_0x1c1b72,_0x58658f=_0x4fcd0c[_0x25e41a(0x1de)](_0x25e41a(0x1e1)),_0x3d715b=_0x4fcd0c[_0x25e41a(0x1de)](_0x25e41a(0x1e8)),_0x41d125=await listDatasets(_0x4fcd0c[_0x25e41a(0x1db)],{..._0x58658f&&{'name':_0x58658f},..._0x3d715b&&{'code':_0x3d715b}}),_0x2b942c=_0x41d125['map'](_0x2f442c=>{const _0x4d3eed=_0x25e41a,_0x5a9e39=_0x2f442c[_0x4d3eed(0x1eb)]??{};return{'id':_0x2f442c['id'],'name':_0x2f442c[_0x4d3eed(0x1e1)],'code':_0x2f442c['code'],'description':_0x2f442c[_0x4d3eed(0x1d8)],'source':_0x2f442c['source'],'db':_0x5a9e39[_0x4d3eed(0x1ec)],'table':_0x5a9e39[_0x4d3eed(0x1e7)],'datasetKey':_0x5a9e39[_0x4d3eed(0x1e0)],'pk':_0x5a9e39[_0x4d3eed(0x1d2)],'fields':_0x5a9e39['allFields']?_0x5a9e39[_0x4d3eed(0x1d5)][_0x4d3eed(0x1ea)](',')['map'](_0x3603aa=>_0x3603aa['trim']()):[]};});return{'ok':!![],'data':{'total':_0x2b942c[_0x25e41a(0x1d9)],'datasets':_0x2b942c},'message':_0x25e41a(0x1ed)+_0x2b942c[_0x25e41a(0x1d9)]+_0x25e41a(0x1d6)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a59_0x3351(){const _0x97774=['enabled','192903QlXTJS','method','map','2lvjEng','code','operations','678DsyVsk','1009232sLRPQX','16XhTzkv','3617937OvkfZY','4550205KRdRsY','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','string','Get\x20operations\x20for\x20a\x20dataset,\x20optionally\x20with\x20full\x20detail\x20for\x20one\x20operation','33410OCJqau','686638yWJqbz','dataset','Operation\x20name\x20to\x20get\x20full\x20detail\x20(e.g.\x20filter,\x20getOne,\x20create)','bool','operation','51289oiKbyX','name','8723PohohX','verbose','alias'];a59_0x3351=function(){return _0x97774;};return a59_0x3351();}const a59_0x395d9e=a59_0x18f4;(function(_0xe741ee,_0x3a81e0){const _0x27fa59=a59_0x18f4,_0x372152=_0xe741ee();while(!![]){try{const _0x4d149e=parseInt(_0x27fa59(0x11d))/0x1+parseInt(_0x27fa59(0x111))/0x2*(-parseInt(_0x27fa59(0x10e))/0x3)+-parseInt(_0x27fa59(0x115))/0x4+-parseInt(_0x27fa59(0x118))/0x5+-parseInt(_0x27fa59(0x114))/0x6*(parseInt(_0x27fa59(0x108))/0x7)+-parseInt(_0x27fa59(0x116))/0x8*(parseInt(_0x27fa59(0x117))/0x9)+parseInt(_0x27fa59(0x11c))/0xa*(parseInt(_0x27fa59(0x10a))/0xb);if(_0x4d149e===_0x3a81e0)break;else _0x372152['push'](_0x372152['shift']());}catch(_0x288a2e){_0x372152['push'](_0x372152['shift']());}}}(a59_0x3351,0x74918));import{getDatasetOperations,getOperationDetail}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a59_0x18f4(_0x44d8b5,_0x349dba){_0x44d8b5=_0x44d8b5-0x104;const _0x335112=a59_0x3351();let _0x18f419=_0x335112[_0x44d8b5];return _0x18f419;}export const datasetOperations={'service':a59_0x395d9e(0x104),'command':a59_0x395d9e(0x113),'description':a59_0x395d9e(0x11b),'risk':'read','flags':[CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL,{'name':a59_0x395d9e(0x10c),'type':a59_0x395d9e(0x11a),'description':a59_0x395d9e(0x119)},{'name':a59_0x395d9e(0x107),'type':'string','description':a59_0x395d9e(0x105)},{'name':a59_0x395d9e(0x10b),'type':'boolean','description':'Return\x20full\x20operation\x20objects\x20including\x20requestFields\x20and\x20responseFields'}],async 'execute'(_0x1be91a){const _0x43fc03=a59_0x395d9e,_0x1ec0bc=_0x1be91a['str'](_0x43fc03(0x112)),_0x2d3c75=_0x1be91a['str']('operation'),_0x3a896b=_0x1be91a[_0x43fc03(0x106)]('verbose');if(_0x2d3c75){const {dataset:_0x2095f2,operation:_0x3b240c}=await getOperationDetail(_0x1be91a['appCode'],_0x1ec0bc,_0x2d3c75);return{'ok':!![],'data':{'dataset':_0x2095f2,'operation':_0x3b240c}};}const {dataset:_0xe9e11,operations:_0x422b39}=await getDatasetOperations(_0x1ec0bc);return{'ok':!![],'data':{'dataset':_0xe9e11,'total':_0x422b39['length'],'operations':_0x3a896b?_0x422b39:_0x422b39[_0x43fc03(0x110)](_0x145936=>({'name':_0x145936[_0x43fc03(0x109)],'displayName':_0x145936['displayName'],'type':_0x145936['type'],'method':_0x145936[_0x43fc03(0x10f)],'enabled':_0x145936[_0x43fc03(0x10d)]}))}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x298d5f=a60_0x278d;function a60_0x278d(_0x5c8135,_0x23bd76){_0x5c8135=_0x5c8135-0x167;const _0x310098=a60_0x3100();let _0x278d41=_0x310098[_0x5c8135];return _0x278d41;}(function(_0x4b0582,_0x4c549d){const _0x4c2b43=a60_0x278d,_0x4a2b3a=_0x4b0582();while(!![]){try{const _0x5222de=-parseInt(_0x4c2b43(0x178))/0x1*(-parseInt(_0x4c2b43(0x168))/0x2)+parseInt(_0x4c2b43(0x16a))/0x3*(parseInt(_0x4c2b43(0x16f))/0x4)+-parseInt(_0x4c2b43(0x174))/0x5+parseInt(_0x4c2b43(0x179))/0x6+-parseInt(_0x4c2b43(0x177))/0x7+parseInt(_0x4c2b43(0x173))/0x8*(parseInt(_0x4c2b43(0x176))/0x9)+-parseInt(_0x4c2b43(0x16e))/0xa;if(_0x5222de===_0x4c549d)break;else _0x4a2b3a['push'](_0x4a2b3a['shift']());}catch(_0x539c23){_0x4a2b3a['push'](_0x4a2b3a['shift']());}}}(a60_0x3100,0xb6587));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':a60_0x298d5f(0x16b),'description':a60_0x298d5f(0x175),'risk':a60_0x298d5f(0x167),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a60_0x298d5f(0x16d),'type':'string','description':a60_0x298d5f(0x172)}],async 'execute'(_0x4f155b){const _0x5da9d3=a60_0x298d5f,_0x277682=_0x4f155b[_0x5da9d3(0x17a)]('id');let _0x515e0c=_0x4f155b[_0x5da9d3(0x17b)](_0x5da9d3(0x16d))||undefined;if(!_0x515e0c){const _0x52f530=await getDbLinkInfo(_0x277682);_0x515e0c=_0x52f530[_0x5da9d3(0x16c)]??undefined;if(!_0x515e0c)throw CliErrors['validation'](_0x5da9d3(0x169),_0x5da9d3(0x171));}return await cancelDbAnalysis(_0x515e0c),{'ok':!![],'data':{'dbLinkId':_0x277682,'planId':_0x515e0c},'message':_0x5da9d3(0x170)+_0x515e0c};}};function a60_0x3100(){const _0x1ee34a=['7604093pFMsKI','1553FceUwo','6012510QWhyAB','num','str','write','1650zsaGcW','No\x20latestAnalysisTraceId\x20on\x20this\x20link.\x20Pass\x20--plan\x20<traceId>\x20from\x20db\x20list/detail.','3IfLLNC','analyze-cancel','latestAnalysisTraceId','plan','7616030BoRNzX','2600212qCFMyu','Cancel\x20requested\x20for\x20plan\x20','Analysis\x20may\x20already\x20be\x20finished\x20or\x20never\x20started.','Analysis\x20plan\x20/\x20trace\x20id\x20(optional\x20—\x20defaults\x20to\x20latest\x20trace\x20from\x20db\x20list/detail)','8xADKEA','3072415uwVDTq','Cancel\x20a\x20running\x20schema\x20analysis.\x20Omit\x20--plan\x20to\x20use\x20latestAnalysisTraceId\x20from\x20the\x20link','2483181SgIeKp'];a60_0x3100=function(){return _0x1ee34a;};return a60_0x3100();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x43660a=a61_0x2bf9;(function(_0x4c6d94,_0x4c6b1e){const _0x2a4b31=a61_0x2bf9,_0x5554c6=_0x4c6d94();while(!![]){try{const _0x4f9836=-parseInt(_0x2a4b31(0x115))/0x1+-parseInt(_0x2a4b31(0x10d))/0x2+-parseInt(_0x2a4b31(0x10f))/0x3+-parseInt(_0x2a4b31(0x116))/0x4*(-parseInt(_0x2a4b31(0x114))/0x5)+parseInt(_0x2a4b31(0x106))/0x6*(parseInt(_0x2a4b31(0x10a))/0x7)+-parseInt(_0x2a4b31(0x107))/0x8*(-parseInt(_0x2a4b31(0x110))/0x9)+parseInt(_0x2a4b31(0x108))/0xa;if(_0x4f9836===_0x4c6b1e)break;else _0x5554c6['push'](_0x5554c6['shift']());}catch(_0x3d714a){_0x5554c6['push'](_0x5554c6['shift']());}}}(a61_0x2892,0xe7e12));import{startDbAnalysis}from'../../core/api-client.js';function a61_0x2bf9(_0x27582b,_0x27548d){_0x27582b=_0x27582b-0x104;const _0x289200=a61_0x2892();let _0x2bf984=_0x289200[_0x27582b];return _0x2bf984;}function a61_0x2892(){const _0x49b955=['19128180pTtyVJ','num','66892iaSgYk','Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','analyze-start','3312294sbDlBX','trim','5627667TImFFm','729ctcksT','string','Started\x20analysis\x20for\x20db\x20link\x20','tables','80BiruID','1708103TcaFsy','204712XFXumj','str','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','1104DLScnU','167896muPPLd'];a61_0x2892=function(){return _0x49b955;};return a61_0x2892();}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeStart={'service':'db','command':a61_0x43660a(0x10c),'description':a61_0x43660a(0x10b),'risk':'write','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a61_0x43660a(0x113),'type':a61_0x43660a(0x111),'description':a61_0x43660a(0x105)}],async 'execute'(_0x69ad31){const _0x10b1fa=a61_0x43660a,_0x4fe808=_0x69ad31[_0x10b1fa(0x109)]('id'),_0x1349a7=_0x69ad31[_0x10b1fa(0x104)]('tables'),_0x2d2762=_0x1349a7?_0x1349a7['split'](',')['map'](_0x14d810=>_0x14d810[_0x10b1fa(0x10e)]())['filter'](Boolean):undefined,_0x41adc1=await startDbAnalysis(_0x4fe808,_0x2d2762);return{'ok':!![],'data':{'dbLinkId':_0x4fe808,'planId':_0x41adc1,'tableNames':_0x2d2762??[]},'message':_0x10b1fa(0x112)+_0x4fe808};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a62_0x1ef553=a62_0x5ba9;function a62_0x5ba9(_0x43007f,_0x1a37e0){_0x43007f=_0x43007f-0x1db;const _0x2e6af2=a62_0x2e6a();let _0x5ba9ea=_0x2e6af2[_0x43007f];return _0x5ba9ea;}(function(_0x34d30d,_0x270a36){const _0x5878e6=a62_0x5ba9,_0x392780=_0x34d30d();while(!![]){try{const _0x531aa2=parseInt(_0x5878e6(0x1e2))/0x1+-parseInt(_0x5878e6(0x1eb))/0x2+-parseInt(_0x5878e6(0x1e8))/0x3+parseInt(_0x5878e6(0x1ea))/0x4*(-parseInt(_0x5878e6(0x1dd))/0x5)+parseInt(_0x5878e6(0x1de))/0x6*(parseInt(_0x5878e6(0x1db))/0x7)+parseInt(_0x5878e6(0x1ec))/0x8+-parseInt(_0x5878e6(0x1e4))/0x9;if(_0x531aa2===_0x270a36)break;else _0x392780['push'](_0x392780['shift']());}catch(_0xa474c7){_0x392780['push'](_0x392780['shift']());}}}(a62_0x2e6a,0xe29a3));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeStatus={'service':'db','command':a62_0x1ef553(0x1e9),'description':a62_0x1ef553(0x1e3),'risk':a62_0x1ef553(0x1e6),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a62_0x1ef553(0x1df),'type':a62_0x1ef553(0x1dc),'required':!![],'description':a62_0x1ef553(0x1e0)}],async 'execute'(_0x3696a2){const _0x2d472c=a62_0x1ef553,_0x1eecf7=_0x3696a2[_0x2d472c(0x1e1)]('id'),_0x5c2f64=_0x3696a2[_0x2d472c(0x1e7)]('plan'),_0x19ff55=await getDbAnalysisStatus(_0x5c2f64);return{'ok':!![],'data':{'dbLinkId':_0x1eecf7,'planId':_0x5c2f64,'status':_0x19ff55},'message':_0x2d472c(0x1e5)+_0x5c2f64};}};function a62_0x2e6a(){const _0x3ca757=['analyze-status','150748nnTjRr','1492256gBwSeN','2716768OlzIPe','1080415wzktJC','string','85cSQFZV','48jEgBka','plan','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','num','1557494hFCQEW','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','4809024sUqeyB','Analysis\x20status\x20for\x20','read','str','847632hvDFMO'];a62_0x2e6a=function(){return _0x3ca757;};return a62_0x2e6a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x2e2438=a63_0x4740;(function(_0x3ba463,_0x3b45b9){const _0x47da6d=a63_0x4740,_0x23b259=_0x3ba463();while(!![]){try{const _0x49be7b=-parseInt(_0x47da6d(0x112))/0x1*(parseInt(_0x47da6d(0x137))/0x2)+-parseInt(_0x47da6d(0x108))/0x3*(parseInt(_0x47da6d(0x10d))/0x4)+-parseInt(_0x47da6d(0x138))/0x5*(parseInt(_0x47da6d(0x128))/0x6)+parseInt(_0x47da6d(0x125))/0x7*(parseInt(_0x47da6d(0x132))/0x8)+parseInt(_0x47da6d(0x10a))/0x9+parseInt(_0x47da6d(0x10c))/0xa+parseInt(_0x47da6d(0x123))/0xb;if(_0x49be7b===_0x3b45b9)break;else _0x23b259['push'](_0x23b259['shift']());}catch(_0x280d7a){_0x23b259['push'](_0x23b259['shift']());}}}(a63_0x42bf,0xcb4ce));function a63_0x4740(_0x339583,_0x184bb3){_0x339583=_0x339583-0x108;const _0x42bfee=a63_0x42bf();let _0x47404a=_0x42bfee[_0x339583];return _0x47404a;}import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a63_0x42bf(){const _0x1626f6=['Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','password','10919293fLXDEC','Database\x20username','6937UztpAD','boolean','string','24HPypfk','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','trim','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','After\x20create,\x20start\x20schema\x20analysis\x20(same\x20as\x20workbench\x20flow)','No\x20follow-up\x20analysis','username','/smartapi/dblink/create','autostart','message','5056uFRyRg','[redacted]','dbparam','8.0','dburl','2810732eSiNxk','222450IwZKgH','1425REfvez','join','6208929HWeLGt','dbdesc','1532630jbqdKG','388fxdGeJ','validation','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','Created\x20db\x20link\x20','1yENDWz','Create\x20dblink','Human-readable\x20description','create','dbname','Extra\x20JDBC-style\x20connection\x20parameters\x20string','appCode',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','dbtype','dbversion','\x20and\x20started\x20analysis','POST','Database\x20password','str','bool'];a63_0x42bf=function(){return _0x1626f6;};return a63_0x42bf();}import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':a63_0x2e2438(0x115),'description':a63_0x2e2438(0x12b),'risk':'write','flags':[APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':'string','required':!![],'description':a63_0x2e2438(0x110)},DB_TYPE_FLAG,{'name':a63_0x2e2438(0x11b),'type':'string','description':'Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','default':a63_0x2e2438(0x135)},{'name':a63_0x2e2438(0x136),'type':a63_0x2e2438(0x127),'required':!![],'description':'Host\x20and\x20port:\x20host:port'},{'name':'username','type':a63_0x2e2438(0x127),'required':!![],'description':a63_0x2e2438(0x124)},{'name':a63_0x2e2438(0x122),'type':a63_0x2e2438(0x127),'required':!![],'description':a63_0x2e2438(0x11e)},{'name':a63_0x2e2438(0x134),'type':a63_0x2e2438(0x127),'description':a63_0x2e2438(0x117)},{'name':a63_0x2e2438(0x10b),'type':a63_0x2e2438(0x127),'description':a63_0x2e2438(0x114)},{'name':'autostart','type':a63_0x2e2438(0x126),'description':a63_0x2e2438(0x12c),'default':![]}],async 'validate'(_0x23b7cb){const _0x1e62d5=a63_0x2e2438,_0x2adff0=_0x23b7cb['str'](_0x1e62d5(0x136))[_0x1e62d5(0x12a)]();if(!validateDbUrl(_0x2adff0))throw CliErrors[_0x1e62d5(0x10e)](_0x1e62d5(0x129)+_0x2adff0+'\x22',_0x1e62d5(0x121));},async 'dryRun'(_0x1b14a9){const _0x12375d=a63_0x2e2438,_0x319cb7={'appCode':_0x1b14a9['appCode'],'dbName':_0x1b14a9[_0x12375d(0x11f)](_0x12375d(0x116)),'dbType':_0x1b14a9[_0x12375d(0x11f)]('dbtype'),'dbVersion':_0x1b14a9['str'](_0x12375d(0x11b))||_0x12375d(0x135),'dbUrl':_0x1b14a9['str'](_0x12375d(0x136))[_0x12375d(0x12a)](),'username':_0x1b14a9['str'](_0x12375d(0x12e)),'password':_0x12375d(0x133),..._0x1b14a9[_0x12375d(0x11f)](_0x12375d(0x134))?{'dbParam':_0x1b14a9[_0x12375d(0x11f)]('dbparam')}:{},..._0x1b14a9[_0x12375d(0x11f)](_0x12375d(0x10b))?{'dbDesc':_0x1b14a9[_0x12375d(0x11f)](_0x12375d(0x10b))}:{}};return{'method':_0x12375d(0x11d),'url':_0x12375d(0x12f),'body':_0x319cb7,'description':[_0x12375d(0x113),_0x1b14a9[_0x12375d(0x120)]('autostart')?'Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id':_0x12375d(0x12d)][_0x12375d(0x109)]('\x0a')};},async 'execute'(_0x54f05b){const _0x1744df=a63_0x2e2438,_0x47a73b={'appCode':_0x54f05b[_0x1744df(0x118)],'dbName':_0x54f05b[_0x1744df(0x11f)](_0x1744df(0x116)),'dbType':_0x54f05b[_0x1744df(0x11f)](_0x1744df(0x11a)),'dbVersion':_0x54f05b['str'](_0x1744df(0x11b))||_0x1744df(0x135),'dbUrl':_0x54f05b[_0x1744df(0x11f)]('dburl')[_0x1744df(0x12a)](),'username':_0x54f05b[_0x1744df(0x11f)]('username'),'password':_0x54f05b[_0x1744df(0x11f)](_0x1744df(0x122)),..._0x54f05b[_0x1744df(0x11f)](_0x1744df(0x134))?{'dbParam':_0x54f05b['str']('dbparam')}:{},..._0x54f05b[_0x1744df(0x11f)]('dbdesc')?{'dbDesc':_0x54f05b['str'](_0x1744df(0x10b))}:{}},{id:_0x1bbdd5,entity:_0xa47e30}=normalizeEntityWithIdResponse(await createDbLink(_0x47a73b));if(!_0x1bbdd5)return{'ok':![],'message':_0x1744df(0x10f),'data':sanitizeDbLinkForOutput(_0xa47e30)};let _0x32a090,_0xefb9c1;if(_0x54f05b[_0x1744df(0x120)](_0x1744df(0x130)))try{_0x32a090=await startDbAnalysis(_0x1bbdd5);}catch(_0x17838e){_0xefb9c1=_0x17838e instanceof Error?_0x17838e[_0x1744df(0x131)]:String(_0x17838e);}const _0x4af4fa={'connection':sanitizeDbLinkForOutput(_0xa47e30),..._0x32a090?{'analysisPlanId':_0x32a090}:{},..._0xefb9c1?{'analysisStartWarning':_0xefb9c1}:{}};let _0x48f8a9;return _0x54f05b[_0x1744df(0x120)](_0x1744df(0x130))?_0xefb9c1?_0x48f8a9=_0x1744df(0x111)+_0x1bbdd5+_0x1744df(0x119):_0x48f8a9='Created\x20db\x20link\x20'+_0x1bbdd5+_0x1744df(0x11c):_0x48f8a9=_0x1744df(0x111)+_0x1bbdd5,{'ok':!![],'data':_0x4af4fa,'message':_0x48f8a9};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a64_0x1a86ce=a64_0x2ba7;function a64_0x2ba7(_0x5aaf9e,_0x1aa489){_0x5aaf9e=_0x5aaf9e-0xfc;const _0x55b8da=a64_0x55b8();let _0x2ba7fb=_0x55b8da[_0x5aaf9e];return _0x2ba7fb;}(function(_0x7975ac,_0x18882f){const _0xcca403=a64_0x2ba7,_0x6babab=_0x7975ac();while(!![]){try{const _0x190c60=-parseInt(_0xcca403(0xfe))/0x1+parseInt(_0xcca403(0x106))/0x2+parseInt(_0xcca403(0x103))/0x3+-parseInt(_0xcca403(0x102))/0x4+parseInt(_0xcca403(0x100))/0x5+-parseInt(_0xcca403(0xfc))/0x6+-parseInt(_0xcca403(0xfd))/0x7;if(_0x190c60===_0x18882f)break;else _0x6babab['push'](_0x6babab['shift']());}catch(_0x51121a){_0x6babab['push'](_0x6babab['shift']());}}}(a64_0x55b8,0x93e7b));function a64_0x55b8(){const _0x116c4e=['745318ljlUvl','764339WOMEss','high-risk-write','2404380MJfBoE','delete','1414604XYltuz','577230HuFjTr','Delete\x20a\x20database\x20connection\x20(dblink)\x20permanently','Deleted\x20db\x20link\x20','2314422fEeMiv','1284aYboLd'];a64_0x55b8=function(){return _0x116c4e;};return a64_0x55b8();}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':a64_0x1a86ce(0x101),'description':a64_0x1a86ce(0x104),'risk':a64_0x1a86ce(0xff),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1db74c){const _0xb27b4f=a64_0x1a86ce,_0x4a8e7e=_0x1db74c['num']('id');return await deleteDbLink(_0x4a8e7e),{'ok':!![],'data':{'id':_0x4a8e7e,'deleted':!![]},'message':_0xb27b4f(0x105)+_0x4a8e7e};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a65_0x52e37e=a65_0x168b;(function(_0x124f33,_0x4ec2f7){const _0x52af3b=a65_0x168b,_0x49ab33=_0x124f33();while(!![]){try{const _0x1043e3=-parseInt(_0x52af3b(0xa6))/0x1+parseInt(_0x52af3b(0xa2))/0x2+-parseInt(_0x52af3b(0xaa))/0x3*(parseInt(_0x52af3b(0xae))/0x4)+parseInt(_0x52af3b(0xa7))/0x5*(-parseInt(_0x52af3b(0xa8))/0x6)+parseInt(_0x52af3b(0xac))/0x7*(parseInt(_0x52af3b(0xa9))/0x8)+-parseInt(_0x52af3b(0xb0))/0x9+parseInt(_0x52af3b(0xad))/0xa*(parseInt(_0x52af3b(0xa5))/0xb);if(_0x1043e3===_0x4ec2f7)break;else _0x49ab33['push'](_0x49ab33['shift']());}catch(_0x49964c){_0x49ab33['push'](_0x49ab33['shift']());}}}(a65_0x2913,0xa7d89));import{getDbLinkInfo}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a65_0x2913(){const _0xd2b966=['db\x20link\x20','2010386hUELMn','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','detail','319jXWfBB','667069kHJyhO','5VUxIGc','6480894cOwocE','652072AxypWQ','1644222NTpfLJ','num','7fTRiqA','848920pHGorN','8BvYWtV','read','159363bZatWZ'];a65_0x2913=function(){return _0xd2b966;};return a65_0x2913();}import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';function a65_0x168b(_0x2882b1,_0x2b1397){_0x2882b1=_0x2882b1-0xa1;const _0x2913a3=a65_0x2913();let _0x168bc5=_0x2913a3[_0x2882b1];return _0x168bc5;}export const dbDetail={'service':'db','command':a65_0x52e37e(0xa4),'description':a65_0x52e37e(0xa3),'risk':a65_0x52e37e(0xaf),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x548cd1){const _0x34466e=a65_0x52e37e,_0x7814a2=_0x548cd1[_0x34466e(0xab)]('id'),_0x473449=await getDbLinkInfo(_0x7814a2);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x473449),'message':_0x34466e(0xa1)+_0x7814a2+':\x20'+_0x473449['dbName']};}};
|
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a66_0x8981c6=a66_0x4bff;(function(_0x237bdc,_0x559ad4){const _0x96a2ba=a66_0x4bff,_0x1ad9be=_0x237bdc();while(!![]){try{const _0x594dde=parseInt(_0x96a2ba(0xcf))/0x1+-parseInt(_0x96a2ba(0xd9))/0x2+parseInt(_0x96a2ba(0xd0))/0x3+parseInt(_0x96a2ba(0xca))/0x4+parseInt(_0x96a2ba(0xc9))/0x5*(-parseInt(_0x96a2ba(0xdc))/0x6)+parseInt(_0x96a2ba(0xd5))/0x7*(parseInt(_0x96a2ba(0xd2))/0x8)+parseInt(_0x96a2ba(0xcb))/0x9*(-parseInt(_0x96a2ba(0xdf))/0xa);if(_0x594dde===_0x559ad4)break;else _0x1ad9be['push'](_0x1ad9be['shift']());}catch(_0x1042be){_0x1ad9be['push'](_0x1ad9be['shift']());}}}(a66_0xb8d3,0x7f299));import{getDbTableDiff}from'../../core/api-client.js';function a66_0xb8d3(){const _0x1287db=['read','pagesize','599157kDZetH','1980696sYnUbz','\x20(db\x20link\x20','5880472NaLPDW','\x20row(s),\x20total\x20','string','7fNDzpu','number','str','Paged\x20diff\x20between\x20live\x20database\x20schema\x20and\x20last\x20analyzed\x20snapshot\x20(new\x20/\x20deleted\x20/\x20modified\x20tables)','1432926nZrKGm','diff','Page\x20index\x20(1-based)','2234052RkbIro','table','length','20tURnTo','num','page','Page\x20size','appCode','5bIfMxM','2805248voRQBL','4887441CvhnuU','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)'];a66_0xb8d3=function(){return _0x1287db;};return a66_0xb8d3();}function a66_0x4bff(_0xe1eb1e,_0x2b2747){_0xe1eb1e=_0xe1eb1e-0xc8;const _0xb8d3c3=a66_0xb8d3();let _0x4bffc1=_0xb8d3c3[_0xe1eb1e];return _0x4bffc1;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDiff={'service':'db','command':a66_0x8981c6(0xda),'description':a66_0x8981c6(0xd8),'risk':a66_0x8981c6(0xcd),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a66_0x8981c6(0xdd),'type':a66_0x8981c6(0xd4),'description':a66_0x8981c6(0xcc)},{'name':a66_0x8981c6(0xe1),'type':a66_0x8981c6(0xd6),'description':a66_0x8981c6(0xdb),'default':0x1},{'name':a66_0x8981c6(0xce),'type':a66_0x8981c6(0xd6),'description':a66_0x8981c6(0xe2),'default':0x14}],async 'execute'(_0x3bf706){const _0x576e0b=a66_0x8981c6,_0x4b5027=_0x3bf706[_0x576e0b(0xe0)]('id'),_0x2b8c52=_0x3bf706[_0x576e0b(0xe0)](_0x576e0b(0xe1),0x1)||0x1,_0x3349cf=_0x3bf706[_0x576e0b(0xe0)](_0x576e0b(0xce),0x14)||0x14,_0x25cb2c=_0x3bf706[_0x576e0b(0xd7)](_0x576e0b(0xdd))||undefined,{totalCount:_0x3697d4,tableList:_0x603908}=await getDbTableDiff(_0x3bf706[_0x576e0b(0xc8)],_0x4b5027,{'pageIndex':_0x2b8c52,'pageSize':_0x3349cf,'tableName':_0x25cb2c});return{'ok':!![],'data':{'dbLinkId':_0x4b5027,'page':_0x2b8c52,'pageSize':_0x3349cf,'totalCount':_0x3697d4,'tableList':_0x603908},'message':_0x603908[_0x576e0b(0xde)]+_0x576e0b(0xd3)+_0x3697d4+_0x576e0b(0xd1)+_0x4b5027+')'};}};
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xc0fdfb,_0x1aebd0){const _0x30fae6=a67_0x1b10,_0x1ff9c3=_0xc0fdfb();while(!![]){try{const _0x1109cf=-parseInt(_0x30fae6(0x143))/0x1*(-parseInt(_0x30fae6(0x13c))/0x2)+parseInt(_0x30fae6(0x13f))/0x3+-parseInt(_0x30fae6(0x144))/0x4*(parseInt(_0x30fae6(0x13e))/0x5)+parseInt(_0x30fae6(0x145))/0x6*(parseInt(_0x30fae6(0x139))/0x7)+parseInt(_0x30fae6(0x140))/0x8*(parseInt(_0x30fae6(0x13a))/0x9)+parseInt(_0x30fae6(0x13b))/0xa*(parseInt(_0x30fae6(0x13d))/0xb)+-parseInt(_0x30fae6(0x141))/0xc*(parseInt(_0x30fae6(0x142))/0xd);if(_0x1109cf===_0x1aebd0)break;else _0x1ff9c3['push'](_0x1ff9c3['shift']());}catch(_0x1d7f04){_0x1ff9c3['push'](_0x1ff9c3['shift']());}}}(a67_0x4941,0x3a057));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';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';function a67_0x4941(){const _0x37267e=['80514rETiwV','56DJWETe','90ujEibW','10EcTghv','789104pDwyYW','2219206qdEAyd','15Wkfkiu','427422JWpzzl','122792UAQBai','13308KHXCew','6929KiupxR','1iqHoEC','227816NGejfE'];a67_0x4941=function(){return _0x37267e;};return a67_0x4941();}function a67_0x1b10(_0xc46109,_0x3ff2b8){_0xc46109=_0xc46109-0x139;const _0x494171=a67_0x4941();let _0x1b1047=_0x494171[_0xc46109];return _0x1b1047;}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 a68_0x2d1f9a=a68_0x3904;(function(_0x30ca7c,_0x2ea3b5){const _0x15da1e=a68_0x3904,_0x176a53=_0x30ca7c();while(!![]){try{const _0x1213bf=parseInt(_0x15da1e(0x87))/0x1*(-parseInt(_0x15da1e(0x83))/0x2)+parseInt(_0x15da1e(0x89))/0x3+parseInt(_0x15da1e(0x96))/0x4+parseInt(_0x15da1e(0x91))/0x5+-parseInt(_0x15da1e(0x8e))/0x6*(parseInt(_0x15da1e(0x90))/0x7)+-parseInt(_0x15da1e(0x84))/0x8*(parseInt(_0x15da1e(0x81))/0x9)+-parseInt(_0x15da1e(0x85))/0xa*(-parseInt(_0x15da1e(0x93))/0xb);if(_0x1213bf===_0x2ea3b5)break;else _0x176a53['push'](_0x176a53['shift']());}catch(_0x2e1254){_0x176a53['push'](_0x176a53['shift']());}}}(a68_0x1d26,0x40b2b));import{listDbLinks}from'../../core/api-client.js';function a68_0x3904(_0x81e673,_0x49ff9d){_0x81e673=_0x81e673-0x81;const _0x1d26e9=a68_0x1d26();let _0x39049b=_0x1d26e9[_0x81e673];return _0x39049b;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a68_0x1d26(){const _0x3e98b5=['Found\x20','14jiIART','1601895pqrzrk','length','77BCalpX','list','num','839376hqoKXO','page','27NAHmmI','pagesize','710NVGPQA','546696pKqRiR','895940nFtiUU','number','1118SlTbcR','Page\x20size','251343anoUXS','appCode','read','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','Page\x20index\x20(1-based)','1122774hNvjZo'];a68_0x1d26=function(){return _0x3e98b5;};return a68_0x1d26();}import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a68_0x2d1f9a(0x94),'description':a68_0x2d1f9a(0x8c),'risk':a68_0x2d1f9a(0x8b),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a68_0x2d1f9a(0x97),'type':a68_0x2d1f9a(0x86),'description':a68_0x2d1f9a(0x8d),'default':0x1},{'name':'pagesize','type':'number','description':a68_0x2d1f9a(0x88),'default':0x64}],async 'execute'(_0x352077){const _0x3e5314=a68_0x2d1f9a,_0x105e96=_0x352077[_0x3e5314(0x95)](_0x3e5314(0x97),0x1)||0x1,_0x3c408d=_0x352077[_0x3e5314(0x95)](_0x3e5314(0x82),0x64)||0x64,{items:_0x4e6597,paging:_0x59c49f}=await listDbLinks(_0x352077[_0x3e5314(0x8a)],{'currentPage':_0x105e96,'pageSize':_0x3c408d}),_0x3ad6a5=sanitizeDbLinkList(_0x4e6597),_0x49b204=_0x59c49f?_0x59c49f:{'currentPage':_0x105e96,'pageSize':_0x3c408d,'rowsOnPage':_0x3ad6a5['length'],'totalCount':null,'note':'Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only'};return{'ok':!![],'data':{'connections':_0x3ad6a5,'paging':_0x49b204},'message':_0x3e5314(0x8f)+_0x3ad6a5[_0x3e5314(0x92)]+'\x20database\x20connection(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x47a91e,_0x13a64b){const _0x27b987=a69_0xdc30,_0x330415=_0x47a91e();while(!![]){try{const _0x127a9d=parseInt(_0x27b987(0x1f1))/0x1*(parseInt(_0x27b987(0x1ea))/0x2)+parseInt(_0x27b987(0x1ed))/0x3*(parseInt(_0x27b987(0x1f2))/0x4)+-parseInt(_0x27b987(0x1e4))/0x5*(parseInt(_0x27b987(0x1e1))/0x6)+-parseInt(_0x27b987(0x1de))/0x7*(parseInt(_0x27b987(0x1e5))/0x8)+parseInt(_0x27b987(0x1dd))/0x9+parseInt(_0x27b987(0x1df))/0xa+parseInt(_0x27b987(0x1e2))/0xb;if(_0x127a9d===_0x13a64b)break;else _0x330415['push'](_0x330415['shift']());}catch(_0x48544b){_0x330415['push'](_0x330415['shift']());}}}(a69_0xc89d,0x82b7c));function shouldRedactKey(_0x4a7305){const _0x3fc822=a69_0xdc30,_0x1b7007=_0x4a7305['toLowerCase']();if(_0x1b7007===_0x3fc822(0x1f0)||_0x1b7007===_0x3fc822(0x1e9)||_0x1b7007===_0x3fc822(0x1e8))return!![];if(_0x1b7007[_0x3fc822(0x1e6)](_0x3fc822(0x1e7))||_0x1b7007[_0x3fc822(0x1e6)]('token')||_0x1b7007['includes'](_0x3fc822(0x1e0)))return!![];if(_0x1b7007[_0x3fc822(0x1e6)](_0x3fc822(0x1ef))||_0x1b7007[_0x3fc822(0x1e6)]('accesskey'))return!![];if(_0x1b7007===_0x3fc822(0x1ec)||_0x1b7007==='connectionstring'||_0x1b7007==='jdbcurl')return!![];return![];}function a69_0xc89d(){const _0x1515bf=['privatekey','password','16909czwLKX','2356fqVgYN','length','3742803kDDuON','7LJqtEe','1881980ZvdWWB','credential','2712444RprPZm','1421783dtAaDX','[redacted]','5OAnveG','6194704zbuWOO','includes','secret','dbpassword','passwd','26qpLeiJ','test','authorization','4119RLxxoS','trim'];a69_0xc89d=function(){return _0x1515bf;};return a69_0xc89d();}function a69_0xdc30(_0xb659eb,_0x1cf574){_0xb659eb=_0xb659eb-0x1dd;const _0xc89dd6=a69_0xc89d();let _0xdc3070=_0xc89dd6[_0xb659eb];return _0xdc3070;}export function sanitizeDbLinkForOutput(_0x45036e){const _0x547cfa=a69_0xdc30,_0x584a58={..._0x45036e};for(const _0x5073b6 of Object['keys'](_0x584a58)){if(!shouldRedactKey(_0x5073b6))continue;const _0x4bb108=_0x584a58[_0x5073b6];_0x4bb108!=null&&String(_0x4bb108)[_0x547cfa(0x1f3)]>0x0&&(_0x584a58[_0x5073b6]=_0x547cfa(0x1e3));}return _0x584a58;}export function sanitizeDbLinkList(_0x419dae){return _0x419dae['map'](_0x352c14=>sanitizeDbLinkForOutput(_0x352c14));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x45aa5d){const _0x29acc1=a69_0xdc30,_0x394668=_0x45aa5d[_0x29acc1(0x1ee)]();if(!_0x394668)return![];return DB_URL_PATTERN[_0x29acc1(0x1eb)](_0x394668);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x449d39=a70_0x23d6;(function(_0x4f76a6,_0x295c3f){const _0x15c773=a70_0x23d6,_0x3ec28b=_0x4f76a6();while(!![]){try{const _0x36f4c8=parseInt(_0x15c773(0x73))/0x1*(-parseInt(_0x15c773(0x77))/0x2)+-parseInt(_0x15c773(0x79))/0x3+parseInt(_0x15c773(0x7b))/0x4*(parseInt(_0x15c773(0x81))/0x5)+-parseInt(_0x15c773(0x7f))/0x6+-parseInt(_0x15c773(0x76))/0x7+-parseInt(_0x15c773(0x7a))/0x8+-parseInt(_0x15c773(0x7c))/0x9*(-parseInt(_0x15c773(0x7e))/0xa);if(_0x36f4c8===_0x295c3f)break;else _0x3ec28b['push'](_0x3ec28b['shift']());}catch(_0x3ecfec){_0x3ec28b['push'](_0x3ec28b['shift']());}}}(a70_0x51a7,0xb56f2));import{getDbAllTableList}from'../../core/api-client.js';function a70_0x23d6(_0x1eef20,_0x5cc8bb){_0x1eef20=_0x1eef20-0x73;const _0x51a7c1=a70_0x51a7();let _0x23d6cb=_0x51a7c1[_0x1eef20];return _0x23d6cb;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbTables={'service':'db','command':a70_0x449d39(0x75),'description':a70_0x449d39(0x7d),'risk':a70_0x449d39(0x78),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x58308a){const _0x5e8320=a70_0x449d39,_0x56e9f2=_0x58308a[_0x5e8320(0x74)]('id'),_0x146535=await getDbAllTableList(_0x58308a['appCode'],_0x56e9f2);return{'ok':!![],'data':{'dbLinkId':_0x56e9f2,'total':_0x146535[_0x5e8320(0x80)],'tables':_0x146535},'message':_0x146535[_0x5e8320(0x80)]+'\x20table(s)\x20on\x20db\x20link\x20'+_0x56e9f2};}};function a70_0x51a7(){const _0x46ad89=['11196336cHpkZa','12ZEbRjX','9RTCENv','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','45481910AkNkls','2559606ZrLRtX','length','182285OlQoJl','2077ApaBpN','num','tables','2670031OjhmSA','1406YrjBGl','read','740103hzSYpZ'];a70_0x51a7=function(){return _0x46ad89;};return a70_0x51a7();}
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x2efc31=a71_0x1ee4;function a71_0x47b2(){const _0x3c6a2e=['175540kkQSph','success','42NZlnLB','3438YSDBQU','error','\x20(see\x20data.result)','164896knUFUq','358426jTMkSr','846030CFPfYd','slice','length','Connection\x20OK\x20for\x20db\x20link\x20','2LgEHIc','read','message','Connection\x20check\x20finished\x20for\x20db\x20link\x20','1011852QzcbYQ','keys','860aCUDAh','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','msg','1299630YRwnBx','object','187cBIjHF'];a71_0x47b2=function(){return _0x3c6a2e;};return a71_0x47b2();}(function(_0x32b846,_0x51f557){const _0x1c11a4=a71_0x1ee4,_0x43c2d0=_0x32b846();while(!![]){try{const _0x5f404e=parseInt(_0x1c11a4(0x7d))/0x1*(parseInt(_0x1c11a4(0x78))/0x2)+parseInt(_0x1c11a4(0x74))/0x3*(-parseInt(_0x1c11a4(0x6b))/0x4)+-parseInt(_0x1c11a4(0x79))/0x5+-parseInt(_0x1c11a4(0x6e))/0x6+parseInt(_0x1c11a4(0x73))/0x7*(parseInt(_0x1c11a4(0x77))/0x8)+parseInt(_0x1c11a4(0x69))/0x9+-parseInt(_0x1c11a4(0x71))/0xa*(-parseInt(_0x1c11a4(0x70))/0xb);if(_0x5f404e===_0x51f557)break;else _0x43c2d0['push'](_0x43c2d0['shift']());}catch(_0x4cee00){_0x43c2d0['push'](_0x43c2d0['shift']());}}}(a71_0x47b2,0x3fa87));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a71_0x1ee4(_0x4ed86a,_0x5206d0){_0x4ed86a=_0x4ed86a-0x68;const _0x47b279=a71_0x47b2();let _0x1ee412=_0x47b279[_0x4ed86a];return _0x1ee412;}function summarizeTestConnectResult(_0x1d910a){const _0xe52d9e=a71_0x1ee4;if(_0x1d910a===!![]||_0x1d910a===![])return{'success':_0x1d910a};if(_0x1d910a===null||_0x1d910a===undefined)return{'type':typeof _0x1d910a};if(typeof _0x1d910a!==_0xe52d9e(0x6f))return{'type':typeof _0x1d910a};const _0x99ca76=_0x1d910a,_0x53c140=[_0xe52d9e(0x72),_0xe52d9e(0x7f),'code',_0xe52d9e(0x75),_0xe52d9e(0x6d),'data'],_0x57deb6={};for(const _0x26b231 of _0x53c140){if(_0x26b231 in _0x99ca76)_0x57deb6[_0x26b231]=_0x99ca76[_0x26b231];}return Object[_0xe52d9e(0x6a)](_0x57deb6)[_0xe52d9e(0x7b)]===0x0&&(_0x57deb6[_0xe52d9e(0x6a)]=Object['keys'](_0x99ca76)[_0xe52d9e(0x7a)](0x0,0x14)),_0x57deb6;}export const dbTest={'service':'db','command':'test','description':a71_0x2efc31(0x6c),'risk':a71_0x2efc31(0x7e),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x376086){const _0x272521=a71_0x2efc31,_0x39c2c0=_0x376086['num']('id'),_0x448cf5=await testDbLinkConnect(_0x39c2c0),_0x1ef459=_0x448cf5===!![]||typeof _0x448cf5===_0x272521(0x6f)&&_0x448cf5!==null&&_0x448cf5[_0x272521(0x72)]===!![],_0x4dcd91=summarizeTestConnectResult(_0x448cf5);return{'ok':!![],'data':{'id':_0x39c2c0,'connected':Boolean(_0x1ef459),'result':_0x4dcd91},'message':_0x1ef459?_0x272521(0x7c)+_0x39c2c0:_0x272521(0x68)+_0x39c2c0+_0x272521(0x76)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a72_0x1c3250=a72_0x5181;(function(_0x157881,_0x1dbadd){const _0x569721=a72_0x5181,_0x231724=_0x157881();while(!![]){try{const _0x143be3=-parseInt(_0x569721(0x1fb))/0x1*(-parseInt(_0x569721(0x1f8))/0x2)+parseInt(_0x569721(0x201))/0x3+parseInt(_0x569721(0x210))/0x4*(parseInt(_0x569721(0x206))/0x5)+-parseInt(_0x569721(0x202))/0x6+-parseInt(_0x569721(0x1f4))/0x7*(parseInt(_0x569721(0x1ff))/0x8)+-parseInt(_0x569721(0x20e))/0x9+parseInt(_0x569721(0x208))/0xa;if(_0x143be3===_0x1dbadd)break;else _0x231724['push'](_0x231724['shift']());}catch(_0x18af28){_0x231724['push'](_0x231724['shift']());}}}(a72_0x1f5f,0xa7c08));function a72_0x5181(_0x32bf4f,_0x1bb3ee){_0x32bf4f=_0x32bf4f-0x1f3;const _0x1f5fd7=a72_0x1f5f();let _0x518114=_0x1f5fd7[_0x32bf4f];return _0x518114;}import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';function a72_0x1f5f(){const _0x2787db=['37291bcDcwL','New\x20connection\x20parameter\x20string','str','dbParam','136HEQfFR','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','3782169lFCGpT','2207916biIEsH','password','dbparam','string','2793905HHFttT','New\x20database\x20name','11529220FSWlXa','New\x20description','dbDesc','dbdesc','update','trim','8095473BpSuFD','/smartapi/dblink/update','4ecbbPy','username','dbUrl','validation','Updated\x20db\x20link\x20','New\x20host:port','New\x20username','POST','num','Update\x20an\x20existing\x20database\x20connection.\x20Only\x20supplied\x20fields\x20are\x20overwritten;\x20others\x20keep\x20server\x20values','434462lpSqpP','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','dbname','write','2ZZOKaY','dburl','dbName'];a72_0x1f5f=function(){return _0x2787db;};return a72_0x1f5f();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbUpdate={'service':'db','command':a72_0x1c3250(0x20c),'description':a72_0x1c3250(0x1f3),'risk':a72_0x1c3250(0x1f7),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a72_0x1c3250(0x1f6),'type':a72_0x1c3250(0x205),'description':a72_0x1c3250(0x207)},{'name':a72_0x1c3250(0x1f9),'type':a72_0x1c3250(0x205),'description':a72_0x1c3250(0x215)},{'name':a72_0x1c3250(0x211),'type':a72_0x1c3250(0x205),'description':a72_0x1c3250(0x216)},{'name':a72_0x1c3250(0x203),'type':a72_0x1c3250(0x205),'description':'New\x20password\x20(omit\x20to\x20leave\x20unchanged).\x20Empty\x20string\x20may\x20be\x20treated\x20as\x20no-op\x20or\x20rejected\x20by\x20API'},{'name':a72_0x1c3250(0x204),'type':'string','description':a72_0x1c3250(0x1fc)},{'name':a72_0x1c3250(0x20b),'type':a72_0x1c3250(0x205),'description':a72_0x1c3250(0x209)}],async 'validate'(_0x268bf0){const _0x2ddcd1=a72_0x1c3250,_0x593833=_0x268bf0['str'](_0x2ddcd1(0x1f9));if(_0x593833&&!validateDbUrl(_0x593833[_0x2ddcd1(0x20d)]()))throw CliErrors[_0x2ddcd1(0x213)](_0x2ddcd1(0x200)+_0x593833+'\x22');},async 'dryRun'(_0x2fa47f){const _0x329236=a72_0x1c3250,_0x241d4c=_0x2fa47f[_0x329236(0x218)]('id'),_0x1542c2=await getDbLinkInfo(_0x241d4c),_0x3d2166={..._0x1542c2},_0x12c81f=_0x2fa47f[_0x329236(0x1fd)](_0x329236(0x1f6));if(_0x12c81f)_0x3d2166[_0x329236(0x1fa)]=_0x12c81f;const _0x5124b8=_0x2fa47f[_0x329236(0x1fd)]('dburl');if(_0x5124b8)_0x3d2166['dbUrl']=_0x5124b8['trim']();const _0x37765f=_0x2fa47f['str'](_0x329236(0x211));if(_0x37765f)_0x3d2166[_0x329236(0x211)]=_0x37765f;const _0x120345=_0x2fa47f[_0x329236(0x1fd)](_0x329236(0x203));if(_0x120345)_0x3d2166['password']=_0x120345;const _0x5ef248=_0x2fa47f[_0x329236(0x1fd)]('dbparam');if(_0x5ef248)_0x3d2166[_0x329236(0x1fe)]=_0x5ef248;const _0x3edf1c=_0x2fa47f[_0x329236(0x1fd)]('dbdesc');if(_0x3edf1c)_0x3d2166['dbDesc']=_0x3edf1c;const _0x553925=sanitizeDbLinkForOutput(_0x3d2166);return{'method':_0x329236(0x217),'url':_0x329236(0x20f),'body':_0x553925,'description':_0x329236(0x1f5)};},async 'execute'(_0x1472cf){const _0x4b1b46=a72_0x1c3250,_0x546c6a=_0x1472cf[_0x4b1b46(0x218)]('id'),_0x9d0d66=await getDbLinkInfo(_0x546c6a),_0x1218e0={..._0x9d0d66},_0x4ea350=_0x1472cf[_0x4b1b46(0x1fd)](_0x4b1b46(0x1f6));if(_0x4ea350)_0x1218e0['dbName']=_0x4ea350;const _0x13f85f=_0x1472cf['str'](_0x4b1b46(0x1f9));if(_0x13f85f)_0x1218e0[_0x4b1b46(0x212)]=_0x13f85f[_0x4b1b46(0x20d)]();const _0x26aa91=_0x1472cf[_0x4b1b46(0x1fd)](_0x4b1b46(0x211));if(_0x26aa91)_0x1218e0[_0x4b1b46(0x211)]=_0x26aa91;const _0x569995=_0x1472cf[_0x4b1b46(0x1fd)](_0x4b1b46(0x203));if(_0x569995)_0x1218e0[_0x4b1b46(0x203)]=_0x569995;const _0x2dd89a=_0x1472cf[_0x4b1b46(0x1fd)](_0x4b1b46(0x204));if(_0x2dd89a)_0x1218e0[_0x4b1b46(0x1fe)]=_0x2dd89a;const _0x11e352=_0x1472cf['str'](_0x4b1b46(0x20b));if(_0x11e352)_0x1218e0[_0x4b1b46(0x20a)]=_0x11e352;const {id:_0x3bb61d,entity:_0x8745fb}=normalizeEntityWithIdResponse(await updateDbLink(_0x1218e0));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x8745fb),'message':_0x4b1b46(0x214)+(_0x3bb61d??_0x546c6a)};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a68_0x3376(){const _0x2de189=['length','(default:\x20','riskLevel','(no\x20file)','read','\x20\x20Config\x20JSON','\x20\x20Config\x20Files','platform','⚠\x20Empty\x20(treated\x20as\x20{})','unknown','pageSize','Global','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','empty','1462580puaEBL','(set,\x20length=','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(missing)','check','yellow','appcode','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','\x20\x20─','value','✓\x20Valid\x20JSON','bold','currentApp','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','apps','\x20←\x20current','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','log','(none)','raw','1221997bUyNZE','(not\x20found)','2856183TMAFvI','repeat','env','apiDir','\x20\x20\x20\x20accessKey:\x20\x20','3956924CatcZB','\x20\x20explicitAppName:\x20','gray','locale','Project','appCode','red','green','✗\x20Not\x20logged\x20in','source','✗\x20Expired','slice','256kOcLak','(not\x20set)','4229FFIfRz','arch','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','18RBiZrn','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','70gFcOlr','\x20\x20Merged\x20Config','873279StvLvQ','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','verbose','defaultApp','✗\x20Invalid\x20JSON','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','✓\x20Valid','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','accessKey','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Apps','cookie','11271aHXixw','\x20\x20runtimeDomain:\x20\x20\x20','24xJJLOW'];a68_0x3376=function(){return _0x2de189;};return a68_0x3376();}const a68_0x171a24=a68_0x175f;(function(_0x87a45c,_0x9fad8c){const _0x530853=a68_0x175f,_0x34f850=_0x87a45c();while(!![]){try{const _0x5167e5=-parseInt(_0x530853(0x1d8))/0x1*(parseInt(_0x530853(0x1d6))/0x2)+-parseInt(_0x530853(0x1ed))/0x3+parseInt(_0x530853(0x1ca))/0x4+-parseInt(_0x530853(0x1aa))/0x5*(parseInt(_0x530853(0x1db))/0x6)+-parseInt(_0x530853(0x1c3))/0x7*(-parseInt(_0x530853(0x1ef))/0x8)+-parseInt(_0x530853(0x1df))/0x9*(-parseInt(_0x530853(0x1dd))/0xa)+-parseInt(_0x530853(0x1c5))/0xb;if(_0x5167e5===_0x9fad8c)break;else _0x34f850['push'](_0x34f850['shift']());}catch(_0x2cda07){_0x34f850['push'](_0x34f850['shift']());}}}(a68_0x3376,0x7c7c3));function a68_0x175f(_0x52f2c9,_0x29c620){_0x52f2c9=_0x52f2c9-0x1a6;const _0x3376ba=a68_0x3376();let _0x175fdf=_0x3376ba[_0x52f2c9];return _0x175fdf;}import a68_0x48905c 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(_0x5dba0a){const _0x45bfe5=a68_0x175f,_0x5d543b=GIT_COMMIT!==_0x45bfe5(0x1f9)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x45bfe5(0x1d5)](0x0,0xa)+')':VERSION,_0x166a7a=buildConfigFromFlags({}),_0x191d0b=getCookie();console[_0x45bfe5(0x1c0)](),console[_0x45bfe5(0x1c0)](a68_0x48905c['bold'](CLI_BIN_NAME+'\x20doctor')),console[_0x45bfe5(0x1c0)](a68_0x48905c['gray']('─'[_0x45bfe5(0x1c6)](0x32))),console[_0x45bfe5(0x1c0)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x5d543b),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1b8)+process['version']),console[_0x45bfe5(0x1c0)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x45bfe5(0x1f7)]+'\x20'+process[_0x45bfe5(0x1d9)]),console['log'](),console[_0x45bfe5(0x1c0)](a68_0x48905c[_0x45bfe5(0x1b6)](_0x45bfe5(0x1f6))),console[_0x45bfe5(0x1c0)](a68_0x48905c[_0x45bfe5(0x1cc)](_0x45bfe5(0x1b3)[_0x45bfe5(0x1c6)](0x1e)));const _0x5f0a92=getGlobalConfigPath(),_0x1c975b=getProjectConfigPath();console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1b1)+(_0x5f0a92||a68_0x48905c[_0x45bfe5(0x1cc)]('(not\x20found)'))),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1b9)+(_0x1c975b||a68_0x48905c['gray'](_0x45bfe5(0x1c4)))),console['log'](),console[_0x45bfe5(0x1c0)](a68_0x48905c['bold'](_0x45bfe5(0x1f5))),console[_0x45bfe5(0x1c0)](a68_0x48905c['gray'](_0x45bfe5(0x1b3)['repeat'](0x1e)));const _0x5a8a23=(_0x164177,_0x1e7a26)=>{const _0x38508a=_0x45bfe5;if(!_0x1e7a26){console['log']('\x20\x20'+_0x164177[_0x38508a(0x1bf)](0x11)+'\x20'+a68_0x48905c['gray'](_0x38508a(0x1f3)));return;}const _0x59597a=inspectCliConfigJsonFile(_0x1e7a26);if(_0x59597a[_0x38508a(0x1b2)]==='ok')console[_0x38508a(0x1c0)]('\x20\x20'+_0x164177[_0x38508a(0x1bf)](0x11)+'\x20'+a68_0x48905c[_0x38508a(0x1d1)](_0x38508a(0x1b5)));else{if(_0x59597a['status']===_0x38508a(0x1a9))console[_0x38508a(0x1c0)]('\x20\x20'+_0x164177['padEnd'](0x11)+'\x20'+a68_0x48905c[_0x38508a(0x1af)](_0x38508a(0x1f8)));else _0x59597a[_0x38508a(0x1b2)]==='missing'?console[_0x38508a(0x1c0)]('\x20\x20'+_0x164177['padEnd'](0x11)+'\x20'+a68_0x48905c[_0x38508a(0x1cc)](_0x38508a(0x1ad))):(console[_0x38508a(0x1c0)]('\x20\x20'+_0x164177[_0x38508a(0x1bf)](0x11)+'\x20'+a68_0x48905c['red'](_0x38508a(0x1e3))),console[_0x38508a(0x1c0)]('\x20\x20'+''[_0x38508a(0x1bf)](0x11)+'\x20'+a68_0x48905c[_0x38508a(0x1d0)](_0x59597a['message'])));}};_0x5a8a23(_0x45bfe5(0x1a7),_0x5f0a92),_0x5a8a23(_0x45bfe5(0x1ce),_0x1c975b),console[_0x45bfe5(0x1c0)](),console[_0x45bfe5(0x1c0)](a68_0x48905c[_0x45bfe5(0x1b6)](_0x45bfe5(0x1de))),console[_0x45bfe5(0x1c0)](a68_0x48905c[_0x45bfe5(0x1cc)](_0x45bfe5(0x1b3)['repeat'](0x1e))),console['log'](_0x45bfe5(0x1ac)+(_0x166a7a[_0x45bfe5(0x1cf)]||a68_0x48905c[_0x45bfe5(0x1d0)](_0x45bfe5(0x1d7)))),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1ea)+_0x166a7a[_0x45bfe5(0x1c7)]),console[_0x45bfe5(0x1c0)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x166a7a[_0x45bfe5(0x1cd)]),console['log']('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x166a7a[_0x45bfe5(0x1c8)]),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1e0)+(_0x166a7a[_0x45bfe5(0x1e2)]||a68_0x48905c[_0x45bfe5(0x1cc)](_0x45bfe5(0x1c1)))),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1bd)+(_0x166a7a[_0x45bfe5(0x1b7)]||a68_0x48905c['gray']('(none)'))),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1cb)+(_0x166a7a['explicitAppName']||a68_0x48905c[_0x45bfe5(0x1cc)](_0x45bfe5(0x1c1)))),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1da)+(_0x166a7a['format']||a68_0x48905c[_0x45bfe5(0x1cc)](_0x45bfe5(0x1f1)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1a8)+(_0x166a7a[_0x45bfe5(0x1a6)]??a68_0x48905c[_0x45bfe5(0x1cc)]('(default)'))),console['log']('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x166a7a[_0x45bfe5(0x1f2)]),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1be)+_0x166a7a[_0x45bfe5(0x1e1)]),console[_0x45bfe5(0x1c0)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x166a7a[_0x45bfe5(0x1ec)]?a68_0x48905c[_0x45bfe5(0x1d1)](_0x45bfe5(0x1ab)+_0x166a7a[_0x45bfe5(0x1ec)]['length']+')'):_0x191d0b?a68_0x48905c[_0x45bfe5(0x1d1)]('(set\x20via\x20file,\x20length='+_0x191d0b['length']+')'):a68_0x48905c[_0x45bfe5(0x1cc)](_0x45bfe5(0x1c1))));const _0x373686=Object['keys'](_0x166a7a[_0x45bfe5(0x1ba)]);if(_0x373686[_0x45bfe5(0x1f0)]>0x0){console[_0x45bfe5(0x1c0)](),console[_0x45bfe5(0x1c0)](a68_0x48905c[_0x45bfe5(0x1b6)](_0x45bfe5(0x1eb))),console[_0x45bfe5(0x1c0)](a68_0x48905c['gray']('\x20\x20─'[_0x45bfe5(0x1c6)](0x1e)));for(const _0x4cca9e of _0x373686){const _0x561072=_0x166a7a[_0x45bfe5(0x1ba)][_0x4cca9e],_0x1dae7d=_0x4cca9e===_0x166a7a[_0x45bfe5(0x1e2)],_0x5cc08f=_0x4cca9e===_0x166a7a[_0x45bfe5(0x1b7)],_0x46f979=_0x5cc08f?a68_0x48905c[_0x45bfe5(0x1d1)](_0x45bfe5(0x1bb)):'',_0x27958d=_0x1dae7d?'\x20(default)':'';console['log']('\x20\x20'+_0x4cca9e+_0x27958d+_0x46f979),console['log'](_0x45bfe5(0x1e4)+_0x561072[_0x45bfe5(0x1b0)]);const _0x345e75=buildAppDoctorFields(_0x561072,{'env':_0x166a7a['env'],'apiDir':_0x166a7a[_0x45bfe5(0x1c2)][_0x45bfe5(0x1c8)]||DEFAULT_CONFIG_VALUES[_0x45bfe5(0x1c8)],'cookie':_0x166a7a[_0x45bfe5(0x1ec)]||_0x191d0b||undefined,'accessKey':_0x166a7a['accessKey']});console['log']('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x345e75[_0x45bfe5(0x1c7)]['value']+'\x20\x20'+a68_0x48905c[_0x45bfe5(0x1cc)]('('+_0x345e75['env']['source']+')')),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1e8)+_0x345e75[_0x45bfe5(0x1c8)][_0x45bfe5(0x1b4)]+'\x20\x20'+a68_0x48905c[_0x45bfe5(0x1cc)]('('+_0x345e75['apiDir'][_0x45bfe5(0x1d3)]+')'));const _0x457578=_0x345e75[_0x45bfe5(0x1ec)][_0x45bfe5(0x1b4)]?a68_0x48905c['green'](_0x45bfe5(0x1ab)+_0x345e75[_0x45bfe5(0x1ec)][_0x45bfe5(0x1b4)][_0x45bfe5(0x1f0)]+')'):a68_0x48905c['gray'](_0x45bfe5(0x1c1));console['log']('\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'+_0x457578+'\x20\x20'+a68_0x48905c['gray']('('+_0x345e75[_0x45bfe5(0x1ec)][_0x45bfe5(0x1d3)]+')'));const _0x246a6e=_0x345e75[_0x45bfe5(0x1e9)][_0x45bfe5(0x1b4)]?a68_0x48905c[_0x45bfe5(0x1d1)]('(set,\x20length='+_0x345e75[_0x45bfe5(0x1e9)][_0x45bfe5(0x1b4)][_0x45bfe5(0x1f0)]+')'):a68_0x48905c[_0x45bfe5(0x1cc)](_0x45bfe5(0x1c1));console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1c9)+_0x246a6e+'\x20\x20'+a68_0x48905c[_0x45bfe5(0x1cc)]('('+_0x345e75[_0x45bfe5(0x1e9)][_0x45bfe5(0x1d3)]+')'));}}console[_0x45bfe5(0x1c0)](),console[_0x45bfe5(0x1c0)](a68_0x48905c[_0x45bfe5(0x1b6)]('\x20\x20API\x20Endpoints')),console[_0x45bfe5(0x1c0)](a68_0x48905c[_0x45bfe5(0x1cc)]('\x20\x20─'['repeat'](0x1e))),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1bc)+getApiDomain()),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1e7)+getUserDomain()),console['log'](_0x45bfe5(0x1ee)+getRuntimeDomain()),console[_0x45bfe5(0x1c0)](),console[_0x45bfe5(0x1c0)](a68_0x48905c['bold']('\x20\x20Auth')),console[_0x45bfe5(0x1c0)](a68_0x48905c[_0x45bfe5(0x1cc)]('\x20\x20─'[_0x45bfe5(0x1c6)](0x1e)));if(_0x191d0b){const _0x111685=await getIsSessionValid();console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1e6)+(_0x111685?a68_0x48905c[_0x45bfe5(0x1d1)](_0x45bfe5(0x1e5)):a68_0x48905c[_0x45bfe5(0x1d0)](_0x45bfe5(0x1d4))));}else console['log'](_0x45bfe5(0x1e6)+a68_0x48905c['red'](_0x45bfe5(0x1d2)));return console[_0x45bfe5(0x1c0)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':a68_0x171a24(0x1ae),'description':a68_0x171a24(0x1dc),'risk':a68_0x171a24(0x1f4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a73_0x30fb30=a73_0x57c3;(function(_0x170c3b,_0x31f7b3){const _0x7ac919=a73_0x57c3,_0x3f485e=_0x170c3b();while(!![]){try{const _0x453134=-parseInt(_0x7ac919(0xa7))/0x1+-parseInt(_0x7ac919(0xb7))/0x2+-parseInt(_0x7ac919(0xda))/0x3*(parseInt(_0x7ac919(0xae))/0x4)+-parseInt(_0x7ac919(0xcd))/0x5*(-parseInt(_0x7ac919(0xee))/0x6)+parseInt(_0x7ac919(0xc7))/0x7*(parseInt(_0x7ac919(0xcc))/0x8)+-parseInt(_0x7ac919(0xb3))/0x9+parseInt(_0x7ac919(0xea))/0xa;if(_0x453134===_0x31f7b3)break;else _0x3f485e['push'](_0x3f485e['shift']());}catch(_0x552515){_0x3f485e['push'](_0x3f485e['shift']());}}}(a73_0x1588,0x6d0ce));import a73_0x1ae44b 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';function a73_0x57c3(_0xc13bb5,_0x8f05c0){_0xc13bb5=_0xc13bb5-0x9a;const _0x15885f=a73_0x1588();let _0x57c3dc=_0x15885f[_0xc13bb5];return _0x57c3dc;}import{getCookie}from'../auth/get-cookie.js';function a73_0x1588(){const _0x10c292=['repeat','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','2382712USFfkY','riskLevel','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','platform','pageSize','1817226dQbeHU','empty','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','message','1382192sXVDVI','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','currentApp','appCode','apiDir','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(set\x20via\x20file,\x20length=','\x20\x20\x20\x20accessKey:\x20\x20','\x20←\x20current','Global','(not\x20set)','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','7ftYuIR','✗\x20Expired','appcode','apps','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','1615784YKwMQz','5fSHxAk','version','keys','padEnd','✗\x20Not\x20logged\x20in','raw','red','source','green','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','bold','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','accessKey','3NYTRMH','\x20\x20Auth','unknown','missing','✗\x20Invalid\x20JSON','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','cookie','format','verbose','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','Project','defaultApp','arch','13070170yhRBWC','gray','\x20(default)','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','5356980fKwZfU','length','\x20doctor','✓\x20Valid\x20JSON','check','(no\x20file)','(default:\x20','env','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','(set,\x20length=','value','slice','\x20\x20─','\x20\x20Config\x20JSON','\x20\x20Apps','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','466462dfLgAC','(not\x20found)','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','log','explicitAppName'];a73_0x1588=function(){return _0x10c292;};return a73_0x1588();}import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x2ffdfc){const _0x3e006f=a73_0x57c3,_0x536dc6=GIT_COMMIT!==_0x3e006f(0xdc)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x3e006f(0xa2)](0x0,0xa)+')':VERSION,_0x258673=buildConfigFromFlags({}),_0x4bc6db=getCookie();console['log'](),console[_0x3e006f(0xaa)](a73_0x1ae44b[_0x3e006f(0xd7)](CLI_BIN_NAME+_0x3e006f(0xf0))),console[_0x3e006f(0xaa)](a73_0x1ae44b[_0x3e006f(0xeb)]('─'['repeat'](0x32))),console[_0x3e006f(0xaa)](_0x3e006f(0xd8)+_0x536dc6),console[_0x3e006f(0xaa)](_0x3e006f(0xa6)+process[_0x3e006f(0xce)]),console['log'](_0x3e006f(0xed)+process[_0x3e006f(0xb1)]+'\x20'+process[_0x3e006f(0xe9)]),console[_0x3e006f(0xaa)](),console[_0x3e006f(0xaa)](a73_0x1ae44b[_0x3e006f(0xd7)]('\x20\x20Config\x20Files')),console['log'](a73_0x1ae44b[_0x3e006f(0xeb)](_0x3e006f(0xa3)[_0x3e006f(0xac)](0x1e)));const _0x54e44d=getGlobalConfigPath(),_0x1b1e85=getProjectConfigPath();console[_0x3e006f(0xaa)](_0x3e006f(0x9e)+(_0x54e44d||a73_0x1ae44b['gray'](_0x3e006f(0xa8)))),console[_0x3e006f(0xaa)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1b1e85||a73_0x1ae44b[_0x3e006f(0xeb)](_0x3e006f(0xa8)))),console['log'](),console['log'](a73_0x1ae44b[_0x3e006f(0xd7)](_0x3e006f(0xa4))),console['log'](a73_0x1ae44b['gray'](_0x3e006f(0xa3)[_0x3e006f(0xac)](0x1e)));const _0x1341ff=(_0x25ebdc,_0x1dbc9d)=>{const _0x5e230b=_0x3e006f;if(!_0x1dbc9d){console[_0x5e230b(0xaa)]('\x20\x20'+_0x25ebdc[_0x5e230b(0xd0)](0x11)+'\x20'+a73_0x1ae44b[_0x5e230b(0xeb)](_0x5e230b(0x9b)));return;}const _0x205d4f=inspectCliConfigJsonFile(_0x1dbc9d);if(_0x205d4f[_0x5e230b(0x9f)]==='ok')console[_0x5e230b(0xaa)]('\x20\x20'+_0x25ebdc[_0x5e230b(0xd0)](0x11)+'\x20'+a73_0x1ae44b[_0x5e230b(0xd5)](_0x5e230b(0xf1)));else{if(_0x205d4f['status']===_0x5e230b(0xb4))console['log']('\x20\x20'+_0x25ebdc[_0x5e230b(0xd0)](0x11)+'\x20'+a73_0x1ae44b['yellow']('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x205d4f[_0x5e230b(0x9f)]===_0x5e230b(0xdd)?console[_0x5e230b(0xaa)]('\x20\x20'+_0x25ebdc[_0x5e230b(0xd0)](0x11)+'\x20'+a73_0x1ae44b['gray']('(missing)')):(console[_0x5e230b(0xaa)]('\x20\x20'+_0x25ebdc['padEnd'](0x11)+'\x20'+a73_0x1ae44b['red'](_0x5e230b(0xde))),console[_0x5e230b(0xaa)]('\x20\x20'+''[_0x5e230b(0xd0)](0x11)+'\x20'+a73_0x1ae44b['red'](_0x205d4f[_0x5e230b(0xb6)])));}};_0x1341ff(_0x3e006f(0xc2),_0x54e44d),_0x1341ff(_0x3e006f(0xe7),_0x1b1e85),console[_0x3e006f(0xaa)](),console[_0x3e006f(0xaa)](a73_0x1ae44b[_0x3e006f(0xd7)](_0x3e006f(0xbd))),console[_0x3e006f(0xaa)](a73_0x1ae44b[_0x3e006f(0xeb)](_0x3e006f(0xa3)[_0x3e006f(0xac)](0x1e))),console[_0x3e006f(0xaa)](_0x3e006f(0xbe)+(_0x258673[_0x3e006f(0xba)]||a73_0x1ae44b[_0x3e006f(0xd3)](_0x3e006f(0xc3)))),console['log']('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x258673['env']),console[_0x3e006f(0xaa)](_0x3e006f(0xe0)+_0x258673['locale']),console['log'](_0x3e006f(0xbc)+_0x258673[_0x3e006f(0xbb)]),console[_0x3e006f(0xaa)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x258673[_0x3e006f(0xe8)]||a73_0x1ae44b[_0x3e006f(0xeb)](_0x3e006f(0xe1)))),console['log'](_0x3e006f(0xcb)+(_0x258673[_0x3e006f(0xb9)]||a73_0x1ae44b[_0x3e006f(0xeb)]('(none)'))),console[_0x3e006f(0xaa)]('\x20\x20explicitAppName:\x20'+(_0x258673[_0x3e006f(0xab)]||a73_0x1ae44b['gray'](_0x3e006f(0xe1)))),console[_0x3e006f(0xaa)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x258673['format']||a73_0x1ae44b[_0x3e006f(0xeb)](_0x3e006f(0x9c)+DEFAULT_CONFIG_VALUES[_0x3e006f(0xe3)]+')'))),console[_0x3e006f(0xaa)](_0x3e006f(0xb0)+(_0x258673[_0x3e006f(0xb2)]??a73_0x1ae44b[_0x3e006f(0xeb)]('(default)'))),console[_0x3e006f(0xaa)](_0x3e006f(0xb8)+_0x258673[_0x3e006f(0xaf)]),console['log']('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x258673[_0x3e006f(0xe4)]),console['log'](_0x3e006f(0xd6)+(_0x258673[_0x3e006f(0xe2)]?a73_0x1ae44b[_0x3e006f(0xd5)](_0x3e006f(0xa0)+_0x258673['cookie'][_0x3e006f(0xef)]+')'):_0x4bc6db?a73_0x1ae44b[_0x3e006f(0xd5)](_0x3e006f(0xbf)+_0x4bc6db[_0x3e006f(0xef)]+')'):a73_0x1ae44b[_0x3e006f(0xeb)](_0x3e006f(0xe1))));const _0x3a7298=Object[_0x3e006f(0xcf)](_0x258673[_0x3e006f(0xca)]);if(_0x3a7298[_0x3e006f(0xef)]>0x0){console['log'](),console['log'](a73_0x1ae44b['bold'](_0x3e006f(0xa5))),console['log'](a73_0x1ae44b['gray'](_0x3e006f(0xa3)[_0x3e006f(0xac)](0x1e)));for(const _0x5b150c of _0x3a7298){const _0x332514=_0x258673[_0x3e006f(0xca)][_0x5b150c],_0x28ad28=_0x5b150c===_0x258673[_0x3e006f(0xe8)],_0x5dc911=_0x5b150c===_0x258673[_0x3e006f(0xb9)],_0xc5469e=_0x5dc911?a73_0x1ae44b[_0x3e006f(0xd5)](_0x3e006f(0xc1)):'',_0x4b6e82=_0x28ad28?_0x3e006f(0xec):'';console[_0x3e006f(0xaa)]('\x20\x20'+_0x5b150c+_0x4b6e82+_0xc5469e),console[_0x3e006f(0xaa)](_0x3e006f(0xb5)+_0x332514[_0x3e006f(0xc9)]);const _0x4f308a=buildAppDoctorFields(_0x332514,{'env':_0x258673[_0x3e006f(0x9d)],'apiDir':_0x258673[_0x3e006f(0xd2)]['apiDir']||DEFAULT_CONFIG_VALUES[_0x3e006f(0xbb)],'cookie':_0x258673[_0x3e006f(0xe2)]||_0x4bc6db||undefined,'accessKey':_0x258673[_0x3e006f(0xd9)]});console['log'](_0x3e006f(0xc6)+_0x4f308a[_0x3e006f(0x9d)][_0x3e006f(0xa1)]+'\x20\x20'+a73_0x1ae44b[_0x3e006f(0xeb)]('('+_0x4f308a[_0x3e006f(0x9d)][_0x3e006f(0xd4)]+')')),console[_0x3e006f(0xaa)](_0x3e006f(0xad)+_0x4f308a[_0x3e006f(0xbb)][_0x3e006f(0xa1)]+'\x20\x20'+a73_0x1ae44b[_0x3e006f(0xeb)]('('+_0x4f308a[_0x3e006f(0xbb)][_0x3e006f(0xd4)]+')'));const _0x38d428=_0x4f308a[_0x3e006f(0xe2)]['value']?a73_0x1ae44b[_0x3e006f(0xd5)](_0x3e006f(0xa0)+_0x4f308a[_0x3e006f(0xe2)][_0x3e006f(0xa1)][_0x3e006f(0xef)]+')'):a73_0x1ae44b[_0x3e006f(0xeb)](_0x3e006f(0xe1));console[_0x3e006f(0xaa)](_0x3e006f(0xe5)+_0x38d428+'\x20\x20'+a73_0x1ae44b[_0x3e006f(0xeb)]('('+_0x4f308a[_0x3e006f(0xe2)]['source']+')'));const _0x14494f=_0x4f308a[_0x3e006f(0xd9)][_0x3e006f(0xa1)]?a73_0x1ae44b['green'](_0x3e006f(0xa0)+_0x4f308a[_0x3e006f(0xd9)][_0x3e006f(0xa1)]['length']+')'):a73_0x1ae44b[_0x3e006f(0xeb)](_0x3e006f(0xe1));console[_0x3e006f(0xaa)](_0x3e006f(0xc0)+_0x14494f+'\x20\x20'+a73_0x1ae44b[_0x3e006f(0xeb)]('('+_0x4f308a[_0x3e006f(0xd9)][_0x3e006f(0xd4)]+')'));}}console[_0x3e006f(0xaa)](),console[_0x3e006f(0xaa)](a73_0x1ae44b[_0x3e006f(0xd7)](_0x3e006f(0xc5))),console[_0x3e006f(0xaa)](a73_0x1ae44b[_0x3e006f(0xeb)](_0x3e006f(0xa3)[_0x3e006f(0xac)](0x1e))),console['log'](_0x3e006f(0xdf)+getApiDomain()),console[_0x3e006f(0xaa)](_0x3e006f(0xc4)+getUserDomain()),console['log']('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x3e006f(0xaa)](),console[_0x3e006f(0xaa)](a73_0x1ae44b[_0x3e006f(0xd7)](_0x3e006f(0xdb))),console[_0x3e006f(0xaa)](a73_0x1ae44b['gray'](_0x3e006f(0xa3)[_0x3e006f(0xac)](0x1e)));if(_0x4bc6db){const _0x64c89d=await getIsSessionValid();console[_0x3e006f(0xaa)](_0x3e006f(0xa9)+(_0x64c89d?a73_0x1ae44b[_0x3e006f(0xd5)]('✓\x20Valid'):a73_0x1ae44b[_0x3e006f(0xd3)](_0x3e006f(0xc8))));}else console[_0x3e006f(0xaa)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a73_0x1ae44b[_0x3e006f(0xd3)](_0x3e006f(0xd1)));return console[_0x3e006f(0xaa)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':a73_0x30fb30(0x9a),'description':a73_0x30fb30(0xe6),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a74_0x6a0c97=a74_0x510c;function a74_0x42b9(){const _0x430d2f=['App\x20code\x20to\x20initialize\x20with','production','483QTYLdt','\x20config','appcode','40584ZGGJhN','defaultApp','13166140HWAuaz','toLocaleString','Auto-confirm\x20prompts','Target\x20environment','nonInteractive','appCode','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','6935967zQSkey','valid','\x20\x20Config:\x20','\x0a✓\x20Successfully\x20initialized\x20','project','Usage:\x20','env','4694700dsnXCB','string','yes','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','15xRNXxe','boolean','17164AERnuh','validation','custom','message','join','74698eSNjWT','Use\x20`','../../commands/project/init.js','8XzeFOP','bool','1935899sJwPAo','init','global','cwd','log','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','str','some','\x20\x20Apps:\x20','run'];a74_0x42b9=function(){return _0x430d2f;};return a74_0x42b9();}(function(_0x4672d8,_0x5117af){const _0x3c7847=a74_0x510c,_0x213e5a=_0x4672d8();while(!![]){try{const _0xdf53ac=-parseInt(_0x3c7847(0x111))/0x1*(-parseInt(_0x3c7847(0xe9))/0x2)+-parseInt(_0x3c7847(0xfa))/0x3*(parseInt(_0x3c7847(0x113))/0x4)+parseInt(_0x3c7847(0x10d))/0x5+parseInt(_0x3c7847(0xfd))/0x6+parseInt(_0x3c7847(0xee))/0x7*(parseInt(_0x3c7847(0xec))/0x8)+parseInt(_0x3c7847(0x106))/0x9+-parseInt(_0x3c7847(0xff))/0xa;if(_0xdf53ac===_0x5117af)break;else _0x213e5a['push'](_0x213e5a['shift']());}catch(_0x2ef9e4){_0x213e5a['push'](_0x213e5a['shift']());}}}(a74_0x42b9,0x8539e));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 a74_0x510c(_0x1ca96f,_0x4b2be6){_0x1ca96f=_0x1ca96f-0xe5;const _0x42b9c9=a74_0x42b9();let _0x510ccf=_0x42b9c9[_0x1ca96f];return _0x510ccf;}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(_0x1878a9){return{'appCode':_0x1878a9,'appName':_0x1878a9};}function writeInitConfig(_0x3cfcea,_0x4483dd,_0x1c1fd2){const _0x3f1fed=a74_0x510c,_0x4b9cfd=resolveWriteConfigPath(_0x3cfcea),_0x3a4d0e=buildCanonicalProjectConfig({},{'appCodes':_0x4483dd['map'](_0x44db9a=>_0x44db9a[_0x3f1fed(0x104)]),'env':_0x1c1fd2,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x3f1fed(0x100)]()}});writeConfigFile(_0x4b9cfd,_0x3a4d0e);const _0x129b66=_0x3cfcea===_0x3f1fed(0xf0)?'global':_0x3f1fed(0x10a);console[_0x3f1fed(0xf2)](_0x3f1fed(0x109)+_0x129b66+_0x3f1fed(0xfb)),console[_0x3f1fed(0xf2)](_0x3f1fed(0xf6)+_0x4483dd['map'](_0x3e275a=>_0x3e275a[_0x3f1fed(0x104)])[_0x3f1fed(0xe8)](',\x20')),console[_0x3f1fed(0xf2)]('\x20\x20Default:\x20'+_0x3a4d0e[_0x3f1fed(0xfe)]),console[_0x3f1fed(0xf2)]('\x20\x20Env:\x20'+_0x3a4d0e[_0x3f1fed(0x10c)]),console['log'](_0x3f1fed(0x108)+_0x4b9cfd);}async function runSmartInit(_0x4ef703){const _0x1a987f=a74_0x510c,_0x2dab27=process[_0x1a987f(0xf1)](),_0x5429fd=_0x4ef703[_0x1a987f(0xed)](_0x1a987f(0xf0))?_0x1a987f(0xf0):'project',_0x33293c=_0x4ef703[_0x1a987f(0xf4)]('env')||'production',_0x229d73=_0x4ef703[_0x1a987f(0xf4)](_0x1a987f(0xfc))||undefined,_0x510f7d=_0x4ef703[_0x1a987f(0xed)](_0x1a987f(0x10a));if(_0x510f7d){const {initConfig:_0x464cdd}=await import(_0x1a987f(0xeb));return _0x464cdd({'appcode':_0x229d73,'env':_0x33293c,'autoYes':_0x4ef703[_0x1a987f(0xed)](_0x1a987f(0x10f))});}if(_0x5429fd===_0x1a987f(0x10a)){const _0x4f521a=existsSync(resolve(_0x2dab27,NEW_CONFIG_NAME)),_0x462e6a=LEGACY_CONFIG_NAMES[_0x1a987f(0xf5)](_0x27e539=>existsSync(resolve(_0x2dab27,_0x27e539)));if(_0x462e6a&&!_0x4f521a)return console[_0x1a987f(0xf2)]('检测到旧配置文件,正在自动升级...\x0a'),upgradeApp(_0x4ef703['nonInteractive'],{'yes':_0x4ef703['bool'](_0x1a987f(0x10f))});if(_0x4f521a)throw CliErrors[_0x1a987f(0xe5)]('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.',_0x1a987f(0xea)+CLI_BIN_NAME+_0x1a987f(0x110));}if(_0x229d73){const _0x1bf371=validateAppcode(_0x229d73);if(!_0x1bf371[_0x1a987f(0x107)])throw CliErrors[_0x1a987f(0xe5)](_0x1bf371[_0x1a987f(0xe7)]);writeInitConfig(_0x5429fd,[syntheticApp(_0x229d73)],_0x33293c);return;}if(_0x4ef703[_0x1a987f(0x103)])throw CliErrors['flagMissing'](_0x1a987f(0xfc),_0x1a987f(0x10b)+CLI_BIN_NAME+_0x1a987f(0x105));const _0xcf437c=getCookie(),_0x31863c=await selectMultipleApps(_0xcf437c),_0x4e98c2=_0x31863c===_0x1a987f(0xe6)?[syntheticApp(await promptCustomAppcode())]:_0x31863c;writeInitConfig(_0x5429fd,_0x4e98c2,_0x33293c);}const initFlags=[{'name':'global','type':a74_0x6a0c97(0x112),'description':'Write\x20to\x20global\x20config\x20instead\x20of\x20project','default':![]},{'name':a74_0x6a0c97(0x10c),'type':a74_0x6a0c97(0x10e),'description':a74_0x6a0c97(0x102),'default':a74_0x6a0c97(0xf9),'enum':[...RABETBASE_ENV_VALUES]},{'name':'appcode','type':'string','description':a74_0x6a0c97(0xf8)},{'name':a74_0x6a0c97(0x10a),'type':'boolean','description':'Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','default':![]},{'name':a74_0x6a0c97(0x10f),'type':a74_0x6a0c97(0x112),'description':a74_0x6a0c97(0x101),'default':![]}];export const initDefinitions=[{'service':a74_0x6a0c97(0xef),'command':a74_0x6a0c97(0xf7),'description':a74_0x6a0c97(0xf3),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x52d799){return await runSmartInit(_0x52d799),{'ok':!![]};}}];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a75_0x12a3(_0xc632b6,_0x444cad){_0xc632b6=_0xc632b6-0x11a;const _0x3a3f51=a75_0x3a3f();let _0x12a361=_0x3a3f51[_0xc632b6];return _0x12a361;}(function(_0x171a86,_0xf37a88){const _0x409148=a75_0x12a3,_0x392031=_0x171a86();while(!![]){try{const _0x4749e4=-parseInt(_0x409148(0x123))/0x1*(-parseInt(_0x409148(0x11e))/0x2)+parseInt(_0x409148(0x11f))/0x3*(parseInt(_0x409148(0x11d))/0x4)+parseInt(_0x409148(0x121))/0x5*(parseInt(_0x409148(0x124))/0x6)+-parseInt(_0x409148(0x122))/0x7*(-parseInt(_0x409148(0x120))/0x8)+-parseInt(_0x409148(0x125))/0x9*(parseInt(_0x409148(0x11a))/0xa)+-parseInt(_0x409148(0x11b))/0xb+-parseInt(_0x409148(0x11c))/0xc;if(_0x4749e4===_0xf37a88)break;else _0x392031['push'](_0x392031['shift']());}catch(_0x357203){_0x392031['push'](_0x392031['shift']());}}}(a75_0x3a3f,0xd1b23));function a75_0x3a3f(){const _0x3ab7e2=['10171975lDUMzo','5467596YSbBxj','1960716tUDCdO','9342JLyZQe','6mIhWQA','849032NgElkF','5AmXXnm','77OTxvzh','51QbJiMU','9050988QQrqPB','69939ihGnVm','2130cFucLs'];a75_0x3a3f=function(){return _0x3ab7e2;};return a75_0x3a3f();}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a76_0x5d872e=a76_0x2eec;(function(_0x1846d0,_0x453ff1){const _0x28d6cc=a76_0x2eec,_0x426e4a=_0x1846d0();while(!![]){try{const _0x1475ef=-parseInt(_0x28d6cc(0x7f))/0x1*(parseInt(_0x28d6cc(0x88))/0x2)+-parseInt(_0x28d6cc(0x92))/0x3+parseInt(_0x28d6cc(0x9f))/0x4*(-parseInt(_0x28d6cc(0x74))/0x5)+parseInt(_0x28d6cc(0x86))/0x6+parseInt(_0x28d6cc(0x8b))/0x7+-parseInt(_0x28d6cc(0x83))/0x8*(parseInt(_0x28d6cc(0x76))/0x9)+-parseInt(_0x28d6cc(0x97))/0xa*(-parseInt(_0x28d6cc(0x90))/0xb);if(_0x1475ef===_0x453ff1)break;else _0x426e4a['push'](_0x426e4a['shift']());}catch(_0x19c551){_0x426e4a['push'](_0x426e4a['shift']());}}}(a76_0x1335,0x34f04));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';function a76_0x2eec(_0x38f86e,_0x27b9d2){_0x38f86e=_0x38f86e-0x6f;const _0x133538=a76_0x1335();let _0x2eec41=_0x133538[_0x38f86e];return _0x2eec41;}import{CliErrors}from'../../errors.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG='description-file';function a76_0x1335(){const _0x2a276c=['cwd','40OhwLFh','Platform\x20issue\x20reported','trim','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','report','One-line\x20issue\x20summary','compress','Failed\x20to\x20report\x20platform\x20issue:\x20','6428ELhdsK','descriptionSource','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','inline','description','flagMissing','790xuzMuV','length','764838tShCTk','string','descriptionFilePath','file','File\x20not\x20found:\x20','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','Issue\x20description\x20cannot\x20be\x20empty.','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','str','3hTGaWf','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','utf8','otel://','24JNCTVB','join','message','2284092oQLwFR','filter','57578xzQoAO','descriptionFile:\x20','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','638974UwMCKc','issue.title','validation','write','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','1036706IAGwyA','apiError','110679xhUAET','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','title','POST'];a76_0x1335=function(){return _0x2a276c;};return a76_0x1335();}export const issueReport={'service':'issue','command':a76_0x5d872e(0x9b),'description':'Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','risk':a76_0x5d872e(0x8e),'requiresAuth':![],'requiresAppCode':![],'defaultOutputFormat':a76_0x5d872e(0x9d),'flags':[{'name':a76_0x5d872e(0x94),'type':a76_0x5d872e(0x77),'required':!![],'description':a76_0x5d872e(0x9c)},{'name':a76_0x5d872e(0x72),'type':'string','description':a76_0x5d872e(0x93)},{'name':DESCRIPTION_FILE_FLAG,'type':a76_0x5d872e(0x77),'description':'Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description'}],async 'validate'(_0x53a42d){const _0x3bbe7a=a76_0x5d872e,_0x276c59=_0x53a42d[_0x3bbe7a(0x7e)](_0x3bbe7a(0x94))[_0x3bbe7a(0x99)](),_0x385d2b=_0x53a42d['str'](_0x3bbe7a(0x72))[_0x3bbe7a(0x99)](),_0x218f4f=_0x53a42d[_0x3bbe7a(0x7e)](DESCRIPTION_FILE_FLAG)[_0x3bbe7a(0x99)]();if(!_0x276c59)throw CliErrors[_0x3bbe7a(0x73)]('title',_0x3bbe7a(0x8f));const _0x45a136=_0x385d2b['length']>0x0,_0x361ffa=_0x218f4f[_0x3bbe7a(0x75)]>0x0;if(_0x45a136===_0x361ffa)throw CliErrors[_0x3bbe7a(0x8d)](_0x3bbe7a(0x9a),_0x3bbe7a(0x8a));if(_0x361ffa){const _0x2667c1=resolve(process[_0x3bbe7a(0x96)](),_0x218f4f);if(!existsSync(_0x2667c1))throw CliErrors[_0x3bbe7a(0x8d)](_0x3bbe7a(0x7a)+_0x2667c1);}},async 'dryRun'(_0x385718){const _0x374fdf=a76_0x5d872e,_0x396086=await prepareIssueReport(_0x385718);return{'method':_0x374fdf(0x95),'url':_0x374fdf(0x82)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x396086[_0x374fdf(0x94)],'issue.description':_0x396086[_0x374fdf(0x72)]}},'description':[_0x374fdf(0x70),'descriptionSource:\x20'+_0x396086[_0x374fdf(0x6f)],_0x396086[_0x374fdf(0x78)]?_0x374fdf(0x89)+_0x396086['descriptionFilePath']:null][_0x374fdf(0x87)](Boolean)[_0x374fdf(0x84)]('\x0a')};},async 'execute'(_0x357219){const _0x495da5=a76_0x5d872e,_0x1a9ebc=await prepareIssueReport(_0x357219);try{await sendPlatformIssueCollectLog({'title':_0x1a9ebc['title'],'description':_0x1a9ebc['description']});}catch(_0x2152dc){throw CliErrors[_0x495da5(0x91)](_0x495da5(0x9e)+(_0x2152dc instanceof Error?_0x2152dc[_0x495da5(0x85)]:String(_0x2152dc)),_0x495da5(0x80));}return{'ok':!![],'message':_0x495da5(0x98),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x495da5(0x8c),'issue.description'],'issue':{'title':_0x1a9ebc[_0x495da5(0x94)],'descriptionLength':_0x1a9ebc[_0x495da5(0x72)][_0x495da5(0x75)],'descriptionSource':_0x1a9ebc['descriptionSource'],..._0x1a9ebc[_0x495da5(0x78)]?{'descriptionFile':_0x1a9ebc['descriptionFilePath']}:{}}}};}};async function prepareIssueReport(_0x17dd0f){const _0x56a710=a76_0x5d872e,_0x13aa61=_0x17dd0f[_0x56a710(0x7e)](_0x56a710(0x94))[_0x56a710(0x99)](),_0x224233=_0x17dd0f[_0x56a710(0x7e)](_0x56a710(0x72)),_0x47a59f=_0x17dd0f[_0x56a710(0x7e)](DESCRIPTION_FILE_FLAG)[_0x56a710(0x99)]();if(!_0x47a59f){const _0x299817=_0x224233;if(!_0x299817[_0x56a710(0x99)]())throw CliErrors['validation'](_0x56a710(0x7c),_0x56a710(0x7b));return{'title':_0x13aa61,'description':_0x299817,'descriptionSource':_0x56a710(0x71)};}const _0x528f81=resolve(process[_0x56a710(0x96)](),_0x47a59f),_0x433a92=await readFile(_0x528f81,_0x56a710(0x81));if(!_0x433a92[_0x56a710(0x99)]())throw CliErrors['validation']('Issue\x20description\x20file\x20is\x20empty:\x20'+_0x528f81,_0x56a710(0x7d));return{'title':_0x13aa61,'description':_0x433a92,'descriptionSource':_0x56a710(0x79),'descriptionFilePath':_0x528f81};}
|