@lovrabet/rabetbase-cli 2.5.1-beta.4 → 2.5.1-beta.6
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/README.md +75 -1
- 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.d.ts +0 -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.d.ts +2 -0
- 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.d.ts +2 -0
- 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-restore.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/dataset/user-deleted-field-list.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/table-diff-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/deployment/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync.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.d.ts +1 -0
- 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/domain-routing-sync.d.ts +2 -0
- package/lib/commands/project/domain-routing-sync.js +1 -0
- 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/rule/get.d.ts +2 -0
- package/lib/commands/rule/get.js +1 -0
- package/lib/commands/rule/index.d.ts +2 -0
- package/lib/commands/rule/index.js +1 -0
- package/lib/commands/rule/list.d.ts +2 -0
- package/lib/commands/rule/list.js +1 -0
- package/lib/commands/rule/set.d.ts +2 -0
- package/lib/commands/rule/set.js +1 -0
- package/lib/commands/rule/shared.d.ts +43 -0
- package/lib/commands/rule/shared.js +1 -0
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/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/deployment-sync.js +1 -1
- package/lib/config/domain-config.d.ts +37 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.d.ts +27 -0
- package/lib/config/project-domain-routing.js +1 -0
- package/lib/config/schema.d.ts +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.d.ts +10 -4
- 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.d.ts +4 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.d.ts +43 -49
- package/lib/constant/routing-profile.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.d.ts +2 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +21 -0
- 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/kb-search-client.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/generated/official-routing.d.ts +83 -0
- package/lib/generated/official-routing.js +1 -0
- package/lib/generated/routing-contract.d.ts +9 -0
- package/lib/generated/routing-contract.js +1 -0
- 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/types/index.d.ts +0 -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 +2 -1
- package/skills/rabetbase/SKILL.md +15 -12
- package/skills/rabetbase/guides/sdk-client-generation.md +10 -8
- package/skills/rabetbase/references/rabetbase-api-pull.md +16 -11
- package/skills/rabetbase/references/rabetbase-config.md +3 -3
- package/skills/rabetbase/references/rabetbase-database-template.md +36 -0
- package/skills/rabetbase/references/rabetbase-doctor.md +1 -0
- package/skills/rabetbase/references/rabetbase-init.md +32 -8
- package/skills/rabetbase/references/rabetbase-project-create.md +33 -8
- package/skills/rabetbase/references/rabetbase-project-domain-routing-sync.md +28 -0
- package/skills/rabetbase/references/rabetbase-rule.md +64 -0
- package/skills/rabetbase.manifest.json +6 -3
- package/lib/config/project-routing.d.ts +0 -30
- package/lib/config/project-routing.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x27dea7=a99_0x5818;(function(_0x2dd225,_0x23c4cb){const _0x123560=a99_0x5818,_0x1ea17c=_0x2dd225();while(!![]){try{const _0xd17bea=-parseInt(_0x123560(0x125))/0x1*(parseInt(_0x123560(0x12f))/0x2)+-parseInt(_0x123560(0x11d))/0x3+-parseInt(_0x123560(0xf9))/0x4*(parseInt(_0x123560(0x111))/0x5)+parseInt(_0x123560(0x12b))/0x6*(parseInt(_0x123560(0x108))/0x7)+parseInt(_0x123560(0xf2))/0x8+-parseInt(_0x123560(0xf7))/0x9+parseInt(_0x123560(0x113))/0xa;if(_0xd17bea===_0x23c4cb)break;else _0x1ea17c['push'](_0x1ea17c['shift']());}catch(_0x874ce3){_0x1ea17c['push'](_0x1ea17c['shift']());}}}(a99_0x2cd6,0xe54c8));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a99_0x2cd6(){const _0x5d62ec=['CREATED','bizCodes','Deployment\x20target\x20selected\x20by\x20the\x20server-side\x20environment\x20mapping','\x20deployment\x20metadata\x20item(s).','Synchronize\x20selected\x20development\x20metadata\x20into\x20one\x20deployment\x20database\x20connection.','target-env','Review\x20data.items\x20with\x20--format\x20json\x20or\x20--format\x20compress\x20before\x20deciding\x20whether\x20to\x20retry\x20failed\x20codes.','codes','--db-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','unshift','7VlTula','--codes\x20must\x20contain\x20at\x20least\x20one\x20non-blank\x20code.','bool','number','Metadata\x20type\x20to\x20synchronize','deployment','map','bizType','type','253790NCIgTk','isSafeInteger','38886830HQieqf','confirm','db-id','direct','not_submitted','Run\x20with\x20--dry-run\x20first,\x20verify\x20the\x20target\x20and\x20codes,\x20then\x20add\x20--confirm.','prod','validation','trim','Do\x20not\x20retry\x20automatically\x20when\x20the\x20request\x20outcome\x20is\x20unknown.','3027396AKxJti','input','data','Inspect\x20the\x20target\x20database\x20before\x20retrying.\x20Do\x20not\x20resubmit\x20automatically.','appCode','Would\x20synchronize\x20','length','Use\x20the\x20base\x20dblink\x20connection\x20directly,\x20without\x20environment\x20mapping','96361vQQofU','Deployment\x20sync\x20completed\x20with\x20','succeeded','\x20failed\x20item(s).','string','Comma-separated\x20Dataset,\x20Backend\x20Function,\x20or\x20SQL\x20codes\x20(maximum\x20100)','5753958pNcJFh','partial_failure','unknown','\x20item(s).','16NQAOKR','num','bff','filter','deployment_sync_outcome_unknown','FAILED','Synchronize\x20selected\x20development\x20metadata\x20to\x20a\x20deployment\x20database','Choose\x20exactly\x20one\x20target\x20mode:\x20--target-env\x20or\x20--direct.','dataset','str','--target-env\x20must\x20be\x20one\x20of:\x20','pre','deployment_sync_partial_failure','2418328QxlMPc','split','includes','action','join','9085635ouRQqv','items','112qTCtON','defineProperty','Target\x20state\x20is\x20not\x20read\x20back\x20because\x20no\x20target\x20metadata\x20read\x20API\x20is\x20available.','Synchronized\x20','POST'];a99_0x2cd6=function(){return _0x5d62ec;};return a99_0x2cd6();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{isPlatformTransportFailure,syncDeploymentMetadata}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';const SYNC_PATH='/smartapi/data-sync/sync',TARGET_ENVS=['dev','test',a99_0x27dea7(0xf0),a99_0x27dea7(0x119)],SYNC_TYPES=[a99_0x27dea7(0xed),a99_0x27dea7(0x131),'sql'],DB_ID_FLAG={'name':a99_0x27dea7(0x115),'type':a99_0x27dea7(0x10b),'required':!![],'description':'Base\x20dblink\x20ID\x20for\x20direct\x20or\x20server-side\x20environment-mapped\x20deployment\x20sync'},TARGET_ENV_FLAG={'name':'target-env','type':a99_0x27dea7(0x129),'enum':[...TARGET_ENVS],'description':a99_0x27dea7(0x100)},DIRECT_FLAG={'name':a99_0x27dea7(0x116),'type':'boolean','description':a99_0x27dea7(0x124)},TYPE_FLAG={'name':'type','type':a99_0x27dea7(0x129),'required':!![],'enum':[...SYNC_TYPES],'description':a99_0x27dea7(0x10c)},CODES_FLAG={'name':'codes','type':a99_0x27dea7(0x129),'required':!![],'description':a99_0x27dea7(0x12a)},CONFIRM_FLAG={'name':a99_0x27dea7(0x114),'type':'boolean','description':'Confirm\x20the\x20target\x20connection\x20and\x20metadata\x20codes'};export const deploymentSync={'service':a99_0x27dea7(0x10d),'command':'sync','description':a99_0x27dea7(0x135),'risk':'write','structuredErrors':!![],'confirmationDescription':a99_0x27dea7(0x102),'flags':[DB_ID_FLAG,TARGET_ENV_FLAG,DIRECT_FLAG,TYPE_FLAG,CODES_FLAG,CONFIRM_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2a4a89){buildSyncPlan(_0x2a4a89);},async 'dryRun'(_0x238bc3){const _0x5bf302=a99_0x27dea7,_0x4cd68b=buildSyncPlan(_0x238bc3);return asDryRunResult(buildOutput(_0x4cd68b,[],!![],'not_submitted'),{'method':_0x5bf302(0xfd),'url':SYNC_PATH,'description':_0x5bf302(0x122)+_0x4cd68b['input'][_0x5bf302(0xff)][_0x5bf302(0x123)]+'\x20'+_0x4cd68b['input'][_0x5bf302(0x10f)]+_0x5bf302(0x12e)});},async 'execute'(_0x3e39a8){const _0x37288a=a99_0x27dea7,_0x38e97a=buildSyncPlan(_0x3e39a8);if(!_0x3e39a8[_0x37288a(0x10a)]('confirm'))throw CliErrors['validation']('--confirm\x20is\x20required\x20to\x20synchronize\x20deployment\x20metadata.',_0x37288a(0x118));let _0x561133;try{_0x561133=(await syncDeploymentMetadata(_0x38e97a[_0x37288a(0x11e)]))[_0x37288a(0xf8)];}catch(_0x4c8eb8){if(!isPlatformTransportFailure(_0x4c8eb8))throw _0x4c8eb8;const _0x18fdaa=new CliError(_0x37288a(0x133),0x2,'Deployment\x20sync\x20response\x20was\x20unavailable;\x20the\x20target\x20outcome\x20is\x20unknown.',_0x37288a(0x120));attachErrorData(_0x18fdaa,buildOutput(_0x38e97a,[],![],_0x37288a(0x12d)));throw _0x18fdaa;}const _0x2d28d7=_0x561133[_0x37288a(0x132)](_0x533979=>_0x533979['action']===_0x37288a(0x134)),_0x2b60b3=_0x2d28d7['length']>0x0?_0x37288a(0x12c):_0x37288a(0x127),_0xfb16cb=buildOutput(_0x38e97a,_0x561133,![],_0x2b60b3);if(_0x2d28d7[_0x37288a(0x123)]>0x0){const _0x718845=new CliError(_0x37288a(0xf1),0x1,_0x37288a(0x126)+_0x2d28d7['length']+'/'+_0x561133[_0x37288a(0x123)]+_0x37288a(0x128),_0x37288a(0x104));attachErrorData(_0x718845,_0xfb16cb);throw _0x718845;}return{'ok':!![],'data':_0xfb16cb,'message':_0x37288a(0xfc)+_0x561133[_0x37288a(0x123)]+_0x37288a(0x101)};}};function a99_0x5818(_0x40d0d6,_0x16609d){_0x40d0d6=_0x40d0d6-0xec;const _0x2cd683=a99_0x2cd6();let _0x581899=_0x2cd683[_0x40d0d6];return _0x581899;}function buildSyncPlan(_0x41fdb9){const _0x432bf4=a99_0x27dea7,_0x17036b=_0x41fdb9[_0x432bf4(0x130)]('db-id');if(!Number[_0x432bf4(0x112)](_0x17036b)||_0x17036b<=0x0)throw CliErrors['validation'](_0x432bf4(0x106));const _0x1cd517=_0x41fdb9[_0x432bf4(0xee)](_0x432bf4(0x103))[_0x432bf4(0x11b)](),_0x17b8ef=_0x41fdb9['bool']('direct');if(Boolean(_0x1cd517)===_0x17b8ef)throw CliErrors[_0x432bf4(0x11a)](_0x432bf4(0xec));if(_0x1cd517&&!TARGET_ENVS[_0x432bf4(0xf4)](_0x1cd517))throw CliErrors['validation'](_0x432bf4(0xef)+TARGET_ENVS[_0x432bf4(0xf6)](',\x20')+'.');const _0x461156=_0x41fdb9['str'](_0x432bf4(0x110))[_0x432bf4(0x11b)]();if(!SYNC_TYPES[_0x432bf4(0xf4)](_0x461156))throw CliErrors[_0x432bf4(0x11a)]('--type\x20must\x20be\x20one\x20of:\x20'+SYNC_TYPES['join'](',\x20')+'.');const _0x532560=normalizeCodes(_0x41fdb9[_0x432bf4(0xee)](_0x432bf4(0x105)));if(_0x532560[_0x432bf4(0x123)]===0x0)throw CliErrors['validation'](_0x432bf4(0x109));if(_0x532560[_0x432bf4(0x123)]>0x64)throw CliErrors[_0x432bf4(0x11a)]('--codes\x20supports\x20at\x20most\x20100\x20unique\x20codes.');const _0x131e9e={'appCode':_0x41fdb9[_0x432bf4(0x121)],'dbLinkId':_0x17036b,..._0x1cd517?{'env':_0x1cd517}:{},'bizType':_0x461156,'bizCodes':_0x532560},_0x425f54=[_0x432bf4(0xfb),_0x432bf4(0x11c)];return _0x461156===_0x432bf4(0xed)&&_0x425f54[_0x432bf4(0x107)]('Dataset\x20sync\x20may\x20commit\x20the\x20target\x20dblink\x20before\x20item\x20synchronization;\x20that\x20dblink\x20change\x20is\x20not\x20rolled\x20back\x20when\x20later\x20items\x20fail.'),{'input':_0x131e9e,'selector':{'appCode':_0x41fdb9[_0x432bf4(0x121)],'dbLinkId':_0x17036b,'targetMode':_0x1cd517?'environment':_0x432bf4(0x116),..._0x1cd517?{'targetEnv':_0x1cd517}:{},'bizType':_0x461156,'bizCodes':_0x532560},'warnings':_0x425f54};}function normalizeCodes(_0x1825da){const _0x23b7e8=a99_0x27dea7;return[...new Set(_0x1825da[_0x23b7e8(0xf3)](',')[_0x23b7e8(0x10e)](_0x3a5918=>_0x3a5918[_0x23b7e8(0x11b)]())[_0x23b7e8(0x132)](Boolean))];}function buildOutput(_0xaf1b66,_0x84266a,_0x5d8df2,_0x3b39ca){const _0x552e5c=a99_0x27dea7,_0x1ff874=_0x3b39ca===_0x552e5c(0x127)||_0x3b39ca===_0x552e5c(0x12c),_0x49bf24=_0x84266a['reduce']((_0xb9e4a3,_0x28d219)=>{const _0x360aa3=_0x552e5c;return _0xb9e4a3[_0x28d219[_0x360aa3(0xf5)]]=(_0xb9e4a3[_0x28d219['action']]??0x0)+0x1,_0xb9e4a3;},{});return{'operation':'deployment_metadata_sync','selector':_0xaf1b66['selector'],'before':null,'after':null,'dryRun':_0x5d8df2,'backend':{'submitted':_0x3b39ca!==_0x552e5c(0x117),'method':_0x552e5c(0xfd),'path':SYNC_PATH,'outcome':_0x3b39ca,'body':_0xaf1b66[_0x552e5c(0x11e)]},'summary':{'requested':_0xaf1b66['input']['bizCodes'][_0x552e5c(0x123)],'total':_0x1ff874?_0x84266a['length']:_0xaf1b66[_0x552e5c(0x11e)][_0x552e5c(0xff)][_0x552e5c(0x123)],'created':_0x84266a['filter'](_0x473e60=>_0x473e60[_0x552e5c(0xf5)]===_0x552e5c(0xfe))['length'],'updated':_0x84266a['filter'](_0x278791=>_0x278791[_0x552e5c(0xf5)]==='UPDATED')['length'],'failed':_0x84266a['filter'](_0x166f9b=>_0x166f9b[_0x552e5c(0xf5)]===_0x552e5c(0x134))['length'],'byAction':_0x49bf24},'items':_0x84266a,'verification':{'performed':![],'reason':'target_read_api_unavailable'},'warnings':_0xaf1b66['warnings']};}function attachErrorData(_0x30c926,_0x1f7abf){const _0x13e25d=a99_0x27dea7;Object[_0x13e25d(0xfa)](_0x30c926,_0x13e25d(0x11f),{'value':_0x1f7abf,'enumerable':!![]});}
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a100_0x3b26c2=a100_0x5f45;(function(_0x1e3e83,_0x3978e9){const _0x5e7c00=a100_0x5f45,_0x50c550=_0x1e3e83();while(!![]){try{const _0x2d5aa5=-parseInt(_0x5e7c00(0x163))/0x1*(parseInt(_0x5e7c00(0x160))/0x2)+-parseInt(_0x5e7c00(0x146))/0x3*(parseInt(_0x5e7c00(0x136))/0x4)+-parseInt(_0x5e7c00(0x161))/0x5*(-parseInt(_0x5e7c00(0x17c))/0x6)+-parseInt(_0x5e7c00(0x12f))/0x7+-parseInt(_0x5e7c00(0x12c))/0x8*(-parseInt(_0x5e7c00(0x138))/0x9)+parseInt(_0x5e7c00(0x18f))/0xa+-parseInt(_0x5e7c00(0x173))/0xb*(-parseInt(_0x5e7c00(0x15e))/0xc);if(_0x2d5aa5===_0x3978e9)break;else _0x50c550['push'](_0x50c550['shift']());}catch(_0x71f4b8){_0x50c550['push'](_0x50c550['shift']());}}}(a100_0x5865,0x8d64a));import a100_0x1ab77c from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';function a100_0x5865(){const _0x32d1ea=['\x20\x20Repair\x20global:\x20\x20\x20\x20','repeat','riskLevel','source','length','3048900jiELcz','(not\x20found)','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','project','(set\x20via\x20file,\x20length=','installedPath','\x20\x20Package\x20Version:\x20','green','\x20\x20API\x20Endpoints','explicitAppName','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid\x20JSON','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','value','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','accessKey','call','(set,\x20length=','\x20\x20Repair\x20project:\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','12vBLsRD','\x20\x20Skill\x20Version:\x20\x20\x20','166ZtyLIK','3100jHcVnf','env','6897wXIKyU','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','status','✗\x20Expired','skillVersion','packageVersion','pageSize','(default:\x20','includes','\x20\x20Installed\x20Path:\x20\x20','padEnd','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','apps','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','9901573FUJUDJ','state','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','cookie','version','global','defaultApp','globalConfig','8064cmiMTm','unknown','\x20\x20Legacy\x20inherit:\x20\x20\x20','prototype','yellow','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20+\x20','(unknown)','inherit','empty','\x20config','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Project','read','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','ignored\x20in\x20','slice','bold','1298690ZxHFuE','apiDir','(missing)','(none)','raw','red','currentApp','⚠\x20Empty\x20(treated\x20as\x20{})','keys','\x20\x20Built-in\x20Skill','gray','projectConfig','Global','6296YeienZ','\x20config\x20delete\x20inherit','\x20\x20Merged\x20Config','1476160UWtOaq','\x20\x20skillDomain:\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','filter','\x20←\x20current','log','verbose','4XbRyoT','format','5895SqPilS','\x20doctor','\x20\x20Config\x20Files','\x20\x20explicitAppName:\x20','reason','platform','current','arch','\x20config\x20delete\x20inherit\x20--global'];a100_0x5865=function(){return _0x32d1ea;};return a100_0x5865();}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';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0xca1930){const _0x3d02e7=a100_0x5f45,_0x56e0cf=GIT_COMMIT!==_0x3d02e7(0x17d)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x3d02e7(0x18d)](0x0,0xa)+')':VERSION,_0x3aff25=buildConfigFromFlags({}),_0x67504f=getCookie();console[_0x3d02e7(0x134)](),console[_0x3d02e7(0x134)](a100_0x1ab77c[_0x3d02e7(0x18e)](CLI_BIN_NAME+_0x3d02e7(0x139))),console[_0x3d02e7(0x134)](a100_0x1ab77c[_0x3d02e7(0x129)]('─'[_0x3d02e7(0x142)](0x32))),console[_0x3d02e7(0x134)](_0x3d02e7(0x158)+_0x56e0cf),console[_0x3d02e7(0x134)](_0x3d02e7(0x181)+process[_0x3d02e7(0x178)]),console['log'](_0x3d02e7(0x148)+process[_0x3d02e7(0x13d)]+'\x20'+process[_0x3d02e7(0x13f)]);const _0x2cafd0=inspectBuiltinSkill();console[_0x3d02e7(0x134)](),console[_0x3d02e7(0x134)](a100_0x1ab77c[_0x3d02e7(0x18e)](_0x3d02e7(0x128))),console[_0x3d02e7(0x134)](a100_0x1ab77c[_0x3d02e7(0x129)](_0x3d02e7(0x155)[_0x3d02e7(0x142)](0x1e)));const _0x5ed701=_0x2cafd0[_0x3d02e7(0x174)]==='current'?a100_0x1ab77c[_0x3d02e7(0x14d)]('✓\x20'+_0x2cafd0[_0x3d02e7(0x174)]):a100_0x1ab77c[_0x3d02e7(0x194)]('✗\x20'+_0x2cafd0[_0x3d02e7(0x174)]);console[_0x3d02e7(0x134)](_0x3d02e7(0x154)+_0x5ed701),console[_0x3d02e7(0x134)](_0x3d02e7(0x14c)+_0x2cafd0[_0x3d02e7(0x16a)]),console[_0x3d02e7(0x134)](_0x3d02e7(0x15f)+(_0x2cafd0[_0x3d02e7(0x169)]||a100_0x1ab77c[_0x3d02e7(0x129)](_0x3d02e7(0x184)))),console[_0x3d02e7(0x134)](_0x3d02e7(0x16e)+(_0x2cafd0[_0x3d02e7(0x14b)]||a100_0x1ab77c[_0x3d02e7(0x129)](_0x3d02e7(0x147))));if(_0x2cafd0[_0x3d02e7(0x13c)])console[_0x3d02e7(0x134)](_0x3d02e7(0x151)+_0x2cafd0[_0x3d02e7(0x13c)]);_0x2cafd0[_0x3d02e7(0x174)]!==_0x3d02e7(0x13e)&&console['log']('\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2cafd0['repairCommand']);console[_0x3d02e7(0x134)](),console[_0x3d02e7(0x134)](a100_0x1ab77c[_0x3d02e7(0x18e)](_0x3d02e7(0x13a))),console[_0x3d02e7(0x134)](a100_0x1ab77c[_0x3d02e7(0x129)](_0x3d02e7(0x155)[_0x3d02e7(0x142)](0x1e)));const _0x377b9a=getGlobalConfigPath(),_0x5a1d30=getProjectConfigPath();console[_0x3d02e7(0x134)](_0x3d02e7(0x153)+(_0x377b9a||a100_0x1ab77c[_0x3d02e7(0x129)](_0x3d02e7(0x147)))),console['log']('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x5a1d30||a100_0x1ab77c[_0x3d02e7(0x129)](_0x3d02e7(0x147)))),console[_0x3d02e7(0x134)](),console['log'](a100_0x1ab77c[_0x3d02e7(0x18e)](_0x3d02e7(0x176))),console['log'](a100_0x1ab77c[_0x3d02e7(0x129)]('\x20\x20─'['repeat'](0x1e)));const _0x1f9a2c=(_0x3c1c2c,_0x1dde74)=>{const _0x2a663e=_0x3d02e7;if(!_0x1dde74){console['log']('\x20\x20'+_0x3c1c2c[_0x2a663e(0x16f)](0x11)+'\x20'+a100_0x1ab77c[_0x2a663e(0x129)]('(no\x20file)'));return;}const _0x4d4200=inspectCliConfigJsonFile(_0x1dde74);if(_0x4d4200[_0x2a663e(0x167)]==='ok')console[_0x2a663e(0x134)]('\x20\x20'+_0x3c1c2c[_0x2a663e(0x16f)](0x11)+'\x20'+a100_0x1ab77c[_0x2a663e(0x14d)](_0x2a663e(0x131)));else{if(_0x4d4200[_0x2a663e(0x167)]===_0x2a663e(0x186))console[_0x2a663e(0x134)]('\x20\x20'+_0x3c1c2c['padEnd'](0x11)+'\x20'+a100_0x1ab77c[_0x2a663e(0x180)](_0x2a663e(0x126)));else _0x4d4200[_0x2a663e(0x167)]==='missing'?console[_0x2a663e(0x134)]('\x20\x20'+_0x3c1c2c[_0x2a663e(0x16f)](0x11)+'\x20'+a100_0x1ab77c[_0x2a663e(0x129)](_0x2a663e(0x191))):(console[_0x2a663e(0x134)]('\x20\x20'+_0x3c1c2c[_0x2a663e(0x16f)](0x11)+'\x20'+a100_0x1ab77c[_0x2a663e(0x194)](_0x2a663e(0x152))),console[_0x2a663e(0x134)]('\x20\x20'+''[_0x2a663e(0x16f)](0x11)+'\x20'+a100_0x1ab77c[_0x2a663e(0x194)](_0x4d4200['message'])));}};_0x1f9a2c(_0x3d02e7(0x12b),_0x377b9a),_0x1f9a2c(_0x3d02e7(0x189),_0x5a1d30);const _0x679c17=loadRawConfigLayers(),_0x566853=[Object[_0x3d02e7(0x17f)]['hasOwnProperty'][_0x3d02e7(0x15a)](_0x679c17[_0x3d02e7(0x17b)],_0x3d02e7(0x185))?_0x3d02e7(0x179):null,Object['prototype']['hasOwnProperty'][_0x3d02e7(0x15a)](_0x679c17[_0x3d02e7(0x12a)],_0x3d02e7(0x185))?_0x3d02e7(0x149):null][_0x3d02e7(0x132)](Boolean);_0x566853[_0x3d02e7(0x145)]>0x0&&(console[_0x3d02e7(0x134)](_0x3d02e7(0x17e)+a100_0x1ab77c[_0x3d02e7(0x180)](_0x3d02e7(0x18c)+_0x566853['join'](_0x3d02e7(0x183))+_0x3d02e7(0x187))),_0x566853[_0x3d02e7(0x16d)](_0x3d02e7(0x149))&&console[_0x3d02e7(0x134)](_0x3d02e7(0x15c)+CLI_BIN_NAME+_0x3d02e7(0x12d)),_0x566853['includes'](_0x3d02e7(0x179))&&console['log'](_0x3d02e7(0x141)+CLI_BIN_NAME+_0x3d02e7(0x140)));console[_0x3d02e7(0x134)](),console[_0x3d02e7(0x134)](a100_0x1ab77c[_0x3d02e7(0x18e)](_0x3d02e7(0x12e))),console['log'](a100_0x1ab77c['gray'](_0x3d02e7(0x155)[_0x3d02e7(0x142)](0x1e))),console[_0x3d02e7(0x134)](_0x3d02e7(0x175)+(_0x3aff25['appCode']||a100_0x1ab77c[_0x3d02e7(0x194)]('(not\x20set)'))),console['log']('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3aff25[_0x3d02e7(0x162)]),console[_0x3d02e7(0x134)]('\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20'+_0x3aff25['locale']),console[_0x3d02e7(0x134)](_0x3d02e7(0x157)+_0x3aff25[_0x3d02e7(0x190)]),console[_0x3d02e7(0x134)](_0x3d02e7(0x15d)+(_0x3aff25[_0x3d02e7(0x17a)]||a100_0x1ab77c[_0x3d02e7(0x129)](_0x3d02e7(0x192)))),console[_0x3d02e7(0x134)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x3aff25[_0x3d02e7(0x125)]||a100_0x1ab77c[_0x3d02e7(0x129)]('(none)'))),console[_0x3d02e7(0x134)](_0x3d02e7(0x13b)+(_0x3aff25[_0x3d02e7(0x14f)]||a100_0x1ab77c[_0x3d02e7(0x129)]('(none)'))),console['log'](_0x3d02e7(0x170)+(_0x3aff25['format']||a100_0x1ab77c[_0x3d02e7(0x129)](_0x3d02e7(0x16c)+DEFAULT_CONFIG_VALUES[_0x3d02e7(0x137)]+')'))),console[_0x3d02e7(0x134)](_0x3d02e7(0x164)+(_0x3aff25[_0x3d02e7(0x16b)]??a100_0x1ab77c['gray']('(default)'))),console[_0x3d02e7(0x134)]('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x3aff25[_0x3d02e7(0x143)]),console['log'](_0x3d02e7(0x165)+_0x3aff25[_0x3d02e7(0x135)]),console['log'](_0x3d02e7(0x182)+(_0x3aff25['cookie']?a100_0x1ab77c['green'](_0x3d02e7(0x15b)+_0x3aff25[_0x3d02e7(0x177)]['length']+')'):_0x67504f?a100_0x1ab77c['green'](_0x3d02e7(0x14a)+_0x67504f['length']+')'):a100_0x1ab77c['gray']('(none)')));const _0x491e16=Object[_0x3d02e7(0x127)](_0x3aff25[_0x3d02e7(0x171)]);if(_0x491e16[_0x3d02e7(0x145)]>0x0){console[_0x3d02e7(0x134)](),console[_0x3d02e7(0x134)](a100_0x1ab77c[_0x3d02e7(0x18e)]('\x20\x20Apps')),console['log'](a100_0x1ab77c['gray'](_0x3d02e7(0x155)[_0x3d02e7(0x142)](0x1e)));for(const _0x4323e4 of _0x491e16){const _0x5e361d=_0x3aff25[_0x3d02e7(0x171)][_0x4323e4],_0x1e5ced=_0x4323e4===_0x3aff25[_0x3d02e7(0x17a)],_0xe5c04d=_0x4323e4===_0x3aff25[_0x3d02e7(0x125)],_0x1791c1=_0xe5c04d?a100_0x1ab77c[_0x3d02e7(0x14d)](_0x3d02e7(0x133)):'',_0x12eb2b=_0x1e5ced?'\x20(default)':'';console[_0x3d02e7(0x134)]('\x20\x20'+_0x4323e4+_0x12eb2b+_0x1791c1),console[_0x3d02e7(0x134)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x5e361d['appcode']);const _0x11c6b6=buildAppDoctorFields(_0x5e361d,{'env':_0x3aff25['env'],'apiDir':_0x3aff25[_0x3d02e7(0x193)][_0x3d02e7(0x190)]||DEFAULT_CONFIG_VALUES[_0x3d02e7(0x190)],'cookie':_0x3aff25[_0x3d02e7(0x177)]||_0x67504f||undefined,'accessKey':_0x3aff25[_0x3d02e7(0x159)]});console[_0x3d02e7(0x134)](_0x3d02e7(0x172)+_0x11c6b6[_0x3d02e7(0x162)][_0x3d02e7(0x156)]+'\x20\x20'+a100_0x1ab77c[_0x3d02e7(0x129)]('('+_0x11c6b6[_0x3d02e7(0x162)]['source']+')')),console[_0x3d02e7(0x134)]('\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20'+_0x11c6b6[_0x3d02e7(0x190)][_0x3d02e7(0x156)]+'\x20\x20'+a100_0x1ab77c[_0x3d02e7(0x129)]('('+_0x11c6b6[_0x3d02e7(0x190)][_0x3d02e7(0x144)]+')'));const _0x511e11=_0x11c6b6['cookie'][_0x3d02e7(0x156)]?a100_0x1ab77c[_0x3d02e7(0x14d)](_0x3d02e7(0x15b)+_0x11c6b6[_0x3d02e7(0x177)][_0x3d02e7(0x156)][_0x3d02e7(0x145)]+')'):a100_0x1ab77c[_0x3d02e7(0x129)](_0x3d02e7(0x192));console[_0x3d02e7(0x134)]('\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'+_0x511e11+'\x20\x20'+a100_0x1ab77c[_0x3d02e7(0x129)]('('+_0x11c6b6['cookie']['source']+')'));const _0x3d2696=_0x11c6b6['accessKey'][_0x3d02e7(0x156)]?a100_0x1ab77c[_0x3d02e7(0x14d)](_0x3d02e7(0x15b)+_0x11c6b6[_0x3d02e7(0x159)][_0x3d02e7(0x156)][_0x3d02e7(0x145)]+')'):a100_0x1ab77c[_0x3d02e7(0x129)]('(none)');console[_0x3d02e7(0x134)]('\x20\x20\x20\x20accessKey:\x20\x20'+_0x3d2696+'\x20\x20'+a100_0x1ab77c[_0x3d02e7(0x129)]('('+_0x11c6b6[_0x3d02e7(0x159)][_0x3d02e7(0x144)]+')'));}}console[_0x3d02e7(0x134)](),console[_0x3d02e7(0x134)](a100_0x1ab77c['bold'](_0x3d02e7(0x14e))),console[_0x3d02e7(0x134)](a100_0x1ab77c[_0x3d02e7(0x129)]('\x20\x20─'[_0x3d02e7(0x142)](0x1e))),console['log'](_0x3d02e7(0x150)+getActiveRegion()),console[_0x3d02e7(0x134)](_0x3d02e7(0x18b)+getApiDomain()),console[_0x3d02e7(0x134)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x3d02e7(0x134)](_0x3d02e7(0x166)+getRuntimeDomain()),console['log'](_0x3d02e7(0x130)+getSkillDomain()),console[_0x3d02e7(0x134)]('\x20\x20kbDomain:\x20\x20\x20\x20\x20\x20\x20\x20'+getKbDomain()),console[_0x3d02e7(0x134)]('\x20\x20appDomain:\x20\x20\x20\x20\x20\x20\x20'+getAppDomain()),console[_0x3d02e7(0x134)](),console['log'](a100_0x1ab77c[_0x3d02e7(0x18e)]('\x20\x20Auth')),console[_0x3d02e7(0x134)](a100_0x1ab77c[_0x3d02e7(0x129)](_0x3d02e7(0x155)[_0x3d02e7(0x142)](0x1e)));if(_0x67504f){const _0x17dad6=await getIsSessionValid();console['log'](_0x3d02e7(0x188)+(_0x17dad6?a100_0x1ab77c['green']('✓\x20Valid'):a100_0x1ab77c['red'](_0x3d02e7(0x168))));}else console[_0x3d02e7(0x134)](_0x3d02e7(0x188)+a100_0x1ab77c[_0x3d02e7(0x194)]('✗\x20Not\x20logged\x20in'));return console[_0x3d02e7(0x134)](),{'ok':!![]};}function a100_0x5f45(_0x45a4ca,_0x37e9f2){_0x45a4ca=_0x45a4ca-0x125;const _0x586530=a100_0x5865();let _0x5f459e=_0x586530[_0x45a4ca];return _0x5f459e;}export const doctorDefinition={'service':'doctor','command':'check','description':'Diagnose\x20CLI\x20configuration\x20and\x20connectivity','risk':a100_0x3b26c2(0x18a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a100_0x556bb5=a100_0x3132;(function(_0x4ed488,_0x5a332c){const _0x45beca=a100_0x3132,_0xd70392=_0x4ed488();while(!![]){try{const _0x320787=-parseInt(_0x45beca(0x1c3))/0x1+-parseInt(_0x45beca(0x1e7))/0x2*(parseInt(_0x45beca(0x1c8))/0x3)+-parseInt(_0x45beca(0x201))/0x4*(-parseInt(_0x45beca(0x1f4))/0x5)+parseInt(_0x45beca(0x209))/0x6*(-parseInt(_0x45beca(0x1b6))/0x7)+parseInt(_0x45beca(0x1dc))/0x8*(parseInt(_0x45beca(0x1cc))/0x9)+parseInt(_0x45beca(0x1d3))/0xa+-parseInt(_0x45beca(0x1b4))/0xb;if(_0x320787===_0x5a332c)break;else _0xd70392['push'](_0xd70392['shift']());}catch(_0x31147a){_0xd70392['push'](_0xd70392['shift']());}}}(a100_0xbfdd,0xf0728));import a100_0x2f8aa7 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,initGlobalEnvironment,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';import{isInvalidLovrabetRegion}from'../constant/region.js';function a100_0x3132(_0xe03f8a,_0x497521){_0xe03f8a=_0xe03f8a-0x191;const _0xbfdd5e=a100_0xbfdd();let _0x31328b=_0xbfdd5e[_0xe03f8a];return _0x31328b;}function describeRegionValue(_0x381f13){const _0x41c35b=a100_0x3132;return typeof _0x381f13===_0x41c35b(0x1a1)?JSON[_0x41c35b(0x1f7)](_0x381f13):'<'+(_0x381f13===null?_0x41c35b(0x20b):typeof _0x381f13)+'>';}async function execute(_0x3a53f7){const _0xb2c5c2=a100_0x3132,_0x38a76c=GIT_COMMIT!==_0xb2c5c2(0x1a2)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0xb2c5c2(0x208)](0x0,0xa)+')':VERSION,_0x493227=buildConfigFromFlags({}),_0x33c929=getCookie();let _0x4189f7;try{await initGlobalEnvironment(_0x493227);}catch(_0xc0105a){_0x4189f7=_0xc0105a instanceof Error?_0xc0105a:new Error(String(_0xc0105a));}console[_0xb2c5c2(0x1ad)](),console[_0xb2c5c2(0x1ad)](a100_0x2f8aa7[_0xb2c5c2(0x199)](CLI_BIN_NAME+_0xb2c5c2(0x1c6))),console[_0xb2c5c2(0x1ad)](a100_0x2f8aa7[_0xb2c5c2(0x1be)]('─'[_0xb2c5c2(0x1f5)](0x32))),console[_0xb2c5c2(0x1ad)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x38a76c),console['log']('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process['version']),console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1b3)+process['platform']+'\x20'+process['arch']);const _0x585c5a=inspectBuiltinSkill();console[_0xb2c5c2(0x1ad)](),console[_0xb2c5c2(0x1ad)](a100_0x2f8aa7[_0xb2c5c2(0x199)]('\x20\x20Built-in\x20Skill')),console[_0xb2c5c2(0x1ad)](a100_0x2f8aa7['gray']('\x20\x20─'['repeat'](0x1e)));const _0x58b00e=_0x585c5a[_0xb2c5c2(0x1dd)]==='current'?a100_0x2f8aa7[_0xb2c5c2(0x1d0)]('✓\x20'+_0x585c5a[_0xb2c5c2(0x1dd)]):a100_0x2f8aa7[_0xb2c5c2(0x196)]('✗\x20'+_0x585c5a['state']);console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1ce)+_0x58b00e),console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1d2)+_0x585c5a['packageVersion']),console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1b9)+(_0x585c5a[_0xb2c5c2(0x1fc)]||a100_0x2f8aa7[_0xb2c5c2(0x1be)](_0xb2c5c2(0x1d6)))),console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x211)+(_0x585c5a[_0xb2c5c2(0x1d9)]||a100_0x2f8aa7[_0xb2c5c2(0x1be)](_0xb2c5c2(0x1c2))));if(_0x585c5a['reason'])console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1ac)+_0x585c5a[_0xb2c5c2(0x1e1)]);_0x585c5a[_0xb2c5c2(0x1dd)]!==_0xb2c5c2(0x1c4)&&console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1e6)+_0x585c5a[_0xb2c5c2(0x20d)]);console[_0xb2c5c2(0x1ad)](),console[_0xb2c5c2(0x1ad)](a100_0x2f8aa7[_0xb2c5c2(0x199)](_0xb2c5c2(0x19d))),console['log'](a100_0x2f8aa7[_0xb2c5c2(0x1be)](_0xb2c5c2(0x1a6)['repeat'](0x1e)));const _0xee1416=getGlobalConfigPath(),_0x4bd1c3=getProjectConfigPath();console['log']('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0xee1416||a100_0x2f8aa7[_0xb2c5c2(0x1be)](_0xb2c5c2(0x1c2)))),console[_0xb2c5c2(0x1ad)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4bd1c3||a100_0x2f8aa7[_0xb2c5c2(0x1be)](_0xb2c5c2(0x1c2)))),console[_0xb2c5c2(0x1ad)](),console['log'](a100_0x2f8aa7[_0xb2c5c2(0x199)](_0xb2c5c2(0x1c9))),console[_0xb2c5c2(0x1ad)](a100_0x2f8aa7['gray']('\x20\x20─'[_0xb2c5c2(0x1f5)](0x1e)));const _0x4b5077=(_0x538290,_0x577243)=>{const _0xd02926=_0xb2c5c2;if(!_0x577243){console['log']('\x20\x20'+_0x538290[_0xd02926(0x1bc)](0x11)+'\x20'+a100_0x2f8aa7[_0xd02926(0x1be)](_0xd02926(0x1bb)));return;}const _0x53c562=inspectCliConfigJsonFile(_0x577243);if(_0x53c562[_0xd02926(0x1ab)]==='ok')console[_0xd02926(0x1ad)]('\x20\x20'+_0x538290[_0xd02926(0x1bc)](0x11)+'\x20'+a100_0x2f8aa7[_0xd02926(0x1d0)](_0xd02926(0x1a9)));else{if(_0x53c562[_0xd02926(0x1ab)]==='empty')console[_0xd02926(0x1ad)]('\x20\x20'+_0x538290[_0xd02926(0x1bc)](0x11)+'\x20'+a100_0x2f8aa7[_0xd02926(0x1ae)](_0xd02926(0x204)));else _0x53c562['status']==='missing'?console['log']('\x20\x20'+_0x538290['padEnd'](0x11)+'\x20'+a100_0x2f8aa7[_0xd02926(0x1be)](_0xd02926(0x198))):(console[_0xd02926(0x1ad)]('\x20\x20'+_0x538290[_0xd02926(0x1bc)](0x11)+'\x20'+a100_0x2f8aa7[_0xd02926(0x196)](_0xd02926(0x1ee))),console[_0xd02926(0x1ad)]('\x20\x20'+''[_0xd02926(0x1bc)](0x11)+'\x20'+a100_0x2f8aa7[_0xd02926(0x196)](_0x53c562[_0xd02926(0x19e)])));}};_0x4b5077('Global',_0xee1416),_0x4b5077(_0xb2c5c2(0x1af),_0x4bd1c3);const _0x28cfd8=loadRawConfigLayers(),_0x562676=[{'label':_0xb2c5c2(0x1af),'value':_0x28cfd8[_0xb2c5c2(0x1e3)][_0xb2c5c2(0x1e2)],'present':Object['prototype'][_0xb2c5c2(0x1c0)][_0xb2c5c2(0x1fb)](_0x28cfd8['projectConfig'],_0xb2c5c2(0x1e2)),'repairCommand':CLI_BIN_NAME+_0xb2c5c2(0x20e)},{'label':'Global','value':_0x28cfd8[_0xb2c5c2(0x195)][_0xb2c5c2(0x1e2)],'present':Object[_0xb2c5c2(0x1a3)]['hasOwnProperty'][_0xb2c5c2(0x1fb)](_0x28cfd8[_0xb2c5c2(0x195)],_0xb2c5c2(0x1e2)),'repairCommand':CLI_BIN_NAME+_0xb2c5c2(0x1f2)}][_0xb2c5c2(0x1b1)](_0x39b2d7=>_0x39b2d7[_0xb2c5c2(0x19a)]&&isInvalidLovrabetRegion(_0x39b2d7['value']));if(_0x562676[_0xb2c5c2(0x1d8)]>0x0){console[_0xb2c5c2(0x1ad)](),console['log'](a100_0x2f8aa7[_0xb2c5c2(0x199)](_0xb2c5c2(0x210))),console['log'](a100_0x2f8aa7[_0xb2c5c2(0x1be)](_0xb2c5c2(0x1a6)[_0xb2c5c2(0x1f5)](0x1e)));for(const _0xafbf70 of _0x562676){console[_0xb2c5c2(0x1ad)]('\x20\x20'+_0xafbf70['label'][_0xb2c5c2(0x1bc)](0x11)+'\x20'+a100_0x2f8aa7[_0xb2c5c2(0x196)](_0xb2c5c2(0x193)+describeRegionValue(_0xafbf70[_0xb2c5c2(0x1f6)]))),console[_0xb2c5c2(0x1ad)]('\x20\x20'+('Repair\x20'+_0xafbf70[_0xb2c5c2(0x20f)][_0xb2c5c2(0x1df)]()+':')['padEnd'](0x10)+'\x20'+_0xafbf70[_0xb2c5c2(0x20d)]);}}const _0x2ce6ce=[Object[_0xb2c5c2(0x1a3)][_0xb2c5c2(0x1c0)]['call'](_0x28cfd8[_0xb2c5c2(0x195)],_0xb2c5c2(0x1f0))?_0xb2c5c2(0x1d7):null,Object['prototype']['hasOwnProperty'][_0xb2c5c2(0x1fb)](_0x28cfd8['projectConfig'],_0xb2c5c2(0x1f0))?_0xb2c5c2(0x19b):null][_0xb2c5c2(0x1b1)](Boolean);_0x2ce6ce[_0xb2c5c2(0x1d8)]>0x0&&(console['log'](_0xb2c5c2(0x192)+a100_0x2f8aa7[_0xb2c5c2(0x1ae)]('ignored\x20in\x20'+_0x2ce6ce[_0xb2c5c2(0x1db)]('\x20+\x20')+_0xb2c5c2(0x194))),_0x2ce6ce[_0xb2c5c2(0x191)]('project')&&console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1fd)+CLI_BIN_NAME+_0xb2c5c2(0x1a0)),_0x2ce6ce[_0xb2c5c2(0x191)](_0xb2c5c2(0x1d7))&&console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x207)+CLI_BIN_NAME+'\x20config\x20delete\x20inherit\x20--global'));const _0x5611da=isInvalidLovrabetRegion(_0x493227[_0xb2c5c2(0x1a5)]?.[_0xb2c5c2(0x1e2)]);_0x4189f7&&!_0x5611da&&(console['log'](),console[_0xb2c5c2(0x1ad)](a100_0x2f8aa7[_0xb2c5c2(0x199)](_0xb2c5c2(0x1e8))),console[_0xb2c5c2(0x1ad)](a100_0x2f8aa7['gray']('\x20\x20─'[_0xb2c5c2(0x1f5)](0x1e))),console[_0xb2c5c2(0x1ad)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a100_0x2f8aa7[_0xb2c5c2(0x196)](_0xb2c5c2(0x19c))),console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1ac)+_0x4189f7[_0xb2c5c2(0x19e)]),Object[_0xb2c5c2(0x1a3)][_0xb2c5c2(0x1c0)][_0xb2c5c2(0x1fb)](_0x28cfd8[_0xb2c5c2(0x1e3)],_0xb2c5c2(0x1ed))&&console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1fa)+CLI_BIN_NAME+_0xb2c5c2(0x213)),Object[_0xb2c5c2(0x1a3)][_0xb2c5c2(0x1c0)][_0xb2c5c2(0x1fb)](_0x28cfd8[_0xb2c5c2(0x195)],_0xb2c5c2(0x1ed))&&console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1ff)+CLI_BIN_NAME+_0xb2c5c2(0x1d5)));console[_0xb2c5c2(0x1ad)](),console[_0xb2c5c2(0x1ad)](a100_0x2f8aa7[_0xb2c5c2(0x199)](_0xb2c5c2(0x206))),console[_0xb2c5c2(0x1ad)](a100_0x2f8aa7['gray']('\x20\x20─'[_0xb2c5c2(0x1f5)](0x1e))),console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1cd)+(_0x493227[_0xb2c5c2(0x1b8)]||a100_0x2f8aa7[_0xb2c5c2(0x196)](_0xb2c5c2(0x1de)))),console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1c1)+_0x493227[_0xb2c5c2(0x1ca)]),console['log'](_0xb2c5c2(0x1a7)+_0x493227[_0xb2c5c2(0x1e5)]),console[_0xb2c5c2(0x1ad)]('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x493227[_0xb2c5c2(0x20c)]),console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1c5)+(_0x493227[_0xb2c5c2(0x1d4)]||a100_0x2f8aa7['gray']('(none)'))),console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1a8)+(_0x493227[_0xb2c5c2(0x203)]||a100_0x2f8aa7[_0xb2c5c2(0x1be)](_0xb2c5c2(0x202)))),console[_0xb2c5c2(0x1ad)]('\x20\x20explicitAppName:\x20'+(_0x493227[_0xb2c5c2(0x1eb)]||a100_0x2f8aa7['gray'](_0xb2c5c2(0x202)))),console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1b2)+(_0x493227['format']||a100_0x2f8aa7[_0xb2c5c2(0x1be)](_0xb2c5c2(0x1fe)+DEFAULT_CONFIG_VALUES['format']+')'))),console['log'](_0xb2c5c2(0x1ea)+(_0x493227['pageSize']??a100_0x2f8aa7[_0xb2c5c2(0x1be)](_0xb2c5c2(0x1b5)))),console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1e0)+_0x493227['riskLevel']),console['log'](_0xb2c5c2(0x1b0)+_0x493227[_0xb2c5c2(0x1aa)]),console[_0xb2c5c2(0x1ad)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x493227['cookie']?a100_0x2f8aa7[_0xb2c5c2(0x1d0)](_0xb2c5c2(0x1f3)+_0x493227['cookie']['length']+')'):_0x33c929?a100_0x2f8aa7[_0xb2c5c2(0x1d0)]('(set\x20via\x20file,\x20length='+_0x33c929[_0xb2c5c2(0x1d8)]+')'):a100_0x2f8aa7[_0xb2c5c2(0x1be)]('(none)')));const _0x5606cd=Object[_0xb2c5c2(0x1f1)](_0x493227[_0xb2c5c2(0x1cb)]);if(_0x5606cd[_0xb2c5c2(0x1d8)]>0x0){console[_0xb2c5c2(0x1ad)](),console[_0xb2c5c2(0x1ad)](a100_0x2f8aa7['bold'](_0xb2c5c2(0x200))),console[_0xb2c5c2(0x1ad)](a100_0x2f8aa7[_0xb2c5c2(0x1be)](_0xb2c5c2(0x1a6)[_0xb2c5c2(0x1f5)](0x1e)));for(const _0x46536c of _0x5606cd){const _0x308712=_0x493227['apps'][_0x46536c],_0x1ff7d5=_0x46536c===_0x493227['defaultApp'],_0x3391ec=_0x46536c===_0x493227['currentApp'],_0x140d46=_0x3391ec?a100_0x2f8aa7[_0xb2c5c2(0x1d0)](_0xb2c5c2(0x1c7)):'',_0x3e68b1=_0x1ff7d5?_0xb2c5c2(0x1e9):'';console[_0xb2c5c2(0x1ad)]('\x20\x20'+_0x46536c+_0x3e68b1+_0x140d46),console['log'](_0xb2c5c2(0x1d1)+_0x308712['appcode']);const _0x4eb0e3=buildAppDoctorFields(_0x308712,{'env':_0x493227[_0xb2c5c2(0x1ca)],'apiDir':_0x493227[_0xb2c5c2(0x1a5)][_0xb2c5c2(0x20c)]||DEFAULT_CONFIG_VALUES[_0xb2c5c2(0x20c)],'cookie':_0x493227[_0xb2c5c2(0x197)]||_0x33c929||undefined,'accessKey':_0x493227[_0xb2c5c2(0x212)]});console[_0xb2c5c2(0x1ad)]('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4eb0e3['env'][_0xb2c5c2(0x1f6)]+'\x20\x20'+a100_0x2f8aa7[_0xb2c5c2(0x1be)]('('+_0x4eb0e3[_0xb2c5c2(0x1ca)][_0xb2c5c2(0x1ec)]+')')),console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x205)+_0x4eb0e3['apiDir']['value']+'\x20\x20'+a100_0x2f8aa7['gray']('('+_0x4eb0e3[_0xb2c5c2(0x20c)]['source']+')'));const _0x4c903a=_0x4eb0e3[_0xb2c5c2(0x197)]['value']?a100_0x2f8aa7[_0xb2c5c2(0x1d0)](_0xb2c5c2(0x1f3)+_0x4eb0e3[_0xb2c5c2(0x197)][_0xb2c5c2(0x1f6)]['length']+')'):a100_0x2f8aa7[_0xb2c5c2(0x1be)](_0xb2c5c2(0x202));console[_0xb2c5c2(0x1ad)]('\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'+_0x4c903a+'\x20\x20'+a100_0x2f8aa7[_0xb2c5c2(0x1be)]('('+_0x4eb0e3['cookie'][_0xb2c5c2(0x1ec)]+')'));const _0x42b8b9=_0x4eb0e3[_0xb2c5c2(0x212)][_0xb2c5c2(0x1f6)]?a100_0x2f8aa7[_0xb2c5c2(0x1d0)](_0xb2c5c2(0x1f3)+_0x4eb0e3[_0xb2c5c2(0x212)][_0xb2c5c2(0x1f6)][_0xb2c5c2(0x1d8)]+')'):a100_0x2f8aa7['gray'](_0xb2c5c2(0x202));console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1bf)+_0x42b8b9+'\x20\x20'+a100_0x2f8aa7[_0xb2c5c2(0x1be)]('('+_0x4eb0e3[_0xb2c5c2(0x212)][_0xb2c5c2(0x1ec)]+')'));}}console['log'](),console[_0xb2c5c2(0x1ad)](a100_0x2f8aa7[_0xb2c5c2(0x199)]('\x20\x20API\x20Endpoints')),console[_0xb2c5c2(0x1ad)](a100_0x2f8aa7[_0xb2c5c2(0x1be)]('\x20\x20─'['repeat'](0x1e)));_0x4189f7?console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1b7)+a100_0x2f8aa7[_0xb2c5c2(0x196)]('Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired')):(console[_0xb2c5c2(0x1ad)]('\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+getActiveRegion()),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0xb2c5c2(0x1ad)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1da)+getRuntimeDomain()),console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1f8)+getSkillDomain()),console['log'](_0xb2c5c2(0x19f)+getKbDomain()),console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1a4)+getAppDomain()));console[_0xb2c5c2(0x1ad)](),console[_0xb2c5c2(0x1ad)](a100_0x2f8aa7[_0xb2c5c2(0x199)](_0xb2c5c2(0x1ba))),console[_0xb2c5c2(0x1ad)](a100_0x2f8aa7['gray']('\x20\x20─'[_0xb2c5c2(0x1f5)](0x1e)));if(_0x4189f7)console[_0xb2c5c2(0x1ad)](_0xb2c5c2(0x1b7)+a100_0x2f8aa7['yellow']('Not\x20checked\x20until\x20routing\x20configuration\x20is\x20repaired'));else{if(_0x33c929){const _0xc00f9c=await getIsSessionValid();console['log'](_0xb2c5c2(0x1b7)+(_0xc00f9c?a100_0x2f8aa7[_0xb2c5c2(0x1d0)](_0xb2c5c2(0x1e4)):a100_0x2f8aa7[_0xb2c5c2(0x196)](_0xb2c5c2(0x1ef))));}else console['log'](_0xb2c5c2(0x1b7)+a100_0x2f8aa7[_0xb2c5c2(0x196)](_0xb2c5c2(0x1cf)));}return console[_0xb2c5c2(0x1ad)](),{'ok':!![]};}function a100_0xbfdd(){const _0x1f45f7=['bold','present','project','✗\x20Invalid','\x20\x20Config\x20Files','message','\x20\x20kbDomain:\x20\x20\x20\x20\x20\x20\x20\x20','\x20config\x20delete\x20inherit','string','unknown','prototype','\x20\x20appDomain:\x20\x20\x20\x20\x20\x20\x20','raw','\x20\x20─','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','verbose','status','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','log','yellow','Project','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','filter','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','6341797UPAOUw','(default)','90139pXSzDy','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','appCode','\x20\x20Skill\x20Version:\x20\x20\x20','\x20\x20Auth','(no\x20file)','padEnd','check','gray','\x20\x20\x20\x20accessKey:\x20\x20','hasOwnProperty','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','1119068ZprxZY','current','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20doctor','\x20←\x20current','39OZzvpE','\x20\x20Config\x20JSON','env','apps','1485xPgJkD','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Not\x20logged\x20in','green','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','\x20\x20Package\x20Version:\x20','9489540haMFwL','defaultApp','\x20config\x20delete\x20routing\x20--global','(unknown)','global','length','installedPath','\x20\x20runtimeDomain:\x20\x20\x20','join','94248vIIJvX','state','(not\x20set)','toLowerCase','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','reason','region','projectConfig','✓\x20Valid','locale','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','234242PEpwWo','\x20\x20Routing\x20Configuration','\x20(default)','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','explicitAppName','source','routing','✗\x20Invalid\x20JSON','✗\x20Expired','inherit','keys','\x20config\x20delete\x20region\x20--global','(set,\x20length=','5AwoGbS','repeat','value','stringify','\x20\x20skillDomain:\x20\x20\x20\x20\x20','doctor','\x20\x20Repair\x20project:\x20\x20','call','skillVersion','\x20\x20Repair\x20project:\x20\x20\x20','(default:\x20','\x20\x20Repair\x20global:\x20\x20\x20','\x20\x20Apps','5755964yPxoxE','(none)','currentApp','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','\x20\x20Repair\x20global:\x20\x20\x20\x20','slice','60ORJpaK','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','null','apiDir','repairCommand','\x20config\x20delete\x20region','label','\x20\x20Country/Region\x20Configuration','\x20\x20Installed\x20Path:\x20\x20','accessKey','\x20config\x20delete\x20routing','includes','\x20\x20Legacy\x20inherit:\x20\x20\x20','✗\x20Invalid\x20','\x20config','globalConfig','red','cookie','(missing)'];a100_0xbfdd=function(){return _0x1f45f7;};return a100_0xbfdd();}export const doctorDefinition={'service':a100_0x556bb5(0x1f9),'command':a100_0x556bb5(0x1bd),'description':a100_0x556bb5(0x20a),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a101_0x2f6abb=a101_0x3704;(function(_0xcfefd,_0x1e66f7){const _0xfcbe6a=a101_0x3704,_0x43e6b5=_0xcfefd();while(!![]){try{const _0x1df33e=-parseInt(_0xfcbe6a(0x97))/0x1*(-parseInt(_0xfcbe6a(0x81))/0x2)+-parseInt(_0xfcbe6a(0x93))/0x3+-parseInt(_0xfcbe6a(0x7a))/0x4+parseInt(_0xfcbe6a(0x8a))/0x5+parseInt(_0xfcbe6a(0x83))/0x6+parseInt(_0xfcbe6a(0x82))/0x7*(parseInt(_0xfcbe6a(0x8c))/0x8)+-parseInt(_0xfcbe6a(0x8f))/0x9;if(_0x1df33e===_0x1e66f7)break;else _0x43e6b5['push'](_0x43e6b5['shift']());}catch(_0x9dfd1a){_0x43e6b5['push'](_0x43e6b5['shift']());}}}(a101_0xc28c,0x66faa));function a101_0xc28c(){const _0x1dd0bb=['long-term','read','1132430BmGYGp','filePath\x20is\x20required.','24xXnsIV','upload','string','5113710JhHIFr','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','Uploaded\x20file:\x20','File','564333qIgCLz','Path\x20to\x20the\x20local\x20file\x20to\x20upload','validation','bool','557GgAECh','trim','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','\x20to\x20development\x20app\x20','boolean','112676fruRFB','str','download','filePath','file','path','Preview:\x20upload\x20','698DgxEJB','1295147sxLVQI','1381980SCnJQr','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','/smartapi/common/uploadFile','appCode','filepath'];a101_0xc28c=function(){return _0x1dd0bb;};return a101_0xc28c();}function a101_0x3704(_0x22bc0a,_0x5c6b2c){_0x22bc0a=_0x22bc0a-0x76;const _0xc28cb8=a101_0xc28c();let _0x37043c=_0xc28cb8[_0x22bc0a];return _0x37043c;}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':a101_0x2f6abb(0x8e),'required':!![],'description':a101_0x2f6abb(0x94)},FILEPATH_FLAG={'name':'filepath','type':a101_0x2f6abb(0x8e),'required':!![],'description':a101_0x2f6abb(0x90)},DOWNLOAD_FLAG={'name':a101_0x2f6abb(0x7c),'type':a101_0x2f6abb(0x79),'description':'Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'},LONG_TERM_FLAG={'name':a101_0x2f6abb(0x88),'type':a101_0x2f6abb(0x79),'description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x10e324){const _0x3cd4cd=a101_0x2f6abb,_0x7dee0e=_0x10e324[_0x3cd4cd(0x76)]();if(!_0x7dee0e)throw CliErrors[_0x3cd4cd(0x95)](_0x3cd4cd(0x8b));return _0x7dee0e;}const fileUpload={'service':a101_0x2f6abb(0x7e),'command':a101_0x2f6abb(0x8d),'description':a101_0x2f6abb(0x77),'risk':a101_0x2f6abb(0x89),'flags':[FILE_FLAG],async 'dryRun'(_0x4586c1){const _0x121046=a101_0x2f6abb,_0x24eef1=requireDevelopmentUploadFile(_0x4586c1[_0x121046(0x7b)](_0x121046(0x7e)),_0x121046(0x92));return{'method':'POST','url':_0x121046(0x85),'body':{'appCode':_0x4586c1[_0x121046(0x86)],'multipart':{'file':_0x24eef1}},'description':_0x121046(0x80)+_0x24eef1[_0x121046(0x7f)]+_0x121046(0x78)+_0x4586c1[_0x121046(0x86)]};},async 'execute'(_0x2e5bd7){const _0x292142=a101_0x2f6abb,_0x3207c5=requireDevelopmentUploadFile(_0x2e5bd7[_0x292142(0x7b)]('file'),_0x292142(0x92)),_0x14c160=await uploadDevelopmentFile(_0x2e5bd7[_0x292142(0x86)],_0x3207c5['path']);return{'ok':!![],'data':_0x14c160,'message':_0x14c160[_0x292142(0x7d)]?_0x292142(0x91)+_0x14c160[_0x292142(0x7d)]+_0x292142(0x84):'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':'file','command':'query-url','description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','risk':a101_0x2f6abb(0x89),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x4e73b9){const _0x1d6ec4=a101_0x2f6abb,_0x1ead92=requireFilePath(_0x4e73b9[_0x1d6ec4(0x7b)](_0x1d6ec4(0x87))),_0x5b5bde=await queryDevelopmentFileUrl(_0x1ead92,{'download':_0x4e73b9[_0x1d6ec4(0x96)]('download'),'longTerm':_0x4e73b9[_0x1d6ec4(0x96)]('long-term')});return{'ok':!![],'data':_0x5b5bde};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x439e77,_0x58a5ca){const _0x17f835=a102_0xc761,_0x3f66da=_0x439e77();while(!![]){try{const _0x2aa1a4=-parseInt(_0x17f835(0x1af))/0x1+-parseInt(_0x17f835(0x1ac))/0x2*(parseInt(_0x17f835(0x1b0))/0x3)+parseInt(_0x17f835(0x1ad))/0x4+-parseInt(_0x17f835(0x1b3))/0x5+-parseInt(_0x17f835(0x1b4))/0x6+-parseInt(_0x17f835(0x1b1))/0x7+parseInt(_0x17f835(0x1b2))/0x8*(parseInt(_0x17f835(0x1ae))/0x9);if(_0x2aa1a4===_0x58a5ca)break;else _0x3f66da['push'](_0x3f66da['shift']());}catch(_0xa9aad4){_0x3f66da['push'](_0x3f66da['shift']());}}}(a102_0x1799,0x878b0));import{issueReport}from'../../commands/issue/report.js';function a102_0x1799(){const _0x486bb6=['2396128bSGaKJ','6688scVMaU','1508265TlgxGD','3981462NsRxix','454218tKykKs','223920DBueQn','23661WtHvRx','163997bpsGjf','3OSioLd'];a102_0x1799=function(){return _0x486bb6;};return a102_0x1799();}function a102_0xc761(_0x1a8156,_0xebb520){_0x1a8156=_0x1a8156-0x1ac;const _0x179913=a102_0x1799();let _0xc761e1=_0x179913[_0x1a8156];return _0xc761e1;}export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a103_0x49650e=a103_0x2495;(function(_0x1db019,_0x3bf513){const _0x320591=a103_0x2495,_0x265ebd=_0x1db019();while(!![]){try{const _0x134756=-parseInt(_0x320591(0x153))/0x1+parseInt(_0x320591(0x155))/0x2*(-parseInt(_0x320591(0x147))/0x3)+-parseInt(_0x320591(0x148))/0x4+parseInt(_0x320591(0x156))/0x5+-parseInt(_0x320591(0x144))/0x6+parseInt(_0x320591(0x14e))/0x7*(parseInt(_0x320591(0x15e))/0x8)+parseInt(_0x320591(0x14a))/0x9;if(_0x134756===_0x3bf513)break;else _0x265ebd['push'](_0x265ebd['shift']());}catch(_0x3b8c4c){_0x265ebd['push'](_0x265ebd['shift']());}}}(a103_0x8989,0x47af5));function a103_0x8989(){const _0x5488ca=['\x20issue\x20report\x20\x5c','118303DAdzTi','command','1074pUTcUY','1135250NNovYO','not_in_project','replace','\x22\x20\x5c','flag_missing','code','message','config_missing','8vutEuW','1934232qUzDqe','issue','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','1047oJqwXk','660220zZrqZO','has','3590046zxYPYX','length','\x20bug?\x20Help\x20us\x20fix\x20it:','service','3225740pEgtab','\x20\x20\x20\x20--title\x20\x22','RABETBASE_DISABLE_ISSUE_NUDGE','validation_error'];a103_0x8989=function(){return _0x5488ca;};return a103_0x8989();}import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a103_0x2495(_0x440867,_0x1623be){_0x440867=_0x440867-0x144;const _0x89890d=a103_0x8989();let _0x24957b=_0x89890d[_0x440867];return _0x24957b;}export const NUDGE_OPT_OUT_ENV=a103_0x49650e(0x150);const NUDGE_SUPPRESSED_CODES=new Set(['cancelled','auth_required',a103_0x49650e(0x15d),a103_0x49650e(0x157),'unknown_command',a103_0x49650e(0x15a),a103_0x49650e(0x151),'network_error']),defaultWriter=_0x54fbbe=>{process['stderr']['write'](_0x54fbbe);};export function shouldNudgeForError(_0x25ff05,_0x4dd0fa){const _0x18584c=a103_0x49650e;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x4dd0fa[_0x18584c(0x14d)]===_0x18584c(0x145)&&_0x4dd0fa[_0x18584c(0x154)]==='report')return![];if(_0x25ff05 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x18584c(0x149)](_0x25ff05[_0x18584c(0x15b)]);return!![];}export function printIssueReportNudgeForError(_0x5abb65,_0x1a6553,_0x1a69bc=defaultWriter){if(!shouldNudgeForError(_0x5abb65,_0x1a6553))return;const _0x3ccf92=buildSuggestedTitle(_0x5abb65,_0x1a6553);_0x1a69bc(formatNudge(_0x3ccf92));}function buildSuggestedTitle(_0xe14c71,_0x5b3591){const _0x4922c1=a103_0x49650e,_0xdbffd8=_0xe14c71 instanceof Error?_0xe14c71[_0x4922c1(0x15c)]:String(_0xe14c71),_0x1b4b13=_0xdbffd8['replace'](/[\r\n]+/g,'\x20')[_0x4922c1(0x158)](/\s+/g,'\x20')['trim']()['slice'](0x0,0x78)[_0x4922c1(0x158)](/"/g,'\x5c\x22'),_0x4e0fb9=CLI_BIN_NAME+'\x20'+_0x5b3591[_0x4922c1(0x14d)]+'\x20'+_0x5b3591[_0x4922c1(0x154)];return _0x1b4b13[_0x4922c1(0x14b)]>0x0?_0x4e0fb9+':\x20'+_0x1b4b13:_0x4e0fb9;}function formatNudge(_0x25a4cb){const _0x4d8f13=a103_0x49650e;return['','Hit\x20a\x20'+CLI_BIN_NAME+_0x4d8f13(0x14c),'\x20\x20'+CLI_BIN_NAME+_0x4d8f13(0x152),_0x4d8f13(0x14f)+_0x25a4cb+_0x4d8f13(0x159),'\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22',_0x4d8f13(0x146),'\x20\x20Set\x20'+NUDGE_OPT_OUT_ENV+'=1\x20to\x20silence\x20this\x20hint.','']['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a104_0x51065c=a104_0x40f2;function a104_0x40f2(_0x278d0f,_0x124688){_0x278d0f=_0x278d0f-0x1dd;const _0x26d7f3=a104_0x26d7();let _0x40f2c6=_0x26d7f3[_0x278d0f];return _0x40f2c6;}(function(_0x2fe223,_0x1f1403){const _0x2a7c8b=a104_0x40f2,_0x58959b=_0x2fe223();while(!![]){try{const _0xfebdfb=-parseInt(_0x2a7c8b(0x1eb))/0x1*(parseInt(_0x2a7c8b(0x1ee))/0x2)+parseInt(_0x2a7c8b(0x20d))/0x3*(-parseInt(_0x2a7c8b(0x1f7))/0x4)+-parseInt(_0x2a7c8b(0x206))/0x5+-parseInt(_0x2a7c8b(0x20a))/0x6+-parseInt(_0x2a7c8b(0x1dd))/0x7*(-parseInt(_0x2a7c8b(0x1fa))/0x8)+-parseInt(_0x2a7c8b(0x1ec))/0x9*(parseInt(_0x2a7c8b(0x211))/0xa)+parseInt(_0x2a7c8b(0x1f3))/0xb;if(_0xfebdfb===_0x1f1403)break;else _0x58959b['push'](_0x58959b['shift']());}catch(_0x53665c){_0x58959b['push'](_0x58959b['shift']());}}}(a104_0x26d7,0x9cf86));import{existsSync}from'node:fs';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=a104_0x51065c(0x1fc);export const issueReport={'service':'issue','command':a104_0x51065c(0x207),'description':'Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','risk':a104_0x51065c(0x1f5),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a104_0x51065c(0x1f1),'flags':[{'name':'title','type':a104_0x51065c(0x1df),'required':!![],'description':a104_0x51065c(0x203)},{'name':'description','type':a104_0x51065c(0x1df),'description':a104_0x51065c(0x1fe)},{'name':DESCRIPTION_FILE_FLAG,'type':a104_0x51065c(0x1df),'description':a104_0x51065c(0x1e7)}],async 'validate'(_0x17c5af){const _0x4ea621=a104_0x51065c,_0x47b992=_0x17c5af[_0x4ea621(0x212)](_0x4ea621(0x216))['trim'](),_0x1f9e5e=_0x17c5af['str'](_0x4ea621(0x205))['trim'](),_0x5d0fa4=_0x17c5af['str'](DESCRIPTION_FILE_FLAG)[_0x4ea621(0x20b)]();if(!_0x47b992)throw CliErrors[_0x4ea621(0x201)](_0x4ea621(0x216),_0x4ea621(0x1f4));const _0x5344e4=_0x1f9e5e[_0x4ea621(0x20e)]>0x0,_0x5227b5=_0x5d0fa4[_0x4ea621(0x20e)]>0x0;if(_0x5344e4===_0x5227b5)throw CliErrors['validation'](_0x4ea621(0x1ea),'Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.');if(_0x5227b5){const _0x1452a2=resolve(process[_0x4ea621(0x1f8)](),_0x5d0fa4);if(!existsSync(_0x1452a2))throw CliErrors[_0x4ea621(0x1e5)]('File\x20not\x20found:\x20'+_0x1452a2);}},async 'dryRun'(_0x1e2137){const _0x2d1a87=a104_0x51065c,_0x10f984=await prepareIssueReport(_0x1e2137);return{'method':_0x2d1a87(0x1e2),'url':_0x2d1a87(0x202)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x10f984['title'],'issue.description':_0x10f984[_0x2d1a87(0x205)],'issue.description_original_bytes':_0x10f984[_0x2d1a87(0x1f2)][_0x2d1a87(0x214)],'issue.description_truncated':_0x10f984[_0x2d1a87(0x1f2)][_0x2d1a87(0x1e0)],'issue.description_redactions':_0x10f984[_0x2d1a87(0x1f2)]['redactionCount'],'issue.description_redaction_kinds':_0x10f984[_0x2d1a87(0x1f2)][_0x2d1a87(0x1fb)][_0x2d1a87(0x1e9)](',')}},'description':[_0x2d1a87(0x1e8),_0x2d1a87(0x1f9)+_0x10f984['descriptionSource'],_0x10f984[_0x2d1a87(0x1f6)]?_0x2d1a87(0x1ff)+_0x10f984['descriptionFilePath']:null,_0x10f984[_0x2d1a87(0x1f2)][_0x2d1a87(0x1e0)]?'truncated:\x20original\x20'+_0x10f984[_0x2d1a87(0x1f2)][_0x2d1a87(0x214)]+_0x2d1a87(0x209):null,_0x10f984[_0x2d1a87(0x1f2)][_0x2d1a87(0x1ed)]>0x0?_0x2d1a87(0x204)+_0x10f984[_0x2d1a87(0x1f2)][_0x2d1a87(0x1ed)]+'\x20('+_0x10f984[_0x2d1a87(0x1f2)][_0x2d1a87(0x1fb)][_0x2d1a87(0x1e9)](',\x20')+')':null][_0x2d1a87(0x1f0)](Boolean)[_0x2d1a87(0x1e9)]('\x0a')};},async 'execute'(_0xc6d058){const _0x251ab0=a104_0x51065c,_0x1f6291=await prepareIssueReport(_0xc6d058);try{await sendPlatformIssueCollectLog({'title':_0x1f6291[_0x251ab0(0x216)],'description':_0x1f6291[_0x251ab0(0x205)],'sanitize':{'originalBytes':_0x1f6291[_0x251ab0(0x1f2)][_0x251ab0(0x214)],'truncated':_0x1f6291[_0x251ab0(0x1f2)][_0x251ab0(0x1e0)],'redactionCount':_0x1f6291[_0x251ab0(0x1f2)][_0x251ab0(0x1ed)],'redactionKinds':_0x1f6291[_0x251ab0(0x1f2)]['redactionKinds']}});}catch(_0x5107f3){throw CliErrors[_0x251ab0(0x1fd)](_0x251ab0(0x1e3)+(_0x5107f3 instanceof Error?_0x5107f3[_0x251ab0(0x1de)]:String(_0x5107f3)),_0x251ab0(0x1e1));}return{'ok':!![],'message':buildResultMessage(_0x1f6291['sanitize']),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x251ab0(0x20c),'issue.description',_0x251ab0(0x208),'issue.description_truncated','issue.description_redactions','issue.description_redaction_kinds'],'issue':{'title':_0x1f6291['title'],'descriptionLength':_0x1f6291[_0x251ab0(0x205)][_0x251ab0(0x20e)],'descriptionSource':_0x1f6291[_0x251ab0(0x200)],..._0x1f6291[_0x251ab0(0x1f6)]?{'descriptionFile':_0x1f6291[_0x251ab0(0x1f6)]}:{},'sanitize':{'originalBytes':_0x1f6291[_0x251ab0(0x1f2)][_0x251ab0(0x214)],'truncated':_0x1f6291['sanitize']['truncated'],'redactions':_0x1f6291[_0x251ab0(0x1f2)]['redactionCount'],'redactionKinds':_0x1f6291[_0x251ab0(0x1f2)][_0x251ab0(0x1fb)]}}}};}};function buildResultMessage(_0x2fd60f){const _0x348ffe=a104_0x51065c,_0xa11539=[];return _0x2fd60f[_0x348ffe(0x1e0)]&&_0xa11539[_0x348ffe(0x1ef)](_0x348ffe(0x1e6)+_0x2fd60f[_0x348ffe(0x214)]+_0x348ffe(0x209)),_0x2fd60f[_0x348ffe(0x1ed)]>0x0&&_0xa11539['push'](_0x348ffe(0x20f)+_0x2fd60f[_0x348ffe(0x1ed)]+_0x348ffe(0x210)+_0x2fd60f['redactionKinds'][_0x348ffe(0x1e9)](',\x20')),_0xa11539[_0x348ffe(0x20e)]===0x0?_0x348ffe(0x1e4):'Platform\x20issue\x20reported\x20('+_0xa11539[_0x348ffe(0x1e9)](';\x20')+')';}function a104_0x26d7(){const _0x415782=['join','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','47qlbhwI','9PRANEo','redactionCount','7658RmtdrA','push','filter','compress','sanitize','5694898gppOly','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','write','descriptionFilePath','97852BmHRVx','cwd','descriptionSource:\x20','8SlqksP','redactionKinds','description-file','apiError','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','descriptionFile:\x20','descriptionSource','flagMissing','otel://','One-line\x20issue\x20summary','redactions:\x20','description','1614575EEahun','report','issue.description_original_bytes','\x20bytes','878592hciIIZ','trim','issue.title','15HueIrh','length','redacted\x20','\x20secret(s):\x20','432050xCTfQY','str','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','originalBytes','Issue\x20description\x20file\x20is\x20empty:\x20','title','utf8','6580434JovNwg','message','string','truncated','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','POST','Failed\x20to\x20report\x20platform\x20issue:\x20','Platform\x20issue\x20reported','validation','truncated\x20from\x20','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter'];a104_0x26d7=function(){return _0x415782;};return a104_0x26d7();}async function prepareIssueReport(_0x33b27d){const _0x27c773=a104_0x51065c,_0x441c23=_0x33b27d[_0x27c773(0x212)](_0x27c773(0x216))[_0x27c773(0x20b)](),_0x57a150=_0x33b27d[_0x27c773(0x212)](_0x27c773(0x205)),_0x54b70c=_0x33b27d['str'](DESCRIPTION_FILE_FLAG)[_0x27c773(0x20b)]();if(!_0x54b70c){const _0x587bbb=_0x57a150;if(!_0x587bbb[_0x27c773(0x20b)]())throw CliErrors['validation']('Issue\x20description\x20cannot\x20be\x20empty.',_0x27c773(0x213));const _0x17e11f=sanitizeIssueDescription(_0x587bbb);return{'title':_0x441c23,'description':_0x17e11f[_0x27c773(0x205)],'descriptionSource':'inline','sanitize':_0x17e11f};}const _0x4deee1=resolve(process[_0x27c773(0x1f8)](),_0x54b70c),_0x4557c2=await readFile(_0x4deee1,_0x27c773(0x217));if(!_0x4557c2['trim']())throw CliErrors[_0x27c773(0x1e5)](_0x27c773(0x215)+_0x4deee1,'Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.');const _0x3b5897=sanitizeIssueDescription(_0x4557c2);return{'title':_0x441c23,'description':_0x3b5897['description'],'descriptionSource':'file','descriptionFilePath':_0x4deee1,'sanitize':_0x3b5897};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a105_0x3f0fbb=a105_0x3ddd;(function(_0x588a46,_0x1e9198){const _0x5a19e6=a105_0x3ddd,_0x280c5a=_0x588a46();while(!![]){try{const _0x11fdeb=-parseInt(_0x5a19e6(0x186))/0x1+parseInt(_0x5a19e6(0x1a0))/0x2+-parseInt(_0x5a19e6(0x18e))/0x3*(-parseInt(_0x5a19e6(0x19e))/0x4)+parseInt(_0x5a19e6(0x198))/0x5*(-parseInt(_0x5a19e6(0x193))/0x6)+-parseInt(_0x5a19e6(0x19a))/0x7*(-parseInt(_0x5a19e6(0x187))/0x8)+-parseInt(_0x5a19e6(0x1a7))/0x9+parseInt(_0x5a19e6(0x199))/0xa;if(_0x11fdeb===_0x1e9198)break;else _0x280c5a['push'](_0x280c5a['shift']());}catch(_0xb48b7f){_0x280c5a['push'](_0x280c5a['shift']());}}}(a105_0x4fa3,0xe6e0e));function a105_0x4fa3(){const _0x4c7747=['pattern','29132xCLBCf','restore','975120ysencC','password','REDACTED:access-key','REDACTED:password','utf8','string','replace','7066044SJLefq','1599575lCgTOZ','16dIMGGH','REDACTED:bearer-jwt','__RB_OSS_ID_','subarray','access-key','label','REDACTED:authorization','483lVIYVT','bearer-jwt','private-key','byteLength','kind','210thfBWU','authorization','REDACTED:cookie','description','push','212845mDhbtQ','20764870QMCEgp','3792859rNPaLp','includes','max'];a105_0x4fa3=function(){return _0x4c7747;};return a105_0x4fa3();}function a105_0x3ddd(_0x236651,_0xd277cd){_0x236651=_0x236651-0x186;const _0x4fa3da=a105_0x4fa3();let _0x3dddcf=_0x4fa3da[_0x236651];return _0x3dddcf;}export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE='\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]',REDACTION_RULES=[{'kind':'cookie','pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a105_0x3f0fbb(0x195)},{'kind':a105_0x3f0fbb(0x194),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a105_0x3f0fbb(0x18d)},{'kind':a105_0x3f0fbb(0x190),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':'REDACTED:private-key'},{'kind':a105_0x3f0fbb(0x18b),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a105_0x3f0fbb(0x1a2)},{'kind':a105_0x3f0fbb(0x1a1),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a105_0x3f0fbb(0x1a3)},{'kind':a105_0x3f0fbb(0x18f),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a105_0x3f0fbb(0x188)}];export function sanitizeIssueDescription(_0x4e4613){const _0x472683=a105_0x3f0fbb,_0x228a90=Buffer['byteLength'](_0x4e4613,_0x472683(0x1a4)),_0x4d8016=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x2ec118=_0x4e4613,_0x4c34c4=0x0;const _0x7ba80a=[];if(!_0x4d8016){const _0x32361e=protectOssAccessKeyIds(_0x2ec118);_0x2ec118=_0x32361e[_0x472683(0x196)];for(const _0x171c99 of REDACTION_RULES){let _0x4e813a=0x0;_0x2ec118=_0x2ec118[_0x472683(0x1a6)](_0x171c99[_0x472683(0x19d)],(_0x2179ed,_0x1625dd)=>{const _0x2e2447=_0x472683;_0x4e813a+=0x1;const _0x47289a=typeof _0x1625dd===_0x2e2447(0x1a5)?_0x1625dd:'';return _0x47289a+'['+_0x171c99[_0x2e2447(0x18c)]+']';}),_0x4e813a>0x0&&(_0x4c34c4+=_0x4e813a,!_0x7ba80a[_0x472683(0x19b)](_0x171c99[_0x472683(0x192)])&&_0x7ba80a[_0x472683(0x197)](_0x171c99[_0x472683(0x192)]));}_0x2ec118=_0x32361e[_0x472683(0x19f)](_0x2ec118);}let _0x20e540=![];if(Buffer[_0x472683(0x191)](_0x2ec118,'utf8')>ISSUE_DESCRIPTION_MAX_BYTES){_0x20e540=!![];const _0x55c3fa=Buffer[_0x472683(0x191)](TRUNCATION_NOTICE,_0x472683(0x1a4)),_0x3149c1=Math[_0x472683(0x19c)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x55c3fa);_0x2ec118=sliceUtf8Bytes(_0x2ec118,_0x3149c1)+TRUNCATION_NOTICE;}return{'description':_0x2ec118,'originalBytes':_0x228a90,'truncated':_0x20e540,'redactionCount':_0x4c34c4,'redactionKinds':_0x7ba80a};}function protectOssAccessKeyIds(_0x2f0873){const _0x1718c9=a105_0x3f0fbb,_0x49cb7a=[],_0x5f0401=_0x2f0873['replace'](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x346dcb,_0x55110d)=>{const _0x5a8f91=a105_0x3ddd,_0x9a08ca=_0x49cb7a[_0x5a8f91(0x197)](_0x346dcb['slice'](_0x55110d['length']))-0x1;return _0x55110d+_0x5a8f91(0x189)+_0x9a08ca+'__';});return{'description':_0x5f0401,'restore':_0x42e72f=>_0x42e72f[_0x1718c9(0x1a6)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x28281e,_0x22e987,_0x196115)=>{const _0x799e36=_0x49cb7a[Number(_0x196115)];return _0x799e36===undefined?_0x28281e:''+_0x22e987+_0x799e36;})};}function sliceUtf8Bytes(_0x3f6d95,_0x5ab094){const _0x258d0c=a105_0x3f0fbb;if(_0x5ab094<=0x0)return'';const _0x401205=Buffer['from'](_0x3f6d95,'utf8');if(_0x401205[_0x258d0c(0x191)]<=_0x5ab094)return _0x3f6d95;let _0x2168ab=_0x5ab094;while(_0x2168ab>0x0){const _0x206aba=_0x401205[_0x2168ab];if(_0x206aba===undefined||(_0x206aba&0xc0)!==0x80)break;_0x2168ab-=0x1;}return _0x401205[_0x258d0c(0x18a)](0x0,_0x2168ab)['toString'](_0x258d0c(0x1a4));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a106_0x4d7b8e=a106_0x191d;function a106_0x2820(){const _0x5a762=['rabetbase\x20kb\x20detail\x20--id\x20','\x20--format\x20compress`\x20before\x20choosing\x20update.','4619668GWZMUA','appCode','company','Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','Company\x20knowledge\x20base\x20','trim','kb_title_required','kb_create_outcome_unknown','verified','32dIBcyd','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','str','171507LCQtFR','50xUyBfy','stringify','26TDxlte','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','\x20--format\x20compress','content','rabetbase\x20kb\x20list\x20--title\x20','40PNHExt','8418825RFDePM','\x20with\x20title\x20','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.','write','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20','/admin/knowledge-base/create','2282874MgGHnu','create','\x20for\x20','7940tZkwsg','string','kb_already_exists','3240etrEjW','3zItXyk','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','byteSize','Knowledge-base\x20title','kb_file_required','title','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.','file','length','kb_verification_failed','87314xdQFvB','contentHash','13639092CTXXrH'];a106_0x2820=function(){return _0x5a762;};return a106_0x2820();}(function(_0x122efc,_0x2876ea){const _0x9dd9bd=a106_0x191d,_0x21fd06=_0x122efc();while(!![]){try{const _0x154b6f=parseInt(_0x9dd9bd(0xd4))/0x1*(-parseInt(_0x9dd9bd(0xc6))/0x2)+-parseInt(_0x9dd9bd(0xee))/0x3*(parseInt(_0x9dd9bd(0xcb))/0x4)+parseInt(_0x9dd9bd(0xea))/0x5*(-parseInt(_0x9dd9bd(0xed))/0x6)+-parseInt(_0x9dd9bd(0xd8))/0x7*(parseInt(_0x9dd9bd(0xe0))/0x8)+parseInt(_0x9dd9bd(0xe1))/0x9+-parseInt(_0x9dd9bd(0xd9))/0xa*(-parseInt(_0x9dd9bd(0xe7))/0xb)+-parseInt(_0x9dd9bd(0xc8))/0xc*(-parseInt(_0x9dd9bd(0xdb))/0xd);if(_0x154b6f===_0x2876ea)break;else _0x21fd06['push'](_0x21fd06['shift']());}catch(_0x5d12d7){_0x21fd06['push'](_0x21fd06['shift']());}}}(a106_0x2820,0xae647));function a106_0x191d(_0x27f042,_0x103090){_0x27f042=_0x27f042-0xc4;const _0x282093=a106_0x2820();let _0x191dc9=_0x282093[_0x27f042];return _0x191dc9;}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=a106_0x4d7b8e(0xe6);function readCreateInput(_0x35ebe0){const _0x27f278=a106_0x4d7b8e,_0x549c46=_0x35ebe0[_0x27f278(0xd7)](_0x27f278(0xf3))['trim']();if(!_0x549c46)throw kbError(_0x27f278(0xd1),'--title\x20is\x20required.');const _0x5de966=_0x35ebe0[_0x27f278(0xd7)](_0x27f278(0xf5))[_0x27f278(0xd0)]();if(!_0x5de966)throw kbError(_0x27f278(0xf2),'--file\x20is\x20required.',_0x27f278(0xe3));return{'title':_0x549c46,'file':_0x5de966};}async function prepareCreate(_0x9b024){const _0x18ad0f=a106_0x4d7b8e,_0x2cea7f=readCreateInput(_0x9b024),_0x1b3817=await readKbFile(_0x2cea7f[_0x18ad0f(0xf5)]),_0x2b9dfe=await fetchAllCompanyKnowledgeBases(_0x9b024,{'title':_0x2cea7f[_0x18ad0f(0xf3)]}),_0x199255=findExactCompanyKnowledgeBases(_0x2b9dfe,_0x9b024[_0x18ad0f(0xcc)],_0x2cea7f[_0x18ad0f(0xf3)]);if(_0x199255['length']>0x0)throw kbError(_0x18ad0f(0xec),_0x18ad0f(0xe5)+_0x9b024[_0x18ad0f(0xcc)]+_0x18ad0f(0xe2)+_0x2cea7f[_0x18ad0f(0xf3)]+'.','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x199255[0x0]['id']+_0x18ad0f(0xca));return{..._0x2cea7f,'content':_0x1b3817};}function plannedAfter(_0x220356,_0x232855){const _0x56101b=a106_0x4d7b8e;return{'scope':_0x56101b(0xcd),'appCode':_0x220356[_0x56101b(0xcc)],'title':_0x232855[_0x56101b(0xf3)],'contentByteSize':_0x232855[_0x56101b(0xde)][_0x56101b(0xf0)],'contentHash':_0x232855[_0x56101b(0xde)]['contentHash']};}function verifyCreatedState(_0xeca4f9,_0x23d2e1,_0x1b6f7f){const _0x178893=a106_0x4d7b8e;assertCompanyKnowledgeBase(_0x1b6f7f,_0xeca4f9[_0x178893(0xcc)],_0x1b6f7f['id']);const _0x7c23c3=inspectKbContent(_0x1b6f7f[_0x178893(0xde)]);if(_0x1b6f7f[_0x178893(0xf3)]!==_0x23d2e1[_0x178893(0xf3)]||_0x7c23c3[_0x178893(0xc7)]!==_0x23d2e1[_0x178893(0xde)]['contentHash'])throw kbError(_0x178893(0xc5),_0x178893(0xcf)+_0x1b6f7f['id']+_0x178893(0xd6),'Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x1b6f7f['id']+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');return projectKb(_0x1b6f7f);}export const kbCreate={'service':'kb','command':a106_0x4d7b8e(0xe8),'description':a106_0x4d7b8e(0xce),'risk':a106_0x4d7b8e(0xe4),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a106_0x4d7b8e(0xf3),'type':a106_0x4d7b8e(0xeb),'required':!![],'description':a106_0x4d7b8e(0xf1)},{'name':a106_0x4d7b8e(0xf5),'type':a106_0x4d7b8e(0xeb),'required':!![],'description':a106_0x4d7b8e(0xd5)}],async 'validate'(_0xc12a64){readCreateInput(_0xc12a64);},async 'dryRun'(_0x6ae3bb){const _0x5b0cef=a106_0x4d7b8e,_0x9375ab=await prepareCreate(_0x6ae3bb);return asDryRunResult({'operation':_0x5b0cef(0xe8),'selector':{'scope':_0x5b0cef(0xcd),'appCode':_0x6ae3bb[_0x5b0cef(0xcc)],'title':_0x9375ab[_0x5b0cef(0xf3)]},'before':null,'after':plannedAfter(_0x6ae3bb,_0x9375ab),'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':_0x5b0cef(0xdf)+JSON[_0x5b0cef(0xda)](_0x9375ab[_0x5b0cef(0xf3)])+'\x20--format\x20compress'}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x25e3e8){const _0x496389=a106_0x4d7b8e,_0x7deec3=await prepareCreate(_0x25e3e8);let _0x50677c,_0x3bd0e8=![];try{const _0x3c95b3=await createEnterpriseKnowledgeBase(_0x25e3e8['cookie'],{'appCode':_0x25e3e8[_0x496389(0xcc)],'title':_0x7deec3[_0x496389(0xf3)],'content':_0x7deec3[_0x496389(0xde)][_0x496389(0xde)]});assertCompanyKnowledgeBase(_0x3c95b3,_0x25e3e8[_0x496389(0xcc)],_0x3c95b3['id']),_0x50677c=_0x3c95b3['id'];}catch(_0x247758){if(!isPlatformTransportFailure(_0x247758))throw _0x247758;_0x3bd0e8=!![];}if(_0x50677c===undefined){const _0x1228b1=await verifyKbMutationReadback(_0x496389(0xe8),!![],()=>fetchAllCompanyKnowledgeBases(_0x25e3e8,{'title':_0x7deec3[_0x496389(0xf3)]})),_0x2d08dc=findExactCompanyKnowledgeBases(_0x1228b1,_0x25e3e8['appCode'],_0x7deec3['title']);if(_0x2d08dc[_0x496389(0xc4)]!==0x1)throw kbError(_0x496389(0xd2),_0x496389(0xdc)+_0x2d08dc[_0x496389(0xc4)]+'.',_0x496389(0xf4));_0x50677c=_0x2d08dc[0x0]['id'];}const _0x4a4bda=await verifyKbMutationReadback(_0x496389(0xe8),_0x3bd0e8,()=>requireKb(_0x25e3e8,_0x50677c)),_0x4f2bda=verifyCreatedState(_0x25e3e8,_0x7deec3,_0x4a4bda),_0x3fb95f=_0x3bd0e8?[_0x496389(0xef)]:[];return{'ok':!![],'data':{'operation':_0x496389(0xe8),'selector':{'id':_0x4f2bda['id'],'scope':_0x496389(0xcd),'appCode':_0x4f2bda[_0x496389(0xcc)]},'before':null,'after':_0x4f2bda,'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':_0x3fb95f,'verification':{'status':_0x496389(0xd3),'recoveredAfterUnknownResponse':_0x3bd0e8,'lookupCommand':_0x496389(0xc9)+_0x4f2bda['id']+_0x496389(0xdd)}},'message':'Created\x20company\x20knowledge\x20base\x20'+_0x4f2bda['id']+_0x496389(0xe9)+_0x4f2bda[_0x496389(0xcc)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a107_0x22d6(){const _0x45c28f=['kb_delete_outcome_unknown','--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20delete\x20contract\x20has\x20no\x20version\x20predicate.','isSafeInteger','6742910zsoQuS','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','117171VWPpnf','344iDHTUs','Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.','97MtfXEU','rabetbase\x20kb\x20detail\x20--id\x20','cookie','/admin/knowledge-base/delete','unshift','5358uWEkwC','number','expected-version','verified','\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made','POST','\x20--format\x20compress','1633845vOSOye','flag','9737fVVhJP','Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.','snapshotHash','already_absent','2642476stKjRD','8896930qKaDqu','Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version','appCode','Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','27014yBJmbx','delete','company','Company\x20knowledge\x20base\x20','kb_verification_failed'];a107_0x22d6=function(){return _0x45c28f;};return a107_0x22d6();}const a107_0x19e247=a107_0x3943;(function(_0x351057,_0x55745c){const _0x42b8c6=a107_0x3943,_0xa8b5de=_0x351057();while(!![]){try{const _0x2dea81=-parseInt(_0x42b8c6(0xe6))/0x1*(-parseInt(_0x42b8c6(0xd9))/0x2)+parseInt(_0x42b8c6(0xce))/0x3+-parseInt(_0x42b8c6(0xd4))/0x4+parseInt(_0x42b8c6(0xe1))/0x5+-parseInt(_0x42b8c6(0xeb))/0x6*(parseInt(_0x42b8c6(0xd0))/0x7)+parseInt(_0x42b8c6(0xe4))/0x8*(parseInt(_0x42b8c6(0xe3))/0x9)+-parseInt(_0x42b8c6(0xd5))/0xa;if(_0x2dea81===_0x55745c)break;else _0xa8b5de['push'](_0xa8b5de['shift']());}catch(_0x4c6c6b){_0xa8b5de['push'](_0xa8b5de['shift']());}}}(a107_0x22d6,0xecfde));function a107_0x3943(_0x1f1afb,_0x551a4d){_0x1f1afb=_0x1f1afb-0xc8;const _0x22d644=a107_0x22d6();let _0x39431c=_0x22d644[_0x1f1afb];return _0x39431c;}import{deleteEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertExpectedKbVersion,getKbOrNull,kbError,projectKb,readKbId,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const DELETE_PATH=a107_0x19e247(0xe9),RAG_WARNING=a107_0x19e247(0xe5),NON_ATOMIC_WARNING=a107_0x19e247(0xdf);function readExpectedVersion(_0x3408ca){const _0x46050e=a107_0x19e247,_0x1009eb=_0x3408ca[_0x46050e(0xcf)](_0x46050e(0xc9));if(_0x1009eb===undefined)return undefined;const _0xa13aa5=Number(_0x1009eb);if(!Number[_0x46050e(0xe0)](_0xa13aa5)||_0xa13aa5<0x0)throw kbError('kb_expected_version_invalid',_0x46050e(0xe2));return _0xa13aa5;}function noOpData(_0x2ee9b6,_0x3ce5b1,_0x2dd37c){const _0x384d10=a107_0x19e247;return{'operation':'no_op','selector':{'id':_0x3ce5b1,'scope':_0x384d10(0xdb),'appCode':_0x2ee9b6[_0x384d10(0xd7)]},'before':null,'after':null,'dryRun':_0x2dd37c,'deleteCalled':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[],'verification':{'status':_0x384d10(0xd3),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}export const kbDelete={'service':'kb','command':a107_0x19e247(0xda),'description':a107_0x19e247(0xd8),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a107_0x19e247(0xc8),'required':!![],'description':'Company\x20knowledge-base\x20id'},{'name':a107_0x19e247(0xc9),'type':a107_0x19e247(0xc8),'required':![],'description':a107_0x19e247(0xd6)}],async 'validate'(_0x179fd6){readKbId(_0x179fd6),readExpectedVersion(_0x179fd6),requireKbExplicitYes(_0x179fd6);},async 'dryRun'(_0x588c7c){const _0x4f6f98=a107_0x19e247,_0x5845c5=readKbId(_0x588c7c),_0x348337=readExpectedVersion(_0x588c7c),_0x1801b4=await getKbOrNull(_0x588c7c,_0x5845c5);if(!_0x1801b4)return asDryRunResult(noOpData(_0x588c7c,_0x5845c5,!![]),{'method':_0x4f6f98(0xcc),'url':DELETE_PATH});assertExpectedKbVersion(_0x1801b4,_0x348337);const _0x7aa96d=projectKb(_0x1801b4),_0x6f171c=[RAG_WARNING];if(_0x348337!==undefined)_0x6f171c['unshift'](NON_ATOMIC_WARNING);return asDryRunResult({'operation':_0x4f6f98(0xda),'selector':{'id':_0x7aa96d['id'],'scope':_0x4f6f98(0xdb),'appCode':_0x7aa96d[_0x4f6f98(0xd7)]},'before':_0x7aa96d,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x6f171c,'verification':{'expectedVersion':_0x348337??null,'atomicCompareAndSet':![],'snapshotHash':_0x7aa96d[_0x4f6f98(0xd2)],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x4f6f98(0xe7)+_0x7aa96d['id']+_0x4f6f98(0xcd)}},{'method':_0x4f6f98(0xcc),'url':DELETE_PATH});},async 'execute'(_0x19aeb0){const _0x172f75=a107_0x19e247;requireKbExplicitYes(_0x19aeb0);const _0x1b2fa3=readKbId(_0x19aeb0),_0xc139e7=readExpectedVersion(_0x19aeb0),_0x29e83e=await getKbOrNull(_0x19aeb0,_0x1b2fa3);if(!_0x29e83e)return{'ok':!![],'data':noOpData(_0x19aeb0,_0x1b2fa3,![]),'message':_0x172f75(0xdc)+_0x1b2fa3+_0x172f75(0xcb)};assertExpectedKbVersion(_0x29e83e,_0xc139e7);const _0x438a04=projectKb(_0x29e83e);let _0x3adebb=![];try{await deleteEnterpriseKnowledgeBase(_0x19aeb0[_0x172f75(0xe8)],_0x1b2fa3);}catch(_0x58c56d){if(!isPlatformTransportFailure(_0x58c56d))throw _0x58c56d;_0x3adebb=!![];}const _0x5bcd0e=await verifyKbMutationReadback(_0x172f75(0xda),_0x3adebb,()=>getKbOrNull(_0x19aeb0,_0x1b2fa3));if(_0x5bcd0e)throw kbError(_0x3adebb?_0x172f75(0xde):_0x172f75(0xdd),'Company\x20knowledge\x20base\x20'+_0x1b2fa3+'\x20remains\x20readable\x20after\x20delete.','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x1b2fa3+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x41add8=[RAG_WARNING];if(_0xc139e7!==undefined)_0x41add8['unshift'](NON_ATOMIC_WARNING);return _0x3adebb&&_0x41add8[_0x172f75(0xea)](_0x172f75(0xd1)),{'ok':!![],'data':{'operation':_0x172f75(0xda),'selector':{'id':_0x438a04['id'],'scope':_0x172f75(0xdb),'appCode':_0x438a04[_0x172f75(0xd7)]},'before':_0x438a04,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':_0x172f75(0xcc),'path':DELETE_PATH},'warnings':_0x41add8,'verification':{'status':_0x172f75(0xca),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0x3adebb,'lookupCommand':_0x172f75(0xe7)+_0x438a04['id']+'\x20--format\x20compress'}},'message':'Soft-deleted\x20company\x20knowledge\x20base\x20'+_0x438a04['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a108_0x554d(_0x20118f,_0x3c1c0d){_0x20118f=_0x20118f-0xd3;const _0xa37efc=a108_0xa37e();let _0x554d37=_0xa37efc[_0x20118f];return _0x554d37;}const a108_0x1a8869=a108_0x554d;(function(_0x49e18f,_0x2d1dcb){const _0x15aaf1=a108_0x554d,_0x2f4720=_0x49e18f();while(!![]){try{const _0x19197e=parseInt(_0x15aaf1(0xdb))/0x1+parseInt(_0x15aaf1(0xda))/0x2*(-parseInt(_0x15aaf1(0xd8))/0x3)+-parseInt(_0x15aaf1(0xd4))/0x4+parseInt(_0x15aaf1(0xd7))/0x5+-parseInt(_0x15aaf1(0xe1))/0x6*(parseInt(_0x15aaf1(0xd9))/0x7)+parseInt(_0x15aaf1(0xdd))/0x8+-parseInt(_0x15aaf1(0xd3))/0x9;if(_0x19197e===_0x2d1dcb)break;else _0x2f4720['push'](_0x2f4720['shift']());}catch(_0x485f64){_0x2f4720['push'](_0x2f4720['shift']());}}}(a108_0xa37e,0x8ab3b));import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';export const kbDetail={'service':'kb','command':a108_0x1a8869(0xdc),'description':a108_0x1a8869(0xd6),'risk':a108_0x1a8869(0xde),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a108_0x1a8869(0xe0),'required':!![],'description':a108_0x1a8869(0xd5)}],async 'validate'(_0x149720){readKbId(_0x149720);},async 'execute'(_0x6a26aa){const _0x4a1bb3=a108_0x1a8869,_0x561e18=readKbId(_0x6a26aa),_0x5d0043=await requireKb(_0x6a26aa,_0x561e18);return{'ok':!![],'data':{'knowledgeBase':projectKb(_0x5d0043)},'message':_0x4a1bb3(0xdf)+_0x561e18};}};function a108_0xa37e(){const _0x2e3886=['6tTJdYF','212604TxczMD','123920SdwzLI','933952ctmVaG','detail','2015496mLEahq','read','Loaded\x20company\x20knowledge\x20base\x20','number','54uqqeCk','3237552SlJPjK','2615548drbyOS','Company\x20knowledge-base\x20id','Show\x20one\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','3965585boRPdX'];a108_0xa37e=function(){return _0x2e3886;};return a108_0xa37e();}
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x48937b,_0x58984c){const _0x43334a=a109_0x1a9f,_0x38d6d2=_0x48937b();while(!![]){try{const _0x183ca6=-parseInt(_0x43334a(0x164))/0x1*(parseInt(_0x43334a(0x163))/0x2)+parseInt(_0x43334a(0x15d))/0x3*(-parseInt(_0x43334a(0x162))/0x4)+-parseInt(_0x43334a(0x15e))/0x5+parseInt(_0x43334a(0x15b))/0x6*(-parseInt(_0x43334a(0x165))/0x7)+parseInt(_0x43334a(0x15c))/0x8*(-parseInt(_0x43334a(0x15a))/0x9)+-parseInt(_0x43334a(0x161))/0xa*(parseInt(_0x43334a(0x160))/0xb)+parseInt(_0x43334a(0x15f))/0xc*(parseInt(_0x43334a(0x159))/0xd);if(_0x183ca6===_0x58984c)break;else _0x38d6d2['push'](_0x38d6d2['shift']());}catch(_0x3d0fa4){_0x38d6d2['push'](_0x38d6d2['shift']());}}}(a109_0x33aa,0x77d47));function a109_0x1a9f(_0x54e6e6,_0x468657){_0x54e6e6=_0x54e6e6-0x159;const _0x33aaf1=a109_0x33aa();let _0x1a9f1a=_0x33aaf1[_0x54e6e6];return _0x1a9f1a;}import{kbList}from'../../commands/kb/list.js';import{kbDetail}from'../../commands/kb/detail.js';import{kbSearch}from'../../commands/kb/search.js';import{kbCreate}from'../../commands/kb/create.js';import{kbUpdate}from'../../commands/kb/update.js';import{kbDelete}from'../../commands/kb/delete.js';export const kbDefinitions=[kbList,kbDetail,kbSearch,kbCreate,kbUpdate,kbDelete];function a109_0x33aa(){const _0x5b766f=['32incxWS','1592289WbJafW','864450RwURKf','24oMuQPx','198lKeOty','485230PFrNTS','4AirkZT','13436jlMbRL','82LaYpSv','56ZQozxr','24016733bGvysA','247437kZFpJQ','724608CKbgVz'];a109_0x33aa=function(){return _0x5b766f;};return a109_0x33aa();}
|
package/lib/commands/kb/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a110_0x4e7864=a110_0x3309;(function(_0x1f1117,_0x3bbb9d){const _0x1f815e=a110_0x3309,_0x5edfe0=_0x1f1117();while(!![]){try{const _0x2e153d=parseInt(_0x1f815e(0x10d))/0x1*(-parseInt(_0x1f815e(0x116))/0x2)+parseInt(_0x1f815e(0x10f))/0x3+-parseInt(_0x1f815e(0x118))/0x4*(-parseInt(_0x1f815e(0x114))/0x5)+parseInt(_0x1f815e(0x112))/0x6+parseInt(_0x1f815e(0x10c))/0x7*(-parseInt(_0x1f815e(0x115))/0x8)+-parseInt(_0x1f815e(0x107))/0x9*(parseInt(_0x1f815e(0x10e))/0xa)+parseInt(_0x1f815e(0x10b))/0xb;if(_0x2e153d===_0x3bbb9d)break;else _0x5edfe0['push'](_0x5edfe0['shift']());}catch(_0x124dc0){_0x5edfe0['push'](_0x5edfe0['shift']());}}}(a110_0x4c4e,0xd48c2));function a110_0x3309(_0x2cd30f,_0x41a5c4){_0x2cd30f=_0x2cd30f-0x107;const _0x4c4e9f=a110_0x4c4e();let _0x330931=_0x4c4e9f[_0x2cd30f];return _0x330931;}import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';export const kbList={'service':'kb','command':'list','description':a110_0x4e7864(0x10a),'risk':a110_0x4e7864(0x113),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a110_0x4e7864(0x110),'type':'string','required':![],'description':'Filter\x20by\x20knowledge-base\x20title'}],async 'execute'(_0x8b329b){const _0x40bccb=a110_0x4e7864,_0x3fd52a=_0x8b329b['str']('title')[_0x40bccb(0x117)](),_0x282eb2=await fetchAllCompanyKnowledgeBases(_0x8b329b,{..._0x3fd52a?{'title':_0x3fd52a}:{}}),_0xc07939=_0x282eb2[_0x40bccb(0x108)](projectKb);return{'ok':!![],'data':{'total':_0xc07939[_0x40bccb(0x109)],'knowledgeBases':_0xc07939},'message':_0x40bccb(0x111)+_0xc07939[_0x40bccb(0x109)]+'\x20company\x20knowledge\x20base(s)\x20for\x20'+_0x8b329b['appCode']};}};function a110_0x4c4e(){const _0x39378f=['2248zbYCJn','402348TDGLFA','trim','4koBYhy','10866942NmvlQd','map','length','List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app','10171447mkYNbC','42931eGGuqV','6LQyDcQ','10kFbFgy','2999262dPSZzs','title','Found\x20','9856092gANVFW','read','7206680EfXFvC'];a110_0x4c4e=function(){return _0x39378f;};return a110_0x4c4e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a111_0xa2eb(){const _0x1acf08=['flag','\x20company/public\x20knowledge\x20hit(s)\x20for\x20','num','query','Maximum\x20number\x20of\x20knowledge\x20hits\x20to\x20return','appCode','number','2637mXwptJ','642775QjQuvY','isSafeInteger','topk','cookie','680VSFUFD','6189840mlkUHn','36fCGcjj','810201tuJEyF','signal','131265QlYmSe','trim','total','16bWPGYf','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','2166656bCOnyH','Search\x20company\x20and\x20public\x20knowledge\x20for\x20the\x20resolved\x20app','708HYMtOl','18878508XiQXci','search','Found\x20','str','string','validation'];a111_0xa2eb=function(){return _0x1acf08;};return a111_0xa2eb();}const a111_0x4978b8=a111_0x5d37;(function(_0xd3ad94,_0xd2870f){const _0x3217c0=a111_0x5d37,_0x48a128=_0xd3ad94();while(!![]){try{const _0x2c281e=parseInt(_0x3217c0(0x1dc))/0x1*(-parseInt(_0x3217c0(0x1ce))/0x2)+parseInt(_0x3217c0(0x1e4))/0x3*(parseInt(_0x3217c0(0x1e9))/0x4)+-parseInt(_0x3217c0(0x1e2))/0x5+parseInt(_0x3217c0(0x1e3))/0x6*(-parseInt(_0x3217c0(0x1dd))/0x7)+-parseInt(_0x3217c0(0x1eb))/0x8+parseInt(_0x3217c0(0x1e6))/0x9*(parseInt(_0x3217c0(0x1e1))/0xa)+parseInt(_0x3217c0(0x1cf))/0xb;if(_0x2c281e===_0xd2870f)break;else _0x48a128['push'](_0x48a128['shift']());}catch(_0x3b4dcc){_0x48a128['push'](_0x48a128['shift']());}}}(a111_0xa2eb,0xc2194));import{searchDevelopmentKnowledge}from'../../core/kb-search-client.js';function a111_0x5d37(_0x5c3bed,_0x4b8d65){_0x5c3bed=_0x5c3bed-0x1cd;const _0xa2eb61=a111_0xa2eb();let _0x5d37f7=_0xa2eb61[_0x5c3bed];return _0x5d37f7;}import{CliErrors}from'../../errors.js';function readSearchQuery(_0x29b526){const _0x103dd3=a111_0x5d37,_0x1f508f=_0x29b526[_0x103dd3(0x1d2)](_0x103dd3(0x1d8))[_0x103dd3(0x1e7)]();if(!_0x1f508f)throw CliErrors['validation']('Search\x20query\x20is\x20required.');return _0x1f508f;}function readSearchTopK(_0x27b78d){const _0x6ab0ab=a111_0x5d37,_0x4e7b6c=_0x27b78d[_0x6ab0ab(0x1d5)](_0x6ab0ab(0x1df));if(_0x4e7b6c===undefined||_0x4e7b6c===null||_0x4e7b6c==='')return undefined;const _0x578529=_0x27b78d[_0x6ab0ab(0x1d7)](_0x6ab0ab(0x1df));if(!Number[_0x6ab0ab(0x1de)](_0x578529)||_0x578529<0x1||_0x578529>0x32)throw CliErrors[_0x6ab0ab(0x1d4)](_0x6ab0ab(0x1ea));return _0x578529;}export const kbSearch={'service':'kb','command':a111_0x4978b8(0x1d0),'description':a111_0x4978b8(0x1cd),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'query','type':a111_0x4978b8(0x1d3),'required':!![],'description':'Company\x20and\x20public\x20knowledge\x20search\x20query'},{'name':a111_0x4978b8(0x1df),'type':a111_0x4978b8(0x1db),'required':![],'description':a111_0x4978b8(0x1d9)}],async 'validate'(_0x391807){readSearchQuery(_0x391807),readSearchTopK(_0x391807);},async 'execute'(_0x4cb966){const _0x427a9c=a111_0x4978b8,_0x27eac5=readSearchQuery(_0x4cb966),_0x1d493a=readSearchTopK(_0x4cb966),_0x428056=await searchDevelopmentKnowledge({'cookie':_0x4cb966[_0x427a9c(0x1e0)],'query':_0x27eac5,'appCode':_0x4cb966[_0x427a9c(0x1da)],..._0x1d493a!==undefined?{'topK':_0x1d493a}:{},'signal':_0x4cb966[_0x427a9c(0x1e5)]});return{'ok':!![],'data':_0x428056,'message':_0x427a9c(0x1d1)+_0x428056[_0x427a9c(0x1e8)]+_0x427a9c(0x1d6)+_0x4cb966['appCode']};}};
|