@lovrabet/rabetbase-cli 2.5.4-beta.4 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- 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.d.ts +2 -0
- package/lib/commands/app/detail.js +1 -0
- 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/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/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/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.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.d.ts +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +3 -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.d.ts +2 -0
- package/lib/commands/menu/shared/path.js +1 -0
- package/lib/commands/menu/shared/service.d.ts +6 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.d.ts +28 -0
- package/lib/commands/menu/shared/subapp-assets.js +1 -0
- package/lib/commands/menu/shared/sync-core.d.ts +2 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +14 -4
- 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.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-status.js +1 -0
- package/lib/commands/menu/subapp-assets-update.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-update.js +1 -0
- 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.d.ts +15 -0
- 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-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-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/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +21 -12
- package/skills/rabetbase/guides/backend-function.md +2 -7
- package/skills/rabetbase/guides/bff-creation-workflow.md +24 -23
- package/skills/rabetbase/guides/host-frontend-integration.md +62 -0
- package/skills/rabetbase/guides/independent-deployment.md +45 -0
- package/skills/rabetbase/guides/troubleshooting.md +9 -1
- package/skills/rabetbase/references/rabetbase-app-detail.md +31 -0
- package/skills/rabetbase/references/rabetbase-bff-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-push.md +2 -2
- package/skills/rabetbase/references/rabetbase-data-list-status.md +1 -0
- package/skills/rabetbase/references/rabetbase-deployment-sync-all.md +5 -1
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -7
- package/skills/rabetbase/references/rabetbase-menu-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-status.md +19 -0
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-update.md +27 -0
- package/skills/rabetbase/references/rabetbase-menu-sync.md +40 -14
- package/skills/rabetbase/references/rabetbase-page-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-generate-start.md +5 -3
- package/skills/rabetbase/references/rabetbase-page-generate-status.md +1 -0
- package/skills/rabetbase.manifest.json +8 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a175_0x2d7fee=a175_0x1e6c;(function(_0x328cbc,_0x2a416a){const _0x322030=a175_0x1e6c,_0x1b90a5=_0x328cbc();while(!![]){try{const _0x2006db=parseInt(_0x322030(0x169))/0x1*(-parseInt(_0x322030(0x14d))/0x2)+parseInt(_0x322030(0x177))/0x3+parseInt(_0x322030(0x161))/0x4+-parseInt(_0x322030(0x14a))/0x5*(parseInt(_0x322030(0x165))/0x6)+parseInt(_0x322030(0x17a))/0x7*(-parseInt(_0x322030(0x15e))/0x8)+parseInt(_0x322030(0x17d))/0x9+-parseInt(_0x322030(0x1a5))/0xa*(-parseInt(_0x322030(0x187))/0xb);if(_0x2006db===_0x2a416a)break;else _0x1b90a5['push'](_0x1b90a5['shift']());}catch(_0x1adfd9){_0x1b90a5['push'](_0x1b90a5['shift']());}}}(a175_0x2d05,0x2af81));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a175_0x1e6c(_0x23507a,_0x9de75b){_0x23507a=_0x23507a-0x142;const _0x2d05f6=a175_0x2d05();let _0x1e6cb1=_0x2d05f6[_0x23507a];return _0x1e6cb1;}import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';function a175_0x2d05(){const _0x2647e8=['boolean','before','high-risk-write','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','menu_expected_count_mismatch','\x20unchanged\x20menu(s).','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','7400RkqCRN','resourcesValid','menu_selector_ambiguous','295682tROEFf','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','split','expectVisible','menu_permission_denied','menuIds','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','update-menu-visibility','visibility-update','path','length','modelType','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','POST','url','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','Selected\x20','1125800hTLmNf','Response\x20was\x20lost\x20and\x20menu\x20','values','11460hqNQlM','childrenCount','targets','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','684hhMcnt','\x20must\x20be\x20true\x20or\x20false.','update\x20menu\x20visibility','join','1SWTRHk','label','\x20changed\x20unexpectedly.','has','expectedCount','parentId','trim','\x20updated,\x20','map','true','flagMissing','num','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','534012fFAslR','type','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','14UZrwvE','datasetId','menu-ids','2149398qhQuvj','verification','pageType','Updated\x20visibility\x20for\x20','\x20failed.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','hash','recovered','visible','\x20skipped,\x20','33khemqi','get','isArray','isSafeInteger','expect-visible','Would\x20update\x20visibility\x20for\x20','false','\x20menu(s);\x20skipped\x20','expected-count','\x20visibility\x20update\x20could\x20not\x20be\x20verified','byId','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','failed','menus','Response\x20was\x20lost\x20for\x20menu\x20','plan','menu','Menu\x20path\x20selector\x20not\x20found:\x20','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','code','/smartapi/menu/update','plannedActions','depth','update\x20visibility\x20for','requestedVisible','string','datasetCode','appCode','push','str','1181070AWHVLx','paths','Menu\x20','filter','\x20menu(s);\x20skip\x20','rabetbase\x20menu\x20list\x20--format\x20compress','message','cookie','update','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','Menu\x20visibility\x20update\x20completed:\x20','validation','pageId','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','stringify','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','sort','beforeById','warnings','menu_selector_not_found','menu_verification_failed','resources','childrenIds'];a175_0x2d05=function(){return _0x2647e8;};return a175_0x2d05();}const BACKEND=[{'method':'POST','path':a175_0x2d7fee(0x19b)}];export const menuVisibilityUpdate={'service':a175_0x2d7fee(0x197),'command':'visibility-update','description':a175_0x2d7fee(0x146),'risk':a175_0x2d7fee(0x145),'structuredErrors':!![],'flags':[{'name':a175_0x2d7fee(0x17c),'type':a175_0x2d7fee(0x1a0),'description':a175_0x2d7fee(0x199)},{'name':a175_0x2d7fee(0x1a6),'type':a175_0x2d7fee(0x1a0),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a175_0x2d7fee(0x185),'type':a175_0x2d7fee(0x143),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':'expect-visible','type':a175_0x2d7fee(0x143),'description':a175_0x2d7fee(0x1b2)},{'name':a175_0x2d7fee(0x18f),'type':'number','description':a175_0x2d7fee(0x179)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xb12231){parseInput(_0xb12231),requireExplicitYes(_0xb12231);},async 'dryRun'(_0x245635){const _0x23413e=a175_0x2d7fee,_0x13992d=await buildPlan(_0x245635,!![]),_0x338dbf=_0x13992d[_0x23413e(0x196)]['plannedActions']?.['length']??0x0,_0x2f89d0=_0x13992d[_0x23413e(0x196)]['targets'][_0x23413e(0x157)]-_0x338dbf;return menuDryRunResult(_0x13992d['plan'],{'method':'POST','url':_0x23413e(0x19b),'body':{'updates':_0x13992d[_0x23413e(0x196)][_0x23413e(0x19c)]?.[_0x23413e(0x171)](_0x2e37b7=>_0x2e37b7['body'])??[]},'description':_0x23413e(0x18c)+_0x338dbf+_0x23413e(0x1a9)+_0x2f89d0+_0x23413e(0x148)});},async 'execute'(_0x7c4d31){const _0x1311f4=a175_0x2d7fee;requireExplicitYes(_0x7c4d31);const _0x582e50=await buildPlan(_0x7c4d31,![]);await recheckMutationSnapshot(_0x7c4d31,_0x582e50[_0x1311f4(0x196)],'update\x20menu\x20visibility');const _0x3c6024=[],_0x52adcf=[],_0x4604d9=[];for(const _0x53f6cb of _0x582e50[_0x1311f4(0x196)]['targets']){if(_0x53f6cb[_0x1311f4(0x144)][_0x1311f4(0x185)]===_0x582e50[_0x1311f4(0x196)][_0x1311f4(0x19f)]){_0x3c6024[_0x1311f4(0x1a3)]({'id':_0x53f6cb['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x7c4d31[_0x1311f4(0x1a2)],_0x7c4d31[_0x1311f4(0x1ac)],{'id':_0x53f6cb['id'],'visible':_0x582e50[_0x1311f4(0x196)][_0x1311f4(0x19f)]}),_0x3c6024[_0x1311f4(0x1a3)]({'id':_0x53f6cb['id'],'updated':!![],'skipped':![]});}catch(_0x50d1af){const _0x237b54=mapMenuApiError(_0x50d1af,_0x1311f4(0x19e),_0x53f6cb['id']);if(isMenuResponseLoss(_0x50d1af)&&_0x237b54[_0x1311f4(0x19a)]!==_0x1311f4(0x151)){_0x4604d9[_0x1311f4(0x1a3)](_0x53f6cb['id']);continue;}_0x52adcf[_0x1311f4(0x1a3)]({'id':_0x53f6cb['id'],'stage':_0x1311f4(0x1ad),'code':_0x237b54[_0x1311f4(0x19a)],'message':_0x237b54[_0x1311f4(0x1ab)]});}}let _0x55c994;try{_0x55c994=await fetchMenuSnapshot(_0x7c4d31[_0x1311f4(0x1a2)],_0x7c4d31['cookie']);}catch(_0x3d5ed0){const _0x2cab49=describeMenuErrorCause(_0x3d5ed0,'verify\x20menu\x20visibility\x20update'),_0x51785c=_0x4604d9[_0x1311f4(0x171)](_0x10407=>({'id':_0x10407,'stage':'update-recovery','code':_0x1311f4(0x1b9),'message':_0x1311f4(0x195)+_0x10407+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x5b51f3={'stage':'verification','code':_0x1311f4(0x1b9),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x582e50[_0x1311f4(0x196)][_0x1311f4(0x163)][_0x1311f4(0x171)](_0x22ab01=>_0x22ab01['id']),'requestedStateConfirmed':![],..._0x2cab49};throw menuFailure(asVerificationError(_0x3d5ed0,_0x1311f4(0x176)),_0x582e50[_0x1311f4(0x196)],{'stage':_0x1311f4(0x17e),'succeeded':_0x3c6024,'failedRecords':[..._0x52adcf,..._0x51785c,_0x5b51f3],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x1311f4(0x193),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x3c310a=[];for(const _0x5748c0 of _0x3c6024){const _0x4017f6=Number(_0x5748c0['id']),_0x5e99e0=_0x582e50[_0x1311f4(0x1b6)][_0x1311f4(0x188)](_0x4017f6),_0xdf6271=_0x55c994[_0x1311f4(0x191)]['get'](_0x4017f6);try{verifyVisibilityUpdate(_0x5e99e0,_0xdf6271,_0x582e50[_0x1311f4(0x196)]['requestedVisible']);}catch(_0x17cb69){const _0xd6d80=asVerificationError(_0x17cb69,'Menu\x20'+_0x4017f6+_0x1311f4(0x190));_0x3c310a['push']({'id':_0x4017f6,'stage':_0x1311f4(0x17e),'code':_0xd6d80[_0x1311f4(0x19a)],'message':_0xd6d80['message'],'requestedStateConfirmed':![]});}}for(const _0x202d89 of _0x4604d9){const _0x19d0c8=_0x582e50[_0x1311f4(0x1b6)][_0x1311f4(0x188)](_0x202d89),_0x1e8aa7=_0x55c994[_0x1311f4(0x191)][_0x1311f4(0x188)](_0x202d89);try{verifyVisibilityUpdate(_0x19d0c8,_0x1e8aa7,_0x582e50[_0x1311f4(0x196)][_0x1311f4(0x19f)]),_0x3c6024[_0x1311f4(0x1a3)]({'id':_0x202d89,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x26382d){const _0x4509d6=asVerificationError(_0x26382d,_0x1311f4(0x15f)+_0x202d89+_0x1311f4(0x15c));_0x3c310a[_0x1311f4(0x1a3)]({'id':_0x202d89,'stage':'update-recovery','code':_0x4509d6[_0x1311f4(0x19a)],'message':_0x4509d6[_0x1311f4(0x1ab)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x3c310a[_0x1311f4(0x157)]>0x0){const _0x4f87cf=_0x3c310a[_0x1311f4(0x171)](_0x2b082d=>Number(_0x2b082d['id'])),_0x350b84=_0x3c6024[_0x1311f4(0x1a8)](_0x58cae0=>_0x58cae0[_0x1311f4(0x184)]===!![])[_0x1311f4(0x157)],_0x44e94d=menuError(_0x1311f4(0x1b9),_0x1311f4(0x164)+_0x4f87cf[_0x1311f4(0x168)](',\x20')+'.',_0x1311f4(0x175));throw menuFailure(_0x44e94d,_0x582e50[_0x1311f4(0x196)],{'stage':_0x1311f4(0x17e),'succeeded':_0x3c6024,'failedRecords':[..._0x52adcf,..._0x3c310a],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x1311f4(0x193),..._0x4f87cf[_0x1311f4(0x157)]===0x1?{'targetId':_0x4f87cf[0x0]}:{'targetIds':_0x4f87cf},'recoveredCount':_0x350b84,'lookupCommand':_0x1311f4(0x1aa)}});}const _0x52c427=_0x3c6024['filter'](_0x151113=>_0x151113['updated']===!![])['length'],_0x1aa930=_0x3c6024['length']-_0x52c427,_0xb2b752={..._0x582e50[_0x1311f4(0x196)],'succeeded':_0x3c6024,'failed':_0x52adcf,'warnings':_0x52adcf[_0x1311f4(0x157)]>0x0?[..._0x582e50['plan'][_0x1311f4(0x1b7)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x582e50[_0x1311f4(0x196)]['warnings'],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x55c994[_0x1311f4(0x183)],'matchesRequestedState':_0x52adcf[_0x1311f4(0x157)]===0x0,'recoveredCount':_0x4604d9[_0x1311f4(0x157)]}};return{'ok':_0x52adcf[_0x1311f4(0x157)]===0x0,'data':_0xb2b752,'message':_0x52adcf[_0x1311f4(0x157)]===0x0?_0x1311f4(0x180)+_0x52c427+_0x1311f4(0x18e)+_0x1aa930+_0x1311f4(0x148):_0x1311f4(0x1af)+_0x52c427+_0x1311f4(0x170)+_0x1aa930+_0x1311f4(0x186)+_0x52adcf[_0x1311f4(0x157)]+_0x1311f4(0x181)};}};function parseInput(_0x2ab2d0){const _0x32b353=a175_0x2d7fee,_0x9751fe=parseMenuIds(_0x2ab2d0[_0x32b353(0x1a4)]('menu-ids')),_0x4b0630=parseCsv(_0x2ab2d0['str'](_0x32b353(0x1a6)));if(_0x9751fe[_0x32b353(0x157)]===0x0&&_0x4b0630['length']===0x0)throw CliErrors[_0x32b353(0x1b0)](_0x32b353(0x153));const _0x16368b=parseBooleanFlag(_0x2ab2d0,_0x32b353(0x185),!![]),_0x1003a3=parseBooleanFlag(_0x2ab2d0,_0x32b353(0x18b),![]);let _0x3a36ea;if(hasFlag(_0x2ab2d0,_0x32b353(0x18f))){_0x3a36ea=_0x2ab2d0[_0x32b353(0x174)]('expected-count');if(!Number[_0x32b353(0x18a)](_0x3a36ea)||_0x3a36ea<0x0)throw CliErrors[_0x32b353(0x1b0)](_0x32b353(0x1b4));}return{'menuIds':_0x9751fe,'paths':_0x4b0630,'visible':_0x16368b,'expectVisible':_0x1003a3,'expectedCount':_0x3a36ea};}async function buildPlan(_0xc3df33,_0x3d71f9){const _0x47d151=a175_0x2d7fee,_0x5304ed=parseInput(_0xc3df33),_0x2dceab=await fetchMutationSnapshot(_0xc3df33,_0x47d151(0x167)),_0x17de98=selectTargets(_0x2dceab[_0x47d151(0x194)],_0x5304ed[_0x47d151(0x152)],_0x5304ed[_0x47d151(0x1a6)]);if(_0x5304ed[_0x47d151(0x16d)]!==undefined&&_0x17de98[_0x47d151(0x157)]!==_0x5304ed[_0x47d151(0x16d)])throw menuError(_0x47d151(0x147),_0x47d151(0x15d)+_0x17de98[_0x47d151(0x157)]+'\x20menu(s),\x20expected\x20'+_0x5304ed[_0x47d151(0x16d)]+'.',_0x47d151(0x159));if(_0x5304ed['expectVisible']!==undefined){const _0x6f31bc=_0x17de98[_0x47d151(0x1a8)](_0x1d0f6d=>_0x1d0f6d[_0x47d151(0x185)]!==_0x5304ed[_0x47d151(0x150)]);if(_0x6f31bc[_0x47d151(0x157)]>0x0)throw menuError('menu_state_drift',_0x47d151(0x149)+_0x6f31bc[_0x47d151(0x171)](_0x47e4e6=>_0x47e4e6['id'])[_0x47d151(0x168)](',\x20')+'.',_0x47d151(0x192));}const _0x44a94b=_0x17de98[_0x47d151(0x171)](_0x4ece97=>({'id':_0x4ece97['id'],'label':_0x4ece97['label'],'path':_0x4ece97[_0x47d151(0x156)],'before':{'visible':_0x4ece97[_0x47d151(0x185)]},'after':{'visible':_0x5304ed['visible']}})),_0x39d3b7=_0x44a94b[_0x47d151(0x1a8)](_0x577dc2=>_0x577dc2[_0x47d151(0x144)][_0x47d151(0x185)]!==_0x5304ed[_0x47d151(0x185)])[_0x47d151(0x171)](_0x2b5a69=>({'stage':_0x47d151(0x154),'method':_0x47d151(0x15a),'path':_0x47d151(0x19b),'body':{'appCode':_0xc3df33[_0x47d151(0x1a2)],'id':_0x2b5a69['id'],'visible':_0x5304ed['visible']}})),_0x4f2efe=mutationResult({'operation':_0x47d151(0x155),'selector':{'menuIds':_0x5304ed['menuIds'],'paths':_0x5304ed[_0x47d151(0x1a6)]},'before':{'menus':_0x17de98[_0x47d151(0x171)](_0x39bc56=>({'id':_0x39bc56['id'],'path':_0x39bc56['path'],'visible':_0x39bc56[_0x47d151(0x185)]}))},'after':{'menus':_0x17de98[_0x47d151(0x171)](_0x123cee=>({'id':_0x123cee['id'],'path':_0x123cee[_0x47d151(0x156)],'visible':_0x5304ed[_0x47d151(0x185)]}))},'dryRun':_0x3d71f9,'backend':[...BACKEND],'plannedActions':_0x39d3b7,'snapshotHash':_0x2dceab[_0x47d151(0x183)],'warnings':_0x39d3b7[_0x47d151(0x157)]===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0x4f2efe,'requestedVisible':_0x5304ed['visible'],'targets':_0x44a94b},'beforeById':new Map(_0x17de98[_0x47d151(0x171)](_0x5e3dd0=>[_0x5e3dd0['id'],_0x5e3dd0]))};}function selectTargets(_0x3107b7,_0x599de8,_0x59144f){const _0x254ad2=a175_0x2d7fee,_0x192fe2=new Map(_0x3107b7['map'](_0x13d2dd=>[_0x13d2dd['id'],_0x13d2dd])),_0x123f39=new Map(),_0x24eb97=_0x599de8['filter'](_0x4c6cb0=>!_0x192fe2[_0x254ad2(0x16c)](_0x4c6cb0));if(_0x24eb97[_0x254ad2(0x157)]>0x0)throw menuError(_0x254ad2(0x1b8),'Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x24eb97[_0x254ad2(0x168)](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x334e96 of _0x599de8){_0x123f39['set'](_0x334e96,_0x192fe2[_0x254ad2(0x188)](_0x334e96));}for(const _0x4b9b8e of _0x59144f){const _0x51a8c0=_0x3107b7[_0x254ad2(0x1a8)](_0x41cf3e=>_0x41cf3e[_0x254ad2(0x156)]===_0x4b9b8e);if(_0x51a8c0[_0x254ad2(0x157)]===0x0)throw menuError(_0x254ad2(0x1b8),_0x254ad2(0x198)+JSON['stringify'](_0x4b9b8e)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x51a8c0[_0x254ad2(0x157)]>0x1)throw menuError(_0x254ad2(0x14c),_0x254ad2(0x1ae)+JSON[_0x254ad2(0x1b3)](_0x4b9b8e)+'.',_0x254ad2(0x182)+_0x51a8c0['map'](_0xcb12dd=>_0xcb12dd['id'])['join'](',\x20')+'.');const _0x37b0a3=_0x51a8c0[0x0];_0x123f39['set'](_0x37b0a3['id'],_0x37b0a3);}return[..._0x123f39[_0x254ad2(0x160)]()];}function parseMenuIds(_0x42e605){const _0x13e271=a175_0x2d7fee,_0x1ae0e1=parseCsv(_0x42e605),_0xce3b35=_0x1ae0e1['map'](Number);if(_0xce3b35['some'](_0x4ed314=>!Number[_0x13e271(0x18a)](_0x4ed314)||_0x4ed314<=0x0))throw CliErrors[_0x13e271(0x1b0)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0xce3b35)];}function parseCsv(_0x529152){const _0xe2e7d=a175_0x2d7fee;return[...new Set(_0x529152[_0xe2e7d(0x14f)](',')[_0xe2e7d(0x171)](_0x15d98c=>_0x15d98c[_0xe2e7d(0x16f)]())[_0xe2e7d(0x1a8)](Boolean))];}function parseBooleanFlag(_0x4c6221,_0x427dec,_0x5c6293){const _0x3771d0=a175_0x2d7fee;if(!hasFlag(_0x4c6221,_0x427dec)){if(_0x5c6293)throw CliErrors[_0x3771d0(0x173)](_0x427dec);return undefined;}const _0x5816a6=_0x4c6221['rawFlags'][_0x427dec];if(_0x5816a6===!![]||_0x5816a6===![])return _0x5816a6;if(_0x5816a6===_0x3771d0(0x172))return!![];if(_0x5816a6===_0x3771d0(0x18d))return![];throw CliErrors[_0x3771d0(0x1b0)]('--'+_0x427dec+_0x3771d0(0x166));}function verifyVisibilityUpdate(_0x11c052,_0x329350,_0x576ea2){const _0x4c9c2f=a175_0x2d7fee;assertVerified(!!_0x329350,'Menu\x20'+_0x11c052['id']+_0x4c9c2f(0x14e)),assertVerified(_0x329350[_0x4c9c2f(0x185)]===_0x576ea2,'Menu\x20'+_0x11c052['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x276bad=[['id',_0x329350['id'],_0x11c052['id']],[_0x4c9c2f(0x16e),_0x329350['parentId'],_0x11c052[_0x4c9c2f(0x16e)]],[_0x4c9c2f(0x19d),_0x329350['depth'],_0x11c052[_0x4c9c2f(0x19d)]],[_0x4c9c2f(0x16a),_0x329350['label'],_0x11c052[_0x4c9c2f(0x16a)]],[_0x4c9c2f(0x156),_0x329350[_0x4c9c2f(0x156)],_0x11c052[_0x4c9c2f(0x156)]],[_0x4c9c2f(0x15b),_0x329350[_0x4c9c2f(0x15b)],_0x11c052[_0x4c9c2f(0x15b)]],[_0x4c9c2f(0x178),_0x329350[_0x4c9c2f(0x178)],_0x11c052['type']],[_0x4c9c2f(0x1b5),_0x329350[_0x4c9c2f(0x1b5)],_0x11c052[_0x4c9c2f(0x1b5)]],[_0x4c9c2f(0x1ba),_0x329350[_0x4c9c2f(0x1ba)],_0x11c052[_0x4c9c2f(0x1ba)]],['resourcesValid',_0x329350[_0x4c9c2f(0x14b)],_0x11c052[_0x4c9c2f(0x14b)]],[_0x4c9c2f(0x142),_0x329350[_0x4c9c2f(0x142)],_0x11c052['childrenIds']],['childrenCount',_0x329350[_0x4c9c2f(0x162)],_0x11c052['childrenCount']],[_0x4c9c2f(0x1b1),_0x329350[_0x4c9c2f(0x1b1)],_0x11c052[_0x4c9c2f(0x1b1)]],[_0x4c9c2f(0x17f),_0x329350[_0x4c9c2f(0x17f)],_0x11c052[_0x4c9c2f(0x17f)]],[_0x4c9c2f(0x158),_0x329350[_0x4c9c2f(0x158)],_0x11c052['modelType']],[_0x4c9c2f(0x17b),_0x329350[_0x4c9c2f(0x17b)],_0x11c052[_0x4c9c2f(0x17b)]],[_0x4c9c2f(0x1a1),_0x329350['datasetCode'],_0x11c052[_0x4c9c2f(0x1a1)]]];for(const [_0x59e9d3,_0x4a9410,_0x1d1ba9]of _0x276bad){assertVerified(sameValue(_0x4a9410,_0x1d1ba9),_0x4c9c2f(0x1a7)+_0x11c052['id']+'\x20'+_0x59e9d3+_0x4c9c2f(0x16b));}}function sameValue(_0x4d86b1,_0x4d1e9f){const _0x5e3ae9=a175_0x2d7fee;if(Array[_0x5e3ae9(0x189)](_0x4d86b1)||Array[_0x5e3ae9(0x189)](_0x4d1e9f))return JSON[_0x5e3ae9(0x1b3)](_0x4d86b1)===JSON['stringify'](_0x4d1e9f);return _0x4d86b1===_0x4d1e9f;}
|
|
1
|
+
const a180_0x5f488b=a180_0x5ce2;function a180_0x5272(){const _0x292012=['hash','get','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','path','modelType','childrenIds','resources','pageType','Menu\x20id\x20selector(s)\x20not\x20found:\x20','Response\x20was\x20lost\x20for\x20menu\x20','Menu\x20path\x20selector\x20not\x20found:\x20','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','datasetCode','expectedCount','visibility-update','str','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','POST','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','high-risk-write','validation','expected-count','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','some','600285HyDBeq','rabetbase\x20menu\x20list\x20--format\x20compress','menu_selector_ambiguous','map','plan','true','requestedVisible','message','byId','recovered','url','2693592QDxeuM','Final\x20menu\x20visibility\x20readback\x20failed.','\x20updated,\x20','paths','isArray','label','update\x20visibility\x20for','set','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','50LtVWPu','isSafeInteger','datasetId','Updated\x20visibility\x20for\x20','\x20menu(s);\x20skipped\x20','update-recovery','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','push','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','\x20skipped,\x20','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','\x20must\x20be\x20true\x20or\x20false.','cookie','string','targets','209476cdXiws','8zJKPui','failed','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','false','menu-ids','menu\x20list','childrenCount','/smartapi/menu/update','expect-visible','menu_expected_count_mismatch','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','join','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','flagMissing','values','code','820813fPoXvb','body','number','split','verification','trim','15692gFioKi','129PdcjcE','Would\x20update\x20visibility\x20for\x20','Menu\x20','boolean','sort','visible','menu_verification_failed','updated','menuIds','939719rKyjwy','menu','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Requested\x20menu\x20visibility','\x20menu(s);\x20skip\x20','depth','expectVisible','appCode','menu_selector_not_found','12Wguepk','plannedActions','\x20unchanged\x20menu(s).','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','261142YhQBXp','warnings','update','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','type','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','before','Menu\x20visibility\x20update\x20completed:\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','resourcesValid','beforeById','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','length','Selected\x20','stringify','pageId','update-menu-visibility','update\x20menu\x20visibility','num','parentId','\x20failed.','filter'];a180_0x5272=function(){return _0x292012;};return a180_0x5272();}(function(_0x461fde,_0x5d6c27){const _0x606da7=a180_0x5ce2,_0x2a3464=_0x461fde();while(!![]){try{const _0x1fe36b=parseInt(_0x606da7(0x199))/0x1+-parseInt(_0x606da7(0x1c8))/0x2+-parseInt(_0x606da7(0x1b2))/0x3*(parseInt(_0x606da7(0x1b1))/0x4)+parseInt(_0x606da7(0x1f7))/0x5*(parseInt(_0x606da7(0x1c4))/0x6)+-parseInt(_0x606da7(0x1ab))/0x7*(parseInt(_0x606da7(0x19a))/0x8)+-parseInt(_0x606da7(0x202))/0x9+parseInt(_0x606da7(0x20b))/0xa*(parseInt(_0x606da7(0x1bb))/0xb);if(_0x1fe36b===_0x5d6c27)break;else _0x2a3464['push'](_0x2a3464['shift']());}catch(_0x4c7703){_0x2a3464['push'](_0x2a3464['shift']());}}}(a180_0x5272,0x274a0));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,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';function a180_0x5ce2(_0x47e5ab,_0x5007b1){_0x47e5ab=_0x47e5ab-0x18d;const _0x5272e7=a180_0x5272();let _0x5ce296=_0x5272e7[_0x47e5ab];return _0x5ce296;}import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a180_0x5f488b(0x1ef),'path':a180_0x5f488b(0x1a1)}];export const menuVisibilityUpdate={'service':a180_0x5f488b(0x1bc),'command':a180_0x5f488b(0x1ec),'description':a180_0x5f488b(0x190),'risk':a180_0x5f488b(0x1f2),'structuredErrors':!![],'flags':[{'name':a180_0x5f488b(0x19e),'type':a180_0x5f488b(0x197),'description':a180_0x5f488b(0x1c7)},{'name':a180_0x5f488b(0x205),'type':a180_0x5f488b(0x197),'description':a180_0x5f488b(0x1ee)},{'name':a180_0x5f488b(0x1b7),'type':a180_0x5f488b(0x1b5),'required':!![],'description':a180_0x5f488b(0x1be)},{'name':a180_0x5f488b(0x1a2),'type':a180_0x5f488b(0x1b5),'description':a180_0x5f488b(0x1cb)},{'name':a180_0x5f488b(0x1f4),'type':a180_0x5f488b(0x1ad),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x182f42){parseInput(_0x182f42),requireExplicitYes(_0x182f42);},async 'dryRun'(_0x182175){const _0x38645f=a180_0x5f488b,_0x3d3b29=await buildPlan(_0x182175,!![]),_0x391be0=_0x3d3b29[_0x38645f(0x1fb)]['plannedActions']?.[_0x38645f(0x1d4)]??0x0,_0x2a9a4f=_0x3d3b29['plan'][_0x38645f(0x198)][_0x38645f(0x1d4)]-_0x391be0;return menuDryRunResult(_0x3d3b29[_0x38645f(0x1fb)],{'method':_0x38645f(0x1ef),'url':_0x38645f(0x1a1),'body':{'updates':_0x3d3b29[_0x38645f(0x1fb)][_0x38645f(0x1c5)]?.[_0x38645f(0x1fa)](_0x21de81=>_0x21de81[_0x38645f(0x1ac)])??[]},'description':_0x38645f(0x1b3)+_0x391be0+_0x38645f(0x1bf)+_0x2a9a4f+_0x38645f(0x1c6)});},async 'execute'(_0x2cd634){const _0x1c5cc3=a180_0x5f488b;requireExplicitYes(_0x2cd634);const _0x149bd5=await buildPlan(_0x2cd634,![]);await recheckMutationSnapshot(_0x2cd634,_0x149bd5['plan'],_0x1c5cc3(0x1d9));const _0x1f6d5f=[],_0x2d56ba=[],_0x80d278=[];for(const _0x11d387 of _0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x198)]){if(_0x11d387['before'][_0x1c5cc3(0x1b7)]===_0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x1fd)]){_0x1f6d5f['push']({'id':_0x11d387['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x2cd634[_0x1c5cc3(0x1c2)],_0x2cd634['cookie'],{'id':_0x11d387['id'],'visible':_0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x1fd)]}),_0x1f6d5f[_0x1c5cc3(0x191)]({'id':_0x11d387['id'],'updated':!![],'skipped':![]});}catch(_0x378286){const _0x47b226=mapMenuApiError(_0x378286,_0x1c5cc3(0x208),_0x11d387['id']);if(isMenuResponseLoss(_0x378286)&&_0x47b226[_0x1c5cc3(0x1aa)]!=='menu_permission_denied'){_0x80d278[_0x1c5cc3(0x191)](_0x11d387['id']);continue;}_0x2d56ba[_0x1c5cc3(0x191)]({'id':_0x11d387['id'],'stage':_0x1c5cc3(0x1ca),'code':_0x47b226[_0x1c5cc3(0x1aa)],'message':_0x47b226[_0x1c5cc3(0x1fe)]});}}let _0x42f8f8;try{_0x42f8f8=await fetchMenuSnapshot(_0x2cd634[_0x1c5cc3(0x1c2)],_0x2cd634[_0x1c5cc3(0x196)]);}catch(_0xbe09a4){const _0x56a7fb=describeMenuErrorCause(_0xbe09a4,'verify\x20menu\x20visibility\x20update'),_0x4b540b=_0x80d278[_0x1c5cc3(0x1fa)](_0x526d02=>({'id':_0x526d02,'stage':'update-recovery','code':_0x1c5cc3(0x1b8),'message':_0x1c5cc3(0x1e7)+_0x526d02+_0x1c5cc3(0x1e0),'requestedStateConfirmed':![],'recovered':![]})),_0x1cab98={'stage':_0x1c5cc3(0x1af),'code':_0x1c5cc3(0x1b8),'message':_0x1c5cc3(0x203),'targetIds':_0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x198)]['map'](_0x36c68f=>_0x36c68f['id']),'requestedStateConfirmed':![],..._0x56a7fb};throw menuFailure(asVerificationError(_0xbe09a4,_0x1c5cc3(0x20a)),_0x149bd5[_0x1c5cc3(0x1fb)],{'stage':_0x1c5cc3(0x1af),'succeeded':_0x1f6d5f,'failedRecords':[..._0x2d56ba,..._0x4b540b,_0x1cab98],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x1c5cc3(0x19b),'recoveredCount':0x0,'lookupCommand':_0x1c5cc3(0x1f8)}});}const _0x46ade6=[];for(const _0x1089ff of _0x1f6d5f){const _0x500ca0=Number(_0x1089ff['id']),_0x3804eb=_0x149bd5[_0x1c5cc3(0x1d2)][_0x1c5cc3(0x1df)](_0x500ca0),_0x42aa06=_0x42f8f8[_0x1c5cc3(0x1ff)][_0x1c5cc3(0x1df)](_0x500ca0);try{verifyVisibilityUpdate(_0x3804eb,_0x42aa06,_0x149bd5['plan'][_0x1c5cc3(0x1fd)]);}catch(_0xbb22c4){const _0x5824ed=asVerificationError(_0xbb22c4,'Menu\x20'+_0x500ca0+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x46ade6[_0x1c5cc3(0x191)]({'id':_0x500ca0,'stage':_0x1c5cc3(0x1af),'code':_0x5824ed['code'],'message':_0x5824ed[_0x1c5cc3(0x1fe)],'requestedStateConfirmed':![]});}}for(const _0x5b019f of _0x80d278){const _0x4f70c3=_0x149bd5[_0x1c5cc3(0x1d2)][_0x1c5cc3(0x1df)](_0x5b019f),_0xc34f35=_0x42f8f8[_0x1c5cc3(0x1ff)][_0x1c5cc3(0x1df)](_0x5b019f);try{verifyVisibilityUpdate(_0x4f70c3,_0xc34f35,_0x149bd5['plan'][_0x1c5cc3(0x1fd)]),_0x1f6d5f[_0x1c5cc3(0x191)]({'id':_0x5b019f,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x5949b2){const _0x2c3ea5=asVerificationError(_0x5949b2,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x5b019f+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x46ade6[_0x1c5cc3(0x191)]({'id':_0x5b019f,'stage':_0x1c5cc3(0x18f),'code':_0x2c3ea5[_0x1c5cc3(0x1aa)],'message':_0x2c3ea5[_0x1c5cc3(0x1fe)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x46ade6[_0x1c5cc3(0x1d4)]>0x0){const _0x24d199=_0x46ade6[_0x1c5cc3(0x1fa)](_0x57608d=>Number(_0x57608d['id'])),_0x4bdf26=_0x1f6d5f[_0x1c5cc3(0x1dd)](_0x247a71=>_0x247a71[_0x1c5cc3(0x200)]===!![])[_0x1c5cc3(0x1d4)],_0x2fea05=menuError(_0x1c5cc3(0x1b8),_0x1c5cc3(0x1a5)+_0x24d199[_0x1c5cc3(0x1a6)](',\x20')+'.',_0x1c5cc3(0x1f0));throw menuFailure(_0x2fea05,_0x149bd5[_0x1c5cc3(0x1fb)],{'stage':_0x1c5cc3(0x1af),'succeeded':_0x1f6d5f,'failedRecords':[..._0x2d56ba,..._0x46ade6],'warnings':[_0x1c5cc3(0x19c)],'verification':{'status':_0x1c5cc3(0x19b),..._0x24d199[_0x1c5cc3(0x1d4)]===0x1?{'targetId':_0x24d199[0x0]}:{'targetIds':_0x24d199},'recoveredCount':_0x4bdf26,'lookupCommand':_0x1c5cc3(0x1f8)}});}const _0x3da9d2=_0x1f6d5f[_0x1c5cc3(0x1dd)](_0x366058=>_0x366058[_0x1c5cc3(0x1b9)]===!![])['length'],_0x3b63e9=_0x1f6d5f[_0x1c5cc3(0x1d4)]-_0x3da9d2,_0x30c733={..._0x149bd5[_0x1c5cc3(0x1fb)],'succeeded':_0x1f6d5f,'failed':_0x2d56ba,'warnings':_0x2d56ba[_0x1c5cc3(0x1d4)]>0x0?[..._0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x1c9)],_0x1c5cc3(0x1f5)]:_0x149bd5[_0x1c5cc3(0x1fb)]['warnings'],'verification':{'checkedBy':_0x1c5cc3(0x19f),'snapshotHash':_0x42f8f8[_0x1c5cc3(0x1de)],'matchesRequestedState':_0x2d56ba[_0x1c5cc3(0x1d4)]===0x0,'recoveredCount':_0x80d278[_0x1c5cc3(0x1d4)]}};return{'ok':_0x2d56ba[_0x1c5cc3(0x1d4)]===0x0,'data':_0x30c733,'message':_0x2d56ba['length']===0x0?_0x1c5cc3(0x18d)+_0x3da9d2+_0x1c5cc3(0x18e)+_0x3b63e9+_0x1c5cc3(0x1c6):_0x1c5cc3(0x1cf)+_0x3da9d2+_0x1c5cc3(0x204)+_0x3b63e9+_0x1c5cc3(0x193)+_0x2d56ba[_0x1c5cc3(0x1d4)]+_0x1c5cc3(0x1dc)};}};function parseInput(_0x3d30f0){const _0x3176ed=a180_0x5f488b,_0x5632ca=parseMenuIds(_0x3d30f0['str']('menu-ids')),_0x507e78=parseCsv(_0x3d30f0[_0x3176ed(0x1ed)]('paths'));if(_0x5632ca[_0x3176ed(0x1d4)]===0x0&&_0x507e78[_0x3176ed(0x1d4)]===0x0)throw CliErrors[_0x3176ed(0x1f3)](_0x3176ed(0x194));const _0x407c16=parseBooleanFlag(_0x3d30f0,'visible',!![]),_0x31a1a9=parseBooleanFlag(_0x3d30f0,_0x3176ed(0x1a2),![]);let _0x5df37a;if(hasFlag(_0x3d30f0,_0x3176ed(0x1f4))){_0x5df37a=_0x3d30f0[_0x3176ed(0x1da)](_0x3176ed(0x1f4));if(!Number[_0x3176ed(0x20c)](_0x5df37a)||_0x5df37a<0x0)throw CliErrors[_0x3176ed(0x1f3)](_0x3176ed(0x1bd));}return{'menuIds':_0x5632ca,'paths':_0x507e78,'visible':_0x407c16,'expectVisible':_0x31a1a9,'expectedCount':_0x5df37a};}async function buildPlan(_0x57aff7,_0x4785fb){const _0x42cfa9=a180_0x5f488b,_0x5781aa=parseInput(_0x57aff7),_0x15bdfa=await fetchMutationSnapshot(_0x57aff7,_0x42cfa9(0x1d9)),_0x246f0f=selectTargets(_0x15bdfa['menus'],_0x5781aa[_0x42cfa9(0x1ba)],_0x5781aa['paths']);if(_0x5781aa[_0x42cfa9(0x1eb)]!==undefined&&_0x246f0f[_0x42cfa9(0x1d4)]!==_0x5781aa[_0x42cfa9(0x1eb)])throw menuError(_0x42cfa9(0x1a3),_0x42cfa9(0x1d5)+_0x246f0f['length']+'\x20menu(s),\x20expected\x20'+_0x5781aa[_0x42cfa9(0x1eb)]+'.',_0x42cfa9(0x1cd));if(_0x5781aa[_0x42cfa9(0x1c1)]!==undefined){const _0x1b15c3=_0x246f0f[_0x42cfa9(0x1dd)](_0x174aed=>_0x174aed[_0x42cfa9(0x1b7)]!==_0x5781aa[_0x42cfa9(0x1c1)]);if(_0x1b15c3[_0x42cfa9(0x1d4)]>0x0)throw menuError('menu_state_drift',_0x42cfa9(0x1a7)+_0x1b15c3['map'](_0x27f2f2=>_0x27f2f2['id'])['join'](',\x20')+'.',_0x42cfa9(0x1d0));}const _0x379506=_0x246f0f[_0x42cfa9(0x1fa)](_0x54d057=>({'id':_0x54d057['id'],'label':_0x54d057[_0x42cfa9(0x207)],'path':_0x54d057[_0x42cfa9(0x1e1)],'before':{'visible':_0x54d057['visible']},'after':{'visible':_0x5781aa['visible']}})),_0x3a7553=_0x379506[_0x42cfa9(0x1dd)](_0x27b181=>_0x27b181[_0x42cfa9(0x1ce)][_0x42cfa9(0x1b7)]!==_0x5781aa['visible'])[_0x42cfa9(0x1fa)](_0x3179b6=>({'stage':_0x42cfa9(0x1d8),'method':'POST','path':_0x42cfa9(0x1a1),'body':{'appCode':_0x57aff7[_0x42cfa9(0x1c2)],'id':_0x3179b6['id'],'visible':_0x5781aa[_0x42cfa9(0x1b7)]}})),_0x55c033=mutationResult({'operation':_0x42cfa9(0x1ec),'selector':{'menuIds':_0x5781aa['menuIds'],'paths':_0x5781aa['paths']},'before':{'menus':_0x246f0f[_0x42cfa9(0x1fa)](_0x13c63e=>({'id':_0x13c63e['id'],'path':_0x13c63e['path'],'visible':_0x13c63e['visible']}))},'after':{'menus':_0x246f0f[_0x42cfa9(0x1fa)](_0x230138=>({'id':_0x230138['id'],'path':_0x230138[_0x42cfa9(0x1e1)],'visible':_0x5781aa['visible']}))},'dryRun':_0x4785fb,'backend':[...BACKEND],'plannedActions':_0x3a7553,'snapshotHash':_0x15bdfa['hash'],'warnings':_0x3a7553[_0x42cfa9(0x1d4)]===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0x55c033,'requestedVisible':_0x5781aa[_0x42cfa9(0x1b7)],'targets':_0x379506},'beforeById':new Map(_0x246f0f[_0x42cfa9(0x1fa)](_0x3f9a05=>[_0x3f9a05['id'],_0x3f9a05]))};}function selectTargets(_0x43b413,_0x2b73d9,_0xf86d63){const _0x120f10=a180_0x5f488b,_0x59ca40=new Map(_0x43b413[_0x120f10(0x1fa)](_0x447673=>[_0x447673['id'],_0x447673])),_0x2b2e09=new Map(),_0x3fc3d5=_0x2b73d9[_0x120f10(0x1dd)](_0x17bd47=>!_0x59ca40['has'](_0x17bd47));if(_0x3fc3d5[_0x120f10(0x1d4)]>0x0)throw menuError(_0x120f10(0x1c3),_0x120f10(0x1e6)+_0x3fc3d5[_0x120f10(0x1a6)](',\x20')+'.',_0x120f10(0x1a4));for(const _0x4222a6 of _0x2b73d9){_0x2b2e09['set'](_0x4222a6,_0x59ca40[_0x120f10(0x1df)](_0x4222a6));}for(const _0x40c00b of _0xf86d63){const _0x140d93=_0x43b413['filter'](_0x14433d=>_0x14433d['path']===_0x40c00b);if(_0x140d93[_0x120f10(0x1d4)]===0x0)throw menuError(_0x120f10(0x1c3),_0x120f10(0x1e8)+JSON['stringify'](_0x40c00b)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x140d93[_0x120f10(0x1d4)]>0x1)throw menuError(_0x120f10(0x1f9),_0x120f10(0x192)+JSON[_0x120f10(0x1d6)](_0x40c00b)+'.',_0x120f10(0x1e9)+_0x140d93['map'](_0x3736bb=>_0x3736bb['id'])['join'](',\x20')+'.');const _0x4011f5=_0x140d93[0x0];_0x2b2e09[_0x120f10(0x209)](_0x4011f5['id'],_0x4011f5);}return[..._0x2b2e09[_0x120f10(0x1a9)]()];}function parseMenuIds(_0x443288){const _0x19439c=a180_0x5f488b,_0x2de016=parseCsv(_0x443288),_0x4f4db9=_0x2de016[_0x19439c(0x1fa)](Number);if(_0x4f4db9[_0x19439c(0x1f6)](_0x482c6b=>!Number[_0x19439c(0x20c)](_0x482c6b)||_0x482c6b<=0x0))throw CliErrors['validation'](_0x19439c(0x1f1));return[...new Set(_0x4f4db9)];}function parseCsv(_0x164021){const _0xcdba5=a180_0x5f488b;return[...new Set(_0x164021[_0xcdba5(0x1ae)](',')[_0xcdba5(0x1fa)](_0x492c5b=>_0x492c5b[_0xcdba5(0x1b0)]())[_0xcdba5(0x1dd)](Boolean))];}function parseBooleanFlag(_0x2fd715,_0x501f2d,_0x25b137){const _0x53cff3=a180_0x5f488b;if(!hasFlag(_0x2fd715,_0x501f2d)){if(_0x25b137)throw CliErrors[_0x53cff3(0x1a8)](_0x501f2d);return undefined;}const _0x8dd4d4=_0x2fd715['rawFlags'][_0x501f2d];if(_0x8dd4d4===!![]||_0x8dd4d4===![])return _0x8dd4d4;if(_0x8dd4d4===_0x53cff3(0x1fc))return!![];if(_0x8dd4d4===_0x53cff3(0x19d))return![];throw CliErrors[_0x53cff3(0x1f3)]('--'+_0x501f2d+_0x53cff3(0x195));}function verifyVisibilityUpdate(_0x4d591a,_0x3d67ce,_0x1aa0a1){const _0x521f2f=a180_0x5f488b;assertVerified(!!_0x3d67ce,'Menu\x20'+_0x4d591a['id']+_0x521f2f(0x1d3)),assertVerified(_0x3d67ce[_0x521f2f(0x1b7)]===_0x1aa0a1,'Menu\x20'+_0x4d591a['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x252051=[['id',_0x3d67ce['id'],_0x4d591a['id']],[_0x521f2f(0x1db),_0x3d67ce['parentId'],_0x4d591a[_0x521f2f(0x1db)]],[_0x521f2f(0x1c0),_0x3d67ce[_0x521f2f(0x1c0)],_0x4d591a[_0x521f2f(0x1c0)]],['label',_0x3d67ce[_0x521f2f(0x207)],_0x4d591a['label']],[_0x521f2f(0x1e1),_0x3d67ce[_0x521f2f(0x1e1)],_0x4d591a[_0x521f2f(0x1e1)]],[_0x521f2f(0x201),_0x3d67ce[_0x521f2f(0x201)],_0x4d591a[_0x521f2f(0x201)]],[_0x521f2f(0x1cc),_0x3d67ce['type'],_0x4d591a['type']],[_0x521f2f(0x1b6),_0x3d67ce[_0x521f2f(0x1b6)],_0x4d591a[_0x521f2f(0x1b6)]],[_0x521f2f(0x1e4),_0x3d67ce[_0x521f2f(0x1e4)],_0x4d591a['resources']],['resourcesValid',_0x3d67ce[_0x521f2f(0x1d1)],_0x4d591a[_0x521f2f(0x1d1)]],[_0x521f2f(0x1e3),_0x3d67ce[_0x521f2f(0x1e3)],_0x4d591a['childrenIds']],[_0x521f2f(0x1a0),_0x3d67ce['childrenCount'],_0x4d591a[_0x521f2f(0x1a0)]],[_0x521f2f(0x1d7),_0x3d67ce[_0x521f2f(0x1d7)],_0x4d591a[_0x521f2f(0x1d7)]],[_0x521f2f(0x1e5),_0x3d67ce[_0x521f2f(0x1e5)],_0x4d591a[_0x521f2f(0x1e5)]],['modelType',_0x3d67ce[_0x521f2f(0x1e2)],_0x4d591a[_0x521f2f(0x1e2)]],['datasetId',_0x3d67ce[_0x521f2f(0x20d)],_0x4d591a[_0x521f2f(0x20d)]],[_0x521f2f(0x1ea),_0x3d67ce[_0x521f2f(0x1ea)],_0x4d591a[_0x521f2f(0x1ea)]]];for(const [_0x45f278,_0x34d223,_0x47b8c5]of _0x252051){assertVerified(sameValue(_0x34d223,_0x47b8c5),_0x521f2f(0x1b4)+_0x4d591a['id']+'\x20'+_0x45f278+'\x20changed\x20unexpectedly.');}}function sameValue(_0x56ec98,_0xd07f8){const _0x165b45=a180_0x5f488b;if(Array[_0x165b45(0x206)](_0x56ec98)||Array['isArray'](_0xd07f8))return JSON['stringify'](_0x56ec98)===JSON['stringify'](_0xd07f8);return _0x56ec98===_0xd07f8;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a181_0x1884(_0x2c4cf1,_0x58b207){_0x2c4cf1=_0x2c4cf1-0xe3;const _0x54fce1=a181_0x54fc();let _0x1884f4=_0x54fce1[_0x2c4cf1];return _0x1884f4;}const a181_0x438801=a181_0x1884;(function(_0x254586,_0x2b8f79){const _0x554f07=a181_0x1884,_0x30480b=_0x254586();while(!![]){try{const _0x34b03e=parseInt(_0x554f07(0x102))/0x1*(-parseInt(_0x554f07(0x106))/0x2)+parseInt(_0x554f07(0xfc))/0x3+-parseInt(_0x554f07(0xfd))/0x4+parseInt(_0x554f07(0xed))/0x5*(-parseInt(_0x554f07(0xf6))/0x6)+parseInt(_0x554f07(0x101))/0x7*(-parseInt(_0x554f07(0xf7))/0x8)+parseInt(_0x554f07(0xec))/0x9+parseInt(_0x554f07(0xe8))/0xa*(parseInt(_0x554f07(0xe7))/0xb);if(_0x34b03e===_0x2b8f79)break;else _0x30480b['push'](_0x30480b['shift']());}catch(_0x2dfcba){_0x30480b['push'](_0x30480b['shift']());}}}(a181_0x54fc,0x8bfcd));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH='/notification/channel-config/create';async function prepareCreate(_0x37e2f2){const _0x1496a2=a181_0x1884,_0x5f4aba=await readNotificationDocument(_0x37e2f2,_0x1496a2(0x109)),_0x1f0e47=createMutationInput(_0x37e2f2[_0x1496a2(0xe6)],_0x5f4aba);return{'document':_0x5f4aba,'input':_0x1f0e47,'planned':projectNotificationConfig({'appCode':_0x37e2f2[_0x1496a2(0xe6)],'configName':_0x5f4aba['configName'],'channelType':_0x5f4aba[_0x1496a2(0xee)],'endpointUrl':_0x5f4aba[_0x1496a2(0x108)],'channelConfig':_0x5f4aba[_0x1496a2(0xf8)],'description':_0x5f4aba[_0x1496a2(0x103)],'connectTimeout':_0x5f4aba[_0x1496a2(0xfa)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x5f4aba[_0x1496a2(0xf0)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a181_0x54fc(){const _0x48ce1b=['document','configName','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','verification','write','51186lqhMYc','131296pMrdyV','channelConfig','POST','connectTimeout','notification','1485627KKAKnl','3998168UgACjc',';\x20no\x20automatic\x20retry\x20was\x20attempted.','verified','Inspect\x20with\x20','56pMUCvL','2jwMOvb','description','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.',';\x20do\x20not\x20resubmit.','602872cjaEWD',';\x20do\x20not\x20resubmit\x20automatically.','endpointUrl','create','config-create','notification_config_create_outcome_unknown','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','input','appCode','737GLFHPw','143490jRffHk','mutation','isSafeInteger','Created\x20notification\x20config\x20','9343701XvGByF','110rzuIoD','channelType','planned','readTimeout'];a181_0x54fc=function(){return _0x48ce1b;};return a181_0x54fc();}export const notificationConfigCreate={'service':a181_0x438801(0xfb),'command':a181_0x438801(0x10a),'description':a181_0x438801(0xf3),'risk':a181_0x438801(0xf5),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x3247a6){assertSingleNotificationSource(_0x3247a6);},async 'dryRun'(_0x1aa369){const _0x944bbb=a181_0x438801,_0x528ac4=await prepareCreate(_0x1aa369),_0x143cc5=notificationLookupCommand(_0x1aa369['appCode'],_0x528ac4[_0x944bbb(0xf1)]['channelType']);return asDryRunResult({'operation':_0x944bbb(0x109),'selector':{'appCode':_0x1aa369[_0x944bbb(0xe6)],'configName':_0x528ac4['document'][_0x944bbb(0xf2)],'channelType':_0x528ac4[_0x944bbb(0xf1)][_0x944bbb(0xee)]},'before':null,'after':_0x528ac4[_0x944bbb(0xef)],'dryRun':!![],'backend':{'method':_0x944bbb(0xf9),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x944bbb(0xef),'lookupCommand':_0x143cc5}},{'method':_0x944bbb(0xf9),'url':CREATE_PATH});},async 'execute'(_0x5310d2){const _0x55f304=a181_0x438801,_0x290176=await prepareCreate(_0x5310d2),_0x4da242=notificationLookupCommand(_0x5310d2[_0x55f304(0xe6)],_0x290176['document']['channelType']);let _0x1517fb;try{_0x1517fb=await createNotificationChannelConfig(_0x290176[_0x55f304(0xe5)]);}catch(_0x3d4749){if(isPlatformTransportFailure(_0x3d4749))throw notificationError(_0x55f304(0xe3),_0x55f304(0xe4),'Inspect\x20with\x20'+_0x4da242+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x55f304(0x109),_0x55f304(0xe9),_0x55f304(0x100)+_0x4da242+_0x55f304(0xfe));}if(!Number[_0x55f304(0xea)](_0x1517fb)||_0x1517fb<=0x0)throw notificationError(_0x55f304(0xe3),_0x55f304(0x104),'Inspect\x20with\x20'+_0x4da242+_0x55f304(0x105));let _0x54854a;try{const _0x5c0f2c=await getNotificationChannelConfig(_0x1517fb,_0x5310d2[_0x55f304(0xe6)]);_0x54854a=normalizeExactNotificationConfig(_0x5c0f2c,_0x1517fb,_0x5310d2[_0x55f304(0xe6)]);}catch{throw safeApiFailure(_0x55f304(0x109),_0x55f304(0xf4),_0x55f304(0x100)+_0x4da242+_0x55f304(0x107));}return{'ok':!![],'data':{'operation':_0x55f304(0x109),'selector':{'appCode':_0x54854a[_0x55f304(0xe6)],'id':_0x54854a['id'],'configCode':_0x54854a['configCode'],'configName':_0x54854a['configName'],'channelType':_0x54854a[_0x55f304(0xee)]},'before':null,'after':projectNotificationConfig(_0x54854a),'dryRun':![],'backend':{'method':_0x55f304(0xf9),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x55f304(0xff),'lookupCommand':_0x4da242}},'message':_0x55f304(0xeb)+_0x54854a['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a182_0x429f(){const _0x11717f=['18729YYUXCt','2uRbSAv','Notification\x20config\x20','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','45858jBYrPg','delete','/notification/channel-config/delete','6503101pzEPsM','verified',';\x20no\x20automatic\x20retry\x20was\x20attempted.','1659834LkPqHj','3340IjTqCl','notification_config_delete_outcome_unknown','before','1340152GdLIUZ','Inspect\x20with\x20','config-delete','planned','some','39010YQwybU','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','unshift','805gvShAq','appCode','notification','POST',';\x20do\x20not\x20resubmit\x20automatically.','Deleted\x20notification\x20config\x20','\x20remains\x20present\x20after\x20delete.','channelType','high-risk-write','324zyFdts','notification_config_delete_verification_failed','600727UXoKmW'];a182_0x429f=function(){return _0x11717f;};return a182_0x429f();}const a182_0xdf5c87=a182_0x1a05;(function(_0x1e5859,_0x245e7d){const _0x8f9f1a=a182_0x1a05,_0x2d1ab1=_0x1e5859();while(!![]){try{const _0x47aac3=parseInt(_0x8f9f1a(0x13a))/0x1*(-parseInt(_0x8f9f1a(0x13c))/0x2)+parseInt(_0x8f9f1a(0x145))/0x3+parseInt(_0x8f9f1a(0x138))/0x4*(-parseInt(_0x8f9f1a(0x14e))/0x5)+-parseInt(_0x8f9f1a(0x13f))/0x6*(-parseInt(_0x8f9f1a(0x151))/0x7)+parseInt(_0x8f9f1a(0x149))/0x8+-parseInt(_0x8f9f1a(0x13b))/0x9*(-parseInt(_0x8f9f1a(0x146))/0xa)+-parseInt(_0x8f9f1a(0x142))/0xb;if(_0x47aac3===_0x245e7d)break;else _0x2d1ab1['push'](_0x2d1ab1['shift']());}catch(_0x14a550){_0x2d1ab1['push'](_0x2d1ab1['shift']());}}}(a182_0x429f,0x72f84));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a182_0xdf5c87(0x141),REFERENCE_WARNING=a182_0xdf5c87(0x14f);function a182_0x1a05(_0x3dfa14,_0x172681){_0x3dfa14=_0x3dfa14-0x138;const _0x429f74=a182_0x429f();let _0x1a057a=_0x429f74[_0x3dfa14];return _0x1a057a;}async function prepareDelete(_0x159668){const _0x366a4c=a182_0xdf5c87,_0x38f068=readNotificationId(_0x159668),_0x339dc4=await requireExactNotificationConfig(_0x159668[_0x366a4c(0x152)],_0x38f068,'delete');return{'id':_0x38f068,'before':_0x339dc4};}export const notificationConfigDelete={'service':a182_0xdf5c87(0x153),'command':a182_0xdf5c87(0x14b),'description':'Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','risk':a182_0xdf5c87(0x159),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x96cbda){readNotificationId(_0x96cbda),requireNotificationExplicitYes(_0x96cbda);},async 'dryRun'(_0x437ddb){const _0xd486c2=a182_0xdf5c87,_0x54d180=await prepareDelete(_0x437ddb),_0xe315a4=notificationLookupCommand(_0x437ddb[_0xd486c2(0x152)],_0x54d180['before'][_0xd486c2(0x158)]);return asDryRunResult({'operation':_0xd486c2(0x140),'selector':notificationSelector(_0x54d180[_0xd486c2(0x148)]),'before':projectNotificationConfig(_0x54d180[_0xd486c2(0x148)]),'after':null,'dryRun':!![],'backend':{'method':_0xd486c2(0x154),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0xd486c2(0x14c),'lookupCommand':_0xe315a4}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x2d6c2f){const _0x2b2cae=a182_0xdf5c87;requireNotificationExplicitYes(_0x2d6c2f);const _0x1509c8=await prepareDelete(_0x2d6c2f),_0x25c36a=notificationLookupCommand(_0x2d6c2f[_0x2b2cae(0x152)],_0x1509c8[_0x2b2cae(0x148)]['channelType']);let _0x4dbba9=![];try{await deleteNotificationChannelConfig(_0x1509c8['id'],_0x2d6c2f['appCode']);}catch(_0x1941cb){if(!isPlatformTransportFailure(_0x1941cb))throw safeApiFailure(_0x2b2cae(0x140),'mutation',_0x2b2cae(0x14a)+_0x25c36a+_0x2b2cae(0x144));_0x4dbba9=!![];}let _0x4c66d7;try{_0x4c66d7=await listNotificationChannelConfigs(_0x2d6c2f[_0x2b2cae(0x152)],_0x1509c8[_0x2b2cae(0x148)]['channelType']),validateNotificationDeleteReadback(_0x4c66d7,_0x2d6c2f[_0x2b2cae(0x152)],_0x1509c8['before'][_0x2b2cae(0x158)]);}catch{throw notificationError(_0x4dbba9?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable',_0x2b2cae(0x13d)+_0x1509c8['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x2b2cae(0x14a)+_0x25c36a+_0x2b2cae(0x155));}if(_0x4c66d7[_0x2b2cae(0x14d)](_0x4e7887=>_0x4e7887['id']===_0x1509c8['id']))throw notificationError(_0x4dbba9?_0x2b2cae(0x147):_0x2b2cae(0x139),_0x2b2cae(0x13d)+_0x1509c8['id']+_0x2b2cae(0x157),_0x2b2cae(0x14a)+_0x25c36a+_0x2b2cae(0x155));const _0x3f0c74=[REFERENCE_WARNING];return _0x4dbba9&&_0x3f0c74[_0x2b2cae(0x150)](_0x2b2cae(0x13e)),{'ok':!![],'data':{'operation':_0x2b2cae(0x140),'selector':notificationSelector(_0x1509c8['before']),'before':projectNotificationConfig(_0x1509c8[_0x2b2cae(0x148)]),'after':null,'dryRun':![],'backend':{'method':_0x2b2cae(0x154),'path':DELETE_PATH},'warnings':_0x3f0c74,'verification':{'status':_0x2b2cae(0x143),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x4dbba9,'lookupCommand':_0x25c36a}},'message':_0x2b2cae(0x156)+_0x1509c8['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a183_0x41ab1f=a183_0x5b99;(function(_0xdd5f70,_0x81fda3){const _0x1db4f2=a183_0x5b99,_0x3c9e2e=_0xdd5f70();while(!![]){try{const _0x1b946d=-parseInt(_0x1db4f2(0x1d3))/0x1*(-parseInt(_0x1db4f2(0x1c2))/0x2)+-parseInt(_0x1db4f2(0x1d9))/0x3*(parseInt(_0x1db4f2(0x1d0))/0x4)+parseInt(_0x1db4f2(0x1d4))/0x5*(parseInt(_0x1db4f2(0x1cb))/0x6)+parseInt(_0x1db4f2(0x1de))/0x7*(-parseInt(_0x1db4f2(0x1c5))/0x8)+-parseInt(_0x1db4f2(0x1dc))/0x9*(-parseInt(_0x1db4f2(0x1d2))/0xa)+-parseInt(_0x1db4f2(0x1d7))/0xb*(-parseInt(_0x1db4f2(0x1c1))/0xc)+parseInt(_0x1db4f2(0x1cf))/0xd*(-parseInt(_0x1db4f2(0x1cc))/0xe);if(_0x1b946d===_0x81fda3)break;else _0x3c9e2e['push'](_0x3c9e2e['shift']());}catch(_0x19ccd2){_0x3c9e2e['push'](_0x3c9e2e['shift']());}}}(a183_0x3b82,0x5b28b));function a183_0x3b82(){const _0x2fc499=['28KjIpMF','appCode','431784VDaWph','412304LLgozq','config-list','all','213424VlPmAr','bool','flat','validation','Notification\x20channel\x20type','str','335256VrgxHP','81746IwzkPj','boolean','length','2275seBNIR','5428xcyWoC','notification','56370NOyNYz','3JtGStA','55NknPtj','type','map','33JVJNbZ','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','1227VpSnji','trim','read','1143RimBFC','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values'];a183_0x3b82=function(){return _0x2fc499;};return a183_0x3b82();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a183_0x5b99(_0x2204bf,_0x5333d4){_0x2204bf=_0x2204bf-0x1c1;const _0x3b8250=a183_0x3b82();let _0x5b9928=_0x3b8250[_0x2204bf];return _0x5b9928;}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a183_0x41ab1f(0x1d1),'command':a183_0x41ab1f(0x1c3),'description':a183_0x41ab1f(0x1dd),'risk':a183_0x41ab1f(0x1db),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a183_0x41ab1f(0x1d5),'type':'string','description':a183_0x41ab1f(0x1c9),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':a183_0x41ab1f(0x1cd),'default':![],'description':a183_0x41ab1f(0x1d8)}],async 'validate'(_0x3289d9){const _0x3b0d2a=a183_0x41ab1f;if(_0x3289d9[_0x3b0d2a(0x1c6)](_0x3b0d2a(0x1c4))&&_0x3289d9[_0x3b0d2a(0x1ca)](_0x3b0d2a(0x1d5))[_0x3b0d2a(0x1da)]())throw CliErrors[_0x3b0d2a(0x1c8)]('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.');if(_0x3289d9[_0x3b0d2a(0x1c6)](_0x3b0d2a(0x1c4)))return;readNotificationChannelType(_0x3289d9);},async 'execute'(_0x58849b){const _0xff1ef0=a183_0x41ab1f;if(_0x58849b[_0xff1ef0(0x1c6)](_0xff1ef0(0x1c4))){const _0xa7d716=await Promise[_0xff1ef0(0x1c4)](NOTIFICATION_CHANNEL_TYPES[_0xff1ef0(0x1d6)](_0x55a7aa=>listNotificationChannelConfigs(_0x58849b[_0xff1ef0(0x1df)],_0x55a7aa))),_0x56e833=_0xa7d716[_0xff1ef0(0x1c7)]()[_0xff1ef0(0x1d6)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x58849b['appCode'],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x56e833[_0xff1ef0(0x1ce)],'configs':_0x56e833},'message':'Found\x20'+_0x56e833[_0xff1ef0(0x1ce)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x85f6d5=readNotificationChannelType(_0x58849b),_0x392bc1=await listNotificationChannelConfigs(_0x58849b[_0xff1ef0(0x1df)],_0x85f6d5),_0x13fb65=_0x392bc1[_0xff1ef0(0x1d6)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x58849b[_0xff1ef0(0x1df)],'channelType':_0x85f6d5,'count':_0x13fb65[_0xff1ef0(0x1ce)],'configs':_0x13fb65},'message':'Found\x20'+_0x13fb65['length']+'\x20'+_0x85f6d5+'\x20notification\x20config(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a184_0x5ab877=a184_0x9e1d;function a184_0x4fba(){const _0x4d9bba=['Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','8JcTGes','provesChange','notification_config_update_verification_unavailable','allMatch','payload','488241GXshJx','405076CPFfTP','before','1214017axVkDP','8ZDzZgG','planned','appCode','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','143159nvvteK','high-risk-write','notification_config_update_outcome_unknown','/notification/channel-config/update','POST','verified','364158PBowbE','mutation','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','verifiedFields','Notification\x20config\x20','update','\x20via\x20','Inspect\x20with\x20--id\x20','\x20with\x20',';\x20do\x20not\x20resubmit\x20automatically.','1525446VxqRYK','427275VOOyuC','Inspect\x20ID\x20','patch'];a184_0x4fba=function(){return _0x4d9bba;};return a184_0x4fba();}(function(_0xaa643a,_0x8310a7){const _0x24ef6a=a184_0x9e1d,_0xbd4727=_0xaa643a();while(!![]){try{const _0x1f51db=-parseInt(_0x24ef6a(0x81))/0x1+parseInt(_0x24ef6a(0x7a))/0x2+parseInt(_0x24ef6a(0x79))/0x3+-parseInt(_0x24ef6a(0x97))/0x4*(-parseInt(_0x24ef6a(0x93))/0x5)+parseInt(_0x24ef6a(0x87))/0x6+-parseInt(_0x24ef6a(0x7c))/0x7+-parseInt(_0x24ef6a(0x7d))/0x8*(parseInt(_0x24ef6a(0x92))/0x9);if(_0x1f51db===_0x8310a7)break;else _0xbd4727['push'](_0xbd4727['shift']());}catch(_0x362613){_0xbd4727['push'](_0xbd4727['shift']());}}}(a184_0x4fba,0x1b0d4));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a184_0x9e1d(_0xd4a02,_0x25c4fc){_0xd4a02=_0xd4a02-0x77;const _0x4fba01=a184_0x4fba();let _0x9e1dd5=_0x4fba01[_0xd4a02];return _0x9e1dd5;}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=a184_0x5ab877(0x84);async function prepareUpdate(_0x4bb0fe){const _0x43c7eb=a184_0x5ab877,_0x404365=readNotificationId(_0x4bb0fe),_0x3e9cfb=await readNotificationDocument(_0x4bb0fe,'update'),_0x412cbf=await requireExactNotificationConfig(_0x4bb0fe[_0x43c7eb(0x7f)],_0x404365,_0x43c7eb(0x8d));return{'id':_0x404365,'patch':_0x3e9cfb,'before':_0x412cbf,'payload':mergeUpdateInput(_0x412cbf,_0x3e9cfb),'planned':plannedUpdateProjection(_0x412cbf,_0x3e9cfb)};}export const notificationConfigUpdate={'service':'notification','command':'config-update','description':a184_0x5ab877(0x96),'risk':a184_0x5ab877(0x82),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x513c2e){readNotificationId(_0x513c2e),assertSingleNotificationSource(_0x513c2e),requireNotificationExplicitYes(_0x513c2e);},async 'dryRun'(_0x41b508){const _0x4e7f0c=a184_0x5ab877,_0x2172e5=await prepareUpdate(_0x41b508),_0x4ac1bc=notificationLookupCommand(_0x41b508[_0x4e7f0c(0x7f)],_0x2172e5[_0x4e7f0c(0x7b)]['channelType']);return asDryRunResult({'operation':_0x4e7f0c(0x8d),'selector':notificationSelector(_0x2172e5['before']),'before':projectNotificationConfig(_0x2172e5['before']),'after':_0x2172e5[_0x4e7f0c(0x7e)],'dryRun':!![],'backend':{'method':_0x4e7f0c(0x85),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x4e7f0c(0x7e),'lookupCommand':_0x4ac1bc}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x33441d){const _0x30db91=a184_0x5ab877;requireNotificationExplicitYes(_0x33441d);const _0x1071e2=await prepareUpdate(_0x33441d),_0x232168=notificationLookupCommand(_0x33441d[_0x30db91(0x7f)],_0x1071e2[_0x30db91(0x7b)]['channelType']);let _0x493261=![];try{await updateNotificationChannelConfig(_0x1071e2[_0x30db91(0x78)]);}catch(_0x135ffc){if(!isPlatformTransportFailure(_0x135ffc))throw safeApiFailure('update',_0x30db91(0x88),_0x30db91(0x94)+_0x1071e2['id']+_0x30db91(0x90)+_0x232168+_0x30db91(0x8a));_0x493261=!![];}let _0x1ac8d4;try{const _0x5a91fe=await getNotificationChannelConfig(_0x1071e2['id'],_0x33441d['appCode']);_0x1ac8d4=normalizeExactNotificationConfig(_0x5a91fe,_0x1071e2['id'],_0x33441d[_0x30db91(0x7f)]);}catch{throw notificationError(_0x493261?_0x30db91(0x83):_0x30db91(0x99),_0x30db91(0x8c)+_0x1071e2['id']+_0x30db91(0x80),'Inspect\x20with\x20--id\x20'+_0x1071e2['id']+_0x30db91(0x8e)+_0x232168+';\x20do\x20not\x20resubmit\x20automatically.');}const _0x2b7284=requestedSafeFieldsMatch(_0x1071e2['before'],_0x1ac8d4,_0x1071e2[_0x30db91(0x95)]);if(!_0x2b7284[_0x30db91(0x77)]||_0x493261&&!_0x2b7284[_0x30db91(0x98)])throw notificationError(_0x493261?_0x30db91(0x83):'notification_config_update_verification_failed',_0x30db91(0x8c)+_0x1071e2['id']+_0x30db91(0x89),_0x30db91(0x8f)+_0x1071e2['id']+_0x30db91(0x8e)+_0x232168+_0x30db91(0x91));const _0x491479=_0x493261?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x30db91(0x8d),'selector':notificationSelector(_0x1ac8d4),'before':projectNotificationConfig(_0x1071e2['before']),'after':projectNotificationConfig(_0x1ac8d4),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x491479,'verification':{'status':_0x30db91(0x86),'recoveredAfterUnknownResponse':_0x493261,'verifiedFields':_0x2b7284[_0x30db91(0x8b)],'lookupCommand':_0x232168}},'message':'Updated\x20notification\x20config\x20'+_0x1ac8d4['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3826e6,_0x7eb32a){const _0x35a74c=a185_0xc4c5,_0x4f612a=_0x3826e6();while(!![]){try{const _0x23f5de=parseInt(_0x35a74c(0x1c2))/0x1+-parseInt(_0x35a74c(0x1be))/0x2*(-parseInt(_0x35a74c(0x1bc))/0x3)+parseInt(_0x35a74c(0x1bb))/0x4+-parseInt(_0x35a74c(0x1c4))/0x5*(-parseInt(_0x35a74c(0x1bf))/0x6)+parseInt(_0x35a74c(0x1ba))/0x7*(-parseInt(_0x35a74c(0x1bd))/0x8)+parseInt(_0x35a74c(0x1c0))/0x9+parseInt(_0x35a74c(0x1c1))/0xa*(-parseInt(_0x35a74c(0x1c3))/0xb);if(_0x23f5de===_0x7eb32a)break;else _0x4f612a['push'](_0x4f612a['shift']());}catch(_0x28a535){_0x4f612a['push'](_0x4f612a['shift']());}}}(a185_0x5c78,0x6051a));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a185_0xc4c5(_0x330ec4,_0x3baab1){_0x330ec4=_0x330ec4-0x1ba;const _0x5c782e=a185_0x5c78();let _0xc4c5ab=_0x5c782e[_0x330ec4];return _0xc4c5ab;}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a185_0x5c78(){const _0x20f4be=['10XJpLHl','575471luBrNw','9296804nuBWKO','398105pECzXd','22099KYvAXF','3032164gOyyOq','747Xnryha','1168QEmkQP','96iWQoOf','6MRhBTR','2479707LNOGmU'];a185_0x5c78=function(){return _0x20f4be;};return a185_0x5c78();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a181_0x47f2aa=a181_0x3230;(function(_0xa392ce,_0x4a27de){const _0x183e09=a181_0x3230,_0x5c5c37=_0xa392ce();while(!![]){try{const _0x567153=-parseInt(_0x183e09(0xe1))/0x1*(-parseInt(_0x183e09(0x95))/0x2)+parseInt(_0x183e09(0xb5))/0x3*(parseInt(_0x183e09(0x9b))/0x4)+parseInt(_0x183e09(0x9c))/0x5+-parseInt(_0x183e09(0xd9))/0x6+parseInt(_0x183e09(0xb1))/0x7+parseInt(_0x183e09(0xc5))/0x8+parseInt(_0x183e09(0xe3))/0x9*(-parseInt(_0x183e09(0x9e))/0xa);if(_0x567153===_0x4a27de)break;else _0x5c5c37['push'](_0x5c5c37['shift']());}catch(_0x58e907){_0x5c5c37['push'](_0x5c5c37['shift']());}}}(a181_0x5c5c,0xefbd2));function a181_0x5c5c(){const _0x1df7b3=['endpointUrl','name','\x20has\x20an\x20invalid\x20channelType.','keys','notification_config_update_empty','notification_config_response_invalid','a\x20string\x20or\x20null','parse','fromName','notification_config_json_invalid','utf8','Notification\x20JSON\x20from\x20','channelConfig','prototype','readTimeout','boolean','Notification\x20config\x20','11547300eSyYtw','\x20is\x20invalid.','apiError','replyTo','\x22\x20must\x20be\x20','has','ccList','configCode','625694CCsRuz','endpointUrlRaw','29630979nAjNoU','file\x20','\x22\x20must\x20be\x20a\x20non-empty\x20string.','\x22\x20cannot\x20exceed\x20','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Item\x20','stringify','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','appCode','a\x20supported\x20string','path','mutation','description','call','str','channelConfigRaw','number','\x20has\x20invalid\x20field\x20\x22','failed','channelType','includes','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','stdin','validation','\x20--format\x20compress','EMAIL','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','hasOwnProperty','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Unknown\x20notification\x20JSON\x20field\x20\x22','<redacted>','length','setEncoding','string','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','kind','notification_config_id_invalid','Invalid\x20notification\x20config\x20response.','\x20has\x20an\x20unsupported\x20channelType.','Notification\x20JSON\x20field\x20\x22','trim','FEISHU','notification_config_field_unknown','WEBHOOK','notification_config_field_invalid','env','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','from-env','Create\x20JSON\x20requires\x20field\x20','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','4lNMvug','notification_config_confirmation_required','connectTimeout','yes','every','Application-level\x20notification\x20config\x20ID','297988voVbTC','5263995dOOmrZ','createTime','10VitPDw','bool','Allowed\x20values:\x20','create','preflight','subjectPrefix','environment\x20variable\x20','Missing\x20notification\x20JSON\x20source.','messageTemplate','\x22channelType\x22.','Notification\x20config\x20list\x20item\x20','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','notification_config_field_forbidden','update','channelCode','bccList','join','file','recipients','5410111xDeOCn','notification_config_field_required','object','Notification\x20JSON\x20channelConfig\x20field\x20\x22','66EoPwIv','\x20is\x20missing\x20required\x20field\x20\x22','rabetbase\x20notification\x20config-list\x20--appcode\x20','emailTargets','configName','isSafeInteger','\x20--type\x20','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20failed.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','\x20characters.','a\x20JSON\x20object\x20or\x20null','notification_config_source_unavailable','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','a\x20JSON\x20object','num','11862856yJdrlH','entries','push'];a181_0x5c5c=function(){return _0x1df7b3;};return a181_0x5c5c();}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=[a181_0x47f2aa(0xfd),a181_0x47f2aa(0x10d),'DINGTALK','WECOM',a181_0x47f2aa(0x8d)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0x47f2aa(0xb9),a181_0x47f2aa(0xf6),a181_0x47f2aa(0xc8),a181_0x47f2aa(0xd4),a181_0x47f2aa(0xef),'connectTimeout','readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a181_0x47f2aa(0xeb),a181_0x47f2aa(0xe0),a181_0x47f2aa(0xac)]),EMAIL_RECIPIENT_FIELDS=new Set([a181_0x47f2aa(0xb8),a181_0x47f2aa(0xb0),a181_0x47f2aa(0xdf),a181_0x47f2aa(0xad),a181_0x47f2aa(0xdc),a181_0x47f2aa(0xa3),a181_0x47f2aa(0xd0),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a181_0x47f2aa(0x105),'required':![],'description':a181_0x47f2aa(0xbe)},{'name':'stdin','type':a181_0x47f2aa(0xd7),'required':![],'default':![],'description':a181_0x47f2aa(0x94)},{'name':a181_0x47f2aa(0x91),'type':'string','required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a181_0x47f2aa(0xf3),'required':!![],'description':a181_0x47f2aa(0x9a)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x2c1440,_0x57c8a7,_0x10ecfb){return new CliError(_0x2c1440,0x1,_0x57c8a7,_0x10ecfb);}export function readNotificationId(_0x56de4b){const _0x1b3bd0=a181_0x47f2aa,_0x4f0c62=_0x56de4b[_0x1b3bd0(0xc4)]('id');if(!Number[_0x1b3bd0(0xba)](_0x4f0c62)||_0x4f0c62<=0x0)throw notificationError(_0x1b3bd0(0x108),_0x1b3bd0(0x90));return _0x4f0c62;}function a181_0x3230(_0x4164aa,_0xff7c68){_0x4164aa=_0x4164aa-0x8c;const _0x5c5cda=a181_0x5c5c();let _0x323019=_0x5c5cda[_0x4164aa];return _0x323019;}export function requireNotificationExplicitYes(_0x4ad712){const _0x20da64=a181_0x47f2aa;if(_0x4ad712['bool']('dry-run')||_0x4ad712[_0x20da64(0x9f)](_0x20da64(0x98)))return;throw notificationError(_0x20da64(0x96),'This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.',_0x20da64(0xfe));}export function readNotificationChannelType(_0x562e13,_0x1874bb='type',_0x46808f='EMAIL'){const _0x86b812=a181_0x47f2aa,_0x4afe4a=_0x562e13['str'](_0x1874bb)[_0x86b812(0x10c)]()||_0x46808f;if(!NOTIFICATION_CHANNEL_TYPES[_0x86b812(0xf7)](_0x4afe4a))throw CliErrors[_0x86b812(0xfb)]('Invalid\x20--'+_0x1874bb+':\x20'+_0x4afe4a,_0x86b812(0xa0)+NOTIFICATION_CHANNEL_TYPES[_0x86b812(0xae)](',\x20')+'.');return _0x4afe4a;}export function assertSingleNotificationSource(_0x37e44e){const _0x43b372=a181_0x47f2aa,_0x511b5b=[],_0xd8a868=_0x37e44e[_0x43b372(0xf1)](_0x43b372(0xaf))[_0x43b372(0x10c)]();if(_0xd8a868)_0x511b5b[_0x43b372(0xc7)]({'kind':_0x43b372(0xaf),'path':_0xd8a868});if(_0x37e44e[_0x43b372(0x9f)](_0x43b372(0xfa)))_0x511b5b[_0x43b372(0xc7)]({'kind':_0x43b372(0xfa)});const _0x23830a=_0x37e44e[_0x43b372(0xf1)](_0x43b372(0x91))[_0x43b372(0x10c)]();if(_0x23830a)_0x511b5b[_0x43b372(0xc7)]({'kind':_0x43b372(0x8f),'name':_0x23830a});if(_0x511b5b['length']===0x0)throw CliErrors[_0x43b372(0xfb)](_0x43b372(0xa5),_0x43b372(0xe7));if(_0x511b5b[_0x43b372(0x103)]>0x1)throw CliErrors['validation']('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x43b372(0xe7));return _0x511b5b[0x0];}export async function readNotificationDocument(_0x4d3a32,_0x1f1ae3){const _0x10d3ab=a181_0x47f2aa,_0x2fec6e=assertSingleNotificationSource(_0x4d3a32),_0x298bcf=_0x2fec6e[_0x10d3ab(0x107)]===_0x10d3ab(0xaf)?_0x10d3ab(0xe4)+_0x2fec6e[_0x10d3ab(0xed)]:_0x2fec6e[_0x10d3ab(0x107)]===_0x10d3ab(0x8f)?_0x10d3ab(0xa4)+_0x2fec6e[_0x10d3ab(0xc9)]:'stdin';let _0x5c881c;try{if(_0x2fec6e[_0x10d3ab(0x107)]==='file')_0x5c881c=await readFile(_0x2fec6e[_0x10d3ab(0xed)],_0x10d3ab(0xd2));else{if(_0x2fec6e[_0x10d3ab(0x107)]==='env'){if(!(_0x2fec6e[_0x10d3ab(0xc9)]in process.env))throw notificationError('notification_config_source_unavailable',_0x10d3ab(0xf9)+_0x2fec6e[_0x10d3ab(0xc9)]);_0x5c881c=process.env[_0x2fec6e.name]??'';}else _0x5c881c=await readStdin();}}catch(_0x885ed4){if(_0x885ed4 instanceof CliError)throw _0x885ed4;throw notificationError(_0x10d3ab(0xc1),_0x10d3ab(0xea)+_0x298bcf+'.');}let _0x340395;try{_0x340395=JSON[_0x10d3ab(0xcf)](_0x5c881c);}catch{throw notificationError(_0x10d3ab(0xd1),_0x10d3ab(0xd3)+_0x298bcf+_0x10d3ab(0xda),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x340395))throw notificationError(_0x10d3ab(0xd1),'Notification\x20JSON\x20from\x20'+_0x298bcf+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x340395,_0x1f1ae3);}export function projectNotificationListConfig(_0x716440,_0x181ff1){const _0xc48bba=a181_0x47f2aa;return{'id':typeof _0x716440['id']===_0xc48bba(0xf3)?_0x716440['id']:null,'configCode':requireResponseString(_0x716440['configCode'],_0xc48bba(0xe0),_0x181ff1),'configName':requireResponseString(_0x716440['configName'],_0xc48bba(0xb9),_0x181ff1),'channelType':requireResponseString(_0x716440[_0xc48bba(0xf6)],_0xc48bba(0xf6),_0x181ff1),'description':normalizeNullableString(_0x716440[_0xc48bba(0xef)]),'createTime':normalizeNullableString(_0x716440[_0xc48bba(0x9d)]),'updateTime':normalizeNullableString(_0x716440['updateTime'])};}export function normalizeExactNotificationConfig(_0x242c52,_0x51b08,_0x459df3){const _0x26a53b=a181_0x47f2aa;if(!Number[_0x26a53b(0xba)](_0x242c52['id'])||_0x242c52['id']!==_0x51b08)throw notificationError(_0x26a53b(0xcd),_0x26a53b(0x106)+_0x51b08+'.');if(_0x242c52['appCode']!==_0x459df3)throw notificationError(_0x26a53b(0xcd),_0x26a53b(0xd8)+_0x51b08+_0x26a53b(0x100));const _0x47f9c6=requireExactString(_0x242c52[_0x26a53b(0xb9)],_0x26a53b(0xb9),_0x51b08),_0x417d03=requireExactString(_0x242c52[_0x26a53b(0xe0)],'configCode',_0x51b08),_0x58a83b=requireExactString(_0x242c52[_0x26a53b(0xf6)],'channelType',_0x51b08);if(!NOTIFICATION_CHANNEL_TYPES[_0x26a53b(0xf7)](_0x58a83b))throw notificationError(_0x26a53b(0xcd),_0x26a53b(0xd8)+_0x51b08+_0x26a53b(0x10a));const _0x2cb5c9=responseNullableString(_0x242c52[_0x26a53b(0xc8)],_0x26a53b(0xc8),_0x51b08),_0x1af265=responseNullableString(_0x242c52[_0x26a53b(0xd4)],_0x26a53b(0xd4),_0x51b08),_0x34c060=responseNullableString(_0x242c52[_0x26a53b(0xef)],_0x26a53b(0xef),_0x51b08),_0x5c3cf8=responseNullableTimeout(_0x242c52[_0x26a53b(0x97)],_0x26a53b(0x97),_0x51b08),_0x4f5f2c=responseNullableTimeout(_0x242c52[_0x26a53b(0xd6)],_0x26a53b(0xd6),_0x51b08);return{'id':_0x51b08,'appCode':_0x459df3,'configCode':_0x417d03,'configName':_0x47f9c6,'channelType':_0x58a83b,'endpointUrl':redactSensitive(_0x2cb5c9),'channelConfig':redactSensitive(_0x1af265),'description':_0x34c060,'connectTimeout':_0x5c3cf8,'readTimeout':_0x4f5f2c,'endpointUrlRaw':_0x2cb5c9,'channelConfigRaw':_0x1af265};}export async function requireExactNotificationConfig(_0x5e3ef6,_0x19182d,_0x1f0a9d){const _0x5f291b=a181_0x47f2aa;let _0x2c409c;try{_0x2c409c=await getNotificationChannelConfig(_0x19182d,_0x5e3ef6);}catch{throw safeApiFailure(_0x1f0a9d,_0x5f291b(0xa2),_0x5f291b(0xbc)+_0x5e3ef6+_0x5f291b(0x93));}return normalizeExactNotificationConfig(_0x2c409c,_0x19182d,_0x5e3ef6);}export function projectNotificationConfig(_0x519f62){const _0x521f65=a181_0x47f2aa;return{'id':_0x519f62['id']??null,'appCode':_0x519f62[_0x521f65(0xeb)],'configCode':_0x519f62['configCode']??null,'configName':_0x519f62['configName'],'channelType':_0x519f62[_0x521f65(0xf6)],'endpointUrl':redactSensitive(_0x519f62[_0x521f65(0xc8)]),'channelConfig':redactSensitive(_0x519f62[_0x521f65(0xd4)]),'description':_0x519f62[_0x521f65(0xef)]??null,'connectTimeout':_0x519f62[_0x521f65(0x97)]??null,'readTimeout':_0x519f62[_0x521f65(0xd6)]??null};}export function notificationSelector(_0x4f97c9){const _0x504b07=a181_0x47f2aa;return{'appCode':_0x4f97c9[_0x504b07(0xeb)],'id':_0x4f97c9['id'],'configCode':_0x4f97c9['configCode'],'configName':_0x4f97c9[_0x504b07(0xb9)],'channelType':_0x4f97c9['channelType']};}export function createMutationInput(_0x5ed0c6,_0x5254a8){const _0x448745=a181_0x47f2aa;return{'appCode':_0x5ed0c6,'configName':_0x5254a8[_0x448745(0xb9)],'channelType':_0x5254a8[_0x448745(0xf6)],...hasOwn(_0x5254a8,_0x448745(0xc8))?{'endpointUrl':_0x5254a8[_0x448745(0xc8)]}:{},...hasOwn(_0x5254a8,_0x448745(0xd4))?{'channelConfig':serializeChannelConfig(_0x5254a8[_0x448745(0xd4)])}:{},...hasOwn(_0x5254a8,_0x448745(0xef))?{'description':_0x5254a8[_0x448745(0xef)]}:{},...hasOwn(_0x5254a8,_0x448745(0x97))?{'connectTimeout':_0x5254a8['connectTimeout']}:{},...hasOwn(_0x5254a8,_0x448745(0xd6))?{'readTimeout':_0x5254a8['readTimeout']}:{}};}export function mergeUpdateInput(_0x151fbb,_0x21cc12){const _0xe1cae5=a181_0x47f2aa;return{'id':_0x151fbb['id'],'appCode':_0x151fbb[_0xe1cae5(0xeb)],'configName':_0x21cc12[_0xe1cae5(0xb9)]??_0x151fbb[_0xe1cae5(0xb9)],'channelType':_0x21cc12[_0xe1cae5(0xf6)]??_0x151fbb[_0xe1cae5(0xf6)],'endpointUrl':hasOwn(_0x21cc12,_0xe1cae5(0xc8))?_0x21cc12['endpointUrl']:_0x151fbb[_0xe1cae5(0xe2)],'channelConfig':hasOwn(_0x21cc12,_0xe1cae5(0xd4))?serializeChannelConfig(_0x21cc12[_0xe1cae5(0xd4)]):_0x151fbb['channelConfigRaw'],'description':hasOwn(_0x21cc12,_0xe1cae5(0xef))?_0x21cc12[_0xe1cae5(0xef)]:_0x151fbb[_0xe1cae5(0xef)],'connectTimeout':hasOwn(_0x21cc12,'connectTimeout')?_0x21cc12[_0xe1cae5(0x97)]:_0x151fbb[_0xe1cae5(0x97)],'readTimeout':hasOwn(_0x21cc12,_0xe1cae5(0xd6))?_0x21cc12[_0xe1cae5(0xd6)]:_0x151fbb[_0xe1cae5(0xd6)]};}export function plannedUpdateProjection(_0x486eb0,_0x520598){const _0x563bea=a181_0x47f2aa;return projectNotificationConfig({'id':_0x486eb0['id'],'appCode':_0x486eb0[_0x563bea(0xeb)],'configCode':_0x486eb0['configCode'],'configName':_0x520598[_0x563bea(0xb9)]??_0x486eb0['configName'],'channelType':_0x520598[_0x563bea(0xf6)]??_0x486eb0[_0x563bea(0xf6)],'endpointUrl':hasOwn(_0x520598,_0x563bea(0xc8))?_0x520598[_0x563bea(0xc8)]:_0x486eb0[_0x563bea(0xe2)],'channelConfig':hasOwn(_0x520598,_0x563bea(0xd4))?_0x520598[_0x563bea(0xd4)]:_0x486eb0[_0x563bea(0xf2)],'description':hasOwn(_0x520598,'description')?_0x520598['description']:_0x486eb0[_0x563bea(0xef)],'connectTimeout':hasOwn(_0x520598,_0x563bea(0x97))?_0x520598[_0x563bea(0x97)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x486eb0['connectTimeout'],'readTimeout':hasOwn(_0x520598,_0x563bea(0xd6))?_0x520598[_0x563bea(0xd6)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x486eb0[_0x563bea(0xd6)]});}export function requestedSafeFieldsMatch(_0x380750,_0x366355,_0x57d06d){const _0x54fbee=a181_0x47f2aa,_0x46144c=[],_0x1b9711=[],_0x30f2bf=[];for(const _0x967b55 of[_0x54fbee(0xb9),_0x54fbee(0xf6),_0x54fbee(0xef)]){if(!hasOwn(_0x57d06d,_0x967b55))continue;_0x30f2bf['push'](_0x967b55),_0x46144c[_0x54fbee(0xc7)](_0x366355[_0x967b55]===_0x57d06d[_0x967b55]),_0x1b9711[_0x54fbee(0xc7)](_0x380750[_0x967b55]!==_0x57d06d[_0x967b55]&&_0x366355[_0x967b55]===_0x57d06d[_0x967b55]);}for(const _0x5d3e82 of[_0x54fbee(0x97),'readTimeout']){if(!hasOwn(_0x57d06d,_0x5d3e82))continue;const _0x41f0e3=_0x57d06d[_0x5d3e82]??(_0x5d3e82===_0x54fbee(0x97)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x30f2bf['push'](_0x5d3e82),_0x46144c['push'](_0x366355[_0x5d3e82]===_0x41f0e3),_0x1b9711[_0x54fbee(0xc7)](_0x380750[_0x5d3e82]!==_0x41f0e3&&_0x366355[_0x5d3e82]===_0x41f0e3);}return hasOwn(_0x57d06d,_0x54fbee(0xc8))&&_0x57d06d[_0x54fbee(0xc8)]===null&&(_0x30f2bf['push']('endpointUrl:null'),_0x46144c['push'](_0x366355['endpointUrlRaw']===null||_0x366355[_0x54fbee(0xe2)]===''),_0x1b9711[_0x54fbee(0xc7)](_0x380750[_0x54fbee(0xe2)]!==null&&_0x380750['endpointUrlRaw']!==''&&(_0x366355[_0x54fbee(0xe2)]===null||_0x366355[_0x54fbee(0xe2)]===''))),{'allMatch':_0x46144c[_0x54fbee(0x99)](Boolean),'provesChange':_0x1b9711['some'](Boolean),'verifiedFields':_0x30f2bf};}export function validateNotificationDeleteReadback(_0x4957d3,_0x1cc278,_0x439c75){const _0x4b7a92=a181_0x47f2aa;for(const [_0x2d36fa,_0x3a6c76]of _0x4957d3[_0x4b7a92(0xc6)]()){if(!Number['isSafeInteger'](_0x3a6c76['id'])||_0x3a6c76['id']<=0x0)throw notificationError(_0x4b7a92(0xcd),'Notification\x20config\x20list\x20item\x20'+(_0x2d36fa+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x3a6c76['appCode']!==_0x1cc278)throw notificationError('notification_config_response_invalid',_0x4b7a92(0xa8)+(_0x2d36fa+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x3a6c76[_0x4b7a92(0xf6)]!==_0x439c75)throw notificationError('notification_config_response_invalid',_0x4b7a92(0xa8)+(_0x2d36fa+0x1)+_0x4b7a92(0xca));}}export function safeApiFailure(_0x493cfc,_0x4e27b5,_0x3939fa){const _0x2019ba=a181_0x47f2aa;return notificationError('notification_config_'+_0x493cfc+'_'+(_0x4e27b5===_0x2019ba(0xee)?_0x2019ba(0xf5):_0x4e27b5+'_unavailable'),_0x2019ba(0xd8)+_0x493cfc+'\x20'+_0x4e27b5+_0x2019ba(0xbd),_0x3939fa);}export function notificationLookupCommand(_0x2e22fc,_0x2abb18){const _0x3d252a=a181_0x47f2aa;return _0x3d252a(0xb7)+_0x2e22fc+_0x3d252a(0xbb)+_0x2abb18+_0x3d252a(0xfc);}function validateNotificationDocument(_0x89123f,_0x58b200){const _0xde5299=a181_0x47f2aa;for(const _0x5861eb of Object[_0xde5299(0xcb)](_0x89123f)){if(FORBIDDEN_IDENTITY_FIELDS[_0xde5299(0xde)](_0x5861eb))throw notificationError(_0xde5299(0xaa),_0xde5299(0x10b)+_0x5861eb+_0xde5299(0xf8));if(!ALLOWED_INPUT_FIELDS[_0xde5299(0xde)](_0x5861eb))throw notificationError(_0xde5299(0x8c),_0xde5299(0x101)+_0x5861eb+'\x22.');}if(_0x58b200==='update'&&Object[_0xde5299(0xcb)](_0x89123f)[_0xde5299(0x103)]===0x0)throw notificationError(_0xde5299(0xcc),_0xde5299(0xa9));const _0x450f42={};if(hasOwn(_0x89123f,_0xde5299(0xb9)))_0x450f42['configName']=validateRequiredString(_0x89123f[_0xde5299(0xb9)],_0xde5299(0xb9),0x80);else{if(_0x58b200===_0xde5299(0xa1))throw notificationError(_0xde5299(0xb2),_0xde5299(0x92)+'\x22configName\x22.');}if(hasOwn(_0x89123f,_0xde5299(0xf6))){if(typeof _0x89123f[_0xde5299(0xf6)]!==_0xde5299(0x105))throw invalidFieldType('channelType',_0xde5299(0xec));const _0x51842f=_0x89123f[_0xde5299(0xf6)][_0xde5299(0x10c)]();if(!NOTIFICATION_CHANNEL_TYPES[_0xde5299(0xf7)](_0x51842f))throw notificationError(_0xde5299(0x8e),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0xde5299(0xa0)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x450f42[_0xde5299(0xf6)]=_0x51842f;}else{if(_0x58b200===_0xde5299(0xa1))throw notificationError(_0xde5299(0xb2),_0xde5299(0x92)+_0xde5299(0xa7));}for(const [_0x35aa34,_0x2fb94c]of[[_0xde5299(0xc8),0x200],[_0xde5299(0xef),0x100]]){if(!hasOwn(_0x89123f,_0x35aa34))continue;const _0x5c7e91=_0x89123f[_0x35aa34];if(_0x5c7e91!==null&&typeof _0x5c7e91!==_0xde5299(0x105))throw invalidFieldType(_0x35aa34,_0xde5299(0xce));if(typeof _0x5c7e91==='string'&&_0x5c7e91[_0xde5299(0x103)]>_0x2fb94c)throw notificationError(_0xde5299(0x8e),_0xde5299(0x10b)+_0x35aa34+_0xde5299(0xe6)+_0x2fb94c+_0xde5299(0xbf));_0x450f42[_0x35aa34]=_0x5c7e91;}if(hasOwn(_0x89123f,_0xde5299(0xd4))){const _0xdc7585=_0x89123f[_0xde5299(0xd4)];if(_0xdc7585===null&&_0x58b200===_0xde5299(0xa1))throw invalidFieldType(_0xde5299(0xd4),_0xde5299(0xc3));if(_0xdc7585!==null&&!isJsonObject(_0xdc7585))throw invalidFieldType(_0xde5299(0xd4),_0x58b200===_0xde5299(0xab)?_0xde5299(0xc0):'a\x20JSON\x20object');_0xdc7585!==null&&validateChannelConfigFields(_0x450f42['channelType'],_0xdc7585),_0x450f42[_0xde5299(0xd4)]=_0xdc7585;}for(const _0x4c6286 of['connectTimeout',_0xde5299(0xd6)]){if(!hasOwn(_0x89123f,_0x4c6286))continue;const _0x218268=_0x89123f[_0x4c6286];if(_0x218268!==null&&(!Number['isSafeInteger'](_0x218268)||_0x218268<0x0))throw notificationError(_0xde5299(0x8e),_0xde5299(0x10b)+_0x4c6286+_0xde5299(0xc2));_0x450f42[_0x4c6286]=_0x218268;}return _0x450f42;}function validateRequiredString(_0x152237,_0x3f0732,_0x177ddb){const _0x2d92dd=a181_0x47f2aa;if(typeof _0x152237!==_0x2d92dd(0x105))throw invalidFieldType(_0x3f0732,'a\x20non-empty\x20string');const _0x40fd8b=_0x152237[_0x2d92dd(0x10c)]();if(!_0x40fd8b)throw notificationError('notification_config_field_invalid',_0x2d92dd(0x10b)+_0x3f0732+_0x2d92dd(0xe5));if(_0x40fd8b[_0x2d92dd(0x103)]>_0x177ddb)throw notificationError(_0x2d92dd(0x8e),_0x2d92dd(0x10b)+_0x3f0732+'\x22\x20cannot\x20exceed\x20'+_0x177ddb+_0x2d92dd(0xbf));return _0x40fd8b;}function validateChannelConfigFields(_0x4acfaa,_0x325ced){const _0x1b5537=a181_0x47f2aa;if(hasOwn(_0x325ced,_0x1b5537(0xa6)))throw forbiddenChannelConfigField(_0x1b5537(0xa6));if(_0x4acfaa===_0x1b5537(0xfd))for(const _0x7a3eb4 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x325ced,_0x7a3eb4))throw forbiddenChannelConfigField(_0x7a3eb4);}}function forbiddenChannelConfigField(_0x5e8c0c){const _0x5159da=a181_0x47f2aa;return notificationError('notification_config_channel_field_forbidden',_0x5159da(0xb4)+_0x5e8c0c+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x36f4c5,_0x4a93c4){const _0x473ef7=a181_0x47f2aa;return notificationError('notification_config_field_invalid',_0x473ef7(0x10b)+_0x36f4c5+_0x473ef7(0xdd)+_0x4a93c4+'.');}function serializeChannelConfig(_0x2faa94){const _0x3f1bf0=a181_0x47f2aa;return _0x2faa94===null||_0x2faa94===undefined?null:JSON[_0x3f1bf0(0xe9)](_0x2faa94);}function redactSensitive(_0x4af543){const _0x202dca=a181_0x47f2aa;return _0x4af543===null||_0x4af543===undefined||_0x4af543===''?null:_0x202dca(0x102);}function requireResponseString(_0x10e143,_0x1a4fa5,_0x45a998){const _0x427072=a181_0x47f2aa;if(typeof _0x10e143!==_0x427072(0x105)||_0x10e143[_0x427072(0x10c)]()==='')throw CliErrors[_0x427072(0xdb)](_0x427072(0x109),_0x427072(0xe8)+(_0x45a998+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x1a4fa5+'\x22.');return _0x10e143['trim']();}function requireExactString(_0x3cd457,_0x1e5104,_0x40c8f7){const _0x2a256b=a181_0x47f2aa;if(typeof _0x3cd457!==_0x2a256b(0x105)||_0x3cd457[_0x2a256b(0x10c)]()==='')throw notificationError(_0x2a256b(0xcd),_0x2a256b(0xd8)+_0x40c8f7+_0x2a256b(0xb6)+_0x1e5104+'\x22.');return _0x3cd457[_0x2a256b(0x10c)]();}function responseNullableString(_0x2723f2,_0x4361c8,_0x24b406){const _0x1d853f=a181_0x47f2aa;if(_0x2723f2===undefined||_0x2723f2===null)return null;if(typeof _0x2723f2!==_0x1d853f(0x105))throw notificationError(_0x1d853f(0xcd),'Notification\x20config\x20'+_0x24b406+_0x1d853f(0xf4)+_0x4361c8+'\x22.');return _0x2723f2;}function responseNullableTimeout(_0x588cfa,_0x397aea,_0x18aef0){const _0x464e49=a181_0x47f2aa;if(_0x588cfa===undefined||_0x588cfa===null)return null;if(!Number[_0x464e49(0xba)](_0x588cfa)||_0x588cfa<0x0)throw notificationError('notification_config_response_invalid',_0x464e49(0xd8)+_0x18aef0+'\x20has\x20invalid\x20field\x20\x22'+_0x397aea+'\x22.');return _0x588cfa;}function normalizeNullableString(_0x1fb2f1){const _0x54d7c9=a181_0x47f2aa;return typeof _0x1fb2f1===_0x54d7c9(0x105)?_0x1fb2f1:null;}function isJsonObject(_0x22ff7e){const _0x2f1d9f=a181_0x47f2aa;return _0x22ff7e!==null&&typeof _0x22ff7e===_0x2f1d9f(0xb3)&&!Array['isArray'](_0x22ff7e);}function hasOwn(_0x1cbcf1,_0x346bf2){const _0x16db0a=a181_0x47f2aa;return Object[_0x16db0a(0xd5)][_0x16db0a(0xff)][_0x16db0a(0xf0)](_0x1cbcf1,_0x346bf2);}async function readStdin(){const _0x1f2ce8=a181_0x47f2aa;let _0x19ded0='';process['stdin'][_0x1f2ce8(0x104)]('utf8');for await(const _0x5757e4 of process[_0x1f2ce8(0xfa)])_0x19ded0+=_0x5757e4;return _0x19ded0;}
|
|
1
|
+
const a186_0x89cf5a=a186_0x1644;(function(_0x1b9854,_0x39e182){const _0x4cf98a=a186_0x1644,_0x2674e2=_0x1b9854();while(!![]){try{const _0x23c79c=-parseInt(_0x4cf98a(0x1b7))/0x1*(parseInt(_0x4cf98a(0x1dc))/0x2)+-parseInt(_0x4cf98a(0x1ac))/0x3*(-parseInt(_0x4cf98a(0x1c5))/0x4)+-parseInt(_0x4cf98a(0x1d5))/0x5*(parseInt(_0x4cf98a(0x1d3))/0x6)+parseInt(_0x4cf98a(0x1f4))/0x7*(parseInt(_0x4cf98a(0x19b))/0x8)+parseInt(_0x4cf98a(0x1f2))/0x9*(-parseInt(_0x4cf98a(0x1de))/0xa)+parseInt(_0x4cf98a(0x1df))/0xb+parseInt(_0x4cf98a(0x1c9))/0xc*(-parseInt(_0x4cf98a(0x198))/0xd);if(_0x23c79c===_0x39e182)break;else _0x2674e2['push'](_0x2674e2['shift']());}catch(_0x1e7ac1){_0x2674e2['push'](_0x2674e2['shift']());}}}(a186_0x34f0,0x93769));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=[a186_0x89cf5a(0x1bf),a186_0x89cf5a(0x1a0),a186_0x89cf5a(0x1ec),a186_0x89cf5a(0x216),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName',a186_0x89cf5a(0x1ba),a186_0x89cf5a(0x1e1),a186_0x89cf5a(0x212),a186_0x89cf5a(0x1b3),'connectTimeout',a186_0x89cf5a(0x1c0)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a186_0x89cf5a(0x1ad),a186_0x89cf5a(0x1f0),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a186_0x89cf5a(0x1f9),a186_0x89cf5a(0x1a1),a186_0x89cf5a(0x1fd),a186_0x89cf5a(0x1b1),a186_0x89cf5a(0x206),'subjectPrefix',a186_0x89cf5a(0x205),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a186_0x89cf5a(0x1cd),'type':a186_0x89cf5a(0x1ab),'required':![],'description':a186_0x89cf5a(0x1b8)},{'name':a186_0x89cf5a(0x1a4),'type':a186_0x89cf5a(0x1e3),'required':![],'default':![],'description':a186_0x89cf5a(0x219)},{'name':a186_0x89cf5a(0x1ee),'type':a186_0x89cf5a(0x1ab),'required':![],'description':a186_0x89cf5a(0x1ed)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a186_0x89cf5a(0x1c7),'required':!![],'description':a186_0x89cf5a(0x197)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;function a186_0x34f0(){const _0x204a52=['a\x20supported\x20string','\x22channelType\x22.','Notification\x20config\x20list\x20item\x20','Application-level\x20notification\x20config\x20ID','13DhEUtX','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','dry-run','16PVDYZU','includes','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','preflight','has','FEISHU','recipients','\x22\x20is\x20forbidden.','num','stdin','Invalid\x20notification\x20config\x20response.','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x20--format\x20compress','\x22configName\x22.','a\x20string\x20or\x20null','name','string','3ixWMHY','appCode','yes','stringify','path','bccList','\x20has\x20invalid\x20field\x20\x22','description','kind','notification_config_field_unknown','notification_config_confirmation_required','383419zWKRjo','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','environment\x20variable\x20','channelType','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20must\x20be\x20an\x20object.','messageTemplate','Item\x20','EMAIL','readTimeout','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Notification\x20JSON\x20field\x20\x22','notification_config_source_unavailable','\x20is\x20invalid.','3900604alDGZq','createTime','number','notification_config_json_invalid','6556692zhrdIL','\x20has\x20an\x20invalid\x20id.','\x22\x20cannot\x20exceed\x20','Create\x20JSON\x20requires\x20field\x20','file','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','\x20--type\x20','\x20is\x20missing\x20required\x20field\x20\x22','\x20characters.','isSafeInteger','15522JdmKiI','env','455jiLIrR','failed','channelConfigRaw','push','\x20has\x20an\x20invalid\x20channelType.','notification_config_field_required','\x20has\x20an\x20unsupported\x20channelType.','2QoPDJq','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','10110zRLxUD','11434489hTbGRM','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','endpointUrl','endpointUrlRaw','boolean','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','<redacted>','configName','Notification\x20config\x20','_unavailable','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','object','call','DINGTALK','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','from-env','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','configCode','notification_config_field_invalid','6138swbCaB','isArray','1554308DWdMuc','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x22\x20must\x20be\x20','entries','emailTargets','notification_config_channel_field_forbidden','Allowed\x20values:\x20','bool','ccList','str','notification_config_id_invalid','type','file\x20','updateTime','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','Notification\x20JSON\x20channelConfig\x20field\x20\x22','fromName','replyTo','endpointUrl:null','connectTimeout','validation','update','parse','some','setEncoding','Invalid\x20--','join','every','trim','channelConfig','\x22\x20must\x20be\x20a\x20non-empty\x20string.','utf8','notification_config_response_invalid','WECOM','apiError','create','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','notification_config_','keys','a\x20JSON\x20object','prototype','notification_config_update_empty','length'];a186_0x34f0=function(){return _0x204a52;};return a186_0x34f0();}export function notificationError(_0x595ee1,_0x1bf6a0,_0x361bf0){return new CliError(_0x595ee1,0x1,_0x1bf6a0,_0x361bf0);}export function readNotificationId(_0x26f95f){const _0x3fccb4=a186_0x89cf5a,_0x23e534=_0x26f95f[_0x3fccb4(0x1a3)]('id');if(!Number[_0x3fccb4(0x1d2)](_0x23e534)||_0x23e534<=0x0)throw notificationError(_0x3fccb4(0x1ff),_0x3fccb4(0x1e0));return _0x23e534;}export function requireNotificationExplicitYes(_0x39c2ca){const _0x572ea6=a186_0x89cf5a;if(_0x39c2ca[_0x572ea6(0x1fc)](_0x572ea6(0x19a))||_0x39c2ca[_0x572ea6(0x1fc)](_0x572ea6(0x1ae)))return;throw notificationError(_0x572ea6(0x1b6),_0x572ea6(0x199),_0x572ea6(0x19d));}export function readNotificationChannelType(_0x42ac9a,_0x1c234b=a186_0x89cf5a(0x200),_0x321a92=a186_0x89cf5a(0x1bf)){const _0x8f0a82=a186_0x89cf5a,_0x310715=_0x42ac9a[_0x8f0a82(0x1fe)](_0x1c234b)[_0x8f0a82(0x211)]()||_0x321a92;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x310715))throw CliErrors[_0x8f0a82(0x209)](_0x8f0a82(0x20e)+_0x1c234b+':\x20'+_0x310715,_0x8f0a82(0x1fb)+NOTIFICATION_CHANNEL_TYPES[_0x8f0a82(0x20f)](',\x20')+'.');return _0x310715;}export function assertSingleNotificationSource(_0x372dcf){const _0x5044d1=a186_0x89cf5a,_0xdf748f=[],_0x5634db=_0x372dcf[_0x5044d1(0x1fe)](_0x5044d1(0x1cd))[_0x5044d1(0x211)]();if(_0x5634db)_0xdf748f[_0x5044d1(0x1d8)]({'kind':'file','path':_0x5634db});if(_0x372dcf['bool'](_0x5044d1(0x1a4)))_0xdf748f[_0x5044d1(0x1d8)]({'kind':_0x5044d1(0x1a4)});const _0x5cded7=_0x372dcf[_0x5044d1(0x1fe)](_0x5044d1(0x1ee))[_0x5044d1(0x211)]();if(_0x5cded7)_0xdf748f[_0x5044d1(0x1d8)]({'kind':_0x5044d1(0x1d4),'name':_0x5cded7});if(_0xdf748f['length']===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0x5044d1(0x1ef));if(_0xdf748f['length']>0x1)throw CliErrors[_0x5044d1(0x209)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x5044d1(0x1ef));return _0xdf748f[0x0];}export async function readNotificationDocument(_0x5d7205,_0x558c35){const _0x45d124=a186_0x89cf5a,_0x2eb963=assertSingleNotificationSource(_0x5d7205),_0x5341e5=_0x2eb963[_0x45d124(0x1b4)]===_0x45d124(0x1cd)?_0x45d124(0x201)+_0x2eb963[_0x45d124(0x1b0)]:_0x2eb963[_0x45d124(0x1b4)]==='env'?_0x45d124(0x1b9)+_0x2eb963[_0x45d124(0x1aa)]:_0x45d124(0x1a4);let _0x4b2c26;try{if(_0x2eb963[_0x45d124(0x1b4)]==='file')_0x4b2c26=await readFile(_0x2eb963[_0x45d124(0x1b0)],_0x45d124(0x214));else{if(_0x2eb963[_0x45d124(0x1b4)]===_0x45d124(0x1d4)){if(!(_0x2eb963[_0x45d124(0x1aa)]in process.env))throw notificationError('notification_config_source_unavailable',_0x45d124(0x1c1)+_0x2eb963[_0x45d124(0x1aa)]);_0x4b2c26=process.env[_0x2eb963.name]??'';}else _0x4b2c26=await readStdin();}}catch(_0x273fdc){if(_0x273fdc instanceof CliError)throw _0x273fdc;throw notificationError(_0x45d124(0x1c3),_0x45d124(0x1dd)+_0x5341e5+'.');}let _0x43caca;try{_0x43caca=JSON[_0x45d124(0x20b)](_0x4b2c26);}catch{throw notificationError(_0x45d124(0x1c8),'Notification\x20JSON\x20from\x20'+_0x5341e5+_0x45d124(0x1c4),_0x45d124(0x1f6));}if(!isJsonObject(_0x43caca))throw notificationError(_0x45d124(0x1c8),'Notification\x20JSON\x20from\x20'+_0x5341e5+_0x45d124(0x1bc));return validateNotificationDocument(_0x43caca,_0x558c35);}export function projectNotificationListConfig(_0x524c3c,_0x534c98){const _0x2309cc=a186_0x89cf5a;return{'id':typeof _0x524c3c['id']===_0x2309cc(0x1c7)?_0x524c3c['id']:null,'configCode':requireResponseString(_0x524c3c[_0x2309cc(0x1f0)],_0x2309cc(0x1f0),_0x534c98),'configName':requireResponseString(_0x524c3c[_0x2309cc(0x1e6)],_0x2309cc(0x1e6),_0x534c98),'channelType':requireResponseString(_0x524c3c['channelType'],'channelType',_0x534c98),'description':normalizeNullableString(_0x524c3c['description']),'createTime':normalizeNullableString(_0x524c3c[_0x2309cc(0x1c6)]),'updateTime':normalizeNullableString(_0x524c3c[_0x2309cc(0x202)])};}export function normalizeExactNotificationConfig(_0x2dbc2a,_0x82b5d2,_0x2b58d3){const _0x6e5fc6=a186_0x89cf5a;if(!Number[_0x6e5fc6(0x1d2)](_0x2dbc2a['id'])||_0x2dbc2a['id']!==_0x82b5d2)throw notificationError(_0x6e5fc6(0x215),_0x6e5fc6(0x1f5)+_0x82b5d2+'.');if(_0x2dbc2a[_0x6e5fc6(0x1ad)]!==_0x2b58d3)throw notificationError(_0x6e5fc6(0x215),_0x6e5fc6(0x1e7)+_0x82b5d2+_0x6e5fc6(0x1a6));const _0x193698=requireExactString(_0x2dbc2a[_0x6e5fc6(0x1e6)],_0x6e5fc6(0x1e6),_0x82b5d2),_0x2ec148=requireExactString(_0x2dbc2a[_0x6e5fc6(0x1f0)],_0x6e5fc6(0x1f0),_0x82b5d2),_0x1bba2c=requireExactString(_0x2dbc2a[_0x6e5fc6(0x1ba)],'channelType',_0x82b5d2);if(!NOTIFICATION_CHANNEL_TYPES[_0x6e5fc6(0x19c)](_0x1bba2c))throw notificationError('notification_config_response_invalid',_0x6e5fc6(0x1e7)+_0x82b5d2+_0x6e5fc6(0x1db));const _0x5f2c0e=responseNullableString(_0x2dbc2a[_0x6e5fc6(0x1e1)],'endpointUrl',_0x82b5d2),_0x304e86=responseNullableString(_0x2dbc2a['channelConfig'],_0x6e5fc6(0x212),_0x82b5d2),_0x1b0900=responseNullableString(_0x2dbc2a['description'],'description',_0x82b5d2),_0x36fea8=responseNullableTimeout(_0x2dbc2a[_0x6e5fc6(0x208)],_0x6e5fc6(0x208),_0x82b5d2),_0x5a5dd8=responseNullableTimeout(_0x2dbc2a[_0x6e5fc6(0x1c0)],_0x6e5fc6(0x1c0),_0x82b5d2);return{'id':_0x82b5d2,'appCode':_0x2b58d3,'configCode':_0x2ec148,'configName':_0x193698,'channelType':_0x1bba2c,'endpointUrl':redactSensitive(_0x5f2c0e),'channelConfig':redactSensitive(_0x304e86),'description':_0x1b0900,'connectTimeout':_0x36fea8,'readTimeout':_0x5a5dd8,'endpointUrlRaw':_0x5f2c0e,'channelConfigRaw':_0x304e86};}export async function requireExactNotificationConfig(_0x39b1b4,_0x1187e2,_0x453c18){const _0x21cc76=a186_0x89cf5a;let _0x555abe;try{_0x555abe=await getNotificationChannelConfig(_0x1187e2,_0x39b1b4);}catch{throw safeApiFailure(_0x453c18,_0x21cc76(0x19e),_0x21cc76(0x1bb)+_0x39b1b4+_0x21cc76(0x203));}return normalizeExactNotificationConfig(_0x555abe,_0x1187e2,_0x39b1b4);}export function projectNotificationConfig(_0x36eee2){const _0x4ea3c6=a186_0x89cf5a;return{'id':_0x36eee2['id']??null,'appCode':_0x36eee2['appCode'],'configCode':_0x36eee2[_0x4ea3c6(0x1f0)]??null,'configName':_0x36eee2['configName'],'channelType':_0x36eee2[_0x4ea3c6(0x1ba)],'endpointUrl':redactSensitive(_0x36eee2[_0x4ea3c6(0x1e1)]),'channelConfig':redactSensitive(_0x36eee2[_0x4ea3c6(0x212)]),'description':_0x36eee2[_0x4ea3c6(0x1b3)]??null,'connectTimeout':_0x36eee2['connectTimeout']??null,'readTimeout':_0x36eee2['readTimeout']??null};}export function notificationSelector(_0x2af966){const _0x1bcbea=a186_0x89cf5a;return{'appCode':_0x2af966[_0x1bcbea(0x1ad)],'id':_0x2af966['id'],'configCode':_0x2af966[_0x1bcbea(0x1f0)],'configName':_0x2af966[_0x1bcbea(0x1e6)],'channelType':_0x2af966[_0x1bcbea(0x1ba)]};}export function createMutationInput(_0x23ba9e,_0x54a571){const _0x15deed=a186_0x89cf5a;return{'appCode':_0x23ba9e,'configName':_0x54a571[_0x15deed(0x1e6)],'channelType':_0x54a571[_0x15deed(0x1ba)],...hasOwn(_0x54a571,_0x15deed(0x1e1))?{'endpointUrl':_0x54a571[_0x15deed(0x1e1)]}:{},...hasOwn(_0x54a571,_0x15deed(0x212))?{'channelConfig':serializeChannelConfig(_0x54a571[_0x15deed(0x212)])}:{},...hasOwn(_0x54a571,_0x15deed(0x1b3))?{'description':_0x54a571[_0x15deed(0x1b3)]}:{},...hasOwn(_0x54a571,_0x15deed(0x208))?{'connectTimeout':_0x54a571[_0x15deed(0x208)]}:{},...hasOwn(_0x54a571,_0x15deed(0x1c0))?{'readTimeout':_0x54a571[_0x15deed(0x1c0)]}:{}};}function a186_0x1644(_0x34605a,_0x5cd53f){_0x34605a=_0x34605a-0x193;const _0x34f038=a186_0x34f0();let _0x1644d4=_0x34f038[_0x34605a];return _0x1644d4;}export function mergeUpdateInput(_0x5ee2a3,_0x509d79){const _0x39d938=a186_0x89cf5a;return{'id':_0x5ee2a3['id'],'appCode':_0x5ee2a3['appCode'],'configName':_0x509d79[_0x39d938(0x1e6)]??_0x5ee2a3[_0x39d938(0x1e6)],'channelType':_0x509d79['channelType']??_0x5ee2a3['channelType'],'endpointUrl':hasOwn(_0x509d79,_0x39d938(0x1e1))?_0x509d79[_0x39d938(0x1e1)]:_0x5ee2a3[_0x39d938(0x1e2)],'channelConfig':hasOwn(_0x509d79,'channelConfig')?serializeChannelConfig(_0x509d79[_0x39d938(0x212)]):_0x5ee2a3[_0x39d938(0x1d7)],'description':hasOwn(_0x509d79,_0x39d938(0x1b3))?_0x509d79['description']:_0x5ee2a3['description'],'connectTimeout':hasOwn(_0x509d79,_0x39d938(0x208))?_0x509d79[_0x39d938(0x208)]:_0x5ee2a3[_0x39d938(0x208)],'readTimeout':hasOwn(_0x509d79,_0x39d938(0x1c0))?_0x509d79['readTimeout']:_0x5ee2a3[_0x39d938(0x1c0)]};}export function plannedUpdateProjection(_0x2e763d,_0x17e75b){const _0x25e983=a186_0x89cf5a;return projectNotificationConfig({'id':_0x2e763d['id'],'appCode':_0x2e763d['appCode'],'configCode':_0x2e763d['configCode'],'configName':_0x17e75b[_0x25e983(0x1e6)]??_0x2e763d[_0x25e983(0x1e6)],'channelType':_0x17e75b[_0x25e983(0x1ba)]??_0x2e763d[_0x25e983(0x1ba)],'endpointUrl':hasOwn(_0x17e75b,_0x25e983(0x1e1))?_0x17e75b[_0x25e983(0x1e1)]:_0x2e763d['endpointUrlRaw'],'channelConfig':hasOwn(_0x17e75b,'channelConfig')?_0x17e75b[_0x25e983(0x212)]:_0x2e763d[_0x25e983(0x1d7)],'description':hasOwn(_0x17e75b,_0x25e983(0x1b3))?_0x17e75b[_0x25e983(0x1b3)]:_0x2e763d[_0x25e983(0x1b3)],'connectTimeout':hasOwn(_0x17e75b,'connectTimeout')?_0x17e75b['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x2e763d['connectTimeout'],'readTimeout':hasOwn(_0x17e75b,_0x25e983(0x1c0))?_0x17e75b[_0x25e983(0x1c0)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x2e763d[_0x25e983(0x1c0)]});}export function requestedSafeFieldsMatch(_0x444618,_0x5bb8c7,_0x4cebf0){const _0x452fcb=a186_0x89cf5a,_0x44f8af=[],_0x69b072=[],_0x5b2739=[];for(const _0x36d011 of['configName',_0x452fcb(0x1ba),'description']){if(!hasOwn(_0x4cebf0,_0x36d011))continue;_0x5b2739[_0x452fcb(0x1d8)](_0x36d011),_0x44f8af[_0x452fcb(0x1d8)](_0x5bb8c7[_0x36d011]===_0x4cebf0[_0x36d011]),_0x69b072[_0x452fcb(0x1d8)](_0x444618[_0x36d011]!==_0x4cebf0[_0x36d011]&&_0x5bb8c7[_0x36d011]===_0x4cebf0[_0x36d011]);}for(const _0x80c05c of[_0x452fcb(0x208),_0x452fcb(0x1c0)]){if(!hasOwn(_0x4cebf0,_0x80c05c))continue;const _0x4f1d43=_0x4cebf0[_0x80c05c]??(_0x80c05c===_0x452fcb(0x208)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x5b2739['push'](_0x80c05c),_0x44f8af['push'](_0x5bb8c7[_0x80c05c]===_0x4f1d43),_0x69b072['push'](_0x444618[_0x80c05c]!==_0x4f1d43&&_0x5bb8c7[_0x80c05c]===_0x4f1d43);}return hasOwn(_0x4cebf0,'endpointUrl')&&_0x4cebf0[_0x452fcb(0x1e1)]===null&&(_0x5b2739['push'](_0x452fcb(0x207)),_0x44f8af[_0x452fcb(0x1d8)](_0x5bb8c7[_0x452fcb(0x1e2)]===null||_0x5bb8c7[_0x452fcb(0x1e2)]===''),_0x69b072[_0x452fcb(0x1d8)](_0x444618[_0x452fcb(0x1e2)]!==null&&_0x444618[_0x452fcb(0x1e2)]!==''&&(_0x5bb8c7[_0x452fcb(0x1e2)]===null||_0x5bb8c7[_0x452fcb(0x1e2)]===''))),{'allMatch':_0x44f8af[_0x452fcb(0x210)](Boolean),'provesChange':_0x69b072[_0x452fcb(0x20c)](Boolean),'verifiedFields':_0x5b2739};}export function validateNotificationDeleteReadback(_0xa753db,_0x4e2036,_0x31cd49){const _0x2808bd=a186_0x89cf5a;for(const [_0x46eefd,_0x2eefa9]of _0xa753db[_0x2808bd(0x1f8)]()){if(!Number['isSafeInteger'](_0x2eefa9['id'])||_0x2eefa9['id']<=0x0)throw notificationError(_0x2808bd(0x215),_0x2808bd(0x196)+(_0x46eefd+0x1)+_0x2808bd(0x1ca));if(_0x2eefa9[_0x2808bd(0x1ad)]!==_0x4e2036)throw notificationError(_0x2808bd(0x215),_0x2808bd(0x196)+(_0x46eefd+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x2eefa9[_0x2808bd(0x1ba)]!==_0x31cd49)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x46eefd+0x1)+_0x2808bd(0x1d9));}}export function safeApiFailure(_0x995fe5,_0x43b38a,_0xa22385){const _0x12ae9d=a186_0x89cf5a;return notificationError(_0x12ae9d(0x21a)+_0x995fe5+'_'+(_0x43b38a==='mutation'?_0x12ae9d(0x1d6):_0x43b38a+_0x12ae9d(0x1e8)),_0x12ae9d(0x1e7)+_0x995fe5+'\x20'+_0x43b38a+'\x20failed.',_0xa22385);}export function notificationLookupCommand(_0x22a3ff,_0x107d79){const _0x973c17=a186_0x89cf5a;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x22a3ff+_0x973c17(0x1cf)+_0x107d79+_0x973c17(0x1a7);}function validateNotificationDocument(_0x4acaf9,_0x10dd20){const _0x505797=a186_0x89cf5a;for(const _0x4aab75 of Object[_0x505797(0x21b)](_0x4acaf9)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x4aab75))throw notificationError('notification_config_field_forbidden',_0x505797(0x1c2)+_0x4aab75+_0x505797(0x1ce));if(!ALLOWED_INPUT_FIELDS[_0x505797(0x19f)](_0x4aab75))throw notificationError(_0x505797(0x1b5),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x4aab75+'\x22.');}if(_0x10dd20===_0x505797(0x20a)&&Object[_0x505797(0x21b)](_0x4acaf9)['length']===0x0)throw notificationError(_0x505797(0x21e),_0x505797(0x1e4));const _0x438983={};if(hasOwn(_0x4acaf9,'configName'))_0x438983['configName']=validateRequiredString(_0x4acaf9[_0x505797(0x1e6)],_0x505797(0x1e6),0x80);else{if(_0x10dd20===_0x505797(0x218))throw notificationError(_0x505797(0x1da),_0x505797(0x1cc)+_0x505797(0x1a8));}if(hasOwn(_0x4acaf9,'channelType')){if(typeof _0x4acaf9['channelType']!=='string')throw invalidFieldType(_0x505797(0x1ba),_0x505797(0x194));const _0xe72d39=_0x4acaf9[_0x505797(0x1ba)]['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x505797(0x19c)](_0xe72d39))throw notificationError(_0x505797(0x1f1),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x505797(0x1fb)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x438983['channelType']=_0xe72d39;}else{if(_0x10dd20==='create')throw notificationError(_0x505797(0x1da),_0x505797(0x1cc)+_0x505797(0x195));}for(const [_0xbc68f4,_0xb2f4c3]of[[_0x505797(0x1e1),0x200],['description',0x100]]){if(!hasOwn(_0x4acaf9,_0xbc68f4))continue;const _0x22bb98=_0x4acaf9[_0xbc68f4];if(_0x22bb98!==null&&typeof _0x22bb98!==_0x505797(0x1ab))throw invalidFieldType(_0xbc68f4,_0x505797(0x1a9));if(typeof _0x22bb98===_0x505797(0x1ab)&&_0x22bb98[_0x505797(0x193)]>_0xb2f4c3)throw notificationError('notification_config_field_invalid',_0x505797(0x1c2)+_0xbc68f4+'\x22\x20cannot\x20exceed\x20'+_0xb2f4c3+_0x505797(0x1d1));_0x438983[_0xbc68f4]=_0x22bb98;}if(hasOwn(_0x4acaf9,_0x505797(0x212))){const _0x1578a1=_0x4acaf9[_0x505797(0x212)];if(_0x1578a1===null&&_0x10dd20==='create')throw invalidFieldType('channelConfig',_0x505797(0x21c));if(_0x1578a1!==null&&!isJsonObject(_0x1578a1))throw invalidFieldType(_0x505797(0x212),_0x10dd20==='update'?'a\x20JSON\x20object\x20or\x20null':_0x505797(0x21c));_0x1578a1!==null&&validateChannelConfigFields(_0x438983[_0x505797(0x1ba)],_0x1578a1),_0x438983[_0x505797(0x212)]=_0x1578a1;}for(const _0x1d6bb7 of[_0x505797(0x208),'readTimeout']){if(!hasOwn(_0x4acaf9,_0x1d6bb7))continue;const _0x4dcf85=_0x4acaf9[_0x1d6bb7];if(_0x4dcf85!==null&&(!Number[_0x505797(0x1d2)](_0x4dcf85)||_0x4dcf85<0x0))throw notificationError(_0x505797(0x1f1),_0x505797(0x1c2)+_0x1d6bb7+_0x505797(0x1e9));_0x438983[_0x1d6bb7]=_0x4dcf85;}return _0x438983;}function validateRequiredString(_0x115fd1,_0x548a50,_0x31156d){const _0x46b0b2=a186_0x89cf5a;if(typeof _0x115fd1!=='string')throw invalidFieldType(_0x548a50,'a\x20non-empty\x20string');const _0x5c80d3=_0x115fd1['trim']();if(!_0x5c80d3)throw notificationError(_0x46b0b2(0x1f1),_0x46b0b2(0x1c2)+_0x548a50+_0x46b0b2(0x213));if(_0x5c80d3['length']>_0x31156d)throw notificationError('notification_config_field_invalid',_0x46b0b2(0x1c2)+_0x548a50+_0x46b0b2(0x1cb)+_0x31156d+_0x46b0b2(0x1d1));return _0x5c80d3;}function validateChannelConfigFields(_0x4edc89,_0x4398da){const _0x843389=a186_0x89cf5a;if(hasOwn(_0x4398da,_0x843389(0x1bd)))throw forbiddenChannelConfigField('messageTemplate');if(_0x4edc89==='EMAIL')for(const _0x9aaf99 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x4398da,_0x9aaf99))throw forbiddenChannelConfigField(_0x9aaf99);}}function forbiddenChannelConfigField(_0x4acdfb){const _0x5c7718=a186_0x89cf5a;return notificationError(_0x5c7718(0x1fa),_0x5c7718(0x204)+_0x4acdfb+_0x5c7718(0x1a2));}function invalidFieldType(_0x43f383,_0x25c04a){const _0x3559a0=a186_0x89cf5a;return notificationError(_0x3559a0(0x1f1),_0x3559a0(0x1c2)+_0x43f383+_0x3559a0(0x1f7)+_0x25c04a+'.');}function serializeChannelConfig(_0x1658e1){const _0x341308=a186_0x89cf5a;return _0x1658e1===null||_0x1658e1===undefined?null:JSON[_0x341308(0x1af)](_0x1658e1);}function redactSensitive(_0x2d49b5){const _0x5d8720=a186_0x89cf5a;return _0x2d49b5===null||_0x2d49b5===undefined||_0x2d49b5===''?null:_0x5d8720(0x1e5);}function requireResponseString(_0x255c01,_0x445904,_0x68320a){const _0x5ab0aa=a186_0x89cf5a;if(typeof _0x255c01!=='string'||_0x255c01[_0x5ab0aa(0x211)]()==='')throw CliErrors[_0x5ab0aa(0x217)](_0x5ab0aa(0x1a5),_0x5ab0aa(0x1be)+(_0x68320a+0x1)+_0x5ab0aa(0x1d0)+_0x445904+'\x22.');return _0x255c01[_0x5ab0aa(0x211)]();}function requireExactString(_0x320318,_0x16e049,_0xe70c7c){const _0x1ebfd9=a186_0x89cf5a;if(typeof _0x320318!==_0x1ebfd9(0x1ab)||_0x320318['trim']()==='')throw notificationError('notification_config_response_invalid',_0x1ebfd9(0x1e7)+_0xe70c7c+_0x1ebfd9(0x1d0)+_0x16e049+'\x22.');return _0x320318[_0x1ebfd9(0x211)]();}function responseNullableString(_0x37fe34,_0x113dc3,_0x70de64){const _0x55adaf=a186_0x89cf5a;if(_0x37fe34===undefined||_0x37fe34===null)return null;if(typeof _0x37fe34!==_0x55adaf(0x1ab))throw notificationError(_0x55adaf(0x215),_0x55adaf(0x1e7)+_0x70de64+_0x55adaf(0x1b2)+_0x113dc3+'\x22.');return _0x37fe34;}function responseNullableTimeout(_0x2dfd13,_0x2d5ebd,_0x2503e7){const _0x4b23ce=a186_0x89cf5a;if(_0x2dfd13===undefined||_0x2dfd13===null)return null;if(!Number[_0x4b23ce(0x1d2)](_0x2dfd13)||_0x2dfd13<0x0)throw notificationError(_0x4b23ce(0x215),_0x4b23ce(0x1e7)+_0x2503e7+_0x4b23ce(0x1b2)+_0x2d5ebd+'\x22.');return _0x2dfd13;}function normalizeNullableString(_0x53bb2e){return typeof _0x53bb2e==='string'?_0x53bb2e:null;}function isJsonObject(_0x5e49c4){const _0x116601=a186_0x89cf5a;return _0x5e49c4!==null&&typeof _0x5e49c4===_0x116601(0x1ea)&&!Array[_0x116601(0x1f3)](_0x5e49c4);}function hasOwn(_0x4f0b88,_0x18ec1e){const _0x55c2d5=a186_0x89cf5a;return Object[_0x55c2d5(0x21d)]['hasOwnProperty'][_0x55c2d5(0x1eb)](_0x4f0b88,_0x18ec1e);}async function readStdin(){const _0xbfc55b=a186_0x89cf5a;let _0x48babd='';process[_0xbfc55b(0x1a4)][_0xbfc55b(0x20d)](_0xbfc55b(0x214));for await(const _0x5d4860 of process[_0xbfc55b(0x1a4)])_0x48babd+=_0x5d4860;return _0x48babd;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a187_0x1915de=a187_0x5797;(function(_0x1d060a,_0x13090d){const _0x5c8b37=a187_0x5797,_0x3a02c5=_0x1d060a();while(!![]){try{const _0x3f185f=-parseInt(_0x5c8b37(0x210))/0x1*(parseInt(_0x5c8b37(0x215))/0x2)+parseInt(_0x5c8b37(0x1fb))/0x3*(parseInt(_0x5c8b37(0x201))/0x4)+parseInt(_0x5c8b37(0x203))/0x5+-parseInt(_0x5c8b37(0x204))/0x6+parseInt(_0x5c8b37(0x1f5))/0x7+parseInt(_0x5c8b37(0x1f6))/0x8*(-parseInt(_0x5c8b37(0x1fe))/0x9)+-parseInt(_0x5c8b37(0x206))/0xa*(parseInt(_0x5c8b37(0x211))/0xb);if(_0x3f185f===_0x13090d)break;else _0x3a02c5['push'](_0x3a02c5['shift']());}catch(_0x15a835){_0x3a02c5['push'](_0x3a02c5['shift']());}}}(a187_0x5658,0x4e11a));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=[a187_0x1915de(0x208),a187_0x1915de(0x213),a187_0x1915de(0x20f),a187_0x1915de(0x20d)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':'General','form':a187_0x1915de(0x217),'idCard':'IdCard'},SCENE_FLAG={'name':a187_0x1915de(0x1ed),'type':a187_0x1915de(0x1fc),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a187_0x1915de(0x216)},IMAGE_FILE_FLAG={'name':a187_0x1915de(0x1f9),'type':a187_0x1915de(0x1fc),'description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':a187_0x1915de(0x1f8),'type':a187_0x1915de(0x1fc),'description':a187_0x1915de(0x1f2)};function normalizeScene(_0x46d50a){const _0x330558=a187_0x1915de,_0x33b4c3=_0x46d50a[_0x330558(0x1f3)]()[_0x330558(0x20b)]();if(_0x33b4c3===_0x330558(0x21d))return _0x330558(0x20d);if(_0x33b4c3===_0x330558(0x208)||_0x33b4c3===_0x330558(0x213)||_0x33b4c3===_0x330558(0x20f))return _0x33b4c3;throw CliErrors['validation'](_0x330558(0x1eb)+_0x46d50a+_0x330558(0x1f0)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x59d1e4){const _0x4780ab=a187_0x1915de,_0x531c3d=_0x59d1e4[_0x4780ab(0x202)](_0x4780ab(0x1f9))[_0x4780ab(0x1f3)](),_0x337d47=_0x59d1e4['str'](_0x4780ab(0x1f8))[_0x4780ab(0x1f3)]();return{'imageFile':_0x531c3d,'imageUrl':_0x337d47,'count':[_0x531c3d,_0x337d47]['filter'](Boolean)[_0x4780ab(0x207)]};}function validateInputSelection(_0x104d83){const _0x399042=a187_0x1915de,_0x4f2b72=selectedInputs(_0x104d83);if(_0x4f2b72[_0x399042(0x205)]!==0x1)throw CliErrors['validation'](_0x399042(0x1ec));return _0x4f2b72;}function withScene(_0x44cfc0,_0xf41f60,_0x343263){const _0x3d6912=a187_0x1915de;return{..._0x44cfc0,'scene':_0xf41f60,..._0x343263?{'sourceFile':{'fileName':_0x343263['fileName'],'filePath':_0x343263[_0x3d6912(0x200)]}}:{}};}function a187_0x5797(_0x982eb1,_0x314391){_0x982eb1=_0x982eb1-0x1eb;const _0x565886=a187_0x5658();let _0x579732=_0x565886[_0x982eb1];return _0x579732;}const ocrRecognize={'service':a187_0x1915de(0x1f1),'command':'recognize','description':a187_0x1915de(0x21a),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3077e8){const _0x2abb93=a187_0x1915de,_0x10fce4=normalizeScene(_0x3077e8['str'](_0x2abb93(0x1ed))),_0x2e80d1=SCENE_TO_LEGACY_TYPE[_0x10fce4],_0x4e135b=validateInputSelection(_0x3077e8);if(_0x4e135b[_0x2abb93(0x20a)]){const _0x220157=new URLSearchParams({'url':_0x4e135b[_0x2abb93(0x20a)],'type':_0x2e80d1,'appCode':_0x3077e8['appCode']});return{'method':_0x2abb93(0x1ef),'url':_0x2abb93(0x1f4)+_0x220157['toString'](),'description':_0x2abb93(0x21c)+_0x10fce4+_0x2abb93(0x20e)};}const _0x144e15=requireDevelopmentUploadFile(_0x4e135b[_0x2abb93(0x1fd)],'image-file');return{'method':_0x2abb93(0x218),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':'POST','url':'/smartapi/common/uploadFile','body':{'appCode':_0x3077e8[_0x2abb93(0x1f7)],'multipart':{'file':_0x144e15}}},{'method':_0x2abb93(0x218),'url':'/smartapi/common/queryFileUrl','body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x2abb93(0x1ef),'url':_0x2abb93(0x214),'query':{'appCode':_0x3077e8[_0x2abb93(0x1f7)],'url':_0x2abb93(0x20c),'type':_0x2e80d1}}]},'description':_0x2abb93(0x212)+_0x10fce4+_0x2abb93(0x209)};},async 'execute'(_0x4666c0){const _0x2c43a9=a187_0x1915de,_0x4d7a76=normalizeScene(_0x4666c0[_0x2c43a9(0x202)](_0x2c43a9(0x1ed))),_0x453c02=SCENE_TO_LEGACY_TYPE[_0x4d7a76],_0x4fd8cd=validateInputSelection(_0x4666c0);if(_0x4fd8cd[_0x2c43a9(0x20a)]){const _0x4e69c1=await recognizeDevelopmentOcr(_0x4666c0[_0x2c43a9(0x1f7)],{'url':_0x4fd8cd[_0x2c43a9(0x20a)],'type':_0x453c02});return{'ok':!![],'data':withScene(_0x4e69c1,_0x4d7a76)};}const _0xa61de=requireDevelopmentUploadFile(_0x4fd8cd[_0x2c43a9(0x1fd)],_0x2c43a9(0x1f9)),_0x441afd=await uploadDevelopmentFile(_0x4666c0[_0x2c43a9(0x1f7)],_0xa61de[_0x2c43a9(0x219)]);if(!_0x441afd[_0x2c43a9(0x200)])throw CliErrors[_0x2c43a9(0x21b)](_0x2c43a9(0x1fa));const _0x201f74=await queryDevelopmentFileUrl(_0x441afd[_0x2c43a9(0x200)],{'download':![]});if(!_0x201f74['fileUrl'])throw CliErrors[_0x2c43a9(0x21b)](_0x2c43a9(0x1ee));const _0x17c967=await recognizeDevelopmentOcr(_0x4666c0[_0x2c43a9(0x1f7)],{'url':_0x201f74[_0x2c43a9(0x1ff)],'type':_0x453c02});return{'ok':!![],'data':withScene(_0x17c967,_0x4d7a76,_0x441afd)};}};export const ocrDefinitions=[ocrRecognize];function a187_0x5658(){const _0x51556a=['8elviCN','str','3002615tTsvhs','786816wDawWc','count','14710EScVnN','length','invoice','\x20OCR','imageUrl','toLowerCase','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','idCard','\x20OCR\x20from\x20URL','form','181mqTXrI','781ELBCme','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','general','/smartapi/ocr/recognize-text','4942rKUJCb','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Table','POST','path','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','apiError','Preview:\x20recognize\x20','idcard','Unsupported\x20OCR\x20scene:\x20','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','scene','File\x20URL\x20response\x20missing\x20fileUrl.','GET','.\x20Supported\x20scenes:\x20','ocr','Publicly\x20accessible\x20image\x20or\x20file\x20URL','trim','/smartapi/ocr/recognize-text?','4043186SgKyRH','8WVlcLg','appCode','image-url','image-file','File\x20upload\x20response\x20missing\x20filePath.','414813CKJEVP','string','imageFile','4068585wZmWpq','fileUrl','filePath'];a187_0x5658=function(){return _0x51556a;};return a187_0x5658();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a188_0x14ba(){const _0x2725f9=['trim','version','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','isNaN','parent-menu-id','files','write','.json','stringify','string','Would\x20create\x20Custom\x20Page\x20','createMenu','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','5575716iCKpUz','keys','page-pattern','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','DASHBOARD','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','str','create','values','\x20and\x20its\x20menu\x20entry.','isArray','object','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','328114XBKPyp','name','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','page-dir','toLowerCase','ONEPAGE','pageName\x20cannot\x20exceed\x20100\x20characters.','5095235KKxphH','compress','page-content','Invalid\x20Custom\x20Page\x20pattern:\x20','apiError','2pHYJOO','74010avenAX','utf8','some','isInteger','38859150dPTkKo','55830zEMWhI','../../../templates/custom-pages','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','/smartapi/webcode/page/create','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','CUSTOM','appCode','includes','4zBYwAK','menuPath','7928552ZNJucD','num','parse','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','603NiIBRn','pageName','now','pageId','Custom_page_','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','number','validation','parentMenuId','Created\x20Custom\x20Page\x20','7LbeZsZ','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','Custom\x20Page\x20pattern\x20not\x20found:\x20','length','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)'];a188_0x14ba=function(){return _0x2725f9;};return a188_0x14ba();}const a188_0x19fcba=a188_0x2843;(function(_0x2d251d,_0x25a509){const _0x1997f8=a188_0x2843,_0x3bfc94=_0x2d251d();while(!![]){try{const _0x50e6b3=-parseInt(_0x1997f8(0x1de))/0x1*(-parseInt(_0x1997f8(0x1d2))/0x2)+-parseInt(_0x1997f8(0x1df))/0x3*(parseInt(_0x1997f8(0x1ec))/0x4)+-parseInt(_0x1997f8(0x1d9))/0x5+-parseInt(_0x1997f8(0x20e))/0x6+parseInt(_0x1997f8(0x1fc))/0x7*(-parseInt(_0x1997f8(0x1ee))/0x8)+-parseInt(_0x1997f8(0x1f2))/0x9*(parseInt(_0x1997f8(0x1e4))/0xa)+parseInt(_0x1997f8(0x1e3))/0xb;if(_0x50e6b3===_0x25a509)break;else _0x3bfc94['push'](_0x3bfc94['shift']());}catch(_0x2bd450){_0x3bfc94['push'](_0x3bfc94['shift']());}}}(a188_0x14ba,0x7f987));import{readFile}from'node:fs/promises';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';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';function a188_0x2843(_0x5d0413,_0x4928d9){_0x5d0413=_0x5d0413-0x1c9;const _0x14ba5f=a188_0x14ba();let _0x2843e2=_0x14ba5f[_0x5d0413];return _0x2843e2;}const CUSTOM_PAGE_PATTERNS=['BLANK',a188_0x19fcba(0x1d7),a188_0x19fcba(0x1c9)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a188_0x19fcba(0x1e5));export const pageCreate={'service':'page','command':a188_0x19fcba(0x1cc),'description':a188_0x19fcba(0x1ca),'risk':a188_0x19fcba(0x207),'defaultOutputFormat':a188_0x19fcba(0x1da),'structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':'page\x20create\x20does\x20not\x20accept\x20--page-type.','hint':'This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.'},{'name':a188_0x19fcba(0x1db),'message':a188_0x19fcba(0x1f7),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':a188_0x19fcba(0x1d3),'type':'string','description':a188_0x19fcba(0x203)},{'name':'parent-menu-id','type':a188_0x19fcba(0x1f8),'description':a188_0x19fcba(0x1e8)},{'name':a188_0x19fcba(0x210),'type':a188_0x19fcba(0x20a),'description':a188_0x19fcba(0x200),'enum':CUSTOM_PAGE_PATTERNS},{'name':a188_0x19fcba(0x1d5),'type':'string','description':a188_0x19fcba(0x1fd)},APPCODE_FLAG],async 'validate'(_0x5dcadc){await readValidatedPageSource(_0x5dcadc);},async 'dryRun'(_0x3f6912){const _0x18e326=a188_0x19fcba,_0x527d9a=readInput(_0x3f6912,await readValidatedPageSource(_0x3f6912));return{'method':'POST','url':_0x18e326(0x1e7),'body':{'appCode':_0x527d9a['appCode'],'pageName':_0x527d9a[_0x18e326(0x1f3)],..._0x527d9a[_0x18e326(0x1fa)]!=null?{'parentMenuId':_0x527d9a[_0x18e326(0x1fa)]}:{},'createMenu':_0x527d9a[_0x18e326(0x20c)],'codeContent':_0x527d9a[_0x18e326(0x206)]},'description':_0x18e326(0x20b)+JSON[_0x18e326(0x209)](_0x527d9a[_0x18e326(0x1f3)])+_0x18e326(0x1ce)};},async 'execute'(_0x492eb6){const _0x182929=a188_0x19fcba,_0x180c99=readInput(_0x492eb6,await readValidatedPageSource(_0x492eb6)),_0x40ebe1=await createCustomPage(_0x180c99);if(!Number[_0x182929(0x1e2)](_0x40ebe1[_0x182929(0x1f5)])||_0x40ebe1[_0x182929(0x1f5)]<=0x0)throw CliErrors[_0x182929(0x1dd)](_0x182929(0x1e6));const _0x11ddb8=buildCustomPageDevelopmentUrl(_0x180c99['appCode'],_0x40ebe1[_0x182929(0x1ed)]),_0x31c5b4=buildCustomPageEditUrl(_0x180c99[_0x182929(0x1ea)],_0x40ebe1[_0x182929(0x1f5)]);return{'ok':!![],'data':{'operation':'page.create','pageType':_0x182929(0x1e9),'pagePattern':readPagePattern(_0x492eb6),'selector':{'appCode':_0x180c99[_0x182929(0x1ea)],'pageName':_0x180c99[_0x182929(0x1f3)]},'before':null,'after':{'pageId':_0x40ebe1[_0x182929(0x1f5)],'pageName':_0x40ebe1[_0x182929(0x1f3)],'appCode':_0x40ebe1['appCode'],'version':_0x40ebe1[_0x182929(0x202)],'menuId':_0x40ebe1['menuId'],'menuPath':_0x40ebe1[_0x182929(0x1ed)],'files':_0x40ebe1[_0x182929(0x206)]??Object[_0x182929(0x20f)](_0x180c99['files'])},'dryRun':![],'request':_0x180c99,..._0x11ddb8?{'pageUrl':_0x11ddb8}:{},..._0x31c5b4?{'editPageUrl':_0x31c5b4}:{},'warnings':_0x11ddb8?[]:[_0x182929(0x1f1)]},'message':_0x182929(0x1fb)+_0x40ebe1[_0x182929(0x1f5)]+'.'};}};function readPagePattern(_0x1c5920){const _0x3f5045=a188_0x19fcba,_0x524b0d=_0x1c5920['str'](_0x3f5045(0x210))[_0x3f5045(0x201)](),_0x1b6be4=_0x1c5920[_0x3f5045(0x1cb)](_0x3f5045(0x1d5))[_0x3f5045(0x201)]();if(_0x524b0d&&_0x1b6be4)throw CliErrors[_0x3f5045(0x1f9)]('--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.');if(_0x1b6be4)return null;if(!_0x524b0d)throw CliErrors['validation'](_0x3f5045(0x20d));if(!CUSTOM_PAGE_PATTERNS[_0x3f5045(0x1eb)](_0x524b0d))throw CliErrors[_0x3f5045(0x1f9)](_0x3f5045(0x1d4));return _0x524b0d;}async function readPageSource(_0x3cbe9){const _0x3489a1=a188_0x19fcba,_0x2bc8da=_0x3cbe9[_0x3489a1(0x1cb)]('page-dir')[_0x3489a1(0x201)](),_0x555a28=readPagePattern(_0x3cbe9);if(_0x555a28===null){const _0x1cf8ab=await readCustomPageDirectory(_0x2bc8da);if(Object[_0x3489a1(0x20f)](_0x1cf8ab)[_0x3489a1(0x1ff)]===0x0)throw CliErrors['validation'](_0x3489a1(0x1d1));return _0x1cf8ab;}let _0xb55eee;try{_0xb55eee=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x555a28[_0x3489a1(0x1d6)]()+_0x3489a1(0x208)),_0x3489a1(0x1e0));}catch{throw CliErrors[_0x3489a1(0x1f9)](_0x3489a1(0x1fe)+_0x555a28+'.');}let _0x38850e;try{_0x38850e=JSON[_0x3489a1(0x1f0)](_0xb55eee);}catch{throw CliErrors[_0x3489a1(0x1f9)](_0x3489a1(0x1dc)+_0x555a28+'.');}if(!_0x38850e||typeof _0x38850e!==_0x3489a1(0x1d0)||Array[_0x3489a1(0x1cf)](_0x38850e)||Object[_0x3489a1(0x1cd)](_0x38850e)[_0x3489a1(0x1e1)](_0x5cf908=>typeof _0x5cf908!==_0x3489a1(0x20a)))throw CliErrors[_0x3489a1(0x1f9)](_0x3489a1(0x1dc)+_0x555a28+'.');return _0x38850e;}async function readValidatedPageSource(_0x2f368f){const _0x5e2a92=await readPageSource(_0x2f368f);return await validateCustomPageContent(_0x5e2a92),_0x5e2a92;}function readInput(_0xf61960,_0x29e63c){const _0x5668ce=a188_0x19fcba,_0x277bc3=_0xf61960[_0x5668ce(0x1cb)](_0x5668ce(0x1d3))[_0x5668ce(0x201)]()||_0x5668ce(0x1f6)+Date[_0x5668ce(0x1f4)]();if(_0x277bc3[_0x5668ce(0x1ff)]>0x64)throw CliErrors['validation'](_0x5668ce(0x1d8));const _0x280b23=_0xf61960[_0x5668ce(0x1ef)](_0x5668ce(0x205),NaN),_0x2fee54=!Number[_0x5668ce(0x204)](_0x280b23);if(_0x2fee54&&(!Number[_0x5668ce(0x1e2)](_0x280b23)||_0x280b23<=0x0))throw CliErrors['validation'](_0x5668ce(0x211));return{'appCode':_0xf61960[_0x5668ce(0x1ea)],'pageName':_0x277bc3,..._0x2fee54?{'parentMenuId':_0x280b23}:{},'createMenu':!![],'files':_0x29e63c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a189_0x3cf9fc=a189_0x75a7;(function(_0x267e5e,_0x4c554d){const _0x42d0d7=a189_0x75a7,_0x52a3cc=_0x267e5e();while(!![]){try{const _0x5a8437=parseInt(_0x42d0d7(0x1ca))/0x1+-parseInt(_0x42d0d7(0x1ce))/0x2+parseInt(_0x42d0d7(0x1c0))/0x3+parseInt(_0x42d0d7(0x1bf))/0x4+-parseInt(_0x42d0d7(0x1d5))/0x5*(-parseInt(_0x42d0d7(0x1c4))/0x6)+parseInt(_0x42d0d7(0x1cc))/0x7*(parseInt(_0x42d0d7(0x1d1))/0x8)+-parseInt(_0x42d0d7(0x1cf))/0x9*(parseInt(_0x42d0d7(0x1c8))/0xa);if(_0x5a8437===_0x4c554d)break;else _0x52a3cc['push'](_0x52a3cc['shift']());}catch(_0x1eeb7d){_0x52a3cc['push'](_0x52a3cc['shift']());}}}(a189_0x266a,0x4d5f0));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a189_0x3cf9fc(0x1c5),'command':'custom-detail','description':a189_0x3cf9fc(0x1c6),'risk':a189_0x3cf9fc(0x1bc),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':'Custom\x20Page\x20ID'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2e31db){readCustomPageId(_0x2e31db);},async 'execute'(_0x26dbc3){const _0x2f621f=a189_0x3cf9fc,_0x20fc1e=readCustomPageId(_0x26dbc3),_0x31a0da=await getCustomPageSource(_0x20fc1e),{bundle:_0x340d69,createTime:_0x24d930,updateTime:_0x247926,..._0x167afb}=_0x31a0da,_0xdded2e=_0x31a0da['id']??_0x20fc1e,_0x3e1a73=_0x31a0da[_0x2f621f(0x1c3)]?.[_0x2f621f(0x1c2)]()||_0x26dbc3[_0x2f621f(0x1cb)](_0x2f621f(0x1d3))[_0x2f621f(0x1c2)](),_0x280eff=buildCustomPageRuntimeUrl(_0x3e1a73,_0x31a0da[_0x2f621f(0x1d4)]),_0x3d4525=buildCustomPageEditUrl(_0x3e1a73,_0xdded2e),_0x1341cf=await resolveCustomPageDevelopmentUrl(_0x3e1a73,_0xdded2e,_0x26dbc3[_0x2f621f(0x1d7)]);return{'ok':!![],'data':{..._0x167afb,..._0x280eff?{'runtimePageUrl':_0x280eff}:{},..._0x1341cf?{'pageUrl':_0x1341cf}:{},..._0x3d4525?{'editPageUrl':_0x3d4525}:{},..._0x24d930==null?{}:{'createTime':formatTime(_0x24d930)},..._0x247926==null?{}:{'updateTime':formatTime(_0x247926)}},'message':_0x2f621f(0x1ba)+_0x20fc1e+'.'};}};function a189_0x75a7(_0x153d10,_0x63e9b9){_0x153d10=_0x153d10-0x1ba;const _0x266a49=a189_0x266a();let _0x75a73e=_0x266a49[_0x153d10];return _0x75a73e;}function a189_0x266a(){const _0x36e58a=['getMonth','55372tudjxD','1767861NTzJCx','join','trim','appCode','449346Omdraq','page','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','getFullYear','20710lhDHLa','getHours','514978dgcZXs','str','189CSQfCT','padStart','180468jFMmgj','7362LetKWN','getSeconds','180344JMFADb','getTime','appcode','pageCode','25dLlwaP','getDate','cookie','Retrieved\x20Custom\x20Page\x20','isNaN','read','getMinutes'];a189_0x266a=function(){return _0x36e58a;};return a189_0x266a();}function formatTime(_0xbb23c9){const _0x10d6bb=a189_0x3cf9fc,_0x14217d=new Date(_0xbb23c9);if(Number[_0x10d6bb(0x1bb)](_0x14217d[_0x10d6bb(0x1d2)]()))return String(_0xbb23c9);const _0x3effa1=[_0x14217d[_0x10d6bb(0x1c7)](),String(_0x14217d[_0x10d6bb(0x1be)]()+0x1)[_0x10d6bb(0x1cd)](0x2,'0'),String(_0x14217d[_0x10d6bb(0x1d6)]())[_0x10d6bb(0x1cd)](0x2,'0')][_0x10d6bb(0x1c1)]('-'),_0x24643a=[String(_0x14217d[_0x10d6bb(0x1c9)]())[_0x10d6bb(0x1cd)](0x2,'0'),String(_0x14217d[_0x10d6bb(0x1bd)]())[_0x10d6bb(0x1cd)](0x2,'0'),String(_0x14217d[_0x10d6bb(0x1d0)]())[_0x10d6bb(0x1cd)](0x2,'0')][_0x10d6bb(0x1c1)](':');return _0x3effa1+'\x20'+_0x24643a;}
|