@lovrabet/rabetbase-cli 2.3.4-beta.3 → 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -0
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -0
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/dry-run.js +1 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -0
- package/lib/commands/permit/page-get.js +1 -0
- package/lib/commands/permit/page-set.js +1 -0
- package/lib/commands/permit/role-apis-set.js +1 -0
- package/lib/commands/permit/role-menus-set.js +1 -0
- package/lib/commands/permit/role-menus.js +1 -0
- package/lib/commands/permit/shared.js +1 -0
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -0
- package/lib/commands/role/delete.js +1 -0
- package/lib/commands/role/detail.js +1 -0
- package/lib/commands/role/index.js +1 -0
- package/lib/commands/role/list.js +1 -0
- package/lib/commands/role/shared.js +1 -0
- package/lib/commands/role/update.js +1 -0
- package/lib/commands/role/user-add.js +1 -0
- package/lib/commands/role/user-remove.js +1 -0
- package/lib/commands/role/user-resolve.js +1 -0
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/workspace/add.js +1 -0
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -2
- package/lib/commands/app/discover.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a76_0x33c5(_0x2d061d,_0x5641cb){_0x2d061d=_0x2d061d-0x125;const _0x5c8700=a76_0x5c87();let _0x33c5da=_0x5c8700[_0x2d061d];return _0x33c5da;}const a76_0x429123=a76_0x33c5;(function(_0x3c500e,_0x520a15){const _0x314932=a76_0x33c5,_0x389f8d=_0x3c500e();while(!![]){try{const _0x468fde=parseInt(_0x314932(0x126))/0x1+parseInt(_0x314932(0x12a))/0x2*(-parseInt(_0x314932(0x137))/0x3)+-parseInt(_0x314932(0x136))/0x4*(-parseInt(_0x314932(0x130))/0x5)+parseInt(_0x314932(0x12f))/0x6*(parseInt(_0x314932(0x12d))/0x7)+-parseInt(_0x314932(0x132))/0x8*(-parseInt(_0x314932(0x13b))/0x9)+-parseInt(_0x314932(0x13a))/0xa+-parseInt(_0x314932(0x127))/0xb*(-parseInt(_0x314932(0x131))/0xc);if(_0x468fde===_0x520a15)break;else _0x389f8d['push'](_0x389f8d['shift']());}catch(_0x29d871){_0x389f8d['push'](_0x389f8d['shift']());}}}(a76_0x5c87,0x51317));import{cancelDbAnalysis,getDbLinkInfo}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a76_0x5c87(){const _0x4c5953=['analyze-cancel','plan','450394mkQlkJ','Cancel\x20requested\x20for\x20plan\x20','18jFSELu','1115ZktFyi','84iTjNea','20024LUNvhI','latestAnalysisTraceId','No\x20latestAnalysisTraceId\x20on\x20this\x20link.\x20Pass\x20--plan\x20<traceId>\x20from\x20db\x20list/detail.','write','4616oDizqN','333YFCRKR','Analysis\x20may\x20already\x20be\x20finished\x20or\x20never\x20started.','Cancel\x20a\x20running\x20schema\x20analysis.\x20Omit\x20--plan\x20to\x20use\x20latestAnalysisTraceId\x20from\x20the\x20link','3182600SlLBao','1458nXApmj','string','420289FiJQRD','33407ZzAMDW','validation','str','11650YCCzsm'];a76_0x5c87=function(){return _0x4c5953;};return a76_0x5c87();}export const dbAnalyzeCancel={'service':'db','command':a76_0x429123(0x12b),'description':a76_0x429123(0x139),'risk':a76_0x429123(0x135),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a76_0x429123(0x12c),'type':a76_0x429123(0x125),'description':'Analysis\x20plan\x20/\x20trace\x20id\x20(optional\x20—\x20defaults\x20to\x20latest\x20trace\x20from\x20db\x20list/detail)'}],async 'execute'(_0x33d8e8){const _0x58b8b8=a76_0x429123,_0x33b3d4=_0x33d8e8['num']('id');let _0x2635d5=_0x33d8e8[_0x58b8b8(0x129)]('plan')||undefined;if(!_0x2635d5){const _0x59843f=await getDbLinkInfo(_0x33b3d4);_0x2635d5=_0x59843f[_0x58b8b8(0x133)]??undefined;if(!_0x2635d5)throw CliErrors[_0x58b8b8(0x128)](_0x58b8b8(0x134),_0x58b8b8(0x138));}return await cancelDbAnalysis(_0x2635d5),{'ok':!![],'data':{'dbLinkId':_0x33b3d4,'planId':_0x2635d5},'message':_0x58b8b8(0x12e)+_0x2635d5};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a77_0x1057ca=a77_0x56a3;(function(_0x32b47e,_0x53ac0e){const _0x30dc6a=a77_0x56a3,_0x64f48a=_0x32b47e();while(!![]){try{const _0x5f1f97=-parseInt(_0x30dc6a(0x77))/0x1*(-parseInt(_0x30dc6a(0x71))/0x2)+parseInt(_0x30dc6a(0x6f))/0x3+parseInt(_0x30dc6a(0x6b))/0x4*(-parseInt(_0x30dc6a(0x66))/0x5)+-parseInt(_0x30dc6a(0x68))/0x6*(-parseInt(_0x30dc6a(0x6d))/0x7)+-parseInt(_0x30dc6a(0x73))/0x8*(parseInt(_0x30dc6a(0x67))/0x9)+parseInt(_0x30dc6a(0x6a))/0xa+-parseInt(_0x30dc6a(0x75))/0xb;if(_0x5f1f97===_0x53ac0e)break;else _0x64f48a['push'](_0x64f48a['shift']());}catch(_0x1d4a62){_0x64f48a['push'](_0x64f48a['shift']());}}}(a77_0x4c90,0xb2338));function a77_0x56a3(_0x187a56,_0x2ce7b0){_0x187a56=_0x187a56-0x66;const _0x4c9025=a77_0x4c90();let _0x56a3d8=_0x4c9025[_0x187a56];return _0x56a3d8;}import{startDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a77_0x4c90(){const _0x3f9f69=['25716afiYpk','write','23170FEiZfx','Started\x20analysis\x20for\x20db\x20link\x20','2425704HcRLgg','appCode','744964sEzlxl','filter','7009048FtbCio','trim','8805797dqeCSM','analyze-start','3uKXjvm','tables','string','635EUDMTT','9uejBXK','342gakLyR','Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','11083690BnytUM'];a77_0x4c90=function(){return _0x3f9f69;};return a77_0x4c90();}import{buildDbPageLinks}from'../../commands/db/shared.js';export const dbAnalyzeStart={'service':'db','command':a77_0x1057ca(0x76),'description':a77_0x1057ca(0x69),'risk':a77_0x1057ca(0x6c),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a77_0x1057ca(0x78),'type':a77_0x1057ca(0x79),'description':'Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)'}],async 'execute'(_0xb38a1f){const _0x1fdbac=a77_0x1057ca,_0x19a2d6=_0xb38a1f['num']('id'),_0x28aba6=_0xb38a1f['str'](_0x1fdbac(0x78)),_0x1403a2=_0x28aba6?_0x28aba6['split'](',')['map'](_0x1e73c9=>_0x1e73c9[_0x1fdbac(0x74)]())[_0x1fdbac(0x72)](Boolean):undefined,_0xddde8=await startDbAnalysis(_0x19a2d6,_0x1403a2),_0x4cb552=buildDbPageLinks(_0xb38a1f[_0x1fdbac(0x70)],_0x19a2d6);return{'ok':!![],'data':{'dbLinkId':_0x19a2d6,'planId':_0xddde8,'tableNames':_0x1403a2??[],..._0x4cb552?{'links':_0x4cb552}:{}},'message':_0x1fdbac(0x6e)+_0x19a2d6};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a78_0x108af7=a78_0x16fa;function a78_0x16fa(_0x4cf606,_0x4c9da4){_0x4cf606=_0x4cf606-0xc3;const _0x3e7927=a78_0x3e79();let _0x16fa67=_0x3e7927[_0x4cf606];return _0x16fa67;}(function(_0x223a9f,_0x40b5d3){const _0x23e1bc=a78_0x16fa,_0x3bc56b=_0x223a9f();while(!![]){try{const _0x5813eb=-parseInt(_0x23e1bc(0xce))/0x1*(-parseInt(_0x23e1bc(0xdd))/0x2)+-parseInt(_0x23e1bc(0xc6))/0x3*(-parseInt(_0x23e1bc(0xdb))/0x4)+parseInt(_0x23e1bc(0xd0))/0x5+parseInt(_0x23e1bc(0xc4))/0x6*(-parseInt(_0x23e1bc(0xc8))/0x7)+parseInt(_0x23e1bc(0xe0))/0x8+-parseInt(_0x23e1bc(0xd4))/0x9+parseInt(_0x23e1bc(0xd5))/0xa*(parseInt(_0x23e1bc(0xcb))/0xb);if(_0x5813eb===_0x40b5d3)break;else _0x3bc56b['push'](_0x3bc56b['shift']());}catch(_0x107da5){_0x3bc56b['push'](_0x3bc56b['shift']());}}}(a78_0x3e79,0x72b46));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';const TERMINAL_STATUSES=new Set([a78_0x108af7(0xda),'PARTIAL_SUCCESS',a78_0x108af7(0xd3),a78_0x108af7(0xd8)]);export const dbAnalyzeStatus={'service':'db','command':a78_0x108af7(0xcf),'description':a78_0x108af7(0xde),'risk':a78_0x108af7(0xd1),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a78_0x108af7(0xd6),'type':'string','required':!![],'description':a78_0x108af7(0xc5)}],async 'execute'(_0xf373d){const _0x20c4b6=a78_0x108af7,_0x40bb04=_0xf373d[_0x20c4b6(0xc9)]('id'),_0x483a78=_0xf373d['str'](_0x20c4b6(0xd6)),_0x2a1282=await getDbAnalysisStatus(_0x483a78),_0x567636=TERMINAL_STATUSES[_0x20c4b6(0xd9)](_0x2a1282[_0x20c4b6(0xe5)]??''),{parsedJobContext:_0x4261d6,jobContextParseWarning:_0x1021f4}=parseJobContext(_0x2a1282[_0x20c4b6(0xdc)]),_0xd59bc9=buildDbPageLinks(_0xf373d['appCode'],_0x40bb04);return{'ok':!![],'data':{'dbLinkId':_0x40bb04,'planId':_0x483a78,'status':_0x2a1282,'parsedJobContext':_0x4261d6,'isTerminal':_0x567636,'isRetrying':_0x2a1282['status']===_0x20c4b6(0xcc),'elapsedMs':calculateElapsedMs(_0x2a1282,_0x567636),'jobContextParseWarning':_0x1021f4,..._0xd59bc9?{'links':_0xd59bc9}:{}},'message':_0x20c4b6(0xe4)+_0x483a78};}};function parseJobContext(_0x3b5bb1){const _0x2bb5a9=a78_0x108af7;if(!_0x3b5bb1?.[_0x2bb5a9(0xc7)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x39381f=JSON['parse'](_0x3b5bb1);if(_0x39381f&&typeof _0x39381f==='object'&&!Array[_0x2bb5a9(0xe2)](_0x39381f))return{'parsedJobContext':_0x39381f,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':'jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.'};}function a78_0x3e79(){const _0x188ee3=['FAILED','8315316wpibKS','15870ukUjgR','plan','costTimeMs','CANCELLED','has','SUCCESS','4LPhAVe','jobContext','894MSXNiv','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','number','2136256vqMePQ','string','isArray','parse','Analysis\x20status\x20for\x20','status','startTime','588kelEqq','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','498819lDrpYh','trim','36631lrvBYg','num','isFinite','5885fvZvxM','RETRYING','now','812JtkZxw','analyze-status','1306370PBDaSA','read','isNaN'];a78_0x3e79=function(){return _0x188ee3;};return a78_0x3e79();}function calculateElapsedMs(_0x1b9730,_0x43484d){const _0x40ae86=a78_0x108af7;if(typeof _0x1b9730['costTimeMs']===_0x40ae86(0xdf)&&Number['isFinite'](_0x1b9730[_0x40ae86(0xd7)])&&_0x1b9730['costTimeMs']>=0x0)return _0x1b9730['costTimeMs'];const _0xba4900=toTimestamp(_0x1b9730[_0x40ae86(0xc3)]);if(_0xba4900===null)return null;const _0xad5726=toTimestamp(_0x1b9730['endTime']),_0x40a0cd=_0xad5726??(_0x43484d?null:Date[_0x40ae86(0xcd)]());if(_0x40a0cd===null||_0x40a0cd<_0xba4900)return null;return _0x40a0cd-_0xba4900;}function toTimestamp(_0x3f72bd){const _0x4ad41b=a78_0x108af7;if(typeof _0x3f72bd==='number')return Number['isFinite'](_0x3f72bd)?_0x3f72bd:null;if(typeof _0x3f72bd!==_0x4ad41b(0xe1)||_0x3f72bd['trim']()==='')return null;const _0x58a53c=Number(_0x3f72bd);if(Number[_0x4ad41b(0xca)](_0x58a53c))return _0x58a53c;const _0x29f9fd=Date[_0x4ad41b(0xe3)](_0x3f72bd);return Number[_0x4ad41b(0xd2)](_0x29f9fd)?null:_0x29f9fd;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a79_0x4a9b12=a79_0x1e44;(function(_0x5be62c,_0x4aec9d){const _0x2436c7=a79_0x1e44,_0x20fb90=_0x5be62c();while(!![]){try{const _0x1db879=-parseInt(_0x2436c7(0x71))/0x1*(parseInt(_0x2436c7(0x88))/0x2)+parseInt(_0x2436c7(0x7f))/0x3+parseInt(_0x2436c7(0x6f))/0x4+parseInt(_0x2436c7(0x86))/0x5+-parseInt(_0x2436c7(0x66))/0x6*(parseInt(_0x2436c7(0x7e))/0x7)+-parseInt(_0x2436c7(0x84))/0x8+parseInt(_0x2436c7(0x7a))/0x9*(parseInt(_0x2436c7(0x85))/0xa);if(_0x1db879===_0x4aec9d)break;else _0x20fb90['push'](_0x20fb90['shift']());}catch(_0x297621){_0x20fb90['push'](_0x20fb90['shift']());}}}(a79_0xd41c,0xc2976));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';function a79_0x1e44(_0x4b2849,_0x227167){_0x4b2849=_0x4b2849-0x64;const _0xd41c33=a79_0xd41c();let _0x1e446f=_0xd41c33[_0x4b2849];return _0x1e446f;}import{buildDbPageLinks,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';function a79_0xd41c(){const _0x4cfd91=['password','autostart','dbdesc','8.0','bool','write','1791508XxguDb','databasePage','1481329ENriCi','string','username','dbname','Database\x20password','dbparam','POST','dbtype','Host\x20and\x20port:\x20host:port','13006233mwIrEx','dbversion','[redacted]',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','2987411AdfDih','2093349gkhcUG','message','boolean','create','appCode','1744712DqrRoM','10WqatJf','5929930zXOpok','str','2YjmUeK','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','trim','dburl','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','18MYpGDT','Created\x20db\x20link\x20','Create\x20dblink'];a79_0xd41c=function(){return _0x4cfd91;};return a79_0xd41c();}import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':a79_0x4a9b12(0x82),'description':'Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','risk':a79_0x4a9b12(0x6e),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a79_0x4a9b12(0x74),'type':a79_0x4a9b12(0x72),'required':!![],'description':'Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server'},DB_TYPE_FLAG,{'name':'dbversion','type':a79_0x4a9b12(0x72),'description':'Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','default':a79_0x4a9b12(0x6c)},{'name':a79_0x4a9b12(0x64),'type':a79_0x4a9b12(0x72),'required':!![],'description':a79_0x4a9b12(0x79)},{'name':a79_0x4a9b12(0x73),'type':a79_0x4a9b12(0x72),'required':!![],'description':'Database\x20username'},{'name':'password','type':'string','required':!![],'description':a79_0x4a9b12(0x75)},{'name':a79_0x4a9b12(0x76),'type':a79_0x4a9b12(0x72),'description':'Extra\x20JDBC-style\x20connection\x20parameters\x20string'},{'name':a79_0x4a9b12(0x6b),'type':a79_0x4a9b12(0x72),'description':'Human-readable\x20description'},{'name':'autostart','type':a79_0x4a9b12(0x81),'description':'After\x20create,\x20start\x20schema\x20analysis','default':![]}],async 'validate'(_0x1e82c6){const _0xbb72da=a79_0x4a9b12,_0x5e1432=_0x1e82c6[_0xbb72da(0x87)](_0xbb72da(0x64))[_0xbb72da(0x8a)]();if(!validateDbUrl(_0x5e1432))throw CliErrors['validation']('Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22'+_0x5e1432+'\x22',_0xbb72da(0x89));},async 'dryRun'(_0x2c3acf){const _0x5ed6b3=a79_0x4a9b12,_0x50a9e4={'appCode':_0x2c3acf[_0x5ed6b3(0x83)],'dbName':_0x2c3acf[_0x5ed6b3(0x87)](_0x5ed6b3(0x74)),'dbType':_0x2c3acf['str'](_0x5ed6b3(0x78)),'dbVersion':_0x2c3acf[_0x5ed6b3(0x87)](_0x5ed6b3(0x7b))||_0x5ed6b3(0x6c),'dbUrl':_0x2c3acf[_0x5ed6b3(0x87)](_0x5ed6b3(0x64))['trim'](),'username':_0x2c3acf[_0x5ed6b3(0x87)](_0x5ed6b3(0x73)),'password':_0x5ed6b3(0x7c),..._0x2c3acf['str'](_0x5ed6b3(0x76))?{'dbParam':_0x2c3acf[_0x5ed6b3(0x87)](_0x5ed6b3(0x76))}:{},..._0x2c3acf['str'](_0x5ed6b3(0x6b))?{'dbDesc':_0x2c3acf[_0x5ed6b3(0x87)]('dbdesc')}:{}};return{'method':_0x5ed6b3(0x77),'url':'/smartapi/dblink/create','body':_0x50a9e4,'description':[_0x5ed6b3(0x68),_0x2c3acf[_0x5ed6b3(0x6d)]('autostart')?'Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id':'No\x20follow-up\x20analysis']['join']('\x0a')};},async 'execute'(_0x4e3791){const _0x2dd603=a79_0x4a9b12,_0x4a3309={'appCode':_0x4e3791['appCode'],'dbName':_0x4e3791['str']('dbname'),'dbType':_0x4e3791[_0x2dd603(0x87)](_0x2dd603(0x78)),'dbVersion':_0x4e3791[_0x2dd603(0x87)](_0x2dd603(0x7b))||_0x2dd603(0x6c),'dbUrl':_0x4e3791['str'](_0x2dd603(0x64))[_0x2dd603(0x8a)](),'username':_0x4e3791['str'](_0x2dd603(0x73)),'password':_0x4e3791[_0x2dd603(0x87)](_0x2dd603(0x69)),..._0x4e3791[_0x2dd603(0x87)](_0x2dd603(0x76))?{'dbParam':_0x4e3791[_0x2dd603(0x87)](_0x2dd603(0x76))}:{},..._0x4e3791[_0x2dd603(0x87)]('dbdesc')?{'dbDesc':_0x4e3791['str'](_0x2dd603(0x6b))}:{}},{id:_0x56599e,entity:_0x57e0a8}=normalizeEntityWithIdResponse(await createDbLink(_0x4a3309));if(!_0x56599e)return{'ok':![],'message':_0x2dd603(0x65),'data':sanitizeDbLinkForOutput(_0x57e0a8)};let _0x3529d4,_0x12aae9;if(_0x4e3791[_0x2dd603(0x6d)](_0x2dd603(0x6a)))try{_0x3529d4=await startDbAnalysis(_0x56599e);}catch(_0x4422cc){_0x12aae9=_0x4422cc instanceof Error?_0x4422cc[_0x2dd603(0x80)]:String(_0x4422cc);}const _0x151b4f=buildDbPageLinks(_0x4e3791[_0x2dd603(0x83)],_0x56599e),_0x1a7916={'connection':sanitizeDbLinkForOutput(_0x57e0a8),..._0x151b4f?{'links':{'databasePage':_0x151b4f[_0x2dd603(0x70)]}}:{},..._0x3529d4?{'analysisPlanId':_0x3529d4}:{},..._0x12aae9?{'analysisStartWarning':_0x12aae9}:{}};let _0x4a344e;return _0x4e3791[_0x2dd603(0x6d)]('autostart')?_0x12aae9?_0x4a344e=_0x2dd603(0x67)+_0x56599e+_0x2dd603(0x7d):_0x4a344e=_0x2dd603(0x67)+_0x56599e+'\x20and\x20started\x20analysis':_0x4a344e=_0x2dd603(0x67)+_0x56599e,{'ok':!![],'data':_0x1a7916,'message':_0x4a344e};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a80_0x4fa0(_0x33f6db,_0x44ea61){_0x33f6db=_0x33f6db-0xbc;const _0x1f6010=a80_0x1f60();let _0x4fa02a=_0x1f6010[_0x33f6db];return _0x4fa02a;}const a80_0x547cea=a80_0x4fa0;(function(_0x3ec682,_0x542874){const _0x364754=a80_0x4fa0,_0x424f92=_0x3ec682();while(!![]){try{const _0x342f21=parseInt(_0x364754(0xbe))/0x1+parseInt(_0x364754(0xc6))/0x2*(-parseInt(_0x364754(0xc0))/0x3)+-parseInt(_0x364754(0xcb))/0x4*(-parseInt(_0x364754(0xc8))/0x5)+parseInt(_0x364754(0xc9))/0x6+-parseInt(_0x364754(0xc7))/0x7*(-parseInt(_0x364754(0xc3))/0x8)+parseInt(_0x364754(0xbf))/0x9*(-parseInt(_0x364754(0xca))/0xa)+-parseInt(_0x364754(0xc1))/0xb*(parseInt(_0x364754(0xc2))/0xc);if(_0x342f21===_0x542874)break;else _0x424f92['push'](_0x424f92['shift']());}catch(_0x22e7f3){_0x424f92['push'](_0x424f92['shift']());}}}(a80_0x1f60,0x89d73));import{deleteDbLink}from'../../core/api-client.js';function a80_0x1f60(){const _0x136321=['853809vEQmaF','24iSLKgM','31352ODSaHd','Deleted\x20db\x20link\x20','num','620690XzjIIK','448gbuImw','5miVccU','6373824QsIGbp','12940BJTOUR','244492dRRxxv','high-risk-write','Delete\x20a\x20database\x20connection\x20(dblink)\x20permanently','441178UWXCyD','3303MrYNpn','6XsvOxg'];a80_0x1f60=function(){return _0x136321;};return a80_0x1f60();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDelete={'service':'db','command':'delete','description':a80_0x547cea(0xbd),'risk':a80_0x547cea(0xbc),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3ffdc2){const _0x476349=a80_0x547cea,_0x128874=_0x3ffdc2[_0x476349(0xc5)]('id');return await deleteDbLink(_0x128874),{'ok':!![],'data':{'id':_0x128874,'deleted':!![]},'message':_0x476349(0xc4)+_0x128874};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a81_0x3ea0(_0x322a95,_0x2f1a9a){_0x322a95=_0x322a95-0x1a8;const _0xe63d2d=a81_0xe63d();let _0x3ea0e8=_0xe63d2d[_0x322a95];return _0x3ea0e8;}function a81_0xe63d(){const _0x4be1db=['44501050eIXMap','877338oWFVNW','read','207afGGbp','25066PiXNZv','1060232IFZNbD','detail','62379HmPkFY','30NftAtg','dbName','1088dNhurX','16394LvLBTr','11200240nTjMJy','1050frbrOL','db\x20link\x20','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)'];a81_0xe63d=function(){return _0x4be1db;};return a81_0xe63d();}const a81_0x2575a2=a81_0x3ea0;(function(_0x50f7ee,_0x424cec){const _0x44ea96=a81_0x3ea0,_0x251fc3=_0x50f7ee();while(!![]){try{const _0x41ce1c=parseInt(_0x44ea96(0x1b7))/0x1+parseInt(_0x44ea96(0x1aa))/0x2*(-parseInt(_0x44ea96(0x1a9))/0x3)+-parseInt(_0x44ea96(0x1ab))/0x4*(parseInt(_0x44ea96(0x1ae))/0x5)+-parseInt(_0x44ea96(0x1b3))/0x6*(-parseInt(_0x44ea96(0x1b1))/0x7)+parseInt(_0x44ea96(0x1b0))/0x8*(-parseInt(_0x44ea96(0x1ad))/0x9)+-parseInt(_0x44ea96(0x1b2))/0xa+parseInt(_0x44ea96(0x1b6))/0xb;if(_0x41ce1c===_0x424cec)break;else _0x251fc3['push'](_0x251fc3['shift']());}catch(_0x217730){_0x251fc3['push'](_0x251fc3['shift']());}}}(a81_0xe63d,0xc6f7d));import{getDbLinkInfo}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbDetail={'service':'db','command':a81_0x2575a2(0x1ac),'description':a81_0x2575a2(0x1b5),'risk':a81_0x2575a2(0x1a8),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x24bd5f){const _0x3a3220=a81_0x2575a2,_0x4371a4=_0x24bd5f['num']('id'),_0x2d05de=await getDbLinkInfo(_0x4371a4);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x2d05de),'message':_0x3a3220(0x1b4)+_0x4371a4+':\x20'+_0x2d05de[_0x3a3220(0x1af)]};}};
|
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a82_0x284353=a82_0x4145;(function(_0x41c294,_0x203ec2){const _0x26c064=a82_0x4145,_0x4bcafa=_0x41c294();while(!![]){try{const _0x1ae770=parseInt(_0x26c064(0xbc))/0x1*(-parseInt(_0x26c064(0xcc))/0x2)+-parseInt(_0x26c064(0xdf))/0x3*(parseInt(_0x26c064(0xcb))/0x4)+-parseInt(_0x26c064(0xe1))/0x5*(parseInt(_0x26c064(0xb2))/0x6)+parseInt(_0x26c064(0xd5))/0x7+parseInt(_0x26c064(0xdd))/0x8*(parseInt(_0x26c064(0xd6))/0x9)+-parseInt(_0x26c064(0xc8))/0xa*(parseInt(_0x26c064(0xcf))/0xb)+parseInt(_0x26c064(0xc3))/0xc*(parseInt(_0x26c064(0xd4))/0xd);if(_0x1ae770===_0x203ec2)break;else _0x4bcafa['push'](_0x4bcafa['shift']());}catch(_0xad2fdf){_0x4bcafa['push'](_0x4bcafa['shift']());}}}(a82_0x299e,0x9db22));import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const ALL_PAGE_SIZE=0x64,DIFF_TYPES=[a82_0x284353(0xb3),a82_0x284353(0xb6),'DELETED_TABLE',a82_0x284353(0xda)];export const dbDiff={'service':'db','command':a82_0x284353(0xbe),'description':a82_0x284353(0xbd),'risk':'read','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a82_0x284353(0xb5),'type':'string','description':a82_0x284353(0xbb)},{'name':a82_0x284353(0xd7),'type':a82_0x284353(0xb7),'description':a82_0x284353(0xd2),'default':0x1},{'name':'pagesize','type':a82_0x284353(0xb7),'description':a82_0x284353(0xce),'default':0x14},{'name':a82_0x284353(0xd1),'type':a82_0x284353(0xdc),'description':a82_0x284353(0xde)},{'name':a82_0x284353(0xb4),'type':'boolean','description':a82_0x284353(0xd0)}],async 'execute'(_0x570315){const _0x434bff=a82_0x284353,_0x4afd68=_0x570315[_0x434bff(0xdb)]('id'),_0x4e722a=_0x570315[_0x434bff(0xc1)](_0x434bff(0xd1)),_0x5a8612=_0x570315[_0x434bff(0xc1)]('changed-only'),_0x11f000=_0x4e722a?0x1:_0x570315['num'](_0x434bff(0xd7),0x1)||0x1,_0x13ae0d=_0x4e722a?ALL_PAGE_SIZE:_0x570315[_0x434bff(0xdb)]('pagesize',0x14)||0x14,_0x45dc60=_0x570315['str'](_0x434bff(0xb5))||undefined,_0x1e7740=_0x4e722a?await getAllDbTableDiff(_0x570315['appCode'],_0x4afd68,_0x45dc60):await getDbTableDiff(_0x570315['appCode'],_0x4afd68,{'pageIndex':_0x11f000,'pageSize':_0x13ae0d,'tableName':_0x45dc60}),_0x33792f=_0x1e7740['tableList'],_0x1dab45=_0x5a8612?_0x33792f[_0x434bff(0xb9)](_0x17e174=>_0x17e174['diffType']!=='ALREADY_ANALYZED'):_0x33792f,_0xd8cf3e=Object['fromEntries'](DIFF_TYPES['map'](_0x5246c2=>[_0x5246c2,_0x33792f[_0x434bff(0xb9)](_0x39a532=>_0x39a532['diffType']===_0x5246c2)[_0x434bff(0xc7)]])),_0xd75cbd=_0x33792f[_0x434bff(0xb9)](_0x2a246a=>_0x2a246a[_0x434bff(0xb8)]===_0x434bff(0xb3)||_0x2a246a['diffType']===_0x434bff(0xb6))[_0x434bff(0xc2)](_0x416caf=>_0x416caf['tableName']),_0x5d875e=_0x33792f[_0x434bff(0xb9)](_0x2bb1de=>_0x2bb1de[_0x434bff(0xb8)]===_0x434bff(0xc0))[_0x434bff(0xc2)](_0x3fc21c=>_0x3fc21c[_0x434bff(0xe0)]),_0x84475d=_0x33792f[_0x434bff(0xb9)](_0x34add0=>_0x34add0[_0x434bff(0xb8)]===_0x434bff(0xb6))[_0x434bff(0xc2)](_0x186e6b=>({'tableName':_0x186e6b[_0x434bff(0xe0)],'addedColumns':_0x186e6b['fieldDiff']?.['addedColumns']??[],'deletedColumns':_0x186e6b['fieldDiff']?.['deletedColumns']??[],'modifiedColumns':_0x186e6b[_0x434bff(0xbf)]?.[_0x434bff(0xba)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x4afd68,'page':_0x11f000,'pageSize':_0x13ae0d,'totalCount':_0x1e7740[_0x434bff(0xd8)],'physicalTableCount':_0x1e7740[_0x434bff(0xc5)],'datasetTableCount':_0x1e7740[_0x434bff(0xca)],..._0x1e7740[_0x434bff(0xc6)]?{'summary':_0x1e7740[_0x434bff(0xc6)]}:{},'summaryByType':_0xd8cf3e,'toAnalyzeTables':_0xd75cbd,'deletedTables':_0x5d875e,'modifiedFieldDiffs':_0x84475d,'tables':_0x1dab45,'tableList':_0x1dab45},'message':_0x1dab45[_0x434bff(0xc7)]+'\x20row(s),\x20total\x20'+_0x1e7740[_0x434bff(0xd8)]+_0x434bff(0xd3)+_0x4afd68+')'};}};async function getAllDbTableDiff(_0x58d618,_0x1456f6,_0x49d06b){const _0x4f972a=a82_0x284353,_0x4a33a0=new Map();let _0x453061=0x1,_0x5bd2b3=null;while(!![]){_0x5bd2b3=await getDbTableDiff(_0x58d618,_0x1456f6,{'pageIndex':_0x453061,'pageSize':ALL_PAGE_SIZE,'tableName':_0x49d06b});const _0x57d95f=_0x4a33a0[_0x4f972a(0xd9)];for(const _0x1583ce of _0x5bd2b3[_0x4f972a(0xc4)]){_0x4a33a0['set'](_0x1583ce[_0x4f972a(0xe0)],_0x1583ce);}if(_0x4a33a0[_0x4f972a(0xd9)]>=_0x5bd2b3[_0x4f972a(0xd8)])break;if(_0x5bd2b3[_0x4f972a(0xc4)][_0x4f972a(0xc7)]===0x0||_0x4a33a0['size']===_0x57d95f)throw CliErrors[_0x4f972a(0xcd)](_0x4f972a(0xc9)+_0x4a33a0[_0x4f972a(0xd9)]+'\x20of\x20'+_0x5bd2b3[_0x4f972a(0xd8)]+'\x20row(s).');_0x453061+=0x1;}return{'totalCount':_0x5bd2b3?.[_0x4f972a(0xd8)]??0x0,'physicalTableCount':_0x5bd2b3?.[_0x4f972a(0xc5)]??0x0,'datasetTableCount':_0x5bd2b3?.[_0x4f972a(0xca)]??0x0,..._0x5bd2b3?.[_0x4f972a(0xc6)]?{'summary':_0x5bd2b3[_0x4f972a(0xc6)]}:{},'tableList':[..._0x4a33a0['values']()]};}function a82_0x4145(_0x1b0ceb,_0x5e4c07){_0x1b0ceb=_0x1b0ceb-0xb2;const _0x299efe=a82_0x299e();let _0x414508=_0x299efe[_0x1b0ceb];return _0x414508;}function a82_0x299e(){const _0x18d9e5=['diff','fieldDiff','DELETED_TABLE','bool','map','28730244eYzLyl','tableList','physicalTableCount','summary','length','60qhRLVO','Incomplete\x20db\x20diff\x20pagination:\x20collected\x20','datasetTableCount','20CNElnm','16676ZsUMDO','validation','Page\x20size','1692922lzpRaa','Exclude\x20ALREADY_ANALYZED\x20rows\x20while\x20keeping\x20deleted\x20tables','all','Page\x20index\x20(1-based)','\x20(db\x20link\x20','13kSstQu','4450397jhiRPu','27BwmRMy','page','totalCount','size','ALREADY_ANALYZED','num','boolean','1372720rahnPt','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','667518FCnypr','tableName','260520sSwNWt','84KyflEh','NEW_TABLE','changed-only','table','MODIFIED_TABLE','number','diffType','filter','modifiedColumns','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','16YEFKTu','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift'];a82_0x299e=function(){return _0x18d9e5;};return a82_0x299e();}
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3048bc,_0x343ad3){const _0x2de474=a83_0x5159,_0x17fbb7=_0x3048bc();while(!![]){try{const _0x314951=parseInt(_0x2de474(0x77))/0x1*(-parseInt(_0x2de474(0x72))/0x2)+parseInt(_0x2de474(0x7c))/0x3*(-parseInt(_0x2de474(0x74))/0x4)+-parseInt(_0x2de474(0x70))/0x5+-parseInt(_0x2de474(0x79))/0x6*(parseInt(_0x2de474(0x7a))/0x7)+-parseInt(_0x2de474(0x73))/0x8*(parseInt(_0x2de474(0x76))/0x9)+parseInt(_0x2de474(0x71))/0xa*(-parseInt(_0x2de474(0x75))/0xb)+-parseInt(_0x2de474(0x7b))/0xc*(-parseInt(_0x2de474(0x78))/0xd);if(_0x314951===_0x343ad3)break;else _0x17fbb7['push'](_0x17fbb7['shift']());}catch(_0xbb5345){_0x17fbb7['push'](_0x17fbb7['shift']());}}}(a83_0x11f1,0x4aa85));import{dbList}from'../../commands/db/list.js';function a83_0x5159(_0x17c7bc,_0x301f89){_0x17c7bc=_0x17c7bc-0x70;const _0x11f1c9=a83_0x11f1();let _0x515973=_0x11f1c9[_0x17c7bc];return _0x515973;}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';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];function a83_0x11f1(){const _0x1f9d04=['3401710FbzJcW','368574FuYsoN','7yFPsRS','72SLhJxv','2559yyDHyL','1425695imvUpo','870inFGzH','4VnOZBV','8LTvMKa','2224hsecPU','8382QnfaJv','1097757wBxhCe','127560NLhpis'];a83_0x11f1=function(){return _0x1f9d04;};return a83_0x11f1();}
|
package/lib/commands/db/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a84_0x4f75be=a84_0x2794;function a84_0x2794(_0x2c5151,_0x4c6a70){_0x2c5151=_0x2c5151-0x104;const _0x5c88d6=a84_0x5c88();let _0x27944e=_0x5c88d6[_0x2c5151];return _0x27944e;}(function(_0x1093ae,_0x5a4571){const _0x446495=a84_0x2794,_0x418672=_0x1093ae();while(!![]){try{const _0x1ed621=parseInt(_0x446495(0x110))/0x1*(parseInt(_0x446495(0x114))/0x2)+parseInt(_0x446495(0x109))/0x3+parseInt(_0x446495(0x115))/0x4*(-parseInt(_0x446495(0x112))/0x5)+parseInt(_0x446495(0x11b))/0x6*(parseInt(_0x446495(0x108))/0x7)+parseInt(_0x446495(0x10a))/0x8*(-parseInt(_0x446495(0x117))/0x9)+parseInt(_0x446495(0x111))/0xa*(-parseInt(_0x446495(0x10d))/0xb)+parseInt(_0x446495(0x11a))/0xc*(parseInt(_0x446495(0x104))/0xd);if(_0x1ed621===_0x5a4571)break;else _0x418672['push'](_0x418672['shift']());}catch(_0xb44749){_0x418672['push'](_0x418672['shift']());}}}(a84_0x5c88,0x546c4));import{listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{sanitizeDbLinkList}from'../../commands/db/shared.js';function a84_0x5c88(){const _0x576091=['378UQNZVH','page','117OBZqDT','list','number','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','1834dCeeXw','476778rgRKQY','72FLkDac','Found\x20','\x20database\x20connection(s)','3531aMEMZr','Page\x20index\x20(1-based)','pagesize','563JEucFp','19830WasBBg','620630PPVCdq','read','652EqLJlV','4BwnCTQ','Page\x20size','542502TByaIe','num','length','1719996rkdBow'];a84_0x5c88=function(){return _0x576091;};return a84_0x5c88();}export const dbList={'service':'db','command':a84_0x4f75be(0x105),'description':a84_0x4f75be(0x107),'risk':a84_0x4f75be(0x113),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a84_0x4f75be(0x11c),'type':a84_0x4f75be(0x106),'description':a84_0x4f75be(0x10e),'default':0x1},{'name':a84_0x4f75be(0x10f),'type':a84_0x4f75be(0x106),'description':a84_0x4f75be(0x116),'default':0x64}],async 'execute'(_0x4493ee){const _0x5494a0=a84_0x4f75be,_0x5d9cc6=_0x4493ee[_0x5494a0(0x118)]('page',0x1)||0x1,_0x2d00e7=_0x4493ee['num']('pagesize',0x64)||0x64,{items:_0x2c2763,paging:_0x256e48}=await listDbLinks(_0x4493ee['appCode'],{'currentPage':_0x5d9cc6,'pageSize':_0x2d00e7}),_0x50e059=sanitizeDbLinkList(_0x2c2763),_0x482787=_0x256e48?_0x256e48:{'currentPage':_0x5d9cc6,'pageSize':_0x2d00e7,'rowsOnPage':_0x50e059[_0x5494a0(0x119)],'totalCount':null,'note':'Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only'};return{'ok':!![],'data':{'connections':_0x50e059,'paging':_0x482787},'message':_0x5494a0(0x10b)+_0x50e059[_0x5494a0(0x119)]+_0x5494a0(0x10c)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xbecfc4,_0x4d3bbb){const _0x58bac2=a85_0x4b3c,_0x1a4fbd=_0xbecfc4();while(!![]){try{const _0x5508d3=parseInt(_0x58bac2(0x96))/0x1*(-parseInt(_0x58bac2(0x9c))/0x2)+parseInt(_0x58bac2(0xa2))/0x3*(parseInt(_0x58bac2(0x98))/0x4)+parseInt(_0x58bac2(0x8a))/0x5*(parseInt(_0x58bac2(0x99))/0x6)+-parseInt(_0x58bac2(0x9b))/0x7*(parseInt(_0x58bac2(0x8f))/0x8)+parseInt(_0x58bac2(0x9f))/0x9+parseInt(_0x58bac2(0x9e))/0xa*(-parseInt(_0x58bac2(0x8b))/0xb)+parseInt(_0x58bac2(0xa0))/0xc*(parseInt(_0x58bac2(0x90))/0xd);if(_0x5508d3===_0x4d3bbb)break;else _0x1a4fbd['push'](_0x1a4fbd['shift']());}catch(_0x1f8503){_0x1a4fbd['push'](_0x1a4fbd['shift']());}}}(a85_0x82aa,0x1e2dc));import{getAppBaseUrl}from'../../constant/domain.js';function a85_0x4b3c(_0x18edf9,_0x498707){_0x18edf9=_0x18edf9-0x87;const _0x82aa4a=a85_0x82aa();let _0x4b3c0a=_0x82aa4a[_0x18edf9];return _0x4b3c0a;}function shouldRedactKey(_0x1d56e5){const _0x24f98d=a85_0x4b3c,_0x4f0ffd=_0x1d56e5['toLowerCase']();if(_0x4f0ffd===_0x24f98d(0x91)||_0x4f0ffd===_0x24f98d(0x92)||_0x4f0ffd===_0x24f98d(0x88))return!![];if(_0x4f0ffd[_0x24f98d(0x93)](_0x24f98d(0xa1))||_0x4f0ffd['includes']('token')||_0x4f0ffd[_0x24f98d(0x93)]('credential'))return!![];if(_0x4f0ffd[_0x24f98d(0x93)](_0x24f98d(0x8c))||_0x4f0ffd['includes'](_0x24f98d(0x94)))return!![];if(_0x4f0ffd===_0x24f98d(0xa3)||_0x4f0ffd===_0x24f98d(0xa5)||_0x4f0ffd===_0x24f98d(0x97))return!![];return![];}export function sanitizeDbLinkForOutput(_0x4ebcbc){const _0x358885=a85_0x4b3c,_0x1f0b9f={..._0x4ebcbc};for(const _0x41952a of Object[_0x358885(0xa6)](_0x1f0b9f)){if(!shouldRedactKey(_0x41952a))continue;const _0x40b23c=_0x1f0b9f[_0x41952a];_0x40b23c!=null&&String(_0x40b23c)[_0x358885(0x95)]>0x0&&(_0x1f0b9f[_0x41952a]=_0x358885(0x8d));}return _0x1f0b9f;}export function sanitizeDbLinkList(_0x2dfa02){const _0x143615=a85_0x4b3c;return _0x2dfa02[_0x143615(0xa7)](_0x5b35da=>sanitizeDbLinkForOutput(_0x5b35da));}function a85_0x82aa(){const _0x9b80c1=['dbpassword','test','220110YLESIN','418IEWDVk','privatekey','[redacted]','number','21848OcRLXX','650RaAezO','password','passwd','includes','accesskey','length','197mRddvQ','jdbcurl','164psCPOT','6OZNhzH','/data/er?dbId=','399lgjHTc','28KZavsS','/data/database','44740fYvPTf','239580ETJVvY','41088tItcwI','secret','15381mCapBc','authorization','isFinite','connectionstring','keys','map','trim'];a85_0x82aa=function(){return _0x9b80c1;};return a85_0x82aa();}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x41c422){const _0x4257e0=a85_0x4b3c,_0x2bf3d6=_0x41c422['trim']();if(!_0x2bf3d6)return![];return DB_URL_PATTERN[_0x4257e0(0x89)](_0x2bf3d6);}export function buildDbPageLinks(_0x54e723,_0x284cb9){const _0x2affca=a85_0x4b3c,_0x5e804d=_0x54e723?.[_0x2affca(0x87)]();if(!_0x5e804d)return undefined;const _0xd6cd29=typeof _0x284cb9===_0x2affca(0x8e)?String(_0x284cb9):String(_0x284cb9??'')[_0x2affca(0x87)]();if(!_0xd6cd29)return undefined;const _0x49d416=Number(_0xd6cd29);if(!Number[_0x2affca(0xa4)](_0x49d416)||_0x49d416<=0x0)return undefined;const _0x11a84e=getAppBaseUrl(_0x5e804d),_0x182eae=encodeURIComponent(String(_0x49d416));return{'databasePage':_0x11a84e+_0x2affca(0x9d),'erPage':_0x11a84e+_0x2affca(0x9a)+_0x182eae};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a86_0x4140(_0x17e4f7,_0x3e547f){_0x17e4f7=_0x17e4f7-0x14e;const _0x3296ae=a86_0x3296();let _0x414050=_0x3296ae[_0x17e4f7];return _0x414050;}function a86_0x3296(){const _0x5096da=['1584045hqxkZM','\x20table(s)\x20on\x20db\x20link\x20','9BvXeum','10189806wwJBOM','read','appCode','107178kBFQpA','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','tables','1133212QejNqO','length','18DNujPT','12FwKRZS','3736540qVMeHz','3722648RurnIM','18ISELKx','797811WogzCP'];a86_0x3296=function(){return _0x5096da;};return a86_0x3296();}const a86_0x2e910f=a86_0x4140;(function(_0x1c019c,_0x1cc1e0){const _0x12f358=a86_0x4140,_0x204225=_0x1c019c();while(!![]){try{const _0x14b375=parseInt(_0x12f358(0x14f))/0x1*(-parseInt(_0x12f358(0x15b))/0x2)+-parseInt(_0x12f358(0x157))/0x3*(parseInt(_0x12f358(0x15e))/0x4)+parseInt(_0x12f358(0x155))/0x5+parseInt(_0x12f358(0x150))/0x6*(-parseInt(_0x12f358(0x154))/0x7)+-parseInt(_0x12f358(0x152))/0x8*(-parseInt(_0x12f358(0x153))/0x9)+parseInt(_0x12f358(0x151))/0xa+parseInt(_0x12f358(0x158))/0xb;if(_0x14b375===_0x1cc1e0)break;else _0x204225['push'](_0x204225['shift']());}catch(_0x437c0e){_0x204225['push'](_0x204225['shift']());}}}(a86_0x3296,0x7b4b6));import{getDbAllTableList}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbTables={'service':'db','command':a86_0x2e910f(0x15d),'description':a86_0x2e910f(0x15c),'risk':a86_0x2e910f(0x159),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3ec0f6){const _0x1eac45=a86_0x2e910f,_0x4d339d=_0x3ec0f6['num']('id'),_0x2340cb=await getDbAllTableList(_0x3ec0f6[_0x1eac45(0x15a)],_0x4d339d);return{'ok':!![],'data':{'dbLinkId':_0x4d339d,'total':_0x2340cb[_0x1eac45(0x14e)],'tables':_0x2340cb},'message':_0x2340cb[_0x1eac45(0x14e)]+_0x1eac45(0x156)+_0x4d339d};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a87_0x4db6(_0x5f0d94,_0x450eb7){_0x5f0d94=_0x5f0d94-0x138;const _0x594408=a87_0x5944();let _0x4db635=_0x594408[_0x5f0d94];return _0x4db635;}const a87_0x1d38a8=a87_0x4db6;(function(_0x3e4b1c,_0x130784){const _0x476b8e=a87_0x4db6,_0x1024be=_0x3e4b1c();while(!![]){try{const _0x27f382=parseInt(_0x476b8e(0x139))/0x1+-parseInt(_0x476b8e(0x138))/0x2+parseInt(_0x476b8e(0x13b))/0x3*(-parseInt(_0x476b8e(0x13d))/0x4)+parseInt(_0x476b8e(0x141))/0x5*(-parseInt(_0x476b8e(0x149))/0x6)+parseInt(_0x476b8e(0x13c))/0x7+-parseInt(_0x476b8e(0x145))/0x8+parseInt(_0x476b8e(0x142))/0x9*(parseInt(_0x476b8e(0x14b))/0xa);if(_0x27f382===_0x130784)break;else _0x1024be['push'](_0x1024be['shift']());}catch(_0x41c515){_0x1024be['push'](_0x1024be['shift']());}}}(a87_0x5944,0xe974a));import{testDbLinkConnect}from'../../core/api-client.js';function a87_0x5944(){const _0x3f4af5=['length','object','msg','1122yWJxqF','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','20vGtaQZ','read','error','keys','2664588FKJHAQ','1052120wRLXlu','success','24zSVBAh','4981249DRwbDk','722380HLjtss','\x20(see\x20data.result)','slice','test','48305QdenEB','22958379cjZLux','Connection\x20check\x20finished\x20for\x20db\x20link\x20','Connection\x20OK\x20for\x20db\x20link\x20','10605552efqfaD'];a87_0x5944=function(){return _0x3f4af5;};return a87_0x5944();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x1df739){const _0x41de29=a87_0x4db6;if(_0x1df739===!![]||_0x1df739===![])return{'success':_0x1df739};if(_0x1df739===null||_0x1df739===undefined)return{'type':typeof _0x1df739};if(typeof _0x1df739!=='object')return{'type':typeof _0x1df739};const _0x2ecc88=_0x1df739,_0x5a5334=[_0x41de29(0x13a),'message','code',_0x41de29(0x14d),_0x41de29(0x148),'data'],_0x537dfd={};for(const _0x1db518 of _0x5a5334){if(_0x1db518 in _0x2ecc88)_0x537dfd[_0x1db518]=_0x2ecc88[_0x1db518];}return Object[_0x41de29(0x14e)](_0x537dfd)[_0x41de29(0x146)]===0x0&&(_0x537dfd['keys']=Object[_0x41de29(0x14e)](_0x2ecc88)[_0x41de29(0x13f)](0x0,0x14)),_0x537dfd;}export const dbTest={'service':'db','command':a87_0x1d38a8(0x140),'description':a87_0x1d38a8(0x14a),'risk':a87_0x1d38a8(0x14c),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x37cab5){const _0x3460e9=a87_0x1d38a8,_0x40187b=_0x37cab5['num']('id'),_0x450590=await testDbLinkConnect(_0x40187b),_0x2e2e98=_0x450590===!![]||typeof _0x450590===_0x3460e9(0x147)&&_0x450590!==null&&_0x450590[_0x3460e9(0x13a)]===!![],_0x5a7b73=summarizeTestConnectResult(_0x450590);return{'ok':!![],'data':{'id':_0x40187b,'connected':Boolean(_0x2e2e98),'result':_0x5a7b73},'message':_0x2e2e98?_0x3460e9(0x144)+_0x40187b:_0x3460e9(0x143)+_0x40187b+_0x3460e9(0x13e)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a88_0x12113e=a88_0x43de;function a88_0x43de(_0x31e341,_0x148c7d){_0x31e341=_0x31e341-0x173;const _0x48363d=a88_0x4836();let _0x43def8=_0x48363d[_0x31e341];return _0x43def8;}(function(_0x575802,_0x1b5f6c){const _0x262fac=a88_0x43de,_0x257b86=_0x575802();while(!![]){try{const _0x4963be=parseInt(_0x262fac(0x193))/0x1*(-parseInt(_0x262fac(0x17a))/0x2)+parseInt(_0x262fac(0x18f))/0x3*(parseInt(_0x262fac(0x178))/0x4)+-parseInt(_0x262fac(0x18c))/0x5+parseInt(_0x262fac(0x195))/0x6*(parseInt(_0x262fac(0x182))/0x7)+parseInt(_0x262fac(0x176))/0x8+-parseInt(_0x262fac(0x17c))/0x9*(-parseInt(_0x262fac(0x187))/0xa)+-parseInt(_0x262fac(0x190))/0xb*(parseInt(_0x262fac(0x181))/0xc);if(_0x4963be===_0x1b5f6c)break;else _0x257b86['push'](_0x257b86['shift']());}catch(_0x23ccfb){_0x257b86['push'](_0x257b86['shift']());}}}(a88_0x4836,0x60d5b));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';function a88_0x4836(){const _0x313425=['string','dbname','username','trim','Updated\x20db\x20link\x20','6234104JiWpjB','New\x20password\x20(omit\x20to\x20leave\x20unchanged).\x20Empty\x20string\x20may\x20be\x20treated\x20as\x20no-op\x20or\x20rejected\x20by\x20API','4zjDnEz','New\x20connection\x20parameter\x20string','52SioGYg','New\x20username','1104516LhIZDH','dbdesc','validation','str','dbName','324NvmUoi','14yUuFYn','write','Update\x20an\x20existing\x20database\x20connection.\x20Only\x20supplied\x20fields\x20are\x20overwritten;\x20others\x20keep\x20server\x20values','dbDesc','dburl','40qQiABH','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','New\x20host:port','dbParam','New\x20description','709765sWnCJq','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','dbparam','2018049kmaTQM','808962MRfhwD','num','dbUrl','87Eqsusx','password','1750926DZzeDv'];a88_0x4836=function(){return _0x313425;};return a88_0x4836();}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':'update','description':a88_0x12113e(0x184),'risk':a88_0x12113e(0x183),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a88_0x12113e(0x197),'type':a88_0x12113e(0x196),'description':'New\x20database\x20name'},{'name':a88_0x12113e(0x186),'type':a88_0x12113e(0x196),'description':a88_0x12113e(0x189)},{'name':a88_0x12113e(0x173),'type':a88_0x12113e(0x196),'description':a88_0x12113e(0x17b)},{'name':'password','type':'string','description':a88_0x12113e(0x177)},{'name':a88_0x12113e(0x18e),'type':a88_0x12113e(0x196),'description':a88_0x12113e(0x179)},{'name':a88_0x12113e(0x17d),'type':'string','description':a88_0x12113e(0x18b)}],async 'validate'(_0x28b273){const _0x127a47=a88_0x12113e,_0x2b3a4f=_0x28b273[_0x127a47(0x17f)](_0x127a47(0x186));if(_0x2b3a4f&&!validateDbUrl(_0x2b3a4f[_0x127a47(0x174)]()))throw CliErrors[_0x127a47(0x17e)](_0x127a47(0x188)+_0x2b3a4f+'\x22');},async 'dryRun'(_0x30a265){const _0x278f3f=a88_0x12113e,_0x3d4bcb=_0x30a265[_0x278f3f(0x191)]('id'),_0x2ccb76=await getDbLinkInfo(_0x3d4bcb),_0x32563d={..._0x2ccb76},_0x41dc1c=_0x30a265[_0x278f3f(0x17f)](_0x278f3f(0x197));if(_0x41dc1c)_0x32563d[_0x278f3f(0x180)]=_0x41dc1c;const _0x33a437=_0x30a265['str'](_0x278f3f(0x186));if(_0x33a437)_0x32563d[_0x278f3f(0x192)]=_0x33a437['trim']();const _0x8b5f93=_0x30a265['str'](_0x278f3f(0x173));if(_0x8b5f93)_0x32563d[_0x278f3f(0x173)]=_0x8b5f93;const _0x550c5d=_0x30a265[_0x278f3f(0x17f)](_0x278f3f(0x194));if(_0x550c5d)_0x32563d[_0x278f3f(0x194)]=_0x550c5d;const _0x38eed5=_0x30a265[_0x278f3f(0x17f)]('dbparam');if(_0x38eed5)_0x32563d[_0x278f3f(0x18a)]=_0x38eed5;const _0x529634=_0x30a265[_0x278f3f(0x17f)](_0x278f3f(0x17d));if(_0x529634)_0x32563d[_0x278f3f(0x185)]=_0x529634;const _0x139838=sanitizeDbLinkForOutput(_0x32563d);return{'method':'POST','url':'/smartapi/dblink/update','body':_0x139838,'description':_0x278f3f(0x18d)};},async 'execute'(_0x21535f){const _0x2c5af0=a88_0x12113e,_0x4328f3=_0x21535f[_0x2c5af0(0x191)]('id'),_0x26c118=await getDbLinkInfo(_0x4328f3),_0x3cab5f={..._0x26c118},_0x4387a7=_0x21535f[_0x2c5af0(0x17f)](_0x2c5af0(0x197));if(_0x4387a7)_0x3cab5f[_0x2c5af0(0x180)]=_0x4387a7;const _0x20717c=_0x21535f[_0x2c5af0(0x17f)](_0x2c5af0(0x186));if(_0x20717c)_0x3cab5f[_0x2c5af0(0x192)]=_0x20717c['trim']();const _0x46c101=_0x21535f[_0x2c5af0(0x17f)](_0x2c5af0(0x173));if(_0x46c101)_0x3cab5f[_0x2c5af0(0x173)]=_0x46c101;const _0xe5c7da=_0x21535f[_0x2c5af0(0x17f)](_0x2c5af0(0x194));if(_0xe5c7da)_0x3cab5f[_0x2c5af0(0x194)]=_0xe5c7da;const _0xd91533=_0x21535f[_0x2c5af0(0x17f)](_0x2c5af0(0x18e));if(_0xd91533)_0x3cab5f[_0x2c5af0(0x18a)]=_0xd91533;const _0xffd019=_0x21535f[_0x2c5af0(0x17f)](_0x2c5af0(0x17d));if(_0xffd019)_0x3cab5f[_0x2c5af0(0x185)]=_0xffd019;const {id:_0xc7c560,entity:_0x63ff04}=normalizeEntityWithIdResponse(await updateDbLink(_0x3cab5f));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x63ff04),'message':_0x2c5af0(0x175)+(_0xc7c560??_0x4328f3)};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a87_0x20a3(_0x10f99f,_0x11aec4){_0x10f99f=_0x10f99f-0x182;const _0x135c4c=a87_0x135c();let _0x20a38c=_0x135c4c[_0x10f99f];return _0x20a38c;}const a87_0x3fbe5d=a87_0x20a3;(function(_0x54df5f,_0x1750fd){const _0x2e9a82=a87_0x20a3,_0x2530bc=_0x54df5f();while(!![]){try{const _0x107f24=parseInt(_0x2e9a82(0x191))/0x1+-parseInt(_0x2e9a82(0x1b5))/0x2*(-parseInt(_0x2e9a82(0x1cb))/0x3)+-parseInt(_0x2e9a82(0x1bf))/0x4*(parseInt(_0x2e9a82(0x199))/0x5)+-parseInt(_0x2e9a82(0x1ca))/0x6*(parseInt(_0x2e9a82(0x1b2))/0x7)+-parseInt(_0x2e9a82(0x1b4))/0x8*(parseInt(_0x2e9a82(0x1d0))/0x9)+parseInt(_0x2e9a82(0x1cf))/0xa*(-parseInt(_0x2e9a82(0x1a1))/0xb)+parseInt(_0x2e9a82(0x1c3))/0xc;if(_0x107f24===_0x1750fd)break;else _0x2530bc['push'](_0x2530bc['shift']());}catch(_0x562ddb){_0x2530bc['push'](_0x2530bc['shift']());}}}(a87_0x135c,0x4a8a7));import a87_0x4faac6 from'chalk';function a87_0x135c(){const _0x250551=['\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','length','explicitAppName','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','21OHRlal','(missing)','45520cTXIqc','1558iydulv','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','\x20\x20explicitAppName:\x20','apps','currentApp','\x20(default)','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20←\x20current','\x20\x20Apps','10616bICzGY','riskLevel','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','\x20\x20─','23134884BkhBbA','(none)','(no\x20file)','verbose','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','598302aARmSA','771kzHtZa','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','defaultApp','raw','4155050FLwncj','873hLryAt','bold','Global','keys','check','log','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','red','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','(set,\x20length=','green','(set\x20via\x20file,\x20length=','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','\x20\x20API\x20Endpoints','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','source','padEnd','✗\x20Expired','14405AHSUxH','(not\x20found)','\x20\x20Merged\x20Config','\x20\x20runtimeDomain:\x20\x20\x20','value','accessKey','Project','env','1075kruajZ','slice','appcode','gray','read','\x20\x20Auth','status','repeat','11NqesTF','platform','cookie','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','apiDir','yellow','(not\x20set)','✗\x20Invalid\x20JSON','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','appCode','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20Files'];a87_0x135c=function(){return _0x250551;};return a87_0x135c();}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(_0x2a9623){const _0x23834f=a87_0x20a3,_0x598f7e=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x23834f(0x19a)](0x0,0xa)+')':VERSION,_0xcae042=buildConfigFromFlags({}),_0x38a1b6=getCookie();console['log'](),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x1d1)](CLI_BIN_NAME+'\x20doctor')),console['log'](a87_0x4faac6[_0x23834f(0x19c)]('─'[_0x23834f(0x1a0)](0x32))),console[_0x23834f(0x1d5)](_0x23834f(0x1ae)+_0x598f7e),console[_0x23834f(0x1d5)](_0x23834f(0x1b6)+process['version']),console[_0x23834f(0x1d5)](_0x23834f(0x1bc)+process[_0x23834f(0x1a2)]+'\x20'+process['arch']),console[_0x23834f(0x1d5)](),console[_0x23834f(0x1d5)](a87_0x4faac6['bold'](_0x23834f(0x1ad))),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x1c2)['repeat'](0x1e)));const _0x1a134e=getGlobalConfigPath(),_0x2b45dc=getProjectConfigPath();console[_0x23834f(0x1d5)](_0x23834f(0x1b1)+(_0x1a134e||a87_0x4faac6['gray']('(not\x20found)'))),console['log'](_0x23834f(0x1ac)+(_0x2b45dc||a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x192)))),console['log'](),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x1d1)]('\x20\x20Config\x20JSON')),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x1c2)[_0x23834f(0x1a0)](0x1e)));const _0x5de416=(_0x38efaf,_0x89b08f)=>{const _0x4b6671=_0x23834f;if(!_0x89b08f){console['log']('\x20\x20'+_0x38efaf[_0x4b6671(0x18f)](0x11)+'\x20'+a87_0x4faac6['gray'](_0x4b6671(0x1c5)));return;}const _0x2af9b5=inspectCliConfigJsonFile(_0x89b08f);if(_0x2af9b5[_0x4b6671(0x19f)]==='ok')console[_0x4b6671(0x1d5)]('\x20\x20'+_0x38efaf[_0x4b6671(0x18f)](0x11)+'\x20'+a87_0x4faac6[_0x4b6671(0x187)](_0x4b6671(0x1b7)));else{if(_0x2af9b5[_0x4b6671(0x19f)]==='empty')console[_0x4b6671(0x1d5)]('\x20\x20'+_0x38efaf[_0x4b6671(0x18f)](0x11)+'\x20'+a87_0x4faac6[_0x4b6671(0x1a7)](_0x4b6671(0x182)));else _0x2af9b5[_0x4b6671(0x19f)]===_0x4b6671(0x18a)?console[_0x4b6671(0x1d5)]('\x20\x20'+_0x38efaf[_0x4b6671(0x18f)](0x11)+'\x20'+a87_0x4faac6[_0x4b6671(0x19c)](_0x4b6671(0x1b3))):(console[_0x4b6671(0x1d5)]('\x20\x20'+_0x38efaf[_0x4b6671(0x18f)](0x11)+'\x20'+a87_0x4faac6[_0x4b6671(0x184)](_0x4b6671(0x1a9))),console['log']('\x20\x20'+''[_0x4b6671(0x18f)](0x11)+'\x20'+a87_0x4faac6[_0x4b6671(0x184)](_0x2af9b5['message'])));}};_0x5de416(_0x23834f(0x1d2),_0x1a134e),_0x5de416(_0x23834f(0x197),_0x2b45dc),console['log'](),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x1d1)](_0x23834f(0x193))),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x1c2)[_0x23834f(0x1a0)](0x1e))),console[_0x23834f(0x1d5)](_0x23834f(0x183)+(_0xcae042[_0x23834f(0x1ab)]||a87_0x4faac6[_0x23834f(0x184)](_0x23834f(0x1a8)))),console[_0x23834f(0x1d5)](_0x23834f(0x1a4)+_0xcae042[_0x23834f(0x198)]),console[_0x23834f(0x1d5)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xcae042['locale']),console['log']('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xcae042[_0x23834f(0x1a6)]),console[_0x23834f(0x1d5)](_0x23834f(0x1c8)+(_0xcae042[_0x23834f(0x1cd)]||a87_0x4faac6[_0x23834f(0x19c)]('(none)'))),console[_0x23834f(0x1d5)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0xcae042[_0x23834f(0x1ba)]||a87_0x4faac6['gray'](_0x23834f(0x1c4)))),console[_0x23834f(0x1d5)](_0x23834f(0x1b8)+(_0xcae042[_0x23834f(0x1b0)]||a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x1c4)))),console[_0x23834f(0x1d5)](_0x23834f(0x189)+(_0xcae042[_0x23834f(0x1a5)]||a87_0x4faac6[_0x23834f(0x19c)]('(default:\x20'+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x23834f(0x1d5)](_0x23834f(0x1c7)+(_0xcae042['pageSize']??a87_0x4faac6[_0x23834f(0x19c)]('(default)'))),console['log'](_0x23834f(0x1cc)+_0xcae042[_0x23834f(0x1c0)]),console['log']('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xcae042[_0x23834f(0x1c6)]),console[_0x23834f(0x1d5)](_0x23834f(0x18d)+(_0xcae042[_0x23834f(0x1a3)]?a87_0x4faac6['green'](_0x23834f(0x186)+_0xcae042[_0x23834f(0x1a3)][_0x23834f(0x1af)]+')'):_0x38a1b6?a87_0x4faac6[_0x23834f(0x187)](_0x23834f(0x188)+_0x38a1b6[_0x23834f(0x1af)]+')'):a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x1c4))));const _0xd40f8d=Object[_0x23834f(0x1d3)](_0xcae042[_0x23834f(0x1b9)]);if(_0xd40f8d[_0x23834f(0x1af)]>0x0){console[_0x23834f(0x1d5)](),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x1d1)](_0x23834f(0x1be))),console[_0x23834f(0x1d5)](a87_0x4faac6['gray'](_0x23834f(0x1c2)[_0x23834f(0x1a0)](0x1e)));for(const _0x500d6f of _0xd40f8d){const _0x3c94de=_0xcae042[_0x23834f(0x1b9)][_0x500d6f],_0x2e7add=_0x500d6f===_0xcae042[_0x23834f(0x1cd)],_0x438db2=_0x500d6f===_0xcae042[_0x23834f(0x1ba)],_0x47a427=_0x438db2?a87_0x4faac6[_0x23834f(0x187)](_0x23834f(0x1bd)):'',_0x390cc9=_0x2e7add?_0x23834f(0x1bb):'';console[_0x23834f(0x1d5)]('\x20\x20'+_0x500d6f+_0x390cc9+_0x47a427),console[_0x23834f(0x1d5)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x3c94de[_0x23834f(0x19b)]);const _0x391902=buildAppDoctorFields(_0x3c94de,{'env':_0xcae042[_0x23834f(0x198)],'apiDir':_0xcae042[_0x23834f(0x1ce)]['apiDir']||DEFAULT_CONFIG_VALUES[_0x23834f(0x1a6)],'cookie':_0xcae042['cookie']||_0x38a1b6||undefined,'accessKey':_0xcae042[_0x23834f(0x196)]});console['log'](_0x23834f(0x1aa)+_0x391902['env'][_0x23834f(0x195)]+'\x20\x20'+a87_0x4faac6['gray']('('+_0x391902[_0x23834f(0x198)][_0x23834f(0x18e)]+')')),console[_0x23834f(0x1d5)](_0x23834f(0x185)+_0x391902[_0x23834f(0x1a6)]['value']+'\x20\x20'+a87_0x4faac6[_0x23834f(0x19c)]('('+_0x391902[_0x23834f(0x1a6)][_0x23834f(0x18e)]+')'));const _0x2f2e77=_0x391902[_0x23834f(0x1a3)][_0x23834f(0x195)]?a87_0x4faac6[_0x23834f(0x187)](_0x23834f(0x186)+_0x391902[_0x23834f(0x1a3)][_0x23834f(0x195)][_0x23834f(0x1af)]+')'):a87_0x4faac6['gray'](_0x23834f(0x1c4));console[_0x23834f(0x1d5)](_0x23834f(0x1c1)+_0x2f2e77+'\x20\x20'+a87_0x4faac6['gray']('('+_0x391902['cookie'][_0x23834f(0x18e)]+')'));const _0x1bbd3e=_0x391902[_0x23834f(0x196)][_0x23834f(0x195)]?a87_0x4faac6[_0x23834f(0x187)](_0x23834f(0x186)+_0x391902[_0x23834f(0x196)]['value'][_0x23834f(0x1af)]+')'):a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x1c4));console['log']('\x20\x20\x20\x20accessKey:\x20\x20'+_0x1bbd3e+'\x20\x20'+a87_0x4faac6[_0x23834f(0x19c)]('('+_0x391902['accessKey'][_0x23834f(0x18e)]+')'));}}console[_0x23834f(0x1d5)](),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x1d1)](_0x23834f(0x18b))),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x1c2)[_0x23834f(0x1a0)](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x23834f(0x1d5)](_0x23834f(0x18c)+getUserDomain()),console['log'](_0x23834f(0x194)+getRuntimeDomain()),console[_0x23834f(0x1d5)](),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x1d1)](_0x23834f(0x19e))),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x1c2)[_0x23834f(0x1a0)](0x1e)));if(_0x38a1b6){const _0x2becf9=await getIsSessionValid();console[_0x23834f(0x1d5)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x2becf9?a87_0x4faac6[_0x23834f(0x187)]('✓\x20Valid'):a87_0x4faac6[_0x23834f(0x184)](_0x23834f(0x190))));}else console[_0x23834f(0x1d5)](_0x23834f(0x1c9)+a87_0x4faac6[_0x23834f(0x184)]('✗\x20Not\x20logged\x20in'));return console[_0x23834f(0x1d5)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':a87_0x3fbe5d(0x1d4),'description':'Diagnose\x20CLI\x20configuration\x20and\x20connectivity','risk':a87_0x3fbe5d(0x19d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a89_0x507ae7=a89_0x55d4;(function(_0x220c55,_0xa3c5c4){const _0x5f6afc=a89_0x55d4,_0x86f6d=_0x220c55();while(!![]){try{const _0x36d73c=-parseInt(_0x5f6afc(0x19e))/0x1*(parseInt(_0x5f6afc(0x196))/0x2)+parseInt(_0x5f6afc(0x17e))/0x3+parseInt(_0x5f6afc(0x1a4))/0x4*(parseInt(_0x5f6afc(0x175))/0x5)+parseInt(_0x5f6afc(0x172))/0x6*(parseInt(_0x5f6afc(0x1a6))/0x7)+-parseInt(_0x5f6afc(0x181))/0x8+-parseInt(_0x5f6afc(0x187))/0x9+-parseInt(_0x5f6afc(0x195))/0xa*(-parseInt(_0x5f6afc(0x176))/0xb);if(_0x36d73c===_0xa3c5c4)break;else _0x86f6d['push'](_0x86f6d['shift']());}catch(_0x5d91ab){_0x86f6d['push'](_0x86f6d['shift']());}}}(a89_0x4a1e,0x67b6f));import a89_0x31aa18 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a89_0x4a1e(){const _0x32fad0=['\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','1218AwAmXv','\x20\x20Config\x20JSON','accessKey','385iwuPKU','2846173bgBMov','\x20(default)','\x20doctor','(none)','riskLevel','env','log','Project','1811829wGYODC','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid','2121248IyBZnY','platform','message','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','explicitAppName','6949926OethpW','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','(no\x20file)','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','unknown','empty','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','gray','\x20\x20─','check','50inlVYV','1415266cQavXd','missing','read','doctor','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','⚠\x20Empty\x20(treated\x20as\x20{})','1yYwlmi','\x20\x20\x20\x20accessKey:\x20\x20','locale','bold','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20Apps','524gHJThd','slice','9037MmgOHY','apiDir','status','length','source','currentApp','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20←\x20current','arch','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','repeat','keys','✗\x20Not\x20logged\x20in','cookie','green','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','red','appCode','(set,\x20length=','raw','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20explicitAppName:\x20','Global','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','verbose','apps','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Auth','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Expired','(not\x20set)','(default)','defaultApp','\x20\x20runtimeDomain:\x20\x20\x20','value'];a89_0x4a1e=function(){return _0x32fad0;};return a89_0x4a1e();}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 a89_0x55d4(_0x17f5f9,_0x2952c5){_0x17f5f9=_0x17f5f9-0x159;const _0x4a1ee2=a89_0x4a1e();let _0x55d4e4=_0x4a1ee2[_0x17f5f9];return _0x55d4e4;}import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x128e74){const _0xdb4343=a89_0x55d4,_0x29db0b=GIT_COMMIT!==_0xdb4343(0x18b)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0xdb4343(0x1a5)](0x0,0xa)+')':VERSION,_0x50ffe3=buildConfigFromFlags({}),_0x40e346=getCookie();console[_0xdb4343(0x17c)](),console['log'](a89_0x31aa18[_0xdb4343(0x1a1)](CLI_BIN_NAME+_0xdb4343(0x178))),console[_0xdb4343(0x17c)](a89_0x31aa18[_0xdb4343(0x192)]('─'[_0xdb4343(0x1b0)](0x32))),console[_0xdb4343(0x17c)](_0xdb4343(0x18f)+_0x29db0b),console['log'](_0xdb4343(0x191)+process['version']),console[_0xdb4343(0x17c)](_0xdb4343(0x185)+process[_0xdb4343(0x182)]+'\x20'+process[_0xdb4343(0x1ae)]),console[_0xdb4343(0x17c)](),console['log'](a89_0x31aa18['bold']('\x20\x20Config\x20Files')),console[_0xdb4343(0x17c)](a89_0x31aa18[_0xdb4343(0x192)]('\x20\x20─'[_0xdb4343(0x1b0)](0x1e)));const _0x28f569=getGlobalConfigPath(),_0x589a29=getProjectConfigPath();console['log']('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x28f569||a89_0x31aa18[_0xdb4343(0x192)]('(not\x20found)'))),console['log'](_0xdb4343(0x16a)+(_0x589a29||a89_0x31aa18[_0xdb4343(0x192)]('(not\x20found)'))),console['log'](),console[_0xdb4343(0x17c)](a89_0x31aa18[_0xdb4343(0x1a1)](_0xdb4343(0x173))),console['log'](a89_0x31aa18[_0xdb4343(0x192)](_0xdb4343(0x193)['repeat'](0x1e)));const _0x1d946c=(_0x522e93,_0x3a9187)=>{const _0x4d54d0=_0xdb4343;if(!_0x3a9187){console['log']('\x20\x20'+_0x522e93['padEnd'](0x11)+'\x20'+a89_0x31aa18[_0x4d54d0(0x192)](_0x4d54d0(0x189)));return;}const _0x33027d=inspectCliConfigJsonFile(_0x3a9187);if(_0x33027d[_0x4d54d0(0x1a8)]==='ok')console[_0x4d54d0(0x17c)]('\x20\x20'+_0x522e93['padEnd'](0x11)+'\x20'+a89_0x31aa18[_0x4d54d0(0x15b)]('✓\x20Valid\x20JSON'));else{if(_0x33027d[_0x4d54d0(0x1a8)]===_0x4d54d0(0x18c))console[_0x4d54d0(0x17c)]('\x20\x20'+_0x522e93[_0x4d54d0(0x18e)](0x11)+'\x20'+a89_0x31aa18['yellow'](_0x4d54d0(0x19d)));else _0x33027d[_0x4d54d0(0x1a8)]===_0x4d54d0(0x197)?console[_0x4d54d0(0x17c)]('\x20\x20'+_0x522e93['padEnd'](0x11)+'\x20'+a89_0x31aa18[_0x4d54d0(0x192)]('(missing)')):(console[_0x4d54d0(0x17c)]('\x20\x20'+_0x522e93[_0x4d54d0(0x18e)](0x11)+'\x20'+a89_0x31aa18[_0x4d54d0(0x15d)]('✗\x20Invalid\x20JSON')),console['log']('\x20\x20'+''['padEnd'](0x11)+'\x20'+a89_0x31aa18[_0x4d54d0(0x15d)](_0x33027d[_0x4d54d0(0x183)])));}};_0x1d946c(_0xdb4343(0x163),_0x28f569),_0x1d946c(_0xdb4343(0x17d),_0x589a29),console['log'](),console[_0xdb4343(0x17c)](a89_0x31aa18['bold']('\x20\x20Merged\x20Config')),console[_0xdb4343(0x17c)](a89_0x31aa18[_0xdb4343(0x192)](_0xdb4343(0x193)[_0xdb4343(0x1b0)](0x1e))),console[_0xdb4343(0x17c)](_0xdb4343(0x1ac)+(_0x50ffe3[_0xdb4343(0x15e)]||a89_0x31aa18['red'](_0xdb4343(0x16c)))),console[_0xdb4343(0x17c)](_0xdb4343(0x19b)+_0x50ffe3['env']),console['log'](_0xdb4343(0x165)+_0x50ffe3[_0xdb4343(0x1a0)]),console[_0xdb4343(0x17c)](_0xdb4343(0x18d)+_0x50ffe3[_0xdb4343(0x1a7)]),console[_0xdb4343(0x17c)](_0xdb4343(0x1af)+(_0x50ffe3['defaultApp']||a89_0x31aa18['gray'](_0xdb4343(0x179)))),console[_0xdb4343(0x17c)](_0xdb4343(0x184)+(_0x50ffe3[_0xdb4343(0x1ab)]||a89_0x31aa18[_0xdb4343(0x192)](_0xdb4343(0x179)))),console['log'](_0xdb4343(0x162)+(_0x50ffe3[_0xdb4343(0x186)]||a89_0x31aa18[_0xdb4343(0x192)](_0xdb4343(0x179)))),console['log'](_0xdb4343(0x17f)+(_0x50ffe3[_0xdb4343(0x19c)]||a89_0x31aa18['gray']('(default:\x20'+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0xdb4343(0x17c)](_0xdb4343(0x188)+(_0x50ffe3['pageSize']??a89_0x31aa18[_0xdb4343(0x192)](_0xdb4343(0x16d)))),console['log'](_0xdb4343(0x161)+_0x50ffe3[_0xdb4343(0x17a)]),console['log'](_0xdb4343(0x171)+_0x50ffe3[_0xdb4343(0x166)]),console[_0xdb4343(0x17c)](_0xdb4343(0x18a)+(_0x50ffe3['cookie']?a89_0x31aa18[_0xdb4343(0x15b)](_0xdb4343(0x15f)+_0x50ffe3['cookie'][_0xdb4343(0x1a9)]+')'):_0x40e346?a89_0x31aa18[_0xdb4343(0x15b)]('(set\x20via\x20file,\x20length='+_0x40e346[_0xdb4343(0x1a9)]+')'):a89_0x31aa18[_0xdb4343(0x192)](_0xdb4343(0x179))));const _0x532c56=Object[_0xdb4343(0x1b1)](_0x50ffe3[_0xdb4343(0x167)]);if(_0x532c56[_0xdb4343(0x1a9)]>0x0){console[_0xdb4343(0x17c)](),console[_0xdb4343(0x17c)](a89_0x31aa18[_0xdb4343(0x1a1)](_0xdb4343(0x1a3))),console[_0xdb4343(0x17c)](a89_0x31aa18['gray'](_0xdb4343(0x193)['repeat'](0x1e)));for(const _0x543c12 of _0x532c56){const _0x11d3c3=_0x50ffe3[_0xdb4343(0x167)][_0x543c12],_0xde355f=_0x543c12===_0x50ffe3[_0xdb4343(0x16e)],_0x37aeac=_0x543c12===_0x50ffe3[_0xdb4343(0x1ab)],_0x58ea98=_0x37aeac?a89_0x31aa18[_0xdb4343(0x15b)](_0xdb4343(0x1ad)):'',_0x1344a5=_0xde355f?_0xdb4343(0x177):'';console[_0xdb4343(0x17c)]('\x20\x20'+_0x543c12+_0x1344a5+_0x58ea98),console[_0xdb4343(0x17c)](_0xdb4343(0x19a)+_0x11d3c3['appcode']);const _0x115985=buildAppDoctorFields(_0x11d3c3,{'env':_0x50ffe3['env'],'apiDir':_0x50ffe3[_0xdb4343(0x160)][_0xdb4343(0x1a7)]||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0x50ffe3[_0xdb4343(0x15a)]||_0x40e346||undefined,'accessKey':_0x50ffe3[_0xdb4343(0x174)]});console[_0xdb4343(0x17c)]('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x115985[_0xdb4343(0x17b)]['value']+'\x20\x20'+a89_0x31aa18['gray']('('+_0x115985[_0xdb4343(0x17b)][_0xdb4343(0x1aa)]+')')),console[_0xdb4343(0x17c)]('\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20'+_0x115985['apiDir'][_0xdb4343(0x170)]+'\x20\x20'+a89_0x31aa18[_0xdb4343(0x192)]('('+_0x115985[_0xdb4343(0x1a7)]['source']+')'));const _0x38cacb=_0x115985['cookie'][_0xdb4343(0x170)]?a89_0x31aa18[_0xdb4343(0x15b)](_0xdb4343(0x15f)+_0x115985[_0xdb4343(0x15a)][_0xdb4343(0x170)][_0xdb4343(0x1a9)]+')'):a89_0x31aa18[_0xdb4343(0x192)](_0xdb4343(0x179));console[_0xdb4343(0x17c)](_0xdb4343(0x164)+_0x38cacb+'\x20\x20'+a89_0x31aa18[_0xdb4343(0x192)]('('+_0x115985[_0xdb4343(0x15a)]['source']+')'));const _0x483aae=_0x115985[_0xdb4343(0x174)]['value']?a89_0x31aa18[_0xdb4343(0x15b)](_0xdb4343(0x15f)+_0x115985['accessKey'][_0xdb4343(0x170)][_0xdb4343(0x1a9)]+')'):a89_0x31aa18[_0xdb4343(0x192)](_0xdb4343(0x179));console['log'](_0xdb4343(0x19f)+_0x483aae+'\x20\x20'+a89_0x31aa18['gray']('('+_0x115985[_0xdb4343(0x174)][_0xdb4343(0x1aa)]+')'));}}console[_0xdb4343(0x17c)](),console[_0xdb4343(0x17c)](a89_0x31aa18[_0xdb4343(0x1a1)]('\x20\x20API\x20Endpoints')),console['log'](a89_0x31aa18[_0xdb4343(0x192)](_0xdb4343(0x193)['repeat'](0x1e))),console[_0xdb4343(0x17c)](_0xdb4343(0x168)+getApiDomain()),console[_0xdb4343(0x17c)](_0xdb4343(0x1a2)+getUserDomain()),console['log'](_0xdb4343(0x16f)+getRuntimeDomain()),console[_0xdb4343(0x17c)](),console[_0xdb4343(0x17c)](a89_0x31aa18[_0xdb4343(0x1a1)](_0xdb4343(0x169))),console[_0xdb4343(0x17c)](a89_0x31aa18['gray'](_0xdb4343(0x193)[_0xdb4343(0x1b0)](0x1e)));if(_0x40e346){const _0x114e7d=await getIsSessionValid();console['log'](_0xdb4343(0x190)+(_0x114e7d?a89_0x31aa18['green'](_0xdb4343(0x180)):a89_0x31aa18[_0xdb4343(0x15d)](_0xdb4343(0x16b))));}else console[_0xdb4343(0x17c)](_0xdb4343(0x190)+a89_0x31aa18[_0xdb4343(0x15d)](_0xdb4343(0x159)));return console[_0xdb4343(0x17c)](),{'ok':!![]};}export const doctorDefinition={'service':a89_0x507ae7(0x199),'command':a89_0x507ae7(0x194),'description':a89_0x507ae7(0x15c),'risk':a89_0x507ae7(0x198),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0xaa739=a90_0x463b;(function(_0x480f29,_0x43eb88){const _0x559d91=a90_0x463b,_0x189a63=_0x480f29();while(!![]){try{const _0x383808=-parseInt(_0x559d91(0xd0))/0x1*(parseInt(_0x559d91(0xc7))/0x2)+parseInt(_0x559d91(0xc5))/0x3*(parseInt(_0x559d91(0xce))/0x4)+parseInt(_0x559d91(0xdb))/0x5+parseInt(_0x559d91(0xdc))/0x6*(parseInt(_0x559d91(0xc8))/0x7)+-parseInt(_0x559d91(0xe4))/0x8*(parseInt(_0x559d91(0xda))/0x9)+parseInt(_0x559d91(0xd4))/0xa+-parseInt(_0x559d91(0xd5))/0xb;if(_0x383808===_0x43eb88)break;else _0x189a63['push'](_0x189a63['shift']());}catch(_0xdfa350){_0x189a63['push'](_0x189a63['shift']());}}}(a90_0x3157,0x9f0fe));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';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(_0x174675){return{'appCode':_0x174675,'appName':_0x174675};}function a90_0x3157(){const _0x3c40de=['\x20\x20Env:\x20','boolean','\x20\x20Apps:\x20','136ZJYOaE','\x0a✓\x20Successfully\x20initialized\x20','write','project','\x20config','env','检测到旧配置文件,正在自动升级...\x0a','str','map','\x20\x20Config:\x20','validation','init','appcode','../../commands/project/init.js','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','toLocaleString','log','3VYyHNX','nonInteractive','4ccIXne','1692145yqcxLd','custom','valid','Write\x20to\x20global\x20config\x20instead\x20of\x20project','string','bool','2007592ytxBvA','run','326567SqVmDh','yes','global','flagMissing','6709280mZVJUA','6323592JGeulu','production','some','\x20\x20Default:\x20','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','171009faSyRy','313875JPRzpF','24dvcMBt','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','appCode','Auto-confirm\x20prompts','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.'];a90_0x3157=function(){return _0x3c40de;};return a90_0x3157();}function a90_0x463b(_0x41ad4e,_0x449900){_0x41ad4e=_0x41ad4e-0xc5;const _0x315730=a90_0x3157();let _0x463b61=_0x315730[_0x41ad4e];return _0x463b61;}function writeInitConfig(_0x1e23ab,_0x6498ec,_0x1a146e){const _0x15758d=a90_0x463b,_0x18b84b=resolveWriteConfigPath(_0x1e23ab),_0x430cc8=buildCanonicalProjectConfig({},{'appCodes':_0x6498ec[_0x15758d(0xec)](_0x59136e=>_0x59136e[_0x15758d(0xde)]),'env':_0x1a146e,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x15758d(0xf3)]()}});writeConfigFile(_0x18b84b,_0x430cc8);const _0x2b7e8a=_0x1e23ab===_0x15758d(0xd2)?_0x15758d(0xd2):'project';console[_0x15758d(0xf4)](_0x15758d(0xe5)+_0x2b7e8a+_0x15758d(0xe8)),console['log'](_0x15758d(0xe3)+_0x6498ec['map'](_0x377714=>_0x377714['appCode'])['join'](',\x20')),console['log'](_0x15758d(0xd8)+_0x430cc8['defaultApp']),console[_0x15758d(0xf4)](_0x15758d(0xe1)+_0x430cc8['env']),console[_0x15758d(0xf4)](_0x15758d(0xed)+_0x18b84b);}async function runSmartInit(_0x2ca235){const _0x1fc026=a90_0x463b,_0x2c2c6f=process['cwd'](),_0x49b4f0=_0x2ca235[_0x1fc026(0xcd)](_0x1fc026(0xd2))?_0x1fc026(0xd2):_0x1fc026(0xe7),_0x3d230e=_0x2ca235[_0x1fc026(0xeb)](_0x1fc026(0xe9))||_0x1fc026(0xd6),_0x27c524=_0x2ca235['str']('appcode')||undefined,_0x2d36b5=_0x2ca235[_0x1fc026(0xcd)](_0x1fc026(0xe7));if(_0x2d36b5){const {initConfig:_0x1665ce}=await import(_0x1fc026(0xf1));return _0x1665ce({'appcode':_0x27c524,'env':_0x3d230e,'autoYes':_0x2ca235[_0x1fc026(0xcd)](_0x1fc026(0xd1))});}if(_0x49b4f0==='project'){const _0x46cc76=existsSync(resolve(_0x2c2c6f,NEW_CONFIG_NAME)),_0x1d06be=LEGACY_CONFIG_NAMES[_0x1fc026(0xd7)](_0x36d893=>existsSync(resolve(_0x2c2c6f,_0x36d893)));if(_0x1d06be&&!_0x46cc76)return console[_0x1fc026(0xf4)](_0x1fc026(0xea)),upgradeApp(_0x2ca235[_0x1fc026(0xc6)],{'yes':_0x2ca235['bool']('yes')});if(_0x46cc76)throw CliErrors[_0x1fc026(0xee)](_0x1fc026(0xf2),'Use\x20`'+CLI_BIN_NAME+_0x1fc026(0xe0));}if(_0x27c524){const _0x1d30d8=validateAppcode(_0x27c524);if(!_0x1d30d8[_0x1fc026(0xca)])throw CliErrors[_0x1fc026(0xee)](_0x1d30d8['message']);writeInitConfig(_0x49b4f0,[syntheticApp(_0x27c524)],_0x3d230e);return;}if(_0x2ca235[_0x1fc026(0xc6)])throw CliErrors[_0x1fc026(0xd3)](_0x1fc026(0xf0),'Usage:\x20'+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]');const _0x551ed7=getCookie(),_0x494dd0=await selectMultipleApps(_0x551ed7),_0x48bff6=_0x494dd0===_0x1fc026(0xc9)?[syntheticApp(await promptCustomAppcode())]:_0x494dd0;writeInitConfig(_0x49b4f0,_0x48bff6,_0x3d230e);}const initFlags=[{'name':'global','type':'boolean','description':a90_0xaa739(0xcb),'default':![]},{'name':a90_0xaa739(0xe9),'type':'string','description':'Target\x20environment','default':a90_0xaa739(0xd6),'enum':[...RABETBASE_ENV_VALUES]},{'name':a90_0xaa739(0xf0),'type':a90_0xaa739(0xcc),'description':'App\x20code\x20to\x20initialize\x20with'},{'name':a90_0xaa739(0xe7),'type':a90_0xaa739(0xe2),'description':a90_0xaa739(0xdd),'default':![]},{'name':a90_0xaa739(0xd1),'type':a90_0xaa739(0xe2),'description':a90_0xaa739(0xdf),'default':![]}];export const initDefinitions=[{'service':a90_0xaa739(0xef),'command':a90_0xaa739(0xcf),'description':a90_0xaa739(0xd9),'risk':a90_0xaa739(0xe6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x261d19){return await runSmartInit(_0x261d19),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a91_0x4e33(_0x56394e,_0x39f76a){_0x56394e=_0x56394e-0x110;const _0x99be32=a91_0x99be();let _0x4e3392=_0x99be32[_0x56394e];return _0x4e3392;}(function(_0x1c7f0c,_0x494fdd){const _0x100bd6=a91_0x4e33,_0x25d834=_0x1c7f0c();while(!![]){try{const _0x1f8dec=-parseInt(_0x100bd6(0x110))/0x1+-parseInt(_0x100bd6(0x119))/0x2*(parseInt(_0x100bd6(0x114))/0x3)+parseInt(_0x100bd6(0x111))/0x4*(-parseInt(_0x100bd6(0x116))/0x5)+parseInt(_0x100bd6(0x11a))/0x6+parseInt(_0x100bd6(0x117))/0x7*(-parseInt(_0x100bd6(0x113))/0x8)+parseInt(_0x100bd6(0x118))/0x9*(parseInt(_0x100bd6(0x112))/0xa)+parseInt(_0x100bd6(0x115))/0xb;if(_0x1f8dec===_0x494fdd)break;else _0x25d834['push'](_0x25d834['shift']());}catch(_0x25ea90){_0x25d834['push'](_0x25d834['shift']());}}}(a91_0x99be,0xb608f));import{issueReport}from'../../commands/issue/report.js';function a91_0x99be(){const _0x4132ce=['48542956uMiXCa','7005175khntup','5411jEbWZt','18fOvgNi','230Anazhc','48210FMuNkG','602446bHwgYV','4LMsTdf','5177270bsfDaP','13584xkfaqI','36387csQyuT'];a91_0x99be=function(){return _0x4132ce;};return a91_0x99be();}export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a92_0x22e208=a92_0x1d06;function a92_0x1d06(_0x334dd2,_0x4cb0d0){_0x334dd2=_0x334dd2-0x100;const _0x312f5b=a92_0x312f();let _0x1d061f=_0x312f5b[_0x334dd2];return _0x1d061f;}function a92_0x312f(){const _0x5384ff=['335190xqIENi','Hit\x20a\x20','2285266upPNae','\x20\x20Set\x20','=1\x20to\x20silence\x20this\x20hint.','\x20bug?\x20Help\x20us\x20fix\x20it:','flag_missing','RABETBASE_DISABLE_ISSUE_NUDGE','validation_error','75ZwsKzq','slice','join','write','stderr','138dUGPfa','trim','length','8266888WwOdlm','\x20\x20\x20\x20--title\x20\x22','15807070RqilWt','has','auth_required','report','replace','not_in_project','command','77768hoqSnB','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','2459176nfvYUg','27bjpggD','service','\x20issue\x20report\x20\x5c','1579315EnQVMA','unknown_command','message','network_error'];a92_0x312f=function(){return _0x5384ff;};return a92_0x312f();}(function(_0x53a7fb,_0x49b164){const _0x2030be=a92_0x1d06,_0x4303b2=_0x53a7fb();while(!![]){try{const _0x5202f4=parseInt(_0x2030be(0x116))/0x1+-parseInt(_0x2030be(0x11c))/0x2+-parseInt(_0x2030be(0x123))/0x3*(parseInt(_0x2030be(0x110))/0x4)+-parseInt(_0x2030be(0x11a))/0x5*(-parseInt(_0x2030be(0x104))/0x6)+-parseInt(_0x2030be(0x107))/0x7+-parseInt(_0x2030be(0x112))/0x8*(parseInt(_0x2030be(0x113))/0x9)+parseInt(_0x2030be(0x109))/0xa;if(_0x5202f4===_0x49b164)break;else _0x4303b2['push'](_0x4303b2['shift']());}catch(_0xa3b27c){_0x4303b2['push'](_0x4303b2['shift']());}}}(a92_0x312f,0xecd36));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a92_0x22e208(0x121);const NUDGE_SUPPRESSED_CODES=new Set(['cancelled',a92_0x22e208(0x10b),'config_missing',a92_0x22e208(0x10e),a92_0x22e208(0x117),a92_0x22e208(0x120),a92_0x22e208(0x122),a92_0x22e208(0x119)]),defaultWriter=_0x529f9a=>{const _0x351144=a92_0x22e208;process[_0x351144(0x103)][_0x351144(0x102)](_0x529f9a);};export function shouldNudgeForError(_0x2835ed,_0x67df29){const _0x54b360=a92_0x22e208;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x67df29[_0x54b360(0x114)]==='issue'&&_0x67df29[_0x54b360(0x10f)]===_0x54b360(0x10c))return![];if(_0x2835ed instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x54b360(0x10a)](_0x2835ed['code']);return!![];}export function printIssueReportNudgeForError(_0x49b765,_0x5de228,_0xf5b13a=defaultWriter){if(!shouldNudgeForError(_0x49b765,_0x5de228))return;const _0x820e6a=buildSuggestedTitle(_0x49b765,_0x5de228);_0xf5b13a(formatNudge(_0x820e6a));}function buildSuggestedTitle(_0x403915,_0x5c4b79){const _0x2a434c=a92_0x22e208,_0x595eca=_0x403915 instanceof Error?_0x403915[_0x2a434c(0x118)]:String(_0x403915),_0xadf2e5=_0x595eca[_0x2a434c(0x10d)](/[\r\n]+/g,'\x20')['replace'](/\s+/g,'\x20')[_0x2a434c(0x105)]()[_0x2a434c(0x100)](0x0,0x78)[_0x2a434c(0x10d)](/"/g,'\x5c\x22'),_0x185365=CLI_BIN_NAME+'\x20'+_0x5c4b79['service']+'\x20'+_0x5c4b79[_0x2a434c(0x10f)];return _0xadf2e5[_0x2a434c(0x106)]>0x0?_0x185365+':\x20'+_0xadf2e5:_0x185365;}function formatNudge(_0x45da9f){const _0xefebd=a92_0x22e208;return['',_0xefebd(0x11b)+CLI_BIN_NAME+_0xefebd(0x11f),'\x20\x20'+CLI_BIN_NAME+_0xefebd(0x115),_0xefebd(0x108)+_0x45da9f+'\x22\x20\x5c','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22',_0xefebd(0x111),_0xefebd(0x11d)+NUDGE_OPT_OUT_ENV+_0xefebd(0x11e),''][_0xefebd(0x101)]('\x0a');}
|