@lovrabet/rabetbase-cli 2.5.0-beta.2 → 2.5.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.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 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.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/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.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/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.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-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.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/file/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/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.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/mutations.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/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.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/restore.js +1 -1
- package/lib/commands/page/shared.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/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.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/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- 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/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.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/region.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-index-auditor.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/error-output.js +1 -1
- package/lib/framework/explicit-yes.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.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.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/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/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/guides/custom-page-workflow.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-custom-list.md +5 -2
- package/skills/rabetbase.manifest.json +3 -3
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a87_0x4de479=a87_0x14d1;(function(_0x75cbf1,_0x53893c){const _0x2950dc=a87_0x14d1,_0x517506=_0x75cbf1();while(!![]){try{const _0x5738ed=-parseInt(_0x2950dc(0xe0))/0x1+-parseInt(_0x2950dc(0xdb))/0x2+-parseInt(_0x2950dc(0xea))/0x3*(parseInt(_0x2950dc(0xd7))/0x4)+-parseInt(_0x2950dc(0xeb))/0x5*(parseInt(_0x2950dc(0xe2))/0x6)+parseInt(_0x2950dc(0xde))/0x7+-parseInt(_0x2950dc(0xec))/0x8*(-parseInt(_0x2950dc(0xf7))/0x9)+-parseInt(_0x2950dc(0xcd))/0xa*(-parseInt(_0x2950dc(0xd3))/0xb);if(_0x5738ed===_0x53893c)break;else _0x517506['push'](_0x517506['shift']());}catch(_0x4ed027){_0x517506['push'](_0x517506['shift']());}}}(a87_0x4430,0xe9e58));import{getDbLiveTableDiff,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=[a87_0x4de479(0xdf),a87_0x4de479(0xf2),a87_0x4de479(0xc9),a87_0x4de479(0xd4)];function a87_0x4430(){const _0x2d6436=['view','\x20table\x20row(s),\x20total\x20','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','35766JIlYGv','string','length','diff','total','table','\x20of\x20','tableName','\x20row(s).','modifiedColumns','fieldDiff','DELETED_TABLE','size','changed','boolean','5822310Zbymea','changed-only','Incomplete\x20db\x20diff\x20pagination:\x20collected\x20','values','physicalTableCount','number','66lyaxWh','ALREADY_ANALYZED','map','num','438336ubvbsB','diff\x20reads\x20changed\x20tables\x20from\x20the\x20server-managed\x20result;\x20all\x20reads\x20every\x20table\x20from\x20live\x20pagination','totalCount','diffType','2783490DXEJKd','summary','tableList','10464804fMJcJb','NEW_TABLE','475565dJbuxQ','filter','273234SaaWFi','validation','fromEntries','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','str','all','set','addedColumns','51SNoAHU','60CoSYPt','496CmevWl','Page\x20index\x20(1-based)','pagesize','datasetTableCount','bool','deletedColumns','MODIFIED_TABLE','appCode'];a87_0x4430=function(){return _0x2d6436;};return a87_0x4430();}function a87_0x14d1(_0x4c151a,_0x5b7d49){_0x4c151a=_0x4c151a-0xc6;const _0x4430e5=a87_0x4430();let _0x14d14a=_0x4430e5[_0x4c151a];return _0x14d14a;}export const dbDiff={'service':'db','command':a87_0x4de479(0xfa),'description':a87_0x4de479(0xf6),'risk':'read','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'view','type':'string','enum':['diff',a87_0x4de479(0xe7)],'default':a87_0x4de479(0xfa),'description':a87_0x4de479(0xd8)},{'name':a87_0x4de479(0xfc),'type':a87_0x4de479(0xf8),'description':'Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)'},{'name':'page','type':a87_0x4de479(0xd2),'description':a87_0x4de479(0xed),'default':0x1},{'name':'pagesize','type':a87_0x4de479(0xd2),'description':'Page\x20size','default':0x14},{'name':a87_0x4de479(0xe7),'type':a87_0x4de479(0xcc),'description':a87_0x4de479(0xe5)},{'name':a87_0x4de479(0xce),'type':a87_0x4de479(0xcc),'description':'Exclude\x20ALREADY_ANALYZED\x20rows\x20while\x20keeping\x20deleted\x20tables'}],async 'execute'(_0x1c750c){const _0x515ff2=a87_0x4de479,_0x556b0b=_0x1c750c[_0x515ff2(0xd6)]('id'),_0x464fa4=_0x1c750c[_0x515ff2(0xe6)](_0x515ff2(0xf4))||_0x515ff2(0xfa),_0x18447b=_0x1c750c['bool'](_0x515ff2(0xe7)),_0x43e28e=_0x1c750c[_0x515ff2(0xf0)](_0x515ff2(0xce)),_0x4c5eea=_0x18447b?0x1:_0x1c750c['num']('page',0x1)||0x1,_0x5e0540=_0x18447b?ALL_PAGE_SIZE:_0x1c750c[_0x515ff2(0xd6)](_0x515ff2(0xee),0x14)||0x14,_0x48a46a=_0x1c750c[_0x515ff2(0xe6)](_0x515ff2(0xfc))||undefined,_0x53842e=_0x464fa4==='all'?getDbLiveTableDiff:getDbTableDiff,_0x382921=_0x18447b?await getAllDbTableDiff(_0x53842e,_0x1c750c[_0x515ff2(0xf3)],_0x556b0b,_0x48a46a):await _0x53842e(_0x1c750c[_0x515ff2(0xf3)],_0x556b0b,{'pageIndex':_0x4c5eea,'pageSize':_0x5e0540,'tableName':_0x48a46a}),_0x21cbc7=_0x382921[_0x515ff2(0xdd)],_0x36c6ac=_0x43e28e?_0x21cbc7[_0x515ff2(0xe1)](_0x2b8c81=>_0x2b8c81['diffType']!==_0x515ff2(0xd4)):_0x21cbc7,_0x4f85ec=Object[_0x515ff2(0xe4)](DIFF_TYPES[_0x515ff2(0xd5)](_0x896673=>[_0x896673,_0x21cbc7['filter'](_0x2628de=>_0x2628de[_0x515ff2(0xda)]===_0x896673)[_0x515ff2(0xf9)]])),_0x5ae446=_0x21cbc7[_0x515ff2(0xe1)](_0x40f8=>_0x40f8[_0x515ff2(0xda)]===_0x515ff2(0xdf)||_0x40f8[_0x515ff2(0xda)]===_0x515ff2(0xf2))[_0x515ff2(0xd5)](_0x48a5ce=>_0x48a5ce[_0x515ff2(0xfe)]),_0x27bf00=_0x21cbc7[_0x515ff2(0xe1)](_0x157f51=>_0x157f51[_0x515ff2(0xda)]===_0x515ff2(0xc9))[_0x515ff2(0xd5)](_0x22fb49=>_0x22fb49['tableName']),_0x1b638f=_0x21cbc7[_0x515ff2(0xe1)](_0x577bb7=>_0x577bb7[_0x515ff2(0xda)]===_0x515ff2(0xf2))[_0x515ff2(0xd5)](_0x309812=>({'tableName':_0x309812[_0x515ff2(0xfe)],'addedColumns':_0x309812['fieldDiff']?.[_0x515ff2(0xe9)]??[],'deletedColumns':_0x309812[_0x515ff2(0xc8)]?.[_0x515ff2(0xf1)]??[],'modifiedColumns':_0x309812[_0x515ff2(0xc8)]?.[_0x515ff2(0xc7)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x556b0b,'view':_0x464fa4,'page':_0x4c5eea,'pageSize':_0x5e0540,'totalCount':_0x382921[_0x515ff2(0xd9)],...typeof _0x382921[_0x515ff2(0xd1)]===_0x515ff2(0xd2)?{'physicalTableCount':_0x382921[_0x515ff2(0xd1)]}:{},...typeof _0x382921[_0x515ff2(0xef)]===_0x515ff2(0xd2)?{'datasetTableCount':_0x382921[_0x515ff2(0xef)]}:{},..._0x382921[_0x515ff2(0xdc)]?{'summary':_0x382921[_0x515ff2(0xdc)]}:{},'summaryByType':_0x4f85ec,'toAnalyzeTables':_0x5ae446,'deletedTables':_0x27bf00,'modifiedFieldDiffs':_0x1b638f,'tables':_0x36c6ac,'tableList':_0x36c6ac},'message':_0x36c6ac[_0x515ff2(0xf9)]+'\x20'+(_0x464fa4==='diff'?_0x515ff2(0xcb):_0x515ff2(0xfb))+_0x515ff2(0xf5)+_0x382921[_0x515ff2(0xd9)]+'\x20(db\x20link\x20'+_0x556b0b+')'};}};async function getAllDbTableDiff(_0x74be2b,_0x390ae8,_0x5994c2,_0x5581d8){const _0x4ee5a8=a87_0x4de479,_0x228bd7=new Map();let _0x1c105e=0x1,_0x293ccc=null;while(!![]){_0x293ccc=await _0x74be2b(_0x390ae8,_0x5994c2,{'pageIndex':_0x1c105e,'pageSize':ALL_PAGE_SIZE,'tableName':_0x5581d8});const _0x1358bd=_0x228bd7[_0x4ee5a8(0xca)];for(const _0x21a580 of _0x293ccc[_0x4ee5a8(0xdd)]){_0x228bd7[_0x4ee5a8(0xe8)](_0x21a580['tableName'],_0x21a580);}if(_0x228bd7[_0x4ee5a8(0xca)]>=_0x293ccc[_0x4ee5a8(0xd9)])break;if(_0x293ccc[_0x4ee5a8(0xdd)]['length']===0x0||_0x228bd7[_0x4ee5a8(0xca)]===_0x1358bd)throw CliErrors[_0x4ee5a8(0xe3)](_0x4ee5a8(0xcf)+_0x228bd7[_0x4ee5a8(0xca)]+_0x4ee5a8(0xfd)+_0x293ccc[_0x4ee5a8(0xd9)]+_0x4ee5a8(0xc6));_0x1c105e+=0x1;}return{'totalCount':_0x293ccc?.['totalCount']??0x0,...typeof _0x293ccc?.[_0x4ee5a8(0xd1)]==='number'?{'physicalTableCount':_0x293ccc['physicalTableCount']}:{},...typeof _0x293ccc?.[_0x4ee5a8(0xef)]==='number'?{'datasetTableCount':_0x293ccc[_0x4ee5a8(0xef)]}:{},..._0x293ccc?.[_0x4ee5a8(0xdc)]?{'summary':_0x293ccc[_0x4ee5a8(0xdc)]}:{},'tableList':[..._0x228bd7[_0x4ee5a8(0xd0)]()]};}
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x184a8b,_0x379749){const _0x5b9495=a88_0x4559,_0xc9e63f=_0x184a8b();while(!![]){try{const _0x47aa70=-parseInt(_0x5b9495(0xc1))/0x1+-parseInt(_0x5b9495(0xc2))/0x2*(-parseInt(_0x5b9495(0xc3))/0x3)+parseInt(_0x5b9495(0xbf))/0x4+parseInt(_0x5b9495(0xc4))/0x5*(-parseInt(_0x5b9495(0xc9))/0x6)+-parseInt(_0x5b9495(0xc5))/0x7*(parseInt(_0x5b9495(0xc0))/0x8)+parseInt(_0x5b9495(0xc6))/0x9*(-parseInt(_0x5b9495(0xc7))/0xa)+parseInt(_0x5b9495(0xc8))/0xb*(parseInt(_0x5b9495(0xca))/0xc);if(_0x47aa70===_0x379749)break;else _0xc9e63f['push'](_0xc9e63f['shift']());}catch(_0x4fd7c9){_0xc9e63f['push'](_0xc9e63f['shift']());}}}(a88_0x335e,0x41edf));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{dbAnalyzeBatchPlan}from'../../commands/db/analyze-batch-plan.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';function a88_0x4559(_0x379777,_0x1a2846){_0x379777=_0x379777-0xbf;const _0x335ebf=a88_0x335e();let _0x4559bf=_0x335ebf[_0x379777];return _0x4559bf;}import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';import{dbDiffRefreshStart}from'../../commands/db/diff-refresh-start.js';import{dbDiffRefreshStatus}from'../../commands/db/diff-refresh-status.js';function a88_0x335e(){const _0x5276fa=['756BUjcjO','10998444aEPPaJ','510656buBDYj','40AcvHuY','294279cHIVJz','54654kwfwkw','48QQTVSY','4140KFEWUE','701687TQLWmo','27DiyLku','1038580mnXsMk','11bkiPFN'];a88_0x335e=function(){return _0x5276fa;};return a88_0x335e();}export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff,dbDiffRefreshStart,dbDiffRefreshStatus];
|
package/lib/commands/db/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0x463be8=a89_0x1a16;function a89_0x2735(){const _0x3759d4=['\x20database\x20connection(s)','read','all','42483330hHUHYg','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','datasetDependency','4090443pNHLMb','pagesize','1093412ZotThG','Page\x20size','6QywsvN','51741MhRUgp','4636392jvawFv','4998GiyaoS','8065wGzELR','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','appCode','9aablQW','length','number','4129236dPWrxv','num'];a89_0x2735=function(){return _0x3759d4;};return a89_0x2735();}(function(_0x38cbc4,_0x2bc62){const _0x15a201=a89_0x1a16,_0x6af1aa=_0x38cbc4();while(!![]){try{const _0xc27a45=-parseInt(_0x15a201(0xe1))/0x1+parseInt(_0x15a201(0xcd))/0x2*(parseInt(_0x15a201(0xce))/0x3)+-parseInt(_0x15a201(0xd7))/0x4+parseInt(_0x15a201(0xd1))/0x5*(-parseInt(_0x15a201(0xd0))/0x6)+parseInt(_0x15a201(0xdf))/0x7+-parseInt(_0x15a201(0xcf))/0x8*(parseInt(_0x15a201(0xd4))/0x9)+parseInt(_0x15a201(0xdc))/0xa;if(_0xc27a45===_0x2bc62)break;else _0x6af1aa['push'](_0x6af1aa['shift']());}catch(_0x6f1bcc){_0x6af1aa['push'](_0x6af1aa['shift']());}}}(a89_0x2735,0xcbfc4));import{listDatasets,listDbLinks}from'../../core/api-client.js';function a89_0x1a16(_0x5dbe25,_0x422489){_0x5dbe25=_0x5dbe25-0xcc;const _0x273582=a89_0x2735();let _0x1a16e5=_0x273582[_0x5dbe25];return _0x1a16e5;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbList={'service':'db','command':'list','description':a89_0x463be8(0xd2),'risk':a89_0x463be8(0xda),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'page','type':a89_0x463be8(0xd6),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a89_0x463be8(0xe0),'type':a89_0x463be8(0xd6),'description':a89_0x463be8(0xcc),'default':0x64}],async 'execute'(_0x115721){const _0x43b104=a89_0x463be8,_0x448745=_0x115721[_0x43b104(0xd8)]('page',0x1)||0x1,_0x419d70=_0x115721['num']('pagesize',0x64)||0x64,[{items:_0x5f81db,paging:_0x806776},_0x1274e8]=await Promise[_0x43b104(0xdb)]([listDbLinks(_0x115721['appCode'],{'currentPage':_0x448745,'pageSize':_0x419d70}),listDatasets(_0x115721[_0x43b104(0xd3)],{'source':'DB_TABLE'})]),_0x1325f6=_0x5f81db['map'](_0x14ea7d=>({...sanitizeDbLinkForOutput(_0x14ea7d),'datasetDependency':buildDbDatasetDependency(_0x14ea7d,_0x1274e8)[_0x43b104(0xde)]})),_0x190210=_0x806776?_0x806776:{'currentPage':_0x448745,'pageSize':_0x419d70,'rowsOnPage':_0x1325f6[_0x43b104(0xd5)],'totalCount':null,'note':_0x43b104(0xdd)};return{'ok':!![],'data':{'connections':_0x1325f6,'paging':_0x190210},'message':'Found\x20'+_0x1325f6['length']+_0x43b104(0xd9)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x8a659,_0x10c8e3){const _0x26fa53=a90_0x1fd1,_0x4ad4fb=_0x8a659();while(!![]){try{const _0x26e045=-parseInt(_0x26fa53(0x8c))/0x1*(parseInt(_0x26fa53(0xa9))/0x2)+parseInt(_0x26fa53(0x99))/0x3+parseInt(_0x26fa53(0x95))/0x4+-parseInt(_0x26fa53(0x91))/0x5*(-parseInt(_0x26fa53(0xac))/0x6)+-parseInt(_0x26fa53(0x96))/0x7*(-parseInt(_0x26fa53(0xa4))/0x8)+parseInt(_0x26fa53(0x90))/0x9*(-parseInt(_0x26fa53(0xa5))/0xa)+-parseInt(_0x26fa53(0x8b))/0xb;if(_0x26e045===_0x10c8e3)break;else _0x4ad4fb['push'](_0x4ad4fb['shift']());}catch(_0x2b7a1b){_0x4ad4fb['push'](_0x4ad4fb['shift']());}}}(a90_0x1b4d,0x7e2b0));import{testDbLinkConfigConnect}from'../../core/api-client.js';import{getAppBaseUrl}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';function a90_0x1b4d(){const _0x3800c6=['1353485xmAorR','includes','secret','number','3282800ZCTDOf','133749ulFiCm','Database\x20connection\x20preflight\x20failed.','trim','1526076xcmOfH','authorization','token','apiError','length','hasAvailableDo','connectionstring','/data/database','dbpassword','map','credential','304dxARuJ','5884370xsgDGf','toLowerCase','tableName','dbtableConfig','624622zFNYFW','keys','privatekey','12uygyxU','[redacted]','filter','isFinite','code','/data/er?dbId=','6101678RjnxxL','3kXDZCo','jdbcurl','password','test','9kwnInT'];a90_0x1b4d=function(){return _0x3800c6;};return a90_0x1b4d();}function shouldRedactKey(_0x16e228){const _0x2fbcb2=a90_0x1fd1,_0x28e6c4=_0x16e228[_0x2fbcb2(0xa6)]();if(_0x28e6c4===_0x2fbcb2(0x8e)||_0x28e6c4==='passwd'||_0x28e6c4===_0x2fbcb2(0xa1))return!![];if(_0x28e6c4[_0x2fbcb2(0x92)](_0x2fbcb2(0x93))||_0x28e6c4['includes'](_0x2fbcb2(0x9b))||_0x28e6c4['includes'](_0x2fbcb2(0xa3)))return!![];if(_0x28e6c4[_0x2fbcb2(0x92)](_0x2fbcb2(0xab))||_0x28e6c4['includes']('accesskey'))return!![];if(_0x28e6c4===_0x2fbcb2(0x9a)||_0x28e6c4===_0x2fbcb2(0x9f)||_0x28e6c4===_0x2fbcb2(0x8d))return!![];return![];}function a90_0x1fd1(_0x1460ac,_0xbada6d){_0x1460ac=_0x1460ac-0x88;const _0x1b4d57=a90_0x1b4d();let _0x1fd189=_0x1b4d57[_0x1460ac];return _0x1fd189;}export function sanitizeDbLinkForOutput(_0x1ff49b){const _0x47608f=a90_0x1fd1,_0x378357={..._0x1ff49b};delete _0x378357[_0x47608f(0x9e)];for(const _0x4dbf5d of Object[_0x47608f(0xaa)](_0x378357)){if(!shouldRedactKey(_0x4dbf5d))continue;const _0x1a64cf=_0x378357[_0x4dbf5d];_0x1a64cf!=null&&String(_0x1a64cf)[_0x47608f(0x9d)]>0x0&&(_0x378357[_0x4dbf5d]=_0x47608f(0xad));}return _0x378357;}export function sanitizeDbLinkList(_0x1972e7){const _0x4a080f=a90_0x1fd1;return _0x1972e7[_0x4a080f(0xa2)](_0x3c56ab=>sanitizeDbLinkForOutput(_0x3c56ab));}export function buildDbDatasetDependency(_0x1f9bf9,_0x1c1e76){const _0x159e14=a90_0x1fd1,_0x272f5d=_0x1c1e76[_0x159e14(0xae)](_0x56322e=>Number(_0x56322e[_0x159e14(0xa8)]?.['dbId'])===Number(_0x1f9bf9['id']))[_0x159e14(0xa2)](_0x252fc4=>({'id':_0x252fc4['id'],'code':_0x252fc4[_0x159e14(0x89)],'name':_0x252fc4['name'],..._0x252fc4['dbtableConfig']?.[_0x159e14(0xa7)]?{'tableName':_0x252fc4['dbtableConfig'][_0x159e14(0xa7)]}:{}}));return{'datasetDependency':{'hasDependencies':_0x272f5d[_0x159e14(0x9d)]>0x0,'activeDatasetCount':_0x272f5d['length']},'datasets':_0x272f5d};}export async function assertDbLinkConnectionPreflight(_0x4b9148){const _0x2bc835=a90_0x1fd1,_0x1344c9=await testDbLinkConfigConnect(_0x4b9148);if(_0x1344c9!==!![])throw CliErrors[_0x2bc835(0x9c)](_0x2bc835(0x97),'The\x20configuration\x20was\x20not\x20saved.\x20Verify\x20the\x20host,\x20credentials,\x20database\x20name,\x20network,\x20and\x20allowlist,\x20or\x20explicitly\x20pass\x20--skip-connection-test.');}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x114f25){const _0x4baaba=a90_0x1fd1,_0x34f7f1=_0x114f25['trim']();if(!_0x34f7f1)return![];return DB_URL_PATTERN[_0x4baaba(0x8f)](_0x34f7f1);}export function buildDbPageLinks(_0x4787ae,_0x254298){const _0x301d77=a90_0x1fd1,_0x4c0147=_0x4787ae?.[_0x301d77(0x98)]();if(!_0x4c0147)return undefined;const _0x5f2709=typeof _0x254298===_0x301d77(0x94)?String(_0x254298):String(_0x254298??'')[_0x301d77(0x98)]();if(!_0x5f2709)return undefined;const _0x37651f=Number(_0x5f2709);if(!Number[_0x301d77(0x88)](_0x37651f)||_0x37651f<=0x0)return undefined;const _0x4f95fe=getAppBaseUrl(_0x4c0147),_0x27d43d=encodeURIComponent(String(_0x37651f));return{'databasePage':_0x4f95fe+_0x301d77(0xa0),'erPage':_0x4f95fe+_0x301d77(0x8a)+_0x27d43d};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a91_0x5b26(){const _0x224f88=['1737012PnEpYQ','1606720fSgTIr','708147XQrQBO','127932mvQzah','3940016tjrXDE','5161104YMmCxI','132992YxPMIx','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','\x20table(s)\x20on\x20db\x20link\x20','length','464SHpGrM','tables','read'];a91_0x5b26=function(){return _0x224f88;};return a91_0x5b26();}const a91_0x123095=a91_0x2699;(function(_0x3fc2d5,_0x472127){const _0x510d5d=a91_0x2699,_0x12fb58=_0x3fc2d5();while(!![]){try{const _0x1ec0e0=parseInt(_0x510d5d(0x8d))/0x1+-parseInt(_0x510d5d(0x87))/0x2+parseInt(_0x510d5d(0x89))/0x3+parseInt(_0x510d5d(0x8b))/0x4+parseInt(_0x510d5d(0x88))/0x5+parseInt(_0x510d5d(0x8c))/0x6+-parseInt(_0x510d5d(0x8a))/0x7*(parseInt(_0x510d5d(0x91))/0x8);if(_0x1ec0e0===_0x472127)break;else _0x12fb58['push'](_0x12fb58['shift']());}catch(_0x5f33d9){_0x12fb58['push'](_0x12fb58['shift']());}}}(a91_0x5b26,0x94353));function a91_0x2699(_0x464ad6,_0x52ab9d){_0x464ad6=_0x464ad6-0x85;const _0x5b26d5=a91_0x5b26();let _0x269993=_0x5b26d5[_0x464ad6];return _0x269993;}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':a91_0x123095(0x85),'description':a91_0x123095(0x8e),'risk':a91_0x123095(0x86),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x446816){const _0x54eb8a=a91_0x123095,_0x292a57=_0x446816['num']('id'),_0x3a4260=await getDbAllTableList(_0x446816['appCode'],_0x292a57);return{'ok':!![],'data':{'dbLinkId':_0x292a57,'total':_0x3a4260[_0x54eb8a(0x90)],'tables':_0x3a4260},'message':_0x3a4260['length']+_0x54eb8a(0x8f)+_0x292a57};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a92_0x4994(){const _0x2cb95b=['object','8ZycgqM','message','read','success','\x20(see\x20data.result)','4799238zDvbmP','Connection\x20check\x20finished\x20for\x20db\x20link\x20','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','length','457282LvzdZo','Connection\x20OK\x20for\x20db\x20link\x20','17498wjKUkW','msg','code','keys','7LDBqEq','1865780axKYXA','slice','207105dpBdeP','error','data','15319962CpUWBU','3250788soqArV','num'];a92_0x4994=function(){return _0x2cb95b;};return a92_0x4994();}const a92_0x38295b=a92_0x5a81;(function(_0x3ca841,_0x40af16){const _0x18f5e5=a92_0x5a81,_0x39fe30=_0x3ca841();while(!![]){try{const _0xd56a4e=-parseInt(_0x18f5e5(0xd4))/0x1*(-parseInt(_0x18f5e5(0xd0))/0x2)+parseInt(_0x18f5e5(0xd7))/0x3+-parseInt(_0x18f5e5(0xc2))/0x4+parseInt(_0x18f5e5(0xd5))/0x5+-parseInt(_0x18f5e5(0xca))/0x6+-parseInt(_0x18f5e5(0xce))/0x7*(parseInt(_0x18f5e5(0xc5))/0x8)+parseInt(_0x18f5e5(0xc1))/0x9;if(_0xd56a4e===_0x40af16)break;else _0x39fe30['push'](_0x39fe30['shift']());}catch(_0x38dbe6){_0x39fe30['push'](_0x39fe30['shift']());}}}(a92_0x4994,0x80d8c));function a92_0x5a81(_0x444f41,_0x1c5d4a){_0x444f41=_0x444f41-0xc1;const _0x49940a=a92_0x4994();let _0x5a8134=_0x49940a[_0x444f41];return _0x5a8134;}import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x1a0b17){const _0x4b9dd5=a92_0x5a81;if(_0x1a0b17===!![]||_0x1a0b17===![])return{'success':_0x1a0b17};if(_0x1a0b17===null||_0x1a0b17===undefined)return{'type':typeof _0x1a0b17};if(typeof _0x1a0b17!=='object')return{'type':typeof _0x1a0b17};const _0x341988=_0x1a0b17,_0x37daab=['success',_0x4b9dd5(0xc6),_0x4b9dd5(0xd2),_0x4b9dd5(0xd8),_0x4b9dd5(0xd1),_0x4b9dd5(0xd9)],_0xdaab61={};for(const _0x5b96e0 of _0x37daab){if(_0x5b96e0 in _0x341988)_0xdaab61[_0x5b96e0]=_0x341988[_0x5b96e0];}return Object[_0x4b9dd5(0xd3)](_0xdaab61)[_0x4b9dd5(0xcd)]===0x0&&(_0xdaab61[_0x4b9dd5(0xd3)]=Object[_0x4b9dd5(0xd3)](_0x341988)[_0x4b9dd5(0xd6)](0x0,0x14)),_0xdaab61;}export const dbTest={'service':'db','command':'test','description':a92_0x38295b(0xcc),'risk':a92_0x38295b(0xc7),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x16c3ad){const _0x253621=a92_0x38295b,_0x3eae19=_0x16c3ad[_0x253621(0xc3)]('id'),_0x21d137=await testDbLinkConnect(_0x3eae19),_0x194f53=_0x21d137===!![]||typeof _0x21d137===_0x253621(0xc4)&&_0x21d137!==null&&_0x21d137[_0x253621(0xc8)]===!![],_0x3a40ff=summarizeTestConnectResult(_0x21d137);return{'ok':!![],'data':{'id':_0x3eae19,'connected':Boolean(_0x194f53),'result':_0x3a40ff},'message':_0x194f53?_0x253621(0xcf)+_0x3eae19:_0x253621(0xcb)+_0x3eae19+_0x253621(0xc9)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x16240f=a93_0x4ae6;function a93_0x4e52(){const _0x315123=['[redacted]','update','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','328uiHWSL','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','skip-connection-test','238ctjuwg','/smartapi/dblink/update','write','dbname','dbName','New\x20database\x20name','5579707hqOszh','29919quAAye','New\x20host:port','username','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20stored\x20password\x20is\x20masked','dbParam','3837KwKGMM','158280gAevnr','string','trim','5428272mqjhnI','18qQXkGF','dbdesc','******','135CSSrHa','num','New\x20description','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','2159784qEfXLj','44PZQjZq','password','New\x20connection\x20parameter\x20string','dburl','bool','3329910MmKzYl','Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','dbparam','validation','has','Updated\x20db\x20link\x20','dbDesc','str','dbUrl'];a93_0x4e52=function(){return _0x315123;};return a93_0x4e52();}(function(_0x5ad9eb,_0x2cdd97){const _0x31bae6=a93_0x4ae6,_0x52e7e6=_0x5ad9eb();while(!![]){try{const _0x1a6234=-parseInt(_0x31bae6(0x15b))/0x1*(parseInt(_0x31bae6(0x14f))/0x2)+-parseInt(_0x31bae6(0x156))/0x3*(parseInt(_0x31bae6(0x14c))/0x4)+parseInt(_0x31bae6(0x136))/0x5*(-parseInt(_0x31bae6(0x15c))/0x6)+parseInt(_0x31bae6(0x155))/0x7+-parseInt(_0x31bae6(0x13a))/0x8*(parseInt(_0x31bae6(0x160))/0x9)+parseInt(_0x31bae6(0x140))/0xa+parseInt(_0x31bae6(0x13b))/0xb*(parseInt(_0x31bae6(0x15f))/0xc);if(_0x1a6234===_0x2cdd97)break;else _0x52e7e6['push'](_0x52e7e6['shift']());}catch(_0x3efcca){_0x52e7e6['push'](_0x52e7e6['shift']());}}}(a93_0x4e52,0x64cf9));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a93_0x4ae6(_0x2899c8,_0x3818ff){_0x2899c8=_0x2899c8-0x134;const _0x4e52a3=a93_0x4e52();let _0x4ae665=_0x4e52a3[_0x2899c8];return _0x4ae665;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG,SKIP_CONNECTION_TEST_FLAG}from'../../commands/common/flags.js';import{assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set([a93_0x16240f(0x135),a93_0x16240f(0x149)]);function mergeDbLinkUpdate(_0x801a1c,_0x587a52){const _0x2e799e=a93_0x16240f,_0x579281={..._0x801a1c},_0x141625=_0x587a52[_0x2e799e(0x147)](_0x2e799e(0x13c));if(_0x141625&&MASKED_PASSWORD_VALUES[_0x2e799e(0x144)](_0x141625))throw CliErrors[_0x2e799e(0x143)](_0x2e799e(0x14b));if(!_0x141625&&MASKED_PASSWORD_VALUES[_0x2e799e(0x144)](String(_0x801a1c[_0x2e799e(0x13c)]??'')))throw CliErrors[_0x2e799e(0x143)](_0x2e799e(0x14d));const _0x3bcaaa=_0x587a52[_0x2e799e(0x147)](_0x2e799e(0x152));if(_0x3bcaaa)_0x579281[_0x2e799e(0x153)]=_0x3bcaaa;const _0x43a770=_0x587a52[_0x2e799e(0x147)](_0x2e799e(0x13e));if(_0x43a770)_0x579281[_0x2e799e(0x148)]=_0x43a770[_0x2e799e(0x15e)]();const _0x5c213a=_0x587a52[_0x2e799e(0x147)](_0x2e799e(0x158));if(_0x5c213a)_0x579281['username']=_0x5c213a;if(_0x141625)_0x579281[_0x2e799e(0x13c)]=_0x141625;const _0x1b4315=_0x587a52[_0x2e799e(0x147)](_0x2e799e(0x142));if(_0x1b4315)_0x579281[_0x2e799e(0x15a)]=_0x1b4315;const _0x59af56=_0x587a52[_0x2e799e(0x147)](_0x2e799e(0x134));if(_0x59af56)_0x579281[_0x2e799e(0x146)]=_0x59af56;return _0x579281;}export const dbUpdate={'service':'db','command':a93_0x16240f(0x14a),'description':a93_0x16240f(0x141),'risk':a93_0x16240f(0x151),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a93_0x16240f(0x152),'type':a93_0x16240f(0x15d),'description':a93_0x16240f(0x154)},{'name':a93_0x16240f(0x13e),'type':a93_0x16240f(0x15d),'description':a93_0x16240f(0x157)},{'name':a93_0x16240f(0x158),'type':a93_0x16240f(0x15d),'description':'New\x20username'},{'name':a93_0x16240f(0x13c),'type':a93_0x16240f(0x15d),'description':a93_0x16240f(0x159)},{'name':'dbparam','type':a93_0x16240f(0x15d),'description':a93_0x16240f(0x13d)},{'name':a93_0x16240f(0x134),'type':'string','description':a93_0x16240f(0x138)},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x2e047e){const _0x523a76=a93_0x16240f,_0x15d4cf=_0x2e047e['str'](_0x523a76(0x13e));if(_0x15d4cf&&!validateDbUrl(_0x15d4cf[_0x523a76(0x15e)]()))throw CliErrors[_0x523a76(0x143)](_0x523a76(0x139)+_0x15d4cf+'\x22');},async 'dryRun'(_0x1548a9){const _0x5436c0=a93_0x16240f,_0x4e7a29=_0x1548a9[_0x5436c0(0x137)]('id'),_0x57d3b9=await getDbLinkInfo(_0x4e7a29),_0x231bdb=mergeDbLinkUpdate(_0x57d3b9,_0x1548a9),_0x2c90c1=sanitizeDbLinkForOutput(_0x231bdb);return{'method':'POST','url':_0x5436c0(0x150),'body':_0x2c90c1,'description':'Preview\x20the\x20merged\x20database\x20connection\x20update;\x20password\x20redacted','connectionPreflight':{'enabled':!_0x1548a9[_0x5436c0(0x13f)](_0x5436c0(0x14e)),'executed':![]}};},async 'execute'(_0x24314c){const _0x32f8e7=a93_0x16240f,_0x450b00=_0x24314c['num']('id'),_0xf3c1f=await getDbLinkInfo(_0x450b00),_0x55bb10=mergeDbLinkUpdate(_0xf3c1f,_0x24314c);!_0x24314c[_0x32f8e7(0x13f)]('skip-connection-test')&&await assertDbLinkConnectionPreflight(_0x55bb10);const {id:_0x142bd8,entity:_0x36f7f3}=normalizeEntityWithIdResponse(await updateDbLink(_0x55bb10));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x36f7f3),'message':_0x32f8e7(0x145)+(_0x142bd8??_0x450b00)};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a94_0x4c786e=a94_0xf4be;(function(_0x2f83d1,_0x208d7e){const _0x1fbc90=a94_0xf4be,_0x48988d=_0x2f83d1();while(!![]){try{const _0x38cc8e=parseInt(_0x1fbc90(0xfe))/0x1*(-parseInt(_0x1fbc90(0xe0))/0x2)+-parseInt(_0x1fbc90(0xbf))/0x3+-parseInt(_0x1fbc90(0xe3))/0x4*(-parseInt(_0x1fbc90(0x9f))/0x5)+parseInt(_0x1fbc90(0xb5))/0x6+-parseInt(_0x1fbc90(0xe7))/0x7+parseInt(_0x1fbc90(0xb8))/0x8+-parseInt(_0x1fbc90(0x9c))/0x9;if(_0x38cc8e===_0x208d7e)break;else _0x48988d['push'](_0x48988d['shift']());}catch(_0x33ec57){_0x48988d['push'](_0x48988d['shift']());}}}(a94_0x4a89,0x27614));function a94_0x4a89(){const _0x52b0b8=['repairCommand','riskLevel','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','explicitAppName','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','includes','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','hasOwnProperty','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','accessKey','\x20config','\x20\x20\x20\x20accessKey:\x20\x20','appCode','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','red','Project','ignored\x20in\x20','arch','\x20\x20Legacy\x20inherit:\x20\x20\x20','\x20←\x20current','311516pQHdQx','\x20doctor','(not\x20found)','28DwNSHs','\x20\x20Built-in\x20Skill','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','current','1627290Envayn','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','apiDir','defaultApp','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','project','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20kbDomain:\x20\x20\x20\x20\x20\x20\x20\x20','repeat','version','currentApp','raw','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','packageVersion','format','✗\x20Not\x20logged\x20in','\x20config\x20delete\x20inherit\x20--global','globalConfig','call','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20explicitAppName:\x20','global','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1tCbjXf','appcode','\x20\x20Apps','Global','platform','keys','(unknown)','reason','(missing)','bold','padEnd','locale','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','projectConfig','pageSize','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','212175uZKYJt','(set\x20via\x20file,\x20length=','value','188075LCKNCT','env','cookie','✗\x20Expired','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','prototype','yellow','read','inherit','\x20\x20Auth','(not\x20set)','\x20\x20Config\x20Files','\x20\x20─','gray','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','installedPath','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20config\x20delete\x20inherit','source','(no\x20file)','(none)','1801590swYasr','(default:\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','1408072wKqYTT','missing','✓\x20Valid\x20JSON','filter','skillVersion','(set,\x20length=','length','499428QaRVlW','log','status','state','(default)','apps','empty','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','slice','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','green'];a94_0x4a89=function(){return _0x52b0b8;};return a94_0x4a89();}import a94_0x423d85 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';function a94_0xf4be(_0x58d793,_0x5d5257){_0x58d793=_0x58d793-0x9b;const _0x4a891d=a94_0x4a89();let _0xf4be36=_0x4a891d[_0x58d793];return _0xf4be36;}import{getActiveRegion,getApiDomain,getAppDomain,getKbDomain,getSkillDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x57535c){const _0x4c7777=a94_0xf4be,_0x42ab7c=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4c7777(0xc7)](0x0,0xa)+')':VERSION,_0x4b8ccf=buildConfigFromFlags({}),_0x18a8eb=getCookie();console[_0x4c7777(0xc0)](),console[_0x4c7777(0xc0)](a94_0x423d85[_0x4c7777(0x107)](CLI_BIN_NAME+_0x4c7777(0xe1))),console['log'](a94_0x423d85['gray']('─'[_0x4c7777(0xef)](0x32))),console[_0x4c7777(0xc0)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x42ab7c),console[_0x4c7777(0xc0)](_0x4c7777(0xa4)+process[_0x4c7777(0xf0)]),console[_0x4c7777(0xc0)](_0x4c7777(0xe5)+process[_0x4c7777(0x102)]+'\x20'+process[_0x4c7777(0xdd)]);const _0x37b70a=inspectBuiltinSkill();console[_0x4c7777(0xc0)](),console[_0x4c7777(0xc0)](a94_0x423d85[_0x4c7777(0x107)](_0x4c7777(0xe4))),console[_0x4c7777(0xc0)](a94_0x423d85['gray']('\x20\x20─'[_0x4c7777(0xef)](0x1e)));const _0x2acc01=_0x37b70a[_0x4c7777(0xc2)]===_0x4c7777(0xe6)?a94_0x423d85[_0x4c7777(0xca)]('✓\x20'+_0x37b70a['state']):a94_0x423d85[_0x4c7777(0xda)]('✗\x20'+_0x37b70a[_0x4c7777(0xc2)]);console[_0x4c7777(0xc0)](_0x4c7777(0xc8)+_0x2acc01),console[_0x4c7777(0xc0)]('\x20\x20Package\x20Version:\x20'+_0x37b70a[_0x4c7777(0xf4)]),console[_0x4c7777(0xc0)]('\x20\x20Skill\x20Version:\x20\x20\x20'+(_0x37b70a[_0x4c7777(0xbc)]||a94_0x423d85['gray'](_0x4c7777(0x104)))),console['log']('\x20\x20Installed\x20Path:\x20\x20'+(_0x37b70a[_0x4c7777(0xaf)]||a94_0x423d85[_0x4c7777(0xad)](_0x4c7777(0xe2))));if(_0x37b70a['reason'])console[_0x4c7777(0xc0)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x37b70a[_0x4c7777(0x105)]);_0x37b70a[_0x4c7777(0xc2)]!=='current'&&console[_0x4c7777(0xc0)]('\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x37b70a[_0x4c7777(0xcb)]);console['log'](),console['log'](a94_0x423d85[_0x4c7777(0x107)](_0x4c7777(0xab))),console['log'](a94_0x423d85[_0x4c7777(0xad)](_0x4c7777(0xac)[_0x4c7777(0xef)](0x1e)));const _0x57c7b1=getGlobalConfigPath(),_0x58ef9e=getProjectConfigPath();console[_0x4c7777(0xc0)](_0x4c7777(0xf3)+(_0x57c7b1||a94_0x423d85['gray']('(not\x20found)'))),console['log'](_0x4c7777(0xb0)+(_0x58ef9e||a94_0x423d85[_0x4c7777(0xad)](_0x4c7777(0xe2)))),console['log'](),console[_0x4c7777(0xc0)](a94_0x423d85[_0x4c7777(0x107)](_0x4c7777(0xc9))),console['log'](a94_0x423d85[_0x4c7777(0xad)](_0x4c7777(0xac)[_0x4c7777(0xef)](0x1e)));const _0x3155ff=(_0x1c9782,_0x34e978)=>{const _0x34871d=_0x4c7777;if(!_0x34e978){console[_0x34871d(0xc0)]('\x20\x20'+_0x1c9782['padEnd'](0x11)+'\x20'+a94_0x423d85[_0x34871d(0xad)](_0x34871d(0xb3)));return;}const _0x4b4a50=inspectCliConfigJsonFile(_0x34e978);if(_0x4b4a50[_0x34871d(0xc1)]==='ok')console[_0x34871d(0xc0)]('\x20\x20'+_0x1c9782['padEnd'](0x11)+'\x20'+a94_0x423d85['green'](_0x34871d(0xba)));else{if(_0x4b4a50[_0x34871d(0xc1)]===_0x34871d(0xc5))console[_0x34871d(0xc0)]('\x20\x20'+_0x1c9782[_0x34871d(0x108)](0x11)+'\x20'+a94_0x423d85[_0x34871d(0xa6)](_0x34871d(0xfa)));else _0x4b4a50['status']===_0x34871d(0xb9)?console[_0x34871d(0xc0)]('\x20\x20'+_0x1c9782['padEnd'](0x11)+'\x20'+a94_0x423d85[_0x34871d(0xad)](_0x34871d(0x106))):(console[_0x34871d(0xc0)]('\x20\x20'+_0x1c9782[_0x34871d(0x108)](0x11)+'\x20'+a94_0x423d85[_0x34871d(0xda)]('✗\x20Invalid\x20JSON')),console[_0x34871d(0xc0)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a94_0x423d85['red'](_0x4b4a50['message'])));}};_0x3155ff(_0x4c7777(0x101),_0x57c7b1),_0x3155ff(_0x4c7777(0xdb),_0x58ef9e);const _0x39c496=loadRawConfigLayers(),_0x2b12cb=[Object[_0x4c7777(0xa5)][_0x4c7777(0xd2)][_0x4c7777(0xf9)](_0x39c496[_0x4c7777(0xf8)],_0x4c7777(0xa8))?_0x4c7777(0xfc):null,Object[_0x4c7777(0xa5)][_0x4c7777(0xd2)][_0x4c7777(0xf9)](_0x39c496[_0x4c7777(0x10b)],_0x4c7777(0xa8))?_0x4c7777(0xec):null][_0x4c7777(0xbb)](Boolean);_0x2b12cb['length']>0x0&&(console[_0x4c7777(0xc0)](_0x4c7777(0xde)+a94_0x423d85['yellow'](_0x4c7777(0xdc)+_0x2b12cb['join']('\x20+\x20')+_0x4c7777(0xd5))),_0x2b12cb[_0x4c7777(0xd0)](_0x4c7777(0xec))&&console[_0x4c7777(0xc0)]('\x20\x20Repair\x20project:\x20\x20\x20'+CLI_BIN_NAME+_0x4c7777(0xb1)),_0x2b12cb[_0x4c7777(0xd0)]('global')&&console[_0x4c7777(0xc0)]('\x20\x20Repair\x20global:\x20\x20\x20\x20'+CLI_BIN_NAME+_0x4c7777(0xf7)));console[_0x4c7777(0xc0)](),console['log'](a94_0x423d85[_0x4c7777(0x107)]('\x20\x20Merged\x20Config')),console[_0x4c7777(0xc0)](a94_0x423d85['gray'](_0x4c7777(0xac)[_0x4c7777(0xef)](0x1e))),console[_0x4c7777(0xc0)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4b8ccf[_0x4c7777(0xd7)]||a94_0x423d85[_0x4c7777(0xda)](_0x4c7777(0xaa)))),console[_0x4c7777(0xc0)](_0x4c7777(0xeb)+_0x4b8ccf[_0x4c7777(0xa0)]),console[_0x4c7777(0xc0)](_0x4c7777(0xd3)+_0x4b8ccf[_0x4c7777(0x109)]),console['log'](_0x4c7777(0xd8)+_0x4b8ccf[_0x4c7777(0xe9)]),console[_0x4c7777(0xc0)](_0x4c7777(0xed)+(_0x4b8ccf[_0x4c7777(0xea)]||a94_0x423d85[_0x4c7777(0xad)](_0x4c7777(0xb4)))),console[_0x4c7777(0xc0)](_0x4c7777(0xb7)+(_0x4b8ccf[_0x4c7777(0xf1)]||a94_0x423d85[_0x4c7777(0xad)](_0x4c7777(0xb4)))),console[_0x4c7777(0xc0)](_0x4c7777(0xfb)+(_0x4b8ccf[_0x4c7777(0xce)]||a94_0x423d85[_0x4c7777(0xad)](_0x4c7777(0xb4)))),console[_0x4c7777(0xc0)](_0x4c7777(0xc6)+(_0x4b8ccf[_0x4c7777(0xf5)]||a94_0x423d85[_0x4c7777(0xad)](_0x4c7777(0xb6)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x4c7777(0xc0)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4b8ccf[_0x4c7777(0x10c)]??a94_0x423d85[_0x4c7777(0xad)](_0x4c7777(0xc3)))),console[_0x4c7777(0xc0)](_0x4c7777(0xd1)+_0x4b8ccf[_0x4c7777(0xcc)]),console['log'](_0x4c7777(0xa3)+_0x4b8ccf['verbose']),console[_0x4c7777(0xc0)](_0x4c7777(0xfd)+(_0x4b8ccf[_0x4c7777(0xa1)]?a94_0x423d85[_0x4c7777(0xca)](_0x4c7777(0xbd)+_0x4b8ccf[_0x4c7777(0xa1)][_0x4c7777(0xbe)]+')'):_0x18a8eb?a94_0x423d85[_0x4c7777(0xca)](_0x4c7777(0x9d)+_0x18a8eb[_0x4c7777(0xbe)]+')'):a94_0x423d85['gray'](_0x4c7777(0xb4))));const _0x680217=Object[_0x4c7777(0x103)](_0x4b8ccf[_0x4c7777(0xc4)]);if(_0x680217[_0x4c7777(0xbe)]>0x0){console[_0x4c7777(0xc0)](),console[_0x4c7777(0xc0)](a94_0x423d85[_0x4c7777(0x107)](_0x4c7777(0x100))),console[_0x4c7777(0xc0)](a94_0x423d85[_0x4c7777(0xad)](_0x4c7777(0xac)[_0x4c7777(0xef)](0x1e)));for(const _0x3c0e51 of _0x680217){const _0x202b78=_0x4b8ccf['apps'][_0x3c0e51],_0x4d7d07=_0x3c0e51===_0x4b8ccf[_0x4c7777(0xea)],_0x3880e7=_0x3c0e51===_0x4b8ccf[_0x4c7777(0xf1)],_0x2ea8bd=_0x3880e7?a94_0x423d85[_0x4c7777(0xca)](_0x4c7777(0xdf)):'',_0x334970=_0x4d7d07?'\x20(default)':'';console['log']('\x20\x20'+_0x3c0e51+_0x334970+_0x2ea8bd),console[_0x4c7777(0xc0)](_0x4c7777(0xd9)+_0x202b78[_0x4c7777(0xff)]);const _0x427394=buildAppDoctorFields(_0x202b78,{'env':_0x4b8ccf['env'],'apiDir':_0x4b8ccf[_0x4c7777(0xf2)][_0x4c7777(0xe9)]||DEFAULT_CONFIG_VALUES[_0x4c7777(0xe9)],'cookie':_0x4b8ccf[_0x4c7777(0xa1)]||_0x18a8eb||undefined,'accessKey':_0x4b8ccf[_0x4c7777(0xd4)]});console[_0x4c7777(0xc0)]('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x427394[_0x4c7777(0xa0)]['value']+'\x20\x20'+a94_0x423d85[_0x4c7777(0xad)]('('+_0x427394[_0x4c7777(0xa0)][_0x4c7777(0xb2)]+')')),console['log'](_0x4c7777(0xe8)+_0x427394[_0x4c7777(0xe9)]['value']+'\x20\x20'+a94_0x423d85['gray']('('+_0x427394['apiDir'][_0x4c7777(0xb2)]+')'));const _0x7e27e6=_0x427394[_0x4c7777(0xa1)][_0x4c7777(0x9e)]?a94_0x423d85[_0x4c7777(0xca)](_0x4c7777(0xbd)+_0x427394[_0x4c7777(0xa1)][_0x4c7777(0x9e)][_0x4c7777(0xbe)]+')'):a94_0x423d85['gray'](_0x4c7777(0xb4));console[_0x4c7777(0xc0)](_0x4c7777(0xcf)+_0x7e27e6+'\x20\x20'+a94_0x423d85['gray']('('+_0x427394[_0x4c7777(0xa1)][_0x4c7777(0xb2)]+')'));const _0xd16298=_0x427394['accessKey'][_0x4c7777(0x9e)]?a94_0x423d85[_0x4c7777(0xca)](_0x4c7777(0xbd)+_0x427394[_0x4c7777(0xd4)][_0x4c7777(0x9e)][_0x4c7777(0xbe)]+')'):a94_0x423d85[_0x4c7777(0xad)](_0x4c7777(0xb4));console[_0x4c7777(0xc0)](_0x4c7777(0xd6)+_0xd16298+'\x20\x20'+a94_0x423d85['gray']('('+_0x427394[_0x4c7777(0xd4)][_0x4c7777(0xb2)]+')'));}}console[_0x4c7777(0xc0)](),console['log'](a94_0x423d85[_0x4c7777(0x107)]('\x20\x20API\x20Endpoints')),console[_0x4c7777(0xc0)](a94_0x423d85[_0x4c7777(0xad)](_0x4c7777(0xac)[_0x4c7777(0xef)](0x1e))),console['log'](_0x4c7777(0xcd)+getActiveRegion()),console[_0x4c7777(0xc0)](_0x4c7777(0xae)+getApiDomain()),console['log']('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x4c7777(0xc0)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x4c7777(0xc0)]('\x20\x20skillDomain:\x20\x20\x20\x20\x20'+getSkillDomain()),console[_0x4c7777(0xc0)](_0x4c7777(0xee)+getKbDomain()),console['log']('\x20\x20appDomain:\x20\x20\x20\x20\x20\x20\x20'+getAppDomain()),console[_0x4c7777(0xc0)](),console[_0x4c7777(0xc0)](a94_0x423d85[_0x4c7777(0x107)](_0x4c7777(0xa9))),console['log'](a94_0x423d85[_0x4c7777(0xad)](_0x4c7777(0xac)[_0x4c7777(0xef)](0x1e)));if(_0x18a8eb){const _0x5ea103=await getIsSessionValid();console['log'](_0x4c7777(0x10a)+(_0x5ea103?a94_0x423d85[_0x4c7777(0xca)]('✓\x20Valid'):a94_0x423d85[_0x4c7777(0xda)](_0x4c7777(0xa2))));}else console[_0x4c7777(0xc0)](_0x4c7777(0x10a)+a94_0x423d85[_0x4c7777(0xda)](_0x4c7777(0xf6)));return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':'check','description':a94_0x4c786e(0x9b),'risk':a94_0x4c786e(0xa7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a94_0x37d9fd=a94_0x4132;(function(_0x3980b2,_0x5697d3){const _0x4af5e7=a94_0x4132,_0x59969b=_0x3980b2();while(!![]){try{const _0x29f410=parseInt(_0x4af5e7(0x1b4))/0x1+parseInt(_0x4af5e7(0x164))/0x2*(parseInt(_0x4af5e7(0x183))/0x3)+parseInt(_0x4af5e7(0x144))/0x4*(-parseInt(_0x4af5e7(0x196))/0x5)+-parseInt(_0x4af5e7(0x1b3))/0x6*(parseInt(_0x4af5e7(0x14e))/0x7)+parseInt(_0x4af5e7(0x147))/0x8+parseInt(_0x4af5e7(0x169))/0x9*(-parseInt(_0x4af5e7(0x187))/0xa)+parseInt(_0x4af5e7(0x15c))/0xb;if(_0x29f410===_0x5697d3)break;else _0x59969b['push'](_0x59969b['shift']());}catch(_0x1a8ee2){_0x59969b['push'](_0x59969b['shift']());}}}(a94_0x4763,0xea17d));import a94_0x2c6af3 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{getActiveRegion,getApiDomain,getAppDomain,getKbDomain,getSkillDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';function a94_0x4763(){const _0x1d300d=['\x20←\x20current','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default)','2HCSNxe','format','hasOwnProperty','\x20\x20Apps','missing','2861397MEIWjA','\x20\x20Package\x20Version:\x20','\x20\x20─','state','(none)','\x20\x20\x20\x20accessKey:\x20\x20','✓\x20Valid\x20JSON','defaultApp','call','apps','locale','\x20(default)','current','Global','slice','(default:\x20','✗\x20Invalid\x20JSON','red','keys','includes','platform','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Legacy\x20inherit:\x20\x20\x20','\x20config\x20delete\x20inherit\x20--global','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','yellow','1351302yhYwSA','appcode','\x20\x20Repair\x20global:\x20\x20\x20\x20','bold','10oLLYpx','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','read','\x20config\x20delete\x20inherit','\x20\x20appDomain:\x20\x20\x20\x20\x20\x20\x20','source','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','value','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','filter','check','\x20\x20Auth','raw','8159845ByZjaB','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','verbose','inherit','\x20\x20API\x20Endpoints','installedPath','projectConfig','arch','cookie','\x20+\x20','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','unknown','version','gray','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Expired','length','log','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Project','\x20\x20explicitAppName:\x20','\x20\x20Repair\x20project:\x20\x20\x20','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','reason','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','732414EPlATU','680269VgOtyB','packageVersion','\x20\x20Installed\x20Path:\x20\x20','✓\x20Valid','repeat','\x20\x20Skill\x20Version:\x20\x20\x20','4LQccKs','\x20\x20Built-in\x20Skill','accessKey','2012736zuXyVL','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','appCode','currentApp','apiDir','project','pageSize','63dVHeVy','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','(not\x20set)','prototype','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','riskLevel','(set,\x20length=','green','\x20config','\x20\x20kbDomain:\x20\x20\x20\x20\x20\x20\x20\x20','\x20doctor','(not\x20found)','\x20\x20runtimeDomain:\x20\x20\x20','28875803BnTyMl','(no\x20file)','env','global'];a94_0x4763=function(){return _0x1d300d;};return a94_0x4763();}function a94_0x4132(_0x25694c,_0xeb6ca7){_0x25694c=_0x25694c-0x140;const _0x47634c=a94_0x4763();let _0x41327f=_0x47634c[_0x25694c];return _0x41327f;}import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x1ed2cd){const _0xdfcb8d=a94_0x4132,_0x27a292=GIT_COMMIT!==_0xdfcb8d(0x1a2)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0xdfcb8d(0x177)](0x0,0xa)+')':VERSION,_0x5f10d9=buildConfigFromFlags({}),_0x11af27=getCookie();console['log'](),console[_0xdfcb8d(0x1a8)](a94_0x2c6af3[_0xdfcb8d(0x186)](CLI_BIN_NAME+_0xdfcb8d(0x159))),console[_0xdfcb8d(0x1a8)](a94_0x2c6af3[_0xdfcb8d(0x1a4)]('─'[_0xdfcb8d(0x142)](0x32))),console['log'](_0xdfcb8d(0x18d)+_0x27a292),console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x1b1)+process[_0xdfcb8d(0x1a3)]),console[_0xdfcb8d(0x1a8)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0xdfcb8d(0x17d)]+'\x20'+process[_0xdfcb8d(0x19d)]);const _0x9c1c0d=inspectBuiltinSkill();console[_0xdfcb8d(0x1a8)](),console[_0xdfcb8d(0x1a8)](a94_0x2c6af3[_0xdfcb8d(0x186)](_0xdfcb8d(0x145))),console[_0xdfcb8d(0x1a8)](a94_0x2c6af3[_0xdfcb8d(0x1a4)]('\x20\x20─'[_0xdfcb8d(0x142)](0x1e)));const _0x4913c0=_0x9c1c0d[_0xdfcb8d(0x16c)]===_0xdfcb8d(0x175)?a94_0x2c6af3['green']('✓\x20'+_0x9c1c0d[_0xdfcb8d(0x16c)]):a94_0x2c6af3[_0xdfcb8d(0x17a)]('✗\x20'+_0x9c1c0d[_0xdfcb8d(0x16c)]);console['log'](_0xdfcb8d(0x162)+_0x4913c0),console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x16a)+_0x9c1c0d[_0xdfcb8d(0x1b5)]),console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x143)+(_0x9c1c0d['skillVersion']||a94_0x2c6af3[_0xdfcb8d(0x1a4)]('(unknown)'))),console['log'](_0xdfcb8d(0x140)+(_0x9c1c0d[_0xdfcb8d(0x19b)]||a94_0x2c6af3['gray'](_0xdfcb8d(0x15a))));if(_0x9c1c0d[_0xdfcb8d(0x1af)])console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x197)+_0x9c1c0d[_0xdfcb8d(0x1af)]);_0x9c1c0d[_0xdfcb8d(0x16c)]!==_0xdfcb8d(0x175)&&console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x1a9)+_0x9c1c0d['repairCommand']);console[_0xdfcb8d(0x1a8)](),console['log'](a94_0x2c6af3[_0xdfcb8d(0x186)]('\x20\x20Config\x20Files')),console[_0xdfcb8d(0x1a8)](a94_0x2c6af3[_0xdfcb8d(0x1a4)](_0xdfcb8d(0x16b)[_0xdfcb8d(0x142)](0x1e)));const _0xb5d0b8=getGlobalConfigPath(),_0x2d9783=getProjectConfigPath();console['log'](_0xdfcb8d(0x1a1)+(_0xb5d0b8||a94_0x2c6af3[_0xdfcb8d(0x1a4)](_0xdfcb8d(0x15a)))),console['log'](_0xdfcb8d(0x18e)+(_0x2d9783||a94_0x2c6af3[_0xdfcb8d(0x1a4)](_0xdfcb8d(0x15a)))),console[_0xdfcb8d(0x1a8)](),console[_0xdfcb8d(0x1a8)](a94_0x2c6af3['bold']('\x20\x20Config\x20JSON')),console['log'](a94_0x2c6af3[_0xdfcb8d(0x1a4)](_0xdfcb8d(0x16b)[_0xdfcb8d(0x142)](0x1e)));const _0x10a294=(_0x8adc4c,_0x283b7c)=>{const _0x967944=_0xdfcb8d;if(!_0x283b7c){console[_0x967944(0x1a8)]('\x20\x20'+_0x8adc4c[_0x967944(0x1b2)](0x11)+'\x20'+a94_0x2c6af3[_0x967944(0x1a4)](_0x967944(0x15d)));return;}const _0x20dcb1=inspectCliConfigJsonFile(_0x283b7c);if(_0x20dcb1[_0x967944(0x18f)]==='ok')console['log']('\x20\x20'+_0x8adc4c[_0x967944(0x1b2)](0x11)+'\x20'+a94_0x2c6af3[_0x967944(0x156)](_0x967944(0x16f)));else{if(_0x20dcb1[_0x967944(0x18f)]==='empty')console['log']('\x20\x20'+_0x8adc4c[_0x967944(0x1b2)](0x11)+'\x20'+a94_0x2c6af3[_0x967944(0x182)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x20dcb1[_0x967944(0x18f)]===_0x967944(0x168)?console[_0x967944(0x1a8)]('\x20\x20'+_0x8adc4c[_0x967944(0x1b2)](0x11)+'\x20'+a94_0x2c6af3[_0x967944(0x1a4)]('(missing)')):(console[_0x967944(0x1a8)]('\x20\x20'+_0x8adc4c[_0x967944(0x1b2)](0x11)+'\x20'+a94_0x2c6af3[_0x967944(0x17a)](_0x967944(0x179))),console[_0x967944(0x1a8)]('\x20\x20'+''[_0x967944(0x1b2)](0x11)+'\x20'+a94_0x2c6af3[_0x967944(0x17a)](_0x20dcb1['message'])));}};_0x10a294(_0xdfcb8d(0x176),_0xb5d0b8),_0x10a294(_0xdfcb8d(0x1aa),_0x2d9783);const _0xc9d524=loadRawConfigLayers(),_0x359a0c=[Object[_0xdfcb8d(0x152)][_0xdfcb8d(0x166)][_0xdfcb8d(0x171)](_0xc9d524['globalConfig'],_0xdfcb8d(0x199))?_0xdfcb8d(0x15f):null,Object[_0xdfcb8d(0x152)][_0xdfcb8d(0x166)][_0xdfcb8d(0x171)](_0xc9d524[_0xdfcb8d(0x19c)],_0xdfcb8d(0x199))?_0xdfcb8d(0x14c):null][_0xdfcb8d(0x192)](Boolean);_0x359a0c[_0xdfcb8d(0x1a7)]>0x0&&(console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x17f)+a94_0x2c6af3[_0xdfcb8d(0x182)]('ignored\x20in\x20'+_0x359a0c['join'](_0xdfcb8d(0x19f))+_0xdfcb8d(0x157))),_0x359a0c[_0xdfcb8d(0x17c)](_0xdfcb8d(0x14c))&&console['log'](_0xdfcb8d(0x1ac)+CLI_BIN_NAME+_0xdfcb8d(0x18a)),_0x359a0c['includes'](_0xdfcb8d(0x15f))&&console['log'](_0xdfcb8d(0x185)+CLI_BIN_NAME+_0xdfcb8d(0x180)));console['log'](),console[_0xdfcb8d(0x1a8)](a94_0x2c6af3[_0xdfcb8d(0x186)](_0xdfcb8d(0x150))),console[_0xdfcb8d(0x1a8)](a94_0x2c6af3[_0xdfcb8d(0x1a4)](_0xdfcb8d(0x16b)[_0xdfcb8d(0x142)](0x1e))),console['log'](_0xdfcb8d(0x1a5)+(_0x5f10d9[_0xdfcb8d(0x149)]||a94_0x2c6af3[_0xdfcb8d(0x17a)](_0xdfcb8d(0x151)))),console['log']('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5f10d9[_0xdfcb8d(0x15e)]),console[_0xdfcb8d(0x1a8)]('\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20'+_0x5f10d9[_0xdfcb8d(0x173)]),console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x191)+_0x5f10d9[_0xdfcb8d(0x14b)]),console['log']('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x5f10d9[_0xdfcb8d(0x170)]||a94_0x2c6af3[_0xdfcb8d(0x1a4)](_0xdfcb8d(0x16d)))),console[_0xdfcb8d(0x1a8)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x5f10d9[_0xdfcb8d(0x14a)]||a94_0x2c6af3['gray'](_0xdfcb8d(0x16d)))),console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x1ab)+(_0x5f10d9['explicitAppName']||a94_0x2c6af3[_0xdfcb8d(0x1a4)]('(none)'))),console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x1ae)+(_0x5f10d9[_0xdfcb8d(0x165)]||a94_0x2c6af3[_0xdfcb8d(0x1a4)](_0xdfcb8d(0x178)+DEFAULT_CONFIG_VALUES['format']+')'))),console['log']('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x5f10d9[_0xdfcb8d(0x14d)]??a94_0x2c6af3[_0xdfcb8d(0x1a4)](_0xdfcb8d(0x163)))),console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x153)+_0x5f10d9[_0xdfcb8d(0x154)]),console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x1b0)+_0x5f10d9[_0xdfcb8d(0x198)]),console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x148)+(_0x5f10d9['cookie']?a94_0x2c6af3[_0xdfcb8d(0x156)](_0xdfcb8d(0x155)+_0x5f10d9['cookie'][_0xdfcb8d(0x1a7)]+')'):_0x11af27?a94_0x2c6af3[_0xdfcb8d(0x156)]('(set\x20via\x20file,\x20length='+_0x11af27[_0xdfcb8d(0x1a7)]+')'):a94_0x2c6af3['gray']('(none)')));const _0x35cd65=Object[_0xdfcb8d(0x17b)](_0x5f10d9[_0xdfcb8d(0x172)]);if(_0x35cd65[_0xdfcb8d(0x1a7)]>0x0){console['log'](),console[_0xdfcb8d(0x1a8)](a94_0x2c6af3['bold'](_0xdfcb8d(0x167))),console[_0xdfcb8d(0x1a8)](a94_0x2c6af3[_0xdfcb8d(0x1a4)](_0xdfcb8d(0x16b)['repeat'](0x1e)));for(const _0xaf69 of _0x35cd65){const _0x525f53=_0x5f10d9[_0xdfcb8d(0x172)][_0xaf69],_0x6c7064=_0xaf69===_0x5f10d9[_0xdfcb8d(0x170)],_0x5f280c=_0xaf69===_0x5f10d9['currentApp'],_0x4d8ebd=_0x5f280c?a94_0x2c6af3['green'](_0xdfcb8d(0x160)):'',_0x4fb109=_0x6c7064?_0xdfcb8d(0x174):'';console['log']('\x20\x20'+_0xaf69+_0x4fb109+_0x4d8ebd),console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x1ad)+_0x525f53[_0xdfcb8d(0x184)]);const _0x3dc8d6=buildAppDoctorFields(_0x525f53,{'env':_0x5f10d9[_0xdfcb8d(0x15e)],'apiDir':_0x5f10d9[_0xdfcb8d(0x195)][_0xdfcb8d(0x14b)]||DEFAULT_CONFIG_VALUES[_0xdfcb8d(0x14b)],'cookie':_0x5f10d9['cookie']||_0x11af27||undefined,'accessKey':_0x5f10d9[_0xdfcb8d(0x146)]});console['log'](_0xdfcb8d(0x1a0)+_0x3dc8d6[_0xdfcb8d(0x15e)][_0xdfcb8d(0x190)]+'\x20\x20'+a94_0x2c6af3[_0xdfcb8d(0x1a4)]('('+_0x3dc8d6['env'][_0xdfcb8d(0x18c)]+')')),console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x188)+_0x3dc8d6[_0xdfcb8d(0x14b)]['value']+'\x20\x20'+a94_0x2c6af3[_0xdfcb8d(0x1a4)]('('+_0x3dc8d6[_0xdfcb8d(0x14b)][_0xdfcb8d(0x18c)]+')'));const _0x54d392=_0x3dc8d6[_0xdfcb8d(0x19e)][_0xdfcb8d(0x190)]?a94_0x2c6af3[_0xdfcb8d(0x156)]('(set,\x20length='+_0x3dc8d6[_0xdfcb8d(0x19e)][_0xdfcb8d(0x190)][_0xdfcb8d(0x1a7)]+')'):a94_0x2c6af3[_0xdfcb8d(0x1a4)](_0xdfcb8d(0x16d));console[_0xdfcb8d(0x1a8)]('\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'+_0x54d392+'\x20\x20'+a94_0x2c6af3[_0xdfcb8d(0x1a4)]('('+_0x3dc8d6['cookie'][_0xdfcb8d(0x18c)]+')'));const _0x4ad75c=_0x3dc8d6[_0xdfcb8d(0x146)][_0xdfcb8d(0x190)]?a94_0x2c6af3['green'](_0xdfcb8d(0x155)+_0x3dc8d6['accessKey'][_0xdfcb8d(0x190)][_0xdfcb8d(0x1a7)]+')'):a94_0x2c6af3['gray'](_0xdfcb8d(0x16d));console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x16e)+_0x4ad75c+'\x20\x20'+a94_0x2c6af3[_0xdfcb8d(0x1a4)]('('+_0x3dc8d6[_0xdfcb8d(0x146)][_0xdfcb8d(0x18c)]+')'));}}console[_0xdfcb8d(0x1a8)](),console[_0xdfcb8d(0x1a8)](a94_0x2c6af3[_0xdfcb8d(0x186)](_0xdfcb8d(0x19a))),console[_0xdfcb8d(0x1a8)](a94_0x2c6af3[_0xdfcb8d(0x1a4)](_0xdfcb8d(0x16b)['repeat'](0x1e))),console['log']('\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+getActiveRegion()),console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x14f)+getApiDomain()),console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x161)+getUserDomain()),console['log'](_0xdfcb8d(0x15b)+getRuntimeDomain()),console[_0xdfcb8d(0x1a8)]('\x20\x20skillDomain:\x20\x20\x20\x20\x20'+getSkillDomain()),console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x158)+getKbDomain()),console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x18b)+getAppDomain()),console['log'](),console[_0xdfcb8d(0x1a8)](a94_0x2c6af3[_0xdfcb8d(0x186)](_0xdfcb8d(0x194))),console[_0xdfcb8d(0x1a8)](a94_0x2c6af3[_0xdfcb8d(0x1a4)](_0xdfcb8d(0x16b)[_0xdfcb8d(0x142)](0x1e)));if(_0x11af27){const _0x174a4a=await getIsSessionValid();console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x17e)+(_0x174a4a?a94_0x2c6af3[_0xdfcb8d(0x156)](_0xdfcb8d(0x141)):a94_0x2c6af3[_0xdfcb8d(0x17a)](_0xdfcb8d(0x1a6))));}else console[_0xdfcb8d(0x1a8)](_0xdfcb8d(0x17e)+a94_0x2c6af3[_0xdfcb8d(0x17a)]('✗\x20Not\x20logged\x20in'));return console[_0xdfcb8d(0x1a8)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':a94_0x37d9fd(0x193),'description':a94_0x37d9fd(0x181),'risk':a94_0x37d9fd(0x189),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a95_0x38f6(){const _0x5e4a4b=['upload','filePath','47349EdVGUC','bool','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','POST','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','Preview:\x20upload\x20','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','trim','validation','path','download','str','434248zzcRnZ','filepath','65weJQRk','318017KXfRkC','1177832jvbxfG','\x20to\x20development\x20app\x20','Path\x20to\x20the\x20local\x20file\x20to\x20upload','62184kzmKYM','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','query-url','8490sutWcI','appCode','file','Uploaded\x20file:\x20','14lClWqT','1433934zckdoI','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','read','boolean','string','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','filePath\x20is\x20required.'];a95_0x38f6=function(){return _0x5e4a4b;};return a95_0x38f6();}function a95_0x121b(_0x9430b3,_0xb5e0c){_0x9430b3=_0x9430b3-0x17e;const _0x38f6fb=a95_0x38f6();let _0x121b62=_0x38f6fb[_0x9430b3];return _0x121b62;}const a95_0x23a11f=a95_0x121b;(function(_0x38824f,_0x371dfa){const _0x421325=a95_0x121b,_0x4f2e6f=_0x38824f();while(!![]){try{const _0x2b3efc=parseInt(_0x421325(0x19c))/0x1+parseInt(_0x421325(0x17f))/0x2*(parseInt(_0x421325(0x189))/0x3)+-parseInt(_0x421325(0x195))/0x4+parseInt(_0x421325(0x197))/0x5*(parseInt(_0x421325(0x19f))/0x6)+parseInt(_0x421325(0x198))/0x7+parseInt(_0x421325(0x199))/0x8+-parseInt(_0x421325(0x180))/0x9;if(_0x2b3efc===_0x371dfa)break;else _0x4f2e6f['push'](_0x4f2e6f['shift']());}catch(_0x7965a4){_0x4f2e6f['push'](_0x4f2e6f['shift']());}}}(a95_0x38f6,0x1c478));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':'file','type':a95_0x23a11f(0x184),'required':!![],'description':a95_0x23a11f(0x19b)},FILEPATH_FLAG={'name':'filepath','type':'string','required':!![],'description':a95_0x23a11f(0x18f)},DOWNLOAD_FLAG={'name':a95_0x23a11f(0x193),'type':'boolean','description':a95_0x23a11f(0x181)},LONG_TERM_FLAG={'name':'long-term','type':a95_0x23a11f(0x183),'description':a95_0x23a11f(0x18d)};function requireFilePath(_0x2d3fe5){const _0xa3d311=a95_0x23a11f,_0xbb6ba2=_0x2d3fe5[_0xa3d311(0x190)]();if(!_0xbb6ba2)throw CliErrors[_0xa3d311(0x191)](_0xa3d311(0x186));return _0xbb6ba2;}const fileUpload={'service':a95_0x23a11f(0x1a1),'command':a95_0x23a11f(0x187),'description':a95_0x23a11f(0x19d),'risk':a95_0x23a11f(0x182),'flags':[FILE_FLAG],async 'dryRun'(_0x4d77ec){const _0x379e22=a95_0x23a11f,_0x1ead30=requireDevelopmentUploadFile(_0x4d77ec['str'](_0x379e22(0x1a1)),'File');return{'method':_0x379e22(0x18c),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x4d77ec[_0x379e22(0x1a0)],'multipart':{'file':_0x1ead30}},'description':_0x379e22(0x18e)+_0x1ead30['path']+_0x379e22(0x19a)+_0x4d77ec[_0x379e22(0x1a0)]};},async 'execute'(_0x305df5){const _0x565f4c=a95_0x23a11f,_0x33e676=requireDevelopmentUploadFile(_0x305df5['str'](_0x565f4c(0x1a1)),'File'),_0x40dfcd=await uploadDevelopmentFile(_0x305df5['appCode'],_0x33e676[_0x565f4c(0x192)]);return{'ok':!![],'data':_0x40dfcd,'message':_0x40dfcd[_0x565f4c(0x188)]?_0x565f4c(0x17e)+_0x40dfcd[_0x565f4c(0x188)]+'.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.':_0x565f4c(0x18b)};}},fileQueryUrl={'service':a95_0x23a11f(0x1a1),'command':a95_0x23a11f(0x19e),'description':a95_0x23a11f(0x185),'risk':a95_0x23a11f(0x182),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x3f9dcf){const _0xaded04=a95_0x23a11f,_0x4c0913=requireFilePath(_0x3f9dcf[_0xaded04(0x194)](_0xaded04(0x196))),_0x24a0e2=await queryDevelopmentFileUrl(_0x4c0913,{'download':_0x3f9dcf['bool'](_0xaded04(0x193)),'longTerm':_0x3f9dcf[_0xaded04(0x18a)]('long-term')});return{'ok':!![],'data':_0x24a0e2};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x523aad,_0x44afee){const _0x3e4988=a96_0x1e87,_0x108720=_0x523aad();while(!![]){try{const _0x393bbc=parseInt(_0x3e4988(0x120))/0x1+parseInt(_0x3e4988(0x121))/0x2*(-parseInt(_0x3e4988(0x123))/0x3)+-parseInt(_0x3e4988(0x126))/0x4+parseInt(_0x3e4988(0x11f))/0x5*(parseInt(_0x3e4988(0x124))/0x6)+-parseInt(_0x3e4988(0x122))/0x7+-parseInt(_0x3e4988(0x127))/0x8+parseInt(_0x3e4988(0x125))/0x9;if(_0x393bbc===_0x44afee)break;else _0x108720['push'](_0x108720['shift']());}catch(_0x1ad20f){_0x108720['push'](_0x108720['shift']());}}}(a96_0x1898,0xf3305));function a96_0x1e87(_0x3d190b,_0x2fdb79){_0x3d190b=_0x3d190b-0x11f;const _0x189880=a96_0x1898();let _0x1e8791=_0x189880[_0x3d190b];return _0x1e8791;}function a96_0x1898(){const _0x2b80b0=['3458133rbuRkP','150tvSTYf','102KtHxfl','18477126GBZiZl','5114912ftrIYD','12448728NwxvTe','494410XLsZJB','775931cgsqBA','7400iagQFi'];a96_0x1898=function(){return _0x2b80b0;};return a96_0x1898();}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a97_0x3202ae=a97_0x1b57;(function(_0x520594,_0xbf1d31){const _0x4801d5=a97_0x1b57,_0x3b855b=_0x520594();while(!![]){try{const _0xec98cd=-parseInt(_0x4801d5(0x176))/0x1+parseInt(_0x4801d5(0x16c))/0x2+parseInt(_0x4801d5(0x16d))/0x3*(parseInt(_0x4801d5(0x17e))/0x4)+-parseInt(_0x4801d5(0x168))/0x5+parseInt(_0x4801d5(0x178))/0x6+parseInt(_0x4801d5(0x177))/0x7*(parseInt(_0x4801d5(0x162))/0x8)+-parseInt(_0x4801d5(0x17a))/0x9;if(_0xec98cd===_0xbf1d31)break;else _0x3b855b['push'](_0x3b855b['shift']());}catch(_0x5b0509){_0x3b855b['push'](_0x3b855b['shift']());}}}(a97_0xc2c0,0x94445));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV='RABETBASE_DISABLE_ISSUE_NUDGE';function a97_0xc2c0(){const _0x1addc3=['14EtfhDy','5830674Slkroh','command','5717349lgnKmq','slice','=1\x20to\x20silence\x20this\x20hint.','config_missing','20XUjrGy','\x20bug?\x20Help\x20us\x20fix\x20it:','trim','flag_missing','1795688fLJXfJ','code','stderr','network_error','service','unknown_command','3332895BVbtNq','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','\x20\x20Set\x20','cancelled','1321376urUlXW','593310ZnEnUK','join','not_in_project','\x22\x20\x5c','replace','Hit\x20a\x20','message','\x20\x20\x20\x20--title\x20\x22','auth_required','1161098KgyaCU'];a97_0xc2c0=function(){return _0x1addc3;};return a97_0xc2c0();}const NUDGE_SUPPRESSED_CODES=new Set([a97_0x3202ae(0x16b),a97_0x3202ae(0x175),a97_0x3202ae(0x17d),a97_0x3202ae(0x16f),a97_0x3202ae(0x167),a97_0x3202ae(0x161),'validation_error',a97_0x3202ae(0x165)]),defaultWriter=_0x253085=>{const _0x3b5af3=a97_0x3202ae;process[_0x3b5af3(0x164)]['write'](_0x253085);};function a97_0x1b57(_0x2eb437,_0x36338b){_0x2eb437=_0x2eb437-0x15f;const _0xc2c081=a97_0xc2c0();let _0x1b57e5=_0xc2c081[_0x2eb437];return _0x1b57e5;}export function shouldNudgeForError(_0x5537aa,_0x174d8d){const _0x1745f0=a97_0x3202ae;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x174d8d[_0x1745f0(0x166)]==='issue'&&_0x174d8d[_0x1745f0(0x179)]==='report')return![];if(_0x5537aa instanceof CliError)return!NUDGE_SUPPRESSED_CODES['has'](_0x5537aa[_0x1745f0(0x163)]);return!![];}export function printIssueReportNudgeForError(_0x3e6540,_0x34bdf2,_0x49b30d=defaultWriter){if(!shouldNudgeForError(_0x3e6540,_0x34bdf2))return;const _0x710d7b=buildSuggestedTitle(_0x3e6540,_0x34bdf2);_0x49b30d(formatNudge(_0x710d7b));}function buildSuggestedTitle(_0xe2eeb9,_0x3eee29){const _0x178786=a97_0x3202ae,_0x5164f0=_0xe2eeb9 instanceof Error?_0xe2eeb9[_0x178786(0x173)]:String(_0xe2eeb9),_0x49a499=_0x5164f0[_0x178786(0x171)](/[\r\n]+/g,'\x20')['replace'](/\s+/g,'\x20')[_0x178786(0x160)]()[_0x178786(0x17b)](0x0,0x78)['replace'](/"/g,'\x5c\x22'),_0x1a3f6e=CLI_BIN_NAME+'\x20'+_0x3eee29['service']+'\x20'+_0x3eee29['command'];return _0x49a499['length']>0x0?_0x1a3f6e+':\x20'+_0x49a499:_0x1a3f6e;}function formatNudge(_0x3e51b5){const _0x215a38=a97_0x3202ae;return['',_0x215a38(0x172)+CLI_BIN_NAME+_0x215a38(0x15f),'\x20\x20'+CLI_BIN_NAME+'\x20issue\x20report\x20\x5c',_0x215a38(0x174)+_0x3e51b5+_0x215a38(0x170),_0x215a38(0x169),'\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)',_0x215a38(0x16a)+NUDGE_OPT_OUT_ENV+_0x215a38(0x17c),''][_0x215a38(0x16e)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x1d5125=a98_0x4b78;(function(_0x380fe7,_0xcf0b2){const _0x523b50=a98_0x4b78,_0xfacd98=_0x380fe7();while(!![]){try{const _0x5701f2=-parseInt(_0x523b50(0x209))/0x1*(parseInt(_0x523b50(0x207))/0x2)+-parseInt(_0x523b50(0x1e1))/0x3*(parseInt(_0x523b50(0x1fa))/0x4)+-parseInt(_0x523b50(0x21b))/0x5*(-parseInt(_0x523b50(0x205))/0x6)+parseInt(_0x523b50(0x20e))/0x7+-parseInt(_0x523b50(0x1ee))/0x8+-parseInt(_0x523b50(0x21a))/0x9+-parseInt(_0x523b50(0x1f5))/0xa*(-parseInt(_0x523b50(0x1f9))/0xb);if(_0x5701f2===_0xcf0b2)break;else _0xfacd98['push'](_0xfacd98['shift']());}catch(_0xd6b11a){_0xfacd98['push'](_0xfacd98['shift']());}}}(a98_0x5af1,0x9a3b6));import{existsSync}from'node:fs';function a98_0x5af1(){const _0x3bff75=['trim','One-line\x20issue\x20summary','utf8','4903344hJkKGk','130BkcXfw','3wxHVPR','filter','push','file','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','validation','truncated:\x20original\x20','description-file','descriptionFile:\x20','title','flagMissing','Platform\x20issue\x20reported\x20(','join','2019104XbKCNq','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','Platform\x20issue\x20reported','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','redactionCount','issue.description_redaction_kinds','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','13050LBmdam','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','sanitize','descriptionSource','5214djuMPK','24700ZkQirF','message','cwd','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','str','compress','write','truncated','description','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','185646DXksBE','Issue\x20description\x20file\x20is\x20empty:\x20','2MQuoeT','issue.description','125585hXKAUU','originalBytes','redacted\x20','\x20bytes','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','963634hBvGjq','issue.description_truncated','descriptionFilePath','issue.description_original_bytes','redactionKinds','truncated\x20from\x20','string','issue.title','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter'];a98_0x5af1=function(){return _0x3bff75;};return a98_0x5af1();}import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG=a98_0x1d5125(0x1e8);function a98_0x4b78(_0x45526a,_0x3edbeb){_0x45526a=_0x45526a-0x1e1;const _0x5af13c=a98_0x5af1();let _0x4b786c=_0x5af13c[_0x45526a];return _0x4b786c;}export const issueReport={'service':'issue','command':'report','description':a98_0x1d5125(0x1f1),'risk':a98_0x1d5125(0x200),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a98_0x1d5125(0x1ff),'flags':[{'name':a98_0x1d5125(0x1ea),'type':'string','required':!![],'description':a98_0x1d5125(0x218)},{'name':a98_0x1d5125(0x202),'type':a98_0x1d5125(0x214),'description':a98_0x1d5125(0x1e5)},{'name':DESCRIPTION_FILE_FLAG,'type':a98_0x1d5125(0x214),'description':a98_0x1d5125(0x204)}],async 'validate'(_0x39f39d){const _0x338aa2=a98_0x1d5125,_0x408b4d=_0x39f39d['str'](_0x338aa2(0x1ea))[_0x338aa2(0x217)](),_0x343256=_0x39f39d['str']('description')[_0x338aa2(0x217)](),_0x560975=_0x39f39d['str'](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x408b4d)throw CliErrors[_0x338aa2(0x1eb)](_0x338aa2(0x1ea),_0x338aa2(0x1ef));const _0x4c8d5d=_0x343256['length']>0x0,_0x426b64=_0x560975['length']>0x0;if(_0x4c8d5d===_0x426b64)throw CliErrors[_0x338aa2(0x1e6)](_0x338aa2(0x20d),_0x338aa2(0x1f6));if(_0x426b64){const _0x564e2a=resolve(process['cwd'](),_0x560975);if(!existsSync(_0x564e2a))throw CliErrors[_0x338aa2(0x1e6)]('File\x20not\x20found:\x20'+_0x564e2a);}},async 'dryRun'(_0x4f903b){const _0x8d1b0f=a98_0x1d5125,_0x2d91dd=await prepareIssueReport(_0x4f903b);return{'method':'POST','url':'otel://'+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x2d91dd[_0x8d1b0f(0x1ea)],'issue.description':_0x2d91dd[_0x8d1b0f(0x202)],'issue.description_original_bytes':_0x2d91dd['sanitize'][_0x8d1b0f(0x20a)],'issue.description_truncated':_0x2d91dd[_0x8d1b0f(0x1f7)][_0x8d1b0f(0x201)],'issue.description_redactions':_0x2d91dd[_0x8d1b0f(0x1f7)][_0x8d1b0f(0x1f2)],'issue.description_redaction_kinds':_0x2d91dd['sanitize'][_0x8d1b0f(0x212)]['join'](',')}},'description':[_0x8d1b0f(0x216),'descriptionSource:\x20'+_0x2d91dd['descriptionSource'],_0x2d91dd[_0x8d1b0f(0x210)]?_0x8d1b0f(0x1e9)+_0x2d91dd[_0x8d1b0f(0x210)]:null,_0x2d91dd[_0x8d1b0f(0x1f7)][_0x8d1b0f(0x201)]?_0x8d1b0f(0x1e7)+_0x2d91dd['sanitize'][_0x8d1b0f(0x20a)]+'\x20bytes':null,_0x2d91dd['sanitize'][_0x8d1b0f(0x1f2)]>0x0?'redactions:\x20'+_0x2d91dd['sanitize'][_0x8d1b0f(0x1f2)]+'\x20('+_0x2d91dd[_0x8d1b0f(0x1f7)][_0x8d1b0f(0x212)]['join'](',\x20')+')':null][_0x8d1b0f(0x1e2)](Boolean)[_0x8d1b0f(0x1ed)]('\x0a')};},async 'execute'(_0x24a993){const _0x3f5b9d=a98_0x1d5125,_0x594af9=await prepareIssueReport(_0x24a993);try{await sendPlatformIssueCollectLog({'title':_0x594af9['title'],'description':_0x594af9[_0x3f5b9d(0x202)],'sanitize':{'originalBytes':_0x594af9['sanitize'][_0x3f5b9d(0x20a)],'truncated':_0x594af9['sanitize'][_0x3f5b9d(0x201)],'redactionCount':_0x594af9[_0x3f5b9d(0x1f7)][_0x3f5b9d(0x1f2)],'redactionKinds':_0x594af9[_0x3f5b9d(0x1f7)][_0x3f5b9d(0x212)]}});}catch(_0x1198a7){throw CliErrors['apiError']('Failed\x20to\x20report\x20platform\x20issue:\x20'+(_0x1198a7 instanceof Error?_0x1198a7[_0x3f5b9d(0x1fb)]:String(_0x1198a7)),_0x3f5b9d(0x1f4));}return{'ok':!![],'message':buildResultMessage(_0x594af9[_0x3f5b9d(0x1f7)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x3f5b9d(0x215),_0x3f5b9d(0x208),_0x3f5b9d(0x211),_0x3f5b9d(0x20f),'issue.description_redactions',_0x3f5b9d(0x1f3)],'issue':{'title':_0x594af9[_0x3f5b9d(0x1ea)],'descriptionLength':_0x594af9[_0x3f5b9d(0x202)]['length'],'descriptionSource':_0x594af9[_0x3f5b9d(0x1f8)],..._0x594af9[_0x3f5b9d(0x210)]?{'descriptionFile':_0x594af9[_0x3f5b9d(0x210)]}:{},'sanitize':{'originalBytes':_0x594af9[_0x3f5b9d(0x1f7)][_0x3f5b9d(0x20a)],'truncated':_0x594af9[_0x3f5b9d(0x1f7)][_0x3f5b9d(0x201)],'redactions':_0x594af9['sanitize'][_0x3f5b9d(0x1f2)],'redactionKinds':_0x594af9['sanitize'][_0x3f5b9d(0x212)]}}}};}};function buildResultMessage(_0x3d314d){const _0x291952=a98_0x1d5125,_0x40a820=[];return _0x3d314d['truncated']&&_0x40a820[_0x291952(0x1e3)](_0x291952(0x213)+_0x3d314d[_0x291952(0x20a)]+_0x291952(0x20c)),_0x3d314d[_0x291952(0x1f2)]>0x0&&_0x40a820[_0x291952(0x1e3)](_0x291952(0x20b)+_0x3d314d[_0x291952(0x1f2)]+'\x20secret(s):\x20'+_0x3d314d[_0x291952(0x212)][_0x291952(0x1ed)](',\x20')),_0x40a820['length']===0x0?_0x291952(0x1f0):_0x291952(0x1ec)+_0x40a820[_0x291952(0x1ed)](';\x20')+')';}async function prepareIssueReport(_0x79afb9){const _0x327e16=a98_0x1d5125,_0x198d25=_0x79afb9['str']('title')[_0x327e16(0x217)](),_0xdcb93a=_0x79afb9[_0x327e16(0x1fe)](_0x327e16(0x202)),_0x2b13b4=_0x79afb9[_0x327e16(0x1fe)](DESCRIPTION_FILE_FLAG)[_0x327e16(0x217)]();if(!_0x2b13b4){const _0x166b4d=_0xdcb93a;if(!_0x166b4d[_0x327e16(0x217)]())throw CliErrors[_0x327e16(0x1e6)]('Issue\x20description\x20cannot\x20be\x20empty.',_0x327e16(0x1fd));const _0x1ac0b0=sanitizeIssueDescription(_0x166b4d);return{'title':_0x198d25,'description':_0x1ac0b0[_0x327e16(0x202)],'descriptionSource':'inline','sanitize':_0x1ac0b0};}const _0x39e58f=resolve(process[_0x327e16(0x1fc)](),_0x2b13b4),_0x33b1c3=await readFile(_0x39e58f,_0x327e16(0x219));if(!_0x33b1c3[_0x327e16(0x217)]())throw CliErrors[_0x327e16(0x1e6)](_0x327e16(0x206)+_0x39e58f,_0x327e16(0x203));const _0x39c7e8=sanitizeIssueDescription(_0x33b1c3);return{'title':_0x198d25,'description':_0x39c7e8[_0x327e16(0x202)],'descriptionSource':_0x327e16(0x1e4),'descriptionFilePath':_0x39e58f,'sanitize':_0x39c7e8};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x509180=a99_0x3bba;(function(_0x599b44,_0x208ec9){const _0x56b39c=a99_0x3bba,_0x311bc1=_0x599b44();while(!![]){try{const _0x39f192=-parseInt(_0x56b39c(0x1ff))/0x1+parseInt(_0x56b39c(0x1e6))/0x2*(-parseInt(_0x56b39c(0x203))/0x3)+parseInt(_0x56b39c(0x1ee))/0x4*(-parseInt(_0x56b39c(0x1f3))/0x5)+parseInt(_0x56b39c(0x205))/0x6*(-parseInt(_0x56b39c(0x202))/0x7)+parseInt(_0x56b39c(0x1f4))/0x8*(-parseInt(_0x56b39c(0x1fc))/0x9)+parseInt(_0x56b39c(0x1fb))/0xa*(parseInt(_0x56b39c(0x206))/0xb)+parseInt(_0x56b39c(0x1f5))/0xc;if(_0x39f192===_0x208ec9)break;else _0x311bc1['push'](_0x311bc1['shift']());}catch(_0x4f821a){_0x311bc1['push'](_0x311bc1['shift']());}}}(a99_0x26ff,0x7c86e));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a99_0x509180(0x1ec),REDACTION_RULES=[{'kind':'cookie','pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a99_0x509180(0x1f8)},{'kind':a99_0x509180(0x1e9),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a99_0x509180(0x204)},{'kind':'private-key','pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a99_0x509180(0x1fd)},{'kind':a99_0x509180(0x1fe),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a99_0x509180(0x1e7)},{'kind':a99_0x509180(0x1f6),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a99_0x509180(0x1e5)},{'kind':a99_0x509180(0x1eb),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a99_0x509180(0x1ea)}];export function sanitizeIssueDescription(_0x27aeee){const _0x52b272=a99_0x509180,_0xd31184=Buffer['byteLength'](_0x27aeee,'utf8'),_0x58e6c8=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0xa8f526=_0x27aeee,_0x1d5b35=0x0;const _0x4fb757=[];if(!_0x58e6c8){const _0x419499=protectOssAccessKeyIds(_0xa8f526);_0xa8f526=_0x419499[_0x52b272(0x1f9)];for(const _0x409433 of REDACTION_RULES){let _0x4507c6=0x0;_0xa8f526=_0xa8f526['replace'](_0x409433[_0x52b272(0x1ed)],(_0x470527,_0x3c45c3)=>{const _0x49a7a3=_0x52b272;_0x4507c6+=0x1;const _0x3338b4=typeof _0x3c45c3==='string'?_0x3c45c3:'';return _0x3338b4+'['+_0x409433[_0x49a7a3(0x200)]+']';}),_0x4507c6>0x0&&(_0x1d5b35+=_0x4507c6,!_0x4fb757['includes'](_0x409433[_0x52b272(0x1f1)])&&_0x4fb757[_0x52b272(0x1f0)](_0x409433[_0x52b272(0x1f1)]));}_0xa8f526=_0x419499['restore'](_0xa8f526);}let _0x414456=![];if(Buffer[_0x52b272(0x1f7)](_0xa8f526,_0x52b272(0x201))>ISSUE_DESCRIPTION_MAX_BYTES){_0x414456=!![];const _0x61d395=Buffer[_0x52b272(0x1f7)](TRUNCATION_NOTICE,_0x52b272(0x201)),_0x49d99d=Math[_0x52b272(0x1fa)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x61d395);_0xa8f526=sliceUtf8Bytes(_0xa8f526,_0x49d99d)+TRUNCATION_NOTICE;}return{'description':_0xa8f526,'originalBytes':_0xd31184,'truncated':_0x414456,'redactionCount':_0x1d5b35,'redactionKinds':_0x4fb757};}function protectOssAccessKeyIds(_0x59d4af){const _0x403e77=a99_0x509180,_0x33afab=[],_0x2fc264=_0x59d4af[_0x403e77(0x1f2)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x3d7fd9,_0x1cdadb)=>{const _0xba57ea=_0x403e77,_0x2fd62d=_0x33afab[_0xba57ea(0x1f0)](_0x3d7fd9['slice'](_0x1cdadb[_0xba57ea(0x1ef)]))-0x1;return _0x1cdadb+_0xba57ea(0x1e8)+_0x2fd62d+'__';});return{'description':_0x2fc264,'restore':_0x11f63f=>_0x11f63f[_0x403e77(0x1f2)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x1bd4f2,_0x3934f1,_0x218edd)=>{const _0x1a88ec=_0x33afab[Number(_0x218edd)];return _0x1a88ec===undefined?_0x1bd4f2:''+_0x3934f1+_0x1a88ec;})};}function a99_0x3bba(_0x159afe,_0x522dc0){_0x159afe=_0x159afe-0x1e5;const _0x26ff49=a99_0x26ff();let _0x3bba22=_0x26ff49[_0x159afe];return _0x3bba22;}function a99_0x26ff(){const _0x10ffa0=['42rWuqMv','44WKwLEe','REDACTED:password','130398rwDNeW','REDACTED:access-key','__RB_OSS_ID_','authorization','REDACTED:bearer-jwt','bearer-jwt','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','pattern','3008hWTmnS','length','push','kind','replace','1240iYkQOV','39552YJaBMy','26535540dWnjVY','password','byteLength','REDACTED:cookie','description','max','1524680uEXTCJ','1116AjtLHq','REDACTED:private-key','access-key','810361iwjpWh','label','utf8','114401MKOyJz','27RvNHoh','REDACTED:authorization'];a99_0x26ff=function(){return _0x10ffa0;};return a99_0x26ff();}function sliceUtf8Bytes(_0x5193db,_0x5a981d){const _0x419759=a99_0x509180;if(_0x5a981d<=0x0)return'';const _0x29b2d=Buffer['from'](_0x5193db,'utf8');if(_0x29b2d['byteLength']<=_0x5a981d)return _0x5193db;let _0x4f95d0=_0x5a981d;while(_0x4f95d0>0x0){const _0x684686=_0x29b2d[_0x4f95d0];if(_0x684686===undefined||(_0x684686&0xc0)!==0x80)break;_0x4f95d0-=0x1;}return _0x29b2d['subarray'](0x0,_0x4f95d0)['toString'](_0x419759(0x201));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a100_0x280f6b=a100_0x5a66;(function(_0x3ff76f,_0x1210b3){const _0x4cae39=a100_0x5a66,_0x460fe4=_0x3ff76f();while(!![]){try{const _0x30c86d=parseInt(_0x4cae39(0x188))/0x1+parseInt(_0x4cae39(0x19f))/0x2+parseInt(_0x4cae39(0x196))/0x3*(parseInt(_0x4cae39(0x18f))/0x4)+-parseInt(_0x4cae39(0x19d))/0x5+parseInt(_0x4cae39(0x199))/0x6+parseInt(_0x4cae39(0x190))/0x7*(parseInt(_0x4cae39(0x185))/0x8)+parseInt(_0x4cae39(0x187))/0x9*(-parseInt(_0x4cae39(0x1ac))/0xa);if(_0x30c86d===_0x1210b3)break;else _0x460fe4['push'](_0x460fe4['shift']());}catch(_0xa1a3b2){_0x460fe4['push'](_0x460fe4['shift']());}}}(a100_0x319e,0x66cf1));import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,verifyKbMutationReadback}from'../../commands/kb/shared.js';const CREATE_PATH='/admin/knowledge-base/create';function readCreateInput(_0x1754e8){const _0x2f5d34=a100_0x5a66,_0x40fb90=_0x1754e8[_0x2f5d34(0x192)]('title')['trim']();if(!_0x40fb90)throw kbError(_0x2f5d34(0x19e),_0x2f5d34(0x18c));const _0x49ba0c=_0x1754e8[_0x2f5d34(0x192)](_0x2f5d34(0x1a1))[_0x2f5d34(0x1ab)]();if(!_0x49ba0c)throw kbError(_0x2f5d34(0x181),_0x2f5d34(0x191),_0x2f5d34(0x183));return{'title':_0x40fb90,'file':_0x49ba0c};}async function prepareCreate(_0xb0d248){const _0x1843c7=a100_0x5a66,_0x3b5be7=readCreateInput(_0xb0d248),_0x193344=await readKbFile(_0x3b5be7[_0x1843c7(0x1a1)]),_0x9d8f66=await fetchAllCompanyKnowledgeBases(_0xb0d248,{'title':_0x3b5be7['title']}),_0x3aea4f=findExactCompanyKnowledgeBases(_0x9d8f66,_0xb0d248[_0x1843c7(0x1aa)],_0x3b5be7['title']);if(_0x3aea4f[_0x1843c7(0x186)]>0x0)throw kbError(_0x1843c7(0x189),_0x1843c7(0x1a2)+_0xb0d248[_0x1843c7(0x1aa)]+_0x1843c7(0x18b)+_0x3b5be7[_0x1843c7(0x19a)]+'.',_0x1843c7(0x1a0)+_0x3aea4f[0x0]['id']+_0x1843c7(0x1a6));return{..._0x3b5be7,'content':_0x193344};}function plannedAfter(_0x36846a,_0x17c88a){const _0x552141=a100_0x5a66;return{'scope':'company','appCode':_0x36846a[_0x552141(0x1aa)],'title':_0x17c88a[_0x552141(0x19a)],'contentByteSize':_0x17c88a[_0x552141(0x1a7)][_0x552141(0x17c)],'contentHash':_0x17c88a['content'][_0x552141(0x180)]};}function verifyCreatedState(_0x282164,_0x2220e8,_0x234818){const _0xd0b0ca=a100_0x5a66;assertCompanyKnowledgeBase(_0x234818,_0x282164[_0xd0b0ca(0x1aa)],_0x234818['id']);const _0x517769=inspectKbContent(_0x234818['content']);if(_0x234818[_0xd0b0ca(0x19a)]!==_0x2220e8[_0xd0b0ca(0x19a)]||_0x517769['contentHash']!==_0x2220e8[_0xd0b0ca(0x1a7)]['contentHash'])throw kbError(_0xd0b0ca(0x1a3),'Company\x20knowledge\x20base\x20'+_0x234818['id']+_0xd0b0ca(0x1ad),_0xd0b0ca(0x1a9)+_0x234818['id']+_0xd0b0ca(0x195));return projectKb(_0x234818);}function a100_0x5a66(_0x18e43a,_0x58eb25){_0x18e43a=_0x18e43a-0x17c;const _0x319ea4=a100_0x319e();let _0x5a6654=_0x319ea4[_0x18e43a];return _0x5a6654;}function a100_0x319e(){const _0x5156e2=['880965eOSUll','kb_title_required','1670110ZJARcF','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','file','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20','kb_verification_failed','verified','Created\x20company\x20knowledge\x20base\x20','\x20--format\x20compress`\x20before\x20choosing\x20update.','content','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','appCode','trim','40FhOnDJ','\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','byteSize','create','string','company','contentHash','kb_file_required','write','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.','stringify','152wVVeyY','length','5249844RKkTYC','727899fMcZdW','kb_already_exists','\x20--format\x20compress','\x20with\x20title\x20','--title\x20is\x20required.','kb_create_outcome_unknown','Knowledge-base\x20title','1594672lpUtIP','225855gbUVgi','--file\x20is\x20required.','str','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','3zsGXmn','cookie','rabetbase\x20kb\x20list\x20--title\x20','2135430CjpFpq','title','rabetbase\x20kb\x20detail\x20--id\x20','POST'];a100_0x319e=function(){return _0x5156e2;};return a100_0x319e();}export const kbCreate={'service':'kb','command':a100_0x280f6b(0x17d),'description':'Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','risk':a100_0x280f6b(0x182),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'title','type':'string','required':!![],'description':a100_0x280f6b(0x18e)},{'name':'file','type':a100_0x280f6b(0x17e),'required':!![],'description':a100_0x280f6b(0x193)}],async 'validate'(_0x33a4e4){readCreateInput(_0x33a4e4);},async 'dryRun'(_0x2631a0){const _0x57124c=a100_0x280f6b,_0x6356d8=await prepareCreate(_0x2631a0);return asDryRunResult({'operation':_0x57124c(0x17d),'selector':{'scope':_0x57124c(0x17f),'appCode':_0x2631a0['appCode'],'title':_0x6356d8['title']},'before':null,'after':plannedAfter(_0x2631a0,_0x6356d8),'dryRun':!![],'backend':{'method':_0x57124c(0x19c),'path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':_0x57124c(0x198)+JSON[_0x57124c(0x184)](_0x6356d8[_0x57124c(0x19a)])+'\x20--format\x20compress'}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x5d77c0){const _0x3abacf=a100_0x280f6b,_0x44674c=await prepareCreate(_0x5d77c0);let _0x59216a,_0x5be24b=![];try{const _0x2d6f2a=await createEnterpriseKnowledgeBase(_0x5d77c0[_0x3abacf(0x197)],{'appCode':_0x5d77c0[_0x3abacf(0x1aa)],'title':_0x44674c['title'],'content':_0x44674c['content'][_0x3abacf(0x1a7)]});assertCompanyKnowledgeBase(_0x2d6f2a,_0x5d77c0[_0x3abacf(0x1aa)],_0x2d6f2a['id']),_0x59216a=_0x2d6f2a['id'];}catch(_0xcca505){if(!isPlatformTransportFailure(_0xcca505))throw _0xcca505;_0x5be24b=!![];}if(_0x59216a===undefined){const _0x5a02d9=await verifyKbMutationReadback(_0x3abacf(0x17d),!![],()=>fetchAllCompanyKnowledgeBases(_0x5d77c0,{'title':_0x44674c[_0x3abacf(0x19a)]})),_0x31db3e=findExactCompanyKnowledgeBases(_0x5a02d9,_0x5d77c0[_0x3abacf(0x1aa)],_0x44674c[_0x3abacf(0x19a)]);if(_0x31db3e[_0x3abacf(0x186)]!==0x1)throw kbError(_0x3abacf(0x18d),'Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20'+_0x31db3e[_0x3abacf(0x186)]+'.',_0x3abacf(0x194));_0x59216a=_0x31db3e[0x0]['id'];}const _0x801da6=await verifyKbMutationReadback(_0x3abacf(0x17d),_0x5be24b,()=>requireKb(_0x5d77c0,_0x59216a)),_0x1a6028=verifyCreatedState(_0x5d77c0,_0x44674c,_0x801da6),_0x4b0394=_0x5be24b?[_0x3abacf(0x1a8)]:[];return{'ok':!![],'data':{'operation':_0x3abacf(0x17d),'selector':{'id':_0x1a6028['id'],'scope':_0x3abacf(0x17f),'appCode':_0x1a6028[_0x3abacf(0x1aa)]},'before':null,'after':_0x1a6028,'dryRun':![],'backend':{'method':_0x3abacf(0x19c),'path':CREATE_PATH},'warnings':_0x4b0394,'verification':{'status':_0x3abacf(0x1a4),'recoveredAfterUnknownResponse':_0x5be24b,'lookupCommand':_0x3abacf(0x19b)+_0x1a6028['id']+_0x3abacf(0x18a)}},'message':_0x3abacf(0x1a5)+_0x1a6028['id']+'\x20for\x20'+_0x1a6028['appCode']};}};
|