@lovrabet/rabetbase-cli 2.5.9 → 2.5.10-beta.2
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 +1 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.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/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.d.ts +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.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/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +0 -28
- 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/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.d.ts +8 -0
- package/lib/core/instant-api-policy/endpoints.js +1 -0
- package/lib/core/kb-management-client.d.ts +3 -9
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +1 -4
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.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/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase-dataset-generation/SKILL.md +2 -2
- package/skills/rabetbase-page-generation/SKILL.md +2 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a145_0x2ceb08=a145_0x3e85;function a145_0x3e85(_0x38aa7f,_0x4f5d07){_0x38aa7f=_0x38aa7f-0xd3;const _0x1c9e4d=a145_0x1c9e();let _0x3e85d9=_0x1c9e4d[_0x38aa7f];return _0x3e85d9;}(function(_0x1c0f4a,_0x14608a){const _0x3a7007=a145_0x3e85,_0xab89f2=_0x1c0f4a();while(!![]){try{const _0x4d71fd=parseInt(_0x3a7007(0xde))/0x1*(-parseInt(_0x3a7007(0xd3))/0x2)+-parseInt(_0x3a7007(0xda))/0x3+parseInt(_0x3a7007(0xdf))/0x4*(parseInt(_0x3a7007(0xd8))/0x5)+parseInt(_0x3a7007(0xe1))/0x6*(-parseInt(_0x3a7007(0xd5))/0x7)+parseInt(_0x3a7007(0xd4))/0x8*(-parseInt(_0x3a7007(0xdd))/0x9)+-parseInt(_0x3a7007(0xd9))/0xa+parseInt(_0x3a7007(0xd6))/0xb;if(_0x4d71fd===_0x14608a)break;else _0xab89f2['push'](_0xab89f2['shift']());}catch(_0x1faff4){_0xab89f2['push'](_0xab89f2['shift']());}}}(a145_0x1c9e,0xc8565));import{listInstantApiPolicyRevisions}from'../../core/api-client.js';import{projectRevisionSummary}from'../../commands/instant-api-policy/shared.js';function a145_0x1c9e(){const _0x2b15e8=['1Goddbo','60CzXzjI','appCode','12MgjHFH','794774KzUIAp','8RhkHhW','433804cySSQn','43322884YOsmaZ','instant-api-policy','305605ofzTUc','7953500QTjZPs','3897660hDWgvb','length','map','12768993SQOPqe'];a145_0x1c9e=function(){return _0x2b15e8;};return a145_0x1c9e();}export const instantApiPolicyRevisions={'service':a145_0x2ceb08(0xd7),'command':'revisions','description':'List\x20immutable\x20Instant\x20API\x20policy\x20revisions','risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x5e0bb5){const _0xfb67a7=a145_0x2ceb08,_0x19fdf8=await listInstantApiPolicyRevisions(_0x5e0bb5[_0xfb67a7(0xe0)]);return{'ok':!![],'data':{'appCode':_0x5e0bb5[_0xfb67a7(0xe0)],'total':_0x19fdf8[_0xfb67a7(0xdb)],'revisions':_0x19fdf8[_0xfb67a7(0xdc)](projectRevisionSummary)},'message':'Found\x20'+_0x19fdf8[_0xfb67a7(0xdb)]+'\x20Instant\x20API\x20policy\x20revision(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a146_0x1d24(){const _0x3b68ee=['rollback','1919628IFoZom','3577777CghUSI','instant_api_policy_rollback_outcome_unknown','8IJSxyv','6882865nvXZkS','high-risk-write','`;\x20do\x20not\x20resubmit\x20automatically.','3SAZjon','target','planned','expectedRevision','2502570DauHpy','3008360zgJIEc','Rollback\x20response\x20was\x20unavailable;\x20current-policy\x20readback\x20proved\x20the\x20new\x20revision\x20without\x20resubmitting.','instant_api_policy_rollback_verification_failed','verified','revision','5rLyxML','235768zXfWDw','all','Restore\x20a\x20historical\x20policy\x20as\x20a\x20new\x20active\x20revision','before','push','appCode','defineProperty','configHash','instant_api_policy_rollback_verification_unavailable','4BwuOpZ','Rolled\x20Instant\x20API\x20policy\x20revision\x20','Inspect\x20with\x20`','1004961ezxHxE','POST','Restore\x20an\x20application-wide\x20Instant\x20API\x20policy\x20from\x20immutable\x20history\x20as\x20a\x20new\x20revision.'];a146_0x1d24=function(){return _0x3b68ee;};return a146_0x1d24();}function a146_0x3a43(_0x1c9857,_0x350975){_0x1c9857=_0x1c9857-0x103;const _0x1d24bf=a146_0x1d24();let _0x3a4367=_0x1d24bf[_0x1c9857];return _0x3a4367;}const a146_0x382e7f=a146_0x3a43;(function(_0x7ba039,_0x6c720){const _0x31bdbc=a146_0x3a43,_0x5dafaf=_0x7ba039();while(!![]){try{const _0x1334f2=parseInt(_0x31bdbc(0x10a))/0x1*(-parseInt(_0x31bdbc(0x115))/0x2)+parseInt(_0x31bdbc(0x121))/0x3*(parseInt(_0x31bdbc(0x11e))/0x4)+parseInt(_0x31bdbc(0x114))/0x5*(parseInt(_0x31bdbc(0x10e))/0x6)+-parseInt(_0x31bdbc(0x104))/0x7*(-parseInt(_0x31bdbc(0x106))/0x8)+-parseInt(_0x31bdbc(0x103))/0x9+parseInt(_0x31bdbc(0x10f))/0xa+-parseInt(_0x31bdbc(0x107))/0xb;if(_0x1334f2===_0x6c720)break;else _0x5dafaf['push'](_0x5dafaf['shift']());}catch(_0xb90c84){_0x5dafaf['push'](_0x5dafaf['shift']());}}}(a146_0x1d24,0x5aaaa));import{getCurrentInstantApiPolicy,getInstantApiPolicyRevision,isPlatformTransportFailure,rollbackInstantApiPolicy}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{instantApiPolicyError}from'../../core/instant-api-policy/config.js';import{assertExpectedRevision,CHANGE_SUMMARY_FLAG,EXPECTED_REVISION_FLAG,expectedRevisionWarnings,INSTANT_API_POLICY_PATHS,mutationLookupCommand,projectCurrentPolicy,projectRevisionDetail,readChangeSummary,readExpectedRevision,readRevision,REVISION_FLAG,RUNTIME_CACHE_WARNING}from'../../commands/instant-api-policy/shared.js';async function prepareRollback(_0x41a1a3){const _0x437df4=a146_0x3a43,_0x3acb65=readRevision(_0x41a1a3),_0x238899=readChangeSummary(_0x41a1a3),_0x3696fb=readExpectedRevision(_0x41a1a3),[_0x13f0a6,_0x5449a8]=await Promise[_0x437df4(0x116)]([getCurrentInstantApiPolicy(_0x41a1a3[_0x437df4(0x11a)]),getInstantApiPolicyRevision(_0x41a1a3[_0x437df4(0x11a)],_0x3acb65)]);if(!_0x13f0a6)throw instantApiPolicyError('instant_api_policy_not_configured','Instant\x20API\x20policy\x20is\x20not\x20configured\x20for\x20'+_0x41a1a3[_0x437df4(0x11a)]+'.');return assertExpectedRevision(_0x13f0a6,_0x3696fb),{'revision':_0x3acb65,'changeSummary':_0x238899,'expectedRevision':_0x3696fb,'before':_0x13f0a6,'target':_0x5449a8};}export const instantApiPolicyRollback={'service':'instant-api-policy','command':a146_0x382e7f(0x124),'description':a146_0x382e7f(0x117),'risk':a146_0x382e7f(0x108),'requiresAppCode':!![],'structuredErrors':!![],'confirmationDescription':a146_0x382e7f(0x123),'flags':[REVISION_FLAG,CHANGE_SUMMARY_FLAG,EXPECTED_REVISION_FLAG],async 'validate'(_0x143402){readRevision(_0x143402),readChangeSummary(_0x143402),readExpectedRevision(_0x143402);},async 'dryRun'(_0x176ea4){const _0x249ad9=a146_0x382e7f,_0x4c1de6=await prepareRollback(_0x176ea4);return asDryRunResult({'operation':_0x249ad9(0x124),'selector':{'appCode':_0x176ea4['appCode'],'sourceRevision':_0x4c1de6['revision']},'before':projectCurrentPolicy(_0x4c1de6[_0x249ad9(0x118)]),'after':{'revision':_0x4c1de6[_0x249ad9(0x118)]['revision']+0x1,'sourceRevision':projectRevisionDetail(_0x4c1de6['target'])},'dryRun':!![],'backend':{'method':'POST','path':INSTANT_API_POLICY_PATHS[_0x249ad9(0x124)]},'warnings':expectedRevisionWarnings(_0x4c1de6[_0x249ad9(0x10d)]),'verification':{'status':_0x249ad9(0x10c),'expectedRevision':_0x4c1de6['expectedRevision']??null,'atomicCompareAndSet':![],'lookupCommand':mutationLookupCommand()}},{'method':_0x249ad9(0x122),'url':INSTANT_API_POLICY_PATHS['rollback']});},async 'execute'(_0xf22b10){const _0x173f10=a146_0x382e7f,_0x400e19=await prepareRollback(_0xf22b10);let _0x4c92b5=![];try{await rollbackInstantApiPolicy({'appCode':_0xf22b10['appCode'],'revision':_0x400e19[_0x173f10(0x113)],..._0x400e19['changeSummary']?{'changeSummary':_0x400e19['changeSummary']}:{}});}catch(_0x3aa7ff){if(!isPlatformTransportFailure(_0x3aa7ff))throw _0x3aa7ff;_0x4c92b5=!![];}let _0x25e402;try{_0x25e402=await getCurrentInstantApiPolicy(_0xf22b10['appCode']);}catch(_0x4893a8){const _0x549a69=instantApiPolicyError(_0x4c92b5?_0x173f10(0x105):_0x173f10(0x11d),'The\x20rollback\x20request\x20was\x20sent,\x20but\x20the\x20current\x20policy\x20could\x20not\x20be\x20verified.',_0x173f10(0x120)+mutationLookupCommand()+_0x173f10(0x109));Object[_0x173f10(0x11b)](_0x549a69,'cause',{'value':_0x4893a8,'enumerable':![]});throw _0x549a69;}const _0x2becc1=_0x25e402&&_0x25e402[_0x173f10(0x113)]>_0x400e19[_0x173f10(0x118)]['revision'],_0x5a9c1e=_0x25e402?.['configHash']===_0x400e19[_0x173f10(0x10b)][_0x173f10(0x11c)];if(!_0x25e402||!_0x2becc1||!_0x5a9c1e)throw instantApiPolicyError(_0x4c92b5?'instant_api_policy_rollback_outcome_unknown':_0x173f10(0x111),'Current\x20policy\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20rollback.',_0x173f10(0x120)+mutationLookupCommand()+_0x173f10(0x109));const _0x12fdac=[...expectedRevisionWarnings(_0x400e19['expectedRevision']),RUNTIME_CACHE_WARNING];return _0x4c92b5&&_0x12fdac[_0x173f10(0x119)](_0x173f10(0x110)),{'ok':!![],'data':{'operation':'rollback','selector':{'appCode':_0xf22b10[_0x173f10(0x11a)],'sourceRevision':_0x400e19['revision']},'before':projectCurrentPolicy(_0x400e19['before']),'after':projectCurrentPolicy(_0x25e402),'dryRun':![],'backend':{'method':_0x173f10(0x122),'path':INSTANT_API_POLICY_PATHS[_0x173f10(0x124)]},'warnings':_0x12fdac,'verification':{'status':_0x173f10(0x112),'recoveredAfterUnknownResponse':_0x4c92b5,'expectedRevision':_0x400e19[_0x173f10(0x10d)]??null,'atomicCompareAndSet':![],'lookupCommand':mutationLookupCommand()}},'message':_0x173f10(0x11f)+_0x400e19[_0x173f10(0x113)]+'\x20forward\x20to\x20revision\x20'+_0x25e402['revision']};}};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { InstantApiPolicy, InstantApiPolicyConfig, InstantApiPolicyRevision } from "../../core/api-client.js";
|
|
2
2
|
import { loadInstantApiPolicyLocalConfig } from "../../core/instant-api-policy/config.js";
|
|
3
3
|
import type { RuntimeContext } from "../../framework/types.js";
|
|
4
|
-
export
|
|
4
|
+
export { INSTANT_API_POLICY_PATHS } from "../../core/instant-api-policy/endpoints.js";
|
|
5
5
|
export declare const RUNTIME_CACHE_WARNING = "Runtime instances may take up to 30 seconds to observe the new active policy.";
|
|
6
6
|
export declare const NON_ATOMIC_EXPECTED_REVISION_WARNING = "--expected-revision is a non-atomic read-before-write assertion; the server mutation contract has no revision predicate.";
|
|
7
7
|
export declare const FORCE_FLAG: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a147_0x5c1c68=a147_0x580c;(function(_0x22b333,_0xb1702f){const _0x1fd439=a147_0x580c,_0x24ce61=_0x22b333();while(!![]){try{const _0x4691bd=parseInt(_0x1fd439(0xfc))/0x1+-parseInt(_0x1fd439(0xdc))/0x2*(parseInt(_0x1fd439(0xee))/0x3)+-parseInt(_0x1fd439(0xd5))/0x4*(-parseInt(_0x1fd439(0xde))/0x5)+parseInt(_0x1fd439(0xff))/0x6*(-parseInt(_0x1fd439(0xeb))/0x7)+-parseInt(_0x1fd439(0xe3))/0x8*(parseInt(_0x1fd439(0xe4))/0x9)+parseInt(_0x1fd439(0xf5))/0xa*(-parseInt(_0x1fd439(0xf4))/0xb)+parseInt(_0x1fd439(0xef))/0xc;if(_0x4691bd===_0xb1702f)break;else _0x24ce61['push'](_0x24ce61['shift']());}catch(_0x49f5a4){_0x24ce61['push'](_0x24ce61['shift']());}}}(a147_0x32fa,0xc0517));import{instantApiPolicyError,loadInstantApiPolicyLocalConfig,readInstantApiPolicyConfigFile}from'../../core/instant-api-policy/config.js';export{INSTANT_API_POLICY_PATHS}from'../../core/instant-api-policy/endpoints.js';export const RUNTIME_CACHE_WARNING='Runtime\x20instances\x20may\x20take\x20up\x20to\x2030\x20seconds\x20to\x20observe\x20the\x20new\x20active\x20policy.';export const NON_ATOMIC_EXPECTED_REVISION_WARNING='--expected-revision\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20mutation\x20contract\x20has\x20no\x20revision\x20predicate.';export const FORCE_FLAG={'name':a147_0x5c1c68(0xd6),'type':a147_0x5c1c68(0xd3),'default':![],'description':a147_0x5c1c68(0xe8)};export const CHANGE_SUMMARY_FLAG={'name':a147_0x5c1c68(0xfd),'type':a147_0x5c1c68(0xdb),'required':![],'description':'Audit\x20summary\x20for\x20this\x20policy\x20revision\x20(maximum\x202000\x20characters)'};export const REVISION_FLAG={'name':a147_0x5c1c68(0xcf),'type':a147_0x5c1c68(0xd2),'required':!![],'description':a147_0x5c1c68(0xe6)};export const EXPECTED_REVISION_FLAG={'name':a147_0x5c1c68(0xd1),'type':a147_0x5c1c68(0xd2),'required':![],'description':a147_0x5c1c68(0xec)};export function requireForceConfirmation(_0x54ff7b){const _0x3ff4d6=a147_0x5c1c68;if(!_0x54ff7b[_0x3ff4d6(0xe2)](_0x3ff4d6(0xd6))||_0x54ff7b[_0x3ff4d6(0xe2)]('yes'))return;throw instantApiPolicyError('instant_api_policy_force_confirmation_required','--force\x20requires\x20--yes\x20because\x20it\x20replaces\x20the\x20fixed\x20local\x20policy\x20file.','Review\x20the\x20existing\x20file,\x20then\x20rerun\x20with\x20--force\x20--yes.');}export function readChangeSummary(_0x4908f9){const _0x4054bf=a147_0x5c1c68,_0xe5a696=_0x4908f9[_0x4054bf(0xf7)]('change-summary')['trim']();if(!_0xe5a696)return undefined;if(_0xe5a696[_0x4054bf(0xf0)]>0x7d0)throw instantApiPolicyError(_0x4054bf(0xfe),_0x4054bf(0xf2));return _0xe5a696;}export function readRevision(_0x1deb8b){const _0x458989=a147_0x5c1c68,_0x58c046=_0x1deb8b[_0x458989(0xe5)](_0x458989(0xcf),Number[_0x458989(0xd0)]);if(!Number[_0x458989(0xf6)](_0x58c046)||_0x58c046<=0x0)throw instantApiPolicyError('instant_api_policy_revision_invalid',_0x458989(0xed));return _0x58c046;}export function readExpectedRevision(_0xdd9730){const _0x52b13d=a147_0x5c1c68;if(_0xdd9730[_0x52b13d(0xf8)](_0x52b13d(0xd1))===undefined)return undefined;const _0x593547=_0xdd9730[_0x52b13d(0xe5)]('expected-revision',Number['NaN']);if(!Number['isSafeInteger'](_0x593547)||_0x593547<0x0)throw instantApiPolicyError(_0x52b13d(0xd8),'--expected-revision\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.');return _0x593547;}export function assertExpectedRevision(_0x46d5e5,_0x1803e3){const _0x451ca9=a147_0x5c1c68;if(_0x1803e3===undefined)return;const _0x40167c=_0x46d5e5?.[_0x451ca9(0xcf)]??0x0;if(_0x40167c!==_0x1803e3)throw instantApiPolicyError(_0x451ca9(0xd9),'The\x20current\x20Instant\x20API\x20policy\x20revision\x20changed\x20before\x20mutation.',_0x451ca9(0xdf)+_0x1803e3+_0x451ca9(0xfb)+_0x40167c+_0x451ca9(0xfa));}export async function readFixedPolicy(_0x2be58d){const _0x5674c3=a147_0x5c1c68,_0x20c51f=loadInstantApiPolicyLocalConfig(_0x2be58d[_0x5674c3(0xe9)]),_0x1e950d=await readInstantApiPolicyConfigFile(_0x20c51f);return{'local':_0x20c51f,'config':_0x1e950d};}export function projectCurrentPolicy(_0x1540c6){const _0x4a8a25=a147_0x5c1c68;if(!_0x1540c6)return null;return{'id':_0x1540c6['id'],'appCode':_0x1540c6['appCode'],'revision':_0x1540c6[_0x4a8a25(0xcf)],'configHash':_0x1540c6[_0x4a8a25(0xe1)],'enabled':_0x1540c6[_0x4a8a25(0xd7)],'config':_0x1540c6[_0x4a8a25(0xf3)],'createUserId':_0x1540c6[_0x4a8a25(0xea)]??null,'updateUserId':_0x1540c6[_0x4a8a25(0xda)]??null,'gmtCreate':_0x1540c6[_0x4a8a25(0xf9)]??null,'gmtModified':_0x1540c6[_0x4a8a25(0xd4)]??null};}export function projectRevisionSummary(_0x35add9){const _0x4283ee=a147_0x5c1c68;return{'id':_0x35add9['id'],'policyId':_0x35add9[_0x4283ee(0xce)],'appCode':_0x35add9['appCode'],'revision':_0x35add9[_0x4283ee(0xcf)],'configHash':_0x35add9[_0x4283ee(0xe1)],'changeType':_0x35add9['changeType'],'changeSummary':_0x35add9[_0x4283ee(0xdd)]??null,'operatorId':_0x35add9[_0x4283ee(0xf1)]??null,'gmtCreate':_0x35add9[_0x4283ee(0xf9)]??null,'version':_0x35add9[_0x4283ee(0xf3)]['version'],'defaultAction':_0x35add9['config'][_0x4283ee(0xe0)]['instantApi'],'ruleCount':_0x35add9['config']['rules']?.[_0x4283ee(0xf0)]??0x0};}function a147_0x32fa(){const _0x47b259=['number','boolean','gmtModified','28024ZfMRRf','force','enabled','instant_api_policy_expected_revision_invalid','instant_api_policy_revision_mismatch','updateUserId','string','110pjpHoa','changeSummary','260szuPgf','Expected\x20revision\x20','defaults','configHash','bool','74440uHwkWM','27wjETmx','num','Positive\x20published\x20policy\x20revision','rabetbase\x20instant-api-policy\x20current\x20--format\x20compress','Replace\x20an\x20existing\x20fixed\x20policy\x20file;\x20requires\x20--yes','appCode','createUserId','1372yHEDPR','Non-atomic\x20assertion\x20for\x20the\x20current\x20revision;\x20use\x200\x20when\x20unconfigured','--revision\x20must\x20be\x20a\x20positive\x20safe\x20integer.','41313KMHxUz','4686156XIqjIe','length','operatorId','--change-summary\x20cannot\x20exceed\x202000\x20characters.','config','2975907YOqlci','20tBWwtq','isSafeInteger','str','flag','gmtCreate','.\x20Run\x20current\x20and\x20review\x20before\x20retrying.',';\x20current\x20revision\x20is\x20','1517868wUEalo','change-summary','instant_api_policy_change_summary_invalid','4854JbrwWW','policyId','revision','NaN','expected-revision'];a147_0x32fa=function(){return _0x47b259;};return a147_0x32fa();}export function projectRevisionDetail(_0x451cc0){const _0x2601be=a147_0x5c1c68;return{...projectRevisionSummary(_0x451cc0),'config':_0x451cc0[_0x2601be(0xf3)]};}function a147_0x580c(_0x5dbfa1,_0x5a62d2){_0x5dbfa1=_0x5dbfa1-0xce;const _0x32fa74=a147_0x32fa();let _0x580cf9=_0x32fa74[_0x5dbfa1];return _0x580cf9;}export function expectedRevisionWarnings(_0x463d19){return _0x463d19===undefined?[]:[NON_ATOMIC_EXPECTED_REVISION_WARNING];}export function mutationLookupCommand(){const _0x2c4397=a147_0x5c1c68;return _0x2c4397(0xe7);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a148_0x33f2(){const _0x1fbdf0=['12289627uDQMIB','policyFilePath','POST','Validated\x20Instant\x20API\x20policy\x20for\x20','3CvqPYr','configHash','1294332jKAkLH','283986BgKcGY','Validate\x20the\x20fixed\x20local\x20policy\x20without\x20publishing','validate','6935139bqAdri','8375144QABXox','normalizedConfig','130itBODo','appCode','3296634CnuUJn','valid','1859686QOJcpE','instant-api-policy'];a148_0x33f2=function(){return _0x1fbdf0;};return a148_0x33f2();}const a148_0x371e48=a148_0x47bb;(function(_0x579b7a,_0x375c62){const _0x25930b=a148_0x47bb,_0xaf9a9b=_0x579b7a();while(!![]){try{const _0x2360bf=-parseInt(_0x25930b(0x1f2))/0x1+parseInt(_0x25930b(0x1f0))/0x2*(-parseInt(_0x25930b(0x1f8))/0x3)+-parseInt(_0x25930b(0x1fa))/0x4+-parseInt(_0x25930b(0x1ee))/0x5*(-parseInt(_0x25930b(0x1fb))/0x6)+parseInt(_0x25930b(0x1f4))/0x7+parseInt(_0x25930b(0x1ec))/0x8+parseInt(_0x25930b(0x1fe))/0x9;if(_0x2360bf===_0x375c62)break;else _0xaf9a9b['push'](_0xaf9a9b['shift']());}catch(_0x359892){_0xaf9a9b['push'](_0xaf9a9b['shift']());}}}(a148_0x33f2,0xed571));import{validateInstantApiPolicy}from'../../core/api-client.js';import{INSTANT_API_POLICY_PATHS,readFixedPolicy}from'../../commands/instant-api-policy/shared.js';function a148_0x47bb(_0x599901,_0x4fad25){_0x599901=_0x599901-0x1ec;const _0x33f23d=a148_0x33f2();let _0x47bb21=_0x33f23d[_0x599901];return _0x47bb21;}export const instantApiPolicyValidate={'service':a148_0x371e48(0x1f3),'command':a148_0x371e48(0x1fd),'description':a148_0x371e48(0x1fc),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0xa75084){const _0x3917f9=a148_0x371e48,{local:_0x3ccd5c,config:_0x554a13}=await readFixedPolicy(_0xa75084),_0x3b5fb6=await validateInstantApiPolicy({'appCode':_0xa75084[_0x3917f9(0x1ef)],'config':_0x554a13});return{'ok':!![],'data':{'operation':_0x3917f9(0x1fd),'selector':{'appCode':_0xa75084[_0x3917f9(0x1ef)]},'filePath':_0x3ccd5c[_0x3917f9(0x1f5)],'relativePath':_0x3ccd5c['policyRelativePath'],'valid':_0x3b5fb6[_0x3917f9(0x1f1)],'configHash':_0x3b5fb6[_0x3917f9(0x1f9)],'normalizedConfig':_0x3b5fb6[_0x3917f9(0x1ed)],'backend':{'method':_0x3917f9(0x1f6),'path':INSTANT_API_POLICY_PATHS[_0x3917f9(0x1fd)]}},'message':_0x3917f9(0x1f7)+_0xa75084['appCode']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a149_0x15af(_0x41b080,_0xe77436){_0x41b080=_0x41b080-0x194;const _0x2c5363=a149_0x2c53();let _0x15af36=_0x2c5363[_0x41b080];return _0x15af36;}(function(_0x3aa4e7,_0x5cb41b){const _0xc1bb14=a149_0x15af,_0x916263=_0x3aa4e7();while(!![]){try{const _0x12a003=-parseInt(_0xc1bb14(0x199))/0x1+-parseInt(_0xc1bb14(0x196))/0x2*(parseInt(_0xc1bb14(0x19a))/0x3)+parseInt(_0xc1bb14(0x198))/0x4*(parseInt(_0xc1bb14(0x19b))/0x5)+-parseInt(_0xc1bb14(0x194))/0x6+-parseInt(_0xc1bb14(0x195))/0x7*(parseInt(_0xc1bb14(0x19e))/0x8)+-parseInt(_0xc1bb14(0x19d))/0x9*(-parseInt(_0xc1bb14(0x197))/0xa)+parseInt(_0xc1bb14(0x19c))/0xb;if(_0x12a003===_0x5cb41b)break;else _0x916263['push'](_0x916263['shift']());}catch(_0xd2400b){_0x916263['push'](_0x916263['shift']());}}}(a149_0x2c53,0x734d7));import{issueReport}from'../../commands/issue/report.js';function a149_0x2c53(){const _0x44b836=['2787834SFqOQi','749cylReP','590120irxrkS','10BACMvx','638972FWvnpB','607084nbjkTF','6OCrBpQ','15HZqPZw','21931250IxwxkK','3858849iQRYbQ','57392gCeREO'];a149_0x2c53=function(){return _0x44b836;};return a149_0x2c53();}export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a150_0x3591(){const _0x322a65=['slice','command','1069945fUEUDW','config_missing','RABETBASE_DISABLE_ISSUE_NUDGE','6kUwxmk','\x20bug?\x20Help\x20us\x20fix\x20it:','auth_required','service','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','3305283NyxqlW','replace','7675598BryTEU','11521110MKcRlj','\x22\x20\x5c','trim','write','198eJUbyd','24mTfvCg','network_error','join','validation_error','code','8SvzAay','309dKtSld','\x20issue\x20report\x20\x5c','flag_missing','97368NVapNc','unknown_command','=1\x20to\x20silence\x20this\x20hint.','length','1524eyYoye','report','13414742GjYZpH','message','Hit\x20a\x20','not_in_project'];a150_0x3591=function(){return _0x322a65;};return a150_0x3591();}const a150_0xa5ba96=a150_0x67e9;(function(_0x4ac224,_0x2cec81){const _0x4df7fe=a150_0x67e9,_0x145373=_0x4ac224();while(!![]){try{const _0x6c0433=-parseInt(_0x4df7fe(0x154))/0x1*(-parseInt(_0x4df7fe(0x15b))/0x2)+-parseInt(_0x4df7fe(0x16b))/0x3+parseInt(_0x4df7fe(0x153))/0x4*(-parseInt(_0x4df7fe(0x163))/0x5)+-parseInt(_0x4df7fe(0x166))/0x6*(parseInt(_0x4df7fe(0x16d))/0x7)+-parseInt(_0x4df7fe(0x157))/0x8*(parseInt(_0x4df7fe(0x172))/0x9)+parseInt(_0x4df7fe(0x16e))/0xa+-parseInt(_0x4df7fe(0x15d))/0xb*(-parseInt(_0x4df7fe(0x173))/0xc);if(_0x6c0433===_0x2cec81)break;else _0x145373['push'](_0x145373['shift']());}catch(_0x40d4f){_0x145373['push'](_0x145373['shift']());}}}(a150_0x3591,0xe3af6));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a150_0x67e9(_0x3812b6,_0x29a164){_0x3812b6=_0x3812b6-0x150;const _0x3591ab=a150_0x3591();let _0x67e95e=_0x3591ab[_0x3812b6];return _0x67e95e;}export const NUDGE_OPT_OUT_ENV=a150_0xa5ba96(0x165);const NUDGE_SUPPRESSED_CODES=new Set(['cancelled',a150_0xa5ba96(0x168),a150_0xa5ba96(0x164),a150_0xa5ba96(0x160),a150_0xa5ba96(0x158),a150_0xa5ba96(0x156),a150_0xa5ba96(0x151),a150_0xa5ba96(0x174)]),defaultWriter=_0x4ef9c6=>{const _0x23ffe3=a150_0xa5ba96;process['stderr'][_0x23ffe3(0x171)](_0x4ef9c6);};export function shouldNudgeForError(_0x21d4f1,_0x1bd499){const _0x321d4a=a150_0xa5ba96;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x1bd499[_0x321d4a(0x169)]==='issue'&&_0x1bd499[_0x321d4a(0x162)]===_0x321d4a(0x15c))return![];if(_0x21d4f1 instanceof CliError)return!NUDGE_SUPPRESSED_CODES['has'](_0x21d4f1[_0x321d4a(0x152)]);return!![];}export function printIssueReportNudgeForError(_0x5afa5f,_0x50de86,_0x8fd069=defaultWriter){if(!shouldNudgeForError(_0x5afa5f,_0x50de86))return;const _0x4144e5=buildSuggestedTitle(_0x5afa5f,_0x50de86);_0x8fd069(formatNudge(_0x4144e5));}function buildSuggestedTitle(_0x27e433,_0x38bc5e){const _0x2879b0=a150_0xa5ba96,_0x4426b0=_0x27e433 instanceof Error?_0x27e433[_0x2879b0(0x15e)]:String(_0x27e433),_0x2d9b2b=_0x4426b0[_0x2879b0(0x16c)](/[\r\n]+/g,'\x20')['replace'](/\s+/g,'\x20')[_0x2879b0(0x170)]()[_0x2879b0(0x161)](0x0,0x78)['replace'](/"/g,'\x5c\x22'),_0x460c02=CLI_BIN_NAME+'\x20'+_0x38bc5e[_0x2879b0(0x169)]+'\x20'+_0x38bc5e[_0x2879b0(0x162)];return _0x2d9b2b[_0x2879b0(0x15a)]>0x0?_0x460c02+':\x20'+_0x2d9b2b:_0x460c02;}function formatNudge(_0x5abb80){const _0x1dc92c=a150_0xa5ba96;return['',_0x1dc92c(0x15f)+CLI_BIN_NAME+_0x1dc92c(0x167),'\x20\x20'+CLI_BIN_NAME+_0x1dc92c(0x155),'\x20\x20\x20\x20--title\x20\x22'+_0x5abb80+_0x1dc92c(0x16f),_0x1dc92c(0x16a),'\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','\x20\x20Set\x20'+NUDGE_OPT_OUT_ENV+_0x1dc92c(0x159),''][_0x1dc92c(0x150)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a151_0x1cd0f8=a151_0x48e4;(function(_0x3c82e0,_0x59c7d5){const _0x339329=a151_0x48e4,_0x5eb7d5=_0x3c82e0();while(!![]){try{const _0x126fb8=-parseInt(_0x339329(0x181))/0x1+-parseInt(_0x339329(0x17f))/0x2+parseInt(_0x339329(0x16c))/0x3+-parseInt(_0x339329(0x165))/0x4+-parseInt(_0x339329(0x154))/0x5*(parseInt(_0x339329(0x156))/0x6)+parseInt(_0x339329(0x18a))/0x7*(-parseInt(_0x339329(0x186))/0x8)+parseInt(_0x339329(0x152))/0x9;if(_0x126fb8===_0x59c7d5)break;else _0x5eb7d5['push'](_0x5eb7d5['shift']());}catch(_0x282e04){_0x5eb7d5['push'](_0x5eb7d5['shift']());}}}(a151_0x3d4e,0xa0deb));import{existsSync}from'node:fs';function a151_0x48e4(_0x587896,_0x549b7f){_0x587896=_0x587896-0x152;const _0x3d4e1e=a151_0x3d4e();let _0x48e4de=_0x3d4e1e[_0x587896];return _0x48e4de;}import{readFile}from'node:fs/promises';import{resolve}from'node:path';function a151_0x3d4e(){const _0x5f00c2=['Issue\x20description\x20cannot\x20be\x20empty.','join','truncated:\x20original\x20','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','2345462lEFvDp','\x20bytes','1094923oJVLyI','trim','file','descriptionSource','inline','8dDCWjb','redactionKinds','descriptionFile:\x20','POST','3318385Zhkrul','apiError','41276610JqsTkq','flagMissing','5aNYTyy','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','1636572KAeDlz','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','otel://','description','length','truncated','issue.description_truncated','write','utf8','\x20secret(s):\x20','issue.title','redacted\x20','Platform\x20issue\x20reported\x20(','originalBytes','sanitize','4145864dMKCQH','compress','issue.description_redactions','Failed\x20to\x20report\x20platform\x20issue:\x20','issue','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','370710YquTou','validation','redactions:\x20','string','cwd','descriptionFilePath','redactionCount','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','str','report','descriptionSource:\x20','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','title','One-line\x20issue\x20summary','issue.description'];a151_0x3d4e=function(){return _0x5f00c2;};return a151_0x3d4e();}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='description-file';export const issueReport={'service':a151_0x1cd0f8(0x169),'command':a151_0x1cd0f8(0x175),'description':a151_0x1cd0f8(0x177),'risk':a151_0x1cd0f8(0x15d),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a151_0x1cd0f8(0x166),'flags':[{'name':a151_0x1cd0f8(0x178),'type':a151_0x1cd0f8(0x16f),'required':!![],'description':a151_0x1cd0f8(0x179)},{'name':a151_0x1cd0f8(0x159),'type':a151_0x1cd0f8(0x16f),'description':a151_0x1cd0f8(0x17e)},{'name':DESCRIPTION_FILE_FLAG,'type':'string','description':a151_0x1cd0f8(0x173)}],async 'validate'(_0x488aa9){const _0x5b83ee=a151_0x1cd0f8,_0x450472=_0x488aa9[_0x5b83ee(0x174)]('title')[_0x5b83ee(0x182)](),_0x15aa08=_0x488aa9['str']('description')['trim'](),_0x2570c3=_0x488aa9['str'](DESCRIPTION_FILE_FLAG)[_0x5b83ee(0x182)]();if(!_0x450472)throw CliErrors[_0x5b83ee(0x153)](_0x5b83ee(0x178),_0x5b83ee(0x16a));const _0x41870b=_0x15aa08[_0x5b83ee(0x15a)]>0x0,_0x5b21df=_0x2570c3[_0x5b83ee(0x15a)]>0x0;if(_0x41870b===_0x5b21df)throw CliErrors['validation'](_0x5b83ee(0x157),_0x5b83ee(0x155));if(_0x5b21df){const _0x488d26=resolve(process[_0x5b83ee(0x170)](),_0x2570c3);if(!existsSync(_0x488d26))throw CliErrors[_0x5b83ee(0x16d)]('File\x20not\x20found:\x20'+_0x488d26);}},async 'dryRun'(_0x43f968){const _0x1143e4=a151_0x1cd0f8,_0x51335c=await prepareIssueReport(_0x43f968);return{'method':_0x1143e4(0x189),'url':_0x1143e4(0x158)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x51335c[_0x1143e4(0x178)],'issue.description':_0x51335c[_0x1143e4(0x159)],'issue.description_original_bytes':_0x51335c['sanitize']['originalBytes'],'issue.description_truncated':_0x51335c[_0x1143e4(0x164)][_0x1143e4(0x15b)],'issue.description_redactions':_0x51335c[_0x1143e4(0x164)]['redactionCount'],'issue.description_redaction_kinds':_0x51335c[_0x1143e4(0x164)][_0x1143e4(0x187)][_0x1143e4(0x17c)](',')}},'description':['Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter',_0x1143e4(0x176)+_0x51335c[_0x1143e4(0x184)],_0x51335c[_0x1143e4(0x171)]?_0x1143e4(0x188)+_0x51335c[_0x1143e4(0x171)]:null,_0x51335c[_0x1143e4(0x164)][_0x1143e4(0x15b)]?_0x1143e4(0x17d)+_0x51335c[_0x1143e4(0x164)][_0x1143e4(0x163)]+_0x1143e4(0x180):null,_0x51335c['sanitize'][_0x1143e4(0x172)]>0x0?_0x1143e4(0x16e)+_0x51335c[_0x1143e4(0x164)][_0x1143e4(0x172)]+'\x20('+_0x51335c[_0x1143e4(0x164)][_0x1143e4(0x187)][_0x1143e4(0x17c)](',\x20')+')':null]['filter'](Boolean)['join']('\x0a')};},async 'execute'(_0x41b347){const _0x263e32=a151_0x1cd0f8,_0x3a2868=await prepareIssueReport(_0x41b347);try{await sendPlatformIssueCollectLog({'title':_0x3a2868['title'],'description':_0x3a2868[_0x263e32(0x159)],'sanitize':{'originalBytes':_0x3a2868['sanitize'][_0x263e32(0x163)],'truncated':_0x3a2868['sanitize']['truncated'],'redactionCount':_0x3a2868['sanitize'][_0x263e32(0x172)],'redactionKinds':_0x3a2868[_0x263e32(0x164)][_0x263e32(0x187)]}});}catch(_0x4ca831){throw CliErrors[_0x263e32(0x18b)](_0x263e32(0x168)+(_0x4ca831 instanceof Error?_0x4ca831['message']:String(_0x4ca831)),_0x263e32(0x16b));}return{'ok':!![],'message':buildResultMessage(_0x3a2868['sanitize']),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x263e32(0x160),_0x263e32(0x17a),'issue.description_original_bytes',_0x263e32(0x15c),_0x263e32(0x167),'issue.description_redaction_kinds'],'issue':{'title':_0x3a2868[_0x263e32(0x178)],'descriptionLength':_0x3a2868[_0x263e32(0x159)][_0x263e32(0x15a)],'descriptionSource':_0x3a2868['descriptionSource'],..._0x3a2868[_0x263e32(0x171)]?{'descriptionFile':_0x3a2868[_0x263e32(0x171)]}:{},'sanitize':{'originalBytes':_0x3a2868[_0x263e32(0x164)][_0x263e32(0x163)],'truncated':_0x3a2868[_0x263e32(0x164)][_0x263e32(0x15b)],'redactions':_0x3a2868[_0x263e32(0x164)][_0x263e32(0x172)],'redactionKinds':_0x3a2868[_0x263e32(0x164)]['redactionKinds']}}}};}};function buildResultMessage(_0x57e1c2){const _0x352fb3=a151_0x1cd0f8,_0x203f86=[];return _0x57e1c2[_0x352fb3(0x15b)]&&_0x203f86['push']('truncated\x20from\x20'+_0x57e1c2[_0x352fb3(0x163)]+_0x352fb3(0x180)),_0x57e1c2[_0x352fb3(0x172)]>0x0&&_0x203f86['push'](_0x352fb3(0x161)+_0x57e1c2[_0x352fb3(0x172)]+_0x352fb3(0x15f)+_0x57e1c2[_0x352fb3(0x187)][_0x352fb3(0x17c)](',\x20')),_0x203f86[_0x352fb3(0x15a)]===0x0?'Platform\x20issue\x20reported':_0x352fb3(0x162)+_0x203f86[_0x352fb3(0x17c)](';\x20')+')';}async function prepareIssueReport(_0x32c7fc){const _0x33487d=a151_0x1cd0f8,_0x2fd42e=_0x32c7fc[_0x33487d(0x174)](_0x33487d(0x178))['trim'](),_0x712dc7=_0x32c7fc[_0x33487d(0x174)](_0x33487d(0x159)),_0x13063e=_0x32c7fc[_0x33487d(0x174)](DESCRIPTION_FILE_FLAG)[_0x33487d(0x182)]();if(!_0x13063e){const _0x2a3cc5=_0x712dc7;if(!_0x2a3cc5[_0x33487d(0x182)]())throw CliErrors[_0x33487d(0x16d)](_0x33487d(0x17b),'Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.');const _0x22f5b6=sanitizeIssueDescription(_0x2a3cc5);return{'title':_0x2fd42e,'description':_0x22f5b6[_0x33487d(0x159)],'descriptionSource':_0x33487d(0x185),'sanitize':_0x22f5b6};}const _0x497113=resolve(process[_0x33487d(0x170)](),_0x13063e),_0x282652=await readFile(_0x497113,_0x33487d(0x15e));if(!_0x282652[_0x33487d(0x182)]())throw CliErrors[_0x33487d(0x16d)]('Issue\x20description\x20file\x20is\x20empty:\x20'+_0x497113,'Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.');const _0x20dd3f=sanitizeIssueDescription(_0x282652);return{'title':_0x2fd42e,'description':_0x20dd3f[_0x33487d(0x159)],'descriptionSource':_0x33487d(0x183),'descriptionFilePath':_0x497113,'sanitize':_0x20dd3f};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a152_0x4e154b=a152_0x54bf;(function(_0x207978,_0x5cb8c5){const _0x37d9a3=a152_0x54bf,_0x3946e0=_0x207978();while(!![]){try{const _0x5769fb=parseInt(_0x37d9a3(0xe5))/0x1*(-parseInt(_0x37d9a3(0xd5))/0x2)+-parseInt(_0x37d9a3(0xe9))/0x3+-parseInt(_0x37d9a3(0xeb))/0x4+parseInt(_0x37d9a3(0xea))/0x5*(-parseInt(_0x37d9a3(0xdc))/0x6)+parseInt(_0x37d9a3(0xf6))/0x7+-parseInt(_0x37d9a3(0xee))/0x8*(parseInt(_0x37d9a3(0xdd))/0x9)+parseInt(_0x37d9a3(0xde))/0xa;if(_0x5769fb===_0x5cb8c5)break;else _0x3946e0['push'](_0x3946e0['shift']());}catch(_0x7f676d){_0x3946e0['push'](_0x3946e0['shift']());}}}(a152_0x5c0e,0x82c34));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a152_0x4e154b(0xe1),REDACTION_RULES=[{'kind':a152_0x4e154b(0xef),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a152_0x4e154b(0xdb)},{'kind':a152_0x4e154b(0xd6),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':'REDACTED:authorization'},{'kind':a152_0x4e154b(0xe2),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a152_0x4e154b(0xf1)},{'kind':'access-key','pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':'REDACTED:access-key'},{'kind':a152_0x4e154b(0xd8),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a152_0x4e154b(0xec)},{'kind':a152_0x4e154b(0xd9),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a152_0x4e154b(0xd4)}];export function sanitizeIssueDescription(_0x24fcdd){const _0x9dd6eb=a152_0x4e154b,_0x92837d=Buffer[_0x9dd6eb(0xe3)](_0x24fcdd,_0x9dd6eb(0xda)),_0x4c86b7=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0xa625eb=_0x24fcdd,_0x18b2d2=0x0;const _0x185f54=[];if(!_0x4c86b7){const _0x5e76c1=protectOssAccessKeyIds(_0xa625eb);_0xa625eb=_0x5e76c1[_0x9dd6eb(0xed)];for(const _0x2b6cc6 of REDACTION_RULES){let _0xad379a=0x0;_0xa625eb=_0xa625eb[_0x9dd6eb(0xe6)](_0x2b6cc6['pattern'],(_0x13dd22,_0x2b98f0)=>{const _0x480eca=_0x9dd6eb;_0xad379a+=0x1;const _0x48d17=typeof _0x2b98f0===_0x480eca(0xe7)?_0x2b98f0:'';return _0x48d17+'['+_0x2b6cc6[_0x480eca(0xf2)]+']';}),_0xad379a>0x0&&(_0x18b2d2+=_0xad379a,!_0x185f54[_0x9dd6eb(0xf3)](_0x2b6cc6['kind'])&&_0x185f54[_0x9dd6eb(0xe0)](_0x2b6cc6[_0x9dd6eb(0xe4)]));}_0xa625eb=_0x5e76c1[_0x9dd6eb(0xf7)](_0xa625eb);}let _0x30e757=![];if(Buffer['byteLength'](_0xa625eb,_0x9dd6eb(0xda))>ISSUE_DESCRIPTION_MAX_BYTES){_0x30e757=!![];const _0x5766e8=Buffer[_0x9dd6eb(0xe3)](TRUNCATION_NOTICE,_0x9dd6eb(0xda)),_0x4f5578=Math[_0x9dd6eb(0xd7)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x5766e8);_0xa625eb=sliceUtf8Bytes(_0xa625eb,_0x4f5578)+TRUNCATION_NOTICE;}return{'description':_0xa625eb,'originalBytes':_0x92837d,'truncated':_0x30e757,'redactionCount':_0x18b2d2,'redactionKinds':_0x185f54};}function a152_0x5c0e(){const _0x11f189=['max','password','bearer-jwt','utf8','REDACTED:cookie','78kgKzXp','387WDrotK','32628130oPyBhc','from','push','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','private-key','byteLength','kind','264829DXNyPA','replace','string','toString','636585ByuBEV','255305DhbboY','3706928woJpjT','REDACTED:password','description','144776NiAsHL','cookie','subarray','REDACTED:private-key','label','includes','slice','length','829577bwIyyg','restore','__RB_OSS_ID_','REDACTED:bearer-jwt','2IGMpKX','authorization'];a152_0x5c0e=function(){return _0x11f189;};return a152_0x5c0e();}function a152_0x54bf(_0x4d5b1a,_0x3d3265){_0x4d5b1a=_0x4d5b1a-0xd3;const _0x5c0e07=a152_0x5c0e();let _0x54bfc7=_0x5c0e07[_0x4d5b1a];return _0x54bfc7;}function protectOssAccessKeyIds(_0x3e55a7){const _0xb4bcfa=a152_0x4e154b,_0x251ed6=[],_0x52daf6=_0x3e55a7[_0xb4bcfa(0xe6)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0xe66de7,_0x32b950)=>{const _0x4aff15=_0xb4bcfa,_0x338e8c=_0x251ed6[_0x4aff15(0xe0)](_0xe66de7[_0x4aff15(0xf4)](_0x32b950[_0x4aff15(0xf5)]))-0x1;return _0x32b950+_0x4aff15(0xd3)+_0x338e8c+'__';});return{'description':_0x52daf6,'restore':_0x518740=>_0x518740[_0xb4bcfa(0xe6)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x3f5f0e,_0x479b4c,_0x35930b)=>{const _0x3dd5e2=_0x251ed6[Number(_0x35930b)];return _0x3dd5e2===undefined?_0x3f5f0e:''+_0x479b4c+_0x3dd5e2;})};}function sliceUtf8Bytes(_0x414bbc,_0x5469a0){const _0x3a08e0=a152_0x4e154b;if(_0x5469a0<=0x0)return'';const _0x336371=Buffer[_0x3a08e0(0xdf)](_0x414bbc,_0x3a08e0(0xda));if(_0x336371[_0x3a08e0(0xe3)]<=_0x5469a0)return _0x414bbc;let _0x32ef31=_0x5469a0;while(_0x32ef31>0x0){const _0x434d3d=_0x336371[_0x32ef31];if(_0x434d3d===undefined||(_0x434d3d&0xc0)!==0x80)break;_0x32ef31-=0x1;}return _0x336371[_0x3a08e0(0xf0)](0x0,_0x32ef31)[_0x3a08e0(0xe8)](_0x3a08e0(0xda));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a153_0x4bee71=a153_0x314a;(function(_0x13bd05,_0x2551d1){const _0x587707=a153_0x314a,_0x111252=_0x13bd05();while(!![]){try{const _0x2982f5=parseInt(_0x587707(0x15f))/0x1+-parseInt(_0x587707(0x15a))/0x2+parseInt(_0x587707(0x155))/0x3*(parseInt(_0x587707(0x150))/0x4)+-parseInt(_0x587707(0x143))/0x5+-parseInt(_0x587707(0x14c))/0x6+-parseInt(_0x587707(0x154))/0x7*(parseInt(_0x587707(0x148))/0x8)+-parseInt(_0x587707(0x144))/0x9*(-parseInt(_0x587707(0x16a))/0xa);if(_0x2982f5===_0x2551d1)break;else _0x111252['push'](_0x111252['shift']());}catch(_0x3aa7d9){_0x111252['push'](_0x111252['shift']());}}}(a153_0x7751,0xd691e));import{knowledgeDocumentsPath}from'../../core/api-client.js';import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a153_0x314a(_0x42be67,_0x25b33a){_0x42be67=_0x42be67-0x13e;const _0x775158=a153_0x7751();let _0x314a97=_0x775158[_0x42be67];return _0x314a97;}function a153_0x7751(){const _0x191261=['contentHash','3505380ASDjbf','36166464NawuLZ','verified','string','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.','13710376iZxJua','byteSize','kb_verification_failed','length','9094080AbUZvh','\x20--format\x20compress`\x20before\x20choosing\x20update.','str','kb_title_required','548rRdXpB','The\x20created\x20document\x20version\x20changed\x20after\x20its\x20write\x20response.\x20Inspect\x20it\x20without\x20resubmitting.','trim','POST','7zAuJIf','3789ASFDUM','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','\x20with\x20title\x20','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','create','2196170yxvgXl','version','file','Company\x20knowledge\x20base\x20','rabetbase\x20kb\x20detail\x20--id\x20','1715989HaqWif','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','--file\x20is\x20required.','content','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.','appCode','company','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','kb_create_outcome_unknown','10PmXjYy','\x20--format\x20compress','Created\x20company\x20knowledge\x20base\x20','title','\x20for\x20'];a153_0x7751=function(){return _0x191261;};return a153_0x7751();}import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,verifyKbMutationReadback}from'../../commands/kb/shared.js';function readCreateInput(_0x362c7d){const _0x4281d4=a153_0x314a,_0x783b43=_0x362c7d['str'](_0x4281d4(0x140))[_0x4281d4(0x152)]();if(!_0x783b43)throw kbError(_0x4281d4(0x14f),'--title\x20is\x20required.');const _0x253756=_0x362c7d[_0x4281d4(0x14e)](_0x4281d4(0x15c))[_0x4281d4(0x152)]();if(!_0x253756)throw kbError('kb_file_required',_0x4281d4(0x161),_0x4281d4(0x165));return{'title':_0x783b43,'file':_0x253756};}async function prepareCreate(_0x4e607e){const _0x3fe02b=a153_0x314a,_0x3aa67d=readCreateInput(_0x4e607e),_0x2113e9=await readKbFile(_0x3aa67d[_0x3fe02b(0x15c)]),_0x4f3aa5=await fetchAllCompanyKnowledgeBases(_0x4e607e,{'title':_0x3aa67d[_0x3fe02b(0x140)]}),_0x1bab0b=findExactCompanyKnowledgeBases(_0x4f3aa5,_0x4e607e[_0x3fe02b(0x166)],_0x3aa67d[_0x3fe02b(0x140)]);if(_0x1bab0b[_0x3fe02b(0x14b)]>0x0)throw kbError('kb_already_exists','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20'+_0x4e607e[_0x3fe02b(0x166)]+_0x3fe02b(0x157)+_0x3aa67d[_0x3fe02b(0x140)]+'.',_0x3fe02b(0x158)+_0x1bab0b[0x0]['id']+_0x3fe02b(0x14d));return{..._0x3aa67d,'content':_0x2113e9};}function plannedAfter(_0x1ba6e0,_0x9f62bc){const _0x4891af=a153_0x314a;return{'scope':'company','appCode':_0x1ba6e0[_0x4891af(0x166)],'title':_0x9f62bc[_0x4891af(0x140)],'contentByteSize':_0x9f62bc[_0x4891af(0x162)][_0x4891af(0x149)],'contentHash':_0x9f62bc[_0x4891af(0x162)]['contentHash']};}function verifyCreatedState(_0x31129c,_0x33a8a3,_0x376241){const _0x18c346=a153_0x314a;assertCompanyKnowledgeBase(_0x376241,_0x31129c[_0x18c346(0x166)],_0x376241['id']);const _0xea4c2b=inspectKbContent(_0x376241['content']);if(_0x376241[_0x18c346(0x140)]!==_0x33a8a3[_0x18c346(0x140)]||_0xea4c2b[_0x18c346(0x142)]!==_0x33a8a3[_0x18c346(0x162)]['contentHash'])throw kbError(_0x18c346(0x14a),_0x18c346(0x15d)+_0x376241['id']+'\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.',_0x18c346(0x168)+_0x376241['id']+_0x18c346(0x156));return projectKb(_0x376241);}export const kbCreate={'service':'kb','command':a153_0x4bee71(0x159),'description':'Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a153_0x4bee71(0x140),'type':a153_0x4bee71(0x146),'required':!![],'description':'Knowledge-base\x20title'},{'name':a153_0x4bee71(0x15c),'type':a153_0x4bee71(0x146),'required':!![],'description':a153_0x4bee71(0x163)}],async 'validate'(_0x1a160b){readCreateInput(_0x1a160b);},async 'dryRun'(_0x50ed70){const _0x1357c2=a153_0x4bee71,_0x3fe291=await prepareCreate(_0x50ed70);return asDryRunResult({'operation':_0x1357c2(0x159),'selector':{'scope':'company','appCode':_0x50ed70[_0x1357c2(0x166)],'title':_0x3fe291[_0x1357c2(0x140)]},'before':null,'after':plannedAfter(_0x50ed70,_0x3fe291),'dryRun':!![],'backend':{'method':_0x1357c2(0x153),'path':knowledgeDocumentsPath(_0x1357c2(0x167),_0x1357c2(0x159)),'body':{'appCode':_0x50ed70['appCode'],'title':_0x3fe291[_0x1357c2(0x140)],'contentHash':_0x3fe291['content'][_0x1357c2(0x142)],'contentByteSize':_0x3fe291[_0x1357c2(0x162)][_0x1357c2(0x149)]}},'warnings':[],'verification':{'lookupCommand':'rabetbase\x20kb\x20list\x20--title\x20'+JSON['stringify'](_0x3fe291[_0x1357c2(0x140)])+'\x20--format\x20compress'}},{'method':_0x1357c2(0x153),'url':knowledgeDocumentsPath(_0x1357c2(0x167),_0x1357c2(0x159))});},async 'execute'(_0x541575){const _0xac40f8=a153_0x4bee71,_0x5e2df0=await prepareCreate(_0x541575);let _0x4e2811,_0x39581e,_0x2f6885=![];try{const _0x374a5a=await createEnterpriseKnowledgeBase(_0x541575['cookie'],{'appCode':_0x541575[_0xac40f8(0x166)],'title':_0x5e2df0[_0xac40f8(0x140)],'content':_0x5e2df0['content'][_0xac40f8(0x162)]});assertCompanyKnowledgeBase(_0x374a5a,_0x541575['appCode'],_0x374a5a['id']),_0x4e2811=_0x374a5a['id'],_0x39581e=_0x374a5a[_0xac40f8(0x15b)];}catch(_0x35c7c8){if(!isPlatformTransportFailure(_0x35c7c8))throw _0x35c7c8;_0x2f6885=!![];}if(_0x4e2811===undefined){const _0x2bfb26=await verifyKbMutationReadback('create',!![],()=>fetchAllCompanyKnowledgeBases(_0x541575,{'title':_0x5e2df0[_0xac40f8(0x140)]})),_0x4bc757=findExactCompanyKnowledgeBases(_0x2bfb26,_0x541575[_0xac40f8(0x166)],_0x5e2df0[_0xac40f8(0x140)]);if(_0x4bc757[_0xac40f8(0x14b)]!==0x1)throw kbError(_0xac40f8(0x169),_0xac40f8(0x160)+_0x4bc757[_0xac40f8(0x14b)]+'.',_0xac40f8(0x147));_0x4e2811=_0x4bc757[0x0]['id'];}const _0x30ad9e=await verifyKbMutationReadback(_0xac40f8(0x159),_0x2f6885,()=>requireKb(_0x541575,_0x4e2811));if(_0x39581e!==undefined&&_0x30ad9e[_0xac40f8(0x15b)]!==_0x39581e)throw kbError(_0xac40f8(0x14a),_0xac40f8(0x151));const _0x258baa=verifyCreatedState(_0x541575,_0x5e2df0,_0x30ad9e),_0x42327f=_0x2f6885?[_0xac40f8(0x164)]:[];return{'ok':!![],'data':{'operation':'create','selector':{'id':_0x258baa['id'],'scope':_0xac40f8(0x167),'appCode':_0x258baa['appCode']},'before':null,'after':_0x258baa,'dryRun':![],'backend':{'method':_0xac40f8(0x153),'path':knowledgeDocumentsPath(_0xac40f8(0x167),_0xac40f8(0x159))},'warnings':_0x42327f,'verification':{'status':_0xac40f8(0x145),'recoveredAfterUnknownResponse':_0x2f6885,'lookupCommand':_0xac40f8(0x15e)+_0x258baa['id']+_0xac40f8(0x13e)}},'message':_0xac40f8(0x13f)+_0x258baa['id']+_0xac40f8(0x141)+_0x258baa['appCode']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a154_0x3f1ede=a154_0x6ca1;(function(_0xabaf92,_0x1ecf6e){const _0x523429=a154_0x6ca1,_0xa0c086=_0xabaf92();while(!![]){try{const _0x317b3b=parseInt(_0x523429(0x7b))/0x1*(-parseInt(_0x523429(0x81))/0x2)+parseInt(_0x523429(0x77))/0x3*(parseInt(_0x523429(0x6d))/0x4)+-parseInt(_0x523429(0x87))/0x5+-parseInt(_0x523429(0x86))/0x6+-parseInt(_0x523429(0x73))/0x7+-parseInt(_0x523429(0x7f))/0x8*(parseInt(_0x523429(0x8a))/0x9)+parseInt(_0x523429(0x70))/0xa;if(_0x317b3b===_0x1ecf6e)break;else _0xa0c086['push'](_0xa0c086['shift']());}catch(_0x59065f){_0xa0c086['push'](_0xa0c086['shift']());}}}(a154_0x29ae,0xaec70));import{knowledgeDocumentsPath}from'../../core/api-client.js';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';function a154_0x6ca1(_0x14e6f9,_0x119809){_0x14e6f9=_0x14e6f9-0x69;const _0x29aece=a154_0x29ae();let _0x6ca16c=_0x29aece[_0x14e6f9];return _0x6ca16c;}const RAG_WARNING='Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.';function readExpectedVersion(_0x7f12d7){const _0x1b4e66=a154_0x6ca1,_0x23f549=_0x7f12d7[_0x1b4e66(0x78)]('expected-version');if(_0x23f549===undefined)return undefined;const _0x2b620e=Number(_0x23f549);if(!Number[_0x1b4e66(0x7e)](_0x2b620e)||_0x2b620e<0x1)throw kbError(_0x1b4e66(0x72),_0x1b4e66(0x74));return _0x2b620e;}function noOpData(_0x522dd5,_0x16199a,_0x4e72b0){const _0x4a6b61=a154_0x6ca1;return{'operation':_0x4a6b61(0x7c),'selector':{'id':_0x16199a,'scope':_0x4a6b61(0x83),'appCode':_0x522dd5[_0x4a6b61(0x69)]},'before':null,'after':null,'dryRun':_0x4e72b0,'deleteCalled':![],'backend':{'method':'POST','path':knowledgeDocumentsPath(_0x4a6b61(0x83),_0x4a6b61(0x6c))},'warnings':[],'verification':{'status':'already_absent','databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}export const kbDelete={'service':'kb','command':a154_0x3f1ede(0x6c),'description':a154_0x3f1ede(0x6b),'risk':a154_0x3f1ede(0x79),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a154_0x3f1ede(0x8b),'required':!![],'description':'Company\x20knowledge-base\x20id'},{'name':a154_0x3f1ede(0x89),'type':a154_0x3f1ede(0x71),'required':![],'description':a154_0x3f1ede(0x85)}],async 'validate'(_0x5e6d6d){readKbId(_0x5e6d6d),readExpectedVersion(_0x5e6d6d),requireKbExplicitYes(_0x5e6d6d);},async 'dryRun'(_0x3bef93){const _0x305033=a154_0x3f1ede,_0x5e92f8=readKbId(_0x3bef93),_0x252cb1=readExpectedVersion(_0x3bef93),_0x48ed8a=await getKbOrNull(_0x3bef93,_0x5e92f8);if(!_0x48ed8a)return asDryRunResult(noOpData(_0x3bef93,_0x5e92f8,!![]),{'method':'POST','url':knowledgeDocumentsPath(_0x305033(0x83),'delete')});assertExpectedKbVersion(_0x48ed8a,_0x252cb1);const _0x363da1=projectKb(_0x48ed8a),_0x58e4ae=[RAG_WARNING];return asDryRunResult({'operation':_0x305033(0x6c),'selector':{'id':_0x363da1['id'],'scope':_0x305033(0x83),'appCode':_0x363da1[_0x305033(0x69)]},'before':_0x363da1,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':_0x305033(0x84),'path':knowledgeDocumentsPath(_0x305033(0x83),_0x305033(0x6c)),'body':{'appCode':_0x3bef93['appCode'],'id':_0x5e92f8,'expectedVersion':_0x48ed8a['version']}},'warnings':_0x58e4ae,'verification':{'expectedVersion':_0x48ed8a[_0x305033(0x76)],'atomicCompareAndSet':!![],'snapshotHash':_0x363da1[_0x305033(0x6e)],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':'rabetbase\x20kb\x20detail\x20--id\x20'+_0x363da1['id']+_0x305033(0x7d)}},{'method':'POST','url':knowledgeDocumentsPath(_0x305033(0x83),_0x305033(0x6c))});},async 'execute'(_0x174a5c){const _0x5cbe0e=a154_0x3f1ede;requireKbExplicitYes(_0x174a5c);const _0x117b0e=readKbId(_0x174a5c),_0x54c310=readExpectedVersion(_0x174a5c),_0x284c35=await getKbOrNull(_0x174a5c,_0x117b0e);if(!_0x284c35)return{'ok':!![],'data':noOpData(_0x174a5c,_0x117b0e,![]),'message':_0x5cbe0e(0x82)+_0x117b0e+'\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made'};assertExpectedKbVersion(_0x284c35,_0x54c310);const _0x21631b=projectKb(_0x284c35);let _0x201440=![];try{await deleteEnterpriseKnowledgeBase(_0x174a5c[_0x5cbe0e(0x6f)],_0x117b0e,_0x174a5c['appCode'],_0x284c35['version']);}catch(_0x1249db){if(!isPlatformTransportFailure(_0x1249db))throw _0x1249db;_0x201440=!![];}const _0x54b3c8=await verifyKbMutationReadback(_0x5cbe0e(0x6c),_0x201440,()=>getKbOrNull(_0x174a5c,_0x117b0e));if(_0x54b3c8)throw kbError(_0x201440?_0x5cbe0e(0x88):'kb_verification_failed',_0x5cbe0e(0x82)+_0x117b0e+_0x5cbe0e(0x6a),_0x5cbe0e(0x80)+_0x117b0e+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x5a8cb7=[RAG_WARNING];return _0x201440&&_0x5a8cb7['unshift']('Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x5cbe0e(0x6c),'selector':{'id':_0x21631b['id'],'scope':_0x5cbe0e(0x83),'appCode':_0x21631b['appCode']},'before':_0x21631b,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':_0x5cbe0e(0x84),'path':knowledgeDocumentsPath('company',_0x5cbe0e(0x6c))},'warnings':_0x5a8cb7,'verification':{'status':_0x5cbe0e(0x7a),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0x201440,'lookupCommand':_0x5cbe0e(0x75)+_0x21631b['id']+_0x5cbe0e(0x7d)}},'message':'Soft-deleted\x20company\x20knowledge\x20base\x20'+_0x21631b['id']};}};function a154_0x29ae(){const _0x55ca71=['expected-version','99GwbLgL','string','appCode','\x20remains\x20readable\x20after\x20delete.','Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','delete','4ThylmB','snapshotHash','cookie','29306490amVaOS','number','kb_expected_version_invalid','3656954VkTDSQ','--expected-version\x20must\x20be\x20a\x20positive\x20safe\x20integer.','rabetbase\x20kb\x20detail\x20--id\x20','version','2758713ZZlfyV','flag','high-risk-write','verified','3BFXaQc','no_op','\x20--format\x20compress','isSafeInteger','227112aTTPVw','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','293996uLiKxA','Company\x20knowledge\x20base\x20','company','POST','Require\x20the\x20current\x20version\x20before\x20atomic\x20compare-and-set','7066686nkxLDH','3404280bnXNXy','kb_delete_outcome_unknown'];a154_0x29ae=function(){return _0x55ca71;};return a154_0x29ae();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a155_0x4362(_0x81cb2d,_0x260cac){_0x81cb2d=_0x81cb2d-0x7c;const _0x340a39=a155_0x340a();let _0x436221=_0x340a39[_0x81cb2d];return _0x436221;}const a155_0x3f9795=a155_0x4362;function a155_0x340a(){const _0x5e9b82=['content','6934464xrRjLm','string','read','3225903uJfZiB','4663832AhHJoU','detail','567hUoHBT','12nOcayN','1893215FzBkDL','52840VheSql','1571724PBFUNp','1066161rfPiXm','Show\x20one\x20company\x20knowledge\x20base\x20with\x20full\x20content\x20for\x20the\x20resolved\x20app','Loaded\x20company\x20knowledge\x20base\x20'];a155_0x340a=function(){return _0x5e9b82;};return a155_0x340a();}(function(_0x2f6ef6,_0x52fef3){const _0x105cb3=a155_0x4362,_0x8983da=_0x2f6ef6();while(!![]){try{const _0x139a78=-parseInt(_0x105cb3(0x81))/0x1+parseInt(_0x105cb3(0x80))/0x2+-parseInt(_0x105cb3(0x88))/0x3+parseInt(_0x105cb3(0x89))/0x4+-parseInt(_0x105cb3(0x7e))/0x5*(-parseInt(_0x105cb3(0x7d))/0x6)+parseInt(_0x105cb3(0x7c))/0x7*(-parseInt(_0x105cb3(0x7f))/0x8)+parseInt(_0x105cb3(0x85))/0x9;if(_0x139a78===_0x52fef3)break;else _0x8983da['push'](_0x8983da['shift']());}catch(_0x128dfd){_0x8983da['push'](_0x8983da['shift']());}}}(a155_0x340a,0xc413f));import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';export const kbDetail={'service':'kb','command':a155_0x3f9795(0x8a),'description':a155_0x3f9795(0x82),'risk':a155_0x3f9795(0x87),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a155_0x3f9795(0x86),'required':!![],'description':'Company\x20knowledge-base\x20id'}],async 'validate'(_0x198584){readKbId(_0x198584);},async 'execute'(_0x32b0b1){const _0x4136f9=a155_0x3f9795,_0x5d82c1=readKbId(_0x32b0b1),_0x1424cf=await requireKb(_0x32b0b1,_0x5d82c1);return{'ok':!![],'data':{'knowledgeBase':{...projectKb(_0x1424cf),'content':_0x1424cf[_0x4136f9(0x84)]}},'message':_0x4136f9(0x83)+_0x5d82c1};}};
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a156_0x396ad1=a156_0x5b4c;(function(_0x1b7f90,_0x23f64c){const _0x3dec7d=a156_0x5b4c,_0x5f59e9=_0x1b7f90();while(!![]){try{const _0x544788=parseInt(_0x3dec7d(0xd7))/0x1+parseInt(_0x3dec7d(0xd6))/0x2*(parseInt(_0x3dec7d(0xe2))/0x3)+-parseInt(_0x3dec7d(0xdc))/0x4+parseInt(_0x3dec7d(0xdb))/0x5+parseInt(_0x3dec7d(0xd5))/0x6+parseInt(_0x3dec7d(0xd9))/0x7+-parseInt(_0x3dec7d(0xde))/0x8*(parseInt(_0x3dec7d(0xda))/0x9);if(_0x544788===_0x23f64c)break;else _0x5f59e9['push'](_0x5f59e9['shift']());}catch(_0x1d8e9b){_0x5f59e9['push'](_0x5f59e9['shift']());}}}(a156_0x26e8,0xe6035));import{withKbManagementSession}from'../../core/kb-management-client.js';import{kbList}from'../../commands/kb/list.js';function a156_0x5b4c(_0x386142,_0x1fbfd9){_0x386142=_0x386142-0xd4;const _0x26e8f4=a156_0x26e8();let _0x5b4c3b=_0x26e8f4[_0x386142];return _0x5b4c3b;}import{kbDetail}from'../../commands/kb/detail.js';import{kbSearch}from'../../commands/kb/search.js';import{kbCreate}from'../../commands/kb/create.js';function a156_0x26e8(){const _0x33d476=['command','474876NiFfpx','206avXUKp','1310366lUotQP','dryRun','9533006jqpBXG','9BrHheX','7759435qaEjlw','1100824WYsQZv','map','38790104WNrhHE','search','execute','signal','51345udBCYu'];a156_0x26e8=function(){return _0x33d476;};return a156_0x26e8();}import{kbUpdate}from'../../commands/kb/update.js';import{kbDelete}from'../../commands/kb/delete.js';export const kbDefinitions=[kbList,kbDetail,kbSearch,kbCreate,kbUpdate,kbDelete][a156_0x396ad1(0xdd)](_0x119b3a=>_0x119b3a[a156_0x396ad1(0xd4)]===a156_0x396ad1(0xdf)?_0x119b3a:{..._0x119b3a,'execute':_0x2a22b7=>withKbManagementSession(_0x2a22b7['signal'],()=>_0x119b3a[a156_0x396ad1(0xe0)](_0x2a22b7)),..._0x119b3a[a156_0x396ad1(0xd8)]?{'dryRun':_0x2b9f67=>withKbManagementSession(_0x2b9f67[a156_0x396ad1(0xe1)],()=>_0x119b3a['dryRun'](_0x2b9f67))}:{}});
|
package/lib/commands/kb/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a157_0x411d(_0x33399f,_0x524f76){_0x33399f=_0x33399f-0x6a;const _0x33240a=a157_0x3324();let _0x411d2d=_0x33240a[_0x33399f];return _0x411d2d;}function a157_0x3324(){const _0x1eda73=['\x20company\x20knowledge\x20base(s)\x20for\x20','Filter\x20by\x20knowledge-base\x20title','654Gclmbm','title','160272RCGADK','appCode','list','7506110YaumnT','128UeTIZn','string','820360OHuSKT','118783lhOZqn','590456JaTtVZ','length','9XJzPtx','3057030tdFMPY','1333006NcJogT'];a157_0x3324=function(){return _0x1eda73;};return a157_0x3324();}const a157_0x1874bf=a157_0x411d;(function(_0x4ccf13,_0x29d515){const _0xd267fc=a157_0x411d,_0x40e041=_0x4ccf13();while(!![]){try{const _0x5e8319=parseInt(_0xd267fc(0x6e))/0x1+-parseInt(_0xd267fc(0x6a))/0x2*(-parseInt(_0xd267fc(0x6c))/0x3)+parseInt(_0xd267fc(0x79))/0x4+-parseInt(_0xd267fc(0x6d))/0x5+parseInt(_0xd267fc(0x71))/0x6*(-parseInt(_0xd267fc(0x7a))/0x7)+parseInt(_0xd267fc(0x77))/0x8*(parseInt(_0xd267fc(0x73))/0x9)+parseInt(_0xd267fc(0x76))/0xa;if(_0x5e8319===_0x29d515)break;else _0x40e041['push'](_0x40e041['shift']());}catch(_0x35d1de){_0x40e041['push'](_0x40e041['shift']());}}}(a157_0x3324,0xf3b94));import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';export const kbList={'service':'kb','command':a157_0x1874bf(0x75),'description':'List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app','risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a157_0x1874bf(0x72),'type':a157_0x1874bf(0x78),'required':![],'description':a157_0x1874bf(0x70)}],async 'execute'(_0x1c43ec){const _0x3f8f89=a157_0x1874bf,_0x1a7e82=_0x1c43ec['str'](_0x3f8f89(0x72))['trim'](),_0x1c36d8=await fetchAllCompanyKnowledgeBases(_0x1c43ec,{..._0x1a7e82?{'title':_0x1a7e82}:{}}),_0x1a1598=_0x1c36d8['map'](projectKb);return{'ok':!![],'data':{'total':_0x1a1598['length'],'knowledgeBases':_0x1a1598},'message':'Found\x20'+_0x1a1598[_0x3f8f89(0x6b)]+_0x3f8f89(0x6f)+_0x1c43ec[_0x3f8f89(0x74)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x7bbe58=a158_0x5c29;(function(_0x1a7d00,_0x3927fc){const _0x277cc7=a158_0x5c29,_0x2fff4e=_0x1a7d00();while(!![]){try{const _0x131395=-parseInt(_0x277cc7(0x104))/0x1*(-parseInt(_0x277cc7(0xf8))/0x2)+parseInt(_0x277cc7(0xf1))/0x3+-parseInt(_0x277cc7(0xef))/0x4*(parseInt(_0x277cc7(0xfe))/0x5)+parseInt(_0x277cc7(0xf7))/0x6*(-parseInt(_0x277cc7(0xf5))/0x7)+parseInt(_0x277cc7(0xf2))/0x8*(-parseInt(_0x277cc7(0x102))/0x9)+parseInt(_0x277cc7(0x106))/0xa+-parseInt(_0x277cc7(0x108))/0xb;if(_0x131395===_0x3927fc)break;else _0x2fff4e['push'](_0x2fff4e['shift']());}catch(_0x53968a){_0x2fff4e['push'](_0x2fff4e['shift']());}}}(a158_0x26a1,0x54d2c));import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';function readSearchQuery(_0x21a436){const _0xb85107=a158_0x5c29,_0x222776=_0x21a436['str'](_0xb85107(0xe9))['trim']();if(!_0x222776)throw CliErrors[_0xb85107(0xff)](_0xb85107(0x107));return _0x222776;}function readSearchTopK(_0x5d7473){const _0x2cf9a7=a158_0x5c29,_0x172414=_0x5d7473[_0x2cf9a7(0xfc)](_0x2cf9a7(0xea));if(_0x172414===undefined||_0x172414===null||_0x172414==='')return undefined;const _0xdbe9f8=_0x5d7473[_0x2cf9a7(0xf0)]('topk');if(!Number[_0x2cf9a7(0x101)](_0xdbe9f8)||_0xdbe9f8<0x1||_0xdbe9f8>0x32)throw CliErrors['validation'](_0x2cf9a7(0xec));return _0xdbe9f8;}function a158_0x26a1(){const _0x1e27a3=['query','topk','\x20company/public\x20knowledge\x20hit(s)\x20for\x20','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','kb-service-url','188oIRWLf','num','1537158VyQoDv','4551192IvqYwM','Search\x20company\x20and\x20public\x20knowledge\x20for\x20the\x20resolved\x20app','signal','534527CYhzZa','Found\x20','6oTPWXW','652AxdxaX','str','appCode','number','flag','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20--kb-service-url\x20<https-origin>\x20for\x20this\x20request.','39010RoNpBQ','validation','search','isSafeInteger','9DCZNxD','total','1849tvCoxf','read','2703190UNaQVL','Search\x20query\x20is\x20required.','286979exvyce'];a158_0x26a1=function(){return _0x1e27a3;};return a158_0x26a1();}function a158_0x5c29(_0x5e602d,_0x51e2a0){_0x5e602d=_0x5e602d-0xe9;const _0x26a14d=a158_0x26a1();let _0x5c29d3=_0x26a14d[_0x5e602d];return _0x5c29d3;}function readSearchServiceUrl(_0x1e67f0){const _0x2bc168=a158_0x5c29;if(_0x1e67f0[_0x2bc168(0xfc)]('kb-service-url')!==undefined)return normalizeKbServiceOrigin(_0x1e67f0[_0x2bc168(0xf9)]('kb-service-url'));const _0x1b7d0c=getKbServiceDomain();if(!_0x1b7d0c)throw CliErrors[_0x2bc168(0xff)]('KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.',_0x2bc168(0xfd));return normalizeKbServiceOrigin(_0x1b7d0c);}export const kbSearch={'service':'kb','command':a158_0x7bbe58(0x100),'description':a158_0x7bbe58(0xf3),'risk':a158_0x7bbe58(0x105),'requiresAppCode':!![],'structuredErrors':!![],'strictFlags':!![],'flags':[{'name':a158_0x7bbe58(0xe9),'type':'string','required':!![],'description':'Company\x20and\x20public\x20knowledge\x20search\x20query'},{'name':a158_0x7bbe58(0xea),'type':a158_0x7bbe58(0xfb),'required':![],'description':'Maximum\x20number\x20of\x20knowledge\x20hits\x20to\x20return'},{'name':a158_0x7bbe58(0xee),'type':'string','required':![],'description':a158_0x7bbe58(0xed)}],async 'validate'(_0xd78a85){readSearchQuery(_0xd78a85),readSearchTopK(_0xd78a85),readSearchServiceUrl(_0xd78a85);},async 'execute'(_0x1bffe8){const _0x45efd5=a158_0x7bbe58,_0x1e6671=readSearchQuery(_0x1bffe8),_0x3475d4=readSearchTopK(_0x1bffe8),_0xff1789=readSearchServiceUrl(_0x1bffe8),_0x489623={'cookie':_0x1bffe8['cookie'],'query':_0x1e6671,'appCode':_0x1bffe8[_0x45efd5(0xfa)],..._0x3475d4!==undefined?{'topK':_0x3475d4}:{},'signal':_0x1bffe8[_0x45efd5(0xf4)]},_0x533846=await searchDirectKnowledge({..._0x489623,'serviceUrl':_0xff1789});return{'ok':!![],'data':_0x533846,'message':_0x45efd5(0xf6)+_0x533846[_0x45efd5(0x103)]+_0x45efd5(0xeb)+_0x1bffe8[_0x45efd5(0xfa)]};}};
|