@lovrabet/rabetbase-cli 2.5.1-beta.4 → 2.5.1-beta.5
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 +37 -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/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.d.ts +0 -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 +16 -13
- 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 +4 -4
- package/skills/rabetbase/references/rabetbase-doctor.md +2 -1
- package/skills/rabetbase/references/rabetbase-init.md +32 -8
- package/skills/rabetbase/references/rabetbase-kb.md +7 -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 +49 -0
- package/skills/rabetbase.manifest.json +5 -3
- package/lib/config/project-routing.d.ts +0 -30
- package/lib/config/project-routing.js +0 -1
- package/lib/core/kb-search-client.d.ts +0 -30
- package/lib/core/kb-search-client.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0xfe0c01=a99_0x5c90;(function(_0x1067d0,_0x590250){const _0x41e7d3=a99_0x5c90,_0x133e70=_0x1067d0();while(!![]){try{const _0x1f8ac9=parseInt(_0x41e7d3(0x193))/0x1*(parseInt(_0x41e7d3(0x181))/0x2)+-parseInt(_0x41e7d3(0x183))/0x3+-parseInt(_0x41e7d3(0x19b))/0x4*(-parseInt(_0x41e7d3(0x1bf))/0x5)+-parseInt(_0x41e7d3(0x1a4))/0x6+parseInt(_0x41e7d3(0x188))/0x7+-parseInt(_0x41e7d3(0x19f))/0x8+-parseInt(_0x41e7d3(0x19c))/0x9*(-parseInt(_0x41e7d3(0x1a3))/0xa);if(_0x1f8ac9===_0x590250)break;else _0x133e70['push'](_0x133e70['shift']());}catch(_0x3aadaf){_0x133e70['push'](_0x133e70['shift']());}}}(a99_0x4535,0xe0cc7));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';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=a99_0xfe0c01(0x1b3),TARGET_ENVS=[a99_0xfe0c01(0x1b6),a99_0xfe0c01(0x1ac),'pre','prod'],SYNC_TYPES=[a99_0xfe0c01(0x1ba),a99_0xfe0c01(0x1ad),a99_0xfe0c01(0x18e)],DB_ID_FLAG={'name':a99_0xfe0c01(0x1a1),'type':a99_0xfe0c01(0x1c2),'required':!![],'description':a99_0xfe0c01(0x1c0)},TARGET_ENV_FLAG={'name':a99_0xfe0c01(0x180),'type':a99_0xfe0c01(0x1a5),'enum':[...TARGET_ENVS],'description':'Deployment\x20target\x20selected\x20by\x20the\x20server-side\x20environment\x20mapping'},DIRECT_FLAG={'name':a99_0xfe0c01(0x1be),'type':a99_0xfe0c01(0x185),'description':a99_0xfe0c01(0x194)},TYPE_FLAG={'name':a99_0xfe0c01(0x1b7),'type':a99_0xfe0c01(0x1a5),'required':!![],'enum':[...SYNC_TYPES],'description':'Metadata\x20type\x20to\x20synchronize'},CODES_FLAG={'name':a99_0xfe0c01(0x1b0),'type':a99_0xfe0c01(0x1a5),'required':!![],'description':a99_0xfe0c01(0x1b4)},CONFIRM_FLAG={'name':a99_0xfe0c01(0x1aa),'type':'boolean','description':a99_0xfe0c01(0x1b5)};export const deploymentSync={'service':'deployment','command':a99_0xfe0c01(0x17c),'description':a99_0xfe0c01(0x1ab),'risk':a99_0xfe0c01(0x18c),'structuredErrors':!![],'confirmationDescription':a99_0xfe0c01(0x190),'flags':[DB_ID_FLAG,TARGET_ENV_FLAG,DIRECT_FLAG,TYPE_FLAG,CODES_FLAG,CONFIRM_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2ada8a){buildSyncPlan(_0x2ada8a);},async 'dryRun'(_0x581f7b){const _0x16edad=a99_0xfe0c01,_0x47cf1b=buildSyncPlan(_0x581f7b);return asDryRunResult(buildOutput(_0x47cf1b,[],!![],_0x16edad(0x1b8)),{'method':_0x16edad(0x179),'url':SYNC_PATH,'description':'Would\x20synchronize\x20'+_0x47cf1b[_0x16edad(0x189)][_0x16edad(0x17a)]['length']+'\x20'+_0x47cf1b[_0x16edad(0x189)][_0x16edad(0x1af)]+_0x16edad(0x1c5)});},async 'execute'(_0x287d1b){const _0x2c8b27=a99_0xfe0c01,_0x15b99c=buildSyncPlan(_0x287d1b);if(!_0x287d1b[_0x2c8b27(0x18d)](_0x2c8b27(0x1aa)))throw CliErrors['validation'](_0x2c8b27(0x1a6),_0x2c8b27(0x178));let _0x31156e;try{_0x31156e=(await syncDeploymentMetadata(_0x15b99c[_0x2c8b27(0x189)]))[_0x2c8b27(0x192)];}catch(_0x37af72){if(!isPlatformTransportFailure(_0x37af72))throw _0x37af72;const _0x11c656=new CliError('deployment_sync_outcome_unknown',0x2,_0x2c8b27(0x1a8),_0x2c8b27(0x1bc));attachErrorData(_0x11c656,buildOutput(_0x15b99c,[],![],_0x2c8b27(0x176)));throw _0x11c656;}const _0x76c7c4=_0x31156e[_0x2c8b27(0x1c1)](_0x23bdb=>_0x23bdb[_0x2c8b27(0x17f)]===_0x2c8b27(0x17d)),_0x3e2700=_0x76c7c4['length']>0x0?_0x2c8b27(0x19d):_0x2c8b27(0x195),_0x122396=buildOutput(_0x15b99c,_0x31156e,![],_0x3e2700);if(_0x76c7c4[_0x2c8b27(0x1c4)]>0x0){const _0xbe5e73=new CliError('deployment_sync_partial_failure',0x1,'Deployment\x20sync\x20completed\x20with\x20'+_0x76c7c4[_0x2c8b27(0x1c4)]+'/'+_0x31156e['length']+_0x2c8b27(0x17e),_0x2c8b27(0x177));attachErrorData(_0xbe5e73,_0x122396);throw _0xbe5e73;}return{'ok':!![],'data':_0x122396,'message':'Synchronized\x20'+_0x31156e[_0x2c8b27(0x1c4)]+_0x2c8b27(0x1b9)};}};function a99_0x5c90(_0xcc21c,_0x1eb3a6){_0xcc21c=_0xcc21c-0x175;const _0x4535f1=a99_0x4535();let _0x5c908f=_0x4535f1[_0xcc21c];return _0x5c908f;}function buildSyncPlan(_0x2e06b2){const _0x210bff=a99_0xfe0c01,_0x7f35b9=_0x2e06b2[_0x210bff(0x1ae)](_0x210bff(0x1a1));if(!Number['isSafeInteger'](_0x7f35b9)||_0x7f35b9<=0x0)throw CliErrors[_0x210bff(0x1c3)](_0x210bff(0x182));const _0x754ae6=_0x2e06b2['str'](_0x210bff(0x180))[_0x210bff(0x196)](),_0x7f3024=_0x2e06b2[_0x210bff(0x18d)](_0x210bff(0x1be));if(Boolean(_0x754ae6)===_0x7f3024)throw CliErrors[_0x210bff(0x1c3)](_0x210bff(0x186));if(_0x754ae6&&!TARGET_ENVS['includes'](_0x754ae6))throw CliErrors[_0x210bff(0x1c3)](_0x210bff(0x19a)+TARGET_ENVS['join'](',\x20')+'.');const _0x310359=_0x2e06b2['str'](_0x210bff(0x1b7))[_0x210bff(0x196)]();if(!SYNC_TYPES[_0x210bff(0x197)](_0x310359))throw CliErrors['validation'](_0x210bff(0x191)+SYNC_TYPES['join'](',\x20')+'.');const _0x883e2f=normalizeCodes(_0x2e06b2[_0x210bff(0x18f)]('codes'));if(_0x883e2f['length']===0x0)throw CliErrors[_0x210bff(0x1c3)](_0x210bff(0x199));if(_0x883e2f['length']>0x64)throw CliErrors[_0x210bff(0x1c3)](_0x210bff(0x198));const _0x5c423a={'appCode':_0x2e06b2[_0x210bff(0x184)],'dbLinkId':_0x7f35b9,..._0x754ae6?{'env':_0x754ae6}:{},'bizType':_0x310359,'bizCodes':_0x883e2f},_0x29adad=[_0x210bff(0x18a),_0x210bff(0x17b)];return _0x310359==='dataset'&&_0x29adad[_0x210bff(0x1a2)](_0x210bff(0x187)),{'input':_0x5c423a,'selector':{'appCode':_0x2e06b2[_0x210bff(0x184)],'dbLinkId':_0x7f35b9,'targetMode':_0x754ae6?'environment':_0x210bff(0x1be),..._0x754ae6?{'targetEnv':_0x754ae6}:{},'bizType':_0x310359,'bizCodes':_0x883e2f},'warnings':_0x29adad};}function normalizeCodes(_0x261caa){const _0x29af98=a99_0xfe0c01;return[...new Set(_0x261caa['split'](',')[_0x29af98(0x18b)](_0x5dd735=>_0x5dd735['trim']())[_0x29af98(0x1c1)](Boolean))];}function buildOutput(_0x213360,_0x5b0a56,_0xb7b3ac,_0x4292ad){const _0x593845=a99_0xfe0c01,_0x2b9079=_0x4292ad===_0x593845(0x195)||_0x4292ad===_0x593845(0x19d),_0x54c35a=_0x5b0a56[_0x593845(0x1b2)]((_0x370c49,_0x365ed5)=>{const _0x429fa2=_0x593845;return _0x370c49[_0x365ed5[_0x429fa2(0x17f)]]=(_0x370c49[_0x365ed5[_0x429fa2(0x17f)]]??0x0)+0x1,_0x370c49;},{});return{'operation':_0x593845(0x175),'selector':_0x213360[_0x593845(0x1a7)],'before':null,'after':null,'dryRun':_0xb7b3ac,'backend':{'submitted':_0x4292ad!==_0x593845(0x1b8),'method':_0x593845(0x179),'path':SYNC_PATH,'outcome':_0x4292ad,'body':_0x213360[_0x593845(0x189)]},'summary':{'requested':_0x213360[_0x593845(0x189)][_0x593845(0x17a)][_0x593845(0x1c4)],'total':_0x2b9079?_0x5b0a56[_0x593845(0x1c4)]:_0x213360[_0x593845(0x189)][_0x593845(0x17a)][_0x593845(0x1c4)],'created':_0x5b0a56['filter'](_0x3c2956=>_0x3c2956[_0x593845(0x17f)]===_0x593845(0x1b1))['length'],'updated':_0x5b0a56[_0x593845(0x1c1)](_0x40a9b6=>_0x40a9b6[_0x593845(0x17f)]===_0x593845(0x1bd))['length'],'failed':_0x5b0a56[_0x593845(0x1c1)](_0x342e46=>_0x342e46[_0x593845(0x17f)]===_0x593845(0x17d))[_0x593845(0x1c4)],'byAction':_0x54c35a},'items':_0x5b0a56,'verification':{'performed':![],'reason':_0x593845(0x1a9)},'warnings':_0x213360[_0x593845(0x1bb)]};}function a99_0x4535(){const _0x303944=['135oytnTG','partial_failure','data','8567880aZTQcQ','defineProperty','db-id','unshift','528930UeuJxV','6530688AjukXC','string','--confirm\x20is\x20required\x20to\x20synchronize\x20deployment\x20metadata.','selector','Deployment\x20sync\x20response\x20was\x20unavailable;\x20the\x20target\x20outcome\x20is\x20unknown.','target_read_api_unavailable','confirm','Synchronize\x20selected\x20development\x20metadata\x20to\x20a\x20deployment\x20database','test','bff','num','bizType','codes','CREATED','reduce','/smartapi/data-sync/sync','Comma-separated\x20Dataset,\x20Backend\x20Function,\x20or\x20SQL\x20codes\x20(maximum\x20100)','Confirm\x20the\x20target\x20connection\x20and\x20metadata\x20codes','dev','type','not_submitted','\x20deployment\x20metadata\x20item(s).','dataset','warnings','Inspect\x20the\x20target\x20database\x20before\x20retrying.\x20Do\x20not\x20resubmit\x20automatically.','UPDATED','direct','89715sgSkSf','Base\x20dblink\x20ID\x20for\x20direct\x20or\x20server-side\x20environment-mapped\x20deployment\x20sync','filter','number','validation','length','\x20item(s).','deployment_metadata_sync','unknown','Review\x20data.items\x20with\x20--format\x20json\x20or\x20--format\x20compress\x20before\x20deciding\x20whether\x20to\x20retry\x20failed\x20codes.','Run\x20with\x20--dry-run\x20first,\x20verify\x20the\x20target\x20and\x20codes,\x20then\x20add\x20--confirm.','POST','bizCodes','Do\x20not\x20retry\x20automatically\x20when\x20the\x20request\x20outcome\x20is\x20unknown.','sync','FAILED','\x20failed\x20item(s).','action','target-env','4HOCHRn','--db-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','415035XuWwLq','appCode','boolean','Choose\x20exactly\x20one\x20target\x20mode:\x20--target-env\x20or\x20--direct.','Dataset\x20sync\x20may\x20commit\x20the\x20target\x20dblink\x20before\x20item\x20synchronization;\x20that\x20dblink\x20change\x20is\x20not\x20rolled\x20back\x20when\x20later\x20items\x20fail.','3127600hzQYfA','input','Target\x20state\x20is\x20not\x20read\x20back\x20because\x20no\x20target\x20metadata\x20read\x20API\x20is\x20available.','map','write','bool','sql','str','Synchronize\x20selected\x20development\x20metadata\x20into\x20one\x20deployment\x20database\x20connection.','--type\x20must\x20be\x20one\x20of:\x20','items','809749XEaTZV','Use\x20the\x20base\x20dblink\x20connection\x20directly,\x20without\x20environment\x20mapping','succeeded','trim','includes','--codes\x20supports\x20at\x20most\x20100\x20unique\x20codes.','--codes\x20must\x20contain\x20at\x20least\x20one\x20non-blank\x20code.','--target-env\x20must\x20be\x20one\x20of:\x20','80RkRULc'];a99_0x4535=function(){return _0x303944;};return a99_0x4535();}function attachErrorData(_0x451640,_0x3b37b5){const _0x56d942=a99_0xfe0c01;Object[_0x56d942(0x1a0)](_0x451640,_0x56d942(0x19e),{'value':_0x3b37b5,'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_0x26d264=a100_0x8623;(function(_0x43dbd1,_0x2f12a3){const _0x2693e0=a100_0x8623,_0x50ece7=_0x43dbd1();while(!![]){try{const _0x3b3c9f=-parseInt(_0x2693e0(0xbe))/0x1+-parseInt(_0x2693e0(0x98))/0x2+-parseInt(_0x2693e0(0xff))/0x3+-parseInt(_0x2693e0(0xfd))/0x4*(parseInt(_0x2693e0(0xb8))/0x5)+parseInt(_0x2693e0(0xc7))/0x6*(-parseInt(_0x2693e0(0xae))/0x7)+parseInt(_0x2693e0(0x109))/0x8+parseInt(_0x2693e0(0xd1))/0x9;if(_0x3b3c9f===_0x2f12a3)break;else _0x50ece7['push'](_0x50ece7['shift']());}catch(_0x14b1a3){_0x50ece7['push'](_0x50ece7['shift']());}}}(a100_0x202d,0xaea67));import a100_0x1bfd27 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';function a100_0x8623(_0x299524,_0x1df9a3){_0x299524=_0x299524-0x84;const _0x202da2=a100_0x202d();let _0x8623f5=_0x202da2[_0x299524];return _0x8623f5;}import{isInvalidLovrabetRegion}from'../constant/region.js';function describeRegionValue(_0x374029){const _0x33c354=a100_0x8623;return typeof _0x374029===_0x33c354(0x102)?JSON[_0x33c354(0x105)](_0x374029):'<'+(_0x374029===null?_0x33c354(0x8c):typeof _0x374029)+'>';}function a100_0x202d(){const _0x1ad3d8=['\x20\x20Repair\x20global:\x20\x20\x20\x20','\x20\x20kbDomain:\x20\x20\x20\x20\x20\x20\x20\x20','4EszkfO','empty','4277388wFznAM','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','message','string','cookie','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','stringify','accessKey','✗\x20Invalid\x20JSON','unknown','4821336RsHPVc','join','project','\x20\x20appDomain:\x20\x20\x20\x20\x20\x20\x20','env','defaultApp','\x20\x20Installed\x20Path:\x20\x20','status','projectConfig','\x20\x20Country/Region\x20Configuration','current','\x20\x20Skill\x20Version:\x20\x20\x20','null','toLowerCase','call','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','gray','read','filter','\x20\x20Legacy\x20inherit:\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','appCode','state','region','1140808yAsRzK','ignored\x20in\x20','reason','(missing)','Repair\x20','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','includes','global','green','appcode','source','routing','raw','(no\x20file)','version','(not\x20found)','check','910pMzYoe','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','✗\x20Expired','Project','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','repeat','(default:\x20','platform','\x20\x20\x20\x20accessKey:\x20\x20','value','5655710gPJLWD','\x20\x20─','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','✗\x20Not\x20logged\x20in','red','\x20\x20Repair\x20global:\x20\x20\x20','490211BHTzNq','(not\x20set)','\x20\x20Apps','format','⚠\x20Empty\x20(treated\x20as\x20{})','repairCommand','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','57426WMPHZP','\x20config\x20delete\x20region\x20--global','\x20←\x20current','apps','hasOwnProperty','\x20\x20skillDomain:\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','log','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','locale','44770347naAByL','prototype','inherit','\x20\x20explicitAppName:\x20','(set\x20via\x20file,\x20length=','\x20(default)','length','\x20config\x20delete\x20region','installedPath','\x20\x20Config\x20Files','keys','currentApp','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','pageSize','riskLevel','arch','globalConfig','missing','(unknown)','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','yellow','\x20\x20Repair\x20project:\x20\x20\x20','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair\x20project:\x20\x20','bold','doctor','\x20\x20Routing\x20Configuration','padEnd','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','apiDir','label','✗\x20Invalid','verbose','Global','✓\x20Valid','slice','(none)','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20config\x20delete\x20inherit\x20--global','(set,\x20length=','✗\x20Invalid\x20','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'];a100_0x202d=function(){return _0x1ad3d8;};return a100_0x202d();}async function execute(_0x8b5dd7){const _0x20c009=a100_0x8623,_0x274605=GIT_COMMIT!==_0x20c009(0x108)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x20c009(0xf4)](0x0,0xa)+')':VERSION,_0x3e5b8e=buildConfigFromFlags({}),_0x25b0b5=getCookie();let _0x4245cd;try{await initGlobalEnvironment(_0x3e5b8e);}catch(_0x597068){_0x4245cd=_0x597068 instanceof Error?_0x597068:new Error(String(_0x597068));}console['log'](),console[_0x20c009(0xce)](a100_0x1bfd27[_0x20c009(0xe9)](CLI_BIN_NAME+'\x20doctor')),console['log'](a100_0x1bfd27[_0x20c009(0x90)]('─'[_0x20c009(0xb3)](0x32))),console[_0x20c009(0xce)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x274605),console[_0x20c009(0xce)](_0x20c009(0x8f)+process[_0x20c009(0xab)]),console[_0x20c009(0xce)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x20c009(0xb5)]+'\x20'+process[_0x20c009(0xe0)]);const _0x29813f=inspectBuiltinSkill();console[_0x20c009(0xce)](),console['log'](a100_0x1bfd27['bold']('\x20\x20Built-in\x20Skill')),console['log'](a100_0x1bfd27['gray'](_0x20c009(0xb9)[_0x20c009(0xb3)](0x1e)));const _0x3997ae=_0x29813f['state']==='current'?a100_0x1bfd27[_0x20c009(0xa5)]('✓\x20'+_0x29813f[_0x20c009(0x96)]):a100_0x1bfd27[_0x20c009(0xbc)]('✗\x20'+_0x29813f['state']);console['log']('\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3997ae),console[_0x20c009(0xce)]('\x20\x20Package\x20Version:\x20'+_0x29813f['packageVersion']),console['log'](_0x20c009(0x8b)+(_0x29813f['skillVersion']||a100_0x1bfd27[_0x20c009(0x90)](_0x20c009(0xe3)))),console[_0x20c009(0xce)](_0x20c009(0x86)+(_0x29813f[_0x20c009(0xd9)]||a100_0x1bfd27[_0x20c009(0x90)](_0x20c009(0xac))));if(_0x29813f[_0x20c009(0x9a)])console[_0x20c009(0xce)](_0x20c009(0xf6)+_0x29813f[_0x20c009(0x9a)]);_0x29813f[_0x20c009(0x96)]!==_0x20c009(0x8a)&&console[_0x20c009(0xce)](_0x20c009(0xa2)+_0x29813f[_0x20c009(0xc3)]);console[_0x20c009(0xce)](),console['log'](a100_0x1bfd27[_0x20c009(0xe9)](_0x20c009(0xda))),console[_0x20c009(0xce)](a100_0x1bfd27['gray'](_0x20c009(0xb9)[_0x20c009(0xb3)](0x1e)));const _0x84f04a=getGlobalConfigPath(),_0x3eda00=getProjectConfigPath();console['log'](_0x20c009(0xc5)+(_0x84f04a||a100_0x1bfd27[_0x20c009(0x90)](_0x20c009(0xac)))),console[_0x20c009(0xce)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3eda00||a100_0x1bfd27[_0x20c009(0x90)]('(not\x20found)'))),console[_0x20c009(0xce)](),console['log'](a100_0x1bfd27['bold']('\x20\x20Config\x20JSON')),console[_0x20c009(0xce)](a100_0x1bfd27['gray'](_0x20c009(0xb9)[_0x20c009(0xb3)](0x1e)));const _0x2980b5=(_0x4e8fc4,_0x30c7b1)=>{const _0x191673=_0x20c009;if(!_0x30c7b1){console[_0x191673(0xce)]('\x20\x20'+_0x4e8fc4[_0x191673(0xec)](0x11)+'\x20'+a100_0x1bfd27[_0x191673(0x90)](_0x191673(0xaa)));return;}const _0x49d63b=inspectCliConfigJsonFile(_0x30c7b1);if(_0x49d63b[_0x191673(0x87)]==='ok')console[_0x191673(0xce)]('\x20\x20'+_0x4e8fc4['padEnd'](0x11)+'\x20'+a100_0x1bfd27['green'](_0x191673(0xc6)));else{if(_0x49d63b[_0x191673(0x87)]===_0x191673(0xfe))console[_0x191673(0xce)]('\x20\x20'+_0x4e8fc4[_0x191673(0xec)](0x11)+'\x20'+a100_0x1bfd27['yellow'](_0x191673(0xc2)));else _0x49d63b[_0x191673(0x87)]===_0x191673(0xe2)?console[_0x191673(0xce)]('\x20\x20'+_0x4e8fc4[_0x191673(0xec)](0x11)+'\x20'+a100_0x1bfd27[_0x191673(0x90)](_0x191673(0x9b))):(console['log']('\x20\x20'+_0x4e8fc4[_0x191673(0xec)](0x11)+'\x20'+a100_0x1bfd27[_0x191673(0xbc)](_0x191673(0x107))),console[_0x191673(0xce)]('\x20\x20'+''[_0x191673(0xec)](0x11)+'\x20'+a100_0x1bfd27['red'](_0x49d63b[_0x191673(0x101)])));}};_0x2980b5('Global',_0x84f04a),_0x2980b5(_0x20c009(0xb1),_0x3eda00);const _0x2718f0=loadRawConfigLayers(),_0x38851b=[{'label':_0x20c009(0xb1),'value':_0x2718f0['projectConfig'][_0x20c009(0x97)],'present':Object[_0x20c009(0xd2)][_0x20c009(0xcb)][_0x20c009(0x8e)](_0x2718f0[_0x20c009(0x88)],_0x20c009(0x97)),'repairCommand':CLI_BIN_NAME+_0x20c009(0xd8)},{'label':_0x20c009(0xf2),'value':_0x2718f0['globalConfig'][_0x20c009(0x97)],'present':Object[_0x20c009(0xd2)]['hasOwnProperty'][_0x20c009(0x8e)](_0x2718f0[_0x20c009(0xe1)],_0x20c009(0x97)),'repairCommand':CLI_BIN_NAME+_0x20c009(0xc8)}][_0x20c009(0x92)](_0x906370=>_0x906370['present']&&isInvalidLovrabetRegion(_0x906370['value']));if(_0x38851b[_0x20c009(0xd7)]>0x0){console[_0x20c009(0xce)](),console['log'](a100_0x1bfd27['bold'](_0x20c009(0x89))),console[_0x20c009(0xce)](a100_0x1bfd27[_0x20c009(0x90)](_0x20c009(0xb9)[_0x20c009(0xb3)](0x1e)));for(const _0x45ca3b of _0x38851b){console[_0x20c009(0xce)]('\x20\x20'+_0x45ca3b['label']['padEnd'](0x11)+'\x20'+a100_0x1bfd27[_0x20c009(0xbc)](_0x20c009(0xf9)+describeRegionValue(_0x45ca3b[_0x20c009(0xb7)]))),console[_0x20c009(0xce)]('\x20\x20'+(_0x20c009(0x9c)+_0x45ca3b[_0x20c009(0xef)][_0x20c009(0x8d)]()+':')['padEnd'](0x10)+'\x20'+_0x45ca3b[_0x20c009(0xc3)]);}}const _0x1b95a3=[Object[_0x20c009(0xd2)]['hasOwnProperty'][_0x20c009(0x8e)](_0x2718f0[_0x20c009(0xe1)],_0x20c009(0xd3))?_0x20c009(0xa4):null,Object[_0x20c009(0xd2)][_0x20c009(0xcb)][_0x20c009(0x8e)](_0x2718f0[_0x20c009(0x88)],_0x20c009(0xd3))?_0x20c009(0x10b):null][_0x20c009(0x92)](Boolean);_0x1b95a3[_0x20c009(0xd7)]>0x0&&(console[_0x20c009(0xce)](_0x20c009(0x93)+a100_0x1bfd27['yellow'](_0x20c009(0x99)+_0x1b95a3[_0x20c009(0x10a)]('\x20+\x20')+'\x20config')),_0x1b95a3[_0x20c009(0xa3)]('project')&&console[_0x20c009(0xce)](_0x20c009(0xe6)+CLI_BIN_NAME+'\x20config\x20delete\x20inherit'),_0x1b95a3[_0x20c009(0xa3)](_0x20c009(0xa4))&&console[_0x20c009(0xce)](_0x20c009(0xfb)+CLI_BIN_NAME+_0x20c009(0xf7)));const _0x51c3b0=isInvalidLovrabetRegion(_0x3e5b8e['raw']?.[_0x20c009(0x97)]);_0x4245cd&&!_0x51c3b0&&(console['log'](),console[_0x20c009(0xce)](a100_0x1bfd27['bold'](_0x20c009(0xeb))),console[_0x20c009(0xce)](a100_0x1bfd27['gray'](_0x20c009(0xb9)['repeat'](0x1e))),console[_0x20c009(0xce)](_0x20c009(0xcf)+a100_0x1bfd27[_0x20c009(0xbc)](_0x20c009(0xf0))),console['log'](_0x20c009(0xf6)+_0x4245cd[_0x20c009(0x101)]),Object[_0x20c009(0xd2)]['hasOwnProperty'][_0x20c009(0x8e)](_0x2718f0[_0x20c009(0x88)],_0x20c009(0xa8))&&console[_0x20c009(0xce)](_0x20c009(0xe8)+CLI_BIN_NAME+'\x20config\x20delete\x20routing'),Object['prototype'][_0x20c009(0xcb)][_0x20c009(0x8e)](_0x2718f0[_0x20c009(0xe1)],_0x20c009(0xa8))&&console[_0x20c009(0xce)](_0x20c009(0xbd)+CLI_BIN_NAME+'\x20config\x20delete\x20routing\x20--global'));console['log'](),console['log'](a100_0x1bfd27[_0x20c009(0xe9)](_0x20c009(0xa0))),console[_0x20c009(0xce)](a100_0x1bfd27[_0x20c009(0x90)](_0x20c009(0xb9)['repeat'](0x1e))),console[_0x20c009(0xce)](_0x20c009(0x104)+(_0x3e5b8e[_0x20c009(0x95)]||a100_0x1bfd27['red'](_0x20c009(0xbf)))),console['log'](_0x20c009(0xc4)+_0x3e5b8e[_0x20c009(0x84)]),console[_0x20c009(0xce)](_0x20c009(0x9f)+_0x3e5b8e[_0x20c009(0xd0)]),console[_0x20c009(0xce)](_0x20c009(0x9d)+_0x3e5b8e[_0x20c009(0xee)]),console[_0x20c009(0xce)](_0x20c009(0xaf)+(_0x3e5b8e[_0x20c009(0x85)]||a100_0x1bfd27['gray']('(none)'))),console[_0x20c009(0xce)](_0x20c009(0xe4)+(_0x3e5b8e[_0x20c009(0xdc)]||a100_0x1bfd27[_0x20c009(0x90)]('(none)'))),console[_0x20c009(0xce)](_0x20c009(0xd4)+(_0x3e5b8e['explicitAppName']||a100_0x1bfd27['gray'](_0x20c009(0xf5)))),console['log']('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3e5b8e[_0x20c009(0xc1)]||a100_0x1bfd27[_0x20c009(0x90)](_0x20c009(0xb4)+DEFAULT_CONFIG_VALUES[_0x20c009(0xc1)]+')'))),console[_0x20c009(0xce)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3e5b8e[_0x20c009(0xde)]??a100_0x1bfd27[_0x20c009(0x90)]('(default)'))),console[_0x20c009(0xce)](_0x20c009(0xba)+_0x3e5b8e[_0x20c009(0xdf)]),console[_0x20c009(0xce)](_0x20c009(0xdd)+_0x3e5b8e[_0x20c009(0xf1)]),console[_0x20c009(0xce)](_0x20c009(0xed)+(_0x3e5b8e['cookie']?a100_0x1bfd27[_0x20c009(0xa5)]('(set,\x20length='+_0x3e5b8e[_0x20c009(0x103)][_0x20c009(0xd7)]+')'):_0x25b0b5?a100_0x1bfd27[_0x20c009(0xa5)](_0x20c009(0xd5)+_0x25b0b5['length']+')'):a100_0x1bfd27[_0x20c009(0x90)](_0x20c009(0xf5))));const _0x1b51df=Object[_0x20c009(0xdb)](_0x3e5b8e['apps']);if(_0x1b51df[_0x20c009(0xd7)]>0x0){console[_0x20c009(0xce)](),console['log'](a100_0x1bfd27['bold'](_0x20c009(0xc0))),console[_0x20c009(0xce)](a100_0x1bfd27['gray'](_0x20c009(0xb9)['repeat'](0x1e)));for(const _0x36f1b4 of _0x1b51df){const _0x17ae96=_0x3e5b8e[_0x20c009(0xca)][_0x36f1b4],_0xc46d9=_0x36f1b4===_0x3e5b8e['defaultApp'],_0x42d8f8=_0x36f1b4===_0x3e5b8e[_0x20c009(0xdc)],_0x3e4790=_0x42d8f8?a100_0x1bfd27['green'](_0x20c009(0xc9)):'',_0x3bb48f=_0xc46d9?_0x20c009(0xd6):'';console[_0x20c009(0xce)]('\x20\x20'+_0x36f1b4+_0x3bb48f+_0x3e4790),console[_0x20c009(0xce)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x17ae96[_0x20c009(0xa6)]);const _0x73bcf4=buildAppDoctorFields(_0x17ae96,{'env':_0x3e5b8e[_0x20c009(0x84)],'apiDir':_0x3e5b8e[_0x20c009(0xa9)][_0x20c009(0xee)]||DEFAULT_CONFIG_VALUES[_0x20c009(0xee)],'cookie':_0x3e5b8e[_0x20c009(0x103)]||_0x25b0b5||undefined,'accessKey':_0x3e5b8e[_0x20c009(0x106)]});console[_0x20c009(0xce)](_0x20c009(0xe7)+_0x73bcf4[_0x20c009(0x84)][_0x20c009(0xb7)]+'\x20\x20'+a100_0x1bfd27[_0x20c009(0x90)]('('+_0x73bcf4[_0x20c009(0x84)]['source']+')')),console[_0x20c009(0xce)]('\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20'+_0x73bcf4['apiDir'][_0x20c009(0xb7)]+'\x20\x20'+a100_0x1bfd27[_0x20c009(0x90)]('('+_0x73bcf4[_0x20c009(0xee)][_0x20c009(0xa7)]+')'));const _0x7d868e=_0x73bcf4[_0x20c009(0x103)][_0x20c009(0xb7)]?a100_0x1bfd27[_0x20c009(0xa5)](_0x20c009(0xf8)+_0x73bcf4[_0x20c009(0x103)]['value'][_0x20c009(0xd7)]+')'):a100_0x1bfd27[_0x20c009(0x90)](_0x20c009(0xf5));console[_0x20c009(0xce)](_0x20c009(0xfa)+_0x7d868e+'\x20\x20'+a100_0x1bfd27[_0x20c009(0x90)]('('+_0x73bcf4[_0x20c009(0x103)]['source']+')'));const _0x2d0ed0=_0x73bcf4[_0x20c009(0x106)]['value']?a100_0x1bfd27[_0x20c009(0xa5)](_0x20c009(0xf8)+_0x73bcf4['accessKey'][_0x20c009(0xb7)][_0x20c009(0xd7)]+')'):a100_0x1bfd27[_0x20c009(0x90)]('(none)');console[_0x20c009(0xce)](_0x20c009(0xb6)+_0x2d0ed0+'\x20\x20'+a100_0x1bfd27['gray']('('+_0x73bcf4[_0x20c009(0x106)][_0x20c009(0xa7)]+')'));}}console['log'](),console[_0x20c009(0xce)](a100_0x1bfd27['bold'](_0x20c009(0xcd))),console[_0x20c009(0xce)](a100_0x1bfd27[_0x20c009(0x90)](_0x20c009(0xb9)['repeat'](0x1e)));_0x4245cd?console[_0x20c009(0xce)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a100_0x1bfd27[_0x20c009(0xbc)](_0x20c009(0x9e))):(console['log'](_0x20c009(0xb2)+getActiveRegion()),console[_0x20c009(0xce)](_0x20c009(0x100)+getApiDomain()),console['log'](_0x20c009(0xa1)+getUserDomain()),console[_0x20c009(0xce)](_0x20c009(0x94)+getRuntimeDomain()),console[_0x20c009(0xce)](_0x20c009(0xcc)+getSkillDomain()),console[_0x20c009(0xce)](_0x20c009(0xfc)+getKbDomain()),console[_0x20c009(0xce)](_0x20c009(0x10c)+getAppDomain()));console[_0x20c009(0xce)](),console[_0x20c009(0xce)](a100_0x1bfd27[_0x20c009(0xe9)]('\x20\x20Auth')),console['log'](a100_0x1bfd27[_0x20c009(0x90)](_0x20c009(0xb9)[_0x20c009(0xb3)](0x1e)));if(_0x4245cd)console[_0x20c009(0xce)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a100_0x1bfd27[_0x20c009(0xe5)]('Not\x20checked\x20until\x20routing\x20configuration\x20is\x20repaired'));else{if(_0x25b0b5){const _0x25a1c4=await getIsSessionValid();console[_0x20c009(0xce)](_0x20c009(0xcf)+(_0x25a1c4?a100_0x1bfd27['green'](_0x20c009(0xf3)):a100_0x1bfd27['red'](_0x20c009(0xb0))));}else console[_0x20c009(0xce)](_0x20c009(0xcf)+a100_0x1bfd27[_0x20c009(0xbc)](_0x20c009(0xbb)));}return console[_0x20c009(0xce)](),{'ok':!![]};}export const doctorDefinition={'service':a100_0x26d264(0xea),'command':a100_0x26d264(0xad),'description':'Diagnose\x20CLI\x20configuration\x20and\x20connectivity','risk':a100_0x26d264(0x91),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a101_0x31f088=a101_0x405c;(function(_0x4633d9,_0x1f956d){const _0x5ca5c6=a101_0x405c,_0xc15789=_0x4633d9();while(!![]){try{const _0x34d961=-parseInt(_0x5ca5c6(0x9d))/0x1+-parseInt(_0x5ca5c6(0xb0))/0x2*(parseInt(_0x5ca5c6(0x93))/0x3)+parseInt(_0x5ca5c6(0xb3))/0x4*(-parseInt(_0x5ca5c6(0x9b))/0x5)+parseInt(_0x5ca5c6(0xac))/0x6*(-parseInt(_0x5ca5c6(0xb2))/0x7)+-parseInt(_0x5ca5c6(0xa4))/0x8+-parseInt(_0x5ca5c6(0xaf))/0x9*(parseInt(_0x5ca5c6(0x99))/0xa)+parseInt(_0x5ca5c6(0xad))/0xb;if(_0x34d961===_0x1f956d)break;else _0xc15789['push'](_0xc15789['shift']());}catch(_0x3a12f5){_0xc15789['push'](_0xc15789['shift']());}}}(a101_0x5550,0x3fda3));function a101_0x5550(){const _0x2581b6=['file','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','read','filepath','POST','1369360Gerpke','boolean','11755KaspXX','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','76148xcaYJZ','bool','File','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','upload','query-url','string','4089408kmyQXM','filePath','trim','Path\x20to\x20the\x20local\x20file\x20to\x20upload','str','appCode','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','6MOxbuI','23598696BcCKiI','Uploaded\x20file:\x20','27eVXJZR','8DoGdLL','download','1744995ELRbkV','848TPeVBl','long-term','\x20to\x20development\x20app\x20','path','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','103476ZAksBy'];a101_0x5550=function(){return _0x2581b6;};return a101_0x5550();}import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';function a101_0x405c(_0x3c9712,_0x5774a9){_0x3c9712=_0x3c9712-0x92;const _0x55508a=a101_0x5550();let _0x405c48=_0x55508a[_0x3c9712];return _0x405c48;}import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a101_0x31f088(0x94),'type':a101_0x31f088(0xa3),'required':!![],'description':a101_0x31f088(0xa7)},FILEPATH_FLAG={'name':a101_0x31f088(0x97),'type':a101_0x31f088(0xa3),'required':!![],'description':a101_0x31f088(0x92)},DOWNLOAD_FLAG={'name':a101_0x31f088(0xb1),'type':a101_0x31f088(0x9a),'description':a101_0x31f088(0x9c)},LONG_TERM_FLAG={'name':'long-term','type':'boolean','description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0xe833d3){const _0xe9c374=a101_0x31f088,_0x28c74f=_0xe833d3[_0xe9c374(0xa6)]();if(!_0x28c74f)throw CliErrors['validation']('filePath\x20is\x20required.');return _0x28c74f;}const fileUpload={'service':'file','command':a101_0x31f088(0xa1),'description':a101_0x31f088(0xab),'risk':a101_0x31f088(0x96),'flags':[FILE_FLAG],async 'dryRun'(_0x187cc6){const _0x25849b=a101_0x31f088,_0x482665=requireDevelopmentUploadFile(_0x187cc6['str'](_0x25849b(0x94)),_0x25849b(0x9f));return{'method':_0x25849b(0x98),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x187cc6[_0x25849b(0xa9)],'multipart':{'file':_0x482665}},'description':'Preview:\x20upload\x20'+_0x482665[_0x25849b(0xb6)]+_0x25849b(0xb5)+_0x187cc6[_0x25849b(0xa9)]};},async 'execute'(_0x25f225){const _0x4ac664=a101_0x31f088,_0x4c6ace=requireDevelopmentUploadFile(_0x25f225['str'](_0x4ac664(0x94)),'File'),_0x2f0d64=await uploadDevelopmentFile(_0x25f225['appCode'],_0x4c6ace[_0x4ac664(0xb6)]);return{'ok':!![],'data':_0x2f0d64,'message':_0x2f0d64[_0x4ac664(0xa5)]?_0x4ac664(0xae)+_0x2f0d64[_0x4ac664(0xa5)]+_0x4ac664(0xaa):_0x4ac664(0x95)};}},fileQueryUrl={'service':a101_0x31f088(0x94),'command':a101_0x31f088(0xa2),'description':a101_0x31f088(0xa0),'risk':a101_0x31f088(0x96),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x3bf0e7){const _0x5e3af3=a101_0x31f088,_0x2dc930=requireFilePath(_0x3bf0e7[_0x5e3af3(0xa8)](_0x5e3af3(0x97))),_0x468812=await queryDevelopmentFileUrl(_0x2dc930,{'download':_0x3bf0e7[_0x5e3af3(0x9e)](_0x5e3af3(0xb1)),'longTerm':_0x3bf0e7[_0x5e3af3(0x9e)](_0x5e3af3(0xb4))});return{'ok':!![],'data':_0x468812};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a102_0x1ab6(){const _0xeaf468=['135vFIWnr','175yeaTAj','22lIXhDY','39YiUSag','9392bbMczP','2318172RfYalN','941889CZCRXG','161680bMWYHf','40422vNdBUJ','1090pSDCIo','34122nKTbOS','4524JLUuJx','1405cFKBmt'];a102_0x1ab6=function(){return _0xeaf468;};return a102_0x1ab6();}(function(_0x2c6207,_0x2dee04){const _0x24db40=a102_0x4002,_0x50fbd9=_0x2c6207();while(!![]){try{const _0x22b3be=-parseInt(_0x24db40(0xaf))/0x1*(-parseInt(_0x24db40(0xad))/0x2)+-parseInt(_0x24db40(0xa4))/0x3+-parseInt(_0x24db40(0xa9))/0x4*(-parseInt(_0x24db40(0xaa))/0x5)+parseInt(_0x24db40(0xa6))/0x6*(parseInt(_0x24db40(0xac))/0x7)+-parseInt(_0x24db40(0xa5))/0x8*(parseInt(_0x24db40(0xab))/0x9)+parseInt(_0x24db40(0xa7))/0xa*(-parseInt(_0x24db40(0xa8))/0xb)+-parseInt(_0x24db40(0xb0))/0xc*(-parseInt(_0x24db40(0xae))/0xd);if(_0x22b3be===_0x2dee04)break;else _0x50fbd9['push'](_0x50fbd9['shift']());}catch(_0x13cc98){_0x50fbd9['push'](_0x50fbd9['shift']());}}}(a102_0x1ab6,0x34364));function a102_0x4002(_0x2bab9b,_0x592380){_0x2bab9b=_0x2bab9b-0xa4;const _0x1ab6a3=a102_0x1ab6();let _0x400273=_0x1ab6a3[_0x2bab9b];return _0x400273;}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a103_0xf1e8(){const _0x386a11=['11360sBDwdm','7145888ajRwlC','network_error','length','code','2148Mmjqqw','155000pfDvaU','unknown_command','join','not_in_project','2IlioJy','service','2042020MqjlZD','issue','51lgxAIw','auth_required','write','117799SkOgHb','trim','has','\x20\x20\x20\x20--title\x20\x22','\x20issue\x20report\x20\x5c','command','=1\x20to\x20silence\x20this\x20hint.','replace','stderr','9FfGQbX','slice','1379732TSJBBd','\x20bug?\x20Help\x20us\x20fix\x20it:','message','report','flag_missing','RABETBASE_DISABLE_ISSUE_NUDGE','3281572NDbmAY','cancelled','\x20\x20Set\x20','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','2364yFqRvN'];a103_0xf1e8=function(){return _0x386a11;};return a103_0xf1e8();}const a103_0x52e5f3=a103_0x5794;(function(_0x46a431,_0x43b4ae){const _0xad034b=a103_0x5794,_0x165d20=_0x46a431();while(!![]){try{const _0xcc5e59=-parseInt(_0xad034b(0x189))/0x1*(parseInt(_0xad034b(0x177))/0x2)+parseInt(_0xad034b(0x17b))/0x3*(parseInt(_0xad034b(0x173))/0x4)+parseInt(_0xad034b(0x16d))/0x5*(-parseInt(_0xad034b(0x172))/0x6)+-parseInt(_0xad034b(0x168))/0x7+-parseInt(_0xad034b(0x16e))/0x8*(-parseInt(_0xad034b(0x187))/0x9)+-parseInt(_0xad034b(0x179))/0xa+-parseInt(_0xad034b(0x17e))/0xb*(-parseInt(_0xad034b(0x16c))/0xc);if(_0xcc5e59===_0x43b4ae)break;else _0x165d20['push'](_0x165d20['shift']());}catch(_0x786714){_0x165d20['push'](_0x165d20['shift']());}}}(a103_0xf1e8,0xc23a1));import{CliError}from'../../errors.js';function a103_0x5794(_0x563a51,_0x33e55d){_0x563a51=_0x563a51-0x167;const _0xf1e8e=a103_0xf1e8();let _0x579497=_0xf1e8e[_0x563a51];return _0x579497;}import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a103_0x52e5f3(0x167);const NUDGE_SUPPRESSED_CODES=new Set([a103_0x52e5f3(0x169),a103_0x52e5f3(0x17c),'config_missing',a103_0x52e5f3(0x176),a103_0x52e5f3(0x174),a103_0x52e5f3(0x18d),'validation_error',a103_0x52e5f3(0x16f)]),defaultWriter=_0x5c9e1e=>{const _0x25533f=a103_0x52e5f3;process[_0x25533f(0x186)][_0x25533f(0x17d)](_0x5c9e1e);};export function shouldNudgeForError(_0x35e7ae,_0xcc0102){const _0x5e790b=a103_0x52e5f3;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0xcc0102[_0x5e790b(0x178)]===_0x5e790b(0x17a)&&_0xcc0102[_0x5e790b(0x183)]===_0x5e790b(0x18c))return![];if(_0x35e7ae instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x5e790b(0x180)](_0x35e7ae[_0x5e790b(0x171)]);return!![];}export function printIssueReportNudgeForError(_0xb3e4c6,_0x5709f2,_0x25d3a3=defaultWriter){if(!shouldNudgeForError(_0xb3e4c6,_0x5709f2))return;const _0x6ac4bd=buildSuggestedTitle(_0xb3e4c6,_0x5709f2);_0x25d3a3(formatNudge(_0x6ac4bd));}function buildSuggestedTitle(_0x5b3669,_0x4887f0){const _0x4dc455=a103_0x52e5f3,_0x146edf=_0x5b3669 instanceof Error?_0x5b3669[_0x4dc455(0x18b)]:String(_0x5b3669),_0x64ea50=_0x146edf[_0x4dc455(0x185)](/[\r\n]+/g,'\x20')[_0x4dc455(0x185)](/\s+/g,'\x20')[_0x4dc455(0x17f)]()[_0x4dc455(0x188)](0x0,0x78)[_0x4dc455(0x185)](/"/g,'\x5c\x22'),_0x29e991=CLI_BIN_NAME+'\x20'+_0x4887f0['service']+'\x20'+_0x4887f0[_0x4dc455(0x183)];return _0x64ea50[_0x4dc455(0x170)]>0x0?_0x29e991+':\x20'+_0x64ea50:_0x29e991;}function formatNudge(_0x15b599){const _0x535bfc=a103_0x52e5f3;return['','Hit\x20a\x20'+CLI_BIN_NAME+_0x535bfc(0x18a),'\x20\x20'+CLI_BIN_NAME+_0x535bfc(0x182),_0x535bfc(0x181)+_0x15b599+'\x22\x20\x5c','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22',_0x535bfc(0x16b),_0x535bfc(0x16a)+NUDGE_OPT_OUT_ENV+_0x535bfc(0x184),''][_0x535bfc(0x175)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a104_0x1e70(_0x4feb24,_0x1693bd){_0x4feb24=_0x4feb24-0x153;const _0x37d1a8=a104_0x37d1();let _0x1e70be=_0x37d1a8[_0x4feb24];return _0x1e70be;}const a104_0x12047f=a104_0x1e70;(function(_0x1dca25,_0x337cf4){const _0x352fe6=a104_0x1e70,_0x7f1ea3=_0x1dca25();while(!![]){try{const _0xbd9047=parseInt(_0x352fe6(0x181))/0x1+parseInt(_0x352fe6(0x15e))/0x2+-parseInt(_0x352fe6(0x16a))/0x3*(-parseInt(_0x352fe6(0x177))/0x4)+parseInt(_0x352fe6(0x15f))/0x5*(-parseInt(_0x352fe6(0x175))/0x6)+parseInt(_0x352fe6(0x15c))/0x7+parseInt(_0x352fe6(0x182))/0x8*(-parseInt(_0x352fe6(0x163))/0x9)+-parseInt(_0x352fe6(0x188))/0xa*(parseInt(_0x352fe6(0x164))/0xb);if(_0xbd9047===_0x337cf4)break;else _0x7f1ea3['push'](_0x7f1ea3['shift']());}catch(_0x53827b){_0x7f1ea3['push'](_0x7f1ea3['shift']());}}}(a104_0x37d1,0x65eb6));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_0x12047f(0x17d);export const issueReport={'service':a104_0x12047f(0x160),'command':a104_0x12047f(0x166),'description':'Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','risk':a104_0x12047f(0x18c),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a104_0x12047f(0x16d),'flags':[{'name':a104_0x12047f(0x17a),'type':a104_0x12047f(0x15b),'required':!![],'description':a104_0x12047f(0x176)},{'name':a104_0x12047f(0x18b),'type':a104_0x12047f(0x15b),'description':'Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)'},{'name':DESCRIPTION_FILE_FLAG,'type':a104_0x12047f(0x15b),'description':a104_0x12047f(0x179)}],async 'validate'(_0xd32b76){const _0x3aa7a4=a104_0x12047f,_0x20f964=_0xd32b76['str'](_0x3aa7a4(0x17a))[_0x3aa7a4(0x18a)](),_0xcb39c5=_0xd32b76[_0x3aa7a4(0x170)](_0x3aa7a4(0x18b))[_0x3aa7a4(0x18a)](),_0x59a14f=_0xd32b76[_0x3aa7a4(0x170)](DESCRIPTION_FILE_FLAG)[_0x3aa7a4(0x18a)]();if(!_0x20f964)throw CliErrors[_0x3aa7a4(0x157)]('title',_0x3aa7a4(0x161));const _0x113ce2=_0xcb39c5[_0x3aa7a4(0x167)]>0x0,_0x7460fc=_0x59a14f[_0x3aa7a4(0x167)]>0x0;if(_0x113ce2===_0x7460fc)throw CliErrors[_0x3aa7a4(0x184)](_0x3aa7a4(0x186),_0x3aa7a4(0x17c));if(_0x7460fc){const _0x5ae692=resolve(process[_0x3aa7a4(0x17e)](),_0x59a14f);if(!existsSync(_0x5ae692))throw CliErrors[_0x3aa7a4(0x184)]('File\x20not\x20found:\x20'+_0x5ae692);}},async 'dryRun'(_0x40175a){const _0x30a9e8=a104_0x12047f,_0x24528a=await prepareIssueReport(_0x40175a);return{'method':_0x30a9e8(0x18d),'url':_0x30a9e8(0x183)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x24528a[_0x30a9e8(0x17a)],'issue.description':_0x24528a[_0x30a9e8(0x18b)],'issue.description_original_bytes':_0x24528a[_0x30a9e8(0x169)][_0x30a9e8(0x16b)],'issue.description_truncated':_0x24528a[_0x30a9e8(0x169)][_0x30a9e8(0x156)],'issue.description_redactions':_0x24528a['sanitize'][_0x30a9e8(0x154)],'issue.description_redaction_kinds':_0x24528a[_0x30a9e8(0x169)][_0x30a9e8(0x189)][_0x30a9e8(0x153)](',')}},'description':[_0x30a9e8(0x173),'descriptionSource:\x20'+_0x24528a[_0x30a9e8(0x16f)],_0x24528a['descriptionFilePath']?_0x30a9e8(0x18f)+_0x24528a[_0x30a9e8(0x171)]:null,_0x24528a['sanitize'][_0x30a9e8(0x156)]?'truncated:\x20original\x20'+_0x24528a['sanitize'][_0x30a9e8(0x16b)]+'\x20bytes':null,_0x24528a[_0x30a9e8(0x169)][_0x30a9e8(0x154)]>0x0?_0x30a9e8(0x159)+_0x24528a[_0x30a9e8(0x169)]['redactionCount']+'\x20('+_0x24528a[_0x30a9e8(0x169)][_0x30a9e8(0x189)][_0x30a9e8(0x153)](',\x20')+')':null]['filter'](Boolean)[_0x30a9e8(0x153)]('\x0a')};},async 'execute'(_0x3c285b){const _0x57cb00=a104_0x12047f,_0x51854b=await prepareIssueReport(_0x3c285b);try{await sendPlatformIssueCollectLog({'title':_0x51854b[_0x57cb00(0x17a)],'description':_0x51854b[_0x57cb00(0x18b)],'sanitize':{'originalBytes':_0x51854b[_0x57cb00(0x169)][_0x57cb00(0x16b)],'truncated':_0x51854b[_0x57cb00(0x169)]['truncated'],'redactionCount':_0x51854b[_0x57cb00(0x169)][_0x57cb00(0x154)],'redactionKinds':_0x51854b['sanitize'][_0x57cb00(0x189)]}});}catch(_0x49c4a0){throw CliErrors[_0x57cb00(0x185)](_0x57cb00(0x155)+(_0x49c4a0 instanceof Error?_0x49c4a0['message']:String(_0x49c4a0)),_0x57cb00(0x15a));}return{'ok':!![],'message':buildResultMessage(_0x51854b[_0x57cb00(0x169)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x57cb00(0x18e),_0x57cb00(0x180),_0x57cb00(0x178),'issue.description_truncated',_0x57cb00(0x174),'issue.description_redaction_kinds'],'issue':{'title':_0x51854b[_0x57cb00(0x17a)],'descriptionLength':_0x51854b[_0x57cb00(0x18b)][_0x57cb00(0x167)],'descriptionSource':_0x51854b[_0x57cb00(0x16f)],..._0x51854b[_0x57cb00(0x171)]?{'descriptionFile':_0x51854b[_0x57cb00(0x171)]}:{},'sanitize':{'originalBytes':_0x51854b['sanitize'][_0x57cb00(0x16b)],'truncated':_0x51854b[_0x57cb00(0x169)]['truncated'],'redactions':_0x51854b[_0x57cb00(0x169)][_0x57cb00(0x154)],'redactionKinds':_0x51854b['sanitize'][_0x57cb00(0x189)]}}}};}};function buildResultMessage(_0x13d787){const _0x462519=a104_0x12047f,_0x2e5a5e=[];return _0x13d787[_0x462519(0x156)]&&_0x2e5a5e['push'](_0x462519(0x165)+_0x13d787[_0x462519(0x16b)]+_0x462519(0x162)),_0x13d787[_0x462519(0x154)]>0x0&&_0x2e5a5e[_0x462519(0x17f)](_0x462519(0x168)+_0x13d787['redactionCount']+_0x462519(0x172)+_0x13d787[_0x462519(0x189)][_0x462519(0x153)](',\x20')),_0x2e5a5e[_0x462519(0x167)]===0x0?'Platform\x20issue\x20reported':_0x462519(0x187)+_0x2e5a5e[_0x462519(0x153)](';\x20')+')';}async function prepareIssueReport(_0x556b90){const _0x50f120=a104_0x12047f,_0x5081da=_0x556b90[_0x50f120(0x170)](_0x50f120(0x17a))[_0x50f120(0x18a)](),_0xb25acc=_0x556b90[_0x50f120(0x170)](_0x50f120(0x18b)),_0x47bede=_0x556b90[_0x50f120(0x170)](DESCRIPTION_FILE_FLAG)[_0x50f120(0x18a)]();if(!_0x47bede){const _0x3276b3=_0xb25acc;if(!_0x3276b3[_0x50f120(0x18a)]())throw CliErrors[_0x50f120(0x184)](_0x50f120(0x16e),'Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.');const _0x35bc6b=sanitizeIssueDescription(_0x3276b3);return{'title':_0x5081da,'description':_0x35bc6b['description'],'descriptionSource':_0x50f120(0x158),'sanitize':_0x35bc6b};}const _0x43b67a=resolve(process[_0x50f120(0x17e)](),_0x47bede),_0x240c37=await readFile(_0x43b67a,'utf8');if(!_0x240c37['trim']())throw CliErrors[_0x50f120(0x184)](_0x50f120(0x16c)+_0x43b67a,_0x50f120(0x17b));const _0x9d1f9f=sanitizeIssueDescription(_0x240c37);return{'title':_0x5081da,'description':_0x9d1f9f[_0x50f120(0x18b)],'descriptionSource':_0x50f120(0x15d),'descriptionFilePath':_0x43b67a,'sanitize':_0x9d1f9f};}function a104_0x37d1(){const _0x5648cc=['originalBytes','Issue\x20description\x20file\x20is\x20empty:\x20','compress','Issue\x20description\x20cannot\x20be\x20empty.','descriptionSource','str','descriptionFilePath','\x20secret(s):\x20','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','issue.description_redactions','1430298VtMLRA','One-line\x20issue\x20summary','4pWZPkV','issue.description_original_bytes','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','title','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','description-file','cwd','push','issue.description','440146fDDAcE','3993016CASbEc','otel://','validation','apiError','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','Platform\x20issue\x20reported\x20(','1220QhuPSl','redactionKinds','trim','description','write','POST','issue.title','descriptionFile:\x20','join','redactionCount','Failed\x20to\x20report\x20platform\x20issue:\x20','truncated','flagMissing','inline','redactions:\x20','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','string','3932768Qyfwyj','file','380540anlDRw','5yDdivg','issue','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','\x20bytes','9mjRhRX','22429FogufB','truncated\x20from\x20','report','length','redacted\x20','sanitize','634470OAUvjN'];a104_0x37d1=function(){return _0x5648cc;};return a104_0x37d1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a105_0x15683e=a105_0x34d8;(function(_0xd944ef,_0x35a3f2){const _0x978d16=a105_0x34d8,_0x3384b9=_0xd944ef();while(!![]){try{const _0x129939=-parseInt(_0x978d16(0x1f7))/0x1+-parseInt(_0x978d16(0x1e4))/0x2*(parseInt(_0x978d16(0x1e3))/0x3)+parseInt(_0x978d16(0x1ee))/0x4*(-parseInt(_0x978d16(0x1db))/0x5)+-parseInt(_0x978d16(0x1f1))/0x6+-parseInt(_0x978d16(0x1f3))/0x7+parseInt(_0x978d16(0x1f8))/0x8+parseInt(_0x978d16(0x1fa))/0x9;if(_0x129939===_0x35a3f2)break;else _0x3384b9['push'](_0x3384b9['shift']());}catch(_0x33c33e){_0x3384b9['push'](_0x3384b9['shift']());}}}(a105_0x336b,0x1affb));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;function a105_0x34d8(_0xebb81,_0x1d4453){_0xebb81=_0xebb81-0x1da;const _0x336b47=a105_0x336b();let _0x34d8fe=_0x336b47[_0xebb81];return _0x34d8fe;}const TRUNCATION_NOTICE=a105_0x15683e(0x1e8),REDACTION_RULES=[{'kind':a105_0x15683e(0x1ea),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a105_0x15683e(0x1dc)},{'kind':a105_0x15683e(0x1f4),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a105_0x15683e(0x1ec)},{'kind':a105_0x15683e(0x1e1),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':'REDACTED:private-key'},{'kind':a105_0x15683e(0x1f5),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':'REDACTED:access-key'},{'kind':a105_0x15683e(0x1f9),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a105_0x15683e(0x1f6)},{'kind':'bearer-jwt','pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a105_0x15683e(0x1dd)}];function a105_0x336b(){const _0x2e7a11=['\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','subarray','cookie','description','REDACTED:authorization','pattern','2908tlLeUU','replace','slice','753186EAuLap','from','1391334alglYi','authorization','access-key','REDACTED:password','69269jSRzrZ','931448DIEPxo','password','4876146zXhOmp','includes','500xZzSGd','REDACTED:cookie','REDACTED:bearer-jwt','utf8','byteLength','string','private-key','push','122064yfNGTn','4rutCxs','__RB_OSS_ID_','label','kind'];a105_0x336b=function(){return _0x2e7a11;};return a105_0x336b();}export function sanitizeIssueDescription(_0x2cb28f){const _0x246313=a105_0x15683e,_0x4e8555=Buffer[_0x246313(0x1df)](_0x2cb28f,_0x246313(0x1de)),_0x2ccf9b=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x18cd40=_0x2cb28f,_0x32e862=0x0;const _0xa2342b=[];if(!_0x2ccf9b){const _0x12c2e5=protectOssAccessKeyIds(_0x18cd40);_0x18cd40=_0x12c2e5[_0x246313(0x1eb)];for(const _0x9cb80b of REDACTION_RULES){let _0x3b1ea8=0x0;_0x18cd40=_0x18cd40['replace'](_0x9cb80b[_0x246313(0x1ed)],(_0x39ff5f,_0x4b43b1)=>{const _0x530dfb=_0x246313;_0x3b1ea8+=0x1;const _0x5c8217=typeof _0x4b43b1===_0x530dfb(0x1e0)?_0x4b43b1:'';return _0x5c8217+'['+_0x9cb80b[_0x530dfb(0x1e6)]+']';}),_0x3b1ea8>0x0&&(_0x32e862+=_0x3b1ea8,!_0xa2342b[_0x246313(0x1da)](_0x9cb80b['kind'])&&_0xa2342b[_0x246313(0x1e2)](_0x9cb80b[_0x246313(0x1e7)]));}_0x18cd40=_0x12c2e5['restore'](_0x18cd40);}let _0x2cb4af=![];if(Buffer[_0x246313(0x1df)](_0x18cd40,_0x246313(0x1de))>ISSUE_DESCRIPTION_MAX_BYTES){_0x2cb4af=!![];const _0x36f04a=Buffer[_0x246313(0x1df)](TRUNCATION_NOTICE,_0x246313(0x1de)),_0x56ef57=Math['max'](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x36f04a);_0x18cd40=sliceUtf8Bytes(_0x18cd40,_0x56ef57)+TRUNCATION_NOTICE;}return{'description':_0x18cd40,'originalBytes':_0x4e8555,'truncated':_0x2cb4af,'redactionCount':_0x32e862,'redactionKinds':_0xa2342b};}function protectOssAccessKeyIds(_0x514e8d){const _0x153fc4=a105_0x15683e,_0x4426b0=[],_0x2d2759=_0x514e8d['replace'](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x4d12da,_0x230a9d)=>{const _0x3aa2bd=a105_0x34d8,_0x34c091=_0x4426b0[_0x3aa2bd(0x1e2)](_0x4d12da[_0x3aa2bd(0x1f0)](_0x230a9d['length']))-0x1;return _0x230a9d+_0x3aa2bd(0x1e5)+_0x34c091+'__';});return{'description':_0x2d2759,'restore':_0x382416=>_0x382416[_0x153fc4(0x1ef)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x1e52d5,_0x145f67,_0x535f33)=>{const _0x523229=_0x4426b0[Number(_0x535f33)];return _0x523229===undefined?_0x1e52d5:''+_0x145f67+_0x523229;})};}function sliceUtf8Bytes(_0x50fcbf,_0x241ca0){const _0x3a03c9=a105_0x15683e;if(_0x241ca0<=0x0)return'';const _0x5c18ec=Buffer[_0x3a03c9(0x1f2)](_0x50fcbf,_0x3a03c9(0x1de));if(_0x5c18ec[_0x3a03c9(0x1df)]<=_0x241ca0)return _0x50fcbf;let _0x296555=_0x241ca0;while(_0x296555>0x0){const _0x4d18d7=_0x5c18ec[_0x296555];if(_0x4d18d7===undefined||(_0x4d18d7&0xc0)!==0x80)break;_0x296555-=0x1;}return _0x5c18ec[_0x3a03c9(0x1e9)](0x0,_0x296555)['toString'](_0x3a03c9(0x1de));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a106_0x380140=a106_0x329d;(function(_0x49cd6f,_0x2c279c){const _0x4e044b=a106_0x329d,_0x1f24c0=_0x49cd6f();while(!![]){try{const _0x3670af=parseInt(_0x4e044b(0x15e))/0x1+-parseInt(_0x4e044b(0x170))/0x2*(-parseInt(_0x4e044b(0x175))/0x3)+-parseInt(_0x4e044b(0x162))/0x4*(-parseInt(_0x4e044b(0x17c))/0x5)+parseInt(_0x4e044b(0x159))/0x6+-parseInt(_0x4e044b(0x169))/0x7+-parseInt(_0x4e044b(0x15c))/0x8*(-parseInt(_0x4e044b(0x160))/0x9)+-parseInt(_0x4e044b(0x17f))/0xa*(parseInt(_0x4e044b(0x17a))/0xb);if(_0x3670af===_0x2c279c)break;else _0x1f24c0['push'](_0x1f24c0['shift']());}catch(_0x2a5c07){_0x1f24c0['push'](_0x1f24c0['shift']());}}}(a106_0x1c56,0x59233));import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a106_0x329d(_0x5ad456,_0x1347ac){_0x5ad456=_0x5ad456-0x157;const _0x1c5600=a106_0x1c56();let _0x329d75=_0x1c5600[_0x5ad456];return _0x329d75;}import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,verifyKbMutationReadback}from'../../commands/kb/shared.js';const CREATE_PATH='/admin/knowledge-base/create';function readCreateInput(_0x1660b3){const _0x1d5654=a106_0x329d,_0xe1f666=_0x1660b3['str']('title')[_0x1d5654(0x15f)]();if(!_0xe1f666)throw kbError('kb_title_required',_0x1d5654(0x16f));const _0x59d285=_0x1660b3[_0x1d5654(0x157)]('file')[_0x1d5654(0x15f)]();if(!_0x59d285)throw kbError('kb_file_required',_0x1d5654(0x16d),'Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.');return{'title':_0xe1f666,'file':_0x59d285};}async function prepareCreate(_0x308aae){const _0x40cc69=a106_0x329d,_0x2b49ac=readCreateInput(_0x308aae),_0x15c522=await readKbFile(_0x2b49ac[_0x40cc69(0x164)]),_0x3d31dc=await fetchAllCompanyKnowledgeBases(_0x308aae,{'title':_0x2b49ac[_0x40cc69(0x177)]}),_0x48a2ae=findExactCompanyKnowledgeBases(_0x3d31dc,_0x308aae['appCode'],_0x2b49ac[_0x40cc69(0x177)]);if(_0x48a2ae['length']>0x0)throw kbError(_0x40cc69(0x161),_0x40cc69(0x167)+_0x308aae['appCode']+'\x20with\x20title\x20'+_0x2b49ac['title']+'.','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x48a2ae[0x0]['id']+'\x20--format\x20compress`\x20before\x20choosing\x20update.');return{..._0x2b49ac,'content':_0x15c522};}function plannedAfter(_0x21942a,_0x4aed99){const _0xa4733f=a106_0x329d;return{'scope':'company','appCode':_0x21942a['appCode'],'title':_0x4aed99[_0xa4733f(0x177)],'contentByteSize':_0x4aed99[_0xa4733f(0x17d)][_0xa4733f(0x168)],'contentHash':_0x4aed99[_0xa4733f(0x17d)]['contentHash']};}function verifyCreatedState(_0x2caef5,_0x1c65b7,_0x418200){const _0x4d27c1=a106_0x329d;assertCompanyKnowledgeBase(_0x418200,_0x2caef5[_0x4d27c1(0x16b)],_0x418200['id']);const _0xfce3=inspectKbContent(_0x418200[_0x4d27c1(0x17d)]);if(_0x418200[_0x4d27c1(0x177)]!==_0x1c65b7[_0x4d27c1(0x177)]||_0xfce3[_0x4d27c1(0x179)]!==_0x1c65b7[_0x4d27c1(0x17d)][_0x4d27c1(0x179)])throw kbError(_0x4d27c1(0x171),'Company\x20knowledge\x20base\x20'+_0x418200['id']+_0x4d27c1(0x16a),_0x4d27c1(0x17e)+_0x418200['id']+_0x4d27c1(0x15b));return projectKb(_0x418200);}function a106_0x1c56(){const _0x3eab39=['kb_verification_failed','rabetbase\x20kb\x20detail\x20--id\x20','company','cookie','3wUQDRa','POST','title','rabetbase\x20kb\x20list\x20--title\x20','contentHash','11NetMLh','\x20for\x20','19115ruPTGO','content','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','8353190gDNeOC','str','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','908838JPRqwF','length','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','8pdKkYQ','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','540131HIyHzr','trim','1313379RNndmp','kb_already_exists','468JQDwkF','Created\x20company\x20knowledge\x20base\x20','file','stringify','\x20--format\x20compress','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20','byteSize','2688084viASlj','\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','appCode','create','--file\x20is\x20required.','string','--title\x20is\x20required.','599224ZLTorb'];a106_0x1c56=function(){return _0x3eab39;};return a106_0x1c56();}export const kbCreate={'service':'kb','command':a106_0x380140(0x16c),'description':'Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'title','type':'string','required':!![],'description':'Knowledge-base\x20title'},{'name':a106_0x380140(0x164),'type':a106_0x380140(0x16e),'required':!![],'description':a106_0x380140(0x15d)}],async 'validate'(_0x665f6c){readCreateInput(_0x665f6c);},async 'dryRun'(_0x457e3a){const _0x2d151e=a106_0x380140,_0x52259d=await prepareCreate(_0x457e3a);return asDryRunResult({'operation':_0x2d151e(0x16c),'selector':{'scope':_0x2d151e(0x173),'appCode':_0x457e3a[_0x2d151e(0x16b)],'title':_0x52259d[_0x2d151e(0x177)]},'before':null,'after':plannedAfter(_0x457e3a,_0x52259d),'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':_0x2d151e(0x178)+JSON[_0x2d151e(0x165)](_0x52259d['title'])+'\x20--format\x20compress'}},{'method':_0x2d151e(0x176),'url':CREATE_PATH});},async 'execute'(_0x2f8408){const _0x327f0d=a106_0x380140,_0x562423=await prepareCreate(_0x2f8408);let _0x436dfd,_0x4b939a=![];try{const _0x3fd1ea=await createEnterpriseKnowledgeBase(_0x2f8408[_0x327f0d(0x174)],{'appCode':_0x2f8408[_0x327f0d(0x16b)],'title':_0x562423[_0x327f0d(0x177)],'content':_0x562423[_0x327f0d(0x17d)]['content']});assertCompanyKnowledgeBase(_0x3fd1ea,_0x2f8408[_0x327f0d(0x16b)],_0x3fd1ea['id']),_0x436dfd=_0x3fd1ea['id'];}catch(_0x1fc5ea){if(!isPlatformTransportFailure(_0x1fc5ea))throw _0x1fc5ea;_0x4b939a=!![];}if(_0x436dfd===undefined){const _0x5d76bb=await verifyKbMutationReadback(_0x327f0d(0x16c),!![],()=>fetchAllCompanyKnowledgeBases(_0x2f8408,{'title':_0x562423['title']})),_0x1c2073=findExactCompanyKnowledgeBases(_0x5d76bb,_0x2f8408[_0x327f0d(0x16b)],_0x562423[_0x327f0d(0x177)]);if(_0x1c2073[_0x327f0d(0x15a)]!==0x1)throw kbError('kb_create_outcome_unknown',_0x327f0d(0x158)+_0x1c2073['length']+'.','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.');_0x436dfd=_0x1c2073[0x0]['id'];}const _0x32bd5b=await verifyKbMutationReadback(_0x327f0d(0x16c),_0x4b939a,()=>requireKb(_0x2f8408,_0x436dfd)),_0x143ec5=verifyCreatedState(_0x2f8408,_0x562423,_0x32bd5b),_0x217d91=_0x4b939a?['Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x327f0d(0x16c),'selector':{'id':_0x143ec5['id'],'scope':_0x327f0d(0x173),'appCode':_0x143ec5[_0x327f0d(0x16b)]},'before':null,'after':_0x143ec5,'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':_0x217d91,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x4b939a,'lookupCommand':_0x327f0d(0x172)+_0x143ec5['id']+_0x327f0d(0x166)}},'message':_0x327f0d(0x163)+_0x143ec5['id']+_0x327f0d(0x17b)+_0x143ec5[_0x327f0d(0x16b)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a107_0x41781e=a107_0x15e9;(function(_0x4a9e18,_0x37ebb2){const _0x52b3de=a107_0x15e9,_0x17b805=_0x4a9e18();while(!![]){try{const _0x26be32=-parseInt(_0x52b3de(0xbe))/0x1+-parseInt(_0x52b3de(0xd1))/0x2*(-parseInt(_0x52b3de(0xb5))/0x3)+parseInt(_0x52b3de(0xcd))/0x4+parseInt(_0x52b3de(0xba))/0x5+-parseInt(_0x52b3de(0xb6))/0x6+parseInt(_0x52b3de(0xc8))/0x7+parseInt(_0x52b3de(0xbb))/0x8*(-parseInt(_0x52b3de(0xce))/0x9);if(_0x26be32===_0x37ebb2)break;else _0x17b805['push'](_0x17b805['shift']());}catch(_0x24be76){_0x17b805['push'](_0x17b805['shift']());}}}(a107_0x6e96,0x44dfc));import{deleteEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';function a107_0x6e96(){const _0x5ca0c6=['Company\x20knowledge\x20base\x20','Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.','295258swVKKc','kb_expected_version_invalid','appCode','Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','rabetbase\x20kb\x20detail\x20--id\x20','Soft-deleted\x20company\x20knowledge\x20base\x20','\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made','expected-version','\x20remains\x20readable\x20after\x20delete.','Company\x20knowledge-base\x20id','1618757GmiPRp','delete','Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.','--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20delete\x20contract\x20has\x20no\x20version\x20predicate.','isSafeInteger','841744viFFKE','45423NLhPEi','unshift','already_absent','24312MZrtpH','company','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','cookie','snapshotHash','POST','135audUir','3254718DVetwJ','number','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','kb_delete_outcome_unknown','2371540LELFHw','544OZOnRS'];a107_0x6e96=function(){return _0x5ca0c6;};return a107_0x6e96();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertExpectedKbVersion,getKbOrNull,kbError,projectKb,readKbId,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const DELETE_PATH='/admin/knowledge-base/delete',RAG_WARNING=a107_0x41781e(0xca),NON_ATOMIC_WARNING=a107_0x41781e(0xcb);function readExpectedVersion(_0x1ad16d){const _0x5f08e9=a107_0x41781e,_0x4d96e9=_0x1ad16d['flag'](_0x5f08e9(0xc5));if(_0x4d96e9===undefined)return undefined;const _0x3a4951=Number(_0x4d96e9);if(!Number[_0x5f08e9(0xcc)](_0x3a4951)||_0x3a4951<0x0)throw kbError(_0x5f08e9(0xbf),_0x5f08e9(0xb1));return _0x3a4951;}function noOpData(_0x147e6b,_0x1e00c2,_0x3a6fc7){const _0x96dab1=a107_0x41781e;return{'operation':'no_op','selector':{'id':_0x1e00c2,'scope':'company','appCode':_0x147e6b['appCode']},'before':null,'after':null,'dryRun':_0x3a6fc7,'deleteCalled':![],'backend':{'method':_0x96dab1(0xb4),'path':DELETE_PATH},'warnings':[],'verification':{'status':_0x96dab1(0xd0),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}function a107_0x15e9(_0x1776c6,_0x545304){_0x1776c6=_0x1776c6-0xb1;const _0x6e9677=a107_0x6e96();let _0x15e90f=_0x6e9677[_0x1776c6];return _0x15e90f;}export const kbDelete={'service':'kb','command':a107_0x41781e(0xc9),'description':a107_0x41781e(0xc1),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a107_0x41781e(0xb7),'required':!![],'description':a107_0x41781e(0xc7)},{'name':a107_0x41781e(0xc5),'type':a107_0x41781e(0xb7),'required':![],'description':'Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version'}],async 'validate'(_0x4541b7){readKbId(_0x4541b7),readExpectedVersion(_0x4541b7),requireKbExplicitYes(_0x4541b7);},async 'dryRun'(_0x1d1684){const _0x19f462=a107_0x41781e,_0x4c94c2=readKbId(_0x1d1684),_0x2b6878=readExpectedVersion(_0x1d1684),_0x2c9e26=await getKbOrNull(_0x1d1684,_0x4c94c2);if(!_0x2c9e26)return asDryRunResult(noOpData(_0x1d1684,_0x4c94c2,!![]),{'method':_0x19f462(0xb4),'url':DELETE_PATH});assertExpectedKbVersion(_0x2c9e26,_0x2b6878);const _0x3ed864=projectKb(_0x2c9e26),_0x58d77e=[RAG_WARNING];if(_0x2b6878!==undefined)_0x58d77e[_0x19f462(0xcf)](NON_ATOMIC_WARNING);return asDryRunResult({'operation':_0x19f462(0xc9),'selector':{'id':_0x3ed864['id'],'scope':_0x19f462(0xd2),'appCode':_0x3ed864[_0x19f462(0xc0)]},'before':_0x3ed864,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x58d77e,'verification':{'expectedVersion':_0x2b6878??null,'atomicCompareAndSet':![],'snapshotHash':_0x3ed864[_0x19f462(0xb3)],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x19f462(0xc2)+_0x3ed864['id']+'\x20--format\x20compress'}},{'method':_0x19f462(0xb4),'url':DELETE_PATH});},async 'execute'(_0x13479c){const _0x190106=a107_0x41781e;requireKbExplicitYes(_0x13479c);const _0x3e8f95=readKbId(_0x13479c),_0x2b1029=readExpectedVersion(_0x13479c),_0x4ee354=await getKbOrNull(_0x13479c,_0x3e8f95);if(!_0x4ee354)return{'ok':!![],'data':noOpData(_0x13479c,_0x3e8f95,![]),'message':_0x190106(0xbc)+_0x3e8f95+_0x190106(0xc4)};assertExpectedKbVersion(_0x4ee354,_0x2b1029);const _0x3b93a5=projectKb(_0x4ee354);let _0x2c0b01=![];try{await deleteEnterpriseKnowledgeBase(_0x13479c[_0x190106(0xb2)],_0x3e8f95);}catch(_0x40a4de){if(!isPlatformTransportFailure(_0x40a4de))throw _0x40a4de;_0x2c0b01=!![];}const _0x27d889=await verifyKbMutationReadback(_0x190106(0xc9),_0x2c0b01,()=>getKbOrNull(_0x13479c,_0x3e8f95));if(_0x27d889)throw kbError(_0x2c0b01?_0x190106(0xb9):'kb_verification_failed',_0x190106(0xbc)+_0x3e8f95+_0x190106(0xc6),_0x190106(0xd3)+_0x3e8f95+_0x190106(0xb8));const _0x4694b7=[RAG_WARNING];if(_0x2b1029!==undefined)_0x4694b7['unshift'](NON_ATOMIC_WARNING);return _0x2c0b01&&_0x4694b7[_0x190106(0xcf)](_0x190106(0xbd)),{'ok':!![],'data':{'operation':'delete','selector':{'id':_0x3b93a5['id'],'scope':_0x190106(0xd2),'appCode':_0x3b93a5[_0x190106(0xc0)]},'before':_0x3b93a5,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':_0x190106(0xb4),'path':DELETE_PATH},'warnings':_0x4694b7,'verification':{'status':'verified','databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0x2c0b01,'lookupCommand':_0x190106(0xc2)+_0x3b93a5['id']+'\x20--format\x20compress'}},'message':_0x190106(0xc3)+_0x3b93a5['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a108_0xffaca5=a108_0x3191;function a108_0x3191(_0x506c24,_0x463e73){_0x506c24=_0x506c24-0xb9;const _0x132cb0=a108_0x132c();let _0x3191ec=_0x132cb0[_0x506c24];return _0x3191ec;}(function(_0x1ea6a2,_0x172bad){const _0x1debfa=a108_0x3191,_0x181fe4=_0x1ea6a2();while(!![]){try{const _0x47aa28=-parseInt(_0x1debfa(0xc3))/0x1*(parseInt(_0x1debfa(0xc2))/0x2)+parseInt(_0x1debfa(0xbe))/0x3+parseInt(_0x1debfa(0xc4))/0x4*(-parseInt(_0x1debfa(0xc0))/0x5)+-parseInt(_0x1debfa(0xbf))/0x6+parseInt(_0x1debfa(0xc5))/0x7*(-parseInt(_0x1debfa(0xbc))/0x8)+parseInt(_0x1debfa(0xb9))/0x9+parseInt(_0x1debfa(0xbd))/0xa*(parseInt(_0x1debfa(0xc7))/0xb);if(_0x47aa28===_0x172bad)break;else _0x181fe4['push'](_0x181fe4['shift']());}catch(_0xa50a1b){_0x181fe4['push'](_0x181fe4['shift']());}}}(a108_0x132c,0x74fb1));import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';function a108_0x132c(){const _0x183440=['3010108vxEHrT','1477tYJNQO','detail','77mlBovz','8012277BuPZjs','Loaded\x20company\x20knowledge\x20base\x20','Show\x20one\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','17792cWgjzb','2119720tRYYwf','718875ipAlMs','28578XFuyWc','5ViMJbJ','number','72638vzOerl','25psLGDs'];a108_0x132c=function(){return _0x183440;};return a108_0x132c();}export const kbDetail={'service':'kb','command':a108_0xffaca5(0xc6),'description':a108_0xffaca5(0xbb),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a108_0xffaca5(0xc1),'required':!![],'description':'Company\x20knowledge-base\x20id'}],async 'validate'(_0x5dbef9){readKbId(_0x5dbef9);},async 'execute'(_0x207ac4){const _0x57f7a6=a108_0xffaca5,_0x597e19=readKbId(_0x207ac4),_0x46ed77=await requireKb(_0x207ac4,_0x597e19);return{'ok':!![],'data':{'knowledgeBase':projectKb(_0x46ed77)},'message':_0x57f7a6(0xba)+_0x597e19};}};
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a109_0x2926(){const _0x155459=['367638jUltpY','1827772KSMxbQ','182060Qwavib','4722104kkpnrd','12602wZLcnB','10fsGLvd','116154RKDQLt','98OKQdkB','80jZOMdC','2313546btFzWb'];a109_0x2926=function(){return _0x155459;};return a109_0x2926();}(function(_0x86bc68,_0x102dff){const _0x58c357=a109_0x597d,_0x30f2c9=_0x86bc68();while(!![]){try{const _0x4f1423=-parseInt(_0x58c357(0x12d))/0x1*(-parseInt(_0x58c357(0x133))/0x2)+parseInt(_0x58c357(0x12e))/0x3+-parseInt(_0x58c357(0x130))/0x4*(-parseInt(_0x58c357(0x134))/0x5)+-parseInt(_0x58c357(0x12f))/0x6*(parseInt(_0x58c357(0x136))/0x7)+-parseInt(_0x58c357(0x132))/0x8+parseInt(_0x58c357(0x135))/0x9+parseInt(_0x58c357(0x131))/0xa;if(_0x4f1423===_0x102dff)break;else _0x30f2c9['push'](_0x30f2c9['shift']());}catch(_0x1a313f){_0x30f2c9['push'](_0x30f2c9['shift']());}}}(a109_0x2926,0xbc84f));import{kbList}from'../../commands/kb/list.js';import{kbDetail}from'../../commands/kb/detail.js';function a109_0x597d(_0x38c465,_0x42cc72){_0x38c465=_0x38c465-0x12d;const _0x2926c3=a109_0x2926();let _0x597d10=_0x2926c3[_0x38c465];return _0x597d10;}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];
|
package/lib/commands/kb/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a110_0x5d3e09=a110_0x17ee;(function(_0x1cc21d,_0x531eb5){const _0x5752ff=a110_0x17ee,_0x190f03=_0x1cc21d();while(!![]){try{const _0x72b369=parseInt(_0x5752ff(0x96))/0x1*(-parseInt(_0x5752ff(0x9d))/0x2)+parseInt(_0x5752ff(0x9f))/0x3+-parseInt(_0x5752ff(0x9c))/0x4+-parseInt(_0x5752ff(0x99))/0x5+-parseInt(_0x5752ff(0x9a))/0x6+-parseInt(_0x5752ff(0x9e))/0x7+parseInt(_0x5752ff(0x9b))/0x8;if(_0x72b369===_0x531eb5)break;else _0x190f03['push'](_0x190f03['shift']());}catch(_0x50eba7){_0x190f03['push'](_0x190f03['shift']());}}}(a110_0x3989,0x73ef7));function a110_0x3989(){const _0x4a06ed=['\x20company\x20knowledge\x20base(s)\x20for\x20','map','appCode','127WkKFOE','title','length','620305fgSXlq','709308gnIpwo','16009768iRzNwv','3794724bGGlnZ','2962BuAtMQ','4432078DIRSYM','1457553qmphjU','read','trim','list','List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app','string'];a110_0x3989=function(){return _0x4a06ed;};return a110_0x3989();}function a110_0x17ee(_0x1ff2cf,_0x4868a4){_0x1ff2cf=_0x1ff2cf-0x95;const _0x39895e=a110_0x3989();let _0x17ee7a=_0x39895e[_0x1ff2cf];return _0x17ee7a;}import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';export const kbList={'service':'kb','command':a110_0x5d3e09(0xa2),'description':a110_0x5d3e09(0xa3),'risk':a110_0x5d3e09(0xa0),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a110_0x5d3e09(0x97),'type':a110_0x5d3e09(0xa4),'required':![],'description':'Filter\x20by\x20knowledge-base\x20title'}],async 'execute'(_0xc972e3){const _0x325ec9=a110_0x5d3e09,_0x1f7344=_0xc972e3['str']('title')[_0x325ec9(0xa1)](),_0x45f573=await fetchAllCompanyKnowledgeBases(_0xc972e3,{..._0x1f7344?{'title':_0x1f7344}:{}}),_0x52c877=_0x45f573[_0x325ec9(0xa6)](projectKb);return{'ok':!![],'data':{'total':_0x52c877[_0x325ec9(0x98)],'knowledgeBases':_0x52c877},'message':'Found\x20'+_0x52c877[_0x325ec9(0x98)]+_0x325ec9(0xa5)+_0xc972e3[_0x325ec9(0x95)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a111_0x4155(_0x556c01,_0x245d90){_0x556c01=_0x556c01-0x1cf;const _0x4dd4da=a111_0x4dd4();let _0x4155e8=_0x4dd4da[_0x556c01];return _0x4155e8;}const a111_0x1433c6=a111_0x4155;(function(_0x4a506e,_0x4e7180){const _0x2d0c8b=a111_0x4155,_0x51bdfb=_0x4a506e();while(!![]){try{const _0x3a2575=parseInt(_0x2d0c8b(0x1da))/0x1+-parseInt(_0x2d0c8b(0x1d4))/0x2+-parseInt(_0x2d0c8b(0x1d3))/0x3*(parseInt(_0x2d0c8b(0x1e8))/0x4)+parseInt(_0x2d0c8b(0x1e5))/0x5*(-parseInt(_0x2d0c8b(0x1e6))/0x6)+parseInt(_0x2d0c8b(0x1dc))/0x7+parseInt(_0x2d0c8b(0x1de))/0x8*(-parseInt(_0x2d0c8b(0x1d8))/0x9)+parseInt(_0x2d0c8b(0x1e0))/0xa;if(_0x3a2575===_0x4e7180)break;else _0x51bdfb['push'](_0x51bdfb['shift']());}catch(_0x54779a){_0x51bdfb['push'](_0x51bdfb['shift']());}}}(a111_0x4dd4,0x74eb4));import{searchCompanyPublicKnowledge}from'../../core/api-client.js';function a111_0x4dd4(){const _0x420efc=['1555TkyogQ','15906MnUIcL','Search\x20query\x20is\x20required.','60DVWRUx','validation','num','Found\x20','Search\x20company\x20and\x20public\x20knowledge\x20for\x20the\x20resolved\x20app','125349RTQWGc','866770EVrCGi','search','query','flag','9HHVmGl','topk','613495cXXbIN','appCode','4593302vOUubj','cookie','4255864fTNyZp','string','16257930meUeYF','length','--topk\x20must\x20be\x20a\x20positive\x20integer.','isSafeInteger','\x20company/public\x20knowledge\x20hit(s)\x20for\x20'];a111_0x4dd4=function(){return _0x420efc;};return a111_0x4dd4();}import{CliErrors}from'../../errors.js';function readSearchQuery(_0x54ef28){const _0x4b4675=a111_0x4155,_0x4a2832=_0x54ef28['str'](_0x4b4675(0x1d6))['trim']();if(!_0x4a2832)throw CliErrors[_0x4b4675(0x1cf)](_0x4b4675(0x1e7));return _0x4a2832;}function readSearchTopK(_0x3a3c4d){const _0x4a6131=a111_0x4155,_0x1af47f=_0x3a3c4d[_0x4a6131(0x1d7)]('topk');if(_0x1af47f===undefined||_0x1af47f===null||_0x1af47f==='')return undefined;const _0x5c27ba=_0x3a3c4d[_0x4a6131(0x1d0)]('topk');if(!Number[_0x4a6131(0x1e3)](_0x5c27ba)||_0x5c27ba<=0x0)throw CliErrors[_0x4a6131(0x1cf)](_0x4a6131(0x1e2));return _0x5c27ba;}export const kbSearch={'service':'kb','command':a111_0x1433c6(0x1d5),'description':a111_0x1433c6(0x1d2),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a111_0x1433c6(0x1d6),'type':a111_0x1433c6(0x1df),'required':!![],'description':'Company\x20and\x20public\x20knowledge\x20search\x20query'},{'name':a111_0x1433c6(0x1d9),'type':'number','required':![],'description':'Maximum\x20number\x20of\x20knowledge\x20hits\x20to\x20return'}],async 'validate'(_0x3db68f){readSearchQuery(_0x3db68f),readSearchTopK(_0x3db68f);},async 'execute'(_0x2b066a){const _0x80e541=a111_0x1433c6,_0x4253cb=readSearchQuery(_0x2b066a),_0x37358c=readSearchTopK(_0x2b066a),_0x10bec9=await searchCompanyPublicKnowledge(_0x2b066a[_0x80e541(0x1dd)],{'query':_0x4253cb,'appCode':_0x2b066a[_0x80e541(0x1db)],..._0x37358c!==undefined?{'topK':_0x37358c}:{}});return{'ok':!![],'data':{'total':_0x10bec9[_0x80e541(0x1e1)],'hits':_0x10bec9},'message':_0x80e541(0x1d1)+_0x10bec9['length']+_0x80e541(0x1e4)+_0x2b066a[_0x80e541(0x1db)]};}};
|