@lovrabet/rabetbase-cli 2.5.13-beta.1 → 2.5.13
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/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/context.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/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.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.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/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/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-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 a190_0x4953ce=a190_0x3376;(function(_0x15bd7b,_0x1987d0){const _0x7824d8=a190_0x3376,_0xb5d678=_0x15bd7b();while(!![]){try{const _0x562118=-parseInt(_0x7824d8(0x110))/0x1*(parseInt(_0x7824d8(0x12c))/0x2)+-parseInt(_0x7824d8(0x13a))/0x3+-parseInt(_0x7824d8(0x142))/0x4+parseInt(_0x7824d8(0x119))/0x5*(-parseInt(_0x7824d8(0x10c))/0x6)+parseInt(_0x7824d8(0x106))/0x7*(-parseInt(_0x7824d8(0x13c))/0x8)+parseInt(_0x7824d8(0x145))/0x9+parseInt(_0x7824d8(0x12f))/0xa;if(_0x562118===_0x1987d0)break;else _0xb5d678['push'](_0xb5d678['shift']());}catch(_0x2a6e60){_0xb5d678['push'](_0xb5d678['shift']());}}}(a190_0x3269,0xae825));import a190_0x3fd07b from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';function a190_0x3269(){const _0x372177=['\x20created.','Menu\x20creation\x20failed','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','70gzMOUq','trim','length','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','yes','jsUrl','6cYOKbr','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','✓\x20Menu\x20sync\x20completed:\x20','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','1261387kXFxoU','failed','Created\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','Register\x20local\x20pages\x20as\x20platform\x20menus','cyan','menu','\x20\x20Create\x20','Fetching\x20online\x20menu\x20list...','2039315sQAgRb','filter','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','\x20failed.','appName','paths','params','skipped','appcode','\x20local\x20microfrontend\x20menu(s).','created','cookie','\x20\x20Cancelled.','flag','Menu\x20sync\x20completed:\x20','\x20menu(s)\x20with\x20JS:\x20','str','string','\x20created,\x20','2VtodQX','sync','Would\x20create\x20','49756780ubAolX','cssUrl','selectedAppName','gray','Creating\x20','\x20menu(s)...','\x20menu(s)\x20bound\x20to\x20','write','\x20menu(s)\x20created','localPages','map','3642423OzArsA','/smartapi/menu/create','887088gNjDRB','\x20page(s)','onlineMenuList','message','size','rawFlags','1962620MpEcgl','\x20and\x20CSS:\x20','boolean','1998153xNMSbe','\x20\x20Continue\x20with\x20creation?','POST','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','validation','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','appCode'];a190_0x3269=function(){return _0x372177;};return a190_0x3269();}export const menuSync={'service':a190_0x4953ce(0x116),'command':a190_0x4953ce(0x12d),'description':a190_0x4953ce(0x114),'risk':a190_0x4953ce(0x136),'flags':[{'name':a190_0x4953ce(0x11f),'type':a190_0x4953ce(0x12a),'description':'Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20'+a190_0x4953ce(0x149)},{'name':a190_0x4953ce(0x11e),'type':a190_0x4953ce(0x12a),'description':a190_0x4953ce(0x14a)},{'name':a190_0x4953ce(0x10a),'type':a190_0x4953ce(0x144),'description':a190_0x4953ce(0x10d)}],async 'dryRun'(_0x5c317a){const _0x1beb6d=a190_0x4953ce;ensureRunnableContext(_0x5c317a[_0x1beb6d(0x141)],_0x5c317a[_0x1beb6d(0x131)]);const _0x466088=await runMenuSyncCore(_0x5c317a[_0x1beb6d(0x102)],_0x5c317a[_0x1beb6d(0x124)],parsePaths(_0x5c317a[_0x1beb6d(0x129)](_0x1beb6d(0x11e))),_0x5c317a[_0x1beb6d(0x129)](_0x1beb6d(0x11f)),{'dryRun':!![]});return{'method':_0x1beb6d(0x147),'url':_0x1beb6d(0x13b),'body':_0x466088,'description':_0x466088[_0x1beb6d(0x120)]?_0x1beb6d(0x101):_0x1beb6d(0x12e)+_0x466088['targetPages'][_0x1beb6d(0x108)]+_0x1beb6d(0x122)};},async 'execute'(_0x4256e5){const _0x3b9d82=a190_0x4953ce;ensureRunnableContext(_0x4256e5[_0x3b9d82(0x141)],_0x4256e5['selectedAppName']);const _0x38a71f=_0x4256e5[_0x3b9d82(0x126)]('yes'),_0x5e1952=_0x4256e5[_0x3b9d82(0x129)](_0x3b9d82(0x11f)),_0x43422e=parsePaths(_0x4256e5[_0x3b9d82(0x129)](_0x3b9d82(0x11e))),_0x55e9cb=parseMenuSyncParams(_0x5e1952);if(_0x38a71f){const _0x28dfed=await runMenuSyncCore(_0x4256e5['appCode'],_0x4256e5[_0x3b9d82(0x124)],_0x43422e,_0x5e1952);if(_0x28dfed[_0x3b9d82(0x120)]){const _0x22512b=getLocalPages();_0x22512b[_0x3b9d82(0x108)]===0x0?writeCliSideChannelLine(_0x3b9d82(0x10f)):writeCliSideChannelLine(_0x3b9d82(0x11b));}else writeCliSideChannelLine(_0x3b9d82(0x10e)+_0x28dfed['created']+_0x3b9d82(0x137));return{'ok':!![],'data':_0x28dfed,'message':_0x28dfed[_0x3b9d82(0x120)]?'Menu\x20sync\x20skipped':'Menu\x20sync\x20completed:\x20'+_0x28dfed[_0x3b9d82(0x123)]+_0x3b9d82(0x103)};}if(_0x43422e[_0x3b9d82(0x108)]>0x0)throw CliErrors[_0x3b9d82(0x14c)](_0x3b9d82(0x109),_0x3b9d82(0x148));if(!isInteractive()&&_0x5e1952)throw CliErrors[_0x3b9d82(0x14c)](_0x3b9d82(0x14b),_0x3b9d82(0x148));requireInteractive(),writeCliSideChannelLine(_0x3b9d82(0x105));const _0x29d8d0=startSpinner(_0x3b9d82(0x118));let _0x2a8ed9,_0x49275d,_0x238873;try{const _0x366624=await fetchMenuData(_0x4256e5[_0x3b9d82(0x102)],_0x4256e5[_0x3b9d82(0x124)]);_0x2a8ed9=_0x366624[_0x3b9d82(0x138)],_0x49275d=_0x366624['onlinePaths'],_0x238873=_0x366624[_0x3b9d82(0x13e)],stopSpinner(_0x29d8d0,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x3e0be1){stopSpinner(_0x29d8d0,_0x3b9d82(0x113),![]);throw CliErrors[_0x3b9d82(0x14c)](_0x3e0be1 instanceof Error?_0x3e0be1[_0x3b9d82(0x13f)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x2a8ed9[_0x3b9d82(0x108)]===0x0)return writeCliSideChannelLine(a190_0x3fd07b['yellow']('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x2d4716=buildCompareRows(_0x2a8ed9,_0x49275d);writeCliSideChannelLine(renderCompareTable(_0x2d4716)),writeCliSideChannelLine('');const _0x298345=await selectPages(_0x2a8ed9,_0x49275d);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0x3fd07b[_0x3b9d82(0x115)]('\x20\x20✓\x20Selected:\x20'+_0x298345['length']+_0x3b9d82(0x13d)));const _0x94fa27=_0x55e9cb['jsUrl']&&_0x55e9cb[_0x3b9d82(0x130)];if(!_0x94fa27){writeCliSideChannelLine(renderSyncSummary(_0x298345,_0x49275d[_0x3b9d82(0x140)]>0x0));const _0x5c014d=await askConfirm(_0x3b9d82(0x146));if(!_0x5c014d)return writeCliSideChannelLine(a190_0x3fd07b[_0x3b9d82(0x132)](_0x3b9d82(0x125))),{'ok':!![]};}let _0x39dde9=_0x55e9cb[_0x3b9d82(0x10b)],_0x570bbd=_0x55e9cb[_0x3b9d82(0x130)];!_0x39dde9&&!_0x55e9cb['appName']&&(_0x39dde9=await askJsUrl());!_0x570bbd&&!_0x55e9cb[_0x3b9d82(0x11d)]&&(_0x570bbd=await askCssUrl());const _0x358577=await askConfirm(_0x55e9cb[_0x3b9d82(0x11d)]?'\x20\x20Create\x20'+_0x298345[_0x3b9d82(0x108)]+_0x3b9d82(0x135)+_0x55e9cb[_0x3b9d82(0x11d)]+'?':_0x3b9d82(0x117)+_0x298345['length']+_0x3b9d82(0x128)+_0x39dde9+_0x3b9d82(0x143)+_0x570bbd+'?');if(!_0x358577)return writeCliSideChannelLine(a190_0x3fd07b[_0x3b9d82(0x132)](_0x3b9d82(0x125))),{'ok':!![]};const _0x57e857=[_0x39dde9,_0x570bbd][_0x3b9d82(0x11a)](_0x163fb3=>Boolean(_0x163fb3));_0x55e9cb['appName']&&_0x57e857['length']===0x0&&await assertSharedResourcesConfigured(_0x4256e5[_0x3b9d82(0x102)],_0x4256e5[_0x3b9d82(0x124)],_0x55e9cb[_0x3b9d82(0x11d)]);const _0x2110dc=startSpinner(_0x3b9d82(0x133)+_0x298345['length']+_0x3b9d82(0x134));try{const _0x6095a7=_0x298345[_0x3b9d82(0x139)](_0x457454=>resolvePage(_0x457454,_0x55e9cb,_0x238873)),_0x4cf000=await doCreateMenus(_0x4256e5[_0x3b9d82(0x102)],_0x4256e5['cookie'],_0x6095a7,_0x57e857,_0x55e9cb[_0x3b9d82(0x11d)]?{'appName':_0x55e9cb[_0x3b9d82(0x11d)]}:undefined);return stopSpinner(_0x2110dc,_0x3b9d82(0x112)+_0x4cf000[_0x3b9d82(0x123)]+'\x20menu(s)',!![]),{'ok':!![],'data':_0x4cf000,'message':_0x3b9d82(0x127)+_0x4cf000[_0x3b9d82(0x123)]+_0x3b9d82(0x12b)+_0x4cf000[_0x3b9d82(0x111)]+_0x3b9d82(0x11c)};}catch(_0x53715f){stopSpinner(_0x2110dc,_0x3b9d82(0x104),![]);throw CliErrors['validation'](_0x53715f instanceof Error?_0x53715f[_0x3b9d82(0x13f)]:_0x3b9d82(0x104));}}};function ensureRunnableContext(_0x476e17,_0x488948){const _0x5204ea=a190_0x4953ce,_0x4c4793=_0x476e17[_0x5204ea(0x121)]?String(_0x476e17[_0x5204ea(0x121)])[_0x5204ea(0x107)]():'';if(!isInProject()&&!_0x488948&&!_0x4c4793)throw CliErrors[_0x5204ea(0x14c)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x5204ea(0x14d));}function a190_0x3376(_0x26e2b9,_0x73b884){_0x26e2b9=_0x26e2b9-0x101;const _0x3269ec=a190_0x3269();let _0x33764d=_0x3269ec[_0x26e2b9];return _0x33764d;}function parsePaths(_0xec2023){const _0x16a3fb=a190_0x4953ce;return[...new Set(_0xec2023['split'](',')[_0x16a3fb(0x139)](_0x1367a5=>_0x1367a5[_0x16a3fb(0x107)]())['filter'](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a191_0x426c28=a191_0xc495;function a191_0xc495(_0xb29df2,_0x31165e){_0xb29df2=_0xb29df2-0x12f;const _0x13399b=a191_0x1339();let _0xc495e3=_0x13399b[_0xb29df2];return _0xc495e3;}(function(_0x22ae45,_0x319817){const _0x30dbb8=a191_0xc495,_0x59c013=_0x22ae45();while(!![]){try{const _0xb0b57d=parseInt(_0x30dbb8(0x152))/0x1*(-parseInt(_0x30dbb8(0x182))/0x2)+parseInt(_0x30dbb8(0x171))/0x3*(parseInt(_0x30dbb8(0x14c))/0x4)+-parseInt(_0x30dbb8(0x151))/0x5+parseInt(_0x30dbb8(0x141))/0x6+-parseInt(_0x30dbb8(0x19f))/0x7*(parseInt(_0x30dbb8(0x15f))/0x8)+-parseInt(_0x30dbb8(0x1a7))/0x9+parseInt(_0x30dbb8(0x155))/0xa*(parseInt(_0x30dbb8(0x1ab))/0xb);if(_0xb0b57d===_0x319817)break;else _0x59c013['push'](_0x59c013['shift']());}catch(_0x42344a){_0x59c013['push'](_0x59c013['shift']());}}}(a191_0x1339,0x773db));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a191_0x1339(){const _0x3c754b=['verify\x20menu\x20visibility\x20update','modelType','\x20menu(s),\x20expected\x20','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','targets','152YCkkCo','menu_selector_not_found','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','expectVisible','before','depth','push','Menu\x20','\x20updated,\x20','childrenCount','true','Menu\x20visibility\x20update\x20completed:\x20','\x20menu(s);\x20skip\x20','stringify','appCode','update-recovery','update\x20visibility\x20for','parentId','981xPMEeo','plan','visible','\x20unchanged\x20menu(s).','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','menu','Updated\x20visibility\x20for\x20','menu-ids','expect-visible','isArray','trim','expected-count','resourcesValid','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','num','menu_permission_denied','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','34mZXaGP','sort','boolean','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','plannedActions','validation','Response\x20was\x20lost\x20for\x20menu\x20','visibility-update','verification','expectedCount','recovered','Selected\x20','update-menu-visibility','\x20must\x20be\x20true\x20or\x20false.','/smartapi/menu/update','get','datasetId','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','has','resources','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','path','pageType','childrenIds','label','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','update\x20menu\x20visibility','\x20failed.','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','137543hEOZhp','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','requestedVisible','Menu\x20id\x20selector(s)\x20not\x20found:\x20','updated','rabetbase\x20menu\x20list\x20--format\x20compress','datasetCode','7802433gMwjff','join','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','hash','626021sSxrNg','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','\x20changed\x20unexpectedly.','type','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','map','beforeById','menuIds','string','rawFlags','pageId','write','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','flagMissing','message','false','\x20skipped,\x20','filter','cookie','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','menu_verification_failed','failed','3434250CJRQFb','POST','number','paths','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','body','some','set','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','length','url','4288RnThcQ','Response\x20was\x20lost\x20and\x20menu\x20','Menu\x20path\x20selector\x20not\x20found:\x20','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','isSafeInteger','3298790ujCnAo','51049Swopqb','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','menus','410NsEpxF','code','menu\x20list','warnings','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources'];a191_0x1339=function(){return _0x3c754b;};return a191_0x1339();}import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x426c28(0x142),'path':a191_0x426c28(0x190)}];export const menuVisibilityUpdate={'service':a191_0x426c28(0x176),'command':'visibility-update','description':a191_0x426c28(0x159),'risk':a191_0x426c28(0x136),'structuredErrors':!![],'flags':[{'name':a191_0x426c28(0x178),'type':a191_0x426c28(0x133),'description':a191_0x426c28(0x193)},{'name':'paths','type':a191_0x426c28(0x133),'description':a191_0x426c28(0x181)},{'name':'visible','type':'boolean','required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a191_0x426c28(0x179),'type':a191_0x426c28(0x184),'description':a191_0x426c28(0x19b)},{'name':'expected-count','type':a191_0x426c28(0x143),'description':a191_0x426c28(0x137)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1d33d1){parseInput(_0x1d33d1);},async 'dryRun'(_0x1d394b){const _0x118159=a191_0x426c28,_0x3f0300=await buildPlan(_0x1d394b,!![]),_0x2ba29e=_0x3f0300[_0x118159(0x172)][_0x118159(0x186)]?.[_0x118159(0x14a)]??0x0,_0x3ff4d9=_0x3f0300[_0x118159(0x172)][_0x118159(0x15e)]['length']-_0x2ba29e;return menuDryRunResult(_0x3f0300[_0x118159(0x172)],{'method':_0x118159(0x142),'url':_0x118159(0x190),'body':{'updates':_0x3f0300['plan']['plannedActions']?.[_0x118159(0x130)](_0x3d4063=>_0x3d4063[_0x118159(0x146)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x2ba29e+_0x118159(0x16b)+_0x3ff4d9+_0x118159(0x174)});},async 'execute'(_0x295e82){const _0x284009=a191_0x426c28,_0x39a460=await buildPlan(_0x295e82,![]);await recheckMutationSnapshot(_0x295e82,_0x39a460[_0x284009(0x172)],_0x284009(0x19c));const _0x12e1f9=[],_0x4765b8=[],_0xb18290=[];for(const _0x1ec941 of _0x39a460[_0x284009(0x172)]['targets']){if(_0x1ec941[_0x284009(0x163)][_0x284009(0x173)]===_0x39a460[_0x284009(0x172)][_0x284009(0x1a2)]){_0x12e1f9[_0x284009(0x165)]({'id':_0x1ec941['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x295e82[_0x284009(0x16d)],_0x295e82[_0x284009(0x13d)],{'id':_0x1ec941['id'],'visible':_0x39a460['plan'][_0x284009(0x1a2)]}),_0x12e1f9[_0x284009(0x165)]({'id':_0x1ec941['id'],'updated':!![],'skipped':![]});}catch(_0x21a739){const _0x5d8353=mapMenuApiError(_0x21a739,_0x284009(0x16f),_0x1ec941['id']);if(isMenuResponseLoss(_0x21a739)&&_0x5d8353[_0x284009(0x156)]!==_0x284009(0x180)){_0xb18290['push'](_0x1ec941['id']);continue;}_0x4765b8['push']({'id':_0x1ec941['id'],'stage':'update','code':_0x5d8353['code'],'message':_0x5d8353[_0x284009(0x139)]});}}let _0x385654;try{_0x385654=await fetchMenuSnapshot(_0x295e82[_0x284009(0x16d)],_0x295e82['cookie']);}catch(_0x15dd2d){const _0x578c62=describeMenuErrorCause(_0x15dd2d,_0x284009(0x15a)),_0x50460c=_0xb18290[_0x284009(0x130)](_0x423473=>({'id':_0x423473,'stage':'update-recovery','code':_0x284009(0x13f),'message':_0x284009(0x188)+_0x423473+_0x284009(0x13e),'requestedStateConfirmed':![],'recovered':![]})),_0x3893d0={'stage':_0x284009(0x18a),'code':_0x284009(0x13f),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x39a460['plan'][_0x284009(0x15e)][_0x284009(0x130)](_0x2a008e=>_0x2a008e['id']),'requestedStateConfirmed':![],..._0x578c62};throw menuFailure(asVerificationError(_0x15dd2d,_0x284009(0x196)),_0x39a460[_0x284009(0x172)],{'stage':_0x284009(0x18a),'succeeded':_0x12e1f9,'failedRecords':[..._0x4765b8,..._0x50460c,_0x3893d0],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x284009(0x140),'recoveredCount':0x0,'lookupCommand':_0x284009(0x1a5)}});}const _0x3e760a=[];for(const _0x35429e of _0x12e1f9){const _0x2f9c68=Number(_0x35429e['id']),_0xbe6609=_0x39a460[_0x284009(0x131)]['get'](_0x2f9c68),_0x36af68=_0x385654['byId'][_0x284009(0x191)](_0x2f9c68);try{verifyVisibilityUpdate(_0xbe6609,_0x36af68,_0x39a460[_0x284009(0x172)][_0x284009(0x1a2)]);}catch(_0xbf4813){const _0x554dc5=asVerificationError(_0xbf4813,_0x284009(0x166)+_0x2f9c68+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x3e760a[_0x284009(0x165)]({'id':_0x2f9c68,'stage':'verification','code':_0x554dc5[_0x284009(0x156)],'message':_0x554dc5[_0x284009(0x139)],'requestedStateConfirmed':![]});}}for(const _0x33c503 of _0xb18290){const _0x4de119=_0x39a460[_0x284009(0x131)][_0x284009(0x191)](_0x33c503),_0x2db7e1=_0x385654['byId'][_0x284009(0x191)](_0x33c503);try{verifyVisibilityUpdate(_0x4de119,_0x2db7e1,_0x39a460['plan'][_0x284009(0x1a2)]),_0x12e1f9[_0x284009(0x165)]({'id':_0x33c503,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x56af3c){const _0x440c29=asVerificationError(_0x56af3c,_0x284009(0x14d)+_0x33c503+_0x284009(0x15d));_0x3e760a['push']({'id':_0x33c503,'stage':_0x284009(0x16e),'code':_0x440c29[_0x284009(0x156)],'message':_0x440c29[_0x284009(0x139)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x3e760a[_0x284009(0x14a)]>0x0){const _0x20f014=_0x3e760a[_0x284009(0x130)](_0x46d9b6=>Number(_0x46d9b6['id'])),_0x3598a0=_0x12e1f9[_0x284009(0x13c)](_0x61a9ef=>_0x61a9ef[_0x284009(0x18c)]===!![])['length'],_0x5d892f=menuError('menu_verification_failed',_0x284009(0x149)+_0x20f014['join'](',\x20')+'.',_0x284009(0x14f));throw menuFailure(_0x5d892f,_0x39a460['plan'],{'stage':_0x284009(0x18a),'succeeded':_0x12e1f9,'failedRecords':[..._0x4765b8,..._0x3e760a],'warnings':[_0x284009(0x19e)],'verification':{'status':'failed',..._0x20f014['length']===0x1?{'targetId':_0x20f014[0x0]}:{'targetIds':_0x20f014},'recoveredCount':_0x3598a0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x4ef3b5=_0x12e1f9[_0x284009(0x13c)](_0x4ca3e9=>_0x4ca3e9[_0x284009(0x1a4)]===!![])[_0x284009(0x14a)],_0x5c4120=_0x12e1f9[_0x284009(0x14a)]-_0x4ef3b5,_0x24a39d={..._0x39a460[_0x284009(0x172)],'succeeded':_0x12e1f9,'failed':_0x4765b8,'warnings':_0x4765b8[_0x284009(0x14a)]>0x0?[..._0x39a460[_0x284009(0x172)][_0x284009(0x158)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x39a460[_0x284009(0x172)][_0x284009(0x158)],'verification':{'checkedBy':_0x284009(0x157),'snapshotHash':_0x385654[_0x284009(0x1aa)],'matchesRequestedState':_0x4765b8[_0x284009(0x14a)]===0x0,'recoveredCount':_0xb18290['length']}};return{'ok':_0x4765b8[_0x284009(0x14a)]===0x0,'data':_0x24a39d,'message':_0x4765b8[_0x284009(0x14a)]===0x0?_0x284009(0x177)+_0x4ef3b5+'\x20menu(s);\x20skipped\x20'+_0x5c4120+_0x284009(0x174):_0x284009(0x16a)+_0x4ef3b5+_0x284009(0x167)+_0x5c4120+_0x284009(0x13b)+_0x4765b8[_0x284009(0x14a)]+_0x284009(0x19d)};}};function parseInput(_0x196306){const _0x3f4571=a191_0x426c28,_0x568ee6=parseMenuIds(_0x196306['str'](_0x3f4571(0x178))),_0x220d3d=parseCsv(_0x196306['str'](_0x3f4571(0x144)));if(_0x568ee6['length']===0x0&&_0x220d3d[_0x3f4571(0x14a)]===0x0)throw CliErrors['validation'](_0x3f4571(0x1a0));const _0x3f34fe=parseBooleanFlag(_0x196306,_0x3f4571(0x173),!![]),_0x128636=parseBooleanFlag(_0x196306,'expect-visible',![]);let _0x340b6d;if(hasFlag(_0x196306,'expected-count')){_0x340b6d=_0x196306[_0x3f4571(0x17f)](_0x3f4571(0x17c));if(!Number[_0x3f4571(0x150)](_0x340b6d)||_0x340b6d<0x0)throw CliErrors[_0x3f4571(0x187)](_0x3f4571(0x185));}return{'menuIds':_0x568ee6,'paths':_0x220d3d,'visible':_0x3f34fe,'expectVisible':_0x128636,'expectedCount':_0x340b6d};}async function buildPlan(_0x530f5c,_0x3c4f88){const _0x1d03ba=a191_0x426c28,_0x34bd4f=parseInput(_0x530f5c),_0x4b4741=await fetchMutationSnapshot(_0x530f5c,_0x1d03ba(0x19c)),_0x36af98=selectTargets(_0x4b4741[_0x1d03ba(0x154)],_0x34bd4f[_0x1d03ba(0x132)],_0x34bd4f['paths']);if(_0x34bd4f['expectedCount']!==undefined&&_0x36af98['length']!==_0x34bd4f[_0x1d03ba(0x18b)])throw menuError('menu_expected_count_mismatch',_0x1d03ba(0x18d)+_0x36af98['length']+_0x1d03ba(0x15c)+_0x34bd4f[_0x1d03ba(0x18b)]+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x34bd4f[_0x1d03ba(0x162)]!==undefined){const _0x449084=_0x36af98[_0x1d03ba(0x13c)](_0x8ff8e4=>_0x8ff8e4['visible']!==_0x34bd4f[_0x1d03ba(0x162)]);if(_0x449084[_0x1d03ba(0x14a)]>0x0)throw menuError('menu_state_drift',_0x1d03ba(0x17e)+_0x449084[_0x1d03ba(0x130)](_0x5cf09f=>_0x5cf09f['id'])['join'](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x4e4b4e=_0x36af98['map'](_0x29427a=>({'id':_0x29427a['id'],'label':_0x29427a[_0x1d03ba(0x19a)],'path':_0x29427a['path'],'before':{'visible':_0x29427a[_0x1d03ba(0x173)]},'after':{'visible':_0x34bd4f['visible']}})),_0x4ea964=_0x4e4b4e[_0x1d03ba(0x13c)](_0x5bf17f=>_0x5bf17f['before'][_0x1d03ba(0x173)]!==_0x34bd4f[_0x1d03ba(0x173)])[_0x1d03ba(0x130)](_0x1f2e8=>({'stage':_0x1d03ba(0x18e),'method':'POST','path':'/smartapi/menu/update','body':{'appCode':_0x530f5c[_0x1d03ba(0x16d)],'id':_0x1f2e8['id'],'visible':_0x34bd4f['visible']}})),_0x34606f=mutationResult({'operation':_0x1d03ba(0x189),'selector':{'menuIds':_0x34bd4f[_0x1d03ba(0x132)],'paths':_0x34bd4f[_0x1d03ba(0x144)]},'before':{'menus':_0x36af98[_0x1d03ba(0x130)](_0x9117e1=>({'id':_0x9117e1['id'],'path':_0x9117e1[_0x1d03ba(0x197)],'visible':_0x9117e1['visible']}))},'after':{'menus':_0x36af98['map'](_0x20dc01=>({'id':_0x20dc01['id'],'path':_0x20dc01[_0x1d03ba(0x197)],'visible':_0x34bd4f[_0x1d03ba(0x173)]}))},'dryRun':_0x3c4f88,'backend':[...BACKEND],'plannedActions':_0x4ea964,'snapshotHash':_0x4b4741[_0x1d03ba(0x1aa)],'warnings':_0x4ea964[_0x1d03ba(0x14a)]===0x0?[_0x1d03ba(0x1a1)]:[]});return{'plan':{..._0x34606f,'requestedVisible':_0x34bd4f[_0x1d03ba(0x173)],'targets':_0x4e4b4e},'beforeById':new Map(_0x36af98['map'](_0x5789df=>[_0x5789df['id'],_0x5789df]))};}function selectTargets(_0x94177e,_0x4ac0ed,_0x1dc750){const _0x5ac4f0=a191_0x426c28,_0x3f33c3=new Map(_0x94177e[_0x5ac4f0(0x130)](_0x2881c2=>[_0x2881c2['id'],_0x2881c2])),_0x21ff85=new Map(),_0x178802=_0x4ac0ed['filter'](_0x2f3a13=>!_0x3f33c3[_0x5ac4f0(0x194)](_0x2f3a13));if(_0x178802[_0x5ac4f0(0x14a)]>0x0)throw menuError(_0x5ac4f0(0x160),_0x5ac4f0(0x1a3)+_0x178802['join'](',\x20')+'.',_0x5ac4f0(0x153));for(const _0x10c10e of _0x4ac0ed){_0x21ff85['set'](_0x10c10e,_0x3f33c3[_0x5ac4f0(0x191)](_0x10c10e));}for(const _0x4007ec of _0x1dc750){const _0x1c8d27=_0x94177e['filter'](_0x31bcda=>_0x31bcda[_0x5ac4f0(0x197)]===_0x4007ec);if(_0x1c8d27[_0x5ac4f0(0x14a)]===0x0)throw menuError(_0x5ac4f0(0x160),_0x5ac4f0(0x14e)+JSON[_0x5ac4f0(0x16c)](_0x4007ec)+'.',_0x5ac4f0(0x1a9));if(_0x1c8d27['length']>0x1)throw menuError('menu_selector_ambiguous',_0x5ac4f0(0x161)+JSON['stringify'](_0x4007ec)+'.',_0x5ac4f0(0x12f)+_0x1c8d27[_0x5ac4f0(0x130)](_0x293ad7=>_0x293ad7['id'])[_0x5ac4f0(0x1a8)](',\x20')+'.');const _0xaa8cbe=_0x1c8d27[0x0];_0x21ff85[_0x5ac4f0(0x148)](_0xaa8cbe['id'],_0xaa8cbe);}return[..._0x21ff85['values']()];}function parseMenuIds(_0xe663ea){const _0x1d0c65=a191_0x426c28,_0x41e4d2=parseCsv(_0xe663ea),_0x33df56=_0x41e4d2[_0x1d0c65(0x130)](Number);if(_0x33df56[_0x1d0c65(0x147)](_0x20a0f7=>!Number[_0x1d0c65(0x150)](_0x20a0f7)||_0x20a0f7<=0x0))throw CliErrors[_0x1d0c65(0x187)](_0x1d0c65(0x1ac));return[...new Set(_0x33df56)];}function parseCsv(_0x1d326e){const _0x481c14=a191_0x426c28;return[...new Set(_0x1d326e['split'](',')[_0x481c14(0x130)](_0x263f86=>_0x263f86[_0x481c14(0x17b)]())[_0x481c14(0x13c)](Boolean))];}function parseBooleanFlag(_0x58a3e8,_0x4c7a22,_0x536372){const _0xb18b83=a191_0x426c28;if(!hasFlag(_0x58a3e8,_0x4c7a22)){if(_0x536372)throw CliErrors[_0xb18b83(0x138)](_0x4c7a22);return undefined;}const _0x3af518=_0x58a3e8[_0xb18b83(0x134)][_0x4c7a22];if(_0x3af518===!![]||_0x3af518===![])return _0x3af518;if(_0x3af518===_0xb18b83(0x169))return!![];if(_0x3af518===_0xb18b83(0x13a))return![];throw CliErrors[_0xb18b83(0x187)]('--'+_0x4c7a22+_0xb18b83(0x18f));}function verifyVisibilityUpdate(_0x3a0858,_0xaa1c87,_0x13ac52){const _0x183ff5=a191_0x426c28;assertVerified(!!_0xaa1c87,_0x183ff5(0x166)+_0x3a0858['id']+_0x183ff5(0x175)),assertVerified(_0xaa1c87['visible']===_0x13ac52,_0x183ff5(0x166)+_0x3a0858['id']+_0x183ff5(0x145));const _0x1dbeb1=[['id',_0xaa1c87['id'],_0x3a0858['id']],[_0x183ff5(0x170),_0xaa1c87['parentId'],_0x3a0858[_0x183ff5(0x170)]],[_0x183ff5(0x164),_0xaa1c87[_0x183ff5(0x164)],_0x3a0858['depth']],[_0x183ff5(0x19a),_0xaa1c87['label'],_0x3a0858[_0x183ff5(0x19a)]],['path',_0xaa1c87[_0x183ff5(0x197)],_0x3a0858[_0x183ff5(0x197)]],[_0x183ff5(0x14b),_0xaa1c87[_0x183ff5(0x14b)],_0x3a0858['url']],[_0x183ff5(0x1ae),_0xaa1c87[_0x183ff5(0x1ae)],_0x3a0858[_0x183ff5(0x1ae)]],[_0x183ff5(0x183),_0xaa1c87[_0x183ff5(0x183)],_0x3a0858[_0x183ff5(0x183)]],[_0x183ff5(0x195),_0xaa1c87[_0x183ff5(0x195)],_0x3a0858[_0x183ff5(0x195)]],[_0x183ff5(0x17d),_0xaa1c87[_0x183ff5(0x17d)],_0x3a0858[_0x183ff5(0x17d)]],[_0x183ff5(0x199),_0xaa1c87[_0x183ff5(0x199)],_0x3a0858['childrenIds']],[_0x183ff5(0x168),_0xaa1c87[_0x183ff5(0x168)],_0x3a0858['childrenCount']],[_0x183ff5(0x135),_0xaa1c87[_0x183ff5(0x135)],_0x3a0858[_0x183ff5(0x135)]],[_0x183ff5(0x198),_0xaa1c87['pageType'],_0x3a0858['pageType']],[_0x183ff5(0x15b),_0xaa1c87[_0x183ff5(0x15b)],_0x3a0858[_0x183ff5(0x15b)]],[_0x183ff5(0x192),_0xaa1c87['datasetId'],_0x3a0858['datasetId']],[_0x183ff5(0x1a6),_0xaa1c87[_0x183ff5(0x1a6)],_0x3a0858[_0x183ff5(0x1a6)]]];for(const [_0x4ec0b3,_0x4bf06a,_0x1f40d6]of _0x1dbeb1){assertVerified(sameValue(_0x4bf06a,_0x1f40d6),'Menu\x20'+_0x3a0858['id']+'\x20'+_0x4ec0b3+_0x183ff5(0x1ad));}}function sameValue(_0x9bff1c,_0x315337){const _0x6b21e5=a191_0x426c28;if(Array[_0x6b21e5(0x17a)](_0x9bff1c)||Array['isArray'](_0x315337))return JSON[_0x6b21e5(0x16c)](_0x9bff1c)===JSON[_0x6b21e5(0x16c)](_0x315337);return _0x9bff1c===_0x315337;}
|
|
1
|
+
const a191_0x50d41e=a191_0x51f7;(function(_0x5c5d99,_0x22c090){const _0x272917=a191_0x51f7,_0xa466d0=_0x5c5d99();while(!![]){try{const _0x14035c=parseInt(_0x272917(0x149))/0x1*(parseInt(_0x272917(0xf0))/0x2)+parseInt(_0x272917(0xfa))/0x3+-parseInt(_0x272917(0xf9))/0x4+-parseInt(_0x272917(0x148))/0x5*(parseInt(_0x272917(0x142))/0x6)+parseInt(_0x272917(0x108))/0x7+parseInt(_0x272917(0xe8))/0x8+-parseInt(_0x272917(0x125))/0x9;if(_0x14035c===_0x22c090)break;else _0xa466d0['push'](_0xa466d0['shift']());}catch(_0xa0cca4){_0xa466d0['push'](_0xa466d0['shift']());}}}(a191_0x4d97,0xd156d));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x50d41e(0x130),'path':a191_0x50d41e(0xde)}];export const menuVisibilityUpdate={'service':a191_0x50d41e(0x13e),'command':'visibility-update','description':a191_0x50d41e(0xed),'risk':'write','structuredErrors':!![],'flags':[{'name':a191_0x50d41e(0x124),'type':a191_0x50d41e(0x128),'description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':a191_0x50d41e(0xe6),'type':a191_0x50d41e(0x128),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a191_0x50d41e(0x14e),'type':'boolean','required':!![],'description':a191_0x50d41e(0xec)},{'name':a191_0x50d41e(0x117),'type':'boolean','description':a191_0x50d41e(0xdf)},{'name':a191_0x50d41e(0x107),'type':a191_0x50d41e(0x147),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2f68c2){parseInput(_0x2f68c2);},async 'dryRun'(_0x5d0f44){const _0x4f2787=a191_0x50d41e,_0x2d8dbe=await buildPlan(_0x5d0f44,!![]),_0x5cc0c6=_0x2d8dbe[_0x4f2787(0xfe)]['plannedActions']?.[_0x4f2787(0x10d)]??0x0,_0x36f576=_0x2d8dbe[_0x4f2787(0xfe)][_0x4f2787(0xeb)][_0x4f2787(0x10d)]-_0x5cc0c6;return menuDryRunResult(_0x2d8dbe[_0x4f2787(0xfe)],{'method':_0x4f2787(0x130),'url':'/smartapi/menu/update','body':{'updates':_0x2d8dbe[_0x4f2787(0xfe)][_0x4f2787(0x12a)]?.[_0x4f2787(0x137)](_0x3c3ab9=>_0x3c3ab9[_0x4f2787(0x139)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x5cc0c6+_0x4f2787(0x10e)+_0x36f576+_0x4f2787(0x136)});},async 'execute'(_0x10b8a1){const _0x414362=a191_0x50d41e,_0x4ed990=await buildPlan(_0x10b8a1,![]);await recheckMutationSnapshot(_0x10b8a1,_0x4ed990[_0x414362(0xfe)],_0x414362(0x11d));const _0x1c2192=[],_0x394a46=[],_0x4603fa=[];for(const _0x273de4 of _0x4ed990['plan'][_0x414362(0xeb)]){if(_0x273de4[_0x414362(0x115)]['visible']===_0x4ed990['plan'][_0x414362(0xdc)]){_0x1c2192['push']({'id':_0x273de4['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x10b8a1[_0x414362(0xf5)],_0x10b8a1[_0x414362(0x11e)],{'id':_0x273de4['id'],'visible':_0x4ed990[_0x414362(0xfe)][_0x414362(0xdc)]}),_0x1c2192[_0x414362(0xf6)]({'id':_0x273de4['id'],'updated':!![],'skipped':![]});}catch(_0x1b6ed1){const _0x2fd3ac=mapMenuApiError(_0x1b6ed1,_0x414362(0x110),_0x273de4['id']);if(isMenuResponseLoss(_0x1b6ed1)&&_0x2fd3ac[_0x414362(0x116)]!==_0x414362(0x13b)){_0x4603fa[_0x414362(0xf6)](_0x273de4['id']);continue;}_0x394a46[_0x414362(0xf6)]({'id':_0x273de4['id'],'stage':'update','code':_0x2fd3ac['code'],'message':_0x2fd3ac[_0x414362(0xe9)]});}}let _0x7b4f17;try{_0x7b4f17=await fetchMenuSnapshot(_0x10b8a1[_0x414362(0xf5)],_0x10b8a1['cookie']);}catch(_0x216770){const _0x1fe786=describeMenuErrorCause(_0x216770,'verify\x20menu\x20visibility\x20update'),_0x43e3ad=_0x4603fa[_0x414362(0x137)](_0x3754c3=>({'id':_0x3754c3,'stage':'update-recovery','code':_0x414362(0x126),'message':_0x414362(0xf1)+_0x3754c3+_0x414362(0x12d),'requestedStateConfirmed':![],'recovered':![]})),_0x420826={'stage':'verification','code':_0x414362(0x126),'message':_0x414362(0x10f),'targetIds':_0x4ed990[_0x414362(0xfe)][_0x414362(0xeb)][_0x414362(0x137)](_0x37de22=>_0x37de22['id']),'requestedStateConfirmed':![],..._0x1fe786};throw menuFailure(asVerificationError(_0x216770,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x4ed990[_0x414362(0xfe)],{'stage':'verification','succeeded':_0x1c2192,'failedRecords':[..._0x394a46,..._0x43e3ad,_0x420826],'warnings':[_0x414362(0xe5)],'verification':{'status':_0x414362(0x102),'recoveredCount':0x0,'lookupCommand':_0x414362(0x14b)}});}const _0x3c1fd9=[];for(const _0x3d0b67 of _0x1c2192){const _0x557d44=Number(_0x3d0b67['id']),_0x23014f=_0x4ed990['beforeById'][_0x414362(0x127)](_0x557d44),_0x27d0a5=_0x7b4f17[_0x414362(0xf2)]['get'](_0x557d44);try{verifyVisibilityUpdate(_0x23014f,_0x27d0a5,_0x4ed990[_0x414362(0xfe)][_0x414362(0xdc)]);}catch(_0x4fb580){const _0x48c5db=asVerificationError(_0x4fb580,'Menu\x20'+_0x557d44+_0x414362(0x12e));_0x3c1fd9[_0x414362(0xf6)]({'id':_0x557d44,'stage':'verification','code':_0x48c5db[_0x414362(0x116)],'message':_0x48c5db[_0x414362(0xe9)],'requestedStateConfirmed':![]});}}for(const _0x325836 of _0x4603fa){const _0x52d1ef=_0x4ed990[_0x414362(0xda)][_0x414362(0x127)](_0x325836),_0x22f209=_0x7b4f17['byId'][_0x414362(0x127)](_0x325836);try{verifyVisibilityUpdate(_0x52d1ef,_0x22f209,_0x4ed990[_0x414362(0xfe)][_0x414362(0xdc)]),_0x1c2192[_0x414362(0xf6)]({'id':_0x325836,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x557014){const _0x536cfc=asVerificationError(_0x557014,_0x414362(0x132)+_0x325836+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x3c1fd9[_0x414362(0xf6)]({'id':_0x325836,'stage':_0x414362(0x105),'code':_0x536cfc[_0x414362(0x116)],'message':_0x536cfc['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x3c1fd9[_0x414362(0x10d)]>0x0){const _0x34b053=_0x3c1fd9[_0x414362(0x137)](_0x41ae70=>Number(_0x41ae70['id'])),_0x261425=_0x1c2192[_0x414362(0x119)](_0x12d9d4=>_0x12d9d4['recovered']===!![])[_0x414362(0x10d)],_0x1b02ca=menuError(_0x414362(0x126),_0x414362(0x133)+_0x34b053[_0x414362(0xdb)](',\x20')+'.',_0x414362(0xd9));throw menuFailure(_0x1b02ca,_0x4ed990[_0x414362(0xfe)],{'stage':_0x414362(0x11f),'succeeded':_0x1c2192,'failedRecords':[..._0x394a46,..._0x3c1fd9],'warnings':[_0x414362(0x143)],'verification':{'status':_0x414362(0x102),..._0x34b053['length']===0x1?{'targetId':_0x34b053[0x0]}:{'targetIds':_0x34b053},'recoveredCount':_0x261425,'lookupCommand':_0x414362(0x14b)}});}const _0x1733e5=_0x1c2192[_0x414362(0x119)](_0x3d9633=>_0x3d9633['updated']===!![])[_0x414362(0x10d)],_0x3d6045=_0x1c2192[_0x414362(0x10d)]-_0x1733e5,_0x265c06={..._0x4ed990[_0x414362(0xfe)],'succeeded':_0x1c2192,'failed':_0x394a46,'warnings':_0x394a46[_0x414362(0x10d)]>0x0?[..._0x4ed990[_0x414362(0xfe)][_0x414362(0x135)],_0x414362(0xf8)]:_0x4ed990['plan'][_0x414362(0x135)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x7b4f17['hash'],'matchesRequestedState':_0x394a46[_0x414362(0x10d)]===0x0,'recoveredCount':_0x4603fa[_0x414362(0x10d)]}};return{'ok':_0x394a46[_0x414362(0x10d)]===0x0,'data':_0x265c06,'message':_0x394a46[_0x414362(0x10d)]===0x0?_0x414362(0x104)+_0x1733e5+_0x414362(0x118)+_0x3d6045+_0x414362(0x136):_0x414362(0xe0)+_0x1733e5+_0x414362(0x114)+_0x3d6045+_0x414362(0x113)+_0x394a46[_0x414362(0x10d)]+_0x414362(0x122)};}};function parseInput(_0x131f82){const _0x5e2141=a191_0x50d41e,_0x5edbaf=parseMenuIds(_0x131f82[_0x5e2141(0xfc)](_0x5e2141(0x124))),_0x343b75=parseCsv(_0x131f82[_0x5e2141(0xfc)](_0x5e2141(0xe6)));if(_0x5edbaf[_0x5e2141(0x10d)]===0x0&&_0x343b75[_0x5e2141(0x10d)]===0x0)throw CliErrors[_0x5e2141(0xdd)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x535848=parseBooleanFlag(_0x131f82,_0x5e2141(0x14e),!![]),_0x155577=parseBooleanFlag(_0x131f82,_0x5e2141(0x117),![]);let _0x415f35;if(hasFlag(_0x131f82,'expected-count')){_0x415f35=_0x131f82[_0x5e2141(0x123)](_0x5e2141(0x107));if(!Number[_0x5e2141(0xf7)](_0x415f35)||_0x415f35<0x0)throw CliErrors[_0x5e2141(0xdd)](_0x5e2141(0x109));}return{'menuIds':_0x5edbaf,'paths':_0x343b75,'visible':_0x535848,'expectVisible':_0x155577,'expectedCount':_0x415f35};}async function buildPlan(_0x3186a7,_0x465542){const _0xd2b5f7=a191_0x50d41e,_0x230433=parseInput(_0x3186a7),_0x435cab=await fetchMutationSnapshot(_0x3186a7,_0xd2b5f7(0x11d)),_0x249110=selectTargets(_0x435cab['menus'],_0x230433[_0xd2b5f7(0x112)],_0x230433[_0xd2b5f7(0xe6)]);if(_0x230433[_0xd2b5f7(0x138)]!==undefined&&_0x249110[_0xd2b5f7(0x10d)]!==_0x230433[_0xd2b5f7(0x138)])throw menuError(_0xd2b5f7(0x13c),_0xd2b5f7(0x100)+_0x249110[_0xd2b5f7(0x10d)]+'\x20menu(s),\x20expected\x20'+_0x230433[_0xd2b5f7(0x138)]+'.',_0xd2b5f7(0x13a));if(_0x230433[_0xd2b5f7(0xe2)]!==undefined){const _0x43dd29=_0x249110[_0xd2b5f7(0x119)](_0x3dd3bb=>_0x3dd3bb[_0xd2b5f7(0x14e)]!==_0x230433['expectVisible']);if(_0x43dd29[_0xd2b5f7(0x10d)]>0x0)throw menuError(_0xd2b5f7(0x10a),'Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x43dd29[_0xd2b5f7(0x137)](_0x20c535=>_0x20c535['id'])[_0xd2b5f7(0xdb)](',\x20')+'.',_0xd2b5f7(0x14d));}const _0x202f3b=_0x249110[_0xd2b5f7(0x137)](_0x466fc7=>({'id':_0x466fc7['id'],'label':_0x466fc7[_0xd2b5f7(0x14c)],'path':_0x466fc7[_0xd2b5f7(0x141)],'before':{'visible':_0x466fc7[_0xd2b5f7(0x14e)]},'after':{'visible':_0x230433[_0xd2b5f7(0x14e)]}})),_0x580a6d=_0x202f3b[_0xd2b5f7(0x119)](_0x2c5683=>_0x2c5683[_0xd2b5f7(0x115)]['visible']!==_0x230433['visible'])[_0xd2b5f7(0x137)](_0x3d213a=>({'stage':_0xd2b5f7(0xff),'method':'POST','path':_0xd2b5f7(0xde),'body':{'appCode':_0x3186a7[_0xd2b5f7(0xf5)],'id':_0x3d213a['id'],'visible':_0x230433[_0xd2b5f7(0x14e)]}})),_0x1b6f1b=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x230433[_0xd2b5f7(0x112)],'paths':_0x230433['paths']},'before':{'menus':_0x249110[_0xd2b5f7(0x137)](_0xa69865=>({'id':_0xa69865['id'],'path':_0xa69865[_0xd2b5f7(0x141)],'visible':_0xa69865['visible']}))},'after':{'menus':_0x249110['map'](_0x2dbddc=>({'id':_0x2dbddc['id'],'path':_0x2dbddc[_0xd2b5f7(0x141)],'visible':_0x230433[_0xd2b5f7(0x14e)]}))},'dryRun':_0x465542,'backend':[...BACKEND],'plannedActions':_0x580a6d,'snapshotHash':_0x435cab[_0xd2b5f7(0x12f)],'warnings':_0x580a6d['length']===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0x1b6f1b,'requestedVisible':_0x230433[_0xd2b5f7(0x14e)],'targets':_0x202f3b},'beforeById':new Map(_0x249110[_0xd2b5f7(0x137)](_0x5afdc4=>[_0x5afdc4['id'],_0x5afdc4]))};}function selectTargets(_0x5b7c9e,_0x35e10f,_0xb67d85){const _0x396b05=a191_0x50d41e,_0xa43086=new Map(_0x5b7c9e[_0x396b05(0x137)](_0x4ab788=>[_0x4ab788['id'],_0x4ab788])),_0x144bd8=new Map(),_0x59c684=_0x35e10f[_0x396b05(0x119)](_0x2b8141=>!_0xa43086[_0x396b05(0x146)](_0x2b8141));if(_0x59c684[_0x396b05(0x10d)]>0x0)throw menuError('menu_selector_not_found','Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x59c684[_0x396b05(0xdb)](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x2310dd of _0x35e10f){_0x144bd8[_0x396b05(0x103)](_0x2310dd,_0xa43086['get'](_0x2310dd));}for(const _0x19fcd4 of _0xb67d85){const _0x36205a=_0x5b7c9e[_0x396b05(0x119)](_0x3f7ae7=>_0x3f7ae7['path']===_0x19fcd4);if(_0x36205a[_0x396b05(0x10d)]===0x0)throw menuError(_0x396b05(0x144),_0x396b05(0xee)+JSON[_0x396b05(0xe3)](_0x19fcd4)+'.',_0x396b05(0xfd));if(_0x36205a[_0x396b05(0x10d)]>0x1)throw menuError(_0x396b05(0xe1),_0x396b05(0x14f)+JSON[_0x396b05(0xe3)](_0x19fcd4)+'.',_0x396b05(0xd8)+_0x36205a[_0x396b05(0x137)](_0x32c029=>_0x32c029['id'])[_0x396b05(0xdb)](',\x20')+'.');const _0x784462=_0x36205a[0x0];_0x144bd8[_0x396b05(0x103)](_0x784462['id'],_0x784462);}return[..._0x144bd8[_0x396b05(0x101)]()];}function a191_0x4d97(){const _0x5e1cb7=['failed','set','Updated\x20visibility\x20for\x20','update-recovery','modelType','expected-count','3024777vmYkGS','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','menu_state_drift','flagMissing','childrenIds','length','\x20menu(s);\x20skip\x20','Final\x20menu\x20visibility\x20readback\x20failed.','update\x20visibility\x20for','\x20changed\x20unexpectedly.','menuIds','\x20skipped,\x20','\x20updated,\x20','before','code','expect-visible','\x20menu(s);\x20skipped\x20','filter','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','datasetId','datasetCode','update\x20menu\x20visibility','cookie','verification','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','pageType','\x20failed.','num','menu-ids','4974309CaHSDo','menu_verification_failed','get','string','type','plannedActions','childrenCount','\x20must\x20be\x20true\x20or\x20false.','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','\x20visibility\x20update\x20could\x20not\x20be\x20verified','hash','POST','false','Response\x20was\x20lost\x20and\x20menu\x20','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','url','warnings','\x20unchanged\x20menu(s).','map','expectedCount','body','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','menu_permission_denied','menu_expected_count_mismatch','split','menu','resources','some','path','12CLHgVU','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','menu_selector_not_found','depth','has','number','1508530vAMZaF','107ZtERwS','rawFlags','rabetbase\x20menu\x20list\x20--format\x20compress','label','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','visible','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','parentId','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','beforeById','join','requestedVisible','validation','/smartapi/menu/update','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','Menu\x20visibility\x20update\x20completed:\x20','menu_selector_ambiguous','expectVisible','stringify','sort','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','paths','isArray','8208616XkkgUf','message','Menu\x20','targets','Requested\x20menu\x20visibility','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Menu\x20path\x20selector\x20not\x20found:\x20','trim','14714mRVDRs','Response\x20was\x20lost\x20for\x20menu\x20','byId','pageId','resourcesValid','appCode','push','isSafeInteger','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','6352432yWIHqJ','4068861RqzydS','true','str','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','plan','update-menu-visibility','Selected\x20','values'];a191_0x4d97=function(){return _0x5e1cb7;};return a191_0x4d97();}function parseMenuIds(_0x238271){const _0x25396d=a191_0x50d41e,_0x12317d=parseCsv(_0x238271),_0x46c8a4=_0x12317d[_0x25396d(0x137)](Number);if(_0x46c8a4[_0x25396d(0x140)](_0x5c0a5b=>!Number[_0x25396d(0xf7)](_0x5c0a5b)||_0x5c0a5b<=0x0))throw CliErrors[_0x25396d(0xdd)](_0x25396d(0x11a));return[...new Set(_0x46c8a4)];}function parseCsv(_0x3bdc65){const _0x58d8a2=a191_0x50d41e;return[...new Set(_0x3bdc65[_0x58d8a2(0x13d)](',')[_0x58d8a2(0x137)](_0x51f7ad=>_0x51f7ad[_0x58d8a2(0xef)]())[_0x58d8a2(0x119)](Boolean))];}function a191_0x51f7(_0x4c9e24,_0x67de63){_0x4c9e24=_0x4c9e24-0xd7;const _0x4d979a=a191_0x4d97();let _0x51f702=_0x4d979a[_0x4c9e24];return _0x51f702;}function parseBooleanFlag(_0x501e9a,_0xdb7137,_0x31a29b){const _0x433df5=a191_0x50d41e;if(!hasFlag(_0x501e9a,_0xdb7137)){if(_0x31a29b)throw CliErrors[_0x433df5(0x10b)](_0xdb7137);return undefined;}const _0xd91c88=_0x501e9a[_0x433df5(0x14a)][_0xdb7137];if(_0xd91c88===!![]||_0xd91c88===![])return _0xd91c88;if(_0xd91c88===_0x433df5(0xfb))return!![];if(_0xd91c88===_0x433df5(0x131))return![];throw CliErrors[_0x433df5(0xdd)]('--'+_0xdb7137+_0x433df5(0x12c));}function verifyVisibilityUpdate(_0x3ca4a7,_0x559bca,_0x4a7b6d){const _0x35a424=a191_0x50d41e;assertVerified(!!_0x559bca,_0x35a424(0xea)+_0x3ca4a7['id']+_0x35a424(0x120)),assertVerified(_0x559bca[_0x35a424(0x14e)]===_0x4a7b6d,'Menu\x20'+_0x3ca4a7['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x2a4f84=[['id',_0x559bca['id'],_0x3ca4a7['id']],['parentId',_0x559bca[_0x35a424(0xd7)],_0x3ca4a7[_0x35a424(0xd7)]],['depth',_0x559bca[_0x35a424(0x145)],_0x3ca4a7[_0x35a424(0x145)]],['label',_0x559bca[_0x35a424(0x14c)],_0x3ca4a7[_0x35a424(0x14c)]],[_0x35a424(0x141),_0x559bca[_0x35a424(0x141)],_0x3ca4a7[_0x35a424(0x141)]],[_0x35a424(0x134),_0x559bca[_0x35a424(0x134)],_0x3ca4a7[_0x35a424(0x134)]],[_0x35a424(0x129),_0x559bca[_0x35a424(0x129)],_0x3ca4a7['type']],[_0x35a424(0xe4),_0x559bca[_0x35a424(0xe4)],_0x3ca4a7[_0x35a424(0xe4)]],[_0x35a424(0x13f),_0x559bca[_0x35a424(0x13f)],_0x3ca4a7[_0x35a424(0x13f)]],['resourcesValid',_0x559bca[_0x35a424(0xf4)],_0x3ca4a7[_0x35a424(0xf4)]],[_0x35a424(0x10c),_0x559bca[_0x35a424(0x10c)],_0x3ca4a7[_0x35a424(0x10c)]],[_0x35a424(0x12b),_0x559bca[_0x35a424(0x12b)],_0x3ca4a7[_0x35a424(0x12b)]],['pageId',_0x559bca['pageId'],_0x3ca4a7[_0x35a424(0xf3)]],[_0x35a424(0x121),_0x559bca[_0x35a424(0x121)],_0x3ca4a7['pageType']],[_0x35a424(0x106),_0x559bca[_0x35a424(0x106)],_0x3ca4a7[_0x35a424(0x106)]],[_0x35a424(0x11b),_0x559bca['datasetId'],_0x3ca4a7[_0x35a424(0x11b)]],[_0x35a424(0x11c),_0x559bca['datasetCode'],_0x3ca4a7['datasetCode']]];for(const [_0x2d32e9,_0x39484b,_0x428217]of _0x2a4f84){assertVerified(sameValue(_0x39484b,_0x428217),'Menu\x20'+_0x3ca4a7['id']+'\x20'+_0x2d32e9+_0x35a424(0x111));}}function sameValue(_0x3d4530,_0xb900e5){const _0x449719=a191_0x50d41e;if(Array[_0x449719(0xe7)](_0x3d4530)||Array[_0x449719(0xe7)](_0xb900e5))return JSON[_0x449719(0xe3)](_0x3d4530)===JSON[_0x449719(0xe3)](_0xb900e5);return _0x3d4530===_0xb900e5;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a192_0x379150=a192_0x35c9;(function(_0x5668ad,_0x4a7a4c){const _0x7b1ae6=a192_0x35c9,_0x526cf8=_0x5668ad();while(!![]){try{const _0x471b5d=parseInt(_0x7b1ae6(0x1d5))/0x1+parseInt(_0x7b1ae6(0x1bc))/0x2*(-parseInt(_0x7b1ae6(0x1d2))/0x3)+parseInt(_0x7b1ae6(0x1cb))/0x4+parseInt(_0x7b1ae6(0x1c5))/0x5+parseInt(_0x7b1ae6(0x1d6))/0x6*(-parseInt(_0x7b1ae6(0x1bf))/0x7)+parseInt(_0x7b1ae6(0x1db))/0x8*(parseInt(_0x7b1ae6(0x1dd))/0x9)+parseInt(_0x7b1ae6(0x1c6))/0xa*(parseInt(_0x7b1ae6(0x1dc))/0xb);if(_0x471b5d===_0x4a7a4c)break;else _0x526cf8['push'](_0x526cf8['shift']());}catch(_0x151ceb){_0x526cf8['push'](_0x526cf8['shift']());}}}(a192_0x6463,0x75945));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';function a192_0x35c9(_0x4e2cc0,_0xb39f49){_0x4e2cc0=_0x4e2cc0-0x1bb;const _0x6463c9=a192_0x6463();let _0x35c99f=_0x6463c9[_0x4e2cc0];return _0x35c99f;}const CREATE_PATH='/notification/channel-config/create';async function prepareCreate(_0x30279e){const _0x3f8d6a=a192_0x35c9,_0x2a546b=await readNotificationDocument(_0x30279e,_0x3f8d6a(0x1cc)),_0x75e4=createMutationInput(_0x30279e['appCode'],_0x2a546b);return{'document':_0x2a546b,'input':_0x75e4,'planned':projectNotificationConfig({'appCode':_0x30279e['appCode'],'configName':_0x2a546b['configName'],'channelType':_0x2a546b['channelType'],'endpointUrl':_0x2a546b[_0x3f8d6a(0x1de)],'channelConfig':_0x2a546b['channelConfig'],'description':_0x2a546b['description'],'connectTimeout':_0x2a546b[_0x3f8d6a(0x1cf)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x2a546b[_0x3f8d6a(0x1c1)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a192_0x6463(){const _0x338aba=['config-create','mutation','configName','3263800UDCXmM','11380bgCryT','channelType','planned','verification','Inspect\x20with\x20','1310616IxRVGj','create','POST','document','connectTimeout',';\x20do\x20not\x20resubmit.','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','287349rXDYwQ','verified','notification_config_create_outcome_unknown','659012uBsNsp','471168XDIxnr','appCode','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','notification','isSafeInteger','8HPtuCd','4191cTjgDr','348057rVzrdh','endpointUrl',';\x20no\x20automatic\x20retry\x20was\x20attempted.','16GgwqYU','Created\x20notification\x20config\x20','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','77MNnlpH','input','readTimeout'];a192_0x6463=function(){return _0x338aba;};return a192_0x6463();}export const notificationConfigCreate={'service':a192_0x379150(0x1d9),'command':a192_0x379150(0x1c2),'description':a192_0x379150(0x1be),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x173cac){assertSingleNotificationSource(_0x173cac);},async 'dryRun'(_0x404d2a){const _0x5641aa=a192_0x379150,_0x1024eb=await prepareCreate(_0x404d2a),_0x4f4e16=notificationLookupCommand(_0x404d2a[_0x5641aa(0x1d7)],_0x1024eb[_0x5641aa(0x1ce)][_0x5641aa(0x1c7)]);return asDryRunResult({'operation':_0x5641aa(0x1cc),'selector':{'appCode':_0x404d2a['appCode'],'configName':_0x1024eb['document'][_0x5641aa(0x1c4)],'channelType':_0x1024eb[_0x5641aa(0x1ce)][_0x5641aa(0x1c7)]},'before':null,'after':_0x1024eb['planned'],'dryRun':!![],'backend':{'method':_0x5641aa(0x1cd),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x5641aa(0x1c8),'lookupCommand':_0x4f4e16}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x56de91){const _0x2d37dd=a192_0x379150,_0x58d361=await prepareCreate(_0x56de91),_0x5b5d37=notificationLookupCommand(_0x56de91[_0x2d37dd(0x1d7)],_0x58d361[_0x2d37dd(0x1ce)][_0x2d37dd(0x1c7)]);let _0xf3216f;try{_0xf3216f=await createNotificationChannelConfig(_0x58d361[_0x2d37dd(0x1c0)]);}catch(_0x12c84d){if(isPlatformTransportFailure(_0x12c84d))throw notificationError(_0x2d37dd(0x1d4),_0x2d37dd(0x1d1),_0x2d37dd(0x1ca)+_0x5b5d37+_0x2d37dd(0x1d0));throw safeApiFailure(_0x2d37dd(0x1cc),_0x2d37dd(0x1c3),_0x2d37dd(0x1ca)+_0x5b5d37+_0x2d37dd(0x1bb));}if(!Number[_0x2d37dd(0x1da)](_0xf3216f)||_0xf3216f<=0x0)throw notificationError(_0x2d37dd(0x1d4),_0x2d37dd(0x1d8),_0x2d37dd(0x1ca)+_0x5b5d37+_0x2d37dd(0x1d0));let _0x331c9a;try{const _0x5af1ab=await getNotificationChannelConfig(_0xf3216f,_0x56de91['appCode']);_0x331c9a=normalizeExactNotificationConfig(_0x5af1ab,_0xf3216f,_0x56de91[_0x2d37dd(0x1d7)]);}catch{throw safeApiFailure('create',_0x2d37dd(0x1c9),_0x2d37dd(0x1ca)+_0x5b5d37+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x2d37dd(0x1cc),'selector':{'appCode':_0x331c9a['appCode'],'id':_0x331c9a['id'],'configCode':_0x331c9a['configCode'],'configName':_0x331c9a[_0x2d37dd(0x1c4)],'channelType':_0x331c9a[_0x2d37dd(0x1c7)]},'before':null,'after':projectNotificationConfig(_0x331c9a),'dryRun':![],'backend':{'method':_0x2d37dd(0x1cd),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x2d37dd(0x1d3),'lookupCommand':_0x5b5d37}},'message':_0x2d37dd(0x1bd)+_0x331c9a['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a193_0x45262b=a193_0x4170;(function(_0x35c7cf,_0x5b3ccd){const _0x2f8558=a193_0x4170,_0x330163=_0x35c7cf();while(!![]){try{const _0x4c5966=parseInt(_0x2f8558(0xd4))/0x1+-parseInt(_0x2f8558(0xcd))/0x2*(parseInt(_0x2f8558(0xc6))/0x3)+-parseInt(_0x2f8558(0xb6))/0x4*(-parseInt(_0x2f8558(0xd5))/0x5)+-parseInt(_0x2f8558(0xc3))/0x6+parseInt(_0x2f8558(0xd1))/0x7+-parseInt(_0x2f8558(0xd0))/0x8+parseInt(_0x2f8558(0xb8))/0x9*(parseInt(_0x2f8558(0xba))/0xa);if(_0x4c5966===_0x5b3ccd)break;else _0x330163['push'](_0x330163['shift']());}catch(_0x45090f){_0x330163['push'](_0x330163['shift']());}}}(a193_0xd3e1,0x60e3d));import{asDryRunResult}from'../../commands/common/dry-run.js';function a193_0x4170(_0x36204e,_0x4e088d){_0x36204e=_0x36204e-0xb6;const _0xd3e169=a193_0xd3e1();let _0x41705c=_0xd3e169[_0x36204e];return _0x41705c;}import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a193_0x45262b(0xbb),REFERENCE_WARNING=a193_0x45262b(0xc4);function a193_0xd3e1(){const _0x461e9d=['9GYOrxA','some','8141390uwOuqm','/notification/channel-config/delete','mutation','\x20remains\x20present\x20after\x20delete.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Inspect\x20with\x20','unshift','notification_config_delete_outcome_unknown','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','1155366DJCXpI','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','channelType','1443363kpDrkz','delete','notification','verified','high-risk-write','before','notification_config_delete_verification_failed','2bJSPjr',';\x20do\x20not\x20resubmit\x20automatically.','config-delete','5886976gWoajv','1114015DKTIaz','POST','appCode','123071mQUkbS','1300daHquD','10924awlBHB','planned'];a193_0xd3e1=function(){return _0x461e9d;};return a193_0xd3e1();}async function prepareDelete(_0x2091da){const _0x2787d5=a193_0x45262b,_0x21989c=readNotificationId(_0x2091da),_0x34e448=await requireExactNotificationConfig(_0x2091da[_0x2787d5(0xd3)],_0x21989c,_0x2787d5(0xc7));return{'id':_0x21989c,'before':_0x34e448};}export const notificationConfigDelete={'service':a193_0x45262b(0xc8),'command':a193_0x45262b(0xcf),'description':'Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','risk':a193_0x45262b(0xca),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x136cfe){readNotificationId(_0x136cfe),requireNotificationExplicitYes(_0x136cfe);},async 'dryRun'(_0xd26828){const _0x69013f=a193_0x45262b,_0x1b2441=await prepareDelete(_0xd26828),_0x493af5=notificationLookupCommand(_0xd26828[_0x69013f(0xd3)],_0x1b2441[_0x69013f(0xcb)][_0x69013f(0xc5)]);return asDryRunResult({'operation':_0x69013f(0xc7),'selector':notificationSelector(_0x1b2441[_0x69013f(0xcb)]),'before':projectNotificationConfig(_0x1b2441[_0x69013f(0xcb)]),'after':null,'dryRun':!![],'backend':{'method':_0x69013f(0xd2),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x69013f(0xb7),'lookupCommand':_0x493af5}},{'method':_0x69013f(0xd2),'url':DELETE_PATH});},async 'execute'(_0x1aced5){const _0x5d8e68=a193_0x45262b;requireNotificationExplicitYes(_0x1aced5);const _0x3ab56d=await prepareDelete(_0x1aced5),_0x336b98=notificationLookupCommand(_0x1aced5[_0x5d8e68(0xd3)],_0x3ab56d[_0x5d8e68(0xcb)][_0x5d8e68(0xc5)]);let _0x1ef044=![];try{await deleteNotificationChannelConfig(_0x3ab56d['id'],_0x1aced5[_0x5d8e68(0xd3)]);}catch(_0x2b94d8){if(!isPlatformTransportFailure(_0x2b94d8))throw safeApiFailure(_0x5d8e68(0xc7),_0x5d8e68(0xbc),'Inspect\x20with\x20'+_0x336b98+_0x5d8e68(0xbe));_0x1ef044=!![];}let _0x123d0d;try{_0x123d0d=await listNotificationChannelConfigs(_0x1aced5[_0x5d8e68(0xd3)],_0x3ab56d[_0x5d8e68(0xcb)][_0x5d8e68(0xc5)]),validateNotificationDeleteReadback(_0x123d0d,_0x1aced5[_0x5d8e68(0xd3)],_0x3ab56d['before'][_0x5d8e68(0xc5)]);}catch{throw notificationError(_0x1ef044?_0x5d8e68(0xc1):'notification_config_delete_verification_unavailable','Notification\x20config\x20'+_0x3ab56d['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x5d8e68(0xbf)+_0x336b98+_0x5d8e68(0xce));}if(_0x123d0d[_0x5d8e68(0xb9)](_0x33ee73=>_0x33ee73['id']===_0x3ab56d['id']))throw notificationError(_0x1ef044?_0x5d8e68(0xc1):_0x5d8e68(0xcc),'Notification\x20config\x20'+_0x3ab56d['id']+_0x5d8e68(0xbd),_0x5d8e68(0xbf)+_0x336b98+_0x5d8e68(0xce));const _0x4a48d2=[REFERENCE_WARNING];return _0x1ef044&&_0x4a48d2[_0x5d8e68(0xc0)](_0x5d8e68(0xc2)),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0x3ab56d[_0x5d8e68(0xcb)]),'before':projectNotificationConfig(_0x3ab56d[_0x5d8e68(0xcb)]),'after':null,'dryRun':![],'backend':{'method':_0x5d8e68(0xd2),'path':DELETE_PATH},'warnings':_0x4a48d2,'verification':{'status':_0x5d8e68(0xc9),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x1ef044,'lookupCommand':_0x336b98}},'message':'Deleted\x20notification\x20config\x20'+_0x3ab56d['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a194_0x3836(){const _0x3a16a2=['1132284BuKgrK','all','string','3eyRFDY','\x20notification\x20config(s)','2488576CBQeFD','40blaRqI','577086MCrFlu','Notification\x20channel\x20type','notification','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','map','appCode','9DIdZjy','config-list','bool','length','type','Found\x20','flat','boolean','trim','985726QKKxDb','592228HOGLDv','34623610SFyrVT','2162400SevAvx','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.'];a194_0x3836=function(){return _0x3a16a2;};return a194_0x3836();}const a194_0x5170e9=a194_0x4cdf;(function(_0x533ff4,_0xcfa3f9){const _0x25f5f5=a194_0x4cdf,_0x4cddd5=_0x533ff4();while(!![]){try{const _0x29c3db=-parseInt(_0x25f5f5(0x1a5))/0x1+-parseInt(_0x25f5f5(0x1a3))/0x2*(parseInt(_0x25f5f5(0x1a1))/0x3)+parseInt(_0x25f5f5(0x19a))/0x4+-parseInt(_0x25f5f5(0x19c))/0x5+parseInt(_0x25f5f5(0x19e))/0x6+parseInt(_0x25f5f5(0x199))/0x7*(-parseInt(_0x25f5f5(0x1a4))/0x8)+-parseInt(_0x25f5f5(0x190))/0x9*(-parseInt(_0x25f5f5(0x19b))/0xa);if(_0x29c3db===_0xcfa3f9)break;else _0x4cddd5['push'](_0x4cddd5['shift']());}catch(_0x578875){_0x4cddd5['push'](_0x4cddd5['shift']());}}}(a194_0x3836,0xcd5e4));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a194_0x4cdf(_0x9ce818,_0x377225){_0x9ce818=_0x9ce818-0x18b;const _0x3836c2=a194_0x3836();let _0x4cdf68=_0x3836c2[_0x9ce818];return _0x4cdf68;}import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a194_0x5170e9(0x18c),'command':a194_0x5170e9(0x191),'description':a194_0x5170e9(0x18d),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a194_0x5170e9(0x1a0),'description':a194_0x5170e9(0x18b),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a194_0x5170e9(0x19f),'type':a194_0x5170e9(0x197),'default':![],'description':'List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type'}],async 'validate'(_0x3b6a52){const _0x1f2c37=a194_0x5170e9;if(_0x3b6a52[_0x1f2c37(0x192)](_0x1f2c37(0x19f))&&_0x3b6a52['str'](_0x1f2c37(0x194))[_0x1f2c37(0x198)]())throw CliErrors['validation'](_0x1f2c37(0x19d),'Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.');if(_0x3b6a52[_0x1f2c37(0x192)]('all'))return;readNotificationChannelType(_0x3b6a52);},async 'execute'(_0x5994bf){const _0x251a3a=a194_0x5170e9;if(_0x5994bf[_0x251a3a(0x192)]('all')){const _0x282a57=await Promise['all'](NOTIFICATION_CHANNEL_TYPES['map'](_0x17d18c=>listNotificationChannelConfigs(_0x5994bf[_0x251a3a(0x18f)],_0x17d18c))),_0x55ea0d=_0x282a57[_0x251a3a(0x196)]()[_0x251a3a(0x18e)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5994bf[_0x251a3a(0x18f)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x55ea0d[_0x251a3a(0x193)],'configs':_0x55ea0d},'message':'Found\x20'+_0x55ea0d[_0x251a3a(0x193)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x3b6e2c=readNotificationChannelType(_0x5994bf),_0xb7df3e=await listNotificationChannelConfigs(_0x5994bf['appCode'],_0x3b6e2c),_0x5aac5c=_0xb7df3e[_0x251a3a(0x18e)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5994bf['appCode'],'channelType':_0x3b6e2c,'count':_0x5aac5c[_0x251a3a(0x193)],'configs':_0x5aac5c},'message':_0x251a3a(0x195)+_0x5aac5c[_0x251a3a(0x193)]+'\x20'+_0x3b6e2c+_0x251a3a(0x1a2)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a195_0x22e7(_0xcc3fb1,_0x563781){_0xcc3fb1=_0xcc3fb1-0xd2;const _0x248e8d=a195_0x248e();let _0x22e77d=_0x248e8d[_0xcc3fb1];return _0x22e77d;}const a195_0x3b5b55=a195_0x22e7;(function(_0x198c46,_0x42b4b4){const _0x163b10=a195_0x22e7,_0x4662ed=_0x198c46();while(!![]){try{const _0x16aee3=-parseInt(_0x163b10(0xd9))/0x1+-parseInt(_0x163b10(0xdd))/0x2+-parseInt(_0x163b10(0xf1))/0x3+parseInt(_0x163b10(0xf8))/0x4*(-parseInt(_0x163b10(0xed))/0x5)+-parseInt(_0x163b10(0xe2))/0x6*(-parseInt(_0x163b10(0xe3))/0x7)+-parseInt(_0x163b10(0xe0))/0x8*(parseInt(_0x163b10(0xdb))/0x9)+-parseInt(_0x163b10(0xd5))/0xa*(-parseInt(_0x163b10(0xe1))/0xb);if(_0x16aee3===_0x42b4b4)break;else _0x4662ed['push'](_0x4662ed['shift']());}catch(_0x4c021b){_0x4662ed['push'](_0x4662ed['shift']());}}}(a195_0x248e,0xba256));import{asDryRunResult}from'../../commands/common/dry-run.js';function a195_0x248e(){const _0x470dfb=['Inspect\x20ID\x20','before','10088QuKqaY','payload','Inspect\x20with\x20--id\x20','\x20via\x20','10WCwYMZ','allMatch','verified','update','1429093RIhDaj','channelType','585PsBWJk','high-risk-write','533370xonrbe','planned','patch','22440Tqvzfu','29529247TQRirp','42cWRQYX','1203041LqrTnL','Notification\x20config\x20','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','notification_config_update_outcome_unknown','/notification/channel-config/update',';\x20do\x20not\x20resubmit\x20automatically.','appCode','provesChange','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','POST','1535BUgwWd','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','notification_config_update_verification_unavailable','1418121lQSmAG','notification_config_update_verification_failed','mutation','notification','config-update'];a195_0x248e=function(){return _0x470dfb;};return a195_0x248e();}import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a195_0x3b5b55(0xe7);async function prepareUpdate(_0x38577c){const _0xfb0be1=a195_0x3b5b55,_0x46e658=readNotificationId(_0x38577c),_0x5a9142=await readNotificationDocument(_0x38577c,_0xfb0be1(0xd8)),_0x30d8f0=await requireExactNotificationConfig(_0x38577c[_0xfb0be1(0xe9)],_0x46e658,'update');return{'id':_0x46e658,'patch':_0x5a9142,'before':_0x30d8f0,'payload':mergeUpdateInput(_0x30d8f0,_0x5a9142),'planned':plannedUpdateProjection(_0x30d8f0,_0x5a9142)};}export const notificationConfigUpdate={'service':a195_0x3b5b55(0xf4),'command':a195_0x3b5b55(0xf5),'description':a195_0x3b5b55(0xeb),'risk':a195_0x3b5b55(0xdc),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4bc137){readNotificationId(_0x4bc137),assertSingleNotificationSource(_0x4bc137),requireNotificationExplicitYes(_0x4bc137);},async 'dryRun'(_0x4c54ca){const _0x165dbf=a195_0x3b5b55,_0x5bd462=await prepareUpdate(_0x4c54ca),_0x1336d2=notificationLookupCommand(_0x4c54ca[_0x165dbf(0xe9)],_0x5bd462[_0x165dbf(0xf7)][_0x165dbf(0xda)]);return asDryRunResult({'operation':_0x165dbf(0xd8),'selector':notificationSelector(_0x5bd462[_0x165dbf(0xf7)]),'before':projectNotificationConfig(_0x5bd462['before']),'after':_0x5bd462[_0x165dbf(0xde)],'dryRun':!![],'backend':{'method':_0x165dbf(0xec),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x165dbf(0xde),'lookupCommand':_0x1336d2}},{'method':_0x165dbf(0xec),'url':UPDATE_PATH});},async 'execute'(_0x190734){const _0x59f090=a195_0x3b5b55;requireNotificationExplicitYes(_0x190734);const _0x21d991=await prepareUpdate(_0x190734),_0x1593ec=notificationLookupCommand(_0x190734[_0x59f090(0xe9)],_0x21d991[_0x59f090(0xf7)]['channelType']);let _0x5db7ec=![];try{await updateNotificationChannelConfig(_0x21d991[_0x59f090(0xd2)]);}catch(_0x226ca6){if(!isPlatformTransportFailure(_0x226ca6))throw safeApiFailure(_0x59f090(0xd8),_0x59f090(0xf3),_0x59f090(0xf6)+_0x21d991['id']+'\x20with\x20'+_0x1593ec+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x5db7ec=!![];}let _0x1c7e56;try{const _0x3aded6=await getNotificationChannelConfig(_0x21d991['id'],_0x190734[_0x59f090(0xe9)]);_0x1c7e56=normalizeExactNotificationConfig(_0x3aded6,_0x21d991['id'],_0x190734[_0x59f090(0xe9)]);}catch{throw notificationError(_0x5db7ec?_0x59f090(0xe6):_0x59f090(0xf0),_0x59f090(0xe4)+_0x21d991['id']+_0x59f090(0xef),_0x59f090(0xd3)+_0x21d991['id']+_0x59f090(0xd4)+_0x1593ec+_0x59f090(0xe8));}const _0x43d2d5=requestedSafeFieldsMatch(_0x21d991[_0x59f090(0xf7)],_0x1c7e56,_0x21d991[_0x59f090(0xdf)]);if(!_0x43d2d5[_0x59f090(0xd6)]||_0x5db7ec&&!_0x43d2d5[_0x59f090(0xea)])throw notificationError(_0x5db7ec?'notification_config_update_outcome_unknown':_0x59f090(0xf2),_0x59f090(0xe4)+_0x21d991['id']+_0x59f090(0xe5),'Inspect\x20with\x20--id\x20'+_0x21d991['id']+'\x20via\x20'+_0x1593ec+_0x59f090(0xe8));const _0x4a43cf=_0x5db7ec?[_0x59f090(0xee)]:[];return{'ok':!![],'data':{'operation':_0x59f090(0xd8),'selector':notificationSelector(_0x1c7e56),'before':projectNotificationConfig(_0x21d991[_0x59f090(0xf7)]),'after':projectNotificationConfig(_0x1c7e56),'dryRun':![],'backend':{'method':_0x59f090(0xec),'path':UPDATE_PATH},'warnings':_0x4a43cf,'verification':{'status':_0x59f090(0xd7),'recoveredAfterUnknownResponse':_0x5db7ec,'verifiedFields':_0x43d2d5['verifiedFields'],'lookupCommand':_0x1593ec}},'message':'Updated\x20notification\x20config\x20'+_0x1c7e56['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a196_0x2aa8(){const _0x2cc680=['1366458wAHedP','4409909JZoJEG','103194FwDCjg','424602xuLipZ','372119TKXhCs','45gMPxYr','496952zTIFWP','162ZCFecd','8PTaUWm','723391YjPwKL','780PBFBJR'];a196_0x2aa8=function(){return _0x2cc680;};return a196_0x2aa8();}(function(_0x5b3398,_0x1d5ca5){const _0x247a9b=a196_0x2633,_0x4bfdc8=_0x5b3398();while(!![]){try{const _0xc1fb05=parseInt(_0x247a9b(0x186))/0x1+-parseInt(_0x247a9b(0x18b))/0x2+-parseInt(_0x247a9b(0x188))/0x3*(-parseInt(_0x247a9b(0x190))/0x4)+parseInt(_0x247a9b(0x18d))/0x5*(parseInt(_0x247a9b(0x18a))/0x6)+parseInt(_0x247a9b(0x189))/0x7+parseInt(_0x247a9b(0x18e))/0x8*(parseInt(_0x247a9b(0x18f))/0x9)+-parseInt(_0x247a9b(0x187))/0xa*(parseInt(_0x247a9b(0x18c))/0xb);if(_0xc1fb05===_0x1d5ca5)break;else _0x4bfdc8['push'](_0x4bfdc8['shift']());}catch(_0x3d8d8a){_0x4bfdc8['push'](_0x4bfdc8['shift']());}}}(a196_0x2aa8,0xa78f0));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a196_0x2633(_0xaf88cc,_0xfc5aed){_0xaf88cc=_0xaf88cc-0x186;const _0x2aa893=a196_0x2aa8();let _0x263386=_0x2aa893[_0xaf88cc];return _0x263386;}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a197_0x3c2664=a197_0x2402;(function(_0xc63f7,_0x260cb1){const _0x23c71f=a197_0x2402,_0x48f7eb=_0xc63f7();while(!![]){try{const _0x1cfcc8=parseInt(_0x23c71f(0xce))/0x1*(parseInt(_0x23c71f(0x106))/0x2)+-parseInt(_0x23c71f(0x11a))/0x3+-parseInt(_0x23c71f(0x127))/0x4*(-parseInt(_0x23c71f(0xd6))/0x5)+parseInt(_0x23c71f(0x141))/0x6*(-parseInt(_0x23c71f(0xc9))/0x7)+parseInt(_0x23c71f(0xda))/0x8+parseInt(_0x23c71f(0xf9))/0x9+-parseInt(_0x23c71f(0x146))/0xa;if(_0x1cfcc8===_0x260cb1)break;else _0x48f7eb['push'](_0x48f7eb['shift']());}catch(_0x3e98bd){_0x48f7eb['push'](_0x48f7eb['shift']());}}}(a197_0x5429,0x46ad9));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a197_0x3c2664(0xdd),'FEISHU','DINGTALK',a197_0x3c2664(0xe0),a197_0x3c2664(0x11e)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x3c2664(0xf5),'channelType',a197_0x3c2664(0xc7),a197_0x3c2664(0x129),a197_0x3c2664(0xf4),a197_0x3c2664(0x10d),a197_0x3c2664(0xd7)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x3c2664(0xdc),a197_0x3c2664(0x147),a197_0x3c2664(0x142)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x3c2664(0x116),a197_0x3c2664(0x148),a197_0x3c2664(0x104),'bccList',a197_0x3c2664(0x109),a197_0x3c2664(0x114),a197_0x3c2664(0xcb),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x3c2664(0xcd),'type':a197_0x3c2664(0x13a),'required':![],'description':a197_0x3c2664(0x12e)},{'name':a197_0x3c2664(0x13d),'type':a197_0x3c2664(0x115),'required':![],'default':![],'description':a197_0x3c2664(0xf7)},{'name':a197_0x3c2664(0x10e),'type':a197_0x3c2664(0x13a),'required':![],'description':a197_0x3c2664(0x12c)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x3c2664(0x125),'required':!![],'description':a197_0x3c2664(0x108)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x1bc036,_0x40f752,_0x60f46c){return new CliError(_0x1bc036,0x1,_0x40f752,_0x60f46c);}export function readNotificationId(_0x31c8bd){const _0xd75c9f=a197_0x3c2664,_0x3790b0=_0x31c8bd[_0xd75c9f(0xee)]('id');if(!Number['isSafeInteger'](_0x3790b0)||_0x3790b0<=0x0)throw notificationError(_0xd75c9f(0xcf),_0xd75c9f(0x131));return _0x3790b0;}export function requireNotificationExplicitYes(_0xb89736){const _0x378584=a197_0x3c2664;if(_0xb89736['bool'](_0x378584(0x10a))||_0xb89736['bool']('yes'))return;throw notificationError('notification_config_confirmation_required',_0x378584(0xf0),_0x378584(0x137));}export function readNotificationChannelType(_0x19844b,_0x42c263=a197_0x3c2664(0x136),_0x37d170=a197_0x3c2664(0xdd)){const _0x649c0b=a197_0x3c2664,_0x366c4c=_0x19844b[_0x649c0b(0xf6)](_0x42c263)[_0x649c0b(0x10b)]()||_0x37d170;if(!NOTIFICATION_CHANNEL_TYPES[_0x649c0b(0x128)](_0x366c4c))throw CliErrors[_0x649c0b(0xd5)]('Invalid\x20--'+_0x42c263+':\x20'+_0x366c4c,_0x649c0b(0x13c)+NOTIFICATION_CHANNEL_TYPES[_0x649c0b(0x132)](',\x20')+'.');return _0x366c4c;}export function assertSingleNotificationSource(_0x45cdde){const _0x5560f8=a197_0x3c2664,_0x352741=[],_0x359b85=_0x45cdde['str'](_0x5560f8(0xcd))['trim']();if(_0x359b85)_0x352741[_0x5560f8(0xed)]({'kind':'file','path':_0x359b85});if(_0x45cdde['bool'](_0x5560f8(0x13d)))_0x352741['push']({'kind':'stdin'});const _0x7dbf6b=_0x45cdde[_0x5560f8(0xf6)](_0x5560f8(0x10e))[_0x5560f8(0x10b)]();if(_0x7dbf6b)_0x352741[_0x5560f8(0xed)]({'kind':_0x5560f8(0x113),'name':_0x7dbf6b});if(_0x352741[_0x5560f8(0xe4)]===0x0)throw CliErrors[_0x5560f8(0xd5)](_0x5560f8(0x121),_0x5560f8(0xea));if(_0x352741[_0x5560f8(0xe4)]>0x1)throw CliErrors[_0x5560f8(0xd5)](_0x5560f8(0x118),_0x5560f8(0xea));return _0x352741[0x0];}export async function readNotificationDocument(_0x10b9d0,_0x596973){const _0x507bf0=a197_0x3c2664,_0x1dcf4d=assertSingleNotificationSource(_0x10b9d0),_0x540c89=_0x1dcf4d[_0x507bf0(0xe3)]==='file'?_0x507bf0(0x12b)+_0x1dcf4d['path']:_0x1dcf4d[_0x507bf0(0xe3)]===_0x507bf0(0x113)?_0x507bf0(0xf8)+_0x1dcf4d[_0x507bf0(0x111)]:'stdin';let _0x135cd6;try{if(_0x1dcf4d[_0x507bf0(0xe3)]===_0x507bf0(0xcd))_0x135cd6=await readFile(_0x1dcf4d[_0x507bf0(0xe1)],'utf8');else{if(_0x1dcf4d[_0x507bf0(0xe3)]===_0x507bf0(0x113)){if(!(_0x1dcf4d[_0x507bf0(0x111)]in process.env))throw notificationError(_0x507bf0(0x145),_0x507bf0(0x12a)+_0x1dcf4d['name']);_0x135cd6=process.env[_0x1dcf4d.name]??'';}else _0x135cd6=await readStdin();}}catch(_0x5aaf7d){if(_0x5aaf7d instanceof CliError)throw _0x5aaf7d;throw notificationError(_0x507bf0(0x145),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x540c89+'.');}let _0x48f12b;try{_0x48f12b=JSON[_0x507bf0(0x144)](_0x135cd6);}catch{throw notificationError(_0x507bf0(0x11d),'Notification\x20JSON\x20from\x20'+_0x540c89+_0x507bf0(0x139),_0x507bf0(0xe6));}if(!isJsonObject(_0x48f12b))throw notificationError(_0x507bf0(0x11d),_0x507bf0(0x138)+_0x540c89+_0x507bf0(0xd3));return validateNotificationDocument(_0x48f12b,_0x596973);}export function projectNotificationListConfig(_0x14b5cf,_0x22c5dc){const _0x1f2f78=a197_0x3c2664;return{'id':typeof _0x14b5cf['id']===_0x1f2f78(0x125)?_0x14b5cf['id']:null,'configCode':requireResponseString(_0x14b5cf[_0x1f2f78(0x147)],_0x1f2f78(0x147),_0x22c5dc),'configName':requireResponseString(_0x14b5cf[_0x1f2f78(0xf5)],_0x1f2f78(0xf5),_0x22c5dc),'channelType':requireResponseString(_0x14b5cf['channelType'],'channelType',_0x22c5dc),'description':normalizeNullableString(_0x14b5cf['description']),'createTime':normalizeNullableString(_0x14b5cf[_0x1f2f78(0xe2)]),'updateTime':normalizeNullableString(_0x14b5cf['updateTime'])};}function a197_0x5429(){const _0x54dc03=['Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','keys','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','push','num','apiError','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','\x20is\x20missing\x20required\x20field\x20\x22','notification_config_','notification_config_field_invalid','description','configName','str','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','environment\x20variable\x20','675675VmKxCi','\x20--type\x20','\x20has\x20invalid\x20field\x20\x22','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','endpointUrl:null','notification_config_field_unknown','Invalid\x20notification\x20config\x20response.','Notification\x20JSON\x20field\x20\x22','has','object','rabetbase\x20notification\x20config-list\x20--appcode\x20','ccList','\x22configName\x22.','2AeHvSP','\x20has\x20an\x20invalid\x20id.','Application-level\x20notification\x20config\x20ID','replyTo','dry-run','trim','\x22\x20cannot\x20exceed\x20','connectTimeout','from-env','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','failed','name','_unavailable','env','subjectPrefix','boolean','emailTargets','\x20has\x20an\x20invalid\x20channelType.','Notification\x20JSON\x20source\x20is\x20ambiguous.','endpointUrlRaw','359091lpCSin','a\x20JSON\x20object\x20or\x20null','Notification\x20JSON\x20channelConfig\x20field\x20\x22','notification_config_json_invalid','WEBHOOK','call','notification_config_update_empty','Missing\x20notification\x20JSON\x20source.','\x20has\x20an\x20unsupported\x20channelType.','notification_config_response_invalid','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','number','stringify','340mWndPb','includes','channelConfig','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','file\x20','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','a\x20non-empty\x20string','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','\x22\x20must\x20be\x20','messageTemplate','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','join','\x22\x20is\x20forbidden.','mutation','Notification\x20config\x20','type','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','Notification\x20JSON\x20from\x20','\x20is\x20invalid.','string','\x22channelType\x22.','Allowed\x20values:\x20','stdin','\x20has\x20an\x20invalid\x20appCode.','\x20characters.','create','93306KqOrjF','channelCode','a\x20string\x20or\x20null','parse','notification_config_source_unavailable','4292600LGyzRL','configCode','recipients','endpointUrl','notification_config_channel_field_forbidden','63AePzod','update','fromName','channelType','file','357928dhDCJW','notification_config_id_invalid','some','\x20failed.','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','\x20must\x20be\x20an\x20object.','\x22\x20must\x20be\x20a\x20non-empty\x20string.','validation','2475KNiLvj','readTimeout','Create\x20JSON\x20requires\x20field\x20','hasOwnProperty','4026680tBudJI','a\x20JSON\x20object','appCode','EMAIL','utf8','isSafeInteger','WECOM','path','createTime','kind','length','every','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','channelConfigRaw','notification_config_field_forbidden','notification_config_field_required'];a197_0x5429=function(){return _0x54dc03;};return a197_0x5429();}export function normalizeExactNotificationConfig(_0x548263,_0x3d5e51,_0x562738){const _0x3f63a7=a197_0x3c2664;if(!Number[_0x3f63a7(0xdf)](_0x548263['id'])||_0x548263['id']!==_0x3d5e51)throw notificationError('notification_config_response_invalid',_0x3f63a7(0x10f)+_0x3d5e51+'.');if(_0x548263['appCode']!==_0x562738)throw notificationError(_0x3f63a7(0x123),_0x3f63a7(0x135)+_0x3d5e51+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x5330ee=requireExactString(_0x548263[_0x3f63a7(0xf5)],_0x3f63a7(0xf5),_0x3d5e51),_0x2c7023=requireExactString(_0x548263[_0x3f63a7(0x147)],_0x3f63a7(0x147),_0x3d5e51),_0x2deb57=requireExactString(_0x548263[_0x3f63a7(0xcc)],_0x3f63a7(0xcc),_0x3d5e51);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x2deb57))throw notificationError(_0x3f63a7(0x123),_0x3f63a7(0x135)+_0x3d5e51+_0x3f63a7(0x122));const _0x52872a=responseNullableString(_0x548263[_0x3f63a7(0xc7)],_0x3f63a7(0xc7),_0x3d5e51),_0x4949a6=responseNullableString(_0x548263[_0x3f63a7(0x129)],_0x3f63a7(0x129),_0x3d5e51),_0x3b945b=responseNullableString(_0x548263['description'],_0x3f63a7(0xf4),_0x3d5e51),_0x4be527=responseNullableTimeout(_0x548263[_0x3f63a7(0x10d)],'connectTimeout',_0x3d5e51),_0xd0a4a7=responseNullableTimeout(_0x548263[_0x3f63a7(0xd7)],_0x3f63a7(0xd7),_0x3d5e51);return{'id':_0x3d5e51,'appCode':_0x562738,'configCode':_0x2c7023,'configName':_0x5330ee,'channelType':_0x2deb57,'endpointUrl':redactSensitive(_0x52872a),'channelConfig':redactSensitive(_0x4949a6),'description':_0x3b945b,'connectTimeout':_0x4be527,'readTimeout':_0xd0a4a7,'endpointUrlRaw':_0x52872a,'channelConfigRaw':_0x4949a6};}export async function requireExactNotificationConfig(_0x483dfb,_0x3b18c0,_0x3de9d8){const _0x2a877d=a197_0x3c2664;let _0x4c93f7;try{_0x4c93f7=await getNotificationChannelConfig(_0x3b18c0,_0x483dfb);}catch{throw safeApiFailure(_0x3de9d8,'preflight',_0x2a877d(0x124)+_0x483dfb+_0x2a877d(0xfc));}return normalizeExactNotificationConfig(_0x4c93f7,_0x3b18c0,_0x483dfb);}export function projectNotificationConfig(_0x192446){const _0x8d8b34=a197_0x3c2664;return{'id':_0x192446['id']??null,'appCode':_0x192446[_0x8d8b34(0xdc)],'configCode':_0x192446[_0x8d8b34(0x147)]??null,'configName':_0x192446[_0x8d8b34(0xf5)],'channelType':_0x192446[_0x8d8b34(0xcc)],'endpointUrl':redactSensitive(_0x192446['endpointUrl']),'channelConfig':redactSensitive(_0x192446[_0x8d8b34(0x129)]),'description':_0x192446[_0x8d8b34(0xf4)]??null,'connectTimeout':_0x192446['connectTimeout']??null,'readTimeout':_0x192446[_0x8d8b34(0xd7)]??null};}export function notificationSelector(_0x3b3473){const _0x3ea05a=a197_0x3c2664;return{'appCode':_0x3b3473[_0x3ea05a(0xdc)],'id':_0x3b3473['id'],'configCode':_0x3b3473[_0x3ea05a(0x147)],'configName':_0x3b3473[_0x3ea05a(0xf5)],'channelType':_0x3b3473['channelType']};}export function createMutationInput(_0x10fa9c,_0x43b446){const _0x3a341c=a197_0x3c2664;return{'appCode':_0x10fa9c,'configName':_0x43b446['configName'],'channelType':_0x43b446[_0x3a341c(0xcc)],...hasOwn(_0x43b446,_0x3a341c(0xc7))?{'endpointUrl':_0x43b446[_0x3a341c(0xc7)]}:{},...hasOwn(_0x43b446,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x43b446[_0x3a341c(0x129)])}:{},...hasOwn(_0x43b446,_0x3a341c(0xf4))?{'description':_0x43b446[_0x3a341c(0xf4)]}:{},...hasOwn(_0x43b446,_0x3a341c(0x10d))?{'connectTimeout':_0x43b446['connectTimeout']}:{},...hasOwn(_0x43b446,_0x3a341c(0xd7))?{'readTimeout':_0x43b446[_0x3a341c(0xd7)]}:{}};}function a197_0x2402(_0x1b001b,_0x5eeddb){_0x1b001b=_0x1b001b-0xc7;const _0x54290d=a197_0x5429();let _0x240268=_0x54290d[_0x1b001b];return _0x240268;}export function mergeUpdateInput(_0x5963e4,_0x2badc2){const _0x275f14=a197_0x3c2664;return{'id':_0x5963e4['id'],'appCode':_0x5963e4['appCode'],'configName':_0x2badc2[_0x275f14(0xf5)]??_0x5963e4[_0x275f14(0xf5)],'channelType':_0x2badc2['channelType']??_0x5963e4[_0x275f14(0xcc)],'endpointUrl':hasOwn(_0x2badc2,'endpointUrl')?_0x2badc2[_0x275f14(0xc7)]:_0x5963e4[_0x275f14(0x119)],'channelConfig':hasOwn(_0x2badc2,_0x275f14(0x129))?serializeChannelConfig(_0x2badc2[_0x275f14(0x129)]):_0x5963e4[_0x275f14(0xe7)],'description':hasOwn(_0x2badc2,_0x275f14(0xf4))?_0x2badc2[_0x275f14(0xf4)]:_0x5963e4[_0x275f14(0xf4)],'connectTimeout':hasOwn(_0x2badc2,_0x275f14(0x10d))?_0x2badc2[_0x275f14(0x10d)]:_0x5963e4[_0x275f14(0x10d)],'readTimeout':hasOwn(_0x2badc2,_0x275f14(0xd7))?_0x2badc2['readTimeout']:_0x5963e4[_0x275f14(0xd7)]};}export function plannedUpdateProjection(_0xe8a1c5,_0x31cf5c){const _0x152e24=a197_0x3c2664;return projectNotificationConfig({'id':_0xe8a1c5['id'],'appCode':_0xe8a1c5['appCode'],'configCode':_0xe8a1c5[_0x152e24(0x147)],'configName':_0x31cf5c['configName']??_0xe8a1c5[_0x152e24(0xf5)],'channelType':_0x31cf5c['channelType']??_0xe8a1c5[_0x152e24(0xcc)],'endpointUrl':hasOwn(_0x31cf5c,_0x152e24(0xc7))?_0x31cf5c[_0x152e24(0xc7)]:_0xe8a1c5['endpointUrlRaw'],'channelConfig':hasOwn(_0x31cf5c,_0x152e24(0x129))?_0x31cf5c[_0x152e24(0x129)]:_0xe8a1c5['channelConfigRaw'],'description':hasOwn(_0x31cf5c,_0x152e24(0xf4))?_0x31cf5c[_0x152e24(0xf4)]:_0xe8a1c5[_0x152e24(0xf4)],'connectTimeout':hasOwn(_0x31cf5c,_0x152e24(0x10d))?_0x31cf5c[_0x152e24(0x10d)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0xe8a1c5[_0x152e24(0x10d)],'readTimeout':hasOwn(_0x31cf5c,_0x152e24(0xd7))?_0x31cf5c[_0x152e24(0xd7)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0xe8a1c5[_0x152e24(0xd7)]});}export function requestedSafeFieldsMatch(_0x557e4c,_0x8f3e3a,_0x3cd223){const _0x2b3424=a197_0x3c2664,_0x10f6ab=[],_0x58d112=[],_0xcc77d5=[];for(const _0x5259eb of[_0x2b3424(0xf5),_0x2b3424(0xcc),_0x2b3424(0xf4)]){if(!hasOwn(_0x3cd223,_0x5259eb))continue;_0xcc77d5[_0x2b3424(0xed)](_0x5259eb),_0x10f6ab[_0x2b3424(0xed)](_0x8f3e3a[_0x5259eb]===_0x3cd223[_0x5259eb]),_0x58d112[_0x2b3424(0xed)](_0x557e4c[_0x5259eb]!==_0x3cd223[_0x5259eb]&&_0x8f3e3a[_0x5259eb]===_0x3cd223[_0x5259eb]);}for(const _0x5e6bd8 of['connectTimeout','readTimeout']){if(!hasOwn(_0x3cd223,_0x5e6bd8))continue;const _0x567833=_0x3cd223[_0x5e6bd8]??(_0x5e6bd8===_0x2b3424(0x10d)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0xcc77d5[_0x2b3424(0xed)](_0x5e6bd8),_0x10f6ab[_0x2b3424(0xed)](_0x8f3e3a[_0x5e6bd8]===_0x567833),_0x58d112[_0x2b3424(0xed)](_0x557e4c[_0x5e6bd8]!==_0x567833&&_0x8f3e3a[_0x5e6bd8]===_0x567833);}return hasOwn(_0x3cd223,_0x2b3424(0xc7))&&_0x3cd223['endpointUrl']===null&&(_0xcc77d5['push'](_0x2b3424(0xfd)),_0x10f6ab['push'](_0x8f3e3a['endpointUrlRaw']===null||_0x8f3e3a[_0x2b3424(0x119)]===''),_0x58d112[_0x2b3424(0xed)](_0x557e4c[_0x2b3424(0x119)]!==null&&_0x557e4c[_0x2b3424(0x119)]!==''&&(_0x8f3e3a['endpointUrlRaw']===null||_0x8f3e3a[_0x2b3424(0x119)]===''))),{'allMatch':_0x10f6ab[_0x2b3424(0xe5)](Boolean),'provesChange':_0x58d112[_0x2b3424(0xd0)](Boolean),'verifiedFields':_0xcc77d5};}export function validateNotificationDeleteReadback(_0xcb6224,_0x49376d,_0x4d2d32){const _0x4eec23=a197_0x3c2664;for(const [_0x513638,_0x540e8f]of _0xcb6224['entries']()){if(!Number['isSafeInteger'](_0x540e8f['id'])||_0x540e8f['id']<=0x0)throw notificationError(_0x4eec23(0x123),'Notification\x20config\x20list\x20item\x20'+(_0x513638+0x1)+_0x4eec23(0x107));if(_0x540e8f[_0x4eec23(0xdc)]!==_0x49376d)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x513638+0x1)+_0x4eec23(0x13e));if(_0x540e8f['channelType']!==_0x4d2d32)throw notificationError(_0x4eec23(0x123),'Notification\x20config\x20list\x20item\x20'+(_0x513638+0x1)+_0x4eec23(0x117));}}export function safeApiFailure(_0x1e661e,_0x2d4f3d,_0x34c2c2){const _0x4ae5e0=a197_0x3c2664;return notificationError(_0x4ae5e0(0xf2)+_0x1e661e+'_'+(_0x2d4f3d===_0x4ae5e0(0x134)?_0x4ae5e0(0x110):_0x2d4f3d+_0x4ae5e0(0x112)),'Notification\x20config\x20'+_0x1e661e+'\x20'+_0x2d4f3d+_0x4ae5e0(0xd1),_0x34c2c2);}export function notificationLookupCommand(_0x1bf70b,_0x3291c1){const _0x11f638=a197_0x3c2664;return _0x11f638(0x103)+_0x1bf70b+_0x11f638(0xfa)+_0x3291c1+'\x20--format\x20compress';}function validateNotificationDocument(_0x189d74,_0xe5904a){const _0x2edd19=a197_0x3c2664;for(const _0x30af0a of Object[_0x2edd19(0xeb)](_0x189d74)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x30af0a))throw notificationError(_0x2edd19(0xe8),_0x2edd19(0x100)+_0x30af0a+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x2edd19(0x101)](_0x30af0a))throw notificationError(_0x2edd19(0xfe),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x30af0a+'\x22.');}if(_0xe5904a===_0x2edd19(0xca)&&Object[_0x2edd19(0xeb)](_0x189d74)[_0x2edd19(0xe4)]===0x0)throw notificationError(_0x2edd19(0x120),_0x2edd19(0xd2));const _0x492662={};if(hasOwn(_0x189d74,_0x2edd19(0xf5)))_0x492662['configName']=validateRequiredString(_0x189d74[_0x2edd19(0xf5)],_0x2edd19(0xf5),0x80);else{if(_0xe5904a===_0x2edd19(0x140))throw notificationError(_0x2edd19(0xe9),_0x2edd19(0xd8)+_0x2edd19(0x105));}if(hasOwn(_0x189d74,_0x2edd19(0xcc))){if(typeof _0x189d74[_0x2edd19(0xcc)]!==_0x2edd19(0x13a))throw invalidFieldType(_0x2edd19(0xcc),'a\x20supported\x20string');const _0x218f43=_0x189d74['channelType']['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x2edd19(0x128)](_0x218f43))throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x2edd19(0x13c)+NOTIFICATION_CHANNEL_TYPES[_0x2edd19(0x132)](',\x20')+'.');_0x492662['channelType']=_0x218f43;}else{if(_0xe5904a==='create')throw notificationError(_0x2edd19(0xe9),_0x2edd19(0xd8)+_0x2edd19(0x13b));}for(const [_0xa39bee,_0x35d3f0]of[[_0x2edd19(0xc7),0x200],[_0x2edd19(0xf4),0x100]]){if(!hasOwn(_0x189d74,_0xa39bee))continue;const _0x2da828=_0x189d74[_0xa39bee];if(_0x2da828!==null&&typeof _0x2da828!==_0x2edd19(0x13a))throw invalidFieldType(_0xa39bee,_0x2edd19(0x143));if(typeof _0x2da828===_0x2edd19(0x13a)&&_0x2da828['length']>_0x35d3f0)throw notificationError(_0x2edd19(0xf3),_0x2edd19(0x100)+_0xa39bee+_0x2edd19(0x10c)+_0x35d3f0+_0x2edd19(0x13f));_0x492662[_0xa39bee]=_0x2da828;}if(hasOwn(_0x189d74,_0x2edd19(0x129))){const _0x4a0690=_0x189d74[_0x2edd19(0x129)];if(_0x4a0690===null&&_0xe5904a===_0x2edd19(0x140))throw invalidFieldType(_0x2edd19(0x129),_0x2edd19(0xdb));if(_0x4a0690!==null&&!isJsonObject(_0x4a0690))throw invalidFieldType(_0x2edd19(0x129),_0xe5904a===_0x2edd19(0xca)?_0x2edd19(0x11b):_0x2edd19(0xdb));_0x4a0690!==null&&validateChannelConfigFields(_0x492662['channelType'],_0x4a0690),_0x492662[_0x2edd19(0x129)]=_0x4a0690;}for(const _0xc8aebf of['connectTimeout',_0x2edd19(0xd7)]){if(!hasOwn(_0x189d74,_0xc8aebf))continue;const _0x32d22a=_0x189d74[_0xc8aebf];if(_0x32d22a!==null&&(!Number[_0x2edd19(0xdf)](_0x32d22a)||_0x32d22a<0x0))throw notificationError(_0x2edd19(0xf3),_0x2edd19(0x100)+_0xc8aebf+_0x2edd19(0xec));_0x492662[_0xc8aebf]=_0x32d22a;}return _0x492662;}function validateRequiredString(_0x51434c,_0x17fa32,_0x13cf73){const _0x381606=a197_0x3c2664;if(typeof _0x51434c!==_0x381606(0x13a))throw invalidFieldType(_0x17fa32,_0x381606(0x12d));const _0xe51ee5=_0x51434c['trim']();if(!_0xe51ee5)throw notificationError(_0x381606(0xf3),_0x381606(0x100)+_0x17fa32+_0x381606(0xd4));if(_0xe51ee5[_0x381606(0xe4)]>_0x13cf73)throw notificationError(_0x381606(0xf3),_0x381606(0x100)+_0x17fa32+_0x381606(0x10c)+_0x13cf73+_0x381606(0x13f));return _0xe51ee5;}function validateChannelConfigFields(_0x2397e1,_0x18fb84){const _0x477db5=a197_0x3c2664;if(hasOwn(_0x18fb84,_0x477db5(0x130)))throw forbiddenChannelConfigField('messageTemplate');if(_0x2397e1===_0x477db5(0xdd))for(const _0x2a3dac of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x18fb84,_0x2a3dac))throw forbiddenChannelConfigField(_0x2a3dac);}}function forbiddenChannelConfigField(_0x589a07){const _0xd89c21=a197_0x3c2664;return notificationError(_0xd89c21(0xc8),_0xd89c21(0x11c)+_0x589a07+_0xd89c21(0x133));}function invalidFieldType(_0x4a5df5,_0x1ffb89){const _0x5c6357=a197_0x3c2664;return notificationError(_0x5c6357(0xf3),_0x5c6357(0x100)+_0x4a5df5+_0x5c6357(0x12f)+_0x1ffb89+'.');}function serializeChannelConfig(_0x3aa15b){const _0x29a963=a197_0x3c2664;return _0x3aa15b===null||_0x3aa15b===undefined?null:JSON[_0x29a963(0x126)](_0x3aa15b);}function redactSensitive(_0xe082b8){return _0xe082b8===null||_0xe082b8===undefined||_0xe082b8===''?null:'<redacted>';}function requireResponseString(_0x58eedf,_0x3a9d0f,_0x8cad46){const _0x2d4b87=a197_0x3c2664;if(typeof _0x58eedf!==_0x2d4b87(0x13a)||_0x58eedf[_0x2d4b87(0x10b)]()==='')throw CliErrors[_0x2d4b87(0xef)](_0x2d4b87(0xff),'Item\x20'+(_0x8cad46+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x3a9d0f+'\x22.');return _0x58eedf[_0x2d4b87(0x10b)]();}function requireExactString(_0xc9744a,_0x3405a1,_0x1729c8){const _0x43dfe8=a197_0x3c2664;if(typeof _0xc9744a!==_0x43dfe8(0x13a)||_0xc9744a[_0x43dfe8(0x10b)]()==='')throw notificationError(_0x43dfe8(0x123),_0x43dfe8(0x135)+_0x1729c8+_0x43dfe8(0xf1)+_0x3405a1+'\x22.');return _0xc9744a[_0x43dfe8(0x10b)]();}function responseNullableString(_0x520e29,_0x207464,_0x225162){const _0x2e9b81=a197_0x3c2664;if(_0x520e29===undefined||_0x520e29===null)return null;if(typeof _0x520e29!==_0x2e9b81(0x13a))throw notificationError(_0x2e9b81(0x123),_0x2e9b81(0x135)+_0x225162+_0x2e9b81(0xfb)+_0x207464+'\x22.');return _0x520e29;}function responseNullableTimeout(_0x2d191f,_0x52784a,_0x8f2d9){const _0x7baf26=a197_0x3c2664;if(_0x2d191f===undefined||_0x2d191f===null)return null;if(!Number[_0x7baf26(0xdf)](_0x2d191f)||_0x2d191f<0x0)throw notificationError(_0x7baf26(0x123),_0x7baf26(0x135)+_0x8f2d9+_0x7baf26(0xfb)+_0x52784a+'\x22.');return _0x2d191f;}function normalizeNullableString(_0x4aec96){const _0x45e4f8=a197_0x3c2664;return typeof _0x4aec96===_0x45e4f8(0x13a)?_0x4aec96:null;}function isJsonObject(_0x3a11e5){const _0x4ce05c=a197_0x3c2664;return _0x3a11e5!==null&&typeof _0x3a11e5===_0x4ce05c(0x102)&&!Array['isArray'](_0x3a11e5);}function hasOwn(_0x18fd1b,_0x5993a2){const _0x11e1c9=a197_0x3c2664;return Object['prototype'][_0x11e1c9(0xd9)][_0x11e1c9(0x11f)](_0x18fd1b,_0x5993a2);}async function readStdin(){const _0x4beda0=a197_0x3c2664;let _0x50d759='';process[_0x4beda0(0x13d)]['setEncoding'](_0x4beda0(0xde));for await(const _0x28b3df of process[_0x4beda0(0x13d)])_0x50d759+=_0x28b3df;return _0x50d759;}
|
|
1
|
+
const a197_0x41795d=a197_0x46fb;(function(_0x55d60e,_0x5d7e8e){const _0x27b46a=a197_0x46fb,_0x2c40a9=_0x55d60e();while(!![]){try{const _0x433950=parseInt(_0x27b46a(0x176))/0x1*(parseInt(_0x27b46a(0x1cb))/0x2)+parseInt(_0x27b46a(0x18c))/0x3+parseInt(_0x27b46a(0x1aa))/0x4+-parseInt(_0x27b46a(0x199))/0x5*(parseInt(_0x27b46a(0x16d))/0x6)+-parseInt(_0x27b46a(0x1c7))/0x7+-parseInt(_0x27b46a(0x196))/0x8+parseInt(_0x27b46a(0x1b8))/0x9*(-parseInt(_0x27b46a(0x175))/0xa);if(_0x433950===_0x5d7e8e)break;else _0x2c40a9['push'](_0x2c40a9['shift']());}catch(_0x2d1e5c){_0x2c40a9['push'](_0x2c40a9['shift']());}}}(a197_0x5280,0xf1799));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a197_0x41795d(0x1a3),'FEISHU',a197_0x41795d(0x163),a197_0x41795d(0x1c2),a197_0x41795d(0x1a1)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x41795d(0x198),a197_0x41795d(0x1a4),'endpointUrl',a197_0x41795d(0x166),'description',a197_0x41795d(0x15c),a197_0x41795d(0x1c6)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x41795d(0x177),a197_0x41795d(0x19e),a197_0x41795d(0x18b)]),EMAIL_RECIPIENT_FIELDS=new Set(['emailTargets',a197_0x41795d(0x167),a197_0x41795d(0x159),a197_0x41795d(0x14e),a197_0x41795d(0x178),'subjectPrefix',a197_0x41795d(0x1b2),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x41795d(0x150),'type':a197_0x41795d(0x1a8),'required':![],'description':a197_0x41795d(0x155)},{'name':'stdin','type':a197_0x41795d(0x16e),'required':![],'default':![],'description':a197_0x41795d(0x185)},{'name':'from-env','type':a197_0x41795d(0x1a8),'required':![],'description':a197_0x41795d(0x19b)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x41795d(0x195),'required':!![],'description':a197_0x41795d(0x1ac)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x2d0865,_0x1204dd,_0x7677e1){return new CliError(_0x2d0865,0x1,_0x1204dd,_0x7677e1);}export function readNotificationId(_0x5b82d5){const _0x181c0e=a197_0x41795d,_0x34512b=_0x5b82d5[_0x181c0e(0x1a7)]('id');if(!Number['isSafeInteger'](_0x34512b)||_0x34512b<=0x0)throw notificationError(_0x181c0e(0x16c),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x34512b;}export function requireNotificationExplicitYes(_0x345755){const _0x19ac48=a197_0x41795d;if(_0x345755[_0x19ac48(0x160)](_0x19ac48(0x15a))||_0x345755[_0x19ac48(0x160)](_0x19ac48(0x19d)))return;throw notificationError(_0x19ac48(0x169),_0x19ac48(0x1c0),_0x19ac48(0x187));}export function readNotificationChannelType(_0x5b83f9,_0x471631=a197_0x41795d(0x174),_0x5833f7=a197_0x41795d(0x1a3)){const _0x1860cd=a197_0x41795d,_0x5501dc=_0x5b83f9[_0x1860cd(0x170)](_0x471631)[_0x1860cd(0x17c)]()||_0x5833f7;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x5501dc))throw CliErrors[_0x1860cd(0x171)](_0x1860cd(0x1be)+_0x471631+':\x20'+_0x5501dc,_0x1860cd(0x1af)+NOTIFICATION_CHANNEL_TYPES[_0x1860cd(0x18f)](',\x20')+'.');return _0x5501dc;}export function assertSingleNotificationSource(_0x29222d){const _0x28cbf8=a197_0x41795d,_0x2fb1bf=[],_0x5a5261=_0x29222d[_0x28cbf8(0x170)](_0x28cbf8(0x150))['trim']();if(_0x5a5261)_0x2fb1bf[_0x28cbf8(0x162)]({'kind':'file','path':_0x5a5261});if(_0x29222d['bool'](_0x28cbf8(0x18e)))_0x2fb1bf[_0x28cbf8(0x162)]({'kind':'stdin'});const _0x19f58d=_0x29222d['str']('from-env')[_0x28cbf8(0x17c)]();if(_0x19f58d)_0x2fb1bf[_0x28cbf8(0x162)]({'kind':_0x28cbf8(0x1c9),'name':_0x19f58d});if(_0x2fb1bf['length']===0x0)throw CliErrors[_0x28cbf8(0x171)]('Missing\x20notification\x20JSON\x20source.',_0x28cbf8(0x1c1));if(_0x2fb1bf[_0x28cbf8(0x1ad)]>0x1)throw CliErrors[_0x28cbf8(0x171)](_0x28cbf8(0x153),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x2fb1bf[0x0];}export async function readNotificationDocument(_0x1b311b,_0x5da2de){const _0x2170f4=a197_0x41795d,_0x48af3b=assertSingleNotificationSource(_0x1b311b),_0x15c956=_0x48af3b[_0x2170f4(0x184)]===_0x2170f4(0x150)?_0x2170f4(0x156)+_0x48af3b[_0x2170f4(0x1ca)]:_0x48af3b[_0x2170f4(0x184)]===_0x2170f4(0x1c9)?_0x2170f4(0x1b1)+_0x48af3b[_0x2170f4(0x17a)]:_0x2170f4(0x18e);let _0x37631c;try{if(_0x48af3b[_0x2170f4(0x184)]===_0x2170f4(0x150))_0x37631c=await readFile(_0x48af3b['path'],_0x2170f4(0x1a6));else{if(_0x48af3b[_0x2170f4(0x184)]==='env'){if(!(_0x48af3b[_0x2170f4(0x17a)]in process.env))throw notificationError('notification_config_source_unavailable',_0x2170f4(0x168)+_0x48af3b[_0x2170f4(0x17a)]);_0x37631c=process.env[_0x48af3b.name]??'';}else _0x37631c=await readStdin();}}catch(_0x4b56a4){if(_0x4b56a4 instanceof CliError)throw _0x4b56a4;throw notificationError(_0x2170f4(0x183),_0x2170f4(0x14f)+_0x15c956+'.');}let _0xbe5036;try{_0xbe5036=JSON[_0x2170f4(0x19f)](_0x37631c);}catch{throw notificationError(_0x2170f4(0x15f),_0x2170f4(0x1bf)+_0x15c956+_0x2170f4(0x193),_0x2170f4(0x161));}if(!isJsonObject(_0xbe5036))throw notificationError('notification_config_json_invalid',_0x2170f4(0x1bf)+_0x15c956+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0xbe5036,_0x5da2de);}export function projectNotificationListConfig(_0x214a5e,_0x5e49ba){const _0x2e3d53=a197_0x41795d;return{'id':typeof _0x214a5e['id']==='number'?_0x214a5e['id']:null,'configCode':requireResponseString(_0x214a5e['configCode'],_0x2e3d53(0x19e),_0x5e49ba),'configName':requireResponseString(_0x214a5e[_0x2e3d53(0x198)],_0x2e3d53(0x198),_0x5e49ba),'channelType':requireResponseString(_0x214a5e[_0x2e3d53(0x1a4)],_0x2e3d53(0x1a4),_0x5e49ba),'description':normalizeNullableString(_0x214a5e[_0x2e3d53(0x14b)]),'createTime':normalizeNullableString(_0x214a5e[_0x2e3d53(0x1b6)]),'updateTime':normalizeNullableString(_0x214a5e[_0x2e3d53(0x1b0)])};}export function normalizeExactNotificationConfig(_0x549c0c,_0x362618,_0x6b4140){const _0x1627d1=a197_0x41795d;if(!Number[_0x1627d1(0x1c5)](_0x549c0c['id'])||_0x549c0c['id']!==_0x362618)throw notificationError(_0x1627d1(0x1bd),_0x1627d1(0x1ae)+_0x362618+'.');if(_0x549c0c[_0x1627d1(0x177)]!==_0x6b4140)throw notificationError('notification_config_response_invalid',_0x1627d1(0x197)+_0x362618+_0x1627d1(0x17f));const _0xb8168a=requireExactString(_0x549c0c[_0x1627d1(0x198)],_0x1627d1(0x198),_0x362618),_0x4a8348=requireExactString(_0x549c0c[_0x1627d1(0x19e)],_0x1627d1(0x19e),_0x362618),_0x128109=requireExactString(_0x549c0c['channelType'],_0x1627d1(0x1a4),_0x362618);if(!NOTIFICATION_CHANNEL_TYPES[_0x1627d1(0x181)](_0x128109))throw notificationError('notification_config_response_invalid',_0x1627d1(0x197)+_0x362618+_0x1627d1(0x172));const _0x4edfb3=responseNullableString(_0x549c0c[_0x1627d1(0x1a5)],_0x1627d1(0x1a5),_0x362618),_0x4c6fd2=responseNullableString(_0x549c0c['channelConfig'],'channelConfig',_0x362618),_0x1d2128=responseNullableString(_0x549c0c[_0x1627d1(0x14b)],_0x1627d1(0x14b),_0x362618),_0x4a3691=responseNullableTimeout(_0x549c0c[_0x1627d1(0x15c)],'connectTimeout',_0x362618),_0x39de41=responseNullableTimeout(_0x549c0c[_0x1627d1(0x1c6)],_0x1627d1(0x1c6),_0x362618);return{'id':_0x362618,'appCode':_0x6b4140,'configCode':_0x4a8348,'configName':_0xb8168a,'channelType':_0x128109,'endpointUrl':redactSensitive(_0x4edfb3),'channelConfig':redactSensitive(_0x4c6fd2),'description':_0x1d2128,'connectTimeout':_0x4a3691,'readTimeout':_0x39de41,'endpointUrlRaw':_0x4edfb3,'channelConfigRaw':_0x4c6fd2};}export async function requireExactNotificationConfig(_0x4b601b,_0x5c8e4d,_0x19e6ed){const _0x236ce9=a197_0x41795d;let _0x15d303;try{_0x15d303=await getNotificationChannelConfig(_0x5c8e4d,_0x4b601b);}catch{throw safeApiFailure(_0x19e6ed,_0x236ce9(0x14c),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x4b601b+_0x236ce9(0x18a));}return normalizeExactNotificationConfig(_0x15d303,_0x5c8e4d,_0x4b601b);}export function projectNotificationConfig(_0x5d6c77){const _0x2579ea=a197_0x41795d;return{'id':_0x5d6c77['id']??null,'appCode':_0x5d6c77['appCode'],'configCode':_0x5d6c77['configCode']??null,'configName':_0x5d6c77['configName'],'channelType':_0x5d6c77[_0x2579ea(0x1a4)],'endpointUrl':redactSensitive(_0x5d6c77[_0x2579ea(0x1a5)]),'channelConfig':redactSensitive(_0x5d6c77[_0x2579ea(0x166)]),'description':_0x5d6c77[_0x2579ea(0x14b)]??null,'connectTimeout':_0x5d6c77[_0x2579ea(0x15c)]??null,'readTimeout':_0x5d6c77[_0x2579ea(0x1c6)]??null};}export function notificationSelector(_0x368c26){const _0x42cd3f=a197_0x41795d;return{'appCode':_0x368c26[_0x42cd3f(0x177)],'id':_0x368c26['id'],'configCode':_0x368c26['configCode'],'configName':_0x368c26['configName'],'channelType':_0x368c26[_0x42cd3f(0x1a4)]};}export function createMutationInput(_0x4f1e6b,_0x4b5c92){const _0x209755=a197_0x41795d;return{'appCode':_0x4f1e6b,'configName':_0x4b5c92[_0x209755(0x198)],'channelType':_0x4b5c92[_0x209755(0x1a4)],...hasOwn(_0x4b5c92,'endpointUrl')?{'endpointUrl':_0x4b5c92[_0x209755(0x1a5)]}:{},...hasOwn(_0x4b5c92,_0x209755(0x166))?{'channelConfig':serializeChannelConfig(_0x4b5c92[_0x209755(0x166)])}:{},...hasOwn(_0x4b5c92,'description')?{'description':_0x4b5c92[_0x209755(0x14b)]}:{},...hasOwn(_0x4b5c92,'connectTimeout')?{'connectTimeout':_0x4b5c92[_0x209755(0x15c)]}:{},...hasOwn(_0x4b5c92,_0x209755(0x1c6))?{'readTimeout':_0x4b5c92[_0x209755(0x1c6)]}:{}};}function a197_0x46fb(_0x36859b,_0x539fb1){_0x36859b=_0x36859b-0x14b;const _0x5280a1=a197_0x5280();let _0x46fbe8=_0x5280a1[_0x36859b];return _0x46fbe8;}export function mergeUpdateInput(_0x4683ae,_0x85ddf8){const _0x398a1e=a197_0x41795d;return{'id':_0x4683ae['id'],'appCode':_0x4683ae['appCode'],'configName':_0x85ddf8[_0x398a1e(0x198)]??_0x4683ae[_0x398a1e(0x198)],'channelType':_0x85ddf8['channelType']??_0x4683ae[_0x398a1e(0x1a4)],'endpointUrl':hasOwn(_0x85ddf8,_0x398a1e(0x1a5))?_0x85ddf8[_0x398a1e(0x1a5)]:_0x4683ae[_0x398a1e(0x164)],'channelConfig':hasOwn(_0x85ddf8,_0x398a1e(0x166))?serializeChannelConfig(_0x85ddf8[_0x398a1e(0x166)]):_0x4683ae[_0x398a1e(0x173)],'description':hasOwn(_0x85ddf8,_0x398a1e(0x14b))?_0x85ddf8['description']:_0x4683ae['description'],'connectTimeout':hasOwn(_0x85ddf8,_0x398a1e(0x15c))?_0x85ddf8['connectTimeout']:_0x4683ae['connectTimeout'],'readTimeout':hasOwn(_0x85ddf8,'readTimeout')?_0x85ddf8[_0x398a1e(0x1c6)]:_0x4683ae['readTimeout']};}export function plannedUpdateProjection(_0x4baea2,_0x253138){const _0x95066f=a197_0x41795d;return projectNotificationConfig({'id':_0x4baea2['id'],'appCode':_0x4baea2[_0x95066f(0x177)],'configCode':_0x4baea2[_0x95066f(0x19e)],'configName':_0x253138[_0x95066f(0x198)]??_0x4baea2[_0x95066f(0x198)],'channelType':_0x253138['channelType']??_0x4baea2[_0x95066f(0x1a4)],'endpointUrl':hasOwn(_0x253138,_0x95066f(0x1a5))?_0x253138['endpointUrl']:_0x4baea2[_0x95066f(0x164)],'channelConfig':hasOwn(_0x253138,_0x95066f(0x166))?_0x253138[_0x95066f(0x166)]:_0x4baea2['channelConfigRaw'],'description':hasOwn(_0x253138,_0x95066f(0x14b))?_0x253138[_0x95066f(0x14b)]:_0x4baea2[_0x95066f(0x14b)],'connectTimeout':hasOwn(_0x253138,_0x95066f(0x15c))?_0x253138[_0x95066f(0x15c)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x4baea2['connectTimeout'],'readTimeout':hasOwn(_0x253138,_0x95066f(0x1c6))?_0x253138[_0x95066f(0x1c6)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x4baea2[_0x95066f(0x1c6)]});}export function requestedSafeFieldsMatch(_0x3e258f,_0x2dacb2,_0x13795c){const _0x19f83c=a197_0x41795d,_0x5137a9=[],_0x25f0f8=[],_0x21f084=[];for(const _0x4821e9 of[_0x19f83c(0x198),_0x19f83c(0x1a4),_0x19f83c(0x14b)]){if(!hasOwn(_0x13795c,_0x4821e9))continue;_0x21f084['push'](_0x4821e9),_0x5137a9[_0x19f83c(0x162)](_0x2dacb2[_0x4821e9]===_0x13795c[_0x4821e9]),_0x25f0f8['push'](_0x3e258f[_0x4821e9]!==_0x13795c[_0x4821e9]&&_0x2dacb2[_0x4821e9]===_0x13795c[_0x4821e9]);}for(const _0x1c0d1c of['connectTimeout',_0x19f83c(0x1c6)]){if(!hasOwn(_0x13795c,_0x1c0d1c))continue;const _0x36a5f8=_0x13795c[_0x1c0d1c]??(_0x1c0d1c===_0x19f83c(0x15c)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x21f084[_0x19f83c(0x162)](_0x1c0d1c),_0x5137a9['push'](_0x2dacb2[_0x1c0d1c]===_0x36a5f8),_0x25f0f8[_0x19f83c(0x162)](_0x3e258f[_0x1c0d1c]!==_0x36a5f8&&_0x2dacb2[_0x1c0d1c]===_0x36a5f8);}return hasOwn(_0x13795c,_0x19f83c(0x1a5))&&_0x13795c[_0x19f83c(0x1a5)]===null&&(_0x21f084[_0x19f83c(0x162)](_0x19f83c(0x17b)),_0x5137a9['push'](_0x2dacb2[_0x19f83c(0x164)]===null||_0x2dacb2[_0x19f83c(0x164)]===''),_0x25f0f8['push'](_0x3e258f[_0x19f83c(0x164)]!==null&&_0x3e258f['endpointUrlRaw']!==''&&(_0x2dacb2[_0x19f83c(0x164)]===null||_0x2dacb2[_0x19f83c(0x164)]===''))),{'allMatch':_0x5137a9[_0x19f83c(0x188)](Boolean),'provesChange':_0x25f0f8[_0x19f83c(0x1c4)](Boolean),'verifiedFields':_0x21f084};}export function validateNotificationDeleteReadback(_0x237998,_0x41dfbe,_0x1d9307){const _0x100bfe=a197_0x41795d;for(const [_0x55ea53,_0xac9274]of _0x237998['entries']()){if(!Number[_0x100bfe(0x1c5)](_0xac9274['id'])||_0xac9274['id']<=0x0)throw notificationError(_0x100bfe(0x1bd),_0x100bfe(0x192)+(_0x55ea53+0x1)+_0x100bfe(0x17e));if(_0xac9274[_0x100bfe(0x177)]!==_0x41dfbe)throw notificationError('notification_config_response_invalid',_0x100bfe(0x192)+(_0x55ea53+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0xac9274['channelType']!==_0x1d9307)throw notificationError(_0x100bfe(0x1bd),_0x100bfe(0x192)+(_0x55ea53+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x522cd5,_0xdb0bd7,_0x938470){const _0x24a7cc=a197_0x41795d;return notificationError(_0x24a7cc(0x1b3)+_0x522cd5+'_'+(_0xdb0bd7==='mutation'?_0x24a7cc(0x1bb):_0xdb0bd7+_0x24a7cc(0x18d)),_0x24a7cc(0x197)+_0x522cd5+'\x20'+_0xdb0bd7+_0x24a7cc(0x1b5),_0x938470);}export function notificationLookupCommand(_0x315ed8,_0x3339f7){const _0x4518e8=a197_0x41795d;return _0x4518e8(0x1b7)+_0x315ed8+_0x4518e8(0x1b9)+_0x3339f7+_0x4518e8(0x182);}function validateNotificationDocument(_0xeb57fc,_0x5670ac){const _0xe99308=a197_0x41795d;for(const _0x30dd77 of Object[_0xe99308(0x15e)](_0xeb57fc)){if(FORBIDDEN_IDENTITY_FIELDS[_0xe99308(0x1a0)](_0x30dd77))throw notificationError('notification_config_field_forbidden',_0xe99308(0x157)+_0x30dd77+_0xe99308(0x1bc));if(!ALLOWED_INPUT_FIELDS[_0xe99308(0x1a0)](_0x30dd77))throw notificationError('notification_config_field_unknown',_0xe99308(0x14d)+_0x30dd77+'\x22.');}if(_0x5670ac===_0xe99308(0x16b)&&Object[_0xe99308(0x15e)](_0xeb57fc)[_0xe99308(0x1ad)]===0x0)throw notificationError(_0xe99308(0x151),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x2ff35a={};if(hasOwn(_0xeb57fc,_0xe99308(0x198)))_0x2ff35a[_0xe99308(0x198)]=validateRequiredString(_0xeb57fc['configName'],_0xe99308(0x198),0x80);else{if(_0x5670ac===_0xe99308(0x1a2))throw notificationError(_0xe99308(0x19c),_0xe99308(0x186)+'\x22configName\x22.');}if(hasOwn(_0xeb57fc,'channelType')){if(typeof _0xeb57fc[_0xe99308(0x1a4)]!==_0xe99308(0x1a8))throw invalidFieldType('channelType',_0xe99308(0x1ab));const _0x44eada=_0xeb57fc['channelType'][_0xe99308(0x17c)]();if(!NOTIFICATION_CHANNEL_TYPES[_0xe99308(0x181)](_0x44eada))throw notificationError('notification_config_field_invalid',_0xe99308(0x17d),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0xe99308(0x18f)](',\x20')+'.');_0x2ff35a[_0xe99308(0x1a4)]=_0x44eada;}else{if(_0x5670ac==='create')throw notificationError('notification_config_field_required',_0xe99308(0x186)+'\x22channelType\x22.');}for(const [_0x45b0f9,_0x83d050]of[['endpointUrl',0x200],[_0xe99308(0x14b),0x100]]){if(!hasOwn(_0xeb57fc,_0x45b0f9))continue;const _0x33c01f=_0xeb57fc[_0x45b0f9];if(_0x33c01f!==null&&typeof _0x33c01f!==_0xe99308(0x1a8))throw invalidFieldType(_0x45b0f9,_0xe99308(0x1ba));if(typeof _0x33c01f==='string'&&_0x33c01f[_0xe99308(0x1ad)]>_0x83d050)throw notificationError(_0xe99308(0x191),'Notification\x20JSON\x20field\x20\x22'+_0x45b0f9+'\x22\x20cannot\x20exceed\x20'+_0x83d050+_0xe99308(0x179));_0x2ff35a[_0x45b0f9]=_0x33c01f;}if(hasOwn(_0xeb57fc,_0xe99308(0x166))){const _0x301174=_0xeb57fc[_0xe99308(0x166)];if(_0x301174===null&&_0x5670ac==='create')throw invalidFieldType(_0xe99308(0x166),_0xe99308(0x194));if(_0x301174!==null&&!isJsonObject(_0x301174))throw invalidFieldType(_0xe99308(0x166),_0x5670ac===_0xe99308(0x16b)?_0xe99308(0x1c3):_0xe99308(0x194));_0x301174!==null&&validateChannelConfigFields(_0x2ff35a[_0xe99308(0x1a4)],_0x301174),_0x2ff35a[_0xe99308(0x166)]=_0x301174;}for(const _0x1b187a of['connectTimeout',_0xe99308(0x1c6)]){if(!hasOwn(_0xeb57fc,_0x1b187a))continue;const _0x2c796c=_0xeb57fc[_0x1b187a];if(_0x2c796c!==null&&(!Number[_0xe99308(0x1c5)](_0x2c796c)||_0x2c796c<0x0))throw notificationError(_0xe99308(0x191),_0xe99308(0x157)+_0x1b187a+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x2ff35a[_0x1b187a]=_0x2c796c;}return _0x2ff35a;}function validateRequiredString(_0x5a4c0b,_0x3bd401,_0x2915a8){const _0x22a5ab=a197_0x41795d;if(typeof _0x5a4c0b!==_0x22a5ab(0x1a8))throw invalidFieldType(_0x3bd401,'a\x20non-empty\x20string');const _0x58a146=_0x5a4c0b['trim']();if(!_0x58a146)throw notificationError(_0x22a5ab(0x191),_0x22a5ab(0x157)+_0x3bd401+_0x22a5ab(0x158));if(_0x58a146['length']>_0x2915a8)throw notificationError(_0x22a5ab(0x191),_0x22a5ab(0x157)+_0x3bd401+_0x22a5ab(0x190)+_0x2915a8+_0x22a5ab(0x179));return _0x58a146;}function validateChannelConfigFields(_0x2c386b,_0x1a180a){const _0x3da98c=a197_0x41795d;if(hasOwn(_0x1a180a,_0x3da98c(0x152)))throw forbiddenChannelConfigField(_0x3da98c(0x152));if(_0x2c386b===_0x3da98c(0x1a3))for(const _0x456a62 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x1a180a,_0x456a62))throw forbiddenChannelConfigField(_0x456a62);}}function forbiddenChannelConfigField(_0x257924){const _0x107db5=a197_0x41795d;return notificationError(_0x107db5(0x15b),_0x107db5(0x1c8)+_0x257924+_0x107db5(0x180));}function a197_0x5280(){const _0x273d80=['stringify','7828368KtMnNx','a\x20supported\x20string','Application-level\x20notification\x20config\x20ID','length','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Allowed\x20values:\x20','updateTime','environment\x20variable\x20','fromName','notification_config_','\x22\x20must\x20be\x20','\x20failed.','createTime','rabetbase\x20notification\x20config-list\x20--appcode\x20','9ZcaANs','\x20--type\x20','a\x20string\x20or\x20null','failed','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','notification_config_response_invalid','Invalid\x20--','Notification\x20JSON\x20from\x20','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','WECOM','a\x20JSON\x20object\x20or\x20null','some','isSafeInteger','readTimeout','3163657NhpqzH','Notification\x20JSON\x20channelConfig\x20field\x20\x22','env','path','2TFZCMA','description','preflight','Unknown\x20notification\x20JSON\x20field\x20\x22','bccList','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','file','notification_config_update_empty','messageTemplate','Notification\x20JSON\x20source\x20is\x20ambiguous.','object','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','file\x20','Notification\x20JSON\x20field\x20\x22','\x22\x20must\x20be\x20a\x20non-empty\x20string.','ccList','dry-run','notification_config_channel_field_forbidden','connectTimeout','<redacted>','keys','notification_config_json_invalid','bool','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','push','DINGTALK','endpointUrlRaw','Item\x20','channelConfig','recipients','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','notification_config_confirmation_required','\x20has\x20invalid\x20field\x20\x22','update','notification_config_id_invalid','343968fJntGK','boolean','setEncoding','str','validation','\x20has\x20an\x20unsupported\x20channelType.','channelConfigRaw','type','5680880sbASeM','1638363ZVItYY','appCode','replyTo','\x20characters.','name','endpointUrl:null','trim','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x20has\x20an\x20invalid\x20id.','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x22\x20is\x20forbidden.','includes','\x20--format\x20compress','notification_config_source_unavailable','kind','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Create\x20JSON\x20requires\x20field\x20','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','every','apiError','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','channelCode','1381737lSwXBy','_unavailable','stdin','join','\x22\x20cannot\x20exceed\x20','notification_config_field_invalid','Notification\x20config\x20list\x20item\x20','\x20is\x20invalid.','a\x20JSON\x20object','number','12247696AfiUpT','Notification\x20config\x20','configName','45eCAlSx','\x20is\x20missing\x20required\x20field\x20\x22','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','notification_config_field_required','yes','configCode','parse','has','WEBHOOK','create','EMAIL','channelType','endpointUrl','utf8','num','string'];a197_0x5280=function(){return _0x273d80;};return a197_0x5280();}function invalidFieldType(_0x3f3f37,_0x20d7bc){const _0x5be43a=a197_0x41795d;return notificationError(_0x5be43a(0x191),_0x5be43a(0x157)+_0x3f3f37+_0x5be43a(0x1b4)+_0x20d7bc+'.');}function serializeChannelConfig(_0x1e4e59){const _0xdabaed=a197_0x41795d;return _0x1e4e59===null||_0x1e4e59===undefined?null:JSON[_0xdabaed(0x1a9)](_0x1e4e59);}function redactSensitive(_0x2a9eb4){const _0x51a735=a197_0x41795d;return _0x2a9eb4===null||_0x2a9eb4===undefined||_0x2a9eb4===''?null:_0x51a735(0x15d);}function requireResponseString(_0x225fbf,_0xe4e08a,_0xc13c12){const _0x53780c=a197_0x41795d;if(typeof _0x225fbf!==_0x53780c(0x1a8)||_0x225fbf[_0x53780c(0x17c)]()==='')throw CliErrors[_0x53780c(0x189)]('Invalid\x20notification\x20config\x20response.',_0x53780c(0x165)+(_0xc13c12+0x1)+_0x53780c(0x19a)+_0xe4e08a+'\x22.');return _0x225fbf[_0x53780c(0x17c)]();}function requireExactString(_0x47b521,_0x158320,_0x58d922){const _0x5eb795=a197_0x41795d;if(typeof _0x47b521!==_0x5eb795(0x1a8)||_0x47b521[_0x5eb795(0x17c)]()==='')throw notificationError(_0x5eb795(0x1bd),'Notification\x20config\x20'+_0x58d922+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x158320+'\x22.');return _0x47b521[_0x5eb795(0x17c)]();}function responseNullableString(_0x1f3b3b,_0x1ac541,_0x38c539){const _0x197b1e=a197_0x41795d;if(_0x1f3b3b===undefined||_0x1f3b3b===null)return null;if(typeof _0x1f3b3b!==_0x197b1e(0x1a8))throw notificationError(_0x197b1e(0x1bd),'Notification\x20config\x20'+_0x38c539+_0x197b1e(0x16a)+_0x1ac541+'\x22.');return _0x1f3b3b;}function responseNullableTimeout(_0x4c6198,_0x116a2c,_0xb9025f){const _0x534cde=a197_0x41795d;if(_0x4c6198===undefined||_0x4c6198===null)return null;if(!Number[_0x534cde(0x1c5)](_0x4c6198)||_0x4c6198<0x0)throw notificationError('notification_config_response_invalid',_0x534cde(0x197)+_0xb9025f+_0x534cde(0x16a)+_0x116a2c+'\x22.');return _0x4c6198;}function normalizeNullableString(_0x445d92){return typeof _0x445d92==='string'?_0x445d92:null;}function isJsonObject(_0xd7df19){const _0x56f489=a197_0x41795d;return _0xd7df19!==null&&typeof _0xd7df19===_0x56f489(0x154)&&!Array['isArray'](_0xd7df19);}function hasOwn(_0x21be1c,_0x15262f){return Object['prototype']['hasOwnProperty']['call'](_0x21be1c,_0x15262f);}async function readStdin(){const _0x3e83ff=a197_0x41795d;let _0x201536='';process['stdin'][_0x3e83ff(0x16f)](_0x3e83ff(0x1a6));for await(const _0x3d1dab of process['stdin'])_0x201536+=_0x3d1dab;return _0x201536;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a198_0x4b5bd6=a198_0xd996;(function(_0x442d45,_0x233ae1){const _0x33e681=a198_0xd996,_0x1775e8=_0x442d45();while(!![]){try{const _0x4d6923=parseInt(_0x33e681(0x102))/0x1+-parseInt(_0x33e681(0x101))/0x2+-parseInt(_0x33e681(0x106))/0x3+parseInt(_0x33e681(0xf0))/0x4*(-parseInt(_0x33e681(0xe3))/0x5)+-parseInt(_0x33e681(0xdf))/0x6*(parseInt(_0x33e681(0xff))/0x7)+parseInt(_0x33e681(0xdd))/0x8+-parseInt(_0x33e681(0xee))/0x9*(-parseInt(_0x33e681(0xef))/0xa);if(_0x4d6923===_0x233ae1)break;else _0x1775e8['push'](_0x1775e8['shift']());}catch(_0x1b8bfd){_0x1775e8['push'](_0x1775e8['shift']());}}}(a198_0x401e,0xbaf0b));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a198_0x4b5bd6(0xe5),'general',a198_0x4b5bd6(0xf1),a198_0x4b5bd6(0xe1)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':'General','form':a198_0x4b5bd6(0xe2),'idCard':a198_0x4b5bd6(0xed)},SCENE_FLAG={'name':a198_0x4b5bd6(0xeb),'type':a198_0x4b5bd6(0xe9),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':a198_0x4b5bd6(0xec),'type':a198_0x4b5bd6(0xe9),'description':a198_0x4b5bd6(0x104)},IMAGE_URL_FLAG={'name':a198_0x4b5bd6(0xd7),'type':a198_0x4b5bd6(0xe9),'description':a198_0x4b5bd6(0xfc)};function a198_0xd996(_0x10c318,_0x26edec){_0x10c318=_0x10c318-0xd7;const _0x401e39=a198_0x401e();let _0xd996a2=_0x401e39[_0x10c318];return _0xd996a2;}function normalizeScene(_0x3d55f5){const _0xa5fe1f=a198_0x4b5bd6,_0x18f449=_0x3d55f5[_0xa5fe1f(0xfd)]()[_0xa5fe1f(0x108)]();if(_0x18f449==='idcard')return _0xa5fe1f(0xe1);if(_0x18f449===_0xa5fe1f(0xe5)||_0x18f449==='general'||_0x18f449===_0xa5fe1f(0xf1))return _0x18f449;throw CliErrors[_0xa5fe1f(0xf9)](_0xa5fe1f(0xfa)+_0x3d55f5+_0xa5fe1f(0x105)+SUPPORTED_SCENES[_0xa5fe1f(0xfb)](',\x20'));}function selectedInputs(_0x6c4ebf){const _0x7eb778=a198_0x4b5bd6,_0x263a6c=_0x6c4ebf[_0x7eb778(0xfe)](_0x7eb778(0xec))[_0x7eb778(0xfd)](),_0x33f84f=_0x6c4ebf['str'](_0x7eb778(0xd7))[_0x7eb778(0xfd)]();return{'imageFile':_0x263a6c,'imageUrl':_0x33f84f,'count':[_0x263a6c,_0x33f84f][_0x7eb778(0xf7)](Boolean)[_0x7eb778(0x107)]};}function validateInputSelection(_0x514331){const _0x3f0e30=a198_0x4b5bd6,_0x462c8e=selectedInputs(_0x514331);if(_0x462c8e[_0x3f0e30(0xdb)]!==0x1)throw CliErrors[_0x3f0e30(0xf9)](_0x3f0e30(0xda));return _0x462c8e;}function withScene(_0x21063e,_0xcd7746,_0x42ed28){const _0x4bb48f=a198_0x4b5bd6;return{..._0x21063e,'scene':_0xcd7746,..._0x42ed28?{'sourceFile':{'fileName':_0x42ed28[_0x4bb48f(0xf3)],'filePath':_0x42ed28[_0x4bb48f(0xe4)]}}:{}};}function a198_0x401e(){const _0x3ab389=['apiError','path','fileUrl','/smartapi/common/uploadFile','image-url','imageFile','imageUrl','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','count','POST','1579200wuVBgw','recognize','6441918ZReEeW','\x20OCR\x20from\x20URL','idCard','Table','1875ksZPlg','filePath','invoice','/smartapi/ocr/recognize-text?','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','string','appCode','scene','image-file','IdCard','6906969MLlNPv','40aGZZvr','668nJnoik','form','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','fileName','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','read','ocr','filter','File\x20upload\x20response\x20missing\x20filePath.','validation','Unsupported\x20OCR\x20scene:\x20','join','Publicly\x20accessible\x20image\x20or\x20file\x20URL','trim','str','7WXxoYC','/smartapi/ocr/recognize-text','1777208DNdZJy','999397BcjqeX','GET','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','.\x20Supported\x20scenes:\x20','4427916bZIhbt','length','toLowerCase'];a198_0x401e=function(){return _0x3ab389;};return a198_0x401e();}const ocrRecognize={'service':a198_0x4b5bd6(0xf6),'command':a198_0x4b5bd6(0xde),'description':a198_0x4b5bd6(0xf2),'risk':a198_0x4b5bd6(0xf5),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x43d434){const _0x11a589=a198_0x4b5bd6,_0x27082d=normalizeScene(_0x43d434[_0x11a589(0xfe)](_0x11a589(0xeb))),_0x55338f=SCENE_TO_LEGACY_TYPE[_0x27082d],_0x206799=validateInputSelection(_0x43d434);if(_0x206799[_0x11a589(0xd9)]){const _0x42627e=new URLSearchParams({'url':_0x206799[_0x11a589(0xd9)],'type':_0x55338f,'appCode':_0x43d434[_0x11a589(0xea)]});return{'method':_0x11a589(0x103),'url':_0x11a589(0xe6)+_0x42627e['toString'](),'description':'Preview:\x20recognize\x20'+_0x27082d+_0x11a589(0xe0)};}const _0xf4ad62=requireDevelopmentUploadFile(_0x206799[_0x11a589(0xd8)],_0x11a589(0xec));return{'method':_0x11a589(0xdc),'url':_0x11a589(0x10c),'body':{'steps':[{'method':_0x11a589(0xdc),'url':_0x11a589(0x10c),'body':{'appCode':_0x43d434[_0x11a589(0xea)],'multipart':{'file':_0xf4ad62}}},{'method':_0x11a589(0xdc),'url':'/smartapi/common/queryFileUrl','body':{'filePath':_0x11a589(0xe7),'downloadFlag':![]}},{'method':_0x11a589(0x103),'url':_0x11a589(0x100),'query':{'appCode':_0x43d434[_0x11a589(0xea)],'url':_0x11a589(0xf4),'type':_0x55338f}}]},'description':_0x11a589(0xe8)+_0x27082d+'\x20OCR'};},async 'execute'(_0x4992d6){const _0x539c4c=a198_0x4b5bd6,_0x323978=normalizeScene(_0x4992d6[_0x539c4c(0xfe)](_0x539c4c(0xeb))),_0x382064=SCENE_TO_LEGACY_TYPE[_0x323978],_0x2da874=validateInputSelection(_0x4992d6);if(_0x2da874[_0x539c4c(0xd9)]){const _0x792e58=await recognizeDevelopmentOcr(_0x4992d6[_0x539c4c(0xea)],{'url':_0x2da874['imageUrl'],'type':_0x382064});return{'ok':!![],'data':withScene(_0x792e58,_0x323978)};}const _0x18b477=requireDevelopmentUploadFile(_0x2da874['imageFile'],_0x539c4c(0xec)),_0x5a0a84=await uploadDevelopmentFile(_0x4992d6['appCode'],_0x18b477[_0x539c4c(0x10a)]);if(!_0x5a0a84[_0x539c4c(0xe4)])throw CliErrors[_0x539c4c(0x109)](_0x539c4c(0xf8));const _0x5cdf4b=await queryDevelopmentFileUrl(_0x5a0a84[_0x539c4c(0xe4)],{'download':![]});if(!_0x5cdf4b[_0x539c4c(0x10b)])throw CliErrors[_0x539c4c(0x109)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x4bc984=await recognizeDevelopmentOcr(_0x4992d6[_0x539c4c(0xea)],{'url':_0x5cdf4b[_0x539c4c(0x10b)],'type':_0x382064});return{'ok':!![],'data':withScene(_0x4bc984,_0x323978,_0x5a0a84)};}};export const ocrDefinitions=[ocrRecognize];
|