@lovrabet/rabetbase-cli 2.5.5-beta.1 → 2.5.5-beta.2
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 +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +13 -9
- package/skills/rabetbase-page-generation/references/component-baseline.md +2 -2
- package/skills/rabetbase-page-generation/references/generation.md +64 -15
- package/skills/rabetbase-page-generation/templates/onepage/build.mjs +39 -54
- package/skills/rabetbase-page-generation/templates/onepage/list/index.jsx +6 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a180_0x1f637a=a180_0x5c13;(function(_0x48b7c7,_0x5b1859){const _0x1a08fa=a180_0x5c13,_0xc1c05b=_0x48b7c7();while(!![]){try{const _0x1b49af=-parseInt(_0x1a08fa(0x22c))/0x1+-parseInt(_0x1a08fa(0x1bc))/0x2+parseInt(_0x1a08fa(0x1b3))/0x3+parseInt(_0x1a08fa(0x206))/0x4*(parseInt(_0x1a08fa(0x222))/0x5)+-parseInt(_0x1a08fa(0x1f0))/0x6+-parseInt(_0x1a08fa(0x21c))/0x7*(parseInt(_0x1a08fa(0x1fa))/0x8)+parseInt(_0x1a08fa(0x1ff))/0x9;if(_0x1b49af===_0x5b1859)break;else _0xc1c05b['push'](_0xc1c05b['shift']());}catch(_0x111cd8){_0xc1c05b['push'](_0xc1c05b['shift']());}}}(a180_0x5aaf,0x343da));function a180_0x5aaf(){const _0x11d70a=['hash','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','/smartapi/menu/update','depth','\x20changed\x20unexpectedly.','expectedCount','boolean','childrenIds','isSafeInteger','\x20menu(s),\x20expected\x20','\x20menu(s);\x20skipped\x20','warnings','verification','menu_expected_count_mismatch','datasetCode','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','Menu\x20path\x20selector\x20not\x20found:\x20','url','modelType','label','Response\x20was\x20lost\x20for\x20menu\x20','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','visibility-update','expected-count','some','menu\x20list','number','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','resources','before','sort','flagMissing','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','parentId','pageId','str','1805556KpvURr','pageType','rabetbase\x20menu\x20list\x20--format\x20compress','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','requestedVisible','\x20menu(s);\x20skip\x20','message','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','update-recovery','resourcesValid','2120Yjqowr','validation','Final\x20menu\x20visibility\x20readback\x20failed.','appCode','\x20unchanged\x20menu(s).','6969006WpHfEx','expectVisible','set','map','childrenCount','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','68RlDAOQ','\x20updated,\x20','filter','datasetId','type','high-risk-write','POST','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','visible','plan','expect-visible','menu_selector_ambiguous','stringify','\x20visibility\x20update\x20could\x20not\x20be\x20verified','body','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','join','false','byId','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','6580zaGHIg','menus','menu_selector_not_found','Menu\x20','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','push','98435jwaNcy','length','beforeById','true','recovered','Selected\x20','\x20skipped,\x20','failed','update-menu-visibility','menuIds','387361EJmlQN','trim','update\x20menu\x20visibility','cookie','\x20must\x20be\x20true\x20or\x20false.','num','1182828rZelsh','get','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Requested\x20menu\x20visibility','path','string','plannedActions','Would\x20update\x20visibility\x20for\x20','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','703848DmbpNT','menu_verification_failed','has','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','isArray','menu-ids','code','paths','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','targets','updated','menu_state_drift','update','Menu\x20visibility\x20update\x20completed:\x20','verify\x20menu\x20visibility\x20update'];a180_0x5aaf=function(){return _0x11d70a;};return a180_0x5aaf();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a180_0x5c13(_0x4f82a2,_0x445fde){_0x4f82a2=_0x4f82a2-0x1af;const _0x5aaf94=a180_0x5aaf();let _0x5c13ae=_0x5aaf94[_0x4f82a2];return _0x5c13ae;}import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a180_0x1f637a(0x1ce)}];export const menuVisibilityUpdate={'service':'menu','command':'visibility-update','description':a180_0x1f637a(0x21a),'risk':a180_0x1f637a(0x20b),'structuredErrors':!![],'flags':[{'name':a180_0x1f637a(0x1c2),'type':a180_0x1f637a(0x1b8),'description':a180_0x1f637a(0x220)},{'name':a180_0x1f637a(0x1c4),'type':a180_0x1f637a(0x1b8),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a180_0x1f637a(0x20f),'type':'boolean','required':!![],'description':a180_0x1f637a(0x1b6)},{'name':'expect-visible','type':a180_0x1f637a(0x1d2),'description':a180_0x1f637a(0x1db)},{'name':a180_0x1f637a(0x1e3),'type':a180_0x1f637a(0x1e6),'description':a180_0x1f637a(0x1c5)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x143d89){parseInput(_0x143d89),requireExplicitYes(_0x143d89);},async 'dryRun'(_0x1a7306){const _0x33990f=a180_0x1f637a,_0x3398a6=await buildPlan(_0x1a7306,!![]),_0x1ea7ba=_0x3398a6[_0x33990f(0x210)][_0x33990f(0x1b9)]?.[_0x33990f(0x223)]??0x0,_0x491680=_0x3398a6[_0x33990f(0x210)][_0x33990f(0x1c6)][_0x33990f(0x223)]-_0x1ea7ba;return menuDryRunResult(_0x3398a6[_0x33990f(0x210)],{'method':_0x33990f(0x20c),'url':_0x33990f(0x1ce),'body':{'updates':_0x3398a6['plan'][_0x33990f(0x1b9)]?.[_0x33990f(0x202)](_0x51e3b2=>_0x51e3b2[_0x33990f(0x215)])??[]},'description':_0x33990f(0x1ba)+_0x1ea7ba+_0x33990f(0x1f5)+_0x491680+_0x33990f(0x1fe)});},async 'execute'(_0x1cd43b){const _0x4ce22a=a180_0x1f637a;requireExplicitYes(_0x1cd43b);const _0xcb6199=await buildPlan(_0x1cd43b,![]);await recheckMutationSnapshot(_0x1cd43b,_0xcb6199[_0x4ce22a(0x210)],_0x4ce22a(0x1af));const _0x537135=[],_0x4289c5=[],_0x3a4e00=[];for(const _0xf9d12 of _0xcb6199[_0x4ce22a(0x210)][_0x4ce22a(0x1c6)]){if(_0xf9d12[_0x4ce22a(0x1e9)][_0x4ce22a(0x20f)]===_0xcb6199[_0x4ce22a(0x210)]['requestedVisible']){_0x537135['push']({'id':_0xf9d12['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x1cd43b['appCode'],_0x1cd43b['cookie'],{'id':_0xf9d12['id'],'visible':_0xcb6199[_0x4ce22a(0x210)][_0x4ce22a(0x1f4)]}),_0x537135[_0x4ce22a(0x221)]({'id':_0xf9d12['id'],'updated':!![],'skipped':![]});}catch(_0x2dd787){const _0x4cd82d=mapMenuApiError(_0x2dd787,'update\x20visibility\x20for',_0xf9d12['id']);if(isMenuResponseLoss(_0x2dd787)&&_0x4cd82d[_0x4ce22a(0x1c3)]!=='menu_permission_denied'){_0x3a4e00['push'](_0xf9d12['id']);continue;}_0x4289c5[_0x4ce22a(0x221)]({'id':_0xf9d12['id'],'stage':_0x4ce22a(0x1c9),'code':_0x4cd82d[_0x4ce22a(0x1c3)],'message':_0x4cd82d['message']});}}let _0x4e370e;try{_0x4e370e=await fetchMenuSnapshot(_0x1cd43b[_0x4ce22a(0x1fd)],_0x1cd43b[_0x4ce22a(0x1b0)]);}catch(_0x32a5e5){const _0x1ef263=describeMenuErrorCause(_0x32a5e5,_0x4ce22a(0x1cb)),_0x1aaf81=_0x3a4e00[_0x4ce22a(0x202)](_0x4475e2=>({'id':_0x4475e2,'stage':_0x4ce22a(0x1f8),'code':_0x4ce22a(0x1bd),'message':_0x4ce22a(0x1e0)+_0x4475e2+_0x4ce22a(0x1e1),'requestedStateConfirmed':![],'recovered':![]})),_0x525b25={'stage':_0x4ce22a(0x1d8),'code':'menu_verification_failed','message':_0x4ce22a(0x1fc),'targetIds':_0xcb6199[_0x4ce22a(0x210)][_0x4ce22a(0x1c6)]['map'](_0x4a5055=>_0x4a5055['id']),'requestedStateConfirmed':![],..._0x1ef263};throw menuFailure(asVerificationError(_0x32a5e5,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0xcb6199[_0x4ce22a(0x210)],{'stage':_0x4ce22a(0x1d8),'succeeded':_0x537135,'failedRecords':[..._0x4289c5,..._0x1aaf81,_0x525b25],'warnings':[_0x4ce22a(0x205)],'verification':{'status':_0x4ce22a(0x229),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x2a5d1a=[];for(const _0x17754b of _0x537135){const _0x43c042=Number(_0x17754b['id']),_0x49c4d6=_0xcb6199[_0x4ce22a(0x224)][_0x4ce22a(0x1b4)](_0x43c042),_0x31fd30=_0x4e370e['byId'][_0x4ce22a(0x1b4)](_0x43c042);try{verifyVisibilityUpdate(_0x49c4d6,_0x31fd30,_0xcb6199['plan'][_0x4ce22a(0x1f4)]);}catch(_0x2f4f07){const _0x484758=asVerificationError(_0x2f4f07,'Menu\x20'+_0x43c042+_0x4ce22a(0x214));_0x2a5d1a[_0x4ce22a(0x221)]({'id':_0x43c042,'stage':_0x4ce22a(0x1d8),'code':_0x484758[_0x4ce22a(0x1c3)],'message':_0x484758[_0x4ce22a(0x1f6)],'requestedStateConfirmed':![]});}}for(const _0x56ee2f of _0x3a4e00){const _0x2a9d52=_0xcb6199[_0x4ce22a(0x224)][_0x4ce22a(0x1b4)](_0x56ee2f),_0x171dc3=_0x4e370e[_0x4ce22a(0x219)][_0x4ce22a(0x1b4)](_0x56ee2f);try{verifyVisibilityUpdate(_0x2a9d52,_0x171dc3,_0xcb6199['plan'][_0x4ce22a(0x1f4)]),_0x537135[_0x4ce22a(0x221)]({'id':_0x56ee2f,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x43501f){const _0x31abe3=asVerificationError(_0x43501f,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x56ee2f+_0x4ce22a(0x1cd));_0x2a5d1a['push']({'id':_0x56ee2f,'stage':'update-recovery','code':_0x31abe3[_0x4ce22a(0x1c3)],'message':_0x31abe3['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x2a5d1a[_0x4ce22a(0x223)]>0x0){const _0x34da62=_0x2a5d1a[_0x4ce22a(0x202)](_0x4909db=>Number(_0x4909db['id'])),_0x14506c=_0x537135[_0x4ce22a(0x208)](_0x5eb946=>_0x5eb946[_0x4ce22a(0x226)]===!![])['length'],_0x1558c3=menuError(_0x4ce22a(0x1bd),_0x4ce22a(0x1bb)+_0x34da62[_0x4ce22a(0x217)](',\x20')+'.',_0x4ce22a(0x20d));throw menuFailure(_0x1558c3,_0xcb6199[_0x4ce22a(0x210)],{'stage':_0x4ce22a(0x1d8),'succeeded':_0x537135,'failedRecords':[..._0x4289c5,..._0x2a5d1a],'warnings':[_0x4ce22a(0x1e7)],'verification':{'status':_0x4ce22a(0x229),..._0x34da62[_0x4ce22a(0x223)]===0x1?{'targetId':_0x34da62[0x0]}:{'targetIds':_0x34da62},'recoveredCount':_0x14506c,'lookupCommand':_0x4ce22a(0x1f2)}});}const _0x1b3b20=_0x537135['filter'](_0x5d8030=>_0x5d8030[_0x4ce22a(0x1c7)]===!![])['length'],_0x2c4d59=_0x537135[_0x4ce22a(0x223)]-_0x1b3b20,_0xaf2ac4={..._0xcb6199[_0x4ce22a(0x210)],'succeeded':_0x537135,'failed':_0x4289c5,'warnings':_0x4289c5['length']>0x0?[..._0xcb6199[_0x4ce22a(0x210)][_0x4ce22a(0x1d7)],_0x4ce22a(0x1f7)]:_0xcb6199[_0x4ce22a(0x210)][_0x4ce22a(0x1d7)],'verification':{'checkedBy':_0x4ce22a(0x1e5),'snapshotHash':_0x4e370e[_0x4ce22a(0x1cc)],'matchesRequestedState':_0x4289c5[_0x4ce22a(0x223)]===0x0,'recoveredCount':_0x3a4e00[_0x4ce22a(0x223)]}};return{'ok':_0x4289c5['length']===0x0,'data':_0xaf2ac4,'message':_0x4289c5[_0x4ce22a(0x223)]===0x0?'Updated\x20visibility\x20for\x20'+_0x1b3b20+_0x4ce22a(0x1d6)+_0x2c4d59+_0x4ce22a(0x1fe):_0x4ce22a(0x1ca)+_0x1b3b20+_0x4ce22a(0x207)+_0x2c4d59+_0x4ce22a(0x228)+_0x4289c5['length']+'\x20failed.'};}};function parseInput(_0x309b8c){const _0x28dc60=a180_0x1f637a,_0x164805=parseMenuIds(_0x309b8c[_0x28dc60(0x1ef)]('menu-ids')),_0x3096b3=parseCsv(_0x309b8c[_0x28dc60(0x1ef)](_0x28dc60(0x1c4)));if(_0x164805[_0x28dc60(0x223)]===0x0&&_0x3096b3['length']===0x0)throw CliErrors['validation']('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x47f084=parseBooleanFlag(_0x309b8c,_0x28dc60(0x20f),!![]),_0x217a4b=parseBooleanFlag(_0x309b8c,_0x28dc60(0x211),![]);let _0x2041b7;if(hasFlag(_0x309b8c,'expected-count')){_0x2041b7=_0x309b8c[_0x28dc60(0x1b2)]('expected-count');if(!Number[_0x28dc60(0x1d4)](_0x2041b7)||_0x2041b7<0x0)throw CliErrors[_0x28dc60(0x1fb)](_0x28dc60(0x20e));}return{'menuIds':_0x164805,'paths':_0x3096b3,'visible':_0x47f084,'expectVisible':_0x217a4b,'expectedCount':_0x2041b7};}async function buildPlan(_0xbf6dec,_0x9e69){const _0x29c05a=a180_0x1f637a,_0x3cd18d=parseInput(_0xbf6dec),_0x1ef1c9=await fetchMutationSnapshot(_0xbf6dec,_0x29c05a(0x1af)),_0x4ed217=selectTargets(_0x1ef1c9[_0x29c05a(0x21d)],_0x3cd18d[_0x29c05a(0x22b)],_0x3cd18d[_0x29c05a(0x1c4)]);if(_0x3cd18d[_0x29c05a(0x1d1)]!==undefined&&_0x4ed217[_0x29c05a(0x223)]!==_0x3cd18d[_0x29c05a(0x1d1)])throw menuError(_0x29c05a(0x1d9),_0x29c05a(0x227)+_0x4ed217[_0x29c05a(0x223)]+_0x29c05a(0x1d5)+_0x3cd18d[_0x29c05a(0x1d1)]+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x3cd18d[_0x29c05a(0x200)]!==undefined){const _0xedfb57=_0x4ed217[_0x29c05a(0x208)](_0x4f00f3=>_0x4f00f3[_0x29c05a(0x20f)]!==_0x3cd18d[_0x29c05a(0x200)]);if(_0xedfb57[_0x29c05a(0x223)]>0x0)throw menuError(_0x29c05a(0x1c8),_0x29c05a(0x1b5)+_0xedfb57[_0x29c05a(0x202)](_0xb640ef=>_0xb640ef['id'])['join'](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x31776c=_0x4ed217[_0x29c05a(0x202)](_0x14507b=>({'id':_0x14507b['id'],'label':_0x14507b[_0x29c05a(0x1df)],'path':_0x14507b[_0x29c05a(0x1b7)],'before':{'visible':_0x14507b[_0x29c05a(0x20f)]},'after':{'visible':_0x3cd18d[_0x29c05a(0x20f)]}})),_0x28c702=_0x31776c[_0x29c05a(0x208)](_0x52f82d=>_0x52f82d['before'][_0x29c05a(0x20f)]!==_0x3cd18d['visible'])[_0x29c05a(0x202)](_0x1a5313=>({'stage':_0x29c05a(0x22a),'method':_0x29c05a(0x20c),'path':_0x29c05a(0x1ce),'body':{'appCode':_0xbf6dec[_0x29c05a(0x1fd)],'id':_0x1a5313['id'],'visible':_0x3cd18d[_0x29c05a(0x20f)]}})),_0x23d9f1=mutationResult({'operation':_0x29c05a(0x1e2),'selector':{'menuIds':_0x3cd18d['menuIds'],'paths':_0x3cd18d[_0x29c05a(0x1c4)]},'before':{'menus':_0x4ed217[_0x29c05a(0x202)](_0x318d50=>({'id':_0x318d50['id'],'path':_0x318d50[_0x29c05a(0x1b7)],'visible':_0x318d50['visible']}))},'after':{'menus':_0x4ed217[_0x29c05a(0x202)](_0x4c99b8=>({'id':_0x4c99b8['id'],'path':_0x4c99b8[_0x29c05a(0x1b7)],'visible':_0x3cd18d[_0x29c05a(0x20f)]}))},'dryRun':_0x9e69,'backend':[...BACKEND],'plannedActions':_0x28c702,'snapshotHash':_0x1ef1c9['hash'],'warnings':_0x28c702[_0x29c05a(0x223)]===0x0?[_0x29c05a(0x1f3)]:[]});return{'plan':{..._0x23d9f1,'requestedVisible':_0x3cd18d['visible'],'targets':_0x31776c},'beforeById':new Map(_0x4ed217[_0x29c05a(0x202)](_0x1dbcec=>[_0x1dbcec['id'],_0x1dbcec]))};}function selectTargets(_0x31264b,_0x15d188,_0x2ec998){const _0x5c53c6=a180_0x1f637a,_0x2584a4=new Map(_0x31264b[_0x5c53c6(0x202)](_0x39f744=>[_0x39f744['id'],_0x39f744])),_0x3636bf=new Map(),_0x3bac00=_0x15d188['filter'](_0xa3d0e4=>!_0x2584a4[_0x5c53c6(0x1be)](_0xa3d0e4));if(_0x3bac00['length']>0x0)throw menuError(_0x5c53c6(0x21e),'Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x3bac00[_0x5c53c6(0x217)](',\x20')+'.',_0x5c53c6(0x1bf));for(const _0x4b71d9 of _0x15d188){_0x3636bf[_0x5c53c6(0x201)](_0x4b71d9,_0x2584a4['get'](_0x4b71d9));}for(const _0x5361da of _0x2ec998){const _0x357df7=_0x31264b[_0x5c53c6(0x208)](_0x15178c=>_0x15178c[_0x5c53c6(0x1b7)]===_0x5361da);if(_0x357df7[_0x5c53c6(0x223)]===0x0)throw menuError(_0x5c53c6(0x21e),_0x5c53c6(0x1dc)+JSON[_0x5c53c6(0x213)](_0x5361da)+'.',_0x5c53c6(0x216));if(_0x357df7[_0x5c53c6(0x223)]>0x1)throw menuError(_0x5c53c6(0x212),_0x5c53c6(0x21b)+JSON[_0x5c53c6(0x213)](_0x5361da)+'.',_0x5c53c6(0x1c0)+_0x357df7[_0x5c53c6(0x202)](_0x2cebb6=>_0x2cebb6['id'])[_0x5c53c6(0x217)](',\x20')+'.');const _0x3d5336=_0x357df7[0x0];_0x3636bf[_0x5c53c6(0x201)](_0x3d5336['id'],_0x3d5336);}return[..._0x3636bf['values']()];}function parseMenuIds(_0x177b25){const _0x2189ee=a180_0x1f637a,_0x52f43f=parseCsv(_0x177b25),_0x4ca8ad=_0x52f43f[_0x2189ee(0x202)](Number);if(_0x4ca8ad[_0x2189ee(0x1e4)](_0x508bc9=>!Number[_0x2189ee(0x1d4)](_0x508bc9)||_0x508bc9<=0x0))throw CliErrors['validation'](_0x2189ee(0x204));return[...new Set(_0x4ca8ad)];}function parseCsv(_0x590ab3){const _0x4e3b36=a180_0x1f637a;return[...new Set(_0x590ab3['split'](',')[_0x4e3b36(0x202)](_0x414bc7=>_0x414bc7[_0x4e3b36(0x22d)]())['filter'](Boolean))];}function parseBooleanFlag(_0xf7f892,_0x413f92,_0x2221d3){const _0x2a336a=a180_0x1f637a;if(!hasFlag(_0xf7f892,_0x413f92)){if(_0x2221d3)throw CliErrors[_0x2a336a(0x1eb)](_0x413f92);return undefined;}const _0x7f07ba=_0xf7f892['rawFlags'][_0x413f92];if(_0x7f07ba===!![]||_0x7f07ba===![])return _0x7f07ba;if(_0x7f07ba===_0x2a336a(0x225))return!![];if(_0x7f07ba===_0x2a336a(0x218))return![];throw CliErrors[_0x2a336a(0x1fb)]('--'+_0x413f92+_0x2a336a(0x1b1));}function verifyVisibilityUpdate(_0x396a7d,_0xa156d6,_0x51f4fe){const _0x439550=a180_0x1f637a;assertVerified(!!_0xa156d6,'Menu\x20'+_0x396a7d['id']+_0x439550(0x1ec)),assertVerified(_0xa156d6[_0x439550(0x20f)]===_0x51f4fe,_0x439550(0x21f)+_0x396a7d['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x1b280f=[['id',_0xa156d6['id'],_0x396a7d['id']],['parentId',_0xa156d6['parentId'],_0x396a7d[_0x439550(0x1ed)]],['depth',_0xa156d6[_0x439550(0x1cf)],_0x396a7d['depth']],['label',_0xa156d6[_0x439550(0x1df)],_0x396a7d['label']],[_0x439550(0x1b7),_0xa156d6[_0x439550(0x1b7)],_0x396a7d[_0x439550(0x1b7)]],[_0x439550(0x1dd),_0xa156d6[_0x439550(0x1dd)],_0x396a7d[_0x439550(0x1dd)]],[_0x439550(0x20a),_0xa156d6[_0x439550(0x20a)],_0x396a7d[_0x439550(0x20a)]],['sort',_0xa156d6[_0x439550(0x1ea)],_0x396a7d[_0x439550(0x1ea)]],[_0x439550(0x1e8),_0xa156d6[_0x439550(0x1e8)],_0x396a7d[_0x439550(0x1e8)]],[_0x439550(0x1f9),_0xa156d6[_0x439550(0x1f9)],_0x396a7d[_0x439550(0x1f9)]],[_0x439550(0x1d3),_0xa156d6[_0x439550(0x1d3)],_0x396a7d[_0x439550(0x1d3)]],[_0x439550(0x203),_0xa156d6[_0x439550(0x203)],_0x396a7d['childrenCount']],['pageId',_0xa156d6[_0x439550(0x1ee)],_0x396a7d['pageId']],[_0x439550(0x1f1),_0xa156d6['pageType'],_0x396a7d[_0x439550(0x1f1)]],[_0x439550(0x1de),_0xa156d6[_0x439550(0x1de)],_0x396a7d[_0x439550(0x1de)]],['datasetId',_0xa156d6[_0x439550(0x209)],_0x396a7d['datasetId']],[_0x439550(0x1da),_0xa156d6[_0x439550(0x1da)],_0x396a7d[_0x439550(0x1da)]]];for(const [_0x403a11,_0xad15c5,_0x242b73]of _0x1b280f){assertVerified(sameValue(_0xad15c5,_0x242b73),_0x439550(0x21f)+_0x396a7d['id']+'\x20'+_0x403a11+_0x439550(0x1d0));}}function sameValue(_0x2bacb5,_0x17fb72){const _0xcb5378=a180_0x1f637a;if(Array['isArray'](_0x2bacb5)||Array[_0xcb5378(0x1c1)](_0x17fb72))return JSON[_0xcb5378(0x213)](_0x2bacb5)===JSON['stringify'](_0x17fb72);return _0x2bacb5===_0x17fb72;}
|
|
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 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a181_0x312354=a181_0x15fc;(function(_0x3be1e3,_0x577039){const _0x288333=a181_0x15fc,_0x27cbe9=_0x3be1e3();while(!![]){try{const _0x402a30=-parseInt(_0x288333(0xc1))/0x1+parseInt(_0x288333(0xb9))/0x2*(parseInt(_0x288333(0xc6))/0x3)+-parseInt(_0x288333(0xc4))/0x4*(-parseInt(_0x288333(0xc5))/0x5)+-parseInt(_0x288333(0xcb))/0x6+-parseInt(_0x288333(0xc7))/0x7*(-parseInt(_0x288333(0xca))/0x8)+-parseInt(_0x288333(0xcd))/0x9*(-parseInt(_0x288333(0xcf))/0xa)+parseInt(_0x288333(0xbb))/0xb;if(_0x402a30===_0x577039)break;else _0x27cbe9['push'](_0x27cbe9['shift']());}catch(_0x42e30b){_0x27cbe9['push'](_0x27cbe9['shift']());}}}(a181_0x1588,0x84be1));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(_0x2dddc6){const _0x176ea6=a181_0x15fc,_0x1d6bc0=await readNotificationDocument(_0x2dddc6,'create'),_0x4bec86=createMutationInput(_0x2dddc6[_0x176ea6(0xc8)],_0x1d6bc0);return{'document':_0x1d6bc0,'input':_0x4bec86,'planned':projectNotificationConfig({'appCode':_0x2dddc6[_0x176ea6(0xc8)],'configName':_0x1d6bc0[_0x176ea6(0xad)],'channelType':_0x1d6bc0[_0x176ea6(0xb2)],'endpointUrl':_0x1d6bc0[_0x176ea6(0xb3)],'channelConfig':_0x1d6bc0[_0x176ea6(0xb1)],'description':_0x1d6bc0['description'],'connectTimeout':_0x1d6bc0[_0x176ea6(0xb7)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x1d6bc0[_0x176ea6(0xcc)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':'config-create','description':'Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','risk':a181_0x312354(0xae),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4729eb){assertSingleNotificationSource(_0x4729eb);},async 'dryRun'(_0x23b419){const _0x19177e=a181_0x312354,_0x2e294a=await prepareCreate(_0x23b419),_0x51ea4a=notificationLookupCommand(_0x23b419['appCode'],_0x2e294a['document'][_0x19177e(0xb2)]);return asDryRunResult({'operation':_0x19177e(0xbe),'selector':{'appCode':_0x23b419[_0x19177e(0xc8)],'configName':_0x2e294a['document'][_0x19177e(0xad)],'channelType':_0x2e294a[_0x19177e(0xb4)]['channelType']},'before':null,'after':_0x2e294a[_0x19177e(0xc3)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x19177e(0xc3),'lookupCommand':_0x51ea4a}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x4064fc){const _0x3c8c87=a181_0x312354,_0x2acd7c=await prepareCreate(_0x4064fc),_0x11c65a=notificationLookupCommand(_0x4064fc[_0x3c8c87(0xc8)],_0x2acd7c[_0x3c8c87(0xb4)][_0x3c8c87(0xb2)]);let _0xa47637;try{_0xa47637=await createNotificationChannelConfig(_0x2acd7c[_0x3c8c87(0xbf)]);}catch(_0x58e0da){if(isPlatformTransportFailure(_0x58e0da))throw notificationError(_0x3c8c87(0xb0),_0x3c8c87(0xbd),'Inspect\x20with\x20'+_0x11c65a+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x3c8c87(0xbe),_0x3c8c87(0xc9),_0x3c8c87(0xb8)+_0x11c65a+_0x3c8c87(0xba));}if(!Number[_0x3c8c87(0xaf)](_0xa47637)||_0xa47637<=0x0)throw notificationError('notification_config_create_outcome_unknown','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Inspect\x20with\x20'+_0x11c65a+_0x3c8c87(0xbc));let _0x39b6e6;try{const _0x2d5c87=await getNotificationChannelConfig(_0xa47637,_0x4064fc[_0x3c8c87(0xc8)]);_0x39b6e6=normalizeExactNotificationConfig(_0x2d5c87,_0xa47637,_0x4064fc[_0x3c8c87(0xc8)]);}catch{throw safeApiFailure(_0x3c8c87(0xbe),_0x3c8c87(0xce),_0x3c8c87(0xb8)+_0x11c65a+_0x3c8c87(0xb5));}return{'ok':!![],'data':{'operation':_0x3c8c87(0xbe),'selector':{'appCode':_0x39b6e6[_0x3c8c87(0xc8)],'id':_0x39b6e6['id'],'configCode':_0x39b6e6[_0x3c8c87(0xc2)],'configName':_0x39b6e6[_0x3c8c87(0xad)],'channelType':_0x39b6e6['channelType']},'before':null,'after':projectNotificationConfig(_0x39b6e6),'dryRun':![],'backend':{'method':_0x3c8c87(0xb6),'path':CREATE_PATH},'warnings':[],'verification':{'status':'verified','lookupCommand':_0x11c65a}},'message':_0x3c8c87(0xc0)+_0x39b6e6['id']};}};function a181_0x15fc(_0x4bd3c9,_0x4839b0){_0x4bd3c9=_0x4bd3c9-0xad;const _0x158866=a181_0x1588();let _0x15fc15=_0x158866[_0x4bd3c9];return _0x15fc15;}function a181_0x1588(){const _0x591500=['Inspect\x20with\x20','43068gjgsjk',';\x20no\x20automatic\x20retry\x20was\x20attempted.','5164940FLaaNp',';\x20do\x20not\x20resubmit.','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','create','input','Created\x20notification\x20config\x20','1046825hqCXEs','configCode','planned','676132vFxDey','15xJBRGa','45EnGJTx','35RfqjOf','appCode','mutation','307256JxXEOK','4903446ohxYaV','readTimeout','9xNuZZO','verification','9160950PayjhX','configName','write','isSafeInteger','notification_config_create_outcome_unknown','channelConfig','channelType','endpointUrl','document',';\x20do\x20not\x20resubmit\x20automatically.','POST','connectTimeout'];a181_0x1588=function(){return _0x591500;};return a181_0x1588();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a182_0x306516=a182_0x11a5;function a182_0x11a5(_0x1d8a2a,_0x532704){_0x1d8a2a=_0x1d8a2a-0x122;const _0x2ed650=a182_0x2ed6();let _0x11a52e=_0x2ed650[_0x1d8a2a];return _0x11a52e;}function a182_0x2ed6(){const _0x3976c0=['297930tnjKaI','36FgtfGI','config-delete','high-risk-write','296981fcGElp','\x20remains\x20present\x20after\x20delete.','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','3477474ouoZQi',';\x20do\x20not\x20resubmit\x20automatically.','132188OSQHry','4WcjoGS','before','planned','unshift','channelType','notification_config_delete_verification_unavailable','notification','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','2500845sJqbxD','notification_config_delete_outcome_unknown','some','delete','252Zhvetm','appCode','25865328xYYAiA','/notification/channel-config/delete','351305twlMcB','Inspect\x20with\x20','8lWzrNv','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','POST','verified','Notification\x20config\x20','184KxtQLB'];a182_0x2ed6=function(){return _0x3976c0;};return a182_0x2ed6();}(function(_0x278239,_0x10003f){const _0x1ccb51=a182_0x11a5,_0x53c42f=_0x278239();while(!![]){try{const _0x14b247=parseInt(_0x1ccb51(0x141))/0x1*(-parseInt(_0x1ccb51(0x137))/0x2)+-parseInt(_0x1ccb51(0x12d))/0x3*(-parseInt(_0x1ccb51(0x125))/0x4)+-parseInt(_0x1ccb51(0x135))/0x5*(parseInt(_0x1ccb51(0x13e))/0x6)+parseInt(_0x1ccb51(0x124))/0x7*(parseInt(_0x1ccb51(0x13c))/0x8)+parseInt(_0x1ccb51(0x131))/0x9*(-parseInt(_0x1ccb51(0x13d))/0xa)+-parseInt(_0x1ccb51(0x122))/0xb+parseInt(_0x1ccb51(0x133))/0xc;if(_0x14b247===_0x10003f)break;else _0x53c42f['push'](_0x53c42f['shift']());}catch(_0x3c741a){_0x53c42f['push'](_0x53c42f['shift']());}}}(a182_0x2ed6,0xa200b));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_0x306516(0x134),REFERENCE_WARNING=a182_0x306516(0x12c);async function prepareDelete(_0x254901){const _0x198afb=a182_0x306516,_0x7a9ebc=readNotificationId(_0x254901),_0x1ce169=await requireExactNotificationConfig(_0x254901['appCode'],_0x7a9ebc,_0x198afb(0x130));return{'id':_0x7a9ebc,'before':_0x1ce169};}export const notificationConfigDelete={'service':a182_0x306516(0x12b),'command':a182_0x306516(0x13f),'description':a182_0x306516(0x143),'risk':a182_0x306516(0x140),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0xc0b946){readNotificationId(_0xc0b946),requireNotificationExplicitYes(_0xc0b946);},async 'dryRun'(_0x91cca5){const _0x50403e=a182_0x306516,_0x428be1=await prepareDelete(_0x91cca5),_0x12e9d9=notificationLookupCommand(_0x91cca5[_0x50403e(0x132)],_0x428be1[_0x50403e(0x126)]['channelType']);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x428be1[_0x50403e(0x126)]),'before':projectNotificationConfig(_0x428be1['before']),'after':null,'dryRun':!![],'backend':{'method':_0x50403e(0x139),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x50403e(0x127),'lookupCommand':_0x12e9d9}},{'method':_0x50403e(0x139),'url':DELETE_PATH});},async 'execute'(_0x235f43){const _0x16697e=a182_0x306516;requireNotificationExplicitYes(_0x235f43);const _0x5caa69=await prepareDelete(_0x235f43),_0x37a5c8=notificationLookupCommand(_0x235f43[_0x16697e(0x132)],_0x5caa69[_0x16697e(0x126)][_0x16697e(0x129)]);let _0x96f8e6=![];try{await deleteNotificationChannelConfig(_0x5caa69['id'],_0x235f43['appCode']);}catch(_0x2be1c6){if(!isPlatformTransportFailure(_0x2be1c6))throw safeApiFailure('delete','mutation',_0x16697e(0x136)+_0x37a5c8+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x96f8e6=!![];}let _0x5a3fc2;try{_0x5a3fc2=await listNotificationChannelConfigs(_0x235f43[_0x16697e(0x132)],_0x5caa69['before'][_0x16697e(0x129)]),validateNotificationDeleteReadback(_0x5a3fc2,_0x235f43[_0x16697e(0x132)],_0x5caa69[_0x16697e(0x126)][_0x16697e(0x129)]);}catch{throw notificationError(_0x96f8e6?_0x16697e(0x12e):_0x16697e(0x12a),_0x16697e(0x13b)+_0x5caa69['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x16697e(0x136)+_0x37a5c8+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x5a3fc2[_0x16697e(0x12f)](_0x5b0676=>_0x5b0676['id']===_0x5caa69['id']))throw notificationError(_0x96f8e6?_0x16697e(0x12e):'notification_config_delete_verification_failed',_0x16697e(0x13b)+_0x5caa69['id']+_0x16697e(0x142),'Inspect\x20with\x20'+_0x37a5c8+_0x16697e(0x123));const _0xff798a=[REFERENCE_WARNING];return _0x96f8e6&&_0xff798a[_0x16697e(0x128)](_0x16697e(0x138)),{'ok':!![],'data':{'operation':_0x16697e(0x130),'selector':notificationSelector(_0x5caa69[_0x16697e(0x126)]),'before':projectNotificationConfig(_0x5caa69[_0x16697e(0x126)]),'after':null,'dryRun':![],'backend':{'method':_0x16697e(0x139),'path':DELETE_PATH},'warnings':_0xff798a,'verification':{'status':_0x16697e(0x13a),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x96f8e6,'lookupCommand':_0x37a5c8}},'message':'Deleted\x20notification\x20config\x20'+_0x5caa69['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a183_0x3cb5bc=a183_0x537e;(function(_0x5a4155,_0x596dd3){const _0x5bb4c9=a183_0x537e,_0x5d963e=_0x5a4155();while(!![]){try{const _0x5ab416=-parseInt(_0x5bb4c9(0x109))/0x1+parseInt(_0x5bb4c9(0xf8))/0x2+-parseInt(_0x5bb4c9(0xf7))/0x3*(-parseInt(_0x5bb4c9(0xfa))/0x4)+-parseInt(_0x5bb4c9(0x10b))/0x5*(-parseInt(_0x5bb4c9(0x110))/0x6)+-parseInt(_0x5bb4c9(0xfd))/0x7+parseInt(_0x5bb4c9(0x10d))/0x8*(parseInt(_0x5bb4c9(0xf5))/0x9)+parseInt(_0x5bb4c9(0x107))/0xa*(-parseInt(_0x5bb4c9(0xfb))/0xb);if(_0x5ab416===_0x596dd3)break;else _0x5d963e['push'](_0x5d963e['shift']());}catch(_0x3bc28b){_0x5d963e['push'](_0x5d963e['shift']());}}}(a183_0x5466,0x49987));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a183_0x5466(){const _0x580e1c=['336423JVAvlw','flat','47490jWDAui','Found\x20','15016CcRvMu','\x20notification\x20config(s)','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','330GthtlG','bool','map','notification','1089GGoABW','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','3NCjxmR','243862dppAvr','Notification\x20channel\x20type','2217364GGVIyF','176giXSLn','boolean','3566003dqLkCg','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','read','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','length','trim','type','all','appCode','config-list','174050wgTKVG','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.'];a183_0x5466=function(){return _0x580e1c;};return a183_0x5466();}function a183_0x537e(_0x420337,_0x38e655){_0x420337=_0x420337-0xf3;const _0x5466f5=a183_0x5466();let _0x537e47=_0x5466f5[_0x420337];return _0x537e47;}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a183_0x3cb5bc(0xf4),'command':a183_0x3cb5bc(0x106),'description':a183_0x3cb5bc(0x10f),'risk':a183_0x3cb5bc(0xff),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':'string','description':a183_0x3cb5bc(0xf9),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a183_0x3cb5bc(0x104),'type':a183_0x3cb5bc(0xfc),'default':![],'description':a183_0x3cb5bc(0xf6)}],async 'validate'(_0x355c6c){const _0x23f2cb=a183_0x3cb5bc;if(_0x355c6c[_0x23f2cb(0x111)](_0x23f2cb(0x104))&&_0x355c6c['str'](_0x23f2cb(0x103))[_0x23f2cb(0x102)]())throw CliErrors['validation'](_0x23f2cb(0x100),_0x23f2cb(0x108));if(_0x355c6c[_0x23f2cb(0x111)](_0x23f2cb(0x104)))return;readNotificationChannelType(_0x355c6c);},async 'execute'(_0x395cd0){const _0x8061fd=a183_0x3cb5bc;if(_0x395cd0[_0x8061fd(0x111)](_0x8061fd(0x104))){const _0x9a6500=await Promise[_0x8061fd(0x104)](NOTIFICATION_CHANNEL_TYPES[_0x8061fd(0xf3)](_0x188aa6=>listNotificationChannelConfigs(_0x395cd0[_0x8061fd(0x105)],_0x188aa6))),_0xe24498=_0x9a6500[_0x8061fd(0x10a)]()[_0x8061fd(0xf3)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x395cd0[_0x8061fd(0x105)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0xe24498['length'],'configs':_0xe24498},'message':'Found\x20'+_0xe24498[_0x8061fd(0x101)]+_0x8061fd(0xfe)};}const _0x29f6e5=readNotificationChannelType(_0x395cd0),_0x3d0f10=await listNotificationChannelConfigs(_0x395cd0[_0x8061fd(0x105)],_0x29f6e5),_0x193610=_0x3d0f10[_0x8061fd(0xf3)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x395cd0[_0x8061fd(0x105)],'channelType':_0x29f6e5,'count':_0x193610['length'],'configs':_0x193610},'message':_0x8061fd(0x10c)+_0x193610['length']+'\x20'+_0x29f6e5+_0x8061fd(0x10e)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a184_0x5c07(_0x52052c,_0x19069){_0x52052c=_0x52052c-0x8c;const _0x47edca=a184_0x47ed();let _0x5c0726=_0x47edca[_0x52052c];return _0x5c0726;}const a184_0x797483=a184_0x5c07;(function(_0x4d65cb,_0x5ea2e6){const _0x281b97=a184_0x5c07,_0xbf4c5=_0x4d65cb();while(!![]){try{const _0x156968=parseInt(_0x281b97(0x99))/0x1*(-parseInt(_0x281b97(0x9d))/0x2)+-parseInt(_0x281b97(0x91))/0x3*(parseInt(_0x281b97(0x94))/0x4)+parseInt(_0x281b97(0xa1))/0x5*(-parseInt(_0x281b97(0xa7))/0x6)+parseInt(_0x281b97(0xae))/0x7*(parseInt(_0x281b97(0xa6))/0x8)+parseInt(_0x281b97(0x96))/0x9+-parseInt(_0x281b97(0x8e))/0xa+parseInt(_0x281b97(0x8f))/0xb*(parseInt(_0x281b97(0x8c))/0xc);if(_0x156968===_0x5ea2e6)break;else _0xbf4c5['push'](_0xbf4c5['shift']());}catch(_0x11f9fb){_0xbf4c5['push'](_0xbf4c5['shift']());}}}(a184_0x47ed,0x8d042));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a184_0x797483(0xa5);async function prepareUpdate(_0x4f1da3){const _0x363a80=a184_0x797483,_0x320c65=readNotificationId(_0x4f1da3),_0x40e688=await readNotificationDocument(_0x4f1da3,'update'),_0xc3067d=await requireExactNotificationConfig(_0x4f1da3['appCode'],_0x320c65,_0x363a80(0x9f));return{'id':_0x320c65,'patch':_0x40e688,'before':_0xc3067d,'payload':mergeUpdateInput(_0xc3067d,_0x40e688),'planned':plannedUpdateProjection(_0xc3067d,_0x40e688)};}export const notificationConfigUpdate={'service':a184_0x797483(0x92),'command':'config-update','description':a184_0x797483(0x98),'risk':a184_0x797483(0x93),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x6f9dd7){readNotificationId(_0x6f9dd7),assertSingleNotificationSource(_0x6f9dd7),requireNotificationExplicitYes(_0x6f9dd7);},async 'dryRun'(_0x58f5ca){const _0x2fc092=a184_0x797483,_0x4852b7=await prepareUpdate(_0x58f5ca),_0xe4742e=notificationLookupCommand(_0x58f5ca[_0x2fc092(0x9c)],_0x4852b7[_0x2fc092(0xb0)][_0x2fc092(0xa3)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x4852b7[_0x2fc092(0xb0)]),'before':projectNotificationConfig(_0x4852b7[_0x2fc092(0xb0)]),'after':_0x4852b7['planned'],'dryRun':!![],'backend':{'method':_0x2fc092(0xb1),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x2fc092(0x90),'lookupCommand':_0xe4742e}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x309fde){const _0x190014=a184_0x797483;requireNotificationExplicitYes(_0x309fde);const _0x2f7ce3=await prepareUpdate(_0x309fde),_0x592981=notificationLookupCommand(_0x309fde[_0x190014(0x9c)],_0x2f7ce3[_0x190014(0xb0)]['channelType']);let _0x32ed57=![];try{await updateNotificationChannelConfig(_0x2f7ce3['payload']);}catch(_0x1585f3){if(!isPlatformTransportFailure(_0x1585f3))throw safeApiFailure(_0x190014(0x9f),_0x190014(0x97),_0x190014(0xa0)+_0x2f7ce3['id']+'\x20with\x20'+_0x592981+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x32ed57=!![];}let _0x5da150;try{const _0x267a31=await getNotificationChannelConfig(_0x2f7ce3['id'],_0x309fde[_0x190014(0x9c)]);_0x5da150=normalizeExactNotificationConfig(_0x267a31,_0x2f7ce3['id'],_0x309fde['appCode']);}catch{throw notificationError(_0x32ed57?_0x190014(0xac):_0x190014(0x95),_0x190014(0xaa)+_0x2f7ce3['id']+_0x190014(0x9e),_0x190014(0xaf)+_0x2f7ce3['id']+'\x20via\x20'+_0x592981+';\x20do\x20not\x20resubmit\x20automatically.');}const _0x15ff68=requestedSafeFieldsMatch(_0x2f7ce3[_0x190014(0xb0)],_0x5da150,_0x2f7ce3[_0x190014(0x8d)]);if(!_0x15ff68['allMatch']||_0x32ed57&&!_0x15ff68[_0x190014(0xa9)])throw notificationError(_0x32ed57?'notification_config_update_outcome_unknown':_0x190014(0xad),_0x190014(0xaa)+_0x2f7ce3['id']+_0x190014(0xa8),_0x190014(0xaf)+_0x2f7ce3['id']+_0x190014(0xa2)+_0x592981+_0x190014(0xa4));const _0x16411a=_0x32ed57?[_0x190014(0xab)]:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x5da150),'before':projectNotificationConfig(_0x2f7ce3['before']),'after':projectNotificationConfig(_0x5da150),'dryRun':![],'backend':{'method':_0x190014(0xb1),'path':UPDATE_PATH},'warnings':_0x16411a,'verification':{'status':_0x190014(0x9b),'recoveredAfterUnknownResponse':_0x32ed57,'verifiedFields':_0x15ff68['verifiedFields'],'lookupCommand':_0x592981}},'message':_0x190014(0x9a)+_0x5da150['id']};}};function a184_0x47ed(){const _0x3a4638=['patch','1506200vekfuH','11143VnzvVK','planned','1699116bWebkZ','notification','high-risk-write','4vVhNDf','notification_config_update_verification_unavailable','4218858MMjrAu','mutation','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','546887ZXvrvF','Updated\x20notification\x20config\x20','verified','appCode','2sOzXWG','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','update','Inspect\x20ID\x20','161675WhXCyO','\x20via\x20','channelType',';\x20do\x20not\x20resubmit\x20automatically.','/notification/channel-config/update','127256aKysFm','90faKxND','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','provesChange','Notification\x20config\x20','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','notification_config_update_outcome_unknown','notification_config_update_verification_failed','497lXwbJv','Inspect\x20with\x20--id\x20','before','POST','8628KwCMku'];a184_0x47ed=function(){return _0x3a4638;};return a184_0x47ed();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xb97d99,_0x4d8ac3){const _0x24c054=a185_0x2fcf,_0x2c2431=_0xb97d99();while(!![]){try{const _0x444fe8=parseInt(_0x24c054(0x188))/0x1+-parseInt(_0x24c054(0x18d))/0x2+parseInt(_0x24c054(0x18b))/0x3+parseInt(_0x24c054(0x187))/0x4*(parseInt(_0x24c054(0x18a))/0x5)+parseInt(_0x24c054(0x189))/0x6+parseInt(_0x24c054(0x18c))/0x7*(-parseInt(_0x24c054(0x185))/0x8)+parseInt(_0x24c054(0x186))/0x9;if(_0x444fe8===_0x4d8ac3)break;else _0x2c2431['push'](_0x2c2431['shift']());}catch(_0x47328e){_0x2c2431['push'](_0x2c2431['shift']());}}}(a185_0x651c,0x25e2d));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a185_0x2fcf(_0x1c2ed2,_0x2b2fd2){_0x1c2ed2=_0x1c2ed2-0x185;const _0x651cea=a185_0x651c();let _0x2fcf50=_0x651cea[_0x1c2ed2];return _0x2fcf50;}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a185_0x651c(){const _0x48772f=['548622nQEeTK','43096XXyXdi','105596BiuCqe','1711974sJVJiY','10GeoWlE','83502MubpXj','205786bUIhLm','280596XtbDNI','56fbUUAh'];a185_0x651c=function(){return _0x48772f;};return a185_0x651c();}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a186_0x4d6ea9=a186_0x1cd6;(function(_0x5c6ca5,_0x289d48){const _0x2c79f8=a186_0x1cd6,_0x460089=_0x5c6ca5();while(!![]){try{const _0x2d1d65=parseInt(_0x2c79f8(0x111))/0x1*(-parseInt(_0x2c79f8(0x9e))/0x2)+-parseInt(_0x2c79f8(0xc5))/0x3*(parseInt(_0x2c79f8(0xf6))/0x4)+parseInt(_0x2c79f8(0xb4))/0x5+-parseInt(_0x2c79f8(0xa3))/0x6*(-parseInt(_0x2c79f8(0xc0))/0x7)+-parseInt(_0x2c79f8(0xbd))/0x8*(parseInt(_0x2c79f8(0xdd))/0x9)+-parseInt(_0x2c79f8(0xcb))/0xa+parseInt(_0x2c79f8(0xa2))/0xb;if(_0x2d1d65===_0x289d48)break;else _0x460089['push'](_0x460089['shift']());}catch(_0x30f7fb){_0x460089['push'](_0x460089['shift']());}}}(a186_0x5b14,0x4411b));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','FEISHU',a186_0x4d6ea9(0xfd),a186_0x4d6ea9(0xa1),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a186_0x4d6ea9(0xac),a186_0x4d6ea9(0xff),'endpointUrl',a186_0x4d6ea9(0xf9),a186_0x4d6ea9(0xe0),a186_0x4d6ea9(0xd2),a186_0x4d6ea9(0xf5)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a186_0x4d6ea9(0x119),a186_0x4d6ea9(0xcc),a186_0x4d6ea9(0xd6)]),EMAIL_RECIPIENT_FIELDS=new Set([a186_0x4d6ea9(0x113),a186_0x4d6ea9(0xe5),a186_0x4d6ea9(0x116),'bccList',a186_0x4d6ea9(0xa7),a186_0x4d6ea9(0xd5),a186_0x4d6ea9(0xe2),'to','cc']);function a186_0x5b14(){const _0xe17566=['Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','createTime','\x20characters.','notification_config_json_invalid','\x20--type\x20','5qHkeqC','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','emailTargets','entries','trim','ccList','Allowed\x20values:\x20','notification_config_channel_field_forbidden','appCode','Create\x20JSON\x20requires\x20field\x20','boolean','Invalid\x20--','endpointUrl:null','notification_config_','name','yes','2630mPeYPy','a\x20string\x20or\x20null','isSafeInteger','WECOM','16092373rAsxUZ','12RgKJPM','\x22channelType\x22.','includes','notification_config_id_invalid','replyTo','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','failed','some','\x20has\x20an\x20invalid\x20channelType.','configName','length','\x20has\x20an\x20invalid\x20appCode.','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','messageTemplate','dry-run','EMAIL','notification_config_source_unavailable','629260cOOdLB','parse','Notification\x20JSON\x20channelConfig\x20field\x20\x22','channelConfigRaw','join','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','a\x20JSON\x20object','Unknown\x20notification\x20JSON\x20field\x20\x22','object','8808RITBTX','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','validation','676592lCWazC','Notification\x20config\x20list\x20item\x20','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x20--format\x20compress','update','30TYBTzG','mutation','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','Notification\x20config\x20','hasOwnProperty','endpointUrl','5165160WslFhJ','configCode','num','endpointUrlRaw','keys','notification_config_field_unknown','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','connectTimeout','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','number','subjectPrefix','channelCode','Item\x20','has','utf8','Invalid\x20notification\x20config\x20response.','environment\x20variable\x20','isArray','3825KLmtBD','kind','str','description','notification_config_field_invalid','fromName','\x20is\x20missing\x20required\x20field\x20\x22','notification_config_field_forbidden','recipients','from-env','notification_config_confirmation_required','every','preflight','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','string','file','create','\x20has\x20invalid\x20field\x20\x22','\x20failed.','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','rabetbase\x20notification\x20config-list\x20--appcode\x20','path','env','bool','readTimeout','204912yZSZvY','Notification\x20JSON\x20field\x20\x22','\x20is\x20invalid.','channelConfig','\x20has\x20an\x20unsupported\x20channelType.','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','push','DINGTALK','Application-level\x20notification\x20config\x20ID','channelType','notification_config_field_required','\x22configName\x22.','notification_config_response_invalid','\x22\x20cannot\x20exceed\x20','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','updateTime','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','stdin','stringify','\x20must\x20be\x20an\x20object.','Notification\x20JSON\x20from\x20','type'];a186_0x5b14=function(){return _0xe17566;};return a186_0x5b14();}export const NOTIFICATION_INPUT_FLAGS=[{'name':a186_0x4d6ea9(0xec),'type':a186_0x4d6ea9(0xeb),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a186_0x4d6ea9(0x107),'type':a186_0x4d6ea9(0x98),'required':![],'default':![],'description':a186_0x4d6ea9(0xb9)},{'name':a186_0x4d6ea9(0xe6),'type':'string','required':![],'description':a186_0x4d6ea9(0xc7)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a186_0x4d6ea9(0xd4),'required':!![],'description':a186_0x4d6ea9(0xfe)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x199f5c,_0x4b7ef7,_0x3109f6){return new CliError(_0x199f5c,0x1,_0x4b7ef7,_0x3109f6);}export function readNotificationId(_0x165c79){const _0x45e3ab=a186_0x4d6ea9,_0x278777=_0x165c79[_0x45e3ab(0xcd)]('id');if(!Number[_0x45e3ab(0xa0)](_0x278777)||_0x278777<=0x0)throw notificationError(_0x45e3ab(0xa6),_0x45e3ab(0xaf));return _0x278777;}export function requireNotificationExplicitYes(_0x2995be){const _0xe9d8ca=a186_0x4d6ea9;if(_0x2995be[_0xe9d8ca(0xf4)](_0xe9d8ca(0xb1))||_0x2995be[_0xe9d8ca(0xf4)](_0xe9d8ca(0x9d)))return;throw notificationError(_0xe9d8ca(0xe7),_0xe9d8ca(0xf0),_0xe9d8ca(0x10c));}export function readNotificationChannelType(_0x1b1777,_0x332049=a186_0x4d6ea9(0x10b),_0x174c3e=a186_0x4d6ea9(0xb2)){const _0x1f0f34=a186_0x4d6ea9,_0x3ffdf8=_0x1b1777[_0x1f0f34(0xdf)](_0x332049)[_0x1f0f34(0x115)]()||_0x174c3e;if(!NOTIFICATION_CHANNEL_TYPES[_0x1f0f34(0xa5)](_0x3ffdf8))throw CliErrors['validation'](_0x1f0f34(0x99)+_0x332049+':\x20'+_0x3ffdf8,_0x1f0f34(0x117)+NOTIFICATION_CHANNEL_TYPES[_0x1f0f34(0xb8)](',\x20')+'.');return _0x3ffdf8;}export function assertSingleNotificationSource(_0x50e2d7){const _0xc5f270=a186_0x4d6ea9,_0x3280c3=[],_0x1daf94=_0x50e2d7[_0xc5f270(0xdf)]('file')['trim']();if(_0x1daf94)_0x3280c3[_0xc5f270(0xfc)]({'kind':_0xc5f270(0xec),'path':_0x1daf94});if(_0x50e2d7[_0xc5f270(0xf4)](_0xc5f270(0x107)))_0x3280c3[_0xc5f270(0xfc)]({'kind':_0xc5f270(0x107)});const _0x4a88e5=_0x50e2d7[_0xc5f270(0xdf)](_0xc5f270(0xe6))[_0xc5f270(0x115)]();if(_0x4a88e5)_0x3280c3['push']({'kind':_0xc5f270(0xf3),'name':_0x4a88e5});if(_0x3280c3[_0xc5f270(0xad)]===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0xc5f270(0xd3));if(_0x3280c3[_0xc5f270(0xad)]>0x1)throw CliErrors[_0xc5f270(0xbf)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0xc5f270(0xd3));return _0x3280c3[0x0];}export async function readNotificationDocument(_0x2ffda2,_0x43e51d){const _0x460c3c=a186_0x4d6ea9,_0x27f5fb=assertSingleNotificationSource(_0x2ffda2),_0x2fd229=_0x27f5fb['kind']===_0x460c3c(0xec)?'file\x20'+_0x27f5fb['path']:_0x27f5fb[_0x460c3c(0xde)]==='env'?_0x460c3c(0xdb)+_0x27f5fb[_0x460c3c(0x9c)]:_0x460c3c(0x107);let _0x1ce640;try{if(_0x27f5fb['kind']==='file')_0x1ce640=await readFile(_0x27f5fb[_0x460c3c(0xf2)],_0x460c3c(0xd9));else{if(_0x27f5fb['kind']===_0x460c3c(0xf3)){if(!(_0x27f5fb[_0x460c3c(0x9c)]in process.env))throw notificationError(_0x460c3c(0xb3),_0x460c3c(0x104)+_0x27f5fb[_0x460c3c(0x9c)]);_0x1ce640=process.env[_0x27f5fb.name]??'';}else _0x1ce640=await readStdin();}}catch(_0xd2ef81){if(_0xd2ef81 instanceof CliError)throw _0xd2ef81;throw notificationError(_0x460c3c(0xb3),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x2fd229+'.');}let _0x4f0f20;try{_0x4f0f20=JSON[_0x460c3c(0xb5)](_0x1ce640);}catch{throw notificationError('notification_config_json_invalid',_0x460c3c(0x10a)+_0x2fd229+_0x460c3c(0xf8),_0x460c3c(0x112));}if(!isJsonObject(_0x4f0f20))throw notificationError(_0x460c3c(0x10f),_0x460c3c(0x10a)+_0x2fd229+_0x460c3c(0x109));return validateNotificationDocument(_0x4f0f20,_0x43e51d);}export function projectNotificationListConfig(_0x4ba984,_0x9ed3f3){const _0x53f72e=a186_0x4d6ea9;return{'id':typeof _0x4ba984['id']===_0x53f72e(0xd4)?_0x4ba984['id']:null,'configCode':requireResponseString(_0x4ba984[_0x53f72e(0xcc)],_0x53f72e(0xcc),_0x9ed3f3),'configName':requireResponseString(_0x4ba984[_0x53f72e(0xac)],_0x53f72e(0xac),_0x9ed3f3),'channelType':requireResponseString(_0x4ba984['channelType'],_0x53f72e(0xff),_0x9ed3f3),'description':normalizeNullableString(_0x4ba984[_0x53f72e(0xe0)]),'createTime':normalizeNullableString(_0x4ba984[_0x53f72e(0x10d)]),'updateTime':normalizeNullableString(_0x4ba984[_0x53f72e(0x105)])};}export function normalizeExactNotificationConfig(_0x4ca538,_0x1ea839,_0x75b860){const _0x149a4a=a186_0x4d6ea9;if(!Number[_0x149a4a(0xa0)](_0x4ca538['id'])||_0x4ca538['id']!==_0x1ea839)throw notificationError(_0x149a4a(0x102),_0x149a4a(0xd1)+_0x1ea839+'.');if(_0x4ca538['appCode']!==_0x75b860)throw notificationError(_0x149a4a(0x102),'Notification\x20config\x20'+_0x1ea839+_0x149a4a(0xc2));const _0x7cc70d=requireExactString(_0x4ca538[_0x149a4a(0xac)],_0x149a4a(0xac),_0x1ea839),_0x2f7623=requireExactString(_0x4ca538['configCode'],_0x149a4a(0xcc),_0x1ea839),_0x1a2d83=requireExactString(_0x4ca538[_0x149a4a(0xff)],_0x149a4a(0xff),_0x1ea839);if(!NOTIFICATION_CHANNEL_TYPES[_0x149a4a(0xa5)](_0x1a2d83))throw notificationError(_0x149a4a(0x102),_0x149a4a(0xc8)+_0x1ea839+_0x149a4a(0xfa));const _0x2a28a3=responseNullableString(_0x4ca538[_0x149a4a(0xca)],_0x149a4a(0xca),_0x1ea839),_0x3200af=responseNullableString(_0x4ca538[_0x149a4a(0xf9)],_0x149a4a(0xf9),_0x1ea839),_0xab0544=responseNullableString(_0x4ca538[_0x149a4a(0xe0)],_0x149a4a(0xe0),_0x1ea839),_0x103c5c=responseNullableTimeout(_0x4ca538['connectTimeout'],_0x149a4a(0xd2),_0x1ea839),_0x3784f1=responseNullableTimeout(_0x4ca538['readTimeout'],_0x149a4a(0xf5),_0x1ea839);return{'id':_0x1ea839,'appCode':_0x75b860,'configCode':_0x2f7623,'configName':_0x7cc70d,'channelType':_0x1a2d83,'endpointUrl':redactSensitive(_0x2a28a3),'channelConfig':redactSensitive(_0x3200af),'description':_0xab0544,'connectTimeout':_0x103c5c,'readTimeout':_0x3784f1,'endpointUrlRaw':_0x2a28a3,'channelConfigRaw':_0x3200af};}export async function requireExactNotificationConfig(_0x23d78d,_0x573288,_0x1c1d6a){const _0x41548d=a186_0x4d6ea9;let _0x5f4320;try{_0x5f4320=await getNotificationChannelConfig(_0x573288,_0x23d78d);}catch{throw safeApiFailure(_0x1c1d6a,_0x41548d(0xe9),_0x41548d(0xea)+_0x23d78d+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x5f4320,_0x573288,_0x23d78d);}function a186_0x1cd6(_0x4e5722,_0x1a41fa){_0x4e5722=_0x4e5722-0x97;const _0x5b1460=a186_0x5b14();let _0x1cd6c5=_0x5b1460[_0x4e5722];return _0x1cd6c5;}export function projectNotificationConfig(_0x592ff4){const _0x3b716f=a186_0x4d6ea9;return{'id':_0x592ff4['id']??null,'appCode':_0x592ff4[_0x3b716f(0x119)],'configCode':_0x592ff4[_0x3b716f(0xcc)]??null,'configName':_0x592ff4[_0x3b716f(0xac)],'channelType':_0x592ff4[_0x3b716f(0xff)],'endpointUrl':redactSensitive(_0x592ff4['endpointUrl']),'channelConfig':redactSensitive(_0x592ff4[_0x3b716f(0xf9)]),'description':_0x592ff4['description']??null,'connectTimeout':_0x592ff4[_0x3b716f(0xd2)]??null,'readTimeout':_0x592ff4[_0x3b716f(0xf5)]??null};}export function notificationSelector(_0xda64b0){const _0x527a0c=a186_0x4d6ea9;return{'appCode':_0xda64b0[_0x527a0c(0x119)],'id':_0xda64b0['id'],'configCode':_0xda64b0[_0x527a0c(0xcc)],'configName':_0xda64b0['configName'],'channelType':_0xda64b0[_0x527a0c(0xff)]};}export function createMutationInput(_0x2c5e35,_0x53f6e1){const _0x3faeb7=a186_0x4d6ea9;return{'appCode':_0x2c5e35,'configName':_0x53f6e1['configName'],'channelType':_0x53f6e1[_0x3faeb7(0xff)],...hasOwn(_0x53f6e1,_0x3faeb7(0xca))?{'endpointUrl':_0x53f6e1[_0x3faeb7(0xca)]}:{},...hasOwn(_0x53f6e1,_0x3faeb7(0xf9))?{'channelConfig':serializeChannelConfig(_0x53f6e1[_0x3faeb7(0xf9)])}:{},...hasOwn(_0x53f6e1,'description')?{'description':_0x53f6e1[_0x3faeb7(0xe0)]}:{},...hasOwn(_0x53f6e1,'connectTimeout')?{'connectTimeout':_0x53f6e1[_0x3faeb7(0xd2)]}:{},...hasOwn(_0x53f6e1,_0x3faeb7(0xf5))?{'readTimeout':_0x53f6e1[_0x3faeb7(0xf5)]}:{}};}export function mergeUpdateInput(_0x131dc0,_0x492292){const _0x5ae3d5=a186_0x4d6ea9;return{'id':_0x131dc0['id'],'appCode':_0x131dc0[_0x5ae3d5(0x119)],'configName':_0x492292['configName']??_0x131dc0[_0x5ae3d5(0xac)],'channelType':_0x492292['channelType']??_0x131dc0[_0x5ae3d5(0xff)],'endpointUrl':hasOwn(_0x492292,_0x5ae3d5(0xca))?_0x492292[_0x5ae3d5(0xca)]:_0x131dc0['endpointUrlRaw'],'channelConfig':hasOwn(_0x492292,_0x5ae3d5(0xf9))?serializeChannelConfig(_0x492292[_0x5ae3d5(0xf9)]):_0x131dc0[_0x5ae3d5(0xb7)],'description':hasOwn(_0x492292,_0x5ae3d5(0xe0))?_0x492292[_0x5ae3d5(0xe0)]:_0x131dc0[_0x5ae3d5(0xe0)],'connectTimeout':hasOwn(_0x492292,_0x5ae3d5(0xd2))?_0x492292['connectTimeout']:_0x131dc0[_0x5ae3d5(0xd2)],'readTimeout':hasOwn(_0x492292,_0x5ae3d5(0xf5))?_0x492292['readTimeout']:_0x131dc0[_0x5ae3d5(0xf5)]};}export function plannedUpdateProjection(_0x279de5,_0x16c509){const _0x1af18a=a186_0x4d6ea9;return projectNotificationConfig({'id':_0x279de5['id'],'appCode':_0x279de5[_0x1af18a(0x119)],'configCode':_0x279de5[_0x1af18a(0xcc)],'configName':_0x16c509[_0x1af18a(0xac)]??_0x279de5['configName'],'channelType':_0x16c509['channelType']??_0x279de5[_0x1af18a(0xff)],'endpointUrl':hasOwn(_0x16c509,'endpointUrl')?_0x16c509[_0x1af18a(0xca)]:_0x279de5['endpointUrlRaw'],'channelConfig':hasOwn(_0x16c509,'channelConfig')?_0x16c509[_0x1af18a(0xf9)]:_0x279de5[_0x1af18a(0xb7)],'description':hasOwn(_0x16c509,'description')?_0x16c509[_0x1af18a(0xe0)]:_0x279de5[_0x1af18a(0xe0)],'connectTimeout':hasOwn(_0x16c509,_0x1af18a(0xd2))?_0x16c509[_0x1af18a(0xd2)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x279de5['connectTimeout'],'readTimeout':hasOwn(_0x16c509,'readTimeout')?_0x16c509[_0x1af18a(0xf5)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x279de5['readTimeout']});}export function requestedSafeFieldsMatch(_0x4bd230,_0x1baf27,_0x3a18fd){const _0x2b7f85=a186_0x4d6ea9,_0x21d665=[],_0x314649=[],_0x14b629=[];for(const _0x2a929e of[_0x2b7f85(0xac),_0x2b7f85(0xff),'description']){if(!hasOwn(_0x3a18fd,_0x2a929e))continue;_0x14b629['push'](_0x2a929e),_0x21d665[_0x2b7f85(0xfc)](_0x1baf27[_0x2a929e]===_0x3a18fd[_0x2a929e]),_0x314649['push'](_0x4bd230[_0x2a929e]!==_0x3a18fd[_0x2a929e]&&_0x1baf27[_0x2a929e]===_0x3a18fd[_0x2a929e]);}for(const _0x29035c of[_0x2b7f85(0xd2),'readTimeout']){if(!hasOwn(_0x3a18fd,_0x29035c))continue;const _0x49e5a4=_0x3a18fd[_0x29035c]??(_0x29035c===_0x2b7f85(0xd2)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x14b629[_0x2b7f85(0xfc)](_0x29035c),_0x21d665[_0x2b7f85(0xfc)](_0x1baf27[_0x29035c]===_0x49e5a4),_0x314649[_0x2b7f85(0xfc)](_0x4bd230[_0x29035c]!==_0x49e5a4&&_0x1baf27[_0x29035c]===_0x49e5a4);}return hasOwn(_0x3a18fd,_0x2b7f85(0xca))&&_0x3a18fd[_0x2b7f85(0xca)]===null&&(_0x14b629[_0x2b7f85(0xfc)](_0x2b7f85(0x9a)),_0x21d665[_0x2b7f85(0xfc)](_0x1baf27[_0x2b7f85(0xce)]===null||_0x1baf27[_0x2b7f85(0xce)]===''),_0x314649[_0x2b7f85(0xfc)](_0x4bd230['endpointUrlRaw']!==null&&_0x4bd230[_0x2b7f85(0xce)]!==''&&(_0x1baf27[_0x2b7f85(0xce)]===null||_0x1baf27['endpointUrlRaw']===''))),{'allMatch':_0x21d665[_0x2b7f85(0xe8)](Boolean),'provesChange':_0x314649[_0x2b7f85(0xaa)](Boolean),'verifiedFields':_0x14b629};}export function validateNotificationDeleteReadback(_0x30d70b,_0x1c0ca3,_0x593903){const _0x1b3339=a186_0x4d6ea9;for(const [_0x26465c,_0x44a8e9]of _0x30d70b[_0x1b3339(0x114)]()){if(!Number[_0x1b3339(0xa0)](_0x44a8e9['id'])||_0x44a8e9['id']<=0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x26465c+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x44a8e9[_0x1b3339(0x119)]!==_0x1c0ca3)throw notificationError(_0x1b3339(0x102),_0x1b3339(0xc1)+(_0x26465c+0x1)+_0x1b3339(0xae));if(_0x44a8e9[_0x1b3339(0xff)]!==_0x593903)throw notificationError(_0x1b3339(0x102),_0x1b3339(0xc1)+(_0x26465c+0x1)+_0x1b3339(0xab));}}export function safeApiFailure(_0x205ae4,_0x335a8a,_0x4842c5){const _0x242407=a186_0x4d6ea9;return notificationError(_0x242407(0x9b)+_0x205ae4+'_'+(_0x335a8a===_0x242407(0xc6)?_0x242407(0xa9):_0x335a8a+'_unavailable'),'Notification\x20config\x20'+_0x205ae4+'\x20'+_0x335a8a+_0x242407(0xef),_0x4842c5);}export function notificationLookupCommand(_0x31ee0d,_0x437578){const _0x1e92e8=a186_0x4d6ea9;return _0x1e92e8(0xf1)+_0x31ee0d+_0x1e92e8(0x110)+_0x437578+_0x1e92e8(0xc3);}function validateNotificationDocument(_0x24e6c6,_0x465851){const _0x37b4a7=a186_0x4d6ea9;for(const _0x4c9fec of Object[_0x37b4a7(0xcf)](_0x24e6c6)){if(FORBIDDEN_IDENTITY_FIELDS[_0x37b4a7(0xd8)](_0x4c9fec))throw notificationError(_0x37b4a7(0xe4),_0x37b4a7(0xf7)+_0x4c9fec+_0x37b4a7(0xa8));if(!ALLOWED_INPUT_FIELDS['has'](_0x4c9fec))throw notificationError(_0x37b4a7(0xd0),_0x37b4a7(0xbb)+_0x4c9fec+'\x22.');}if(_0x465851==='update'&&Object[_0x37b4a7(0xcf)](_0x24e6c6)[_0x37b4a7(0xad)]===0x0)throw notificationError('notification_config_update_empty',_0x37b4a7(0xfb));const _0x47c37e={};if(hasOwn(_0x24e6c6,_0x37b4a7(0xac)))_0x47c37e[_0x37b4a7(0xac)]=validateRequiredString(_0x24e6c6[_0x37b4a7(0xac)],_0x37b4a7(0xac),0x80);else{if(_0x465851==='create')throw notificationError(_0x37b4a7(0x100),_0x37b4a7(0x97)+_0x37b4a7(0x101));}if(hasOwn(_0x24e6c6,_0x37b4a7(0xff))){if(typeof _0x24e6c6[_0x37b4a7(0xff)]!==_0x37b4a7(0xeb))throw invalidFieldType('channelType','a\x20supported\x20string');const _0x2a1303=_0x24e6c6[_0x37b4a7(0xff)][_0x37b4a7(0x115)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x37b4a7(0xa5)](_0x2a1303))throw notificationError(_0x37b4a7(0xe1),_0x37b4a7(0xbe),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x37b4a7(0xb8)](',\x20')+'.');_0x47c37e[_0x37b4a7(0xff)]=_0x2a1303;}else{if(_0x465851===_0x37b4a7(0xed))throw notificationError('notification_config_field_required',_0x37b4a7(0x97)+_0x37b4a7(0xa4));}for(const [_0x338b38,_0x3a8df6]of[[_0x37b4a7(0xca),0x200],[_0x37b4a7(0xe0),0x100]]){if(!hasOwn(_0x24e6c6,_0x338b38))continue;const _0x46eb4f=_0x24e6c6[_0x338b38];if(_0x46eb4f!==null&&typeof _0x46eb4f!=='string')throw invalidFieldType(_0x338b38,_0x37b4a7(0x9f));if(typeof _0x46eb4f===_0x37b4a7(0xeb)&&_0x46eb4f[_0x37b4a7(0xad)]>_0x3a8df6)throw notificationError('notification_config_field_invalid',_0x37b4a7(0xf7)+_0x338b38+_0x37b4a7(0x103)+_0x3a8df6+_0x37b4a7(0x10e));_0x47c37e[_0x338b38]=_0x46eb4f;}if(hasOwn(_0x24e6c6,_0x37b4a7(0xf9))){const _0x3cb0a8=_0x24e6c6['channelConfig'];if(_0x3cb0a8===null&&_0x465851===_0x37b4a7(0xed))throw invalidFieldType(_0x37b4a7(0xf9),_0x37b4a7(0xba));if(_0x3cb0a8!==null&&!isJsonObject(_0x3cb0a8))throw invalidFieldType('channelConfig',_0x465851===_0x37b4a7(0xc4)?'a\x20JSON\x20object\x20or\x20null':_0x37b4a7(0xba));_0x3cb0a8!==null&&validateChannelConfigFields(_0x47c37e[_0x37b4a7(0xff)],_0x3cb0a8),_0x47c37e[_0x37b4a7(0xf9)]=_0x3cb0a8;}for(const _0x1c5551 of[_0x37b4a7(0xd2),_0x37b4a7(0xf5)]){if(!hasOwn(_0x24e6c6,_0x1c5551))continue;const _0x1d7626=_0x24e6c6[_0x1c5551];if(_0x1d7626!==null&&(!Number['isSafeInteger'](_0x1d7626)||_0x1d7626<0x0))throw notificationError('notification_config_field_invalid',_0x37b4a7(0xf7)+_0x1c5551+_0x37b4a7(0x106));_0x47c37e[_0x1c5551]=_0x1d7626;}return _0x47c37e;}function validateRequiredString(_0x196a04,_0x504702,_0x1a7f49){const _0x146869=a186_0x4d6ea9;if(typeof _0x196a04!=='string')throw invalidFieldType(_0x504702,'a\x20non-empty\x20string');const _0x342413=_0x196a04[_0x146869(0x115)]();if(!_0x342413)throw notificationError(_0x146869(0xe1),_0x146869(0xf7)+_0x504702+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x342413[_0x146869(0xad)]>_0x1a7f49)throw notificationError(_0x146869(0xe1),'Notification\x20JSON\x20field\x20\x22'+_0x504702+'\x22\x20cannot\x20exceed\x20'+_0x1a7f49+_0x146869(0x10e));return _0x342413;}function validateChannelConfigFields(_0x5957c8,_0x24e085){const _0x3c3391=a186_0x4d6ea9;if(hasOwn(_0x24e085,_0x3c3391(0xb0)))throw forbiddenChannelConfigField(_0x3c3391(0xb0));if(_0x5957c8==='EMAIL')for(const _0x55c0ab of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x24e085,_0x55c0ab))throw forbiddenChannelConfigField(_0x55c0ab);}}function forbiddenChannelConfigField(_0x226dd0){const _0x2fda82=a186_0x4d6ea9;return notificationError(_0x2fda82(0x118),_0x2fda82(0xb6)+_0x226dd0+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x25baf6,_0x2ac50b){const _0x7c3225=a186_0x4d6ea9;return notificationError(_0x7c3225(0xe1),_0x7c3225(0xf7)+_0x25baf6+'\x22\x20must\x20be\x20'+_0x2ac50b+'.');}function serializeChannelConfig(_0xabaf17){const _0xa5dd9=a186_0x4d6ea9;return _0xabaf17===null||_0xabaf17===undefined?null:JSON[_0xa5dd9(0x108)](_0xabaf17);}function redactSensitive(_0x58deea){return _0x58deea===null||_0x58deea===undefined||_0x58deea===''?null:'<redacted>';}function requireResponseString(_0x340e09,_0x3a208d,_0x3f1cea){const _0x1a49fe=a186_0x4d6ea9;if(typeof _0x340e09!=='string'||_0x340e09[_0x1a49fe(0x115)]()==='')throw CliErrors['apiError'](_0x1a49fe(0xda),_0x1a49fe(0xd7)+(_0x3f1cea+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x3a208d+'\x22.');return _0x340e09[_0x1a49fe(0x115)]();}function requireExactString(_0x35227b,_0x1d7204,_0x779a34){const _0x3d0de6=a186_0x4d6ea9;if(typeof _0x35227b!=='string'||_0x35227b[_0x3d0de6(0x115)]()==='')throw notificationError(_0x3d0de6(0x102),_0x3d0de6(0xc8)+_0x779a34+_0x3d0de6(0xe3)+_0x1d7204+'\x22.');return _0x35227b['trim']();}function responseNullableString(_0x1fccc9,_0x49db5e,_0x105751){const _0x258f55=a186_0x4d6ea9;if(_0x1fccc9===undefined||_0x1fccc9===null)return null;if(typeof _0x1fccc9!==_0x258f55(0xeb))throw notificationError(_0x258f55(0x102),_0x258f55(0xc8)+_0x105751+'\x20has\x20invalid\x20field\x20\x22'+_0x49db5e+'\x22.');return _0x1fccc9;}function responseNullableTimeout(_0x5182f7,_0x148f27,_0x18cc22){const _0x314c0f=a186_0x4d6ea9;if(_0x5182f7===undefined||_0x5182f7===null)return null;if(!Number['isSafeInteger'](_0x5182f7)||_0x5182f7<0x0)throw notificationError(_0x314c0f(0x102),_0x314c0f(0xc8)+_0x18cc22+_0x314c0f(0xee)+_0x148f27+'\x22.');return _0x5182f7;}function normalizeNullableString(_0x3caada){const _0x5635a9=a186_0x4d6ea9;return typeof _0x3caada===_0x5635a9(0xeb)?_0x3caada:null;}function isJsonObject(_0x3036e9){const _0x19c129=a186_0x4d6ea9;return _0x3036e9!==null&&typeof _0x3036e9===_0x19c129(0xbc)&&!Array[_0x19c129(0xdc)](_0x3036e9);}function hasOwn(_0x1a2189,_0x24b137){const _0x288225=a186_0x4d6ea9;return Object['prototype'][_0x288225(0xc9)]['call'](_0x1a2189,_0x24b137);}async function readStdin(){const _0x290f7b=a186_0x4d6ea9;let _0x5adc1c='';process['stdin']['setEncoding']('utf8');for await(const _0x5a1ff7 of process[_0x290f7b(0x107)])_0x5adc1c+=_0x5a1ff7;return _0x5adc1c;}
|
|
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a187_0x615799=a187_0x4d68;(function(_0x2ce9d0,_0x444759){const _0x213b7b=a187_0x4d68,_0x3c3971=_0x2ce9d0();while(!![]){try{const _0x1272f4=-parseInt(_0x213b7b(0x1ae))/0x1*(-parseInt(_0x213b7b(0x1a1))/0x2)+parseInt(_0x213b7b(0x1a3))/0x3*(parseInt(_0x213b7b(0x1aa))/0x4)+-parseInt(_0x213b7b(0x18c))/0x5*(-parseInt(_0x213b7b(0x1b3))/0x6)+-parseInt(_0x213b7b(0x199))/0x7*(parseInt(_0x213b7b(0x19e))/0x8)+-parseInt(_0x213b7b(0x196))/0x9*(parseInt(_0x213b7b(0x1af))/0xa)+-parseInt(_0x213b7b(0x1a9))/0xb+parseInt(_0x213b7b(0x197))/0xc;if(_0x1272f4===_0x444759)break;else _0x3c3971['push'](_0x3c3971['shift']());}catch(_0x410baa){_0x3c3971['push'](_0x3c3971['shift']());}}}(a187_0x2e2d,0x3ee06));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a187_0x2e2d(){const _0x2198c1=['apiError','639KCAObA','10730208zBZREi','/smartapi/ocr/recognize-text?','246932EorpUo','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','filter','invoice','/smartapi/common/uploadFile','104AZpoTq','Publicly\x20accessible\x20image\x20or\x20file\x20URL','.\x20Supported\x20scenes:\x20','120976Guzxmg','imageUrl','6eSVsEU','Table','general','string','POST','Unsupported\x20OCR\x20scene:\x20','3344396eNbIKH','186936Mdqsjn','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','recognize','idcard','4xUCDEn','50610UQCPov','join','validation','/smartapi/common/queryFileUrl','899358tczsuf','File\x20URL\x20response\x20missing\x20fileUrl.','ocr','Preview:\x20recognize\x20','General','fileName','image-url','Invoice','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','fileUrl','image-file','scene','str','GET','imageFile','File\x20upload\x20response\x20missing\x20filePath.','idCard','5BOXgmJ','length','trim','form','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','IdCard','appCode','filePath','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.'];a187_0x2e2d=function(){return _0x2198c1;};return a187_0x2e2d();}const SUPPORTED_SCENES=[a187_0x615799(0x19c),a187_0x615799(0x1a5),a187_0x615799(0x18f),a187_0x615799(0x18b)],SCENE_TO_LEGACY_TYPE={'invoice':a187_0x615799(0x1ba),'general':a187_0x615799(0x1b7),'form':a187_0x615799(0x1a4),'idCard':a187_0x615799(0x191)},SCENE_FLAG={'name':'scene','type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a187_0x615799(0x1bb)},IMAGE_FILE_FLAG={'name':a187_0x615799(0x1bd),'type':a187_0x615799(0x1a6),'description':a187_0x615799(0x19a)},IMAGE_URL_FLAG={'name':a187_0x615799(0x1b9),'type':'string','description':a187_0x615799(0x19f)};function a187_0x4d68(_0x31fa8b,_0x582e2d){_0x31fa8b=_0x31fa8b-0x189;const _0x2e2dc9=a187_0x2e2d();let _0x4d680b=_0x2e2dc9[_0x31fa8b];return _0x4d680b;}function normalizeScene(_0x3b3f0f){const _0x1f7f1f=a187_0x615799,_0x4e4a12=_0x3b3f0f[_0x1f7f1f(0x18e)]()['toLowerCase']();if(_0x4e4a12===_0x1f7f1f(0x1ad))return _0x1f7f1f(0x18b);if(_0x4e4a12===_0x1f7f1f(0x19c)||_0x4e4a12===_0x1f7f1f(0x1a5)||_0x4e4a12==='form')return _0x4e4a12;throw CliErrors[_0x1f7f1f(0x1b1)](_0x1f7f1f(0x1a8)+_0x3b3f0f+_0x1f7f1f(0x1a0)+SUPPORTED_SCENES[_0x1f7f1f(0x1b0)](',\x20'));}function selectedInputs(_0x56aff4){const _0x2bde53=a187_0x615799,_0x3421c6=_0x56aff4['str'](_0x2bde53(0x1bd))[_0x2bde53(0x18e)](),_0x9c7ea8=_0x56aff4[_0x2bde53(0x1bf)](_0x2bde53(0x1b9))['trim']();return{'imageFile':_0x3421c6,'imageUrl':_0x9c7ea8,'count':[_0x3421c6,_0x9c7ea8][_0x2bde53(0x19b)](Boolean)[_0x2bde53(0x18d)]};}function validateInputSelection(_0x5dece6){const _0x5e199d=a187_0x615799,_0x488fbf=selectedInputs(_0x5dece6);if(_0x488fbf['count']!==0x1)throw CliErrors['validation'](_0x5e199d(0x194));return _0x488fbf;}function withScene(_0x312f61,_0x15476f,_0x1b5ae4){const _0x4a7768=a187_0x615799;return{..._0x312f61,'scene':_0x15476f,..._0x1b5ae4?{'sourceFile':{'fileName':_0x1b5ae4[_0x4a7768(0x1b8)],'filePath':_0x1b5ae4[_0x4a7768(0x193)]}}:{}};}const ocrRecognize={'service':a187_0x615799(0x1b5),'command':a187_0x615799(0x1ac),'description':'Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x34375a){const _0x1372bc=a187_0x615799,_0x4e9790=normalizeScene(_0x34375a['str'](_0x1372bc(0x1be))),_0x3475e7=SCENE_TO_LEGACY_TYPE[_0x4e9790],_0x431826=validateInputSelection(_0x34375a);if(_0x431826[_0x1372bc(0x1a2)]){const _0x12ce58=new URLSearchParams({'url':_0x431826[_0x1372bc(0x1a2)],'type':_0x3475e7,'appCode':_0x34375a[_0x1372bc(0x192)]});return{'method':'GET','url':_0x1372bc(0x198)+_0x12ce58['toString'](),'description':_0x1372bc(0x1b6)+_0x4e9790+'\x20OCR\x20from\x20URL'};}const _0x442e2c=requireDevelopmentUploadFile(_0x431826[_0x1372bc(0x189)],_0x1372bc(0x1bd));return{'method':_0x1372bc(0x1a7),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x1372bc(0x1a7),'url':_0x1372bc(0x19d),'body':{'appCode':_0x34375a[_0x1372bc(0x192)],'multipart':{'file':_0x442e2c}}},{'method':_0x1372bc(0x1a7),'url':_0x1372bc(0x1b2),'body':{'filePath':_0x1372bc(0x190),'downloadFlag':![]}},{'method':_0x1372bc(0x1c0),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x34375a['appCode'],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x3475e7}}]},'description':_0x1372bc(0x1ab)+_0x4e9790+'\x20OCR'};},async 'execute'(_0x22f86e){const _0x277200=a187_0x615799,_0x50bdfa=normalizeScene(_0x22f86e['str'](_0x277200(0x1be))),_0x2d8637=SCENE_TO_LEGACY_TYPE[_0x50bdfa],_0x28244b=validateInputSelection(_0x22f86e);if(_0x28244b[_0x277200(0x1a2)]){const _0x3dadf4=await recognizeDevelopmentOcr(_0x22f86e['appCode'],{'url':_0x28244b[_0x277200(0x1a2)],'type':_0x2d8637});return{'ok':!![],'data':withScene(_0x3dadf4,_0x50bdfa)};}const _0x1ef937=requireDevelopmentUploadFile(_0x28244b[_0x277200(0x189)],'image-file'),_0x28c6d7=await uploadDevelopmentFile(_0x22f86e[_0x277200(0x192)],_0x1ef937['path']);if(!_0x28c6d7['filePath'])throw CliErrors[_0x277200(0x195)](_0x277200(0x18a));const _0x3006ef=await queryDevelopmentFileUrl(_0x28c6d7['filePath'],{'download':![]});if(!_0x3006ef[_0x277200(0x1bc)])throw CliErrors[_0x277200(0x195)](_0x277200(0x1b4));const _0x358552=await recognizeDevelopmentOcr(_0x22f86e[_0x277200(0x192)],{'url':_0x3006ef[_0x277200(0x1bc)],'type':_0x2d8637});return{'ok':!![],'data':withScene(_0x358552,_0x50bdfa,_0x28c6d7)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a188_0x2ef1b4=a188_0x122f;(function(_0x542513,_0x5da137){const _0x45d294=a188_0x122f,_0x507632=_0x542513();while(!![]){try{const _0x380d87=parseInt(_0x45d294(0x1da))/0x1*(-parseInt(_0x45d294(0x1d2))/0x2)+-parseInt(_0x45d294(0x1cf))/0x3+-parseInt(_0x45d294(0x1c0))/0x4*(-parseInt(_0x45d294(0x1ed))/0x5)+-parseInt(_0x45d294(0x1d6))/0x6*(-parseInt(_0x45d294(0x1f0))/0x7)+-parseInt(_0x45d294(0x1c7))/0x8*(-parseInt(_0x45d294(0x1c9))/0x9)+-parseInt(_0x45d294(0x1ee))/0xa*(parseInt(_0x45d294(0x1c1))/0xb)+-parseInt(_0x45d294(0x1dc))/0xc*(parseInt(_0x45d294(0x1e1))/0xd);if(_0x380d87===_0x5da137)break;else _0x507632['push'](_0x507632['shift']());}catch(_0x2a44f0){_0x507632['push'](_0x507632['shift']());}}}(a188_0x1a3d,0x959bb));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a188_0x2ef1b4(0x1de),'ONEPAGE',a188_0x2ef1b4(0x1cb)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a188_0x2ef1b4(0x1e4));export const pageCreate={'service':a188_0x2ef1b4(0x1c6),'command':a188_0x2ef1b4(0x1c8),'description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','risk':a188_0x2ef1b4(0x1d8),'defaultOutputFormat':'compress','structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':'page\x20create\x20does\x20not\x20accept\x20--page-type.','hint':a188_0x2ef1b4(0x1e8)},{'name':a188_0x2ef1b4(0x1b9),'message':a188_0x2ef1b4(0x1d4),'hint':a188_0x2ef1b4(0x1f1)}],'flags':[{'name':'name','type':a188_0x2ef1b4(0x1d3),'description':'Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)'},{'name':a188_0x2ef1b4(0x1ce),'type':'number','description':'Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry'},{'name':a188_0x2ef1b4(0x1cd),'type':a188_0x2ef1b4(0x1d3),'description':a188_0x2ef1b4(0x1b7),'enum':CUSTOM_PAGE_PATTERNS},{'name':a188_0x2ef1b4(0x1e2),'type':'string','description':a188_0x2ef1b4(0x1d7)},APPCODE_FLAG],async 'validate'(_0x43e4ae){await readValidatedPageSource(_0x43e4ae);},async 'dryRun'(_0x38f8c3){const _0x3ddbd3=a188_0x2ef1b4,_0x25f3f7=readInput(_0x38f8c3,await readValidatedPageSource(_0x38f8c3));return{'method':_0x3ddbd3(0x1d0),'url':'/smartapi/webcode/page/create','body':{'appCode':_0x25f3f7['appCode'],'pageName':_0x25f3f7['pageName'],..._0x25f3f7[_0x3ddbd3(0x1e7)]!=null?{'parentMenuId':_0x25f3f7['parentMenuId']}:{},'createMenu':_0x25f3f7[_0x3ddbd3(0x1b1)],'codeContent':_0x25f3f7[_0x3ddbd3(0x1b6)]},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON[_0x3ddbd3(0x1ca)](_0x25f3f7[_0x3ddbd3(0x1b5)])+_0x3ddbd3(0x1e9)};},async 'execute'(_0x557d22){const _0x32f79d=a188_0x2ef1b4,_0x307537=readInput(_0x557d22,await readValidatedPageSource(_0x557d22)),_0x46a97f=await createCustomPage(_0x307537);if(!Number[_0x32f79d(0x1bd)](_0x46a97f[_0x32f79d(0x1bc)])||_0x46a97f['pageId']<=0x0)throw CliErrors[_0x32f79d(0x1f2)]('Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.');const _0x37091a=buildCustomPageDevelopmentUrl(_0x307537[_0x32f79d(0x1b0)],_0x46a97f[_0x32f79d(0x1bb)]),_0x4f1796=buildCustomPageEditUrl(_0x307537['appCode'],_0x46a97f[_0x32f79d(0x1bc)]);return{'ok':!![],'data':{'operation':'page.create','pageType':_0x32f79d(0x1ea),'pagePattern':readPagePattern(_0x557d22),'selector':{'appCode':_0x307537[_0x32f79d(0x1b0)],'pageName':_0x307537[_0x32f79d(0x1b5)]},'before':null,'after':{'pageId':_0x46a97f['pageId'],'pageName':_0x46a97f[_0x32f79d(0x1b5)],'appCode':_0x46a97f[_0x32f79d(0x1b0)],'version':_0x46a97f[_0x32f79d(0x1af)],'menuId':_0x46a97f[_0x32f79d(0x1c5)],'menuPath':_0x46a97f[_0x32f79d(0x1bb)],'files':_0x46a97f[_0x32f79d(0x1b6)]??Object[_0x32f79d(0x1b2)](_0x307537[_0x32f79d(0x1b6)])},'dryRun':![],'request':_0x307537,..._0x37091a?{'pageUrl':_0x37091a}:{},..._0x4f1796?{'editPageUrl':_0x4f1796}:{},'warnings':_0x37091a?[]:[_0x32f79d(0x1ba)]},'message':_0x32f79d(0x1e5)+_0x46a97f[_0x32f79d(0x1bc)]+'.'};}};function a188_0x122f(_0x358ede,_0x18437e){_0x358ede=_0x358ede-0x1af;const _0x1a3dfd=a188_0x1a3d();let _0x122fbb=_0x1a3dfd[_0x358ede];return _0x122fbb;}function readPagePattern(_0x1e568e){const _0x507e69=a188_0x2ef1b4,_0x3148b6=_0x1e568e[_0x507e69(0x1cc)](_0x507e69(0x1cd))['trim'](),_0x2d390c=_0x1e568e[_0x507e69(0x1cc)]('page-dir')['trim']();if(_0x3148b6&&_0x2d390c)throw CliErrors['validation'](_0x507e69(0x1bf));if(_0x2d390c)return null;if(!_0x3148b6)throw CliErrors[_0x507e69(0x1d1)](_0x507e69(0x1e0));if(!CUSTOM_PAGE_PATTERNS[_0x507e69(0x1dd)](_0x3148b6))throw CliErrors[_0x507e69(0x1d1)](_0x507e69(0x1d5));return _0x3148b6;}async function readPageSource(_0x445d16){const _0xcec344=a188_0x2ef1b4,_0x2bcf9f=_0x445d16[_0xcec344(0x1cc)]('page-dir')[_0xcec344(0x1b4)](),_0x2ea92f=readPagePattern(_0x445d16);if(_0x2ea92f===null){const _0x3b9181=await readCustomPageDirectory(_0x2bcf9f);if(Object['keys'](_0x3b9181)[_0xcec344(0x1c3)]===0x0)throw CliErrors[_0xcec344(0x1d1)]('--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.');return _0x3b9181;}let _0x19b47f;try{_0x19b47f=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x2ea92f[_0xcec344(0x1c4)]()+_0xcec344(0x1e6)),_0xcec344(0x1ec));}catch{throw CliErrors['validation'](_0xcec344(0x1b8)+_0x2ea92f+'.');}let _0x1f6395;try{_0x1f6395=JSON[_0xcec344(0x1db)](_0x19b47f);}catch{throw CliErrors[_0xcec344(0x1d1)](_0xcec344(0x1e3)+_0x2ea92f+'.');}if(!_0x1f6395||typeof _0x1f6395!==_0xcec344(0x1d9)||Array[_0xcec344(0x1b3)](_0x1f6395)||Object[_0xcec344(0x1df)](_0x1f6395)['some'](_0x244f97=>typeof _0x244f97!==_0xcec344(0x1d3)))throw CliErrors[_0xcec344(0x1d1)]('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x2ea92f+'.');return _0x1f6395;}function a188_0x1a3d(){const _0xbd7ce=['Custom\x20Page\x20pattern\x20not\x20found:\x20','page-content','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','menuPath','pageId','isInteger','num','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','4JHQTqw','59895oPrqLW','name','length','toLowerCase','menuId','page','6895248rQAbHm','create','9RsGsce','stringify','DASHBOARD','str','page-pattern','parent-menu-id','2879646yJJwGL','POST','validation','2rQNdUf','string','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','150tMcQgR','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','write','object','366305CwAYUM','parse','60nrdNxG','includes','BLANK','values','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','2079142tJgWal','page-dir','Invalid\x20Custom\x20Page\x20pattern:\x20','../../../templates/custom-pages','Created\x20Custom\x20Page\x20','.json','parentMenuId','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','\x20and\x20its\x20menu\x20entry.','CUSTOM','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','utf8','4977130mjhlkW','290tArguK','now','290983redhKJ','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','apiError','version','appCode','createMenu','keys','isArray','trim','pageName','files','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)'];a188_0x1a3d=function(){return _0xbd7ce;};return a188_0x1a3d();}async function readValidatedPageSource(_0x142971){const _0x4fd040=await readPageSource(_0x142971);return await validateCustomPageContent(_0x4fd040),_0x4fd040;}function readInput(_0x5aa641,_0x4f612d){const _0x4954b1=a188_0x2ef1b4,_0x2b6d81=_0x5aa641[_0x4954b1(0x1cc)](_0x4954b1(0x1c2))['trim']()||'Custom_page_'+Date[_0x4954b1(0x1ef)]();if(_0x2b6d81[_0x4954b1(0x1c3)]>0x64)throw CliErrors[_0x4954b1(0x1d1)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x46bb7f=_0x5aa641[_0x4954b1(0x1be)]('parent-menu-id',NaN),_0x3cc285=!Number['isNaN'](_0x46bb7f);if(_0x3cc285&&(!Number[_0x4954b1(0x1bd)](_0x46bb7f)||_0x46bb7f<=0x0))throw CliErrors['validation'](_0x4954b1(0x1eb));return{'appCode':_0x5aa641[_0x4954b1(0x1b0)],'pageName':_0x2b6d81,..._0x3cc285?{'parentMenuId':_0x46bb7f}:{},'createMenu':!![],'files':_0x4f612d};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a189_0x4dd5a6=a189_0x28fa;function a189_0x28fa(_0x541014,_0xd266b){_0x541014=_0x541014-0x1ac;const _0x38dfd3=a189_0x38df();let _0x28fac5=_0x38dfd3[_0x541014];return _0x28fac5;}function a189_0x38df(){const _0x2610d1=['str','padStart','page','appCode','custom-detail','getHours','133PRkycW','read','appcode','76qNzSSE','getMonth','27169930DBVsuN','trim','pageCode','2116674MEXlVj','getDate','compress','isNaN','Retrieved\x20Custom\x20Page\x20','getFullYear','2RYfwbL','19254yBZyUa','number','332255nxJowG','getMinutes','cookie','11iObctv','getSeconds','4406439OgICGD','500223OEunfo','join','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','getTime','8930128miPPKt'];a189_0x38df=function(){return _0x2610d1;};return a189_0x38df();}(function(_0xd5833,_0x3dd8c6){const _0x10e424=a189_0x28fa,_0x2b3f43=_0xd5833();while(!![]){try{const _0x327494=parseInt(_0x10e424(0x1af))/0x1*(-parseInt(_0x10e424(0x1c8))/0x2)+parseInt(_0x10e424(0x1ae))/0x3+parseInt(_0x10e424(0x1bd))/0x4*(parseInt(_0x10e424(0x1cb))/0x5)+-parseInt(_0x10e424(0x1c9))/0x6*(parseInt(_0x10e424(0x1ba))/0x7)+parseInt(_0x10e424(0x1b3))/0x8+parseInt(_0x10e424(0x1c2))/0x9+-parseInt(_0x10e424(0x1bf))/0xa*(parseInt(_0x10e424(0x1ac))/0xb);if(_0x327494===_0x3dd8c6)break;else _0x2b3f43['push'](_0x2b3f43['shift']());}catch(_0xd995c1){_0x2b3f43['push'](_0x2b3f43['shift']());}}}(a189_0x38df,0xc4727));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a189_0x4dd5a6(0x1b6),'command':a189_0x4dd5a6(0x1b8),'description':a189_0x4dd5a6(0x1b1),'risk':a189_0x4dd5a6(0x1bb),'defaultOutputFormat':a189_0x4dd5a6(0x1c4),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a189_0x4dd5a6(0x1ca),'required':!![],'description':'Custom\x20Page\x20ID'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3274fd){readCustomPageId(_0x3274fd);},async 'execute'(_0x59f12f){const _0x56b6a4=a189_0x4dd5a6,_0x25c2d7=readCustomPageId(_0x59f12f),_0x1407c7=await getCustomPageSource(_0x25c2d7),{bundle:_0xfa138d,createTime:_0x5b15f2,updateTime:_0x279cc2,..._0x20bcbc}=_0x1407c7,_0x33edcf=_0x1407c7['id']??_0x25c2d7,_0x1d33b4=_0x1407c7[_0x56b6a4(0x1b7)]?.['trim']()||_0x59f12f[_0x56b6a4(0x1b4)](_0x56b6a4(0x1bc))[_0x56b6a4(0x1c0)](),_0x247411=buildCustomPageRuntimeUrl(_0x1d33b4,_0x1407c7[_0x56b6a4(0x1c1)]),_0x148853=buildCustomPageEditUrl(_0x1d33b4,_0x33edcf),_0x27e6d4=await resolveCustomPageDevelopmentUrl(_0x1d33b4,_0x33edcf,_0x59f12f[_0x56b6a4(0x1cd)]);return{'ok':!![],'data':{..._0x20bcbc,..._0x247411?{'runtimePageUrl':_0x247411}:{},..._0x27e6d4?{'pageUrl':_0x27e6d4}:{},..._0x148853?{'editPageUrl':_0x148853}:{},..._0x5b15f2==null?{}:{'createTime':formatTime(_0x5b15f2)},..._0x279cc2==null?{}:{'updateTime':formatTime(_0x279cc2)}},'message':_0x56b6a4(0x1c6)+_0x25c2d7+'.'};}};function formatTime(_0x4ce922){const _0x3281ab=a189_0x4dd5a6,_0x17388a=new Date(_0x4ce922);if(Number[_0x3281ab(0x1c5)](_0x17388a[_0x3281ab(0x1b2)]()))return String(_0x4ce922);const _0x22da9d=[_0x17388a[_0x3281ab(0x1c7)](),String(_0x17388a[_0x3281ab(0x1be)]()+0x1)[_0x3281ab(0x1b5)](0x2,'0'),String(_0x17388a[_0x3281ab(0x1c3)]())[_0x3281ab(0x1b5)](0x2,'0')][_0x3281ab(0x1b0)]('-'),_0x4b26b2=[String(_0x17388a[_0x3281ab(0x1b9)]())[_0x3281ab(0x1b5)](0x2,'0'),String(_0x17388a[_0x3281ab(0x1cc)]())['padStart'](0x2,'0'),String(_0x17388a[_0x3281ab(0x1ad)]())[_0x3281ab(0x1b5)](0x2,'0')][_0x3281ab(0x1b0)](':');return _0x22da9d+'\x20'+_0x4b26b2;}
|