@lovrabet/rabetbase-cli 2.5.10-beta.2 → 2.5.10-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- 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.d.ts +2 -2
- 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.d.ts +3 -0
- package/lib/commands/issue/context.js +1 -0
- 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 +2 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/references/rabetbase-issue-report.md +4 -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
- package/lib/commands/issue/shared.d.ts +0 -32
- package/lib/commands/issue/shared.js +0 -1
- package/lib/telemetry/send-platform-issue-collect-log.d.ts +0 -26
- package/lib/telemetry/send-platform-issue-collect-log.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a190_0x27b592=a190_0x19cc;(function(_0x4b944e,_0x30c653){const _0x59802c=a190_0x19cc,_0x14b7db=_0x4b944e();while(!![]){try{const _0x34b07e=-parseInt(_0x59802c(0x1e5))/0x1+parseInt(_0x59802c(0x229))/0x2*(parseInt(_0x59802c(0x228))/0x3)+-parseInt(_0x59802c(0x200))/0x4+-parseInt(_0x59802c(0x222))/0x5*(parseInt(_0x59802c(0x1e3))/0x6)+parseInt(_0x59802c(0x1fd))/0x7+-parseInt(_0x59802c(0x219))/0x8*(parseInt(_0x59802c(0x22a))/0x9)+-parseInt(_0x59802c(0x221))/0xa*(-parseInt(_0x59802c(0x201))/0xb);if(_0x34b07e===_0x30c653)break;else _0x14b7db['push'](_0x14b7db['shift']());}catch(_0x35cb87){_0x14b7db['push'](_0x14b7db['shift']());}}}(a190_0x453e,0x44267));import a190_0x13f4da from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a190_0x453e(){const _0x361914=['\x20local\x20microfrontend\x20menu(s).','\x20created.','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','jsUrl','selectedAppName','targetPages','140VekNwY','187260nwKUgs','split','yellow','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','\x20failed.','Creating\x20','3xZmrHr','230110JiqUvz','45CXSSic','message','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','36jnOCoz','menu','136259wjxwJF','validation','Created\x20','filter','\x20\x20Cancelled.','appCode','skipped','cyan','Menu\x20creation\x20failed','appcode','/smartapi/menu/create','✓\x20Menu\x20sync\x20completed:\x20','boolean','\x20and\x20CSS:\x20','\x20menu(s)\x20created','Failed\x20to\x20fetch\x20online\x20menu\x20list','created','string','yes','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','cssUrl','rawFlags','appName','Menu\x20sync\x20skipped','3491782ctQoeW','\x20menu(s)\x20bound\x20to\x20','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','1889304FmKUUH','399311sPMtqM','length','params','\x20\x20Create\x20','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','str','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','\x20menu(s)','trim','gray','Fetching\x20online\x20menu\x20list...','map','flag','onlineMenuList','Would\x20create\x20','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','\x20menu(s)...','paths','\x20menu(s)\x20with\x20JS:\x20','cookie','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','\x20\x20✓\x20Selected:\x20','Register\x20local\x20pages\x20as\x20platform\x20menus','15448ZgPUsj','localPages'];a190_0x453e=function(){return _0x361914;};return a190_0x453e();}import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';function a190_0x19cc(_0x14d7e6,_0x564e02){_0x14d7e6=_0x14d7e6-0x1e3;const _0x453ec1=a190_0x453e();let _0x19ccaf=_0x453ec1[_0x14d7e6];return _0x19ccaf;}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';export const menuSync={'service':a190_0x27b592(0x1e4),'command':'sync','description':a190_0x27b592(0x218),'risk':'write','flags':[{'name':a190_0x27b592(0x203),'type':'string','description':a190_0x27b592(0x208)+'JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.'},{'name':a190_0x27b592(0x213),'type':a190_0x27b592(0x1f6),'description':a190_0x27b592(0x206)},{'name':a190_0x27b592(0x1f7),'type':a190_0x27b592(0x1f1),'description':'Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages'}],async 'dryRun'(_0x590b3a){const _0x2d0b86=a190_0x27b592;ensureRunnableContext(_0x590b3a[_0x2d0b86(0x1fa)],_0x590b3a['selectedAppName']);const _0xeeb1a3=await runMenuSyncCore(_0x590b3a[_0x2d0b86(0x1ea)],_0x590b3a[_0x2d0b86(0x215)],parsePaths(_0x590b3a[_0x2d0b86(0x207)](_0x2d0b86(0x213))),_0x590b3a[_0x2d0b86(0x207)](_0x2d0b86(0x203)),{'dryRun':!![]});return{'method':'POST','url':_0x2d0b86(0x1ef),'body':_0xeeb1a3,'description':_0xeeb1a3['skipped']?_0x2d0b86(0x225):_0x2d0b86(0x210)+_0xeeb1a3[_0x2d0b86(0x220)][_0x2d0b86(0x202)]+_0x2d0b86(0x21b)};},async 'execute'(_0x5c60cc){const _0x5e8ded=a190_0x27b592;ensureRunnableContext(_0x5c60cc[_0x5e8ded(0x1fa)],_0x5c60cc[_0x5e8ded(0x21f)]);const _0x1b58ba=_0x5c60cc[_0x5e8ded(0x20e)](_0x5e8ded(0x1f7)),_0xe5f6ef=_0x5c60cc[_0x5e8ded(0x207)]('params'),_0x58f8d7=parsePaths(_0x5c60cc['str']('paths')),_0x5decab=parseMenuSyncParams(_0xe5f6ef);if(_0x1b58ba){const _0x12beb3=await runMenuSyncCore(_0x5c60cc['appCode'],_0x5c60cc[_0x5e8ded(0x215)],_0x58f8d7,_0xe5f6ef);if(_0x12beb3[_0x5e8ded(0x1eb)]){const _0x12fe95=getLocalPages();_0x12fe95[_0x5e8ded(0x202)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x5e8ded(0x22c));}else writeCliSideChannelLine(_0x5e8ded(0x1f0)+_0x12beb3['created']+_0x5e8ded(0x1f3));return{'ok':!![],'data':_0x12beb3,'message':_0x12beb3[_0x5e8ded(0x1eb)]?_0x5e8ded(0x1fc):'Menu\x20sync\x20completed:\x20'+_0x12beb3[_0x5e8ded(0x1f5)]+_0x5e8ded(0x21c)};}if(_0x58f8d7[_0x5e8ded(0x202)]>0x0)throw CliErrors[_0x5e8ded(0x1e6)](_0x5e8ded(0x216),_0x5e8ded(0x211));if(!isInteractive()&&_0xe5f6ef)throw CliErrors[_0x5e8ded(0x1e6)](_0x5e8ded(0x21d),_0x5e8ded(0x211));requireInteractive(),writeCliSideChannelLine(_0x5e8ded(0x1ff));const _0x12b37d=startSpinner(_0x5e8ded(0x20c));let _0x36e1a5,_0x4e443a,_0x3e9c4d;try{const _0x181150=await fetchMenuData(_0x5c60cc['appCode'],_0x5c60cc[_0x5e8ded(0x215)]);_0x36e1a5=_0x181150[_0x5e8ded(0x21a)],_0x4e443a=_0x181150['onlinePaths'],_0x3e9c4d=_0x181150[_0x5e8ded(0x20f)],stopSpinner(_0x12b37d,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x38488d){stopSpinner(_0x12b37d,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors['validation'](_0x38488d instanceof Error?_0x38488d['message']:_0x5e8ded(0x1f4));}if(_0x36e1a5['length']===0x0)return writeCliSideChannelLine(a190_0x13f4da[_0x5e8ded(0x224)](_0x5e8ded(0x205))),{'ok':!![]};const _0x233f0f=buildCompareRows(_0x36e1a5,_0x4e443a);writeCliSideChannelLine(renderCompareTable(_0x233f0f)),writeCliSideChannelLine('');const _0x2a9579=await selectPages(_0x36e1a5,_0x4e443a);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0x13f4da[_0x5e8ded(0x1ec)](_0x5e8ded(0x217)+_0x2a9579[_0x5e8ded(0x202)]+'\x20page(s)'));const _0x5a7eab=_0x5decab['jsUrl']&&_0x5decab[_0x5e8ded(0x1f9)];if(!_0x5a7eab){writeCliSideChannelLine(renderSyncSummary(_0x2a9579,_0x4e443a['size']>0x0));const _0x1a5a40=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x1a5a40)return writeCliSideChannelLine(a190_0x13f4da[_0x5e8ded(0x20b)](_0x5e8ded(0x1e9))),{'ok':!![]};}let _0x394cde=_0x5decab[_0x5e8ded(0x21e)],_0x4584a5=_0x5decab[_0x5e8ded(0x1f9)];!_0x394cde&&!_0x5decab[_0x5e8ded(0x1fb)]&&(_0x394cde=await askJsUrl());!_0x4584a5&&!_0x5decab[_0x5e8ded(0x1fb)]&&(_0x4584a5=await askCssUrl());const _0x482200=await askConfirm(_0x5decab[_0x5e8ded(0x1fb)]?_0x5e8ded(0x204)+_0x2a9579[_0x5e8ded(0x202)]+_0x5e8ded(0x1fe)+_0x5decab[_0x5e8ded(0x1fb)]+'?':'\x20\x20Create\x20'+_0x2a9579['length']+_0x5e8ded(0x214)+_0x394cde+_0x5e8ded(0x1f2)+_0x4584a5+'?');if(!_0x482200)return writeCliSideChannelLine(a190_0x13f4da[_0x5e8ded(0x20b)](_0x5e8ded(0x1e9))),{'ok':!![]};const _0x370cba=[_0x394cde,_0x4584a5][_0x5e8ded(0x1e8)](_0x54d437=>Boolean(_0x54d437));_0x5decab[_0x5e8ded(0x1fb)]&&_0x370cba[_0x5e8ded(0x202)]===0x0&&await assertSharedResourcesConfigured(_0x5c60cc['appCode'],_0x5c60cc[_0x5e8ded(0x215)],_0x5decab[_0x5e8ded(0x1fb)]);const _0x5849af=startSpinner(_0x5e8ded(0x227)+_0x2a9579[_0x5e8ded(0x202)]+_0x5e8ded(0x212));try{const _0x541c8f=_0x2a9579[_0x5e8ded(0x20d)](_0xb95e93=>resolvePage(_0xb95e93,_0x5decab,_0x3e9c4d)),_0x3f412b=await doCreateMenus(_0x5c60cc['appCode'],_0x5c60cc[_0x5e8ded(0x215)],_0x541c8f,_0x370cba,_0x5decab[_0x5e8ded(0x1fb)]?{'appName':_0x5decab['appName']}:undefined);return stopSpinner(_0x5849af,_0x5e8ded(0x1e7)+_0x3f412b['created']+_0x5e8ded(0x209),!![]),{'ok':!![],'data':_0x3f412b,'message':'Menu\x20sync\x20completed:\x20'+_0x3f412b[_0x5e8ded(0x1f5)]+'\x20created,\x20'+_0x3f412b['failed']+_0x5e8ded(0x226)};}catch(_0x22384d){stopSpinner(_0x5849af,_0x5e8ded(0x1ed),![]);throw CliErrors[_0x5e8ded(0x1e6)](_0x22384d instanceof Error?_0x22384d[_0x5e8ded(0x22b)]:_0x5e8ded(0x1ed));}}};function ensureRunnableContext(_0x46552c,_0x49c695){const _0x191e66=a190_0x27b592,_0x135d25=_0x46552c[_0x191e66(0x1ee)]?String(_0x46552c['appcode'])['trim']():'';if(!isInProject()&&!_0x49c695&&!_0x135d25)throw CliErrors[_0x191e66(0x1e6)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x191e66(0x1f8));}function parsePaths(_0x48408e){const _0x5aefa2=a190_0x27b592;return[...new Set(_0x48408e[_0x5aefa2(0x223)](',')[_0x5aefa2(0x20d)](_0x2212ac=>_0x2212ac[_0x5aefa2(0x20a)]())['filter'](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a191_0x13f24b=a191_0x4f71;(function(_0x346e48,_0x1c1ed4){const _0x15a9ee=a191_0x4f71,_0x5c583c=_0x346e48();while(!![]){try{const _0x4b78e8=parseInt(_0x15a9ee(0x17a))/0x1+-parseInt(_0x15a9ee(0x172))/0x2+parseInt(_0x15a9ee(0x1b8))/0x3+parseInt(_0x15a9ee(0x182))/0x4+-parseInt(_0x15a9ee(0x191))/0x5*(parseInt(_0x15a9ee(0x162))/0x6)+-parseInt(_0x15a9ee(0x192))/0x7*(parseInt(_0x15a9ee(0x160))/0x8)+-parseInt(_0x15a9ee(0x152))/0x9*(-parseInt(_0x15a9ee(0x168))/0xa);if(_0x4b78e8===_0x1c1ed4)break;else _0x5c583c['push'](_0x5c583c['shift']());}catch(_0x230398){_0x5c583c['push'](_0x5c583c['shift']());}}}(a191_0x3401,0x72bba));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';function a191_0x3401(){const _0x4731d7=['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','menu_state_drift','menu\x20list','paths','targets','resourcesValid','expectVisible','datasetId','1915896naXXAr','expected-count','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','failed','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','\x20menu(s);\x20skipped\x20','pageType','str','push','Menu\x20id\x20selector(s)\x20not\x20found:\x20','plan','verification','update\x20menu\x20visibility','split','visibility-update','map','updated','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','some','get','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','89577qxLZxC','hash','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','values','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','url','menu_verification_failed','/smartapi/menu/update','modelType','num','cookie','true','update-recovery','Menu\x20path\x20selector\x20not\x20found:\x20','1214296AiUzjY','before','12KyEfIS','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','flagMissing','string','visible','update\x20visibility\x20for','1110neolNr','menuIds','validation','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','label','isArray','datasetCode','sort','body','\x20updated,\x20','1240986HdNJyC','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','\x20failed.','isSafeInteger','byId','number','menu','508857IwPHZr','path','childrenCount','POST','expect-visible','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','menu_selector_not_found','menu-ids','720788xNKUKX','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','update','filter','parentId','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Menu\x20visibility\x20update\x20completed:\x20','beforeById','length','join','type','Updated\x20visibility\x20for\x20','boolean','update-menu-visibility','1078270OtCUPc','42SacCLt','recovered','set','Final\x20menu\x20visibility\x20readback\x20failed.','Response\x20was\x20lost\x20for\x20menu\x20','requestedVisible','\x20menu(s),\x20expected\x20','menu_expected_count_mismatch','\x20skipped,\x20','childrenIds','Would\x20update\x20visibility\x20for\x20','menu_permission_denied','Response\x20was\x20lost\x20and\x20menu\x20','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','stringify','expectedCount','resources','pageId','warnings','appCode','depth','message','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x20must\x20be\x20true\x20or\x20false.','\x20unchanged\x20menu(s).','Requested\x20menu\x20visibility','code','Menu\x20','Selected\x20','\x20visibility\x20update\x20could\x20not\x20be\x20verified'];a191_0x3401=function(){return _0x4731d7;};return a191_0x3401();}const BACKEND=[{'method':a191_0x13f24b(0x17d),'path':a191_0x13f24b(0x159)}];export const menuVisibilityUpdate={'service':a191_0x13f24b(0x179),'command':'visibility-update','description':a191_0x13f24b(0x183),'risk':'write','structuredErrors':!![],'flags':[{'name':a191_0x13f24b(0x181),'type':a191_0x13f24b(0x165),'description':a191_0x13f24b(0x163)},{'name':a191_0x13f24b(0x1b3),'type':a191_0x13f24b(0x165),'description':a191_0x13f24b(0x174)},{'name':a191_0x13f24b(0x166),'type':a191_0x13f24b(0x18f),'required':!![],'description':a191_0x13f24b(0x1ab)},{'name':a191_0x13f24b(0x17e),'type':a191_0x13f24b(0x18f),'description':a191_0x13f24b(0x156)},{'name':a191_0x13f24b(0x1b9),'type':a191_0x13f24b(0x178),'description':a191_0x13f24b(0x1ba)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x54b88a){parseInput(_0x54b88a);},async 'dryRun'(_0x58c60c){const _0x23cdef=a191_0x13f24b,_0x109a5b=await buildPlan(_0x58c60c,!![]),_0x548f03=_0x109a5b['plan']['plannedActions']?.[_0x23cdef(0x18b)]??0x0,_0xfd382a=_0x109a5b[_0x23cdef(0x1c2)][_0x23cdef(0x1b4)][_0x23cdef(0x18b)]-_0x548f03;return menuDryRunResult(_0x109a5b[_0x23cdef(0x1c2)],{'method':_0x23cdef(0x17d),'url':_0x23cdef(0x159),'body':{'updates':_0x109a5b[_0x23cdef(0x1c2)]['plannedActions']?.[_0x23cdef(0x14a)](_0x4a4e55=>_0x4a4e55[_0x23cdef(0x170)])??[]},'description':_0x23cdef(0x19c)+_0x548f03+'\x20menu(s);\x20skip\x20'+_0xfd382a+_0x23cdef(0x1aa)});},async 'execute'(_0x5f14a0){const _0x5b9142=a191_0x13f24b,_0xf07a94=await buildPlan(_0x5f14a0,![]);await recheckMutationSnapshot(_0x5f14a0,_0xf07a94[_0x5b9142(0x1c2)],_0x5b9142(0x1c4));const _0x3c9a75=[],_0x173688=[],_0x542d1d=[];for(const _0x270627 of _0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x1b4)]){if(_0x270627['before'][_0x5b9142(0x166)]===_0xf07a94['plan'][_0x5b9142(0x197)]){_0x3c9a75[_0x5b9142(0x1c0)]({'id':_0x270627['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x5f14a0[_0x5b9142(0x1a5)],_0x5f14a0['cookie'],{'id':_0x270627['id'],'visible':_0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x197)]}),_0x3c9a75[_0x5b9142(0x1c0)]({'id':_0x270627['id'],'updated':!![],'skipped':![]});}catch(_0x5aaeae){const _0x5acb9d=mapMenuApiError(_0x5aaeae,_0x5b9142(0x167),_0x270627['id']);if(isMenuResponseLoss(_0x5aaeae)&&_0x5acb9d['code']!==_0x5b9142(0x19d)){_0x542d1d[_0x5b9142(0x1c0)](_0x270627['id']);continue;}_0x173688[_0x5b9142(0x1c0)]({'id':_0x270627['id'],'stage':_0x5b9142(0x184),'code':_0x5acb9d[_0x5b9142(0x1ac)],'message':_0x5acb9d[_0x5b9142(0x1a7)]});}}let _0x1dea92;try{_0x1dea92=await fetchMenuSnapshot(_0x5f14a0[_0x5b9142(0x1a5)],_0x5f14a0[_0x5b9142(0x15c)]);}catch(_0x17f101){const _0x412536=describeMenuErrorCause(_0x17f101,'verify\x20menu\x20visibility\x20update'),_0x1c57eb=_0x542d1d['map'](_0x56bba0=>({'id':_0x56bba0,'stage':_0x5b9142(0x15e),'code':_0x5b9142(0x158),'message':_0x5b9142(0x196)+_0x56bba0+_0x5b9142(0x14d),'requestedStateConfirmed':![],'recovered':![]})),_0x468f80={'stage':_0x5b9142(0x1c3),'code':_0x5b9142(0x158),'message':_0x5b9142(0x195),'targetIds':_0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x1b4)][_0x5b9142(0x14a)](_0x494c07=>_0x494c07['id']),'requestedStateConfirmed':![],..._0x412536};throw menuFailure(asVerificationError(_0x17f101,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0xf07a94[_0x5b9142(0x1c2)],{'stage':_0x5b9142(0x1c3),'succeeded':_0x3c9a75,'failedRecords':[..._0x173688,..._0x1c57eb,_0x468f80],'warnings':[_0x5b9142(0x1b0)],'verification':{'status':_0x5b9142(0x1bb),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x504554=[];for(const _0x10dbb1 of _0x3c9a75){const _0x2a2390=Number(_0x10dbb1['id']),_0x3aa2bd=_0xf07a94[_0x5b9142(0x18a)][_0x5b9142(0x150)](_0x2a2390),_0x233ff9=_0x1dea92[_0x5b9142(0x177)][_0x5b9142(0x150)](_0x2a2390);try{verifyVisibilityUpdate(_0x3aa2bd,_0x233ff9,_0xf07a94['plan'][_0x5b9142(0x197)]);}catch(_0x4301b7){const _0x2a9b9b=asVerificationError(_0x4301b7,_0x5b9142(0x1ad)+_0x2a2390+_0x5b9142(0x1af));_0x504554['push']({'id':_0x2a2390,'stage':'verification','code':_0x2a9b9b['code'],'message':_0x2a9b9b['message'],'requestedStateConfirmed':![]});}}for(const _0x150dd4 of _0x542d1d){const _0x10dd87=_0xf07a94[_0x5b9142(0x18a)]['get'](_0x150dd4),_0x22bf57=_0x1dea92[_0x5b9142(0x177)][_0x5b9142(0x150)](_0x150dd4);try{verifyVisibilityUpdate(_0x10dd87,_0x22bf57,_0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x197)]),_0x3c9a75['push']({'id':_0x150dd4,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x1017fd){const _0x2274d9=asVerificationError(_0x1017fd,_0x5b9142(0x19e)+_0x150dd4+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x504554[_0x5b9142(0x1c0)]({'id':_0x150dd4,'stage':_0x5b9142(0x15e),'code':_0x2274d9[_0x5b9142(0x1ac)],'message':_0x2274d9[_0x5b9142(0x1a7)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x504554[_0x5b9142(0x18b)]>0x0){const _0x447a21=_0x504554[_0x5b9142(0x14a)](_0x1155d2=>Number(_0x1155d2['id'])),_0x53de4f=_0x3c9a75[_0x5b9142(0x185)](_0x502746=>_0x502746[_0x5b9142(0x193)]===!![])[_0x5b9142(0x18b)],_0x127c24=menuError('menu_verification_failed',_0x5b9142(0x14e)+_0x447a21[_0x5b9142(0x18c)](',\x20')+'.',_0x5b9142(0x188));throw menuFailure(_0x127c24,_0xf07a94['plan'],{'stage':_0x5b9142(0x1c3),'succeeded':_0x3c9a75,'failedRecords':[..._0x173688,..._0x504554],'warnings':[_0x5b9142(0x17f)],'verification':{'status':_0x5b9142(0x1bb),..._0x447a21[_0x5b9142(0x18b)]===0x1?{'targetId':_0x447a21[0x0]}:{'targetIds':_0x447a21},'recoveredCount':_0x53de4f,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0xe006bf=_0x3c9a75[_0x5b9142(0x185)](_0x5f0788=>_0x5f0788[_0x5b9142(0x14b)]===!![])[_0x5b9142(0x18b)],_0x681958=_0x3c9a75['length']-_0xe006bf,_0x5e087b={..._0xf07a94[_0x5b9142(0x1c2)],'succeeded':_0x3c9a75,'failed':_0x173688,'warnings':_0x173688['length']>0x0?[..._0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x1a4)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0xf07a94['plan'][_0x5b9142(0x1a4)],'verification':{'checkedBy':_0x5b9142(0x1b2),'snapshotHash':_0x1dea92['hash'],'matchesRequestedState':_0x173688[_0x5b9142(0x18b)]===0x0,'recoveredCount':_0x542d1d[_0x5b9142(0x18b)]}};return{'ok':_0x173688['length']===0x0,'data':_0x5e087b,'message':_0x173688[_0x5b9142(0x18b)]===0x0?_0x5b9142(0x18e)+_0xe006bf+_0x5b9142(0x1bd)+_0x681958+_0x5b9142(0x1aa):_0x5b9142(0x189)+_0xe006bf+_0x5b9142(0x171)+_0x681958+_0x5b9142(0x19a)+_0x173688[_0x5b9142(0x18b)]+_0x5b9142(0x175)};}};function parseInput(_0x2e57b2){const _0x338fff=a191_0x13f24b,_0x2002fc=parseMenuIds(_0x2e57b2[_0x338fff(0x1bf)](_0x338fff(0x181))),_0x5387f7=parseCsv(_0x2e57b2['str'](_0x338fff(0x1b3)));if(_0x2002fc[_0x338fff(0x18b)]===0x0&&_0x5387f7[_0x338fff(0x18b)]===0x0)throw CliErrors[_0x338fff(0x16a)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x716946=parseBooleanFlag(_0x2e57b2,_0x338fff(0x166),!![]),_0x4fffdd=parseBooleanFlag(_0x2e57b2,_0x338fff(0x17e),![]);let _0x29468e;if(hasFlag(_0x2e57b2,'expected-count')){_0x29468e=_0x2e57b2[_0x338fff(0x15b)](_0x338fff(0x1b9));if(!Number[_0x338fff(0x176)](_0x29468e)||_0x29468e<0x0)throw CliErrors['validation'](_0x338fff(0x1a8));}return{'menuIds':_0x2002fc,'paths':_0x5387f7,'visible':_0x716946,'expectVisible':_0x4fffdd,'expectedCount':_0x29468e};}async function buildPlan(_0x475e1a,_0x143b38){const _0x3ffdbe=a191_0x13f24b,_0x4ed40a=parseInput(_0x475e1a),_0x4602de=await fetchMutationSnapshot(_0x475e1a,_0x3ffdbe(0x1c4)),_0x558512=selectTargets(_0x4602de['menus'],_0x4ed40a[_0x3ffdbe(0x169)],_0x4ed40a[_0x3ffdbe(0x1b3)]);if(_0x4ed40a['expectedCount']!==undefined&&_0x558512[_0x3ffdbe(0x18b)]!==_0x4ed40a[_0x3ffdbe(0x1a1)])throw menuError(_0x3ffdbe(0x199),_0x3ffdbe(0x1ae)+_0x558512[_0x3ffdbe(0x18b)]+_0x3ffdbe(0x198)+_0x4ed40a['expectedCount']+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x4ed40a[_0x3ffdbe(0x1b6)]!==undefined){const _0x40f5a8=_0x558512[_0x3ffdbe(0x185)](_0x5c4ab3=>_0x5c4ab3[_0x3ffdbe(0x166)]!==_0x4ed40a[_0x3ffdbe(0x1b6)]);if(_0x40f5a8['length']>0x0)throw menuError(_0x3ffdbe(0x1b1),_0x3ffdbe(0x173)+_0x40f5a8[_0x3ffdbe(0x14a)](_0x2bc045=>_0x2bc045['id'])['join'](',\x20')+'.',_0x3ffdbe(0x14c));}const _0x42e4f4=_0x558512[_0x3ffdbe(0x14a)](_0xe62290=>({'id':_0xe62290['id'],'label':_0xe62290['label'],'path':_0xe62290[_0x3ffdbe(0x17b)],'before':{'visible':_0xe62290['visible']},'after':{'visible':_0x4ed40a[_0x3ffdbe(0x166)]}})),_0x3b158c=_0x42e4f4['filter'](_0x270c6e=>_0x270c6e[_0x3ffdbe(0x161)]['visible']!==_0x4ed40a['visible'])[_0x3ffdbe(0x14a)](_0x500bbd=>({'stage':_0x3ffdbe(0x190),'method':_0x3ffdbe(0x17d),'path':_0x3ffdbe(0x159),'body':{'appCode':_0x475e1a[_0x3ffdbe(0x1a5)],'id':_0x500bbd['id'],'visible':_0x4ed40a[_0x3ffdbe(0x166)]}})),_0x4c323d=mutationResult({'operation':_0x3ffdbe(0x1c6),'selector':{'menuIds':_0x4ed40a[_0x3ffdbe(0x169)],'paths':_0x4ed40a[_0x3ffdbe(0x1b3)]},'before':{'menus':_0x558512[_0x3ffdbe(0x14a)](_0xad7fcc=>({'id':_0xad7fcc['id'],'path':_0xad7fcc[_0x3ffdbe(0x17b)],'visible':_0xad7fcc[_0x3ffdbe(0x166)]}))},'after':{'menus':_0x558512[_0x3ffdbe(0x14a)](_0x3f90e9=>({'id':_0x3f90e9['id'],'path':_0x3f90e9['path'],'visible':_0x4ed40a[_0x3ffdbe(0x166)]}))},'dryRun':_0x143b38,'backend':[...BACKEND],'plannedActions':_0x3b158c,'snapshotHash':_0x4602de[_0x3ffdbe(0x153)],'warnings':_0x3b158c[_0x3ffdbe(0x18b)]===0x0?[_0x3ffdbe(0x151)]:[]});return{'plan':{..._0x4c323d,'requestedVisible':_0x4ed40a['visible'],'targets':_0x42e4f4},'beforeById':new Map(_0x558512['map'](_0x583210=>[_0x583210['id'],_0x583210]))};}function a191_0x4f71(_0x1bab6c,_0x138bd8){_0x1bab6c=_0x1bab6c-0x14a;const _0x34015d=a191_0x3401();let _0x4f7190=_0x34015d[_0x1bab6c];return _0x4f7190;}function selectTargets(_0x3a798f,_0x536c38,_0x7cfca2){const _0x6df624=a191_0x13f24b,_0x461e57=new Map(_0x3a798f[_0x6df624(0x14a)](_0x4f3179=>[_0x4f3179['id'],_0x4f3179])),_0x21037d=new Map(),_0x2d38ca=_0x536c38[_0x6df624(0x185)](_0x111cf9=>!_0x461e57['has'](_0x111cf9));if(_0x2d38ca['length']>0x0)throw menuError(_0x6df624(0x180),_0x6df624(0x1c1)+_0x2d38ca[_0x6df624(0x18c)](',\x20')+'.',_0x6df624(0x1bc));for(const _0x2886b4 of _0x536c38){_0x21037d['set'](_0x2886b4,_0x461e57[_0x6df624(0x150)](_0x2886b4));}for(const _0x53e51c of _0x7cfca2){const _0x1cb03c=_0x3a798f[_0x6df624(0x185)](_0x3e34bf=>_0x3e34bf['path']===_0x53e51c);if(_0x1cb03c['length']===0x0)throw menuError(_0x6df624(0x180),_0x6df624(0x15f)+JSON[_0x6df624(0x1a0)](_0x53e51c)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x1cb03c[_0x6df624(0x18b)]>0x1)throw menuError('menu_selector_ambiguous',_0x6df624(0x16b)+JSON[_0x6df624(0x1a0)](_0x53e51c)+'.',_0x6df624(0x154)+_0x1cb03c[_0x6df624(0x14a)](_0x4c99cc=>_0x4c99cc['id'])[_0x6df624(0x18c)](',\x20')+'.');const _0x5eb279=_0x1cb03c[0x0];_0x21037d[_0x6df624(0x194)](_0x5eb279['id'],_0x5eb279);}return[..._0x21037d[_0x6df624(0x155)]()];}function parseMenuIds(_0x3263c0){const _0x392259=a191_0x13f24b,_0x1e138b=parseCsv(_0x3263c0),_0x20ca4d=_0x1e138b[_0x392259(0x14a)](Number);if(_0x20ca4d[_0x392259(0x14f)](_0x292a23=>!Number['isSafeInteger'](_0x292a23)||_0x292a23<=0x0))throw CliErrors[_0x392259(0x16a)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x20ca4d)];}function parseCsv(_0x145c20){const _0x10aec4=a191_0x13f24b;return[...new Set(_0x145c20[_0x10aec4(0x1c5)](',')[_0x10aec4(0x14a)](_0x1c665e=>_0x1c665e['trim']())[_0x10aec4(0x185)](Boolean))];}function parseBooleanFlag(_0x29cdb9,_0x1cf487,_0x3ce0f7){const _0x28cdf8=a191_0x13f24b;if(!hasFlag(_0x29cdb9,_0x1cf487)){if(_0x3ce0f7)throw CliErrors[_0x28cdf8(0x164)](_0x1cf487);return undefined;}const _0x1fba93=_0x29cdb9['rawFlags'][_0x1cf487];if(_0x1fba93===!![]||_0x1fba93===![])return _0x1fba93;if(_0x1fba93===_0x28cdf8(0x15d))return!![];if(_0x1fba93==='false')return![];throw CliErrors[_0x28cdf8(0x16a)]('--'+_0x1cf487+_0x28cdf8(0x1a9));}function verifyVisibilityUpdate(_0x4b9ce6,_0x2d5da7,_0x53eedd){const _0x27f823=a191_0x13f24b;assertVerified(!!_0x2d5da7,_0x27f823(0x1ad)+_0x4b9ce6['id']+_0x27f823(0x19f)),assertVerified(_0x2d5da7[_0x27f823(0x166)]===_0x53eedd,_0x27f823(0x1ad)+_0x4b9ce6['id']+_0x27f823(0x187));const _0x34896a=[['id',_0x2d5da7['id'],_0x4b9ce6['id']],['parentId',_0x2d5da7['parentId'],_0x4b9ce6[_0x27f823(0x186)]],[_0x27f823(0x1a6),_0x2d5da7[_0x27f823(0x1a6)],_0x4b9ce6[_0x27f823(0x1a6)]],[_0x27f823(0x16c),_0x2d5da7[_0x27f823(0x16c)],_0x4b9ce6[_0x27f823(0x16c)]],[_0x27f823(0x17b),_0x2d5da7[_0x27f823(0x17b)],_0x4b9ce6['path']],[_0x27f823(0x157),_0x2d5da7['url'],_0x4b9ce6[_0x27f823(0x157)]],[_0x27f823(0x18d),_0x2d5da7[_0x27f823(0x18d)],_0x4b9ce6['type']],[_0x27f823(0x16f),_0x2d5da7['sort'],_0x4b9ce6['sort']],[_0x27f823(0x1a2),_0x2d5da7[_0x27f823(0x1a2)],_0x4b9ce6[_0x27f823(0x1a2)]],['resourcesValid',_0x2d5da7[_0x27f823(0x1b5)],_0x4b9ce6[_0x27f823(0x1b5)]],[_0x27f823(0x19b),_0x2d5da7[_0x27f823(0x19b)],_0x4b9ce6[_0x27f823(0x19b)]],[_0x27f823(0x17c),_0x2d5da7[_0x27f823(0x17c)],_0x4b9ce6[_0x27f823(0x17c)]],[_0x27f823(0x1a3),_0x2d5da7[_0x27f823(0x1a3)],_0x4b9ce6[_0x27f823(0x1a3)]],['pageType',_0x2d5da7['pageType'],_0x4b9ce6[_0x27f823(0x1be)]],['modelType',_0x2d5da7[_0x27f823(0x15a)],_0x4b9ce6[_0x27f823(0x15a)]],[_0x27f823(0x1b7),_0x2d5da7[_0x27f823(0x1b7)],_0x4b9ce6[_0x27f823(0x1b7)]],[_0x27f823(0x16e),_0x2d5da7[_0x27f823(0x16e)],_0x4b9ce6[_0x27f823(0x16e)]]];for(const [_0x1b0980,_0xcd3d50,_0x41b588]of _0x34896a){assertVerified(sameValue(_0xcd3d50,_0x41b588),_0x27f823(0x1ad)+_0x4b9ce6['id']+'\x20'+_0x1b0980+'\x20changed\x20unexpectedly.');}}function sameValue(_0x497a1d,_0x358ef0){const _0x30ce79=a191_0x13f24b;if(Array[_0x30ce79(0x16d)](_0x497a1d)||Array[_0x30ce79(0x16d)](_0x358ef0))return JSON[_0x30ce79(0x1a0)](_0x497a1d)===JSON['stringify'](_0x358ef0);return _0x497a1d===_0x358ef0;}
|
|
1
|
+
const a191_0x17acb3=a191_0x41a0;(function(_0x3b0c82,_0x255b75){const _0x4eae5e=a191_0x41a0,_0x1bdf9f=_0x3b0c82();while(!![]){try{const _0x9ede61=-parseInt(_0x4eae5e(0xd3))/0x1+-parseInt(_0x4eae5e(0xed))/0x2*(parseInt(_0x4eae5e(0xf6))/0x3)+-parseInt(_0x4eae5e(0x11b))/0x4+-parseInt(_0x4eae5e(0xe6))/0x5+-parseInt(_0x4eae5e(0x120))/0x6+parseInt(_0x4eae5e(0x10b))/0x7+-parseInt(_0x4eae5e(0xc1))/0x8*(-parseInt(_0x4eae5e(0x137))/0x9);if(_0x9ede61===_0x255b75)break;else _0x1bdf9f['push'](_0x1bdf9f['shift']());}catch(_0x365c48){_0x1bdf9f['push'](_0x1bdf9f['shift']());}}}(a191_0x3101,0xb4340));function a191_0x3101(){const _0x1d1e6e=['Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','warnings','verification','\x20updated,\x20','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','set','Selected\x20','POST','has','resources','validation','parentId','visibility-update','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','expected-count','datasetCode','menu','3582050PjoYFE','filter','update-recovery','boolean','trim','\x20failed.','rawFlags','28382AZnNkE','url','Would\x20update\x20visibility\x20for\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','menu_permission_denied','menu_selector_ambiguous','values','get','39cIxJKo','expect-visible','/smartapi/menu/update','string','menus','updated','write','Menu\x20','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','\x20visibility\x20update\x20could\x20not\x20be\x20verified','\x20menu(s);\x20skipped\x20','message','label','pageType','before','update-menu-visibility','plannedActions','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','failed','modelType','flagMissing','172214ypjAOm','push','paths','\x20unchanged\x20menu(s).','menu_expected_count_mismatch','Menu\x20visibility\x20update\x20completed:\x20','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Menu\x20path\x20selector\x20not\x20found:\x20','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','expectVisible','isArray','type','plan','Requested\x20menu\x20visibility','sort','1414764tQTMWc','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','targets','datasetId','menu\x20list','4234962ivugNb','code','expectedCount','num','update\x20visibility\x20for','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','visible','join','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','menu_verification_failed','path','body','split','childrenIds','update','map','recovered','Response\x20was\x20lost\x20for\x20menu\x20','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','childrenCount','\x20must\x20be\x20true\x20or\x20false.','hash','rabetbase\x20menu\x20list\x20--format\x20compress','873HnIBxq','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','\x20menu(s),\x20expected\x20','\x20menu(s);\x20skip\x20','some','resourcesValid','beforeById','update\x20menu\x20visibility','length','232128mETXIH','pageId','\x20changed\x20unexpectedly.','menuIds','requestedVisible','cookie','str','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','menu-ids','false','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','true','appCode','menu_state_drift','isSafeInteger','depth','140631ncFAHl','stringify'];a191_0x3101=function(){return _0x1d1e6e;};return a191_0x3101();}function a191_0x41a0(_0x2ccaef,_0x5c907a){_0x2ccaef=_0x2ccaef-0xc0;const _0x310156=a191_0x3101();let _0x41a052=_0x310156[_0x2ccaef];return _0x41a052;}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':'POST','path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a191_0x17acb3(0xe5),'command':'visibility-update','description':a191_0x17acb3(0x107),'risk':a191_0x17acb3(0xfc),'structuredErrors':!![],'flags':[{'name':a191_0x17acb3(0xcb),'type':a191_0x17acb3(0xf9),'description':a191_0x17acb3(0xc9)},{'name':a191_0x17acb3(0x10d),'type':a191_0x17acb3(0xf9),'description':a191_0x17acb3(0x125)},{'name':a191_0x17acb3(0x126),'type':a191_0x17acb3(0xe9),'required':!![],'description':a191_0x17acb3(0x119)},{'name':a191_0x17acb3(0xf7),'type':a191_0x17acb3(0xe9),'description':a191_0x17acb3(0xca)},{'name':'expected-count','type':'number','description':a191_0x17acb3(0xc8)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x29f14f){parseInput(_0x29f14f);},async 'dryRun'(_0x4975f){const _0x33efdb=a191_0x17acb3,_0x5cc447=await buildPlan(_0x4975f,!![]),_0x3a0bba=_0x5cc447[_0x33efdb(0x118)]['plannedActions']?.['length']??0x0,_0x33e107=_0x5cc447['plan'][_0x33efdb(0x11d)][_0x33efdb(0xc0)]-_0x3a0bba;return menuDryRunResult(_0x5cc447[_0x33efdb(0x118)],{'method':_0x33efdb(0xdc),'url':'/smartapi/menu/update','body':{'updates':_0x5cc447[_0x33efdb(0x118)][_0x33efdb(0x106)]?.[_0x33efdb(0x12f)](_0x2fa9e5=>_0x2fa9e5[_0x33efdb(0x12b)])??[]},'description':_0x33efdb(0xef)+_0x3a0bba+_0x33efdb(0x13a)+_0x33e107+_0x33efdb(0x10e)});},async 'execute'(_0x3345e0){const _0x3512e2=a191_0x17acb3,_0x1dfa8f=await buildPlan(_0x3345e0,![]);await recheckMutationSnapshot(_0x3345e0,_0x1dfa8f[_0x3512e2(0x118)],'update\x20menu\x20visibility');const _0x4be46b=[],_0x2c021d=[],_0x15c557=[];for(const _0x314691 of _0x1dfa8f[_0x3512e2(0x118)][_0x3512e2(0x11d)]){if(_0x314691[_0x3512e2(0x104)][_0x3512e2(0x126)]===_0x1dfa8f['plan'][_0x3512e2(0xc5)]){_0x4be46b['push']({'id':_0x314691['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x3345e0[_0x3512e2(0xcf)],_0x3345e0['cookie'],{'id':_0x314691['id'],'visible':_0x1dfa8f['plan'][_0x3512e2(0xc5)]}),_0x4be46b[_0x3512e2(0x10c)]({'id':_0x314691['id'],'updated':!![],'skipped':![]});}catch(_0x1e9958){const _0x3ca188=mapMenuApiError(_0x1e9958,_0x3512e2(0x124),_0x314691['id']);if(isMenuResponseLoss(_0x1e9958)&&_0x3ca188[_0x3512e2(0x121)]!==_0x3512e2(0xf2)){_0x15c557[_0x3512e2(0x10c)](_0x314691['id']);continue;}_0x2c021d[_0x3512e2(0x10c)]({'id':_0x314691['id'],'stage':_0x3512e2(0x12e),'code':_0x3ca188[_0x3512e2(0x121)],'message':_0x3ca188[_0x3512e2(0x101)]});}}let _0x63b3cf;try{_0x63b3cf=await fetchMenuSnapshot(_0x3345e0[_0x3512e2(0xcf)],_0x3345e0[_0x3512e2(0xc6)]);}catch(_0x10535a){const _0x482585=describeMenuErrorCause(_0x10535a,'verify\x20menu\x20visibility\x20update'),_0xed3081=_0x15c557[_0x3512e2(0x12f)](_0x51dbae=>({'id':_0x51dbae,'stage':_0x3512e2(0xe8),'code':'menu_verification_failed','message':_0x3512e2(0x131)+_0x51dbae+_0x3512e2(0xd9),'requestedStateConfirmed':![],'recovered':![]})),_0x318d04={'stage':_0x3512e2(0xd7),'code':_0x3512e2(0x129),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x1dfa8f[_0x3512e2(0x118)][_0x3512e2(0x11d)]['map'](_0x4e5d34=>_0x4e5d34['id']),'requestedStateConfirmed':![],..._0x482585};throw menuFailure(asVerificationError(_0x10535a,_0x3512e2(0x11c)),_0x1dfa8f[_0x3512e2(0x118)],{'stage':_0x3512e2(0xd7),'succeeded':_0x4be46b,'failedRecords':[..._0x2c021d,..._0xed3081,_0x318d04],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x3512e2(0x108),'recoveredCount':0x0,'lookupCommand':_0x3512e2(0x136)}});}const _0x4614d9=[];for(const _0x48f559 of _0x4be46b){const _0x18161a=Number(_0x48f559['id']),_0x64c6b9=_0x1dfa8f[_0x3512e2(0x13d)][_0x3512e2(0xf5)](_0x18161a),_0x22242e=_0x63b3cf['byId'][_0x3512e2(0xf5)](_0x18161a);try{verifyVisibilityUpdate(_0x64c6b9,_0x22242e,_0x1dfa8f[_0x3512e2(0x118)][_0x3512e2(0xc5)]);}catch(_0x20e1cd){const _0x6cddd1=asVerificationError(_0x20e1cd,_0x3512e2(0xfd)+_0x18161a+_0x3512e2(0xff));_0x4614d9[_0x3512e2(0x10c)]({'id':_0x18161a,'stage':_0x3512e2(0xd7),'code':_0x6cddd1[_0x3512e2(0x121)],'message':_0x6cddd1[_0x3512e2(0x101)],'requestedStateConfirmed':![]});}}for(const _0x14dff9 of _0x15c557){const _0x1423eb=_0x1dfa8f[_0x3512e2(0x13d)]['get'](_0x14dff9),_0x14ea40=_0x63b3cf['byId']['get'](_0x14dff9);try{verifyVisibilityUpdate(_0x1423eb,_0x14ea40,_0x1dfa8f['plan']['requestedVisible']),_0x4be46b[_0x3512e2(0x10c)]({'id':_0x14dff9,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x44fc3a){const _0x5610ed=asVerificationError(_0x44fc3a,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x14dff9+_0x3512e2(0xfe));_0x4614d9[_0x3512e2(0x10c)]({'id':_0x14dff9,'stage':'update-recovery','code':_0x5610ed[_0x3512e2(0x121)],'message':_0x5610ed[_0x3512e2(0x101)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x4614d9[_0x3512e2(0xc0)]>0x0){const _0x2222ca=_0x4614d9[_0x3512e2(0x12f)](_0x5ea7ba=>Number(_0x5ea7ba['id'])),_0x35acc7=_0x4be46b['filter'](_0x2da73c=>_0x2da73c[_0x3512e2(0x130)]===!![])[_0x3512e2(0xc0)],_0x5c491a=menuError(_0x3512e2(0x129),_0x3512e2(0x138)+_0x2222ca[_0x3512e2(0x127)](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x5c491a,_0x1dfa8f[_0x3512e2(0x118)],{'stage':_0x3512e2(0xd7),'succeeded':_0x4be46b,'failedRecords':[..._0x2c021d,..._0x4614d9],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x3512e2(0x108),..._0x2222ca[_0x3512e2(0xc0)]===0x1?{'targetId':_0x2222ca[0x0]}:{'targetIds':_0x2222ca},'recoveredCount':_0x35acc7,'lookupCommand':_0x3512e2(0x136)}});}const _0x5b9dd7=_0x4be46b[_0x3512e2(0xe7)](_0x2edf80=>_0x2edf80[_0x3512e2(0xfb)]===!![])['length'],_0xa883bc=_0x4be46b[_0x3512e2(0xc0)]-_0x5b9dd7,_0x91ef90={..._0x1dfa8f[_0x3512e2(0x118)],'succeeded':_0x4be46b,'failed':_0x2c021d,'warnings':_0x2c021d[_0x3512e2(0xc0)]>0x0?[..._0x1dfa8f['plan'][_0x3512e2(0xd6)],_0x3512e2(0x111)]:_0x1dfa8f['plan']['warnings'],'verification':{'checkedBy':_0x3512e2(0x11f),'snapshotHash':_0x63b3cf[_0x3512e2(0x135)],'matchesRequestedState':_0x2c021d[_0x3512e2(0xc0)]===0x0,'recoveredCount':_0x15c557[_0x3512e2(0xc0)]}};return{'ok':_0x2c021d[_0x3512e2(0xc0)]===0x0,'data':_0x91ef90,'message':_0x2c021d[_0x3512e2(0xc0)]===0x0?'Updated\x20visibility\x20for\x20'+_0x5b9dd7+_0x3512e2(0x100)+_0xa883bc+_0x3512e2(0x10e):_0x3512e2(0x110)+_0x5b9dd7+_0x3512e2(0xd8)+_0xa883bc+'\x20skipped,\x20'+_0x2c021d[_0x3512e2(0xc0)]+_0x3512e2(0xeb)};}};function parseInput(_0xa9e99f){const _0x3228bf=a191_0x17acb3,_0x3c87ee=parseMenuIds(_0xa9e99f[_0x3228bf(0xc7)](_0x3228bf(0xcb))),_0x530f56=parseCsv(_0xa9e99f[_0x3228bf(0xc7)](_0x3228bf(0x10d)));if(_0x3c87ee[_0x3228bf(0xc0)]===0x0&&_0x530f56[_0x3228bf(0xc0)]===0x0)throw CliErrors['validation'](_0x3228bf(0x128));const _0x28a16b=parseBooleanFlag(_0xa9e99f,_0x3228bf(0x126),!![]),_0x325738=parseBooleanFlag(_0xa9e99f,_0x3228bf(0xf7),![]);let _0x3a4bb9;if(hasFlag(_0xa9e99f,_0x3228bf(0xe3))){_0x3a4bb9=_0xa9e99f[_0x3228bf(0x123)](_0x3228bf(0xe3));if(!Number[_0x3228bf(0xd1)](_0x3a4bb9)||_0x3a4bb9<0x0)throw CliErrors[_0x3228bf(0xdf)](_0x3228bf(0x132));}return{'menuIds':_0x3c87ee,'paths':_0x530f56,'visible':_0x28a16b,'expectVisible':_0x325738,'expectedCount':_0x3a4bb9};}async function buildPlan(_0x4558e1,_0x32f57c){const _0x47b41f=a191_0x17acb3,_0x5d3921=parseInput(_0x4558e1),_0x17c6b2=await fetchMutationSnapshot(_0x4558e1,_0x47b41f(0x13e)),_0x10e1d8=selectTargets(_0x17c6b2[_0x47b41f(0xfa)],_0x5d3921[_0x47b41f(0xc4)],_0x5d3921[_0x47b41f(0x10d)]);if(_0x5d3921[_0x47b41f(0x122)]!==undefined&&_0x10e1d8[_0x47b41f(0xc0)]!==_0x5d3921[_0x47b41f(0x122)])throw menuError(_0x47b41f(0x10f),_0x47b41f(0xdb)+_0x10e1d8['length']+_0x47b41f(0x139)+_0x5d3921[_0x47b41f(0x122)]+'.',_0x47b41f(0xcd));if(_0x5d3921[_0x47b41f(0x115)]!==undefined){const _0x3b61cb=_0x10e1d8[_0x47b41f(0xe7)](_0x80fe42=>_0x80fe42[_0x47b41f(0x126)]!==_0x5d3921[_0x47b41f(0x115)]);if(_0x3b61cb[_0x47b41f(0xc0)]>0x0)throw menuError(_0x47b41f(0xd0),_0x47b41f(0x112)+_0x3b61cb[_0x47b41f(0x12f)](_0x53fa04=>_0x53fa04['id'])[_0x47b41f(0x127)](',\x20')+'.',_0x47b41f(0xf0));}const _0x222b96=_0x10e1d8[_0x47b41f(0x12f)](_0x59cd76=>({'id':_0x59cd76['id'],'label':_0x59cd76[_0x47b41f(0x102)],'path':_0x59cd76['path'],'before':{'visible':_0x59cd76[_0x47b41f(0x126)]},'after':{'visible':_0x5d3921['visible']}})),_0xa7f309=_0x222b96[_0x47b41f(0xe7)](_0x14e3e5=>_0x14e3e5[_0x47b41f(0x104)][_0x47b41f(0x126)]!==_0x5d3921[_0x47b41f(0x126)])[_0x47b41f(0x12f)](_0xc8ce3a=>({'stage':_0x47b41f(0x105),'method':'POST','path':_0x47b41f(0xf8),'body':{'appCode':_0x4558e1[_0x47b41f(0xcf)],'id':_0xc8ce3a['id'],'visible':_0x5d3921['visible']}})),_0x33857b=mutationResult({'operation':_0x47b41f(0xe1),'selector':{'menuIds':_0x5d3921[_0x47b41f(0xc4)],'paths':_0x5d3921[_0x47b41f(0x10d)]},'before':{'menus':_0x10e1d8['map'](_0x5818ef=>({'id':_0x5818ef['id'],'path':_0x5818ef['path'],'visible':_0x5818ef[_0x47b41f(0x126)]}))},'after':{'menus':_0x10e1d8['map'](_0x1a7d04=>({'id':_0x1a7d04['id'],'path':_0x1a7d04[_0x47b41f(0x12a)],'visible':_0x5d3921[_0x47b41f(0x126)]}))},'dryRun':_0x32f57c,'backend':[...BACKEND],'plannedActions':_0xa7f309,'snapshotHash':_0x17c6b2[_0x47b41f(0x135)],'warnings':_0xa7f309[_0x47b41f(0xc0)]===0x0?[_0x47b41f(0xe2)]:[]});return{'plan':{..._0x33857b,'requestedVisible':_0x5d3921[_0x47b41f(0x126)],'targets':_0x222b96},'beforeById':new Map(_0x10e1d8['map'](_0x50146e=>[_0x50146e['id'],_0x50146e]))};}function selectTargets(_0xf8fb3,_0x14cc36,_0x12ebfa){const _0x218f0e=a191_0x17acb3,_0x59c35f=new Map(_0xf8fb3['map'](_0x316a51=>[_0x316a51['id'],_0x316a51])),_0x4ce445=new Map(),_0x3a8cb3=_0x14cc36[_0x218f0e(0xe7)](_0x22fea5=>!_0x59c35f[_0x218f0e(0xdd)](_0x22fea5));if(_0x3a8cb3[_0x218f0e(0xc0)]>0x0)throw menuError('menu_selector_not_found','Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x3a8cb3['join'](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x15ab6f of _0x14cc36){_0x4ce445[_0x218f0e(0xda)](_0x15ab6f,_0x59c35f[_0x218f0e(0xf5)](_0x15ab6f));}for(const _0x165997 of _0x12ebfa){const _0x10f49b=_0xf8fb3['filter'](_0xcda646=>_0xcda646[_0x218f0e(0x12a)]===_0x165997);if(_0x10f49b[_0x218f0e(0xc0)]===0x0)throw menuError('menu_selector_not_found',_0x218f0e(0x113)+JSON[_0x218f0e(0xd4)](_0x165997)+'.',_0x218f0e(0x114));if(_0x10f49b[_0x218f0e(0xc0)]>0x1)throw menuError(_0x218f0e(0xf3),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x218f0e(0xd4)](_0x165997)+'.',_0x218f0e(0xd5)+_0x10f49b['map'](_0x4bd042=>_0x4bd042['id'])[_0x218f0e(0x127)](',\x20')+'.');const _0x526ac0=_0x10f49b[0x0];_0x4ce445['set'](_0x526ac0['id'],_0x526ac0);}return[..._0x4ce445[_0x218f0e(0xf4)]()];}function parseMenuIds(_0x22a159){const _0x10d138=a191_0x17acb3,_0x3968ec=parseCsv(_0x22a159),_0x4d156e=_0x3968ec['map'](Number);if(_0x4d156e[_0x10d138(0x13b)](_0x2ea8d6=>!Number['isSafeInteger'](_0x2ea8d6)||_0x2ea8d6<=0x0))throw CliErrors[_0x10d138(0xdf)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x4d156e)];}function parseCsv(_0xcb8005){const _0x43affe=a191_0x17acb3;return[...new Set(_0xcb8005[_0x43affe(0x12c)](',')[_0x43affe(0x12f)](_0x4de1b3=>_0x4de1b3[_0x43affe(0xea)]())[_0x43affe(0xe7)](Boolean))];}function parseBooleanFlag(_0x8e14e7,_0x4600d2,_0x10158e){const _0x259196=a191_0x17acb3;if(!hasFlag(_0x8e14e7,_0x4600d2)){if(_0x10158e)throw CliErrors[_0x259196(0x10a)](_0x4600d2);return undefined;}const _0xf6f7b0=_0x8e14e7[_0x259196(0xec)][_0x4600d2];if(_0xf6f7b0===!![]||_0xf6f7b0===![])return _0xf6f7b0;if(_0xf6f7b0===_0x259196(0xce))return!![];if(_0xf6f7b0===_0x259196(0xcc))return![];throw CliErrors[_0x259196(0xdf)]('--'+_0x4600d2+_0x259196(0x134));}function verifyVisibilityUpdate(_0x3e024c,_0x363391,_0x51bc34){const _0x23db95=a191_0x17acb3;assertVerified(!!_0x363391,_0x23db95(0xfd)+_0x3e024c['id']+_0x23db95(0xf1)),assertVerified(_0x363391[_0x23db95(0x126)]===_0x51bc34,_0x23db95(0xfd)+_0x3e024c['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0xe5a2af=[['id',_0x363391['id'],_0x3e024c['id']],[_0x23db95(0xe0),_0x363391[_0x23db95(0xe0)],_0x3e024c[_0x23db95(0xe0)]],['depth',_0x363391[_0x23db95(0xd2)],_0x3e024c[_0x23db95(0xd2)]],['label',_0x363391['label'],_0x3e024c[_0x23db95(0x102)]],['path',_0x363391[_0x23db95(0x12a)],_0x3e024c['path']],[_0x23db95(0xee),_0x363391[_0x23db95(0xee)],_0x3e024c[_0x23db95(0xee)]],[_0x23db95(0x117),_0x363391[_0x23db95(0x117)],_0x3e024c[_0x23db95(0x117)]],[_0x23db95(0x11a),_0x363391[_0x23db95(0x11a)],_0x3e024c['sort']],[_0x23db95(0xde),_0x363391[_0x23db95(0xde)],_0x3e024c[_0x23db95(0xde)]],[_0x23db95(0x13c),_0x363391[_0x23db95(0x13c)],_0x3e024c[_0x23db95(0x13c)]],['childrenIds',_0x363391['childrenIds'],_0x3e024c[_0x23db95(0x12d)]],['childrenCount',_0x363391[_0x23db95(0x133)],_0x3e024c[_0x23db95(0x133)]],[_0x23db95(0xc2),_0x363391[_0x23db95(0xc2)],_0x3e024c['pageId']],['pageType',_0x363391[_0x23db95(0x103)],_0x3e024c['pageType']],[_0x23db95(0x109),_0x363391[_0x23db95(0x109)],_0x3e024c[_0x23db95(0x109)]],[_0x23db95(0x11e),_0x363391[_0x23db95(0x11e)],_0x3e024c[_0x23db95(0x11e)]],['datasetCode',_0x363391[_0x23db95(0xe4)],_0x3e024c[_0x23db95(0xe4)]]];for(const [_0x49a27a,_0x4764f0,_0x2b93f0]of _0xe5a2af){assertVerified(sameValue(_0x4764f0,_0x2b93f0),_0x23db95(0xfd)+_0x3e024c['id']+'\x20'+_0x49a27a+_0x23db95(0xc3));}}function sameValue(_0x1afcf2,_0x1a8da6){const _0x14c264=a191_0x17acb3;if(Array['isArray'](_0x1afcf2)||Array[_0x14c264(0x116)](_0x1a8da6))return JSON[_0x14c264(0xd4)](_0x1afcf2)===JSON[_0x14c264(0xd4)](_0x1a8da6);return _0x1afcf2===_0x1a8da6;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a192_0x40e158=a192_0xfef7;(function(_0x2370f0,_0x3ec76b){const _0x29a1c6=a192_0xfef7,_0x4a71a6=_0x2370f0();while(!![]){try{const _0xc0556f=parseInt(_0x29a1c6(0x19e))/0x1+parseInt(_0x29a1c6(0x1b3))/0x2+-parseInt(_0x29a1c6(0x1a5))/0x3*(parseInt(_0x29a1c6(0x1b5))/0x4)+parseInt(_0x29a1c6(0x1ad))/0x5+parseInt(_0x29a1c6(0x1ae))/0x6+-parseInt(_0x29a1c6(0x1a9))/0x7*(-parseInt(_0x29a1c6(0x198))/0x8)+-parseInt(_0x29a1c6(0x19f))/0x9;if(_0xc0556f===_0x3ec76b)break;else _0x4a71a6['push'](_0x4a71a6['shift']());}catch(_0x3862a5){_0x4a71a6['push'](_0x4a71a6['shift']());}}}(a192_0x4283,0x2950c));function a192_0xfef7(_0x21f3c2,_0x41ecda){_0x21f3c2=_0x21f3c2-0x196;const _0x4283ec=a192_0x4283();let _0xfef70f=_0x4283ec[_0x21f3c2];return _0xfef70f;}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';const CREATE_PATH=a192_0x40e158(0x19a);async function prepareCreate(_0x383e66){const _0x1abfc3=a192_0x40e158,_0x27327b=await readNotificationDocument(_0x383e66,_0x1abfc3(0x199)),_0x45bfe7=createMutationInput(_0x383e66[_0x1abfc3(0x1a0)],_0x27327b);return{'document':_0x27327b,'input':_0x45bfe7,'planned':projectNotificationConfig({'appCode':_0x383e66[_0x1abfc3(0x1a0)],'configName':_0x27327b['configName'],'channelType':_0x27327b[_0x1abfc3(0x1ac)],'endpointUrl':_0x27327b['endpointUrl'],'channelConfig':_0x27327b['channelConfig'],'description':_0x27327b['description'],'connectTimeout':_0x27327b[_0x1abfc3(0x1a4)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x27327b['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a192_0x4283(){const _0x2ad6dc=['notification_config_create_outcome_unknown','config-create',';\x20do\x20not\x20resubmit.','POST','184126qIamzt','Created\x20notification\x20config\x20','5732RqsyQh','notification','input','planned',';\x20no\x20automatic\x20retry\x20was\x20attempted.','2728HxsCuJ','create','/notification/channel-config/create','verification','document','Inspect\x20with\x20','76010RYByQd','2996847QusJwC','appCode','verified','write','configName','connectTimeout','81OtGdtj','isSafeInteger','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','mutation','917rEtfOp','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','configCode','channelType','272225bbJjnR','1642278bgbFCm'];a192_0x4283=function(){return _0x2ad6dc;};return a192_0x4283();}export const notificationConfigCreate={'service':a192_0x40e158(0x1b6),'command':a192_0x40e158(0x1b0),'description':a192_0x40e158(0x1a7),'risk':a192_0x40e158(0x1a2),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x53fd4e){assertSingleNotificationSource(_0x53fd4e);},async 'dryRun'(_0x563b98){const _0x5448c7=a192_0x40e158,_0x2887a9=await prepareCreate(_0x563b98),_0x3097c3=notificationLookupCommand(_0x563b98[_0x5448c7(0x1a0)],_0x2887a9['document'][_0x5448c7(0x1ac)]);return asDryRunResult({'operation':_0x5448c7(0x199),'selector':{'appCode':_0x563b98[_0x5448c7(0x1a0)],'configName':_0x2887a9[_0x5448c7(0x19c)][_0x5448c7(0x1a3)],'channelType':_0x2887a9[_0x5448c7(0x19c)][_0x5448c7(0x1ac)]},'before':null,'after':_0x2887a9[_0x5448c7(0x196)],'dryRun':!![],'backend':{'method':_0x5448c7(0x1b2),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x5448c7(0x196),'lookupCommand':_0x3097c3}},{'method':_0x5448c7(0x1b2),'url':CREATE_PATH});},async 'execute'(_0xdf93c){const _0x3f0325=a192_0x40e158,_0x299d8d=await prepareCreate(_0xdf93c),_0x855c5e=notificationLookupCommand(_0xdf93c['appCode'],_0x299d8d[_0x3f0325(0x19c)][_0x3f0325(0x1ac)]);let _0x1e3b2c;try{_0x1e3b2c=await createNotificationChannelConfig(_0x299d8d[_0x3f0325(0x1b7)]);}catch(_0x7ae5){if(isPlatformTransportFailure(_0x7ae5))throw notificationError(_0x3f0325(0x1af),'Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.',_0x3f0325(0x19d)+_0x855c5e+_0x3f0325(0x1b1));throw safeApiFailure('create',_0x3f0325(0x1a8),'Inspect\x20with\x20'+_0x855c5e+_0x3f0325(0x197));}if(!Number[_0x3f0325(0x1a6)](_0x1e3b2c)||_0x1e3b2c<=0x0)throw notificationError(_0x3f0325(0x1af),_0x3f0325(0x1aa),_0x3f0325(0x19d)+_0x855c5e+_0x3f0325(0x1b1));let _0x289d2d;try{const _0x5d1b52=await getNotificationChannelConfig(_0x1e3b2c,_0xdf93c['appCode']);_0x289d2d=normalizeExactNotificationConfig(_0x5d1b52,_0x1e3b2c,_0xdf93c['appCode']);}catch{throw safeApiFailure(_0x3f0325(0x199),_0x3f0325(0x19b),_0x3f0325(0x19d)+_0x855c5e+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x3f0325(0x199),'selector':{'appCode':_0x289d2d[_0x3f0325(0x1a0)],'id':_0x289d2d['id'],'configCode':_0x289d2d[_0x3f0325(0x1ab)],'configName':_0x289d2d['configName'],'channelType':_0x289d2d[_0x3f0325(0x1ac)]},'before':null,'after':projectNotificationConfig(_0x289d2d),'dryRun':![],'backend':{'method':_0x3f0325(0x1b2),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3f0325(0x1a1),'lookupCommand':_0x855c5e}},'message':_0x3f0325(0x1b4)+_0x289d2d['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a193_0x30b77c=a193_0x3c83;(function(_0x33000b,_0x13ad34){const _0x543c65=a193_0x3c83,_0x4119ed=_0x33000b();while(!![]){try{const _0x2bae8b=-parseInt(_0x543c65(0x119))/0x1+parseInt(_0x543c65(0x10b))/0x2*(-parseInt(_0x543c65(0x114))/0x3)+-parseInt(_0x543c65(0x11b))/0x4*(-parseInt(_0x543c65(0x111))/0x5)+-parseInt(_0x543c65(0x10a))/0x6*(-parseInt(_0x543c65(0x10d))/0x7)+-parseInt(_0x543c65(0x107))/0x8*(-parseInt(_0x543c65(0x117))/0x9)+-parseInt(_0x543c65(0x10e))/0xa*(parseInt(_0x543c65(0x11c))/0xb)+parseInt(_0x543c65(0x108))/0xc;if(_0x2bae8b===_0x13ad34)break;else _0x4119ed['push'](_0x4119ed['shift']());}catch(_0x3a437c){_0x4119ed['push'](_0x4119ed['shift']());}}}(a193_0x2147,0x6cb04));import{asDryRunResult}from'../../commands/common/dry-run.js';function a193_0x2147(){const _0xd5f8ff=['Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','35645BZRiaX','Inspect\x20with\x20','POST','890952nfqAid','some','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','9wLaEwy','mutation','412996SuxMqT','appCode','460XIOYGK','44pKVEdO','verified',';\x20do\x20not\x20resubmit\x20automatically.','before','delete','/notification/channel-config/delete','\x20delete\x20could\x20not\x20be\x20verified.','planned','config-delete','Notification\x20config\x20','notification_config_delete_verification_failed','notification','channelType','3862024fTirqg','314940WQaUsw','high-risk-write','18UnDmZr','2LjHDfv','notification_config_delete_outcome_unknown','1378979UoJXjf','1911640tIdzOg'];a193_0x2147=function(){return _0xd5f8ff;};return a193_0x2147();}function a193_0x3c83(_0x5cab02,_0x3138a6){_0x5cab02=_0x5cab02-0x100;const _0x214710=a193_0x2147();let _0x3c8392=_0x214710[_0x5cab02];return _0x3c8392;}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_0x30b77c(0x121),REFERENCE_WARNING=a193_0x30b77c(0x10f);async function prepareDelete(_0x2cd978){const _0x41fb82=a193_0x30b77c,_0x5ede00=readNotificationId(_0x2cd978),_0x2ee5b8=await requireExactNotificationConfig(_0x2cd978['appCode'],_0x5ede00,_0x41fb82(0x120));return{'id':_0x5ede00,'before':_0x2ee5b8};}export const notificationConfigDelete={'service':a193_0x30b77c(0x105),'command':a193_0x30b77c(0x102),'description':a193_0x30b77c(0x110),'risk':a193_0x30b77c(0x109),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x5f497e){readNotificationId(_0x5f497e),requireNotificationExplicitYes(_0x5f497e);},async 'dryRun'(_0x2ac991){const _0x50fe80=a193_0x30b77c,_0x194873=await prepareDelete(_0x2ac991),_0x14eae0=notificationLookupCommand(_0x2ac991[_0x50fe80(0x11a)],_0x194873[_0x50fe80(0x11f)][_0x50fe80(0x106)]);return asDryRunResult({'operation':_0x50fe80(0x120),'selector':notificationSelector(_0x194873['before']),'before':projectNotificationConfig(_0x194873['before']),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x50fe80(0x101),'lookupCommand':_0x14eae0}},{'method':_0x50fe80(0x113),'url':DELETE_PATH});},async 'execute'(_0x2d9cf8){const _0x2c121a=a193_0x30b77c;requireNotificationExplicitYes(_0x2d9cf8);const _0x560809=await prepareDelete(_0x2d9cf8),_0x2cd576=notificationLookupCommand(_0x2d9cf8['appCode'],_0x560809['before']['channelType']);let _0x1cf451=![];try{await deleteNotificationChannelConfig(_0x560809['id'],_0x2d9cf8[_0x2c121a(0x11a)]);}catch(_0x171f5f){if(!isPlatformTransportFailure(_0x171f5f))throw safeApiFailure(_0x2c121a(0x120),_0x2c121a(0x118),'Inspect\x20with\x20'+_0x2cd576+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x1cf451=!![];}let _0x47c43e;try{_0x47c43e=await listNotificationChannelConfigs(_0x2d9cf8['appCode'],_0x560809['before'][_0x2c121a(0x106)]),validateNotificationDeleteReadback(_0x47c43e,_0x2d9cf8[_0x2c121a(0x11a)],_0x560809[_0x2c121a(0x11f)][_0x2c121a(0x106)]);}catch{throw notificationError(_0x1cf451?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable','Notification\x20config\x20'+_0x560809['id']+_0x2c121a(0x100),_0x2c121a(0x112)+_0x2cd576+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x47c43e[_0x2c121a(0x115)](_0x597219=>_0x597219['id']===_0x560809['id']))throw notificationError(_0x1cf451?_0x2c121a(0x10c):_0x2c121a(0x104),_0x2c121a(0x103)+_0x560809['id']+'\x20remains\x20present\x20after\x20delete.',_0x2c121a(0x112)+_0x2cd576+_0x2c121a(0x11e));const _0x31af3c=[REFERENCE_WARNING];return _0x1cf451&&_0x31af3c['unshift'](_0x2c121a(0x116)),{'ok':!![],'data':{'operation':_0x2c121a(0x120),'selector':notificationSelector(_0x560809[_0x2c121a(0x11f)]),'before':projectNotificationConfig(_0x560809[_0x2c121a(0x11f)]),'after':null,'dryRun':![],'backend':{'method':_0x2c121a(0x113),'path':DELETE_PATH},'warnings':_0x31af3c,'verification':{'status':_0x2c121a(0x11d),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x1cf451,'lookupCommand':_0x2cd576}},'message':'Deleted\x20notification\x20config\x20'+_0x560809['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a194_0x1772bc=a194_0x5d1c;(function(_0x2841ae,_0x33e840){const _0x26dcf5=a194_0x5d1c,_0x358599=_0x2841ae();while(!![]){try{const _0x3bb9d5=parseInt(_0x26dcf5(0xb7))/0x1+-parseInt(_0x26dcf5(0xa3))/0x2+-parseInt(_0x26dcf5(0xa1))/0x3*(-parseInt(_0x26dcf5(0xb8))/0x4)+-parseInt(_0x26dcf5(0x9f))/0x5+parseInt(_0x26dcf5(0xa4))/0x6+-parseInt(_0x26dcf5(0xbb))/0x7+parseInt(_0x26dcf5(0xac))/0x8;if(_0x3bb9d5===_0x33e840)break;else _0x358599['push'](_0x358599['shift']());}catch(_0x116f7e){_0x358599['push'](_0x358599['shift']());}}}(a194_0x36d8,0x9b24f));function a194_0x36d8(){const _0x473f96=['flat','boolean','length','appCode','\x20notification\x20config(s)','read','string','all','1225568qGrUQL','1750628JTRyfA','bool','map','3126039dVVYRs','1291955eqwuVx','notification','3TdXtTb','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','1233058yCOxMi','1757064WhjECT','type','Found\x20','trim','validation','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','7192pFsIFH','Notification\x20channel\x20type','config-list'];a194_0x36d8=function(){return _0x473f96;};return a194_0x36d8();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a194_0x5d1c(_0x3930c6,_0x49ab9c){_0x3930c6=_0x3930c6-0x9f;const _0x36d89d=a194_0x36d8();let _0x5d1c63=_0x36d89d[_0x3930c6];return _0x5d1c63;}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a194_0x1772bc(0xa0),'command':a194_0x1772bc(0xae),'description':a194_0x1772bc(0xaa),'risk':a194_0x1772bc(0xb4),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a194_0x1772bc(0xa5),'type':a194_0x1772bc(0xb5),'description':a194_0x1772bc(0xad),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':a194_0x1772bc(0xb0),'default':![],'description':a194_0x1772bc(0xa9)}],async 'validate'(_0x29cd5d){const _0x25f3a5=a194_0x1772bc;if(_0x29cd5d[_0x25f3a5(0xb9)](_0x25f3a5(0xb6))&&_0x29cd5d['str'](_0x25f3a5(0xa5))[_0x25f3a5(0xa7)]())throw CliErrors[_0x25f3a5(0xa8)]('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.',_0x25f3a5(0xa2));if(_0x29cd5d['bool'](_0x25f3a5(0xb6)))return;readNotificationChannelType(_0x29cd5d);},async 'execute'(_0x1f0033){const _0x472587=a194_0x1772bc;if(_0x1f0033[_0x472587(0xb9)](_0x472587(0xb6))){const _0x535b41=await Promise[_0x472587(0xb6)](NOTIFICATION_CHANNEL_TYPES[_0x472587(0xba)](_0x321aa4=>listNotificationChannelConfigs(_0x1f0033[_0x472587(0xb2)],_0x321aa4))),_0x5dea53=_0x535b41[_0x472587(0xaf)]()[_0x472587(0xba)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x1f0033[_0x472587(0xb2)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x5dea53['length'],'configs':_0x5dea53},'message':'Found\x20'+_0x5dea53[_0x472587(0xb1)]+_0x472587(0xab)};}const _0x35925e=readNotificationChannelType(_0x1f0033),_0x7ac7e1=await listNotificationChannelConfigs(_0x1f0033['appCode'],_0x35925e),_0x557050=_0x7ac7e1['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x1f0033[_0x472587(0xb2)],'channelType':_0x35925e,'count':_0x557050[_0x472587(0xb1)],'configs':_0x557050},'message':_0x472587(0xa6)+_0x557050[_0x472587(0xb1)]+'\x20'+_0x35925e+_0x472587(0xb3)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a195_0x3d4c(_0x4127f1,_0x36dff6){_0x4127f1=_0x4127f1-0x126;const _0x5514d9=a195_0x5514();let _0x3d4cbf=_0x5514d9[_0x4127f1];return _0x3d4cbf;}const a195_0x4a21e9=a195_0x3d4c;(function(_0x3c4865,_0x1bedeb){const _0x45aac8=a195_0x3d4c,_0x4d54e4=_0x3c4865();while(!![]){try{const _0x1b4235=parseInt(_0x45aac8(0x134))/0x1+parseInt(_0x45aac8(0x144))/0x2*(parseInt(_0x45aac8(0x127))/0x3)+-parseInt(_0x45aac8(0x13b))/0x4+parseInt(_0x45aac8(0x12c))/0x5*(-parseInt(_0x45aac8(0x13e))/0x6)+parseInt(_0x45aac8(0x13d))/0x7+-parseInt(_0x45aac8(0x138))/0x8*(-parseInt(_0x45aac8(0x133))/0x9)+parseInt(_0x45aac8(0x142))/0xa;if(_0x1b4235===_0x1bedeb)break;else _0x4d54e4['push'](_0x4d54e4['shift']());}catch(_0x5bbe0e){_0x4d54e4['push'](_0x4d54e4['shift']());}}}(a195_0x5514,0xbaf04));function a195_0x5514(){const _0x5bbb62=['provesChange','16NIZBMD','Inspect\x20with\x20--id\x20','before','3491680lJQjFf','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','4809889UZqfLh','462Dxtuqs','appCode','Updated\x20notification\x20config\x20','notification_config_update_outcome_unknown','3146730ixKTSM','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','1094NVErfz','config-update','/notification/channel-config/update','verified',';\x20do\x20not\x20resubmit\x20automatically.','POST','planned','1857cVfynz','channelType','update','notification_config_update_verification_unavailable','payload','51725ZtzGzz','\x20via\x20','high-risk-write','notification','Inspect\x20ID\x20','allMatch','Notification\x20config\x20','4608594bLUWBM','70660VBoMqB','mutation','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.'];a195_0x5514=function(){return _0x5bbb62;};return a195_0x5514();}import{asDryRunResult}from'../../commands/common/dry-run.js';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_0x4a21e9(0x146);async function prepareUpdate(_0xf6f835){const _0x2ff391=a195_0x4a21e9,_0x5615ff=readNotificationId(_0xf6f835),_0x5a8703=await readNotificationDocument(_0xf6f835,_0x2ff391(0x129)),_0x28344a=await requireExactNotificationConfig(_0xf6f835[_0x2ff391(0x13f)],_0x5615ff,_0x2ff391(0x129));return{'id':_0x5615ff,'patch':_0x5a8703,'before':_0x28344a,'payload':mergeUpdateInput(_0x28344a,_0x5a8703),'planned':plannedUpdateProjection(_0x28344a,_0x5a8703)};}export const notificationConfigUpdate={'service':a195_0x4a21e9(0x12f),'command':a195_0x4a21e9(0x145),'description':a195_0x4a21e9(0x13c),'risk':a195_0x4a21e9(0x12e),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4e5809){readNotificationId(_0x4e5809),assertSingleNotificationSource(_0x4e5809),requireNotificationExplicitYes(_0x4e5809);},async 'dryRun'(_0x46d7e7){const _0x5bb89f=a195_0x4a21e9,_0x4587f1=await prepareUpdate(_0x46d7e7),_0x8042c=notificationLookupCommand(_0x46d7e7[_0x5bb89f(0x13f)],_0x4587f1[_0x5bb89f(0x13a)][_0x5bb89f(0x128)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x4587f1[_0x5bb89f(0x13a)]),'before':projectNotificationConfig(_0x4587f1[_0x5bb89f(0x13a)]),'after':_0x4587f1[_0x5bb89f(0x126)],'dryRun':!![],'backend':{'method':_0x5bb89f(0x149),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x5bb89f(0x126),'lookupCommand':_0x8042c}},{'method':_0x5bb89f(0x149),'url':UPDATE_PATH});},async 'execute'(_0xabfb49){const _0x212ad4=a195_0x4a21e9;requireNotificationExplicitYes(_0xabfb49);const _0x3c909f=await prepareUpdate(_0xabfb49),_0x293168=notificationLookupCommand(_0xabfb49[_0x212ad4(0x13f)],_0x3c909f[_0x212ad4(0x13a)][_0x212ad4(0x128)]);let _0x2ea8e0=![];try{await updateNotificationChannelConfig(_0x3c909f[_0x212ad4(0x12b)]);}catch(_0x13cce6){if(!isPlatformTransportFailure(_0x13cce6))throw safeApiFailure(_0x212ad4(0x129),_0x212ad4(0x135),_0x212ad4(0x130)+_0x3c909f['id']+'\x20with\x20'+_0x293168+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x2ea8e0=!![];}let _0x49baf1;try{const _0x4a821e=await getNotificationChannelConfig(_0x3c909f['id'],_0xabfb49[_0x212ad4(0x13f)]);_0x49baf1=normalizeExactNotificationConfig(_0x4a821e,_0x3c909f['id'],_0xabfb49['appCode']);}catch{throw notificationError(_0x2ea8e0?_0x212ad4(0x141):_0x212ad4(0x12a),_0x212ad4(0x132)+_0x3c909f['id']+_0x212ad4(0x136),_0x212ad4(0x139)+_0x3c909f['id']+_0x212ad4(0x12d)+_0x293168+_0x212ad4(0x148));}const _0x3965b7=requestedSafeFieldsMatch(_0x3c909f[_0x212ad4(0x13a)],_0x49baf1,_0x3c909f['patch']);if(!_0x3965b7[_0x212ad4(0x131)]||_0x2ea8e0&&!_0x3965b7[_0x212ad4(0x137)])throw notificationError(_0x2ea8e0?'notification_config_update_outcome_unknown':'notification_config_update_verification_failed','Notification\x20config\x20'+_0x3c909f['id']+_0x212ad4(0x143),_0x212ad4(0x139)+_0x3c909f['id']+_0x212ad4(0x12d)+_0x293168+_0x212ad4(0x148));const _0x4a84e8=_0x2ea8e0?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x212ad4(0x129),'selector':notificationSelector(_0x49baf1),'before':projectNotificationConfig(_0x3c909f['before']),'after':projectNotificationConfig(_0x49baf1),'dryRun':![],'backend':{'method':_0x212ad4(0x149),'path':UPDATE_PATH},'warnings':_0x4a84e8,'verification':{'status':_0x212ad4(0x147),'recoveredAfterUnknownResponse':_0x2ea8e0,'verifiedFields':_0x3965b7['verifiedFields'],'lookupCommand':_0x293168}},'message':_0x212ad4(0x140)+_0x49baf1['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a196_0x358e(_0x2c9d34,_0x72a0c0){_0x2c9d34=_0x2c9d34-0x111;const _0x33b194=a196_0x33b1();let _0x358ef2=_0x33b194[_0x2c9d34];return _0x358ef2;}(function(_0x565e47,_0x1574ca){const _0x212183=a196_0x358e,_0x21af23=_0x565e47();while(!![]){try{const _0x163e23=parseInt(_0x212183(0x118))/0x1*(parseInt(_0x212183(0x119))/0x2)+-parseInt(_0x212183(0x114))/0x3+-parseInt(_0x212183(0x116))/0x4+-parseInt(_0x212183(0x112))/0x5*(parseInt(_0x212183(0x117))/0x6)+-parseInt(_0x212183(0x11a))/0x7*(-parseInt(_0x212183(0x113))/0x8)+parseInt(_0x212183(0x115))/0x9+-parseInt(_0x212183(0x111))/0xa*(-parseInt(_0x212183(0x11b))/0xb);if(_0x163e23===_0x1574ca)break;else _0x21af23['push'](_0x21af23['shift']());}catch(_0x1f0458){_0x21af23['push'](_0x21af23['shift']());}}}(a196_0x33b1,0x36e36));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a196_0x33b1(){const _0x507c9f=['7tiwwaW','33JmnczD','923090JMPpEn','15cezWzi','920048kwTeLu','259809KvQvtr','1217007fMQEkh','529268sjeZAD','295578tsBYnh','64375jhubPR','2OpqHcp'];a196_0x33b1=function(){return _0x507c9f;};return a196_0x33b1();}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a197_0x168f92=a197_0x3b06;(function(_0xfaaca2,_0x18bce2){const _0x15df05=a197_0x3b06,_0x13741e=_0xfaaca2();while(!![]){try{const _0x27af8f=parseInt(_0x15df05(0x202))/0x1*(parseInt(_0x15df05(0x229))/0x2)+-parseInt(_0x15df05(0x265))/0x3+-parseInt(_0x15df05(0x253))/0x4+-parseInt(_0x15df05(0x221))/0x5*(parseInt(_0x15df05(0x22f))/0x6)+parseInt(_0x15df05(0x203))/0x7+parseInt(_0x15df05(0x216))/0x8*(parseInt(_0x15df05(0x26c))/0x9)+parseInt(_0x15df05(0x239))/0xa*(parseInt(_0x15df05(0x222))/0xb);if(_0x27af8f===_0x18bce2)break;else _0x13741e['push'](_0x13741e['shift']());}catch(_0x28b16d){_0x13741e['push'](_0x13741e['shift']());}}}(a197_0x5a93,0x9f561));function a197_0x3b06(_0x23ca98,_0x320e3e){_0x23ca98=_0x23ca98-0x1f2;const _0x5a9361=a197_0x5a93();let _0x3b06a5=_0x5a9361[_0x23ca98];return _0x3b06a5;}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_0x168f92(0x23c),a197_0x168f92(0x242),'DINGTALK',a197_0x168f92(0x256),a197_0x168f92(0x1f7)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x168f92(0x20e),a197_0x168f92(0x232),'endpointUrl',a197_0x168f92(0x23d),a197_0x168f92(0x21f),a197_0x168f92(0x204),a197_0x168f92(0x249)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x168f92(0x22b),'configCode','channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x168f92(0x266),'recipients',a197_0x168f92(0x25a),a197_0x168f92(0x228),a197_0x168f92(0x225),a197_0x168f92(0x22c),a197_0x168f92(0x22d),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x168f92(0x218),'type':a197_0x168f92(0x23f),'required':![],'description':a197_0x168f92(0x248)},{'name':a197_0x168f92(0x205),'type':a197_0x168f92(0x24a),'required':![],'default':![],'description':a197_0x168f92(0x213)},{'name':a197_0x168f92(0x1f6),'type':a197_0x168f92(0x23f),'required':![],'description':a197_0x168f92(0x214)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x168f92(0x227),'required':!![],'description':a197_0x168f92(0x23e)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5d8e8a,_0xbaee73,_0x1cfffc){return new CliError(_0x5d8e8a,0x1,_0xbaee73,_0x1cfffc);}export function readNotificationId(_0x5f1b35){const _0x5470a5=a197_0x168f92,_0x5dfcb6=_0x5f1b35[_0x5470a5(0x20a)]('id');if(!Number[_0x5470a5(0x23a)](_0x5dfcb6)||_0x5dfcb6<=0x0)throw notificationError(_0x5470a5(0x224),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x5dfcb6;}export function requireNotificationExplicitYes(_0xc8ed06){const _0x229019=a197_0x168f92;if(_0xc8ed06[_0x229019(0x1fc)](_0x229019(0x208))||_0xc8ed06[_0x229019(0x1fc)](_0x229019(0x243)))return;throw notificationError(_0x229019(0x220),_0x229019(0x233),_0x229019(0x25d));}export function readNotificationChannelType(_0x4fd084,_0x1f2203=a197_0x168f92(0x25c),_0x390988=a197_0x168f92(0x23c)){const _0x2e06e6=a197_0x168f92,_0x26a6c6=_0x4fd084['str'](_0x1f2203)[_0x2e06e6(0x223)]()||_0x390988;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x26a6c6))throw CliErrors[_0x2e06e6(0x245)](_0x2e06e6(0x255)+_0x1f2203+':\x20'+_0x26a6c6,_0x2e06e6(0x1ff)+NOTIFICATION_CHANNEL_TYPES[_0x2e06e6(0x244)](',\x20')+'.');return _0x26a6c6;}export function assertSingleNotificationSource(_0x3aad60){const _0x4b2d26=a197_0x168f92,_0x3aa1dc=[],_0x5646f2=_0x3aad60[_0x4b2d26(0x1f8)]('file')[_0x4b2d26(0x223)]();if(_0x5646f2)_0x3aa1dc[_0x4b2d26(0x247)]({'kind':'file','path':_0x5646f2});if(_0x3aad60[_0x4b2d26(0x1fc)](_0x4b2d26(0x205)))_0x3aa1dc[_0x4b2d26(0x247)]({'kind':_0x4b2d26(0x205)});const _0x41d5d7=_0x3aad60[_0x4b2d26(0x1f8)](_0x4b2d26(0x1f6))[_0x4b2d26(0x223)]();if(_0x41d5d7)_0x3aa1dc['push']({'kind':_0x4b2d26(0x21b),'name':_0x41d5d7});if(_0x3aa1dc['length']===0x0)throw CliErrors[_0x4b2d26(0x245)](_0x4b2d26(0x23b),_0x4b2d26(0x211));if(_0x3aa1dc[_0x4b2d26(0x251)]>0x1)throw CliErrors[_0x4b2d26(0x245)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x4b2d26(0x211));return _0x3aa1dc[0x0];}export async function readNotificationDocument(_0xfe41b3,_0x768cce){const _0x2ede71=a197_0x168f92,_0x45f00e=assertSingleNotificationSource(_0xfe41b3),_0x190890=_0x45f00e[_0x2ede71(0x264)]==='file'?_0x2ede71(0x262)+_0x45f00e['path']:_0x45f00e['kind']===_0x2ede71(0x21b)?_0x2ede71(0x261)+_0x45f00e['name']:_0x2ede71(0x205);let _0x36fbd9;try{if(_0x45f00e['kind']===_0x2ede71(0x218))_0x36fbd9=await readFile(_0x45f00e[_0x2ede71(0x1f9)],_0x2ede71(0x24f));else{if(_0x45f00e[_0x2ede71(0x264)]===_0x2ede71(0x21b)){if(!(_0x45f00e[_0x2ede71(0x246)]in process.env))throw notificationError(_0x2ede71(0x1f2),'Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x45f00e[_0x2ede71(0x246)]);_0x36fbd9=process.env[_0x45f00e.name]??'';}else _0x36fbd9=await readStdin();}}catch(_0x77b5e0){if(_0x77b5e0 instanceof CliError)throw _0x77b5e0;throw notificationError(_0x2ede71(0x1f2),_0x2ede71(0x20b)+_0x190890+'.');}let _0x2c8a95;try{_0x2c8a95=JSON[_0x2ede71(0x1f5)](_0x36fbd9);}catch{throw notificationError(_0x2ede71(0x231),_0x2ede71(0x1fd)+_0x190890+_0x2ede71(0x241),_0x2ede71(0x240));}if(!isJsonObject(_0x2c8a95))throw notificationError(_0x2ede71(0x231),_0x2ede71(0x1fd)+_0x190890+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x2c8a95,_0x768cce);}export function projectNotificationListConfig(_0x533d4b,_0x206d86){const _0x508011=a197_0x168f92;return{'id':typeof _0x533d4b['id']===_0x508011(0x227)?_0x533d4b['id']:null,'configCode':requireResponseString(_0x533d4b[_0x508011(0x24c)],_0x508011(0x24c),_0x206d86),'configName':requireResponseString(_0x533d4b[_0x508011(0x20e)],_0x508011(0x20e),_0x206d86),'channelType':requireResponseString(_0x533d4b[_0x508011(0x232)],_0x508011(0x232),_0x206d86),'description':normalizeNullableString(_0x533d4b['description']),'createTime':normalizeNullableString(_0x533d4b['createTime']),'updateTime':normalizeNullableString(_0x533d4b['updateTime'])};}export function normalizeExactNotificationConfig(_0x120647,_0x3e0abc,_0x23f010){const _0x5d5a0d=a197_0x168f92;if(!Number[_0x5d5a0d(0x23a)](_0x120647['id'])||_0x120647['id']!==_0x3e0abc)throw notificationError(_0x5d5a0d(0x26f),_0x5d5a0d(0x24d)+_0x3e0abc+'.');if(_0x120647[_0x5d5a0d(0x22b)]!==_0x23f010)throw notificationError(_0x5d5a0d(0x26f),_0x5d5a0d(0x257)+_0x3e0abc+_0x5d5a0d(0x206));const _0x925337=requireExactString(_0x120647['configName'],_0x5d5a0d(0x20e),_0x3e0abc),_0x3848c5=requireExactString(_0x120647['configCode'],'configCode',_0x3e0abc),_0x5d7b49=requireExactString(_0x120647['channelType'],_0x5d5a0d(0x232),_0x3e0abc);if(!NOTIFICATION_CHANNEL_TYPES[_0x5d5a0d(0x200)](_0x5d7b49))throw notificationError(_0x5d5a0d(0x26f),'Notification\x20config\x20'+_0x3e0abc+'\x20has\x20an\x20unsupported\x20channelType.');const _0x43271c=responseNullableString(_0x120647[_0x5d5a0d(0x1f3)],_0x5d5a0d(0x1f3),_0x3e0abc),_0x165a65=responseNullableString(_0x120647[_0x5d5a0d(0x23d)],'channelConfig',_0x3e0abc),_0x2cc229=responseNullableString(_0x120647[_0x5d5a0d(0x21f)],'description',_0x3e0abc),_0x15e4bf=responseNullableTimeout(_0x120647[_0x5d5a0d(0x204)],_0x5d5a0d(0x204),_0x3e0abc),_0x5bf752=responseNullableTimeout(_0x120647[_0x5d5a0d(0x249)],_0x5d5a0d(0x249),_0x3e0abc);return{'id':_0x3e0abc,'appCode':_0x23f010,'configCode':_0x3848c5,'configName':_0x925337,'channelType':_0x5d7b49,'endpointUrl':redactSensitive(_0x43271c),'channelConfig':redactSensitive(_0x165a65),'description':_0x2cc229,'connectTimeout':_0x15e4bf,'readTimeout':_0x5bf752,'endpointUrlRaw':_0x43271c,'channelConfigRaw':_0x165a65};}export async function requireExactNotificationConfig(_0x216d8b,_0x1f9427,_0x446cef){const _0x4e0c64=a197_0x168f92;let _0x262047;try{_0x262047=await getNotificationChannelConfig(_0x1f9427,_0x216d8b);}catch{throw safeApiFailure(_0x446cef,_0x4e0c64(0x24e),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x216d8b+_0x4e0c64(0x21d));}return normalizeExactNotificationConfig(_0x262047,_0x1f9427,_0x216d8b);}function a197_0x5a93(){const _0x41d83a=['Invalid\x20--','WECOM','Notification\x20config\x20','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','every','ccList','Invalid\x20notification\x20config\x20response.','type','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','channelConfigRaw','\x20--format\x20compress','isArray','environment\x20variable\x20','file\x20','has','kind','2541765NVVwXa','emailTargets','setEncoding','endpointUrl:null','\x20failed.','keys','\x20has\x20an\x20invalid\x20channelType.','869598MuIrAH','a\x20JSON\x20object','\x20--type\x20','notification_config_response_invalid','notification_config_source_unavailable','endpointUrl','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','parse','from-env','WEBHOOK','str','path','Notification\x20JSON\x20field\x20\x22','\x22\x20must\x20be\x20a\x20non-empty\x20string.','bool','Notification\x20JSON\x20from\x20','Create\x20JSON\x20requires\x20field\x20','Allowed\x20values:\x20','includes','prototype','19213ErvCcm','7776419Zgnlea','connectTimeout','stdin','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x20is\x20missing\x20required\x20field\x20\x22','dry-run','_unavailable','num','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','stringify','a\x20supported\x20string','configName','\x20has\x20an\x20invalid\x20id.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','<redacted>','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','notification_config_update_empty','88UAQlII','notification_config_field_required','file','rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20has\x20invalid\x20field\x20\x22','env','endpointUrlRaw','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','call','description','notification_config_confirmation_required','388145NmYYRP','2101oJbIym','trim','notification_config_id_invalid','replyTo','notification_config_field_invalid','number','bccList','26fPKZld','messageTemplate','appCode','subjectPrefix','fromName','apiError','90UxVloe','create','notification_config_json_invalid','channelType','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','\x22channelType\x22.','mutation','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x22\x20cannot\x20exceed\x20','Notification\x20config\x20list\x20item\x20','60510ObMmWF','isSafeInteger','Missing\x20notification\x20JSON\x20source.','EMAIL','channelConfig','Application-level\x20notification\x20config\x20ID','string','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x20is\x20invalid.','FEISHU','yes','join','validation','name','push','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','readTimeout','boolean','a\x20non-empty\x20string','configCode','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','preflight','utf8','\x22configName\x22.','length','object','3659752wCgPbT','\x20characters.'];a197_0x5a93=function(){return _0x41d83a;};return a197_0x5a93();}export function projectNotificationConfig(_0x334c74){const _0x56c538=a197_0x168f92;return{'id':_0x334c74['id']??null,'appCode':_0x334c74[_0x56c538(0x22b)],'configCode':_0x334c74['configCode']??null,'configName':_0x334c74[_0x56c538(0x20e)],'channelType':_0x334c74[_0x56c538(0x232)],'endpointUrl':redactSensitive(_0x334c74['endpointUrl']),'channelConfig':redactSensitive(_0x334c74[_0x56c538(0x23d)]),'description':_0x334c74[_0x56c538(0x21f)]??null,'connectTimeout':_0x334c74[_0x56c538(0x204)]??null,'readTimeout':_0x334c74[_0x56c538(0x249)]??null};}export function notificationSelector(_0x1f3552){const _0x175d08=a197_0x168f92;return{'appCode':_0x1f3552[_0x175d08(0x22b)],'id':_0x1f3552['id'],'configCode':_0x1f3552[_0x175d08(0x24c)],'configName':_0x1f3552[_0x175d08(0x20e)],'channelType':_0x1f3552[_0x175d08(0x232)]};}export function createMutationInput(_0x37d984,_0x4342c5){const _0x20fd67=a197_0x168f92;return{'appCode':_0x37d984,'configName':_0x4342c5[_0x20fd67(0x20e)],'channelType':_0x4342c5[_0x20fd67(0x232)],...hasOwn(_0x4342c5,_0x20fd67(0x1f3))?{'endpointUrl':_0x4342c5[_0x20fd67(0x1f3)]}:{},...hasOwn(_0x4342c5,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x4342c5[_0x20fd67(0x23d)])}:{},...hasOwn(_0x4342c5,_0x20fd67(0x21f))?{'description':_0x4342c5[_0x20fd67(0x21f)]}:{},...hasOwn(_0x4342c5,'connectTimeout')?{'connectTimeout':_0x4342c5[_0x20fd67(0x204)]}:{},...hasOwn(_0x4342c5,_0x20fd67(0x249))?{'readTimeout':_0x4342c5[_0x20fd67(0x249)]}:{}};}export function mergeUpdateInput(_0x44d235,_0x585a42){const _0x4ce6ef=a197_0x168f92;return{'id':_0x44d235['id'],'appCode':_0x44d235[_0x4ce6ef(0x22b)],'configName':_0x585a42['configName']??_0x44d235['configName'],'channelType':_0x585a42[_0x4ce6ef(0x232)]??_0x44d235['channelType'],'endpointUrl':hasOwn(_0x585a42,'endpointUrl')?_0x585a42[_0x4ce6ef(0x1f3)]:_0x44d235[_0x4ce6ef(0x21c)],'channelConfig':hasOwn(_0x585a42,_0x4ce6ef(0x23d))?serializeChannelConfig(_0x585a42[_0x4ce6ef(0x23d)]):_0x44d235[_0x4ce6ef(0x25e)],'description':hasOwn(_0x585a42,'description')?_0x585a42[_0x4ce6ef(0x21f)]:_0x44d235[_0x4ce6ef(0x21f)],'connectTimeout':hasOwn(_0x585a42,_0x4ce6ef(0x204))?_0x585a42[_0x4ce6ef(0x204)]:_0x44d235[_0x4ce6ef(0x204)],'readTimeout':hasOwn(_0x585a42,_0x4ce6ef(0x249))?_0x585a42['readTimeout']:_0x44d235[_0x4ce6ef(0x249)]};}export function plannedUpdateProjection(_0x1bef57,_0x23096a){const _0x10960f=a197_0x168f92;return projectNotificationConfig({'id':_0x1bef57['id'],'appCode':_0x1bef57['appCode'],'configCode':_0x1bef57[_0x10960f(0x24c)],'configName':_0x23096a[_0x10960f(0x20e)]??_0x1bef57[_0x10960f(0x20e)],'channelType':_0x23096a[_0x10960f(0x232)]??_0x1bef57['channelType'],'endpointUrl':hasOwn(_0x23096a,_0x10960f(0x1f3))?_0x23096a[_0x10960f(0x1f3)]:_0x1bef57[_0x10960f(0x21c)],'channelConfig':hasOwn(_0x23096a,_0x10960f(0x23d))?_0x23096a[_0x10960f(0x23d)]:_0x1bef57[_0x10960f(0x25e)],'description':hasOwn(_0x23096a,_0x10960f(0x21f))?_0x23096a[_0x10960f(0x21f)]:_0x1bef57[_0x10960f(0x21f)],'connectTimeout':hasOwn(_0x23096a,_0x10960f(0x204))?_0x23096a[_0x10960f(0x204)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x1bef57[_0x10960f(0x204)],'readTimeout':hasOwn(_0x23096a,_0x10960f(0x249))?_0x23096a['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x1bef57[_0x10960f(0x249)]});}export function requestedSafeFieldsMatch(_0x1b5e84,_0x43ef91,_0x555d7c){const _0x40ebef=a197_0x168f92,_0x18eaf6=[],_0x350fac=[],_0x5b3874=[];for(const _0x2c0b8e of[_0x40ebef(0x20e),'channelType',_0x40ebef(0x21f)]){if(!hasOwn(_0x555d7c,_0x2c0b8e))continue;_0x5b3874['push'](_0x2c0b8e),_0x18eaf6['push'](_0x43ef91[_0x2c0b8e]===_0x555d7c[_0x2c0b8e]),_0x350fac['push'](_0x1b5e84[_0x2c0b8e]!==_0x555d7c[_0x2c0b8e]&&_0x43ef91[_0x2c0b8e]===_0x555d7c[_0x2c0b8e]);}for(const _0x4e34c5 of['connectTimeout','readTimeout']){if(!hasOwn(_0x555d7c,_0x4e34c5))continue;const _0x304ab5=_0x555d7c[_0x4e34c5]??(_0x4e34c5===_0x40ebef(0x204)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x5b3874[_0x40ebef(0x247)](_0x4e34c5),_0x18eaf6[_0x40ebef(0x247)](_0x43ef91[_0x4e34c5]===_0x304ab5),_0x350fac[_0x40ebef(0x247)](_0x1b5e84[_0x4e34c5]!==_0x304ab5&&_0x43ef91[_0x4e34c5]===_0x304ab5);}return hasOwn(_0x555d7c,_0x40ebef(0x1f3))&&_0x555d7c[_0x40ebef(0x1f3)]===null&&(_0x5b3874[_0x40ebef(0x247)](_0x40ebef(0x268)),_0x18eaf6['push'](_0x43ef91[_0x40ebef(0x21c)]===null||_0x43ef91[_0x40ebef(0x21c)]===''),_0x350fac[_0x40ebef(0x247)](_0x1b5e84[_0x40ebef(0x21c)]!==null&&_0x1b5e84[_0x40ebef(0x21c)]!==''&&(_0x43ef91['endpointUrlRaw']===null||_0x43ef91[_0x40ebef(0x21c)]===''))),{'allMatch':_0x18eaf6[_0x40ebef(0x259)](Boolean),'provesChange':_0x350fac['some'](Boolean),'verifiedFields':_0x5b3874};}export function validateNotificationDeleteReadback(_0x40d470,_0x56b71f,_0xb543e9){const _0xb4ee89=a197_0x168f92;for(const [_0xebb45f,_0x5cb49f]of _0x40d470['entries']()){if(!Number[_0xb4ee89(0x23a)](_0x5cb49f['id'])||_0x5cb49f['id']<=0x0)throw notificationError(_0xb4ee89(0x26f),_0xb4ee89(0x238)+(_0xebb45f+0x1)+_0xb4ee89(0x20f));if(_0x5cb49f[_0xb4ee89(0x22b)]!==_0x56b71f)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0xebb45f+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x5cb49f[_0xb4ee89(0x232)]!==_0xb543e9)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0xebb45f+0x1)+_0xb4ee89(0x26b));}}export function safeApiFailure(_0x29e72c,_0x4500f9,_0x2320c4){const _0x55b59c=a197_0x168f92;return notificationError('notification_config_'+_0x29e72c+'_'+(_0x4500f9===_0x55b59c(0x235)?'failed':_0x4500f9+_0x55b59c(0x209)),'Notification\x20config\x20'+_0x29e72c+'\x20'+_0x4500f9+_0x55b59c(0x269),_0x2320c4);}export function notificationLookupCommand(_0x186924,_0x4d324e){const _0x1ded86=a197_0x168f92;return _0x1ded86(0x219)+_0x186924+_0x1ded86(0x26e)+_0x4d324e+_0x1ded86(0x25f);}function validateNotificationDocument(_0x125aa1,_0x26396e){const _0x41297b=a197_0x168f92;for(const _0x36a61b of Object[_0x41297b(0x26a)](_0x125aa1)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x36a61b))throw notificationError('notification_config_field_forbidden',_0x41297b(0x1fa)+_0x36a61b+_0x41297b(0x210));if(!ALLOWED_INPUT_FIELDS[_0x41297b(0x263)](_0x36a61b))throw notificationError('notification_config_field_unknown','Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x36a61b+'\x22.');}if(_0x26396e==='update'&&Object[_0x41297b(0x26a)](_0x125aa1)[_0x41297b(0x251)]===0x0)throw notificationError(_0x41297b(0x215),_0x41297b(0x1f4));const _0x5351e2={};if(hasOwn(_0x125aa1,'configName'))_0x5351e2['configName']=validateRequiredString(_0x125aa1[_0x41297b(0x20e)],_0x41297b(0x20e),0x80);else{if(_0x26396e===_0x41297b(0x230))throw notificationError(_0x41297b(0x217),'Create\x20JSON\x20requires\x20field\x20'+_0x41297b(0x250));}if(hasOwn(_0x125aa1,'channelType')){if(typeof _0x125aa1['channelType']!==_0x41297b(0x23f))throw invalidFieldType(_0x41297b(0x232),_0x41297b(0x20d));const _0xff8ca=_0x125aa1['channelType']['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x41297b(0x200)](_0xff8ca))throw notificationError(_0x41297b(0x226),_0x41297b(0x236),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x5351e2[_0x41297b(0x232)]=_0xff8ca;}else{if(_0x26396e===_0x41297b(0x230))throw notificationError(_0x41297b(0x217),_0x41297b(0x1fe)+_0x41297b(0x234));}for(const [_0x5c3c02,_0x2fbe8a]of[['endpointUrl',0x200],['description',0x100]]){if(!hasOwn(_0x125aa1,_0x5c3c02))continue;const _0x5b9266=_0x125aa1[_0x5c3c02];if(_0x5b9266!==null&&typeof _0x5b9266!==_0x41297b(0x23f))throw invalidFieldType(_0x5c3c02,'a\x20string\x20or\x20null');if(typeof _0x5b9266===_0x41297b(0x23f)&&_0x5b9266[_0x41297b(0x251)]>_0x2fbe8a)throw notificationError('notification_config_field_invalid',_0x41297b(0x1fa)+_0x5c3c02+'\x22\x20cannot\x20exceed\x20'+_0x2fbe8a+_0x41297b(0x254));_0x5351e2[_0x5c3c02]=_0x5b9266;}if(hasOwn(_0x125aa1,_0x41297b(0x23d))){const _0x9aaec=_0x125aa1['channelConfig'];if(_0x9aaec===null&&_0x26396e===_0x41297b(0x230))throw invalidFieldType(_0x41297b(0x23d),_0x41297b(0x26d));if(_0x9aaec!==null&&!isJsonObject(_0x9aaec))throw invalidFieldType('channelConfig',_0x26396e==='update'?'a\x20JSON\x20object\x20or\x20null':_0x41297b(0x26d));_0x9aaec!==null&&validateChannelConfigFields(_0x5351e2[_0x41297b(0x232)],_0x9aaec),_0x5351e2[_0x41297b(0x23d)]=_0x9aaec;}for(const _0x24820f of[_0x41297b(0x204),'readTimeout']){if(!hasOwn(_0x125aa1,_0x24820f))continue;const _0x225d94=_0x125aa1[_0x24820f];if(_0x225d94!==null&&(!Number[_0x41297b(0x23a)](_0x225d94)||_0x225d94<0x0))throw notificationError('notification_config_field_invalid',_0x41297b(0x1fa)+_0x24820f+_0x41297b(0x258));_0x5351e2[_0x24820f]=_0x225d94;}return _0x5351e2;}function validateRequiredString(_0x238ebf,_0x3d5d90,_0x4dae39){const _0x43c223=a197_0x168f92;if(typeof _0x238ebf!==_0x43c223(0x23f))throw invalidFieldType(_0x3d5d90,_0x43c223(0x24b));const _0x4f54e2=_0x238ebf[_0x43c223(0x223)]();if(!_0x4f54e2)throw notificationError(_0x43c223(0x226),_0x43c223(0x1fa)+_0x3d5d90+_0x43c223(0x1fb));if(_0x4f54e2[_0x43c223(0x251)]>_0x4dae39)throw notificationError(_0x43c223(0x226),_0x43c223(0x1fa)+_0x3d5d90+_0x43c223(0x237)+_0x4dae39+_0x43c223(0x254));return _0x4f54e2;}function validateChannelConfigFields(_0x215925,_0x454dd3){const _0x2663e4=a197_0x168f92;if(hasOwn(_0x454dd3,_0x2663e4(0x22a)))throw forbiddenChannelConfigField(_0x2663e4(0x22a));if(_0x215925===_0x2663e4(0x23c))for(const _0x1ba70d of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x454dd3,_0x1ba70d))throw forbiddenChannelConfigField(_0x1ba70d);}}function forbiddenChannelConfigField(_0x15774b){return notificationError('notification_config_channel_field_forbidden','Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x15774b+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x59dc13,_0x5835dc){const _0x55e2e8=a197_0x168f92;return notificationError(_0x55e2e8(0x226),_0x55e2e8(0x1fa)+_0x59dc13+'\x22\x20must\x20be\x20'+_0x5835dc+'.');}function serializeChannelConfig(_0x5ecfd0){const _0x55b129=a197_0x168f92;return _0x5ecfd0===null||_0x5ecfd0===undefined?null:JSON[_0x55b129(0x20c)](_0x5ecfd0);}function redactSensitive(_0x377c16){const _0x3945f5=a197_0x168f92;return _0x377c16===null||_0x377c16===undefined||_0x377c16===''?null:_0x3945f5(0x212);}function requireResponseString(_0x178b2e,_0x15cf07,_0x276eff){const _0x94af75=a197_0x168f92;if(typeof _0x178b2e!==_0x94af75(0x23f)||_0x178b2e[_0x94af75(0x223)]()==='')throw CliErrors[_0x94af75(0x22e)](_0x94af75(0x25b),'Item\x20'+(_0x276eff+0x1)+_0x94af75(0x207)+_0x15cf07+'\x22.');return _0x178b2e[_0x94af75(0x223)]();}function requireExactString(_0x55c319,_0x252ed1,_0x2e6df5){const _0x46c759=a197_0x168f92;if(typeof _0x55c319!==_0x46c759(0x23f)||_0x55c319[_0x46c759(0x223)]()==='')throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x2e6df5+_0x46c759(0x207)+_0x252ed1+'\x22.');return _0x55c319[_0x46c759(0x223)]();}function responseNullableString(_0x2c1ed6,_0x3aeaa7,_0x418fab){const _0x159e65=a197_0x168f92;if(_0x2c1ed6===undefined||_0x2c1ed6===null)return null;if(typeof _0x2c1ed6!==_0x159e65(0x23f))throw notificationError(_0x159e65(0x26f),_0x159e65(0x257)+_0x418fab+_0x159e65(0x21a)+_0x3aeaa7+'\x22.');return _0x2c1ed6;}function responseNullableTimeout(_0x28b6ad,_0x20cd13,_0x41d0a4){const _0x1f7e21=a197_0x168f92;if(_0x28b6ad===undefined||_0x28b6ad===null)return null;if(!Number[_0x1f7e21(0x23a)](_0x28b6ad)||_0x28b6ad<0x0)throw notificationError(_0x1f7e21(0x26f),'Notification\x20config\x20'+_0x41d0a4+_0x1f7e21(0x21a)+_0x20cd13+'\x22.');return _0x28b6ad;}function normalizeNullableString(_0x3b8422){return typeof _0x3b8422==='string'?_0x3b8422:null;}function isJsonObject(_0x2d5d3c){const _0x36a13d=a197_0x168f92;return _0x2d5d3c!==null&&typeof _0x2d5d3c===_0x36a13d(0x252)&&!Array[_0x36a13d(0x260)](_0x2d5d3c);}function hasOwn(_0x5ddb82,_0x4ab480){const _0x4d18cf=a197_0x168f92;return Object[_0x4d18cf(0x201)]['hasOwnProperty'][_0x4d18cf(0x21e)](_0x5ddb82,_0x4ab480);}async function readStdin(){const _0x5a8adb=a197_0x168f92;let _0x22f386='';process['stdin'][_0x5a8adb(0x267)]('utf8');for await(const _0x41a803 of process['stdin'])_0x22f386+=_0x41a803;return _0x22f386;}
|
|
1
|
+
const a197_0x3209b2=a197_0x4922;(function(_0x11cf14,_0x2c8f39){const _0x267c78=a197_0x4922,_0x2af69d=_0x11cf14();while(!![]){try{const _0x4bf867=parseInt(_0x267c78(0xf7))/0x1+-parseInt(_0x267c78(0xc7))/0x2*(-parseInt(_0x267c78(0xfb))/0x3)+parseInt(_0x267c78(0x10b))/0x4+parseInt(_0x267c78(0xf0))/0x5*(-parseInt(_0x267c78(0x10e))/0x6)+parseInt(_0x267c78(0x111))/0x7+parseInt(_0x267c78(0xd0))/0x8*(-parseInt(_0x267c78(0xf8))/0x9)+parseInt(_0x267c78(0xdf))/0xa;if(_0x4bf867===_0x2c8f39)break;else _0x2af69d['push'](_0x2af69d['shift']());}catch(_0x3d7c44){_0x2af69d['push'](_0x2af69d['shift']());}}}(a197_0x357c,0x87ff4));import{readFile}from'node:fs/promises';function a197_0x4922(_0x5637cb,_0xcb3be3){_0x5637cb=_0x5637cb-0xc6;const _0x357c6e=a197_0x357c();let _0x4922ef=_0x357c6e[_0x5637cb];return _0x4922ef;}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_0x3209b2(0x137),a197_0x3209b2(0x10c),'DINGTALK',a197_0x3209b2(0xe5),a197_0x3209b2(0xf3)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x3209b2(0xd8),a197_0x3209b2(0x142),'endpointUrl',a197_0x3209b2(0xf5),a197_0x3209b2(0xd2),a197_0x3209b2(0x103),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a197_0x3209b2(0x12a),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x3209b2(0xc8),a197_0x3209b2(0xeb),a197_0x3209b2(0x146),'bccList','replyTo',a197_0x3209b2(0xd3),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x3209b2(0x135),'type':a197_0x3209b2(0x11d),'required':![],'description':a197_0x3209b2(0xe3)},{'name':a197_0x3209b2(0x10d),'type':a197_0x3209b2(0x145),'required':![],'default':![],'description':a197_0x3209b2(0xdb)},{'name':a197_0x3209b2(0xd4),'type':a197_0x3209b2(0x11d),'required':![],'description':a197_0x3209b2(0x112)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x3209b2(0xcc),'required':!![],'description':a197_0x3209b2(0x116)};function a197_0x357c(){const _0x5f3e05=['utf8','isSafeInteger','notification_config_field_invalid','notification_config_update_empty','yes','997576sKRUyf','FEISHU','stdin','1379688ulplqV','\x20has\x20an\x20invalid\x20appCode.','Unknown\x20notification\x20JSON\x20field\x20\x22','4282957mxWeSn','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','\x22\x20cannot\x20exceed\x20','notification_config_json_invalid','environment\x20variable\x20','Application-level\x20notification\x20config\x20ID','notification_config_response_invalid','Notification\x20config\x20list\x20item\x20','\x20has\x20an\x20invalid\x20channelType.','\x20is\x20missing\x20required\x20field\x20\x22','\x20has\x20invalid\x20field\x20\x22','readTimeout','string','\x22\x20must\x20be\x20','str','preflight','\x20characters.','channelConfigRaw','appCode','apiError','dry-run','isArray','Create\x20JSON\x20requires\x20field\x20','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','\x20failed.','configCode','Notification\x20config\x20','keys','a\x20non-empty\x20string','notification_config_confirmation_required','name','includes','endpointUrl','Notification\x20JSON\x20field\x20\x22','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','setEncoding','file','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','EMAIL','kind','call','notification_config_source_unavailable','notification_config_field_required','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','\x20has\x20an\x20invalid\x20id.','\x20--format\x20compress','path','failed','notification_config_field_unknown','channelType','updateTime','file\x20','boolean','ccList','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','trim','4652nJlfSc','emailTargets','notification_config_field_forbidden','\x22\x20is\x20forbidden.','every','number','endpointUrl:null','prototype','object','387848bEVAPy','parse','description','subjectPrefix','from-env','has','length','Notification\x20JSON\x20from\x20','configName','hasOwnProperty','\x20must\x20be\x20an\x20object.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','rabetbase\x20notification\x20config-list\x20--appcode\x20','a\x20JSON\x20object','351470sJADcL','a\x20supported\x20string','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','\x22channelType\x22.','WECOM','env','Invalid\x20--','validation','messageTemplate','push','recipients','a\x20JSON\x20object\x20or\x20null','bool','join','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','15QaBmmY','update','Notification\x20JSON\x20channelConfig\x20field\x20\x22','WEBHOOK','\x20has\x20an\x20unsupported\x20channelType.','channelConfig','stringify','575889iLmTnX','63voRRgr','Item\x20','Notification\x20JSON\x20source\x20is\x20ambiguous.','147ObwPtf','\x20--type\x20','notification_config_id_invalid','num','endpointUrlRaw','Allowed\x20values:\x20','create','notification_config_','connectTimeout','a\x20string\x20or\x20null','type'];a197_0x357c=function(){return _0x5f3e05;};return a197_0x357c();}export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x6859df,_0x25db86,_0x4802bd){return new CliError(_0x6859df,0x1,_0x25db86,_0x4802bd);}export function readNotificationId(_0x2ab48f){const _0x33ae6c=a197_0x3209b2,_0x2669e8=_0x2ab48f[_0x33ae6c(0xfe)]('id');if(!Number[_0x33ae6c(0x107)](_0x2669e8)||_0x2669e8<=0x0)throw notificationError(_0x33ae6c(0xfd),_0x33ae6c(0x128));return _0x2669e8;}export function requireNotificationExplicitYes(_0x24f58f){const _0x42e5f8=a197_0x3209b2;if(_0x24f58f['bool'](_0x42e5f8(0x125))||_0x24f58f[_0x42e5f8(0xed)](_0x42e5f8(0x10a)))return;throw notificationError(_0x42e5f8(0x12e),_0x42e5f8(0xdc),_0x42e5f8(0x148));}export function readNotificationChannelType(_0x54c40c,_0x4c1dab=a197_0x3209b2(0x105),_0x54edb3=a197_0x3209b2(0x137)){const _0x17eb0b=a197_0x3209b2,_0x32c39b=_0x54c40c[_0x17eb0b(0x11f)](_0x4c1dab)[_0x17eb0b(0xc6)]()||_0x54edb3;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x32c39b))throw CliErrors['validation'](_0x17eb0b(0xe7)+_0x4c1dab+':\x20'+_0x32c39b,_0x17eb0b(0x100)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x32c39b;}export function assertSingleNotificationSource(_0x3f372d){const _0x24e148=a197_0x3209b2,_0x32135a=[],_0x2ad923=_0x3f372d[_0x24e148(0x11f)]('file')['trim']();if(_0x2ad923)_0x32135a[_0x24e148(0xea)]({'kind':_0x24e148(0x135),'path':_0x2ad923});if(_0x3f372d['bool']('stdin'))_0x32135a['push']({'kind':_0x24e148(0x10d)});const _0x33aa75=_0x3f372d[_0x24e148(0x11f)]('from-env')[_0x24e148(0xc6)]();if(_0x33aa75)_0x32135a[_0x24e148(0xea)]({'kind':_0x24e148(0xe6),'name':_0x33aa75});if(_0x32135a[_0x24e148(0xd6)]===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x32135a['length']>0x1)throw CliErrors[_0x24e148(0xe8)](_0x24e148(0xfa),_0x24e148(0x13c));return _0x32135a[0x0];}export async function readNotificationDocument(_0x582c59,_0x38aa77){const _0x2029a2=a197_0x3209b2,_0x5c02a5=assertSingleNotificationSource(_0x582c59),_0xa93d18=_0x5c02a5[_0x2029a2(0x138)]==='file'?_0x2029a2(0x144)+_0x5c02a5[_0x2029a2(0x13f)]:_0x5c02a5[_0x2029a2(0x138)]===_0x2029a2(0xe6)?_0x2029a2(0x115)+_0x5c02a5[_0x2029a2(0x12f)]:'stdin';let _0x4d2944;try{if(_0x5c02a5[_0x2029a2(0x138)]==='file')_0x4d2944=await readFile(_0x5c02a5[_0x2029a2(0x13f)],'utf8');else{if(_0x5c02a5[_0x2029a2(0x138)]===_0x2029a2(0xe6)){if(!(_0x5c02a5[_0x2029a2(0x12f)]in process.env))throw notificationError(_0x2029a2(0x13a),'Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x5c02a5[_0x2029a2(0x12f)]);_0x4d2944=process.env[_0x5c02a5.name]??'';}else _0x4d2944=await readStdin();}}catch(_0x365ebf){if(_0x365ebf instanceof CliError)throw _0x365ebf;throw notificationError(_0x2029a2(0x13a),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0xa93d18+'.');}let _0x1ebd47;try{_0x1ebd47=JSON[_0x2029a2(0xd1)](_0x4d2944);}catch{throw notificationError(_0x2029a2(0x114),_0x2029a2(0xd7)+_0xa93d18+'\x20is\x20invalid.','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x1ebd47))throw notificationError(_0x2029a2(0x114),_0x2029a2(0xd7)+_0xa93d18+_0x2029a2(0xda));return validateNotificationDocument(_0x1ebd47,_0x38aa77);}export function projectNotificationListConfig(_0x2fe0fa,_0x393dce){const _0x2052df=a197_0x3209b2;return{'id':typeof _0x2fe0fa['id']===_0x2052df(0xcc)?_0x2fe0fa['id']:null,'configCode':requireResponseString(_0x2fe0fa[_0x2052df(0x12a)],_0x2052df(0x12a),_0x393dce),'configName':requireResponseString(_0x2fe0fa[_0x2052df(0xd8)],_0x2052df(0xd8),_0x393dce),'channelType':requireResponseString(_0x2fe0fa[_0x2052df(0x142)],_0x2052df(0x142),_0x393dce),'description':normalizeNullableString(_0x2fe0fa[_0x2052df(0xd2)]),'createTime':normalizeNullableString(_0x2fe0fa['createTime']),'updateTime':normalizeNullableString(_0x2fe0fa[_0x2052df(0x143)])};}export function normalizeExactNotificationConfig(_0x20b57d,_0x2b5882,_0x10fb4f){const _0x5e6597=a197_0x3209b2;if(!Number[_0x5e6597(0x107)](_0x20b57d['id'])||_0x20b57d['id']!==_0x2b5882)throw notificationError(_0x5e6597(0x117),_0x5e6597(0x133)+_0x2b5882+'.');if(_0x20b57d[_0x5e6597(0x123)]!==_0x10fb4f)throw notificationError('notification_config_response_invalid',_0x5e6597(0x12b)+_0x2b5882+_0x5e6597(0x147));const _0x302781=requireExactString(_0x20b57d['configName'],_0x5e6597(0xd8),_0x2b5882),_0xe5177a=requireExactString(_0x20b57d['configCode'],_0x5e6597(0x12a),_0x2b5882),_0x542ca0=requireExactString(_0x20b57d[_0x5e6597(0x142)],_0x5e6597(0x142),_0x2b5882);if(!NOTIFICATION_CHANNEL_TYPES[_0x5e6597(0x130)](_0x542ca0))throw notificationError(_0x5e6597(0x117),_0x5e6597(0x12b)+_0x2b5882+_0x5e6597(0xf4));const _0x27c405=responseNullableString(_0x20b57d[_0x5e6597(0x131)],'endpointUrl',_0x2b5882),_0x33c726=responseNullableString(_0x20b57d[_0x5e6597(0xf5)],_0x5e6597(0xf5),_0x2b5882),_0x2d2e70=responseNullableString(_0x20b57d['description'],'description',_0x2b5882),_0xeaa1bb=responseNullableTimeout(_0x20b57d[_0x5e6597(0x103)],_0x5e6597(0x103),_0x2b5882),_0x2e7a78=responseNullableTimeout(_0x20b57d['readTimeout'],_0x5e6597(0x11c),_0x2b5882);return{'id':_0x2b5882,'appCode':_0x10fb4f,'configCode':_0xe5177a,'configName':_0x302781,'channelType':_0x542ca0,'endpointUrl':redactSensitive(_0x27c405),'channelConfig':redactSensitive(_0x33c726),'description':_0x2d2e70,'connectTimeout':_0xeaa1bb,'readTimeout':_0x2e7a78,'endpointUrlRaw':_0x27c405,'channelConfigRaw':_0x33c726};}export async function requireExactNotificationConfig(_0x202d83,_0x5de416,_0x1e5cdf){const _0x310f5e=a197_0x3209b2;let _0x2ee5ec;try{_0x2ee5ec=await getNotificationChannelConfig(_0x5de416,_0x202d83);}catch{throw safeApiFailure(_0x1e5cdf,_0x310f5e(0x120),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x202d83+_0x310f5e(0xe1));}return normalizeExactNotificationConfig(_0x2ee5ec,_0x5de416,_0x202d83);}export function projectNotificationConfig(_0x14ac34){const _0x5eb727=a197_0x3209b2;return{'id':_0x14ac34['id']??null,'appCode':_0x14ac34[_0x5eb727(0x123)],'configCode':_0x14ac34[_0x5eb727(0x12a)]??null,'configName':_0x14ac34[_0x5eb727(0xd8)],'channelType':_0x14ac34['channelType'],'endpointUrl':redactSensitive(_0x14ac34[_0x5eb727(0x131)]),'channelConfig':redactSensitive(_0x14ac34[_0x5eb727(0xf5)]),'description':_0x14ac34[_0x5eb727(0xd2)]??null,'connectTimeout':_0x14ac34[_0x5eb727(0x103)]??null,'readTimeout':_0x14ac34[_0x5eb727(0x11c)]??null};}export function notificationSelector(_0x2c0df1){const _0x4083ae=a197_0x3209b2;return{'appCode':_0x2c0df1[_0x4083ae(0x123)],'id':_0x2c0df1['id'],'configCode':_0x2c0df1[_0x4083ae(0x12a)],'configName':_0x2c0df1[_0x4083ae(0xd8)],'channelType':_0x2c0df1[_0x4083ae(0x142)]};}export function createMutationInput(_0x361f39,_0x7ae4d2){const _0x371758=a197_0x3209b2;return{'appCode':_0x361f39,'configName':_0x7ae4d2['configName'],'channelType':_0x7ae4d2[_0x371758(0x142)],...hasOwn(_0x7ae4d2,_0x371758(0x131))?{'endpointUrl':_0x7ae4d2[_0x371758(0x131)]}:{},...hasOwn(_0x7ae4d2,_0x371758(0xf5))?{'channelConfig':serializeChannelConfig(_0x7ae4d2[_0x371758(0xf5)])}:{},...hasOwn(_0x7ae4d2,_0x371758(0xd2))?{'description':_0x7ae4d2[_0x371758(0xd2)]}:{},...hasOwn(_0x7ae4d2,_0x371758(0x103))?{'connectTimeout':_0x7ae4d2[_0x371758(0x103)]}:{},...hasOwn(_0x7ae4d2,_0x371758(0x11c))?{'readTimeout':_0x7ae4d2['readTimeout']}:{}};}export function mergeUpdateInput(_0xf536d2,_0x44c7d5){const _0x121b06=a197_0x3209b2;return{'id':_0xf536d2['id'],'appCode':_0xf536d2[_0x121b06(0x123)],'configName':_0x44c7d5['configName']??_0xf536d2[_0x121b06(0xd8)],'channelType':_0x44c7d5[_0x121b06(0x142)]??_0xf536d2[_0x121b06(0x142)],'endpointUrl':hasOwn(_0x44c7d5,_0x121b06(0x131))?_0x44c7d5['endpointUrl']:_0xf536d2['endpointUrlRaw'],'channelConfig':hasOwn(_0x44c7d5,'channelConfig')?serializeChannelConfig(_0x44c7d5[_0x121b06(0xf5)]):_0xf536d2[_0x121b06(0x122)],'description':hasOwn(_0x44c7d5,_0x121b06(0xd2))?_0x44c7d5[_0x121b06(0xd2)]:_0xf536d2[_0x121b06(0xd2)],'connectTimeout':hasOwn(_0x44c7d5,_0x121b06(0x103))?_0x44c7d5['connectTimeout']:_0xf536d2[_0x121b06(0x103)],'readTimeout':hasOwn(_0x44c7d5,_0x121b06(0x11c))?_0x44c7d5[_0x121b06(0x11c)]:_0xf536d2[_0x121b06(0x11c)]};}export function plannedUpdateProjection(_0x275523,_0x100705){const _0x12c09a=a197_0x3209b2;return projectNotificationConfig({'id':_0x275523['id'],'appCode':_0x275523[_0x12c09a(0x123)],'configCode':_0x275523['configCode'],'configName':_0x100705[_0x12c09a(0xd8)]??_0x275523['configName'],'channelType':_0x100705[_0x12c09a(0x142)]??_0x275523[_0x12c09a(0x142)],'endpointUrl':hasOwn(_0x100705,_0x12c09a(0x131))?_0x100705[_0x12c09a(0x131)]:_0x275523['endpointUrlRaw'],'channelConfig':hasOwn(_0x100705,_0x12c09a(0xf5))?_0x100705[_0x12c09a(0xf5)]:_0x275523[_0x12c09a(0x122)],'description':hasOwn(_0x100705,_0x12c09a(0xd2))?_0x100705[_0x12c09a(0xd2)]:_0x275523[_0x12c09a(0xd2)],'connectTimeout':hasOwn(_0x100705,_0x12c09a(0x103))?_0x100705['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x275523[_0x12c09a(0x103)],'readTimeout':hasOwn(_0x100705,'readTimeout')?_0x100705[_0x12c09a(0x11c)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x275523[_0x12c09a(0x11c)]});}export function requestedSafeFieldsMatch(_0x58bc18,_0x339ba8,_0x3ceaef){const _0x2cd6c0=a197_0x3209b2,_0x21dcb3=[],_0x232aea=[],_0x54d0cc=[];for(const _0x308176 of[_0x2cd6c0(0xd8),_0x2cd6c0(0x142),_0x2cd6c0(0xd2)]){if(!hasOwn(_0x3ceaef,_0x308176))continue;_0x54d0cc[_0x2cd6c0(0xea)](_0x308176),_0x21dcb3[_0x2cd6c0(0xea)](_0x339ba8[_0x308176]===_0x3ceaef[_0x308176]),_0x232aea[_0x2cd6c0(0xea)](_0x58bc18[_0x308176]!==_0x3ceaef[_0x308176]&&_0x339ba8[_0x308176]===_0x3ceaef[_0x308176]);}for(const _0xf75f of['connectTimeout',_0x2cd6c0(0x11c)]){if(!hasOwn(_0x3ceaef,_0xf75f))continue;const _0x1c7437=_0x3ceaef[_0xf75f]??(_0xf75f===_0x2cd6c0(0x103)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x54d0cc[_0x2cd6c0(0xea)](_0xf75f),_0x21dcb3['push'](_0x339ba8[_0xf75f]===_0x1c7437),_0x232aea[_0x2cd6c0(0xea)](_0x58bc18[_0xf75f]!==_0x1c7437&&_0x339ba8[_0xf75f]===_0x1c7437);}return hasOwn(_0x3ceaef,_0x2cd6c0(0x131))&&_0x3ceaef[_0x2cd6c0(0x131)]===null&&(_0x54d0cc[_0x2cd6c0(0xea)](_0x2cd6c0(0xcd)),_0x21dcb3[_0x2cd6c0(0xea)](_0x339ba8[_0x2cd6c0(0xff)]===null||_0x339ba8[_0x2cd6c0(0xff)]===''),_0x232aea[_0x2cd6c0(0xea)](_0x58bc18[_0x2cd6c0(0xff)]!==null&&_0x58bc18['endpointUrlRaw']!==''&&(_0x339ba8['endpointUrlRaw']===null||_0x339ba8['endpointUrlRaw']===''))),{'allMatch':_0x21dcb3[_0x2cd6c0(0xcb)](Boolean),'provesChange':_0x232aea['some'](Boolean),'verifiedFields':_0x54d0cc};}export function validateNotificationDeleteReadback(_0x278c15,_0x18d618,_0x1bd804){const _0x364fad=a197_0x3209b2;for(const [_0x5dfb3b,_0x4e859d]of _0x278c15['entries']()){if(!Number[_0x364fad(0x107)](_0x4e859d['id'])||_0x4e859d['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x364fad(0x118)+(_0x5dfb3b+0x1)+_0x364fad(0x13d));if(_0x4e859d[_0x364fad(0x123)]!==_0x18d618)throw notificationError(_0x364fad(0x117),'Notification\x20config\x20list\x20item\x20'+(_0x5dfb3b+0x1)+_0x364fad(0x10f));if(_0x4e859d[_0x364fad(0x142)]!==_0x1bd804)throw notificationError(_0x364fad(0x117),_0x364fad(0x118)+(_0x5dfb3b+0x1)+_0x364fad(0x119));}}export function safeApiFailure(_0x8dde09,_0x10b39b,_0x1f66bd){const _0x52cd0a=a197_0x3209b2;return notificationError(_0x52cd0a(0x102)+_0x8dde09+'_'+(_0x10b39b==='mutation'?_0x52cd0a(0x140):_0x10b39b+'_unavailable'),'Notification\x20config\x20'+_0x8dde09+'\x20'+_0x10b39b+_0x52cd0a(0x129),_0x1f66bd);}export function notificationLookupCommand(_0x4154b2,_0x55c40d){const _0xbbac73=a197_0x3209b2;return _0xbbac73(0xdd)+_0x4154b2+_0xbbac73(0xfc)+_0x55c40d+_0xbbac73(0x13e);}function validateNotificationDocument(_0x188129,_0x348f27){const _0x460018=a197_0x3209b2;for(const _0x571680 of Object[_0x460018(0x12c)](_0x188129)){if(FORBIDDEN_IDENTITY_FIELDS[_0x460018(0xd5)](_0x571680))throw notificationError(_0x460018(0xc9),_0x460018(0x132)+_0x571680+_0x460018(0x136));if(!ALLOWED_INPUT_FIELDS[_0x460018(0xd5)](_0x571680))throw notificationError(_0x460018(0x141),_0x460018(0x110)+_0x571680+'\x22.');}if(_0x348f27===_0x460018(0xf1)&&Object['keys'](_0x188129)['length']===0x0)throw notificationError(_0x460018(0x109),_0x460018(0xef));const _0x45441b={};if(hasOwn(_0x188129,_0x460018(0xd8)))_0x45441b[_0x460018(0xd8)]=validateRequiredString(_0x188129[_0x460018(0xd8)],_0x460018(0xd8),0x80);else{if(_0x348f27===_0x460018(0x101))throw notificationError(_0x460018(0x13b),_0x460018(0x127)+'\x22configName\x22.');}if(hasOwn(_0x188129,'channelType')){if(typeof _0x188129[_0x460018(0x142)]!==_0x460018(0x11d))throw invalidFieldType(_0x460018(0x142),_0x460018(0xe0));const _0x43a60e=_0x188129[_0x460018(0x142)][_0x460018(0xc6)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x460018(0x130)](_0x43a60e))throw notificationError('notification_config_field_invalid',_0x460018(0xe2),_0x460018(0x100)+NOTIFICATION_CHANNEL_TYPES[_0x460018(0xee)](',\x20')+'.');_0x45441b[_0x460018(0x142)]=_0x43a60e;}else{if(_0x348f27===_0x460018(0x101))throw notificationError(_0x460018(0x13b),'Create\x20JSON\x20requires\x20field\x20'+_0x460018(0xe4));}for(const [_0x1a50cc,_0x491096]of[[_0x460018(0x131),0x200],[_0x460018(0xd2),0x100]]){if(!hasOwn(_0x188129,_0x1a50cc))continue;const _0x223f1a=_0x188129[_0x1a50cc];if(_0x223f1a!==null&&typeof _0x223f1a!=='string')throw invalidFieldType(_0x1a50cc,_0x460018(0x104));if(typeof _0x223f1a===_0x460018(0x11d)&&_0x223f1a['length']>_0x491096)throw notificationError(_0x460018(0x108),'Notification\x20JSON\x20field\x20\x22'+_0x1a50cc+_0x460018(0x113)+_0x491096+_0x460018(0x121));_0x45441b[_0x1a50cc]=_0x223f1a;}if(hasOwn(_0x188129,_0x460018(0xf5))){const _0x431459=_0x188129[_0x460018(0xf5)];if(_0x431459===null&&_0x348f27===_0x460018(0x101))throw invalidFieldType(_0x460018(0xf5),_0x460018(0xde));if(_0x431459!==null&&!isJsonObject(_0x431459))throw invalidFieldType(_0x460018(0xf5),_0x348f27==='update'?_0x460018(0xec):_0x460018(0xde));_0x431459!==null&&validateChannelConfigFields(_0x45441b[_0x460018(0x142)],_0x431459),_0x45441b[_0x460018(0xf5)]=_0x431459;}for(const _0xba149d of[_0x460018(0x103),_0x460018(0x11c)]){if(!hasOwn(_0x188129,_0xba149d))continue;const _0x38567b=_0x188129[_0xba149d];if(_0x38567b!==null&&(!Number[_0x460018(0x107)](_0x38567b)||_0x38567b<0x0))throw notificationError(_0x460018(0x108),_0x460018(0x132)+_0xba149d+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x45441b[_0xba149d]=_0x38567b;}return _0x45441b;}function validateRequiredString(_0x4fcfa2,_0x392bba,_0x4a7d26){const _0x2fafa7=a197_0x3209b2;if(typeof _0x4fcfa2!==_0x2fafa7(0x11d))throw invalidFieldType(_0x392bba,_0x2fafa7(0x12d));const _0x1fe1db=_0x4fcfa2[_0x2fafa7(0xc6)]();if(!_0x1fe1db)throw notificationError(_0x2fafa7(0x108),_0x2fafa7(0x132)+_0x392bba+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x1fe1db[_0x2fafa7(0xd6)]>_0x4a7d26)throw notificationError(_0x2fafa7(0x108),'Notification\x20JSON\x20field\x20\x22'+_0x392bba+'\x22\x20cannot\x20exceed\x20'+_0x4a7d26+_0x2fafa7(0x121));return _0x1fe1db;}function validateChannelConfigFields(_0x2d5236,_0x118e16){const _0x4a7d71=a197_0x3209b2;if(hasOwn(_0x118e16,'messageTemplate'))throw forbiddenChannelConfigField(_0x4a7d71(0xe9));if(_0x2d5236==='EMAIL')for(const _0x1e3dec of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x118e16,_0x1e3dec))throw forbiddenChannelConfigField(_0x1e3dec);}}function forbiddenChannelConfigField(_0x678632){const _0x10f172=a197_0x3209b2;return notificationError('notification_config_channel_field_forbidden',_0x10f172(0xf2)+_0x678632+_0x10f172(0xca));}function invalidFieldType(_0x47d859,_0x4b2d57){const _0x4adecb=a197_0x3209b2;return notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x47d859+_0x4adecb(0x11e)+_0x4b2d57+'.');}function serializeChannelConfig(_0x2a16c5){const _0x2417b3=a197_0x3209b2;return _0x2a16c5===null||_0x2a16c5===undefined?null:JSON[_0x2417b3(0xf6)](_0x2a16c5);}function redactSensitive(_0x154098){return _0x154098===null||_0x154098===undefined||_0x154098===''?null:'<redacted>';}function requireResponseString(_0x1b4d51,_0x394b99,_0x36af23){const _0x3b0cc5=a197_0x3209b2;if(typeof _0x1b4d51!==_0x3b0cc5(0x11d)||_0x1b4d51[_0x3b0cc5(0xc6)]()==='')throw CliErrors[_0x3b0cc5(0x124)]('Invalid\x20notification\x20config\x20response.',_0x3b0cc5(0xf9)+(_0x36af23+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x394b99+'\x22.');return _0x1b4d51[_0x3b0cc5(0xc6)]();}function requireExactString(_0x2a1d23,_0x28ac4c,_0x1a6a7d){const _0x57d729=a197_0x3209b2;if(typeof _0x2a1d23!==_0x57d729(0x11d)||_0x2a1d23[_0x57d729(0xc6)]()==='')throw notificationError(_0x57d729(0x117),_0x57d729(0x12b)+_0x1a6a7d+_0x57d729(0x11a)+_0x28ac4c+'\x22.');return _0x2a1d23[_0x57d729(0xc6)]();}function responseNullableString(_0x4dd0be,_0x49df5f,_0x135597){const _0x1407e2=a197_0x3209b2;if(_0x4dd0be===undefined||_0x4dd0be===null)return null;if(typeof _0x4dd0be!=='string')throw notificationError(_0x1407e2(0x117),'Notification\x20config\x20'+_0x135597+_0x1407e2(0x11b)+_0x49df5f+'\x22.');return _0x4dd0be;}function responseNullableTimeout(_0x3a8cc8,_0x164802,_0x39da20){const _0x414a78=a197_0x3209b2;if(_0x3a8cc8===undefined||_0x3a8cc8===null)return null;if(!Number[_0x414a78(0x107)](_0x3a8cc8)||_0x3a8cc8<0x0)throw notificationError(_0x414a78(0x117),_0x414a78(0x12b)+_0x39da20+_0x414a78(0x11b)+_0x164802+'\x22.');return _0x3a8cc8;}function normalizeNullableString(_0x3f0698){const _0x45e409=a197_0x3209b2;return typeof _0x3f0698===_0x45e409(0x11d)?_0x3f0698:null;}function isJsonObject(_0x56c353){const _0x35c57f=a197_0x3209b2;return _0x56c353!==null&&typeof _0x56c353===_0x35c57f(0xcf)&&!Array[_0x35c57f(0x126)](_0x56c353);}function hasOwn(_0x27fb40,_0x316d16){const _0xba6762=a197_0x3209b2;return Object[_0xba6762(0xce)][_0xba6762(0xd9)][_0xba6762(0x139)](_0x27fb40,_0x316d16);}async function readStdin(){const _0x4ae6be=a197_0x3209b2;let _0x20e592='';process[_0x4ae6be(0x10d)][_0x4ae6be(0x134)](_0x4ae6be(0x106));for await(const _0x58436a of process['stdin'])_0x20e592+=_0x58436a;return _0x20e592;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a198_0x1ec9d9=a198_0x4480;(function(_0x536008,_0x508a95){const _0x17b0b0=a198_0x4480,_0x176209=_0x536008();while(!![]){try{const _0x187323=-parseInt(_0x17b0b0(0x19b))/0x1+parseInt(_0x17b0b0(0x198))/0x2*(parseInt(_0x17b0b0(0x191))/0x3)+parseInt(_0x17b0b0(0x19d))/0x4+parseInt(_0x17b0b0(0x1a8))/0x5*(-parseInt(_0x17b0b0(0x1ac))/0x6)+parseInt(_0x17b0b0(0x197))/0x7+-parseInt(_0x17b0b0(0x18f))/0x8+parseInt(_0x17b0b0(0x199))/0x9;if(_0x187323===_0x508a95)break;else _0x176209['push'](_0x176209['shift']());}catch(_0x147e67){_0x176209['push'](_0x176209['shift']());}}}(a198_0x3be2,0xd9752));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=['invoice',a198_0x1ec9d9(0x190),a198_0x1ec9d9(0x1b1),a198_0x1ec9d9(0x18a)],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x1ec9d9(0x1bd),'general':a198_0x1ec9d9(0x1ab),'form':a198_0x1ec9d9(0x18d),'idCard':a198_0x1ec9d9(0x1a4)},SCENE_FLAG={'name':a198_0x1ec9d9(0x1b7),'type':a198_0x1ec9d9(0x19f),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':'image-file','type':a198_0x1ec9d9(0x19f),'description':a198_0x1ec9d9(0x1a6)},IMAGE_URL_FLAG={'name':'image-url','type':a198_0x1ec9d9(0x19f),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function a198_0x3be2(){const _0x552ee1=['<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','11306505DQoSkE','495376XQvwpg','12776976qrYFzq','str','742491xzljOW','GET','1924028ynMqFI','image-url','string','validation','image-file','invoice','apiError','IdCard','fileName','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','Preview:\x20recognize\x20','41755zSfMAC','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','General','1074ZdIOnb','File\x20upload\x20response\x20missing\x20filePath.','filter','appCode','POST','form','recognize','.\x20Supported\x20scenes:\x20','imageUrl','read','/smartapi/common/queryFileUrl','scene','File\x20URL\x20response\x20missing\x20fileUrl.','/smartapi/common/uploadFile','trim','Unsupported\x20OCR\x20scene:\x20','imageFile','Invoice','fileUrl','idCard','filePath','count','Table','/smartapi/ocr/recognize-text','11028896GBIDKp','general','12VAFrBh','idcard','path','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','toString'];a198_0x3be2=function(){return _0x552ee1;};return a198_0x3be2();}function normalizeScene(_0x50c9da){const _0x30addd=a198_0x1ec9d9,_0xc85269=_0x50c9da[_0x30addd(0x1ba)]()['toLowerCase']();if(_0xc85269===_0x30addd(0x192))return _0x30addd(0x18a);if(_0xc85269===_0x30addd(0x1a2)||_0xc85269===_0x30addd(0x190)||_0xc85269===_0x30addd(0x1b1))return _0xc85269;throw CliErrors[_0x30addd(0x1a0)](_0x30addd(0x1bb)+_0x50c9da+_0x30addd(0x1b3)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x3daf74){const _0x34e5ac=a198_0x1ec9d9,_0x475d04=_0x3daf74[_0x34e5ac(0x19a)](_0x34e5ac(0x1a1))[_0x34e5ac(0x1ba)](),_0x562d22=_0x3daf74[_0x34e5ac(0x19a)](_0x34e5ac(0x19e))['trim']();return{'imageFile':_0x475d04,'imageUrl':_0x562d22,'count':[_0x475d04,_0x562d22][_0x34e5ac(0x1ae)](Boolean)['length']};}function validateInputSelection(_0x4cc9ed){const _0x452667=a198_0x1ec9d9,_0x66aba6=selectedInputs(_0x4cc9ed);if(_0x66aba6[_0x452667(0x18c)]!==0x1)throw CliErrors[_0x452667(0x1a0)](_0x452667(0x194));return _0x66aba6;}function withScene(_0xcc5bb4,_0x45cac6,_0x3fa7e6){const _0x28ee6e=a198_0x1ec9d9;return{..._0xcc5bb4,'scene':_0x45cac6,..._0x3fa7e6?{'sourceFile':{'fileName':_0x3fa7e6[_0x28ee6e(0x1a5)],'filePath':_0x3fa7e6[_0x28ee6e(0x18b)]}}:{}};}function a198_0x4480(_0x1884f3,_0x31eecc){_0x1884f3=_0x1884f3-0x18a;const _0x3be29b=a198_0x3be2();let _0x448031=_0x3be29b[_0x1884f3];return _0x448031;}const ocrRecognize={'service':'ocr','command':a198_0x1ec9d9(0x1b2),'description':a198_0x1ec9d9(0x1a9),'risk':a198_0x1ec9d9(0x1b5),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3f9e64){const _0x2f520f=a198_0x1ec9d9,_0x4a9636=normalizeScene(_0x3f9e64[_0x2f520f(0x19a)]('scene')),_0xc61171=SCENE_TO_LEGACY_TYPE[_0x4a9636],_0x132922=validateInputSelection(_0x3f9e64);if(_0x132922['imageUrl']){const _0xd09fe2=new URLSearchParams({'url':_0x132922[_0x2f520f(0x1b4)],'type':_0xc61171,'appCode':_0x3f9e64['appCode']});return{'method':_0x2f520f(0x19c),'url':'/smartapi/ocr/recognize-text?'+_0xd09fe2[_0x2f520f(0x195)](),'description':_0x2f520f(0x1a7)+_0x4a9636+'\x20OCR\x20from\x20URL'};}const _0x15bfb7=requireDevelopmentUploadFile(_0x132922[_0x2f520f(0x1bc)],_0x2f520f(0x1a1));return{'method':'POST','url':_0x2f520f(0x1b9),'body':{'steps':[{'method':'POST','url':_0x2f520f(0x1b9),'body':{'appCode':_0x3f9e64[_0x2f520f(0x1af)],'multipart':{'file':_0x15bfb7}}},{'method':_0x2f520f(0x1b0),'url':_0x2f520f(0x1b6),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x2f520f(0x19c),'url':_0x2f520f(0x18e),'query':{'appCode':_0x3f9e64[_0x2f520f(0x1af)],'url':_0x2f520f(0x196),'type':_0xc61171}}]},'description':_0x2f520f(0x1aa)+_0x4a9636+'\x20OCR'};},async 'execute'(_0x5c11a7){const _0x35d8da=a198_0x1ec9d9,_0x485fa7=normalizeScene(_0x5c11a7[_0x35d8da(0x19a)](_0x35d8da(0x1b7))),_0x22ece3=SCENE_TO_LEGACY_TYPE[_0x485fa7],_0x57edb0=validateInputSelection(_0x5c11a7);if(_0x57edb0['imageUrl']){const _0x4c6989=await recognizeDevelopmentOcr(_0x5c11a7[_0x35d8da(0x1af)],{'url':_0x57edb0[_0x35d8da(0x1b4)],'type':_0x22ece3});return{'ok':!![],'data':withScene(_0x4c6989,_0x485fa7)};}const _0x357db9=requireDevelopmentUploadFile(_0x57edb0[_0x35d8da(0x1bc)],'image-file'),_0x5a536f=await uploadDevelopmentFile(_0x5c11a7[_0x35d8da(0x1af)],_0x357db9[_0x35d8da(0x193)]);if(!_0x5a536f[_0x35d8da(0x18b)])throw CliErrors['apiError'](_0x35d8da(0x1ad));const _0x257ece=await queryDevelopmentFileUrl(_0x5a536f[_0x35d8da(0x18b)],{'download':![]});if(!_0x257ece[_0x35d8da(0x1be)])throw CliErrors[_0x35d8da(0x1a3)](_0x35d8da(0x1b8));const _0x1b8fa1=await recognizeDevelopmentOcr(_0x5c11a7[_0x35d8da(0x1af)],{'url':_0x257ece[_0x35d8da(0x1be)],'type':_0x22ece3});return{'ok':!![],'data':withScene(_0x1b8fa1,_0x485fa7,_0x5a536f)};}};export const ocrDefinitions=[ocrRecognize];
|