@lovrabet/rabetbase-cli 2.5.10 → 2.5.11-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
function a191_0x501b(_0x29b1d2,_0x269f5f){_0x29b1d2=_0x29b1d2-0x6f;const _0x5c2925=a191_0x5c29();let _0x501b11=_0x5c2925[_0x29b1d2];return _0x501b11;}const a191_0x17c4b5=a191_0x501b;(function(_0x58da2d,_0x3dc40e){const _0x143b47=a191_0x501b,_0x2f5da3=_0x58da2d();while(!![]){try{const _0x2a2bac=parseInt(_0x143b47(0xa2))/0x1*(-parseInt(_0x143b47(0xe0))/0x2)+parseInt(_0x143b47(0x99))/0x3*(parseInt(_0x143b47(0x8d))/0x4)+parseInt(_0x143b47(0x6f))/0x5*(-parseInt(_0x143b47(0x83))/0x6)+parseInt(_0x143b47(0xc4))/0x7+parseInt(_0x143b47(0xee))/0x8*(parseInt(_0x143b47(0xd7))/0x9)+parseInt(_0x143b47(0xbf))/0xa+-parseInt(_0x143b47(0xc8))/0xb;if(_0x2a2bac===_0x3dc40e)break;else _0x2f5da3['push'](_0x2f5da3['shift']());}catch(_0x26f36f){_0x2f5da3['push'](_0x2f5da3['shift']());}}}(a191_0x5c29,0xcd493));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a191_0x17c4b5(0xdd)}];export const menuVisibilityUpdate={'service':a191_0x17c4b5(0xdc),'command':a191_0x17c4b5(0xaf),'description':a191_0x17c4b5(0xc2),'risk':a191_0x17c4b5(0xd2),'structuredErrors':!![],'flags':[{'name':a191_0x17c4b5(0x70),'type':'string','description':a191_0x17c4b5(0x81)},{'name':a191_0x17c4b5(0xb1),'type':a191_0x17c4b5(0xdb),'description':a191_0x17c4b5(0xb9)},{'name':a191_0x17c4b5(0xce),'type':a191_0x17c4b5(0xb3),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':'expect-visible','type':a191_0x17c4b5(0xb3),'description':a191_0x17c4b5(0x94)},{'name':a191_0x17c4b5(0xae),'type':a191_0x17c4b5(0x84),'description':a191_0x17c4b5(0x93)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x205cc8){parseInput(_0x205cc8);},async 'dryRun'(_0x5d4eed){const _0x994420=a191_0x17c4b5,_0x44fd2a=await buildPlan(_0x5d4eed,!![]),_0x51298d=_0x44fd2a[_0x994420(0xcd)]['plannedActions']?.['length']??0x0,_0x3057f4=_0x44fd2a['plan'][_0x994420(0xc0)]['length']-_0x51298d;return menuDryRunResult(_0x44fd2a[_0x994420(0xcd)],{'method':'POST','url':'/smartapi/menu/update','body':{'updates':_0x44fd2a['plan'][_0x994420(0xbc)]?.[_0x994420(0x75)](_0x47fd64=>_0x47fd64[_0x994420(0xcb)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x51298d+_0x994420(0x7b)+_0x3057f4+_0x994420(0xa5)});},async 'execute'(_0x112964){const _0x3e8ab7=a191_0x17c4b5,_0x5a3d2b=await buildPlan(_0x112964,![]);await recheckMutationSnapshot(_0x112964,_0x5a3d2b[_0x3e8ab7(0xcd)],_0x3e8ab7(0xc3));const _0x395a55=[],_0x317bd7=[],_0x3c9b04=[];for(const _0x547967 of _0x5a3d2b[_0x3e8ab7(0xcd)]['targets']){if(_0x547967[_0x3e8ab7(0x98)]['visible']===_0x5a3d2b[_0x3e8ab7(0xcd)]['requestedVisible']){_0x395a55[_0x3e8ab7(0xb4)]({'id':_0x547967['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x112964['appCode'],_0x112964[_0x3e8ab7(0x90)],{'id':_0x547967['id'],'visible':_0x5a3d2b[_0x3e8ab7(0xcd)][_0x3e8ab7(0xd5)]}),_0x395a55[_0x3e8ab7(0xb4)]({'id':_0x547967['id'],'updated':!![],'skipped':![]});}catch(_0x149baf){const _0x4e5cde=mapMenuApiError(_0x149baf,_0x3e8ab7(0x79),_0x547967['id']);if(isMenuResponseLoss(_0x149baf)&&_0x4e5cde[_0x3e8ab7(0xd3)]!=='menu_permission_denied'){_0x3c9b04[_0x3e8ab7(0xb4)](_0x547967['id']);continue;}_0x317bd7[_0x3e8ab7(0xb4)]({'id':_0x547967['id'],'stage':_0x3e8ab7(0x7f),'code':_0x4e5cde['code'],'message':_0x4e5cde['message']});}}let _0x1fd726;try{_0x1fd726=await fetchMenuSnapshot(_0x112964[_0x3e8ab7(0x77)],_0x112964[_0x3e8ab7(0x90)]);}catch(_0x1ab74b){const _0x5d6ed1=describeMenuErrorCause(_0x1ab74b,_0x3e8ab7(0xcc)),_0x57be5d=_0x3c9b04[_0x3e8ab7(0x75)](_0x7c4b9d=>({'id':_0x7c4b9d,'stage':_0x3e8ab7(0x8e),'code':_0x3e8ab7(0x9c),'message':_0x3e8ab7(0x87)+_0x7c4b9d+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x5a095a={'stage':'verification','code':_0x3e8ab7(0x9c),'message':_0x3e8ab7(0x86),'targetIds':_0x5a3d2b[_0x3e8ab7(0xcd)]['targets'][_0x3e8ab7(0x75)](_0x2fb4a3=>_0x2fb4a3['id']),'requestedStateConfirmed':![],..._0x5d6ed1};throw menuFailure(asVerificationError(_0x1ab74b,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x5a3d2b['plan'],{'stage':'verification','succeeded':_0x395a55,'failedRecords':[..._0x317bd7,..._0x57be5d,_0x5a095a],'warnings':[_0x3e8ab7(0xba)],'verification':{'status':_0x3e8ab7(0xb2),'recoveredCount':0x0,'lookupCommand':_0x3e8ab7(0xa8)}});}const _0x58d664=[];for(const _0x2a86f6 of _0x395a55){const _0x5be086=Number(_0x2a86f6['id']),_0x42aaad=_0x5a3d2b[_0x3e8ab7(0xca)]['get'](_0x5be086),_0x520fbf=_0x1fd726['byId']['get'](_0x5be086);try{verifyVisibilityUpdate(_0x42aaad,_0x520fbf,_0x5a3d2b[_0x3e8ab7(0xcd)]['requestedVisible']);}catch(_0x4c355e){const _0x2f5194=asVerificationError(_0x4c355e,'Menu\x20'+_0x5be086+_0x3e8ab7(0xde));_0x58d664[_0x3e8ab7(0xb4)]({'id':_0x5be086,'stage':_0x3e8ab7(0x9d),'code':_0x2f5194[_0x3e8ab7(0xd3)],'message':_0x2f5194[_0x3e8ab7(0xec)],'requestedStateConfirmed':![]});}}for(const _0x231e37 of _0x3c9b04){const _0x58eedd=_0x5a3d2b['beforeById']['get'](_0x231e37),_0x5f298e=_0x1fd726['byId'][_0x3e8ab7(0xa7)](_0x231e37);try{verifyVisibilityUpdate(_0x58eedd,_0x5f298e,_0x5a3d2b[_0x3e8ab7(0xcd)][_0x3e8ab7(0xd5)]),_0x395a55[_0x3e8ab7(0xb4)]({'id':_0x231e37,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0xa3824f){const _0x369d85=asVerificationError(_0xa3824f,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x231e37+_0x3e8ab7(0xac));_0x58d664[_0x3e8ab7(0xb4)]({'id':_0x231e37,'stage':'update-recovery','code':_0x369d85[_0x3e8ab7(0xd3)],'message':_0x369d85[_0x3e8ab7(0xec)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x58d664[_0x3e8ab7(0x95)]>0x0){const _0x5760b2=_0x58d664[_0x3e8ab7(0x75)](_0x3421c3=>Number(_0x3421c3['id'])),_0x4565c6=_0x395a55['filter'](_0x25dbd9=>_0x25dbd9[_0x3e8ab7(0x82)]===!![])[_0x3e8ab7(0x95)],_0x4dab22=menuError(_0x3e8ab7(0x9c),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x5760b2[_0x3e8ab7(0xad)](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x4dab22,_0x5a3d2b[_0x3e8ab7(0xcd)],{'stage':'verification','succeeded':_0x395a55,'failedRecords':[..._0x317bd7,..._0x58d664],'warnings':[_0x3e8ab7(0xb8)],'verification':{'status':_0x3e8ab7(0xb2),..._0x5760b2[_0x3e8ab7(0x95)]===0x1?{'targetId':_0x5760b2[0x0]}:{'targetIds':_0x5760b2},'recoveredCount':_0x4565c6,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x21784c=_0x395a55['filter'](_0x3a0860=>_0x3a0860['updated']===!![])['length'],_0x4f9378=_0x395a55[_0x3e8ab7(0x95)]-_0x21784c,_0x233b10={..._0x5a3d2b[_0x3e8ab7(0xcd)],'succeeded':_0x395a55,'failed':_0x317bd7,'warnings':_0x317bd7['length']>0x0?[..._0x5a3d2b[_0x3e8ab7(0xcd)]['warnings'],_0x3e8ab7(0x74)]:_0x5a3d2b[_0x3e8ab7(0xcd)][_0x3e8ab7(0xda)],'verification':{'checkedBy':_0x3e8ab7(0xc6),'snapshotHash':_0x1fd726['hash'],'matchesRequestedState':_0x317bd7[_0x3e8ab7(0x95)]===0x0,'recoveredCount':_0x3c9b04['length']}};return{'ok':_0x317bd7[_0x3e8ab7(0x95)]===0x0,'data':_0x233b10,'message':_0x317bd7[_0x3e8ab7(0x95)]===0x0?_0x3e8ab7(0x7e)+_0x21784c+_0x3e8ab7(0xaa)+_0x4f9378+'\x20unchanged\x20menu(s).':_0x3e8ab7(0x8f)+_0x21784c+_0x3e8ab7(0x7a)+_0x4f9378+_0x3e8ab7(0x7c)+_0x317bd7[_0x3e8ab7(0x95)]+_0x3e8ab7(0x8b)};}};function parseInput(_0x45e1e5){const _0x2173a2=a191_0x17c4b5,_0x411dd8=parseMenuIds(_0x45e1e5[_0x2173a2(0xab)](_0x2173a2(0x70))),_0x1c9123=parseCsv(_0x45e1e5[_0x2173a2(0xab)](_0x2173a2(0xb1)));if(_0x411dd8['length']===0x0&&_0x1c9123[_0x2173a2(0x95)]===0x0)throw CliErrors[_0x2173a2(0xc9)](_0x2173a2(0x71));const _0x6813e1=parseBooleanFlag(_0x45e1e5,_0x2173a2(0xce),!![]),_0x441ceb=parseBooleanFlag(_0x45e1e5,_0x2173a2(0xa3),![]);let _0x59c460;if(hasFlag(_0x45e1e5,_0x2173a2(0xae))){_0x59c460=_0x45e1e5[_0x2173a2(0x89)]('expected-count');if(!Number[_0x2173a2(0xe3)](_0x59c460)||_0x59c460<0x0)throw CliErrors['validation']('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0x411dd8,'paths':_0x1c9123,'visible':_0x6813e1,'expectVisible':_0x441ceb,'expectedCount':_0x59c460};}function a191_0x5c29(){const _0x28aa9f=['menuIds','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','POST','plannedActions','type','isArray','9422180GsdgdE','targets','update-menu-visibility','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','update\x20menu\x20visibility','3125255QuACiQ','datasetId','menu\x20list','stringify','11974765CrPfAk','validation','beforeById','body','verify\x20menu\x20visibility\x20update','plan','visible','childrenCount','url','datasetCode','write','code','\x20changed\x20unexpectedly.','requestedVisible','Menu\x20id\x20selector(s)\x20not\x20found:\x20','4365rZmluD','depth','modelType','warnings','string','menu','/smartapi/menu/update','\x20visibility\x20update\x20could\x20not\x20be\x20verified','\x20menu(s),\x20expected\x20','42ojhEjC','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','false','isSafeInteger','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','values','Menu\x20','pageType','hash','\x20must\x20be\x20true\x20or\x20false.','resources','message','trim','23944uEpEOB','3495jSEMjP','menu-ids','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','expectVisible','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','map','parentId','appCode','path','update\x20visibility\x20for','\x20updated,\x20','\x20menu(s);\x20skip\x20','\x20skipped,\x20','pageId','Updated\x20visibility\x20for\x20','update','menu_selector_ambiguous','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','recovered','294wjZXhL','number','Selected\x20','Final\x20menu\x20visibility\x20readback\x20failed.','Response\x20was\x20lost\x20for\x20menu\x20','filter','num','Menu\x20path\x20selector\x20not\x20found:\x20','\x20failed.','expectedCount','8SoeErE','update-recovery','Menu\x20visibility\x20update\x20completed:\x20','cookie','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','flagMissing','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','length','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','menu_expected_count_mismatch','before','1093539OGIxVz','menu_selector_not_found','some','menu_verification_failed','verification','has','set','sort','childrenIds','76457rPLYMr','expect-visible','resourcesValid','\x20unchanged\x20menu(s).','split','get','rabetbase\x20menu\x20list\x20--format\x20compress','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','\x20menu(s);\x20skipped\x20','str','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','join','expected-count','visibility-update','label','paths','failed','boolean','push','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','rawFlags'];a191_0x5c29=function(){return _0x28aa9f;};return a191_0x5c29();}async function buildPlan(_0x268837,_0x542402){const _0x26d76c=a191_0x17c4b5,_0x434ee1=parseInput(_0x268837),_0x1414e6=await fetchMutationSnapshot(_0x268837,_0x26d76c(0xc3)),_0x22b464=selectTargets(_0x1414e6['menus'],_0x434ee1[_0x26d76c(0xb7)],_0x434ee1[_0x26d76c(0xb1)]);if(_0x434ee1[_0x26d76c(0x8c)]!==undefined&&_0x22b464[_0x26d76c(0x95)]!==_0x434ee1[_0x26d76c(0x8c)])throw menuError(_0x26d76c(0x97),_0x26d76c(0x85)+_0x22b464[_0x26d76c(0x95)]+_0x26d76c(0xdf)+_0x434ee1[_0x26d76c(0x8c)]+'.',_0x26d76c(0xe1));if(_0x434ee1[_0x26d76c(0x73)]!==undefined){const _0x2670eb=_0x22b464[_0x26d76c(0x88)](_0xc1d22a=>_0xc1d22a['visible']!==_0x434ee1[_0x26d76c(0x73)]);if(_0x2670eb[_0x26d76c(0x95)]>0x0)throw menuError('menu_state_drift','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x2670eb['map'](_0x4af7fd=>_0x4af7fd['id'])[_0x26d76c(0xad)](',\x20')+'.',_0x26d76c(0x91));}const _0x2ca9cd=_0x22b464[_0x26d76c(0x75)](_0x380e8=>({'id':_0x380e8['id'],'label':_0x380e8[_0x26d76c(0xb0)],'path':_0x380e8['path'],'before':{'visible':_0x380e8[_0x26d76c(0xce)]},'after':{'visible':_0x434ee1[_0x26d76c(0xce)]}})),_0x1f9e64=_0x2ca9cd['filter'](_0x484d75=>_0x484d75[_0x26d76c(0x98)][_0x26d76c(0xce)]!==_0x434ee1['visible'])['map'](_0x2ecb0c=>({'stage':_0x26d76c(0xc1),'method':_0x26d76c(0xbb),'path':'/smartapi/menu/update','body':{'appCode':_0x268837['appCode'],'id':_0x2ecb0c['id'],'visible':_0x434ee1[_0x26d76c(0xce)]}})),_0x4b016b=mutationResult({'operation':_0x26d76c(0xaf),'selector':{'menuIds':_0x434ee1[_0x26d76c(0xb7)],'paths':_0x434ee1[_0x26d76c(0xb1)]},'before':{'menus':_0x22b464['map'](_0x2b44df=>({'id':_0x2b44df['id'],'path':_0x2b44df[_0x26d76c(0x78)],'visible':_0x2b44df[_0x26d76c(0xce)]}))},'after':{'menus':_0x22b464[_0x26d76c(0x75)](_0x1dd86f=>({'id':_0x1dd86f['id'],'path':_0x1dd86f[_0x26d76c(0x78)],'visible':_0x434ee1['visible']}))},'dryRun':_0x542402,'backend':[...BACKEND],'plannedActions':_0x1f9e64,'snapshotHash':_0x1414e6[_0x26d76c(0xe9)],'warnings':_0x1f9e64[_0x26d76c(0x95)]===0x0?[_0x26d76c(0xb5)]:[]});return{'plan':{..._0x4b016b,'requestedVisible':_0x434ee1['visible'],'targets':_0x2ca9cd},'beforeById':new Map(_0x22b464[_0x26d76c(0x75)](_0x4dcee3=>[_0x4dcee3['id'],_0x4dcee3]))};}function selectTargets(_0x49e29a,_0x104dfb,_0x2ebf5b){const _0x48319d=a191_0x17c4b5,_0x1f412d=new Map(_0x49e29a[_0x48319d(0x75)](_0x586227=>[_0x586227['id'],_0x586227])),_0x219767=new Map(),_0x54041b=_0x104dfb[_0x48319d(0x88)](_0x5ebcc7=>!_0x1f412d[_0x48319d(0x9e)](_0x5ebcc7));if(_0x54041b[_0x48319d(0x95)]>0x0)throw menuError(_0x48319d(0x9a),_0x48319d(0xd6)+_0x54041b[_0x48319d(0xad)](',\x20')+'.',_0x48319d(0x72));for(const _0x58ccc6 of _0x104dfb){_0x219767[_0x48319d(0x9f)](_0x58ccc6,_0x1f412d[_0x48319d(0xa7)](_0x58ccc6));}for(const _0x10f239 of _0x2ebf5b){const _0x2a4ee3=_0x49e29a[_0x48319d(0x88)](_0x18ef71=>_0x18ef71[_0x48319d(0x78)]===_0x10f239);if(_0x2a4ee3[_0x48319d(0x95)]===0x0)throw menuError(_0x48319d(0x9a),_0x48319d(0x8a)+JSON[_0x48319d(0xc7)](_0x10f239)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x2a4ee3[_0x48319d(0x95)]>0x1)throw menuError(_0x48319d(0x80),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x48319d(0xc7)](_0x10f239)+'.',_0x48319d(0xe5)+_0x2a4ee3[_0x48319d(0x75)](_0x5736ca=>_0x5736ca['id'])[_0x48319d(0xad)](',\x20')+'.');const _0x1da162=_0x2a4ee3[0x0];_0x219767[_0x48319d(0x9f)](_0x1da162['id'],_0x1da162);}return[..._0x219767[_0x48319d(0xe6)]()];}function parseMenuIds(_0x1078fe){const _0x55ce38=a191_0x17c4b5,_0x9839be=parseCsv(_0x1078fe),_0x1a5025=_0x9839be[_0x55ce38(0x75)](Number);if(_0x1a5025[_0x55ce38(0x9b)](_0x1166c8=>!Number[_0x55ce38(0xe3)](_0x1166c8)||_0x1166c8<=0x0))throw CliErrors[_0x55ce38(0xc9)](_0x55ce38(0x96));return[...new Set(_0x1a5025)];}function parseCsv(_0x586c05){const _0x5d72bb=a191_0x17c4b5;return[...new Set(_0x586c05[_0x5d72bb(0xa6)](',')[_0x5d72bb(0x75)](_0x49fca4=>_0x49fca4[_0x5d72bb(0xed)]())[_0x5d72bb(0x88)](Boolean))];}function parseBooleanFlag(_0x2d798f,_0x1c8e87,_0x1a2350){const _0x2fb801=a191_0x17c4b5;if(!hasFlag(_0x2d798f,_0x1c8e87)){if(_0x1a2350)throw CliErrors[_0x2fb801(0x92)](_0x1c8e87);return undefined;}const _0x5a8b5e=_0x2d798f[_0x2fb801(0xb6)][_0x1c8e87];if(_0x5a8b5e===!![]||_0x5a8b5e===![])return _0x5a8b5e;if(_0x5a8b5e==='true')return!![];if(_0x5a8b5e===_0x2fb801(0xe2))return![];throw CliErrors[_0x2fb801(0xc9)]('--'+_0x1c8e87+_0x2fb801(0xea));}function verifyVisibilityUpdate(_0x3326be,_0xa130ee,_0x26b375){const _0x354e55=a191_0x17c4b5;assertVerified(!!_0xa130ee,'Menu\x20'+_0x3326be['id']+_0x354e55(0xa9)),assertVerified(_0xa130ee[_0x354e55(0xce)]===_0x26b375,_0x354e55(0xe7)+_0x3326be['id']+_0x354e55(0xe4));const _0x2a743b=[['id',_0xa130ee['id'],_0x3326be['id']],[_0x354e55(0x76),_0xa130ee[_0x354e55(0x76)],_0x3326be[_0x354e55(0x76)]],[_0x354e55(0xd8),_0xa130ee[_0x354e55(0xd8)],_0x3326be[_0x354e55(0xd8)]],[_0x354e55(0xb0),_0xa130ee[_0x354e55(0xb0)],_0x3326be[_0x354e55(0xb0)]],['path',_0xa130ee['path'],_0x3326be[_0x354e55(0x78)]],[_0x354e55(0xd0),_0xa130ee[_0x354e55(0xd0)],_0x3326be[_0x354e55(0xd0)]],[_0x354e55(0xbd),_0xa130ee[_0x354e55(0xbd)],_0x3326be[_0x354e55(0xbd)]],['sort',_0xa130ee[_0x354e55(0xa0)],_0x3326be['sort']],['resources',_0xa130ee['resources'],_0x3326be[_0x354e55(0xeb)]],['resourcesValid',_0xa130ee[_0x354e55(0xa4)],_0x3326be[_0x354e55(0xa4)]],[_0x354e55(0xa1),_0xa130ee[_0x354e55(0xa1)],_0x3326be[_0x354e55(0xa1)]],['childrenCount',_0xa130ee['childrenCount'],_0x3326be[_0x354e55(0xcf)]],[_0x354e55(0x7d),_0xa130ee['pageId'],_0x3326be[_0x354e55(0x7d)]],['pageType',_0xa130ee[_0x354e55(0xe8)],_0x3326be[_0x354e55(0xe8)]],[_0x354e55(0xd9),_0xa130ee[_0x354e55(0xd9)],_0x3326be[_0x354e55(0xd9)]],[_0x354e55(0xc5),_0xa130ee['datasetId'],_0x3326be['datasetId']],['datasetCode',_0xa130ee['datasetCode'],_0x3326be[_0x354e55(0xd1)]]];for(const [_0x46f4d0,_0x7f1d83,_0x234551]of _0x2a743b){assertVerified(sameValue(_0x7f1d83,_0x234551),'Menu\x20'+_0x3326be['id']+'\x20'+_0x46f4d0+_0x354e55(0xd4));}}function sameValue(_0x4987ad,_0x632817){const _0x3778c7=a191_0x17c4b5;if(Array[_0x3778c7(0xbe)](_0x4987ad)||Array['isArray'](_0x632817))return JSON[_0x3778c7(0xc7)](_0x4987ad)===JSON['stringify'](_0x632817);return _0x4987ad===_0x632817;}
|
|
1
|
+
const a191_0x2ff954=a191_0x1a20;function a191_0x3a94(){const _0x2fc0ed=['update-recovery','\x20changed\x20unexpectedly.','length','117PBseAm','69036kYPhBP','3898906QfyxGm','path','updated','join','type','modelType','true','11080863bIJyEP','set','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','Would\x20update\x20visibility\x20for\x20','beforeById','Requested\x20menu\x20visibility','string','write','hash','update-menu-visibility','cookie','pageId','paths','10TSsnpq','message','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','POST','pageType','update','split','Final\x20menu\x20visibility\x20readback\x20failed.','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','requestedVisible','label','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Menu\x20','number','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','6741072xBIMLG','map','expected-count','\x20unchanged\x20menu(s).','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','1Bsozyd','update\x20menu\x20visibility','plan','menu_expected_count_mismatch','failed','validation','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','boolean','resources','code','36UYQmTj','visible','childrenCount','warnings','2143402XfeclP','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','str','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','targets','56iZppbr','parentId','datasetId','update\x20visibility\x20for','\x20menu(s);\x20skip\x20','values','\x20skipped,\x20','menus','2754545ylWMOS','menuIds','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Response\x20was\x20lost\x20for\x20menu\x20','menu_selector_not_found','before','resourcesValid','rabetbase\x20menu\x20list\x20--format\x20compress','verification','num','plannedActions','push','expect-visible','menu_selector_ambiguous','verify\x20menu\x20visibility\x20update','datasetCode','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','stringify','byId','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','url','\x20must\x20be\x20true\x20or\x20false.','appCode','expectedCount','\x20failed.','filter','\x20menu(s);\x20skipped\x20','menu-ids','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','false','/smartapi/menu/update','body','expectVisible','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','menu_verification_failed','\x20menu(s),\x20expected\x20','969972FdEKgB','isArray','get','menu\x20list','visibility-update','Menu\x20id\x20selector(s)\x20not\x20found:\x20','childrenIds','\x20visibility\x20update\x20could\x20not\x20be\x20verified','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'];a191_0x3a94=function(){return _0x2fc0ed;};return a191_0x3a94();}(function(_0xe7e032,_0x1e70d5){const _0x477efc=a191_0x1a20,_0x2f0d54=_0xe7e032();while(!![]){try{const _0x3d62bc=-parseInt(_0x477efc(0x14d))/0x1*(parseInt(_0x477efc(0x15b))/0x2)+parseInt(_0x477efc(0x123))/0x3*(parseInt(_0x477efc(0x124))/0x4)+-parseInt(_0x477efc(0x168))/0x5+parseInt(_0x477efc(0x115))/0x6*(-parseInt(_0x477efc(0x160))/0x7)+parseInt(_0x477efc(0x148))/0x8+parseInt(_0x477efc(0x12c))/0x9*(parseInt(_0x477efc(0x139))/0xa)+parseInt(_0x477efc(0x125))/0xb*(parseInt(_0x477efc(0x157))/0xc);if(_0x3d62bc===_0x1e70d5)break;else _0x2f0d54['push'](_0x2f0d54['shift']());}catch(_0x243161){_0x2f0d54['push'](_0x2f0d54['shift']());}}}(a191_0x3a94,0xda5a6));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';function a191_0x1a20(_0x59efb5,_0x26c80d){_0x59efb5=_0x59efb5-0xf9;const _0x3a9409=a191_0x3a94();let _0x1a2053=_0x3a9409[_0x59efb5];return _0x1a2053;}const BACKEND=[{'method':a191_0x2ff954(0x13c),'path':a191_0x2ff954(0x10f)}];export const menuVisibilityUpdate={'service':'menu','command':a191_0x2ff954(0x119),'description':a191_0x2ff954(0x100),'risk':a191_0x2ff954(0x133),'structuredErrors':!![],'flags':[{'name':a191_0x2ff954(0x10c),'type':a191_0x2ff954(0x132),'description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':a191_0x2ff954(0x138),'type':a191_0x2ff954(0x132),'description':a191_0x2ff954(0x112)},{'name':'visible','type':'boolean','required':!![],'description':a191_0x2ff954(0x131)},{'name':'expect-visible','type':a191_0x2ff954(0x154),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a191_0x2ff954(0x14a),'type':a191_0x2ff954(0x146),'description':a191_0x2ff954(0x12e)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4afe91){parseInput(_0x4afe91);},async 'dryRun'(_0x82e18a){const _0x2fd24c=a191_0x2ff954,_0x34ecd6=await buildPlan(_0x82e18a,!![]),_0x52fcb8=_0x34ecd6[_0x2fd24c(0x14f)][_0x2fd24c(0xfa)]?.[_0x2fd24c(0x122)]??0x0,_0x236c36=_0x34ecd6[_0x2fd24c(0x14f)][_0x2fd24c(0x15f)]['length']-_0x52fcb8;return menuDryRunResult(_0x34ecd6[_0x2fd24c(0x14f)],{'method':'POST','url':'/smartapi/menu/update','body':{'updates':_0x34ecd6[_0x2fd24c(0x14f)][_0x2fd24c(0xfa)]?.[_0x2fd24c(0x149)](_0x2b254b=>_0x2b254b[_0x2fd24c(0x110)])??[]},'description':_0x2fd24c(0x12f)+_0x52fcb8+_0x2fd24c(0x164)+_0x236c36+_0x2fd24c(0x14b)});},async 'execute'(_0x546439){const _0x1e7412=a191_0x2ff954,_0x5bbb6d=await buildPlan(_0x546439,![]);await recheckMutationSnapshot(_0x546439,_0x5bbb6d[_0x1e7412(0x14f)],_0x1e7412(0x14e));const _0x168de2=[],_0x5c839f=[],_0x1944bb=[];for(const _0xe705f7 of _0x5bbb6d[_0x1e7412(0x14f)]['targets']){if(_0xe705f7[_0x1e7412(0x16e)][_0x1e7412(0x158)]===_0x5bbb6d[_0x1e7412(0x14f)]['requestedVisible']){_0x168de2[_0x1e7412(0xfb)]({'id':_0xe705f7['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x546439['appCode'],_0x546439[_0x1e7412(0x136)],{'id':_0xe705f7['id'],'visible':_0x5bbb6d['plan'][_0x1e7412(0x142)]}),_0x168de2['push']({'id':_0xe705f7['id'],'updated':!![],'skipped':![]});}catch(_0x5d2938){const _0x567c52=mapMenuApiError(_0x5d2938,_0x1e7412(0x163),_0xe705f7['id']);if(isMenuResponseLoss(_0x5d2938)&&_0x567c52[_0x1e7412(0x156)]!=='menu_permission_denied'){_0x1944bb[_0x1e7412(0xfb)](_0xe705f7['id']);continue;}_0x5c839f[_0x1e7412(0xfb)]({'id':_0xe705f7['id'],'stage':_0x1e7412(0x13e),'code':_0x567c52[_0x1e7412(0x156)],'message':_0x567c52[_0x1e7412(0x13a)]});}}let _0x15e596;try{_0x15e596=await fetchMenuSnapshot(_0x546439['appCode'],_0x546439[_0x1e7412(0x136)]);}catch(_0x1df7ee){const _0x42bfa3=describeMenuErrorCause(_0x1df7ee,_0x1e7412(0xfe)),_0x2a736b=_0x1944bb['map'](_0x191c39=>({'id':_0x191c39,'stage':_0x1e7412(0x120),'code':'menu_verification_failed','message':_0x1e7412(0x16c)+_0x191c39+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x179654={'stage':_0x1e7412(0x171),'code':_0x1e7412(0x113),'message':_0x1e7412(0x140),'targetIds':_0x5bbb6d['plan']['targets'][_0x1e7412(0x149)](_0x8dc79b=>_0x8dc79b['id']),'requestedStateConfirmed':![],..._0x42bfa3};throw menuFailure(asVerificationError(_0x1df7ee,_0x1e7412(0x153)),_0x5bbb6d[_0x1e7412(0x14f)],{'stage':'verification','succeeded':_0x168de2,'failedRecords':[..._0x5c839f,..._0x2a736b,_0x179654],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x1e7412(0x151),'recoveredCount':0x0,'lookupCommand':_0x1e7412(0x170)}});}const _0x426b1e=[];for(const _0x435bec of _0x168de2){const _0xb62afb=Number(_0x435bec['id']),_0x56b7e4=_0x5bbb6d[_0x1e7412(0x130)]['get'](_0xb62afb),_0x4f8863=_0x15e596[_0x1e7412(0x103)][_0x1e7412(0x117)](_0xb62afb);try{verifyVisibilityUpdate(_0x56b7e4,_0x4f8863,_0x5bbb6d['plan']['requestedVisible']);}catch(_0x9b95ca){const _0xb28339=asVerificationError(_0x9b95ca,_0x1e7412(0x145)+_0xb62afb+_0x1e7412(0x11c));_0x426b1e[_0x1e7412(0xfb)]({'id':_0xb62afb,'stage':_0x1e7412(0x171),'code':_0xb28339[_0x1e7412(0x156)],'message':_0xb28339['message'],'requestedStateConfirmed':![]});}}for(const _0x46aa80 of _0x1944bb){const _0x34d2f6=_0x5bbb6d[_0x1e7412(0x130)][_0x1e7412(0x117)](_0x46aa80),_0x176ad6=_0x15e596['byId']['get'](_0x46aa80);try{verifyVisibilityUpdate(_0x34d2f6,_0x176ad6,_0x5bbb6d[_0x1e7412(0x14f)][_0x1e7412(0x142)]),_0x168de2['push']({'id':_0x46aa80,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x499302){const _0x2957aa=asVerificationError(_0x499302,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x46aa80+_0x1e7412(0x15c));_0x426b1e[_0x1e7412(0xfb)]({'id':_0x46aa80,'stage':_0x1e7412(0x120),'code':_0x2957aa[_0x1e7412(0x156)],'message':_0x2957aa[_0x1e7412(0x13a)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x426b1e['length']>0x0){const _0x1af251=_0x426b1e['map'](_0x3691ee=>Number(_0x3691ee['id'])),_0x51ae53=_0x168de2[_0x1e7412(0x10a)](_0x1e0a38=>_0x1e0a38['recovered']===!![])['length'],_0x3311cf=menuError('menu_verification_failed',_0x1e7412(0x11f)+_0x1af251[_0x1e7412(0x128)](',\x20')+'.',_0x1e7412(0x13b));throw menuFailure(_0x3311cf,_0x5bbb6d[_0x1e7412(0x14f)],{'stage':'verification','succeeded':_0x168de2,'failedRecords':[..._0x5c839f,..._0x426b1e],'warnings':[_0x1e7412(0x15e)],'verification':{'status':_0x1e7412(0x151),..._0x1af251[_0x1e7412(0x122)]===0x1?{'targetId':_0x1af251[0x0]}:{'targetIds':_0x1af251},'recoveredCount':_0x51ae53,'lookupCommand':_0x1e7412(0x170)}});}const _0x5957b6=_0x168de2[_0x1e7412(0x10a)](_0x3ed081=>_0x3ed081[_0x1e7412(0x127)]===!![])['length'],_0x5b1260=_0x168de2['length']-_0x5957b6,_0x56fff2={..._0x5bbb6d[_0x1e7412(0x14f)],'succeeded':_0x168de2,'failed':_0x5c839f,'warnings':_0x5c839f[_0x1e7412(0x122)]>0x0?[..._0x5bbb6d[_0x1e7412(0x14f)]['warnings'],_0x1e7412(0x141)]:_0x5bbb6d['plan'][_0x1e7412(0x15a)],'verification':{'checkedBy':_0x1e7412(0x118),'snapshotHash':_0x15e596['hash'],'matchesRequestedState':_0x5c839f[_0x1e7412(0x122)]===0x0,'recoveredCount':_0x1944bb[_0x1e7412(0x122)]}};return{'ok':_0x5c839f['length']===0x0,'data':_0x56fff2,'message':_0x5c839f[_0x1e7412(0x122)]===0x0?'Updated\x20visibility\x20for\x20'+_0x5957b6+_0x1e7412(0x10b)+_0x5b1260+_0x1e7412(0x14b):'Menu\x20visibility\x20update\x20completed:\x20'+_0x5957b6+'\x20updated,\x20'+_0x5b1260+_0x1e7412(0x166)+_0x5c839f['length']+_0x1e7412(0x109)};}};function parseInput(_0x5d63e7){const _0x257e74=a191_0x2ff954,_0xe02b6a=parseMenuIds(_0x5d63e7[_0x257e74(0x15d)](_0x257e74(0x10c))),_0xec0cbd=parseCsv(_0x5d63e7['str'](_0x257e74(0x138)));if(_0xe02b6a[_0x257e74(0x122)]===0x0&&_0xec0cbd[_0x257e74(0x122)]===0x0)throw CliErrors['validation']('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x5cb6c0=parseBooleanFlag(_0x5d63e7,_0x257e74(0x158),!![]),_0x748689=parseBooleanFlag(_0x5d63e7,_0x257e74(0xfc),![]);let _0x368684;if(hasFlag(_0x5d63e7,_0x257e74(0x14a))){_0x368684=_0x5d63e7[_0x257e74(0xf9)](_0x257e74(0x14a));if(!Number['isSafeInteger'](_0x368684)||_0x368684<0x0)throw CliErrors[_0x257e74(0x152)](_0x257e74(0x16b));}return{'menuIds':_0xe02b6a,'paths':_0xec0cbd,'visible':_0x5cb6c0,'expectVisible':_0x748689,'expectedCount':_0x368684};}async function buildPlan(_0x68fe7f,_0x28b4d9){const _0x208882=a191_0x2ff954,_0x24ee50=parseInput(_0x68fe7f),_0x14c41b=await fetchMutationSnapshot(_0x68fe7f,'update\x20menu\x20visibility'),_0x382ebd=selectTargets(_0x14c41b[_0x208882(0x167)],_0x24ee50[_0x208882(0x169)],_0x24ee50[_0x208882(0x138)]);if(_0x24ee50['expectedCount']!==undefined&&_0x382ebd[_0x208882(0x122)]!==_0x24ee50[_0x208882(0x108)])throw menuError(_0x208882(0x150),'Selected\x20'+_0x382ebd['length']+_0x208882(0x114)+_0x24ee50[_0x208882(0x108)]+'.',_0x208882(0x14c));if(_0x24ee50['expectVisible']!==undefined){const _0x461cf5=_0x382ebd[_0x208882(0x10a)](_0x16b6ef=>_0x16b6ef[_0x208882(0x158)]!==_0x24ee50[_0x208882(0x111)]);if(_0x461cf5['length']>0x0)throw menuError('menu_state_drift',_0x208882(0x147)+_0x461cf5['map'](_0x4f2ddf=>_0x4f2ddf['id'])['join'](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x3ddd6d=_0x382ebd['map'](_0x4720d9=>({'id':_0x4720d9['id'],'label':_0x4720d9[_0x208882(0x143)],'path':_0x4720d9[_0x208882(0x126)],'before':{'visible':_0x4720d9['visible']},'after':{'visible':_0x24ee50['visible']}})),_0x44847c=_0x3ddd6d['filter'](_0x51fa63=>_0x51fa63[_0x208882(0x16e)][_0x208882(0x158)]!==_0x24ee50[_0x208882(0x158)])[_0x208882(0x149)](_0x406fd6=>({'stage':_0x208882(0x135),'method':'POST','path':_0x208882(0x10f),'body':{'appCode':_0x68fe7f[_0x208882(0x107)],'id':_0x406fd6['id'],'visible':_0x24ee50[_0x208882(0x158)]}})),_0x1885f4=mutationResult({'operation':_0x208882(0x119),'selector':{'menuIds':_0x24ee50[_0x208882(0x169)],'paths':_0x24ee50['paths']},'before':{'menus':_0x382ebd[_0x208882(0x149)](_0x55c25b=>({'id':_0x55c25b['id'],'path':_0x55c25b[_0x208882(0x126)],'visible':_0x55c25b['visible']}))},'after':{'menus':_0x382ebd['map'](_0x2f376a=>({'id':_0x2f376a['id'],'path':_0x2f376a[_0x208882(0x126)],'visible':_0x24ee50[_0x208882(0x158)]}))},'dryRun':_0x28b4d9,'backend':[...BACKEND],'plannedActions':_0x44847c,'snapshotHash':_0x14c41b[_0x208882(0x134)],'warnings':_0x44847c['length']===0x0?[_0x208882(0x11e)]:[]});return{'plan':{..._0x1885f4,'requestedVisible':_0x24ee50[_0x208882(0x158)],'targets':_0x3ddd6d},'beforeById':new Map(_0x382ebd[_0x208882(0x149)](_0x3e43ac=>[_0x3e43ac['id'],_0x3e43ac]))};}function selectTargets(_0x2d6ce6,_0x5d049f,_0x5b2671){const _0x298bac=a191_0x2ff954,_0x1ab0e0=new Map(_0x2d6ce6[_0x298bac(0x149)](_0x35d723=>[_0x35d723['id'],_0x35d723])),_0x41851f=new Map(),_0x2a014c=_0x5d049f[_0x298bac(0x10a)](_0x4475b6=>!_0x1ab0e0['has'](_0x4475b6));if(_0x2a014c[_0x298bac(0x122)]>0x0)throw menuError(_0x298bac(0x16d),_0x298bac(0x11a)+_0x2a014c[_0x298bac(0x128)](',\x20')+'.',_0x298bac(0x144));for(const _0x896b9c of _0x5d049f){_0x41851f['set'](_0x896b9c,_0x1ab0e0['get'](_0x896b9c));}for(const _0x25c292 of _0x5b2671){const _0x47f357=_0x2d6ce6[_0x298bac(0x10a)](_0x4d0185=>_0x4d0185['path']===_0x25c292);if(_0x47f357['length']===0x0)throw menuError(_0x298bac(0x16d),'Menu\x20path\x20selector\x20not\x20found:\x20'+JSON[_0x298bac(0x102)](_0x25c292)+'.',_0x298bac(0x10d));if(_0x47f357[_0x298bac(0x122)]>0x1)throw menuError(_0x298bac(0xfd),_0x298bac(0x11d)+JSON[_0x298bac(0x102)](_0x25c292)+'.',_0x298bac(0x101)+_0x47f357[_0x298bac(0x149)](_0x353607=>_0x353607['id'])[_0x298bac(0x128)](',\x20')+'.');const _0x48c209=_0x47f357[0x0];_0x41851f[_0x298bac(0x12d)](_0x48c209['id'],_0x48c209);}return[..._0x41851f[_0x298bac(0x165)]()];}function parseMenuIds(_0xae1d2){const _0xdfdf71=a191_0x2ff954,_0x468f48=parseCsv(_0xae1d2),_0x1aec4e=_0x468f48[_0xdfdf71(0x149)](Number);if(_0x1aec4e['some'](_0x3eccb9=>!Number['isSafeInteger'](_0x3eccb9)||_0x3eccb9<=0x0))throw CliErrors[_0xdfdf71(0x152)](_0xdfdf71(0x16a));return[...new Set(_0x1aec4e)];}function parseCsv(_0x4fd5c1){const _0x5d1f69=a191_0x2ff954;return[...new Set(_0x4fd5c1[_0x5d1f69(0x13f)](',')[_0x5d1f69(0x149)](_0x4bd830=>_0x4bd830['trim']())['filter'](Boolean))];}function parseBooleanFlag(_0x5459b,_0x4072c9,_0x1ee37f){const _0x3da042=a191_0x2ff954;if(!hasFlag(_0x5459b,_0x4072c9)){if(_0x1ee37f)throw CliErrors['flagMissing'](_0x4072c9);return undefined;}const _0x571bc3=_0x5459b['rawFlags'][_0x4072c9];if(_0x571bc3===!![]||_0x571bc3===![])return _0x571bc3;if(_0x571bc3===_0x3da042(0x12b))return!![];if(_0x571bc3===_0x3da042(0x10e))return![];throw CliErrors[_0x3da042(0x152)]('--'+_0x4072c9+_0x3da042(0x106));}function verifyVisibilityUpdate(_0x5963af,_0x3b77f4,_0x3050ea){const _0x31ed06=a191_0x2ff954;assertVerified(!!_0x3b77f4,'Menu\x20'+_0x5963af['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x3b77f4[_0x31ed06(0x158)]===_0x3050ea,'Menu\x20'+_0x5963af['id']+_0x31ed06(0x104));const _0x305417=[['id',_0x3b77f4['id'],_0x5963af['id']],[_0x31ed06(0x161),_0x3b77f4[_0x31ed06(0x161)],_0x5963af[_0x31ed06(0x161)]],['depth',_0x3b77f4['depth'],_0x5963af['depth']],[_0x31ed06(0x143),_0x3b77f4[_0x31ed06(0x143)],_0x5963af[_0x31ed06(0x143)]],['path',_0x3b77f4[_0x31ed06(0x126)],_0x5963af[_0x31ed06(0x126)]],[_0x31ed06(0x105),_0x3b77f4[_0x31ed06(0x105)],_0x5963af['url']],[_0x31ed06(0x129),_0x3b77f4[_0x31ed06(0x129)],_0x5963af['type']],['sort',_0x3b77f4['sort'],_0x5963af['sort']],[_0x31ed06(0x155),_0x3b77f4[_0x31ed06(0x155)],_0x5963af[_0x31ed06(0x155)]],['resourcesValid',_0x3b77f4[_0x31ed06(0x16f)],_0x5963af[_0x31ed06(0x16f)]],[_0x31ed06(0x11b),_0x3b77f4[_0x31ed06(0x11b)],_0x5963af[_0x31ed06(0x11b)]],[_0x31ed06(0x159),_0x3b77f4[_0x31ed06(0x159)],_0x5963af['childrenCount']],['pageId',_0x3b77f4[_0x31ed06(0x137)],_0x5963af[_0x31ed06(0x137)]],[_0x31ed06(0x13d),_0x3b77f4[_0x31ed06(0x13d)],_0x5963af[_0x31ed06(0x13d)]],['modelType',_0x3b77f4[_0x31ed06(0x12a)],_0x5963af[_0x31ed06(0x12a)]],['datasetId',_0x3b77f4[_0x31ed06(0x162)],_0x5963af[_0x31ed06(0x162)]],[_0x31ed06(0xff),_0x3b77f4[_0x31ed06(0xff)],_0x5963af[_0x31ed06(0xff)]]];for(const [_0xe66bb5,_0x2dbb2a,_0x5eb1ba]of _0x305417){assertVerified(sameValue(_0x2dbb2a,_0x5eb1ba),_0x31ed06(0x145)+_0x5963af['id']+'\x20'+_0xe66bb5+_0x31ed06(0x121));}}function sameValue(_0x9d865e,_0xa1935c){const _0x568358=a191_0x2ff954;if(Array[_0x568358(0x116)](_0x9d865e)||Array['isArray'](_0xa1935c))return JSON[_0x568358(0x102)](_0x9d865e)===JSON['stringify'](_0xa1935c);return _0x9d865e===_0xa1935c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a192_0x1f4bfb=a192_0x28a2;(function(_0x3ba10f,_0xd92a94){const _0x4c6d8d=a192_0x28a2,_0xa30b9d=_0x3ba10f();while(!![]){try{const _0x4f797f=parseInt(_0x4c6d8d(0xd1))/0x1*(parseInt(_0x4c6d8d(0xce))/0x2)+-parseInt(_0x4c6d8d(0xe1))/0x3*(-parseInt(_0x4c6d8d(0xed))/0x4)+-parseInt(_0x4c6d8d(0xef))/0x5*(parseInt(_0x4c6d8d(0xdd))/0x6)+parseInt(_0x4c6d8d(0xea))/0x7*(parseInt(_0x4c6d8d(0xde))/0x8)+-parseInt(_0x4c6d8d(0xe0))/0x9*(parseInt(_0x4c6d8d(0xf2))/0xa)+-parseInt(_0x4c6d8d(0xf1))/0xb+parseInt(_0x4c6d8d(0xd9))/0xc;if(_0x4f797f===_0xd92a94)break;else _0xa30b9d['push'](_0xa30b9d['shift']());}catch(_0x3c959e){_0xa30b9d['push'](_0xa30b9d['shift']());}}}(a192_0x8c95,0x57a95));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';function a192_0x28a2(_0xb479d4,_0x16b8dd){_0xb479d4=_0xb479d4-0xca;const _0x8c95bd=a192_0x8c95();let _0x28a29a=_0x8c95bd[_0xb479d4];return _0x28a29a;}const CREATE_PATH=a192_0x1f4bfb(0xd2);async function prepareCreate(_0x4c7f71){const _0xa826=a192_0x1f4bfb,_0x49caa7=await readNotificationDocument(_0x4c7f71,'create'),_0x4e3f71=createMutationInput(_0x4c7f71[_0xa826(0xeb)],_0x49caa7);return{'document':_0x49caa7,'input':_0x4e3f71,'planned':projectNotificationConfig({'appCode':_0x4c7f71[_0xa826(0xeb)],'configName':_0x49caa7[_0xa826(0xd3)],'channelType':_0x49caa7[_0xa826(0xd0)],'endpointUrl':_0x49caa7[_0xa826(0xdb)],'channelConfig':_0x49caa7['channelConfig'],'description':_0x49caa7[_0xa826(0xe9)],'connectTimeout':_0x49caa7[_0xa826(0xcd)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x49caa7[_0xa826(0xca)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a192_0x8c95(){const _0x45280c=['mutation','channelType','73kmWBFH','/notification/channel-config/create','configName','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','verified','verification','create',';\x20no\x20automatic\x20retry\x20was\x20attempted.','10243356cdyNft','configCode','endpointUrl','notification_config_create_outcome_unknown','12zzhvEJ','8144RHnpoL','write','1701KCOCmt','28389tTtpZc','document','POST','Created\x20notification\x20config\x20','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','isSafeInteger',';\x20do\x20not\x20resubmit\x20automatically.','input','description','4046LhwTvZ','appCode','Inspect\x20with\x20','12BtUVYD','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','1086815wLRJdu','config-create','4778290EnPWaI','23720QxCaho','readTimeout','notification',';\x20do\x20not\x20resubmit.','connectTimeout','5646eFUkYf'];a192_0x8c95=function(){return _0x45280c;};return a192_0x8c95();}export const notificationConfigCreate={'service':a192_0x1f4bfb(0xcb),'command':a192_0x1f4bfb(0xf0),'description':a192_0x1f4bfb(0xe5),'risk':a192_0x1f4bfb(0xdf),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x2f9ee8){assertSingleNotificationSource(_0x2f9ee8);},async 'dryRun'(_0x2177f4){const _0x593ec9=a192_0x1f4bfb,_0x2c2dfa=await prepareCreate(_0x2177f4),_0x114fbd=notificationLookupCommand(_0x2177f4['appCode'],_0x2c2dfa[_0x593ec9(0xe2)][_0x593ec9(0xd0)]);return asDryRunResult({'operation':_0x593ec9(0xd7),'selector':{'appCode':_0x2177f4['appCode'],'configName':_0x2c2dfa[_0x593ec9(0xe2)][_0x593ec9(0xd3)],'channelType':_0x2c2dfa['document'][_0x593ec9(0xd0)]},'before':null,'after':_0x2c2dfa['planned'],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x114fbd}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x31b0e2){const _0x4051af=a192_0x1f4bfb,_0x6e36c6=await prepareCreate(_0x31b0e2),_0x30332f=notificationLookupCommand(_0x31b0e2['appCode'],_0x6e36c6['document'][_0x4051af(0xd0)]);let _0x223692;try{_0x223692=await createNotificationChannelConfig(_0x6e36c6[_0x4051af(0xe8)]);}catch(_0x2b771a){if(isPlatformTransportFailure(_0x2b771a))throw notificationError(_0x4051af(0xdc),_0x4051af(0xee),'Inspect\x20with\x20'+_0x30332f+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x4051af(0xd7),_0x4051af(0xcf),'Inspect\x20with\x20'+_0x30332f+_0x4051af(0xd8));}if(!Number[_0x4051af(0xe6)](_0x223692)||_0x223692<=0x0)throw notificationError(_0x4051af(0xdc),_0x4051af(0xd4),_0x4051af(0xec)+_0x30332f+_0x4051af(0xcc));let _0x378db6;try{const _0x3c0316=await getNotificationChannelConfig(_0x223692,_0x31b0e2[_0x4051af(0xeb)]);_0x378db6=normalizeExactNotificationConfig(_0x3c0316,_0x223692,_0x31b0e2[_0x4051af(0xeb)]);}catch{throw safeApiFailure(_0x4051af(0xd7),_0x4051af(0xd6),_0x4051af(0xec)+_0x30332f+_0x4051af(0xe7));}return{'ok':!![],'data':{'operation':_0x4051af(0xd7),'selector':{'appCode':_0x378db6[_0x4051af(0xeb)],'id':_0x378db6['id'],'configCode':_0x378db6[_0x4051af(0xda)],'configName':_0x378db6[_0x4051af(0xd3)],'channelType':_0x378db6[_0x4051af(0xd0)]},'before':null,'after':projectNotificationConfig(_0x378db6),'dryRun':![],'backend':{'method':_0x4051af(0xe3),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x4051af(0xd5),'lookupCommand':_0x30332f}},'message':_0x4051af(0xe4)+_0x378db6['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a193_0x58829f=a193_0x2739;(function(_0x385d2b,_0x588307){const _0x3a894e=a193_0x2739,_0x238e99=_0x385d2b();while(!![]){try{const _0xdfbd66=parseInt(_0x3a894e(0x1ba))/0x1*(-parseInt(_0x3a894e(0x1a4))/0x2)+parseInt(_0x3a894e(0x1bc))/0x3*(-parseInt(_0x3a894e(0x1ab))/0x4)+parseInt(_0x3a894e(0x1b0))/0x5*(parseInt(_0x3a894e(0x1ac))/0x6)+parseInt(_0x3a894e(0x1a7))/0x7*(-parseInt(_0x3a894e(0x1b7))/0x8)+-parseInt(_0x3a894e(0x1a8))/0x9+parseInt(_0x3a894e(0x1bf))/0xa*(parseInt(_0x3a894e(0x1aa))/0xb)+parseInt(_0x3a894e(0x1bb))/0xc*(parseInt(_0x3a894e(0x1bd))/0xd);if(_0xdfbd66===_0x588307)break;else _0x238e99['push'](_0x238e99['shift']());}catch(_0x46c059){_0x238e99['push'](_0x238e99['shift']());}}}(a193_0x568d,0x67fe1));function a193_0x568d(){const _0x450793=['5934008TqfVZR','appCode','\x20delete\x20could\x20not\x20be\x20verified.','2qNfvDR','12dUAdJI','3ocusEL','23953826dEgRUU','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','70TEIlTD','notification_config_delete_outcome_unknown','before',';\x20do\x20not\x20resubmit\x20automatically.','some','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','Deleted\x20notification\x20config\x20','mutation','449976hSmsZA','planned','high-risk-write','7DlYxXQ','7195608fxPEIC','notification_config_delete_verification_unavailable','1299254jxURsG','1589912zbTWGw','435810EKunjx','Inspect\x20with\x20','Notification\x20config\x20','POST','10dXZCAM','channelType','delete','/notification/channel-config/delete','unshift','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.',';\x20no\x20automatic\x20retry\x20was\x20attempted.'];a193_0x568d=function(){return _0x450793;};return a193_0x568d();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a193_0x2739(_0x381f15,_0x50a7b6){_0x381f15=_0x381f15-0x1a4;const _0x568df1=a193_0x568d();let _0x2739a4=_0x568df1[_0x381f15];return _0x2739a4;}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_0x58829f(0x1b3),REFERENCE_WARNING=a193_0x58829f(0x1b5);async function prepareDelete(_0x4edfb2){const _0x1bbf18=readNotificationId(_0x4edfb2),_0x250d1a=await requireExactNotificationConfig(_0x4edfb2['appCode'],_0x1bbf18,'delete');return{'id':_0x1bbf18,'before':_0x250d1a};}export const notificationConfigDelete={'service':'notification','command':'config-delete','description':a193_0x58829f(0x1be),'risk':a193_0x58829f(0x1a6),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x254381){readNotificationId(_0x254381),requireNotificationExplicitYes(_0x254381);},async 'dryRun'(_0x394436){const _0x2ebbc4=a193_0x58829f,_0x436f6a=await prepareDelete(_0x394436),_0x3baa31=notificationLookupCommand(_0x394436[_0x2ebbc4(0x1b8)],_0x436f6a[_0x2ebbc4(0x1c1)]['channelType']);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x436f6a[_0x2ebbc4(0x1c1)]),'before':projectNotificationConfig(_0x436f6a[_0x2ebbc4(0x1c1)]),'after':null,'dryRun':!![],'backend':{'method':_0x2ebbc4(0x1af),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x2ebbc4(0x1a5),'lookupCommand':_0x3baa31}},{'method':_0x2ebbc4(0x1af),'url':DELETE_PATH});},async 'execute'(_0x598983){const _0x5ddaa1=a193_0x58829f;requireNotificationExplicitYes(_0x598983);const _0x8b4868=await prepareDelete(_0x598983),_0x5a5503=notificationLookupCommand(_0x598983[_0x5ddaa1(0x1b8)],_0x8b4868[_0x5ddaa1(0x1c1)]['channelType']);let _0xc4b01c=![];try{await deleteNotificationChannelConfig(_0x8b4868['id'],_0x598983[_0x5ddaa1(0x1b8)]);}catch(_0x43c052){if(!isPlatformTransportFailure(_0x43c052))throw safeApiFailure(_0x5ddaa1(0x1b2),_0x5ddaa1(0x1c6),_0x5ddaa1(0x1ad)+_0x5a5503+_0x5ddaa1(0x1b6));_0xc4b01c=!![];}let _0x46a2a6;try{_0x46a2a6=await listNotificationChannelConfigs(_0x598983['appCode'],_0x8b4868[_0x5ddaa1(0x1c1)][_0x5ddaa1(0x1b1)]),validateNotificationDeleteReadback(_0x46a2a6,_0x598983[_0x5ddaa1(0x1b8)],_0x8b4868[_0x5ddaa1(0x1c1)][_0x5ddaa1(0x1b1)]);}catch{throw notificationError(_0xc4b01c?_0x5ddaa1(0x1c0):_0x5ddaa1(0x1a9),_0x5ddaa1(0x1ae)+_0x8b4868['id']+_0x5ddaa1(0x1b9),_0x5ddaa1(0x1ad)+_0x5a5503+_0x5ddaa1(0x1c2));}if(_0x46a2a6[_0x5ddaa1(0x1c3)](_0x3d3c5e=>_0x3d3c5e['id']===_0x8b4868['id']))throw notificationError(_0xc4b01c?_0x5ddaa1(0x1c0):'notification_config_delete_verification_failed',_0x5ddaa1(0x1ae)+_0x8b4868['id']+'\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20'+_0x5a5503+_0x5ddaa1(0x1c2));const _0x55469a=[REFERENCE_WARNING];return _0xc4b01c&&_0x55469a[_0x5ddaa1(0x1b4)](_0x5ddaa1(0x1c4)),{'ok':!![],'data':{'operation':_0x5ddaa1(0x1b2),'selector':notificationSelector(_0x8b4868[_0x5ddaa1(0x1c1)]),'before':projectNotificationConfig(_0x8b4868[_0x5ddaa1(0x1c1)]),'after':null,'dryRun':![],'backend':{'method':_0x5ddaa1(0x1af),'path':DELETE_PATH},'warnings':_0x55469a,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0xc4b01c,'lookupCommand':_0x5a5503}},'message':_0x5ddaa1(0x1c5)+_0x8b4868['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a194_0x501c44=a194_0x34c7;(function(_0x1cd95c,_0x7fe8d4){const _0x4d1763=a194_0x34c7,_0x29d218=_0x1cd95c();while(!![]){try{const _0x548ed3=-parseInt(_0x4d1763(0x18a))/0x1+parseInt(_0x4d1763(0x171))/0x2*(parseInt(_0x4d1763(0x17b))/0x3)+parseInt(_0x4d1763(0x17e))/0x4+parseInt(_0x4d1763(0x175))/0x5*(parseInt(_0x4d1763(0x184))/0x6)+parseInt(_0x4d1763(0x17d))/0x7*(parseInt(_0x4d1763(0x183))/0x8)+parseInt(_0x4d1763(0x187))/0x9+-parseInt(_0x4d1763(0x181))/0xa;if(_0x548ed3===_0x7fe8d4)break;else _0x29d218['push'](_0x29d218['shift']());}catch(_0x454ecd){_0x29d218['push'](_0x29d218['shift']());}}}(a194_0x3f5a,0x4fbba));function a194_0x34c7(_0x15dc4c,_0x3ace12){_0x15dc4c=_0x15dc4c-0x16d;const _0x3f5acf=a194_0x3f5a();let _0x34c709=_0x3f5acf[_0x15dc4c];return _0x34c709;}function a194_0x3f5a(){const _0x347451=['notification','trim','16fOENuA','appCode','boolean','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','120PlRQNb','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','type','read','all','config-list','107697GgziBs','\x20notification\x20config(s)','14nEJXeu','687720qmLgVZ','map','length','9864020hVknQK','Notification\x20channel\x20type','587968ZRdVIH','129726cDwIRz','str','Found\x20','5133357COaIQv','validation','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','382403AvGscJ','bool','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type'];a194_0x3f5a=function(){return _0x347451;};return a194_0x3f5a();}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_0x501c44(0x16f),'command':a194_0x501c44(0x17a),'description':a194_0x501c44(0x189),'risk':a194_0x501c44(0x178),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':'string','description':a194_0x501c44(0x182),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a194_0x501c44(0x179),'type':a194_0x501c44(0x173),'default':![],'description':a194_0x501c44(0x16e)}],async 'validate'(_0x32706a){const _0x40fc5f=a194_0x501c44;if(_0x32706a[_0x40fc5f(0x16d)]('all')&&_0x32706a[_0x40fc5f(0x185)](_0x40fc5f(0x177))[_0x40fc5f(0x170)]())throw CliErrors[_0x40fc5f(0x188)]('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.',_0x40fc5f(0x176));if(_0x32706a[_0x40fc5f(0x16d)](_0x40fc5f(0x179)))return;readNotificationChannelType(_0x32706a);},async 'execute'(_0x531208){const _0x3dfbc2=a194_0x501c44;if(_0x531208[_0x3dfbc2(0x16d)](_0x3dfbc2(0x179))){const _0x290db0=await Promise[_0x3dfbc2(0x179)](NOTIFICATION_CHANNEL_TYPES['map'](_0x30dc96=>listNotificationChannelConfigs(_0x531208[_0x3dfbc2(0x172)],_0x30dc96))),_0x2a1f5a=_0x290db0['flat']()[_0x3dfbc2(0x17f)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x531208['appCode'],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x2a1f5a[_0x3dfbc2(0x180)],'configs':_0x2a1f5a},'message':_0x3dfbc2(0x186)+_0x2a1f5a['length']+_0x3dfbc2(0x174)};}const _0x107d72=readNotificationChannelType(_0x531208),_0x4c3e7c=await listNotificationChannelConfigs(_0x531208[_0x3dfbc2(0x172)],_0x107d72),_0xe13fc1=_0x4c3e7c[_0x3dfbc2(0x17f)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x531208[_0x3dfbc2(0x172)],'channelType':_0x107d72,'count':_0xe13fc1[_0x3dfbc2(0x180)],'configs':_0xe13fc1},'message':_0x3dfbc2(0x186)+_0xe13fc1[_0x3dfbc2(0x180)]+'\x20'+_0x107d72+_0x3dfbc2(0x17c)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a195_0x26cc97=a195_0xdc54;(function(_0x39a405,_0x3968ef){const _0x3770ff=a195_0xdc54,_0x1b5182=_0x39a405();while(!![]){try{const _0x2e0e94=parseInt(_0x3770ff(0xa8))/0x1*(parseInt(_0x3770ff(0x8f))/0x2)+parseInt(_0x3770ff(0xa3))/0x3+parseInt(_0x3770ff(0xa6))/0x4*(parseInt(_0x3770ff(0xae))/0x5)+parseInt(_0x3770ff(0xad))/0x6+parseInt(_0x3770ff(0xa9))/0x7*(parseInt(_0x3770ff(0xa1))/0x8)+-parseInt(_0x3770ff(0xb0))/0x9+-parseInt(_0x3770ff(0x95))/0xa;if(_0x2e0e94===_0x3968ef)break;else _0x1b5182['push'](_0x1b5182['shift']());}catch(_0x3f1100){_0x1b5182['push'](_0x1b5182['shift']());}}}(a195_0x41d3,0x7bdd9));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH='/notification/channel-config/update';async function prepareUpdate(_0xb62bab){const _0x51613c=a195_0xdc54,_0x4c5c4c=readNotificationId(_0xb62bab),_0x1dbf71=await readNotificationDocument(_0xb62bab,_0x51613c(0xac)),_0x3d0339=await requireExactNotificationConfig(_0xb62bab[_0x51613c(0x94)],_0x4c5c4c,_0x51613c(0xac));return{'id':_0x4c5c4c,'patch':_0x1dbf71,'before':_0x3d0339,'payload':mergeUpdateInput(_0x3d0339,_0x1dbf71),'planned':plannedUpdateProjection(_0x3d0339,_0x1dbf71)};}function a195_0x41d3(){const _0x7fe90=['564JuoQVS','planned','46MhcbIL','17878RAFNBk','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','Inspect\x20with\x20--id\x20','update','2102550TTdmrv','9290TdENaQ','verifiedFields','1958256VQMCwi','verified','patch','\x20via\x20','5114AhNMHk','channelType','mutation','notification','Notification\x20config\x20','appCode','11860850xMoySS','provesChange','high-risk-write','\x20with\x20','before','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','POST','notification_config_update_verification_failed','config-update',';\x20do\x20not\x20resubmit\x20automatically.','notification_config_update_verification_unavailable','notification_config_update_outcome_unknown','2320UtkOjy','payload','1321011NmKiwb','Inspect\x20ID\x20','allMatch'];a195_0x41d3=function(){return _0x7fe90;};return a195_0x41d3();}function a195_0xdc54(_0x144cb9,_0x287d2c){_0x144cb9=_0x144cb9-0x8f;const _0x41d382=a195_0x41d3();let _0xdc5458=_0x41d382[_0x144cb9];return _0xdc5458;}export const notificationConfigUpdate={'service':a195_0x26cc97(0x92),'command':a195_0x26cc97(0x9d),'description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':a195_0x26cc97(0x97),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x374971){readNotificationId(_0x374971),assertSingleNotificationSource(_0x374971),requireNotificationExplicitYes(_0x374971);},async 'dryRun'(_0x477c7b){const _0x2ca370=a195_0x26cc97,_0x5816a2=await prepareUpdate(_0x477c7b),_0x1f3a47=notificationLookupCommand(_0x477c7b[_0x2ca370(0x94)],_0x5816a2[_0x2ca370(0x99)][_0x2ca370(0x90)]);return asDryRunResult({'operation':_0x2ca370(0xac),'selector':notificationSelector(_0x5816a2[_0x2ca370(0x99)]),'before':projectNotificationConfig(_0x5816a2['before']),'after':_0x5816a2[_0x2ca370(0xa7)],'dryRun':!![],'backend':{'method':_0x2ca370(0x9b),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x2ca370(0xa7),'lookupCommand':_0x1f3a47}},{'method':_0x2ca370(0x9b),'url':UPDATE_PATH});},async 'execute'(_0x5e214c){const _0x21b585=a195_0x26cc97;requireNotificationExplicitYes(_0x5e214c);const _0x4ac935=await prepareUpdate(_0x5e214c),_0xfe809b=notificationLookupCommand(_0x5e214c['appCode'],_0x4ac935[_0x21b585(0x99)][_0x21b585(0x90)]);let _0x2d1e83=![];try{await updateNotificationChannelConfig(_0x4ac935[_0x21b585(0xa2)]);}catch(_0x544efd){if(!isPlatformTransportFailure(_0x544efd))throw safeApiFailure(_0x21b585(0xac),_0x21b585(0x91),_0x21b585(0xa4)+_0x4ac935['id']+_0x21b585(0x98)+_0xfe809b+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x2d1e83=!![];}let _0x4d10e7;try{const _0x193a6d=await getNotificationChannelConfig(_0x4ac935['id'],_0x5e214c[_0x21b585(0x94)]);_0x4d10e7=normalizeExactNotificationConfig(_0x193a6d,_0x4ac935['id'],_0x5e214c[_0x21b585(0x94)]);}catch{throw notificationError(_0x2d1e83?_0x21b585(0xa0):_0x21b585(0x9f),_0x21b585(0x93)+_0x4ac935['id']+_0x21b585(0xaa),_0x21b585(0xab)+_0x4ac935['id']+_0x21b585(0xb3)+_0xfe809b+_0x21b585(0x9e));}const _0xc67e8f=requestedSafeFieldsMatch(_0x4ac935[_0x21b585(0x99)],_0x4d10e7,_0x4ac935[_0x21b585(0xb2)]);if(!_0xc67e8f[_0x21b585(0xa5)]||_0x2d1e83&&!_0xc67e8f[_0x21b585(0x96)])throw notificationError(_0x2d1e83?_0x21b585(0xa0):_0x21b585(0x9c),_0x21b585(0x93)+_0x4ac935['id']+_0x21b585(0x9a),'Inspect\x20with\x20--id\x20'+_0x4ac935['id']+_0x21b585(0xb3)+_0xfe809b+';\x20do\x20not\x20resubmit\x20automatically.');const _0x244b27=_0x2d1e83?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x4d10e7),'before':projectNotificationConfig(_0x4ac935[_0x21b585(0x99)]),'after':projectNotificationConfig(_0x4d10e7),'dryRun':![],'backend':{'method':_0x21b585(0x9b),'path':UPDATE_PATH},'warnings':_0x244b27,'verification':{'status':_0x21b585(0xb1),'recoveredAfterUnknownResponse':_0x2d1e83,'verifiedFields':_0xc67e8f[_0x21b585(0xaf)],'lookupCommand':_0xfe809b}},'message':'Updated\x20notification\x20config\x20'+_0x4d10e7['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x17270e,_0x526caa){const _0x1d598c=a196_0x1e8c,_0x3b0455=_0x17270e();while(!![]){try{const _0x25b04d=parseInt(_0x1d598c(0xa1))/0x1+parseInt(_0x1d598c(0xa4))/0x2*(-parseInt(_0x1d598c(0x9d))/0x3)+parseInt(_0x1d598c(0x9f))/0x4*(parseInt(_0x1d598c(0x9b))/0x5)+parseInt(_0x1d598c(0x9a))/0x6+-parseInt(_0x1d598c(0xa0))/0x7*(parseInt(_0x1d598c(0xa3))/0x8)+parseInt(_0x1d598c(0x9e))/0x9*(-parseInt(_0x1d598c(0xa2))/0xa)+parseInt(_0x1d598c(0x9c))/0xb;if(_0x25b04d===_0x526caa)break;else _0x3b0455['push'](_0x3b0455['shift']());}catch(_0x4b9f9d){_0x3b0455['push'](_0x3b0455['shift']());}}}(a196_0x4d7d,0xbef47));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a196_0x1e8c(_0x4a7de9,_0x260094){_0x4a7de9=_0x4a7de9-0x9a;const _0x4d7d68=a196_0x4d7d();let _0x1e8cfe=_0x4d7d68[_0x4a7de9];return _0x1e8cfe;}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a196_0x4d7d(){const _0x32632f=['4834NjaZeE','3877074NnLMFV','40DotUWU','26018740SNQbLv','834wzYdNg','45540YPUTTY','284444mWgGgm','10553025rTquZm','317345wSjVCL','1850aViUFK','8YjcXTp'];a196_0x4d7d=function(){return _0x32632f;};return a196_0x4d7d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a197_0x2c563b=a197_0x1b83;(function(_0xd5104,_0x4d5a1c){const _0x18f6a6=a197_0x1b83,_0x20c17f=_0xd5104();while(!![]){try{const _0x4f24eb=parseInt(_0x18f6a6(0x189))/0x1+-parseInt(_0x18f6a6(0x16d))/0x2+-parseInt(_0x18f6a6(0x147))/0x3+-parseInt(_0x18f6a6(0x19d))/0x4+parseInt(_0x18f6a6(0x17c))/0x5+parseInt(_0x18f6a6(0x161))/0x6*(parseInt(_0x18f6a6(0x193))/0x7)+parseInt(_0x18f6a6(0x17b))/0x8*(parseInt(_0x18f6a6(0x15e))/0x9);if(_0x4f24eb===_0x4d5a1c)break;else _0x20c17f['push'](_0x20c17f['shift']());}catch(_0x37dde1){_0x20c17f['push'](_0x20c17f['shift']());}}}(a197_0x4cbd,0xd87fd));function a197_0x1b83(_0x306be0,_0x2614b7){_0x306be0=_0x306be0-0x133;const _0x4cbd6e=a197_0x4cbd();let _0x1b83d9=_0x4cbd6e[_0x306be0];return _0x1b83d9;}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=['EMAIL',a197_0x2c563b(0x198),a197_0x2c563b(0x1ad),'WECOM',a197_0x2c563b(0x149)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x2c563b(0x138),'channelType','endpointUrl',a197_0x2c563b(0x192),a197_0x2c563b(0x1a4),a197_0x2c563b(0x169),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x2c563b(0x15d),a197_0x2c563b(0x195),a197_0x2c563b(0x179)]),EMAIL_RECIPIENT_FIELDS=new Set(['emailTargets',a197_0x2c563b(0x196),a197_0x2c563b(0x153),a197_0x2c563b(0x160),'replyTo',a197_0x2c563b(0x134),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x2c563b(0x185),'type':a197_0x2c563b(0x1b0),'required':![],'description':a197_0x2c563b(0x146)},{'name':a197_0x2c563b(0x17a),'type':'boolean','required':![],'default':![],'description':a197_0x2c563b(0x188)},{'name':a197_0x2c563b(0x180),'type':a197_0x2c563b(0x1b0),'required':![],'description':a197_0x2c563b(0x145)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x2c563b(0x177),'required':!![],'description':a197_0x2c563b(0x1a3)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x48fda9,_0x209304,_0x1cb6f4){return new CliError(_0x48fda9,0x1,_0x209304,_0x1cb6f4);}export function readNotificationId(_0x30d9f8){const _0x441fb3=a197_0x2c563b,_0x4e33d0=_0x30d9f8['num']('id');if(!Number[_0x441fb3(0x1ae)](_0x4e33d0)||_0x4e33d0<=0x0)throw notificationError('notification_config_id_invalid',_0x441fb3(0x152));return _0x4e33d0;}export function requireNotificationExplicitYes(_0x3478ab){const _0x3f38e9=a197_0x2c563b;if(_0x3478ab[_0x3f38e9(0x1a5)]('dry-run')||_0x3478ab[_0x3f38e9(0x1a5)]('yes'))return;throw notificationError('notification_config_confirmation_required',_0x3f38e9(0x13e),_0x3f38e9(0x157));}export function readNotificationChannelType(_0x71d9e6,_0x2fb695=a197_0x2c563b(0x1ab),_0x42cc28=a197_0x2c563b(0x187)){const _0x511dfd=a197_0x2c563b,_0x1f26d4=_0x71d9e6[_0x511dfd(0x14c)](_0x2fb695)[_0x511dfd(0x183)]()||_0x42cc28;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x1f26d4))throw CliErrors[_0x511dfd(0x19f)](_0x511dfd(0x15b)+_0x2fb695+':\x20'+_0x1f26d4,_0x511dfd(0x13b)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x1f26d4;}export function assertSingleNotificationSource(_0x5a6090){const _0xe2d231=a197_0x2c563b,_0x6b5a3f=[],_0x1ef145=_0x5a6090[_0xe2d231(0x14c)]('file')[_0xe2d231(0x183)]();if(_0x1ef145)_0x6b5a3f[_0xe2d231(0x135)]({'kind':_0xe2d231(0x185),'path':_0x1ef145});if(_0x5a6090[_0xe2d231(0x1a5)](_0xe2d231(0x17a)))_0x6b5a3f[_0xe2d231(0x135)]({'kind':_0xe2d231(0x17a)});const _0x389e16=_0x5a6090[_0xe2d231(0x14c)](_0xe2d231(0x180))['trim']();if(_0x389e16)_0x6b5a3f[_0xe2d231(0x135)]({'kind':_0xe2d231(0x167),'name':_0x389e16});if(_0x6b5a3f[_0xe2d231(0x13c)]===0x0)throw CliErrors[_0xe2d231(0x19f)](_0xe2d231(0x16a),_0xe2d231(0x15a));if(_0x6b5a3f['length']>0x1)throw CliErrors['validation'](_0xe2d231(0x184),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x6b5a3f[0x0];}export async function readNotificationDocument(_0x4e7b74,_0x53be3f){const _0x322063=a197_0x2c563b,_0x203423=assertSingleNotificationSource(_0x4e7b74),_0x420e6f=_0x203423[_0x322063(0x1a6)]===_0x322063(0x185)?_0x322063(0x15f)+_0x203423[_0x322063(0x14e)]:_0x203423['kind']===_0x322063(0x167)?_0x322063(0x178)+_0x203423[_0x322063(0x14a)]:_0x322063(0x17a);let _0x4a6340;try{if(_0x203423[_0x322063(0x1a6)]===_0x322063(0x185))_0x4a6340=await readFile(_0x203423[_0x322063(0x14e)],_0x322063(0x18e));else{if(_0x203423[_0x322063(0x1a6)]===_0x322063(0x167)){if(!(_0x203423[_0x322063(0x14a)]in process.env))throw notificationError(_0x322063(0x19c),_0x322063(0x197)+_0x203423['name']);_0x4a6340=process.env[_0x203423.name]??'';}else _0x4a6340=await readStdin();}}catch(_0x5cf131){if(_0x5cf131 instanceof CliError)throw _0x5cf131;throw notificationError('notification_config_source_unavailable',_0x322063(0x18b)+_0x420e6f+'.');}let _0x144048;try{_0x144048=JSON['parse'](_0x4a6340);}catch{throw notificationError('notification_config_json_invalid',_0x322063(0x16f)+_0x420e6f+'\x20is\x20invalid.',_0x322063(0x1b2));}if(!isJsonObject(_0x144048))throw notificationError(_0x322063(0x171),_0x322063(0x16f)+_0x420e6f+_0x322063(0x19a));return validateNotificationDocument(_0x144048,_0x53be3f);}export function projectNotificationListConfig(_0x20eb5d,_0x2dc8c8){const _0x49ca5e=a197_0x2c563b;return{'id':typeof _0x20eb5d['id']===_0x49ca5e(0x177)?_0x20eb5d['id']:null,'configCode':requireResponseString(_0x20eb5d[_0x49ca5e(0x195)],'configCode',_0x2dc8c8),'configName':requireResponseString(_0x20eb5d['configName'],_0x49ca5e(0x138),_0x2dc8c8),'channelType':requireResponseString(_0x20eb5d['channelType'],_0x49ca5e(0x13a),_0x2dc8c8),'description':normalizeNullableString(_0x20eb5d[_0x49ca5e(0x1a4)]),'createTime':normalizeNullableString(_0x20eb5d[_0x49ca5e(0x1b1)]),'updateTime':normalizeNullableString(_0x20eb5d[_0x49ca5e(0x1a0)])};}export function normalizeExactNotificationConfig(_0x14cbaf,_0x1c191b,_0x439775){const _0x475332=a197_0x2c563b;if(!Number['isSafeInteger'](_0x14cbaf['id'])||_0x14cbaf['id']!==_0x1c191b)throw notificationError(_0x475332(0x1a8),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x1c191b+'.');if(_0x14cbaf[_0x475332(0x15d)]!==_0x439775)throw notificationError(_0x475332(0x1a8),'Notification\x20config\x20'+_0x1c191b+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x1bc3fd=requireExactString(_0x14cbaf['configName'],_0x475332(0x138),_0x1c191b),_0x46cc00=requireExactString(_0x14cbaf[_0x475332(0x195)],_0x475332(0x195),_0x1c191b),_0x1d74b4=requireExactString(_0x14cbaf[_0x475332(0x13a)],'channelType',_0x1c191b);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x1d74b4))throw notificationError(_0x475332(0x1a8),_0x475332(0x148)+_0x1c191b+'\x20has\x20an\x20unsupported\x20channelType.');const _0x177d4b=responseNullableString(_0x14cbaf['endpointUrl'],_0x475332(0x162),_0x1c191b),_0x3d94dd=responseNullableString(_0x14cbaf[_0x475332(0x192)],'channelConfig',_0x1c191b),_0x17cf0a=responseNullableString(_0x14cbaf[_0x475332(0x1a4)],_0x475332(0x1a4),_0x1c191b),_0x28e36e=responseNullableTimeout(_0x14cbaf[_0x475332(0x169)],'connectTimeout',_0x1c191b),_0x300ea9=responseNullableTimeout(_0x14cbaf['readTimeout'],_0x475332(0x1b3),_0x1c191b);return{'id':_0x1c191b,'appCode':_0x439775,'configCode':_0x46cc00,'configName':_0x1bc3fd,'channelType':_0x1d74b4,'endpointUrl':redactSensitive(_0x177d4b),'channelConfig':redactSensitive(_0x3d94dd),'description':_0x17cf0a,'connectTimeout':_0x28e36e,'readTimeout':_0x300ea9,'endpointUrlRaw':_0x177d4b,'channelConfigRaw':_0x3d94dd};}export async function requireExactNotificationConfig(_0x2d75f6,_0x11c265,_0x2ea121){const _0x4457b0=a197_0x2c563b;let _0x29f911;try{_0x29f911=await getNotificationChannelConfig(_0x11c265,_0x2d75f6);}catch{throw safeApiFailure(_0x2ea121,_0x4457b0(0x18a),_0x4457b0(0x186)+_0x2d75f6+_0x4457b0(0x174));}return normalizeExactNotificationConfig(_0x29f911,_0x11c265,_0x2d75f6);}export function projectNotificationConfig(_0x558e2c){const _0x1dbf54=a197_0x2c563b;return{'id':_0x558e2c['id']??null,'appCode':_0x558e2c[_0x1dbf54(0x15d)],'configCode':_0x558e2c['configCode']??null,'configName':_0x558e2c[_0x1dbf54(0x138)],'channelType':_0x558e2c[_0x1dbf54(0x13a)],'endpointUrl':redactSensitive(_0x558e2c['endpointUrl']),'channelConfig':redactSensitive(_0x558e2c[_0x1dbf54(0x192)]),'description':_0x558e2c[_0x1dbf54(0x1a4)]??null,'connectTimeout':_0x558e2c[_0x1dbf54(0x169)]??null,'readTimeout':_0x558e2c[_0x1dbf54(0x1b3)]??null};}export function notificationSelector(_0xe45693){const _0x48aff4=a197_0x2c563b;return{'appCode':_0xe45693['appCode'],'id':_0xe45693['id'],'configCode':_0xe45693[_0x48aff4(0x195)],'configName':_0xe45693['configName'],'channelType':_0xe45693[_0x48aff4(0x13a)]};}export function createMutationInput(_0x416635,_0x3693db){const _0x2633ac=a197_0x2c563b;return{'appCode':_0x416635,'configName':_0x3693db[_0x2633ac(0x138)],'channelType':_0x3693db[_0x2633ac(0x13a)],...hasOwn(_0x3693db,_0x2633ac(0x162))?{'endpointUrl':_0x3693db['endpointUrl']}:{},...hasOwn(_0x3693db,_0x2633ac(0x192))?{'channelConfig':serializeChannelConfig(_0x3693db[_0x2633ac(0x192)])}:{},...hasOwn(_0x3693db,_0x2633ac(0x1a4))?{'description':_0x3693db['description']}:{},...hasOwn(_0x3693db,'connectTimeout')?{'connectTimeout':_0x3693db[_0x2633ac(0x169)]}:{},...hasOwn(_0x3693db,_0x2633ac(0x1b3))?{'readTimeout':_0x3693db[_0x2633ac(0x1b3)]}:{}};}export function mergeUpdateInput(_0x2e225f,_0x230ab3){const _0x46262f=a197_0x2c563b;return{'id':_0x2e225f['id'],'appCode':_0x2e225f[_0x46262f(0x15d)],'configName':_0x230ab3['configName']??_0x2e225f[_0x46262f(0x138)],'channelType':_0x230ab3[_0x46262f(0x13a)]??_0x2e225f['channelType'],'endpointUrl':hasOwn(_0x230ab3,'endpointUrl')?_0x230ab3[_0x46262f(0x162)]:_0x2e225f[_0x46262f(0x141)],'channelConfig':hasOwn(_0x230ab3,'channelConfig')?serializeChannelConfig(_0x230ab3[_0x46262f(0x192)]):_0x2e225f[_0x46262f(0x191)],'description':hasOwn(_0x230ab3,_0x46262f(0x1a4))?_0x230ab3[_0x46262f(0x1a4)]:_0x2e225f[_0x46262f(0x1a4)],'connectTimeout':hasOwn(_0x230ab3,_0x46262f(0x169))?_0x230ab3[_0x46262f(0x169)]:_0x2e225f[_0x46262f(0x169)],'readTimeout':hasOwn(_0x230ab3,_0x46262f(0x1b3))?_0x230ab3[_0x46262f(0x1b3)]:_0x2e225f[_0x46262f(0x1b3)]};}export function plannedUpdateProjection(_0x33daf6,_0x4d1041){const _0x260d80=a197_0x2c563b;return projectNotificationConfig({'id':_0x33daf6['id'],'appCode':_0x33daf6[_0x260d80(0x15d)],'configCode':_0x33daf6[_0x260d80(0x195)],'configName':_0x4d1041['configName']??_0x33daf6[_0x260d80(0x138)],'channelType':_0x4d1041[_0x260d80(0x13a)]??_0x33daf6[_0x260d80(0x13a)],'endpointUrl':hasOwn(_0x4d1041,_0x260d80(0x162))?_0x4d1041['endpointUrl']:_0x33daf6['endpointUrlRaw'],'channelConfig':hasOwn(_0x4d1041,_0x260d80(0x192))?_0x4d1041['channelConfig']:_0x33daf6['channelConfigRaw'],'description':hasOwn(_0x4d1041,_0x260d80(0x1a4))?_0x4d1041[_0x260d80(0x1a4)]:_0x33daf6[_0x260d80(0x1a4)],'connectTimeout':hasOwn(_0x4d1041,'connectTimeout')?_0x4d1041[_0x260d80(0x169)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x33daf6[_0x260d80(0x169)],'readTimeout':hasOwn(_0x4d1041,_0x260d80(0x1b3))?_0x4d1041[_0x260d80(0x1b3)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x33daf6[_0x260d80(0x1b3)]});}export function requestedSafeFieldsMatch(_0x537bfe,_0x4e59e2,_0x2985d8){const _0x44076b=a197_0x2c563b,_0x309e0e=[],_0x3c2cfe=[],_0x3a606f=[];for(const _0x174211 of[_0x44076b(0x138),_0x44076b(0x13a),_0x44076b(0x1a4)]){if(!hasOwn(_0x2985d8,_0x174211))continue;_0x3a606f[_0x44076b(0x135)](_0x174211),_0x309e0e[_0x44076b(0x135)](_0x4e59e2[_0x174211]===_0x2985d8[_0x174211]),_0x3c2cfe[_0x44076b(0x135)](_0x537bfe[_0x174211]!==_0x2985d8[_0x174211]&&_0x4e59e2[_0x174211]===_0x2985d8[_0x174211]);}for(const _0x2a18fa of[_0x44076b(0x169),_0x44076b(0x1b3)]){if(!hasOwn(_0x2985d8,_0x2a18fa))continue;const _0x12025b=_0x2985d8[_0x2a18fa]??(_0x2a18fa===_0x44076b(0x169)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x3a606f['push'](_0x2a18fa),_0x309e0e[_0x44076b(0x135)](_0x4e59e2[_0x2a18fa]===_0x12025b),_0x3c2cfe[_0x44076b(0x135)](_0x537bfe[_0x2a18fa]!==_0x12025b&&_0x4e59e2[_0x2a18fa]===_0x12025b);}return hasOwn(_0x2985d8,_0x44076b(0x162))&&_0x2985d8['endpointUrl']===null&&(_0x3a606f['push']('endpointUrl:null'),_0x309e0e[_0x44076b(0x135)](_0x4e59e2[_0x44076b(0x141)]===null||_0x4e59e2['endpointUrlRaw']===''),_0x3c2cfe[_0x44076b(0x135)](_0x537bfe[_0x44076b(0x141)]!==null&&_0x537bfe[_0x44076b(0x141)]!==''&&(_0x4e59e2[_0x44076b(0x141)]===null||_0x4e59e2[_0x44076b(0x141)]===''))),{'allMatch':_0x309e0e[_0x44076b(0x13f)](Boolean),'provesChange':_0x3c2cfe[_0x44076b(0x16c)](Boolean),'verifiedFields':_0x3a606f};}export function validateNotificationDeleteReadback(_0x48a875,_0x5f45e6,_0x36be73){const _0x4692be=a197_0x2c563b;for(const [_0x5c874d,_0x5790f9]of _0x48a875[_0x4692be(0x173)]()){if(!Number[_0x4692be(0x1ae)](_0x5790f9['id'])||_0x5790f9['id']<=0x0)throw notificationError(_0x4692be(0x1a8),_0x4692be(0x194)+(_0x5c874d+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x5790f9[_0x4692be(0x15d)]!==_0x5f45e6)throw notificationError('notification_config_response_invalid',_0x4692be(0x194)+(_0x5c874d+0x1)+_0x4692be(0x15c));if(_0x5790f9['channelType']!==_0x36be73)throw notificationError(_0x4692be(0x1a8),'Notification\x20config\x20list\x20item\x20'+(_0x5c874d+0x1)+_0x4692be(0x181));}}export function safeApiFailure(_0xc9a8f2,_0x50ea33,_0x2b86ff){const _0x5c7326=a197_0x2c563b;return notificationError(_0x5c7326(0x1ac)+_0xc9a8f2+'_'+(_0x50ea33===_0x5c7326(0x136)?_0x5c7326(0x1a7):_0x50ea33+_0x5c7326(0x163)),'Notification\x20config\x20'+_0xc9a8f2+'\x20'+_0x50ea33+_0x5c7326(0x172),_0x2b86ff);}function a197_0x4cbd(){const _0x4b3a47=['notification_config_field_required','type','notification_config_','DINGTALK','isSafeInteger','\x20has\x20invalid\x20field\x20\x22','string','createTime','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','readTimeout','join','subjectPrefix','push','mutation','create','configName','messageTemplate','channelType','Allowed\x20values:\x20','length','notification_config_field_invalid','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','every','Unknown\x20notification\x20JSON\x20field\x20\x22','endpointUrlRaw','notification_config_channel_field_forbidden','keys','\x22\x20is\x20forbidden.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','2756721xnnxNN','Notification\x20config\x20','WEBHOOK','name','\x20characters.','str','prototype','path','a\x20supported\x20string','a\x20non-empty\x20string','\x20is\x20missing\x20required\x20field\x20\x22','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','ccList','notification_config_update_empty','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','has','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','stringify','Create\x20JSON\x20requires\x20field\x20','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Invalid\x20--','\x20has\x20an\x20invalid\x20appCode.','appCode','5773509ZyurgQ','file\x20','bccList','6fcHfEi','endpointUrl','_unavailable','notification_config_field_unknown','Item\x20','call','env','includes','connectTimeout','Missing\x20notification\x20JSON\x20source.','update','some','2869848nqyOlU','Notification\x20JSON\x20channelConfig\x20field\x20\x22','Notification\x20JSON\x20from\x20','apiError','notification_config_json_invalid','\x20failed.','entries','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','rabetbase\x20notification\x20config-list\x20--appcode\x20','\x22channelType\x22.','number','environment\x20variable\x20','channelCode','stdin','32oBDNcu','5023555zvPjRS','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x22\x20must\x20be\x20','Notification\x20JSON\x20field\x20\x22','from-env','\x20has\x20an\x20invalid\x20channelType.','notification_config_field_forbidden','trim','Notification\x20JSON\x20source\x20is\x20ambiguous.','file','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','EMAIL','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','424981EXNUPr','preflight','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','a\x20string\x20or\x20null','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','utf8','isArray','\x22\x20must\x20be\x20a\x20non-empty\x20string.','channelConfigRaw','channelConfig','2837695xUcjoa','Notification\x20config\x20list\x20item\x20','configCode','recipients','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','FEISHU','\x22\x20cannot\x20exceed\x20','\x20must\x20be\x20an\x20object.','a\x20JSON\x20object','notification_config_source_unavailable','4641876YBIJbl','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','validation','updateTime','a\x20JSON\x20object\x20or\x20null','\x20--type\x20','Application-level\x20notification\x20config\x20ID','description','bool','kind','failed','notification_config_response_invalid','\x22configName\x22.'];a197_0x4cbd=function(){return _0x4b3a47;};return a197_0x4cbd();}export function notificationLookupCommand(_0x11ffc3,_0x799f5){const _0x2c76eb=a197_0x2c563b;return _0x2c76eb(0x175)+_0x11ffc3+_0x2c76eb(0x1a2)+_0x799f5+'\x20--format\x20compress';}function validateNotificationDocument(_0x35898f,_0x24efbe){const _0x1aedc1=a197_0x2c563b;for(const _0x4883d0 of Object[_0x1aedc1(0x143)](_0x35898f)){if(FORBIDDEN_IDENTITY_FIELDS[_0x1aedc1(0x156)](_0x4883d0))throw notificationError(_0x1aedc1(0x182),'Notification\x20JSON\x20field\x20\x22'+_0x4883d0+_0x1aedc1(0x155));if(!ALLOWED_INPUT_FIELDS[_0x1aedc1(0x156)](_0x4883d0))throw notificationError(_0x1aedc1(0x164),_0x1aedc1(0x140)+_0x4883d0+'\x22.');}if(_0x24efbe===_0x1aedc1(0x16b)&&Object[_0x1aedc1(0x143)](_0x35898f)['length']===0x0)throw notificationError(_0x1aedc1(0x154),_0x1aedc1(0x19e));const _0x267e69={};if(hasOwn(_0x35898f,_0x1aedc1(0x138)))_0x267e69[_0x1aedc1(0x138)]=validateRequiredString(_0x35898f[_0x1aedc1(0x138)],_0x1aedc1(0x138),0x80);else{if(_0x24efbe===_0x1aedc1(0x137))throw notificationError(_0x1aedc1(0x1aa),_0x1aedc1(0x159)+_0x1aedc1(0x1a9));}if(hasOwn(_0x35898f,'channelType')){if(typeof _0x35898f[_0x1aedc1(0x13a)]!==_0x1aedc1(0x1b0))throw invalidFieldType(_0x1aedc1(0x13a),_0x1aedc1(0x14f));const _0x9f3fd1=_0x35898f[_0x1aedc1(0x13a)][_0x1aedc1(0x183)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x1aedc1(0x168)](_0x9f3fd1))throw notificationError(_0x1aedc1(0x13d),_0x1aedc1(0x17d),_0x1aedc1(0x13b)+NOTIFICATION_CHANNEL_TYPES[_0x1aedc1(0x133)](',\x20')+'.');_0x267e69[_0x1aedc1(0x13a)]=_0x9f3fd1;}else{if(_0x24efbe===_0x1aedc1(0x137))throw notificationError(_0x1aedc1(0x1aa),_0x1aedc1(0x159)+_0x1aedc1(0x176));}for(const [_0x326267,_0x54ec28]of[[_0x1aedc1(0x162),0x200],[_0x1aedc1(0x1a4),0x100]]){if(!hasOwn(_0x35898f,_0x326267))continue;const _0x9a6f2=_0x35898f[_0x326267];if(_0x9a6f2!==null&&typeof _0x9a6f2!==_0x1aedc1(0x1b0))throw invalidFieldType(_0x326267,_0x1aedc1(0x18c));if(typeof _0x9a6f2===_0x1aedc1(0x1b0)&&_0x9a6f2[_0x1aedc1(0x13c)]>_0x54ec28)throw notificationError(_0x1aedc1(0x13d),_0x1aedc1(0x17f)+_0x326267+_0x1aedc1(0x199)+_0x54ec28+_0x1aedc1(0x14b));_0x267e69[_0x326267]=_0x9a6f2;}if(hasOwn(_0x35898f,_0x1aedc1(0x192))){const _0x21a5e7=_0x35898f[_0x1aedc1(0x192)];if(_0x21a5e7===null&&_0x24efbe===_0x1aedc1(0x137))throw invalidFieldType('channelConfig',_0x1aedc1(0x19b));if(_0x21a5e7!==null&&!isJsonObject(_0x21a5e7))throw invalidFieldType('channelConfig',_0x24efbe==='update'?_0x1aedc1(0x1a1):'a\x20JSON\x20object');_0x21a5e7!==null&&validateChannelConfigFields(_0x267e69[_0x1aedc1(0x13a)],_0x21a5e7),_0x267e69[_0x1aedc1(0x192)]=_0x21a5e7;}for(const _0x33cfe7 of[_0x1aedc1(0x169),_0x1aedc1(0x1b3)]){if(!hasOwn(_0x35898f,_0x33cfe7))continue;const _0x2bd867=_0x35898f[_0x33cfe7];if(_0x2bd867!==null&&(!Number[_0x1aedc1(0x1ae)](_0x2bd867)||_0x2bd867<0x0))throw notificationError(_0x1aedc1(0x13d),_0x1aedc1(0x17f)+_0x33cfe7+_0x1aedc1(0x18d));_0x267e69[_0x33cfe7]=_0x2bd867;}return _0x267e69;}function validateRequiredString(_0x168fbd,_0x1b50a1,_0x12cccf){const _0x1b9c0f=a197_0x2c563b;if(typeof _0x168fbd!==_0x1b9c0f(0x1b0))throw invalidFieldType(_0x1b50a1,_0x1b9c0f(0x150));const _0x1be9fb=_0x168fbd[_0x1b9c0f(0x183)]();if(!_0x1be9fb)throw notificationError(_0x1b9c0f(0x13d),_0x1b9c0f(0x17f)+_0x1b50a1+_0x1b9c0f(0x190));if(_0x1be9fb['length']>_0x12cccf)throw notificationError(_0x1b9c0f(0x13d),_0x1b9c0f(0x17f)+_0x1b50a1+_0x1b9c0f(0x199)+_0x12cccf+_0x1b9c0f(0x14b));return _0x1be9fb;}function validateChannelConfigFields(_0x16b3be,_0x17f361){const _0x5b3e55=a197_0x2c563b;if(hasOwn(_0x17f361,_0x5b3e55(0x139)))throw forbiddenChannelConfigField(_0x5b3e55(0x139));if(_0x16b3be===_0x5b3e55(0x187))for(const _0x5991fa of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x17f361,_0x5991fa))throw forbiddenChannelConfigField(_0x5991fa);}}function forbiddenChannelConfigField(_0x421a3f){const _0x21fb0d=a197_0x2c563b;return notificationError(_0x21fb0d(0x142),_0x21fb0d(0x16e)+_0x421a3f+_0x21fb0d(0x144));}function invalidFieldType(_0x5e07c5,_0x53287e){const _0x11979c=a197_0x2c563b;return notificationError(_0x11979c(0x13d),'Notification\x20JSON\x20field\x20\x22'+_0x5e07c5+_0x11979c(0x17e)+_0x53287e+'.');}function serializeChannelConfig(_0xb06bc5){const _0x31691e=a197_0x2c563b;return _0xb06bc5===null||_0xb06bc5===undefined?null:JSON[_0x31691e(0x158)](_0xb06bc5);}function redactSensitive(_0x42cba2){return _0x42cba2===null||_0x42cba2===undefined||_0x42cba2===''?null:'<redacted>';}function requireResponseString(_0x145959,_0x3bbd24,_0x4b4d03){const _0x45b6a8=a197_0x2c563b;if(typeof _0x145959!==_0x45b6a8(0x1b0)||_0x145959['trim']()==='')throw CliErrors[_0x45b6a8(0x170)]('Invalid\x20notification\x20config\x20response.',_0x45b6a8(0x165)+(_0x4b4d03+0x1)+_0x45b6a8(0x151)+_0x3bbd24+'\x22.');return _0x145959['trim']();}function requireExactString(_0x4c17ea,_0x17568f,_0x33b1ed){const _0x439b29=a197_0x2c563b;if(typeof _0x4c17ea!==_0x439b29(0x1b0)||_0x4c17ea[_0x439b29(0x183)]()==='')throw notificationError(_0x439b29(0x1a8),_0x439b29(0x148)+_0x33b1ed+_0x439b29(0x151)+_0x17568f+'\x22.');return _0x4c17ea[_0x439b29(0x183)]();}function responseNullableString(_0x1e36d1,_0x17187f,_0x5b6d3b){const _0x352c26=a197_0x2c563b;if(_0x1e36d1===undefined||_0x1e36d1===null)return null;if(typeof _0x1e36d1!==_0x352c26(0x1b0))throw notificationError('notification_config_response_invalid',_0x352c26(0x148)+_0x5b6d3b+_0x352c26(0x1af)+_0x17187f+'\x22.');return _0x1e36d1;}function responseNullableTimeout(_0x2ebc7a,_0x1f37b1,_0x8e7f0a){const _0x2352f4=a197_0x2c563b;if(_0x2ebc7a===undefined||_0x2ebc7a===null)return null;if(!Number[_0x2352f4(0x1ae)](_0x2ebc7a)||_0x2ebc7a<0x0)throw notificationError(_0x2352f4(0x1a8),_0x2352f4(0x148)+_0x8e7f0a+_0x2352f4(0x1af)+_0x1f37b1+'\x22.');return _0x2ebc7a;}function normalizeNullableString(_0x35211a){const _0x29316f=a197_0x2c563b;return typeof _0x35211a===_0x29316f(0x1b0)?_0x35211a:null;}function isJsonObject(_0x421987){const _0x179fdc=a197_0x2c563b;return _0x421987!==null&&typeof _0x421987==='object'&&!Array[_0x179fdc(0x18f)](_0x421987);}function hasOwn(_0x8bd41b,_0x30a70c){const _0x4c1e42=a197_0x2c563b;return Object[_0x4c1e42(0x14d)]['hasOwnProperty'][_0x4c1e42(0x166)](_0x8bd41b,_0x30a70c);}async function readStdin(){const _0x2dede8=a197_0x2c563b;let _0x50afad='';process[_0x2dede8(0x17a)]['setEncoding'](_0x2dede8(0x18e));for await(const _0x72acb1 of process[_0x2dede8(0x17a)])_0x50afad+=_0x72acb1;return _0x50afad;}
|
|
1
|
+
const a197_0x2459a9=a197_0x2662;(function(_0x1d5bf2,_0xf85492){const _0x3bbe51=a197_0x2662,_0x41aa15=_0x1d5bf2();while(!![]){try{const _0x101e4d=-parseInt(_0x3bbe51(0x12c))/0x1*(-parseInt(_0x3bbe51(0x19b))/0x2)+parseInt(_0x3bbe51(0x14c))/0x3+parseInt(_0x3bbe51(0x13b))/0x4*(-parseInt(_0x3bbe51(0x167))/0x5)+-parseInt(_0x3bbe51(0x182))/0x6+-parseInt(_0x3bbe51(0x18c))/0x7+-parseInt(_0x3bbe51(0x177))/0x8*(parseInt(_0x3bbe51(0x157))/0x9)+-parseInt(_0x3bbe51(0x160))/0xa*(parseInt(_0x3bbe51(0x153))/0xb);if(_0x101e4d===_0xf85492)break;else _0x41aa15['push'](_0x41aa15['shift']());}catch(_0x60b22f){_0x41aa15['push'](_0x41aa15['shift']());}}}(a197_0x193b,0x4fb37));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_0x2459a9(0x193),a197_0x2459a9(0x136),a197_0x2459a9(0x191),a197_0x2459a9(0x1a3),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x2459a9(0x146),'channelType','endpointUrl',a197_0x2459a9(0x13d),a197_0x2459a9(0x13a),'connectTimeout',a197_0x2459a9(0x197)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x2459a9(0x12b),'configCode',a197_0x2459a9(0x1ac)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x2459a9(0x16f),a197_0x2459a9(0x15a),a197_0x2459a9(0x132),a197_0x2459a9(0x1a7),a197_0x2459a9(0x151),a197_0x2459a9(0x139),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x2459a9(0x14b),'type':'string','required':![],'description':a197_0x2459a9(0x17d)},{'name':'stdin','type':'boolean','required':![],'default':![],'description':a197_0x2459a9(0x198)},{'name':a197_0x2459a9(0x17b),'type':a197_0x2459a9(0x16d),'required':![],'description':a197_0x2459a9(0x150)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x2459a9(0x17e),'required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5195c3,_0x151390,_0x2fee96){return new CliError(_0x5195c3,0x1,_0x151390,_0x2fee96);}export function readNotificationId(_0x59571a){const _0x246272=a197_0x2459a9,_0x49b619=_0x59571a[_0x246272(0x154)]('id');if(!Number[_0x246272(0x169)](_0x49b619)||_0x49b619<=0x0)throw notificationError(_0x246272(0x143),_0x246272(0x178));return _0x49b619;}export function requireNotificationExplicitYes(_0x30d131){const _0x52fa4e=a197_0x2459a9;if(_0x30d131['bool'](_0x52fa4e(0x19a))||_0x30d131[_0x52fa4e(0x1af)](_0x52fa4e(0x173)))return;throw notificationError(_0x52fa4e(0x159),_0x52fa4e(0x196),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x13e64a,_0x3d34c7='type',_0x47e7bc='EMAIL'){const _0x29a93f=a197_0x2459a9,_0x3e501d=_0x13e64a[_0x29a93f(0x142)](_0x3d34c7)[_0x29a93f(0x166)]()||_0x47e7bc;if(!NOTIFICATION_CHANNEL_TYPES[_0x29a93f(0x19d)](_0x3e501d))throw CliErrors[_0x29a93f(0x15c)](_0x29a93f(0x19f)+_0x3d34c7+':\x20'+_0x3e501d,_0x29a93f(0x133)+NOTIFICATION_CHANNEL_TYPES[_0x29a93f(0x176)](',\x20')+'.');return _0x3e501d;}export function assertSingleNotificationSource(_0x1b390a){const _0xfcb980=a197_0x2459a9,_0x48e2f7=[],_0xf25e99=_0x1b390a[_0xfcb980(0x142)](_0xfcb980(0x14b))[_0xfcb980(0x166)]();if(_0xf25e99)_0x48e2f7[_0xfcb980(0x144)]({'kind':_0xfcb980(0x14b),'path':_0xf25e99});if(_0x1b390a[_0xfcb980(0x1af)](_0xfcb980(0x13c)))_0x48e2f7[_0xfcb980(0x144)]({'kind':_0xfcb980(0x13c)});const _0x3d6c82=_0x1b390a[_0xfcb980(0x142)]('from-env')[_0xfcb980(0x166)]();if(_0x3d6c82)_0x48e2f7[_0xfcb980(0x144)]({'kind':_0xfcb980(0x145),'name':_0x3d6c82});if(_0x48e2f7[_0xfcb980(0x1a6)]===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0xfcb980(0x179));if(_0x48e2f7[_0xfcb980(0x1a6)]>0x1)throw CliErrors[_0xfcb980(0x15c)](_0xfcb980(0x14e),_0xfcb980(0x179));return _0x48e2f7[0x0];}export async function readNotificationDocument(_0x59818e,_0x319e0f){const _0x3aeb2f=a197_0x2459a9,_0x3388da=assertSingleNotificationSource(_0x59818e),_0x420eb7=_0x3388da[_0x3aeb2f(0x12f)]==='file'?_0x3aeb2f(0x15e)+_0x3388da[_0x3aeb2f(0x180)]:_0x3388da['kind']===_0x3aeb2f(0x145)?_0x3aeb2f(0x170)+_0x3388da[_0x3aeb2f(0x18b)]:_0x3aeb2f(0x13c);let _0x1d7d5d;try{if(_0x3388da[_0x3aeb2f(0x12f)]===_0x3aeb2f(0x14b))_0x1d7d5d=await readFile(_0x3388da[_0x3aeb2f(0x180)],_0x3aeb2f(0x134));else{if(_0x3388da[_0x3aeb2f(0x12f)]===_0x3aeb2f(0x145)){if(!(_0x3388da[_0x3aeb2f(0x18b)]in process.env))throw notificationError('notification_config_source_unavailable',_0x3aeb2f(0x138)+_0x3388da['name']);_0x1d7d5d=process.env[_0x3388da.name]??'';}else _0x1d7d5d=await readStdin();}}catch(_0x402153){if(_0x402153 instanceof CliError)throw _0x402153;throw notificationError(_0x3aeb2f(0x15b),_0x3aeb2f(0x187)+_0x420eb7+'.');}let _0x4cbc03;try{_0x4cbc03=JSON['parse'](_0x1d7d5d);}catch{throw notificationError(_0x3aeb2f(0x141),_0x3aeb2f(0x18a)+_0x420eb7+_0x3aeb2f(0x18e),_0x3aeb2f(0x155));}if(!isJsonObject(_0x4cbc03))throw notificationError(_0x3aeb2f(0x141),_0x3aeb2f(0x18a)+_0x420eb7+_0x3aeb2f(0x185));return validateNotificationDocument(_0x4cbc03,_0x319e0f);}export function projectNotificationListConfig(_0x309e86,_0x242d47){const _0xbadec=a197_0x2459a9;return{'id':typeof _0x309e86['id']==='number'?_0x309e86['id']:null,'configCode':requireResponseString(_0x309e86['configCode'],'configCode',_0x242d47),'configName':requireResponseString(_0x309e86['configName'],_0xbadec(0x146),_0x242d47),'channelType':requireResponseString(_0x309e86['channelType'],_0xbadec(0x192),_0x242d47),'description':normalizeNullableString(_0x309e86[_0xbadec(0x13a)]),'createTime':normalizeNullableString(_0x309e86[_0xbadec(0x135)]),'updateTime':normalizeNullableString(_0x309e86[_0xbadec(0x16e)])};}export function normalizeExactNotificationConfig(_0x40a69b,_0x232809,_0x428cbf){const _0x486cac=a197_0x2459a9;if(!Number[_0x486cac(0x169)](_0x40a69b['id'])||_0x40a69b['id']!==_0x232809)throw notificationError(_0x486cac(0x12e),_0x486cac(0x131)+_0x232809+'.');if(_0x40a69b[_0x486cac(0x12b)]!==_0x428cbf)throw notificationError(_0x486cac(0x12e),'Notification\x20config\x20'+_0x232809+_0x486cac(0x163));const _0x18fd4d=requireExactString(_0x40a69b[_0x486cac(0x146)],_0x486cac(0x146),_0x232809),_0x5ac874=requireExactString(_0x40a69b[_0x486cac(0x186)],'configCode',_0x232809),_0x46a387=requireExactString(_0x40a69b['channelType'],'channelType',_0x232809);if(!NOTIFICATION_CHANNEL_TYPES[_0x486cac(0x19d)](_0x46a387))throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x232809+_0x486cac(0x172));const _0x13d901=responseNullableString(_0x40a69b[_0x486cac(0x17c)],_0x486cac(0x17c),_0x232809),_0x20584b=responseNullableString(_0x40a69b[_0x486cac(0x13d)],_0x486cac(0x13d),_0x232809),_0x3952a2=responseNullableString(_0x40a69b['description'],_0x486cac(0x13a),_0x232809),_0x55cf06=responseNullableTimeout(_0x40a69b[_0x486cac(0x15d)],_0x486cac(0x15d),_0x232809),_0x146491=responseNullableTimeout(_0x40a69b['readTimeout'],_0x486cac(0x197),_0x232809);return{'id':_0x232809,'appCode':_0x428cbf,'configCode':_0x5ac874,'configName':_0x18fd4d,'channelType':_0x46a387,'endpointUrl':redactSensitive(_0x13d901),'channelConfig':redactSensitive(_0x20584b),'description':_0x3952a2,'connectTimeout':_0x55cf06,'readTimeout':_0x146491,'endpointUrlRaw':_0x13d901,'channelConfigRaw':_0x20584b};}export async function requireExactNotificationConfig(_0x13e64d,_0x4c2e2c,_0x16af93){const _0x264388=a197_0x2459a9;let _0x2716f9;try{_0x2716f9=await getNotificationChannelConfig(_0x4c2e2c,_0x13e64d);}catch{throw safeApiFailure(_0x16af93,_0x264388(0x12d),_0x264388(0x174)+_0x13e64d+_0x264388(0x149));}return normalizeExactNotificationConfig(_0x2716f9,_0x4c2e2c,_0x13e64d);}export function projectNotificationConfig(_0x267ee){const _0x3e61d5=a197_0x2459a9;return{'id':_0x267ee['id']??null,'appCode':_0x267ee[_0x3e61d5(0x12b)],'configCode':_0x267ee[_0x3e61d5(0x186)]??null,'configName':_0x267ee[_0x3e61d5(0x146)],'channelType':_0x267ee[_0x3e61d5(0x192)],'endpointUrl':redactSensitive(_0x267ee['endpointUrl']),'channelConfig':redactSensitive(_0x267ee[_0x3e61d5(0x13d)]),'description':_0x267ee[_0x3e61d5(0x13a)]??null,'connectTimeout':_0x267ee[_0x3e61d5(0x15d)]??null,'readTimeout':_0x267ee[_0x3e61d5(0x197)]??null};}function a197_0x2662(_0x28d855,_0x416f84){_0x28d855=_0x28d855-0x12a;const _0x193bd5=a197_0x193b();let _0x2662bb=_0x193bd5[_0x28d855];return _0x2662bb;}export function notificationSelector(_0x8a17b1){const _0x396467=a197_0x2459a9;return{'appCode':_0x8a17b1[_0x396467(0x12b)],'id':_0x8a17b1['id'],'configCode':_0x8a17b1[_0x396467(0x186)],'configName':_0x8a17b1[_0x396467(0x146)],'channelType':_0x8a17b1['channelType']};}export function createMutationInput(_0x35cf8a,_0x2e9c6d){const _0xebdfc2=a197_0x2459a9;return{'appCode':_0x35cf8a,'configName':_0x2e9c6d[_0xebdfc2(0x146)],'channelType':_0x2e9c6d[_0xebdfc2(0x192)],...hasOwn(_0x2e9c6d,_0xebdfc2(0x17c))?{'endpointUrl':_0x2e9c6d[_0xebdfc2(0x17c)]}:{},...hasOwn(_0x2e9c6d,_0xebdfc2(0x13d))?{'channelConfig':serializeChannelConfig(_0x2e9c6d[_0xebdfc2(0x13d)])}:{},...hasOwn(_0x2e9c6d,_0xebdfc2(0x13a))?{'description':_0x2e9c6d['description']}:{},...hasOwn(_0x2e9c6d,'connectTimeout')?{'connectTimeout':_0x2e9c6d[_0xebdfc2(0x15d)]}:{},...hasOwn(_0x2e9c6d,_0xebdfc2(0x197))?{'readTimeout':_0x2e9c6d[_0xebdfc2(0x197)]}:{}};}export function mergeUpdateInput(_0x9f9ea1,_0x273a28){const _0x4701c1=a197_0x2459a9;return{'id':_0x9f9ea1['id'],'appCode':_0x9f9ea1['appCode'],'configName':_0x273a28['configName']??_0x9f9ea1['configName'],'channelType':_0x273a28['channelType']??_0x9f9ea1[_0x4701c1(0x192)],'endpointUrl':hasOwn(_0x273a28,_0x4701c1(0x17c))?_0x273a28[_0x4701c1(0x17c)]:_0x9f9ea1[_0x4701c1(0x16c)],'channelConfig':hasOwn(_0x273a28,_0x4701c1(0x13d))?serializeChannelConfig(_0x273a28[_0x4701c1(0x13d)]):_0x9f9ea1[_0x4701c1(0x14d)],'description':hasOwn(_0x273a28,_0x4701c1(0x13a))?_0x273a28[_0x4701c1(0x13a)]:_0x9f9ea1[_0x4701c1(0x13a)],'connectTimeout':hasOwn(_0x273a28,_0x4701c1(0x15d))?_0x273a28[_0x4701c1(0x15d)]:_0x9f9ea1[_0x4701c1(0x15d)],'readTimeout':hasOwn(_0x273a28,_0x4701c1(0x197))?_0x273a28[_0x4701c1(0x197)]:_0x9f9ea1[_0x4701c1(0x197)]};}export function plannedUpdateProjection(_0x1d1623,_0x2e2165){const _0x2ba7d1=a197_0x2459a9;return projectNotificationConfig({'id':_0x1d1623['id'],'appCode':_0x1d1623[_0x2ba7d1(0x12b)],'configCode':_0x1d1623['configCode'],'configName':_0x2e2165[_0x2ba7d1(0x146)]??_0x1d1623['configName'],'channelType':_0x2e2165[_0x2ba7d1(0x192)]??_0x1d1623[_0x2ba7d1(0x192)],'endpointUrl':hasOwn(_0x2e2165,_0x2ba7d1(0x17c))?_0x2e2165[_0x2ba7d1(0x17c)]:_0x1d1623[_0x2ba7d1(0x16c)],'channelConfig':hasOwn(_0x2e2165,'channelConfig')?_0x2e2165[_0x2ba7d1(0x13d)]:_0x1d1623[_0x2ba7d1(0x14d)],'description':hasOwn(_0x2e2165,_0x2ba7d1(0x13a))?_0x2e2165['description']:_0x1d1623[_0x2ba7d1(0x13a)],'connectTimeout':hasOwn(_0x2e2165,_0x2ba7d1(0x15d))?_0x2e2165['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x1d1623[_0x2ba7d1(0x15d)],'readTimeout':hasOwn(_0x2e2165,_0x2ba7d1(0x197))?_0x2e2165[_0x2ba7d1(0x197)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x1d1623[_0x2ba7d1(0x197)]});}export function requestedSafeFieldsMatch(_0xe0ca2,_0x261f68,_0x39047d){const _0x3e9843=a197_0x2459a9,_0x181cc2=[],_0x5a2234=[],_0x6c942c=[];for(const _0x321119 of[_0x3e9843(0x146),_0x3e9843(0x192),_0x3e9843(0x13a)]){if(!hasOwn(_0x39047d,_0x321119))continue;_0x6c942c[_0x3e9843(0x144)](_0x321119),_0x181cc2['push'](_0x261f68[_0x321119]===_0x39047d[_0x321119]),_0x5a2234[_0x3e9843(0x144)](_0xe0ca2[_0x321119]!==_0x39047d[_0x321119]&&_0x261f68[_0x321119]===_0x39047d[_0x321119]);}for(const _0x594510 of[_0x3e9843(0x15d),_0x3e9843(0x197)]){if(!hasOwn(_0x39047d,_0x594510))continue;const _0x1018ff=_0x39047d[_0x594510]??(_0x594510==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x6c942c[_0x3e9843(0x144)](_0x594510),_0x181cc2['push'](_0x261f68[_0x594510]===_0x1018ff),_0x5a2234['push'](_0xe0ca2[_0x594510]!==_0x1018ff&&_0x261f68[_0x594510]===_0x1018ff);}return hasOwn(_0x39047d,_0x3e9843(0x17c))&&_0x39047d[_0x3e9843(0x17c)]===null&&(_0x6c942c[_0x3e9843(0x144)](_0x3e9843(0x13f)),_0x181cc2['push'](_0x261f68['endpointUrlRaw']===null||_0x261f68[_0x3e9843(0x16c)]===''),_0x5a2234[_0x3e9843(0x144)](_0xe0ca2[_0x3e9843(0x16c)]!==null&&_0xe0ca2['endpointUrlRaw']!==''&&(_0x261f68['endpointUrlRaw']===null||_0x261f68[_0x3e9843(0x16c)]===''))),{'allMatch':_0x181cc2[_0x3e9843(0x17f)](Boolean),'provesChange':_0x5a2234[_0x3e9843(0x199)](Boolean),'verifiedFields':_0x6c942c};}export function validateNotificationDeleteReadback(_0x5f04d5,_0x1aa4dd,_0x363e08){const _0x408062=a197_0x2459a9;for(const [_0x533b76,_0x368163]of _0x5f04d5[_0x408062(0x18d)]()){if(!Number[_0x408062(0x169)](_0x368163['id'])||_0x368163['id']<=0x0)throw notificationError(_0x408062(0x12e),_0x408062(0x158)+(_0x533b76+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x368163['appCode']!==_0x1aa4dd)throw notificationError(_0x408062(0x12e),_0x408062(0x158)+(_0x533b76+0x1)+_0x408062(0x181));if(_0x368163['channelType']!==_0x363e08)throw notificationError(_0x408062(0x12e),_0x408062(0x158)+(_0x533b76+0x1)+_0x408062(0x164));}}export function safeApiFailure(_0x4ea749,_0x5e663e,_0x341ce8){const _0x9918c2=a197_0x2459a9;return notificationError(_0x9918c2(0x156)+_0x4ea749+'_'+(_0x5e663e===_0x9918c2(0x165)?_0x9918c2(0x162):_0x5e663e+_0x9918c2(0x137)),_0x9918c2(0x183)+_0x4ea749+'\x20'+_0x5e663e+_0x9918c2(0x1a0),_0x341ce8);}export function notificationLookupCommand(_0x44a575,_0x1c1534){const _0x51ac2c=a197_0x2459a9;return _0x51ac2c(0x19e)+_0x44a575+_0x51ac2c(0x16b)+_0x1c1534+_0x51ac2c(0x17a);}function validateNotificationDocument(_0x4cf474,_0x1acf40){const _0x33ca41=a197_0x2459a9;for(const _0x3d3c5d of Object[_0x33ca41(0x1aa)](_0x4cf474)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x3d3c5d))throw notificationError(_0x33ca41(0x175),_0x33ca41(0x148)+_0x3d3c5d+_0x33ca41(0x16a));if(!ALLOWED_INPUT_FIELDS['has'](_0x3d3c5d))throw notificationError(_0x33ca41(0x19c),_0x33ca41(0x184)+_0x3d3c5d+'\x22.');}if(_0x1acf40===_0x33ca41(0x14a)&&Object[_0x33ca41(0x1aa)](_0x4cf474)[_0x33ca41(0x1a6)]===0x0)throw notificationError('notification_config_update_empty',_0x33ca41(0x130));const _0x53f59c={};if(hasOwn(_0x4cf474,_0x33ca41(0x146)))_0x53f59c[_0x33ca41(0x146)]=validateRequiredString(_0x4cf474[_0x33ca41(0x146)],_0x33ca41(0x146),0x80);else{if(_0x1acf40===_0x33ca41(0x195))throw notificationError(_0x33ca41(0x190),'Create\x20JSON\x20requires\x20field\x20'+_0x33ca41(0x140));}if(hasOwn(_0x4cf474,'channelType')){if(typeof _0x4cf474[_0x33ca41(0x192)]!==_0x33ca41(0x16d))throw invalidFieldType(_0x33ca41(0x192),_0x33ca41(0x188));const _0x3b1f7d=_0x4cf474['channelType'][_0x33ca41(0x166)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x3b1f7d))throw notificationError(_0x33ca41(0x168),_0x33ca41(0x1ab),_0x33ca41(0x133)+NOTIFICATION_CHANNEL_TYPES[_0x33ca41(0x176)](',\x20')+'.');_0x53f59c['channelType']=_0x3b1f7d;}else{if(_0x1acf40===_0x33ca41(0x195))throw notificationError('notification_config_field_required',_0x33ca41(0x18f)+'\x22channelType\x22.');}for(const [_0x31fb80,_0x4f540f]of[['endpointUrl',0x200],[_0x33ca41(0x13a),0x100]]){if(!hasOwn(_0x4cf474,_0x31fb80))continue;const _0x4d359f=_0x4cf474[_0x31fb80];if(_0x4d359f!==null&&typeof _0x4d359f!==_0x33ca41(0x16d))throw invalidFieldType(_0x31fb80,'a\x20string\x20or\x20null');if(typeof _0x4d359f===_0x33ca41(0x16d)&&_0x4d359f['length']>_0x4f540f)throw notificationError(_0x33ca41(0x168),_0x33ca41(0x148)+_0x31fb80+_0x33ca41(0x1a5)+_0x4f540f+_0x33ca41(0x1ad));_0x53f59c[_0x31fb80]=_0x4d359f;}if(hasOwn(_0x4cf474,'channelConfig')){const _0x51d966=_0x4cf474[_0x33ca41(0x13d)];if(_0x51d966===null&&_0x1acf40===_0x33ca41(0x195))throw invalidFieldType(_0x33ca41(0x13d),'a\x20JSON\x20object');if(_0x51d966!==null&&!isJsonObject(_0x51d966))throw invalidFieldType(_0x33ca41(0x13d),_0x1acf40==='update'?'a\x20JSON\x20object\x20or\x20null':_0x33ca41(0x13e));_0x51d966!==null&&validateChannelConfigFields(_0x53f59c[_0x33ca41(0x192)],_0x51d966),_0x53f59c[_0x33ca41(0x13d)]=_0x51d966;}for(const _0x261523 of['connectTimeout',_0x33ca41(0x197)]){if(!hasOwn(_0x4cf474,_0x261523))continue;const _0x24ea88=_0x4cf474[_0x261523];if(_0x24ea88!==null&&(!Number['isSafeInteger'](_0x24ea88)||_0x24ea88<0x0))throw notificationError(_0x33ca41(0x168),'Notification\x20JSON\x20field\x20\x22'+_0x261523+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x53f59c[_0x261523]=_0x24ea88;}return _0x53f59c;}function validateRequiredString(_0x48e803,_0x11e0d9,_0x3aa0c5){const _0x5789b3=a197_0x2459a9;if(typeof _0x48e803!==_0x5789b3(0x16d))throw invalidFieldType(_0x11e0d9,_0x5789b3(0x1a2));const _0x216e97=_0x48e803['trim']();if(!_0x216e97)throw notificationError(_0x5789b3(0x168),_0x5789b3(0x148)+_0x11e0d9+_0x5789b3(0x1a1));if(_0x216e97[_0x5789b3(0x1a6)]>_0x3aa0c5)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x11e0d9+_0x5789b3(0x1a5)+_0x3aa0c5+'\x20characters.');return _0x216e97;}function validateChannelConfigFields(_0x1de3f8,_0x2cfaec){const _0x6fa048=a197_0x2459a9;if(hasOwn(_0x2cfaec,_0x6fa048(0x12a)))throw forbiddenChannelConfigField(_0x6fa048(0x12a));if(_0x1de3f8===_0x6fa048(0x193))for(const _0x5a2a5d of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x2cfaec,_0x5a2a5d))throw forbiddenChannelConfigField(_0x5a2a5d);}}function forbiddenChannelConfigField(_0x3f6472){const _0x30afeb=a197_0x2459a9;return notificationError(_0x30afeb(0x1a9),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x3f6472+_0x30afeb(0x189));}function invalidFieldType(_0x5a77ed,_0xff4d80){const _0x40d32a=a197_0x2459a9;return notificationError(_0x40d32a(0x168),_0x40d32a(0x148)+_0x5a77ed+_0x40d32a(0x161)+_0xff4d80+'.');}function serializeChannelConfig(_0x66c6b0){const _0x2c8358=a197_0x2459a9;return _0x66c6b0===null||_0x66c6b0===undefined?null:JSON[_0x2c8358(0x1a4)](_0x66c6b0);}function redactSensitive(_0x498d76){return _0x498d76===null||_0x498d76===undefined||_0x498d76===''?null:'<redacted>';}function requireResponseString(_0x4f5e7d,_0x4c128d,_0x1f1eea){const _0x2628f3=a197_0x2459a9;if(typeof _0x4f5e7d!==_0x2628f3(0x16d)||_0x4f5e7d[_0x2628f3(0x166)]()==='')throw CliErrors['apiError'](_0x2628f3(0x147),_0x2628f3(0x171)+(_0x1f1eea+0x1)+_0x2628f3(0x14f)+_0x4c128d+'\x22.');return _0x4f5e7d[_0x2628f3(0x166)]();}function requireExactString(_0x47ea78,_0x236ec1,_0x4f1644){const _0x29090e=a197_0x2459a9;if(typeof _0x47ea78!==_0x29090e(0x16d)||_0x47ea78['trim']()==='')throw notificationError(_0x29090e(0x12e),_0x29090e(0x183)+_0x4f1644+_0x29090e(0x14f)+_0x236ec1+'\x22.');return _0x47ea78[_0x29090e(0x166)]();}function a197_0x193b(){const _0x25ac42=['env','configName','Invalid\x20notification\x20config\x20response.','Notification\x20JSON\x20field\x20\x22','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','update','file','1442694zJkRiM','channelConfigRaw','Notification\x20JSON\x20source\x20is\x20ambiguous.','\x20is\x20missing\x20required\x20field\x20\x22','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','replyTo','call','11WiPurI','num','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','notification_config_','1035DpmVTa','Notification\x20config\x20list\x20item\x20','notification_config_confirmation_required','recipients','notification_config_source_unavailable','validation','connectTimeout','file\x20','hasOwnProperty','525550TlskrS','\x22\x20must\x20be\x20','failed','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x20has\x20an\x20invalid\x20channelType.','mutation','trim','235AosAIu','notification_config_field_invalid','isSafeInteger','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','\x20--type\x20','endpointUrlRaw','string','updateTime','emailTargets','environment\x20variable\x20','Item\x20','\x20has\x20an\x20unsupported\x20channelType.','yes','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_field_forbidden','join','13800uJUbOq','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','\x20--format\x20compress','from-env','endpointUrl','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','number','every','path','\x20has\x20an\x20invalid\x20appCode.','803700cdtvie','Notification\x20config\x20','Unknown\x20notification\x20JSON\x20field\x20\x22','\x20must\x20be\x20an\x20object.','configCode','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','a\x20supported\x20string','\x22\x20is\x20forbidden.','Notification\x20JSON\x20from\x20','name','1775158qXERPz','entries','\x20is\x20invalid.','Create\x20JSON\x20requires\x20field\x20','notification_config_field_required','DINGTALK','channelType','EMAIL','isArray','create','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','readTimeout','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','some','dry-run','554hTbCQU','notification_config_field_unknown','includes','rabetbase\x20notification\x20config-list\x20--appcode\x20','Invalid\x20--','\x20failed.','\x22\x20must\x20be\x20a\x20non-empty\x20string.','a\x20non-empty\x20string','WECOM','stringify','\x22\x20cannot\x20exceed\x20','length','bccList','object','notification_config_channel_field_forbidden','keys','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','channelCode','\x20characters.','setEncoding','bool','messageTemplate','appCode','1781hIwsYK','preflight','notification_config_response_invalid','kind','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','ccList','Allowed\x20values:\x20','utf8','createTime','FEISHU','_unavailable','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','subjectPrefix','description','792IOHGjX','stdin','channelConfig','a\x20JSON\x20object','endpointUrl:null','\x22configName\x22.','notification_config_json_invalid','str','notification_config_id_invalid','push'];a197_0x193b=function(){return _0x25ac42;};return a197_0x193b();}function responseNullableString(_0x2242e8,_0x509240,_0x26f93e){const _0x4490bd=a197_0x2459a9;if(_0x2242e8===undefined||_0x2242e8===null)return null;if(typeof _0x2242e8!==_0x4490bd(0x16d))throw notificationError(_0x4490bd(0x12e),_0x4490bd(0x183)+_0x26f93e+'\x20has\x20invalid\x20field\x20\x22'+_0x509240+'\x22.');return _0x2242e8;}function responseNullableTimeout(_0x45dd00,_0x1e69f2,_0x263398){const _0x812174=a197_0x2459a9;if(_0x45dd00===undefined||_0x45dd00===null)return null;if(!Number[_0x812174(0x169)](_0x45dd00)||_0x45dd00<0x0)throw notificationError('notification_config_response_invalid',_0x812174(0x183)+_0x263398+'\x20has\x20invalid\x20field\x20\x22'+_0x1e69f2+'\x22.');return _0x45dd00;}function normalizeNullableString(_0x309f06){const _0x388ab9=a197_0x2459a9;return typeof _0x309f06===_0x388ab9(0x16d)?_0x309f06:null;}function isJsonObject(_0x5f1a26){const _0x4cc3d0=a197_0x2459a9;return _0x5f1a26!==null&&typeof _0x5f1a26===_0x4cc3d0(0x1a8)&&!Array[_0x4cc3d0(0x194)](_0x5f1a26);}function hasOwn(_0x54d143,_0x3a4671){const _0x12a42d=a197_0x2459a9;return Object['prototype'][_0x12a42d(0x15f)][_0x12a42d(0x152)](_0x54d143,_0x3a4671);}async function readStdin(){const _0x12b72b=a197_0x2459a9;let _0x42eb6f='';process['stdin'][_0x12b72b(0x1ae)]('utf8');for await(const _0xc03df0 of process['stdin'])_0x42eb6f+=_0xc03df0;return _0x42eb6f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a198_0x30e6(_0x23455b,_0x5557fa){_0x23455b=_0x23455b-0x1b9;const _0x1c0a2b=a198_0x1c0a();let _0x30e6dc=_0x1c0a2b[_0x23455b];return _0x30e6dc;}const a198_0x45022d=a198_0x30e6;(function(_0x458e52,_0x9af763){const _0x394e50=a198_0x30e6,_0x25fe30=_0x458e52();while(!![]){try{const _0x6286b3=-parseInt(_0x394e50(0x1d6))/0x1+parseInt(_0x394e50(0x1e1))/0x2+parseInt(_0x394e50(0x1d3))/0x3+-parseInt(_0x394e50(0x1ca))/0x4*(parseInt(_0x394e50(0x1e4))/0x5)+-parseInt(_0x394e50(0x1e3))/0x6+parseInt(_0x394e50(0x1c8))/0x7*(parseInt(_0x394e50(0x1d7))/0x8)+parseInt(_0x394e50(0x1c0))/0x9*(parseInt(_0x394e50(0x1d4))/0xa);if(_0x6286b3===_0x9af763)break;else _0x25fe30['push'](_0x25fe30['shift']());}catch(_0x1d0207){_0x25fe30['push'](_0x25fe30['shift']());}}}(a198_0x1c0a,0x4dd74));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a198_0x45022d(0x1ed),a198_0x45022d(0x1ba),a198_0x45022d(0x1d0),a198_0x45022d(0x1db)],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x45022d(0x1dc),'general':'General','form':a198_0x45022d(0x1b9),'idCard':a198_0x45022d(0x1ea)},SCENE_FLAG={'name':'scene','type':a198_0x45022d(0x1e9),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x45022d(0x1d5)},IMAGE_FILE_FLAG={'name':a198_0x45022d(0x1e7),'type':a198_0x45022d(0x1e9),'description':a198_0x45022d(0x1c1)},IMAGE_URL_FLAG={'name':a198_0x45022d(0x1cb),'type':'string','description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x2c55a2){const _0x2a02f7=a198_0x45022d,_0x339944=_0x2c55a2[_0x2a02f7(0x1ec)]()[_0x2a02f7(0x1df)]();if(_0x339944===_0x2a02f7(0x1c6))return _0x2a02f7(0x1db);if(_0x339944===_0x2a02f7(0x1ed)||_0x339944==='general'||_0x339944===_0x2a02f7(0x1d0))return _0x339944;throw CliErrors['validation'](_0x2a02f7(0x1c9)+_0x2c55a2+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x186f98){const _0x4653f3=a198_0x45022d,_0x335626=_0x186f98['str'](_0x4653f3(0x1e7))[_0x4653f3(0x1ec)](),_0x186778=_0x186f98[_0x4653f3(0x1ee)](_0x4653f3(0x1cb))[_0x4653f3(0x1ec)]();return{'imageFile':_0x335626,'imageUrl':_0x186778,'count':[_0x335626,_0x186778]['filter'](Boolean)['length']};}function validateInputSelection(_0x77a7f){const _0x42f769=a198_0x45022d,_0x18440e=selectedInputs(_0x77a7f);if(_0x18440e[_0x42f769(0x1d1)]!==0x1)throw CliErrors['validation'](_0x42f769(0x1e5));return _0x18440e;}function withScene(_0x272f84,_0x15c052,_0x3d7832){const _0x1b617b=a198_0x45022d;return{..._0x272f84,'scene':_0x15c052,..._0x3d7832?{'sourceFile':{'fileName':_0x3d7832[_0x1b617b(0x1dd)],'filePath':_0x3d7832[_0x1b617b(0x1c4)]}}:{}};}function a198_0x1c0a(){const _0x3eb872=['idCard','Invoice','fileName','/smartapi/ocr/recognize-text?','toLowerCase','\x20OCR\x20from\x20URL','500168TxuEmV','GET','3691932ktSkKL','25CvFgZx','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','imageUrl','image-file','recognize','string','IdCard','apiError','trim','invoice','str','Table','general','File\x20upload\x20response\x20missing\x20filePath.','ocr','Preview:\x20recognize\x20','fileUrl','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','7205229iBnuKW','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','appCode','read','filePath','\x20OCR','idcard','toString','812cRdEhU','Unsupported\x20OCR\x20scene:\x20','466724uaGqxg','image-url','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','/smartapi/ocr/recognize-text','imageFile','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','form','count','path','193557lLGDba','10HMGtMR','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','41437uYVKto','30608IYmofA','/smartapi/common/uploadFile','POST','scene'];a198_0x1c0a=function(){return _0x3eb872;};return a198_0x1c0a();}const ocrRecognize={'service':a198_0x45022d(0x1bc),'command':a198_0x45022d(0x1e8),'description':a198_0x45022d(0x1cf),'risk':a198_0x45022d(0x1c3),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x57d47a){const _0x4b9538=a198_0x45022d,_0x5b5e6d=normalizeScene(_0x57d47a[_0x4b9538(0x1ee)]('scene')),_0x2394d0=SCENE_TO_LEGACY_TYPE[_0x5b5e6d],_0x1d8417=validateInputSelection(_0x57d47a);if(_0x1d8417['imageUrl']){const _0x27d142=new URLSearchParams({'url':_0x1d8417[_0x4b9538(0x1e6)],'type':_0x2394d0,'appCode':_0x57d47a[_0x4b9538(0x1c2)]});return{'method':_0x4b9538(0x1e2),'url':_0x4b9538(0x1de)+_0x27d142[_0x4b9538(0x1c7)](),'description':_0x4b9538(0x1bd)+_0x5b5e6d+_0x4b9538(0x1e0)};}const _0x3bd34d=requireDevelopmentUploadFile(_0x1d8417[_0x4b9538(0x1ce)],_0x4b9538(0x1e7));return{'method':_0x4b9538(0x1d9),'url':_0x4b9538(0x1d8),'body':{'steps':[{'method':_0x4b9538(0x1d9),'url':_0x4b9538(0x1d8),'body':{'appCode':_0x57d47a['appCode'],'multipart':{'file':_0x3bd34d}}},{'method':_0x4b9538(0x1d9),'url':'/smartapi/common/queryFileUrl','body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x4b9538(0x1e2),'url':_0x4b9538(0x1cd),'query':{'appCode':_0x57d47a['appCode'],'url':_0x4b9538(0x1bf),'type':_0x2394d0}}]},'description':_0x4b9538(0x1cc)+_0x5b5e6d+_0x4b9538(0x1c5)};},async 'execute'(_0x520067){const _0x3fd673=a198_0x45022d,_0x2f493c=normalizeScene(_0x520067[_0x3fd673(0x1ee)](_0x3fd673(0x1da))),_0x3ecf20=SCENE_TO_LEGACY_TYPE[_0x2f493c],_0x3182fb=validateInputSelection(_0x520067);if(_0x3182fb[_0x3fd673(0x1e6)]){const _0x1e19ee=await recognizeDevelopmentOcr(_0x520067[_0x3fd673(0x1c2)],{'url':_0x3182fb['imageUrl'],'type':_0x3ecf20});return{'ok':!![],'data':withScene(_0x1e19ee,_0x2f493c)};}const _0x3f79fb=requireDevelopmentUploadFile(_0x3182fb[_0x3fd673(0x1ce)],_0x3fd673(0x1e7)),_0x3e579f=await uploadDevelopmentFile(_0x520067[_0x3fd673(0x1c2)],_0x3f79fb[_0x3fd673(0x1d2)]);if(!_0x3e579f[_0x3fd673(0x1c4)])throw CliErrors[_0x3fd673(0x1eb)](_0x3fd673(0x1bb));const _0x24720c=await queryDevelopmentFileUrl(_0x3e579f[_0x3fd673(0x1c4)],{'download':![]});if(!_0x24720c[_0x3fd673(0x1be)])throw CliErrors[_0x3fd673(0x1eb)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x11491c=await recognizeDevelopmentOcr(_0x520067[_0x3fd673(0x1c2)],{'url':_0x24720c['fileUrl'],'type':_0x3ecf20});return{'ok':!![],'data':withScene(_0x11491c,_0x2f493c,_0x3e579f)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a199_0x5249b5=a199_0x18bc;(function(_0x11ab35,_0x5b45b4){const _0x1e23f9=a199_0x18bc,_0x5dd647=_0x11ab35();while(!![]){try{const _0x198223=parseInt(_0x1e23f9(0xab))/0x1*(parseInt(_0x1e23f9(0xb7))/0x2)+parseInt(_0x1e23f9(0xce))/0x3+parseInt(_0x1e23f9(0xa9))/0x4+-parseInt(_0x1e23f9(0xd2))/0x5*(parseInt(_0x1e23f9(0xcb))/0x6)+parseInt(_0x1e23f9(0x97))/0x7*(parseInt(_0x1e23f9(0xa0))/0x8)+-parseInt(_0x1e23f9(0xb9))/0x9*(parseInt(_0x1e23f9(0x93))/0xa)+-parseInt(_0x1e23f9(0x9c))/0xb;if(_0x198223===_0x5b45b4)break;else _0x5dd647['push'](_0x5dd647['shift']());}catch(_0x36b91d){_0x5dd647['push'](_0x5dd647['shift']());}}}(a199_0x213e,0x51f2b));import{readFile}from'node:fs/promises';function a199_0x213e(){const _0x1dff3c=['Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','3814RVTfme','now','parent-menu-id','length','validation','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','values','DASHBOARD','pageName','trim','str','BLANK','90dJudHJ','number','4087107wwuYTG','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','page-content','\x20and\x20its\x20menu\x20entry.','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','Custom_page_','menuId','Created\x20Custom\x20Page\x20','object','page\x20create\x20does\x20not\x20accept\x20--page-type.','isInteger','CUSTOM','.json','Would\x20create\x20Custom\x20Page\x20','page','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','pageName\x20cannot\x20exceed\x20100\x20characters.','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','6ibYwzl','Invalid\x20Custom\x20Page\x20pattern:\x20','page-type','1771095Txcpwa','appCode','page.create','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','2179930IFokNR','toLowerCase','isArray','parse','pageId','compress','string','files','menuPath','utf8','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','Custom\x20Page\x20pattern\x20not\x20found:\x20','10aLFzBf','some','stringify','ONEPAGE','3954153OcCCaj','/smartapi/webcode/page/create','write','version','keys','4543715kwyHdm','num','page-pattern','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','8pngVpY','includes','parentMenuId','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','create','name','apiError','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','page-dir','1247836xbcHbY'];a199_0x213e=function(){return _0x1dff3c;};return a199_0x213e();}import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';function a199_0x18bc(_0x11af46,_0x4904b7){_0x11af46=_0x11af46-0x88;const _0x213edc=a199_0x213e();let _0x18bcd4=_0x213edc[_0x11af46];return _0x18bcd4;}import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a199_0x5249b5(0xb6),a199_0x5249b5(0x96),a199_0x5249b5(0xb2)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),'../../../templates/custom-pages');export const pageCreate={'service':a199_0x5249b5(0xc7),'command':a199_0x5249b5(0xa4),'description':a199_0x5249b5(0x91),'risk':a199_0x5249b5(0x99),'defaultOutputFormat':a199_0x5249b5(0x8c),'structuredErrors':!![],'rejectedFlags':[{'name':a199_0x5249b5(0xcd),'message':a199_0x5249b5(0xc2),'hint':a199_0x5249b5(0xa7)},{'name':a199_0x5249b5(0xbb),'message':'page\x20create\x20no\x20longer\x20accepts\x20--page-content.','hint':a199_0x5249b5(0xaa)}],'flags':[{'name':a199_0x5249b5(0xa5),'type':'string','description':a199_0x5249b5(0xc8)},{'name':'parent-menu-id','type':a199_0x5249b5(0xb8),'description':a199_0x5249b5(0xba)},{'name':a199_0x5249b5(0x9e),'type':'string','description':a199_0x5249b5(0xa3),'enum':CUSTOM_PAGE_PATTERNS},{'name':a199_0x5249b5(0xa8),'type':a199_0x5249b5(0x8d),'description':'Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)'},APPCODE_FLAG],async 'validate'(_0x171808){await readValidatedPageSource(_0x171808);},async 'dryRun'(_0x55bd13){const _0x47b975=a199_0x5249b5,_0x3eb1ba=readInput(_0x55bd13,await readValidatedPageSource(_0x55bd13));return{'method':'POST','url':_0x47b975(0x98),'body':{'appCode':_0x3eb1ba[_0x47b975(0xcf)],'pageName':_0x3eb1ba[_0x47b975(0xb3)],..._0x3eb1ba[_0x47b975(0xa2)]!=null?{'parentMenuId':_0x3eb1ba[_0x47b975(0xa2)]}:{},'createMenu':_0x3eb1ba['createMenu'],'codeContent':_0x3eb1ba[_0x47b975(0x8e)]},'description':_0x47b975(0xc6)+JSON[_0x47b975(0x95)](_0x3eb1ba['pageName'])+_0x47b975(0xbc)};},async 'execute'(_0x2669d0){const _0x19341b=a199_0x5249b5,_0x49b640=readInput(_0x2669d0,await readValidatedPageSource(_0x2669d0)),_0x2204ba=await createCustomPage(_0x49b640);if(!Number['isInteger'](_0x2204ba['pageId'])||_0x2204ba[_0x19341b(0x8b)]<=0x0)throw CliErrors[_0x19341b(0xa6)](_0x19341b(0xd1));const _0x3cb389=buildCustomPageDevelopmentUrl(_0x49b640[_0x19341b(0xcf)],_0x2204ba[_0x19341b(0x8f)]),_0x4405b2=buildCustomPageEditUrl(_0x49b640[_0x19341b(0xcf)],_0x2204ba['pageId']);return{'ok':!![],'data':{'operation':_0x19341b(0xd0),'pageType':_0x19341b(0xc4),'pagePattern':readPagePattern(_0x2669d0),'selector':{'appCode':_0x49b640['appCode'],'pageName':_0x49b640[_0x19341b(0xb3)]},'before':null,'after':{'pageId':_0x2204ba[_0x19341b(0x8b)],'pageName':_0x2204ba[_0x19341b(0xb3)],'appCode':_0x2204ba[_0x19341b(0xcf)],'version':_0x2204ba[_0x19341b(0x9a)],'menuId':_0x2204ba[_0x19341b(0xbf)],'menuPath':_0x2204ba[_0x19341b(0x8f)],'files':_0x2204ba[_0x19341b(0x8e)]??Object['keys'](_0x49b640['files'])},'dryRun':![],'request':_0x49b640,..._0x3cb389?{'pageUrl':_0x3cb389}:{},..._0x4405b2?{'editPageUrl':_0x4405b2}:{},'warnings':_0x3cb389?[]:[_0x19341b(0x9f)]},'message':_0x19341b(0xc0)+_0x2204ba[_0x19341b(0x8b)]+'.'};}};function readPagePattern(_0x26a9da){const _0x4bb08a=a199_0x5249b5,_0xedaf4=_0x26a9da['str'](_0x4bb08a(0x9e))['trim'](),_0x599488=_0x26a9da['str'](_0x4bb08a(0xa8))[_0x4bb08a(0xb4)]();if(_0xedaf4&&_0x599488)throw CliErrors[_0x4bb08a(0xaf)](_0x4bb08a(0xbd));if(_0x599488)return null;if(!_0xedaf4)throw CliErrors[_0x4bb08a(0xaf)]('Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.');if(!CUSTOM_PAGE_PATTERNS[_0x4bb08a(0xa1)](_0xedaf4))throw CliErrors[_0x4bb08a(0xaf)](_0x4bb08a(0xb0));return _0xedaf4;}async function readPageSource(_0x1757cc){const _0x4b7cfd=a199_0x5249b5,_0x372eb0=_0x1757cc[_0x4b7cfd(0xb5)](_0x4b7cfd(0xa8))['trim'](),_0x110f3f=readPagePattern(_0x1757cc);if(_0x110f3f===null){const _0x1f5f53=await readCustomPageDirectory(_0x372eb0);if(Object[_0x4b7cfd(0x9b)](_0x1f5f53)[_0x4b7cfd(0xae)]===0x0)throw CliErrors[_0x4b7cfd(0xaf)]('--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.');return _0x1f5f53;}let _0x178ebf;try{_0x178ebf=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x110f3f[_0x4b7cfd(0x88)]()+_0x4b7cfd(0xc5)),_0x4b7cfd(0x90));}catch{throw CliErrors[_0x4b7cfd(0xaf)](_0x4b7cfd(0x92)+_0x110f3f+'.');}let _0x4dc514;try{_0x4dc514=JSON[_0x4b7cfd(0x8a)](_0x178ebf);}catch{throw CliErrors['validation'](_0x4b7cfd(0xcc)+_0x110f3f+'.');}if(!_0x4dc514||typeof _0x4dc514!==_0x4b7cfd(0xc1)||Array[_0x4b7cfd(0x89)](_0x4dc514)||Object[_0x4b7cfd(0xb1)](_0x4dc514)[_0x4b7cfd(0x94)](_0x17097a=>typeof _0x17097a!==_0x4b7cfd(0x8d)))throw CliErrors[_0x4b7cfd(0xaf)](_0x4b7cfd(0xcc)+_0x110f3f+'.');return _0x4dc514;}async function readValidatedPageSource(_0x38056a){const _0x3cbf8b=await readPageSource(_0x38056a);return await validateCustomPageContent(_0x3cbf8b),_0x3cbf8b;}function readInput(_0xe71895,_0x37204a){const _0x4ba1ca=a199_0x5249b5,_0x35115e=_0xe71895[_0x4ba1ca(0xb5)](_0x4ba1ca(0xa5))['trim']()||_0x4ba1ca(0xbe)+Date[_0x4ba1ca(0xac)]();if(_0x35115e[_0x4ba1ca(0xae)]>0x64)throw CliErrors[_0x4ba1ca(0xaf)](_0x4ba1ca(0xc9));const _0x35be99=_0xe71895[_0x4ba1ca(0x9d)](_0x4ba1ca(0xad),NaN),_0x1a9a8d=!Number['isNaN'](_0x35be99);if(_0x1a9a8d&&(!Number[_0x4ba1ca(0xc3)](_0x35be99)||_0x35be99<=0x0))throw CliErrors[_0x4ba1ca(0xaf)](_0x4ba1ca(0xca));return{'appCode':_0xe71895[_0x4ba1ca(0xcf)],'pageName':_0x35115e,..._0x1a9a8d?{'parentMenuId':_0x35be99}:{},'createMenu':!![],'files':_0x37204a};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a200_0x3316b9=a200_0x2ff7;function a200_0x2de1(){const _0x1d3fe0=['150FXsXlP','str','isNaN','Custom\x20Page\x20ID','6340293AswUdc','getTime','read','20712445fYcrYl','compress','1703hsfFwR','join','3068884cgpVnR','108515AbIRYM','362RKLEpm','cookie','22lVbbBS','getSeconds','getFullYear','10UDqrzX','appCode','getHours','2390700XvZqAv','page','padStart','240472jGeBXE','Retrieved\x20Custom\x20Page\x20','8fByTvl','pageCode','trim','custom-detail','18WndKig'];a200_0x2de1=function(){return _0x1d3fe0;};return a200_0x2de1();}(function(_0x1a2c24,_0x158e70){const _0x34b18c=a200_0x2ff7,_0x2d723f=_0x1a2c24();while(!![]){try{const _0x17f653=-parseInt(_0x34b18c(0x112))/0x1*(parseInt(_0x34b18c(0x116))/0x2)+-parseInt(_0x34b18c(0x127))/0x3*(-parseInt(_0x34b18c(0x121))/0x4)+parseInt(_0x34b18c(0x115))/0x5*(-parseInt(_0x34b18c(0x128))/0x6)+parseInt(_0x34b18c(0x114))/0x7*(-parseInt(_0x34b18c(0x123))/0x8)+-parseInt(_0x34b18c(0x12c))/0x9*(parseInt(_0x34b18c(0x11b))/0xa)+parseInt(_0x34b18c(0x118))/0xb*(parseInt(_0x34b18c(0x11e))/0xc)+parseInt(_0x34b18c(0x12f))/0xd;if(_0x17f653===_0x158e70)break;else _0x2d723f['push'](_0x2d723f['shift']());}catch(_0x43b156){_0x2d723f['push'](_0x2d723f['shift']());}}}(a200_0x2de1,0x5793c));import{getCustomPageSource}from'../../../core/api-client.js';function a200_0x2ff7(_0x193735,_0x1ffa4d){_0x193735=_0x193735-0x111;const _0x2de140=a200_0x2de1();let _0x2ff7a9=_0x2de140[_0x193735];return _0x2ff7a9;}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a200_0x3316b9(0x11f),'command':a200_0x3316b9(0x126),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':a200_0x3316b9(0x12e),'defaultOutputFormat':a200_0x3316b9(0x111),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a200_0x3316b9(0x12b)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x528935){readCustomPageId(_0x528935);},async 'execute'(_0x194353){const _0x4e87b9=a200_0x3316b9,_0x5215f2=readCustomPageId(_0x194353),_0x5b18bd=await getCustomPageSource(_0x5215f2),{bundle:_0x227e4f,createTime:_0x416b66,updateTime:_0x4b75ec,..._0x3b7d78}=_0x5b18bd,_0x25bda0=_0x5b18bd['id']??_0x5215f2,_0x140f14=_0x5b18bd[_0x4e87b9(0x11c)]?.[_0x4e87b9(0x125)]()||_0x194353[_0x4e87b9(0x129)]('appcode')[_0x4e87b9(0x125)](),_0x1f7f4e=buildCustomPageRuntimeUrl(_0x140f14,_0x5b18bd[_0x4e87b9(0x124)]),_0x6d0b0a=buildCustomPageEditUrl(_0x140f14,_0x25bda0),_0x4a4247=await resolveCustomPageDevelopmentUrl(_0x140f14,_0x25bda0,_0x194353[_0x4e87b9(0x117)]);return{'ok':!![],'data':{..._0x3b7d78,..._0x1f7f4e?{'runtimePageUrl':_0x1f7f4e}:{},..._0x4a4247?{'pageUrl':_0x4a4247}:{},..._0x6d0b0a?{'editPageUrl':_0x6d0b0a}:{},..._0x416b66==null?{}:{'createTime':formatTime(_0x416b66)},..._0x4b75ec==null?{}:{'updateTime':formatTime(_0x4b75ec)}},'message':_0x4e87b9(0x122)+_0x5215f2+'.'};}};function formatTime(_0x15184a){const _0x24efc8=a200_0x3316b9,_0x40416b=new Date(_0x15184a);if(Number[_0x24efc8(0x12a)](_0x40416b[_0x24efc8(0x12d)]()))return String(_0x15184a);const _0x2e83ac=[_0x40416b[_0x24efc8(0x11a)](),String(_0x40416b['getMonth']()+0x1)[_0x24efc8(0x120)](0x2,'0'),String(_0x40416b['getDate']())['padStart'](0x2,'0')][_0x24efc8(0x113)]('-'),_0x25a87e=[String(_0x40416b[_0x24efc8(0x11d)]())[_0x24efc8(0x120)](0x2,'0'),String(_0x40416b['getMinutes']())[_0x24efc8(0x120)](0x2,'0'),String(_0x40416b[_0x24efc8(0x119)]())[_0x24efc8(0x120)](0x2,'0')]['join'](':');return _0x2e83ac+'\x20'+_0x25a87e;}
|