@lovrabet/rabetbase-cli 2.5.8-beta.2 → 2.5.9-beta.1
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 +6 -6
- 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.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.d.ts +8 -5
- 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.d.ts +5 -3
- 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 +14 -11
- 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/kb-management-client.d.ts +2 -2
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +3 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/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 +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +17 -15
- package/skills/rabetbase/references/rabetbase-rule.md +8 -6
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a142_0x431683=a142_0x3c41;function a142_0x4ec4(){const _0xa16132=['Published\x20Instant\x20API\x20policy\x20revision\x20','6gPkHad','instant_api_policy_publish_outcome_unknown','6674016JDADgm','validation','175GdyPiV','253573IfKvcO','configHash','policyFilePath','10laBjfd','/publish','expectedRevision','70072aETESO','11FgBmlO','1900863ywdmFB','Publish\x20the\x20fixed\x20local\x20policy\x20as\x20a\x20new\x20active\x20revision','Current\x20policy\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20publish.','before','normalizedConfig','6VwHLnj','publish','Inspect\x20with\x20`','policyRelativePath','appCode','POST','instant_api_policy_publish_verification_failed','all','instant_api_policy_publish_verification_unavailable','29934cFtKRO','local','changeSummary','defineProperty','`;\x20do\x20not\x20resubmit\x20automatically.','The\x20publish\x20request\x20was\x20sent,\x20but\x20the\x20current\x20policy\x20could\x20not\x20be\x20verified.','37171745qsjBHF','938urrCvl','1738228cxfoCG','cause','push','revision','Publish\x20response\x20was\x20unavailable;\x20current-policy\x20readback\x20proved\x20the\x20new\x20revision\x20without\x20resubmitting.','high-risk-write','config'];a142_0x4ec4=function(){return _0xa16132;};return a142_0x4ec4();}(function(_0x234e98,_0x5c3155){const _0x4e396c=a142_0x3c41,_0x1cff63=_0x234e98();while(!![]){try{const _0x21cb47=parseInt(_0x4e396c(0xd6))/0x1*(parseInt(_0x4e396c(0xb8))/0x2)+parseInt(_0x4e396c(0xd1))/0x3*(-parseInt(_0x4e396c(0xc9))/0x4)+-parseInt(_0x4e396c(0xd5))/0x5*(parseInt(_0x4e396c(0xc1))/0x6)+parseInt(_0x4e396c(0xc8))/0x7*(-parseInt(_0x4e396c(0xb1))/0x8)+-parseInt(_0x4e396c(0xb3))/0x9*(parseInt(_0x4e396c(0xd9))/0xa)+parseInt(_0x4e396c(0xb2))/0xb*(-parseInt(_0x4e396c(0xd3))/0xc)+parseInt(_0x4e396c(0xc7))/0xd;if(_0x21cb47===_0x5c3155)break;else _0x1cff63['push'](_0x1cff63['shift']());}catch(_0x129a4c){_0x1cff63['push'](_0x1cff63['shift']());}}}(a142_0x4ec4,0x9b18a));function a142_0x3c41(_0x688a65,_0x3b0f30){_0x688a65=_0x688a65-0xb1;const _0x4ec4dc=a142_0x4ec4();let _0x3c41fe=_0x4ec4dc[_0x688a65];return _0x3c41fe;}import{getCurrentInstantApiPolicy,isPlatformTransportFailure,publishInstantApiPolicy,validateInstantApiPolicy}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertExpectedRevision,CHANGE_SUMMARY_FLAG,EXPECTED_REVISION_FLAG,expectedRevisionWarnings,INSTANT_API_POLICY_BASE_PATH,mutationLookupCommand,projectCurrentPolicy,readChangeSummary,readExpectedRevision,readFixedPolicy,RUNTIME_CACHE_WARNING}from'../../commands/instant-api-policy/shared.js';import{instantApiPolicyError}from'../../core/instant-api-policy/config.js';async function preparePublish(_0x339f78){const _0x3f6463=a142_0x3c41,{local:_0x229026,config:_0x39d319}=await readFixedPolicy(_0x339f78),_0x6ad40f=readChangeSummary(_0x339f78),_0x3d11dd=readExpectedRevision(_0x339f78),[_0x22915f,_0x4e9de7]=await Promise[_0x3f6463(0xbf)]([getCurrentInstantApiPolicy(_0x339f78['appCode']),validateInstantApiPolicy({'appCode':_0x339f78[_0x3f6463(0xbc)],'config':_0x39d319})]);return assertExpectedRevision(_0x22915f,_0x3d11dd),{'local':_0x229026,'config':_0x39d319,'changeSummary':_0x6ad40f,'expectedRevision':_0x3d11dd,'before':_0x22915f,'validation':_0x4e9de7};}export const instantApiPolicyPublish={'service':'instant-api-policy','command':a142_0x431683(0xb9),'description':a142_0x431683(0xb4),'risk':a142_0x431683(0xce),'requiresAppCode':!![],'structuredErrors':!![],'confirmationDescription':'Publish\x20an\x20application-wide\x20Instant\x20API\x20allow,\x20deny,\x20or\x20Backend\x20Function\x20routing\x20policy.','flags':[CHANGE_SUMMARY_FLAG,EXPECTED_REVISION_FLAG],async 'validate'(_0x3e419c){readChangeSummary(_0x3e419c),readExpectedRevision(_0x3e419c);},async 'dryRun'(_0xbbc06a){const _0xdf9432=a142_0x431683,_0x60588a=await preparePublish(_0xbbc06a);return asDryRunResult({'operation':_0xdf9432(0xb9),'selector':{'appCode':_0xbbc06a[_0xdf9432(0xbc)]},'before':projectCurrentPolicy(_0x60588a[_0xdf9432(0xb6)]),'after':{'revision':_0x60588a[_0xdf9432(0xb6)]?_0x60588a[_0xdf9432(0xb6)][_0xdf9432(0xcc)]+0x1:0x1,'configHash':_0x60588a[_0xdf9432(0xd4)][_0xdf9432(0xd7)],'config':_0x60588a[_0xdf9432(0xd4)][_0xdf9432(0xb7)]},'filePath':_0x60588a[_0xdf9432(0xc2)][_0xdf9432(0xd8)],'relativePath':_0x60588a['local'][_0xdf9432(0xbb)],'dryRun':!![],'backend':{'method':'POST','path':INSTANT_API_POLICY_BASE_PATH+_0xdf9432(0xda)},'warnings':expectedRevisionWarnings(_0x60588a[_0xdf9432(0xdb)]),'verification':{'status':'planned','expectedRevision':_0x60588a[_0xdf9432(0xdb)]??null,'atomicCompareAndSet':![],'lookupCommand':mutationLookupCommand()}},{'method':_0xdf9432(0xbd),'url':INSTANT_API_POLICY_BASE_PATH+_0xdf9432(0xda)});},async 'execute'(_0x1cba18){const _0xaa2869=a142_0x431683,_0x14fd5c=await preparePublish(_0x1cba18);let _0x25569d=![];try{await publishInstantApiPolicy({'appCode':_0x1cba18['appCode'],'config':_0x14fd5c[_0xaa2869(0xcf)],..._0x14fd5c[_0xaa2869(0xc3)]?{'changeSummary':_0x14fd5c[_0xaa2869(0xc3)]}:{}});}catch(_0x1946ad){if(!isPlatformTransportFailure(_0x1946ad))throw _0x1946ad;_0x25569d=!![];}let _0x40de91;try{_0x40de91=await getCurrentInstantApiPolicy(_0x1cba18[_0xaa2869(0xbc)]);}catch(_0x4c554e){const _0x11de3b=instantApiPolicyError(_0x25569d?_0xaa2869(0xd2):_0xaa2869(0xc0),_0xaa2869(0xc6),'Inspect\x20with\x20`'+mutationLookupCommand()+_0xaa2869(0xc5));Object[_0xaa2869(0xc4)](_0x11de3b,_0xaa2869(0xca),{'value':_0x4c554e,'enumerable':![]});throw _0x11de3b;}const _0x16eef8=_0x40de91&&(_0x14fd5c[_0xaa2869(0xb6)]===null||_0x40de91['revision']>_0x14fd5c[_0xaa2869(0xb6)][_0xaa2869(0xcc)]),_0x4e8fdf=_0x40de91?.[_0xaa2869(0xd7)]===_0x14fd5c[_0xaa2869(0xd4)][_0xaa2869(0xd7)];if(!_0x40de91||!_0x16eef8||!_0x4e8fdf)throw instantApiPolicyError(_0x25569d?_0xaa2869(0xd2):_0xaa2869(0xbe),_0xaa2869(0xb5),_0xaa2869(0xba)+mutationLookupCommand()+_0xaa2869(0xc5));const _0x517237=[...expectedRevisionWarnings(_0x14fd5c[_0xaa2869(0xdb)]),RUNTIME_CACHE_WARNING];return _0x25569d&&_0x517237[_0xaa2869(0xcb)](_0xaa2869(0xcd)),{'ok':!![],'data':{'operation':'publish','selector':{'appCode':_0x1cba18[_0xaa2869(0xbc)]},'before':projectCurrentPolicy(_0x14fd5c[_0xaa2869(0xb6)]),'after':projectCurrentPolicy(_0x40de91),'filePath':_0x14fd5c[_0xaa2869(0xc2)][_0xaa2869(0xd8)],'relativePath':_0x14fd5c[_0xaa2869(0xc2)][_0xaa2869(0xbb)],'dryRun':![],'backend':{'method':_0xaa2869(0xbd),'path':INSTANT_API_POLICY_BASE_PATH+_0xaa2869(0xda)},'warnings':_0x517237,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x25569d,'expectedRevision':_0x14fd5c[_0xaa2869(0xdb)]??null,'atomicCompareAndSet':![],'lookupCommand':mutationLookupCommand()}},'message':_0xaa2869(0xd0)+_0x40de91['revision']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a143_0x4f0407=a143_0x2212;(function(_0x5089e8,_0xdb09b0){const _0x325f9c=a143_0x2212,_0x3e52a5=_0x5089e8();while(!![]){try{const _0x4dd03c=-parseInt(_0x325f9c(0x1bb))/0x1*(-parseInt(_0x325f9c(0x1c0))/0x2)+-parseInt(_0x325f9c(0x1b8))/0x3*(parseInt(_0x325f9c(0x1b9))/0x4)+-parseInt(_0x325f9c(0x1bf))/0x5+-parseInt(_0x325f9c(0x1c1))/0x6+parseInt(_0x325f9c(0x1c7))/0x7*(-parseInt(_0x325f9c(0x1b5))/0x8)+parseInt(_0x325f9c(0x1ca))/0x9*(-parseInt(_0x325f9c(0x1c6))/0xa)+parseInt(_0x325f9c(0x1cb))/0xb*(parseInt(_0x325f9c(0x1c3))/0xc);if(_0x4dd03c===_0xdb09b0)break;else _0x3e52a5['push'](_0x3e52a5['shift']());}catch(_0x207e66){_0x3e52a5['push'](_0x3e52a5['shift']());}}}(a143_0x3a5a,0x4391b));function a143_0x3a5a(){const _0x33f1b5=['213391rofesh','pull','policyRelativePath','Pull\x20the\x20current\x20effective\x20policy\x20into\x20the\x20fixed\x20local\x20file','144565Szhlrm','2lwwbsw','3229500qWqLlL','config','3097812ROkmUe','appCode','Instant\x20API\x20policy\x20is\x20not\x20configured\x20for\x20','10gxIghd','91pIZVqc','instant_api_policy_not_configured','force','828855adJyTP','44FRGLIZ','policyFilePath','revision','action','36872TWQrNU','Pulled','instant-api-policy','750171KkeVjE','4PgDgAe','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20to\x20create\x20a\x20local\x20policy\x20draft.'];a143_0x3a5a=function(){return _0x33f1b5;};return a143_0x3a5a();}function a143_0x2212(_0x22cf12,_0x2fa1b1){_0x22cf12=_0x22cf12-0x1b3;const _0x3a5a74=a143_0x3a5a();let _0x221231=_0x3a5a74[_0x22cf12];return _0x221231;}import{getCurrentInstantApiPolicy}from'../../core/api-client.js';import{instantApiPolicyError,loadInstantApiPolicyLocalConfig,writeInstantApiPolicyConfigFile}from'../../core/instant-api-policy/config.js';import{FORCE_FLAG,requireForceConfirmation}from'../../commands/instant-api-policy/shared.js';export const instantApiPolicyPull={'service':a143_0x4f0407(0x1b7),'command':'pull','description':a143_0x4f0407(0x1be),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[FORCE_FLAG],async 'validate'(_0x5977a2){requireForceConfirmation(_0x5977a2);},async 'execute'(_0xbe3c30){const _0x45de09=a143_0x4f0407;requireForceConfirmation(_0xbe3c30);const _0xefc6d8=await getCurrentInstantApiPolicy(_0xbe3c30[_0x45de09(0x1c4)]);if(!_0xefc6d8)throw instantApiPolicyError(_0x45de09(0x1c8),_0x45de09(0x1c5)+_0xbe3c30[_0x45de09(0x1c4)]+'.',_0x45de09(0x1ba));const _0x4be817=loadInstantApiPolicyLocalConfig(_0xbe3c30['appCode']),_0x5512b1=await writeInstantApiPolicyConfigFile(_0x4be817,_0xefc6d8[_0x45de09(0x1c2)],{'force':_0xbe3c30['bool'](_0x45de09(0x1c9))});return{'ok':!![],'data':{'operation':_0x45de09(0x1bc),'selector':{'appCode':_0xbe3c30[_0x45de09(0x1c4)],'revision':_0xefc6d8[_0x45de09(0x1b3)]},'filePath':_0x4be817[_0x45de09(0x1cc)],'relativePath':_0x4be817[_0x45de09(0x1bd)],'action':_0x5512b1['action'],'configHash':_0xefc6d8['configHash']},'message':(_0x5512b1[_0x45de09(0x1b4)]==='unchanged'?'Kept':_0x45de09(0x1b6))+'\x20Instant\x20API\x20policy\x20revision\x20'+_0xefc6d8['revision']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a144_0x5bcc(){const _0x372930=['25384NzeQFw','558511madCdH','Loaded\x20Instant\x20API\x20policy\x20revision\x20','read','8QQUznW','instant-api-policy','4526436THfokA','675pUgsIY','revision','2632968PBBTeN','appCode','7763077IWQydk','24016878ntbPJG','1334106wbijrF'];a144_0x5bcc=function(){return _0x372930;};return a144_0x5bcc();}const a144_0x436648=a144_0x1aa8;(function(_0xb212ee,_0x4604f7){const _0x29ca0f=a144_0x1aa8,_0x49e80a=_0xb212ee();while(!![]){try{const _0x5a437c=parseInt(_0x29ca0f(0x1a0))/0x1+-parseInt(_0x29ca0f(0x19e))/0x2+-parseInt(_0x29ca0f(0x1a5))/0x3+parseInt(_0x29ca0f(0x19f))/0x4*(-parseInt(_0x29ca0f(0x1a6))/0x5)+-parseInt(_0x29ca0f(0x1a8))/0x6+-parseInt(_0x29ca0f(0x19c))/0x7*(-parseInt(_0x29ca0f(0x1a3))/0x8)+parseInt(_0x29ca0f(0x19d))/0x9;if(_0x5a437c===_0x4604f7)break;else _0x49e80a['push'](_0x49e80a['shift']());}catch(_0x29a9b8){_0x49e80a['push'](_0x49e80a['shift']());}}}(a144_0x5bcc,0xd3195));import{getInstantApiPolicyRevision}from'../../core/api-client.js';function a144_0x1aa8(_0x11423b,_0x1e20a3){_0x11423b=_0x11423b-0x19b;const _0x5bccb1=a144_0x5bcc();let _0x1aa846=_0x5bccb1[_0x11423b];return _0x1aa846;}import{projectRevisionDetail,readRevision,REVISION_FLAG}from'../../commands/instant-api-policy/shared.js';export const instantApiPolicyRevision={'service':a144_0x436648(0x1a4),'command':a144_0x436648(0x1a7),'description':'Get\x20one\x20immutable\x20Instant\x20API\x20policy\x20revision','risk':a144_0x436648(0x1a2),'requiresAppCode':!![],'structuredErrors':!![],'flags':[REVISION_FLAG],async 'validate'(_0x357fd4){readRevision(_0x357fd4);},async 'execute'(_0x287bd3){const _0x438a86=a144_0x436648,_0x48085b=readRevision(_0x287bd3),_0x5106fb=await getInstantApiPolicyRevision(_0x287bd3[_0x438a86(0x19b)],_0x48085b);return{'ok':!![],'data':{'revision':projectRevisionDetail(_0x5106fb)},'message':_0x438a86(0x1a1)+_0x48085b};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a145_0x15905e=a145_0x42ae;function a145_0xb49f(){const _0x11eff1=['5mmkQnL','1156470SnFbVk','read','\x20Instant\x20API\x20policy\x20revision(s)','964058WBkfPr','1887276qerHbQ','1198463eFRsvx','552046YovrYr','appCode','Found\x20','List\x20immutable\x20Instant\x20API\x20policy\x20revisions','409395OQOtpe','length','42808UsFgyq','2628DPTDmN'];a145_0xb49f=function(){return _0x11eff1;};return a145_0xb49f();}(function(_0x190761,_0x97820f){const _0x5f4220=a145_0x42ae,_0x44c44a=_0x190761();while(!![]){try{const _0x3fad70=-parseInt(_0x5f4220(0x141))/0x1+-parseInt(_0x5f4220(0x13e))/0x2+-parseInt(_0x5f4220(0x145))/0x3+-parseInt(_0x5f4220(0x13f))/0x4+parseInt(_0x5f4220(0x13a))/0x5*(parseInt(_0x5f4220(0x13b))/0x6)+parseInt(_0x5f4220(0x140))/0x7+parseInt(_0x5f4220(0x138))/0x8*(parseInt(_0x5f4220(0x139))/0x9);if(_0x3fad70===_0x97820f)break;else _0x44c44a['push'](_0x44c44a['shift']());}catch(_0x1677d8){_0x44c44a['push'](_0x44c44a['shift']());}}}(a145_0xb49f,0x455b7));function a145_0x42ae(_0x2a41c6,_0xdbcff5){_0x2a41c6=_0x2a41c6-0x138;const _0xb49f4e=a145_0xb49f();let _0x42ae38=_0xb49f4e[_0x2a41c6];return _0x42ae38;}import{listInstantApiPolicyRevisions}from'../../core/api-client.js';import{projectRevisionSummary}from'../../commands/instant-api-policy/shared.js';export const instantApiPolicyRevisions={'service':'instant-api-policy','command':'revisions','description':a145_0x15905e(0x144),'risk':a145_0x15905e(0x13c),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x40b787){const _0x47721a=a145_0x15905e,_0x36f488=await listInstantApiPolicyRevisions(_0x40b787['appCode']);return{'ok':!![],'data':{'appCode':_0x40b787[_0x47721a(0x142)],'total':_0x36f488[_0x47721a(0x146)],'revisions':_0x36f488['map'](projectRevisionSummary)},'message':_0x47721a(0x143)+_0x36f488[_0x47721a(0x146)]+_0x47721a(0x13d)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a146_0x1782c5=a146_0x3b89;(function(_0x29b882,_0x441abf){const _0x55c69b=a146_0x3b89,_0x27c2e4=_0x29b882();while(!![]){try{const _0x4fa480=parseInt(_0x55c69b(0x9a))/0x1*(parseInt(_0x55c69b(0x92))/0x2)+parseInt(_0x55c69b(0x96))/0x3*(-parseInt(_0x55c69b(0x8b))/0x4)+parseInt(_0x55c69b(0x88))/0x5+parseInt(_0x55c69b(0xa9))/0x6*(parseInt(_0x55c69b(0xa7))/0x7)+parseInt(_0x55c69b(0x90))/0x8*(-parseInt(_0x55c69b(0x89))/0x9)+parseInt(_0x55c69b(0x8e))/0xa*(parseInt(_0x55c69b(0xa6))/0xb)+parseInt(_0x55c69b(0x8a))/0xc;if(_0x4fa480===_0x441abf)break;else _0x27c2e4['push'](_0x27c2e4['shift']());}catch(_0x10b26a){_0x27c2e4['push'](_0x27c2e4['shift']());}}}(a146_0x27a0,0x5d0ee));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_BASE_PATH,mutationLookupCommand,projectCurrentPolicy,projectRevisionDetail,readChangeSummary,readExpectedRevision,readRevision,REVISION_FLAG,RUNTIME_CACHE_WARNING}from'../../commands/instant-api-policy/shared.js';function a146_0x3b89(_0x4112a3,_0x18066d){_0x4112a3=_0x4112a3-0x86;const _0x27a07a=a146_0x27a0();let _0x3b89db=_0x27a07a[_0x4112a3];return _0x3b89db;}function a146_0x27a0(){const _0xe47158=['instant-api-policy','11McSZKM','1981105DNQlkP','push','6stUEcf','instant_api_policy_rollback_verification_unavailable','target','planned','rollback','before','1495XnFTRj','64458dcTjaL','10575780QgYTcV','1465748hTkbyj','/rollback','Restore\x20an\x20application-wide\x20Instant\x20API\x20policy\x20from\x20immutable\x20history\x20as\x20a\x20new\x20revision.','1075110Szcqaq','high-risk-write','368vPOAUN','expectedRevision','4HzyRxJ','revision','POST','`;\x20do\x20not\x20resubmit\x20automatically.','6MjawHt','instant_api_policy_not_configured','Rolled\x20Instant\x20API\x20policy\x20revision\x20','instant_api_policy_rollback_outcome_unknown','85676jwurhH','The\x20rollback\x20request\x20was\x20sent,\x20but\x20the\x20current\x20policy\x20could\x20not\x20be\x20verified.','Current\x20policy\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20rollback.','Inspect\x20with\x20`','Instant\x20API\x20policy\x20is\x20not\x20configured\x20for\x20','defineProperty','appCode','Restore\x20a\x20historical\x20policy\x20as\x20a\x20new\x20active\x20revision','all','configHash','changeSummary'];a146_0x27a0=function(){return _0xe47158;};return a146_0x27a0();}async function prepareRollback(_0x393b33){const _0x478f79=a146_0x3b89,_0x5969ed=readRevision(_0x393b33),_0x41fc7f=readChangeSummary(_0x393b33),_0x3f53b4=readExpectedRevision(_0x393b33),[_0x8ab48e,_0x2d76eb]=await Promise[_0x478f79(0xa2)]([getCurrentInstantApiPolicy(_0x393b33[_0x478f79(0xa0)]),getInstantApiPolicyRevision(_0x393b33[_0x478f79(0xa0)],_0x5969ed)]);if(!_0x8ab48e)throw instantApiPolicyError(_0x478f79(0x97),_0x478f79(0x9e)+_0x393b33['appCode']+'.');return assertExpectedRevision(_0x8ab48e,_0x3f53b4),{'revision':_0x5969ed,'changeSummary':_0x41fc7f,'expectedRevision':_0x3f53b4,'before':_0x8ab48e,'target':_0x2d76eb};}export const instantApiPolicyRollback={'service':a146_0x1782c5(0xa5),'command':'rollback','description':a146_0x1782c5(0xa1),'risk':a146_0x1782c5(0x8f),'requiresAppCode':!![],'structuredErrors':!![],'confirmationDescription':a146_0x1782c5(0x8d),'flags':[REVISION_FLAG,CHANGE_SUMMARY_FLAG,EXPECTED_REVISION_FLAG],async 'validate'(_0x24e3aa){readRevision(_0x24e3aa),readChangeSummary(_0x24e3aa),readExpectedRevision(_0x24e3aa);},async 'dryRun'(_0x49777c){const _0x542d1b=a146_0x1782c5,_0x3afe9f=await prepareRollback(_0x49777c);return asDryRunResult({'operation':'rollback','selector':{'appCode':_0x49777c['appCode'],'sourceRevision':_0x3afe9f['revision']},'before':projectCurrentPolicy(_0x3afe9f[_0x542d1b(0x87)]),'after':{'revision':_0x3afe9f[_0x542d1b(0x87)]['revision']+0x1,'sourceRevision':projectRevisionDetail(_0x3afe9f[_0x542d1b(0xab)])},'dryRun':!![],'backend':{'method':_0x542d1b(0x94),'path':INSTANT_API_POLICY_BASE_PATH+_0x542d1b(0x8c)},'warnings':expectedRevisionWarnings(_0x3afe9f[_0x542d1b(0x91)]),'verification':{'status':_0x542d1b(0xac),'expectedRevision':_0x3afe9f['expectedRevision']??null,'atomicCompareAndSet':![],'lookupCommand':mutationLookupCommand()}},{'method':_0x542d1b(0x94),'url':INSTANT_API_POLICY_BASE_PATH+'/rollback'});},async 'execute'(_0x10aa55){const _0x599aec=a146_0x1782c5,_0x46b80a=await prepareRollback(_0x10aa55);let _0x9b579a=![];try{await rollbackInstantApiPolicy({'appCode':_0x10aa55[_0x599aec(0xa0)],'revision':_0x46b80a[_0x599aec(0x93)],..._0x46b80a[_0x599aec(0xa4)]?{'changeSummary':_0x46b80a['changeSummary']}:{}});}catch(_0x517231){if(!isPlatformTransportFailure(_0x517231))throw _0x517231;_0x9b579a=!![];}let _0x4e0a87;try{_0x4e0a87=await getCurrentInstantApiPolicy(_0x10aa55[_0x599aec(0xa0)]);}catch(_0x5ab318){const _0x19faaa=instantApiPolicyError(_0x9b579a?_0x599aec(0x99):_0x599aec(0xaa),_0x599aec(0x9b),_0x599aec(0x9d)+mutationLookupCommand()+_0x599aec(0x95));Object[_0x599aec(0x9f)](_0x19faaa,'cause',{'value':_0x5ab318,'enumerable':![]});throw _0x19faaa;}const _0x28dcf6=_0x4e0a87&&_0x4e0a87['revision']>_0x46b80a[_0x599aec(0x87)]['revision'],_0x5ce040=_0x4e0a87?.[_0x599aec(0xa3)]===_0x46b80a[_0x599aec(0xab)]['configHash'];if(!_0x4e0a87||!_0x28dcf6||!_0x5ce040)throw instantApiPolicyError(_0x9b579a?_0x599aec(0x99):'instant_api_policy_rollback_verification_failed',_0x599aec(0x9c),_0x599aec(0x9d)+mutationLookupCommand()+_0x599aec(0x95));const _0x2ed24d=[...expectedRevisionWarnings(_0x46b80a[_0x599aec(0x91)]),RUNTIME_CACHE_WARNING];return _0x9b579a&&_0x2ed24d[_0x599aec(0xa8)]('Rollback\x20response\x20was\x20unavailable;\x20current-policy\x20readback\x20proved\x20the\x20new\x20revision\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x599aec(0x86),'selector':{'appCode':_0x10aa55[_0x599aec(0xa0)],'sourceRevision':_0x46b80a['revision']},'before':projectCurrentPolicy(_0x46b80a[_0x599aec(0x87)]),'after':projectCurrentPolicy(_0x4e0a87),'dryRun':![],'backend':{'method':'POST','path':INSTANT_API_POLICY_BASE_PATH+_0x599aec(0x8c)},'warnings':_0x2ed24d,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x9b579a,'expectedRevision':_0x46b80a[_0x599aec(0x91)]??null,'atomicCompareAndSet':![],'lookupCommand':mutationLookupCommand()}},'message':_0x599aec(0x98)+_0x46b80a[_0x599aec(0x93)]+'\x20forward\x20to\x20revision\x20'+_0x4e0a87[_0x599aec(0x93)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x1a7495=a147_0x24fe;(function(_0x30f3b7,_0x3490c8){const _0x15c961=a147_0x24fe,_0x1d6179=_0x30f3b7();while(!![]){try{const _0x1883e8=-parseInt(_0x15c961(0x11a))/0x1+parseInt(_0x15c961(0xfe))/0x2*(-parseInt(_0x15c961(0x10b))/0x3)+parseInt(_0x15c961(0x102))/0x4*(-parseInt(_0x15c961(0xf7))/0x5)+parseInt(_0x15c961(0x10a))/0x6+parseInt(_0x15c961(0x109))/0x7+parseInt(_0x15c961(0xfb))/0x8*(parseInt(_0x15c961(0x101))/0x9)+parseInt(_0x15c961(0x129))/0xa*(-parseInt(_0x15c961(0x11d))/0xb);if(_0x1883e8===_0x3490c8)break;else _0x1d6179['push'](_0x1d6179['shift']());}catch(_0x333fbf){_0x1d6179['push'](_0x1d6179['shift']());}}}(a147_0x5586,0x36e8b));function a147_0x24fe(_0x16863e,_0x1d879d){_0x16863e=_0x16863e-0xf0;const _0x558692=a147_0x5586();let _0x24fe1b=_0x558692[_0x16863e];return _0x24fe1b;}import{instantApiPolicyError,loadInstantApiPolicyLocalConfig,readInstantApiPolicyConfigFile}from'../../core/instant-api-policy/config.js';export const INSTANT_API_POLICY_BASE_PATH=a147_0x1a7495(0x111);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=a147_0x1a7495(0x126);export const FORCE_FLAG={'name':a147_0x1a7495(0x121),'type':a147_0x1a7495(0x116),'default':![],'description':a147_0x1a7495(0x11b)};export const CHANGE_SUMMARY_FLAG={'name':a147_0x1a7495(0xfc),'type':a147_0x1a7495(0xf9),'required':![],'description':a147_0x1a7495(0xf0)};export const REVISION_FLAG={'name':a147_0x1a7495(0x112),'type':'number','required':!![],'description':a147_0x1a7495(0x113)};export const EXPECTED_REVISION_FLAG={'name':a147_0x1a7495(0x120),'type':a147_0x1a7495(0xf3),'required':![],'description':a147_0x1a7495(0xfa)};export function requireForceConfirmation(_0x2c5d5c){const _0x4ef054=a147_0x1a7495;if(!_0x2c5d5c[_0x4ef054(0xf4)](_0x4ef054(0x121))||_0x2c5d5c[_0x4ef054(0xf4)](_0x4ef054(0xf8)))return;throw instantApiPolicyError(_0x4ef054(0xf5),'--force\x20requires\x20--yes\x20because\x20it\x20replaces\x20the\x20fixed\x20local\x20policy\x20file.',_0x4ef054(0x119));}export function readChangeSummary(_0x97ced8){const _0xbca793=a147_0x1a7495,_0x338565=_0x97ced8[_0xbca793(0xfd)]('change-summary')[_0xbca793(0x114)]();if(!_0x338565)return undefined;if(_0x338565['length']>0x7d0)throw instantApiPolicyError('instant_api_policy_change_summary_invalid',_0xbca793(0xff));return _0x338565;}export function readRevision(_0x2fbd5c){const _0x9ececa=a147_0x1a7495,_0x711985=_0x2fbd5c['num'](_0x9ececa(0x112),Number['NaN']);if(!Number[_0x9ececa(0x10e)](_0x711985)||_0x711985<=0x0)throw instantApiPolicyError(_0x9ececa(0x100),'--revision\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x711985;}export function readExpectedRevision(_0x1ae05f){const _0x2c1874=a147_0x1a7495;if(_0x1ae05f[_0x2c1874(0x124)]('expected-revision')===undefined)return undefined;const _0x41d44b=_0x1ae05f[_0x2c1874(0x110)]('expected-revision',Number[_0x2c1874(0x108)]);if(!Number[_0x2c1874(0x10e)](_0x41d44b)||_0x41d44b<0x0)throw instantApiPolicyError(_0x2c1874(0x128),_0x2c1874(0xf1));return _0x41d44b;}export function assertExpectedRevision(_0x547729,_0x1cbda1){const _0x19619b=a147_0x1a7495;if(_0x1cbda1===undefined)return;const _0x4a10d2=_0x547729?.[_0x19619b(0x112)]??0x0;if(_0x4a10d2!==_0x1cbda1)throw instantApiPolicyError(_0x19619b(0x11f),_0x19619b(0x117),_0x19619b(0x105)+_0x1cbda1+_0x19619b(0x103)+_0x4a10d2+_0x19619b(0x127));}export async function readFixedPolicy(_0x26cc6e){const _0x394583=loadInstantApiPolicyLocalConfig(_0x26cc6e['appCode']),_0x1033a6=await readInstantApiPolicyConfigFile(_0x394583);return{'local':_0x394583,'config':_0x1033a6};}export function projectCurrentPolicy(_0xb62c1b){const _0x533343=a147_0x1a7495;if(!_0xb62c1b)return null;return{'id':_0xb62c1b['id'],'appCode':_0xb62c1b[_0x533343(0x125)],'revision':_0xb62c1b[_0x533343(0x112)],'configHash':_0xb62c1b[_0x533343(0xf2)],'enabled':_0xb62c1b[_0x533343(0x122)],'config':_0xb62c1b[_0x533343(0x10c)],'createUserId':_0xb62c1b[_0x533343(0x106)]??null,'updateUserId':_0xb62c1b['updateUserId']??null,'gmtCreate':_0xb62c1b[_0x533343(0x10d)]??null,'gmtModified':_0xb62c1b[_0x533343(0x11e)]??null};}export function projectRevisionSummary(_0x5107b9){const _0xa3fcd7=a147_0x1a7495;return{'id':_0x5107b9['id'],'policyId':_0x5107b9[_0xa3fcd7(0xf6)],'appCode':_0x5107b9[_0xa3fcd7(0x125)],'revision':_0x5107b9[_0xa3fcd7(0x112)],'configHash':_0x5107b9['configHash'],'changeType':_0x5107b9[_0xa3fcd7(0x104)],'changeSummary':_0x5107b9[_0xa3fcd7(0x107)]??null,'operatorId':_0x5107b9[_0xa3fcd7(0x115)]??null,'gmtCreate':_0x5107b9[_0xa3fcd7(0x10d)]??null,'version':_0x5107b9['config'][_0xa3fcd7(0x123)],'defaultAction':_0x5107b9[_0xa3fcd7(0x10c)][_0xa3fcd7(0x118)][_0xa3fcd7(0x11c)],'ruleCount':_0x5107b9[_0xa3fcd7(0x10c)][_0xa3fcd7(0x10f)]?.['length']??0x0};}export function projectRevisionDetail(_0x35cd1a){return{...projectRevisionSummary(_0x35cd1a),'config':_0x35cd1a['config']};}export function expectedRevisionWarnings(_0x15121c){return _0x15121c===undefined?[]:[NON_ATOMIC_EXPECTED_REVISION_WARNING];}export function mutationLookupCommand(){return'rabetbase\x20instant-api-policy\x20current\x20--format\x20compress';}function a147_0x5586(){const _0x1ab53d=['Positive\x20published\x20policy\x20revision','trim','operatorId','boolean','The\x20current\x20Instant\x20API\x20policy\x20revision\x20changed\x20before\x20mutation.','defaults','Review\x20the\x20existing\x20file,\x20then\x20rerun\x20with\x20--force\x20--yes.','310246WvAxyJ','Replace\x20an\x20existing\x20fixed\x20policy\x20file;\x20requires\x20--yes','instantApi','484671BxPpWu','gmtModified','instant_api_policy_revision_mismatch','expected-revision','force','enabled','version','flag','appCode','--expected-revision\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20mutation\x20contract\x20has\x20no\x20revision\x20predicate.','.\x20Run\x20current\x20and\x20review\x20before\x20retrying.','instant_api_policy_expected_revision_invalid','20OBooWz','Audit\x20summary\x20for\x20this\x20policy\x20revision\x20(maximum\x202000\x20characters)','--expected-revision\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','configHash','number','bool','instant_api_policy_force_confirmation_required','policyId','210510nTblfK','yes','string','Non-atomic\x20assertion\x20for\x20the\x20current\x20revision;\x20use\x200\x20when\x20unconfigured','24zMulvF','change-summary','str','2oSgNnc','--change-summary\x20cannot\x20exceed\x202000\x20characters.','instant_api_policy_revision_invalid','778761HzWhjM','12MItgND',';\x20current\x20revision\x20is\x20','changeType','Expected\x20revision\x20','createUserId','changeSummary','NaN','2206330CCdohx','1409952FhYDne','180564EtWAdj','config','gmtCreate','isSafeInteger','rules','num','/smartapi/instant-api-policy','revision'];a147_0x5586=function(){return _0x1ab53d;};return a147_0x5586();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a148_0x3935a0=a148_0x4502;function a148_0x4502(_0x3325f9,_0x179587){_0x3325f9=_0x3325f9-0x9b;const _0x325080=a148_0x3250();let _0x45020f=_0x325080[_0x3325f9];return _0x45020f;}function a148_0x3250(){const _0x4ad9db=['valid','708pcYPKE','Validate\x20the\x20fixed\x20local\x20policy\x20without\x20publishing','1322756SlpSuJ','Validated\x20Instant\x20API\x20policy\x20for\x20','1888152NNKEBp','appCode','14110EHjnMM','2484sgvNqg','policyRelativePath','90WiTSal','240lYcpss','POST','normalizedConfig','/validate','114530moTADx','3ovxPyg','272680gOVeKR','validate','2255OuRzOW','policyFilePath','903495IfeNUZ','12azVmCC','read'];a148_0x3250=function(){return _0x4ad9db;};return a148_0x3250();}(function(_0x2e3131,_0x249a02){const _0x1358a6=a148_0x4502,_0x2ab35d=_0x2e3131();while(!![]){try{const _0x396677=-parseInt(_0x1358a6(0x9b))/0x1*(-parseInt(_0x1358a6(0xb0))/0x2)+parseInt(_0x1358a6(0xa0))/0x3*(parseInt(_0x1358a6(0xab))/0x4)+parseInt(_0x1358a6(0xa5))/0x5+parseInt(_0x1358a6(0xa6))/0x6*(-parseInt(_0x1358a6(0xad))/0x7)+-parseInt(_0x1358a6(0xa1))/0x8*(-parseInt(_0x1358a6(0xb2))/0x9)+parseInt(_0x1358a6(0xaf))/0xa*(parseInt(_0x1358a6(0xa3))/0xb)+-parseInt(_0x1358a6(0xa9))/0xc*(parseInt(_0x1358a6(0x9f))/0xd);if(_0x396677===_0x249a02)break;else _0x2ab35d['push'](_0x2ab35d['shift']());}catch(_0x2ba316){_0x2ab35d['push'](_0x2ab35d['shift']());}}}(a148_0x3250,0x5cd97));import{validateInstantApiPolicy}from'../../core/api-client.js';import{INSTANT_API_POLICY_BASE_PATH,readFixedPolicy}from'../../commands/instant-api-policy/shared.js';export const instantApiPolicyValidate={'service':'instant-api-policy','command':'validate','description':a148_0x3935a0(0xaa),'risk':a148_0x3935a0(0xa7),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x1f4c0){const _0x53fcd7=a148_0x3935a0,{local:_0x38efca,config:_0x53990a}=await readFixedPolicy(_0x1f4c0),_0x2f6ce1=await validateInstantApiPolicy({'appCode':_0x1f4c0['appCode'],'config':_0x53990a});return{'ok':!![],'data':{'operation':_0x53fcd7(0xa2),'selector':{'appCode':_0x1f4c0[_0x53fcd7(0xae)]},'filePath':_0x38efca[_0x53fcd7(0xa4)],'relativePath':_0x38efca[_0x53fcd7(0xb1)],'valid':_0x2f6ce1[_0x53fcd7(0xa8)],'configHash':_0x2f6ce1['configHash'],'normalizedConfig':_0x2f6ce1[_0x53fcd7(0x9d)],'backend':{'method':_0x53fcd7(0x9c),'path':INSTANT_API_POLICY_BASE_PATH+_0x53fcd7(0x9e)}},'message':_0x53fcd7(0xac)+_0x1f4c0['appCode']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4139ae,_0x1d9649){const _0x1499b7=a149_0x4ddc,_0x4ee2bf=_0x4139ae();while(!![]){try{const _0x2add70=parseInt(_0x1499b7(0xbc))/0x1+-parseInt(_0x1499b7(0xc2))/0x2*(-parseInt(_0x1499b7(0xc3))/0x3)+-parseInt(_0x1499b7(0xbd))/0x4+-parseInt(_0x1499b7(0xbe))/0x5*(-parseInt(_0x1499b7(0xc6))/0x6)+parseInt(_0x1499b7(0xbf))/0x7*(-parseInt(_0x1499b7(0xc5))/0x8)+-parseInt(_0x1499b7(0xc1))/0x9*(parseInt(_0x1499b7(0xc0))/0xa)+-parseInt(_0x1499b7(0xc4))/0xb;if(_0x2add70===_0x1d9649)break;else _0x4ee2bf['push'](_0x4ee2bf['shift']());}catch(_0x32971d){_0x4ee2bf['push'](_0x4ee2bf['shift']());}}}(a149_0x16c1,0x64c9b));function a149_0x4ddc(_0x16f170,_0x2b19ff){_0x16f170=_0x16f170-0xbc;const _0x16c128=a149_0x16c1();let _0x4ddc39=_0x16c128[_0x16f170];return _0x4ddc39;}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];function a149_0x16c1(){const _0x9fed40=['7zjPfIs','10aDCSxU','2412792QoYdPH','135358HVFAPW','21VFDHzU','3262116DRTXCX','3619480zBcNsK','162GaRyLb','709921JDfPAi','1344200bijKsm','107830MVLfTa'];a149_0x16c1=function(){return _0x9fed40;};return a149_0x16c1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a150_0x5f5555=a150_0x11f1;(function(_0x5b14d5,_0x3f45e2){const _0x233c5c=a150_0x11f1,_0xf40028=_0x5b14d5();while(!![]){try{const _0x15befa=parseInt(_0x233c5c(0x149))/0x1*(parseInt(_0x233c5c(0x140))/0x2)+-parseInt(_0x233c5c(0x146))/0x3+parseInt(_0x233c5c(0x143))/0x4*(parseInt(_0x233c5c(0x145))/0x5)+parseInt(_0x233c5c(0x125))/0x6*(parseInt(_0x233c5c(0x132))/0x7)+parseInt(_0x233c5c(0x128))/0x8*(parseInt(_0x233c5c(0x135))/0x9)+parseInt(_0x233c5c(0x14b))/0xa*(parseInt(_0x233c5c(0x12c))/0xb)+parseInt(_0x233c5c(0x134))/0xc*(-parseInt(_0x233c5c(0x136))/0xd);if(_0x15befa===_0x3f45e2)break;else _0xf40028['push'](_0xf40028['shift']());}catch(_0x2da1d2){_0xf40028['push'](_0xf40028['shift']());}}}(a150_0x4dd8,0xa2760));import{CliError}from'../../errors.js';function a150_0x11f1(_0x4cfd23,_0x212161){_0x4cfd23=_0x4cfd23-0x125;const _0x4dd8bc=a150_0x4dd8();let _0x11f199=_0x4dd8bc[_0x4cfd23];return _0x11f199;}import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a150_0x5f5555(0x129);const NUDGE_SUPPRESSED_CODES=new Set([a150_0x5f5555(0x14a),a150_0x5f5555(0x138),'config_missing',a150_0x5f5555(0x12b),a150_0x5f5555(0x13a),a150_0x5f5555(0x147),a150_0x5f5555(0x13f),a150_0x5f5555(0x13b)]),defaultWriter=_0xc7683c=>{const _0x38998a=a150_0x5f5555;process[_0x38998a(0x13c)]['write'](_0xc7683c);};export function shouldNudgeForError(_0x38b7e6,_0x5a97c1){const _0x30dc52=a150_0x5f5555;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x5a97c1['service']==='issue'&&_0x5a97c1[_0x30dc52(0x13d)]===_0x30dc52(0x137))return![];if(_0x38b7e6 instanceof CliError)return!NUDGE_SUPPRESSED_CODES['has'](_0x38b7e6[_0x30dc52(0x148)]);return!![];}export function printIssueReportNudgeForError(_0x21d3b1,_0x1d7c26,_0x413f69=defaultWriter){if(!shouldNudgeForError(_0x21d3b1,_0x1d7c26))return;const _0x1cd8fa=buildSuggestedTitle(_0x21d3b1,_0x1d7c26);_0x413f69(formatNudge(_0x1cd8fa));}function buildSuggestedTitle(_0xa77db3,_0x32baca){const _0x366ef9=a150_0x5f5555,_0x451a43=_0xa77db3 instanceof Error?_0xa77db3[_0x366ef9(0x12f)]:String(_0xa77db3),_0x38ec90=_0x451a43['replace'](/[\r\n]+/g,'\x20')[_0x366ef9(0x130)](/\s+/g,'\x20')[_0x366ef9(0x133)]()[_0x366ef9(0x142)](0x0,0x78)[_0x366ef9(0x130)](/"/g,'\x5c\x22'),_0x7a6446=CLI_BIN_NAME+'\x20'+_0x32baca['service']+'\x20'+_0x32baca[_0x366ef9(0x13d)];return _0x38ec90[_0x366ef9(0x12d)]>0x0?_0x7a6446+':\x20'+_0x38ec90:_0x7a6446;}function a150_0x4dd8(){const _0x5a9e19=['report','auth_required','Hit\x20a\x20','unknown_command','network_error','stderr','command','\x20\x20\x20\x20--title\x20\x22','validation_error','2qDrKyI','\x20\x20Set\x20','slice','116068YwSVNl','\x20bug?\x20Help\x20us\x20fix\x20it:','145DwrabP','2532486wLGVHY','flag_missing','code','65101HVXkey','cancelled','1310380ZkvtGp','3606YVCWda','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','=1\x20to\x20silence\x20this\x20hint.','32408HgaAbt','RABETBASE_DISABLE_ISSUE_NUDGE','\x22\x20\x5c','not_in_project','44wxmgGU','length','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','message','replace','join','9289EYSlqs','trim','12qXkfcu','2655IPeVOR','24878308QHQRrH'];a150_0x4dd8=function(){return _0x5a9e19;};return a150_0x4dd8();}function formatNudge(_0x216afd){const _0x5bae09=a150_0x5f5555;return['',_0x5bae09(0x139)+CLI_BIN_NAME+_0x5bae09(0x144),'\x20\x20'+CLI_BIN_NAME+'\x20issue\x20report\x20\x5c',_0x5bae09(0x13e)+_0x216afd+_0x5bae09(0x12a),_0x5bae09(0x12e),_0x5bae09(0x126),_0x5bae09(0x141)+NUDGE_OPT_OUT_ENV+_0x5bae09(0x127),''][_0x5bae09(0x131)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a151_0x5185(_0x5c0f56,_0x4859c8){_0x5c0f56=_0x5c0f56-0x12a;const _0x18b582=a151_0x18b5();let _0x518506=_0x18b582[_0x5c0f56];return _0x518506;}const a151_0x330ee3=a151_0x5185;(function(_0x26d0d8,_0x2e346c){const _0x33ac23=a151_0x5185,_0x34613d=_0x26d0d8();while(!![]){try{const _0x2ece9e=parseInt(_0x33ac23(0x138))/0x1+-parseInt(_0x33ac23(0x140))/0x2*(parseInt(_0x33ac23(0x14c))/0x3)+-parseInt(_0x33ac23(0x164))/0x4+parseInt(_0x33ac23(0x157))/0x5*(-parseInt(_0x33ac23(0x14e))/0x6)+-parseInt(_0x33ac23(0x15d))/0x7*(parseInt(_0x33ac23(0x152))/0x8)+parseInt(_0x33ac23(0x139))/0x9+-parseInt(_0x33ac23(0x151))/0xa*(-parseInt(_0x33ac23(0x150))/0xb);if(_0x2ece9e===_0x2e346c)break;else _0x34613d['push'](_0x34613d['shift']());}catch(_0x48dc26){_0x34613d['push'](_0x34613d['shift']());}}}(a151_0x18b5,0x920b2));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';function a151_0x18b5(){const _0x4b6232=['truncated:\x20original\x20','title','descriptionSource','POST','issue.description_truncated','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','write','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','issue','redactions:\x20','1004467kbJZCq','7051176dmrwbU','redactionKinds','str','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','Issue\x20description\x20cannot\x20be\x20empty.','descriptionSource:\x20','issue.description_original_bytes','44300Jzvman','File\x20not\x20found:\x20','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','description-file','originalBytes','trim','string','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','description','join','truncated','push','6ygAypp','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','6GiFqDE','cwd','9295SgxszO','16070QisCKA','1641856tYeWPw','file','descriptionFilePath','Failed\x20to\x20report\x20platform\x20issue:\x20','Platform\x20issue\x20reported','5754170EsqUiY','utf8','redacted\x20','length','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','message','7eGXnKw','apiError','issue.description_redaction_kinds','report','\x20secret(s):\x20','descriptionFile:\x20','sanitize','4589144QIhqeV','One-line\x20issue\x20summary','truncated\x20from\x20','redactionCount','compress','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','validation'];a151_0x18b5=function(){return _0x4b6232;};return a151_0x18b5();}import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG=a151_0x330ee3(0x143);export const issueReport={'service':a151_0x330ee3(0x136),'command':a151_0x330ee3(0x160),'description':a151_0x330ee3(0x15b),'risk':a151_0x330ee3(0x134),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a151_0x330ee3(0x12b),'flags':[{'name':'title','type':'string','required':!![],'description':a151_0x330ee3(0x165)},{'name':'description','type':a151_0x330ee3(0x146),'description':a151_0x330ee3(0x12c)},{'name':DESCRIPTION_FILE_FLAG,'type':a151_0x330ee3(0x146),'description':a151_0x330ee3(0x133)}],async 'validate'(_0x1d5c33){const _0x1c0cf0=a151_0x330ee3,_0x3b9625=_0x1d5c33[_0x1c0cf0(0x13b)](_0x1c0cf0(0x12f))[_0x1c0cf0(0x145)](),_0x209109=_0x1d5c33[_0x1c0cf0(0x13b)](_0x1c0cf0(0x148))['trim'](),_0x3dfa09=_0x1d5c33[_0x1c0cf0(0x13b)](DESCRIPTION_FILE_FLAG)[_0x1c0cf0(0x145)]();if(!_0x3b9625)throw CliErrors['flagMissing'](_0x1c0cf0(0x12f),_0x1c0cf0(0x142));const _0x5a05f4=_0x209109['length']>0x0,_0x3c3520=_0x3dfa09[_0x1c0cf0(0x15a)]>0x0;if(_0x5a05f4===_0x3c3520)throw CliErrors[_0x1c0cf0(0x12d)](_0x1c0cf0(0x147),_0x1c0cf0(0x14d));if(_0x3c3520){const _0x4e98be=resolve(process[_0x1c0cf0(0x14f)](),_0x3dfa09);if(!existsSync(_0x4e98be))throw CliErrors['validation'](_0x1c0cf0(0x141)+_0x4e98be);}},async 'dryRun'(_0x4e6618){const _0x47764d=a151_0x330ee3,_0x23c989=await prepareIssueReport(_0x4e6618);return{'method':_0x47764d(0x131),'url':'otel://'+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x23c989[_0x47764d(0x12f)],'issue.description':_0x23c989[_0x47764d(0x148)],'issue.description_original_bytes':_0x23c989[_0x47764d(0x163)][_0x47764d(0x144)],'issue.description_truncated':_0x23c989[_0x47764d(0x163)][_0x47764d(0x14a)],'issue.description_redactions':_0x23c989[_0x47764d(0x163)][_0x47764d(0x12a)],'issue.description_redaction_kinds':_0x23c989[_0x47764d(0x163)][_0x47764d(0x13a)][_0x47764d(0x149)](',')}},'description':['Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter',_0x47764d(0x13e)+_0x23c989['descriptionSource'],_0x23c989[_0x47764d(0x154)]?_0x47764d(0x162)+_0x23c989[_0x47764d(0x154)]:null,_0x23c989['sanitize']['truncated']?_0x47764d(0x12e)+_0x23c989['sanitize']['originalBytes']+'\x20bytes':null,_0x23c989['sanitize'][_0x47764d(0x12a)]>0x0?_0x47764d(0x137)+_0x23c989['sanitize'][_0x47764d(0x12a)]+'\x20('+_0x23c989[_0x47764d(0x163)][_0x47764d(0x13a)][_0x47764d(0x149)](',\x20')+')':null]['filter'](Boolean)['join']('\x0a')};},async 'execute'(_0x15b740){const _0x5d616e=a151_0x330ee3,_0x1b1e5d=await prepareIssueReport(_0x15b740);try{await sendPlatformIssueCollectLog({'title':_0x1b1e5d['title'],'description':_0x1b1e5d[_0x5d616e(0x148)],'sanitize':{'originalBytes':_0x1b1e5d['sanitize'][_0x5d616e(0x144)],'truncated':_0x1b1e5d[_0x5d616e(0x163)][_0x5d616e(0x14a)],'redactionCount':_0x1b1e5d[_0x5d616e(0x163)][_0x5d616e(0x12a)],'redactionKinds':_0x1b1e5d[_0x5d616e(0x163)][_0x5d616e(0x13a)]}});}catch(_0x40372a){throw CliErrors[_0x5d616e(0x15e)](_0x5d616e(0x155)+(_0x40372a instanceof Error?_0x40372a[_0x5d616e(0x15c)]:String(_0x40372a)),'Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.');}return{'ok':!![],'message':buildResultMessage(_0x1b1e5d[_0x5d616e(0x163)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':['issue.title','issue.description',_0x5d616e(0x13f),_0x5d616e(0x132),'issue.description_redactions',_0x5d616e(0x15f)],'issue':{'title':_0x1b1e5d['title'],'descriptionLength':_0x1b1e5d[_0x5d616e(0x148)]['length'],'descriptionSource':_0x1b1e5d[_0x5d616e(0x130)],..._0x1b1e5d[_0x5d616e(0x154)]?{'descriptionFile':_0x1b1e5d[_0x5d616e(0x154)]}:{},'sanitize':{'originalBytes':_0x1b1e5d[_0x5d616e(0x163)][_0x5d616e(0x144)],'truncated':_0x1b1e5d['sanitize'][_0x5d616e(0x14a)],'redactions':_0x1b1e5d[_0x5d616e(0x163)]['redactionCount'],'redactionKinds':_0x1b1e5d[_0x5d616e(0x163)][_0x5d616e(0x13a)]}}}};}};function buildResultMessage(_0x4b436e){const _0x299265=a151_0x330ee3,_0x22e3e4=[];return _0x4b436e[_0x299265(0x14a)]&&_0x22e3e4[_0x299265(0x14b)](_0x299265(0x166)+_0x4b436e[_0x299265(0x144)]+'\x20bytes'),_0x4b436e[_0x299265(0x12a)]>0x0&&_0x22e3e4[_0x299265(0x14b)](_0x299265(0x159)+_0x4b436e[_0x299265(0x12a)]+_0x299265(0x161)+_0x4b436e[_0x299265(0x13a)][_0x299265(0x149)](',\x20')),_0x22e3e4[_0x299265(0x15a)]===0x0?_0x299265(0x156):'Platform\x20issue\x20reported\x20('+_0x22e3e4[_0x299265(0x149)](';\x20')+')';}async function prepareIssueReport(_0x52fd7c){const _0x3d44e0=a151_0x330ee3,_0x127be5=_0x52fd7c[_0x3d44e0(0x13b)](_0x3d44e0(0x12f))[_0x3d44e0(0x145)](),_0xf48ab4=_0x52fd7c[_0x3d44e0(0x13b)]('description'),_0x10b474=_0x52fd7c[_0x3d44e0(0x13b)](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x10b474){const _0x50caf3=_0xf48ab4;if(!_0x50caf3[_0x3d44e0(0x145)]())throw CliErrors[_0x3d44e0(0x12d)](_0x3d44e0(0x13d),_0x3d44e0(0x13c));const _0x443a0c=sanitizeIssueDescription(_0x50caf3);return{'title':_0x127be5,'description':_0x443a0c[_0x3d44e0(0x148)],'descriptionSource':'inline','sanitize':_0x443a0c};}const _0x10c1c9=resolve(process[_0x3d44e0(0x14f)](),_0x10b474),_0x1424a8=await readFile(_0x10c1c9,_0x3d44e0(0x158));if(!_0x1424a8[_0x3d44e0(0x145)]())throw CliErrors[_0x3d44e0(0x12d)]('Issue\x20description\x20file\x20is\x20empty:\x20'+_0x10c1c9,_0x3d44e0(0x135));const _0x330f0b=sanitizeIssueDescription(_0x1424a8);return{'title':_0x127be5,'description':_0x330f0b[_0x3d44e0(0x148)],'descriptionSource':_0x3d44e0(0x153),'descriptionFilePath':_0x10c1c9,'sanitize':_0x330f0b};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a152_0xb6edd1=a152_0x1bcd;function a152_0x1bcd(_0x461029,_0x4eb78c){_0x461029=_0x461029-0x12b;const _0x11203f=a152_0x1120();let _0x1bcdde=_0x11203f[_0x461029];return _0x1bcdde;}(function(_0x2e1002,_0x5dae17){const _0x87c947=a152_0x1bcd,_0x57c18d=_0x2e1002();while(!![]){try{const _0x578641=parseInt(_0x87c947(0x137))/0x1+parseInt(_0x87c947(0x134))/0x2+parseInt(_0x87c947(0x13d))/0x3*(-parseInt(_0x87c947(0x139))/0x4)+parseInt(_0x87c947(0x12c))/0x5+parseInt(_0x87c947(0x13f))/0x6+parseInt(_0x87c947(0x141))/0x7*(-parseInt(_0x87c947(0x130))/0x8)+-parseInt(_0x87c947(0x144))/0x9*(-parseInt(_0x87c947(0x12d))/0xa);if(_0x578641===_0x5dae17)break;else _0x57c18d['push'](_0x57c18d['shift']());}catch(_0x57f882){_0x57c18d['push'](_0x57c18d['shift']());}}}(a152_0x1120,0x43d91));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a152_0xb6edd1(0x13a),REDACTION_RULES=[{'kind':a152_0xb6edd1(0x140),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a152_0xb6edd1(0x135)},{'kind':a152_0xb6edd1(0x12b),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':'REDACTED:authorization'},{'kind':a152_0xb6edd1(0x133),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a152_0xb6edd1(0x14b)},{'kind':a152_0xb6edd1(0x14d),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a152_0xb6edd1(0x148)},{'kind':'password','pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':'REDACTED:password'},{'kind':'bearer-jwt','pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a152_0xb6edd1(0x132)}];export function sanitizeIssueDescription(_0x5a6585){const _0x265b09=a152_0xb6edd1,_0x5a0bef=Buffer[_0x265b09(0x13b)](_0x5a6585,'utf8'),_0x42ab3b=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x3f8493=_0x5a6585,_0x2a79de=0x0;const _0x3dcb37=[];if(!_0x42ab3b){const _0x4f46f9=protectOssAccessKeyIds(_0x3f8493);_0x3f8493=_0x4f46f9[_0x265b09(0x131)];for(const _0x2fb4c6 of REDACTION_RULES){let _0x38fbbe=0x0;_0x3f8493=_0x3f8493[_0x265b09(0x146)](_0x2fb4c6[_0x265b09(0x13e)],(_0x35fb71,_0x29e6d8)=>{const _0x3ebfb5=_0x265b09;_0x38fbbe+=0x1;const _0x5f2ac2=typeof _0x29e6d8===_0x3ebfb5(0x14c)?_0x29e6d8:'';return _0x5f2ac2+'['+_0x2fb4c6[_0x3ebfb5(0x145)]+']';}),_0x38fbbe>0x0&&(_0x2a79de+=_0x38fbbe,!_0x3dcb37[_0x265b09(0x12f)](_0x2fb4c6[_0x265b09(0x13c)])&&_0x3dcb37['push'](_0x2fb4c6[_0x265b09(0x13c)]));}_0x3f8493=_0x4f46f9[_0x265b09(0x14a)](_0x3f8493);}let _0x3a3dba=![];if(Buffer['byteLength'](_0x3f8493,_0x265b09(0x147))>ISSUE_DESCRIPTION_MAX_BYTES){_0x3a3dba=!![];const _0x50a094=Buffer[_0x265b09(0x13b)](TRUNCATION_NOTICE,'utf8'),_0x5479fe=Math[_0x265b09(0x14e)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x50a094);_0x3f8493=sliceUtf8Bytes(_0x3f8493,_0x5479fe)+TRUNCATION_NOTICE;}return{'description':_0x3f8493,'originalBytes':_0x5a0bef,'truncated':_0x3a3dba,'redactionCount':_0x2a79de,'redactionKinds':_0x3dcb37};}function protectOssAccessKeyIds(_0x322877){const _0xb4b791=a152_0xb6edd1,_0x3e2867=[],_0x18fdfa=_0x322877[_0xb4b791(0x146)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x1de40a,_0x5a632b)=>{const _0x539179=_0xb4b791,_0x24e1d7=_0x3e2867[_0x539179(0x138)](_0x1de40a[_0x539179(0x143)](_0x5a632b[_0x539179(0x136)]))-0x1;return _0x5a632b+_0x539179(0x149)+_0x24e1d7+'__';});return{'description':_0x18fdfa,'restore':_0x5616ef=>_0x5616ef[_0xb4b791(0x146)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x5a779a,_0x6b4964,_0xd54b95)=>{const _0x1b3eed=_0x3e2867[Number(_0xd54b95)];return _0x1b3eed===undefined?_0x5a779a:''+_0x6b4964+_0x1b3eed;})};}function sliceUtf8Bytes(_0x4f3b9f,_0xa889c4){const _0x436665=a152_0xb6edd1;if(_0xa889c4<=0x0)return'';const _0x1645da=Buffer['from'](_0x4f3b9f,_0x436665(0x147));if(_0x1645da['byteLength']<=_0xa889c4)return _0x4f3b9f;let _0x42946e=_0xa889c4;while(_0x42946e>0x0){const _0x27cbb7=_0x1645da[_0x42946e];if(_0x27cbb7===undefined||(_0x27cbb7&0xc0)!==0x80)break;_0x42946e-=0x1;}return _0x1645da[_0x436665(0x12e)](0x0,_0x42946e)[_0x436665(0x142)](_0x436665(0x147));}function a152_0x1120(){const _0x4c934d=['push','4aEWSec','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','byteLength','kind','1135386kKOHbp','pattern','1023156vwlHED','cookie','2773127AxwhCf','toString','slice','71019xDfpfN','label','replace','utf8','REDACTED:access-key','__RB_OSS_ID_','restore','REDACTED:private-key','string','access-key','max','authorization','423180ATrrKi','290uCrYOx','subarray','includes','8WYIowD','description','REDACTED:bearer-jwt','private-key','617208bwEBmK','REDACTED:cookie','length','259923UkxgXn'];a152_0x1120=function(){return _0x4c934d;};return a152_0x1120();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a153_0x2689(_0x5957a6,_0x55991a){_0x5957a6=_0x5957a6-0x93;const _0x334af1=a153_0x334a();let _0x268993=_0x334af1[_0x5957a6];return _0x268993;}const a153_0xfa2095=a153_0x2689;(function(_0x329d7f,_0x1a232a){const _0x3719d5=a153_0x2689,_0x1d8f2b=_0x329d7f();while(!![]){try{const _0x5a2232=parseInt(_0x3719d5(0xb0))/0x1+parseInt(_0x3719d5(0xbe))/0x2+-parseInt(_0x3719d5(0xbf))/0x3+parseInt(_0x3719d5(0x9f))/0x4*(-parseInt(_0x3719d5(0xa2))/0x5)+parseInt(_0x3719d5(0x99))/0x6+-parseInt(_0x3719d5(0xb7))/0x7*(parseInt(_0x3719d5(0xad))/0x8)+parseInt(_0x3719d5(0xac))/0x9*(parseInt(_0x3719d5(0xb1))/0xa);if(_0x5a2232===_0x1a232a)break;else _0x1d8f2b['push'](_0x1d8f2b['shift']());}catch(_0x5a423c){_0x1d8f2b['push'](_0x1d8f2b['shift']());}}}(a153_0x334a,0x1a3ef));import{knowledgeDocumentsPath}from'../../core/api-client.js';import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,verifyKbMutationReadback}from'../../commands/kb/shared.js';function a153_0x334a(){const _0x224434=['appCode','kb_title_required','202141eHBgQj','189510fDYYLL','kb_already_exists','\x20with\x20title\x20','company','title','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','13405CdeqeH','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20','file','\x20for\x20','cookie','stringify','Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','279568ctkehR','516930QZZysp','POST','\x20--format\x20compress','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.','write','str','rabetbase\x20kb\x20detail\x20--id\x20','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.','length','202842fAaBXb','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','rabetbase\x20kb\x20list\x20--title\x20','Created\x20company\x20knowledge\x20base\x20','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','--file\x20is\x20required.','84utqgpq','contentHash','byteSize','2995rBNoaa','create','string','Knowledge-base\x20title','kb_verification_failed','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','verified','trim','\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','content','45qKZWgE','744YHPBao'];a153_0x334a=function(){return _0x224434;};return a153_0x334a();}function readCreateInput(_0x4074ba){const _0x133021=a153_0x2689,_0x3652a7=_0x4074ba[_0x133021(0x94)]('title')['trim']();if(!_0x3652a7)throw kbError(_0x133021(0xaf),'--title\x20is\x20required.');const _0x13ec7f=_0x4074ba[_0x133021(0x94)](_0x133021(0xb9))[_0x133021(0xa9)]();if(!_0x13ec7f)throw kbError('kb_file_required',_0x133021(0x9e),_0x133021(0xc2));return{'title':_0x3652a7,'file':_0x13ec7f};}async function prepareCreate(_0x1dc7d3){const _0x28cbdf=a153_0x2689,_0x20c14c=readCreateInput(_0x1dc7d3),_0x4ea47e=await readKbFile(_0x20c14c[_0x28cbdf(0xb9)]),_0x5ea3ce=await fetchAllCompanyKnowledgeBases(_0x1dc7d3,{'title':_0x20c14c[_0x28cbdf(0xb5)]}),_0x426415=findExactCompanyKnowledgeBases(_0x5ea3ce,_0x1dc7d3[_0x28cbdf(0xae)],_0x20c14c['title']);if(_0x426415[_0x28cbdf(0x98)]>0x0)throw kbError(_0x28cbdf(0xb2),_0x28cbdf(0xb8)+_0x1dc7d3[_0x28cbdf(0xae)]+_0x28cbdf(0xb3)+_0x20c14c['title']+'.','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x426415[0x0]['id']+'\x20--format\x20compress`\x20before\x20choosing\x20update.');return{..._0x20c14c,'content':_0x4ea47e};}function plannedAfter(_0x4c1340,_0x4254d9){const _0x1da67c=a153_0x2689;return{'scope':'company','appCode':_0x4c1340['appCode'],'title':_0x4254d9[_0x1da67c(0xb5)],'contentByteSize':_0x4254d9['content'][_0x1da67c(0xa1)],'contentHash':_0x4254d9[_0x1da67c(0xab)]['contentHash']};}function verifyCreatedState(_0x17a92e,_0x2646fc,_0x3f72a6){const _0x2e938b=a153_0x2689;assertCompanyKnowledgeBase(_0x3f72a6,_0x17a92e['appCode'],_0x3f72a6['id']);const _0xa0d00f=inspectKbContent(_0x3f72a6[_0x2e938b(0xab)]);if(_0x3f72a6[_0x2e938b(0xb5)]!==_0x2646fc[_0x2e938b(0xb5)]||_0xa0d00f[_0x2e938b(0xa0)]!==_0x2646fc[_0x2e938b(0xab)][_0x2e938b(0xa0)])throw kbError(_0x2e938b(0xa6),'Company\x20knowledge\x20base\x20'+_0x3f72a6['id']+_0x2e938b(0xaa),_0x2e938b(0x96)+_0x3f72a6['id']+_0x2e938b(0x9d));return projectKb(_0x3f72a6);}export const kbCreate={'service':'kb','command':a153_0xfa2095(0xa3),'description':a153_0xfa2095(0xbd),'risk':a153_0xfa2095(0x93),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'title','type':a153_0xfa2095(0xa4),'required':!![],'description':a153_0xfa2095(0xa5)},{'name':'file','type':a153_0xfa2095(0xa4),'required':!![],'description':a153_0xfa2095(0xb6)}],async 'validate'(_0x3ebbe4){readCreateInput(_0x3ebbe4);},async 'dryRun'(_0x37dc57){const _0x5f3cdf=a153_0xfa2095,_0x87acd3=await prepareCreate(_0x37dc57);return asDryRunResult({'operation':_0x5f3cdf(0xa3),'selector':{'scope':_0x5f3cdf(0xb4),'appCode':_0x37dc57['appCode'],'title':_0x87acd3['title']},'before':null,'after':plannedAfter(_0x37dc57,_0x87acd3),'dryRun':!![],'backend':{'method':_0x5f3cdf(0xc0),'path':knowledgeDocumentsPath('company',_0x5f3cdf(0xa3)),'body':{'appCode':_0x37dc57[_0x5f3cdf(0xae)],'title':_0x87acd3[_0x5f3cdf(0xb5)],'contentHash':_0x87acd3[_0x5f3cdf(0xab)][_0x5f3cdf(0xa0)],'contentByteSize':_0x87acd3['content']['byteSize']}},'warnings':[],'verification':{'lookupCommand':_0x5f3cdf(0x9b)+JSON[_0x5f3cdf(0xbc)](_0x87acd3[_0x5f3cdf(0xb5)])+_0x5f3cdf(0xc1)}},{'method':_0x5f3cdf(0xc0),'url':knowledgeDocumentsPath('company',_0x5f3cdf(0xa3))});},async 'execute'(_0x3d03e2){const _0x13f0ff=a153_0xfa2095,_0x1b9dcd=await prepareCreate(_0x3d03e2);let _0x5cd426,_0x368b22,_0x571af5=![];try{const _0x3bae28=await createEnterpriseKnowledgeBase(_0x3d03e2[_0x13f0ff(0xbb)],{'appCode':_0x3d03e2['appCode'],'title':_0x1b9dcd[_0x13f0ff(0xb5)],'content':_0x1b9dcd[_0x13f0ff(0xab)][_0x13f0ff(0xab)]});assertCompanyKnowledgeBase(_0x3bae28,_0x3d03e2['appCode'],_0x3bae28['id']),_0x5cd426=_0x3bae28['id'],_0x368b22=_0x3bae28['version'];}catch(_0x1d1e12){if(!isPlatformTransportFailure(_0x1d1e12))throw _0x1d1e12;_0x571af5=!![];}if(_0x5cd426===undefined){const _0x577948=await verifyKbMutationReadback('create',!![],()=>fetchAllCompanyKnowledgeBases(_0x3d03e2,{'title':_0x1b9dcd[_0x13f0ff(0xb5)]})),_0x1cf265=findExactCompanyKnowledgeBases(_0x577948,_0x3d03e2['appCode'],_0x1b9dcd[_0x13f0ff(0xb5)]);if(_0x1cf265[_0x13f0ff(0x98)]!==0x1)throw kbError('kb_create_outcome_unknown',_0x13f0ff(0xa7)+_0x1cf265[_0x13f0ff(0x98)]+'.',_0x13f0ff(0x97));_0x5cd426=_0x1cf265[0x0]['id'];}const _0x498073=await verifyKbMutationReadback('create',_0x571af5,()=>requireKb(_0x3d03e2,_0x5cd426));if(_0x368b22!==undefined&&_0x498073['version']!==_0x368b22)throw kbError(_0x13f0ff(0xa6),'The\x20created\x20document\x20version\x20changed\x20after\x20its\x20write\x20response.\x20Inspect\x20it\x20without\x20resubmitting.');const _0xd1b0ce=verifyCreatedState(_0x3d03e2,_0x1b9dcd,_0x498073),_0xcb6d40=_0x571af5?[_0x13f0ff(0x9a)]:[];return{'ok':!![],'data':{'operation':_0x13f0ff(0xa3),'selector':{'id':_0xd1b0ce['id'],'scope':_0x13f0ff(0xb4),'appCode':_0xd1b0ce[_0x13f0ff(0xae)]},'before':null,'after':_0xd1b0ce,'dryRun':![],'backend':{'method':_0x13f0ff(0xc0),'path':knowledgeDocumentsPath(_0x13f0ff(0xb4),'create')},'warnings':_0xcb6d40,'verification':{'status':_0x13f0ff(0xa8),'recoveredAfterUnknownResponse':_0x571af5,'lookupCommand':_0x13f0ff(0x95)+_0xd1b0ce['id']+_0x13f0ff(0xc1)}},'message':_0x13f0ff(0x9c)+_0xd1b0ce['id']+_0x13f0ff(0xba)+_0xd1b0ce[_0x13f0ff(0xae)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a154_0x23e90c=a154_0x13b6;(function(_0x4e536e,_0x3f78cb){const _0x24d45b=a154_0x13b6,_0x2bde14=_0x4e536e();while(!![]){try{const _0x52c415=-parseInt(_0x24d45b(0x10b))/0x1*(parseInt(_0x24d45b(0x111))/0x2)+-parseInt(_0x24d45b(0xfa))/0x3+parseInt(_0x24d45b(0x10c))/0x4+-parseInt(_0x24d45b(0x10a))/0x5+-parseInt(_0x24d45b(0x114))/0x6+parseInt(_0x24d45b(0x117))/0x7+parseInt(_0x24d45b(0x10f))/0x8;if(_0x52c415===_0x3f78cb)break;else _0x2bde14['push'](_0x2bde14['shift']());}catch(_0x3a6045){_0x2bde14['push'](_0x2bde14['shift']());}}}(a154_0x274f,0xb704e));function a154_0x13b6(_0x449c57,_0x1869ba){_0x449c57=_0x449c57-0xf8;const _0x274f3a=a154_0x274f();let _0x13b6c6=_0x274f3a[_0x449c57];return _0x13b6c6;}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';const RAG_WARNING=a154_0x23e90c(0x109);function readExpectedVersion(_0x7a8c84){const _0x1361af=a154_0x23e90c,_0xe2045=_0x7a8c84['flag'](_0x1361af(0x115));if(_0xe2045===undefined)return undefined;const _0x13fe81=Number(_0xe2045);if(!Number['isSafeInteger'](_0x13fe81)||_0x13fe81<0x1)throw kbError(_0x1361af(0x10e),_0x1361af(0xf8));return _0x13fe81;}function noOpData(_0x425a4d,_0xc9a0cb,_0x5c4a18){const _0x1722d5=a154_0x23e90c;return{'operation':_0x1722d5(0xfc),'selector':{'id':_0xc9a0cb,'scope':'company','appCode':_0x425a4d[_0x1722d5(0x106)]},'before':null,'after':null,'dryRun':_0x5c4a18,'deleteCalled':![],'backend':{'method':_0x1722d5(0xff),'path':knowledgeDocumentsPath('company',_0x1722d5(0xfb))},'warnings':[],'verification':{'status':_0x1722d5(0x107),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}function a154_0x274f(){const _0x3e6d1b=['Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.','verified','kb_verification_failed','string','--expected-version\x20must\x20be\x20a\x20positive\x20safe\x20integer.','high-risk-write','902706nMbHKc','delete','no_op','cookie','company','POST','snapshotHash','kb_delete_outcome_unknown','Soft-deleted\x20company\x20knowledge\x20base\x20','\x20remains\x20readable\x20after\x20delete.','\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made','Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','appCode','already_absent','Require\x20the\x20current\x20version\x20before\x20atomic\x20compare-and-set','Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.','6776850fGVePb','658451TtKdvQ','5515424yBGGCU','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','kb_expected_version_invalid','11732504KcZgGc','Company\x20knowledge-base\x20id','2OUzaIW','\x20--format\x20compress','rabetbase\x20kb\x20detail\x20--id\x20','5984244tzAxOy','expected-version','Company\x20knowledge\x20base\x20','8514268FMLGay'];a154_0x274f=function(){return _0x3e6d1b;};return a154_0x274f();}export const kbDelete={'service':'kb','command':'delete','description':a154_0x23e90c(0x105),'risk':a154_0x23e90c(0xf9),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a154_0x23e90c(0x11b),'required':!![],'description':a154_0x23e90c(0x110)},{'name':a154_0x23e90c(0x115),'type':'number','required':![],'description':a154_0x23e90c(0x108)}],async 'validate'(_0x102369){readKbId(_0x102369),readExpectedVersion(_0x102369),requireKbExplicitYes(_0x102369);},async 'dryRun'(_0x4bec23){const _0x1ad0ac=a154_0x23e90c,_0x5ac246=readKbId(_0x4bec23),_0x17f33a=readExpectedVersion(_0x4bec23),_0xc7e852=await getKbOrNull(_0x4bec23,_0x5ac246);if(!_0xc7e852)return asDryRunResult(noOpData(_0x4bec23,_0x5ac246,!![]),{'method':_0x1ad0ac(0xff),'url':knowledgeDocumentsPath(_0x1ad0ac(0xfe),_0x1ad0ac(0xfb))});assertExpectedKbVersion(_0xc7e852,_0x17f33a);const _0x3d7596=projectKb(_0xc7e852),_0x35a614=[RAG_WARNING];return asDryRunResult({'operation':'delete','selector':{'id':_0x3d7596['id'],'scope':_0x1ad0ac(0xfe),'appCode':_0x3d7596[_0x1ad0ac(0x106)]},'before':_0x3d7596,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':_0x1ad0ac(0xff),'path':knowledgeDocumentsPath('company',_0x1ad0ac(0xfb)),'body':{'appCode':_0x4bec23[_0x1ad0ac(0x106)],'id':_0x5ac246,'expectedVersion':_0xc7e852['version']}},'warnings':_0x35a614,'verification':{'expectedVersion':_0xc7e852['version'],'atomicCompareAndSet':!![],'snapshotHash':_0x3d7596[_0x1ad0ac(0x100)],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x1ad0ac(0x113)+_0x3d7596['id']+_0x1ad0ac(0x112)}},{'method':'POST','url':knowledgeDocumentsPath(_0x1ad0ac(0xfe),_0x1ad0ac(0xfb))});},async 'execute'(_0x5b8704){const _0x76255f=a154_0x23e90c;requireKbExplicitYes(_0x5b8704);const _0x2dd02e=readKbId(_0x5b8704),_0x369dc4=readExpectedVersion(_0x5b8704),_0x404859=await getKbOrNull(_0x5b8704,_0x2dd02e);if(!_0x404859)return{'ok':!![],'data':noOpData(_0x5b8704,_0x2dd02e,![]),'message':_0x76255f(0x116)+_0x2dd02e+_0x76255f(0x104)};assertExpectedKbVersion(_0x404859,_0x369dc4);const _0x5d45ff=projectKb(_0x404859);let _0x377740=![];try{await deleteEnterpriseKnowledgeBase(_0x5b8704[_0x76255f(0xfd)],_0x2dd02e,_0x5b8704[_0x76255f(0x106)],_0x404859['version']);}catch(_0x248b25){if(!isPlatformTransportFailure(_0x248b25))throw _0x248b25;_0x377740=!![];}const _0x491aef=await verifyKbMutationReadback(_0x76255f(0xfb),_0x377740,()=>getKbOrNull(_0x5b8704,_0x2dd02e));if(_0x491aef)throw kbError(_0x377740?_0x76255f(0x101):_0x76255f(0x11a),_0x76255f(0x116)+_0x2dd02e+_0x76255f(0x103),_0x76255f(0x10d)+_0x2dd02e+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0xb77ef9=[RAG_WARNING];return _0x377740&&_0xb77ef9['unshift'](_0x76255f(0x118)),{'ok':!![],'data':{'operation':_0x76255f(0xfb),'selector':{'id':_0x5d45ff['id'],'scope':_0x76255f(0xfe),'appCode':_0x5d45ff[_0x76255f(0x106)]},'before':_0x5d45ff,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':'POST','path':knowledgeDocumentsPath(_0x76255f(0xfe),_0x76255f(0xfb))},'warnings':_0xb77ef9,'verification':{'status':_0x76255f(0x119),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0x377740,'lookupCommand':_0x76255f(0x113)+_0x5d45ff['id']+'\x20--format\x20compress'}},'message':_0x76255f(0x102)+_0x5d45ff['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a155_0xccb1(_0x29e6fc,_0x5591b9){_0x29e6fc=_0x29e6fc-0x8b;const _0x3722c8=a155_0x3722();let _0xccb11c=_0x3722c8[_0x29e6fc];return _0xccb11c;}function a155_0x3722(){const _0x2c6dcc=['227744noJkgJ','11545CYQrFk','7056hcZCIp','Loaded\x20company\x20knowledge\x20base\x20','968256RrpUqB','617726uqCVLQ','147fOeqWG','62802CYvSFl','read','detail','content','2296MeXpjk','5907720EwKGhN','164OXcnat'];a155_0x3722=function(){return _0x2c6dcc;};return a155_0x3722();}const a155_0x188061=a155_0xccb1;(function(_0x4ee69f,_0x497a83){const _0x41bb80=a155_0xccb1,_0x13db49=_0x4ee69f();while(!![]){try{const _0x5baccf=parseInt(_0x41bb80(0x90))/0x1+parseInt(_0x41bb80(0x95))/0x2+parseInt(_0x41bb80(0x94))/0x3+parseInt(_0x41bb80(0x8f))/0x4*(-parseInt(_0x41bb80(0x91))/0x5)+-parseInt(_0x41bb80(0x97))/0x6*(parseInt(_0x41bb80(0x96))/0x7)+-parseInt(_0x41bb80(0x8d))/0x8*(-parseInt(_0x41bb80(0x92))/0x9)+-parseInt(_0x41bb80(0x8e))/0xa;if(_0x5baccf===_0x497a83)break;else _0x13db49['push'](_0x13db49['shift']());}catch(_0x52406a){_0x13db49['push'](_0x13db49['shift']());}}}(a155_0x3722,0x2bbaf));import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';export const kbDetail={'service':'kb','command':a155_0x188061(0x8b),'description':'Show\x20one\x20company\x20knowledge\x20base\x20with\x20full\x20content\x20for\x20the\x20resolved\x20app','risk':a155_0x188061(0x98),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':'string','required':!![],'description':'Company\x20knowledge-base\x20id'}],async 'validate'(_0x4cad1d){readKbId(_0x4cad1d);},async 'execute'(_0x2d362b){const _0xb518d8=a155_0x188061,_0x47ae79=readKbId(_0x2d362b),_0xef535a=await requireKb(_0x2d362b,_0x47ae79);return{'ok':!![],'data':{'knowledgeBase':{...projectKb(_0xef535a),'content':_0xef535a[_0xb518d8(0x8c)]}},'message':_0xb518d8(0x93)+_0x47ae79};}};
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a156_0x37dd(_0x3a3699,_0x4692af){_0x3a3699=_0x3a3699-0x15d;const _0x15bb78=a156_0x15bb();let _0x37dd0a=_0x15bb78[_0x3a3699];return _0x37dd0a;}const a156_0x323837=a156_0x37dd;(function(_0x2eaf78,_0x463dba){const _0x29c028=a156_0x37dd,_0x4de4c1=_0x2eaf78();while(!![]){try{const _0x30e52e=-parseInt(_0x29c028(0x166))/0x1+-parseInt(_0x29c028(0x160))/0x2+parseInt(_0x29c028(0x167))/0x3*(-parseInt(_0x29c028(0x16b))/0x4)+-parseInt(_0x29c028(0x162))/0x5*(-parseInt(_0x29c028(0x16a))/0x6)+-parseInt(_0x29c028(0x168))/0x7+parseInt(_0x29c028(0x15e))/0x8+parseInt(_0x29c028(0x161))/0x9;if(_0x30e52e===_0x463dba)break;else _0x4de4c1['push'](_0x4de4c1['shift']());}catch(_0x3ec109){_0x4de4c1['push'](_0x4de4c1['shift']());}}}(a156_0x15bb,0x8fc42));function a156_0x15bb(){const _0x4d0b12=['1093688XysACH','signal','2443368coaKhA','dryRun','2074018skjxCC','25595910VMccRx','20hPXOYk','command','search','execute','421021xrpWWS','12YoLVXt','4586925NoRTGH','map','969672kTKsUA'];a156_0x15bb=function(){return _0x4d0b12;};return a156_0x15bb();}import{withKbManagementSession}from'../../core/kb-management-client.js';import{kbList}from'../../commands/kb/list.js';import{kbDetail}from'../../commands/kb/detail.js';import{kbSearch}from'../../commands/kb/search.js';import{kbCreate}from'../../commands/kb/create.js';import{kbUpdate}from'../../commands/kb/update.js';import{kbDelete}from'../../commands/kb/delete.js';export const kbDefinitions=[kbList,kbDetail,kbSearch,kbCreate,kbUpdate,kbDelete][a156_0x323837(0x169)](_0x33724a=>_0x33724a[a156_0x323837(0x163)]===a156_0x323837(0x164)?_0x33724a:{..._0x33724a,'execute':_0x483f2e=>withKbManagementSession(_0x483f2e[a156_0x323837(0x15d)],()=>_0x33724a[a156_0x323837(0x165)](_0x483f2e)),..._0x33724a[a156_0x323837(0x15f)]?{'dryRun':_0x14fb5e=>withKbManagementSession(_0x14fb5e[a156_0x323837(0x15d)],()=>_0x33724a[a156_0x323837(0x15f)](_0x14fb5e))}:{}});
|
package/lib/commands/kb/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a157_0x3153b8=a157_0x3b61;function a157_0x9c96(){const _0x227b55=['title','appCode','32249xDEdim','list','294rYvEai','44379nAVoQZ','List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app','520850wzEIop','length','string','56004wRaBXb','207lkNspE','Found\x20','\x20company\x20knowledge\x20base(s)\x20for\x20','2275924GkGSLu','2989312ZNkOmB','trim','8cvsRNE','1917290XdVHvi','Filter\x20by\x20knowledge-base\x20title','read'];a157_0x9c96=function(){return _0x227b55;};return a157_0x9c96();}function a157_0x3b61(_0x267e6e,_0x47c5d3){_0x267e6e=_0x267e6e-0xd1;const _0x9c96eb=a157_0x9c96();let _0x3b6103=_0x9c96eb[_0x267e6e];return _0x3b6103;}(function(_0x2fe724,_0x1da162){const _0x385d50=a157_0x3b61,_0x3107d0=_0x2fe724();while(!![]){try{const _0x40b9a1=-parseInt(_0x385d50(0xda))/0x1*(-parseInt(_0x385d50(0xd1))/0x2)+parseInt(_0x385d50(0xdf))/0x3+-parseInt(_0x385d50(0xe3))/0x4+-parseInt(_0x385d50(0xd2))/0x5+-parseInt(_0x385d50(0xd9))/0x6*(-parseInt(_0x385d50(0xd7))/0x7)+-parseInt(_0x385d50(0xe4))/0x8+-parseInt(_0x385d50(0xe0))/0x9*(-parseInt(_0x385d50(0xdc))/0xa);if(_0x40b9a1===_0x1da162)break;else _0x3107d0['push'](_0x3107d0['shift']());}catch(_0x5dff26){_0x3107d0['push'](_0x3107d0['shift']());}}}(a157_0x9c96,0x47b93));import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';export const kbList={'service':'kb','command':a157_0x3153b8(0xd8),'description':a157_0x3153b8(0xdb),'risk':a157_0x3153b8(0xd4),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a157_0x3153b8(0xd5),'type':a157_0x3153b8(0xde),'required':![],'description':a157_0x3153b8(0xd3)}],async 'execute'(_0x2e9d29){const _0x313985=a157_0x3153b8,_0x55181b=_0x2e9d29['str'](_0x313985(0xd5))[_0x313985(0xe5)](),_0x4791ab=await fetchAllCompanyKnowledgeBases(_0x2e9d29,{..._0x55181b?{'title':_0x55181b}:{}}),_0x1a8ee1=_0x4791ab['map'](projectKb);return{'ok':!![],'data':{'total':_0x1a8ee1['length'],'knowledgeBases':_0x1a8ee1},'message':_0x313985(0xe1)+_0x1a8ee1[_0x313985(0xdd)]+_0x313985(0xe2)+_0x2e9d29[_0x313985(0xd6)]};}};
|