@lovrabet/rabetbase-cli 2.3.16-beta.1 → 2.3.16-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -0
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/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.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/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/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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.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/react/create.js +1 -0
- package/lib/commands/page/react/detail.js +1 -0
- package/lib/commands/page/react/list.js +1 -0
- package/lib/commands/page/react/publish.js +1 -0
- package/lib/commands/page/react/shared.js +1 -0
- package/lib/commands/page/react/syntax.js +1 -0
- package/lib/commands/page/react/template.js +1 -0
- package/lib/commands/page/react/update.js +1 -0
- 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/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -0
- package/lib/commands/tenant/members-list.js +1 -0
- package/lib/commands/tenant/shared.js +1 -0
- 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/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -2
- package/templates/projects/sub-app-react-demo/CHANGELOG.md +1 -1
- package/templates/projects/sub-app-react-demo/README.md +1 -1
- package/templates/projects/sub-app-react-demo/docs/quick-start.md +1 -1
- package/templates/projects/sub-app-react-demo/src/pages/index.tsx +1 -1
- package/lib/commands/app/add.js +0 -1
- package/lib/commands/app/remove.js +0 -1
- package/lib/commands/project/init.js +0 -1
- package/lib/commands/sql/save.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a91_0x2d71d4=a91_0x28c5;(function(_0x30a52c,_0x3170f3){const _0x4b62c8=a91_0x28c5,_0x5167cd=_0x30a52c();while(!![]){try{const _0x4a370d=-parseInt(_0x4b62c8(0x9e))/0x1+parseInt(_0x4b62c8(0x94))/0x2+-parseInt(_0x4b62c8(0x98))/0x3+-parseInt(_0x4b62c8(0x92))/0x4+parseInt(_0x4b62c8(0x9b))/0x5*(parseInt(_0x4b62c8(0xab))/0x6)+-parseInt(_0x4b62c8(0x9a))/0x7*(-parseInt(_0x4b62c8(0x99))/0x8)+parseInt(_0x4b62c8(0xac))/0x9;if(_0x4a370d===_0x3170f3)break;else _0x5167cd['push'](_0x5167cd['shift']());}catch(_0x2d8428){_0x5167cd['push'](_0x5167cd['shift']());}}}(a91_0x58eb,0xd04be));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a91_0x28c5(_0x5ec4bc,_0x48f1fa){_0x5ec4bc=_0x5ec4bc-0x8f;const _0x58eba4=a91_0x58eb();let _0x28c58c=_0x58eba4[_0x5ec4bc];return _0x28c58c;}import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set([a91_0x2d71d4(0xa1),a91_0x2d71d4(0x9c)]);function mergeDbLinkUpdate(_0x19d69d,_0x2d2bb6){const _0x5d4208=a91_0x2d71d4,_0x31940d={..._0x19d69d},_0x569cce=_0x2d2bb6[_0x5d4208(0xb1)](_0x5d4208(0xb4));if(_0x569cce&&MASKED_PASSWORD_VALUES[_0x5d4208(0x9f)](_0x569cce))throw CliErrors['validation'](_0x5d4208(0xad));if(!_0x569cce&&MASKED_PASSWORD_VALUES['has'](String(_0x19d69d[_0x5d4208(0xb4)]??'')))throw CliErrors[_0x5d4208(0xb0)](_0x5d4208(0xb3));const _0x1a07eb=_0x2d2bb6['str'](_0x5d4208(0xa3));if(_0x1a07eb)_0x31940d[_0x5d4208(0xa6)]=_0x1a07eb;const _0x5d0863=_0x2d2bb6[_0x5d4208(0xb1)](_0x5d4208(0x95));if(_0x5d0863)_0x31940d[_0x5d4208(0xa0)]=_0x5d0863['trim']();const _0x76e0d3=_0x2d2bb6['str'](_0x5d4208(0x90));if(_0x76e0d3)_0x31940d[_0x5d4208(0x90)]=_0x76e0d3;if(_0x569cce)_0x31940d[_0x5d4208(0xb4)]=_0x569cce;const _0x312047=_0x2d2bb6[_0x5d4208(0xb1)](_0x5d4208(0xa2));if(_0x312047)_0x31940d[_0x5d4208(0x91)]=_0x312047;const _0x18d2c6=_0x2d2bb6[_0x5d4208(0xb1)](_0x5d4208(0xa5));if(_0x18d2c6)_0x31940d[_0x5d4208(0xa4)]=_0x18d2c6;return _0x31940d;}export const dbUpdate={'service':'db','command':a91_0x2d71d4(0xaf),'description':'Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','risk':a91_0x2d71d4(0xae),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':a91_0x2d71d4(0xa9),'description':a91_0x2d71d4(0x9d)},{'name':a91_0x2d71d4(0x95),'type':a91_0x2d71d4(0xa9),'description':'New\x20host:port'},{'name':a91_0x2d71d4(0x90),'type':a91_0x2d71d4(0xa9),'description':a91_0x2d71d4(0xaa)},{'name':a91_0x2d71d4(0xb4),'type':a91_0x2d71d4(0xa9),'description':a91_0x2d71d4(0x96)},{'name':'dbparam','type':a91_0x2d71d4(0xa9),'description':a91_0x2d71d4(0xa7)},{'name':a91_0x2d71d4(0xa5),'type':a91_0x2d71d4(0xa9),'description':'New\x20description'}],async 'validate'(_0x1cc38c){const _0x3791f1=a91_0x2d71d4,_0x2e3014=_0x1cc38c['str'](_0x3791f1(0x95));if(_0x2e3014&&!validateDbUrl(_0x2e3014[_0x3791f1(0x8f)]()))throw CliErrors[_0x3791f1(0xb0)]('Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22'+_0x2e3014+'\x22');},async 'dryRun'(_0x2e9242){const _0x35f2ee=a91_0x2d71d4,_0x10d7dd=_0x2e9242[_0x35f2ee(0x93)]('id'),_0x5f15a5=await getDbLinkInfo(_0x10d7dd),_0x5ac1f8=mergeDbLinkUpdate(_0x5f15a5,_0x2e9242),_0x45718c=sanitizeDbLinkForOutput(_0x5ac1f8);return{'method':_0x35f2ee(0x97),'url':'/smartapi/dblink/update','body':_0x45718c,'description':_0x35f2ee(0xb2)};},async 'execute'(_0x46dfe3){const _0x6a0e0a=a91_0x2d71d4,_0x230b49=_0x46dfe3[_0x6a0e0a(0x93)]('id'),_0x80b2d0=await getDbLinkInfo(_0x230b49),_0x2e9d2e=mergeDbLinkUpdate(_0x80b2d0,_0x46dfe3),{id:_0x28e44d,entity:_0x58076a}=normalizeEntityWithIdResponse(await updateDbLink(_0x2e9d2e));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x58076a),'message':_0x6a0e0a(0xa8)+(_0x28e44d??_0x230b49)};}};function a91_0x58eb(){const _0x10de19=['Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20server\x20returns\x20a\x20masked\x20password','POST','996672uinNEj','40BGrxHC','1709701TgfGhb','1683645RhHnoF','[redacted]','New\x20database\x20name','370410kZIPGu','has','dbUrl','******','dbparam','dbname','dbDesc','dbdesc','dbName','New\x20connection\x20parameter\x20string','Updated\x20db\x20link\x20','string','New\x20username','6HonWPz','11478537TOVqvs','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','write','update','validation','str','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','password','trim','username','dbParam','6807736RUCJzy','num','848826vEhZXp','dburl'];a91_0x58eb=function(){return _0x10de19;};return a91_0x58eb();}
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a93_0x1f1174=a93_0x5e5b;function a93_0x1288(){const _0x7743c2=['\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','doctor','\x20\x20Config\x20JSON','\x20\x20API\x20Endpoints','cookie','riskLevel','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','(missing)','✗\x20Expired','10nKoAGq','\x20doctor','Project','Global','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','695048VlbFnn','keys','apiDir','18215zRYKeb','empty','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','pageSize','3447189NAZzOi','appCode','gray','accessKey','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','value','(default)','903304IgYFYB','✓\x20Valid','\x20\x20Auth','locale','padEnd','apps','red','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20←\x20current','env','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','green','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','check','yellow','✓\x20Valid\x20JSON','\x20\x20explicitAppName:\x20','version','appcode','1552002IAuEJZ','length','✗\x20Invalid\x20JSON','558098quTKBJ','1233594HgMXOk','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','204kFhycI','(not\x20set)','bold','\x20\x20\x20\x20accessKey:\x20\x20','read','defaultApp','(none)','format','unknown','\x20\x20Apps','source','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','(set,\x20length=','status','(default:\x20','repeat','⚠\x20Empty\x20(treated\x20as\x20{})','✗\x20Not\x20logged\x20in','log','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','14dhgSlc'];a93_0x1288=function(){return _0x7743c2;};return a93_0x1288();}(function(_0x47fb64,_0x455b9a){const _0x4a9828=a93_0x5e5b,_0x5b5357=_0x47fb64();while(!![]){try{const _0x378ef5=-parseInt(_0x4a9828(0xdc))/0x1+parseInt(_0x4a9828(0xb1))/0x2+-parseInt(_0x4a9828(0xd9))/0x3+parseInt(_0x4a9828(0xdf))/0x4*(parseInt(_0x4a9828(0xb4))/0x5)+parseInt(_0x4a9828(0xdd))/0x6*(parseInt(_0x4a9828(0xf3))/0x7)+parseInt(_0x4a9828(0xc3))/0x8+parseInt(_0x4a9828(0xbb))/0x9*(parseInt(_0x4a9828(0xac))/0xa);if(_0x378ef5===_0x455b9a)break;else _0x5b5357['push'](_0x5b5357['shift']());}catch(_0x546f34){_0x5b5357['push'](_0x5b5357['shift']());}}}(a93_0x1288,0x591d9));import a93_0x15e3ae from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';function a93_0x5e5b(_0x249d6a,_0x446d06){_0x249d6a=_0x249d6a-0xaa;const _0x128822=a93_0x1288();let _0x5e5b70=_0x128822[_0x249d6a];return _0x5e5b70;}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x217811){const _0x31d5b8=a93_0x5e5b,_0x20d556=GIT_COMMIT!==_0x31d5b8(0xe7)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION,_0x3d612f=buildConfigFromFlags({}),_0x5e655e=getCookie();console['log'](),console['log'](a93_0x15e3ae['bold'](CLI_BIN_NAME+_0x31d5b8(0xad))),console[_0x31d5b8(0xf1)](a93_0x15e3ae['gray']('─'[_0x31d5b8(0xee)](0x32))),console[_0x31d5b8(0xf1)](_0x31d5b8(0xea)+_0x20d556),console[_0x31d5b8(0xf1)](_0x31d5b8(0xce)+process[_0x31d5b8(0xd7)]),console['log']('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process['platform']+'\x20'+process['arch']),console['log'](),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xe1)]('\x20\x20Config\x20Files')),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xb8)[_0x31d5b8(0xee)](0x1e)));const _0x4d1d8d=getGlobalConfigPath(),_0x44bf6f=getProjectConfigPath();console[_0x31d5b8(0xf1)](_0x31d5b8(0xc0)+(_0x4d1d8d||a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xfb)))),console['log'](_0x31d5b8(0xca)+(_0x44bf6f||a93_0x15e3ae['gray'](_0x31d5b8(0xfb)))),console[_0x31d5b8(0xf1)](),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xe1)](_0x31d5b8(0xf6))),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xb8)[_0x31d5b8(0xee)](0x1e)));const _0x40e240=(_0x3d959e,_0x3cf2ab)=>{const _0x3b015c=_0x31d5b8;if(!_0x3cf2ab){console[_0x3b015c(0xf1)]('\x20\x20'+_0x3d959e[_0x3b015c(0xc7)](0x11)+'\x20'+a93_0x15e3ae['gray']('(no\x20file)'));return;}const _0x5cdf01=inspectCliConfigJsonFile(_0x3cf2ab);if(_0x5cdf01[_0x3b015c(0xec)]==='ok')console[_0x3b015c(0xf1)]('\x20\x20'+_0x3d959e[_0x3b015c(0xc7)](0x11)+'\x20'+a93_0x15e3ae[_0x3b015c(0xcf)](_0x3b015c(0xd5)));else{if(_0x5cdf01[_0x3b015c(0xec)]===_0x3b015c(0xb5))console[_0x3b015c(0xf1)]('\x20\x20'+_0x3d959e[_0x3b015c(0xc7)](0x11)+'\x20'+a93_0x15e3ae[_0x3b015c(0xd4)](_0x3b015c(0xef)));else _0x5cdf01['status']==='missing'?console[_0x3b015c(0xf1)]('\x20\x20'+_0x3d959e[_0x3b015c(0xc7)](0x11)+'\x20'+a93_0x15e3ae['gray'](_0x3b015c(0xaa))):(console[_0x3b015c(0xf1)]('\x20\x20'+_0x3d959e['padEnd'](0x11)+'\x20'+a93_0x15e3ae[_0x3b015c(0xc9)](_0x3b015c(0xdb))),console[_0x3b015c(0xf1)]('\x20\x20'+''[_0x3b015c(0xc7)](0x11)+'\x20'+a93_0x15e3ae[_0x3b015c(0xc9)](_0x5cdf01['message'])));}};_0x40e240(_0x31d5b8(0xaf),_0x4d1d8d),_0x40e240(_0x31d5b8(0xae),_0x44bf6f),console['log'](),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xe1)]('\x20\x20Merged\x20Config')),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xbd)]('\x20\x20─'[_0x31d5b8(0xee)](0x1e))),console[_0x31d5b8(0xf1)](_0x31d5b8(0xb7)+(_0x3d612f[_0x31d5b8(0xbc)]||a93_0x15e3ae['red'](_0x31d5b8(0xe0)))),console[_0x31d5b8(0xf1)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3d612f[_0x31d5b8(0xcd)]),console[_0x31d5b8(0xf1)](_0x31d5b8(0xd0)+_0x3d612f[_0x31d5b8(0xc6)]),console['log']('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3d612f[_0x31d5b8(0xb3)]),console[_0x31d5b8(0xf1)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x3d612f[_0x31d5b8(0xe4)]||a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xe5)))),console['log']('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x3d612f['currentApp']||a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xe5)))),console[_0x31d5b8(0xf1)](_0x31d5b8(0xd6)+(_0x3d612f['explicitAppName']||a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xe5)))),console[_0x31d5b8(0xf1)](_0x31d5b8(0xfa)+(_0x3d612f[_0x31d5b8(0xe6)]||a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xed)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x31d5b8(0xf1)](_0x31d5b8(0xbf)+(_0x3d612f[_0x31d5b8(0xba)]??a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xc2)))),console[_0x31d5b8(0xf1)](_0x31d5b8(0xde)+_0x3d612f[_0x31d5b8(0xf9)]),console['log']('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3d612f['verbose']),console[_0x31d5b8(0xf1)](_0x31d5b8(0xf4)+(_0x3d612f[_0x31d5b8(0xf8)]?a93_0x15e3ae[_0x31d5b8(0xcf)](_0x31d5b8(0xeb)+_0x3d612f[_0x31d5b8(0xf8)][_0x31d5b8(0xda)]+')'):_0x5e655e?a93_0x15e3ae[_0x31d5b8(0xcf)]('(set\x20via\x20file,\x20length='+_0x5e655e[_0x31d5b8(0xda)]+')'):a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xe5))));const _0x3bc063=Object[_0x31d5b8(0xb2)](_0x3d612f[_0x31d5b8(0xc8)]);if(_0x3bc063[_0x31d5b8(0xda)]>0x0){console[_0x31d5b8(0xf1)](),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xe1)](_0x31d5b8(0xe8))),console[_0x31d5b8(0xf1)](a93_0x15e3ae['gray']('\x20\x20─'[_0x31d5b8(0xee)](0x1e)));for(const _0x328ed6 of _0x3bc063){const _0x1bc2e4=_0x3d612f['apps'][_0x328ed6],_0xf627b5=_0x328ed6===_0x3d612f[_0x31d5b8(0xe4)],_0xafefc2=_0x328ed6===_0x3d612f['currentApp'],_0x2a0234=_0xafefc2?a93_0x15e3ae[_0x31d5b8(0xcf)](_0x31d5b8(0xcc)):'',_0xfb230e=_0xf627b5?'\x20(default)':'';console[_0x31d5b8(0xf1)]('\x20\x20'+_0x328ed6+_0xfb230e+_0x2a0234),console[_0x31d5b8(0xf1)](_0x31d5b8(0xb9)+_0x1bc2e4[_0x31d5b8(0xd8)]);const _0x25133a=buildAppDoctorFields(_0x1bc2e4,{'env':_0x3d612f[_0x31d5b8(0xcd)],'apiDir':_0x3d612f['raw'][_0x31d5b8(0xb3)]||DEFAULT_CONFIG_VALUES[_0x31d5b8(0xb3)],'cookie':_0x3d612f[_0x31d5b8(0xf8)]||_0x5e655e||undefined,'accessKey':_0x3d612f[_0x31d5b8(0xbe)]});console['log'](_0x31d5b8(0xb6)+_0x25133a[_0x31d5b8(0xcd)][_0x31d5b8(0xc1)]+'\x20\x20'+a93_0x15e3ae['gray']('('+_0x25133a[_0x31d5b8(0xcd)]['source']+')')),console['log'](_0x31d5b8(0xf2)+_0x25133a[_0x31d5b8(0xb3)][_0x31d5b8(0xc1)]+'\x20\x20'+a93_0x15e3ae[_0x31d5b8(0xbd)]('('+_0x25133a[_0x31d5b8(0xb3)][_0x31d5b8(0xe9)]+')'));const _0x19dfc8=_0x25133a[_0x31d5b8(0xf8)][_0x31d5b8(0xc1)]?a93_0x15e3ae[_0x31d5b8(0xcf)](_0x31d5b8(0xeb)+_0x25133a[_0x31d5b8(0xf8)][_0x31d5b8(0xc1)]['length']+')'):a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xe5));console['log'](_0x31d5b8(0xd1)+_0x19dfc8+'\x20\x20'+a93_0x15e3ae[_0x31d5b8(0xbd)]('('+_0x25133a[_0x31d5b8(0xf8)][_0x31d5b8(0xe9)]+')'));const _0x519f24=_0x25133a[_0x31d5b8(0xbe)][_0x31d5b8(0xc1)]?a93_0x15e3ae[_0x31d5b8(0xcf)](_0x31d5b8(0xeb)+_0x25133a[_0x31d5b8(0xbe)][_0x31d5b8(0xc1)][_0x31d5b8(0xda)]+')'):a93_0x15e3ae['gray'](_0x31d5b8(0xe5));console[_0x31d5b8(0xf1)](_0x31d5b8(0xe2)+_0x519f24+'\x20\x20'+a93_0x15e3ae[_0x31d5b8(0xbd)]('('+_0x25133a[_0x31d5b8(0xbe)]['source']+')'));}}console[_0x31d5b8(0xf1)](),console['log'](a93_0x15e3ae[_0x31d5b8(0xe1)](_0x31d5b8(0xf7))),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xbd)]('\x20\x20─'[_0x31d5b8(0xee)](0x1e))),console[_0x31d5b8(0xf1)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console['log'](_0x31d5b8(0xb0)+getUserDomain()),console[_0x31d5b8(0xf1)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console['log'](),console['log'](a93_0x15e3ae['bold'](_0x31d5b8(0xc5))),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xb8)['repeat'](0x1e)));if(_0x5e655e){const _0x1f7329=await getIsSessionValid();console[_0x31d5b8(0xf1)](_0x31d5b8(0xcb)+(_0x1f7329?a93_0x15e3ae['green'](_0x31d5b8(0xc4)):a93_0x15e3ae[_0x31d5b8(0xc9)](_0x31d5b8(0xab))));}else console[_0x31d5b8(0xf1)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a93_0x15e3ae[_0x31d5b8(0xc9)](_0x31d5b8(0xf0)));return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a93_0x1f1174(0xf5),'command':a93_0x1f1174(0xd3),'description':a93_0x1f1174(0xd2),'risk':a93_0x1f1174(0xe3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
function a92_0x39ba(){const _0x4f2a34=['arch','✗\x20Expired','appCode','log','5759448MPiBHV','repeat','status','length','defaultApp','12jaQXBJ','✓\x20Valid','locale','unknown','\x20doctor','cookie','verbose','\x20(default)','\x20←\x20current','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','1182611ndczcc','(set,\x20length=','22954725UZNOwV','Global','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','raw','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','explicitAppName','(not\x20set)','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','padEnd','\x20\x20Merged\x20Config','(none)','slice','apiDir','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','missing','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','source','(no\x20file)','env','green','(not\x20found)','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','168880MHoHLs','gray','version','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','pageSize','\x20\x20API\x20Endpoints','1682484CXyIeY','\x20\x20─','(missing)','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','(default:\x20','doctor','\x20\x20runtimeDomain:\x20\x20\x20','bold','format','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','apps','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','(set\x20via\x20file,\x20length=','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','Project','yellow','\x20\x20\x20\x20accessKey:\x20\x20','(default)','7XCfRPf','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Apps','value','1056890zyPDmD','194352iJZNGW','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','accessKey','✗\x20Not\x20logged\x20in','platform','red','empty','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','appcode','⚠\x20Empty\x20(treated\x20as\x20{})'];a92_0x39ba=function(){return _0x4f2a34;};return a92_0x39ba();}function a92_0x49e8(_0x416b06,_0x44215a){_0x416b06=_0x416b06-0xb7;const _0x39bacd=a92_0x39ba();let _0x49e878=_0x39bacd[_0x416b06];return _0x49e878;}const a92_0x23d4b5=a92_0x49e8;(function(_0x5457c2,_0xda7c56){const _0x38920e=a92_0x49e8,_0x5cdf14=_0x5457c2();while(!![]){try{const _0x2a8f31=-parseInt(_0x38920e(0xd7))/0x1+-parseInt(_0x38920e(0xb8))/0x2+parseInt(_0x38920e(0xf6))/0x3+parseInt(_0x38920e(0xb9))/0x4+-parseInt(_0x38920e(0xf0))/0x5*(parseInt(_0x38920e(0xcd))/0x6)+parseInt(_0x38920e(0x10b))/0x7*(-parseInt(_0x38920e(0xc8))/0x8)+parseInt(_0x38920e(0xd9))/0x9;if(_0x2a8f31===_0xda7c56)break;else _0x5cdf14['push'](_0x5cdf14['shift']());}catch(_0x30de54){_0x5cdf14['push'](_0x5cdf14['shift']());}}}(a92_0x39ba,0xa179a));import a92_0x497159 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x5bef95){const _0x539d8c=a92_0x49e8,_0x54841f=GIT_COMMIT!==_0x539d8c(0xd0)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x539d8c(0xe5)](0x0,0xa)+')':VERSION,_0x524c13=buildConfigFromFlags({}),_0x5b06df=getCookie();console[_0x539d8c(0xc7)](),console[_0x539d8c(0xc7)](a92_0x497159[_0x539d8c(0xff)](CLI_BIN_NAME+_0x539d8c(0xd1))),console['log'](a92_0x497159[_0x539d8c(0xf1)]('─'[_0x539d8c(0xc9)](0x32))),console[_0x539d8c(0xc7)](_0x539d8c(0x101)+_0x54841f),console['log'](_0x539d8c(0xe9)+process[_0x539d8c(0xf2)]),console[_0x539d8c(0xc7)](_0x539d8c(0xd6)+process[_0x539d8c(0xbd)]+'\x20'+process[_0x539d8c(0xc4)]),console['log'](),console[_0x539d8c(0xc7)](a92_0x497159['bold']('\x20\x20Config\x20Files')),console[_0x539d8c(0xc7)](a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xf7)[_0x539d8c(0xc9)](0x1e)));const _0x66491=getGlobalConfigPath(),_0x45a291=getProjectConfigPath();console[_0x539d8c(0xc7)](_0x539d8c(0xfa)+(_0x66491||a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xee)))),console['log'](_0x539d8c(0x106)+(_0x45a291||a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xee)))),console[_0x539d8c(0xc7)](),console[_0x539d8c(0xc7)](a92_0x497159['bold']('\x20\x20Config\x20JSON')),console[_0x539d8c(0xc7)](a92_0x497159[_0x539d8c(0xf1)]('\x20\x20─'[_0x539d8c(0xc9)](0x1e)));const _0x4664dc=(_0x1de1be,_0x273f8a)=>{const _0x2bc5e4=_0x539d8c;if(!_0x273f8a){console[_0x2bc5e4(0xc7)]('\x20\x20'+_0x1de1be['padEnd'](0x11)+'\x20'+a92_0x497159[_0x2bc5e4(0xf1)](_0x2bc5e4(0xeb)));return;}const _0x4ec82b=inspectCliConfigJsonFile(_0x273f8a);if(_0x4ec82b[_0x2bc5e4(0xca)]==='ok')console[_0x2bc5e4(0xc7)]('\x20\x20'+_0x1de1be[_0x2bc5e4(0xe2)](0x11)+'\x20'+a92_0x497159[_0x2bc5e4(0xed)](_0x2bc5e4(0xfb)));else{if(_0x4ec82b[_0x2bc5e4(0xca)]===_0x2bc5e4(0xbf))console[_0x2bc5e4(0xc7)]('\x20\x20'+_0x1de1be[_0x2bc5e4(0xe2)](0x11)+'\x20'+a92_0x497159[_0x2bc5e4(0x108)](_0x2bc5e4(0xc3)));else _0x4ec82b[_0x2bc5e4(0xca)]===_0x2bc5e4(0xe8)?console['log']('\x20\x20'+_0x1de1be['padEnd'](0x11)+'\x20'+a92_0x497159[_0x2bc5e4(0xf1)](_0x2bc5e4(0xf8))):(console[_0x2bc5e4(0xc7)]('\x20\x20'+_0x1de1be[_0x2bc5e4(0xe2)](0x11)+'\x20'+a92_0x497159[_0x2bc5e4(0xbe)]('✗\x20Invalid\x20JSON')),console['log']('\x20\x20'+''[_0x2bc5e4(0xe2)](0x11)+'\x20'+a92_0x497159[_0x2bc5e4(0xbe)](_0x4ec82b['message'])));}};_0x4664dc(_0x539d8c(0xda),_0x66491),_0x4664dc(_0x539d8c(0x107),_0x45a291),console[_0x539d8c(0xc7)](),console['log'](a92_0x497159[_0x539d8c(0xff)](_0x539d8c(0xe3))),console[_0x539d8c(0xc7)](a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xf7)[_0x539d8c(0xc9)](0x1e))),console['log'](_0x539d8c(0x10c)+(_0x524c13[_0x539d8c(0xc6)]||a92_0x497159[_0x539d8c(0xbe)](_0x539d8c(0xe0)))),console[_0x539d8c(0xc7)](_0x539d8c(0xc0)+_0x524c13[_0x539d8c(0xec)]),console[_0x539d8c(0xc7)](_0x539d8c(0xdb)+_0x524c13[_0x539d8c(0xcf)]),console[_0x539d8c(0xc7)]('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x524c13['apiDir']),console['log'](_0x539d8c(0xf3)+(_0x524c13[_0x539d8c(0xcc)]||a92_0x497159['gray']('(none)'))),console[_0x539d8c(0xc7)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x524c13[_0x539d8c(0xdc)]||a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xe4)))),console[_0x539d8c(0xc7)]('\x20\x20explicitAppName:\x20'+(_0x524c13[_0x539d8c(0xdf)]||a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xe4)))),console[_0x539d8c(0xc7)](_0x539d8c(0xf9)+(_0x524c13[_0x539d8c(0x100)]||a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xfc)+DEFAULT_CONFIG_VALUES[_0x539d8c(0x100)]+')'))),console[_0x539d8c(0xc7)](_0x539d8c(0xc1)+(_0x524c13[_0x539d8c(0xf4)]??a92_0x497159['gray'](_0x539d8c(0x10a)))),console[_0x539d8c(0xc7)](_0x539d8c(0xe1)+_0x524c13['riskLevel']),console[_0x539d8c(0xc7)](_0x539d8c(0xde)+_0x524c13[_0x539d8c(0xd3)]),console['log']('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x524c13[_0x539d8c(0xd2)]?a92_0x497159[_0x539d8c(0xed)]('(set,\x20length='+_0x524c13['cookie'][_0x539d8c(0xcb)]+')'):_0x5b06df?a92_0x497159[_0x539d8c(0xed)](_0x539d8c(0x105)+_0x5b06df['length']+')'):a92_0x497159['gray'](_0x539d8c(0xe4))));const _0x3d3d4e=Object['keys'](_0x524c13['apps']);if(_0x3d3d4e['length']>0x0){console[_0x539d8c(0xc7)](),console[_0x539d8c(0xc7)](a92_0x497159[_0x539d8c(0xff)](_0x539d8c(0x10d))),console[_0x539d8c(0xc7)](a92_0x497159['gray'](_0x539d8c(0xf7)[_0x539d8c(0xc9)](0x1e)));for(const _0x4e9218 of _0x3d3d4e){const _0x2d2479=_0x524c13[_0x539d8c(0x103)][_0x4e9218],_0x222805=_0x4e9218===_0x524c13['defaultApp'],_0xf7b4e9=_0x4e9218===_0x524c13[_0x539d8c(0xdc)],_0x3e8fd6=_0xf7b4e9?a92_0x497159[_0x539d8c(0xed)](_0x539d8c(0xd5)):'',_0x35382a=_0x222805?_0x539d8c(0xd4):'';console[_0x539d8c(0xc7)]('\x20\x20'+_0x4e9218+_0x35382a+_0x3e8fd6),console[_0x539d8c(0xc7)](_0x539d8c(0xba)+_0x2d2479[_0x539d8c(0xc2)]);const _0x58be59=buildAppDoctorFields(_0x2d2479,{'env':_0x524c13['env'],'apiDir':_0x524c13[_0x539d8c(0xdd)][_0x539d8c(0xe6)]||DEFAULT_CONFIG_VALUES[_0x539d8c(0xe6)],'cookie':_0x524c13[_0x539d8c(0xd2)]||_0x5b06df||undefined,'accessKey':_0x524c13[_0x539d8c(0xbb)]});console[_0x539d8c(0xc7)](_0x539d8c(0xef)+_0x58be59[_0x539d8c(0xec)]['value']+'\x20\x20'+a92_0x497159['gray']('('+_0x58be59[_0x539d8c(0xec)][_0x539d8c(0xea)]+')')),console['log']('\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20'+_0x58be59[_0x539d8c(0xe6)][_0x539d8c(0xb7)]+'\x20\x20'+a92_0x497159[_0x539d8c(0xf1)]('('+_0x58be59[_0x539d8c(0xe6)][_0x539d8c(0xea)]+')'));const _0x5185a1=_0x58be59[_0x539d8c(0xd2)]['value']?a92_0x497159[_0x539d8c(0xed)](_0x539d8c(0xd8)+_0x58be59['cookie'][_0x539d8c(0xb7)][_0x539d8c(0xcb)]+')'):a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xe4));console[_0x539d8c(0xc7)](_0x539d8c(0xe7)+_0x5185a1+'\x20\x20'+a92_0x497159[_0x539d8c(0xf1)]('('+_0x58be59[_0x539d8c(0xd2)][_0x539d8c(0xea)]+')'));const _0x5dcd19=_0x58be59[_0x539d8c(0xbb)][_0x539d8c(0xb7)]?a92_0x497159['green'](_0x539d8c(0xd8)+_0x58be59[_0x539d8c(0xbb)][_0x539d8c(0xb7)][_0x539d8c(0xcb)]+')'):a92_0x497159[_0x539d8c(0xf1)]('(none)');console[_0x539d8c(0xc7)](_0x539d8c(0x109)+_0x5dcd19+'\x20\x20'+a92_0x497159['gray']('('+_0x58be59['accessKey'][_0x539d8c(0xea)]+')'));}}console[_0x539d8c(0xc7)](),console[_0x539d8c(0xc7)](a92_0x497159[_0x539d8c(0xff)](_0x539d8c(0xf5))),console[_0x539d8c(0xc7)](a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xf7)['repeat'](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x539d8c(0xc7)](_0x539d8c(0x102)+getUserDomain()),console['log'](_0x539d8c(0xfe)+getRuntimeDomain()),console[_0x539d8c(0xc7)](),console['log'](a92_0x497159['bold']('\x20\x20Auth')),console['log'](a92_0x497159['gray'](_0x539d8c(0xf7)['repeat'](0x1e)));if(_0x5b06df){const _0x3a2431=await getIsSessionValid();console[_0x539d8c(0xc7)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3a2431?a92_0x497159['green'](_0x539d8c(0xce)):a92_0x497159[_0x539d8c(0xbe)](_0x539d8c(0xc5))));}else console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a92_0x497159[_0x539d8c(0xbe)](_0x539d8c(0xbc)));return console[_0x539d8c(0xc7)](),{'ok':!![]};}export const doctorDefinition={'service':a92_0x23d4b5(0xfd),'command':'check','description':a92_0x23d4b5(0x104),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a93_0x4dd6(){const _0x2090e7=['Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','432952yuXUHm','3339816hRuFwJ','filepath','Preview:\x20upload\x20','27515DAZIXK','trim','\x20to\x20development\x20app\x20','file','string','str','boolean','POST','bool','13333331IvIQFW','35FZMnzR','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','3810843tuPEnu','Uploaded\x20file:\x20','download','258GsKKyV','186198Omgpyw','10kbIlDE','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','20hRnKcW','query-url','filePath','File','path','78860FxMrPG','long-term','filePath\x20is\x20required.','appCode','read'];a93_0x4dd6=function(){return _0x2090e7;};return a93_0x4dd6();}const a93_0x1ffffe=a93_0x21e4;(function(_0x580747,_0x58fcda){const _0x1b8854=a93_0x21e4,_0x585e90=_0x580747();while(!![]){try{const _0x5e8325=-parseInt(_0x1b8854(0x9e))/0x1+parseInt(_0x1b8854(0x99))/0x2*(-parseInt(_0x1b8854(0x96))/0x3)+-parseInt(_0x1b8854(0xa6))/0x4+parseInt(_0x1b8854(0xa9))/0x5*(parseInt(_0x1b8854(0xb8))/0x6)+parseInt(_0x1b8854(0xb3))/0x7*(parseInt(_0x1b8854(0xa5))/0x8)+-parseInt(_0x1b8854(0xb5))/0x9*(-parseInt(_0x1b8854(0x97))/0xa)+parseInt(_0x1b8854(0xb2))/0xb;if(_0x5e8325===_0x58fcda)break;else _0x585e90['push'](_0x585e90['shift']());}catch(_0x4c7f2a){_0x585e90['push'](_0x585e90['shift']());}}}(a93_0x4dd6,0x9482a));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':'file','type':a93_0x1ffffe(0xad),'required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':a93_0x1ffffe(0xa7),'type':a93_0x1ffffe(0xad),'required':!![],'description':'Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a93_0x1ffffe(0xb7),'type':a93_0x1ffffe(0xaf),'description':a93_0x1ffffe(0x98)},LONG_TERM_FLAG={'name':a93_0x1ffffe(0x9f),'type':'boolean','description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x2ec760){const _0x367e72=a93_0x1ffffe,_0xcfad82=_0x2ec760[_0x367e72(0xaa)]();if(!_0xcfad82)throw CliErrors['validation'](_0x367e72(0xa0));return _0xcfad82;}function a93_0x21e4(_0x4d2cb9,_0x4a464b){_0x4d2cb9=_0x4d2cb9-0x96;const _0x4dd6a6=a93_0x4dd6();let _0x21e4d5=_0x4dd6a6[_0x4d2cb9];return _0x21e4d5;}const fileUpload={'service':a93_0x1ffffe(0xac),'command':'upload','description':a93_0x1ffffe(0xa3),'risk':a93_0x1ffffe(0xa2),'flags':[FILE_FLAG],async 'dryRun'(_0x54a2f7){const _0x172ba2=a93_0x1ffffe,_0x17be8b=requireDevelopmentUploadFile(_0x54a2f7[_0x172ba2(0xae)]('file'),_0x172ba2(0x9c));return{'method':_0x172ba2(0xb0),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x54a2f7['appCode'],'multipart':{'file':_0x17be8b}},'description':_0x172ba2(0xa8)+_0x17be8b[_0x172ba2(0x9d)]+_0x172ba2(0xab)+_0x54a2f7['appCode']};},async 'execute'(_0x54abdd){const _0x57ab66=a93_0x1ffffe,_0x3050cd=requireDevelopmentUploadFile(_0x54abdd[_0x57ab66(0xae)]('file'),'File'),_0x4ebb9b=await uploadDevelopmentFile(_0x54abdd[_0x57ab66(0xa1)],_0x3050cd['path']);return{'ok':!![],'data':_0x4ebb9b,'message':_0x4ebb9b[_0x57ab66(0x9b)]?_0x57ab66(0xb6)+_0x4ebb9b[_0x57ab66(0x9b)]+_0x57ab66(0xb4):_0x57ab66(0xa4)};}},fileQueryUrl={'service':a93_0x1ffffe(0xac),'command':a93_0x1ffffe(0x9a),'description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x4364b3){const _0x2ea5e8=a93_0x1ffffe,_0x4d99f1=requireFilePath(_0x4364b3[_0x2ea5e8(0xae)](_0x2ea5e8(0xa7))),_0x41bef0=await queryDevelopmentFileUrl(_0x4d99f1,{'download':_0x4364b3[_0x2ea5e8(0xb1)](_0x2ea5e8(0xb7)),'longTerm':_0x4364b3[_0x2ea5e8(0xb1)](_0x2ea5e8(0x9f))});return{'ok':!![],'data':_0x41bef0};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x1cb33b=a94_0x3507;function a94_0x3507(_0x14883f,_0x356d50){_0x14883f=_0x14883f-0xee;const _0xbafd57=a94_0xbafd();let _0x350742=_0xbafd57[_0x14883f];return _0x350742;}(function(_0x137cd0,_0x259410){const _0x2d27c4=a94_0x3507,_0x71402d=_0x137cd0();while(!![]){try{const _0x3cbb98=-parseInt(_0x2d27c4(0x110))/0x1+-parseInt(_0x2d27c4(0x102))/0x2+parseInt(_0x2d27c4(0xf4))/0x3+parseInt(_0x2d27c4(0x114))/0x4+-parseInt(_0x2d27c4(0xfe))/0x5*(-parseInt(_0x2d27c4(0xf8))/0x6)+-parseInt(_0x2d27c4(0x10e))/0x7+parseInt(_0x2d27c4(0xf3))/0x8;if(_0x3cbb98===_0x259410)break;else _0x71402d['push'](_0x71402d['shift']());}catch(_0x474034){_0x71402d['push'](_0x71402d['shift']());}}}(a94_0xbafd,0x90a55));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';function a94_0xbafd(){const _0x583540=['map','flagMissing','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','16236528nKCCqP','130716NXNyuP','yes','检测到旧配置文件,正在自动升级...\x0a','string','3059454OwNiDU','custom','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','\x20\x20Apps:\x20','str','appcode','5gxPLQw','production','appCode','bool','1008238Wxcnzc','validation','write','toLocaleString','some','\x20\x20Default:\x20','valid','defaultApp','log','Use\x20`','join','\x20\x20Env:\x20','7524153cfvLZP','Usage:\x20','449042iILSiE','global','nonInteractive','cwd','149848LICvEd','App\x20code\x20to\x20initialize\x20with','env','init','project'];a94_0xbafd=function(){return _0x583540;};return a94_0xbafd();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x49118d){return{'appCode':_0x49118d,'appName':_0x49118d};}function writeInitConfig(_0x188154,_0x2db1df,_0x13606e){const _0x41ec50=a94_0x3507,_0x5b6963=resolveWriteConfigPath(_0x188154),_0x4c821d=buildCanonicalProjectConfig({},{'appCodes':_0x2db1df[_0x41ec50(0xf0)](_0x8f292=>_0x8f292[_0x41ec50(0x100)]),'env':_0x13606e,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x41ec50(0x105)]()}});writeConfigFile(_0x5b6963,_0x4c821d);const _0x487b8a=_0x188154===_0x41ec50(0x111)?_0x41ec50(0x111):_0x41ec50(0xef);console['log']('\x0a✓\x20Successfully\x20initialized\x20'+_0x487b8a+'\x20config'),console['log'](_0x41ec50(0xfb)+_0x2db1df[_0x41ec50(0xf0)](_0x195f1f=>_0x195f1f[_0x41ec50(0x100)])[_0x41ec50(0x10c)](',\x20')),console[_0x41ec50(0x10a)](_0x41ec50(0x107)+_0x4c821d[_0x41ec50(0x109)]),console[_0x41ec50(0x10a)](_0x41ec50(0x10d)+_0x4c821d[_0x41ec50(0x116)]),console[_0x41ec50(0x10a)]('\x20\x20Config:\x20'+_0x5b6963);}async function runSmartInit(_0x10f00f){const _0x45afcc=a94_0x3507,_0x2a3958=process[_0x45afcc(0x113)](),_0xe97262=_0x10f00f[_0x45afcc(0x101)](_0x45afcc(0x111))?'global':_0x45afcc(0xef),_0x1624b5=_0x10f00f['str']('env')||'production',_0x368b62=_0x10f00f[_0x45afcc(0xfc)]('appcode')||undefined;if(_0xe97262===_0x45afcc(0xef)){const _0x3c659f=existsSync(resolve(_0x2a3958,NEW_CONFIG_NAME)),_0x4ca7e6=LEGACY_CONFIG_NAMES[_0x45afcc(0x106)](_0x21f95b=>existsSync(resolve(_0x2a3958,_0x21f95b)));if(_0x4ca7e6&&!_0x3c659f)return console['log'](_0x45afcc(0xf6)),upgradeApp(_0x10f00f['nonInteractive'],{'yes':_0x10f00f[_0x45afcc(0x101)](_0x45afcc(0xf5))});if(_0x3c659f)throw CliErrors['validation'](_0x45afcc(0xf2),_0x45afcc(0x10b)+CLI_BIN_NAME+'\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.');}if(_0x368b62){const _0x2a2417=validateAppcode(_0x368b62);if(!_0x2a2417[_0x45afcc(0x108)])throw CliErrors[_0x45afcc(0x103)](_0x2a2417['message']);writeInitConfig(_0xe97262,[syntheticApp(_0x368b62)],_0x1624b5);return;}if(_0x10f00f[_0x45afcc(0x112)])throw CliErrors[_0x45afcc(0xf1)](_0x45afcc(0xfd),_0x45afcc(0x10f)+CLI_BIN_NAME+_0x45afcc(0xfa));const _0x7ca5cd=getCookie(),_0x3a0ebd=await selectMultipleApps(_0x7ca5cd),_0x1a4cb3=_0x3a0ebd===_0x45afcc(0xf9)?[syntheticApp(await promptCustomAppcode())]:_0x3a0ebd;writeInitConfig(_0xe97262,_0x1a4cb3,_0x1624b5);}const initFlags=[{'name':a94_0x1cb33b(0x111),'type':'boolean','description':'Write\x20to\x20global\x20config\x20instead\x20of\x20project','default':![]},{'name':a94_0x1cb33b(0x116),'type':a94_0x1cb33b(0xf7),'description':'Target\x20environment','default':a94_0x1cb33b(0xff),'enum':[...RABETBASE_ENV_VALUES]},{'name':a94_0x1cb33b(0xfd),'type':a94_0x1cb33b(0xf7),'description':a94_0x1cb33b(0x115)},{'name':a94_0x1cb33b(0xf5),'type':'boolean','description':'Auto-confirm\x20prompts','default':![]}];export const initDefinitions=[{'service':a94_0x1cb33b(0xee),'command':'run','description':'Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','risk':a94_0x1cb33b(0x104),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x29775a){return await runSmartInit(_0x29775a),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2702c5,_0x15a8d){const _0xa2a866=a95_0x1e32,_0x37c3de=_0x2702c5();while(!![]){try{const _0x31a2f1=-parseInt(_0xa2a866(0xbe))/0x1*(-parseInt(_0xa2a866(0xba))/0x2)+parseInt(_0xa2a866(0xb9))/0x3+-parseInt(_0xa2a866(0xb8))/0x4*(parseInt(_0xa2a866(0xbc))/0x5)+-parseInt(_0xa2a866(0xb3))/0x6*(parseInt(_0xa2a866(0xb6))/0x7)+-parseInt(_0xa2a866(0xb7))/0x8*(-parseInt(_0xa2a866(0xb4))/0x9)+parseInt(_0xa2a866(0xbb))/0xa+parseInt(_0xa2a866(0xb5))/0xb*(parseInt(_0xa2a866(0xbd))/0xc);if(_0x31a2f1===_0x15a8d)break;else _0x37c3de['push'](_0x37c3de['shift']());}catch(_0x5a1e11){_0x37c3de['push'](_0x37c3de['shift']());}}}(a95_0x5b2e,0xbe3f6));import{issueReport}from'../../commands/issue/report.js';function a95_0x5b2e(){const _0x5c3672=['4103rZMAKG','7LAtIPl','584SlaAhk','56UWrBhR','4123149RABdBd','644348nqxNEw','4363620gEFBJL','325195VzXmna','9492zNjPGB','2xOCUPZ','6679566dToQdx','6525CAaipr'];a95_0x5b2e=function(){return _0x5c3672;};return a95_0x5b2e();}function a95_0x1e32(_0x2f1974,_0x4cdfaf){_0x2f1974=_0x2f1974-0xb3;const _0x5b2e21=a95_0x5b2e();let _0x1e328b=_0x5b2e21[_0x2f1974];return _0x1e328b;}export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a96_0x29bd(){const _0x3fec90=['validation_error','\x20issue\x20report\x20\x5c','replace','1735PrZQTQ','\x20\x20\x20\x20--title\x20\x22','config_missing','command','10RtmadQ','auth_required','9298968kUZpAU','service','code','RABETBASE_DISABLE_ISSUE_NUDGE','join','flag_missing','17653gbIHqj','1290808NqtWnd','132aCEquh','cancelled','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','network_error','14346abgSSC','issue','slice','unknown_command','4139163QJXpxA','length','trim','\x20\x20Set\x20','535764VVmLJH','message','18606940EmtyCa','\x22\x20\x5c','28lHEJcD'];a96_0x29bd=function(){return _0x3fec90;};return a96_0x29bd();}const a96_0x31feef=a96_0x379a;(function(_0x205ec2,_0xb1edfb){const _0x260406=a96_0x379a,_0x40154a=_0x205ec2();while(!![]){try{const _0x15ab5c=parseInt(_0x260406(0x105))/0x1*(parseInt(_0x260406(0x107))/0x2)+parseInt(_0x260406(0xf1))/0x3*(parseInt(_0x260406(0xf5))/0x4)+parseInt(_0x260406(0xf9))/0x5*(parseInt(_0x260406(0xe9))/0x6)+-parseInt(_0x260406(0xff))/0x7+parseInt(_0x260406(0x106))/0x8+parseInt(_0x260406(0xed))/0x9*(parseInt(_0x260406(0xfd))/0xa)+-parseInt(_0x260406(0xf3))/0xb;if(_0x15ab5c===_0xb1edfb)break;else _0x40154a['push'](_0x40154a['shift']());}catch(_0x2c2ca1){_0x40154a['push'](_0x40154a['shift']());}}}(a96_0x29bd,0xce969));import{CliError}from'../../errors.js';function a96_0x379a(_0x1b1dd5,_0xa1a910){_0x1b1dd5=_0x1b1dd5-0xe6;const _0x29bd0a=a96_0x29bd();let _0x379a56=_0x29bd0a[_0x1b1dd5];return _0x379a56;}import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a96_0x31feef(0x102);const NUDGE_SUPPRESSED_CODES=new Set([a96_0x31feef(0xe6),a96_0x31feef(0xfe),a96_0x31feef(0xfb),'not_in_project',a96_0x31feef(0xec),a96_0x31feef(0x104),a96_0x31feef(0xf6),a96_0x31feef(0xe8)]),defaultWriter=_0x2cbef7=>{process['stderr']['write'](_0x2cbef7);};export function shouldNudgeForError(_0x523501,_0x489c37){const _0x215623=a96_0x31feef;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x489c37[_0x215623(0x100)]===_0x215623(0xea)&&_0x489c37[_0x215623(0xfc)]==='report')return![];if(_0x523501 instanceof CliError)return!NUDGE_SUPPRESSED_CODES['has'](_0x523501[_0x215623(0x101)]);return!![];}export function printIssueReportNudgeForError(_0x2c6097,_0x4f4867,_0x472392=defaultWriter){if(!shouldNudgeForError(_0x2c6097,_0x4f4867))return;const _0x3a50e2=buildSuggestedTitle(_0x2c6097,_0x4f4867);_0x472392(formatNudge(_0x3a50e2));}function buildSuggestedTitle(_0x26d8d9,_0xa1ea25){const _0x3b21c6=a96_0x31feef,_0x21b647=_0x26d8d9 instanceof Error?_0x26d8d9[_0x3b21c6(0xf2)]:String(_0x26d8d9),_0x29c896=_0x21b647[_0x3b21c6(0xf8)](/[\r\n]+/g,'\x20')[_0x3b21c6(0xf8)](/\s+/g,'\x20')[_0x3b21c6(0xef)]()[_0x3b21c6(0xeb)](0x0,0x78)['replace'](/"/g,'\x5c\x22'),_0x3e5455=CLI_BIN_NAME+'\x20'+_0xa1ea25[_0x3b21c6(0x100)]+'\x20'+_0xa1ea25[_0x3b21c6(0xfc)];return _0x29c896[_0x3b21c6(0xee)]>0x0?_0x3e5455+':\x20'+_0x29c896:_0x3e5455;}function formatNudge(_0x16bdf6){const _0x22aa63=a96_0x31feef;return['','Hit\x20a\x20'+CLI_BIN_NAME+'\x20bug?\x20Help\x20us\x20fix\x20it:','\x20\x20'+CLI_BIN_NAME+_0x22aa63(0xf7),_0x22aa63(0xfa)+_0x16bdf6+_0x22aa63(0xf4),_0x22aa63(0xe7),'\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)',_0x22aa63(0xf0)+NUDGE_OPT_OUT_ENV+'=1\x20to\x20silence\x20this\x20hint.',''][_0x22aa63(0x103)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a97_0x333e7f=a97_0x46c3;(function(_0x141497,_0xd82e29){const _0x26d95a=a97_0x46c3,_0x16a242=_0x141497();while(!![]){try{const _0x1853d7=-parseInt(_0x26d95a(0x1a5))/0x1*(parseInt(_0x26d95a(0x19b))/0x2)+parseInt(_0x26d95a(0x187))/0x3*(-parseInt(_0x26d95a(0x1b8))/0x4)+parseInt(_0x26d95a(0x190))/0x5*(parseInt(_0x26d95a(0x193))/0x6)+parseInt(_0x26d95a(0x1a1))/0x7+-parseInt(_0x26d95a(0x1b6))/0x8*(parseInt(_0x26d95a(0x1a2))/0x9)+parseInt(_0x26d95a(0x1b5))/0xa+parseInt(_0x26d95a(0x1a4))/0xb;if(_0x1853d7===_0xd82e29)break;else _0x16a242['push'](_0x16a242['shift']());}catch(_0x3a1d7d){_0x16a242['push'](_0x16a242['shift']());}}}(a97_0x5544,0xcaef2));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';function a97_0x5544(){const _0x51e05b=['apiError','Failed\x20to\x20report\x20platform\x20issue:\x20','truncated','redactionKinds','issue.description_truncated','originalBytes','write','length','utf8','compress','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','Issue\x20description\x20file\x20is\x20empty:\x20','POST','description','11030200LkQcbo','7411512IxxYIY','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','4Hjjwce','One-line\x20issue\x20summary','trim','sanitize','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','title','Issue\x20description\x20cannot\x20be\x20empty.','otel://','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','description-file','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','1682664kVttSY','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','cwd','redactionCount','inline','validation','descriptionSource:\x20','push','File\x20not\x20found:\x20','25LvRYci','str','file','2478lMIvpB','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','join','flagMissing','string','\x20secret(s):\x20','issue.description_original_bytes','issue','97108lSZxkg','descriptionSource','descriptionFilePath','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','issue.description','issue.description_redactions','5723858JYAHbg','9ecglTP','\x20bytes','11296648PtpBJA','13VEyXyR','truncated:\x20original\x20'];a97_0x5544=function(){return _0x51e05b;};return a97_0x5544();}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=a97_0x333e7f(0x185);function a97_0x46c3(_0x199c16,_0x30f023){_0x199c16=_0x199c16-0x184;const _0x55441c=a97_0x5544();let _0x46c3ee=_0x55441c[_0x199c16];return _0x46c3ee;}export const issueReport={'service':a97_0x333e7f(0x19a),'command':'report','description':a97_0x333e7f(0x1bc),'risk':a97_0x333e7f(0x1ad),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a97_0x333e7f(0x1b0),'flags':[{'name':'title','type':a97_0x333e7f(0x197),'required':!![],'description':a97_0x333e7f(0x1b9)},{'name':a97_0x333e7f(0x1b4),'type':'string','description':a97_0x333e7f(0x188)},{'name':DESCRIPTION_FILE_FLAG,'type':a97_0x333e7f(0x197),'description':a97_0x333e7f(0x194)}],async 'validate'(_0x221e5a){const _0x2b5d68=a97_0x333e7f,_0x43d749=_0x221e5a['str'](_0x2b5d68(0x1bd))[_0x2b5d68(0x1ba)](),_0x5a19fb=_0x221e5a[_0x2b5d68(0x191)]('description')['trim'](),_0x50c254=_0x221e5a[_0x2b5d68(0x191)](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x43d749)throw CliErrors[_0x2b5d68(0x196)](_0x2b5d68(0x1bd),_0x2b5d68(0x1b7));const _0x272ed0=_0x5a19fb[_0x2b5d68(0x1ae)]>0x0,_0x4301a8=_0x50c254[_0x2b5d68(0x1ae)]>0x0;if(_0x272ed0===_0x4301a8)throw CliErrors[_0x2b5d68(0x18c)]('Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.',_0x2b5d68(0x184));if(_0x4301a8){const _0x33dd46=resolve(process[_0x2b5d68(0x189)](),_0x50c254);if(!existsSync(_0x33dd46))throw CliErrors[_0x2b5d68(0x18c)](_0x2b5d68(0x18f)+_0x33dd46);}},async 'dryRun'(_0x3b0c89){const _0xee7006=a97_0x333e7f,_0x771309=await prepareIssueReport(_0x3b0c89);return{'method':_0xee7006(0x1b3),'url':_0xee7006(0x1bf)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x771309[_0xee7006(0x1bd)],'issue.description':_0x771309[_0xee7006(0x1b4)],'issue.description_original_bytes':_0x771309[_0xee7006(0x1bb)][_0xee7006(0x1ac)],'issue.description_truncated':_0x771309[_0xee7006(0x1bb)][_0xee7006(0x1a9)],'issue.description_redactions':_0x771309[_0xee7006(0x1bb)]['redactionCount'],'issue.description_redaction_kinds':_0x771309[_0xee7006(0x1bb)][_0xee7006(0x1aa)][_0xee7006(0x195)](',')}},'description':['Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter',_0xee7006(0x18d)+_0x771309[_0xee7006(0x19c)],_0x771309[_0xee7006(0x19d)]?'descriptionFile:\x20'+_0x771309[_0xee7006(0x19d)]:null,_0x771309[_0xee7006(0x1bb)][_0xee7006(0x1a9)]?_0xee7006(0x1a6)+_0x771309[_0xee7006(0x1bb)]['originalBytes']+'\x20bytes':null,_0x771309[_0xee7006(0x1bb)]['redactionCount']>0x0?'redactions:\x20'+_0x771309[_0xee7006(0x1bb)][_0xee7006(0x18a)]+'\x20('+_0x771309[_0xee7006(0x1bb)][_0xee7006(0x1aa)][_0xee7006(0x195)](',\x20')+')':null]['filter'](Boolean)[_0xee7006(0x195)]('\x0a')};},async 'execute'(_0xbb9219){const _0xbb479f=a97_0x333e7f,_0x31d873=await prepareIssueReport(_0xbb9219);try{await sendPlatformIssueCollectLog({'title':_0x31d873['title'],'description':_0x31d873[_0xbb479f(0x1b4)],'sanitize':{'originalBytes':_0x31d873[_0xbb479f(0x1bb)][_0xbb479f(0x1ac)],'truncated':_0x31d873[_0xbb479f(0x1bb)][_0xbb479f(0x1a9)],'redactionCount':_0x31d873[_0xbb479f(0x1bb)]['redactionCount'],'redactionKinds':_0x31d873[_0xbb479f(0x1bb)]['redactionKinds']}});}catch(_0x4b25e6){throw CliErrors[_0xbb479f(0x1a7)](_0xbb479f(0x1a8)+(_0x4b25e6 instanceof Error?_0x4b25e6['message']:String(_0x4b25e6)),_0xbb479f(0x1b1));}return{'ok':!![],'message':buildResultMessage(_0x31d873[_0xbb479f(0x1bb)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':['issue.title',_0xbb479f(0x19f),_0xbb479f(0x199),_0xbb479f(0x1ab),_0xbb479f(0x1a0),'issue.description_redaction_kinds'],'issue':{'title':_0x31d873[_0xbb479f(0x1bd)],'descriptionLength':_0x31d873[_0xbb479f(0x1b4)][_0xbb479f(0x1ae)],'descriptionSource':_0x31d873[_0xbb479f(0x19c)],..._0x31d873[_0xbb479f(0x19d)]?{'descriptionFile':_0x31d873[_0xbb479f(0x19d)]}:{},'sanitize':{'originalBytes':_0x31d873[_0xbb479f(0x1bb)][_0xbb479f(0x1ac)],'truncated':_0x31d873['sanitize'][_0xbb479f(0x1a9)],'redactions':_0x31d873[_0xbb479f(0x1bb)][_0xbb479f(0x18a)],'redactionKinds':_0x31d873[_0xbb479f(0x1bb)]['redactionKinds']}}}};}};function buildResultMessage(_0x12bf1c){const _0x4aae71=a97_0x333e7f,_0x4c4079=[];return _0x12bf1c[_0x4aae71(0x1a9)]&&_0x4c4079[_0x4aae71(0x18e)]('truncated\x20from\x20'+_0x12bf1c[_0x4aae71(0x1ac)]+_0x4aae71(0x1a3)),_0x12bf1c[_0x4aae71(0x18a)]>0x0&&_0x4c4079[_0x4aae71(0x18e)]('redacted\x20'+_0x12bf1c[_0x4aae71(0x18a)]+_0x4aae71(0x198)+_0x12bf1c[_0x4aae71(0x1aa)]['join'](',\x20')),_0x4c4079[_0x4aae71(0x1ae)]===0x0?'Platform\x20issue\x20reported':'Platform\x20issue\x20reported\x20('+_0x4c4079[_0x4aae71(0x195)](';\x20')+')';}async function prepareIssueReport(_0x295d1b){const _0x109c00=a97_0x333e7f,_0xb64d85=_0x295d1b[_0x109c00(0x191)](_0x109c00(0x1bd))[_0x109c00(0x1ba)](),_0x53b113=_0x295d1b[_0x109c00(0x191)](_0x109c00(0x1b4)),_0x2ca72a=_0x295d1b[_0x109c00(0x191)](DESCRIPTION_FILE_FLAG)[_0x109c00(0x1ba)]();if(!_0x2ca72a){const _0x147792=_0x53b113;if(!_0x147792['trim']())throw CliErrors[_0x109c00(0x18c)](_0x109c00(0x1be),_0x109c00(0x186));const _0x47843a=sanitizeIssueDescription(_0x147792);return{'title':_0xb64d85,'description':_0x47843a[_0x109c00(0x1b4)],'descriptionSource':_0x109c00(0x18b),'sanitize':_0x47843a};}const _0x2252a8=resolve(process[_0x109c00(0x189)](),_0x2ca72a),_0x1d1bd5=await readFile(_0x2252a8,_0x109c00(0x1af));if(!_0x1d1bd5[_0x109c00(0x1ba)]())throw CliErrors[_0x109c00(0x18c)](_0x109c00(0x1b2)+_0x2252a8,_0x109c00(0x19e));const _0x335ea9=sanitizeIssueDescription(_0x1d1bd5);return{'title':_0xb64d85,'description':_0x335ea9[_0x109c00(0x1b4)],'descriptionSource':_0x109c00(0x192),'descriptionFilePath':_0x2252a8,'sanitize':_0x335ea9};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a98_0x475f(){const _0x551cbf=['length','cookie','max','2752260MhtWeD','590WWwvAD','label','private-key','subarray','203097IYKgSW','byteLength','25pLLoWy','838280ULFUNF','bearer-jwt','access-key','4xqWUNb','61566dhVNMx','9xjqlbf','REDACTED:cookie','8aVPbLI','13981EWYDVP','pattern','replace','302259LuCQwc','__RB_OSS_ID_','10764948zgZsxl','from','utf8','restore','REDACTED:bearer-jwt','REDACTED:authorization','slice','toString','push'];a98_0x475f=function(){return _0x551cbf;};return a98_0x475f();}function a98_0x5e9d(_0x27a121,_0x6f3204){_0x27a121=_0x27a121-0x91;const _0x475f7b=a98_0x475f();let _0x5e9dda=_0x475f7b[_0x27a121];return _0x5e9dda;}const a98_0x3544c8=a98_0x5e9d;(function(_0x1e3779,_0x2b29ef){const _0x368d29=a98_0x5e9d,_0x2de338=_0x1e3779();while(!![]){try{const _0x1f1de7=-parseInt(_0x368d29(0x99))/0x1*(parseInt(_0x368d29(0x9f))/0x2)+parseInt(_0x368d29(0xa7))/0x3*(parseInt(_0x368d29(0xa3))/0x4)+-parseInt(_0x368d29(0x9b))/0x5*(parseInt(_0x368d29(0xa0))/0x6)+-parseInt(_0x368d29(0x94))/0x7+-parseInt(_0x368d29(0x9c))/0x8*(parseInt(_0x368d29(0xa1))/0x9)+-parseInt(_0x368d29(0x95))/0xa*(-parseInt(_0x368d29(0xa4))/0xb)+parseInt(_0x368d29(0xa9))/0xc;if(_0x1f1de7===_0x2b29ef)break;else _0x2de338['push'](_0x2de338['shift']());}catch(_0x1d64ac){_0x2de338['push'](_0x2de338['shift']());}}}(a98_0x475f,0x353fe));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE='\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]',REDACTION_RULES=[{'kind':a98_0x3544c8(0x92),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a98_0x3544c8(0xa2)},{'kind':'authorization','pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a98_0x3544c8(0xae)},{'kind':a98_0x3544c8(0x97),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':'REDACTED:private-key'},{'kind':a98_0x3544c8(0x9e),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':'REDACTED:access-key'},{'kind':'password','pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':'REDACTED:password'},{'kind':a98_0x3544c8(0x9d),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a98_0x3544c8(0xad)}];export function sanitizeIssueDescription(_0x2ed283){const _0x6e90ac=a98_0x3544c8,_0x1d7ad3=Buffer[_0x6e90ac(0x9a)](_0x2ed283,_0x6e90ac(0xab)),_0x3ce759=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0xee16da=_0x2ed283,_0x217945=0x0;const _0x4ec54d=[];if(!_0x3ce759){const _0x231e0f=protectOssAccessKeyIds(_0xee16da);_0xee16da=_0x231e0f['description'];for(const _0x5d29aa of REDACTION_RULES){let _0x4e6543=0x0;_0xee16da=_0xee16da[_0x6e90ac(0xa6)](_0x5d29aa[_0x6e90ac(0xa5)],(_0x48c77e,_0x59a2cc)=>{const _0x38d7e0=_0x6e90ac;_0x4e6543+=0x1;const _0x7d0c6d=typeof _0x59a2cc==='string'?_0x59a2cc:'';return _0x7d0c6d+'['+_0x5d29aa[_0x38d7e0(0x96)]+']';}),_0x4e6543>0x0&&(_0x217945+=_0x4e6543,!_0x4ec54d['includes'](_0x5d29aa['kind'])&&_0x4ec54d[_0x6e90ac(0xb1)](_0x5d29aa['kind']));}_0xee16da=_0x231e0f[_0x6e90ac(0xac)](_0xee16da);}let _0x3a2eda=![];if(Buffer['byteLength'](_0xee16da,'utf8')>ISSUE_DESCRIPTION_MAX_BYTES){_0x3a2eda=!![];const _0x229c31=Buffer['byteLength'](TRUNCATION_NOTICE,_0x6e90ac(0xab)),_0x16f4b4=Math[_0x6e90ac(0x93)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x229c31);_0xee16da=sliceUtf8Bytes(_0xee16da,_0x16f4b4)+TRUNCATION_NOTICE;}return{'description':_0xee16da,'originalBytes':_0x1d7ad3,'truncated':_0x3a2eda,'redactionCount':_0x217945,'redactionKinds':_0x4ec54d};}function protectOssAccessKeyIds(_0x27c2a0){const _0x227565=a98_0x3544c8,_0x2e21ae=[],_0x3f4a82=_0x27c2a0[_0x227565(0xa6)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x56045c,_0x10bbfb)=>{const _0x1ce1f3=_0x227565,_0x56e2a6=_0x2e21ae[_0x1ce1f3(0xb1)](_0x56045c[_0x1ce1f3(0xaf)](_0x10bbfb[_0x1ce1f3(0x91)]))-0x1;return _0x10bbfb+_0x1ce1f3(0xa8)+_0x56e2a6+'__';});return{'description':_0x3f4a82,'restore':_0x3f58a8=>_0x3f58a8[_0x227565(0xa6)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x5afd3a,_0x1d693d,_0x409616)=>{const _0x2eac67=_0x2e21ae[Number(_0x409616)];return _0x2eac67===undefined?_0x5afd3a:''+_0x1d693d+_0x2eac67;})};}function sliceUtf8Bytes(_0x83416f,_0x565d9d){const _0x2edf95=a98_0x3544c8;if(_0x565d9d<=0x0)return'';const _0x216432=Buffer[_0x2edf95(0xaa)](_0x83416f,_0x2edf95(0xab));if(_0x216432[_0x2edf95(0x9a)]<=_0x565d9d)return _0x83416f;let _0x59615a=_0x565d9d;while(_0x59615a>0x0){const _0x208eac=_0x216432[_0x59615a];if(_0x208eac===undefined||(_0x208eac&0xc0)!==0x80)break;_0x59615a-=0x1;}return _0x216432[_0x2edf95(0x98)](0x0,_0x59615a)[_0x2edf95(0xb0)]('utf8');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x1b8c62=a99_0x5028;(function(_0x43b9e1,_0xcb2403){const _0x4fcf14=a99_0x5028,_0x3c8af6=_0x43b9e1();while(!![]){try{const _0x5d5696=parseInt(_0x4fcf14(0x185))/0x1*(parseInt(_0x4fcf14(0x17e))/0x2)+-parseInt(_0x4fcf14(0x17f))/0x3*(parseInt(_0x4fcf14(0x195))/0x4)+-parseInt(_0x4fcf14(0x17b))/0x5*(parseInt(_0x4fcf14(0x165))/0x6)+parseInt(_0x4fcf14(0x18d))/0x7*(parseInt(_0x4fcf14(0x186))/0x8)+-parseInt(_0x4fcf14(0x168))/0x9+-parseInt(_0x4fcf14(0x16d))/0xa*(-parseInt(_0x4fcf14(0x17a))/0xb)+-parseInt(_0x4fcf14(0x17c))/0xc*(-parseInt(_0x4fcf14(0x18f))/0xd);if(_0x5d5696===_0xcb2403)break;else _0x3c8af6['push'](_0x3c8af6['shift']());}catch(_0x33e82a){_0x3c8af6['push'](_0x3c8af6['shift']());}}}(a99_0x3fb0,0x99441));function a99_0x5028(_0x5f2c0f,_0x1fc1b1){_0x5f2c0f=_0x5f2c0f-0x163;const _0x3fb09f=a99_0x3fb0();let _0x5028c5=_0x3fb09f[_0x5f2c0f];return _0x5028c5;}import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';function a99_0x3fb0(){const _0x397e79=['\x20for\x20','--file\x20is\x20required.','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.','file','Created\x20company\x20knowledge\x20base\x20','\x20with\x20title\x20','7lUapLb','kb_create_outcome_unknown','78AxKIvr','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','company','contentHash','string','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','2388YYBKRP','Company\x20knowledge\x20base\x20','\x20--format\x20compress`\x20before\x20choosing\x20update.','654gImSPs','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','3174741RYqpQu','title','cookie','length','rabetbase\x20kb\x20list\x20--title\x20','4470eXszxR','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','content','/admin/knowledge-base/create','high-risk-write','Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','str','\x20--format\x20compress','POST','stringify','byteSize','Knowledge-base\x20title','appCode','5291PfJVNG','31785DxmHbp','3081252FJPCXL','kb_file_required','6vWICKZ','4443ukDvRP','--title\x20is\x20required.','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','create','kb_already_exists','kb_verification_failed','119902hyALko','3538056TJFtCG'];a99_0x3fb0=function(){return _0x397e79;};return a99_0x3fb0();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const CREATE_PATH=a99_0x1b8c62(0x170);function readCreateInput(_0x57b821){const _0x2b2f16=a99_0x1b8c62,_0xd46724=_0x57b821[_0x2b2f16(0x173)](_0x2b2f16(0x169))['trim']();if(!_0xd46724)throw kbError('kb_title_required',_0x2b2f16(0x180));const _0x4c29b8=_0x57b821[_0x2b2f16(0x173)](_0x2b2f16(0x18a))['trim']();if(!_0x4c29b8)throw kbError(_0x2b2f16(0x17d),_0x2b2f16(0x188),_0x2b2f16(0x189));return{'title':_0xd46724,'file':_0x4c29b8};}async function prepareCreate(_0xa9e1ab){const _0x4f6a83=a99_0x1b8c62,_0xb6a2c6=readCreateInput(_0xa9e1ab),_0x2384ba=await readKbFile(_0xb6a2c6[_0x4f6a83(0x18a)]),_0x155698=await fetchAllCompanyKnowledgeBases(_0xa9e1ab,{'title':_0xb6a2c6[_0x4f6a83(0x169)]}),_0x3d9751=findExactCompanyKnowledgeBases(_0x155698,_0xa9e1ab['appCode'],_0xb6a2c6[_0x4f6a83(0x169)]);if(_0x3d9751[_0x4f6a83(0x16b)]>0x0)throw kbError(_0x4f6a83(0x183),'Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20'+_0xa9e1ab[_0x4f6a83(0x179)]+_0x4f6a83(0x18c)+_0xb6a2c6['title']+'.',_0x4f6a83(0x190)+_0x3d9751[0x0]['id']+_0x4f6a83(0x164));return{..._0xb6a2c6,'content':_0x2384ba};}function plannedAfter(_0x153cb1,_0x26470c){const _0x4f3c53=a99_0x1b8c62;return{'scope':_0x4f3c53(0x191),'appCode':_0x153cb1['appCode'],'title':_0x26470c[_0x4f3c53(0x169)],'contentByteSize':_0x26470c['content'][_0x4f3c53(0x177)],'contentHash':_0x26470c[_0x4f3c53(0x16f)][_0x4f3c53(0x192)]};}function verifyCreatedState(_0x335e6b,_0x20da43,_0x438484){const _0x3c62d2=a99_0x1b8c62;assertCompanyKnowledgeBase(_0x438484,_0x335e6b[_0x3c62d2(0x179)],_0x438484['id']);const _0x2f2bc6=inspectKbContent(_0x438484[_0x3c62d2(0x16f)]);if(_0x438484[_0x3c62d2(0x169)]!==_0x20da43[_0x3c62d2(0x169)]||_0x2f2bc6[_0x3c62d2(0x192)]!==_0x20da43['content'][_0x3c62d2(0x192)])throw kbError(_0x3c62d2(0x184),_0x3c62d2(0x163)+_0x438484['id']+'\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.',_0x3c62d2(0x16e)+_0x438484['id']+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');return projectKb(_0x438484);}export const kbCreate={'service':'kb','command':a99_0x1b8c62(0x182),'description':a99_0x1b8c62(0x172),'risk':a99_0x1b8c62(0x171),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a99_0x1b8c62(0x169),'type':'string','required':!![],'description':a99_0x1b8c62(0x178)},{'name':'file','type':a99_0x1b8c62(0x193),'required':!![],'description':a99_0x1b8c62(0x181)}],async 'validate'(_0x5847a7){readCreateInput(_0x5847a7),requireKbExplicitYes(_0x5847a7);},async 'dryRun'(_0x3afed6){const _0x17df2c=a99_0x1b8c62,_0x433751=await prepareCreate(_0x3afed6);return asDryRunResult({'operation':_0x17df2c(0x182),'selector':{'scope':_0x17df2c(0x191),'appCode':_0x3afed6[_0x17df2c(0x179)],'title':_0x433751[_0x17df2c(0x169)]},'before':null,'after':plannedAfter(_0x3afed6,_0x433751),'dryRun':!![],'backend':{'method':_0x17df2c(0x175),'path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':_0x17df2c(0x16c)+JSON[_0x17df2c(0x176)](_0x433751[_0x17df2c(0x169)])+_0x17df2c(0x174)}},{'method':_0x17df2c(0x175),'url':CREATE_PATH});},async 'execute'(_0x2de022){const _0x3fe52a=a99_0x1b8c62;requireKbExplicitYes(_0x2de022);const _0x2633b2=await prepareCreate(_0x2de022);let _0x2e76ce,_0x42ed86=![];try{const _0x3f4df0=await createEnterpriseKnowledgeBase(_0x2de022[_0x3fe52a(0x16a)],{'appCode':_0x2de022['appCode'],'title':_0x2633b2[_0x3fe52a(0x169)],'content':_0x2633b2[_0x3fe52a(0x16f)][_0x3fe52a(0x16f)]});assertCompanyKnowledgeBase(_0x3f4df0,_0x2de022[_0x3fe52a(0x179)],_0x3f4df0['id']),_0x2e76ce=_0x3f4df0['id'];}catch(_0xefdd9c){if(!isPlatformTransportFailure(_0xefdd9c))throw _0xefdd9c;_0x42ed86=!![];}if(_0x2e76ce===undefined){const _0xb24a70=await verifyKbMutationReadback(_0x3fe52a(0x182),!![],()=>fetchAllCompanyKnowledgeBases(_0x2de022,{'title':_0x2633b2[_0x3fe52a(0x169)]})),_0xaeeeaa=findExactCompanyKnowledgeBases(_0xb24a70,_0x2de022['appCode'],_0x2633b2['title']);if(_0xaeeeaa[_0x3fe52a(0x16b)]!==0x1)throw kbError(_0x3fe52a(0x18e),_0x3fe52a(0x194)+_0xaeeeaa[_0x3fe52a(0x16b)]+'.',_0x3fe52a(0x166));_0x2e76ce=_0xaeeeaa[0x0]['id'];}const _0x516c2d=await verifyKbMutationReadback(_0x3fe52a(0x182),_0x42ed86,()=>requireKb(_0x2de022,_0x2e76ce)),_0x3c72f0=verifyCreatedState(_0x2de022,_0x2633b2,_0x516c2d),_0x449260=_0x42ed86?[_0x3fe52a(0x167)]:[];return{'ok':!![],'data':{'operation':_0x3fe52a(0x182),'selector':{'id':_0x3c72f0['id'],'scope':'company','appCode':_0x3c72f0['appCode']},'before':null,'after':_0x3c72f0,'dryRun':![],'backend':{'method':_0x3fe52a(0x175),'path':CREATE_PATH},'warnings':_0x449260,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x42ed86,'lookupCommand':'rabetbase\x20kb\x20detail\x20--id\x20'+_0x3c72f0['id']+_0x3fe52a(0x174)}},'message':_0x3fe52a(0x18b)+_0x3c72f0['id']+_0x3fe52a(0x187)+_0x3c72f0[_0x3fe52a(0x179)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a100_0x26d623=a100_0x9777;function a100_0xe557(){const _0xec8c33=['POST','17407yRsjZS','Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','kb_expected_version_invalid','isSafeInteger','286315JqKGPh','verified','48sRndTd','5218392gjwKfh','cookie','kb_delete_outcome_unknown','\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made','Company\x20knowledge\x20base\x20','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','company','Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version','expected-version','28CkMjLp','600801mwYWIb','flag','\x20remains\x20readable\x20after\x20delete.','number','unshift','rabetbase\x20kb\x20detail\x20--id\x20','delete','4771674BFthYp','\x20--format\x20compress','/admin/knowledge-base/delete','1859828dESaLK','already_absent','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','snapshotHash','3701873CVnedU','Company\x20knowledge-base\x20id','appCode','Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.'];a100_0xe557=function(){return _0xec8c33;};return a100_0xe557();}(function(_0x4fc664,_0x108ce6){const _0xc449c5=a100_0x9777,_0x3124b0=_0x4fc664();while(!![]){try{const _0x1ab364=parseInt(_0xc449c5(0x1f2))/0x1*(-parseInt(_0xc449c5(0x202))/0x2)+-parseInt(_0xc449c5(0x203))/0x3+-parseInt(_0xc449c5(0x1e9))/0x4+parseInt(_0xc449c5(0x1f6))/0x5*(-parseInt(_0xc449c5(0x1f8))/0x6)+parseInt(_0xc449c5(0x1ed))/0x7+parseInt(_0xc449c5(0x1f9))/0x8+parseInt(_0xc449c5(0x20a))/0x9;if(_0x1ab364===_0x108ce6)break;else _0x3124b0['push'](_0x3124b0['shift']());}catch(_0x51eb35){_0x3124b0['push'](_0x3124b0['shift']());}}}(a100_0xe557,0x540ea));import{deleteEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertExpectedKbVersion,getKbOrNull,kbError,projectKb,readKbId,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const DELETE_PATH=a100_0x26d623(0x1e8),RAG_WARNING=a100_0x26d623(0x1f0),NON_ATOMIC_WARNING='--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20delete\x20contract\x20has\x20no\x20version\x20predicate.';function readExpectedVersion(_0x4eba3e){const _0x43c3ca=a100_0x26d623,_0x2205ba=_0x4eba3e[_0x43c3ca(0x204)](_0x43c3ca(0x201));if(_0x2205ba===undefined)return undefined;const _0x32a741=Number(_0x2205ba);if(!Number[_0x43c3ca(0x1f5)](_0x32a741)||_0x32a741<0x0)throw kbError(_0x43c3ca(0x1f4),_0x43c3ca(0x1eb));return _0x32a741;}function noOpData(_0x1f806a,_0x59c672,_0x1dde99){const _0x2fe090=a100_0x26d623;return{'operation':'no_op','selector':{'id':_0x59c672,'scope':_0x2fe090(0x1ff),'appCode':_0x1f806a[_0x2fe090(0x1ef)]},'before':null,'after':null,'dryRun':_0x1dde99,'deleteCalled':![],'backend':{'method':_0x2fe090(0x1f1),'path':DELETE_PATH},'warnings':[],'verification':{'status':_0x2fe090(0x1ea),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}function a100_0x9777(_0xabcb23,_0x50c558){_0xabcb23=_0xabcb23-0x1e7;const _0xe5576a=a100_0xe557();let _0x9777f4=_0xe5576a[_0xabcb23];return _0x9777f4;}export const kbDelete={'service':'kb','command':a100_0x26d623(0x209),'description':a100_0x26d623(0x1f3),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':'number','required':!![],'description':a100_0x26d623(0x1ee)},{'name':a100_0x26d623(0x201),'type':a100_0x26d623(0x206),'required':![],'description':a100_0x26d623(0x200)}],async 'validate'(_0xb94e82){readKbId(_0xb94e82),readExpectedVersion(_0xb94e82),requireKbExplicitYes(_0xb94e82);},async 'dryRun'(_0x40d3f9){const _0x18a705=a100_0x26d623,_0x23b545=readKbId(_0x40d3f9),_0x5d388f=readExpectedVersion(_0x40d3f9),_0x11ad0f=await getKbOrNull(_0x40d3f9,_0x23b545);if(!_0x11ad0f)return asDryRunResult(noOpData(_0x40d3f9,_0x23b545,!![]),{'method':_0x18a705(0x1f1),'url':DELETE_PATH});assertExpectedKbVersion(_0x11ad0f,_0x5d388f);const _0x3cb4ba=projectKb(_0x11ad0f),_0x242026=[RAG_WARNING];if(_0x5d388f!==undefined)_0x242026[_0x18a705(0x207)](NON_ATOMIC_WARNING);return asDryRunResult({'operation':'delete','selector':{'id':_0x3cb4ba['id'],'scope':_0x18a705(0x1ff),'appCode':_0x3cb4ba[_0x18a705(0x1ef)]},'before':_0x3cb4ba,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':_0x18a705(0x1f1),'path':DELETE_PATH},'warnings':_0x242026,'verification':{'expectedVersion':_0x5d388f??null,'atomicCompareAndSet':![],'snapshotHash':_0x3cb4ba[_0x18a705(0x1ec)],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x18a705(0x208)+_0x3cb4ba['id']+'\x20--format\x20compress'}},{'method':_0x18a705(0x1f1),'url':DELETE_PATH});},async 'execute'(_0x1952d1){const _0x47fc4f=a100_0x26d623;requireKbExplicitYes(_0x1952d1);const _0x3517d2=readKbId(_0x1952d1),_0x44b2a3=readExpectedVersion(_0x1952d1),_0x901510=await getKbOrNull(_0x1952d1,_0x3517d2);if(!_0x901510)return{'ok':!![],'data':noOpData(_0x1952d1,_0x3517d2,![]),'message':_0x47fc4f(0x1fd)+_0x3517d2+_0x47fc4f(0x1fc)};assertExpectedKbVersion(_0x901510,_0x44b2a3);const _0x17d814=projectKb(_0x901510);let _0x165455=![];try{await deleteEnterpriseKnowledgeBase(_0x1952d1[_0x47fc4f(0x1fa)],_0x3517d2);}catch(_0x11e213){if(!isPlatformTransportFailure(_0x11e213))throw _0x11e213;_0x165455=!![];}const _0x12ab89=await verifyKbMutationReadback(_0x47fc4f(0x209),_0x165455,()=>getKbOrNull(_0x1952d1,_0x3517d2));if(_0x12ab89)throw kbError(_0x165455?_0x47fc4f(0x1fb):'kb_verification_failed','Company\x20knowledge\x20base\x20'+_0x3517d2+_0x47fc4f(0x205),'Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x3517d2+_0x47fc4f(0x1fe));const _0x54e79d=[RAG_WARNING];if(_0x44b2a3!==undefined)_0x54e79d[_0x47fc4f(0x207)](NON_ATOMIC_WARNING);return _0x165455&&_0x54e79d[_0x47fc4f(0x207)]('Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':'delete','selector':{'id':_0x17d814['id'],'scope':_0x47fc4f(0x1ff),'appCode':_0x17d814['appCode']},'before':_0x17d814,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':_0x47fc4f(0x1f1),'path':DELETE_PATH},'warnings':_0x54e79d,'verification':{'status':_0x47fc4f(0x1f7),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0x165455,'lookupCommand':_0x47fc4f(0x208)+_0x17d814['id']+_0x47fc4f(0x1e7)}},'message':'Soft-deleted\x20company\x20knowledge\x20base\x20'+_0x17d814['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a101_0x4855(_0x4c5798,_0x196ddd){_0x4c5798=_0x4c5798-0xfc;const _0x28cbe9=a101_0x28cb();let _0x4855a6=_0x28cbe9[_0x4c5798];return _0x4855a6;}const a101_0x538dda=a101_0x4855;function a101_0x28cb(){const _0x46ea3a=['4147506obemMH','103527dIETxT','number','5292176pezHcA','3071712jAqQsb','330910NDawlf','Company\x20knowledge-base\x20id','6KNCkgM','68EdQOLw','Show\x20one\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','17786hjKCfr','29ViqQCV','14363790DvThiO'];a101_0x28cb=function(){return _0x46ea3a;};return a101_0x28cb();}(function(_0x2107f7,_0xd1249c){const _0x2c755a=a101_0x4855,_0x5601d4=_0x2107f7();while(!![]){try{const _0xbc8b56=-parseInt(_0x2c755a(0x101))/0x1*(parseInt(_0x2c755a(0x100))/0x2)+parseInt(_0x2c755a(0x104))/0x3*(parseInt(_0x2c755a(0xfe))/0x4)+-parseInt(_0x2c755a(0x108))/0x5*(parseInt(_0x2c755a(0xfd))/0x6)+parseInt(_0x2c755a(0x107))/0x7+parseInt(_0x2c755a(0x106))/0x8+parseInt(_0x2c755a(0x103))/0x9+-parseInt(_0x2c755a(0x102))/0xa;if(_0xbc8b56===_0xd1249c)break;else _0x5601d4['push'](_0x5601d4['shift']());}catch(_0x5e87e8){_0x5601d4['push'](_0x5601d4['shift']());}}}(a101_0x28cb,0x5e927));import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';export const kbDetail={'service':'kb','command':'detail','description':a101_0x538dda(0xff),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a101_0x538dda(0x105),'required':!![],'description':a101_0x538dda(0xfc)}],async 'validate'(_0x4565a0){readKbId(_0x4565a0);},async 'execute'(_0x2457e9){const _0x571658=readKbId(_0x2457e9),_0x3eb7fc=await requireKb(_0x2457e9,_0x571658);return{'ok':!![],'data':{'knowledgeBase':projectKb(_0x3eb7fc)},'message':'Loaded\x20company\x20knowledge\x20base\x20'+_0x571658};}};
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a81c3,_0xd045cf){const _0x11f966=a102_0x7871,_0x5ca006=_0x2a81c3();while(!![]){try{const _0x43fe3c=-parseInt(_0x11f966(0x79))/0x1*(-parseInt(_0x11f966(0x78))/0x2)+parseInt(_0x11f966(0x77))/0x3+-parseInt(_0x11f966(0x7d))/0x4+parseInt(_0x11f966(0x7c))/0x5+parseInt(_0x11f966(0x7b))/0x6+parseInt(_0x11f966(0x7e))/0x7+-parseInt(_0x11f966(0x7a))/0x8;if(_0x43fe3c===_0xd045cf)break;else _0x5ca006['push'](_0x5ca006['shift']());}catch(_0x1c874a){_0x5ca006['push'](_0x5ca006['shift']());}}}(a102_0x3eca,0x6ec96));function a102_0x7871(_0x26ff18,_0x488fb7){_0x26ff18=_0x26ff18-0x77;const _0x3eca13=a102_0x3eca();let _0x78711e=_0x3eca13[_0x26ff18];return _0x78711e;}import{kbList}from'../../commands/kb/list.js';import{kbDetail}from'../../commands/kb/detail.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,kbCreate,kbUpdate,kbDelete];function a102_0x3eca(){const _0x25a375=['11922152mTNRjo','4547910FprDNL','3237290hLxwqs','1052148UKbSVF','4299575ounIrf','1995odXQsH','10jswVEx','37351csOqbS'];a102_0x3eca=function(){return _0x25a375;};return a102_0x3eca();}
|
package/lib/commands/kb/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a103_0x5e3afa=a103_0x1c41;(function(_0x22e1a5,_0x5b1e87){const _0x71c443=a103_0x1c41,_0x57b83d=_0x22e1a5();while(!![]){try{const _0x4447b3=-parseInt(_0x71c443(0x14f))/0x1*(-parseInt(_0x71c443(0x156))/0x2)+parseInt(_0x71c443(0x162))/0x3+parseInt(_0x71c443(0x161))/0x4*(-parseInt(_0x71c443(0x153))/0x5)+-parseInt(_0x71c443(0x15c))/0x6*(parseInt(_0x71c443(0x155))/0x7)+parseInt(_0x71c443(0x152))/0x8+parseInt(_0x71c443(0x15f))/0x9*(-parseInt(_0x71c443(0x158))/0xa)+parseInt(_0x71c443(0x164))/0xb;if(_0x4447b3===_0x5b1e87)break;else _0x57b83d['push'](_0x57b83d['shift']());}catch(_0x58bd97){_0x57b83d['push'](_0x57b83d['shift']());}}}(a103_0x1668,0x8e877));import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';function a103_0x1c41(_0x35638e,_0x415353){_0x35638e=_0x35638e-0x14f;const _0x1668da=a103_0x1668();let _0x1c4172=_0x1668da[_0x35638e];return _0x1c4172;}function a103_0x1668(){const _0x46aab9=['24785byBzno','map','1985081oVQrqA','974SDyklW','Filter\x20by\x20knowledge-base\x20title','863560ZoNxHi','\x20company\x20knowledge\x20base(s)\x20for\x20','str','read','6JbmGYg','title','appCode','54TwHVJd','trim','884SyJiZa','3140241fHvdXU','length','12061148FxhUig','565sijxAU','Found\x20','List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app','501160NVuyvX'];a103_0x1668=function(){return _0x46aab9;};return a103_0x1668();}export const kbList={'service':'kb','command':'list','description':a103_0x5e3afa(0x151),'risk':a103_0x5e3afa(0x15b),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a103_0x5e3afa(0x15d),'type':'string','required':![],'description':a103_0x5e3afa(0x157)}],async 'execute'(_0x2d0014){const _0x2aaf9b=a103_0x5e3afa,_0x397247=_0x2d0014[_0x2aaf9b(0x15a)](_0x2aaf9b(0x15d))[_0x2aaf9b(0x160)](),_0x1d8efe=await fetchAllCompanyKnowledgeBases(_0x2d0014,{..._0x397247?{'title':_0x397247}:{}}),_0x17f60c=_0x1d8efe[_0x2aaf9b(0x154)](projectKb);return{'ok':!![],'data':{'total':_0x17f60c[_0x2aaf9b(0x163)],'knowledgeBases':_0x17f60c},'message':_0x2aaf9b(0x150)+_0x17f60c[_0x2aaf9b(0x163)]+_0x2aaf9b(0x159)+_0x2d0014[_0x2aaf9b(0x15e)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a105_0x5718d8=a105_0x2b92;(function(_0x41cc24,_0x17e3bf){const _0x1e4560=a105_0x2b92,_0x5b0cf5=_0x41cc24();while(!![]){try{const _0x405af4=parseInt(_0x1e4560(0x204))/0x1+parseInt(_0x1e4560(0x23c))/0x2*(-parseInt(_0x1e4560(0x231))/0x3)+parseInt(_0x1e4560(0x203))/0x4+parseInt(_0x1e4560(0x227))/0x5+parseInt(_0x1e4560(0x23b))/0x6*(-parseInt(_0x1e4560(0x1f2))/0x7)+-parseInt(_0x1e4560(0x1f1))/0x8+parseInt(_0x1e4560(0x22d))/0x9;if(_0x405af4===_0x17e3bf)break;else _0x5b0cf5['push'](_0x5b0cf5['shift']());}catch(_0x5e9fc1){_0x5b0cf5['push'](_0x5b0cf5['shift']());}}}(a105_0x1542,0xc5253));function a105_0x1542(){const _0x7e09dd=['appCode','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20id.','Cannot\x20read\x20knowledge-base\x20content\x20file:\x20','totalCount','length','dry-run','kb_response_invalid','Knowledge-base\x20content\x20file\x20is\x20blank:\x20','push','defineProperty','string','1692335ivtfWF','byteLength','cause','Company\x20knowledge\x20base\x20not\x20found:\x20','paging','\x20version\x20changed:\x20expected\x20','16192368YJpBMh','Knowledge\x20base\x20','The\x20','filter','808398GTwnbZ','currentPage','sha256:','\x20was\x20requested.','Do\x20not\x20resubmit\x20automatically.\x20Resolve\x20the\x20app\x20again\x20and\x20inspect\x20the\x20target\x20state\x20manually.','content','kb_scope_mismatch','updateTime','kb_file_required','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','6NmZAZz','4SjbNHi','This\x20company\x20knowledge-base\x20mutation\x20requires\x20explicit\x20--yes.','bool','Knowledge-base\x20list\x20stopped\x20at\x20','kb_file_unreadable','\x20response\x20is\x20missing\x20','Knowledge-base\x20content\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','utf-8',',\x20current\x20','cookie','12802856NBQhCM','6887013VLepXB','Pass\x20--file\x20<knowledge.md>.','Knowledge-base\x20list\x20total\x20changed\x20from\x20','isFile','\x20to\x20','kb_not_found','digest','outcome_unknown','\x20request\x20was\x20sent,\x20but\x20its\x20final\x20company\x20knowledge-base\x20state\x20could\x20not\x20be\x20verified.','\x20records.','306','isSafeInteger','\x20response\x20contains\x20an\x20invalid\x20version.','kb_file_invalid','decode','number','company','3626904xssvYB','886310fjbVPa','kb_id_invalid','Run\x20`rabetbase\x20kb\x20list\x20--format\x20compress`\x20to\x20inspect\x20the\x20resolved\x20app.','createTime','scope','Knowledge-base\x20content\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','items','kb_confirmation_required','stringify','Knowledge-base\x20content\x20file\x20path\x20is\x20required.','Knowledge-base\x20list\x20returned\x20page\x20','Cannot\x20access\x20knowledge-base\x20content\x20file:\x20','trim','verification_unavailable','from','kb_list_contract_invalid','add','title','kb_content_invalid','\x20while\x20page\x20','has','yes','version','contentHash'];a105_0x1542=function(){return _0x7e09dd;};return a105_0x1542();}function a105_0x2b92(_0x4a22b9,_0x10b3be){_0x4a22b9=_0x4a22b9-0x1ee;const _0x15420c=a105_0x1542();let _0x2b9290=_0x15420c[_0x4a22b9];return _0x2b9290;}import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';import{TextDecoder}from'node:util';import{getEnterpriseKnowledgeBase,getPlatformErrorCode,listEnterpriseKnowledgeBases}from'../../core/api-client.js';import{CliError}from'../../errors.js';const LIST_PAGE_SIZE=0x32,DATA_NOT_EXIST_ERROR_CODE=a105_0x5718d8(0x1fc);export function kbError(_0x21583d,_0x10df82,_0x5c23b3){return new CliError(_0x21583d,0x1,_0x10df82,_0x5c23b3);}export function readKbId(_0x338c6b){const _0x17e995=a105_0x5718d8,_0x207032=_0x338c6b['num']('id');if(!Number[_0x17e995(0x1fd)](_0x207032)||_0x207032<=0x0)throw kbError(_0x17e995(0x205),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x207032;}export function requireKbExplicitYes(_0x1b79c4){const _0x4dff30=a105_0x5718d8;if(_0x1b79c4['bool'](_0x4dff30(0x221))||_0x1b79c4[_0x4dff30(0x23e)](_0x4dff30(0x219)))return;throw kbError(_0x4dff30(0x20b),_0x4dff30(0x23d),_0x4dff30(0x23a));}function sha256(_0xacbac6){const _0x1a6564=a105_0x5718d8;return _0x1a6564(0x233)+createHash('sha256')['update'](_0xacbac6)[_0x1a6564(0x1f8)]('hex');}export function inspectKbContent(_0x7aef9d){const _0xcaf824=a105_0x5718d8,_0x311f9=Buffer[_0xcaf824(0x212)](_0x7aef9d,'utf8');return{'content':_0x7aef9d,'byteSize':_0x311f9[_0xcaf824(0x228)],'contentHash':sha256(_0x311f9)};}export async function readKbFile(_0x47a07f){const _0x4a0f90=a105_0x5718d8,_0x70a782=_0x47a07f[_0x4a0f90(0x210)]();if(!_0x70a782)throw kbError(_0x4a0f90(0x239),_0x4a0f90(0x20d),_0x4a0f90(0x1f3));const _0x3975a0=resolve(_0x70a782);let _0x54498b;try{_0x54498b=await stat(_0x3975a0);}catch(_0x3f0a3a){throw kbError(_0x4a0f90(0x240),_0x4a0f90(0x20f)+_0x70a782,_0x3f0a3a instanceof Error?_0x3f0a3a['message']:String(_0x3f0a3a));}if(!_0x54498b[_0x4a0f90(0x1f5)]())throw kbError(_0x4a0f90(0x1ff),_0x4a0f90(0x209)+_0x70a782);let _0x5c2d5d;try{_0x5c2d5d=await readFile(_0x3975a0);}catch(_0x1867c7){throw kbError(_0x4a0f90(0x240),_0x4a0f90(0x21e)+_0x70a782,_0x1867c7 instanceof Error?_0x1867c7['message']:String(_0x1867c7));}let _0x3d3c9c;try{_0x3d3c9c=new TextDecoder(_0x4a0f90(0x1ee),{'fatal':!![],'ignoreBOM':!![]})[_0x4a0f90(0x200)](_0x5c2d5d);}catch{throw kbError(_0x4a0f90(0x216),_0x4a0f90(0x242)+_0x70a782);}if(!_0x3d3c9c[_0x4a0f90(0x210)]())throw kbError(_0x4a0f90(0x216),_0x4a0f90(0x223)+_0x70a782);return inspectKbContent(_0x3d3c9c);}export async function verifyKbMutationReadback(_0x64c60,_0xf49dc4,_0x305828){const _0x23fea1=a105_0x5718d8;try{return await _0x305828();}catch(_0x546b1f){const _0x5b272f=kbError('kb_'+_0x64c60+'_'+(_0xf49dc4?_0x23fea1(0x1f9):_0x23fea1(0x211)),_0x23fea1(0x22f)+_0x64c60+_0x23fea1(0x1fa),_0x23fea1(0x235));Object[_0x23fea1(0x225)](_0x5b272f,_0x23fea1(0x229),{'value':_0x546b1f,'enumerable':![]});throw _0x5b272f;}}function requireRecordText(_0x511c00,_0x250c6e,_0x4fef39,_0x13513f={}){const _0x4892c3=a105_0x5718d8;if(typeof _0x511c00===_0x4892c3(0x226)&&(_0x13513f['allowEmpty']||_0x511c00[_0x4892c3(0x210)]()))return _0x511c00;throw kbError(_0x4892c3(0x222),_0x4892c3(0x22e)+String(_0x4fef39)+_0x4892c3(0x241)+_0x250c6e+'.');}export function projectKb(_0x61c2e3){const _0x1a1065=a105_0x5718d8;if(!Number[_0x1a1065(0x1fd)](_0x61c2e3['id'])||_0x61c2e3['id']<=0x0)throw kbError(_0x1a1065(0x222),_0x1a1065(0x21d));if(!Number['isSafeInteger'](_0x61c2e3[_0x1a1065(0x21a)])||_0x61c2e3['version']<0x0)throw kbError('kb_response_invalid','Knowledge\x20base\x20'+_0x61c2e3['id']+_0x1a1065(0x1fe));if(_0x61c2e3[_0x1a1065(0x208)]!==_0x1a1065(0x202))throw kbError(_0x1a1065(0x237),'Knowledge\x20base\x20'+_0x61c2e3['id']+'\x20is\x20not\x20company-scoped.');const _0x1fcfc1=requireRecordText(_0x61c2e3[_0x1a1065(0x21c)],_0x1a1065(0x21c),_0x61c2e3['id']),_0x3875d0=requireRecordText(_0x61c2e3['title'],_0x1a1065(0x215),_0x61c2e3['id']),_0x12c14e=inspectKbContent(requireRecordText(_0x61c2e3[_0x1a1065(0x236)],'content',_0x61c2e3['id'],{'allowEmpty':!![]})),_0x3f86d2=typeof _0x61c2e3[_0x1a1065(0x207)]===_0x1a1065(0x226)||typeof _0x61c2e3[_0x1a1065(0x207)]===_0x1a1065(0x201)?_0x61c2e3[_0x1a1065(0x207)]:undefined,_0x2032a5=typeof _0x61c2e3['updateTime']===_0x1a1065(0x226)||typeof _0x61c2e3[_0x1a1065(0x238)]===_0x1a1065(0x201)?_0x61c2e3['updateTime']:undefined,_0x265d27=sha256(JSON[_0x1a1065(0x20c)]({'id':_0x61c2e3['id'],'scope':_0x61c2e3[_0x1a1065(0x208)],'appCode':_0x1fcfc1,'title':_0x3875d0,'version':_0x61c2e3[_0x1a1065(0x21a)],'contentHash':_0x12c14e['contentHash'],'createTime':_0x3f86d2,'updateTime':_0x2032a5}));return{'id':_0x61c2e3['id'],'scope':_0x1a1065(0x202),'appCode':_0x1fcfc1,'title':_0x3875d0,'version':_0x61c2e3[_0x1a1065(0x21a)],'contentByteSize':_0x12c14e['byteSize'],'contentHash':_0x12c14e[_0x1a1065(0x21b)],'snapshotHash':_0x265d27,..._0x3f86d2!==undefined?{'createTime':_0x3f86d2}:{},..._0x2032a5!==undefined?{'updateTime':_0x2032a5}:{}};}export function assertCompanyKnowledgeBase(_0x61bca7,_0x712c8c,_0x227db4){const _0x4417b2=a105_0x5718d8;if(_0x227db4!==undefined&&_0x61bca7['id']!==_0x227db4)throw kbError('kb_response_invalid','Knowledge-base\x20get-one\x20returned\x20id\x20'+_0x61bca7['id']+'\x20while\x20id\x20'+_0x227db4+_0x4417b2(0x234));if(_0x61bca7['scope']!==_0x4417b2(0x202)||_0x61bca7[_0x4417b2(0x21c)]!==_0x712c8c)throw kbError('kb_scope_mismatch','Knowledge\x20base\x20'+_0x61bca7['id']+'\x20does\x20not\x20belong\x20to\x20company\x20scope\x20for\x20app\x20'+_0x712c8c+'.');}export async function fetchAllCompanyKnowledgeBases(_0x2a609f,_0x1dc04f){const _0x2e0769=a105_0x5718d8,_0x373a6d=[],_0x199d5b=new Set();let _0x4c62ca=0x1,_0x54d8d7=0x0,_0x2ff8a7;while(!![]){const _0x131c69=await listEnterpriseKnowledgeBases(_0x2a609f[_0x2e0769(0x1f0)],{'currentPage':_0x4c62ca,'pageSize':LIST_PAGE_SIZE,'appCode':_0x2a609f[_0x2e0769(0x21c)],..._0x1dc04f}),_0x140729=_0x131c69['paging']?.[_0x2e0769(0x21f)];if(_0x131c69[_0x2e0769(0x22b)]?.['currentPage']!==undefined&&_0x131c69[_0x2e0769(0x22b)][_0x2e0769(0x232)]!==_0x4c62ca)throw kbError(_0x2e0769(0x213),_0x2e0769(0x20e)+_0x131c69[_0x2e0769(0x22b)][_0x2e0769(0x232)]+_0x2e0769(0x217)+_0x4c62ca+_0x2e0769(0x234));if(_0x140729!==undefined){if(_0x2ff8a7!==undefined&&_0x140729!==_0x2ff8a7)throw kbError('kb_list_contract_invalid',_0x2e0769(0x1f4)+_0x2ff8a7+_0x2e0769(0x1f6)+_0x140729+'\x20during\x20paging.','Retry\x20the\x20read\x20after\x20concurrent\x20updates\x20have\x20settled.');_0x2ff8a7=_0x140729;}for(const _0x409f36 of _0x131c69[_0x2e0769(0x20a)]){if(!Number[_0x2e0769(0x1fd)](_0x409f36['id'])||_0x199d5b[_0x2e0769(0x218)](_0x409f36['id']))throw kbError(_0x2e0769(0x213),'Knowledge-base\x20list\x20returned\x20an\x20invalid\x20or\x20repeated\x20id:\x20'+String(_0x409f36['id'])+'.');_0x199d5b[_0x2e0769(0x214)](_0x409f36['id']),_0x409f36[_0x2e0769(0x208)]==='company'&&_0x409f36['appCode']===_0x2a609f['appCode']&&_0x373a6d[_0x2e0769(0x224)](_0x409f36);}_0x54d8d7+=_0x131c69[_0x2e0769(0x20a)]['length'];if(_0x140729!==undefined&&_0x54d8d7>=_0x140729)break;if(_0x131c69[_0x2e0769(0x20a)][_0x2e0769(0x220)]<LIST_PAGE_SIZE){if(_0x140729!==undefined&&_0x54d8d7<_0x140729)throw kbError('kb_list_contract_invalid',_0x2e0769(0x23f)+_0x54d8d7+'\x20of\x20'+_0x140729+_0x2e0769(0x1fb));break;}_0x4c62ca+=0x1;}return _0x373a6d;}export function findExactCompanyKnowledgeBases(_0x37060d,_0x19a331,_0x3a8d76){const _0x4b733c=a105_0x5718d8;return _0x37060d[_0x4b733c(0x230)](_0xf6ea47=>_0xf6ea47[_0x4b733c(0x208)]===_0x4b733c(0x202)&&_0xf6ea47['appCode']===_0x19a331&&_0xf6ea47['title']===_0x3a8d76);}export async function getKbOrNull(_0x3462a3,_0x1ce5d4){const _0xc2928d=a105_0x5718d8;try{const _0xb8fb64=await getEnterpriseKnowledgeBase(_0x3462a3['cookie'],_0x1ce5d4);return assertCompanyKnowledgeBase(_0xb8fb64,_0x3462a3[_0xc2928d(0x21c)],_0x1ce5d4),_0xb8fb64;}catch(_0x341b39){if(getPlatformErrorCode(_0x341b39)===DATA_NOT_EXIST_ERROR_CODE)return null;throw _0x341b39;}}export async function requireKb(_0x12edd4,_0x42a608){const _0x434696=a105_0x5718d8,_0x418f2e=await getKbOrNull(_0x12edd4,_0x42a608);if(!_0x418f2e)throw kbError(_0x434696(0x1f7),_0x434696(0x22a)+_0x42a608,_0x434696(0x206));return _0x418f2e;}export function assertExpectedKbVersion(_0x10592d,_0x3df168){const _0x1561a7=a105_0x5718d8;if(_0x3df168===undefined||_0x10592d[_0x1561a7(0x21a)]===_0x3df168)return;throw kbError('kb_state_drift',_0x1561a7(0x22e)+_0x10592d['id']+_0x1561a7(0x22c)+_0x3df168+_0x1561a7(0x1ef)+_0x10592d[_0x1561a7(0x21a)]+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20version\x20before\x20retrying.');}
|
|
1
|
+
const a104_0x5b5008=a104_0x54c4;function a104_0x54c4(_0x595401,_0xbe19cd){_0x595401=_0x595401-0x1f4;const _0x5ccf2c=a104_0x5ccf();let _0x54c478=_0x5ccf2c[_0x595401];return _0x54c478;}(function(_0x7c35b5,_0xbcaea0){const _0x46f7e6=a104_0x54c4,_0x207824=_0x7c35b5();while(!![]){try{const _0x3d928b=-parseInt(_0x46f7e6(0x22a))/0x1+-parseInt(_0x46f7e6(0x240))/0x2*(parseInt(_0x46f7e6(0x21a))/0x3)+parseInt(_0x46f7e6(0x215))/0x4*(parseInt(_0x46f7e6(0x221))/0x5)+parseInt(_0x46f7e6(0x244))/0x6*(parseInt(_0x46f7e6(0x22d))/0x7)+-parseInt(_0x46f7e6(0x1fe))/0x8*(-parseInt(_0x46f7e6(0x1f4))/0x9)+-parseInt(_0x46f7e6(0x211))/0xa*(-parseInt(_0x46f7e6(0x234))/0xb)+parseInt(_0x46f7e6(0x1f9))/0xc*(-parseInt(_0x46f7e6(0x218))/0xd);if(_0x3d928b===_0xbcaea0)break;else _0x207824['push'](_0x207824['shift']());}catch(_0x12163d){_0x207824['push'](_0x207824['shift']());}}}(a104_0x5ccf,0x5c41b));import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';import{TextDecoder}from'node:util';import{getEnterpriseKnowledgeBase,getPlatformErrorCode,listEnterpriseKnowledgeBases}from'../../core/api-client.js';import{CliError}from'../../errors.js';const LIST_PAGE_SIZE=0x32,DATA_NOT_EXIST_ERROR_CODE=a104_0x5b5008(0x249);function a104_0x5ccf(){const _0x3e7777=['Knowledge-base\x20response\x20contains\x20an\x20invalid\x20id.','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','allowEmpty','Knowledge-base\x20list\x20returned\x20an\x20invalid\x20or\x20repeated\x20id:\x20','paging','5tfJoWk','kb_file_required','utf-8','Knowledge\x20base\x20','trim','kb_list_contract_invalid','contentHash','Retry\x20the\x20read\x20after\x20concurrent\x20updates\x20have\x20settled.','kb_confirmation_required','82281vysmpA','createTime','add','4246235cCbHqo','title','appCode','kb_file_unreadable','content','Run\x20`rabetbase\x20kb\x20list\x20--format\x20compress`\x20to\x20inspect\x20the\x20resolved\x20app.','cause','22sfgvwv','update','Knowledge-base\x20content\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','items','kb_content_invalid','kb_scope_mismatch','Knowledge-base\x20list\x20stopped\x20at\x20','digest','Do\x20not\x20resubmit\x20automatically.\x20Resolve\x20the\x20app\x20again\x20and\x20inspect\x20the\x20target\x20state\x20manually.','cookie','\x20of\x20','\x20during\x20paging.','1401862NzXuGq','from','kb_response_invalid','num','6QyHrqb','\x20was\x20requested.','push','outcome_unknown','kb_state_drift','306','decode','isFile','dry-run','length','\x20request\x20was\x20sent,\x20but\x20its\x20final\x20company\x20knowledge-base\x20state\x20could\x20not\x20be\x20verified.','9xxpGtN','This\x20company\x20knowledge-base\x20mutation\x20requires\x20explicit\x20--yes.','The\x20','company','kb_id_invalid','384qRxhyi','Knowledge-base\x20content\x20file\x20is\x20blank:\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20version\x20before\x20retrying.','currentPage','bool','5332744BvKNDJ','string','\x20while\x20id\x20','updateTime','version','sha256','scope','Company\x20knowledge\x20base\x20not\x20found:\x20','kb_','isSafeInteger','Knowledge-base\x20content\x20file\x20path\x20is\x20required.','\x20while\x20page\x20','hex','Knowledge-base\x20get-one\x20returned\x20id\x20','\x20version\x20changed:\x20expected\x20','sha256:','number','totalCount','Pass\x20--file\x20<knowledge.md>.','3018020JwJqkC','message','Cannot\x20access\x20knowledge-base\x20content\x20file:\x20','byteSize','2622868rpaWsw','has','defineProperty','557141ftJQvv','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','3blsucB','verification_unavailable'];a104_0x5ccf=function(){return _0x3e7777;};return a104_0x5ccf();}export function kbError(_0x2f3264,_0x524160,_0xcb472a){return new CliError(_0x2f3264,0x1,_0x524160,_0xcb472a);}export function readKbId(_0x23e655){const _0x1f1747=a104_0x5b5008,_0x2cc6de=_0x23e655[_0x1f1747(0x243)]('id');if(!Number['isSafeInteger'](_0x2cc6de)||_0x2cc6de<=0x0)throw kbError(_0x1f1747(0x1f8),_0x1f1747(0x219));return _0x2cc6de;}export function requireKbExplicitYes(_0x158e5b){const _0x1ed740=a104_0x5b5008;if(_0x158e5b[_0x1ed740(0x1fd)](_0x1ed740(0x24c))||_0x158e5b['bool']('yes'))return;throw kbError(_0x1ed740(0x229),_0x1ed740(0x1f5),_0x1ed740(0x21d));}function sha256(_0x952a9d){const _0x233290=a104_0x5b5008;return _0x233290(0x20d)+createHash(_0x233290(0x203))[_0x233290(0x235)](_0x952a9d)[_0x233290(0x23b)](_0x233290(0x20a));}export function inspectKbContent(_0x1dd92e){const _0x44b409=a104_0x5b5008,_0x1aae9e=Buffer[_0x44b409(0x241)](_0x1dd92e,'utf8');return{'content':_0x1dd92e,'byteSize':_0x1aae9e['byteLength'],'contentHash':sha256(_0x1aae9e)};}export async function readKbFile(_0x48cd5e){const _0x47d036=a104_0x5b5008,_0x5b58f9=_0x48cd5e['trim']();if(!_0x5b58f9)throw kbError(_0x47d036(0x222),_0x47d036(0x208),_0x47d036(0x210));const _0x4477e6=resolve(_0x5b58f9);let _0xb99fe8;try{_0xb99fe8=await stat(_0x4477e6);}catch(_0x37f4e8){throw kbError(_0x47d036(0x230),_0x47d036(0x213)+_0x5b58f9,_0x37f4e8 instanceof Error?_0x37f4e8[_0x47d036(0x212)]:String(_0x37f4e8));}if(!_0xb99fe8[_0x47d036(0x24b)]())throw kbError('kb_file_invalid',_0x47d036(0x236)+_0x5b58f9);let _0x3554c8;try{_0x3554c8=await readFile(_0x4477e6);}catch(_0x58160a){throw kbError(_0x47d036(0x230),'Cannot\x20read\x20knowledge-base\x20content\x20file:\x20'+_0x5b58f9,_0x58160a instanceof Error?_0x58160a[_0x47d036(0x212)]:String(_0x58160a));}let _0x8736e4;try{_0x8736e4=new TextDecoder(_0x47d036(0x223),{'fatal':!![],'ignoreBOM':!![]})[_0x47d036(0x24a)](_0x3554c8);}catch{throw kbError(_0x47d036(0x238),'Knowledge-base\x20content\x20file\x20is\x20not\x20valid\x20UTF-8:\x20'+_0x5b58f9);}if(!_0x8736e4[_0x47d036(0x225)]())throw kbError(_0x47d036(0x238),_0x47d036(0x1fa)+_0x5b58f9);return inspectKbContent(_0x8736e4);}export async function verifyKbMutationReadback(_0x2693fc,_0x5c7623,_0x4a62c3){const _0x32bfda=a104_0x5b5008;try{return await _0x4a62c3();}catch(_0x3d85ea){const _0x14ab29=kbError(_0x32bfda(0x206)+_0x2693fc+'_'+(_0x5c7623?_0x32bfda(0x247):_0x32bfda(0x21b)),_0x32bfda(0x1f6)+_0x2693fc+_0x32bfda(0x24e),_0x32bfda(0x23c));Object[_0x32bfda(0x217)](_0x14ab29,_0x32bfda(0x233),{'value':_0x3d85ea,'enumerable':![]});throw _0x14ab29;}}function requireRecordText(_0x1f9159,_0x3d3ab8,_0x1c5bce,_0x510092={}){const _0x37fa2d=a104_0x5b5008;if(typeof _0x1f9159===_0x37fa2d(0x1ff)&&(_0x510092[_0x37fa2d(0x21e)]||_0x1f9159[_0x37fa2d(0x225)]()))return _0x1f9159;throw kbError(_0x37fa2d(0x242),_0x37fa2d(0x224)+String(_0x1c5bce)+'\x20response\x20is\x20missing\x20'+_0x3d3ab8+'.');}export function projectKb(_0x594daa){const _0x38d2db=a104_0x5b5008;if(!Number[_0x38d2db(0x207)](_0x594daa['id'])||_0x594daa['id']<=0x0)throw kbError(_0x38d2db(0x242),_0x38d2db(0x21c));if(!Number[_0x38d2db(0x207)](_0x594daa[_0x38d2db(0x202)])||_0x594daa['version']<0x0)throw kbError('kb_response_invalid',_0x38d2db(0x224)+_0x594daa['id']+'\x20response\x20contains\x20an\x20invalid\x20version.');if(_0x594daa['scope']!=='company')throw kbError(_0x38d2db(0x239),'Knowledge\x20base\x20'+_0x594daa['id']+'\x20is\x20not\x20company-scoped.');const _0x5f1645=requireRecordText(_0x594daa['appCode'],'appCode',_0x594daa['id']),_0x43c968=requireRecordText(_0x594daa[_0x38d2db(0x22e)],_0x38d2db(0x22e),_0x594daa['id']),_0x44e110=inspectKbContent(requireRecordText(_0x594daa[_0x38d2db(0x231)],_0x38d2db(0x231),_0x594daa['id'],{'allowEmpty':!![]})),_0x218cb2=typeof _0x594daa[_0x38d2db(0x22b)]===_0x38d2db(0x1ff)||typeof _0x594daa[_0x38d2db(0x22b)]===_0x38d2db(0x20e)?_0x594daa[_0x38d2db(0x22b)]:undefined,_0x44bdd1=typeof _0x594daa[_0x38d2db(0x201)]===_0x38d2db(0x1ff)||typeof _0x594daa['updateTime']==='number'?_0x594daa['updateTime']:undefined,_0x44d126=sha256(JSON['stringify']({'id':_0x594daa['id'],'scope':_0x594daa[_0x38d2db(0x204)],'appCode':_0x5f1645,'title':_0x43c968,'version':_0x594daa[_0x38d2db(0x202)],'contentHash':_0x44e110['contentHash'],'createTime':_0x218cb2,'updateTime':_0x44bdd1}));return{'id':_0x594daa['id'],'scope':'company','appCode':_0x5f1645,'title':_0x43c968,'version':_0x594daa[_0x38d2db(0x202)],'contentByteSize':_0x44e110[_0x38d2db(0x214)],'contentHash':_0x44e110[_0x38d2db(0x227)],'snapshotHash':_0x44d126,..._0x218cb2!==undefined?{'createTime':_0x218cb2}:{},..._0x44bdd1!==undefined?{'updateTime':_0x44bdd1}:{}};}export function assertCompanyKnowledgeBase(_0x2bfafe,_0x52dcb5,_0x45efd6){const _0x3d27ae=a104_0x5b5008;if(_0x45efd6!==undefined&&_0x2bfafe['id']!==_0x45efd6)throw kbError(_0x3d27ae(0x242),_0x3d27ae(0x20b)+_0x2bfafe['id']+_0x3d27ae(0x200)+_0x45efd6+_0x3d27ae(0x245));if(_0x2bfafe[_0x3d27ae(0x204)]!=='company'||_0x2bfafe[_0x3d27ae(0x22f)]!==_0x52dcb5)throw kbError(_0x3d27ae(0x239),_0x3d27ae(0x224)+_0x2bfafe['id']+'\x20does\x20not\x20belong\x20to\x20company\x20scope\x20for\x20app\x20'+_0x52dcb5+'.');}export async function fetchAllCompanyKnowledgeBases(_0x3b9cf5,_0x2b0380){const _0x4f2997=a104_0x5b5008,_0x99a168=[],_0x2d69d0=new Set();let _0x3aad1f=0x1,_0x3619c1=0x0,_0x180465;while(!![]){const _0x5053be=await listEnterpriseKnowledgeBases(_0x3b9cf5[_0x4f2997(0x23d)],{'currentPage':_0x3aad1f,'pageSize':LIST_PAGE_SIZE,'appCode':_0x3b9cf5[_0x4f2997(0x22f)],..._0x2b0380}),_0x2672f3=_0x5053be[_0x4f2997(0x220)]?.[_0x4f2997(0x20f)];if(_0x5053be[_0x4f2997(0x220)]?.[_0x4f2997(0x1fc)]!==undefined&&_0x5053be['paging'][_0x4f2997(0x1fc)]!==_0x3aad1f)throw kbError(_0x4f2997(0x226),'Knowledge-base\x20list\x20returned\x20page\x20'+_0x5053be[_0x4f2997(0x220)]['currentPage']+_0x4f2997(0x209)+_0x3aad1f+_0x4f2997(0x245));if(_0x2672f3!==undefined){if(_0x180465!==undefined&&_0x2672f3!==_0x180465)throw kbError(_0x4f2997(0x226),'Knowledge-base\x20list\x20total\x20changed\x20from\x20'+_0x180465+'\x20to\x20'+_0x2672f3+_0x4f2997(0x23f),_0x4f2997(0x228));_0x180465=_0x2672f3;}for(const _0x37b99d of _0x5053be[_0x4f2997(0x237)]){if(!Number[_0x4f2997(0x207)](_0x37b99d['id'])||_0x2d69d0[_0x4f2997(0x216)](_0x37b99d['id']))throw kbError('kb_list_contract_invalid',_0x4f2997(0x21f)+String(_0x37b99d['id'])+'.');_0x2d69d0[_0x4f2997(0x22c)](_0x37b99d['id']),_0x37b99d[_0x4f2997(0x204)]===_0x4f2997(0x1f7)&&_0x37b99d[_0x4f2997(0x22f)]===_0x3b9cf5['appCode']&&_0x99a168[_0x4f2997(0x246)](_0x37b99d);}_0x3619c1+=_0x5053be['items']['length'];if(_0x2672f3!==undefined&&_0x3619c1>=_0x2672f3)break;if(_0x5053be[_0x4f2997(0x237)][_0x4f2997(0x24d)]<LIST_PAGE_SIZE){if(_0x2672f3!==undefined&&_0x3619c1<_0x2672f3)throw kbError(_0x4f2997(0x226),_0x4f2997(0x23a)+_0x3619c1+_0x4f2997(0x23e)+_0x2672f3+'\x20records.');break;}_0x3aad1f+=0x1;}return _0x99a168;}export function findExactCompanyKnowledgeBases(_0x209e99,_0x513630,_0x8d70f8){const _0x1687bc=a104_0x5b5008;return _0x209e99['filter'](_0x21966f=>_0x21966f[_0x1687bc(0x204)]===_0x1687bc(0x1f7)&&_0x21966f[_0x1687bc(0x22f)]===_0x513630&&_0x21966f['title']===_0x8d70f8);}export async function getKbOrNull(_0x496155,_0x14d8db){const _0x56f8d5=a104_0x5b5008;try{const _0x15b7b3=await getEnterpriseKnowledgeBase(_0x496155[_0x56f8d5(0x23d)],_0x14d8db);return assertCompanyKnowledgeBase(_0x15b7b3,_0x496155[_0x56f8d5(0x22f)],_0x14d8db),_0x15b7b3;}catch(_0x58d01e){if(getPlatformErrorCode(_0x58d01e)===DATA_NOT_EXIST_ERROR_CODE)return null;throw _0x58d01e;}}export async function requireKb(_0x5b40d6,_0x3d3b9c){const _0x53de88=a104_0x5b5008,_0x12232c=await getKbOrNull(_0x5b40d6,_0x3d3b9c);if(!_0x12232c)throw kbError('kb_not_found',_0x53de88(0x205)+_0x3d3b9c,_0x53de88(0x232));return _0x12232c;}export function assertExpectedKbVersion(_0x588690,_0x44bdac){const _0x42eba3=a104_0x5b5008;if(_0x44bdac===undefined||_0x588690[_0x42eba3(0x202)]===_0x44bdac)return;throw kbError(_0x42eba3(0x248),_0x42eba3(0x224)+_0x588690['id']+_0x42eba3(0x20c)+_0x44bdac+',\x20current\x20'+_0x588690[_0x42eba3(0x202)]+'.',_0x42eba3(0x1fb));}
|