@lovrabet/rabetbase-cli 2.5.10-beta.4 → 2.5.10-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +4 -4
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a190_0x40c0(_0x4c518,_0x3bbf90){_0x4c518=_0x4c518-0x143;const _0x26d2f8=a190_0x26d2();let _0x40c054=_0x26d2f8[_0x4c518];return _0x40c054;}const a190_0x5b55a9=a190_0x40c0;(function(_0x3ca297,_0x1e0848){const _0x5297a8=a190_0x40c0,_0x15d676=_0x3ca297();while(!![]){try{const _0x1b44b9=parseInt(_0x5297a8(0x14e))/0x1+-parseInt(_0x5297a8(0x146))/0x2*(-parseInt(_0x5297a8(0x151))/0x3)+parseInt(_0x5297a8(0x188))/0x4*(parseInt(_0x5297a8(0x177))/0x5)+parseInt(_0x5297a8(0x17f))/0x6+-parseInt(_0x5297a8(0x17a))/0x7+-parseInt(_0x5297a8(0x15e))/0x8*(parseInt(_0x5297a8(0x15c))/0x9)+-parseInt(_0x5297a8(0x179))/0xa;if(_0x1b44b9===_0x1e0848)break;else _0x15d676['push'](_0x15d676['shift']());}catch(_0x2a0217){_0x15d676['push'](_0x15d676['shift']());}}}(a190_0x26d2,0xb0bd6));import a190_0x1eaedc from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a190_0x26d2(){const _0xbdc338=['\x20local\x20microfrontend\x20menu(s).','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','params','\x20menu(s)','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','Menu\x20sync\x20completed:\x20','gray','/smartapi/menu/create','\x20\x20Create\x20','flag','\x20menu(s)...','validation','rawFlags','length','\x20created.','Creating\x20','write','\x20created,\x20','skipped','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','5gfHzHW','paths','14430780hrkrfj','6946562FaFmQB','appCode','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','\x20page(s)','Fetching\x20online\x20menu\x20list...','6942606sDlgsg','Created\x20','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','menu','Menu\x20creation\x20failed','sync','cookie','yes','1622284vQytWD','\x20and\x20CSS:\x20','\x20\x20Cancelled.','POST','Online\x20menu\x20list\x20fetched','yellow','split','targetPages','localPages','2332058HIIgNO','size','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','appName','map','\x20failed.','cyan','jsUrl','1288912TwrzaT','onlinePaths','Would\x20create\x20','3xDHNOv','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Failed\x20to\x20fetch\x20online\x20menu\x20list','trim','selectedAppName','cssUrl','✓\x20Menu\x20sync\x20completed:\x20','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','filter','appcode','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','9sEvGmo','\x20menu(s)\x20with\x20JS:\x20','6865944pgudFo','message','str','\x20menu(s)\x20bound\x20to\x20','created'];a190_0x26d2=function(){return _0xbdc338;};return a190_0x26d2();}import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':a190_0x5b55a9(0x183),'command':a190_0x5b55a9(0x185),'description':'Register\x20local\x20pages\x20as\x20platform\x20menus','risk':a190_0x5b55a9(0x173),'flags':[{'name':a190_0x5b55a9(0x165),'type':'string','description':a190_0x5b55a9(0x15b)+'JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.'},{'name':a190_0x5b55a9(0x178),'type':'string','description':a190_0x5b55a9(0x164)},{'name':a190_0x5b55a9(0x187),'type':'boolean','description':'Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages'}],async 'dryRun'(_0x16691f){const _0x4c9886=a190_0x5b55a9;ensureRunnableContext(_0x16691f[_0x4c9886(0x16f)],_0x16691f['selectedAppName']);const _0x352c44=await runMenuSyncCore(_0x16691f['appCode'],_0x16691f[_0x4c9886(0x186)],parsePaths(_0x16691f['str'](_0x4c9886(0x178))),_0x16691f['str'](_0x4c9886(0x165)),{'dryRun':!![]});return{'method':_0x4c9886(0x18b),'url':_0x4c9886(0x16a),'body':_0x352c44,'description':_0x352c44[_0x4c9886(0x175)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0x4c9886(0x150)+_0x352c44[_0x4c9886(0x144)][_0x4c9886(0x170)]+_0x4c9886(0x163)};},async 'execute'(_0x2afd97){const _0x5e83d7=a190_0x5b55a9;ensureRunnableContext(_0x2afd97['rawFlags'],_0x2afd97[_0x5e83d7(0x155)]);const _0x18bacb=_0x2afd97[_0x5e83d7(0x16c)](_0x5e83d7(0x187)),_0x30e693=_0x2afd97[_0x5e83d7(0x160)]('params'),_0x342e3c=parsePaths(_0x2afd97['str']('paths')),_0xb78187=parseMenuSyncParams(_0x30e693);if(_0x18bacb){const _0x109fe3=await runMenuSyncCore(_0x2afd97[_0x5e83d7(0x17b)],_0x2afd97[_0x5e83d7(0x186)],_0x342e3c,_0x30e693);if(_0x109fe3[_0x5e83d7(0x175)]){const _0x2edd47=getLocalPages();_0x2edd47[_0x5e83d7(0x170)]===0x0?writeCliSideChannelLine(_0x5e83d7(0x181)):writeCliSideChannelLine(_0x5e83d7(0x148));}else writeCliSideChannelLine(_0x5e83d7(0x157)+_0x109fe3[_0x5e83d7(0x162)]+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x109fe3,'message':_0x109fe3[_0x5e83d7(0x175)]?'Menu\x20sync\x20skipped':_0x5e83d7(0x168)+_0x109fe3['created']+_0x5e83d7(0x171)};}if(_0x342e3c[_0x5e83d7(0x170)]>0x0)throw CliErrors[_0x5e83d7(0x16e)](_0x5e83d7(0x167),_0x5e83d7(0x158));if(!isInteractive()&&_0x30e693)throw CliErrors[_0x5e83d7(0x16e)](_0x5e83d7(0x152),_0x5e83d7(0x158));requireInteractive(),writeCliSideChannelLine(_0x5e83d7(0x182));const _0x102c92=startSpinner(_0x5e83d7(0x17e));let _0x2a35dd,_0x1e9c79,_0x2a2ac5;try{const _0xa26e95=await fetchMenuData(_0x2afd97[_0x5e83d7(0x17b)],_0x2afd97[_0x5e83d7(0x186)]);_0x2a35dd=_0xa26e95[_0x5e83d7(0x145)],_0x1e9c79=_0xa26e95[_0x5e83d7(0x14f)],_0x2a2ac5=_0xa26e95['onlineMenuList'],stopSpinner(_0x102c92,_0x5e83d7(0x18c),!![]);}catch(_0x19e0ec){stopSpinner(_0x102c92,_0x5e83d7(0x153),![]);throw CliErrors['validation'](_0x19e0ec instanceof Error?_0x19e0ec[_0x5e83d7(0x15f)]:_0x5e83d7(0x153));}if(_0x2a35dd[_0x5e83d7(0x170)]===0x0)return writeCliSideChannelLine(a190_0x1eaedc[_0x5e83d7(0x18d)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x4926b8=buildCompareRows(_0x2a35dd,_0x1e9c79);writeCliSideChannelLine(renderCompareTable(_0x4926b8)),writeCliSideChannelLine('');const _0x54479a=await selectPages(_0x2a35dd,_0x1e9c79);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0x1eaedc[_0x5e83d7(0x14c)]('\x20\x20✓\x20Selected:\x20'+_0x54479a[_0x5e83d7(0x170)]+_0x5e83d7(0x17d)));const _0x59d10c=_0xb78187[_0x5e83d7(0x14d)]&&_0xb78187[_0x5e83d7(0x156)];if(!_0x59d10c){writeCliSideChannelLine(renderSyncSummary(_0x54479a,_0x1e9c79[_0x5e83d7(0x147)]>0x0));const _0x11f961=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x11f961)return writeCliSideChannelLine(a190_0x1eaedc[_0x5e83d7(0x169)](_0x5e83d7(0x18a))),{'ok':!![]};}let _0x56ccf1=_0xb78187[_0x5e83d7(0x14d)],_0x33c679=_0xb78187[_0x5e83d7(0x156)];!_0x56ccf1&&!_0xb78187[_0x5e83d7(0x149)]&&(_0x56ccf1=await askJsUrl());!_0x33c679&&!_0xb78187[_0x5e83d7(0x149)]&&(_0x33c679=await askCssUrl());const _0x34cec7=await askConfirm(_0xb78187[_0x5e83d7(0x149)]?_0x5e83d7(0x16b)+_0x54479a[_0x5e83d7(0x170)]+_0x5e83d7(0x161)+_0xb78187[_0x5e83d7(0x149)]+'?':'\x20\x20Create\x20'+_0x54479a[_0x5e83d7(0x170)]+_0x5e83d7(0x15d)+_0x56ccf1+_0x5e83d7(0x189)+_0x33c679+'?');if(!_0x34cec7)return writeCliSideChannelLine(a190_0x1eaedc[_0x5e83d7(0x169)](_0x5e83d7(0x18a))),{'ok':!![]};const _0x125f7f=[_0x56ccf1,_0x33c679]['filter'](_0x25a4f6=>Boolean(_0x25a4f6));_0xb78187[_0x5e83d7(0x149)]&&_0x125f7f[_0x5e83d7(0x170)]===0x0&&await assertSharedResourcesConfigured(_0x2afd97['appCode'],_0x2afd97[_0x5e83d7(0x186)],_0xb78187['appName']);const _0x3b9fae=startSpinner(_0x5e83d7(0x172)+_0x54479a[_0x5e83d7(0x170)]+_0x5e83d7(0x16d));try{const _0x300efd=_0x54479a[_0x5e83d7(0x14a)](_0x2c3d27=>resolvePage(_0x2c3d27,_0xb78187,_0x2a2ac5)),_0x3a16f8=await doCreateMenus(_0x2afd97[_0x5e83d7(0x17b)],_0x2afd97[_0x5e83d7(0x186)],_0x300efd,_0x125f7f,_0xb78187[_0x5e83d7(0x149)]?{'appName':_0xb78187[_0x5e83d7(0x149)]}:undefined);return stopSpinner(_0x3b9fae,_0x5e83d7(0x180)+_0x3a16f8['created']+_0x5e83d7(0x166),!![]),{'ok':!![],'data':_0x3a16f8,'message':_0x5e83d7(0x168)+_0x3a16f8[_0x5e83d7(0x162)]+_0x5e83d7(0x174)+_0x3a16f8['failed']+_0x5e83d7(0x14b)};}catch(_0x502802){stopSpinner(_0x3b9fae,_0x5e83d7(0x184),![]);throw CliErrors[_0x5e83d7(0x16e)](_0x502802 instanceof Error?_0x502802['message']:'Menu\x20creation\x20failed');}}};function ensureRunnableContext(_0x7c22d1,_0x44eb03){const _0x20a7c8=a190_0x5b55a9,_0x1049c5=_0x7c22d1[_0x20a7c8(0x15a)]?String(_0x7c22d1[_0x20a7c8(0x15a)])[_0x20a7c8(0x154)]():'';if(!isInProject()&&!_0x44eb03&&!_0x1049c5)throw CliErrors['validation'](_0x20a7c8(0x17c)+_0x20a7c8(0x176));}function parsePaths(_0x5eeedf){const _0x2665b9=a190_0x5b55a9;return[...new Set(_0x5eeedf[_0x2665b9(0x143)](',')[_0x2665b9(0x14a)](_0x2eb296=>_0x2eb296[_0x2665b9(0x154)]())[_0x2665b9(0x159)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a191_0x1f9834=a191_0x277d;(function(_0x1d831b,_0x1bad32){const _0x36de3a=a191_0x277d,_0x3b1088=_0x1d831b();while(!![]){try{const _0xe5614=parseInt(_0x36de3a(0x1f0))/0x1+parseInt(_0x36de3a(0x229))/0x2+-parseInt(_0x36de3a(0x24c))/0x3*(parseInt(_0x36de3a(0x1f5))/0x4)+parseInt(_0x36de3a(0x201))/0x5*(-parseInt(_0x36de3a(0x253))/0x6)+parseInt(_0x36de3a(0x22c))/0x7+-parseInt(_0x36de3a(0x1f3))/0x8+parseInt(_0x36de3a(0x23c))/0x9;if(_0xe5614===_0x1bad32)break;else _0x3b1088['push'](_0x3b1088['shift']());}catch(_0x208cd7){_0x3b1088['push'](_0x3b1088['shift']());}}}(a191_0x9265,0x92a6e));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a191_0x9265(){const _0x17111e=['type','isArray','Final\x20menu\x20visibility\x20readback\x20failed.','resourcesValid','values','visible','menuIds','296972izFijQ','map','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','4067832JqUkCV','menu_selector_not_found','4hkVNoY','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','POST','path','plan','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Menu\x20','before','\x20skipped,\x20','\x20failed.','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','70OQGtCG','\x20updated,\x20','code','modelType','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','beforeById','Menu\x20visibility\x20update\x20completed:\x20','updated','menu','str','push','targets','num','string','\x20menu(s);\x20skipped\x20','update-menu-visibility','sort','Selected\x20','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','expectVisible','Response\x20was\x20lost\x20and\x20menu\x20','validation','rawFlags','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','get','filter','set','expected-count','join','stringify','plannedActions','pageType','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','/smartapi/menu/update','\x20menu(s),\x20expected\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','url','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','menus','1209814ntkMSL','warnings','failed','7302687PZQBrZ','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','\x20unchanged\x20menu(s).','cookie','label','\x20changed\x20unexpectedly.','\x20visibility\x20update\x20could\x20not\x20be\x20verified','paths','split','resources','menu_verification_failed','depth','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','datasetId','update-recovery','flagMissing','10238517IPqCcF','parentId','isSafeInteger','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','appCode','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedVisible','menu_state_drift','message','boolean','verification','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','pageId','body','has','childrenIds','3259164nSfSkW','childrenCount','rabetbase\x20menu\x20list\x20--format\x20compress','menu-ids','Requested\x20menu\x20visibility','byId','hash','380220FVkTMk','update','expectedCount','expect-visible','update\x20menu\x20visibility','length','Menu\x20path\x20selector\x20not\x20found:\x20','recovered','menu\x20list','true','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','datasetCode','menu_expected_count_mismatch','number','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'];a191_0x9265=function(){return _0x17111e;};return a191_0x9265();}import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x1f9834(0x1f7),'path':a191_0x1f9834(0x223)}];export const menuVisibilityUpdate={'service':a191_0x1f9834(0x209),'command':'visibility-update','description':a191_0x1f9834(0x1fa),'risk':'write','structuredErrors':!![],'flags':[{'name':a191_0x1f9834(0x24f),'type':a191_0x1f9834(0x20e),'description':a191_0x1f9834(0x1f2)},{'name':'paths','type':a191_0x1f9834(0x20e),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a191_0x1f9834(0x1ee),'type':a191_0x1f9834(0x245),'required':!![],'description':a191_0x1f9834(0x250)},{'name':a191_0x1f9834(0x256),'type':a191_0x1f9834(0x245),'description':a191_0x1f9834(0x200)},{'name':a191_0x1f9834(0x21c),'type':a191_0x1f9834(0x260),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xe94008){parseInput(_0xe94008);},async 'dryRun'(_0x4c44e5){const _0x49e60e=a191_0x1f9834,_0x45865e=await buildPlan(_0x4c44e5,!![]),_0x2e3b8a=_0x45865e[_0x49e60e(0x1f9)][_0x49e60e(0x21f)]?.[_0x49e60e(0x258)]??0x0,_0x187547=_0x45865e[_0x49e60e(0x1f9)][_0x49e60e(0x20c)]['length']-_0x2e3b8a;return menuDryRunResult(_0x45865e[_0x49e60e(0x1f9)],{'method':_0x49e60e(0x1f7),'url':_0x49e60e(0x223),'body':{'updates':_0x45865e[_0x49e60e(0x1f9)][_0x49e60e(0x21f)]?.[_0x49e60e(0x1f1)](_0x34f710=>_0x34f710[_0x49e60e(0x249)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x2e3b8a+'\x20menu(s);\x20skip\x20'+_0x187547+_0x49e60e(0x22e)});},async 'execute'(_0x5e63df){const _0x24e40b=a191_0x1f9834,_0x3e5981=await buildPlan(_0x5e63df,![]);await recheckMutationSnapshot(_0x5e63df,_0x3e5981[_0x24e40b(0x1f9)],_0x24e40b(0x257));const _0x2cff58=[],_0x259c05=[],_0xb54b65=[];for(const _0x277678 of _0x3e5981[_0x24e40b(0x1f9)][_0x24e40b(0x20c)]){if(_0x277678[_0x24e40b(0x1fd)][_0x24e40b(0x1ee)]===_0x3e5981[_0x24e40b(0x1f9)][_0x24e40b(0x242)]){_0x2cff58[_0x24e40b(0x20b)]({'id':_0x277678['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x5e63df[_0x24e40b(0x240)],_0x5e63df[_0x24e40b(0x22f)],{'id':_0x277678['id'],'visible':_0x3e5981[_0x24e40b(0x1f9)]['requestedVisible']}),_0x2cff58['push']({'id':_0x277678['id'],'updated':!![],'skipped':![]});}catch(_0x51a18b){const _0x56b2e7=mapMenuApiError(_0x51a18b,'update\x20visibility\x20for',_0x277678['id']);if(isMenuResponseLoss(_0x51a18b)&&_0x56b2e7[_0x24e40b(0x203)]!=='menu_permission_denied'){_0xb54b65[_0x24e40b(0x20b)](_0x277678['id']);continue;}_0x259c05[_0x24e40b(0x20b)]({'id':_0x277678['id'],'stage':_0x24e40b(0x254),'code':_0x56b2e7[_0x24e40b(0x203)],'message':_0x56b2e7[_0x24e40b(0x244)]});}}let _0x21f812;try{_0x21f812=await fetchMenuSnapshot(_0x5e63df[_0x24e40b(0x240)],_0x5e63df['cookie']);}catch(_0x113eee){const _0xa33811=describeMenuErrorCause(_0x113eee,'verify\x20menu\x20visibility\x20update'),_0x11c02c=_0xb54b65[_0x24e40b(0x1f1)](_0x58b3b8=>({'id':_0x58b3b8,'stage':'update-recovery','code':_0x24e40b(0x236),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x58b3b8+_0x24e40b(0x241),'requestedStateConfirmed':![],'recovered':![]})),_0x2f7964={'stage':_0x24e40b(0x246),'code':_0x24e40b(0x236),'message':_0x24e40b(0x1eb),'targetIds':_0x3e5981[_0x24e40b(0x1f9)][_0x24e40b(0x20c)][_0x24e40b(0x1f1)](_0x571042=>_0x571042['id']),'requestedStateConfirmed':![],..._0xa33811};throw menuFailure(asVerificationError(_0x113eee,_0x24e40b(0x261)),_0x3e5981['plan'],{'stage':_0x24e40b(0x246),'succeeded':_0x2cff58,'failedRecords':[..._0x259c05,..._0x11c02c,_0x2f7964],'warnings':[_0x24e40b(0x221)],'verification':{'status':_0x24e40b(0x22b),'recoveredCount':0x0,'lookupCommand':_0x24e40b(0x24e)}});}const _0x5a14e8=[];for(const _0x3304ac of _0x2cff58){const _0x3bcc9b=Number(_0x3304ac['id']),_0x2625c6=_0x3e5981[_0x24e40b(0x206)]['get'](_0x3bcc9b),_0x1e5a95=_0x21f812[_0x24e40b(0x251)]['get'](_0x3bcc9b);try{verifyVisibilityUpdate(_0x2625c6,_0x1e5a95,_0x3e5981[_0x24e40b(0x1f9)][_0x24e40b(0x242)]);}catch(_0x3ee1b8){const _0x571e28=asVerificationError(_0x3ee1b8,_0x24e40b(0x1fc)+_0x3bcc9b+_0x24e40b(0x232));_0x5a14e8[_0x24e40b(0x20b)]({'id':_0x3bcc9b,'stage':_0x24e40b(0x246),'code':_0x571e28[_0x24e40b(0x203)],'message':_0x571e28[_0x24e40b(0x244)],'requestedStateConfirmed':![]});}}for(const _0x53e5dc of _0xb54b65){const _0x2241b4=_0x3e5981[_0x24e40b(0x206)][_0x24e40b(0x219)](_0x53e5dc),_0x44770d=_0x21f812[_0x24e40b(0x251)]['get'](_0x53e5dc);try{verifyVisibilityUpdate(_0x2241b4,_0x44770d,_0x3e5981['plan'][_0x24e40b(0x242)]),_0x2cff58['push']({'id':_0x53e5dc,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x284756){const _0x3cd7c6=asVerificationError(_0x284756,_0x24e40b(0x215)+_0x53e5dc+_0x24e40b(0x22d));_0x5a14e8[_0x24e40b(0x20b)]({'id':_0x53e5dc,'stage':_0x24e40b(0x23a),'code':_0x3cd7c6['code'],'message':_0x3cd7c6[_0x24e40b(0x244)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x5a14e8[_0x24e40b(0x258)]>0x0){const _0x3418a6=_0x5a14e8[_0x24e40b(0x1f1)](_0x8048fb=>Number(_0x8048fb['id'])),_0x72d303=_0x2cff58[_0x24e40b(0x21a)](_0x56cc5b=>_0x56cc5b[_0x24e40b(0x25a)]===!![])[_0x24e40b(0x258)],_0x2e6ae4=menuError('menu_verification_failed','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x3418a6['join'](',\x20')+'.',_0x24e40b(0x1fb));throw menuFailure(_0x2e6ae4,_0x3e5981[_0x24e40b(0x1f9)],{'stage':'verification','succeeded':_0x2cff58,'failedRecords':[..._0x259c05,..._0x5a14e8],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x24e40b(0x22b),..._0x3418a6[_0x24e40b(0x258)]===0x1?{'targetId':_0x3418a6[0x0]}:{'targetIds':_0x3418a6},'recoveredCount':_0x72d303,'lookupCommand':_0x24e40b(0x24e)}});}const _0x2dd25a=_0x2cff58[_0x24e40b(0x21a)](_0x1a4173=>_0x1a4173[_0x24e40b(0x208)]===!![])[_0x24e40b(0x258)],_0x2012b5=_0x2cff58[_0x24e40b(0x258)]-_0x2dd25a,_0x5f011c={..._0x3e5981[_0x24e40b(0x1f9)],'succeeded':_0x2cff58,'failed':_0x259c05,'warnings':_0x259c05[_0x24e40b(0x258)]>0x0?[..._0x3e5981['plan'][_0x24e40b(0x22a)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x3e5981[_0x24e40b(0x1f9)][_0x24e40b(0x22a)],'verification':{'checkedBy':_0x24e40b(0x25b),'snapshotHash':_0x21f812[_0x24e40b(0x252)],'matchesRequestedState':_0x259c05[_0x24e40b(0x258)]===0x0,'recoveredCount':_0xb54b65[_0x24e40b(0x258)]}};return{'ok':_0x259c05[_0x24e40b(0x258)]===0x0,'data':_0x5f011c,'message':_0x259c05['length']===0x0?'Updated\x20visibility\x20for\x20'+_0x2dd25a+_0x24e40b(0x20f)+_0x2012b5+_0x24e40b(0x22e):_0x24e40b(0x207)+_0x2dd25a+_0x24e40b(0x202)+_0x2012b5+_0x24e40b(0x1fe)+_0x259c05['length']+_0x24e40b(0x1ff)};}};function parseInput(_0x58a911){const _0x45d9ce=a191_0x1f9834,_0x19128f=parseMenuIds(_0x58a911[_0x45d9ce(0x20a)]('menu-ids')),_0x507f4a=parseCsv(_0x58a911['str'](_0x45d9ce(0x233)));if(_0x19128f[_0x45d9ce(0x258)]===0x0&&_0x507f4a[_0x45d9ce(0x258)]===0x0)throw CliErrors[_0x45d9ce(0x216)](_0x45d9ce(0x213));const _0x3ed17b=parseBooleanFlag(_0x58a911,'visible',!![]),_0x2d2002=parseBooleanFlag(_0x58a911,_0x45d9ce(0x256),![]);let _0x26a327;if(hasFlag(_0x58a911,_0x45d9ce(0x21c))){_0x26a327=_0x58a911[_0x45d9ce(0x20d)]('expected-count');if(!Number['isSafeInteger'](_0x26a327)||_0x26a327<0x0)throw CliErrors['validation'](_0x45d9ce(0x205));}return{'menuIds':_0x19128f,'paths':_0x507f4a,'visible':_0x3ed17b,'expectVisible':_0x2d2002,'expectedCount':_0x26a327};}async function buildPlan(_0x349fb2,_0x445eb9){const _0x38c231=a191_0x1f9834,_0x3c691c=parseInput(_0x349fb2),_0x3e81ef=await fetchMutationSnapshot(_0x349fb2,_0x38c231(0x257)),_0x4c099b=selectTargets(_0x3e81ef[_0x38c231(0x228)],_0x3c691c['menuIds'],_0x3c691c[_0x38c231(0x233)]);if(_0x3c691c['expectedCount']!==undefined&&_0x4c099b[_0x38c231(0x258)]!==_0x3c691c[_0x38c231(0x255)])throw menuError(_0x38c231(0x25f),_0x38c231(0x212)+_0x4c099b[_0x38c231(0x258)]+_0x38c231(0x224)+_0x3c691c[_0x38c231(0x255)]+'.',_0x38c231(0x227));if(_0x3c691c[_0x38c231(0x214)]!==undefined){const _0x55f1f6=_0x4c099b[_0x38c231(0x21a)](_0x3c9430=>_0x3c9430[_0x38c231(0x1ee)]!==_0x3c691c['expectVisible']);if(_0x55f1f6[_0x38c231(0x258)]>0x0)throw menuError(_0x38c231(0x243),_0x38c231(0x25d)+_0x55f1f6[_0x38c231(0x1f1)](_0x394c6e=>_0x394c6e['id'])[_0x38c231(0x21d)](',\x20')+'.',_0x38c231(0x225));}const _0x80f8e6=_0x4c099b[_0x38c231(0x1f1)](_0xd0f184=>({'id':_0xd0f184['id'],'label':_0xd0f184[_0x38c231(0x230)],'path':_0xd0f184[_0x38c231(0x1f8)],'before':{'visible':_0xd0f184['visible']},'after':{'visible':_0x3c691c[_0x38c231(0x1ee)]}})),_0x48f7ab=_0x80f8e6[_0x38c231(0x21a)](_0x34fc20=>_0x34fc20['before'][_0x38c231(0x1ee)]!==_0x3c691c[_0x38c231(0x1ee)])['map'](_0x47de4a=>({'stage':_0x38c231(0x210),'method':_0x38c231(0x1f7),'path':_0x38c231(0x223),'body':{'appCode':_0x349fb2[_0x38c231(0x240)],'id':_0x47de4a['id'],'visible':_0x3c691c[_0x38c231(0x1ee)]}})),_0x5c0759=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x3c691c[_0x38c231(0x1ef)],'paths':_0x3c691c[_0x38c231(0x233)]},'before':{'menus':_0x4c099b[_0x38c231(0x1f1)](_0x4c2afd=>({'id':_0x4c2afd['id'],'path':_0x4c2afd[_0x38c231(0x1f8)],'visible':_0x4c2afd[_0x38c231(0x1ee)]}))},'after':{'menus':_0x4c099b['map'](_0x5c6354=>({'id':_0x5c6354['id'],'path':_0x5c6354[_0x38c231(0x1f8)],'visible':_0x3c691c[_0x38c231(0x1ee)]}))},'dryRun':_0x445eb9,'backend':[...BACKEND],'plannedActions':_0x48f7ab,'snapshotHash':_0x3e81ef[_0x38c231(0x252)],'warnings':_0x48f7ab[_0x38c231(0x258)]===0x0?[_0x38c231(0x238)]:[]});return{'plan':{..._0x5c0759,'requestedVisible':_0x3c691c[_0x38c231(0x1ee)],'targets':_0x80f8e6},'beforeById':new Map(_0x4c099b[_0x38c231(0x1f1)](_0x13d0ce=>[_0x13d0ce['id'],_0x13d0ce]))};}function a191_0x277d(_0x5a5286,_0x2abb65){_0x5a5286=_0x5a5286-0x1e9;const _0x926569=a191_0x9265();let _0x277d54=_0x926569[_0x5a5286];return _0x277d54;}function selectTargets(_0x12bb9b,_0x158b20,_0x5cebc9){const _0x171ee8=a191_0x1f9834,_0xc795f0=new Map(_0x12bb9b['map'](_0x553ebb=>[_0x553ebb['id'],_0x553ebb])),_0x93ad7d=new Map(),_0x118a06=_0x158b20[_0x171ee8(0x21a)](_0x50d347=>!_0xc795f0[_0x171ee8(0x24a)](_0x50d347));if(_0x118a06[_0x171ee8(0x258)]>0x0)throw menuError(_0x171ee8(0x1f4),'Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x118a06['join'](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0xd90954 of _0x158b20){_0x93ad7d[_0x171ee8(0x21b)](_0xd90954,_0xc795f0['get'](_0xd90954));}for(const _0x2f5cfd of _0x5cebc9){const _0x4b2472=_0x12bb9b[_0x171ee8(0x21a)](_0x5a30d2=>_0x5a30d2[_0x171ee8(0x1f8)]===_0x2f5cfd);if(_0x4b2472[_0x171ee8(0x258)]===0x0)throw menuError('menu_selector_not_found',_0x171ee8(0x259)+JSON['stringify'](_0x2f5cfd)+'.',_0x171ee8(0x247));if(_0x4b2472['length']>0x1)throw menuError('menu_selector_ambiguous',_0x171ee8(0x218)+JSON[_0x171ee8(0x21e)](_0x2f5cfd)+'.',_0x171ee8(0x222)+_0x4b2472['map'](_0x20aaf9=>_0x20aaf9['id'])[_0x171ee8(0x21d)](',\x20')+'.');const _0x5ae648=_0x4b2472[0x0];_0x93ad7d['set'](_0x5ae648['id'],_0x5ae648);}return[..._0x93ad7d[_0x171ee8(0x1ed)]()];}function parseMenuIds(_0x109c87){const _0x78d233=a191_0x1f9834,_0xa45bf9=parseCsv(_0x109c87),_0x154ad6=_0xa45bf9[_0x78d233(0x1f1)](Number);if(_0x154ad6['some'](_0x199f96=>!Number[_0x78d233(0x23e)](_0x199f96)||_0x199f96<=0x0))throw CliErrors[_0x78d233(0x216)](_0x78d233(0x1f6));return[...new Set(_0x154ad6)];}function parseCsv(_0x15d93e){const _0x2fa172=a191_0x1f9834;return[...new Set(_0x15d93e[_0x2fa172(0x234)](',')['map'](_0x7ce362=>_0x7ce362['trim']())['filter'](Boolean))];}function parseBooleanFlag(_0x2a215c,_0x20183e,_0x3f7ca2){const _0x1f03c2=a191_0x1f9834;if(!hasFlag(_0x2a215c,_0x20183e)){if(_0x3f7ca2)throw CliErrors[_0x1f03c2(0x23b)](_0x20183e);return undefined;}const _0x3eace8=_0x2a215c[_0x1f03c2(0x217)][_0x20183e];if(_0x3eace8===!![]||_0x3eace8===![])return _0x3eace8;if(_0x3eace8===_0x1f03c2(0x25c))return!![];if(_0x3eace8==='false')return![];throw CliErrors[_0x1f03c2(0x216)]('--'+_0x20183e+'\x20must\x20be\x20true\x20or\x20false.');}function verifyVisibilityUpdate(_0x51a590,_0xe25d64,_0x4e35fe){const _0x53431f=a191_0x1f9834;assertVerified(!!_0xe25d64,_0x53431f(0x1fc)+_0x51a590['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0xe25d64[_0x53431f(0x1ee)]===_0x4e35fe,'Menu\x20'+_0x51a590['id']+_0x53431f(0x23f));const _0x4392c6=[['id',_0xe25d64['id'],_0x51a590['id']],[_0x53431f(0x23d),_0xe25d64['parentId'],_0x51a590['parentId']],['depth',_0xe25d64[_0x53431f(0x237)],_0x51a590[_0x53431f(0x237)]],[_0x53431f(0x230),_0xe25d64[_0x53431f(0x230)],_0x51a590['label']],[_0x53431f(0x1f8),_0xe25d64[_0x53431f(0x1f8)],_0x51a590[_0x53431f(0x1f8)]],['url',_0xe25d64[_0x53431f(0x226)],_0x51a590[_0x53431f(0x226)]],[_0x53431f(0x1e9),_0xe25d64[_0x53431f(0x1e9)],_0x51a590[_0x53431f(0x1e9)]],['sort',_0xe25d64['sort'],_0x51a590[_0x53431f(0x211)]],['resources',_0xe25d64[_0x53431f(0x235)],_0x51a590[_0x53431f(0x235)]],['resourcesValid',_0xe25d64[_0x53431f(0x1ec)],_0x51a590[_0x53431f(0x1ec)]],[_0x53431f(0x24b),_0xe25d64[_0x53431f(0x24b)],_0x51a590[_0x53431f(0x24b)]],[_0x53431f(0x24d),_0xe25d64[_0x53431f(0x24d)],_0x51a590[_0x53431f(0x24d)]],[_0x53431f(0x248),_0xe25d64[_0x53431f(0x248)],_0x51a590['pageId']],[_0x53431f(0x220),_0xe25d64['pageType'],_0x51a590[_0x53431f(0x220)]],[_0x53431f(0x204),_0xe25d64['modelType'],_0x51a590[_0x53431f(0x204)]],[_0x53431f(0x239),_0xe25d64['datasetId'],_0x51a590[_0x53431f(0x239)]],[_0x53431f(0x25e),_0xe25d64['datasetCode'],_0x51a590[_0x53431f(0x25e)]]];for(const [_0x18e20a,_0x19e288,_0x57820d]of _0x4392c6){assertVerified(sameValue(_0x19e288,_0x57820d),_0x53431f(0x1fc)+_0x51a590['id']+'\x20'+_0x18e20a+_0x53431f(0x231));}}function sameValue(_0x2497d2,_0x271aec){const _0x4ff59c=a191_0x1f9834;if(Array[_0x4ff59c(0x1ea)](_0x2497d2)||Array[_0x4ff59c(0x1ea)](_0x271aec))return JSON[_0x4ff59c(0x21e)](_0x2497d2)===JSON[_0x4ff59c(0x21e)](_0x271aec);return _0x2497d2===_0x271aec;}
|
|
1
|
+
const a191_0x553e7a=a191_0x17ed;(function(_0x25bf04,_0x5c7c37){const _0x3b9b00=a191_0x17ed,_0x41800c=_0x25bf04();while(!![]){try{const _0x31f4f4=-parseInt(_0x3b9b00(0xf0))/0x1*(parseInt(_0x3b9b00(0xb7))/0x2)+parseInt(_0x3b9b00(0xfd))/0x3+parseInt(_0x3b9b00(0xb1))/0x4+parseInt(_0x3b9b00(0xc3))/0x5+parseInt(_0x3b9b00(0xe5))/0x6+parseInt(_0x3b9b00(0xf1))/0x7*(-parseInt(_0x3b9b00(0x101))/0x8)+parseInt(_0x3b9b00(0xbc))/0x9*(-parseInt(_0x3b9b00(0xf7))/0xa);if(_0x31f4f4===_0x5c7c37)break;else _0x41800c['push'](_0x41800c['shift']());}catch(_0x440543){_0x41800c['push'](_0x41800c['shift']());}}}(a191_0x3b68,0x59462));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x553e7a(0xb2),'path':a191_0x553e7a(0x12f)}];export const menuVisibilityUpdate={'service':a191_0x553e7a(0x112),'command':a191_0x553e7a(0x117),'description':a191_0x553e7a(0xff),'risk':a191_0x553e7a(0xf2),'structuredErrors':!![],'flags':[{'name':a191_0x553e7a(0xd4),'type':'string','description':a191_0x553e7a(0xbb)},{'name':a191_0x553e7a(0xcc),'type':a191_0x553e7a(0x103),'description':a191_0x553e7a(0x131)},{'name':a191_0x553e7a(0xe1),'type':a191_0x553e7a(0x121),'required':!![],'description':a191_0x553e7a(0xf5)},{'name':a191_0x553e7a(0xe6),'type':a191_0x553e7a(0x121),'description':a191_0x553e7a(0xe2)},{'name':a191_0x553e7a(0x110),'type':'number','description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xc8280e){parseInput(_0xc8280e);},async 'dryRun'(_0x5a5b81){const _0xa917c2=a191_0x553e7a,_0x4ab707=await buildPlan(_0x5a5b81,!![]),_0x1a1b68=_0x4ab707[_0xa917c2(0x126)]['plannedActions']?.['length']??0x0,_0x4cfdc6=_0x4ab707['plan'][_0xa917c2(0x127)]['length']-_0x1a1b68;return menuDryRunResult(_0x4ab707[_0xa917c2(0x126)],{'method':_0xa917c2(0xb2),'url':'/smartapi/menu/update','body':{'updates':_0x4ab707[_0xa917c2(0x126)]['plannedActions']?.[_0xa917c2(0x122)](_0xff1fb6=>_0xff1fb6[_0xa917c2(0xe0)])??[]},'description':_0xa917c2(0xb8)+_0x1a1b68+_0xa917c2(0x104)+_0x4cfdc6+_0xa917c2(0x120)});},async 'execute'(_0x332c9d){const _0x1dd85b=a191_0x553e7a,_0x1d22f1=await buildPlan(_0x332c9d,![]);await recheckMutationSnapshot(_0x332c9d,_0x1d22f1[_0x1dd85b(0x126)],_0x1dd85b(0x12e));const _0x564fd5=[],_0x12b34d=[],_0x1b0c5d=[];for(const _0x2f1975 of _0x1d22f1['plan'][_0x1dd85b(0x127)]){if(_0x2f1975[_0x1dd85b(0xeb)][_0x1dd85b(0xe1)]===_0x1d22f1[_0x1dd85b(0x126)]['requestedVisible']){_0x564fd5[_0x1dd85b(0xef)]({'id':_0x2f1975['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x332c9d[_0x1dd85b(0xf8)],_0x332c9d['cookie'],{'id':_0x2f1975['id'],'visible':_0x1d22f1[_0x1dd85b(0x126)][_0x1dd85b(0x114)]}),_0x564fd5[_0x1dd85b(0xef)]({'id':_0x2f1975['id'],'updated':!![],'skipped':![]});}catch(_0x5fdbaa){const _0x23200c=mapMenuApiError(_0x5fdbaa,_0x1dd85b(0xdb),_0x2f1975['id']);if(isMenuResponseLoss(_0x5fdbaa)&&_0x23200c['code']!==_0x1dd85b(0x118)){_0x1b0c5d[_0x1dd85b(0xef)](_0x2f1975['id']);continue;}_0x12b34d['push']({'id':_0x2f1975['id'],'stage':_0x1dd85b(0xe3),'code':_0x23200c['code'],'message':_0x23200c[_0x1dd85b(0xfc)]});}}let _0x33b473;try{_0x33b473=await fetchMenuSnapshot(_0x332c9d[_0x1dd85b(0xf8)],_0x332c9d[_0x1dd85b(0xcd)]);}catch(_0x47e230){const _0x8ac113=describeMenuErrorCause(_0x47e230,_0x1dd85b(0x132)),_0x30c9ab=_0x1b0c5d[_0x1dd85b(0x122)](_0x21ad01=>({'id':_0x21ad01,'stage':_0x1dd85b(0x102),'code':_0x1dd85b(0xc4),'message':_0x1dd85b(0x12c)+_0x21ad01+_0x1dd85b(0xdc),'requestedStateConfirmed':![],'recovered':![]})),_0x36c9ad={'stage':'verification','code':_0x1dd85b(0xc4),'message':_0x1dd85b(0xd6),'targetIds':_0x1d22f1[_0x1dd85b(0x126)][_0x1dd85b(0x127)][_0x1dd85b(0x122)](_0xf786dd=>_0xf786dd['id']),'requestedStateConfirmed':![],..._0x8ac113};throw menuFailure(asVerificationError(_0x47e230,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x1d22f1[_0x1dd85b(0x126)],{'stage':_0x1dd85b(0xc6),'succeeded':_0x564fd5,'failedRecords':[..._0x12b34d,..._0x30c9ab,_0x36c9ad],'warnings':[_0x1dd85b(0x12b)],'verification':{'status':_0x1dd85b(0x10b),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x3bb3a9=[];for(const _0x2efef7 of _0x564fd5){const _0x4e1bc1=Number(_0x2efef7['id']),_0x54e1c6=_0x1d22f1['beforeById'][_0x1dd85b(0xc8)](_0x4e1bc1),_0x1c0927=_0x33b473[_0x1dd85b(0x11e)]['get'](_0x4e1bc1);try{verifyVisibilityUpdate(_0x54e1c6,_0x1c0927,_0x1d22f1[_0x1dd85b(0x126)][_0x1dd85b(0x114)]);}catch(_0x3eeb87){const _0x144822=asVerificationError(_0x3eeb87,_0x1dd85b(0x129)+_0x4e1bc1+_0x1dd85b(0x11b));_0x3bb3a9[_0x1dd85b(0xef)]({'id':_0x4e1bc1,'stage':'verification','code':_0x144822[_0x1dd85b(0xca)],'message':_0x144822[_0x1dd85b(0xfc)],'requestedStateConfirmed':![]});}}for(const _0x2723f5 of _0x1b0c5d){const _0x2ea9a0=_0x1d22f1[_0x1dd85b(0xe8)][_0x1dd85b(0xc8)](_0x2723f5),_0xc8d215=_0x33b473[_0x1dd85b(0x11e)][_0x1dd85b(0xc8)](_0x2723f5);try{verifyVisibilityUpdate(_0x2ea9a0,_0xc8d215,_0x1d22f1[_0x1dd85b(0x126)][_0x1dd85b(0x114)]),_0x564fd5[_0x1dd85b(0xef)]({'id':_0x2723f5,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x5907d5){const _0xd72dfc=asVerificationError(_0x5907d5,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x2723f5+_0x1dd85b(0x11d));_0x3bb3a9[_0x1dd85b(0xef)]({'id':_0x2723f5,'stage':_0x1dd85b(0x102),'code':_0xd72dfc[_0x1dd85b(0xca)],'message':_0xd72dfc[_0x1dd85b(0xfc)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x3bb3a9[_0x1dd85b(0xc2)]>0x0){const _0x5ef956=_0x3bb3a9[_0x1dd85b(0x122)](_0x595645=>Number(_0x595645['id'])),_0x4f1fd0=_0x564fd5['filter'](_0x5a6290=>_0x5a6290[_0x1dd85b(0xfa)]===!![])['length'],_0x498e52=menuError('menu_verification_failed',_0x1dd85b(0xc9)+_0x5ef956['join'](',\x20')+'.',_0x1dd85b(0xf6));throw menuFailure(_0x498e52,_0x1d22f1['plan'],{'stage':_0x1dd85b(0xc6),'succeeded':_0x564fd5,'failedRecords':[..._0x12b34d,..._0x3bb3a9],'warnings':[_0x1dd85b(0x113)],'verification':{'status':'failed',..._0x5ef956[_0x1dd85b(0xc2)]===0x1?{'targetId':_0x5ef956[0x0]}:{'targetIds':_0x5ef956},'recoveredCount':_0x4f1fd0,'lookupCommand':_0x1dd85b(0xea)}});}const _0x77da19=_0x564fd5[_0x1dd85b(0xe7)](_0x4336f2=>_0x4336f2[_0x1dd85b(0xd0)]===!![])[_0x1dd85b(0xc2)],_0x4ae214=_0x564fd5[_0x1dd85b(0xc2)]-_0x77da19,_0x2425e9={..._0x1d22f1[_0x1dd85b(0x126)],'succeeded':_0x564fd5,'failed':_0x12b34d,'warnings':_0x12b34d[_0x1dd85b(0xc2)]>0x0?[..._0x1d22f1['plan'][_0x1dd85b(0xde)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x1d22f1[_0x1dd85b(0x126)][_0x1dd85b(0xde)],'verification':{'checkedBy':_0x1dd85b(0xf9),'snapshotHash':_0x33b473[_0x1dd85b(0x125)],'matchesRequestedState':_0x12b34d['length']===0x0,'recoveredCount':_0x1b0c5d[_0x1dd85b(0xc2)]}};return{'ok':_0x12b34d[_0x1dd85b(0xc2)]===0x0,'data':_0x2425e9,'message':_0x12b34d[_0x1dd85b(0xc2)]===0x0?_0x1dd85b(0x10c)+_0x77da19+_0x1dd85b(0x111)+_0x4ae214+_0x1dd85b(0x120):_0x1dd85b(0xf3)+_0x77da19+_0x1dd85b(0x10d)+_0x4ae214+'\x20skipped,\x20'+_0x12b34d[_0x1dd85b(0xc2)]+_0x1dd85b(0x108)};}};function parseInput(_0x37d528){const _0x20d0f7=a191_0x553e7a,_0x4ee462=parseMenuIds(_0x37d528[_0x20d0f7(0xc1)](_0x20d0f7(0xd4))),_0x58024a=parseCsv(_0x37d528[_0x20d0f7(0xc1)](_0x20d0f7(0xcc)));if(_0x4ee462[_0x20d0f7(0xc2)]===0x0&&_0x58024a[_0x20d0f7(0xc2)]===0x0)throw CliErrors['validation'](_0x20d0f7(0x12a));const _0x3bb244=parseBooleanFlag(_0x37d528,_0x20d0f7(0xe1),!![]),_0x471dad=parseBooleanFlag(_0x37d528,_0x20d0f7(0xe6),![]);let _0x4729a3;if(hasFlag(_0x37d528,_0x20d0f7(0x110))){_0x4729a3=_0x37d528[_0x20d0f7(0xbd)](_0x20d0f7(0x110));if(!Number[_0x20d0f7(0xf4)](_0x4729a3)||_0x4729a3<0x0)throw CliErrors[_0x20d0f7(0xfe)](_0x20d0f7(0x124));}return{'menuIds':_0x4ee462,'paths':_0x58024a,'visible':_0x3bb244,'expectVisible':_0x471dad,'expectedCount':_0x4729a3};}function a191_0x3b68(){const _0x79cf56=['datasetCode','update-menu-visibility','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','type','update\x20visibility\x20for','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','resourcesValid','warnings','label','body','visible','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','update','Selected\x20','4242030qRQJdV','expect-visible','filter','beforeById','\x20must\x20be\x20true\x20or\x20false.','rabetbase\x20menu\x20list\x20--format\x20compress','before','flagMissing','pageId','datasetId','push','13576ULXGbl','288631zKJDNK','write','Menu\x20visibility\x20update\x20completed:\x20','isSafeInteger','Requested\x20menu\x20visibility','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','37780oXArcR','appCode','menu\x20list','recovered','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','message','716991AaJulq','validation','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','sort','24ZHeeFc','update-recovery','string','\x20menu(s);\x20skip\x20','url','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Menu\x20id\x20selector(s)\x20not\x20found:\x20','\x20failed.','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','menu_selector_not_found','failed','Updated\x20visibility\x20for\x20','\x20updated,\x20','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','expected-count','\x20menu(s);\x20skipped\x20','menu','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','requestedVisible','modelType','menus','visibility-update','menu_permission_denied','path','some','\x20visibility\x20update\x20could\x20not\x20be\x20verified','parentId','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','byId','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','\x20unchanged\x20menu(s).','boolean','map','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','hash','plan','targets','join','Menu\x20','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Response\x20was\x20lost\x20for\x20menu\x20','true','update\x20menu\x20visibility','/smartapi/menu/update','menu_state_drift','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','verify\x20menu\x20visibility\x20update','false','pageType','2306832QXfgoE','POST','set','menu_expected_count_mismatch','expectedCount','has','64Pnktxd','Would\x20update\x20visibility\x20for\x20','depth','menuIds','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','1836kAaUrm','num','stringify','split','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','str','length','858995gQXpJR','menu_verification_failed','rawFlags','verification','expectVisible','get','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','code','resources','paths','cookie','childrenIds','values','updated','menu_selector_ambiguous','childrenCount','trim','menu-ids','isArray','Final\x20menu\x20visibility\x20readback\x20failed.'];a191_0x3b68=function(){return _0x79cf56;};return a191_0x3b68();}async function buildPlan(_0x15381b,_0x3fccd9){const _0x4ac765=a191_0x553e7a,_0x264498=parseInput(_0x15381b),_0x3fcb45=await fetchMutationSnapshot(_0x15381b,'update\x20menu\x20visibility'),_0x2d78a1=selectTargets(_0x3fcb45[_0x4ac765(0x116)],_0x264498['menuIds'],_0x264498[_0x4ac765(0xcc)]);if(_0x264498[_0x4ac765(0xb5)]!==undefined&&_0x2d78a1[_0x4ac765(0xc2)]!==_0x264498[_0x4ac765(0xb5)])throw menuError(_0x4ac765(0xb4),_0x4ac765(0xe4)+_0x2d78a1['length']+'\x20menu(s),\x20expected\x20'+_0x264498['expectedCount']+'.',_0x4ac765(0x10f));if(_0x264498[_0x4ac765(0xc7)]!==undefined){const _0x493dfb=_0x2d78a1[_0x4ac765(0xe7)](_0x2c209b=>_0x2c209b[_0x4ac765(0xe1)]!==_0x264498[_0x4ac765(0xc7)]);if(_0x493dfb[_0x4ac765(0xc2)]>0x0)throw menuError(_0x4ac765(0x130),'Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x493dfb['map'](_0x3bc694=>_0x3bc694['id'])['join'](',\x20')+'.',_0x4ac765(0x123));}const _0xff84e3=_0x2d78a1[_0x4ac765(0x122)](_0x2d3b89=>({'id':_0x2d3b89['id'],'label':_0x2d3b89[_0x4ac765(0xdf)],'path':_0x2d3b89[_0x4ac765(0x119)],'before':{'visible':_0x2d3b89[_0x4ac765(0xe1)]},'after':{'visible':_0x264498[_0x4ac765(0xe1)]}})),_0x26cfd2=_0xff84e3[_0x4ac765(0xe7)](_0x4115c4=>_0x4115c4['before'][_0x4ac765(0xe1)]!==_0x264498[_0x4ac765(0xe1)])[_0x4ac765(0x122)](_0x5a888c=>({'stage':_0x4ac765(0xd8),'method':_0x4ac765(0xb2),'path':_0x4ac765(0x12f),'body':{'appCode':_0x15381b[_0x4ac765(0xf8)],'id':_0x5a888c['id'],'visible':_0x264498[_0x4ac765(0xe1)]}})),_0x19d598=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x264498[_0x4ac765(0xba)],'paths':_0x264498[_0x4ac765(0xcc)]},'before':{'menus':_0x2d78a1[_0x4ac765(0x122)](_0x5794fa=>({'id':_0x5794fa['id'],'path':_0x5794fa[_0x4ac765(0x119)],'visible':_0x5794fa[_0x4ac765(0xe1)]}))},'after':{'menus':_0x2d78a1[_0x4ac765(0x122)](_0x3f9d37=>({'id':_0x3f9d37['id'],'path':_0x3f9d37[_0x4ac765(0x119)],'visible':_0x264498[_0x4ac765(0xe1)]}))},'dryRun':_0x3fccd9,'backend':[...BACKEND],'plannedActions':_0x26cfd2,'snapshotHash':_0x3fcb45[_0x4ac765(0x125)],'warnings':_0x26cfd2[_0x4ac765(0xc2)]===0x0?[_0x4ac765(0x11f)]:[]});return{'plan':{..._0x19d598,'requestedVisible':_0x264498['visible'],'targets':_0xff84e3},'beforeById':new Map(_0x2d78a1[_0x4ac765(0x122)](_0xf2112c=>[_0xf2112c['id'],_0xf2112c]))};}function selectTargets(_0x72796d,_0x2666ff,_0x5b38a9){const _0x73dbb4=a191_0x553e7a,_0x39b7c6=new Map(_0x72796d[_0x73dbb4(0x122)](_0x628689=>[_0x628689['id'],_0x628689])),_0x5922eb=new Map(),_0x23ebe1=_0x2666ff[_0x73dbb4(0xe7)](_0x4ed564=>!_0x39b7c6[_0x73dbb4(0xb6)](_0x4ed564));if(_0x23ebe1['length']>0x0)throw menuError(_0x73dbb4(0x10a),_0x73dbb4(0x107)+_0x23ebe1['join'](',\x20')+'.',_0x73dbb4(0x106));for(const _0x3922b8 of _0x2666ff){_0x5922eb[_0x73dbb4(0xb3)](_0x3922b8,_0x39b7c6[_0x73dbb4(0xc8)](_0x3922b8));}for(const _0x4a450e of _0x5b38a9){const _0x33e215=_0x72796d['filter'](_0x578f32=>_0x578f32[_0x73dbb4(0x119)]===_0x4a450e);if(_0x33e215['length']===0x0)throw menuError(_0x73dbb4(0x10a),'Menu\x20path\x20selector\x20not\x20found:\x20'+JSON[_0x73dbb4(0xbe)](_0x4a450e)+'.',_0x73dbb4(0xc0));if(_0x33e215[_0x73dbb4(0xc2)]>0x1)throw menuError(_0x73dbb4(0xd1),_0x73dbb4(0x10e)+JSON['stringify'](_0x4a450e)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x33e215[_0x73dbb4(0x122)](_0x57b9b7=>_0x57b9b7['id'])[_0x73dbb4(0x128)](',\x20')+'.');const _0xe7ce04=_0x33e215[0x0];_0x5922eb['set'](_0xe7ce04['id'],_0xe7ce04);}return[..._0x5922eb[_0x73dbb4(0xcf)]()];}function a191_0x17ed(_0x5b87ea,_0x5c6016){_0x5b87ea=_0x5b87ea-0xb0;const _0x3b680d=a191_0x3b68();let _0x17ed3f=_0x3b680d[_0x5b87ea];return _0x17ed3f;}function parseMenuIds(_0x23626e){const _0x297234=a191_0x553e7a,_0xba6181=parseCsv(_0x23626e),_0x114795=_0xba6181[_0x297234(0x122)](Number);if(_0x114795[_0x297234(0x11a)](_0x907f2b=>!Number[_0x297234(0xf4)](_0x907f2b)||_0x907f2b<=0x0))throw CliErrors['validation'](_0x297234(0xd9));return[...new Set(_0x114795)];}function parseCsv(_0x21db59){const _0x4cb54d=a191_0x553e7a;return[...new Set(_0x21db59[_0x4cb54d(0xbf)](',')[_0x4cb54d(0x122)](_0x2275af=>_0x2275af[_0x4cb54d(0xd3)]())[_0x4cb54d(0xe7)](Boolean))];}function parseBooleanFlag(_0x46ecb2,_0x207600,_0x16be88){const _0x3e65e9=a191_0x553e7a;if(!hasFlag(_0x46ecb2,_0x207600)){if(_0x16be88)throw CliErrors[_0x3e65e9(0xec)](_0x207600);return undefined;}const _0x4793db=_0x46ecb2[_0x3e65e9(0xc5)][_0x207600];if(_0x4793db===!![]||_0x4793db===![])return _0x4793db;if(_0x4793db===_0x3e65e9(0x12d))return!![];if(_0x4793db===_0x3e65e9(0x133))return![];throw CliErrors['validation']('--'+_0x207600+_0x3e65e9(0xe9));}function verifyVisibilityUpdate(_0x3dbb98,_0x54a0ef,_0x5de3f6){const _0x4d9b9e=a191_0x553e7a;assertVerified(!!_0x54a0ef,_0x4d9b9e(0x129)+_0x3dbb98['id']+_0x4d9b9e(0xfb)),assertVerified(_0x54a0ef[_0x4d9b9e(0xe1)]===_0x5de3f6,_0x4d9b9e(0x129)+_0x3dbb98['id']+_0x4d9b9e(0x109));const _0x495e85=[['id',_0x54a0ef['id'],_0x3dbb98['id']],[_0x4d9b9e(0x11c),_0x54a0ef[_0x4d9b9e(0x11c)],_0x3dbb98[_0x4d9b9e(0x11c)]],[_0x4d9b9e(0xb9),_0x54a0ef[_0x4d9b9e(0xb9)],_0x3dbb98['depth']],['label',_0x54a0ef[_0x4d9b9e(0xdf)],_0x3dbb98[_0x4d9b9e(0xdf)]],[_0x4d9b9e(0x119),_0x54a0ef[_0x4d9b9e(0x119)],_0x3dbb98[_0x4d9b9e(0x119)]],['url',_0x54a0ef[_0x4d9b9e(0x105)],_0x3dbb98[_0x4d9b9e(0x105)]],[_0x4d9b9e(0xda),_0x54a0ef[_0x4d9b9e(0xda)],_0x3dbb98[_0x4d9b9e(0xda)]],[_0x4d9b9e(0x100),_0x54a0ef[_0x4d9b9e(0x100)],_0x3dbb98[_0x4d9b9e(0x100)]],[_0x4d9b9e(0xcb),_0x54a0ef[_0x4d9b9e(0xcb)],_0x3dbb98[_0x4d9b9e(0xcb)]],[_0x4d9b9e(0xdd),_0x54a0ef[_0x4d9b9e(0xdd)],_0x3dbb98['resourcesValid']],[_0x4d9b9e(0xce),_0x54a0ef['childrenIds'],_0x3dbb98['childrenIds']],[_0x4d9b9e(0xd2),_0x54a0ef[_0x4d9b9e(0xd2)],_0x3dbb98[_0x4d9b9e(0xd2)]],[_0x4d9b9e(0xed),_0x54a0ef['pageId'],_0x3dbb98[_0x4d9b9e(0xed)]],[_0x4d9b9e(0xb0),_0x54a0ef['pageType'],_0x3dbb98[_0x4d9b9e(0xb0)]],[_0x4d9b9e(0x115),_0x54a0ef[_0x4d9b9e(0x115)],_0x3dbb98[_0x4d9b9e(0x115)]],[_0x4d9b9e(0xee),_0x54a0ef['datasetId'],_0x3dbb98[_0x4d9b9e(0xee)]],[_0x4d9b9e(0xd7),_0x54a0ef[_0x4d9b9e(0xd7)],_0x3dbb98[_0x4d9b9e(0xd7)]]];for(const [_0x305775,_0x41389f,_0x47cbb5]of _0x495e85){assertVerified(sameValue(_0x41389f,_0x47cbb5),'Menu\x20'+_0x3dbb98['id']+'\x20'+_0x305775+'\x20changed\x20unexpectedly.');}}function sameValue(_0x3a1ef2,_0x1e36f6){const _0x206137=a191_0x553e7a;if(Array[_0x206137(0xd5)](_0x3a1ef2)||Array[_0x206137(0xd5)](_0x1e36f6))return JSON[_0x206137(0xbe)](_0x3a1ef2)===JSON['stringify'](_0x1e36f6);return _0x3a1ef2===_0x1e36f6;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a192_0x5d2ac0=a192_0x4b1c;(function(_0x6e4eb2,_0x479475){const _0x4085db=a192_0x4b1c,_0x331977=_0x6e4eb2();while(!![]){try{const _0x15e3fd=-parseInt(_0x4085db(0xc8))/0x1*(-parseInt(_0x4085db(0xe4))/0x2)+parseInt(_0x4085db(0xda))/0x3+parseInt(_0x4085db(0xd8))/0x4+-parseInt(_0x4085db(0xd0))/0x5*(-parseInt(_0x4085db(0xd6))/0x6)+parseInt(_0x4085db(0xc4))/0x7+parseInt(_0x4085db(0xe3))/0x8*(parseInt(_0x4085db(0xc7))/0x9)+-parseInt(_0x4085db(0xdb))/0xa;if(_0x15e3fd===_0x479475)break;else _0x331977['push'](_0x331977['shift']());}catch(_0x41e05e){_0x331977['push'](_0x331977['shift']());}}}(a192_0x21ab,0xc503d));function a192_0x4b1c(_0x38f6c5,_0x49ed0d){_0x38f6c5=_0x38f6c5-0xc3;const _0x21aba6=a192_0x21ab();let _0x4b1c25=_0x21aba6[_0x38f6c5];return _0x4b1c25;}function a192_0x21ab(){const _0xe9be6e=['document',';\x20do\x20not\x20resubmit.','notification_config_create_outcome_unknown','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','5537334oJywGI','description','3304108UcmpsQ','planned','596253HRuSTw','33340540onYMWt','verification','input','create','isSafeInteger','mutation','Inspect\x20with\x20','channelType','5917456emRdMm','308kQumwz','endpointUrl','configCode',';\x20no\x20automatic\x20retry\x20was\x20attempted.','configName','9486904oiwXyD','verified','/notification/channel-config/create','9NlYKKF','639vPnXal','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','write','channelConfig','config-create','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','POST','notification','5ZhqQxL','appCode'];a192_0x21ab=function(){return _0xe9be6e;};return a192_0x21ab();}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_0x5d2ac0(0xc6);async function prepareCreate(_0x5b5c8a){const _0x4ae673=a192_0x5d2ac0,_0x21c353=await readNotificationDocument(_0x5b5c8a,_0x4ae673(0xde)),_0x2b3ef4=createMutationInput(_0x5b5c8a[_0x4ae673(0xd1)],_0x21c353);return{'document':_0x21c353,'input':_0x2b3ef4,'planned':projectNotificationConfig({'appCode':_0x5b5c8a['appCode'],'configName':_0x21c353[_0x4ae673(0xc3)],'channelType':_0x21c353[_0x4ae673(0xe2)],'endpointUrl':_0x21c353[_0x4ae673(0xe5)],'channelConfig':_0x21c353[_0x4ae673(0xcb)],'description':_0x21c353[_0x4ae673(0xd7)],'connectTimeout':_0x21c353['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x21c353['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a192_0x5d2ac0(0xcf),'command':a192_0x5d2ac0(0xcc),'description':a192_0x5d2ac0(0xd5),'risk':a192_0x5d2ac0(0xca),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x32e5ee){assertSingleNotificationSource(_0x32e5ee);},async 'dryRun'(_0x535a76){const _0x1da145=a192_0x5d2ac0,_0x9a9b61=await prepareCreate(_0x535a76),_0x5eb47b=notificationLookupCommand(_0x535a76[_0x1da145(0xd1)],_0x9a9b61[_0x1da145(0xd2)][_0x1da145(0xe2)]);return asDryRunResult({'operation':_0x1da145(0xde),'selector':{'appCode':_0x535a76[_0x1da145(0xd1)],'configName':_0x9a9b61[_0x1da145(0xd2)][_0x1da145(0xc3)],'channelType':_0x9a9b61['document'][_0x1da145(0xe2)]},'before':null,'after':_0x9a9b61[_0x1da145(0xd9)],'dryRun':!![],'backend':{'method':_0x1da145(0xce),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x1da145(0xd9),'lookupCommand':_0x5eb47b}},{'method':_0x1da145(0xce),'url':CREATE_PATH});},async 'execute'(_0x4f16cd){const _0x30c2f6=a192_0x5d2ac0,_0x3f81dc=await prepareCreate(_0x4f16cd),_0x19a75b=notificationLookupCommand(_0x4f16cd[_0x30c2f6(0xd1)],_0x3f81dc[_0x30c2f6(0xd2)][_0x30c2f6(0xe2)]);let _0xe89021;try{_0xe89021=await createNotificationChannelConfig(_0x3f81dc[_0x30c2f6(0xdd)]);}catch(_0x4acbe3){if(isPlatformTransportFailure(_0x4acbe3))throw notificationError(_0x30c2f6(0xd4),_0x30c2f6(0xc9),_0x30c2f6(0xe1)+_0x19a75b+_0x30c2f6(0xd3));throw safeApiFailure('create',_0x30c2f6(0xe0),_0x30c2f6(0xe1)+_0x19a75b+_0x30c2f6(0xe7));}if(!Number[_0x30c2f6(0xdf)](_0xe89021)||_0xe89021<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x30c2f6(0xcd),'Inspect\x20with\x20'+_0x19a75b+_0x30c2f6(0xd3));let _0x1e49cc;try{const _0x15181e=await getNotificationChannelConfig(_0xe89021,_0x4f16cd[_0x30c2f6(0xd1)]);_0x1e49cc=normalizeExactNotificationConfig(_0x15181e,_0xe89021,_0x4f16cd[_0x30c2f6(0xd1)]);}catch{throw safeApiFailure(_0x30c2f6(0xde),_0x30c2f6(0xdc),_0x30c2f6(0xe1)+_0x19a75b+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x30c2f6(0xde),'selector':{'appCode':_0x1e49cc['appCode'],'id':_0x1e49cc['id'],'configCode':_0x1e49cc[_0x30c2f6(0xe6)],'configName':_0x1e49cc[_0x30c2f6(0xc3)],'channelType':_0x1e49cc[_0x30c2f6(0xe2)]},'before':null,'after':projectNotificationConfig(_0x1e49cc),'dryRun':![],'backend':{'method':_0x30c2f6(0xce),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x30c2f6(0xc5),'lookupCommand':_0x19a75b}},'message':'Created\x20notification\x20config\x20'+_0x1e49cc['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a193_0x57d6d1=a193_0x2cd4;(function(_0x12e500,_0xa0075b){const _0x4ec66b=a193_0x2cd4,_0x175ec2=_0x12e500();while(!![]){try{const _0x25d1fd=parseInt(_0x4ec66b(0x197))/0x1*(-parseInt(_0x4ec66b(0x190))/0x2)+parseInt(_0x4ec66b(0x17b))/0x3+parseInt(_0x4ec66b(0x174))/0x4*(parseInt(_0x4ec66b(0x18a))/0x5)+-parseInt(_0x4ec66b(0x188))/0x6*(parseInt(_0x4ec66b(0x182))/0x7)+-parseInt(_0x4ec66b(0x178))/0x8*(parseInt(_0x4ec66b(0x17d))/0x9)+-parseInt(_0x4ec66b(0x183))/0xa+parseInt(_0x4ec66b(0x177))/0xb*(parseInt(_0x4ec66b(0x18b))/0xc);if(_0x25d1fd===_0xa0075b)break;else _0x175ec2['push'](_0x175ec2['shift']());}catch(_0x829ccf){_0x175ec2['push'](_0x175ec2['shift']());}}}(a193_0x10e6,0xa64cc));import{asDryRunResult}from'../../commands/common/dry-run.js';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_0x57d6d1(0x187),REFERENCE_WARNING=a193_0x57d6d1(0x186);function a193_0x2cd4(_0xed9bb3,_0x51a221){_0xed9bb3=_0xed9bb3-0x174;const _0x10e67a=a193_0x10e6();let _0x2cd46a=_0x10e67a[_0xed9bb3];return _0x2cd46a;}async function prepareDelete(_0x18f915){const _0x109ceb=a193_0x57d6d1,_0x458ef7=readNotificationId(_0x18f915),_0x56978a=await requireExactNotificationConfig(_0x18f915['appCode'],_0x458ef7,_0x109ceb(0x195));return{'id':_0x458ef7,'before':_0x56978a};}export const notificationConfigDelete={'service':a193_0x57d6d1(0x17a),'command':'config-delete','description':a193_0x57d6d1(0x196),'risk':a193_0x57d6d1(0x181),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x5c963f){readNotificationId(_0x5c963f),requireNotificationExplicitYes(_0x5c963f);},async 'dryRun'(_0x5958a5){const _0x4c14f8=a193_0x57d6d1,_0x2c8d01=await prepareDelete(_0x5958a5),_0x4c95f1=notificationLookupCommand(_0x5958a5[_0x4c14f8(0x191)],_0x2c8d01[_0x4c14f8(0x192)]['channelType']);return asDryRunResult({'operation':_0x4c14f8(0x195),'selector':notificationSelector(_0x2c8d01[_0x4c14f8(0x192)]),'before':projectNotificationConfig(_0x2c8d01['before']),'after':null,'dryRun':!![],'backend':{'method':_0x4c14f8(0x184),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x4c14f8(0x193),'lookupCommand':_0x4c95f1}},{'method':_0x4c14f8(0x184),'url':DELETE_PATH});},async 'execute'(_0x459002){const _0x298ede=a193_0x57d6d1;requireNotificationExplicitYes(_0x459002);const _0x2a758b=await prepareDelete(_0x459002),_0x23511c=notificationLookupCommand(_0x459002['appCode'],_0x2a758b[_0x298ede(0x192)]['channelType']);let _0x2db9bc=![];try{await deleteNotificationChannelConfig(_0x2a758b['id'],_0x459002['appCode']);}catch(_0x48afb3){if(!isPlatformTransportFailure(_0x48afb3))throw safeApiFailure(_0x298ede(0x195),'mutation','Inspect\x20with\x20'+_0x23511c+_0x298ede(0x179));_0x2db9bc=!![];}let _0x1d9f3f;try{_0x1d9f3f=await listNotificationChannelConfigs(_0x459002[_0x298ede(0x191)],_0x2a758b[_0x298ede(0x192)][_0x298ede(0x194)]),validateNotificationDeleteReadback(_0x1d9f3f,_0x459002[_0x298ede(0x191)],_0x2a758b[_0x298ede(0x192)][_0x298ede(0x194)]);}catch{throw notificationError(_0x2db9bc?'notification_config_delete_outcome_unknown':_0x298ede(0x18f),'Notification\x20config\x20'+_0x2a758b['id']+_0x298ede(0x185),_0x298ede(0x18d)+_0x23511c+_0x298ede(0x180));}if(_0x1d9f3f[_0x298ede(0x17c)](_0x2c658d=>_0x2c658d['id']===_0x2a758b['id']))throw notificationError(_0x2db9bc?_0x298ede(0x17f):_0x298ede(0x18e),_0x298ede(0x17e)+_0x2a758b['id']+_0x298ede(0x18c),'Inspect\x20with\x20'+_0x23511c+';\x20do\x20not\x20resubmit\x20automatically.');const _0x5eb949=[REFERENCE_WARNING];return _0x2db9bc&&_0x5eb949[_0x298ede(0x189)](_0x298ede(0x176)),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0x2a758b[_0x298ede(0x192)]),'before':projectNotificationConfig(_0x2a758b[_0x298ede(0x192)]),'after':null,'dryRun':![],'backend':{'method':_0x298ede(0x184),'path':DELETE_PATH},'warnings':_0x5eb949,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x2db9bc,'lookupCommand':_0x23511c}},'message':_0x298ede(0x175)+_0x2a758b['id']};}};function a193_0x10e6(){const _0x1b660d=['10287280lULOii','POST','\x20delete\x20could\x20not\x20be\x20verified.','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','/notification/channel-config/delete','6KjDCBq','unshift','1357415wFoSZE','160548sjqpfN','\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20','notification_config_delete_verification_failed','notification_config_delete_verification_unavailable','8SBcHwr','appCode','before','planned','channelType','delete','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','25903lpEfIb','20drzFye','Deleted\x20notification\x20config\x20','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','121sWRjyt','150312OWIYYX',';\x20no\x20automatic\x20retry\x20was\x20attempted.','notification','3036201jbILUM','some','18SYxQbM','Notification\x20config\x20','notification_config_delete_outcome_unknown',';\x20do\x20not\x20resubmit\x20automatically.','high-risk-write','4658983whNSTG'];a193_0x10e6=function(){return _0x1b660d;};return a193_0x10e6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a194_0x1ec2f9=a194_0x16b1;function a194_0x16b1(_0x1d70d0,_0x533dac){_0x1d70d0=_0x1d70d0-0x6f;const _0x44fecf=a194_0x44fe();let _0x16b12d=_0x44fecf[_0x1d70d0];return _0x16b12d;}(function(_0x4b4101,_0x5bf9fc){const _0x3327c8=a194_0x16b1,_0x220c73=_0x4b4101();while(!![]){try{const _0x17ef06=-parseInt(_0x3327c8(0x72))/0x1+-parseInt(_0x3327c8(0x8c))/0x2*(parseInt(_0x3327c8(0x80))/0x3)+parseInt(_0x3327c8(0x79))/0x4+parseInt(_0x3327c8(0x75))/0x5+parseInt(_0x3327c8(0x82))/0x6*(-parseInt(_0x3327c8(0x89))/0x7)+-parseInt(_0x3327c8(0x85))/0x8*(parseInt(_0x3327c8(0x77))/0x9)+parseInt(_0x3327c8(0x76))/0xa*(parseInt(_0x3327c8(0x70))/0xb);if(_0x17ef06===_0x5bf9fc)break;else _0x220c73['push'](_0x220c73['shift']());}catch(_0x3e8ae7){_0x220c73['push'](_0x220c73['shift']());}}}(a194_0x44fe,0x1eaa8));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a194_0x1ec2f9(0x8a),'command':a194_0x1ec2f9(0x71),'description':a194_0x1ec2f9(0x87),'risk':a194_0x1ec2f9(0x8b),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a194_0x1ec2f9(0x81),'type':a194_0x1ec2f9(0x7d),'description':a194_0x1ec2f9(0x7e),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a194_0x1ec2f9(0x78),'type':a194_0x1ec2f9(0x83),'default':![],'description':a194_0x1ec2f9(0x74)}],async 'validate'(_0x2a271a){const _0x2bd6da=a194_0x1ec2f9;if(_0x2a271a[_0x2bd6da(0x7a)]('all')&&_0x2a271a['str'](_0x2bd6da(0x81))['trim']())throw CliErrors[_0x2bd6da(0x88)](_0x2bd6da(0x7b),'Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.');if(_0x2a271a[_0x2bd6da(0x7a)](_0x2bd6da(0x78)))return;readNotificationChannelType(_0x2a271a);},async 'execute'(_0x577023){const _0x102fb8=a194_0x1ec2f9;if(_0x577023[_0x102fb8(0x7a)]('all')){const _0x9bda68=await Promise['all'](NOTIFICATION_CHANNEL_TYPES[_0x102fb8(0x73)](_0x43ef2f=>listNotificationChannelConfigs(_0x577023[_0x102fb8(0x86)],_0x43ef2f))),_0x4d1e18=_0x9bda68[_0x102fb8(0x7c)]()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x577023[_0x102fb8(0x86)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x4d1e18[_0x102fb8(0x6f)],'configs':_0x4d1e18},'message':_0x102fb8(0x7f)+_0x4d1e18[_0x102fb8(0x6f)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0xc095c9=readNotificationChannelType(_0x577023),_0x71383d=await listNotificationChannelConfigs(_0x577023[_0x102fb8(0x86)],_0xc095c9),_0x24c146=_0x71383d['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x577023[_0x102fb8(0x86)],'channelType':_0xc095c9,'count':_0x24c146[_0x102fb8(0x6f)],'configs':_0x24c146},'message':'Found\x20'+_0x24c146[_0x102fb8(0x6f)]+'\x20'+_0xc095c9+_0x102fb8(0x84)};}};function a194_0x44fe(){const _0x2f5f63=['flat','string','Notification\x20channel\x20type','Found\x20','75PaciHq','type','18sesVLT','boolean','\x20notification\x20config(s)','24Juzzam','appCode','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','validation','533393WKihQs','notification','read','11124aXIljm','length','96657uDzNMI','config-list','222067DdDDjl','map','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','1193185iXRrww','450YoOSpz','39609SrdNRq','all','377892cIsDmF','bool','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.'];a194_0x44fe=function(){return _0x2f5f63;};return a194_0x44fe();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a195_0x37b934=a195_0x2696;function a195_0x3fe4(){const _0x1a15a8=['high-risk-write','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','Notification\x20config\x20','notification_config_update_outcome_unknown','notification_config_update_verification_failed','3029724JuRMtC','update',';\x20no\x20automatic\x20retry\x20was\x20attempted.','mutation','Inspect\x20ID\x20','65901snFHVq','provesChange','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','1633660wOlhvl','notification_config_update_verification_unavailable','POST','\x20with\x20','\x20via\x20','patch','verified','284130aExCKT','59967fDfHya','notification','Inspect\x20with\x20--id\x20',';\x20do\x20not\x20resubmit\x20automatically.','before','2424275SXkJhj','appCode','1893712AGWABz'];a195_0x3fe4=function(){return _0x1a15a8;};return a195_0x3fe4();}(function(_0x59e40d,_0xfa68ab){const _0x14f425=a195_0x2696,_0x48f200=_0x59e40d();while(!![]){try{const _0x2b54ab=-parseInt(_0x14f425(0x148))/0x1+parseInt(_0x14f425(0x147))/0x2+-parseInt(_0x14f425(0x13d))/0x3+parseInt(_0x14f425(0x14f))/0x4+parseInt(_0x14f425(0x14d))/0x5+-parseInt(_0x14f425(0x155))/0x6+-parseInt(_0x14f425(0x140))/0x7;if(_0x2b54ab===_0xfa68ab)break;else _0x48f200['push'](_0x48f200['shift']());}catch(_0x3de4c3){_0x48f200['push'](_0x48f200['shift']());}}}(a195_0x3fe4,0x44610));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';function a195_0x2696(_0x3a2815,_0x32f657){_0x3a2815=_0x3a2815-0x13c;const _0x3fe46a=a195_0x3fe4();let _0x269699=_0x3fe46a[_0x3a2815];return _0x269699;}const UPDATE_PATH='/notification/channel-config/update';async function prepareUpdate(_0x5a6b97){const _0x103781=a195_0x2696,_0x43efce=readNotificationId(_0x5a6b97),_0x261c9b=await readNotificationDocument(_0x5a6b97,_0x103781(0x156)),_0x4c24dd=await requireExactNotificationConfig(_0x5a6b97[_0x103781(0x14e)],_0x43efce,_0x103781(0x156));return{'id':_0x43efce,'patch':_0x261c9b,'before':_0x4c24dd,'payload':mergeUpdateInput(_0x4c24dd,_0x261c9b),'planned':plannedUpdateProjection(_0x4c24dd,_0x261c9b)};}export const notificationConfigUpdate={'service':a195_0x37b934(0x149),'command':'config-update','description':a195_0x37b934(0x151),'risk':a195_0x37b934(0x150),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x2b6199){readNotificationId(_0x2b6199),assertSingleNotificationSource(_0x2b6199),requireNotificationExplicitYes(_0x2b6199);},async 'dryRun'(_0x4122e7){const _0xff4659=a195_0x37b934,_0x5b95aa=await prepareUpdate(_0x4122e7),_0x3ed795=notificationLookupCommand(_0x4122e7['appCode'],_0x5b95aa[_0xff4659(0x14c)]['channelType']);return asDryRunResult({'operation':_0xff4659(0x156),'selector':notificationSelector(_0x5b95aa[_0xff4659(0x14c)]),'before':projectNotificationConfig(_0x5b95aa[_0xff4659(0x14c)]),'after':_0x5b95aa['planned'],'dryRun':!![],'backend':{'method':_0xff4659(0x142),'path':UPDATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x3ed795}},{'method':_0xff4659(0x142),'url':UPDATE_PATH});},async 'execute'(_0x3b9117){const _0x4a9f4b=a195_0x37b934;requireNotificationExplicitYes(_0x3b9117);const _0x84244e=await prepareUpdate(_0x3b9117),_0x33e173=notificationLookupCommand(_0x3b9117[_0x4a9f4b(0x14e)],_0x84244e['before']['channelType']);let _0x175bb1=![];try{await updateNotificationChannelConfig(_0x84244e['payload']);}catch(_0x4a2cdc){if(!isPlatformTransportFailure(_0x4a2cdc))throw safeApiFailure(_0x4a9f4b(0x156),_0x4a9f4b(0x158),_0x4a9f4b(0x13c)+_0x84244e['id']+_0x4a9f4b(0x143)+_0x33e173+_0x4a9f4b(0x157));_0x175bb1=!![];}let _0xb62d48;try{const _0x57f571=await getNotificationChannelConfig(_0x84244e['id'],_0x3b9117[_0x4a9f4b(0x14e)]);_0xb62d48=normalizeExactNotificationConfig(_0x57f571,_0x84244e['id'],_0x3b9117[_0x4a9f4b(0x14e)]);}catch{throw notificationError(_0x175bb1?'notification_config_update_outcome_unknown':_0x4a9f4b(0x141),_0x4a9f4b(0x152)+_0x84244e['id']+_0x4a9f4b(0x13f),'Inspect\x20with\x20--id\x20'+_0x84244e['id']+_0x4a9f4b(0x144)+_0x33e173+_0x4a9f4b(0x14b));}const _0x48f947=requestedSafeFieldsMatch(_0x84244e[_0x4a9f4b(0x14c)],_0xb62d48,_0x84244e[_0x4a9f4b(0x145)]);if(!_0x48f947['allMatch']||_0x175bb1&&!_0x48f947[_0x4a9f4b(0x13e)])throw notificationError(_0x175bb1?_0x4a9f4b(0x153):_0x4a9f4b(0x154),_0x4a9f4b(0x152)+_0x84244e['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x4a9f4b(0x14a)+_0x84244e['id']+_0x4a9f4b(0x144)+_0x33e173+_0x4a9f4b(0x14b));const _0x3c5679=_0x175bb1?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0xb62d48),'before':projectNotificationConfig(_0x84244e[_0x4a9f4b(0x14c)]),'after':projectNotificationConfig(_0xb62d48),'dryRun':![],'backend':{'method':_0x4a9f4b(0x142),'path':UPDATE_PATH},'warnings':_0x3c5679,'verification':{'status':_0x4a9f4b(0x146),'recoveredAfterUnknownResponse':_0x175bb1,'verifiedFields':_0x48f947['verifiedFields'],'lookupCommand':_0x33e173}},'message':'Updated\x20notification\x20config\x20'+_0xb62d48['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2e0575,_0x60fbe1){const _0x309515=a196_0x2c5f,_0x596e2d=_0x2e0575();while(!![]){try{const _0x16d1d0=parseInt(_0x309515(0xeb))/0x1*(parseInt(_0x309515(0xef))/0x2)+-parseInt(_0x309515(0xea))/0x3*(parseInt(_0x309515(0xe8))/0x4)+-parseInt(_0x309515(0xed))/0x5+-parseInt(_0x309515(0xf0))/0x6+parseInt(_0x309515(0xe9))/0x7+parseInt(_0x309515(0xf1))/0x8*(parseInt(_0x309515(0xec))/0x9)+-parseInt(_0x309515(0xee))/0xa;if(_0x16d1d0===_0x60fbe1)break;else _0x596e2d['push'](_0x596e2d['shift']());}catch(_0x48b44b){_0x596e2d['push'](_0x596e2d['shift']());}}}(a196_0x1fd0,0x663e4));function a196_0x2c5f(_0x6d7a8f,_0x9ae4d8){_0x6d7a8f=_0x6d7a8f-0xe8;const _0x1fd0b5=a196_0x1fd0();let _0x2c5fb4=_0x1fd0b5[_0x6d7a8f];return _0x2c5fb4;}import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a196_0x1fd0(){const _0x5c39b4=['434580wPKpNM','4647170riEBYF','2BQuuGA','1075866UDiMVm','184NbAPVl','4IJteZb','4508595KmlcWY','1162371XGmcOP','428711kuZFCR','181719JurDHR'];a196_0x1fd0=function(){return _0x5c39b4;};return a196_0x1fd0();}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a197_0x1e9c36=a197_0x3bdc;function a197_0x3473(){const _0x2574cf=['stringify','Notification\x20JSON\x20field\x20\x22','trim','call','replyTo','channelType','a\x20non-empty\x20string','\x20has\x20an\x20invalid\x20channelType.','isSafeInteger','notification_config_update_empty','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x22configName\x22.','29170qOmTJk','stdin','update','configName','a\x20string\x20or\x20null','subjectPrefix','notification_config_field_required','ccList','Notification\x20config\x20list\x20item\x20','prototype','push','isArray','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','every','860kzuKJL','channelConfigRaw','name','Allowed\x20values:\x20','notification_config_field_forbidden','32waqnad','from-env','notification_config_confirmation_required','WECOM','join','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','apiError','\x22\x20cannot\x20exceed\x20','Notification\x20JSON\x20from\x20','3355rIwwXi','entries','Item\x20','path','description','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','notification_config_field_unknown','bccList','WEBHOOK','readTimeout','<redacted>','6Ntgult','notification_config_','\x20has\x20an\x20invalid\x20id.','notification_config_source_unavailable','preflight','DINGTALK','length','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','a\x20supported\x20string','FEISHU','\x20is\x20missing\x20required\x20field\x20\x22','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','number','channelConfig','\x20--type\x20','\x20has\x20invalid\x20field\x20\x22','\x20has\x20an\x20unsupported\x20channelType.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','451535hrQOKP','env','emailTargets','endpointUrl:null','file','notification_config_channel_field_forbidden','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','includes','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Unknown\x20notification\x20JSON\x20field\x20\x22','setEncoding','Missing\x20notification\x20JSON\x20source.','\x20characters.','keys','updateTime','Notification\x20JSON\x20source\x20is\x20ambiguous.','Notification\x20config\x20','channelCode','Application-level\x20notification\x20config\x20ID','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','784728RirHFN','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','messageTemplate','Notification\x20JSON\x20channelConfig\x20field\x20\x22','132828HeSSJd','notification_config_field_invalid','endpointUrlRaw','\x22\x20must\x20be\x20','str','Invalid\x20notification\x20config\x20response.','mutation','boolean','_unavailable','notification_config_id_invalid','EMAIL','Invalid\x20--','has','endpointUrl','connectTimeout','environment\x20variable\x20','configCode','a\x20JSON\x20object','\x22\x20is\x20forbidden.','string','115596JTduCx','rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20must\x20be\x20an\x20object.','bool','notification_config_response_invalid','create','utf8','dry-run','4dIlDUp','\x22channelType\x22.','failed','notification_config_json_invalid','validation','Create\x20JSON\x20requires\x20field\x20','appCode','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','fromName','kind','4899284NDRngR','num','1544575yMCBxV'];a197_0x3473=function(){return _0x2574cf;};return a197_0x3473();}(function(_0x51b05d,_0x5d493f){const _0x47261f=a197_0x3bdc,_0xac62f0=_0x51b05d();while(!![]){try{const _0x1e3a37=-parseInt(_0x47261f(0x19a))/0x1*(parseInt(_0x47261f(0x1b3))/0x2)+parseInt(_0x47261f(0x17a))/0x3+-parseInt(_0x47261f(0x1a4))/0x4+parseInt(_0x47261f(0x1a6))/0x5*(-parseInt(_0x47261f(0x1db))/0x6)+-parseInt(_0x47261f(0x165))/0x7*(parseInt(_0x47261f(0x1c6))/0x8)+parseInt(_0x47261f(0x192))/0x9*(-parseInt(_0x47261f(0x1c1))/0xa)+parseInt(_0x47261f(0x1d0))/0xb*(parseInt(_0x47261f(0x17e))/0xc);if(_0x1e3a37===_0x5d493f)break;else _0xac62f0['push'](_0xac62f0['shift']());}catch(_0xbf76d7){_0xac62f0['push'](_0xac62f0['shift']());}}}(a197_0x3473,0xa6bbd));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_0x1e9c36(0x188),a197_0x1e9c36(0x15c),a197_0x1e9c36(0x158),a197_0x1e9c36(0x1c9),a197_0x1e9c36(0x1d8)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName','channelType',a197_0x1e9c36(0x18b),a197_0x1e9c36(0x160),a197_0x1e9c36(0x1d4),a197_0x1e9c36(0x18c),a197_0x1e9c36(0x1d9)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x1e9c36(0x1a0),a197_0x1e9c36(0x18e),a197_0x1e9c36(0x177)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x1e9c36(0x167),'recipients',a197_0x1e9c36(0x1ba),a197_0x1e9c36(0x1d7),a197_0x1e9c36(0x1ab),a197_0x1e9c36(0x1b8),a197_0x1e9c36(0x1a2),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x1e9c36(0x169),'type':a197_0x1e9c36(0x191),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':'stdin','type':a197_0x1e9c36(0x185),'required':![],'default':![],'description':a197_0x1e9c36(0x1a1)},{'name':a197_0x1e9c36(0x1c7),'type':a197_0x1e9c36(0x191),'required':![],'description':a197_0x1e9c36(0x15a)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x1e9c36(0x15f),'required':!![],'description':a197_0x1e9c36(0x178)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5a63b3,_0x1a5dd9,_0x2c0214){return new CliError(_0x5a63b3,0x1,_0x1a5dd9,_0x2c0214);}export function readNotificationId(_0x58975f){const _0x59eb95=a197_0x1e9c36,_0x14fb36=_0x58975f[_0x59eb95(0x1a5)]('id');if(!Number[_0x59eb95(0x1af)](_0x14fb36)||_0x14fb36<=0x0)throw notificationError(_0x59eb95(0x187),_0x59eb95(0x16b));return _0x14fb36;}export function requireNotificationExplicitYes(_0x13aefe){const _0x5f2d5f=a197_0x1e9c36;if(_0x13aefe[_0x5f2d5f(0x195)](_0x5f2d5f(0x199))||_0x13aefe['bool']('yes'))return;throw notificationError(_0x5f2d5f(0x1c8),_0x5f2d5f(0x1cb),_0x5f2d5f(0x164));}export function readNotificationChannelType(_0x27c422,_0x245650='type',_0x154281=a197_0x1e9c36(0x188)){const _0x4d8d9b=a197_0x1e9c36,_0x42cc1c=_0x27c422[_0x4d8d9b(0x182)](_0x245650)[_0x4d8d9b(0x1a9)]()||_0x154281;if(!NOTIFICATION_CHANNEL_TYPES[_0x4d8d9b(0x16d)](_0x42cc1c))throw CliErrors[_0x4d8d9b(0x19e)](_0x4d8d9b(0x189)+_0x245650+':\x20'+_0x42cc1c,_0x4d8d9b(0x1c4)+NOTIFICATION_CHANNEL_TYPES[_0x4d8d9b(0x1ca)](',\x20')+'.');return _0x42cc1c;}export function assertSingleNotificationSource(_0x3d2774){const _0x58cda9=a197_0x1e9c36,_0x2a5142=[],_0xff3d9b=_0x3d2774[_0x58cda9(0x182)](_0x58cda9(0x169))['trim']();if(_0xff3d9b)_0x2a5142['push']({'kind':'file','path':_0xff3d9b});if(_0x3d2774[_0x58cda9(0x195)](_0x58cda9(0x1b4)))_0x2a5142[_0x58cda9(0x1bd)]({'kind':_0x58cda9(0x1b4)});const _0x235303=_0x3d2774[_0x58cda9(0x182)](_0x58cda9(0x1c7))[_0x58cda9(0x1a9)]();if(_0x235303)_0x2a5142['push']({'kind':'env','name':_0x235303});if(_0x2a5142['length']===0x0)throw CliErrors['validation'](_0x58cda9(0x171),_0x58cda9(0x17b));if(_0x2a5142[_0x58cda9(0x159)]>0x1)throw CliErrors['validation'](_0x58cda9(0x175),_0x58cda9(0x17b));return _0x2a5142[0x0];}export async function readNotificationDocument(_0x35f880,_0x4a0031){const _0x289d43=a197_0x1e9c36,_0x3a0fbb=assertSingleNotificationSource(_0x35f880),_0x509991=_0x3a0fbb[_0x289d43(0x1a3)]===_0x289d43(0x169)?'file\x20'+_0x3a0fbb[_0x289d43(0x1d3)]:_0x3a0fbb[_0x289d43(0x1a3)]===_0x289d43(0x166)?_0x289d43(0x18d)+_0x3a0fbb[_0x289d43(0x1c3)]:_0x289d43(0x1b4);let _0x40b947;try{if(_0x3a0fbb[_0x289d43(0x1a3)]===_0x289d43(0x169))_0x40b947=await readFile(_0x3a0fbb[_0x289d43(0x1d3)],_0x289d43(0x198));else{if(_0x3a0fbb[_0x289d43(0x1a3)]===_0x289d43(0x166)){if(!(_0x3a0fbb['name']in process.env))throw notificationError(_0x289d43(0x1de),_0x289d43(0x1d5)+_0x3a0fbb['name']);_0x40b947=process.env[_0x3a0fbb.name]??'';}else _0x40b947=await readStdin();}}catch(_0x5b672c){if(_0x5b672c instanceof CliError)throw _0x5b672c;throw notificationError(_0x289d43(0x1de),_0x289d43(0x15e)+_0x509991+'.');}let _0x270284;try{_0x270284=JSON['parse'](_0x40b947);}catch{throw notificationError(_0x289d43(0x19d),_0x289d43(0x1cf)+_0x509991+'\x20is\x20invalid.','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x270284))throw notificationError(_0x289d43(0x19d),_0x289d43(0x1cf)+_0x509991+_0x289d43(0x194));return validateNotificationDocument(_0x270284,_0x4a0031);}export function projectNotificationListConfig(_0x31ba34,_0x15a2a0){const _0x1baa24=a197_0x1e9c36;return{'id':typeof _0x31ba34['id']===_0x1baa24(0x15f)?_0x31ba34['id']:null,'configCode':requireResponseString(_0x31ba34[_0x1baa24(0x18e)],'configCode',_0x15a2a0),'configName':requireResponseString(_0x31ba34['configName'],_0x1baa24(0x1b6),_0x15a2a0),'channelType':requireResponseString(_0x31ba34[_0x1baa24(0x1ac)],_0x1baa24(0x1ac),_0x15a2a0),'description':normalizeNullableString(_0x31ba34[_0x1baa24(0x1d4)]),'createTime':normalizeNullableString(_0x31ba34['createTime']),'updateTime':normalizeNullableString(_0x31ba34[_0x1baa24(0x174)])};}function a197_0x3bdc(_0x49ac77,_0x2ea21a){_0x49ac77=_0x49ac77-0x158;const _0x34730d=a197_0x3473();let _0x3bdcf7=_0x34730d[_0x49ac77];return _0x3bdcf7;}export function normalizeExactNotificationConfig(_0x47c136,_0x3ab9a1,_0x32cc36){const _0x612b13=a197_0x1e9c36;if(!Number[_0x612b13(0x1af)](_0x47c136['id'])||_0x47c136['id']!==_0x3ab9a1)throw notificationError(_0x612b13(0x196),_0x612b13(0x1bf)+_0x3ab9a1+'.');if(_0x47c136['appCode']!==_0x32cc36)throw notificationError(_0x612b13(0x196),_0x612b13(0x176)+_0x3ab9a1+_0x612b13(0x1b1));const _0x4f93db=requireExactString(_0x47c136[_0x612b13(0x1b6)],_0x612b13(0x1b6),_0x3ab9a1),_0x3992f2=requireExactString(_0x47c136['configCode'],'configCode',_0x3ab9a1),_0x537ffa=requireExactString(_0x47c136[_0x612b13(0x1ac)],_0x612b13(0x1ac),_0x3ab9a1);if(!NOTIFICATION_CHANNEL_TYPES[_0x612b13(0x16d)](_0x537ffa))throw notificationError(_0x612b13(0x196),_0x612b13(0x176)+_0x3ab9a1+_0x612b13(0x163));const _0x4ca14e=responseNullableString(_0x47c136[_0x612b13(0x18b)],_0x612b13(0x18b),_0x3ab9a1),_0x2535a5=responseNullableString(_0x47c136['channelConfig'],_0x612b13(0x160),_0x3ab9a1),_0xced6ae=responseNullableString(_0x47c136[_0x612b13(0x1d4)],_0x612b13(0x1d4),_0x3ab9a1),_0x5b0e08=responseNullableTimeout(_0x47c136[_0x612b13(0x18c)],_0x612b13(0x18c),_0x3ab9a1),_0x46f7ed=responseNullableTimeout(_0x47c136[_0x612b13(0x1d9)],'readTimeout',_0x3ab9a1);return{'id':_0x3ab9a1,'appCode':_0x32cc36,'configCode':_0x3992f2,'configName':_0x4f93db,'channelType':_0x537ffa,'endpointUrl':redactSensitive(_0x4ca14e),'channelConfig':redactSensitive(_0x2535a5),'description':_0xced6ae,'connectTimeout':_0x5b0e08,'readTimeout':_0x46f7ed,'endpointUrlRaw':_0x4ca14e,'channelConfigRaw':_0x2535a5};}export async function requireExactNotificationConfig(_0x292666,_0x5e90e7,_0x3a4146){const _0x26029b=a197_0x1e9c36;let _0x165b01;try{_0x165b01=await getNotificationChannelConfig(_0x5e90e7,_0x292666);}catch{throw safeApiFailure(_0x3a4146,_0x26029b(0x1df),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x292666+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x165b01,_0x5e90e7,_0x292666);}export function projectNotificationConfig(_0x3ca4dd){const _0x11c188=a197_0x1e9c36;return{'id':_0x3ca4dd['id']??null,'appCode':_0x3ca4dd[_0x11c188(0x1a0)],'configCode':_0x3ca4dd['configCode']??null,'configName':_0x3ca4dd[_0x11c188(0x1b6)],'channelType':_0x3ca4dd['channelType'],'endpointUrl':redactSensitive(_0x3ca4dd['endpointUrl']),'channelConfig':redactSensitive(_0x3ca4dd[_0x11c188(0x160)]),'description':_0x3ca4dd['description']??null,'connectTimeout':_0x3ca4dd[_0x11c188(0x18c)]??null,'readTimeout':_0x3ca4dd[_0x11c188(0x1d9)]??null};}export function notificationSelector(_0x42e44b){const _0x87b05a=a197_0x1e9c36;return{'appCode':_0x42e44b[_0x87b05a(0x1a0)],'id':_0x42e44b['id'],'configCode':_0x42e44b[_0x87b05a(0x18e)],'configName':_0x42e44b[_0x87b05a(0x1b6)],'channelType':_0x42e44b[_0x87b05a(0x1ac)]};}export function createMutationInput(_0x3c66a2,_0xa73468){const _0xd7d1e9=a197_0x1e9c36;return{'appCode':_0x3c66a2,'configName':_0xa73468[_0xd7d1e9(0x1b6)],'channelType':_0xa73468[_0xd7d1e9(0x1ac)],...hasOwn(_0xa73468,'endpointUrl')?{'endpointUrl':_0xa73468[_0xd7d1e9(0x18b)]}:{},...hasOwn(_0xa73468,_0xd7d1e9(0x160))?{'channelConfig':serializeChannelConfig(_0xa73468[_0xd7d1e9(0x160)])}:{},...hasOwn(_0xa73468,_0xd7d1e9(0x1d4))?{'description':_0xa73468[_0xd7d1e9(0x1d4)]}:{},...hasOwn(_0xa73468,_0xd7d1e9(0x18c))?{'connectTimeout':_0xa73468['connectTimeout']}:{},...hasOwn(_0xa73468,_0xd7d1e9(0x1d9))?{'readTimeout':_0xa73468[_0xd7d1e9(0x1d9)]}:{}};}export function mergeUpdateInput(_0xf15ec1,_0x380a5b){const _0x243d05=a197_0x1e9c36;return{'id':_0xf15ec1['id'],'appCode':_0xf15ec1[_0x243d05(0x1a0)],'configName':_0x380a5b[_0x243d05(0x1b6)]??_0xf15ec1['configName'],'channelType':_0x380a5b[_0x243d05(0x1ac)]??_0xf15ec1[_0x243d05(0x1ac)],'endpointUrl':hasOwn(_0x380a5b,_0x243d05(0x18b))?_0x380a5b[_0x243d05(0x18b)]:_0xf15ec1['endpointUrlRaw'],'channelConfig':hasOwn(_0x380a5b,_0x243d05(0x160))?serializeChannelConfig(_0x380a5b[_0x243d05(0x160)]):_0xf15ec1[_0x243d05(0x1c2)],'description':hasOwn(_0x380a5b,_0x243d05(0x1d4))?_0x380a5b['description']:_0xf15ec1[_0x243d05(0x1d4)],'connectTimeout':hasOwn(_0x380a5b,_0x243d05(0x18c))?_0x380a5b[_0x243d05(0x18c)]:_0xf15ec1[_0x243d05(0x18c)],'readTimeout':hasOwn(_0x380a5b,_0x243d05(0x1d9))?_0x380a5b['readTimeout']:_0xf15ec1[_0x243d05(0x1d9)]};}export function plannedUpdateProjection(_0x202927,_0x4b96a5){const _0x4ca9b4=a197_0x1e9c36;return projectNotificationConfig({'id':_0x202927['id'],'appCode':_0x202927[_0x4ca9b4(0x1a0)],'configCode':_0x202927[_0x4ca9b4(0x18e)],'configName':_0x4b96a5['configName']??_0x202927['configName'],'channelType':_0x4b96a5['channelType']??_0x202927['channelType'],'endpointUrl':hasOwn(_0x4b96a5,_0x4ca9b4(0x18b))?_0x4b96a5[_0x4ca9b4(0x18b)]:_0x202927[_0x4ca9b4(0x180)],'channelConfig':hasOwn(_0x4b96a5,_0x4ca9b4(0x160))?_0x4b96a5[_0x4ca9b4(0x160)]:_0x202927[_0x4ca9b4(0x1c2)],'description':hasOwn(_0x4b96a5,'description')?_0x4b96a5[_0x4ca9b4(0x1d4)]:_0x202927[_0x4ca9b4(0x1d4)],'connectTimeout':hasOwn(_0x4b96a5,_0x4ca9b4(0x18c))?_0x4b96a5[_0x4ca9b4(0x18c)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x202927[_0x4ca9b4(0x18c)],'readTimeout':hasOwn(_0x4b96a5,_0x4ca9b4(0x1d9))?_0x4b96a5['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x202927['readTimeout']});}export function requestedSafeFieldsMatch(_0x47345b,_0x1c36c5,_0x54145e){const _0x19179e=a197_0x1e9c36,_0x4ca850=[],_0x3ebf1c=[],_0x5f7cd4=[];for(const _0x12276b of[_0x19179e(0x1b6),_0x19179e(0x1ac),'description']){if(!hasOwn(_0x54145e,_0x12276b))continue;_0x5f7cd4[_0x19179e(0x1bd)](_0x12276b),_0x4ca850[_0x19179e(0x1bd)](_0x1c36c5[_0x12276b]===_0x54145e[_0x12276b]),_0x3ebf1c[_0x19179e(0x1bd)](_0x47345b[_0x12276b]!==_0x54145e[_0x12276b]&&_0x1c36c5[_0x12276b]===_0x54145e[_0x12276b]);}for(const _0x3e5f85 of[_0x19179e(0x18c),_0x19179e(0x1d9)]){if(!hasOwn(_0x54145e,_0x3e5f85))continue;const _0x447341=_0x54145e[_0x3e5f85]??(_0x3e5f85===_0x19179e(0x18c)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x5f7cd4[_0x19179e(0x1bd)](_0x3e5f85),_0x4ca850['push'](_0x1c36c5[_0x3e5f85]===_0x447341),_0x3ebf1c['push'](_0x47345b[_0x3e5f85]!==_0x447341&&_0x1c36c5[_0x3e5f85]===_0x447341);}return hasOwn(_0x54145e,_0x19179e(0x18b))&&_0x54145e[_0x19179e(0x18b)]===null&&(_0x5f7cd4[_0x19179e(0x1bd)](_0x19179e(0x168)),_0x4ca850[_0x19179e(0x1bd)](_0x1c36c5[_0x19179e(0x180)]===null||_0x1c36c5[_0x19179e(0x180)]===''),_0x3ebf1c[_0x19179e(0x1bd)](_0x47345b['endpointUrlRaw']!==null&&_0x47345b['endpointUrlRaw']!==''&&(_0x1c36c5['endpointUrlRaw']===null||_0x1c36c5[_0x19179e(0x180)]===''))),{'allMatch':_0x4ca850[_0x19179e(0x1c0)](Boolean),'provesChange':_0x3ebf1c['some'](Boolean),'verifiedFields':_0x5f7cd4};}export function validateNotificationDeleteReadback(_0x3fecd2,_0x3386b6,_0x366f23){const _0x34806e=a197_0x1e9c36;for(const [_0x199df0,_0x2db8e1]of _0x3fecd2[_0x34806e(0x1d1)]()){if(!Number[_0x34806e(0x1af)](_0x2db8e1['id'])||_0x2db8e1['id']<=0x0)throw notificationError(_0x34806e(0x196),_0x34806e(0x1bb)+(_0x199df0+0x1)+_0x34806e(0x1dd));if(_0x2db8e1[_0x34806e(0x1a0)]!==_0x3386b6)throw notificationError(_0x34806e(0x196),_0x34806e(0x1bb)+(_0x199df0+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x2db8e1[_0x34806e(0x1ac)]!==_0x366f23)throw notificationError(_0x34806e(0x196),_0x34806e(0x1bb)+(_0x199df0+0x1)+_0x34806e(0x1ae));}}export function safeApiFailure(_0x791a5e,_0x1d9a64,_0x23faa4){const _0x5ec257=a197_0x1e9c36;return notificationError(_0x5ec257(0x1dc)+_0x791a5e+'_'+(_0x1d9a64===_0x5ec257(0x184)?_0x5ec257(0x19c):_0x1d9a64+_0x5ec257(0x186)),_0x5ec257(0x176)+_0x791a5e+'\x20'+_0x1d9a64+'\x20failed.',_0x23faa4);}export function notificationLookupCommand(_0x33b105,_0x16fce8){const _0x3514be=a197_0x1e9c36;return _0x3514be(0x193)+_0x33b105+_0x3514be(0x161)+_0x16fce8+'\x20--format\x20compress';}function validateNotificationDocument(_0x5bbd30,_0x13a7e8){const _0x8f554d=a197_0x1e9c36;for(const _0x22cdc9 of Object[_0x8f554d(0x173)](_0x5bbd30)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x22cdc9))throw notificationError(_0x8f554d(0x1c5),'Notification\x20JSON\x20field\x20\x22'+_0x22cdc9+_0x8f554d(0x179));if(!ALLOWED_INPUT_FIELDS[_0x8f554d(0x18a)](_0x22cdc9))throw notificationError(_0x8f554d(0x1d6),_0x8f554d(0x16f)+_0x22cdc9+'\x22.');}if(_0x13a7e8===_0x8f554d(0x1b5)&&Object[_0x8f554d(0x173)](_0x5bbd30)['length']===0x0)throw notificationError(_0x8f554d(0x1b0),_0x8f554d(0x16e));const _0x4a888d={};if(hasOwn(_0x5bbd30,_0x8f554d(0x1b6)))_0x4a888d[_0x8f554d(0x1b6)]=validateRequiredString(_0x5bbd30[_0x8f554d(0x1b6)],_0x8f554d(0x1b6),0x80);else{if(_0x13a7e8===_0x8f554d(0x197))throw notificationError(_0x8f554d(0x1b9),_0x8f554d(0x19f)+_0x8f554d(0x1b2));}if(hasOwn(_0x5bbd30,_0x8f554d(0x1ac))){if(typeof _0x5bbd30['channelType']!==_0x8f554d(0x191))throw invalidFieldType(_0x8f554d(0x1ac),_0x8f554d(0x15b));const _0x3b828b=_0x5bbd30[_0x8f554d(0x1ac)][_0x8f554d(0x1a9)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x8f554d(0x16d)](_0x3b828b))throw notificationError(_0x8f554d(0x17f),_0x8f554d(0x16c),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x4a888d[_0x8f554d(0x1ac)]=_0x3b828b;}else{if(_0x13a7e8==='create')throw notificationError(_0x8f554d(0x1b9),'Create\x20JSON\x20requires\x20field\x20'+_0x8f554d(0x19b));}for(const [_0x1db835,_0x136ce1]of[[_0x8f554d(0x18b),0x200],[_0x8f554d(0x1d4),0x100]]){if(!hasOwn(_0x5bbd30,_0x1db835))continue;const _0x27a1ea=_0x5bbd30[_0x1db835];if(_0x27a1ea!==null&&typeof _0x27a1ea!==_0x8f554d(0x191))throw invalidFieldType(_0x1db835,_0x8f554d(0x1b7));if(typeof _0x27a1ea===_0x8f554d(0x191)&&_0x27a1ea[_0x8f554d(0x159)]>_0x136ce1)throw notificationError(_0x8f554d(0x17f),_0x8f554d(0x1a8)+_0x1db835+_0x8f554d(0x1ce)+_0x136ce1+'\x20characters.');_0x4a888d[_0x1db835]=_0x27a1ea;}if(hasOwn(_0x5bbd30,_0x8f554d(0x160))){const _0x5d27d9=_0x5bbd30[_0x8f554d(0x160)];if(_0x5d27d9===null&&_0x13a7e8===_0x8f554d(0x197))throw invalidFieldType(_0x8f554d(0x160),'a\x20JSON\x20object');if(_0x5d27d9!==null&&!isJsonObject(_0x5d27d9))throw invalidFieldType('channelConfig',_0x13a7e8===_0x8f554d(0x1b5)?'a\x20JSON\x20object\x20or\x20null':_0x8f554d(0x18f));_0x5d27d9!==null&&validateChannelConfigFields(_0x4a888d[_0x8f554d(0x1ac)],_0x5d27d9),_0x4a888d['channelConfig']=_0x5d27d9;}for(const _0x3948d2 of['connectTimeout','readTimeout']){if(!hasOwn(_0x5bbd30,_0x3948d2))continue;const _0x17898a=_0x5bbd30[_0x3948d2];if(_0x17898a!==null&&(!Number[_0x8f554d(0x1af)](_0x17898a)||_0x17898a<0x0))throw notificationError(_0x8f554d(0x17f),_0x8f554d(0x1a8)+_0x3948d2+_0x8f554d(0x1cc));_0x4a888d[_0x3948d2]=_0x17898a;}return _0x4a888d;}function validateRequiredString(_0x4bf4fd,_0x54401a,_0x34299c){const _0x24fa61=a197_0x1e9c36;if(typeof _0x4bf4fd!==_0x24fa61(0x191))throw invalidFieldType(_0x54401a,_0x24fa61(0x1ad));const _0x308b04=_0x4bf4fd[_0x24fa61(0x1a9)]();if(!_0x308b04)throw notificationError(_0x24fa61(0x17f),'Notification\x20JSON\x20field\x20\x22'+_0x54401a+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x308b04['length']>_0x34299c)throw notificationError(_0x24fa61(0x17f),_0x24fa61(0x1a8)+_0x54401a+_0x24fa61(0x1ce)+_0x34299c+_0x24fa61(0x172));return _0x308b04;}function validateChannelConfigFields(_0x223b23,_0x1af9b5){const _0x482fe3=a197_0x1e9c36;if(hasOwn(_0x1af9b5,_0x482fe3(0x17c)))throw forbiddenChannelConfigField(_0x482fe3(0x17c));if(_0x223b23==='EMAIL')for(const _0x1195de of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x1af9b5,_0x1195de))throw forbiddenChannelConfigField(_0x1195de);}}function forbiddenChannelConfigField(_0x59cf85){const _0x55e0e3=a197_0x1e9c36;return notificationError(_0x55e0e3(0x16a),_0x55e0e3(0x17d)+_0x59cf85+_0x55e0e3(0x190));}function invalidFieldType(_0x4adeb0,_0x405c5b){const _0x395112=a197_0x1e9c36;return notificationError(_0x395112(0x17f),_0x395112(0x1a8)+_0x4adeb0+_0x395112(0x181)+_0x405c5b+'.');}function serializeChannelConfig(_0x2f11a5){const _0x78a205=a197_0x1e9c36;return _0x2f11a5===null||_0x2f11a5===undefined?null:JSON[_0x78a205(0x1a7)](_0x2f11a5);}function redactSensitive(_0x3033fd){const _0x1814f9=a197_0x1e9c36;return _0x3033fd===null||_0x3033fd===undefined||_0x3033fd===''?null:_0x1814f9(0x1da);}function requireResponseString(_0x269978,_0x2d13fc,_0x4fa68b){const _0x4044da=a197_0x1e9c36;if(typeof _0x269978!=='string'||_0x269978[_0x4044da(0x1a9)]()==='')throw CliErrors[_0x4044da(0x1cd)](_0x4044da(0x183),_0x4044da(0x1d2)+(_0x4fa68b+0x1)+_0x4044da(0x15d)+_0x2d13fc+'\x22.');return _0x269978[_0x4044da(0x1a9)]();}function requireExactString(_0x170fdc,_0x22efbe,_0x5eefdc){const _0x14f526=a197_0x1e9c36;if(typeof _0x170fdc!=='string'||_0x170fdc[_0x14f526(0x1a9)]()==='')throw notificationError(_0x14f526(0x196),_0x14f526(0x176)+_0x5eefdc+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x22efbe+'\x22.');return _0x170fdc[_0x14f526(0x1a9)]();}function responseNullableString(_0xff51d2,_0x2ea35,_0x1dc2d8){const _0x3a3c63=a197_0x1e9c36;if(_0xff51d2===undefined||_0xff51d2===null)return null;if(typeof _0xff51d2!==_0x3a3c63(0x191))throw notificationError(_0x3a3c63(0x196),_0x3a3c63(0x176)+_0x1dc2d8+_0x3a3c63(0x162)+_0x2ea35+'\x22.');return _0xff51d2;}function responseNullableTimeout(_0x210b03,_0x2a3ae9,_0x216c8e){const _0x552af7=a197_0x1e9c36;if(_0x210b03===undefined||_0x210b03===null)return null;if(!Number[_0x552af7(0x1af)](_0x210b03)||_0x210b03<0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x216c8e+_0x552af7(0x162)+_0x2a3ae9+'\x22.');return _0x210b03;}function normalizeNullableString(_0x35f11a){const _0x4e3100=a197_0x1e9c36;return typeof _0x35f11a===_0x4e3100(0x191)?_0x35f11a:null;}function isJsonObject(_0x5c98da){const _0x955b81=a197_0x1e9c36;return _0x5c98da!==null&&typeof _0x5c98da==='object'&&!Array[_0x955b81(0x1be)](_0x5c98da);}function hasOwn(_0x3dce21,_0x4bf735){const _0x4820a8=a197_0x1e9c36;return Object[_0x4820a8(0x1bc)]['hasOwnProperty'][_0x4820a8(0x1aa)](_0x3dce21,_0x4bf735);}async function readStdin(){const _0x59c1aa=a197_0x1e9c36;let _0x1f3f6f='';process['stdin'][_0x59c1aa(0x170)](_0x59c1aa(0x198));for await(const _0x3df6eb of process[_0x59c1aa(0x1b4)])_0x1f3f6f+=_0x3df6eb;return _0x1f3f6f;}
|
|
1
|
+
const a197_0x2dbda0=a197_0x3912;(function(_0x316b49,_0x59d4ea){const _0x31ca29=a197_0x3912,_0xaf00fa=_0x316b49();while(!![]){try{const _0x35604f=-parseInt(_0x31ca29(0x153))/0x1+-parseInt(_0x31ca29(0x15c))/0x2+parseInt(_0x31ca29(0x1b4))/0x3+parseInt(_0x31ca29(0x142))/0x4*(parseInt(_0x31ca29(0x141))/0x5)+parseInt(_0x31ca29(0x14e))/0x6+parseInt(_0x31ca29(0x18a))/0x7*(parseInt(_0x31ca29(0x13c))/0x8)+-parseInt(_0x31ca29(0x17a))/0x9*(parseInt(_0x31ca29(0x14c))/0xa);if(_0x35604f===_0x59d4ea)break;else _0xaf00fa['push'](_0xaf00fa['shift']());}catch(_0x88915){_0xaf00fa['push'](_0xaf00fa['shift']());}}}(a197_0x1c41,0xc7874));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_0x2dbda0(0x172),a197_0x2dbda0(0x17d),'DINGTALK',a197_0x2dbda0(0x167),a197_0x2dbda0(0x1ae)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x2dbda0(0x155),a197_0x2dbda0(0x1a2),'endpointUrl',a197_0x2dbda0(0x13a),a197_0x2dbda0(0x18b),'connectTimeout',a197_0x2dbda0(0x180)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x2dbda0(0x164),a197_0x2dbda0(0x185),a197_0x2dbda0(0x17e)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x2dbda0(0x186),a197_0x2dbda0(0x14d),'ccList',a197_0x2dbda0(0x154),a197_0x2dbda0(0x1a6),a197_0x2dbda0(0x1b6),a197_0x2dbda0(0x1a4),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x2dbda0(0x168),'type':a197_0x2dbda0(0x169),'required':![],'description':a197_0x2dbda0(0x16b)},{'name':a197_0x2dbda0(0x152),'type':a197_0x2dbda0(0x147),'required':![],'default':![],'description':a197_0x2dbda0(0x16e)},{'name':a197_0x2dbda0(0x16a),'type':a197_0x2dbda0(0x169),'required':![],'description':a197_0x2dbda0(0x18f)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x2dbda0(0x156),'required':!![],'description':a197_0x2dbda0(0x137)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0xdfed52,_0x33371b,_0x1b42bb){return new CliError(_0xdfed52,0x1,_0x33371b,_0x1b42bb);}export function readNotificationId(_0x565a76){const _0x405fb3=a197_0x2dbda0,_0x84affa=_0x565a76[_0x405fb3(0x17c)]('id');if(!Number[_0x405fb3(0x196)](_0x84affa)||_0x84affa<=0x0)throw notificationError('notification_config_id_invalid',_0x405fb3(0x1af));return _0x84affa;}export function requireNotificationExplicitYes(_0x34ad57){const _0x1ebd45=a197_0x2dbda0;if(_0x34ad57['bool']('dry-run')||_0x34ad57[_0x1ebd45(0x13d)](_0x1ebd45(0x170)))return;throw notificationError(_0x1ebd45(0x199),_0x1ebd45(0x192),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x49f00c,_0x19c9a7=a197_0x2dbda0(0x17b),_0x56de0d=a197_0x2dbda0(0x172)){const _0x28b6fa=a197_0x2dbda0,_0x5697c9=_0x49f00c['str'](_0x19c9a7)['trim']()||_0x56de0d;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x5697c9))throw CliErrors['validation'](_0x28b6fa(0x1b2)+_0x19c9a7+':\x20'+_0x5697c9,_0x28b6fa(0x15f)+NOTIFICATION_CHANNEL_TYPES[_0x28b6fa(0x15d)](',\x20')+'.');return _0x5697c9;}export function assertSingleNotificationSource(_0x1a5660){const _0x1dc5a7=a197_0x2dbda0,_0x3ad262=[],_0x5330ab=_0x1a5660[_0x1dc5a7(0x1b1)](_0x1dc5a7(0x168))[_0x1dc5a7(0x1a3)]();if(_0x5330ab)_0x3ad262['push']({'kind':_0x1dc5a7(0x168),'path':_0x5330ab});if(_0x1a5660['bool']('stdin'))_0x3ad262[_0x1dc5a7(0x19d)]({'kind':'stdin'});const _0x13248f=_0x1a5660[_0x1dc5a7(0x1b1)]('from-env')[_0x1dc5a7(0x1a3)]();if(_0x13248f)_0x3ad262[_0x1dc5a7(0x19d)]({'kind':_0x1dc5a7(0x177),'name':_0x13248f});if(_0x3ad262[_0x1dc5a7(0x171)]===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0x1dc5a7(0x146));if(_0x3ad262[_0x1dc5a7(0x171)]>0x1)throw CliErrors['validation'](_0x1dc5a7(0x14b),_0x1dc5a7(0x146));return _0x3ad262[0x0];}export async function readNotificationDocument(_0xa6c5cd,_0x4e7e35){const _0x497dde=a197_0x2dbda0,_0x37ae7e=assertSingleNotificationSource(_0xa6c5cd),_0x5f095e=_0x37ae7e['kind']===_0x497dde(0x168)?_0x497dde(0x19f)+_0x37ae7e[_0x497dde(0x1b5)]:_0x37ae7e[_0x497dde(0x178)]===_0x497dde(0x177)?_0x497dde(0x191)+_0x37ae7e[_0x497dde(0x144)]:'stdin';let _0x5106dc;try{if(_0x37ae7e[_0x497dde(0x178)]==='file')_0x5106dc=await readFile(_0x37ae7e[_0x497dde(0x1b5)],_0x497dde(0x182));else{if(_0x37ae7e[_0x497dde(0x178)]===_0x497dde(0x177)){if(!(_0x37ae7e['name']in process.env))throw notificationError(_0x497dde(0x18c),_0x497dde(0x1b7)+_0x37ae7e['name']);_0x5106dc=process.env[_0x37ae7e.name]??'';}else _0x5106dc=await readStdin();}}catch(_0x28a59f){if(_0x28a59f instanceof CliError)throw _0x28a59f;throw notificationError(_0x497dde(0x18c),_0x497dde(0x1a1)+_0x5f095e+'.');}let _0x274715;try{_0x274715=JSON[_0x497dde(0x161)](_0x5106dc);}catch{throw notificationError(_0x497dde(0x173),_0x497dde(0x1ac)+_0x5f095e+'\x20is\x20invalid.',_0x497dde(0x195));}if(!isJsonObject(_0x274715))throw notificationError('notification_config_json_invalid','Notification\x20JSON\x20from\x20'+_0x5f095e+_0x497dde(0x187));return validateNotificationDocument(_0x274715,_0x4e7e35);}export function projectNotificationListConfig(_0xcf98b7,_0x428ff0){const _0x3c0dab=a197_0x2dbda0;return{'id':typeof _0xcf98b7['id']==='number'?_0xcf98b7['id']:null,'configCode':requireResponseString(_0xcf98b7[_0x3c0dab(0x185)],_0x3c0dab(0x185),_0x428ff0),'configName':requireResponseString(_0xcf98b7[_0x3c0dab(0x155)],'configName',_0x428ff0),'channelType':requireResponseString(_0xcf98b7['channelType'],_0x3c0dab(0x1a2),_0x428ff0),'description':normalizeNullableString(_0xcf98b7[_0x3c0dab(0x18b)]),'createTime':normalizeNullableString(_0xcf98b7['createTime']),'updateTime':normalizeNullableString(_0xcf98b7[_0x3c0dab(0x190)])};}export function normalizeExactNotificationConfig(_0x454308,_0x2aaa52,_0x400b50){const _0x38bdd9=a197_0x2dbda0;if(!Number[_0x38bdd9(0x196)](_0x454308['id'])||_0x454308['id']!==_0x2aaa52)throw notificationError(_0x38bdd9(0x143),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x2aaa52+'.');if(_0x454308['appCode']!==_0x400b50)throw notificationError(_0x38bdd9(0x143),_0x38bdd9(0x176)+_0x2aaa52+_0x38bdd9(0x181));const _0x262a8f=requireExactString(_0x454308[_0x38bdd9(0x155)],_0x38bdd9(0x155),_0x2aaa52),_0xccac33=requireExactString(_0x454308[_0x38bdd9(0x185)],'configCode',_0x2aaa52),_0x2a62a1=requireExactString(_0x454308['channelType'],_0x38bdd9(0x1a2),_0x2aaa52);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x2a62a1))throw notificationError(_0x38bdd9(0x143),_0x38bdd9(0x176)+_0x2aaa52+'\x20has\x20an\x20unsupported\x20channelType.');const _0x5ba12f=responseNullableString(_0x454308[_0x38bdd9(0x1ab)],_0x38bdd9(0x1ab),_0x2aaa52),_0x43c280=responseNullableString(_0x454308[_0x38bdd9(0x13a)],_0x38bdd9(0x13a),_0x2aaa52),_0xf7456e=responseNullableString(_0x454308[_0x38bdd9(0x18b)],'description',_0x2aaa52),_0x44daa2=responseNullableTimeout(_0x454308['connectTimeout'],_0x38bdd9(0x194),_0x2aaa52),_0x385fa8=responseNullableTimeout(_0x454308[_0x38bdd9(0x180)],_0x38bdd9(0x180),_0x2aaa52);return{'id':_0x2aaa52,'appCode':_0x400b50,'configCode':_0xccac33,'configName':_0x262a8f,'channelType':_0x2a62a1,'endpointUrl':redactSensitive(_0x5ba12f),'channelConfig':redactSensitive(_0x43c280),'description':_0xf7456e,'connectTimeout':_0x44daa2,'readTimeout':_0x385fa8,'endpointUrlRaw':_0x5ba12f,'channelConfigRaw':_0x43c280};}export async function requireExactNotificationConfig(_0x446e43,_0x2ccd02,_0x49d478){const _0x28ab44=a197_0x2dbda0;let _0x420cf2;try{_0x420cf2=await getNotificationChannelConfig(_0x2ccd02,_0x446e43);}catch{throw safeApiFailure(_0x49d478,_0x28ab44(0x1a5),_0x28ab44(0x14f)+_0x446e43+_0x28ab44(0x18d));}return normalizeExactNotificationConfig(_0x420cf2,_0x2ccd02,_0x446e43);}export function projectNotificationConfig(_0x36e34d){const _0x2fb358=a197_0x2dbda0;return{'id':_0x36e34d['id']??null,'appCode':_0x36e34d[_0x2fb358(0x164)],'configCode':_0x36e34d[_0x2fb358(0x185)]??null,'configName':_0x36e34d[_0x2fb358(0x155)],'channelType':_0x36e34d[_0x2fb358(0x1a2)],'endpointUrl':redactSensitive(_0x36e34d['endpointUrl']),'channelConfig':redactSensitive(_0x36e34d[_0x2fb358(0x13a)]),'description':_0x36e34d['description']??null,'connectTimeout':_0x36e34d[_0x2fb358(0x194)]??null,'readTimeout':_0x36e34d['readTimeout']??null};}function a197_0x3912(_0x14aaeb,_0x151c11){_0x14aaeb=_0x14aaeb-0x136;const _0x1c41ee=a197_0x1c41();let _0x391221=_0x1c41ee[_0x14aaeb];return _0x391221;}export function notificationSelector(_0x48b4ac){const _0x14e018=a197_0x2dbda0;return{'appCode':_0x48b4ac[_0x14e018(0x164)],'id':_0x48b4ac['id'],'configCode':_0x48b4ac['configCode'],'configName':_0x48b4ac['configName'],'channelType':_0x48b4ac['channelType']};}export function createMutationInput(_0x1d2397,_0x3152c5){const _0x505a47=a197_0x2dbda0;return{'appCode':_0x1d2397,'configName':_0x3152c5['configName'],'channelType':_0x3152c5[_0x505a47(0x1a2)],...hasOwn(_0x3152c5,_0x505a47(0x1ab))?{'endpointUrl':_0x3152c5[_0x505a47(0x1ab)]}:{},...hasOwn(_0x3152c5,_0x505a47(0x13a))?{'channelConfig':serializeChannelConfig(_0x3152c5[_0x505a47(0x13a)])}:{},...hasOwn(_0x3152c5,_0x505a47(0x18b))?{'description':_0x3152c5[_0x505a47(0x18b)]}:{},...hasOwn(_0x3152c5,'connectTimeout')?{'connectTimeout':_0x3152c5[_0x505a47(0x194)]}:{},...hasOwn(_0x3152c5,_0x505a47(0x180))?{'readTimeout':_0x3152c5[_0x505a47(0x180)]}:{}};}export function mergeUpdateInput(_0x423cc7,_0x200094){const _0xe5b08a=a197_0x2dbda0;return{'id':_0x423cc7['id'],'appCode':_0x423cc7['appCode'],'configName':_0x200094['configName']??_0x423cc7[_0xe5b08a(0x155)],'channelType':_0x200094[_0xe5b08a(0x1a2)]??_0x423cc7[_0xe5b08a(0x1a2)],'endpointUrl':hasOwn(_0x200094,_0xe5b08a(0x1ab))?_0x200094['endpointUrl']:_0x423cc7['endpointUrlRaw'],'channelConfig':hasOwn(_0x200094,_0xe5b08a(0x13a))?serializeChannelConfig(_0x200094[_0xe5b08a(0x13a)]):_0x423cc7[_0xe5b08a(0x16c)],'description':hasOwn(_0x200094,_0xe5b08a(0x18b))?_0x200094[_0xe5b08a(0x18b)]:_0x423cc7['description'],'connectTimeout':hasOwn(_0x200094,'connectTimeout')?_0x200094['connectTimeout']:_0x423cc7[_0xe5b08a(0x194)],'readTimeout':hasOwn(_0x200094,_0xe5b08a(0x180))?_0x200094[_0xe5b08a(0x180)]:_0x423cc7[_0xe5b08a(0x180)]};}export function plannedUpdateProjection(_0x3b3822,_0x53331a){const _0x585411=a197_0x2dbda0;return projectNotificationConfig({'id':_0x3b3822['id'],'appCode':_0x3b3822[_0x585411(0x164)],'configCode':_0x3b3822[_0x585411(0x185)],'configName':_0x53331a[_0x585411(0x155)]??_0x3b3822[_0x585411(0x155)],'channelType':_0x53331a[_0x585411(0x1a2)]??_0x3b3822['channelType'],'endpointUrl':hasOwn(_0x53331a,_0x585411(0x1ab))?_0x53331a[_0x585411(0x1ab)]:_0x3b3822['endpointUrlRaw'],'channelConfig':hasOwn(_0x53331a,_0x585411(0x13a))?_0x53331a['channelConfig']:_0x3b3822[_0x585411(0x16c)],'description':hasOwn(_0x53331a,'description')?_0x53331a[_0x585411(0x18b)]:_0x3b3822[_0x585411(0x18b)],'connectTimeout':hasOwn(_0x53331a,_0x585411(0x194))?_0x53331a[_0x585411(0x194)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x3b3822['connectTimeout'],'readTimeout':hasOwn(_0x53331a,'readTimeout')?_0x53331a[_0x585411(0x180)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x3b3822[_0x585411(0x180)]});}export function requestedSafeFieldsMatch(_0x4bafc5,_0x1e14d5,_0x15587f){const _0x129932=a197_0x2dbda0,_0x429128=[],_0x2cac1a=[],_0x2faaaf=[];for(const _0x135294 of[_0x129932(0x155),_0x129932(0x1a2),_0x129932(0x18b)]){if(!hasOwn(_0x15587f,_0x135294))continue;_0x2faaaf[_0x129932(0x19d)](_0x135294),_0x429128[_0x129932(0x19d)](_0x1e14d5[_0x135294]===_0x15587f[_0x135294]),_0x2cac1a['push'](_0x4bafc5[_0x135294]!==_0x15587f[_0x135294]&&_0x1e14d5[_0x135294]===_0x15587f[_0x135294]);}for(const _0x557e4e of[_0x129932(0x194),_0x129932(0x180)]){if(!hasOwn(_0x15587f,_0x557e4e))continue;const _0x208c76=_0x15587f[_0x557e4e]??(_0x557e4e===_0x129932(0x194)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x2faaaf['push'](_0x557e4e),_0x429128[_0x129932(0x19d)](_0x1e14d5[_0x557e4e]===_0x208c76),_0x2cac1a[_0x129932(0x19d)](_0x4bafc5[_0x557e4e]!==_0x208c76&&_0x1e14d5[_0x557e4e]===_0x208c76);}return hasOwn(_0x15587f,_0x129932(0x1ab))&&_0x15587f[_0x129932(0x1ab)]===null&&(_0x2faaaf['push'](_0x129932(0x184)),_0x429128['push'](_0x1e14d5['endpointUrlRaw']===null||_0x1e14d5[_0x129932(0x19e)]===''),_0x2cac1a[_0x129932(0x19d)](_0x4bafc5[_0x129932(0x19e)]!==null&&_0x4bafc5[_0x129932(0x19e)]!==''&&(_0x1e14d5[_0x129932(0x19e)]===null||_0x1e14d5[_0x129932(0x19e)]===''))),{'allMatch':_0x429128['every'](Boolean),'provesChange':_0x2cac1a[_0x129932(0x13e)](Boolean),'verifiedFields':_0x2faaaf};}export function validateNotificationDeleteReadback(_0x20a187,_0x20abaf,_0xe0042a){const _0x475461=a197_0x2dbda0;for(const [_0x1de155,_0x387062]of _0x20a187[_0x475461(0x174)]()){if(!Number[_0x475461(0x196)](_0x387062['id'])||_0x387062['id']<=0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x1de155+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x387062[_0x475461(0x164)]!==_0x20abaf)throw notificationError(_0x475461(0x143),_0x475461(0x16f)+(_0x1de155+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x387062[_0x475461(0x1a2)]!==_0xe0042a)throw notificationError(_0x475461(0x143),_0x475461(0x16f)+(_0x1de155+0x1)+_0x475461(0x158));}}export function safeApiFailure(_0xfaef3e,_0x5eb1be,_0xcd20aa){const _0x681ec4=a197_0x2dbda0;return notificationError(_0x681ec4(0x15e)+_0xfaef3e+'_'+(_0x5eb1be===_0x681ec4(0x159)?_0x681ec4(0x1a7):_0x5eb1be+_0x681ec4(0x198)),'Notification\x20config\x20'+_0xfaef3e+'\x20'+_0x5eb1be+'\x20failed.',_0xcd20aa);}export function notificationLookupCommand(_0x36dcf5,_0x4a1421){const _0x2b2eed=a197_0x2dbda0;return _0x2b2eed(0x19c)+_0x36dcf5+_0x2b2eed(0x139)+_0x4a1421+_0x2b2eed(0x149);}function validateNotificationDocument(_0x53d031,_0x261880){const _0x58d214=a197_0x2dbda0;for(const _0x3b7332 of Object['keys'](_0x53d031)){if(FORBIDDEN_IDENTITY_FIELDS[_0x58d214(0x140)](_0x3b7332))throw notificationError(_0x58d214(0x1a8),'Notification\x20JSON\x20field\x20\x22'+_0x3b7332+_0x58d214(0x157));if(!ALLOWED_INPUT_FIELDS['has'](_0x3b7332))throw notificationError(_0x58d214(0x145),_0x58d214(0x136)+_0x3b7332+'\x22.');}if(_0x261880===_0x58d214(0x1a9)&&Object[_0x58d214(0x166)](_0x53d031)[_0x58d214(0x171)]===0x0)throw notificationError('notification_config_update_empty','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x12f17b={};if(hasOwn(_0x53d031,_0x58d214(0x155)))_0x12f17b['configName']=validateRequiredString(_0x53d031['configName'],'configName',0x80);else{if(_0x261880===_0x58d214(0x175))throw notificationError(_0x58d214(0x18e),_0x58d214(0x1ad)+_0x58d214(0x17f));}if(hasOwn(_0x53d031,'channelType')){if(typeof _0x53d031['channelType']!=='string')throw invalidFieldType(_0x58d214(0x1a2),_0x58d214(0x15a));const _0x52ad94=_0x53d031[_0x58d214(0x1a2)][_0x58d214(0x1a3)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x58d214(0x193)](_0x52ad94))throw notificationError(_0x58d214(0x1b0),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x58d214(0x15f)+NOTIFICATION_CHANNEL_TYPES[_0x58d214(0x15d)](',\x20')+'.');_0x12f17b[_0x58d214(0x1a2)]=_0x52ad94;}else{if(_0x261880==='create')throw notificationError(_0x58d214(0x18e),'Create\x20JSON\x20requires\x20field\x20'+_0x58d214(0x163));}for(const [_0x519829,_0x1d88f1]of[['endpointUrl',0x200],['description',0x100]]){if(!hasOwn(_0x53d031,_0x519829))continue;const _0x3a6fc5=_0x53d031[_0x519829];if(_0x3a6fc5!==null&&typeof _0x3a6fc5!==_0x58d214(0x169))throw invalidFieldType(_0x519829,_0x58d214(0x14a));if(typeof _0x3a6fc5===_0x58d214(0x169)&&_0x3a6fc5[_0x58d214(0x171)]>_0x1d88f1)throw notificationError(_0x58d214(0x1b0),'Notification\x20JSON\x20field\x20\x22'+_0x519829+'\x22\x20cannot\x20exceed\x20'+_0x1d88f1+_0x58d214(0x189));_0x12f17b[_0x519829]=_0x3a6fc5;}if(hasOwn(_0x53d031,_0x58d214(0x13a))){const _0x201722=_0x53d031[_0x58d214(0x13a)];if(_0x201722===null&&_0x261880===_0x58d214(0x175))throw invalidFieldType(_0x58d214(0x13a),_0x58d214(0x15b));if(_0x201722!==null&&!isJsonObject(_0x201722))throw invalidFieldType(_0x58d214(0x13a),_0x261880===_0x58d214(0x1a9)?_0x58d214(0x1b3):_0x58d214(0x15b));_0x201722!==null&&validateChannelConfigFields(_0x12f17b['channelType'],_0x201722),_0x12f17b['channelConfig']=_0x201722;}for(const _0x1d324c of[_0x58d214(0x194),_0x58d214(0x180)]){if(!hasOwn(_0x53d031,_0x1d324c))continue;const _0x374937=_0x53d031[_0x1d324c];if(_0x374937!==null&&(!Number[_0x58d214(0x196)](_0x374937)||_0x374937<0x0))throw notificationError(_0x58d214(0x1b0),'Notification\x20JSON\x20field\x20\x22'+_0x1d324c+_0x58d214(0x19b));_0x12f17b[_0x1d324c]=_0x374937;}return _0x12f17b;}function validateRequiredString(_0x2ba5c0,_0x1d78d0,_0x564c0b){const _0x131e4d=a197_0x2dbda0;if(typeof _0x2ba5c0!==_0x131e4d(0x169))throw invalidFieldType(_0x1d78d0,'a\x20non-empty\x20string');const _0x55dbd3=_0x2ba5c0[_0x131e4d(0x1a3)]();if(!_0x55dbd3)throw notificationError(_0x131e4d(0x1b0),'Notification\x20JSON\x20field\x20\x22'+_0x1d78d0+_0x131e4d(0x160));if(_0x55dbd3[_0x131e4d(0x171)]>_0x564c0b)throw notificationError('notification_config_field_invalid',_0x131e4d(0x151)+_0x1d78d0+'\x22\x20cannot\x20exceed\x20'+_0x564c0b+'\x20characters.');return _0x55dbd3;}function validateChannelConfigFields(_0x4b486d,_0x262812){const _0x1d68f6=a197_0x2dbda0;if(hasOwn(_0x262812,_0x1d68f6(0x138)))throw forbiddenChannelConfigField('messageTemplate');if(_0x4b486d==='EMAIL')for(const _0x1d51f1 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x262812,_0x1d51f1))throw forbiddenChannelConfigField(_0x1d51f1);}}function a197_0x1c41(){const _0x1b8ec8=['\x22\x20must\x20be\x20a\x20non-empty\x20string.','parse','<redacted>','\x22channelType\x22.','appCode','\x22\x20must\x20be\x20','keys','WECOM','file','string','from-env','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','channelConfigRaw','Notification\x20JSON\x20channelConfig\x20field\x20\x22','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Notification\x20config\x20list\x20item\x20','yes','length','EMAIL','notification_config_json_invalid','entries','create','Notification\x20config\x20','env','kind','call','9aHqtFK','type','num','FEISHU','channelCode','\x22configName\x22.','readTimeout','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','utf8','\x22\x20is\x20forbidden.','endpointUrl:null','configCode','emailTargets','\x20must\x20be\x20an\x20object.','stringify','\x20characters.','1134jNqPBq','description','notification_config_source_unavailable','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','notification_config_field_required','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','updateTime','environment\x20variable\x20','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','includes','connectTimeout','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','isSafeInteger','object','_unavailable','notification_config_confirmation_required','isArray','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','rabetbase\x20notification\x20config-list\x20--appcode\x20','push','endpointUrlRaw','file\x20','prototype','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','channelType','trim','fromName','preflight','replyTo','failed','notification_config_field_forbidden','update','\x20has\x20invalid\x20field\x20\x22','endpointUrl','Notification\x20JSON\x20from\x20','Create\x20JSON\x20requires\x20field\x20','WEBHOOK','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','notification_config_field_invalid','str','Invalid\x20--','a\x20JSON\x20object\x20or\x20null','3384966BjtFHo','path','subjectPrefix','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Unknown\x20notification\x20JSON\x20field\x20\x22','Application-level\x20notification\x20config\x20ID','messageTemplate','\x20--type\x20','channelConfig','setEncoding','73240TnsnXf','bool','some','hasOwnProperty','has','1130WEvKDg','13868dnzPfV','notification_config_response_invalid','name','notification_config_field_unknown','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','boolean','\x20is\x20missing\x20required\x20field\x20\x22','\x20--format\x20compress','a\x20string\x20or\x20null','Notification\x20JSON\x20source\x20is\x20ambiguous.','5352610ktdemL','recipients','674436Ntijfd','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','Item\x20','Notification\x20JSON\x20field\x20\x22','stdin','677348ZmjmGL','bccList','configName','number','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','\x20has\x20an\x20invalid\x20channelType.','mutation','a\x20supported\x20string','a\x20JSON\x20object','2955006rvEtxK','join','notification_config_','Allowed\x20values:\x20'];a197_0x1c41=function(){return _0x1b8ec8;};return a197_0x1c41();}function forbiddenChannelConfigField(_0x52380e){const _0x23f64d=a197_0x2dbda0;return notificationError('notification_config_channel_field_forbidden',_0x23f64d(0x16d)+_0x52380e+_0x23f64d(0x183));}function invalidFieldType(_0x2197bd,_0x420851){const _0x41a078=a197_0x2dbda0;return notificationError('notification_config_field_invalid',_0x41a078(0x151)+_0x2197bd+_0x41a078(0x165)+_0x420851+'.');}function serializeChannelConfig(_0x17650b){const _0x8b2f7b=a197_0x2dbda0;return _0x17650b===null||_0x17650b===undefined?null:JSON[_0x8b2f7b(0x188)](_0x17650b);}function redactSensitive(_0x355649){const _0x222615=a197_0x2dbda0;return _0x355649===null||_0x355649===undefined||_0x355649===''?null:_0x222615(0x162);}function requireResponseString(_0x508b67,_0x4be3f7,_0x1b06c2){const _0x5845ba=a197_0x2dbda0;if(typeof _0x508b67!=='string'||_0x508b67['trim']()==='')throw CliErrors['apiError']('Invalid\x20notification\x20config\x20response.',_0x5845ba(0x150)+(_0x1b06c2+0x1)+_0x5845ba(0x148)+_0x4be3f7+'\x22.');return _0x508b67['trim']();}function requireExactString(_0x544061,_0x4665cc,_0x16fc61){const _0x560585=a197_0x2dbda0;if(typeof _0x544061!==_0x560585(0x169)||_0x544061['trim']()==='')throw notificationError(_0x560585(0x143),'Notification\x20config\x20'+_0x16fc61+_0x560585(0x148)+_0x4665cc+'\x22.');return _0x544061[_0x560585(0x1a3)]();}function responseNullableString(_0x47797a,_0x9fc50e,_0x181df1){const _0x1d95e5=a197_0x2dbda0;if(_0x47797a===undefined||_0x47797a===null)return null;if(typeof _0x47797a!==_0x1d95e5(0x169))throw notificationError(_0x1d95e5(0x143),_0x1d95e5(0x176)+_0x181df1+_0x1d95e5(0x1aa)+_0x9fc50e+'\x22.');return _0x47797a;}function responseNullableTimeout(_0x3f2735,_0x147877,_0x1e389b){const _0x3b2ab4=a197_0x2dbda0;if(_0x3f2735===undefined||_0x3f2735===null)return null;if(!Number[_0x3b2ab4(0x196)](_0x3f2735)||_0x3f2735<0x0)throw notificationError(_0x3b2ab4(0x143),'Notification\x20config\x20'+_0x1e389b+_0x3b2ab4(0x1aa)+_0x147877+'\x22.');return _0x3f2735;}function normalizeNullableString(_0x29fbe1){const _0x18e687=a197_0x2dbda0;return typeof _0x29fbe1===_0x18e687(0x169)?_0x29fbe1:null;}function isJsonObject(_0x16bf1d){const _0x42798c=a197_0x2dbda0;return _0x16bf1d!==null&&typeof _0x16bf1d===_0x42798c(0x197)&&!Array[_0x42798c(0x19a)](_0x16bf1d);}function hasOwn(_0x3f4308,_0x1943b8){const _0x4a005d=a197_0x2dbda0;return Object[_0x4a005d(0x1a0)][_0x4a005d(0x13f)][_0x4a005d(0x179)](_0x3f4308,_0x1943b8);}async function readStdin(){const _0x10dd63=a197_0x2dbda0;let _0x461995='';process['stdin'][_0x10dd63(0x13b)](_0x10dd63(0x182));for await(const _0x59a155 of process[_0x10dd63(0x152)])_0x461995+=_0x59a155;return _0x461995;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a198_0x19e7b1=a198_0x5c92;(function(_0x4356f3,_0x2f21cd){const _0x1ee404=a198_0x5c92,_0x2d2469=_0x4356f3();while(!![]){try{const _0x48723b=parseInt(_0x1ee404(0x1be))/0x1*(-parseInt(_0x1ee404(0x1bd))/0x2)+parseInt(_0x1ee404(0x1c6))/0x3+parseInt(_0x1ee404(0x1c5))/0x4*(-parseInt(_0x1ee404(0x1cc))/0x5)+-parseInt(_0x1ee404(0x1e8))/0x6+parseInt(_0x1ee404(0x1da))/0x7+-parseInt(_0x1ee404(0x1d6))/0x8*(parseInt(_0x1ee404(0x1bc))/0x9)+parseInt(_0x1ee404(0x1e5))/0xa*(parseInt(_0x1ee404(0x1b8))/0xb);if(_0x48723b===_0x2f21cd)break;else _0x2d2469['push'](_0x2d2469['shift']());}catch(_0x128d09){_0x2d2469['push'](_0x2d2469['shift']());}}}(a198_0x40cc,0xb0c7f));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_0x19e7b1(0x1dd),a198_0x19e7b1(0x1d4),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x19e7b1(0x1e3),'general':a198_0x19e7b1(0x1db),'form':a198_0x19e7b1(0x1b5),'idCard':a198_0x19e7b1(0x1d5)},SCENE_FLAG={'name':'scene','type':a198_0x19e7b1(0x1dc),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x19e7b1(0x1cb)},IMAGE_FILE_FLAG={'name':a198_0x19e7b1(0x1cf),'type':a198_0x19e7b1(0x1dc),'description':a198_0x19e7b1(0x1e7)},IMAGE_URL_FLAG={'name':a198_0x19e7b1(0x1c3),'type':'string','description':a198_0x19e7b1(0x1d1)};function normalizeScene(_0x10776f){const _0x4cbfe5=a198_0x19e7b1,_0x40c63c=_0x10776f['trim']()[_0x4cbfe5(0x1c4)]();if(_0x40c63c==='idcard')return _0x4cbfe5(0x1ed);if(_0x40c63c===_0x4cbfe5(0x1c8)||_0x40c63c===_0x4cbfe5(0x1dd)||_0x40c63c===_0x4cbfe5(0x1d4))return _0x40c63c;throw CliErrors[_0x4cbfe5(0x1e4)](_0x4cbfe5(0x1c2)+_0x10776f+_0x4cbfe5(0x1c7)+SUPPORTED_SCENES[_0x4cbfe5(0x1ec)](',\x20'));}function a198_0x5c92(_0x6838dc,_0x2756d1){_0x6838dc=_0x6838dc-0x1b4;const _0x40cc7d=a198_0x40cc();let _0x5c92a5=_0x40cc7d[_0x6838dc];return _0x5c92a5;}function selectedInputs(_0x48d76e){const _0x5cca4a=a198_0x19e7b1,_0x548cb9=_0x48d76e[_0x5cca4a(0x1c9)](_0x5cca4a(0x1cf))[_0x5cca4a(0x1eb)](),_0x14ea67=_0x48d76e[_0x5cca4a(0x1c9)](_0x5cca4a(0x1c3))[_0x5cca4a(0x1eb)]();return{'imageFile':_0x548cb9,'imageUrl':_0x14ea67,'count':[_0x548cb9,_0x14ea67][_0x5cca4a(0x1b4)](Boolean)['length']};}function validateInputSelection(_0x483855){const _0x414d31=a198_0x19e7b1,_0x5758f0=selectedInputs(_0x483855);if(_0x5758f0['count']!==0x1)throw CliErrors[_0x414d31(0x1e4)](_0x414d31(0x1d9));return _0x5758f0;}function withScene(_0x288675,_0x1af3b2,_0x19dfa0){const _0x4abd62=a198_0x19e7b1;return{..._0x288675,'scene':_0x1af3b2,..._0x19dfa0?{'sourceFile':{'fileName':_0x19dfa0[_0x4abd62(0x1ca)],'filePath':_0x19dfa0[_0x4abd62(0x1e0)]}}:{}};}function a198_0x40cc(){const _0x1c24eb=['4rgHxxv','965124JJBmFb','.\x20Supported\x20scenes:\x20','invoice','str','fileName','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','4466940HFnlOp','appCode','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','image-file','imageFile','Publicly\x20accessible\x20image\x20or\x20file\x20URL','fileUrl','toString','form','IdCard','1014344TlMkZi','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','ocr','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','3135342hXTgma','General','string','general','imageUrl','apiError','filePath','/smartapi/ocr/recognize-text?','path','Invoice','validation','10WPkEvx','\x20OCR','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','3760548gOZJDv','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','read','trim','join','idCard','filter','Table','POST','recognize','28352951akebuj','GET','Preview:\x20recognize\x20','/smartapi/common/queryFileUrl','63FLpkRO','430726TgUjUF','1pMKkpX','/smartapi/common/uploadFile','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','File\x20URL\x20response\x20missing\x20fileUrl.','Unsupported\x20OCR\x20scene:\x20','image-url','toLowerCase'];a198_0x40cc=function(){return _0x1c24eb;};return a198_0x40cc();}const ocrRecognize={'service':a198_0x19e7b1(0x1d8),'command':a198_0x19e7b1(0x1b7),'description':a198_0x19e7b1(0x1e9),'risk':a198_0x19e7b1(0x1ea),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3a9c4a){const _0x18a127=a198_0x19e7b1,_0x1f0b8f=normalizeScene(_0x3a9c4a['str']('scene')),_0x28d483=SCENE_TO_LEGACY_TYPE[_0x1f0b8f],_0x2919a1=validateInputSelection(_0x3a9c4a);if(_0x2919a1['imageUrl']){const _0xb89477=new URLSearchParams({'url':_0x2919a1[_0x18a127(0x1de)],'type':_0x28d483,'appCode':_0x3a9c4a[_0x18a127(0x1cd)]});return{'method':_0x18a127(0x1b9),'url':_0x18a127(0x1e1)+_0xb89477[_0x18a127(0x1d3)](),'description':_0x18a127(0x1ba)+_0x1f0b8f+'\x20OCR\x20from\x20URL'};}const _0xe8eef0=requireDevelopmentUploadFile(_0x2919a1[_0x18a127(0x1d0)],'image-file');return{'method':_0x18a127(0x1b6),'url':_0x18a127(0x1bf),'body':{'steps':[{'method':'POST','url':_0x18a127(0x1bf),'body':{'appCode':_0x3a9c4a['appCode'],'multipart':{'file':_0xe8eef0}}},{'method':'POST','url':_0x18a127(0x1bb),'body':{'filePath':_0x18a127(0x1ce),'downloadFlag':![]}},{'method':_0x18a127(0x1b9),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x3a9c4a['appCode'],'url':_0x18a127(0x1d7),'type':_0x28d483}}]},'description':_0x18a127(0x1c0)+_0x1f0b8f+_0x18a127(0x1e6)};},async 'execute'(_0x1b6d65){const _0xe70723=a198_0x19e7b1,_0x22946=normalizeScene(_0x1b6d65['str']('scene')),_0x13caad=SCENE_TO_LEGACY_TYPE[_0x22946],_0x21a383=validateInputSelection(_0x1b6d65);if(_0x21a383[_0xe70723(0x1de)]){const _0xa2320a=await recognizeDevelopmentOcr(_0x1b6d65[_0xe70723(0x1cd)],{'url':_0x21a383[_0xe70723(0x1de)],'type':_0x13caad});return{'ok':!![],'data':withScene(_0xa2320a,_0x22946)};}const _0x18be78=requireDevelopmentUploadFile(_0x21a383[_0xe70723(0x1d0)],_0xe70723(0x1cf)),_0x416483=await uploadDevelopmentFile(_0x1b6d65[_0xe70723(0x1cd)],_0x18be78[_0xe70723(0x1e2)]);if(!_0x416483[_0xe70723(0x1e0)])throw CliErrors[_0xe70723(0x1df)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x377c0e=await queryDevelopmentFileUrl(_0x416483[_0xe70723(0x1e0)],{'download':![]});if(!_0x377c0e[_0xe70723(0x1d2)])throw CliErrors[_0xe70723(0x1df)](_0xe70723(0x1c1));const _0x29478f=await recognizeDevelopmentOcr(_0x1b6d65['appCode'],{'url':_0x377c0e[_0xe70723(0x1d2)],'type':_0x13caad});return{'ok':!![],'data':withScene(_0x29478f,_0x22946,_0x416483)};}};export const ocrDefinitions=[ocrRecognize];
|