@lovrabet/rabetbase-cli 2.5.5-beta.2 → 2.5.5-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/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.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-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 +3 -3
- package/skills/rabetbase/guides/independent-deployment.md +11 -1
- package/skills/rabetbase/references/rabetbase-config.md +16 -19
- package/skills/rabetbase/references/rabetbase-menu-visibility-update.md +5 -4
- package/skills/rabetbase/references/rabetbase-workspace.md +3 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a180_0x9424d9=a180_0x3179;(function(_0x5d5358,_0x3e308d){const _0x45dd6c=a180_0x3179,_0x4c2d47=_0x5d5358();while(!![]){try{const _0xa5c181=-parseInt(_0x45dd6c(0x1fb))/0x1+-parseInt(_0x45dd6c(0x1be))/0x2*(-parseInt(_0x45dd6c(0x20c))/0x3)+parseInt(_0x45dd6c(0x21c))/0x4+-parseInt(_0x45dd6c(0x215))/0x5*(-parseInt(_0x45dd6c(0x1ec))/0x6)+-parseInt(_0x45dd6c(0x1b9))/0x7+-parseInt(_0x45dd6c(0x221))/0x8*(parseInt(_0x45dd6c(0x1ff))/0x9)+-parseInt(_0x45dd6c(0x216))/0xa;if(_0xa5c181===_0x3e308d)break;else _0x4c2d47['push'](_0x4c2d47['shift']());}catch(_0xdc11e2){_0x4c2d47['push'](_0x4c2d47['shift']());}}}(a180_0x429d,0x4f99a));function a180_0x429d(){const _0x133cf6=['POST','push','\x20menu(s);\x20skip\x20','plan','menu\x20list','menu_permission_denied','menuIds','5164cZcnMq','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','failed','visibility-update','547398VvmXwl','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','datasetId','num','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','menu_expected_count_mismatch','\x20must\x20be\x20true\x20or\x20false.','visible','menu-ids','filter','childrenIds','update-menu-visibility','validation','15TxGCYv','boolean','resourcesValid','modelType','stringify','url','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','/smartapi/menu/update','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','5bxHtCd','2304290qSXUit','Menu\x20','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','depth','isArray','childrenCount','1282276LUipxk','beforeById','parentId','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','menu','24AHkSnZ','menu_selector_not_found','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','menu_state_drift','update\x20menu\x20visibility','\x20menu(s);\x20skipped\x20','pageType','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','get','has','\x20unchanged\x20menu(s).','byId','datasetCode','rabetbase\x20menu\x20list\x20--format\x20compress','updated','pageId','Final\x20menu\x20visibility\x20readback\x20failed.','update-recovery','cookie','message','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','3262644vqYXtj','\x20failed.','appCode','Menu\x20id\x20selector(s)\x20not\x20found:\x20','resources','128814IdagSX','false','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','requestedVisible','join','before','sort','update','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','paths','targets','recovered','Requested\x20menu\x20visibility','update\x20visibility\x20for','high-risk-write','expected-count','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Selected\x20','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','trim','set','expectVisible','length','flagMissing','str','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','split','menu_verification_failed','expectedCount','body','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','map','path','string','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','\x20changed\x20unexpectedly.','plannedActions','label','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','type','isSafeInteger','Menu\x20visibility\x20update\x20completed:\x20','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','menu_selector_ambiguous','true','Updated\x20visibility\x20for\x20','3405534pMwnDj','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','code','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','hash','number','Menu\x20path\x20selector\x20not\x20found:\x20','verification'];a180_0x429d=function(){return _0x133cf6;};return a180_0x429d();}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_0x3179(_0x2e53b6,_0x4808c4){_0x2e53b6=_0x2e53b6-0x1ac;const _0x429d5d=a180_0x429d();let _0x317932=_0x429d5d[_0x2e53b6];return _0x317932;}import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a180_0x9424d9(0x213)}];export const menuVisibilityUpdate={'service':a180_0x9424d9(0x220),'command':a180_0x9424d9(0x1fe),'description':a180_0x9424d9(0x200),'risk':a180_0x9424d9(0x1cc),'structuredErrors':!![],'flags':[{'name':a180_0x9424d9(0x207),'type':a180_0x9424d9(0x1df),'description':a180_0x9424d9(0x223)},{'name':'paths','type':a180_0x9424d9(0x1df),'description':a180_0x9424d9(0x1d7)},{'name':a180_0x9424d9(0x206),'type':a180_0x9424d9(0x20d),'required':!![],'description':a180_0x9424d9(0x1ca)},{'name':'expect-visible','type':a180_0x9424d9(0x20d),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a180_0x9424d9(0x1cd),'type':a180_0x9424d9(0x1f1),'description':a180_0x9424d9(0x1fc)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4c366b){parseInput(_0x4c366b),requireExplicitYes(_0x4c366b);},async 'dryRun'(_0x53dbf9){const _0x389667=a180_0x9424d9,_0x2957e5=await buildPlan(_0x53dbf9,!![]),_0x452ab6=_0x2957e5[_0x389667(0x1f7)][_0x389667(0x1e2)]?.[_0x389667(0x1d4)]??0x0,_0x155e06=_0x2957e5[_0x389667(0x1f7)][_0x389667(0x1c8)]['length']-_0x452ab6;return menuDryRunResult(_0x2957e5[_0x389667(0x1f7)],{'method':_0x389667(0x1f4),'url':_0x389667(0x213),'body':{'updates':_0x2957e5[_0x389667(0x1f7)][_0x389667(0x1e2)]?.[_0x389667(0x1dd)](_0x4b4ff4=>_0x4b4ff4[_0x389667(0x1db)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x452ab6+_0x389667(0x1f6)+_0x155e06+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x1cc320){const _0x579e36=a180_0x9424d9;requireExplicitYes(_0x1cc320);const _0xdd405d=await buildPlan(_0x1cc320,![]);await recheckMutationSnapshot(_0x1cc320,_0xdd405d['plan'],_0x579e36(0x225));const _0x5a8b22=[],_0x34e431=[],_0x48f781=[];for(const _0x57610e of _0xdd405d['plan'][_0x579e36(0x1c8)]){if(_0x57610e[_0x579e36(0x1c3)]['visible']===_0xdd405d['plan'][_0x579e36(0x1c1)]){_0x5a8b22[_0x579e36(0x1f5)]({'id':_0x57610e['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x1cc320['appCode'],_0x1cc320['cookie'],{'id':_0x57610e['id'],'visible':_0xdd405d[_0x579e36(0x1f7)][_0x579e36(0x1c1)]}),_0x5a8b22[_0x579e36(0x1f5)]({'id':_0x57610e['id'],'updated':!![],'skipped':![]});}catch(_0x514b88){const _0x2c9ad1=mapMenuApiError(_0x514b88,_0x579e36(0x1cb),_0x57610e['id']);if(isMenuResponseLoss(_0x514b88)&&_0x2c9ad1[_0x579e36(0x1ee)]!==_0x579e36(0x1f9)){_0x48f781[_0x579e36(0x1f5)](_0x57610e['id']);continue;}_0x34e431[_0x579e36(0x1f5)]({'id':_0x57610e['id'],'stage':_0x579e36(0x1c5),'code':_0x2c9ad1['code'],'message':_0x2c9ad1[_0x579e36(0x1b7)]});}}let _0x45fd3c;try{_0x45fd3c=await fetchMenuSnapshot(_0x1cc320[_0x579e36(0x1bb)],_0x1cc320[_0x579e36(0x1b6)]);}catch(_0x274e0f){const _0x41055f=describeMenuErrorCause(_0x274e0f,'verify\x20menu\x20visibility\x20update'),_0x2de46a=_0x48f781[_0x579e36(0x1dd)](_0xbe8e35=>({'id':_0xbe8e35,'stage':_0x579e36(0x1b5),'code':_0x579e36(0x1d9),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0xbe8e35+_0x579e36(0x212),'requestedStateConfirmed':![],'recovered':![]})),_0x460155={'stage':_0x579e36(0x1f3),'code':'menu_verification_failed','message':_0x579e36(0x1b4),'targetIds':_0xdd405d[_0x579e36(0x1f7)][_0x579e36(0x1c8)][_0x579e36(0x1dd)](_0x42cb05=>_0x42cb05['id']),'requestedStateConfirmed':![],..._0x41055f};throw menuFailure(asVerificationError(_0x274e0f,_0x579e36(0x1e8)),_0xdd405d[_0x579e36(0x1f7)],{'stage':_0x579e36(0x1f3),'succeeded':_0x5a8b22,'failedRecords':[..._0x34e431,..._0x2de46a,_0x460155],'warnings':[_0x579e36(0x1ed)],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':_0x579e36(0x1b1)}});}const _0x1551f0=[];for(const _0x4fac60 of _0x5a8b22){const _0x584d35=Number(_0x4fac60['id']),_0x534afb=_0xdd405d['beforeById']['get'](_0x584d35),_0x4f5371=_0x45fd3c[_0x579e36(0x1af)][_0x579e36(0x1ac)](_0x584d35);try{verifyVisibilityUpdate(_0x534afb,_0x4f5371,_0xdd405d[_0x579e36(0x1f7)][_0x579e36(0x1c1)]);}catch(_0x27359d){const _0x62409d=asVerificationError(_0x27359d,_0x579e36(0x217)+_0x584d35+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x1551f0[_0x579e36(0x1f5)]({'id':_0x584d35,'stage':'verification','code':_0x62409d['code'],'message':_0x62409d[_0x579e36(0x1b7)],'requestedStateConfirmed':![]});}}for(const _0x20534f of _0x48f781){const _0x2809a4=_0xdd405d[_0x579e36(0x21d)]['get'](_0x20534f),_0x5e85c6=_0x45fd3c['byId']['get'](_0x20534f);try{verifyVisibilityUpdate(_0x2809a4,_0x5e85c6,_0xdd405d['plan']['requestedVisible']),_0x5a8b22[_0x579e36(0x1f5)]({'id':_0x20534f,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x3e245c){const _0x3e438c=asVerificationError(_0x3e245c,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x20534f+_0x579e36(0x1b8));_0x1551f0[_0x579e36(0x1f5)]({'id':_0x20534f,'stage':'update-recovery','code':_0x3e438c['code'],'message':_0x3e438c[_0x579e36(0x1b7)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x1551f0[_0x579e36(0x1d4)]>0x0){const _0x15b7cf=_0x1551f0['map'](_0x53ff79=>Number(_0x53ff79['id'])),_0x2a0641=_0x5a8b22[_0x579e36(0x208)](_0x33b449=>_0x33b449[_0x579e36(0x1c9)]===!![])[_0x579e36(0x1d4)],_0x4c6021=menuError('menu_verification_failed','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x15b7cf[_0x579e36(0x1c2)](',\x20')+'.',_0x579e36(0x228));throw menuFailure(_0x4c6021,_0xdd405d[_0x579e36(0x1f7)],{'stage':_0x579e36(0x1f3),'succeeded':_0x5a8b22,'failedRecords':[..._0x34e431,..._0x1551f0],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x579e36(0x1fd),..._0x15b7cf['length']===0x1?{'targetId':_0x15b7cf[0x0]}:{'targetIds':_0x15b7cf},'recoveredCount':_0x2a0641,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x1db0b0=_0x5a8b22['filter'](_0x73679d=>_0x73679d[_0x579e36(0x1b2)]===!![])[_0x579e36(0x1d4)],_0x37400b=_0x5a8b22[_0x579e36(0x1d4)]-_0x1db0b0,_0x126a16={..._0xdd405d[_0x579e36(0x1f7)],'succeeded':_0x5a8b22,'failed':_0x34e431,'warnings':_0x34e431['length']>0x0?[..._0xdd405d[_0x579e36(0x1f7)]['warnings'],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0xdd405d[_0x579e36(0x1f7)]['warnings'],'verification':{'checkedBy':_0x579e36(0x1f8),'snapshotHash':_0x45fd3c[_0x579e36(0x1f0)],'matchesRequestedState':_0x34e431[_0x579e36(0x1d4)]===0x0,'recoveredCount':_0x48f781['length']}};return{'ok':_0x34e431[_0x579e36(0x1d4)]===0x0,'data':_0x126a16,'message':_0x34e431[_0x579e36(0x1d4)]===0x0?_0x579e36(0x1eb)+_0x1db0b0+_0x579e36(0x226)+_0x37400b+_0x579e36(0x1ae):_0x579e36(0x1e7)+_0x1db0b0+'\x20updated,\x20'+_0x37400b+'\x20skipped,\x20'+_0x34e431[_0x579e36(0x1d4)]+_0x579e36(0x1ba)};}};function parseInput(_0x3dfd43){const _0x1e64fa=a180_0x9424d9,_0x27a449=parseMenuIds(_0x3dfd43[_0x1e64fa(0x1d6)]('menu-ids')),_0x20c650=parseCsv(_0x3dfd43[_0x1e64fa(0x1d6)](_0x1e64fa(0x1c7)));if(_0x27a449['length']===0x0&&_0x20c650[_0x1e64fa(0x1d4)]===0x0)throw CliErrors[_0x1e64fa(0x20b)](_0x1e64fa(0x203));const _0x4c3aa9=parseBooleanFlag(_0x3dfd43,'visible',!![]),_0xd558b4=parseBooleanFlag(_0x3dfd43,'expect-visible',![]);let _0x17a6ea;if(hasFlag(_0x3dfd43,_0x1e64fa(0x1cd))){_0x17a6ea=_0x3dfd43[_0x1e64fa(0x202)](_0x1e64fa(0x1cd));if(!Number[_0x1e64fa(0x1e6)](_0x17a6ea)||_0x17a6ea<0x0)throw CliErrors[_0x1e64fa(0x20b)](_0x1e64fa(0x218));}return{'menuIds':_0x27a449,'paths':_0x20c650,'visible':_0x4c3aa9,'expectVisible':_0xd558b4,'expectedCount':_0x17a6ea};}async function buildPlan(_0x538206,_0x48f7b7){const _0x4be6a6=a180_0x9424d9,_0x31236a=parseInput(_0x538206),_0x2a2599=await fetchMutationSnapshot(_0x538206,'update\x20menu\x20visibility'),_0x51b68a=selectTargets(_0x2a2599['menus'],_0x31236a[_0x4be6a6(0x1fa)],_0x31236a['paths']);if(_0x31236a[_0x4be6a6(0x1da)]!==undefined&&_0x51b68a[_0x4be6a6(0x1d4)]!==_0x31236a[_0x4be6a6(0x1da)])throw menuError(_0x4be6a6(0x204),_0x4be6a6(0x1cf)+_0x51b68a[_0x4be6a6(0x1d4)]+'\x20menu(s),\x20expected\x20'+_0x31236a[_0x4be6a6(0x1da)]+'.',_0x4be6a6(0x1c0));if(_0x31236a[_0x4be6a6(0x1d3)]!==undefined){const _0x1f2943=_0x51b68a[_0x4be6a6(0x208)](_0x3c988b=>_0x3c988b['visible']!==_0x31236a[_0x4be6a6(0x1d3)]);if(_0x1f2943['length']>0x0)throw menuError(_0x4be6a6(0x224),_0x4be6a6(0x1ce)+_0x1f2943['map'](_0x2d7a75=>_0x2d7a75['id'])[_0x4be6a6(0x1c2)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x1ee73f=_0x51b68a[_0x4be6a6(0x1dd)](_0x137e86=>({'id':_0x137e86['id'],'label':_0x137e86[_0x4be6a6(0x1e3)],'path':_0x137e86['path'],'before':{'visible':_0x137e86[_0x4be6a6(0x206)]},'after':{'visible':_0x31236a[_0x4be6a6(0x206)]}})),_0x1d1713=_0x1ee73f['filter'](_0x31b74=>_0x31b74[_0x4be6a6(0x1c3)][_0x4be6a6(0x206)]!==_0x31236a[_0x4be6a6(0x206)])[_0x4be6a6(0x1dd)](_0x1f5e4c=>({'stage':_0x4be6a6(0x20a),'method':'POST','path':_0x4be6a6(0x213),'body':{'appCode':_0x538206[_0x4be6a6(0x1bb)],'id':_0x1f5e4c['id'],'visible':_0x31236a['visible']}})),_0x459a1e=mutationResult({'operation':_0x4be6a6(0x1fe),'selector':{'menuIds':_0x31236a[_0x4be6a6(0x1fa)],'paths':_0x31236a[_0x4be6a6(0x1c7)]},'before':{'menus':_0x51b68a[_0x4be6a6(0x1dd)](_0x1452bc=>({'id':_0x1452bc['id'],'path':_0x1452bc[_0x4be6a6(0x1de)],'visible':_0x1452bc[_0x4be6a6(0x206)]}))},'after':{'menus':_0x51b68a[_0x4be6a6(0x1dd)](_0x319303=>({'id':_0x319303['id'],'path':_0x319303[_0x4be6a6(0x1de)],'visible':_0x31236a[_0x4be6a6(0x206)]}))},'dryRun':_0x48f7b7,'backend':[...BACKEND],'plannedActions':_0x1d1713,'snapshotHash':_0x2a2599['hash'],'warnings':_0x1d1713[_0x4be6a6(0x1d4)]===0x0?[_0x4be6a6(0x1e0)]:[]});return{'plan':{..._0x459a1e,'requestedVisible':_0x31236a[_0x4be6a6(0x206)],'targets':_0x1ee73f},'beforeById':new Map(_0x51b68a[_0x4be6a6(0x1dd)](_0x5540ac=>[_0x5540ac['id'],_0x5540ac]))};}function selectTargets(_0x463336,_0x101b36,_0x48553c){const _0x262e6e=a180_0x9424d9,_0x405477=new Map(_0x463336[_0x262e6e(0x1dd)](_0x2ab874=>[_0x2ab874['id'],_0x2ab874])),_0x5b0f25=new Map(),_0x473515=_0x101b36[_0x262e6e(0x208)](_0x4071d1=>!_0x405477[_0x262e6e(0x1ad)](_0x4071d1));if(_0x473515[_0x262e6e(0x1d4)]>0x0)throw menuError(_0x262e6e(0x222),_0x262e6e(0x1bc)+_0x473515[_0x262e6e(0x1c2)](',\x20')+'.',_0x262e6e(0x1ef));for(const _0x3c69ac of _0x101b36){_0x5b0f25[_0x262e6e(0x1d2)](_0x3c69ac,_0x405477['get'](_0x3c69ac));}for(const _0x2d1397 of _0x48553c){const _0x4579f4=_0x463336[_0x262e6e(0x208)](_0x4c9f33=>_0x4c9f33[_0x262e6e(0x1de)]===_0x2d1397);if(_0x4579f4[_0x262e6e(0x1d4)]===0x0)throw menuError(_0x262e6e(0x222),_0x262e6e(0x1f2)+JSON[_0x262e6e(0x210)](_0x2d1397)+'.',_0x262e6e(0x1d0));if(_0x4579f4[_0x262e6e(0x1d4)]>0x1)throw menuError(_0x262e6e(0x1e9),_0x262e6e(0x1dc)+JSON[_0x262e6e(0x210)](_0x2d1397)+'.',_0x262e6e(0x21f)+_0x4579f4['map'](_0x166503=>_0x166503['id'])[_0x262e6e(0x1c2)](',\x20')+'.');const _0x1a621b=_0x4579f4[0x0];_0x5b0f25[_0x262e6e(0x1d2)](_0x1a621b['id'],_0x1a621b);}return[..._0x5b0f25['values']()];}function parseMenuIds(_0x4c9dd3){const _0x2af401=a180_0x9424d9,_0x17fbbe=parseCsv(_0x4c9dd3),_0x4d83cc=_0x17fbbe['map'](Number);if(_0x4d83cc['some'](_0x26f6c5=>!Number['isSafeInteger'](_0x26f6c5)||_0x26f6c5<=0x0))throw CliErrors[_0x2af401(0x20b)](_0x2af401(0x214));return[...new Set(_0x4d83cc)];}function parseCsv(_0x4f098b){const _0x4c5be3=a180_0x9424d9;return[...new Set(_0x4f098b[_0x4c5be3(0x1d8)](',')[_0x4c5be3(0x1dd)](_0x1f4d8a=>_0x1f4d8a[_0x4c5be3(0x1d1)]())[_0x4c5be3(0x208)](Boolean))];}function parseBooleanFlag(_0xe9b787,_0x4c096d,_0x346df0){const _0x2d6f4c=a180_0x9424d9;if(!hasFlag(_0xe9b787,_0x4c096d)){if(_0x346df0)throw CliErrors[_0x2d6f4c(0x1d5)](_0x4c096d);return undefined;}const _0x599252=_0xe9b787['rawFlags'][_0x4c096d];if(_0x599252===!![]||_0x599252===![])return _0x599252;if(_0x599252===_0x2d6f4c(0x1ea))return!![];if(_0x599252===_0x2d6f4c(0x1bf))return![];throw CliErrors[_0x2d6f4c(0x20b)]('--'+_0x4c096d+_0x2d6f4c(0x205));}function verifyVisibilityUpdate(_0x2874cc,_0x17acb1,_0x442e9f){const _0x4b4721=a180_0x9424d9;assertVerified(!!_0x17acb1,_0x4b4721(0x217)+_0x2874cc['id']+_0x4b4721(0x1e4)),assertVerified(_0x17acb1[_0x4b4721(0x206)]===_0x442e9f,_0x4b4721(0x217)+_0x2874cc['id']+_0x4b4721(0x1c6));const _0x4bc10f=[['id',_0x17acb1['id'],_0x2874cc['id']],[_0x4b4721(0x21e),_0x17acb1['parentId'],_0x2874cc[_0x4b4721(0x21e)]],['depth',_0x17acb1[_0x4b4721(0x219)],_0x2874cc[_0x4b4721(0x219)]],[_0x4b4721(0x1e3),_0x17acb1['label'],_0x2874cc['label']],[_0x4b4721(0x1de),_0x17acb1[_0x4b4721(0x1de)],_0x2874cc[_0x4b4721(0x1de)]],[_0x4b4721(0x211),_0x17acb1[_0x4b4721(0x211)],_0x2874cc[_0x4b4721(0x211)]],[_0x4b4721(0x1e5),_0x17acb1[_0x4b4721(0x1e5)],_0x2874cc[_0x4b4721(0x1e5)]],[_0x4b4721(0x1c4),_0x17acb1[_0x4b4721(0x1c4)],_0x2874cc[_0x4b4721(0x1c4)]],[_0x4b4721(0x1bd),_0x17acb1[_0x4b4721(0x1bd)],_0x2874cc[_0x4b4721(0x1bd)]],[_0x4b4721(0x20e),_0x17acb1['resourcesValid'],_0x2874cc['resourcesValid']],[_0x4b4721(0x209),_0x17acb1[_0x4b4721(0x209)],_0x2874cc[_0x4b4721(0x209)]],[_0x4b4721(0x21b),_0x17acb1[_0x4b4721(0x21b)],_0x2874cc[_0x4b4721(0x21b)]],['pageId',_0x17acb1['pageId'],_0x2874cc[_0x4b4721(0x1b3)]],[_0x4b4721(0x227),_0x17acb1['pageType'],_0x2874cc[_0x4b4721(0x227)]],[_0x4b4721(0x20f),_0x17acb1['modelType'],_0x2874cc[_0x4b4721(0x20f)]],[_0x4b4721(0x201),_0x17acb1[_0x4b4721(0x201)],_0x2874cc[_0x4b4721(0x201)]],[_0x4b4721(0x1b0),_0x17acb1['datasetCode'],_0x2874cc[_0x4b4721(0x1b0)]]];for(const [_0x4bc93b,_0x3f84c3,_0x4d5118]of _0x4bc10f){assertVerified(sameValue(_0x3f84c3,_0x4d5118),'Menu\x20'+_0x2874cc['id']+'\x20'+_0x4bc93b+_0x4b4721(0x1e1));}}function sameValue(_0x39d7c5,_0x5165c8){const _0x3b15e5=a180_0x9424d9;if(Array[_0x3b15e5(0x21a)](_0x39d7c5)||Array[_0x3b15e5(0x21a)](_0x5165c8))return JSON[_0x3b15e5(0x210)](_0x39d7c5)===JSON[_0x3b15e5(0x210)](_0x5165c8);return _0x39d7c5===_0x5165c8;}
|
|
1
|
+
const a180_0x5141ef=a180_0x42a8;(function(_0x275d3b,_0x2cb11f){const _0x551889=a180_0x42a8,_0x4043a9=_0x275d3b();while(!![]){try{const _0x400865=parseInt(_0x551889(0x1b3))/0x1+-parseInt(_0x551889(0x1d0))/0x2*(-parseInt(_0x551889(0x1ac))/0x3)+parseInt(_0x551889(0x1f3))/0x4+-parseInt(_0x551889(0x1f9))/0x5+parseInt(_0x551889(0x1b2))/0x6*(parseInt(_0x551889(0x1ee))/0x7)+parseInt(_0x551889(0x1ba))/0x8*(-parseInt(_0x551889(0x1a2))/0x9)+-parseInt(_0x551889(0x1a8))/0xa;if(_0x400865===_0x2cb11f)break;else _0x4043a9['push'](_0x4043a9['shift']());}catch(_0x59458c){_0x4043a9['push'](_0x4043a9['shift']());}}}(a180_0x4c97,0x4d612));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a180_0x4c97(){const _0x7a2df4=['push','split','cookie','menu-ids','visibility-update','depth','set','string','verification','stringify','validation','\x20must\x20be\x20true\x20or\x20false.','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','childrenCount','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','num','verify\x20menu\x20visibility\x20update','sort','expected-count','menu_state_drift','isArray','boolean','parentId','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','join','\x20visibility\x20update\x20could\x20not\x20be\x20verified','1372epBEtx','Selected\x20','paths','\x20menu(s),\x20expected\x20','update','1737380XdtpCS','datasetId','pageType','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','modelType','397195SvpjNK','plannedActions','menu_verification_failed','Response\x20was\x20lost\x20for\x20menu\x20','hash','trim','failed','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','Menu\x20path\x20selector\x20not\x20found:\x20','filter','menu','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','\x20menu(s);\x20skip\x20','beforeById','/smartapi/menu/update','menu_selector_ambiguous','menu_selector_not_found','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','url','update\x20menu\x20visibility','appCode','Response\x20was\x20lost\x20and\x20menu\x20','expectVisible','pageId','before','plan','expectedCount','Menu\x20id\x20selector(s)\x20not\x20found:\x20','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','message','warnings','number','label','body','byId','datasetCode','rabetbase\x20menu\x20list\x20--format\x20compress','menu_permission_denied','3195GeRmHY','resources','Menu\x20visibility\x20update\x20completed:\x20','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','menuIds','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','6395530gKxOzb','resourcesValid','requestedVisible','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','84666BwreoI','visible','\x20unchanged\x20menu(s).','has','path','update-recovery','13206QHzqYP','310423FnLvoS','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','expect-visible','\x20skipped,\x20','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','targets','Updated\x20visibility\x20for\x20','4432oPWdnB','true','Would\x20update\x20visibility\x20for\x20','\x20updated,\x20','update-menu-visibility','write','recovered','map','update\x20visibility\x20for','POST','childrenIds','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','type','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','some','updated','length','\x20menu(s);\x20skipped\x20','flagMissing','code','Menu\x20','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','4lIbzjj','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','get','false'];a180_0x4c97=function(){return _0x7a2df4;};return a180_0x4c97();}import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a180_0x5141ef(0x207)}];export const menuVisibilityUpdate={'service':a180_0x5141ef(0x203),'command':a180_0x5141ef(0x1d8),'description':a180_0x5141ef(0x198),'risk':a180_0x5141ef(0x1bf),'structuredErrors':!![],'flags':[{'name':a180_0x5141ef(0x1d7),'type':a180_0x5141ef(0x1db),'description':a180_0x5141ef(0x1e0)},{'name':a180_0x5141ef(0x1f0),'type':a180_0x5141ef(0x1db),'description':a180_0x5141ef(0x1eb)},{'name':a180_0x5141ef(0x1ad),'type':'boolean','required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a180_0x5141ef(0x1b5),'type':a180_0x5141ef(0x1e9),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a180_0x5141ef(0x1e6),'type':a180_0x5141ef(0x19b),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5155f9){parseInput(_0x5155f9);},async 'dryRun'(_0x403514){const _0x8c50ac=a180_0x5141ef,_0x343811=await buildPlan(_0x403514,!![]),_0x2f880d=_0x343811['plan'][_0x8c50ac(0x1fa)]?.[_0x8c50ac(0x1ca)]??0x0,_0x1c42eb=_0x343811[_0x8c50ac(0x195)][_0x8c50ac(0x1b8)][_0x8c50ac(0x1ca)]-_0x2f880d;return menuDryRunResult(_0x343811[_0x8c50ac(0x195)],{'method':_0x8c50ac(0x1c3),'url':_0x8c50ac(0x207),'body':{'updates':_0x343811[_0x8c50ac(0x195)]['plannedActions']?.[_0x8c50ac(0x1c1)](_0x5907f1=>_0x5907f1[_0x8c50ac(0x19d)])??[]},'description':_0x8c50ac(0x1bc)+_0x2f880d+_0x8c50ac(0x205)+_0x1c42eb+_0x8c50ac(0x1ae)});},async 'execute'(_0x25781a){const _0x59fe3f=a180_0x5141ef,_0x2b7497=await buildPlan(_0x25781a,![]);await recheckMutationSnapshot(_0x25781a,_0x2b7497[_0x59fe3f(0x195)],'update\x20menu\x20visibility');const _0x7d88ac=[],_0x2fe931=[],_0x29e3c9=[];for(const _0x1aa992 of _0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x1b8)]){if(_0x1aa992[_0x59fe3f(0x194)][_0x59fe3f(0x1ad)]===_0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x1aa)]){_0x7d88ac[_0x59fe3f(0x1d4)]({'id':_0x1aa992['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x25781a[_0x59fe3f(0x190)],_0x25781a['cookie'],{'id':_0x1aa992['id'],'visible':_0x2b7497['plan'][_0x59fe3f(0x1aa)]}),_0x7d88ac['push']({'id':_0x1aa992['id'],'updated':!![],'skipped':![]});}catch(_0xda28cc){const _0x26eb8a=mapMenuApiError(_0xda28cc,_0x59fe3f(0x1c2),_0x1aa992['id']);if(isMenuResponseLoss(_0xda28cc)&&_0x26eb8a[_0x59fe3f(0x1cd)]!==_0x59fe3f(0x1a1)){_0x29e3c9[_0x59fe3f(0x1d4)](_0x1aa992['id']);continue;}_0x2fe931[_0x59fe3f(0x1d4)]({'id':_0x1aa992['id'],'stage':_0x59fe3f(0x1f2),'code':_0x26eb8a[_0x59fe3f(0x1cd)],'message':_0x26eb8a[_0x59fe3f(0x199)]});}}let _0x454662;try{_0x454662=await fetchMenuSnapshot(_0x25781a[_0x59fe3f(0x190)],_0x25781a[_0x59fe3f(0x1d6)]);}catch(_0x4ab7aa){const _0x4ea226=describeMenuErrorCause(_0x4ab7aa,_0x59fe3f(0x1e4)),_0x35347a=_0x29e3c9[_0x59fe3f(0x1c1)](_0x4835d9=>({'id':_0x4835d9,'stage':'update-recovery','code':_0x59fe3f(0x1fb),'message':_0x59fe3f(0x1fc)+_0x4835d9+_0x59fe3f(0x1ab),'requestedStateConfirmed':![],'recovered':![]})),_0x5f4fe1={'stage':_0x59fe3f(0x1dc),'code':_0x59fe3f(0x1fb),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x1b8)]['map'](_0x100abe=>_0x100abe['id']),'requestedStateConfirmed':![],..._0x4ea226};throw menuFailure(asVerificationError(_0x4ab7aa,_0x59fe3f(0x1d1)),_0x2b7497['plan'],{'stage':'verification','succeeded':_0x7d88ac,'failedRecords':[..._0x2fe931,..._0x35347a,_0x5f4fe1],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x59fe3f(0x1ff),'recoveredCount':0x0,'lookupCommand':_0x59fe3f(0x1a0)}});}const _0x16c227=[];for(const _0x3c5a72 of _0x7d88ac){const _0x150af5=Number(_0x3c5a72['id']),_0x8b3a12=_0x2b7497[_0x59fe3f(0x206)][_0x59fe3f(0x1d2)](_0x150af5),_0x5b9d72=_0x454662['byId']['get'](_0x150af5);try{verifyVisibilityUpdate(_0x8b3a12,_0x5b9d72,_0x2b7497[_0x59fe3f(0x195)]['requestedVisible']);}catch(_0x3a960b){const _0x1f4fa0=asVerificationError(_0x3a960b,'Menu\x20'+_0x150af5+_0x59fe3f(0x1ed));_0x16c227[_0x59fe3f(0x1d4)]({'id':_0x150af5,'stage':_0x59fe3f(0x1dc),'code':_0x1f4fa0[_0x59fe3f(0x1cd)],'message':_0x1f4fa0[_0x59fe3f(0x199)],'requestedStateConfirmed':![]});}}for(const _0x154bc1 of _0x29e3c9){const _0x2405c8=_0x2b7497[_0x59fe3f(0x206)][_0x59fe3f(0x1d2)](_0x154bc1),_0x1a5280=_0x454662[_0x59fe3f(0x19e)][_0x59fe3f(0x1d2)](_0x154bc1);try{verifyVisibilityUpdate(_0x2405c8,_0x1a5280,_0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x1aa)]),_0x7d88ac[_0x59fe3f(0x1d4)]({'id':_0x154bc1,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x626d00){const _0x35a323=asVerificationError(_0x626d00,_0x59fe3f(0x191)+_0x154bc1+_0x59fe3f(0x1cf));_0x16c227[_0x59fe3f(0x1d4)]({'id':_0x154bc1,'stage':_0x59fe3f(0x1b1),'code':_0x35a323['code'],'message':_0x35a323[_0x59fe3f(0x199)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x16c227[_0x59fe3f(0x1ca)]>0x0){const _0x1bf808=_0x16c227['map'](_0x1f4905=>Number(_0x1f4905['id'])),_0x8ad6a3=_0x7d88ac[_0x59fe3f(0x202)](_0x15d32c=>_0x15d32c[_0x59fe3f(0x1c0)]===!![])[_0x59fe3f(0x1ca)],_0x35edc2=menuError('menu_verification_failed',_0x59fe3f(0x1b7)+_0x1bf808[_0x59fe3f(0x1ec)](',\x20')+'.',_0x59fe3f(0x1a7));throw menuFailure(_0x35edc2,_0x2b7497[_0x59fe3f(0x195)],{'stage':_0x59fe3f(0x1dc),'succeeded':_0x7d88ac,'failedRecords':[..._0x2fe931,..._0x16c227],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x59fe3f(0x1ff),..._0x1bf808[_0x59fe3f(0x1ca)]===0x1?{'targetId':_0x1bf808[0x0]}:{'targetIds':_0x1bf808},'recoveredCount':_0x8ad6a3,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x37962e=_0x7d88ac['filter'](_0x1798cc=>_0x1798cc[_0x59fe3f(0x1c9)]===!![])[_0x59fe3f(0x1ca)],_0x3ad338=_0x7d88ac[_0x59fe3f(0x1ca)]-_0x37962e,_0x39e583={..._0x2b7497[_0x59fe3f(0x195)],'succeeded':_0x7d88ac,'failed':_0x2fe931,'warnings':_0x2fe931['length']>0x0?[..._0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x19a)],_0x59fe3f(0x1e2)]:_0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x19a)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x454662[_0x59fe3f(0x1fd)],'matchesRequestedState':_0x2fe931[_0x59fe3f(0x1ca)]===0x0,'recoveredCount':_0x29e3c9[_0x59fe3f(0x1ca)]}};return{'ok':_0x2fe931['length']===0x0,'data':_0x39e583,'message':_0x2fe931[_0x59fe3f(0x1ca)]===0x0?_0x59fe3f(0x1b9)+_0x37962e+_0x59fe3f(0x1cb)+_0x3ad338+_0x59fe3f(0x1ae):_0x59fe3f(0x1a4)+_0x37962e+_0x59fe3f(0x1bd)+_0x3ad338+_0x59fe3f(0x1b6)+_0x2fe931[_0x59fe3f(0x1ca)]+'\x20failed.'};}};function parseInput(_0x1bb83e){const _0x36bfdd=a180_0x5141ef,_0x4377fa=parseMenuIds(_0x1bb83e['str'](_0x36bfdd(0x1d7))),_0x515967=parseCsv(_0x1bb83e['str'](_0x36bfdd(0x1f0)));if(_0x4377fa['length']===0x0&&_0x515967[_0x36bfdd(0x1ca)]===0x0)throw CliErrors[_0x36bfdd(0x1de)](_0x36bfdd(0x1c5));const _0x5dda9d=parseBooleanFlag(_0x1bb83e,_0x36bfdd(0x1ad),!![]),_0x39a030=parseBooleanFlag(_0x1bb83e,_0x36bfdd(0x1b5),![]);let _0x12a269;if(hasFlag(_0x1bb83e,_0x36bfdd(0x1e6))){_0x12a269=_0x1bb83e[_0x36bfdd(0x1e3)](_0x36bfdd(0x1e6));if(!Number['isSafeInteger'](_0x12a269)||_0x12a269<0x0)throw CliErrors[_0x36bfdd(0x1de)](_0x36bfdd(0x20a));}return{'menuIds':_0x4377fa,'paths':_0x515967,'visible':_0x5dda9d,'expectVisible':_0x39a030,'expectedCount':_0x12a269};}async function buildPlan(_0x764ff1,_0x443d4a){const _0x5e0747=a180_0x5141ef,_0xa9e419=parseInput(_0x764ff1),_0x567304=await fetchMutationSnapshot(_0x764ff1,_0x5e0747(0x18f)),_0x54b2ce=selectTargets(_0x567304['menus'],_0xa9e419[_0x5e0747(0x1a6)],_0xa9e419[_0x5e0747(0x1f0)]);if(_0xa9e419[_0x5e0747(0x196)]!==undefined&&_0x54b2ce[_0x5e0747(0x1ca)]!==_0xa9e419[_0x5e0747(0x196)])throw menuError('menu_expected_count_mismatch',_0x5e0747(0x1ef)+_0x54b2ce[_0x5e0747(0x1ca)]+_0x5e0747(0x1f1)+_0xa9e419[_0x5e0747(0x196)]+'.',_0x5e0747(0x1c7));if(_0xa9e419[_0x5e0747(0x192)]!==undefined){const _0x3cee15=_0x54b2ce['filter'](_0x4ddd10=>_0x4ddd10[_0x5e0747(0x1ad)]!==_0xa9e419['expectVisible']);if(_0x3cee15['length']>0x0)throw menuError(_0x5e0747(0x1e7),_0x5e0747(0x204)+_0x3cee15[_0x5e0747(0x1c1)](_0xc5e4b0=>_0xc5e4b0['id'])[_0x5e0747(0x1ec)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x462ebb=_0x54b2ce[_0x5e0747(0x1c1)](_0x3bc959=>({'id':_0x3bc959['id'],'label':_0x3bc959['label'],'path':_0x3bc959[_0x5e0747(0x1b0)],'before':{'visible':_0x3bc959[_0x5e0747(0x1ad)]},'after':{'visible':_0xa9e419[_0x5e0747(0x1ad)]}})),_0x1b45c7=_0x462ebb[_0x5e0747(0x202)](_0x22db4f=>_0x22db4f[_0x5e0747(0x194)][_0x5e0747(0x1ad)]!==_0xa9e419[_0x5e0747(0x1ad)])['map'](_0xcfcdb7=>({'stage':_0x5e0747(0x1be),'method':_0x5e0747(0x1c3),'path':_0x5e0747(0x207),'body':{'appCode':_0x764ff1['appCode'],'id':_0xcfcdb7['id'],'visible':_0xa9e419['visible']}})),_0x1694e9=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0xa9e419[_0x5e0747(0x1a6)],'paths':_0xa9e419[_0x5e0747(0x1f0)]},'before':{'menus':_0x54b2ce['map'](_0xfa71ad=>({'id':_0xfa71ad['id'],'path':_0xfa71ad['path'],'visible':_0xfa71ad[_0x5e0747(0x1ad)]}))},'after':{'menus':_0x54b2ce['map'](_0x2e0781=>({'id':_0x2e0781['id'],'path':_0x2e0781[_0x5e0747(0x1b0)],'visible':_0xa9e419[_0x5e0747(0x1ad)]}))},'dryRun':_0x443d4a,'backend':[...BACKEND],'plannedActions':_0x1b45c7,'snapshotHash':_0x567304[_0x5e0747(0x1fd)],'warnings':_0x1b45c7[_0x5e0747(0x1ca)]===0x0?[_0x5e0747(0x1f7)]:[]});return{'plan':{..._0x1694e9,'requestedVisible':_0xa9e419[_0x5e0747(0x1ad)],'targets':_0x462ebb},'beforeById':new Map(_0x54b2ce['map'](_0x313b0d=>[_0x313b0d['id'],_0x313b0d]))};}function selectTargets(_0xecb66,_0x2df2c6,_0x360765){const _0x14d363=a180_0x5141ef,_0x53a6b2=new Map(_0xecb66[_0x14d363(0x1c1)](_0x354373=>[_0x354373['id'],_0x354373])),_0x277ef8=new Map(),_0xaf1dbf=_0x2df2c6[_0x14d363(0x202)](_0x102870=>!_0x53a6b2[_0x14d363(0x1af)](_0x102870));if(_0xaf1dbf[_0x14d363(0x1ca)]>0x0)throw menuError(_0x14d363(0x209),_0x14d363(0x197)+_0xaf1dbf['join'](',\x20')+'.',_0x14d363(0x1f6));for(const _0x4f5bc5 of _0x2df2c6){_0x277ef8[_0x14d363(0x1da)](_0x4f5bc5,_0x53a6b2[_0x14d363(0x1d2)](_0x4f5bc5));}for(const _0x3704dc of _0x360765){const _0x1c80fb=_0xecb66['filter'](_0x1955c5=>_0x1955c5[_0x14d363(0x1b0)]===_0x3704dc);if(_0x1c80fb[_0x14d363(0x1ca)]===0x0)throw menuError(_0x14d363(0x209),_0x14d363(0x201)+JSON[_0x14d363(0x1dd)](_0x3704dc)+'.',_0x14d363(0x200));if(_0x1c80fb[_0x14d363(0x1ca)]>0x1)throw menuError(_0x14d363(0x208),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON['stringify'](_0x3704dc)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x1c80fb[_0x14d363(0x1c1)](_0x30cc7d=>_0x30cc7d['id'])[_0x14d363(0x1ec)](',\x20')+'.');const _0x3235b0=_0x1c80fb[0x0];_0x277ef8[_0x14d363(0x1da)](_0x3235b0['id'],_0x3235b0);}return[..._0x277ef8['values']()];}function a180_0x42a8(_0x1c6195,_0x357eae){_0x1c6195=_0x1c6195-0x18e;const _0x4c976d=a180_0x4c97();let _0x42a8a2=_0x4c976d[_0x1c6195];return _0x42a8a2;}function parseMenuIds(_0x2c302f){const _0x4f71fc=a180_0x5141ef,_0x1b7034=parseCsv(_0x2c302f),_0x2869ab=_0x1b7034[_0x4f71fc(0x1c1)](Number);if(_0x2869ab[_0x4f71fc(0x1c8)](_0x1c590e=>!Number['isSafeInteger'](_0x1c590e)||_0x1c590e<=0x0))throw CliErrors[_0x4f71fc(0x1de)](_0x4f71fc(0x1b4));return[...new Set(_0x2869ab)];}function parseCsv(_0x45519b){const _0x228420=a180_0x5141ef;return[...new Set(_0x45519b[_0x228420(0x1d5)](',')[_0x228420(0x1c1)](_0x1efaea=>_0x1efaea[_0x228420(0x1fe)]())['filter'](Boolean))];}function parseBooleanFlag(_0x5d988d,_0xcbee2f,_0xbfd04b){const _0x1cf75c=a180_0x5141ef;if(!hasFlag(_0x5d988d,_0xcbee2f)){if(_0xbfd04b)throw CliErrors[_0x1cf75c(0x1cc)](_0xcbee2f);return undefined;}const _0x1db3bf=_0x5d988d['rawFlags'][_0xcbee2f];if(_0x1db3bf===!![]||_0x1db3bf===![])return _0x1db3bf;if(_0x1db3bf===_0x1cf75c(0x1bb))return!![];if(_0x1db3bf===_0x1cf75c(0x1d3))return![];throw CliErrors['validation']('--'+_0xcbee2f+_0x1cf75c(0x1df));}function verifyVisibilityUpdate(_0x4c5717,_0x476882,_0x410b8a){const _0x44dbc9=a180_0x5141ef;assertVerified(!!_0x476882,_0x44dbc9(0x1ce)+_0x4c5717['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x476882[_0x44dbc9(0x1ad)]===_0x410b8a,_0x44dbc9(0x1ce)+_0x4c5717['id']+_0x44dbc9(0x1a5));const _0x1eb256=[['id',_0x476882['id'],_0x4c5717['id']],[_0x44dbc9(0x1ea),_0x476882[_0x44dbc9(0x1ea)],_0x4c5717[_0x44dbc9(0x1ea)]],[_0x44dbc9(0x1d9),_0x476882[_0x44dbc9(0x1d9)],_0x4c5717[_0x44dbc9(0x1d9)]],[_0x44dbc9(0x19c),_0x476882[_0x44dbc9(0x19c)],_0x4c5717[_0x44dbc9(0x19c)]],[_0x44dbc9(0x1b0),_0x476882[_0x44dbc9(0x1b0)],_0x4c5717['path']],[_0x44dbc9(0x18e),_0x476882[_0x44dbc9(0x18e)],_0x4c5717[_0x44dbc9(0x18e)]],[_0x44dbc9(0x1c6),_0x476882[_0x44dbc9(0x1c6)],_0x4c5717[_0x44dbc9(0x1c6)]],[_0x44dbc9(0x1e5),_0x476882[_0x44dbc9(0x1e5)],_0x4c5717['sort']],[_0x44dbc9(0x1a3),_0x476882['resources'],_0x4c5717[_0x44dbc9(0x1a3)]],[_0x44dbc9(0x1a9),_0x476882['resourcesValid'],_0x4c5717[_0x44dbc9(0x1a9)]],[_0x44dbc9(0x1c4),_0x476882['childrenIds'],_0x4c5717[_0x44dbc9(0x1c4)]],['childrenCount',_0x476882[_0x44dbc9(0x1e1)],_0x4c5717[_0x44dbc9(0x1e1)]],[_0x44dbc9(0x193),_0x476882['pageId'],_0x4c5717[_0x44dbc9(0x193)]],[_0x44dbc9(0x1f5),_0x476882[_0x44dbc9(0x1f5)],_0x4c5717[_0x44dbc9(0x1f5)]],[_0x44dbc9(0x1f8),_0x476882[_0x44dbc9(0x1f8)],_0x4c5717[_0x44dbc9(0x1f8)]],[_0x44dbc9(0x1f4),_0x476882[_0x44dbc9(0x1f4)],_0x4c5717['datasetId']],['datasetCode',_0x476882[_0x44dbc9(0x19f)],_0x4c5717['datasetCode']]];for(const [_0x44b92c,_0x4c0352,_0x32b763]of _0x1eb256){assertVerified(sameValue(_0x4c0352,_0x32b763),_0x44dbc9(0x1ce)+_0x4c5717['id']+'\x20'+_0x44b92c+'\x20changed\x20unexpectedly.');}}function sameValue(_0x60ee85,_0x2ad9b9){const _0xa6f36a=a180_0x5141ef;if(Array[_0xa6f36a(0x1e8)](_0x60ee85)||Array[_0xa6f36a(0x1e8)](_0x2ad9b9))return JSON[_0xa6f36a(0x1dd)](_0x60ee85)===JSON[_0xa6f36a(0x1dd)](_0x2ad9b9);return _0x60ee85===_0x2ad9b9;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a181_0x5b841e=a181_0xde0e;function a181_0x346d(){const _0x3e6692=['description','channelConfig','932SrTDAa','planned','11013330tCYIgK','mutation','721490mZnSSQ','config-create','document','configName','write','6264vdvBPJ','notification','channelType','verification','create','9PVXFRl','35934pBFLRi','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','Inspect\x20with\x20','10715096UBXvnM','POST','verified','2864UJvrZg','readTimeout','6zADIjo','20ouxPOp','input','isSafeInteger','appCode','Created\x20notification\x20config\x20',';\x20no\x20automatic\x20retry\x20was\x20attempted.','2462160juEEup','notification_config_create_outcome_unknown','configCode','28512EGSQFt',';\x20do\x20not\x20resubmit.'];a181_0x346d=function(){return _0x3e6692;};return a181_0x346d();}function a181_0xde0e(_0x4476db,_0xf10373){_0x4476db=_0x4476db-0x17d;const _0x346d6c=a181_0x346d();let _0xde0e6b=_0x346d6c[_0x4476db];return _0xde0e6b;}(function(_0x4b498f,_0x1e4f16){const _0x3c4871=a181_0xde0e,_0x288c2a=_0x4b498f();while(!![]){try{const _0x53ee91=parseInt(_0x3c4871(0x18d))/0x1*(-parseInt(_0x3c4871(0x19d))/0x2)+-parseInt(_0x3c4871(0x187))/0x3*(-parseInt(_0x3c4871(0x190))/0x4)+-parseInt(_0x3c4871(0x196))/0x5*(-parseInt(_0x3c4871(0x18f))/0x6)+-parseInt(_0x3c4871(0x1a1))/0x7+parseInt(_0x3c4871(0x18a))/0x8+parseInt(_0x3c4871(0x186))/0x9*(-parseInt(_0x3c4871(0x19f))/0xa)+parseInt(_0x3c4871(0x199))/0xb*(parseInt(_0x3c4871(0x181))/0xc);if(_0x53ee91===_0x1e4f16)break;else _0x288c2a['push'](_0x288c2a['shift']());}catch(_0x445173){_0x288c2a['push'](_0x288c2a['shift']());}}}(a181_0x346d,0xac4aa));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(_0x3a3234){const _0x3ba6ae=a181_0xde0e,_0x1de5c4=await readNotificationDocument(_0x3a3234,'create'),_0x3f868b=createMutationInput(_0x3a3234[_0x3ba6ae(0x193)],_0x1de5c4);return{'document':_0x1de5c4,'input':_0x3f868b,'planned':projectNotificationConfig({'appCode':_0x3a3234[_0x3ba6ae(0x193)],'configName':_0x1de5c4[_0x3ba6ae(0x17f)],'channelType':_0x1de5c4[_0x3ba6ae(0x183)],'endpointUrl':_0x1de5c4['endpointUrl'],'channelConfig':_0x1de5c4[_0x3ba6ae(0x19c)],'description':_0x1de5c4[_0x3ba6ae(0x19b)],'connectTimeout':_0x1de5c4['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x1de5c4[_0x3ba6ae(0x18e)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a181_0x5b841e(0x182),'command':a181_0x5b841e(0x17d),'description':a181_0x5b841e(0x188),'risk':a181_0x5b841e(0x180),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x27f7f0){assertSingleNotificationSource(_0x27f7f0);},async 'dryRun'(_0x32c756){const _0x4f215a=a181_0x5b841e,_0x275b77=await prepareCreate(_0x32c756),_0x43640=notificationLookupCommand(_0x32c756[_0x4f215a(0x193)],_0x275b77[_0x4f215a(0x17e)]['channelType']);return asDryRunResult({'operation':_0x4f215a(0x185),'selector':{'appCode':_0x32c756[_0x4f215a(0x193)],'configName':_0x275b77[_0x4f215a(0x17e)][_0x4f215a(0x17f)],'channelType':_0x275b77[_0x4f215a(0x17e)][_0x4f215a(0x183)]},'before':null,'after':_0x275b77[_0x4f215a(0x19e)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x4f215a(0x19e),'lookupCommand':_0x43640}},{'method':_0x4f215a(0x18b),'url':CREATE_PATH});},async 'execute'(_0x289036){const _0xebd7fa=a181_0x5b841e,_0x15a197=await prepareCreate(_0x289036),_0x5bbaf8=notificationLookupCommand(_0x289036[_0xebd7fa(0x193)],_0x15a197['document'][_0xebd7fa(0x183)]);let _0x2e9a45;try{_0x2e9a45=await createNotificationChannelConfig(_0x15a197[_0xebd7fa(0x191)]);}catch(_0x7a115d){if(isPlatformTransportFailure(_0x7a115d))throw notificationError('notification_config_create_outcome_unknown','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','Inspect\x20with\x20'+_0x5bbaf8+_0xebd7fa(0x19a));throw safeApiFailure(_0xebd7fa(0x185),_0xebd7fa(0x1a0),'Inspect\x20with\x20'+_0x5bbaf8+_0xebd7fa(0x195));}if(!Number[_0xebd7fa(0x192)](_0x2e9a45)||_0x2e9a45<=0x0)throw notificationError(_0xebd7fa(0x197),'Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Inspect\x20with\x20'+_0x5bbaf8+_0xebd7fa(0x19a));let _0x5b0f53;try{const _0x18991b=await getNotificationChannelConfig(_0x2e9a45,_0x289036[_0xebd7fa(0x193)]);_0x5b0f53=normalizeExactNotificationConfig(_0x18991b,_0x2e9a45,_0x289036[_0xebd7fa(0x193)]);}catch{throw safeApiFailure(_0xebd7fa(0x185),_0xebd7fa(0x184),_0xebd7fa(0x189)+_0x5bbaf8+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0xebd7fa(0x185),'selector':{'appCode':_0x5b0f53['appCode'],'id':_0x5b0f53['id'],'configCode':_0x5b0f53[_0xebd7fa(0x198)],'configName':_0x5b0f53[_0xebd7fa(0x17f)],'channelType':_0x5b0f53[_0xebd7fa(0x183)]},'before':null,'after':projectNotificationConfig(_0x5b0f53),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0xebd7fa(0x18c),'lookupCommand':_0x5bbaf8}},'message':_0xebd7fa(0x194)+_0x5b0f53['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a182_0x18fc5c=a182_0x20d7;(function(_0x6fbfe7,_0x55fe7){const _0x190541=a182_0x20d7,_0xd6cbff=_0x6fbfe7();while(!![]){try{const _0x41f397=parseInt(_0x190541(0x1cf))/0x1*(-parseInt(_0x190541(0x1ce))/0x2)+-parseInt(_0x190541(0x1b7))/0x3*(parseInt(_0x190541(0x1c0))/0x4)+parseInt(_0x190541(0x1b8))/0x5*(-parseInt(_0x190541(0x1c5))/0x6)+parseInt(_0x190541(0x1d2))/0x7*(-parseInt(_0x190541(0x1cb))/0x8)+-parseInt(_0x190541(0x1c2))/0x9*(-parseInt(_0x190541(0x1bf))/0xa)+parseInt(_0x190541(0x1c1))/0xb*(-parseInt(_0x190541(0x1ca))/0xc)+parseInt(_0x190541(0x1b4))/0xd;if(_0x41f397===_0x55fe7)break;else _0xd6cbff['push'](_0xd6cbff['shift']());}catch(_0x17194a){_0xd6cbff['push'](_0xd6cbff['shift']());}}}(a182_0x13f2,0x42d4b));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_0x18fc5c(0x1c6),REFERENCE_WARNING=a182_0x18fc5c(0x1d1);async function prepareDelete(_0x582f53){const _0x1b4206=a182_0x18fc5c,_0x5355de=readNotificationId(_0x582f53),_0x2004ff=await requireExactNotificationConfig(_0x582f53['appCode'],_0x5355de,_0x1b4206(0x1c9));return{'id':_0x5355de,'before':_0x2004ff};}function a182_0x13f2(){const _0x121334=['\x20remains\x20present\x20after\x20delete.','389720stMbgz','1436muKdZT','22HnGBiS','81NsjzZu','POST','config-delete','6BzdDCB','/notification/channel-config/delete','planned','Deleted\x20notification\x20config\x20','delete','1990104KZKgze','7664pGEUEC','\x20delete\x20could\x20not\x20be\x20verified.','mutation','424NQuxWl','2143XwJZgA','unshift','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','742CihDhb','before','verified','Inspect\x20with\x20','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','Notification\x20config\x20','appCode','high-risk-write','16760029OwVSaw','notification_config_delete_outcome_unknown',';\x20do\x20not\x20resubmit\x20automatically.','3231pGSVZN','460255xOgghE','notification_config_delete_verification_failed','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','channelType','notification_config_delete_verification_unavailable'];a182_0x13f2=function(){return _0x121334;};return a182_0x13f2();}function a182_0x20d7(_0x44e2d7,_0x3be0a5){_0x44e2d7=_0x44e2d7-0x1b2;const _0x13f21c=a182_0x13f2();let _0x20d7bc=_0x13f21c[_0x44e2d7];return _0x20d7bc;}export const notificationConfigDelete={'service':'notification','command':a182_0x18fc5c(0x1c4),'description':a182_0x18fc5c(0x1d6),'risk':a182_0x18fc5c(0x1b3),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0xa5f1d9){readNotificationId(_0xa5f1d9),requireNotificationExplicitYes(_0xa5f1d9);},async 'dryRun'(_0x8dc6ea){const _0xc5438f=a182_0x18fc5c,_0x63422d=await prepareDelete(_0x8dc6ea),_0x1e71e9=notificationLookupCommand(_0x8dc6ea[_0xc5438f(0x1b2)],_0x63422d[_0xc5438f(0x1d3)][_0xc5438f(0x1bc)]);return asDryRunResult({'operation':_0xc5438f(0x1c9),'selector':notificationSelector(_0x63422d[_0xc5438f(0x1d3)]),'before':projectNotificationConfig(_0x63422d[_0xc5438f(0x1d3)]),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0xc5438f(0x1c7),'lookupCommand':_0x1e71e9}},{'method':_0xc5438f(0x1c3),'url':DELETE_PATH});},async 'execute'(_0x5e1ea4){const _0x53246e=a182_0x18fc5c;requireNotificationExplicitYes(_0x5e1ea4);const _0x4b695f=await prepareDelete(_0x5e1ea4),_0x5045c7=notificationLookupCommand(_0x5e1ea4[_0x53246e(0x1b2)],_0x4b695f[_0x53246e(0x1d3)][_0x53246e(0x1bc)]);let _0x578fff=![];try{await deleteNotificationChannelConfig(_0x4b695f['id'],_0x5e1ea4['appCode']);}catch(_0x17739f){if(!isPlatformTransportFailure(_0x17739f))throw safeApiFailure(_0x53246e(0x1c9),_0x53246e(0x1cd),'Inspect\x20with\x20'+_0x5045c7+_0x53246e(0x1bb));_0x578fff=!![];}let _0x579870;try{_0x579870=await listNotificationChannelConfigs(_0x5e1ea4[_0x53246e(0x1b2)],_0x4b695f[_0x53246e(0x1d3)]['channelType']),validateNotificationDeleteReadback(_0x579870,_0x5e1ea4['appCode'],_0x4b695f[_0x53246e(0x1d3)]['channelType']);}catch{throw notificationError(_0x578fff?'notification_config_delete_outcome_unknown':_0x53246e(0x1bd),'Notification\x20config\x20'+_0x4b695f['id']+_0x53246e(0x1cc),_0x53246e(0x1d5)+_0x5045c7+_0x53246e(0x1b6));}if(_0x579870['some'](_0x2c1d21=>_0x2c1d21['id']===_0x4b695f['id']))throw notificationError(_0x578fff?_0x53246e(0x1b5):_0x53246e(0x1b9),_0x53246e(0x1d7)+_0x4b695f['id']+_0x53246e(0x1be),_0x53246e(0x1d5)+_0x5045c7+_0x53246e(0x1b6));const _0x5bab9e=[REFERENCE_WARNING];return _0x578fff&&_0x5bab9e[_0x53246e(0x1d0)](_0x53246e(0x1ba)),{'ok':!![],'data':{'operation':_0x53246e(0x1c9),'selector':notificationSelector(_0x4b695f['before']),'before':projectNotificationConfig(_0x4b695f[_0x53246e(0x1d3)]),'after':null,'dryRun':![],'backend':{'method':_0x53246e(0x1c3),'path':DELETE_PATH},'warnings':_0x5bab9e,'verification':{'status':_0x53246e(0x1d4),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x578fff,'lookupCommand':_0x5045c7}},'message':_0x53246e(0x1c8)+_0x4b695f['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a183_0x177296=a183_0x2ee1;(function(_0x3c33b0,_0x51b78a){const _0x32c3f9=a183_0x2ee1,_0x5365f9=_0x3c33b0();while(!![]){try{const _0x5b0ad4=parseInt(_0x32c3f9(0x126))/0x1*(-parseInt(_0x32c3f9(0x11e))/0x2)+-parseInt(_0x32c3f9(0x122))/0x3+-parseInt(_0x32c3f9(0x124))/0x4*(-parseInt(_0x32c3f9(0x12c))/0x5)+parseInt(_0x32c3f9(0x114))/0x6+parseInt(_0x32c3f9(0x125))/0x7+-parseInt(_0x32c3f9(0x11b))/0x8+-parseInt(_0x32c3f9(0x11f))/0x9*(-parseInt(_0x32c3f9(0x11c))/0xa);if(_0x5b0ad4===_0x51b78a)break;else _0x5365f9['push'](_0x5365f9['shift']());}catch(_0x42766c){_0x5365f9['push'](_0x5365f9['shift']());}}}(a183_0x2033,0xef328));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a183_0x177296(0x11d),'command':a183_0x177296(0x12b),'description':a183_0x177296(0x121),'risk':a183_0x177296(0x123),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a183_0x177296(0x120),'type':a183_0x177296(0x12d),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':a183_0x177296(0x129),'type':a183_0x177296(0x128),'default':![],'description':a183_0x177296(0x112)}],async 'validate'(_0x11e6c0){const _0x22ca42=a183_0x177296;if(_0x11e6c0[_0x22ca42(0x117)]('all')&&_0x11e6c0['str'](_0x22ca42(0x120))[_0x22ca42(0x115)]())throw CliErrors[_0x22ca42(0x12a)]('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.',_0x22ca42(0x119));if(_0x11e6c0['bool'](_0x22ca42(0x129)))return;readNotificationChannelType(_0x11e6c0);},async 'execute'(_0xd5ef53){const _0x411625=a183_0x177296;if(_0xd5ef53['bool'](_0x411625(0x129))){const _0x592fb7=await Promise[_0x411625(0x129)](NOTIFICATION_CHANNEL_TYPES[_0x411625(0x111)](_0x399c22=>listNotificationChannelConfigs(_0xd5ef53[_0x411625(0x11a)],_0x399c22))),_0x55ffe6=_0x592fb7[_0x411625(0x113)]()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0xd5ef53[_0x411625(0x11a)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x55ffe6[_0x411625(0x118)],'configs':_0x55ffe6},'message':'Found\x20'+_0x55ffe6[_0x411625(0x118)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x17bcec=readNotificationChannelType(_0xd5ef53),_0x4a1ee8=await listNotificationChannelConfigs(_0xd5ef53[_0x411625(0x11a)],_0x17bcec),_0x420e63=_0x4a1ee8['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0xd5ef53[_0x411625(0x11a)],'channelType':_0x17bcec,'count':_0x420e63['length'],'configs':_0x420e63},'message':_0x411625(0x127)+_0x420e63[_0x411625(0x118)]+'\x20'+_0x17bcec+_0x411625(0x116)};}};function a183_0x2ee1(_0x1ec29f,_0x5e8e67){_0x1ec29f=_0x1ec29f-0x111;const _0x2033cf=a183_0x2033();let _0x2ee1d0=_0x2033cf[_0x1ec29f];return _0x2ee1d0;}function a183_0x2033(){const _0x127bff=['config-list','704210IaGPiP','string','map','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','flat','1659372KZivEw','trim','\x20notification\x20config(s)','bool','length','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','appCode','8396472MaZIMC','4733070ineXos','notification','550QcuOaJ','54fwOOfK','type','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','5469324PlzBsq','read','36CHhHab','4793334QLvyMt','4423HnOaoJ','Found\x20','boolean','all','validation'];a183_0x2033=function(){return _0x127bff;};return a183_0x2033();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a184_0x3d595d=a184_0xfa5d;(function(_0x3682dc,_0x215365){const _0x410778=a184_0xfa5d,_0x46b065=_0x3682dc();while(!![]){try{const _0x549e73=parseInt(_0x410778(0xc7))/0x1+-parseInt(_0x410778(0xcd))/0x2+parseInt(_0x410778(0xc4))/0x3+parseInt(_0x410778(0xcc))/0x4*(-parseInt(_0x410778(0xc2))/0x5)+-parseInt(_0x410778(0xb8))/0x6*(parseInt(_0x410778(0xc5))/0x7)+parseInt(_0x410778(0xbf))/0x8+parseInt(_0x410778(0xb7))/0x9;if(_0x549e73===_0x215365)break;else _0x46b065['push'](_0x46b065['shift']());}catch(_0x2ae192){_0x46b065['push'](_0x46b065['shift']());}}}(a184_0x47a3,0xc0bf2));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';function a184_0xfa5d(_0x1a35d2,_0x33038e){_0x1a35d2=_0x1a35d2-0xb1;const _0x47a3db=a184_0x47a3();let _0xfa5d28=_0x47a3db[_0x1a35d2];return _0xfa5d28;}const UPDATE_PATH=a184_0x3d595d(0xc8);function a184_0x47a3(){const _0x468374=['315824NSpbdv','/notification/channel-config/update','provesChange','channelType','payload','2571516nffTNC','1652968HVLMqP','POST','before','patch','\x20with\x20','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','notification','verifiedFields','notification_config_update_outcome_unknown','config-update','Inspect\x20ID\x20','\x20via\x20','Inspect\x20with\x20--id\x20','verified','12449304ydQgbl','234066Vitysg','allMatch','mutation',';\x20do\x20not\x20resubmit\x20automatically.','update','notification_config_update_verification_failed','appCode','8856760hxRTnK','notification_config_update_verification_unavailable','Notification\x20config\x20','5CHuMPF','high-risk-write','1986057wJMGLS','217VICarc','planned'];a184_0x47a3=function(){return _0x468374;};return a184_0x47a3();}async function prepareUpdate(_0x664167){const _0x5050dd=a184_0x3d595d,_0x32b37c=readNotificationId(_0x664167),_0x464898=await readNotificationDocument(_0x664167,_0x5050dd(0xbc)),_0x512d5e=await requireExactNotificationConfig(_0x664167['appCode'],_0x32b37c,'update');return{'id':_0x32b37c,'patch':_0x464898,'before':_0x512d5e,'payload':mergeUpdateInput(_0x512d5e,_0x464898),'planned':plannedUpdateProjection(_0x512d5e,_0x464898)};}export const notificationConfigUpdate={'service':a184_0x3d595d(0xd4),'command':a184_0x3d595d(0xb2),'description':a184_0x3d595d(0xd3),'risk':a184_0x3d595d(0xc3),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x5cb64a){readNotificationId(_0x5cb64a),assertSingleNotificationSource(_0x5cb64a),requireNotificationExplicitYes(_0x5cb64a);},async 'dryRun'(_0x4ca928){const _0x374977=a184_0x3d595d,_0x553a8f=await prepareUpdate(_0x4ca928),_0x148aba=notificationLookupCommand(_0x4ca928['appCode'],_0x553a8f[_0x374977(0xcf)][_0x374977(0xca)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x553a8f[_0x374977(0xcf)]),'before':projectNotificationConfig(_0x553a8f[_0x374977(0xcf)]),'after':_0x553a8f[_0x374977(0xc6)],'dryRun':!![],'backend':{'method':_0x374977(0xce),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x374977(0xc6),'lookupCommand':_0x148aba}},{'method':_0x374977(0xce),'url':UPDATE_PATH});},async 'execute'(_0x2d5b67){const _0x1fd4bb=a184_0x3d595d;requireNotificationExplicitYes(_0x2d5b67);const _0x14ad76=await prepareUpdate(_0x2d5b67),_0x3d4f51=notificationLookupCommand(_0x2d5b67[_0x1fd4bb(0xbe)],_0x14ad76[_0x1fd4bb(0xcf)][_0x1fd4bb(0xca)]);let _0x4e576a=![];try{await updateNotificationChannelConfig(_0x14ad76[_0x1fd4bb(0xcb)]);}catch(_0x48b512){if(!isPlatformTransportFailure(_0x48b512))throw safeApiFailure('update',_0x1fd4bb(0xba),_0x1fd4bb(0xb3)+_0x14ad76['id']+_0x1fd4bb(0xd1)+_0x3d4f51+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x4e576a=!![];}let _0x4ee0c4;try{const _0x347b90=await getNotificationChannelConfig(_0x14ad76['id'],_0x2d5b67[_0x1fd4bb(0xbe)]);_0x4ee0c4=normalizeExactNotificationConfig(_0x347b90,_0x14ad76['id'],_0x2d5b67[_0x1fd4bb(0xbe)]);}catch{throw notificationError(_0x4e576a?_0x1fd4bb(0xb1):_0x1fd4bb(0xc0),_0x1fd4bb(0xc1)+_0x14ad76['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x1fd4bb(0xb5)+_0x14ad76['id']+_0x1fd4bb(0xb4)+_0x3d4f51+';\x20do\x20not\x20resubmit\x20automatically.');}const _0x1e09b6=requestedSafeFieldsMatch(_0x14ad76[_0x1fd4bb(0xcf)],_0x4ee0c4,_0x14ad76[_0x1fd4bb(0xd0)]);if(!_0x1e09b6[_0x1fd4bb(0xb9)]||_0x4e576a&&!_0x1e09b6[_0x1fd4bb(0xc9)])throw notificationError(_0x4e576a?_0x1fd4bb(0xb1):_0x1fd4bb(0xbd),'Notification\x20config\x20'+_0x14ad76['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','Inspect\x20with\x20--id\x20'+_0x14ad76['id']+'\x20via\x20'+_0x3d4f51+_0x1fd4bb(0xbb));const _0x55bc18=_0x4e576a?[_0x1fd4bb(0xd2)]:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x4ee0c4),'before':projectNotificationConfig(_0x14ad76[_0x1fd4bb(0xcf)]),'after':projectNotificationConfig(_0x4ee0c4),'dryRun':![],'backend':{'method':_0x1fd4bb(0xce),'path':UPDATE_PATH},'warnings':_0x55bc18,'verification':{'status':_0x1fd4bb(0xb6),'recoveredAfterUnknownResponse':_0x4e576a,'verifiedFields':_0x1e09b6[_0x1fd4bb(0xd5)],'lookupCommand':_0x3d4f51}},'message':'Updated\x20notification\x20config\x20'+_0x4ee0c4['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf4381a,_0x25bec1){const _0x3bb291=a185_0x29ce,_0x208e88=_0xf4381a();while(!![]){try{const _0x3cc247=-parseInt(_0x3bb291(0x17d))/0x1*(parseInt(_0x3bb291(0x17e))/0x2)+parseInt(_0x3bb291(0x186))/0x3+parseInt(_0x3bb291(0x187))/0x4+-parseInt(_0x3bb291(0x182))/0x5*(parseInt(_0x3bb291(0x17f))/0x6)+-parseInt(_0x3bb291(0x183))/0x7*(parseInt(_0x3bb291(0x181))/0x8)+parseInt(_0x3bb291(0x184))/0x9*(parseInt(_0x3bb291(0x180))/0xa)+-parseInt(_0x3bb291(0x185))/0xb;if(_0x3cc247===_0x25bec1)break;else _0x208e88['push'](_0x208e88['shift']());}catch(_0x5e6ce8){_0x208e88['push'](_0x208e88['shift']());}}}(a185_0x1dff,0x8df65));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a185_0x1dff(){const _0x34a779=['40lntwIa','1084240lclWIg','145jKaTsR','7GCVVrT','2258541wzXdrq','10848651ebBEyo','2204229BbwXXc','2401352kYYHAs','26345wtoBIL','10awNDpv','104256NEhZsO'];a185_0x1dff=function(){return _0x34a779;};return a185_0x1dff();}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a185_0x29ce(_0x42c5e7,_0x3c0ccd){_0x42c5e7=_0x42c5e7-0x17d;const _0x1dff66=a185_0x1dff();let _0x29cee7=_0x1dff66[_0x42c5e7];return _0x29cee7;}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a186_0x4f40fd=a186_0x3a4e;(function(_0x3ebb90,_0x33bafc){const _0xfd4d1d=a186_0x3a4e,_0x54077c=_0x3ebb90();while(!![]){try{const _0x1b91aa=-parseInt(_0xfd4d1d(0x21a))/0x1+parseInt(_0xfd4d1d(0x1f2))/0x2*(parseInt(_0xfd4d1d(0x251))/0x3)+parseInt(_0xfd4d1d(0x24a))/0x4*(-parseInt(_0xfd4d1d(0x24c))/0x5)+parseInt(_0xfd4d1d(0x23a))/0x6*(parseInt(_0xfd4d1d(0x20a))/0x7)+-parseInt(_0xfd4d1d(0x22c))/0x8*(parseInt(_0xfd4d1d(0x205))/0x9)+-parseInt(_0xfd4d1d(0x1dc))/0xa+parseInt(_0xfd4d1d(0x22e))/0xb*(parseInt(_0xfd4d1d(0x20f))/0xc);if(_0x1b91aa===_0x33bafc)break;else _0x54077c['push'](_0x54077c['shift']());}catch(_0x3d3d28){_0x54077c['push'](_0x54077c['shift']());}}}(a186_0x3a25,0xd9e81));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_0x4f40fd(0x202),a186_0x4f40fd(0x206),a186_0x4f40fd(0x1e0),a186_0x4f40fd(0x233),a186_0x4f40fd(0x204)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;function a186_0x3a4e(_0x555084,_0x408bed){_0x555084=_0x555084-0x1db;const _0x3a2582=a186_0x3a25();let _0x3a4eb4=_0x3a2582[_0x555084];return _0x3a4eb4;}const ALLOWED_INPUT_FIELDS=new Set(['configName',a186_0x4f40fd(0x214),a186_0x4f40fd(0x1db),a186_0x4f40fd(0x23f),a186_0x4f40fd(0x255),'connectTimeout',a186_0x4f40fd(0x253)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a186_0x4f40fd(0x210),a186_0x4f40fd(0x1ef),a186_0x4f40fd(0x240)]),EMAIL_RECIPIENT_FIELDS=new Set([a186_0x4f40fd(0x22b),'recipients','ccList','bccList',a186_0x4f40fd(0x23e),'subjectPrefix','fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a186_0x4f40fd(0x1eb),'type':a186_0x4f40fd(0x219),'required':![],'description':a186_0x4f40fd(0x21c)},{'name':a186_0x4f40fd(0x24b),'type':a186_0x4f40fd(0x216),'required':![],'default':![],'description':a186_0x4f40fd(0x244)},{'name':'from-env','type':'string','required':![],'description':a186_0x4f40fd(0x232)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a186_0x4f40fd(0x20d),'required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5eaa9f,_0x5f093d,_0x22b9f3){return new CliError(_0x5eaa9f,0x1,_0x5f093d,_0x22b9f3);}export function readNotificationId(_0x200be9){const _0xf576fd=a186_0x4f40fd,_0x228e9d=_0x200be9['num']('id');if(!Number[_0xf576fd(0x222)](_0x228e9d)||_0x228e9d<=0x0)throw notificationError(_0xf576fd(0x228),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x228e9d;}export function requireNotificationExplicitYes(_0x31152b){const _0xed7ae7=a186_0x4f40fd;if(_0x31152b[_0xed7ae7(0x1f9)](_0xed7ae7(0x22f))||_0x31152b[_0xed7ae7(0x1f9)](_0xed7ae7(0x1ff)))return;throw notificationError(_0xed7ae7(0x1dd),_0xed7ae7(0x1fe),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x2257cd,_0x2e1abe='type',_0x159663=a186_0x4f40fd(0x202)){const _0x4ed9bb=a186_0x4f40fd,_0x43cef2=_0x2257cd[_0x4ed9bb(0x250)](_0x2e1abe)[_0x4ed9bb(0x1fc)]()||_0x159663;if(!NOTIFICATION_CHANNEL_TYPES[_0x4ed9bb(0x21b)](_0x43cef2))throw CliErrors[_0x4ed9bb(0x23d)](_0x4ed9bb(0x1f7)+_0x2e1abe+':\x20'+_0x43cef2,_0x4ed9bb(0x236)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x43cef2;}export function assertSingleNotificationSource(_0x50273b){const _0x435ae4=a186_0x4f40fd,_0x1025d9=[],_0x3780b2=_0x50273b['str'](_0x435ae4(0x1eb))[_0x435ae4(0x1fc)]();if(_0x3780b2)_0x1025d9[_0x435ae4(0x200)]({'kind':_0x435ae4(0x1eb),'path':_0x3780b2});if(_0x50273b[_0x435ae4(0x1f9)]('stdin'))_0x1025d9[_0x435ae4(0x200)]({'kind':_0x435ae4(0x24b)});const _0xf30dd9=_0x50273b['str'](_0x435ae4(0x225))['trim']();if(_0xf30dd9)_0x1025d9[_0x435ae4(0x200)]({'kind':'env','name':_0xf30dd9});if(_0x1025d9[_0x435ae4(0x1f4)]===0x0)throw CliErrors[_0x435ae4(0x23d)](_0x435ae4(0x21e),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x1025d9['length']>0x1)throw CliErrors[_0x435ae4(0x23d)](_0x435ae4(0x241),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x1025d9[0x0];}export async function readNotificationDocument(_0x30588e,_0x5491c5){const _0x37bfdd=a186_0x4f40fd,_0x16b960=assertSingleNotificationSource(_0x30588e),_0x3360e8=_0x16b960[_0x37bfdd(0x23b)]===_0x37bfdd(0x1eb)?_0x37bfdd(0x209)+_0x16b960[_0x37bfdd(0x1e6)]:_0x16b960[_0x37bfdd(0x23b)]===_0x37bfdd(0x220)?'environment\x20variable\x20'+_0x16b960[_0x37bfdd(0x20b)]:_0x37bfdd(0x24b);let _0x7be519;try{if(_0x16b960[_0x37bfdd(0x23b)]===_0x37bfdd(0x1eb))_0x7be519=await readFile(_0x16b960['path'],_0x37bfdd(0x245));else{if(_0x16b960[_0x37bfdd(0x23b)]===_0x37bfdd(0x220)){if(!(_0x16b960['name']in process.env))throw notificationError(_0x37bfdd(0x242),_0x37bfdd(0x1fa)+_0x16b960[_0x37bfdd(0x20b)]);_0x7be519=process.env[_0x16b960.name]??'';}else _0x7be519=await readStdin();}}catch(_0x1ebcf9){if(_0x1ebcf9 instanceof CliError)throw _0x1ebcf9;throw notificationError(_0x37bfdd(0x242),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x3360e8+'.');}let _0x4b9dab;try{_0x4b9dab=JSON[_0x37bfdd(0x235)](_0x7be519);}catch{throw notificationError(_0x37bfdd(0x1e1),_0x37bfdd(0x1e7)+_0x3360e8+_0x37bfdd(0x1fd),_0x37bfdd(0x1e4));}if(!isJsonObject(_0x4b9dab))throw notificationError(_0x37bfdd(0x1e1),'Notification\x20JSON\x20from\x20'+_0x3360e8+_0x37bfdd(0x1ec));return validateNotificationDocument(_0x4b9dab,_0x5491c5);}export function projectNotificationListConfig(_0x4edd41,_0x240e7c){const _0xa218ca=a186_0x4f40fd;return{'id':typeof _0x4edd41['id']==='number'?_0x4edd41['id']:null,'configCode':requireResponseString(_0x4edd41[_0xa218ca(0x1ef)],_0xa218ca(0x1ef),_0x240e7c),'configName':requireResponseString(_0x4edd41[_0xa218ca(0x1f1)],_0xa218ca(0x1f1),_0x240e7c),'channelType':requireResponseString(_0x4edd41[_0xa218ca(0x214)],_0xa218ca(0x214),_0x240e7c),'description':normalizeNullableString(_0x4edd41[_0xa218ca(0x255)]),'createTime':normalizeNullableString(_0x4edd41[_0xa218ca(0x203)]),'updateTime':normalizeNullableString(_0x4edd41[_0xa218ca(0x1e3)])};}export function normalizeExactNotificationConfig(_0x44ca43,_0x3ed778,_0x327ca4){const _0x31cf81=a186_0x4f40fd;if(!Number[_0x31cf81(0x222)](_0x44ca43['id'])||_0x44ca43['id']!==_0x3ed778)throw notificationError(_0x31cf81(0x21d),_0x31cf81(0x226)+_0x3ed778+'.');if(_0x44ca43[_0x31cf81(0x210)]!==_0x327ca4)throw notificationError(_0x31cf81(0x21d),_0x31cf81(0x207)+_0x3ed778+_0x31cf81(0x22d));const _0x5695e9=requireExactString(_0x44ca43[_0x31cf81(0x1f1)],_0x31cf81(0x1f1),_0x3ed778),_0x43ba52=requireExactString(_0x44ca43[_0x31cf81(0x1ef)],_0x31cf81(0x1ef),_0x3ed778),_0x2158ae=requireExactString(_0x44ca43['channelType'],_0x31cf81(0x214),_0x3ed778);if(!NOTIFICATION_CHANNEL_TYPES[_0x31cf81(0x21b)](_0x2158ae))throw notificationError(_0x31cf81(0x21d),_0x31cf81(0x207)+_0x3ed778+_0x31cf81(0x246));const _0x403320=responseNullableString(_0x44ca43[_0x31cf81(0x1db)],_0x31cf81(0x1db),_0x3ed778),_0x953ca0=responseNullableString(_0x44ca43['channelConfig'],'channelConfig',_0x3ed778),_0x512931=responseNullableString(_0x44ca43[_0x31cf81(0x255)],_0x31cf81(0x255),_0x3ed778),_0x1f47d6=responseNullableTimeout(_0x44ca43['connectTimeout'],_0x31cf81(0x227),_0x3ed778),_0x5d9818=responseNullableTimeout(_0x44ca43[_0x31cf81(0x253)],_0x31cf81(0x253),_0x3ed778);return{'id':_0x3ed778,'appCode':_0x327ca4,'configCode':_0x43ba52,'configName':_0x5695e9,'channelType':_0x2158ae,'endpointUrl':redactSensitive(_0x403320),'channelConfig':redactSensitive(_0x953ca0),'description':_0x512931,'connectTimeout':_0x1f47d6,'readTimeout':_0x5d9818,'endpointUrlRaw':_0x403320,'channelConfigRaw':_0x953ca0};}export async function requireExactNotificationConfig(_0x1f0caf,_0x1374f6,_0x15b4f7){const _0x4208de=a186_0x4f40fd;let _0x880c09;try{_0x880c09=await getNotificationChannelConfig(_0x1374f6,_0x1f0caf);}catch{throw safeApiFailure(_0x15b4f7,'preflight',_0x4208de(0x212)+_0x1f0caf+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x880c09,_0x1374f6,_0x1f0caf);}export function projectNotificationConfig(_0x154645){const _0x255d92=a186_0x4f40fd;return{'id':_0x154645['id']??null,'appCode':_0x154645[_0x255d92(0x210)],'configCode':_0x154645['configCode']??null,'configName':_0x154645[_0x255d92(0x1f1)],'channelType':_0x154645['channelType'],'endpointUrl':redactSensitive(_0x154645[_0x255d92(0x1db)]),'channelConfig':redactSensitive(_0x154645[_0x255d92(0x23f)]),'description':_0x154645[_0x255d92(0x255)]??null,'connectTimeout':_0x154645[_0x255d92(0x227)]??null,'readTimeout':_0x154645[_0x255d92(0x253)]??null};}export function notificationSelector(_0x520aab){const _0x3b7516=a186_0x4f40fd;return{'appCode':_0x520aab[_0x3b7516(0x210)],'id':_0x520aab['id'],'configCode':_0x520aab[_0x3b7516(0x1ef)],'configName':_0x520aab[_0x3b7516(0x1f1)],'channelType':_0x520aab[_0x3b7516(0x214)]};}export function createMutationInput(_0x99f465,_0x3e4c57){const _0x545b24=a186_0x4f40fd;return{'appCode':_0x99f465,'configName':_0x3e4c57[_0x545b24(0x1f1)],'channelType':_0x3e4c57[_0x545b24(0x214)],...hasOwn(_0x3e4c57,_0x545b24(0x1db))?{'endpointUrl':_0x3e4c57['endpointUrl']}:{},...hasOwn(_0x3e4c57,_0x545b24(0x23f))?{'channelConfig':serializeChannelConfig(_0x3e4c57[_0x545b24(0x23f)])}:{},...hasOwn(_0x3e4c57,'description')?{'description':_0x3e4c57['description']}:{},...hasOwn(_0x3e4c57,_0x545b24(0x227))?{'connectTimeout':_0x3e4c57['connectTimeout']}:{},...hasOwn(_0x3e4c57,_0x545b24(0x253))?{'readTimeout':_0x3e4c57['readTimeout']}:{}};}export function mergeUpdateInput(_0x4e8245,_0x32563f){const _0xfe32c2=a186_0x4f40fd;return{'id':_0x4e8245['id'],'appCode':_0x4e8245[_0xfe32c2(0x210)],'configName':_0x32563f[_0xfe32c2(0x1f1)]??_0x4e8245[_0xfe32c2(0x1f1)],'channelType':_0x32563f[_0xfe32c2(0x214)]??_0x4e8245[_0xfe32c2(0x214)],'endpointUrl':hasOwn(_0x32563f,'endpointUrl')?_0x32563f[_0xfe32c2(0x1db)]:_0x4e8245[_0xfe32c2(0x217)],'channelConfig':hasOwn(_0x32563f,_0xfe32c2(0x23f))?serializeChannelConfig(_0x32563f[_0xfe32c2(0x23f)]):_0x4e8245[_0xfe32c2(0x239)],'description':hasOwn(_0x32563f,_0xfe32c2(0x255))?_0x32563f['description']:_0x4e8245[_0xfe32c2(0x255)],'connectTimeout':hasOwn(_0x32563f,_0xfe32c2(0x227))?_0x32563f[_0xfe32c2(0x227)]:_0x4e8245['connectTimeout'],'readTimeout':hasOwn(_0x32563f,'readTimeout')?_0x32563f[_0xfe32c2(0x253)]:_0x4e8245[_0xfe32c2(0x253)]};}export function plannedUpdateProjection(_0x53429e,_0x2cb7c6){const _0x35edce=a186_0x4f40fd;return projectNotificationConfig({'id':_0x53429e['id'],'appCode':_0x53429e['appCode'],'configCode':_0x53429e['configCode'],'configName':_0x2cb7c6[_0x35edce(0x1f1)]??_0x53429e[_0x35edce(0x1f1)],'channelType':_0x2cb7c6[_0x35edce(0x214)]??_0x53429e[_0x35edce(0x214)],'endpointUrl':hasOwn(_0x2cb7c6,_0x35edce(0x1db))?_0x2cb7c6[_0x35edce(0x1db)]:_0x53429e[_0x35edce(0x217)],'channelConfig':hasOwn(_0x2cb7c6,_0x35edce(0x23f))?_0x2cb7c6[_0x35edce(0x23f)]:_0x53429e[_0x35edce(0x239)],'description':hasOwn(_0x2cb7c6,_0x35edce(0x255))?_0x2cb7c6[_0x35edce(0x255)]:_0x53429e[_0x35edce(0x255)],'connectTimeout':hasOwn(_0x2cb7c6,_0x35edce(0x227))?_0x2cb7c6[_0x35edce(0x227)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x53429e[_0x35edce(0x227)],'readTimeout':hasOwn(_0x2cb7c6,_0x35edce(0x253))?_0x2cb7c6['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x53429e[_0x35edce(0x253)]});}export function requestedSafeFieldsMatch(_0x51fac1,_0x419523,_0x33c9bc){const _0x4b34c5=a186_0x4f40fd,_0x3e7a92=[],_0x1c5dfb=[],_0x468b1f=[];for(const _0xf87061 of['configName','channelType',_0x4b34c5(0x255)]){if(!hasOwn(_0x33c9bc,_0xf87061))continue;_0x468b1f[_0x4b34c5(0x200)](_0xf87061),_0x3e7a92[_0x4b34c5(0x200)](_0x419523[_0xf87061]===_0x33c9bc[_0xf87061]),_0x1c5dfb[_0x4b34c5(0x200)](_0x51fac1[_0xf87061]!==_0x33c9bc[_0xf87061]&&_0x419523[_0xf87061]===_0x33c9bc[_0xf87061]);}for(const _0x42aa95 of[_0x4b34c5(0x227),_0x4b34c5(0x253)]){if(!hasOwn(_0x33c9bc,_0x42aa95))continue;const _0x54e4f1=_0x33c9bc[_0x42aa95]??(_0x42aa95==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x468b1f[_0x4b34c5(0x200)](_0x42aa95),_0x3e7a92['push'](_0x419523[_0x42aa95]===_0x54e4f1),_0x1c5dfb[_0x4b34c5(0x200)](_0x51fac1[_0x42aa95]!==_0x54e4f1&&_0x419523[_0x42aa95]===_0x54e4f1);}return hasOwn(_0x33c9bc,_0x4b34c5(0x1db))&&_0x33c9bc[_0x4b34c5(0x1db)]===null&&(_0x468b1f['push'](_0x4b34c5(0x238)),_0x3e7a92[_0x4b34c5(0x200)](_0x419523['endpointUrlRaw']===null||_0x419523[_0x4b34c5(0x217)]===''),_0x1c5dfb[_0x4b34c5(0x200)](_0x51fac1['endpointUrlRaw']!==null&&_0x51fac1[_0x4b34c5(0x217)]!==''&&(_0x419523[_0x4b34c5(0x217)]===null||_0x419523[_0x4b34c5(0x217)]===''))),{'allMatch':_0x3e7a92[_0x4b34c5(0x1f0)](Boolean),'provesChange':_0x1c5dfb['some'](Boolean),'verifiedFields':_0x468b1f};}export function validateNotificationDeleteReadback(_0x101a8b,_0x5925d3,_0xddc298){const _0x44035b=a186_0x4f40fd;for(const [_0x2cd9c7,_0x2b586b]of _0x101a8b[_0x44035b(0x24d)]()){if(!Number[_0x44035b(0x222)](_0x2b586b['id'])||_0x2b586b['id']<=0x0)throw notificationError(_0x44035b(0x21d),_0x44035b(0x20c)+(_0x2cd9c7+0x1)+_0x44035b(0x229));if(_0x2b586b['appCode']!==_0x5925d3)throw notificationError(_0x44035b(0x21d),_0x44035b(0x20c)+(_0x2cd9c7+0x1)+_0x44035b(0x21f));if(_0x2b586b[_0x44035b(0x214)]!==_0xddc298)throw notificationError(_0x44035b(0x21d),_0x44035b(0x20c)+(_0x2cd9c7+0x1)+_0x44035b(0x254));}}export function safeApiFailure(_0x1b1fbd,_0x3904d4,_0x138c4e){const _0x2714bd=a186_0x4f40fd;return notificationError(_0x2714bd(0x249)+_0x1b1fbd+'_'+(_0x3904d4===_0x2714bd(0x1e2)?'failed':_0x3904d4+'_unavailable'),'Notification\x20config\x20'+_0x1b1fbd+'\x20'+_0x3904d4+_0x2714bd(0x211),_0x138c4e);}export function notificationLookupCommand(_0x59ba12,_0x42a17b){const _0x414ce3=a186_0x4f40fd;return _0x414ce3(0x1ed)+_0x59ba12+'\x20--type\x20'+_0x42a17b+'\x20--format\x20compress';}function validateNotificationDocument(_0x5af5d2,_0x2461df){const _0x5bc699=a186_0x4f40fd;for(const _0x20c0c1 of Object[_0x5bc699(0x224)](_0x5af5d2)){if(FORBIDDEN_IDENTITY_FIELDS[_0x5bc699(0x218)](_0x20c0c1))throw notificationError(_0x5bc699(0x1ee),_0x5bc699(0x223)+_0x20c0c1+_0x5bc699(0x231));if(!ALLOWED_INPUT_FIELDS[_0x5bc699(0x218)](_0x20c0c1))throw notificationError(_0x5bc699(0x24f),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x20c0c1+'\x22.');}if(_0x2461df===_0x5bc699(0x22a)&&Object['keys'](_0x5af5d2)[_0x5bc699(0x1f4)]===0x0)throw notificationError('notification_config_update_empty',_0x5bc699(0x247));const _0x5e98d0={};if(hasOwn(_0x5af5d2,'configName'))_0x5e98d0['configName']=validateRequiredString(_0x5af5d2['configName'],'configName',0x80);else{if(_0x2461df===_0x5bc699(0x1e9))throw notificationError(_0x5bc699(0x20e),_0x5bc699(0x1fb)+_0x5bc699(0x234));}if(hasOwn(_0x5af5d2,'channelType')){if(typeof _0x5af5d2[_0x5bc699(0x214)]!==_0x5bc699(0x219))throw invalidFieldType('channelType',_0x5bc699(0x1e8));const _0x5b207c=_0x5af5d2[_0x5bc699(0x214)]['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x5bc699(0x21b)](_0x5b207c))throw notificationError(_0x5bc699(0x248),_0x5bc699(0x230),_0x5bc699(0x236)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x5e98d0['channelType']=_0x5b207c;}else{if(_0x2461df===_0x5bc699(0x1e9))throw notificationError(_0x5bc699(0x20e),_0x5bc699(0x1fb)+'\x22channelType\x22.');}for(const [_0x40ba9a,_0x908a16]of[[_0x5bc699(0x1db),0x200],[_0x5bc699(0x255),0x100]]){if(!hasOwn(_0x5af5d2,_0x40ba9a))continue;const _0x1b12bf=_0x5af5d2[_0x40ba9a];if(_0x1b12bf!==null&&typeof _0x1b12bf!==_0x5bc699(0x219))throw invalidFieldType(_0x40ba9a,'a\x20string\x20or\x20null');if(typeof _0x1b12bf==='string'&&_0x1b12bf[_0x5bc699(0x1f4)]>_0x908a16)throw notificationError(_0x5bc699(0x248),_0x5bc699(0x223)+_0x40ba9a+_0x5bc699(0x213)+_0x908a16+_0x5bc699(0x1df));_0x5e98d0[_0x40ba9a]=_0x1b12bf;}if(hasOwn(_0x5af5d2,'channelConfig')){const _0x1b80b0=_0x5af5d2[_0x5bc699(0x23f)];if(_0x1b80b0===null&&_0x2461df===_0x5bc699(0x1e9))throw invalidFieldType(_0x5bc699(0x23f),_0x5bc699(0x208));if(_0x1b80b0!==null&&!isJsonObject(_0x1b80b0))throw invalidFieldType('channelConfig',_0x2461df===_0x5bc699(0x22a)?'a\x20JSON\x20object\x20or\x20null':_0x5bc699(0x208));_0x1b80b0!==null&&validateChannelConfigFields(_0x5e98d0[_0x5bc699(0x214)],_0x1b80b0),_0x5e98d0[_0x5bc699(0x23f)]=_0x1b80b0;}for(const _0x402c0b of[_0x5bc699(0x227),_0x5bc699(0x253)]){if(!hasOwn(_0x5af5d2,_0x402c0b))continue;const _0x1bab6b=_0x5af5d2[_0x402c0b];if(_0x1bab6b!==null&&(!Number['isSafeInteger'](_0x1bab6b)||_0x1bab6b<0x0))throw notificationError(_0x5bc699(0x248),_0x5bc699(0x223)+_0x402c0b+_0x5bc699(0x252));_0x5e98d0[_0x402c0b]=_0x1bab6b;}return _0x5e98d0;}function validateRequiredString(_0x2bf50d,_0xdea884,_0x3e905a){const _0x5b5dd6=a186_0x4f40fd;if(typeof _0x2bf50d!==_0x5b5dd6(0x219))throw invalidFieldType(_0xdea884,_0x5b5dd6(0x1f8));const _0x3b09a4=_0x2bf50d[_0x5b5dd6(0x1fc)]();if(!_0x3b09a4)throw notificationError(_0x5b5dd6(0x248),_0x5b5dd6(0x223)+_0xdea884+_0x5b5dd6(0x243));if(_0x3b09a4[_0x5b5dd6(0x1f4)]>_0x3e905a)throw notificationError(_0x5b5dd6(0x248),_0x5b5dd6(0x223)+_0xdea884+_0x5b5dd6(0x213)+_0x3e905a+'\x20characters.');return _0x3b09a4;}function validateChannelConfigFields(_0x3f8a59,_0x4b73e4){const _0x444abd=a186_0x4f40fd;if(hasOwn(_0x4b73e4,_0x444abd(0x23c)))throw forbiddenChannelConfigField('messageTemplate');if(_0x3f8a59===_0x444abd(0x202))for(const _0x2cc8fa of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x4b73e4,_0x2cc8fa))throw forbiddenChannelConfigField(_0x2cc8fa);}}function forbiddenChannelConfigField(_0x522c5f){const _0x5b7577=a186_0x4f40fd;return notificationError(_0x5b7577(0x1de),_0x5b7577(0x215)+_0x522c5f+_0x5b7577(0x1f6));}function invalidFieldType(_0x18b441,_0x440a52){const _0x2d3b21=a186_0x4f40fd;return notificationError(_0x2d3b21(0x248),_0x2d3b21(0x223)+_0x18b441+_0x2d3b21(0x1e5)+_0x440a52+'.');}function serializeChannelConfig(_0x50b339){const _0x40fea0=a186_0x4f40fd;return _0x50b339===null||_0x50b339===undefined?null:JSON[_0x40fea0(0x1f5)](_0x50b339);}function a186_0x3a25(){const _0xb8f915=['file\x20','1021741EdJten','name','Notification\x20config\x20list\x20item\x20','number','notification_config_field_required','44737188udMsvr','appCode','\x20failed.','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x22\x20cannot\x20exceed\x20','channelType','Notification\x20JSON\x20channelConfig\x20field\x20\x22','boolean','endpointUrlRaw','has','string','911238ffKbqv','includes','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','notification_config_response_invalid','Missing\x20notification\x20JSON\x20source.','\x20has\x20an\x20invalid\x20appCode.','env','setEncoding','isSafeInteger','Notification\x20JSON\x20field\x20\x22','keys','from-env','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','connectTimeout','notification_config_id_invalid','\x20has\x20an\x20invalid\x20id.','update','emailTargets','2052328RAItsF','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','11LQjFfK','dry-run','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','WECOM','\x22configName\x22.','parse','Allowed\x20values:\x20','hasOwnProperty','endpointUrl:null','channelConfigRaw','12XYTmtj','kind','messageTemplate','validation','replyTo','channelConfig','channelCode','Notification\x20JSON\x20source\x20is\x20ambiguous.','notification_config_source_unavailable','\x22\x20must\x20be\x20a\x20non-empty\x20string.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','utf8','\x20has\x20an\x20unsupported\x20channelType.','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','notification_config_field_invalid','notification_config_','4uUkZfz','stdin','5035705ONpjJX','entries','prototype','notification_config_field_unknown','str','1698141wDuSzI','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','readTimeout','\x20has\x20an\x20invalid\x20channelType.','description','endpointUrl','16245370LreUGk','notification_config_confirmation_required','notification_config_channel_field_forbidden','\x20characters.','DINGTALK','notification_config_json_invalid','mutation','updateTime','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x22\x20must\x20be\x20','path','Notification\x20JSON\x20from\x20','a\x20supported\x20string','create','call','file','\x20must\x20be\x20an\x20object.','rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_field_forbidden','configCode','every','configName','6vSyKOo','\x20has\x20invalid\x20field\x20\x22','length','stringify','\x22\x20is\x20forbidden.','Invalid\x20--','a\x20non-empty\x20string','bool','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Create\x20JSON\x20requires\x20field\x20','trim','\x20is\x20invalid.','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','yes','push','apiError','EMAIL','createTime','WEBHOOK','45sfWwqO','FEISHU','Notification\x20config\x20','a\x20JSON\x20object'];a186_0x3a25=function(){return _0xb8f915;};return a186_0x3a25();}function redactSensitive(_0x3f017d){return _0x3f017d===null||_0x3f017d===undefined||_0x3f017d===''?null:'<redacted>';}function requireResponseString(_0x125aee,_0x20fee2,_0x2722a6){const _0x568c53=a186_0x4f40fd;if(typeof _0x125aee!==_0x568c53(0x219)||_0x125aee[_0x568c53(0x1fc)]()==='')throw CliErrors[_0x568c53(0x201)]('Invalid\x20notification\x20config\x20response.','Item\x20'+(_0x2722a6+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x20fee2+'\x22.');return _0x125aee[_0x568c53(0x1fc)]();}function requireExactString(_0x1d728b,_0x2525ef,_0x3d970e){const _0x294631=a186_0x4f40fd;if(typeof _0x1d728b!=='string'||_0x1d728b[_0x294631(0x1fc)]()==='')throw notificationError(_0x294631(0x21d),_0x294631(0x207)+_0x3d970e+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x2525ef+'\x22.');return _0x1d728b[_0x294631(0x1fc)]();}function responseNullableString(_0x4d3068,_0x17ea6b,_0x259e07){const _0x343167=a186_0x4f40fd;if(_0x4d3068===undefined||_0x4d3068===null)return null;if(typeof _0x4d3068!==_0x343167(0x219))throw notificationError(_0x343167(0x21d),_0x343167(0x207)+_0x259e07+_0x343167(0x1f3)+_0x17ea6b+'\x22.');return _0x4d3068;}function responseNullableTimeout(_0x4c14b6,_0x17daa8,_0x37c60a){const _0x1a395b=a186_0x4f40fd;if(_0x4c14b6===undefined||_0x4c14b6===null)return null;if(!Number['isSafeInteger'](_0x4c14b6)||_0x4c14b6<0x0)throw notificationError(_0x1a395b(0x21d),_0x1a395b(0x207)+_0x37c60a+_0x1a395b(0x1f3)+_0x17daa8+'\x22.');return _0x4c14b6;}function normalizeNullableString(_0x394bd4){const _0x40ea26=a186_0x4f40fd;return typeof _0x394bd4===_0x40ea26(0x219)?_0x394bd4:null;}function isJsonObject(_0x4e66b9){return _0x4e66b9!==null&&typeof _0x4e66b9==='object'&&!Array['isArray'](_0x4e66b9);}function hasOwn(_0x24c879,_0x4bfaa8){const _0x54d634=a186_0x4f40fd;return Object[_0x54d634(0x24e)][_0x54d634(0x237)][_0x54d634(0x1ea)](_0x24c879,_0x4bfaa8);}async function readStdin(){const _0xc88afb=a186_0x4f40fd;let _0x56c4bb='';process['stdin'][_0xc88afb(0x221)](_0xc88afb(0x245));for await(const _0x5a1a22 of process['stdin'])_0x56c4bb+=_0x5a1a22;return _0x56c4bb;}
|
|
1
|
+
const a186_0x53fb76=a186_0xbdc1;(function(_0x1c76c9,_0x3c4cc4){const _0x5b4aa7=a186_0xbdc1,_0x418207=_0x1c76c9();while(!![]){try{const _0x20c644=-parseInt(_0x5b4aa7(0x9e))/0x1+-parseInt(_0x5b4aa7(0xba))/0x2+parseInt(_0x5b4aa7(0xa0))/0x3*(-parseInt(_0x5b4aa7(0x8d))/0x4)+parseInt(_0x5b4aa7(0x7b))/0x5*(parseInt(_0x5b4aa7(0xbc))/0x6)+-parseInt(_0x5b4aa7(0x86))/0x7*(parseInt(_0x5b4aa7(0x9f))/0x8)+-parseInt(_0x5b4aa7(0xdc))/0x9*(-parseInt(_0x5b4aa7(0x91))/0xa)+-parseInt(_0x5b4aa7(0xa7))/0xb*(-parseInt(_0x5b4aa7(0xbb))/0xc);if(_0x20c644===_0x3c4cc4)break;else _0x418207['push'](_0x418207['shift']());}catch(_0x371a73){_0x418207['push'](_0x418207['shift']());}}}(a186_0x59c7,0xcd6f2));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL',a186_0x53fb76(0x9d),a186_0x53fb76(0xc4),a186_0x53fb76(0x9a),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a186_0x53fb76(0x79),'channelType',a186_0x53fb76(0xad),a186_0x53fb76(0xd7),'description',a186_0x53fb76(0x6f),a186_0x53fb76(0x81)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a186_0x53fb76(0xc6),a186_0x53fb76(0x67)]),EMAIL_RECIPIENT_FIELDS=new Set([a186_0x53fb76(0xb9),'recipients',a186_0x53fb76(0x98),a186_0x53fb76(0x71),a186_0x53fb76(0xd4),a186_0x53fb76(0x93),a186_0x53fb76(0xd9),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a186_0x53fb76(0x76),'type':a186_0x53fb76(0x8a),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a186_0x53fb76(0xa3),'type':a186_0x53fb76(0x6a),'required':![],'default':![],'description':a186_0x53fb76(0xcf)},{'name':a186_0x53fb76(0x92),'type':'string','required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x13df8c,_0x2b4290,_0x354e77){return new CliError(_0x13df8c,0x1,_0x2b4290,_0x354e77);}export function readNotificationId(_0x5b17d5){const _0x4dffbe=a186_0x53fb76,_0x182232=_0x5b17d5[_0x4dffbe(0x6e)]('id');if(!Number[_0x4dffbe(0xd5)](_0x182232)||_0x182232<=0x0)throw notificationError(_0x4dffbe(0xbf),_0x4dffbe(0xb1));return _0x182232;}export function requireNotificationExplicitYes(_0x3d6ce6){const _0x3c3d83=a186_0x53fb76;if(_0x3d6ce6['bool'](_0x3c3d83(0x78))||_0x3d6ce6['bool'](_0x3c3d83(0x69)))return;throw notificationError(_0x3c3d83(0xaf),_0x3c3d83(0x89),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x44dce7,_0x37e2e1='type',_0x56060f='EMAIL'){const _0x9410a7=a186_0x53fb76,_0x586f49=_0x44dce7[_0x9410a7(0xe1)](_0x37e2e1)[_0x9410a7(0x7d)]()||_0x56060f;if(!NOTIFICATION_CHANNEL_TYPES[_0x9410a7(0x70)](_0x586f49))throw CliErrors[_0x9410a7(0xe0)](_0x9410a7(0xae)+_0x37e2e1+':\x20'+_0x586f49,_0x9410a7(0x8b)+NOTIFICATION_CHANNEL_TYPES[_0x9410a7(0xd6)](',\x20')+'.');return _0x586f49;}export function assertSingleNotificationSource(_0x1dc891){const _0x2ab560=a186_0x53fb76,_0x2db75e=[],_0x5d2f93=_0x1dc891[_0x2ab560(0xe1)]('file')['trim']();if(_0x5d2f93)_0x2db75e[_0x2ab560(0xa9)]({'kind':_0x2ab560(0x76),'path':_0x5d2f93});if(_0x1dc891[_0x2ab560(0xc7)](_0x2ab560(0xa3)))_0x2db75e[_0x2ab560(0xa9)]({'kind':_0x2ab560(0xa3)});const _0x4bcece=_0x1dc891[_0x2ab560(0xe1)]('from-env')[_0x2ab560(0x7d)]();if(_0x4bcece)_0x2db75e[_0x2ab560(0xa9)]({'kind':_0x2ab560(0x84),'name':_0x4bcece});if(_0x2db75e['length']===0x0)throw CliErrors[_0x2ab560(0xe0)]('Missing\x20notification\x20JSON\x20source.',_0x2ab560(0x77));if(_0x2db75e['length']>0x1)throw CliErrors[_0x2ab560(0xe0)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x2ab560(0x77));return _0x2db75e[0x0];}function a186_0xbdc1(_0x495e20,_0x2f0663){_0x495e20=_0x495e20-0x67;const _0x59c79e=a186_0x59c7();let _0xbdc1b1=_0x59c79e[_0x495e20];return _0xbdc1b1;}export async function readNotificationDocument(_0x3ebe97,_0x2331d8){const _0x29e78d=a186_0x53fb76,_0x446ab8=assertSingleNotificationSource(_0x3ebe97),_0x385e49=_0x446ab8[_0x29e78d(0xc8)]===_0x29e78d(0x76)?_0x29e78d(0xb6)+_0x446ab8[_0x29e78d(0xb0)]:_0x446ab8[_0x29e78d(0xc8)]===_0x29e78d(0x84)?_0x29e78d(0x73)+_0x446ab8[_0x29e78d(0x72)]:_0x29e78d(0xa3);let _0x38e85c;try{if(_0x446ab8['kind']===_0x29e78d(0x76))_0x38e85c=await readFile(_0x446ab8[_0x29e78d(0xb0)],'utf8');else{if(_0x446ab8[_0x29e78d(0xc8)]==='env'){if(!(_0x446ab8[_0x29e78d(0x72)]in process.env))throw notificationError(_0x29e78d(0xd8),_0x29e78d(0xd0)+_0x446ab8['name']);_0x38e85c=process.env[_0x446ab8.name]??'';}else _0x38e85c=await readStdin();}}catch(_0x2b8ccf){if(_0x2b8ccf instanceof CliError)throw _0x2b8ccf;throw notificationError(_0x29e78d(0xd8),_0x29e78d(0xd1)+_0x385e49+'.');}let _0x3d2468;try{_0x3d2468=JSON[_0x29e78d(0xdf)](_0x38e85c);}catch{throw notificationError(_0x29e78d(0x6b),_0x29e78d(0xcd)+_0x385e49+'\x20is\x20invalid.',_0x29e78d(0xb7));}if(!isJsonObject(_0x3d2468))throw notificationError('notification_config_json_invalid',_0x29e78d(0xcd)+_0x385e49+_0x29e78d(0x94));return validateNotificationDocument(_0x3d2468,_0x2331d8);}export function projectNotificationListConfig(_0xec63a7,_0x2b64f0){const _0xc3f7b1=a186_0x53fb76;return{'id':typeof _0xec63a7['id']==='number'?_0xec63a7['id']:null,'configCode':requireResponseString(_0xec63a7[_0xc3f7b1(0xc6)],_0xc3f7b1(0xc6),_0x2b64f0),'configName':requireResponseString(_0xec63a7[_0xc3f7b1(0x79)],_0xc3f7b1(0x79),_0x2b64f0),'channelType':requireResponseString(_0xec63a7['channelType'],_0xc3f7b1(0x68),_0x2b64f0),'description':normalizeNullableString(_0xec63a7[_0xc3f7b1(0xc3)]),'createTime':normalizeNullableString(_0xec63a7['createTime']),'updateTime':normalizeNullableString(_0xec63a7[_0xc3f7b1(0xce)])};}export function normalizeExactNotificationConfig(_0x3a20d6,_0x1dc613,_0x5eb45b){const _0x57c48d=a186_0x53fb76;if(!Number[_0x57c48d(0xd5)](_0x3a20d6['id'])||_0x3a20d6['id']!==_0x1dc613)throw notificationError(_0x57c48d(0xdb),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x1dc613+'.');if(_0x3a20d6['appCode']!==_0x5eb45b)throw notificationError(_0x57c48d(0xdb),_0x57c48d(0x95)+_0x1dc613+_0x57c48d(0xcc));const _0x4c47c6=requireExactString(_0x3a20d6[_0x57c48d(0x79)],_0x57c48d(0x79),_0x1dc613),_0x60b955=requireExactString(_0x3a20d6['configCode'],_0x57c48d(0xc6),_0x1dc613),_0x262cf2=requireExactString(_0x3a20d6['channelType'],_0x57c48d(0x68),_0x1dc613);if(!NOTIFICATION_CHANNEL_TYPES[_0x57c48d(0x70)](_0x262cf2))throw notificationError('notification_config_response_invalid',_0x57c48d(0x95)+_0x1dc613+'\x20has\x20an\x20unsupported\x20channelType.');const _0x1338ce=responseNullableString(_0x3a20d6[_0x57c48d(0xad)],'endpointUrl',_0x1dc613),_0x383463=responseNullableString(_0x3a20d6[_0x57c48d(0xd7)],_0x57c48d(0xd7),_0x1dc613),_0x1c6101=responseNullableString(_0x3a20d6[_0x57c48d(0xc3)],_0x57c48d(0xc3),_0x1dc613),_0x5e62d6=responseNullableTimeout(_0x3a20d6[_0x57c48d(0x6f)],_0x57c48d(0x6f),_0x1dc613),_0x5ec81f=responseNullableTimeout(_0x3a20d6[_0x57c48d(0x81)],_0x57c48d(0x81),_0x1dc613);return{'id':_0x1dc613,'appCode':_0x5eb45b,'configCode':_0x60b955,'configName':_0x4c47c6,'channelType':_0x262cf2,'endpointUrl':redactSensitive(_0x1338ce),'channelConfig':redactSensitive(_0x383463),'description':_0x1c6101,'connectTimeout':_0x5e62d6,'readTimeout':_0x5ec81f,'endpointUrlRaw':_0x1338ce,'channelConfigRaw':_0x383463};}export async function requireExactNotificationConfig(_0x510889,_0x876409,_0x148f98){const _0x2512e4=a186_0x53fb76;let _0x16697d;try{_0x16697d=await getNotificationChannelConfig(_0x876409,_0x510889);}catch{throw safeApiFailure(_0x148f98,_0x2512e4(0x8f),_0x2512e4(0x75)+_0x510889+_0x2512e4(0xd3));}return normalizeExactNotificationConfig(_0x16697d,_0x876409,_0x510889);}export function projectNotificationConfig(_0x1eb447){const _0x7539ff=a186_0x53fb76;return{'id':_0x1eb447['id']??null,'appCode':_0x1eb447[_0x7539ff(0xc1)],'configCode':_0x1eb447['configCode']??null,'configName':_0x1eb447['configName'],'channelType':_0x1eb447['channelType'],'endpointUrl':redactSensitive(_0x1eb447[_0x7539ff(0xad)]),'channelConfig':redactSensitive(_0x1eb447[_0x7539ff(0xd7)]),'description':_0x1eb447[_0x7539ff(0xc3)]??null,'connectTimeout':_0x1eb447[_0x7539ff(0x6f)]??null,'readTimeout':_0x1eb447[_0x7539ff(0x81)]??null};}export function notificationSelector(_0x28b3f8){const _0x221894=a186_0x53fb76;return{'appCode':_0x28b3f8[_0x221894(0xc1)],'id':_0x28b3f8['id'],'configCode':_0x28b3f8[_0x221894(0xc6)],'configName':_0x28b3f8[_0x221894(0x79)],'channelType':_0x28b3f8[_0x221894(0x68)]};}export function createMutationInput(_0x5e26ac,_0x26c15a){const _0x40ab90=a186_0x53fb76;return{'appCode':_0x5e26ac,'configName':_0x26c15a[_0x40ab90(0x79)],'channelType':_0x26c15a[_0x40ab90(0x68)],...hasOwn(_0x26c15a,_0x40ab90(0xad))?{'endpointUrl':_0x26c15a[_0x40ab90(0xad)]}:{},...hasOwn(_0x26c15a,_0x40ab90(0xd7))?{'channelConfig':serializeChannelConfig(_0x26c15a['channelConfig'])}:{},...hasOwn(_0x26c15a,_0x40ab90(0xc3))?{'description':_0x26c15a['description']}:{},...hasOwn(_0x26c15a,_0x40ab90(0x6f))?{'connectTimeout':_0x26c15a[_0x40ab90(0x6f)]}:{},...hasOwn(_0x26c15a,_0x40ab90(0x81))?{'readTimeout':_0x26c15a[_0x40ab90(0x81)]}:{}};}export function mergeUpdateInput(_0x56008a,_0x2a1c14){const _0x4ccb85=a186_0x53fb76;return{'id':_0x56008a['id'],'appCode':_0x56008a['appCode'],'configName':_0x2a1c14[_0x4ccb85(0x79)]??_0x56008a['configName'],'channelType':_0x2a1c14['channelType']??_0x56008a['channelType'],'endpointUrl':hasOwn(_0x2a1c14,_0x4ccb85(0xad))?_0x2a1c14[_0x4ccb85(0xad)]:_0x56008a['endpointUrlRaw'],'channelConfig':hasOwn(_0x2a1c14,'channelConfig')?serializeChannelConfig(_0x2a1c14['channelConfig']):_0x56008a[_0x4ccb85(0x74)],'description':hasOwn(_0x2a1c14,_0x4ccb85(0xc3))?_0x2a1c14[_0x4ccb85(0xc3)]:_0x56008a['description'],'connectTimeout':hasOwn(_0x2a1c14,_0x4ccb85(0x6f))?_0x2a1c14[_0x4ccb85(0x6f)]:_0x56008a[_0x4ccb85(0x6f)],'readTimeout':hasOwn(_0x2a1c14,_0x4ccb85(0x81))?_0x2a1c14[_0x4ccb85(0x81)]:_0x56008a['readTimeout']};}export function plannedUpdateProjection(_0x2d8e92,_0xc13ffb){const _0x4024cc=a186_0x53fb76;return projectNotificationConfig({'id':_0x2d8e92['id'],'appCode':_0x2d8e92[_0x4024cc(0xc1)],'configCode':_0x2d8e92[_0x4024cc(0xc6)],'configName':_0xc13ffb['configName']??_0x2d8e92[_0x4024cc(0x79)],'channelType':_0xc13ffb['channelType']??_0x2d8e92[_0x4024cc(0x68)],'endpointUrl':hasOwn(_0xc13ffb,_0x4024cc(0xad))?_0xc13ffb[_0x4024cc(0xad)]:_0x2d8e92[_0x4024cc(0xb3)],'channelConfig':hasOwn(_0xc13ffb,_0x4024cc(0xd7))?_0xc13ffb[_0x4024cc(0xd7)]:_0x2d8e92['channelConfigRaw'],'description':hasOwn(_0xc13ffb,_0x4024cc(0xc3))?_0xc13ffb[_0x4024cc(0xc3)]:_0x2d8e92[_0x4024cc(0xc3)],'connectTimeout':hasOwn(_0xc13ffb,'connectTimeout')?_0xc13ffb[_0x4024cc(0x6f)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x2d8e92[_0x4024cc(0x6f)],'readTimeout':hasOwn(_0xc13ffb,_0x4024cc(0x81))?_0xc13ffb[_0x4024cc(0x81)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x2d8e92[_0x4024cc(0x81)]});}export function requestedSafeFieldsMatch(_0x58160b,_0x238e22,_0x1f03d2){const _0x1ca954=a186_0x53fb76,_0x56d56f=[],_0x5280e5=[],_0x11bde7=[];for(const _0x570c6c of['configName',_0x1ca954(0x68),_0x1ca954(0xc3)]){if(!hasOwn(_0x1f03d2,_0x570c6c))continue;_0x11bde7[_0x1ca954(0xa9)](_0x570c6c),_0x56d56f['push'](_0x238e22[_0x570c6c]===_0x1f03d2[_0x570c6c]),_0x5280e5[_0x1ca954(0xa9)](_0x58160b[_0x570c6c]!==_0x1f03d2[_0x570c6c]&&_0x238e22[_0x570c6c]===_0x1f03d2[_0x570c6c]);}for(const _0x277b72 of[_0x1ca954(0x6f),_0x1ca954(0x81)]){if(!hasOwn(_0x1f03d2,_0x277b72))continue;const _0x4bd67e=_0x1f03d2[_0x277b72]??(_0x277b72==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x11bde7[_0x1ca954(0xa9)](_0x277b72),_0x56d56f[_0x1ca954(0xa9)](_0x238e22[_0x277b72]===_0x4bd67e),_0x5280e5[_0x1ca954(0xa9)](_0x58160b[_0x277b72]!==_0x4bd67e&&_0x238e22[_0x277b72]===_0x4bd67e);}return hasOwn(_0x1f03d2,'endpointUrl')&&_0x1f03d2['endpointUrl']===null&&(_0x11bde7['push']('endpointUrl:null'),_0x56d56f[_0x1ca954(0xa9)](_0x238e22[_0x1ca954(0xb3)]===null||_0x238e22[_0x1ca954(0xb3)]===''),_0x5280e5[_0x1ca954(0xa9)](_0x58160b[_0x1ca954(0xb3)]!==null&&_0x58160b[_0x1ca954(0xb3)]!==''&&(_0x238e22[_0x1ca954(0xb3)]===null||_0x238e22[_0x1ca954(0xb3)]===''))),{'allMatch':_0x56d56f['every'](Boolean),'provesChange':_0x5280e5['some'](Boolean),'verifiedFields':_0x11bde7};}export function validateNotificationDeleteReadback(_0x4baa00,_0x3f18ba,_0x536378){const _0x22af30=a186_0x53fb76;for(const [_0xa121a5,_0x347a6a]of _0x4baa00['entries']()){if(!Number[_0x22af30(0xd5)](_0x347a6a['id'])||_0x347a6a['id']<=0x0)throw notificationError(_0x22af30(0xdb),_0x22af30(0x7f)+(_0xa121a5+0x1)+_0x22af30(0x7a));if(_0x347a6a[_0x22af30(0xc1)]!==_0x3f18ba)throw notificationError(_0x22af30(0xdb),_0x22af30(0x7f)+(_0xa121a5+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x347a6a['channelType']!==_0x536378)throw notificationError(_0x22af30(0xdb),_0x22af30(0x7f)+(_0xa121a5+0x1)+_0x22af30(0xc5));}}export function safeApiFailure(_0x4924ca,_0x5348f0,_0x33c8be){const _0x2ee9f8=a186_0x53fb76;return notificationError(_0x2ee9f8(0xb4)+_0x4924ca+'_'+(_0x5348f0===_0x2ee9f8(0xcb)?_0x2ee9f8(0xc9):_0x5348f0+_0x2ee9f8(0x90)),_0x2ee9f8(0x95)+_0x4924ca+'\x20'+_0x5348f0+'\x20failed.',_0x33c8be);}function a186_0x59c7(){const _0x5502c2=['validation','str','a\x20string\x20or\x20null','channelCode','channelType','yes','boolean','notification_config_json_invalid','\x20characters.','\x22channelType\x22.','num','connectTimeout','includes','bccList','name','environment\x20variable\x20','channelConfigRaw','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','file','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','dry-run','configName','\x20has\x20an\x20invalid\x20id.','5634770FTKaQl','Create\x20JSON\x20requires\x20field\x20','trim','<redacted>','Notification\x20config\x20list\x20item\x20','a\x20supported\x20string','readTimeout','Item\x20','utf8','env','notification_config_channel_field_forbidden','1764xlnlNC','create','rabetbase\x20notification\x20config-list\x20--appcode\x20','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','string','Allowed\x20values:\x20','\x22configName\x22.','2433804nXzNJH','messageTemplate','preflight','_unavailable','5893270LSwbvy','from-env','subjectPrefix','\x20must\x20be\x20an\x20object.','Notification\x20config\x20','\x22\x20must\x20be\x20a\x20non-empty\x20string.','\x22\x20is\x20forbidden.','ccList','a\x20non-empty\x20string','WECOM','notification_config_update_empty','notification_config_field_invalid','FEISHU','686150LRgchk','52784mbNGXX','6yVIEzb','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','update','stdin','notification_config_field_forbidden','setEncoding','length','9482TvvByh','stringify','push','notification_config_field_unknown','Notification\x20JSON\x20field\x20\x22','a\x20JSON\x20object','endpointUrl','Invalid\x20--','notification_config_confirmation_required','path','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Notification\x20JSON\x20channelConfig\x20field\x20\x22','endpointUrlRaw','notification_config_','keys','file\x20','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','prototype','emailTargets','1531390nlmKnG','48120VEuyjS','6MALldW','notification_config_field_required','\x20is\x20missing\x20required\x20field\x20\x22','notification_config_id_invalid','\x22\x20must\x20be\x20','appCode','a\x20JSON\x20object\x20or\x20null','description','DINGTALK','\x20has\x20an\x20invalid\x20channelType.','configCode','bool','kind','failed','\x20has\x20invalid\x20field\x20\x22','mutation','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Notification\x20JSON\x20from\x20','updateTime','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','apiError','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','replyTo','isSafeInteger','join','channelConfig','notification_config_source_unavailable','fromName','has','notification_config_response_invalid','9lWkIAV','\x20--type\x20','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','parse'];a186_0x59c7=function(){return _0x5502c2;};return a186_0x59c7();}export function notificationLookupCommand(_0x13b976,_0x3c8ad0){const _0x30dc7d=a186_0x53fb76;return _0x30dc7d(0x88)+_0x13b976+_0x30dc7d(0xdd)+_0x3c8ad0+'\x20--format\x20compress';}function validateNotificationDocument(_0x2ff96d,_0x911e37){const _0x28ba68=a186_0x53fb76;for(const _0x47016e of Object[_0x28ba68(0xb5)](_0x2ff96d)){if(FORBIDDEN_IDENTITY_FIELDS[_0x28ba68(0xda)](_0x47016e))throw notificationError(_0x28ba68(0xa4),_0x28ba68(0xab)+_0x47016e+_0x28ba68(0xa1));if(!ALLOWED_INPUT_FIELDS[_0x28ba68(0xda)](_0x47016e))throw notificationError(_0x28ba68(0xaa),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x47016e+'\x22.');}if(_0x911e37===_0x28ba68(0xa2)&&Object[_0x28ba68(0xb5)](_0x2ff96d)[_0x28ba68(0xa6)]===0x0)throw notificationError(_0x28ba68(0x9b),_0x28ba68(0xde));const _0x5d68af={};if(hasOwn(_0x2ff96d,_0x28ba68(0x79)))_0x5d68af[_0x28ba68(0x79)]=validateRequiredString(_0x2ff96d[_0x28ba68(0x79)],_0x28ba68(0x79),0x80);else{if(_0x911e37===_0x28ba68(0x87))throw notificationError(_0x28ba68(0xbd),_0x28ba68(0x7c)+_0x28ba68(0x8c));}if(hasOwn(_0x2ff96d,_0x28ba68(0x68))){if(typeof _0x2ff96d[_0x28ba68(0x68)]!==_0x28ba68(0x8a))throw invalidFieldType('channelType',_0x28ba68(0x80));const _0x9f6e11=_0x2ff96d[_0x28ba68(0x68)][_0x28ba68(0x7d)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x9f6e11))throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x28ba68(0x8b)+NOTIFICATION_CHANNEL_TYPES[_0x28ba68(0xd6)](',\x20')+'.');_0x5d68af[_0x28ba68(0x68)]=_0x9f6e11;}else{if(_0x911e37===_0x28ba68(0x87))throw notificationError(_0x28ba68(0xbd),_0x28ba68(0x7c)+_0x28ba68(0x6d));}for(const [_0x280091,_0x3b91e6]of[[_0x28ba68(0xad),0x200],[_0x28ba68(0xc3),0x100]]){if(!hasOwn(_0x2ff96d,_0x280091))continue;const _0x2bceaf=_0x2ff96d[_0x280091];if(_0x2bceaf!==null&&typeof _0x2bceaf!==_0x28ba68(0x8a))throw invalidFieldType(_0x280091,_0x28ba68(0xe2));if(typeof _0x2bceaf==='string'&&_0x2bceaf['length']>_0x3b91e6)throw notificationError(_0x28ba68(0x9c),_0x28ba68(0xab)+_0x280091+'\x22\x20cannot\x20exceed\x20'+_0x3b91e6+_0x28ba68(0x6c));_0x5d68af[_0x280091]=_0x2bceaf;}if(hasOwn(_0x2ff96d,_0x28ba68(0xd7))){const _0x15b497=_0x2ff96d['channelConfig'];if(_0x15b497===null&&_0x911e37===_0x28ba68(0x87))throw invalidFieldType('channelConfig',_0x28ba68(0xac));if(_0x15b497!==null&&!isJsonObject(_0x15b497))throw invalidFieldType(_0x28ba68(0xd7),_0x911e37===_0x28ba68(0xa2)?_0x28ba68(0xc2):_0x28ba68(0xac));_0x15b497!==null&&validateChannelConfigFields(_0x5d68af[_0x28ba68(0x68)],_0x15b497),_0x5d68af[_0x28ba68(0xd7)]=_0x15b497;}for(const _0x12f058 of['connectTimeout',_0x28ba68(0x81)]){if(!hasOwn(_0x2ff96d,_0x12f058))continue;const _0x341d22=_0x2ff96d[_0x12f058];if(_0x341d22!==null&&(!Number['isSafeInteger'](_0x341d22)||_0x341d22<0x0))throw notificationError('notification_config_field_invalid',_0x28ba68(0xab)+_0x12f058+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x5d68af[_0x12f058]=_0x341d22;}return _0x5d68af;}function validateRequiredString(_0x5e0319,_0x33b16a,_0x2a7376){const _0x350f14=a186_0x53fb76;if(typeof _0x5e0319!=='string')throw invalidFieldType(_0x33b16a,_0x350f14(0x99));const _0x419e3c=_0x5e0319[_0x350f14(0x7d)]();if(!_0x419e3c)throw notificationError('notification_config_field_invalid',_0x350f14(0xab)+_0x33b16a+_0x350f14(0x96));if(_0x419e3c['length']>_0x2a7376)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x33b16a+'\x22\x20cannot\x20exceed\x20'+_0x2a7376+_0x350f14(0x6c));return _0x419e3c;}function validateChannelConfigFields(_0x4bc99,_0x48ffc1){const _0x599cea=a186_0x53fb76;if(hasOwn(_0x48ffc1,_0x599cea(0x8e)))throw forbiddenChannelConfigField(_0x599cea(0x8e));if(_0x4bc99==='EMAIL')for(const _0xe90c6e of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x48ffc1,_0xe90c6e))throw forbiddenChannelConfigField(_0xe90c6e);}}function forbiddenChannelConfigField(_0x4d15df){const _0x4b45d3=a186_0x53fb76;return notificationError(_0x4b45d3(0x85),_0x4b45d3(0xb2)+_0x4d15df+_0x4b45d3(0x97));}function invalidFieldType(_0x1ea3e5,_0x5eb1b0){const _0x3f93f2=a186_0x53fb76;return notificationError(_0x3f93f2(0x9c),'Notification\x20JSON\x20field\x20\x22'+_0x1ea3e5+_0x3f93f2(0xc0)+_0x5eb1b0+'.');}function serializeChannelConfig(_0xd77b93){const _0x4e7e00=a186_0x53fb76;return _0xd77b93===null||_0xd77b93===undefined?null:JSON[_0x4e7e00(0xa8)](_0xd77b93);}function redactSensitive(_0x442924){const _0x49a8db=a186_0x53fb76;return _0x442924===null||_0x442924===undefined||_0x442924===''?null:_0x49a8db(0x7e);}function requireResponseString(_0x30f9c2,_0x139c5e,_0x302c1a){const _0x1e5a8f=a186_0x53fb76;if(typeof _0x30f9c2!==_0x1e5a8f(0x8a)||_0x30f9c2[_0x1e5a8f(0x7d)]()==='')throw CliErrors[_0x1e5a8f(0xd2)]('Invalid\x20notification\x20config\x20response.',_0x1e5a8f(0x82)+(_0x302c1a+0x1)+_0x1e5a8f(0xbe)+_0x139c5e+'\x22.');return _0x30f9c2[_0x1e5a8f(0x7d)]();}function requireExactString(_0x2a8ebf,_0x594116,_0x5cd783){const _0x1afefe=a186_0x53fb76;if(typeof _0x2a8ebf!==_0x1afefe(0x8a)||_0x2a8ebf[_0x1afefe(0x7d)]()==='')throw notificationError(_0x1afefe(0xdb),_0x1afefe(0x95)+_0x5cd783+_0x1afefe(0xbe)+_0x594116+'\x22.');return _0x2a8ebf[_0x1afefe(0x7d)]();}function responseNullableString(_0x554eb7,_0xd7459,_0x4608be){const _0x19b8bf=a186_0x53fb76;if(_0x554eb7===undefined||_0x554eb7===null)return null;if(typeof _0x554eb7!==_0x19b8bf(0x8a))throw notificationError(_0x19b8bf(0xdb),_0x19b8bf(0x95)+_0x4608be+_0x19b8bf(0xca)+_0xd7459+'\x22.');return _0x554eb7;}function responseNullableTimeout(_0x23350a,_0x9fec1f,_0x2a313e){const _0x430a16=a186_0x53fb76;if(_0x23350a===undefined||_0x23350a===null)return null;if(!Number[_0x430a16(0xd5)](_0x23350a)||_0x23350a<0x0)throw notificationError(_0x430a16(0xdb),_0x430a16(0x95)+_0x2a313e+'\x20has\x20invalid\x20field\x20\x22'+_0x9fec1f+'\x22.');return _0x23350a;}function normalizeNullableString(_0x409047){const _0x1ddf07=a186_0x53fb76;return typeof _0x409047===_0x1ddf07(0x8a)?_0x409047:null;}function isJsonObject(_0x284e30){return _0x284e30!==null&&typeof _0x284e30==='object'&&!Array['isArray'](_0x284e30);}function hasOwn(_0x1dcb1b,_0x3eafda){const _0x1dcf88=a186_0x53fb76;return Object[_0x1dcf88(0xb8)]['hasOwnProperty']['call'](_0x1dcb1b,_0x3eafda);}async function readStdin(){const _0x91ae62=a186_0x53fb76;let _0x1285ea='';process[_0x91ae62(0xa3)][_0x91ae62(0xa5)](_0x91ae62(0x83));for await(const _0x4f53e6 of process[_0x91ae62(0xa3)])_0x1285ea+=_0x4f53e6;return _0x1285ea;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a187_0x3ad993=a187_0x2dcb;function a187_0x2dcb(_0x44b5ef,_0x3e75e9){_0x44b5ef=_0x44b5ef-0xc8;const _0xdaa91f=a187_0xdaa9();let _0x2dcb24=_0xdaa91f[_0x44b5ef];return _0x2dcb24;}(function(_0x142506,_0x13d2d7){const _0x48c010=a187_0x2dcb,_0x36b7d2=_0x142506();while(!![]){try{const _0x23b698=-parseInt(_0x48c010(0xf2))/0x1+-parseInt(_0x48c010(0xd6))/0x2+parseInt(_0x48c010(0xf1))/0x3+-parseInt(_0x48c010(0xd7))/0x4*(-parseInt(_0x48c010(0xe4))/0x5)+parseInt(_0x48c010(0xca))/0x6+parseInt(_0x48c010(0xd4))/0x7+-parseInt(_0x48c010(0xd3))/0x8*(parseInt(_0x48c010(0xe7))/0x9);if(_0x23b698===_0x13d2d7)break;else _0x36b7d2['push'](_0x36b7d2['shift']());}catch(_0x5afb0c){_0x36b7d2['push'](_0x36b7d2['shift']());}}}(a187_0xdaa9,0x5f499));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a187_0xdaa9(){const _0x179c90=['form','string','File\x20upload\x20response\x20missing\x20filePath.','appCode','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','495897uVGgqM','317730AusjLA','/smartapi/ocr/recognize-text?','fileUrl','str','join','File\x20URL\x20response\x20missing\x20fileUrl.','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','/smartapi/ocr/recognize-text','GET','\x20OCR\x20from\x20URL','count','2333382JdErgy','/smartapi/common/uploadFile','validation','imageUrl','ocr','general','path','fileName','/smartapi/common/queryFileUrl','56oCKTPF','2467871utReYB','invoice','412174hWfCGM','110564bHFjny','POST','idCard','length','filePath','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','toString','\x20OCR','image-file','scene','Unsupported\x20OCR\x20scene:\x20','recognize','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','15ofcBKS','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','apiError','97146mapSOI','toLowerCase','Table','trim','read'];a187_0xdaa9=function(){return _0x179c90;};return a187_0xdaa9();}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a187_0x3ad993(0xd5),a187_0x3ad993(0xcf),a187_0x3ad993(0xec),a187_0x3ad993(0xd9)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':'General','form':a187_0x3ad993(0xe9),'idCard':'IdCard'},SCENE_FLAG={'name':a187_0x3ad993(0xe0),'type':a187_0x3ad993(0xed),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a187_0x3ad993(0xf8)},IMAGE_FILE_FLAG={'name':a187_0x3ad993(0xdf),'type':a187_0x3ad993(0xed),'description':a187_0x3ad993(0xe5)},IMAGE_URL_FLAG={'name':'image-url','type':a187_0x3ad993(0xed),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x1a6f24){const _0x5c63b2=a187_0x3ad993,_0x2f643c=_0x1a6f24[_0x5c63b2(0xea)]()[_0x5c63b2(0xe8)]();if(_0x2f643c==='idcard')return _0x5c63b2(0xd9);if(_0x2f643c===_0x5c63b2(0xd5)||_0x2f643c===_0x5c63b2(0xcf)||_0x2f643c===_0x5c63b2(0xec))return _0x2f643c;throw CliErrors[_0x5c63b2(0xcc)](_0x5c63b2(0xe1)+_0x1a6f24+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x5c63b2(0xf6)](',\x20'));}function selectedInputs(_0x5c1366){const _0x24dbe4=a187_0x3ad993,_0x5a7541=_0x5c1366[_0x24dbe4(0xf5)]('image-file')[_0x24dbe4(0xea)](),_0xbf6e22=_0x5c1366['str']('image-url')[_0x24dbe4(0xea)]();return{'imageFile':_0x5a7541,'imageUrl':_0xbf6e22,'count':[_0x5a7541,_0xbf6e22]['filter'](Boolean)[_0x24dbe4(0xda)]};}function validateInputSelection(_0x32ece4){const _0x4b4e10=a187_0x3ad993,_0x122778=selectedInputs(_0x32ece4);if(_0x122778[_0x4b4e10(0xc9)]!==0x1)throw CliErrors[_0x4b4e10(0xcc)](_0x4b4e10(0xf0));return _0x122778;}function withScene(_0x30899a,_0x28ac2a,_0x2f05fc){const _0x28def6=a187_0x3ad993;return{..._0x30899a,'scene':_0x28ac2a,..._0x2f05fc?{'sourceFile':{'fileName':_0x2f05fc[_0x28def6(0xd1)],'filePath':_0x2f05fc['filePath']}}:{}};}const ocrRecognize={'service':a187_0x3ad993(0xce),'command':a187_0x3ad993(0xe2),'description':'Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','risk':a187_0x3ad993(0xeb),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x272bbe){const _0x1e616a=a187_0x3ad993,_0x504a5a=normalizeScene(_0x272bbe['str']('scene')),_0x58173a=SCENE_TO_LEGACY_TYPE[_0x504a5a],_0x285cae=validateInputSelection(_0x272bbe);if(_0x285cae[_0x1e616a(0xcd)]){const _0x5b3199=new URLSearchParams({'url':_0x285cae[_0x1e616a(0xcd)],'type':_0x58173a,'appCode':_0x272bbe[_0x1e616a(0xef)]});return{'method':'GET','url':_0x1e616a(0xf3)+_0x5b3199[_0x1e616a(0xdd)](),'description':'Preview:\x20recognize\x20'+_0x504a5a+_0x1e616a(0xc8)};}const _0x5812e6=requireDevelopmentUploadFile(_0x285cae['imageFile'],'image-file');return{'method':'POST','url':_0x1e616a(0xcb),'body':{'steps':[{'method':_0x1e616a(0xd8),'url':_0x1e616a(0xcb),'body':{'appCode':_0x272bbe[_0x1e616a(0xef)],'multipart':{'file':_0x5812e6}}},{'method':_0x1e616a(0xd8),'url':_0x1e616a(0xd2),'body':{'filePath':_0x1e616a(0xe3),'downloadFlag':![]}},{'method':_0x1e616a(0xfa),'url':_0x1e616a(0xf9),'query':{'appCode':_0x272bbe[_0x1e616a(0xef)],'url':_0x1e616a(0xdc),'type':_0x58173a}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x504a5a+_0x1e616a(0xde)};},async 'execute'(_0xa950eb){const _0x2adcb2=a187_0x3ad993,_0x56e5fe=normalizeScene(_0xa950eb[_0x2adcb2(0xf5)](_0x2adcb2(0xe0))),_0x2fbd54=SCENE_TO_LEGACY_TYPE[_0x56e5fe],_0x21dd16=validateInputSelection(_0xa950eb);if(_0x21dd16[_0x2adcb2(0xcd)]){const _0x1a15a5=await recognizeDevelopmentOcr(_0xa950eb['appCode'],{'url':_0x21dd16['imageUrl'],'type':_0x2fbd54});return{'ok':!![],'data':withScene(_0x1a15a5,_0x56e5fe)};}const _0x5e08ca=requireDevelopmentUploadFile(_0x21dd16['imageFile'],_0x2adcb2(0xdf)),_0x3b6832=await uploadDevelopmentFile(_0xa950eb[_0x2adcb2(0xef)],_0x5e08ca[_0x2adcb2(0xd0)]);if(!_0x3b6832[_0x2adcb2(0xdb)])throw CliErrors[_0x2adcb2(0xe6)](_0x2adcb2(0xee));const _0x7b6f5c=await queryDevelopmentFileUrl(_0x3b6832[_0x2adcb2(0xdb)],{'download':![]});if(!_0x7b6f5c['fileUrl'])throw CliErrors[_0x2adcb2(0xe6)](_0x2adcb2(0xf7));const _0xf19be6=await recognizeDevelopmentOcr(_0xa950eb[_0x2adcb2(0xef)],{'url':_0x7b6f5c[_0x2adcb2(0xf4)],'type':_0x2fbd54});return{'ok':!![],'data':withScene(_0xf19be6,_0x56e5fe,_0x3b6832)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a188_0x437d96=a188_0x5c6e;(function(_0xb60552,_0x340192){const _0x28c8f2=a188_0x5c6e,_0x18bfc4=_0xb60552();while(!![]){try{const _0x15c86e=-parseInt(_0x28c8f2(0x158))/0x1*(-parseInt(_0x28c8f2(0x16c))/0x2)+-parseInt(_0x28c8f2(0x193))/0x3*(-parseInt(_0x28c8f2(0x182))/0x4)+-parseInt(_0x28c8f2(0x16a))/0x5+parseInt(_0x28c8f2(0x15e))/0x6+parseInt(_0x28c8f2(0x173))/0x7*(parseInt(_0x28c8f2(0x184))/0x8)+-parseInt(_0x28c8f2(0x162))/0x9+-parseInt(_0x28c8f2(0x165))/0xa*(parseInt(_0x28c8f2(0x153))/0xb);if(_0x15c86e===_0x340192)break;else _0x18bfc4['push'](_0x18bfc4['shift']());}catch(_0x7ee97f){_0x18bfc4['push'](_0x18bfc4['shift']());}}}(a188_0x5472,0x43208));import{readFile}from'node:fs/promises';function a188_0x5472(){const _0x527bb2=['page-content','POST','BLANK','trim','CUSTOM','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','84369xLNzuI','string','page.create','keys','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','93511EdDtui','ONEPAGE','number','page-type','page-pattern','11kcCOHR','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','/smartapi/webcode/page/create','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','createMenu','toLowerCase','2003010PkulJM','page','length','appCode','4614039vyBHrT','.json','isArray','460TJteEz','apiError','version','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','113685TKtMgY','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','79166KMdIQe','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','parentMenuId','create','isInteger','Custom\x20Page\x20pattern\x20not\x20found:\x20','parent-menu-id','1056496hitJJp','DASHBOARD','pageName','num','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','Created\x20Custom\x20Page\x20','page-dir','menuId','name','values','validation','Invalid\x20Custom\x20Page\x20pattern:\x20','menuPath','files','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','40rFFQkU','object','8qSVuun','write','compress','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','str','pageId','isNaN','includes'];a188_0x5472=function(){return _0x527bb2;};return a188_0x5472();}import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';function a188_0x5c6e(_0x5adf70,_0x3280c0){_0x5adf70=_0x5adf70-0x151;const _0x547266=a188_0x5472();let _0x5c6ec2=_0x547266[_0x5adf70];return _0x5c6ec2;}import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a188_0x437d96(0x18f),a188_0x437d96(0x154),a188_0x437d96(0x174)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),'../../../templates/custom-pages');export const pageCreate={'service':a188_0x437d96(0x15f),'command':a188_0x437d96(0x16f),'description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','risk':a188_0x437d96(0x185),'defaultOutputFormat':a188_0x437d96(0x186),'structuredErrors':!![],'rejectedFlags':[{'name':a188_0x437d96(0x156),'message':'page\x20create\x20does\x20not\x20accept\x20--page-type.','hint':a188_0x437d96(0x177)},{'name':a188_0x437d96(0x18d),'message':a188_0x437d96(0x152),'hint':a188_0x437d96(0x187)}],'flags':[{'name':a188_0x437d96(0x17b),'type':'string','description':a188_0x437d96(0x15b)},{'name':'parent-menu-id','type':a188_0x437d96(0x155),'description':a188_0x437d96(0x169)},{'name':a188_0x437d96(0x157),'type':a188_0x437d96(0x194),'description':a188_0x437d96(0x181),'enum':CUSTOM_PAGE_PATTERNS},{'name':a188_0x437d96(0x179),'type':a188_0x437d96(0x194),'description':a188_0x437d96(0x159)},APPCODE_FLAG],async 'validate'(_0x359bef){await readValidatedPageSource(_0x359bef);},async 'dryRun'(_0x4674b5){const _0x264ad0=a188_0x437d96,_0x288b06=readInput(_0x4674b5,await readValidatedPageSource(_0x4674b5));return{'method':_0x264ad0(0x18e),'url':_0x264ad0(0x15a),'body':{'appCode':_0x288b06[_0x264ad0(0x161)],'pageName':_0x288b06[_0x264ad0(0x175)],..._0x288b06[_0x264ad0(0x16e)]!=null?{'parentMenuId':_0x288b06['parentMenuId']}:{},'createMenu':_0x288b06[_0x264ad0(0x15c)],'codeContent':_0x288b06['files']},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON['stringify'](_0x288b06[_0x264ad0(0x175)])+'\x20and\x20its\x20menu\x20entry.'};},async 'execute'(_0x12b278){const _0x5ed2a5=a188_0x437d96,_0xe5b91=readInput(_0x12b278,await readValidatedPageSource(_0x12b278)),_0x25e575=await createCustomPage(_0xe5b91);if(!Number[_0x5ed2a5(0x170)](_0x25e575[_0x5ed2a5(0x18a)])||_0x25e575[_0x5ed2a5(0x18a)]<=0x0)throw CliErrors[_0x5ed2a5(0x166)](_0x5ed2a5(0x168));const _0x4c9d3b=buildCustomPageDevelopmentUrl(_0xe5b91[_0x5ed2a5(0x161)],_0x25e575[_0x5ed2a5(0x17f)]),_0x42f848=buildCustomPageEditUrl(_0xe5b91['appCode'],_0x25e575['pageId']);return{'ok':!![],'data':{'operation':_0x5ed2a5(0x195),'pageType':_0x5ed2a5(0x191),'pagePattern':readPagePattern(_0x12b278),'selector':{'appCode':_0xe5b91[_0x5ed2a5(0x161)],'pageName':_0xe5b91[_0x5ed2a5(0x175)]},'before':null,'after':{'pageId':_0x25e575['pageId'],'pageName':_0x25e575[_0x5ed2a5(0x175)],'appCode':_0x25e575[_0x5ed2a5(0x161)],'version':_0x25e575[_0x5ed2a5(0x167)],'menuId':_0x25e575[_0x5ed2a5(0x17a)],'menuPath':_0x25e575[_0x5ed2a5(0x17f)],'files':_0x25e575[_0x5ed2a5(0x180)]??Object[_0x5ed2a5(0x151)](_0xe5b91[_0x5ed2a5(0x180)])},'dryRun':![],'request':_0xe5b91,..._0x4c9d3b?{'pageUrl':_0x4c9d3b}:{},..._0x42f848?{'editPageUrl':_0x42f848}:{},'warnings':_0x4c9d3b?[]:['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':_0x5ed2a5(0x178)+_0x25e575[_0x5ed2a5(0x18a)]+'.'};}};function readPagePattern(_0x1a000a){const _0x3c914a=a188_0x437d96,_0x2f0ba1=_0x1a000a['str'](_0x3c914a(0x157))[_0x3c914a(0x190)](),_0x449a89=_0x1a000a['str'](_0x3c914a(0x179))['trim']();if(_0x2f0ba1&&_0x449a89)throw CliErrors[_0x3c914a(0x17d)]('--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.');if(_0x449a89)return null;if(!_0x2f0ba1)throw CliErrors['validation'](_0x3c914a(0x188));if(!CUSTOM_PAGE_PATTERNS[_0x3c914a(0x18c)](_0x2f0ba1))throw CliErrors['validation'](_0x3c914a(0x192));return _0x2f0ba1;}async function readPageSource(_0x169b50){const _0x3b5aec=a188_0x437d96,_0x2e1f5f=_0x169b50[_0x3b5aec(0x189)]('page-dir')['trim'](),_0x43cc33=readPagePattern(_0x169b50);if(_0x43cc33===null){const _0x419d5c=await readCustomPageDirectory(_0x2e1f5f);if(Object[_0x3b5aec(0x151)](_0x419d5c)['length']===0x0)throw CliErrors[_0x3b5aec(0x17d)](_0x3b5aec(0x16d));return _0x419d5c;}let _0x540963;try{_0x540963=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x43cc33[_0x3b5aec(0x15d)]()+_0x3b5aec(0x163)),'utf8');}catch{throw CliErrors[_0x3b5aec(0x17d)](_0x3b5aec(0x171)+_0x43cc33+'.');}let _0x6e0e98;try{_0x6e0e98=JSON['parse'](_0x540963);}catch{throw CliErrors[_0x3b5aec(0x17d)]('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x43cc33+'.');}if(!_0x6e0e98||typeof _0x6e0e98!==_0x3b5aec(0x183)||Array[_0x3b5aec(0x164)](_0x6e0e98)||Object[_0x3b5aec(0x17c)](_0x6e0e98)['some'](_0x48c112=>typeof _0x48c112!==_0x3b5aec(0x194)))throw CliErrors['validation'](_0x3b5aec(0x17e)+_0x43cc33+'.');return _0x6e0e98;}async function readValidatedPageSource(_0x3be32d){const _0x62cb28=await readPageSource(_0x3be32d);return await validateCustomPageContent(_0x62cb28),_0x62cb28;}function readInput(_0x2781ad,_0x217c5e){const _0x5b1d00=a188_0x437d96,_0x24b9e3=_0x2781ad['str'](_0x5b1d00(0x17b))[_0x5b1d00(0x190)]()||'Custom_page_'+Date['now']();if(_0x24b9e3[_0x5b1d00(0x160)]>0x64)throw CliErrors[_0x5b1d00(0x17d)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x35a586=_0x2781ad[_0x5b1d00(0x176)](_0x5b1d00(0x172),NaN),_0x7db82=!Number[_0x5b1d00(0x18b)](_0x35a586);if(_0x7db82&&(!Number[_0x5b1d00(0x170)](_0x35a586)||_0x35a586<=0x0))throw CliErrors[_0x5b1d00(0x17d)](_0x5b1d00(0x16b));return{'appCode':_0x2781ad[_0x5b1d00(0x161)],'pageName':_0x24b9e3,..._0x7db82?{'parentMenuId':_0x35a586}:{},'createMenu':!![],'files':_0x217c5e};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a189_0x4156(_0x5ac23b,_0x456792){_0x5ac23b=_0x5ac23b-0xb9;const _0x483b77=a189_0x483b();let _0x415628=_0x483b77[_0x5ac23b];return _0x415628;}const a189_0x9539a0=a189_0x4156;function a189_0x483b(){const _0x5f29ae=['custom-detail','85HNzwCR','trim','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','26zdlDng','2467224alWAjw','Custom\x20Page\x20ID','cookie','appcode','getHours','str','154050TktLIP','Retrieved\x20Custom\x20Page\x20','getTime','299623eRzojw','isNaN','14tnIkNf','22830uvHRGL','getFullYear','pageCode','356wPjQgc','appCode','padStart','10JyJDPn','getSeconds','getMonth','12heCYFT','compress','read','21057xOykPS','join','14712049xghkQt','37433578nTXRSn','5247eDZDPA','number'];a189_0x483b=function(){return _0x5f29ae;};return a189_0x483b();}(function(_0x2f666c,_0x42dff2){const _0x17418d=a189_0x4156,_0x444d28=_0x2f666c();while(!![]){try{const _0x2d8d5f=-parseInt(_0x17418d(0xd9))/0x1*(parseInt(_0x17418d(0xbf))/0x2)+parseInt(_0x17418d(0xc5))/0x3*(parseInt(_0x17418d(0xbc))/0x4)+-parseInt(_0x17418d(0xcc))/0x5*(parseInt(_0x17418d(0xd6))/0x6)+parseInt(_0x17418d(0xdb))/0x7*(-parseInt(_0x17418d(0xd0))/0x8)+parseInt(_0x17418d(0xc9))/0x9*(-parseInt(_0x17418d(0xb9))/0xa)+parseInt(_0x17418d(0xc7))/0xb*(-parseInt(_0x17418d(0xc2))/0xc)+parseInt(_0x17418d(0xcf))/0xd*(parseInt(_0x17418d(0xc8))/0xe);if(_0x2d8d5f===_0x42dff2)break;else _0x444d28['push'](_0x444d28['shift']());}catch(_0x1df0ab){_0x444d28['push'](_0x444d28['shift']());}}}(a189_0x483b,0xb7b75));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':'page','command':a189_0x9539a0(0xcb),'description':a189_0x9539a0(0xce),'risk':a189_0x9539a0(0xc4),'defaultOutputFormat':a189_0x9539a0(0xc3),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a189_0x9539a0(0xca),'required':!![],'description':a189_0x9539a0(0xd1)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5ef182){readCustomPageId(_0x5ef182);},async 'execute'(_0x587465){const _0x1fa874=a189_0x9539a0,_0x2ee8a7=readCustomPageId(_0x587465),_0x2a0f6a=await getCustomPageSource(_0x2ee8a7),{bundle:_0x17751b,createTime:_0x3066b1,updateTime:_0x12275d,..._0x12beef}=_0x2a0f6a,_0x54d8b9=_0x2a0f6a['id']??_0x2ee8a7,_0x21c489=_0x2a0f6a[_0x1fa874(0xbd)]?.[_0x1fa874(0xcd)]()||_0x587465[_0x1fa874(0xd5)](_0x1fa874(0xd3))[_0x1fa874(0xcd)](),_0x5d89aa=buildCustomPageRuntimeUrl(_0x21c489,_0x2a0f6a[_0x1fa874(0xbb)]),_0x5d0e92=buildCustomPageEditUrl(_0x21c489,_0x54d8b9),_0x46489d=await resolveCustomPageDevelopmentUrl(_0x21c489,_0x54d8b9,_0x587465[_0x1fa874(0xd2)]);return{'ok':!![],'data':{..._0x12beef,..._0x5d89aa?{'runtimePageUrl':_0x5d89aa}:{},..._0x46489d?{'pageUrl':_0x46489d}:{},..._0x5d0e92?{'editPageUrl':_0x5d0e92}:{},..._0x3066b1==null?{}:{'createTime':formatTime(_0x3066b1)},..._0x12275d==null?{}:{'updateTime':formatTime(_0x12275d)}},'message':_0x1fa874(0xd7)+_0x2ee8a7+'.'};}};function formatTime(_0x39a8c8){const _0x143c44=a189_0x9539a0,_0x1dbe1d=new Date(_0x39a8c8);if(Number[_0x143c44(0xda)](_0x1dbe1d[_0x143c44(0xd8)]()))return String(_0x39a8c8);const _0x4198cb=[_0x1dbe1d[_0x143c44(0xba)](),String(_0x1dbe1d[_0x143c44(0xc1)]()+0x1)[_0x143c44(0xbe)](0x2,'0'),String(_0x1dbe1d['getDate']())[_0x143c44(0xbe)](0x2,'0')][_0x143c44(0xc6)]('-'),_0x55b887=[String(_0x1dbe1d[_0x143c44(0xd4)]())[_0x143c44(0xbe)](0x2,'0'),String(_0x1dbe1d['getMinutes']())[_0x143c44(0xbe)](0x2,'0'),String(_0x1dbe1d[_0x143c44(0xc0)]())[_0x143c44(0xbe)](0x2,'0')][_0x143c44(0xc6)](':');return _0x4198cb+'\x20'+_0x55b887;}
|