@lovrabet/rabetbase-cli 2.5.4 → 2.5.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/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 +2 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +35 -0
- package/skills/rabetbase-page-generation/references/component-baseline.md +18 -0
- package/skills/rabetbase-page-generation/references/generation.md +77 -0
- package/skills/rabetbase-page-generation/templates/onepage/build.mjs +63 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/index.jsx +4 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/index.jsx +194 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/index.jsx +717 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/editor.jsx +395 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/model.js +141 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/page.css +377 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/record-layout.jsx +90 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/responsive.jsx +70 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/README.md +21 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/index.jsx +4 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/preview.png +0 -0
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a180_0x5f488b=a180_0x5ce2;function a180_0x5272(){const _0x292012=['hash','get','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','path','modelType','childrenIds','resources','pageType','Menu\x20id\x20selector(s)\x20not\x20found:\x20','Response\x20was\x20lost\x20for\x20menu\x20','Menu\x20path\x20selector\x20not\x20found:\x20','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','datasetCode','expectedCount','visibility-update','str','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','POST','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','high-risk-write','validation','expected-count','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','some','600285HyDBeq','rabetbase\x20menu\x20list\x20--format\x20compress','menu_selector_ambiguous','map','plan','true','requestedVisible','message','byId','recovered','url','2693592QDxeuM','Final\x20menu\x20visibility\x20readback\x20failed.','\x20updated,\x20','paths','isArray','label','update\x20visibility\x20for','set','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','50LtVWPu','isSafeInteger','datasetId','Updated\x20visibility\x20for\x20','\x20menu(s);\x20skipped\x20','update-recovery','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','push','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','\x20skipped,\x20','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','\x20must\x20be\x20true\x20or\x20false.','cookie','string','targets','209476cdXiws','8zJKPui','failed','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','false','menu-ids','menu\x20list','childrenCount','/smartapi/menu/update','expect-visible','menu_expected_count_mismatch','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','join','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','flagMissing','values','code','820813fPoXvb','body','number','split','verification','trim','15692gFioKi','129PdcjcE','Would\x20update\x20visibility\x20for\x20','Menu\x20','boolean','sort','visible','menu_verification_failed','updated','menuIds','939719rKyjwy','menu','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Requested\x20menu\x20visibility','\x20menu(s);\x20skip\x20','depth','expectVisible','appCode','menu_selector_not_found','12Wguepk','plannedActions','\x20unchanged\x20menu(s).','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','261142YhQBXp','warnings','update','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','type','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','before','Menu\x20visibility\x20update\x20completed:\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','resourcesValid','beforeById','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','length','Selected\x20','stringify','pageId','update-menu-visibility','update\x20menu\x20visibility','num','parentId','\x20failed.','filter'];a180_0x5272=function(){return _0x292012;};return a180_0x5272();}(function(_0x461fde,_0x5d6c27){const _0x606da7=a180_0x5ce2,_0x2a3464=_0x461fde();while(!![]){try{const _0x1fe36b=parseInt(_0x606da7(0x199))/0x1+-parseInt(_0x606da7(0x1c8))/0x2+-parseInt(_0x606da7(0x1b2))/0x3*(parseInt(_0x606da7(0x1b1))/0x4)+parseInt(_0x606da7(0x1f7))/0x5*(parseInt(_0x606da7(0x1c4))/0x6)+-parseInt(_0x606da7(0x1ab))/0x7*(parseInt(_0x606da7(0x19a))/0x8)+-parseInt(_0x606da7(0x202))/0x9+parseInt(_0x606da7(0x20b))/0xa*(parseInt(_0x606da7(0x1bb))/0xb);if(_0x1fe36b===_0x5d6c27)break;else _0x2a3464['push'](_0x2a3464['shift']());}catch(_0x4c7703){_0x2a3464['push'](_0x2a3464['shift']());}}}(a180_0x5272,0x274a0));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';function a180_0x5ce2(_0x47e5ab,_0x5007b1){_0x47e5ab=_0x47e5ab-0x18d;const _0x5272e7=a180_0x5272();let _0x5ce296=_0x5272e7[_0x47e5ab];return _0x5ce296;}import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a180_0x5f488b(0x1ef),'path':a180_0x5f488b(0x1a1)}];export const menuVisibilityUpdate={'service':a180_0x5f488b(0x1bc),'command':a180_0x5f488b(0x1ec),'description':a180_0x5f488b(0x190),'risk':a180_0x5f488b(0x1f2),'structuredErrors':!![],'flags':[{'name':a180_0x5f488b(0x19e),'type':a180_0x5f488b(0x197),'description':a180_0x5f488b(0x1c7)},{'name':a180_0x5f488b(0x205),'type':a180_0x5f488b(0x197),'description':a180_0x5f488b(0x1ee)},{'name':a180_0x5f488b(0x1b7),'type':a180_0x5f488b(0x1b5),'required':!![],'description':a180_0x5f488b(0x1be)},{'name':a180_0x5f488b(0x1a2),'type':a180_0x5f488b(0x1b5),'description':a180_0x5f488b(0x1cb)},{'name':a180_0x5f488b(0x1f4),'type':a180_0x5f488b(0x1ad),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x182f42){parseInput(_0x182f42),requireExplicitYes(_0x182f42);},async 'dryRun'(_0x182175){const _0x38645f=a180_0x5f488b,_0x3d3b29=await buildPlan(_0x182175,!![]),_0x391be0=_0x3d3b29[_0x38645f(0x1fb)]['plannedActions']?.[_0x38645f(0x1d4)]??0x0,_0x2a9a4f=_0x3d3b29['plan'][_0x38645f(0x198)][_0x38645f(0x1d4)]-_0x391be0;return menuDryRunResult(_0x3d3b29[_0x38645f(0x1fb)],{'method':_0x38645f(0x1ef),'url':_0x38645f(0x1a1),'body':{'updates':_0x3d3b29[_0x38645f(0x1fb)][_0x38645f(0x1c5)]?.[_0x38645f(0x1fa)](_0x21de81=>_0x21de81[_0x38645f(0x1ac)])??[]},'description':_0x38645f(0x1b3)+_0x391be0+_0x38645f(0x1bf)+_0x2a9a4f+_0x38645f(0x1c6)});},async 'execute'(_0x2cd634){const _0x1c5cc3=a180_0x5f488b;requireExplicitYes(_0x2cd634);const _0x149bd5=await buildPlan(_0x2cd634,![]);await recheckMutationSnapshot(_0x2cd634,_0x149bd5['plan'],_0x1c5cc3(0x1d9));const _0x1f6d5f=[],_0x2d56ba=[],_0x80d278=[];for(const _0x11d387 of _0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x198)]){if(_0x11d387['before'][_0x1c5cc3(0x1b7)]===_0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x1fd)]){_0x1f6d5f['push']({'id':_0x11d387['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x2cd634[_0x1c5cc3(0x1c2)],_0x2cd634['cookie'],{'id':_0x11d387['id'],'visible':_0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x1fd)]}),_0x1f6d5f[_0x1c5cc3(0x191)]({'id':_0x11d387['id'],'updated':!![],'skipped':![]});}catch(_0x378286){const _0x47b226=mapMenuApiError(_0x378286,_0x1c5cc3(0x208),_0x11d387['id']);if(isMenuResponseLoss(_0x378286)&&_0x47b226[_0x1c5cc3(0x1aa)]!=='menu_permission_denied'){_0x80d278[_0x1c5cc3(0x191)](_0x11d387['id']);continue;}_0x2d56ba[_0x1c5cc3(0x191)]({'id':_0x11d387['id'],'stage':_0x1c5cc3(0x1ca),'code':_0x47b226[_0x1c5cc3(0x1aa)],'message':_0x47b226[_0x1c5cc3(0x1fe)]});}}let _0x42f8f8;try{_0x42f8f8=await fetchMenuSnapshot(_0x2cd634[_0x1c5cc3(0x1c2)],_0x2cd634[_0x1c5cc3(0x196)]);}catch(_0xbe09a4){const _0x56a7fb=describeMenuErrorCause(_0xbe09a4,'verify\x20menu\x20visibility\x20update'),_0x4b540b=_0x80d278[_0x1c5cc3(0x1fa)](_0x526d02=>({'id':_0x526d02,'stage':'update-recovery','code':_0x1c5cc3(0x1b8),'message':_0x1c5cc3(0x1e7)+_0x526d02+_0x1c5cc3(0x1e0),'requestedStateConfirmed':![],'recovered':![]})),_0x1cab98={'stage':_0x1c5cc3(0x1af),'code':_0x1c5cc3(0x1b8),'message':_0x1c5cc3(0x203),'targetIds':_0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x198)]['map'](_0x36c68f=>_0x36c68f['id']),'requestedStateConfirmed':![],..._0x56a7fb};throw menuFailure(asVerificationError(_0xbe09a4,_0x1c5cc3(0x20a)),_0x149bd5[_0x1c5cc3(0x1fb)],{'stage':_0x1c5cc3(0x1af),'succeeded':_0x1f6d5f,'failedRecords':[..._0x2d56ba,..._0x4b540b,_0x1cab98],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x1c5cc3(0x19b),'recoveredCount':0x0,'lookupCommand':_0x1c5cc3(0x1f8)}});}const _0x46ade6=[];for(const _0x1089ff of _0x1f6d5f){const _0x500ca0=Number(_0x1089ff['id']),_0x3804eb=_0x149bd5[_0x1c5cc3(0x1d2)][_0x1c5cc3(0x1df)](_0x500ca0),_0x42aa06=_0x42f8f8[_0x1c5cc3(0x1ff)][_0x1c5cc3(0x1df)](_0x500ca0);try{verifyVisibilityUpdate(_0x3804eb,_0x42aa06,_0x149bd5['plan'][_0x1c5cc3(0x1fd)]);}catch(_0xbb22c4){const _0x5824ed=asVerificationError(_0xbb22c4,'Menu\x20'+_0x500ca0+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x46ade6[_0x1c5cc3(0x191)]({'id':_0x500ca0,'stage':_0x1c5cc3(0x1af),'code':_0x5824ed['code'],'message':_0x5824ed[_0x1c5cc3(0x1fe)],'requestedStateConfirmed':![]});}}for(const _0x5b019f of _0x80d278){const _0x4f70c3=_0x149bd5[_0x1c5cc3(0x1d2)][_0x1c5cc3(0x1df)](_0x5b019f),_0xc34f35=_0x42f8f8[_0x1c5cc3(0x1ff)][_0x1c5cc3(0x1df)](_0x5b019f);try{verifyVisibilityUpdate(_0x4f70c3,_0xc34f35,_0x149bd5['plan'][_0x1c5cc3(0x1fd)]),_0x1f6d5f[_0x1c5cc3(0x191)]({'id':_0x5b019f,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x5949b2){const _0x2c3ea5=asVerificationError(_0x5949b2,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x5b019f+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x46ade6[_0x1c5cc3(0x191)]({'id':_0x5b019f,'stage':_0x1c5cc3(0x18f),'code':_0x2c3ea5[_0x1c5cc3(0x1aa)],'message':_0x2c3ea5[_0x1c5cc3(0x1fe)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x46ade6[_0x1c5cc3(0x1d4)]>0x0){const _0x24d199=_0x46ade6[_0x1c5cc3(0x1fa)](_0x57608d=>Number(_0x57608d['id'])),_0x4bdf26=_0x1f6d5f[_0x1c5cc3(0x1dd)](_0x247a71=>_0x247a71[_0x1c5cc3(0x200)]===!![])[_0x1c5cc3(0x1d4)],_0x2fea05=menuError(_0x1c5cc3(0x1b8),_0x1c5cc3(0x1a5)+_0x24d199[_0x1c5cc3(0x1a6)](',\x20')+'.',_0x1c5cc3(0x1f0));throw menuFailure(_0x2fea05,_0x149bd5[_0x1c5cc3(0x1fb)],{'stage':_0x1c5cc3(0x1af),'succeeded':_0x1f6d5f,'failedRecords':[..._0x2d56ba,..._0x46ade6],'warnings':[_0x1c5cc3(0x19c)],'verification':{'status':_0x1c5cc3(0x19b),..._0x24d199[_0x1c5cc3(0x1d4)]===0x1?{'targetId':_0x24d199[0x0]}:{'targetIds':_0x24d199},'recoveredCount':_0x4bdf26,'lookupCommand':_0x1c5cc3(0x1f8)}});}const _0x3da9d2=_0x1f6d5f[_0x1c5cc3(0x1dd)](_0x366058=>_0x366058[_0x1c5cc3(0x1b9)]===!![])['length'],_0x3b63e9=_0x1f6d5f[_0x1c5cc3(0x1d4)]-_0x3da9d2,_0x30c733={..._0x149bd5[_0x1c5cc3(0x1fb)],'succeeded':_0x1f6d5f,'failed':_0x2d56ba,'warnings':_0x2d56ba[_0x1c5cc3(0x1d4)]>0x0?[..._0x149bd5[_0x1c5cc3(0x1fb)][_0x1c5cc3(0x1c9)],_0x1c5cc3(0x1f5)]:_0x149bd5[_0x1c5cc3(0x1fb)]['warnings'],'verification':{'checkedBy':_0x1c5cc3(0x19f),'snapshotHash':_0x42f8f8[_0x1c5cc3(0x1de)],'matchesRequestedState':_0x2d56ba[_0x1c5cc3(0x1d4)]===0x0,'recoveredCount':_0x80d278[_0x1c5cc3(0x1d4)]}};return{'ok':_0x2d56ba[_0x1c5cc3(0x1d4)]===0x0,'data':_0x30c733,'message':_0x2d56ba['length']===0x0?_0x1c5cc3(0x18d)+_0x3da9d2+_0x1c5cc3(0x18e)+_0x3b63e9+_0x1c5cc3(0x1c6):_0x1c5cc3(0x1cf)+_0x3da9d2+_0x1c5cc3(0x204)+_0x3b63e9+_0x1c5cc3(0x193)+_0x2d56ba[_0x1c5cc3(0x1d4)]+_0x1c5cc3(0x1dc)};}};function parseInput(_0x3d30f0){const _0x3176ed=a180_0x5f488b,_0x5632ca=parseMenuIds(_0x3d30f0['str']('menu-ids')),_0x507e78=parseCsv(_0x3d30f0[_0x3176ed(0x1ed)]('paths'));if(_0x5632ca[_0x3176ed(0x1d4)]===0x0&&_0x507e78[_0x3176ed(0x1d4)]===0x0)throw CliErrors[_0x3176ed(0x1f3)](_0x3176ed(0x194));const _0x407c16=parseBooleanFlag(_0x3d30f0,'visible',!![]),_0x31a1a9=parseBooleanFlag(_0x3d30f0,_0x3176ed(0x1a2),![]);let _0x5df37a;if(hasFlag(_0x3d30f0,_0x3176ed(0x1f4))){_0x5df37a=_0x3d30f0[_0x3176ed(0x1da)](_0x3176ed(0x1f4));if(!Number[_0x3176ed(0x20c)](_0x5df37a)||_0x5df37a<0x0)throw CliErrors[_0x3176ed(0x1f3)](_0x3176ed(0x1bd));}return{'menuIds':_0x5632ca,'paths':_0x507e78,'visible':_0x407c16,'expectVisible':_0x31a1a9,'expectedCount':_0x5df37a};}async function buildPlan(_0x57aff7,_0x4785fb){const _0x42cfa9=a180_0x5f488b,_0x5781aa=parseInput(_0x57aff7),_0x15bdfa=await fetchMutationSnapshot(_0x57aff7,_0x42cfa9(0x1d9)),_0x246f0f=selectTargets(_0x15bdfa['menus'],_0x5781aa[_0x42cfa9(0x1ba)],_0x5781aa['paths']);if(_0x5781aa[_0x42cfa9(0x1eb)]!==undefined&&_0x246f0f[_0x42cfa9(0x1d4)]!==_0x5781aa[_0x42cfa9(0x1eb)])throw menuError(_0x42cfa9(0x1a3),_0x42cfa9(0x1d5)+_0x246f0f['length']+'\x20menu(s),\x20expected\x20'+_0x5781aa[_0x42cfa9(0x1eb)]+'.',_0x42cfa9(0x1cd));if(_0x5781aa[_0x42cfa9(0x1c1)]!==undefined){const _0x1b15c3=_0x246f0f[_0x42cfa9(0x1dd)](_0x174aed=>_0x174aed[_0x42cfa9(0x1b7)]!==_0x5781aa[_0x42cfa9(0x1c1)]);if(_0x1b15c3[_0x42cfa9(0x1d4)]>0x0)throw menuError('menu_state_drift',_0x42cfa9(0x1a7)+_0x1b15c3['map'](_0x27f2f2=>_0x27f2f2['id'])['join'](',\x20')+'.',_0x42cfa9(0x1d0));}const _0x379506=_0x246f0f[_0x42cfa9(0x1fa)](_0x54d057=>({'id':_0x54d057['id'],'label':_0x54d057[_0x42cfa9(0x207)],'path':_0x54d057[_0x42cfa9(0x1e1)],'before':{'visible':_0x54d057['visible']},'after':{'visible':_0x5781aa['visible']}})),_0x3a7553=_0x379506[_0x42cfa9(0x1dd)](_0x27b181=>_0x27b181[_0x42cfa9(0x1ce)][_0x42cfa9(0x1b7)]!==_0x5781aa['visible'])[_0x42cfa9(0x1fa)](_0x3179b6=>({'stage':_0x42cfa9(0x1d8),'method':'POST','path':_0x42cfa9(0x1a1),'body':{'appCode':_0x57aff7[_0x42cfa9(0x1c2)],'id':_0x3179b6['id'],'visible':_0x5781aa[_0x42cfa9(0x1b7)]}})),_0x55c033=mutationResult({'operation':_0x42cfa9(0x1ec),'selector':{'menuIds':_0x5781aa['menuIds'],'paths':_0x5781aa['paths']},'before':{'menus':_0x246f0f[_0x42cfa9(0x1fa)](_0x13c63e=>({'id':_0x13c63e['id'],'path':_0x13c63e['path'],'visible':_0x13c63e['visible']}))},'after':{'menus':_0x246f0f[_0x42cfa9(0x1fa)](_0x230138=>({'id':_0x230138['id'],'path':_0x230138[_0x42cfa9(0x1e1)],'visible':_0x5781aa['visible']}))},'dryRun':_0x4785fb,'backend':[...BACKEND],'plannedActions':_0x3a7553,'snapshotHash':_0x15bdfa['hash'],'warnings':_0x3a7553[_0x42cfa9(0x1d4)]===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0x55c033,'requestedVisible':_0x5781aa[_0x42cfa9(0x1b7)],'targets':_0x379506},'beforeById':new Map(_0x246f0f[_0x42cfa9(0x1fa)](_0x3f9a05=>[_0x3f9a05['id'],_0x3f9a05]))};}function selectTargets(_0x43b413,_0x2b73d9,_0xf86d63){const _0x120f10=a180_0x5f488b,_0x59ca40=new Map(_0x43b413[_0x120f10(0x1fa)](_0x447673=>[_0x447673['id'],_0x447673])),_0x2b2e09=new Map(),_0x3fc3d5=_0x2b73d9[_0x120f10(0x1dd)](_0x17bd47=>!_0x59ca40['has'](_0x17bd47));if(_0x3fc3d5[_0x120f10(0x1d4)]>0x0)throw menuError(_0x120f10(0x1c3),_0x120f10(0x1e6)+_0x3fc3d5[_0x120f10(0x1a6)](',\x20')+'.',_0x120f10(0x1a4));for(const _0x4222a6 of _0x2b73d9){_0x2b2e09['set'](_0x4222a6,_0x59ca40[_0x120f10(0x1df)](_0x4222a6));}for(const _0x40c00b of _0xf86d63){const _0x140d93=_0x43b413['filter'](_0x14433d=>_0x14433d['path']===_0x40c00b);if(_0x140d93[_0x120f10(0x1d4)]===0x0)throw menuError(_0x120f10(0x1c3),_0x120f10(0x1e8)+JSON['stringify'](_0x40c00b)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x140d93[_0x120f10(0x1d4)]>0x1)throw menuError(_0x120f10(0x1f9),_0x120f10(0x192)+JSON[_0x120f10(0x1d6)](_0x40c00b)+'.',_0x120f10(0x1e9)+_0x140d93['map'](_0x3736bb=>_0x3736bb['id'])['join'](',\x20')+'.');const _0x4011f5=_0x140d93[0x0];_0x2b2e09[_0x120f10(0x209)](_0x4011f5['id'],_0x4011f5);}return[..._0x2b2e09[_0x120f10(0x1a9)]()];}function parseMenuIds(_0x443288){const _0x19439c=a180_0x5f488b,_0x2de016=parseCsv(_0x443288),_0x4f4db9=_0x2de016[_0x19439c(0x1fa)](Number);if(_0x4f4db9[_0x19439c(0x1f6)](_0x482c6b=>!Number[_0x19439c(0x20c)](_0x482c6b)||_0x482c6b<=0x0))throw CliErrors['validation'](_0x19439c(0x1f1));return[...new Set(_0x4f4db9)];}function parseCsv(_0x164021){const _0xcdba5=a180_0x5f488b;return[...new Set(_0x164021[_0xcdba5(0x1ae)](',')[_0xcdba5(0x1fa)](_0x492c5b=>_0x492c5b[_0xcdba5(0x1b0)]())[_0xcdba5(0x1dd)](Boolean))];}function parseBooleanFlag(_0x2fd715,_0x501f2d,_0x25b137){const _0x53cff3=a180_0x5f488b;if(!hasFlag(_0x2fd715,_0x501f2d)){if(_0x25b137)throw CliErrors[_0x53cff3(0x1a8)](_0x501f2d);return undefined;}const _0x8dd4d4=_0x2fd715['rawFlags'][_0x501f2d];if(_0x8dd4d4===!![]||_0x8dd4d4===![])return _0x8dd4d4;if(_0x8dd4d4===_0x53cff3(0x1fc))return!![];if(_0x8dd4d4===_0x53cff3(0x19d))return![];throw CliErrors[_0x53cff3(0x1f3)]('--'+_0x501f2d+_0x53cff3(0x195));}function verifyVisibilityUpdate(_0x4d591a,_0x3d67ce,_0x1aa0a1){const _0x521f2f=a180_0x5f488b;assertVerified(!!_0x3d67ce,'Menu\x20'+_0x4d591a['id']+_0x521f2f(0x1d3)),assertVerified(_0x3d67ce[_0x521f2f(0x1b7)]===_0x1aa0a1,'Menu\x20'+_0x4d591a['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x252051=[['id',_0x3d67ce['id'],_0x4d591a['id']],[_0x521f2f(0x1db),_0x3d67ce['parentId'],_0x4d591a[_0x521f2f(0x1db)]],[_0x521f2f(0x1c0),_0x3d67ce[_0x521f2f(0x1c0)],_0x4d591a[_0x521f2f(0x1c0)]],['label',_0x3d67ce[_0x521f2f(0x207)],_0x4d591a['label']],[_0x521f2f(0x1e1),_0x3d67ce[_0x521f2f(0x1e1)],_0x4d591a[_0x521f2f(0x1e1)]],[_0x521f2f(0x201),_0x3d67ce[_0x521f2f(0x201)],_0x4d591a[_0x521f2f(0x201)]],[_0x521f2f(0x1cc),_0x3d67ce['type'],_0x4d591a['type']],[_0x521f2f(0x1b6),_0x3d67ce[_0x521f2f(0x1b6)],_0x4d591a[_0x521f2f(0x1b6)]],[_0x521f2f(0x1e4),_0x3d67ce[_0x521f2f(0x1e4)],_0x4d591a['resources']],['resourcesValid',_0x3d67ce[_0x521f2f(0x1d1)],_0x4d591a[_0x521f2f(0x1d1)]],[_0x521f2f(0x1e3),_0x3d67ce[_0x521f2f(0x1e3)],_0x4d591a['childrenIds']],[_0x521f2f(0x1a0),_0x3d67ce['childrenCount'],_0x4d591a[_0x521f2f(0x1a0)]],[_0x521f2f(0x1d7),_0x3d67ce[_0x521f2f(0x1d7)],_0x4d591a[_0x521f2f(0x1d7)]],[_0x521f2f(0x1e5),_0x3d67ce[_0x521f2f(0x1e5)],_0x4d591a[_0x521f2f(0x1e5)]],['modelType',_0x3d67ce[_0x521f2f(0x1e2)],_0x4d591a[_0x521f2f(0x1e2)]],['datasetId',_0x3d67ce[_0x521f2f(0x20d)],_0x4d591a[_0x521f2f(0x20d)]],[_0x521f2f(0x1ea),_0x3d67ce[_0x521f2f(0x1ea)],_0x4d591a[_0x521f2f(0x1ea)]]];for(const [_0x45f278,_0x34d223,_0x47b8c5]of _0x252051){assertVerified(sameValue(_0x34d223,_0x47b8c5),_0x521f2f(0x1b4)+_0x4d591a['id']+'\x20'+_0x45f278+'\x20changed\x20unexpectedly.');}}function sameValue(_0x56ec98,_0xd07f8){const _0x165b45=a180_0x5f488b;if(Array[_0x165b45(0x206)](_0x56ec98)||Array['isArray'](_0xd07f8))return JSON['stringify'](_0x56ec98)===JSON['stringify'](_0xd07f8);return _0x56ec98===_0xd07f8;}
|
|
1
|
+
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 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a181_0x228e(){const _0x1a6a59=['Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','107056PGGBmp','create','endpointUrl','config-create','notification_config_create_outcome_unknown','Inspect\x20with\x20','write','document','notification','readTimeout','mutation','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','channelType','14GijOEt','isSafeInteger','2488TcqjKU','277551MAtEcQ','input','10CUVsNL',';\x20no\x20automatic\x20retry\x20was\x20attempted.','planned','102036uyiIan','verified','channelConfig','POST','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','appCode','310XHhSfl','4457904ROOzHx',';\x20do\x20not\x20resubmit.','verification','configName','942036pjAjdT','Created\x20notification\x20config\x20','889017YUtcMM','48gngZTO'];a181_0x228e=function(){return _0x1a6a59;};return a181_0x228e();}function a181_0x3c8b(_0x353092,_0x424a4d){_0x353092=_0x353092-0xe4;const _0x228e4f=a181_0x228e();let _0x3c8b49=_0x228e4f[_0x353092];return _0x3c8b49;}const a181_0x39169c=a181_0x3c8b;(function(_0x56b121,_0x5e5f42){const _0x1222cd=a181_0x3c8b,_0x1a632d=_0x56b121();while(!![]){try{const _0x14fcac=-parseInt(_0x1222cd(0xe4))/0x1+-parseInt(_0x1222cd(0xf4))/0x2+parseInt(_0x1222cd(0xf1))/0x3+parseInt(_0x1222cd(0x103))/0x4*(-parseInt(_0x1222cd(0xea))/0x5)+parseInt(_0x1222cd(0xef))/0x6*(parseInt(_0x1222cd(0x101))/0x7)+-parseInt(_0x1222cd(0xf2))/0x8*(-parseInt(_0x1222cd(0x104))/0x9)+parseInt(_0x1222cd(0x106))/0xa*(-parseInt(_0x1222cd(0xeb))/0xb);if(_0x14fcac===_0x5e5f42)break;else _0x1a632d['push'](_0x1a632d['shift']());}catch(_0x596512){_0x1a632d['push'](_0x1a632d['shift']());}}}(a181_0x228e,0x2fd99));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(_0x1b0472){const _0x177686=a181_0x3c8b,_0x50ccc8=await readNotificationDocument(_0x1b0472,'create'),_0x3affd2=createMutationInput(_0x1b0472[_0x177686(0xe9)],_0x50ccc8);return{'document':_0x50ccc8,'input':_0x3affd2,'planned':projectNotificationConfig({'appCode':_0x1b0472[_0x177686(0xe9)],'configName':_0x50ccc8[_0x177686(0xee)],'channelType':_0x50ccc8[_0x177686(0x100)],'endpointUrl':_0x50ccc8[_0x177686(0xf6)],'channelConfig':_0x50ccc8[_0x177686(0xe6)],'description':_0x50ccc8['description'],'connectTimeout':_0x50ccc8['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x50ccc8[_0x177686(0xfd)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a181_0x39169c(0xfc),'command':a181_0x39169c(0xf7),'description':a181_0x39169c(0xe8),'risk':a181_0x39169c(0xfa),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x249a0b){assertSingleNotificationSource(_0x249a0b);},async 'dryRun'(_0x1f5efd){const _0x3f63db=a181_0x39169c,_0x1da5b7=await prepareCreate(_0x1f5efd),_0x110527=notificationLookupCommand(_0x1f5efd[_0x3f63db(0xe9)],_0x1da5b7['document'][_0x3f63db(0x100)]);return asDryRunResult({'operation':_0x3f63db(0xf5),'selector':{'appCode':_0x1f5efd[_0x3f63db(0xe9)],'configName':_0x1da5b7['document']['configName'],'channelType':_0x1da5b7[_0x3f63db(0xfb)][_0x3f63db(0x100)]},'before':null,'after':_0x1da5b7[_0x3f63db(0x108)],'dryRun':!![],'backend':{'method':_0x3f63db(0xe7),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3f63db(0x108),'lookupCommand':_0x110527}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x5678f1){const _0x46e190=a181_0x39169c,_0x26c44c=await prepareCreate(_0x5678f1),_0x30aef3=notificationLookupCommand(_0x5678f1[_0x46e190(0xe9)],_0x26c44c[_0x46e190(0xfb)][_0x46e190(0x100)]);let _0x269ac6;try{_0x269ac6=await createNotificationChannelConfig(_0x26c44c[_0x46e190(0x105)]);}catch(_0x5e9af2){if(isPlatformTransportFailure(_0x5e9af2))throw notificationError(_0x46e190(0xf8),_0x46e190(0xf3),_0x46e190(0xf9)+_0x30aef3+_0x46e190(0xec));throw safeApiFailure(_0x46e190(0xf5),_0x46e190(0xfe),_0x46e190(0xf9)+_0x30aef3+_0x46e190(0x107));}if(!Number[_0x46e190(0x102)](_0x269ac6)||_0x269ac6<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x46e190(0xff),'Inspect\x20with\x20'+_0x30aef3+_0x46e190(0xec));let _0x540e7d;try{const _0x246381=await getNotificationChannelConfig(_0x269ac6,_0x5678f1['appCode']);_0x540e7d=normalizeExactNotificationConfig(_0x246381,_0x269ac6,_0x5678f1[_0x46e190(0xe9)]);}catch{throw safeApiFailure(_0x46e190(0xf5),_0x46e190(0xed),'Inspect\x20with\x20'+_0x30aef3+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x46e190(0xf5),'selector':{'appCode':_0x540e7d[_0x46e190(0xe9)],'id':_0x540e7d['id'],'configCode':_0x540e7d['configCode'],'configName':_0x540e7d['configName'],'channelType':_0x540e7d[_0x46e190(0x100)]},'before':null,'after':projectNotificationConfig(_0x540e7d),'dryRun':![],'backend':{'method':_0x46e190(0xe7),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x46e190(0xe5),'lookupCommand':_0x30aef3}},'message':_0x46e190(0xf0)+_0x540e7d['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a182_0xe56ccd=a182_0x535b;(function(_0x1cfdb3,_0x3091de){const _0x1ff7db=a182_0x535b,_0x40ca2d=_0x1cfdb3();while(!![]){try{const _0x4be6f8=-parseInt(_0x1ff7db(0x1df))/0x1+parseInt(_0x1ff7db(0x1e5))/0x2*(-parseInt(_0x1ff7db(0x1eb))/0x3)+-parseInt(_0x1ff7db(0x1f0))/0x4+parseInt(_0x1ff7db(0x1da))/0x5+-parseInt(_0x1ff7db(0x1d8))/0x6+parseInt(_0x1ff7db(0x1dd))/0x7*(-parseInt(_0x1ff7db(0x1e0))/0x8)+parseInt(_0x1ff7db(0x1ed))/0x9*(parseInt(_0x1ff7db(0x1f5))/0xa);if(_0x4be6f8===_0x3091de)break;else _0x40ca2d['push'](_0x40ca2d['shift']());}catch(_0xdc1397){_0x40ca2d['push'](_0x40ca2d['shift']());}}}(a182_0x3c7f,0xc29e4));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';function a182_0x535b(_0x4c1a9b,_0xd81587){_0x4c1a9b=_0x4c1a9b-0x1d8;const _0x3c7f12=a182_0x3c7f();let _0x535b70=_0x3c7f12[_0x4c1a9b];return _0x535b70;}const DELETE_PATH=a182_0xe56ccd(0x1f1),REFERENCE_WARNING=a182_0xe56ccd(0x1e7);async function prepareDelete(_0x4778e6){const _0xad1be5=a182_0xe56ccd,_0x35dda6=readNotificationId(_0x4778e6),_0x12833b=await requireExactNotificationConfig(_0x4778e6[_0xad1be5(0x1f6)],_0x35dda6,_0xad1be5(0x1e6));return{'id':_0x35dda6,'before':_0x12833b};}export const notificationConfigDelete={'service':'notification','command':a182_0xe56ccd(0x1de),'description':a182_0xe56ccd(0x1ef),'risk':a182_0xe56ccd(0x1f2),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x412c0a){readNotificationId(_0x412c0a),requireNotificationExplicitYes(_0x412c0a);},async 'dryRun'(_0x1d1833){const _0x370a13=a182_0xe56ccd,_0x550aa3=await prepareDelete(_0x1d1833),_0x59bab6=notificationLookupCommand(_0x1d1833[_0x370a13(0x1f6)],_0x550aa3['before'][_0x370a13(0x1e2)]);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x550aa3[_0x370a13(0x1dc)]),'before':projectNotificationConfig(_0x550aa3['before']),'after':null,'dryRun':!![],'backend':{'method':_0x370a13(0x1f3),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x370a13(0x1f4),'lookupCommand':_0x59bab6}},{'method':_0x370a13(0x1f3),'url':DELETE_PATH});},async 'execute'(_0x8e4bdc){const _0x46315c=a182_0xe56ccd;requireNotificationExplicitYes(_0x8e4bdc);const _0x194cda=await prepareDelete(_0x8e4bdc),_0x2aad13=notificationLookupCommand(_0x8e4bdc[_0x46315c(0x1f6)],_0x194cda[_0x46315c(0x1dc)][_0x46315c(0x1e2)]);let _0x32b70d=![];try{await deleteNotificationChannelConfig(_0x194cda['id'],_0x8e4bdc[_0x46315c(0x1f6)]);}catch(_0x2f7141){if(!isPlatformTransportFailure(_0x2f7141))throw safeApiFailure('delete',_0x46315c(0x1e9),_0x46315c(0x1d9)+_0x2aad13+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x32b70d=!![];}let _0x25b5c3;try{_0x25b5c3=await listNotificationChannelConfigs(_0x8e4bdc['appCode'],_0x194cda[_0x46315c(0x1dc)]['channelType']),validateNotificationDeleteReadback(_0x25b5c3,_0x8e4bdc[_0x46315c(0x1f6)],_0x194cda[_0x46315c(0x1dc)][_0x46315c(0x1e2)]);}catch{throw notificationError(_0x32b70d?_0x46315c(0x1e1):'notification_config_delete_verification_unavailable',_0x46315c(0x1e4)+_0x194cda['id']+_0x46315c(0x1ee),_0x46315c(0x1d9)+_0x2aad13+_0x46315c(0x1e8));}if(_0x25b5c3[_0x46315c(0x1db)](_0x4c9517=>_0x4c9517['id']===_0x194cda['id']))throw notificationError(_0x32b70d?_0x46315c(0x1e1):'notification_config_delete_verification_failed',_0x46315c(0x1e4)+_0x194cda['id']+'\x20remains\x20present\x20after\x20delete.',_0x46315c(0x1d9)+_0x2aad13+_0x46315c(0x1e8));const _0x5f5c8f=[REFERENCE_WARNING];return _0x32b70d&&_0x5f5c8f[_0x46315c(0x1e3)]('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x46315c(0x1e6),'selector':notificationSelector(_0x194cda['before']),'before':projectNotificationConfig(_0x194cda['before']),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x5f5c8f,'verification':{'status':_0x46315c(0x1ec),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x32b70d,'lookupCommand':_0x2aad13}},'message':_0x46315c(0x1ea)+_0x194cda['id']};}};function a182_0x3c7f(){const _0x1ca190=['verified','75024nozbeC','\x20delete\x20could\x20not\x20be\x20verified.','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','2733936IZSkRA','/notification/channel-config/delete','high-risk-write','POST','planned','6260MHbuiP','appCode','4982862bveDsc','Inspect\x20with\x20','132835VrJhFJ','some','before','8551823lWHhsP','config-delete','961713shsqFm','8pLLhcp','notification_config_delete_outcome_unknown','channelType','unshift','Notification\x20config\x20','31266ZgqCcy','delete','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.',';\x20do\x20not\x20resubmit\x20automatically.','mutation','Deleted\x20notification\x20config\x20','144xXXNQh'];a182_0x3c7f=function(){return _0x1ca190;};return a182_0x3c7f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a183_0xb5ce85=a183_0x1d60;(function(_0x1570ea,_0x10ff8d){const _0x3a74a9=a183_0x1d60,_0x5be78b=_0x1570ea();while(!![]){try{const _0x14a1d2=-parseInt(_0x3a74a9(0x170))/0x1+-parseInt(_0x3a74a9(0x17c))/0x2+-parseInt(_0x3a74a9(0x179))/0x3*(-parseInt(_0x3a74a9(0x16d))/0x4)+-parseInt(_0x3a74a9(0x181))/0x5+parseInt(_0x3a74a9(0x180))/0x6+-parseInt(_0x3a74a9(0x17a))/0x7*(parseInt(_0x3a74a9(0x178))/0x8)+parseInt(_0x3a74a9(0x177))/0x9;if(_0x14a1d2===_0x10ff8d)break;else _0x5be78b['push'](_0x5be78b['shift']());}catch(_0x3f79ba){_0x5be78b['push'](_0x5be78b['shift']());}}}(a183_0x1a0c,0xa22e6));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a183_0x1d60(_0x5421d4,_0x1b6216){_0x5421d4=_0x5421d4-0x166;const _0x1a0c0a=a183_0x1a0c();let _0x1d6030=_0x1a0c0a[_0x5421d4];return _0x1d6030;}function a183_0x1a0c(){const _0x289e19=['flat','length','Found\x20','6207588oqxuIq','3299260gzdkNg','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','str','string','all','map','appCode','trim','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','1036JICRzD','read','notification','1008505jIZFZr','Notification\x20channel\x20type','config-list','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','bool','13484997TVtllI','280CUrepd','7347nwITPO','33999dKqnee','type','1329152gcFcUw'];a183_0x1a0c=function(){return _0x289e19;};return a183_0x1a0c();}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a183_0xb5ce85(0x16f),'command':a183_0xb5ce85(0x172),'description':a183_0xb5ce85(0x182),'risk':a183_0xb5ce85(0x16e),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a183_0xb5ce85(0x17b),'type':a183_0xb5ce85(0x167),'description':a183_0xb5ce85(0x171),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a183_0xb5ce85(0x168),'type':'boolean','default':![],'description':a183_0xb5ce85(0x175)}],async 'validate'(_0x3b9778){const _0x16350d=a183_0xb5ce85;if(_0x3b9778[_0x16350d(0x176)](_0x16350d(0x168))&&_0x3b9778[_0x16350d(0x166)](_0x16350d(0x17b))[_0x16350d(0x16b)]())throw CliErrors['validation'](_0x16350d(0x16c),_0x16350d(0x174));if(_0x3b9778[_0x16350d(0x176)]('all'))return;readNotificationChannelType(_0x3b9778);},async 'execute'(_0x508938){const _0x3aa0d6=a183_0xb5ce85;if(_0x508938['bool']('all')){const _0x2c549f=await Promise[_0x3aa0d6(0x168)](NOTIFICATION_CHANNEL_TYPES[_0x3aa0d6(0x169)](_0x31893e=>listNotificationChannelConfigs(_0x508938[_0x3aa0d6(0x16a)],_0x31893e))),_0x2acbbd=_0x2c549f[_0x3aa0d6(0x17d)]()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x508938[_0x3aa0d6(0x16a)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x2acbbd['length'],'configs':_0x2acbbd},'message':_0x3aa0d6(0x17f)+_0x2acbbd[_0x3aa0d6(0x17e)]+_0x3aa0d6(0x173)};}const _0x175f28=readNotificationChannelType(_0x508938),_0x2bbf28=await listNotificationChannelConfigs(_0x508938[_0x3aa0d6(0x16a)],_0x175f28),_0x772842=_0x2bbf28[_0x3aa0d6(0x169)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x508938['appCode'],'channelType':_0x175f28,'count':_0x772842[_0x3aa0d6(0x17e)],'configs':_0x772842},'message':'Found\x20'+_0x772842[_0x3aa0d6(0x17e)]+'\x20'+_0x175f28+'\x20notification\x20config(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a184_0x377614=a184_0x54bf;function a184_0x5287(){const _0x27706f=['notification','8181785raqGgc','update','mutation','POST','before','Notification\x20config\x20','appCode','allMatch','channelType','6iqkBUw','provesChange','Inspect\x20with\x20--id\x20','\x20via\x20','config-update','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','Inspect\x20ID\x20',';\x20do\x20not\x20resubmit\x20automatically.','notification_config_update_outcome_unknown','2684200yDnvuh','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','1863680LWMawh','\x20with\x20','1194414FlqZEz','47139712eylwmG','notification_config_update_verification_unavailable','4869894bsdrlp','388518ZxYlrf','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','planned'];a184_0x5287=function(){return _0x27706f;};return a184_0x5287();}(function(_0x7f657a,_0x6baea){const _0x1eb912=a184_0x54bf,_0x38dc77=_0x7f657a();while(!![]){try{const _0x23d9da=-parseInt(_0x1eb912(0x191))/0x1+-parseInt(_0x1eb912(0x195))/0x2+-parseInt(_0x1eb912(0x194))/0x3+-parseInt(_0x1eb912(0x18d))/0x4+parseInt(_0x1eb912(0x17b))/0x5*(-parseInt(_0x1eb912(0x184))/0x6)+parseInt(_0x1eb912(0x18f))/0x7+parseInt(_0x1eb912(0x192))/0x8;if(_0x23d9da===_0x6baea)break;else _0x38dc77['push'](_0x38dc77['shift']());}catch(_0x3cf7a8){_0x38dc77['push'](_0x38dc77['shift']());}}}(a184_0x5287,0xcce9e));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';function a184_0x54bf(_0x2a3c60,_0x540e4b){_0x2a3c60=_0x2a3c60-0x17b;const _0x528733=a184_0x5287();let _0x54bf15=_0x528733[_0x2a3c60];return _0x54bf15;}const UPDATE_PATH='/notification/channel-config/update';async function prepareUpdate(_0x42aec8){const _0x2b1c7d=a184_0x54bf,_0x5c5a9c=readNotificationId(_0x42aec8),_0x592567=await readNotificationDocument(_0x42aec8,_0x2b1c7d(0x17c)),_0x110d39=await requireExactNotificationConfig(_0x42aec8['appCode'],_0x5c5a9c,'update');return{'id':_0x5c5a9c,'patch':_0x592567,'before':_0x110d39,'payload':mergeUpdateInput(_0x110d39,_0x592567),'planned':plannedUpdateProjection(_0x110d39,_0x592567)};}export const notificationConfigUpdate={'service':a184_0x377614(0x198),'command':a184_0x377614(0x188),'description':a184_0x377614(0x189),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4ac0e7){readNotificationId(_0x4ac0e7),assertSingleNotificationSource(_0x4ac0e7),requireNotificationExplicitYes(_0x4ac0e7);},async 'dryRun'(_0x2166b2){const _0x58c75a=a184_0x377614,_0x440d01=await prepareUpdate(_0x2166b2),_0x57c57b=notificationLookupCommand(_0x2166b2[_0x58c75a(0x181)],_0x440d01[_0x58c75a(0x17f)][_0x58c75a(0x183)]);return asDryRunResult({'operation':_0x58c75a(0x17c),'selector':notificationSelector(_0x440d01['before']),'before':projectNotificationConfig(_0x440d01[_0x58c75a(0x17f)]),'after':_0x440d01[_0x58c75a(0x197)],'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x58c75a(0x197),'lookupCommand':_0x57c57b}},{'method':_0x58c75a(0x17e),'url':UPDATE_PATH});},async 'execute'(_0x1760d1){const _0x41ff83=a184_0x377614;requireNotificationExplicitYes(_0x1760d1);const _0xa159e9=await prepareUpdate(_0x1760d1),_0x24528d=notificationLookupCommand(_0x1760d1['appCode'],_0xa159e9[_0x41ff83(0x17f)][_0x41ff83(0x183)]);let _0x1c8a97=![];try{await updateNotificationChannelConfig(_0xa159e9['payload']);}catch(_0x3a6e01){if(!isPlatformTransportFailure(_0x3a6e01))throw safeApiFailure(_0x41ff83(0x17c),_0x41ff83(0x17d),_0x41ff83(0x18a)+_0xa159e9['id']+_0x41ff83(0x190)+_0x24528d+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x1c8a97=!![];}let _0x12a53d;try{const _0x50b40c=await getNotificationChannelConfig(_0xa159e9['id'],_0x1760d1[_0x41ff83(0x181)]);_0x12a53d=normalizeExactNotificationConfig(_0x50b40c,_0xa159e9['id'],_0x1760d1[_0x41ff83(0x181)]);}catch{throw notificationError(_0x1c8a97?_0x41ff83(0x18c):_0x41ff83(0x193),_0x41ff83(0x180)+_0xa159e9['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','Inspect\x20with\x20--id\x20'+_0xa159e9['id']+'\x20via\x20'+_0x24528d+_0x41ff83(0x18b));}const _0x55cc99=requestedSafeFieldsMatch(_0xa159e9[_0x41ff83(0x17f)],_0x12a53d,_0xa159e9['patch']);if(!_0x55cc99[_0x41ff83(0x182)]||_0x1c8a97&&!_0x55cc99[_0x41ff83(0x185)])throw notificationError(_0x1c8a97?_0x41ff83(0x18c):'notification_config_update_verification_failed',_0x41ff83(0x180)+_0xa159e9['id']+_0x41ff83(0x18e),_0x41ff83(0x186)+_0xa159e9['id']+_0x41ff83(0x187)+_0x24528d+_0x41ff83(0x18b));const _0x5e219f=_0x1c8a97?[_0x41ff83(0x196)]:[];return{'ok':!![],'data':{'operation':_0x41ff83(0x17c),'selector':notificationSelector(_0x12a53d),'before':projectNotificationConfig(_0xa159e9['before']),'after':projectNotificationConfig(_0x12a53d),'dryRun':![],'backend':{'method':_0x41ff83(0x17e),'path':UPDATE_PATH},'warnings':_0x5e219f,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x1c8a97,'verifiedFields':_0x55cc99['verifiedFields'],'lookupCommand':_0x24528d}},'message':'Updated\x20notification\x20config\x20'+_0x12a53d['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4524d4,_0x33921f){const _0x43ab66=a185_0x2053,_0x46ed04=_0x4524d4();while(!![]){try{const _0x479c9f=parseInt(_0x43ab66(0x10a))/0x1+parseInt(_0x43ab66(0x111))/0x2*(-parseInt(_0x43ab66(0x10e))/0x3)+-parseInt(_0x43ab66(0x10d))/0x4*(parseInt(_0x43ab66(0x113))/0x5)+-parseInt(_0x43ab66(0x112))/0x6*(parseInt(_0x43ab66(0x110))/0x7)+parseInt(_0x43ab66(0x10c))/0x8*(-parseInt(_0x43ab66(0x114))/0x9)+-parseInt(_0x43ab66(0x10f))/0xa+parseInt(_0x43ab66(0x10b))/0xb;if(_0x479c9f===_0x33921f)break;else _0x46ed04['push'](_0x46ed04['shift']());}catch(_0x2bc801){_0x46ed04['push'](_0x46ed04['shift']());}}}(a185_0x5a5d,0xd0939));function a185_0x5a5d(){const _0x2c4c47=['12437620enxZVL','91xvIubz','7222UnNlJJ','123582Irexyt','10ToNvwA','18ULkPbe','1117563JGlUDV','32954603iUwzLZ','3007144qBzdbT','792744Gbmcvn','498DCfzwO'];a185_0x5a5d=function(){return _0x2c4c47;};return a185_0x5a5d();}import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a185_0x2053(_0x134af1,_0x3b51c6){_0x134af1=_0x134af1-0x10a;const _0x5a5df1=a185_0x5a5d();let _0x205303=_0x5a5df1[_0x134af1];return _0x205303;}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a186_0x89cf5a=a186_0x1644;(function(_0x1b9854,_0x39e182){const _0x4cf98a=a186_0x1644,_0x2674e2=_0x1b9854();while(!![]){try{const _0x23c79c=-parseInt(_0x4cf98a(0x1b7))/0x1*(parseInt(_0x4cf98a(0x1dc))/0x2)+-parseInt(_0x4cf98a(0x1ac))/0x3*(-parseInt(_0x4cf98a(0x1c5))/0x4)+-parseInt(_0x4cf98a(0x1d5))/0x5*(parseInt(_0x4cf98a(0x1d3))/0x6)+parseInt(_0x4cf98a(0x1f4))/0x7*(parseInt(_0x4cf98a(0x19b))/0x8)+parseInt(_0x4cf98a(0x1f2))/0x9*(-parseInt(_0x4cf98a(0x1de))/0xa)+parseInt(_0x4cf98a(0x1df))/0xb+parseInt(_0x4cf98a(0x1c9))/0xc*(-parseInt(_0x4cf98a(0x198))/0xd);if(_0x23c79c===_0x39e182)break;else _0x2674e2['push'](_0x2674e2['shift']());}catch(_0x1e7ac1){_0x2674e2['push'](_0x2674e2['shift']());}}}(a186_0x34f0,0x93769));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a186_0x89cf5a(0x1bf),a186_0x89cf5a(0x1a0),a186_0x89cf5a(0x1ec),a186_0x89cf5a(0x216),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName',a186_0x89cf5a(0x1ba),a186_0x89cf5a(0x1e1),a186_0x89cf5a(0x212),a186_0x89cf5a(0x1b3),'connectTimeout',a186_0x89cf5a(0x1c0)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a186_0x89cf5a(0x1ad),a186_0x89cf5a(0x1f0),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a186_0x89cf5a(0x1f9),a186_0x89cf5a(0x1a1),a186_0x89cf5a(0x1fd),a186_0x89cf5a(0x1b1),a186_0x89cf5a(0x206),'subjectPrefix',a186_0x89cf5a(0x205),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a186_0x89cf5a(0x1cd),'type':a186_0x89cf5a(0x1ab),'required':![],'description':a186_0x89cf5a(0x1b8)},{'name':a186_0x89cf5a(0x1a4),'type':a186_0x89cf5a(0x1e3),'required':![],'default':![],'description':a186_0x89cf5a(0x219)},{'name':a186_0x89cf5a(0x1ee),'type':a186_0x89cf5a(0x1ab),'required':![],'description':a186_0x89cf5a(0x1ed)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a186_0x89cf5a(0x1c7),'required':!![],'description':a186_0x89cf5a(0x197)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;function a186_0x34f0(){const _0x204a52=['a\x20supported\x20string','\x22channelType\x22.','Notification\x20config\x20list\x20item\x20','Application-level\x20notification\x20config\x20ID','13DhEUtX','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','dry-run','16PVDYZU','includes','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','preflight','has','FEISHU','recipients','\x22\x20is\x20forbidden.','num','stdin','Invalid\x20notification\x20config\x20response.','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x20--format\x20compress','\x22configName\x22.','a\x20string\x20or\x20null','name','string','3ixWMHY','appCode','yes','stringify','path','bccList','\x20has\x20invalid\x20field\x20\x22','description','kind','notification_config_field_unknown','notification_config_confirmation_required','383419zWKRjo','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','environment\x20variable\x20','channelType','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20must\x20be\x20an\x20object.','messageTemplate','Item\x20','EMAIL','readTimeout','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Notification\x20JSON\x20field\x20\x22','notification_config_source_unavailable','\x20is\x20invalid.','3900604alDGZq','createTime','number','notification_config_json_invalid','6556692zhrdIL','\x20has\x20an\x20invalid\x20id.','\x22\x20cannot\x20exceed\x20','Create\x20JSON\x20requires\x20field\x20','file','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','\x20--type\x20','\x20is\x20missing\x20required\x20field\x20\x22','\x20characters.','isSafeInteger','15522JdmKiI','env','455jiLIrR','failed','channelConfigRaw','push','\x20has\x20an\x20invalid\x20channelType.','notification_config_field_required','\x20has\x20an\x20unsupported\x20channelType.','2QoPDJq','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','10110zRLxUD','11434489hTbGRM','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','endpointUrl','endpointUrlRaw','boolean','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','<redacted>','configName','Notification\x20config\x20','_unavailable','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','object','call','DINGTALK','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','from-env','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','configCode','notification_config_field_invalid','6138swbCaB','isArray','1554308DWdMuc','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x22\x20must\x20be\x20','entries','emailTargets','notification_config_channel_field_forbidden','Allowed\x20values:\x20','bool','ccList','str','notification_config_id_invalid','type','file\x20','updateTime','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','Notification\x20JSON\x20channelConfig\x20field\x20\x22','fromName','replyTo','endpointUrl:null','connectTimeout','validation','update','parse','some','setEncoding','Invalid\x20--','join','every','trim','channelConfig','\x22\x20must\x20be\x20a\x20non-empty\x20string.','utf8','notification_config_response_invalid','WECOM','apiError','create','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','notification_config_','keys','a\x20JSON\x20object','prototype','notification_config_update_empty','length'];a186_0x34f0=function(){return _0x204a52;};return a186_0x34f0();}export function notificationError(_0x595ee1,_0x1bf6a0,_0x361bf0){return new CliError(_0x595ee1,0x1,_0x1bf6a0,_0x361bf0);}export function readNotificationId(_0x26f95f){const _0x3fccb4=a186_0x89cf5a,_0x23e534=_0x26f95f[_0x3fccb4(0x1a3)]('id');if(!Number[_0x3fccb4(0x1d2)](_0x23e534)||_0x23e534<=0x0)throw notificationError(_0x3fccb4(0x1ff),_0x3fccb4(0x1e0));return _0x23e534;}export function requireNotificationExplicitYes(_0x39c2ca){const _0x572ea6=a186_0x89cf5a;if(_0x39c2ca[_0x572ea6(0x1fc)](_0x572ea6(0x19a))||_0x39c2ca[_0x572ea6(0x1fc)](_0x572ea6(0x1ae)))return;throw notificationError(_0x572ea6(0x1b6),_0x572ea6(0x199),_0x572ea6(0x19d));}export function readNotificationChannelType(_0x42ac9a,_0x1c234b=a186_0x89cf5a(0x200),_0x321a92=a186_0x89cf5a(0x1bf)){const _0x8f0a82=a186_0x89cf5a,_0x310715=_0x42ac9a[_0x8f0a82(0x1fe)](_0x1c234b)[_0x8f0a82(0x211)]()||_0x321a92;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x310715))throw CliErrors[_0x8f0a82(0x209)](_0x8f0a82(0x20e)+_0x1c234b+':\x20'+_0x310715,_0x8f0a82(0x1fb)+NOTIFICATION_CHANNEL_TYPES[_0x8f0a82(0x20f)](',\x20')+'.');return _0x310715;}export function assertSingleNotificationSource(_0x372dcf){const _0x5044d1=a186_0x89cf5a,_0xdf748f=[],_0x5634db=_0x372dcf[_0x5044d1(0x1fe)](_0x5044d1(0x1cd))[_0x5044d1(0x211)]();if(_0x5634db)_0xdf748f[_0x5044d1(0x1d8)]({'kind':'file','path':_0x5634db});if(_0x372dcf['bool'](_0x5044d1(0x1a4)))_0xdf748f[_0x5044d1(0x1d8)]({'kind':_0x5044d1(0x1a4)});const _0x5cded7=_0x372dcf[_0x5044d1(0x1fe)](_0x5044d1(0x1ee))[_0x5044d1(0x211)]();if(_0x5cded7)_0xdf748f[_0x5044d1(0x1d8)]({'kind':_0x5044d1(0x1d4),'name':_0x5cded7});if(_0xdf748f['length']===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0x5044d1(0x1ef));if(_0xdf748f['length']>0x1)throw CliErrors[_0x5044d1(0x209)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x5044d1(0x1ef));return _0xdf748f[0x0];}export async function readNotificationDocument(_0x5d7205,_0x558c35){const _0x45d124=a186_0x89cf5a,_0x2eb963=assertSingleNotificationSource(_0x5d7205),_0x5341e5=_0x2eb963[_0x45d124(0x1b4)]===_0x45d124(0x1cd)?_0x45d124(0x201)+_0x2eb963[_0x45d124(0x1b0)]:_0x2eb963[_0x45d124(0x1b4)]==='env'?_0x45d124(0x1b9)+_0x2eb963[_0x45d124(0x1aa)]:_0x45d124(0x1a4);let _0x4b2c26;try{if(_0x2eb963[_0x45d124(0x1b4)]==='file')_0x4b2c26=await readFile(_0x2eb963[_0x45d124(0x1b0)],_0x45d124(0x214));else{if(_0x2eb963[_0x45d124(0x1b4)]===_0x45d124(0x1d4)){if(!(_0x2eb963[_0x45d124(0x1aa)]in process.env))throw notificationError('notification_config_source_unavailable',_0x45d124(0x1c1)+_0x2eb963[_0x45d124(0x1aa)]);_0x4b2c26=process.env[_0x2eb963.name]??'';}else _0x4b2c26=await readStdin();}}catch(_0x273fdc){if(_0x273fdc instanceof CliError)throw _0x273fdc;throw notificationError(_0x45d124(0x1c3),_0x45d124(0x1dd)+_0x5341e5+'.');}let _0x43caca;try{_0x43caca=JSON[_0x45d124(0x20b)](_0x4b2c26);}catch{throw notificationError(_0x45d124(0x1c8),'Notification\x20JSON\x20from\x20'+_0x5341e5+_0x45d124(0x1c4),_0x45d124(0x1f6));}if(!isJsonObject(_0x43caca))throw notificationError(_0x45d124(0x1c8),'Notification\x20JSON\x20from\x20'+_0x5341e5+_0x45d124(0x1bc));return validateNotificationDocument(_0x43caca,_0x558c35);}export function projectNotificationListConfig(_0x524c3c,_0x534c98){const _0x2309cc=a186_0x89cf5a;return{'id':typeof _0x524c3c['id']===_0x2309cc(0x1c7)?_0x524c3c['id']:null,'configCode':requireResponseString(_0x524c3c[_0x2309cc(0x1f0)],_0x2309cc(0x1f0),_0x534c98),'configName':requireResponseString(_0x524c3c[_0x2309cc(0x1e6)],_0x2309cc(0x1e6),_0x534c98),'channelType':requireResponseString(_0x524c3c['channelType'],'channelType',_0x534c98),'description':normalizeNullableString(_0x524c3c['description']),'createTime':normalizeNullableString(_0x524c3c[_0x2309cc(0x1c6)]),'updateTime':normalizeNullableString(_0x524c3c[_0x2309cc(0x202)])};}export function normalizeExactNotificationConfig(_0x2dbc2a,_0x82b5d2,_0x2b58d3){const _0x6e5fc6=a186_0x89cf5a;if(!Number[_0x6e5fc6(0x1d2)](_0x2dbc2a['id'])||_0x2dbc2a['id']!==_0x82b5d2)throw notificationError(_0x6e5fc6(0x215),_0x6e5fc6(0x1f5)+_0x82b5d2+'.');if(_0x2dbc2a[_0x6e5fc6(0x1ad)]!==_0x2b58d3)throw notificationError(_0x6e5fc6(0x215),_0x6e5fc6(0x1e7)+_0x82b5d2+_0x6e5fc6(0x1a6));const _0x193698=requireExactString(_0x2dbc2a[_0x6e5fc6(0x1e6)],_0x6e5fc6(0x1e6),_0x82b5d2),_0x2ec148=requireExactString(_0x2dbc2a[_0x6e5fc6(0x1f0)],_0x6e5fc6(0x1f0),_0x82b5d2),_0x1bba2c=requireExactString(_0x2dbc2a[_0x6e5fc6(0x1ba)],'channelType',_0x82b5d2);if(!NOTIFICATION_CHANNEL_TYPES[_0x6e5fc6(0x19c)](_0x1bba2c))throw notificationError('notification_config_response_invalid',_0x6e5fc6(0x1e7)+_0x82b5d2+_0x6e5fc6(0x1db));const _0x5f2c0e=responseNullableString(_0x2dbc2a[_0x6e5fc6(0x1e1)],'endpointUrl',_0x82b5d2),_0x304e86=responseNullableString(_0x2dbc2a['channelConfig'],_0x6e5fc6(0x212),_0x82b5d2),_0x1b0900=responseNullableString(_0x2dbc2a['description'],'description',_0x82b5d2),_0x36fea8=responseNullableTimeout(_0x2dbc2a[_0x6e5fc6(0x208)],_0x6e5fc6(0x208),_0x82b5d2),_0x5a5dd8=responseNullableTimeout(_0x2dbc2a[_0x6e5fc6(0x1c0)],_0x6e5fc6(0x1c0),_0x82b5d2);return{'id':_0x82b5d2,'appCode':_0x2b58d3,'configCode':_0x2ec148,'configName':_0x193698,'channelType':_0x1bba2c,'endpointUrl':redactSensitive(_0x5f2c0e),'channelConfig':redactSensitive(_0x304e86),'description':_0x1b0900,'connectTimeout':_0x36fea8,'readTimeout':_0x5a5dd8,'endpointUrlRaw':_0x5f2c0e,'channelConfigRaw':_0x304e86};}export async function requireExactNotificationConfig(_0x39b1b4,_0x1187e2,_0x453c18){const _0x21cc76=a186_0x89cf5a;let _0x555abe;try{_0x555abe=await getNotificationChannelConfig(_0x1187e2,_0x39b1b4);}catch{throw safeApiFailure(_0x453c18,_0x21cc76(0x19e),_0x21cc76(0x1bb)+_0x39b1b4+_0x21cc76(0x203));}return normalizeExactNotificationConfig(_0x555abe,_0x1187e2,_0x39b1b4);}export function projectNotificationConfig(_0x36eee2){const _0x4ea3c6=a186_0x89cf5a;return{'id':_0x36eee2['id']??null,'appCode':_0x36eee2['appCode'],'configCode':_0x36eee2[_0x4ea3c6(0x1f0)]??null,'configName':_0x36eee2['configName'],'channelType':_0x36eee2[_0x4ea3c6(0x1ba)],'endpointUrl':redactSensitive(_0x36eee2[_0x4ea3c6(0x1e1)]),'channelConfig':redactSensitive(_0x36eee2[_0x4ea3c6(0x212)]),'description':_0x36eee2[_0x4ea3c6(0x1b3)]??null,'connectTimeout':_0x36eee2['connectTimeout']??null,'readTimeout':_0x36eee2['readTimeout']??null};}export function notificationSelector(_0x2af966){const _0x1bcbea=a186_0x89cf5a;return{'appCode':_0x2af966[_0x1bcbea(0x1ad)],'id':_0x2af966['id'],'configCode':_0x2af966[_0x1bcbea(0x1f0)],'configName':_0x2af966[_0x1bcbea(0x1e6)],'channelType':_0x2af966[_0x1bcbea(0x1ba)]};}export function createMutationInput(_0x23ba9e,_0x54a571){const _0x15deed=a186_0x89cf5a;return{'appCode':_0x23ba9e,'configName':_0x54a571[_0x15deed(0x1e6)],'channelType':_0x54a571[_0x15deed(0x1ba)],...hasOwn(_0x54a571,_0x15deed(0x1e1))?{'endpointUrl':_0x54a571[_0x15deed(0x1e1)]}:{},...hasOwn(_0x54a571,_0x15deed(0x212))?{'channelConfig':serializeChannelConfig(_0x54a571[_0x15deed(0x212)])}:{},...hasOwn(_0x54a571,_0x15deed(0x1b3))?{'description':_0x54a571[_0x15deed(0x1b3)]}:{},...hasOwn(_0x54a571,_0x15deed(0x208))?{'connectTimeout':_0x54a571[_0x15deed(0x208)]}:{},...hasOwn(_0x54a571,_0x15deed(0x1c0))?{'readTimeout':_0x54a571[_0x15deed(0x1c0)]}:{}};}function a186_0x1644(_0x34605a,_0x5cd53f){_0x34605a=_0x34605a-0x193;const _0x34f038=a186_0x34f0();let _0x1644d4=_0x34f038[_0x34605a];return _0x1644d4;}export function mergeUpdateInput(_0x5ee2a3,_0x509d79){const _0x39d938=a186_0x89cf5a;return{'id':_0x5ee2a3['id'],'appCode':_0x5ee2a3['appCode'],'configName':_0x509d79[_0x39d938(0x1e6)]??_0x5ee2a3[_0x39d938(0x1e6)],'channelType':_0x509d79['channelType']??_0x5ee2a3['channelType'],'endpointUrl':hasOwn(_0x509d79,_0x39d938(0x1e1))?_0x509d79[_0x39d938(0x1e1)]:_0x5ee2a3[_0x39d938(0x1e2)],'channelConfig':hasOwn(_0x509d79,'channelConfig')?serializeChannelConfig(_0x509d79[_0x39d938(0x212)]):_0x5ee2a3[_0x39d938(0x1d7)],'description':hasOwn(_0x509d79,_0x39d938(0x1b3))?_0x509d79['description']:_0x5ee2a3['description'],'connectTimeout':hasOwn(_0x509d79,_0x39d938(0x208))?_0x509d79[_0x39d938(0x208)]:_0x5ee2a3[_0x39d938(0x208)],'readTimeout':hasOwn(_0x509d79,_0x39d938(0x1c0))?_0x509d79['readTimeout']:_0x5ee2a3[_0x39d938(0x1c0)]};}export function plannedUpdateProjection(_0x2e763d,_0x17e75b){const _0x25e983=a186_0x89cf5a;return projectNotificationConfig({'id':_0x2e763d['id'],'appCode':_0x2e763d['appCode'],'configCode':_0x2e763d['configCode'],'configName':_0x17e75b[_0x25e983(0x1e6)]??_0x2e763d[_0x25e983(0x1e6)],'channelType':_0x17e75b[_0x25e983(0x1ba)]??_0x2e763d[_0x25e983(0x1ba)],'endpointUrl':hasOwn(_0x17e75b,_0x25e983(0x1e1))?_0x17e75b[_0x25e983(0x1e1)]:_0x2e763d['endpointUrlRaw'],'channelConfig':hasOwn(_0x17e75b,'channelConfig')?_0x17e75b[_0x25e983(0x212)]:_0x2e763d[_0x25e983(0x1d7)],'description':hasOwn(_0x17e75b,_0x25e983(0x1b3))?_0x17e75b[_0x25e983(0x1b3)]:_0x2e763d[_0x25e983(0x1b3)],'connectTimeout':hasOwn(_0x17e75b,'connectTimeout')?_0x17e75b['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x2e763d['connectTimeout'],'readTimeout':hasOwn(_0x17e75b,_0x25e983(0x1c0))?_0x17e75b[_0x25e983(0x1c0)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x2e763d[_0x25e983(0x1c0)]});}export function requestedSafeFieldsMatch(_0x444618,_0x5bb8c7,_0x4cebf0){const _0x452fcb=a186_0x89cf5a,_0x44f8af=[],_0x69b072=[],_0x5b2739=[];for(const _0x36d011 of['configName',_0x452fcb(0x1ba),'description']){if(!hasOwn(_0x4cebf0,_0x36d011))continue;_0x5b2739[_0x452fcb(0x1d8)](_0x36d011),_0x44f8af[_0x452fcb(0x1d8)](_0x5bb8c7[_0x36d011]===_0x4cebf0[_0x36d011]),_0x69b072[_0x452fcb(0x1d8)](_0x444618[_0x36d011]!==_0x4cebf0[_0x36d011]&&_0x5bb8c7[_0x36d011]===_0x4cebf0[_0x36d011]);}for(const _0x80c05c of[_0x452fcb(0x208),_0x452fcb(0x1c0)]){if(!hasOwn(_0x4cebf0,_0x80c05c))continue;const _0x4f1d43=_0x4cebf0[_0x80c05c]??(_0x80c05c===_0x452fcb(0x208)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x5b2739['push'](_0x80c05c),_0x44f8af['push'](_0x5bb8c7[_0x80c05c]===_0x4f1d43),_0x69b072['push'](_0x444618[_0x80c05c]!==_0x4f1d43&&_0x5bb8c7[_0x80c05c]===_0x4f1d43);}return hasOwn(_0x4cebf0,'endpointUrl')&&_0x4cebf0[_0x452fcb(0x1e1)]===null&&(_0x5b2739['push'](_0x452fcb(0x207)),_0x44f8af[_0x452fcb(0x1d8)](_0x5bb8c7[_0x452fcb(0x1e2)]===null||_0x5bb8c7[_0x452fcb(0x1e2)]===''),_0x69b072[_0x452fcb(0x1d8)](_0x444618[_0x452fcb(0x1e2)]!==null&&_0x444618[_0x452fcb(0x1e2)]!==''&&(_0x5bb8c7[_0x452fcb(0x1e2)]===null||_0x5bb8c7[_0x452fcb(0x1e2)]===''))),{'allMatch':_0x44f8af[_0x452fcb(0x210)](Boolean),'provesChange':_0x69b072[_0x452fcb(0x20c)](Boolean),'verifiedFields':_0x5b2739};}export function validateNotificationDeleteReadback(_0xa753db,_0x4e2036,_0x31cd49){const _0x2808bd=a186_0x89cf5a;for(const [_0x46eefd,_0x2eefa9]of _0xa753db[_0x2808bd(0x1f8)]()){if(!Number['isSafeInteger'](_0x2eefa9['id'])||_0x2eefa9['id']<=0x0)throw notificationError(_0x2808bd(0x215),_0x2808bd(0x196)+(_0x46eefd+0x1)+_0x2808bd(0x1ca));if(_0x2eefa9[_0x2808bd(0x1ad)]!==_0x4e2036)throw notificationError(_0x2808bd(0x215),_0x2808bd(0x196)+(_0x46eefd+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x2eefa9[_0x2808bd(0x1ba)]!==_0x31cd49)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x46eefd+0x1)+_0x2808bd(0x1d9));}}export function safeApiFailure(_0x995fe5,_0x43b38a,_0xa22385){const _0x12ae9d=a186_0x89cf5a;return notificationError(_0x12ae9d(0x21a)+_0x995fe5+'_'+(_0x43b38a==='mutation'?_0x12ae9d(0x1d6):_0x43b38a+_0x12ae9d(0x1e8)),_0x12ae9d(0x1e7)+_0x995fe5+'\x20'+_0x43b38a+'\x20failed.',_0xa22385);}export function notificationLookupCommand(_0x22a3ff,_0x107d79){const _0x973c17=a186_0x89cf5a;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x22a3ff+_0x973c17(0x1cf)+_0x107d79+_0x973c17(0x1a7);}function validateNotificationDocument(_0x4acaf9,_0x10dd20){const _0x505797=a186_0x89cf5a;for(const _0x4aab75 of Object[_0x505797(0x21b)](_0x4acaf9)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x4aab75))throw notificationError('notification_config_field_forbidden',_0x505797(0x1c2)+_0x4aab75+_0x505797(0x1ce));if(!ALLOWED_INPUT_FIELDS[_0x505797(0x19f)](_0x4aab75))throw notificationError(_0x505797(0x1b5),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x4aab75+'\x22.');}if(_0x10dd20===_0x505797(0x20a)&&Object[_0x505797(0x21b)](_0x4acaf9)['length']===0x0)throw notificationError(_0x505797(0x21e),_0x505797(0x1e4));const _0x438983={};if(hasOwn(_0x4acaf9,'configName'))_0x438983['configName']=validateRequiredString(_0x4acaf9[_0x505797(0x1e6)],_0x505797(0x1e6),0x80);else{if(_0x10dd20===_0x505797(0x218))throw notificationError(_0x505797(0x1da),_0x505797(0x1cc)+_0x505797(0x1a8));}if(hasOwn(_0x4acaf9,'channelType')){if(typeof _0x4acaf9['channelType']!=='string')throw invalidFieldType(_0x505797(0x1ba),_0x505797(0x194));const _0xe72d39=_0x4acaf9[_0x505797(0x1ba)]['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x505797(0x19c)](_0xe72d39))throw notificationError(_0x505797(0x1f1),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x505797(0x1fb)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x438983['channelType']=_0xe72d39;}else{if(_0x10dd20==='create')throw notificationError(_0x505797(0x1da),_0x505797(0x1cc)+_0x505797(0x195));}for(const [_0xbc68f4,_0xb2f4c3]of[[_0x505797(0x1e1),0x200],['description',0x100]]){if(!hasOwn(_0x4acaf9,_0xbc68f4))continue;const _0x22bb98=_0x4acaf9[_0xbc68f4];if(_0x22bb98!==null&&typeof _0x22bb98!==_0x505797(0x1ab))throw invalidFieldType(_0xbc68f4,_0x505797(0x1a9));if(typeof _0x22bb98===_0x505797(0x1ab)&&_0x22bb98[_0x505797(0x193)]>_0xb2f4c3)throw notificationError('notification_config_field_invalid',_0x505797(0x1c2)+_0xbc68f4+'\x22\x20cannot\x20exceed\x20'+_0xb2f4c3+_0x505797(0x1d1));_0x438983[_0xbc68f4]=_0x22bb98;}if(hasOwn(_0x4acaf9,_0x505797(0x212))){const _0x1578a1=_0x4acaf9[_0x505797(0x212)];if(_0x1578a1===null&&_0x10dd20==='create')throw invalidFieldType('channelConfig',_0x505797(0x21c));if(_0x1578a1!==null&&!isJsonObject(_0x1578a1))throw invalidFieldType(_0x505797(0x212),_0x10dd20==='update'?'a\x20JSON\x20object\x20or\x20null':_0x505797(0x21c));_0x1578a1!==null&&validateChannelConfigFields(_0x438983[_0x505797(0x1ba)],_0x1578a1),_0x438983[_0x505797(0x212)]=_0x1578a1;}for(const _0x1d6bb7 of[_0x505797(0x208),'readTimeout']){if(!hasOwn(_0x4acaf9,_0x1d6bb7))continue;const _0x4dcf85=_0x4acaf9[_0x1d6bb7];if(_0x4dcf85!==null&&(!Number[_0x505797(0x1d2)](_0x4dcf85)||_0x4dcf85<0x0))throw notificationError(_0x505797(0x1f1),_0x505797(0x1c2)+_0x1d6bb7+_0x505797(0x1e9));_0x438983[_0x1d6bb7]=_0x4dcf85;}return _0x438983;}function validateRequiredString(_0x115fd1,_0x548a50,_0x31156d){const _0x46b0b2=a186_0x89cf5a;if(typeof _0x115fd1!=='string')throw invalidFieldType(_0x548a50,'a\x20non-empty\x20string');const _0x5c80d3=_0x115fd1['trim']();if(!_0x5c80d3)throw notificationError(_0x46b0b2(0x1f1),_0x46b0b2(0x1c2)+_0x548a50+_0x46b0b2(0x213));if(_0x5c80d3['length']>_0x31156d)throw notificationError('notification_config_field_invalid',_0x46b0b2(0x1c2)+_0x548a50+_0x46b0b2(0x1cb)+_0x31156d+_0x46b0b2(0x1d1));return _0x5c80d3;}function validateChannelConfigFields(_0x4edc89,_0x4398da){const _0x843389=a186_0x89cf5a;if(hasOwn(_0x4398da,_0x843389(0x1bd)))throw forbiddenChannelConfigField('messageTemplate');if(_0x4edc89==='EMAIL')for(const _0x9aaf99 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x4398da,_0x9aaf99))throw forbiddenChannelConfigField(_0x9aaf99);}}function forbiddenChannelConfigField(_0x4acdfb){const _0x5c7718=a186_0x89cf5a;return notificationError(_0x5c7718(0x1fa),_0x5c7718(0x204)+_0x4acdfb+_0x5c7718(0x1a2));}function invalidFieldType(_0x43f383,_0x25c04a){const _0x3559a0=a186_0x89cf5a;return notificationError(_0x3559a0(0x1f1),_0x3559a0(0x1c2)+_0x43f383+_0x3559a0(0x1f7)+_0x25c04a+'.');}function serializeChannelConfig(_0x1658e1){const _0x341308=a186_0x89cf5a;return _0x1658e1===null||_0x1658e1===undefined?null:JSON[_0x341308(0x1af)](_0x1658e1);}function redactSensitive(_0x2d49b5){const _0x5d8720=a186_0x89cf5a;return _0x2d49b5===null||_0x2d49b5===undefined||_0x2d49b5===''?null:_0x5d8720(0x1e5);}function requireResponseString(_0x255c01,_0x445904,_0x68320a){const _0x5ab0aa=a186_0x89cf5a;if(typeof _0x255c01!=='string'||_0x255c01[_0x5ab0aa(0x211)]()==='')throw CliErrors[_0x5ab0aa(0x217)](_0x5ab0aa(0x1a5),_0x5ab0aa(0x1be)+(_0x68320a+0x1)+_0x5ab0aa(0x1d0)+_0x445904+'\x22.');return _0x255c01[_0x5ab0aa(0x211)]();}function requireExactString(_0x320318,_0x16e049,_0xe70c7c){const _0x1ebfd9=a186_0x89cf5a;if(typeof _0x320318!==_0x1ebfd9(0x1ab)||_0x320318['trim']()==='')throw notificationError('notification_config_response_invalid',_0x1ebfd9(0x1e7)+_0xe70c7c+_0x1ebfd9(0x1d0)+_0x16e049+'\x22.');return _0x320318[_0x1ebfd9(0x211)]();}function responseNullableString(_0x37fe34,_0x113dc3,_0x70de64){const _0x55adaf=a186_0x89cf5a;if(_0x37fe34===undefined||_0x37fe34===null)return null;if(typeof _0x37fe34!==_0x55adaf(0x1ab))throw notificationError(_0x55adaf(0x215),_0x55adaf(0x1e7)+_0x70de64+_0x55adaf(0x1b2)+_0x113dc3+'\x22.');return _0x37fe34;}function responseNullableTimeout(_0x2dfd13,_0x2d5ebd,_0x2503e7){const _0x4b23ce=a186_0x89cf5a;if(_0x2dfd13===undefined||_0x2dfd13===null)return null;if(!Number[_0x4b23ce(0x1d2)](_0x2dfd13)||_0x2dfd13<0x0)throw notificationError(_0x4b23ce(0x215),_0x4b23ce(0x1e7)+_0x2503e7+_0x4b23ce(0x1b2)+_0x2d5ebd+'\x22.');return _0x2dfd13;}function normalizeNullableString(_0x53bb2e){return typeof _0x53bb2e==='string'?_0x53bb2e:null;}function isJsonObject(_0x5e49c4){const _0x116601=a186_0x89cf5a;return _0x5e49c4!==null&&typeof _0x5e49c4===_0x116601(0x1ea)&&!Array[_0x116601(0x1f3)](_0x5e49c4);}function hasOwn(_0x4f0b88,_0x18ec1e){const _0x55c2d5=a186_0x89cf5a;return Object[_0x55c2d5(0x21d)]['hasOwnProperty'][_0x55c2d5(0x1eb)](_0x4f0b88,_0x18ec1e);}async function readStdin(){const _0xbfc55b=a186_0x89cf5a;let _0x48babd='';process[_0xbfc55b(0x1a4)][_0xbfc55b(0x20d)](_0xbfc55b(0x214));for await(const _0x5d4860 of process[_0xbfc55b(0x1a4)])_0x48babd+=_0x5d4860;return _0x48babd;}
|
|
1
|
+
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a187_0x1ec1c9=a187_0x22e5;(function(_0x4e72ec,_0x4a0e51){const _0x56a123=a187_0x22e5,_0x125021=_0x4e72ec();while(!![]){try{const _0x347893=parseInt(_0x56a123(0x139))/0x1*(-parseInt(_0x56a123(0x143))/0x2)+-parseInt(_0x56a123(0x131))/0x3+parseInt(_0x56a123(0x13c))/0x4+parseInt(_0x56a123(0x14b))/0x5+-parseInt(_0x56a123(0x12a))/0x6+parseInt(_0x56a123(0x14c))/0x7*(-parseInt(_0x56a123(0x138))/0x8)+parseInt(_0x56a123(0x14a))/0x9*(parseInt(_0x56a123(0x136))/0xa);if(_0x347893===_0x4a0e51)break;else _0x125021['push'](_0x125021['shift']());}catch(_0x36958f){_0x125021['push'](_0x125021['shift']());}}}(a187_0x414a,0xe2435));function a187_0x414a(){const _0xdf19fd=['toString','path','4241478yuGfDI','General','idCard','general','ocr','7976120OpIAzN','/smartapi/ocr/recognize-text?','664bqeElz','59frHNBL','string','recognize','2914244NSEaHQ','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','filter','idcard','imageUrl','validation','image-url','38958uYktnw','Preview:\x20recognize\x20','GET','File\x20upload\x20response\x20missing\x20filePath.','/smartapi/ocr/recognize-text','length','form','36DTjrVv','7486010rMdUXS','100807qfidXB','Unsupported\x20OCR\x20scene:\x20','filePath','.\x20Supported\x20scenes:\x20','IdCard','image-file','scene','trim','join','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','appCode','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','File\x20URL\x20response\x20missing\x20fileUrl.','imageFile','str','fileUrl','fileName','/smartapi/common/uploadFile','4386408lqSozS','apiError','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','POST'];a187_0x414a=function(){return _0xdf19fd;};return a187_0x414a();}import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a187_0x22e5(_0x37f695,_0x314140){_0x37f695=_0x37f695-0x120;const _0x414a63=a187_0x414a();let _0x22e5b2=_0x414a63[_0x37f695];return _0x22e5b2;}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=['invoice',a187_0x1ec1c9(0x134),a187_0x1ec1c9(0x149),a187_0x1ec1c9(0x133)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a187_0x1ec1c9(0x132),'form':'Table','idCard':a187_0x1ec1c9(0x150)},SCENE_FLAG={'name':a187_0x1ec1c9(0x152),'type':a187_0x1ec1c9(0x13a),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a187_0x1ec1c9(0x121)},IMAGE_FILE_FLAG={'name':a187_0x1ec1c9(0x151),'type':a187_0x1ec1c9(0x13a),'description':a187_0x1ec1c9(0x13d)},IMAGE_URL_FLAG={'name':a187_0x1ec1c9(0x142),'type':a187_0x1ec1c9(0x13a),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x4b719f){const _0x5f262a=a187_0x1ec1c9,_0x49d574=_0x4b719f[_0x5f262a(0x153)]()['toLowerCase']();if(_0x49d574===_0x5f262a(0x13f))return'idCard';if(_0x49d574==='invoice'||_0x49d574===_0x5f262a(0x134)||_0x49d574===_0x5f262a(0x149))return _0x49d574;throw CliErrors[_0x5f262a(0x141)](_0x5f262a(0x14d)+_0x4b719f+_0x5f262a(0x14f)+SUPPORTED_SCENES[_0x5f262a(0x120)](',\x20'));}function selectedInputs(_0x3ef5c5){const _0x9a98ec=a187_0x1ec1c9,_0x8b686e=_0x3ef5c5[_0x9a98ec(0x126)](_0x9a98ec(0x151))[_0x9a98ec(0x153)](),_0x227567=_0x3ef5c5[_0x9a98ec(0x126)]('image-url')[_0x9a98ec(0x153)]();return{'imageFile':_0x8b686e,'imageUrl':_0x227567,'count':[_0x8b686e,_0x227567][_0x9a98ec(0x13e)](Boolean)[_0x9a98ec(0x148)]};}function validateInputSelection(_0x57daab){const _0x4e85f3=a187_0x1ec1c9,_0x3067dc=selectedInputs(_0x57daab);if(_0x3067dc['count']!==0x1)throw CliErrors['validation'](_0x4e85f3(0x123));return _0x3067dc;}function withScene(_0x1639eb,_0x1cf2ed,_0x48f011){const _0x28bb14=a187_0x1ec1c9;return{..._0x1639eb,'scene':_0x1cf2ed,..._0x48f011?{'sourceFile':{'fileName':_0x48f011[_0x28bb14(0x128)],'filePath':_0x48f011[_0x28bb14(0x14e)]}}:{}};}const ocrRecognize={'service':a187_0x1ec1c9(0x135),'command':a187_0x1ec1c9(0x13b),'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'(_0x1be6d7){const _0x41bd18=a187_0x1ec1c9,_0x1644b0=normalizeScene(_0x1be6d7[_0x41bd18(0x126)](_0x41bd18(0x152))),_0x26cdfb=SCENE_TO_LEGACY_TYPE[_0x1644b0],_0x525683=validateInputSelection(_0x1be6d7);if(_0x525683[_0x41bd18(0x140)]){const _0x44e5ef=new URLSearchParams({'url':_0x525683['imageUrl'],'type':_0x26cdfb,'appCode':_0x1be6d7['appCode']});return{'method':_0x41bd18(0x145),'url':_0x41bd18(0x137)+_0x44e5ef[_0x41bd18(0x12f)](),'description':_0x41bd18(0x144)+_0x1644b0+'\x20OCR\x20from\x20URL'};}const _0x2e8d67=requireDevelopmentUploadFile(_0x525683['imageFile'],_0x41bd18(0x151));return{'method':'POST','url':_0x41bd18(0x129),'body':{'steps':[{'method':_0x41bd18(0x12e),'url':_0x41bd18(0x129),'body':{'appCode':_0x1be6d7[_0x41bd18(0x122)],'multipart':{'file':_0x2e8d67}}},{'method':'POST','url':'/smartapi/common/queryFileUrl','body':{'filePath':_0x41bd18(0x12c),'downloadFlag':![]}},{'method':_0x41bd18(0x145),'url':_0x41bd18(0x147),'query':{'appCode':_0x1be6d7[_0x41bd18(0x122)],'url':_0x41bd18(0x12d),'type':_0x26cdfb}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x1644b0+'\x20OCR'};},async 'execute'(_0x1c6269){const _0xc641cf=a187_0x1ec1c9,_0x408236=normalizeScene(_0x1c6269['str'](_0xc641cf(0x152))),_0x382db9=SCENE_TO_LEGACY_TYPE[_0x408236],_0x583d30=validateInputSelection(_0x1c6269);if(_0x583d30[_0xc641cf(0x140)]){const _0x214092=await recognizeDevelopmentOcr(_0x1c6269['appCode'],{'url':_0x583d30['imageUrl'],'type':_0x382db9});return{'ok':!![],'data':withScene(_0x214092,_0x408236)};}const _0x41701f=requireDevelopmentUploadFile(_0x583d30[_0xc641cf(0x125)],_0xc641cf(0x151)),_0x290b83=await uploadDevelopmentFile(_0x1c6269['appCode'],_0x41701f[_0xc641cf(0x130)]);if(!_0x290b83['filePath'])throw CliErrors[_0xc641cf(0x12b)](_0xc641cf(0x146));const _0xbe4bc0=await queryDevelopmentFileUrl(_0x290b83['filePath'],{'download':![]});if(!_0xbe4bc0[_0xc641cf(0x127)])throw CliErrors[_0xc641cf(0x12b)](_0xc641cf(0x124));const _0x554404=await recognizeDevelopmentOcr(_0x1c6269['appCode'],{'url':_0xbe4bc0[_0xc641cf(0x127)],'type':_0x382db9});return{'ok':!![],'data':withScene(_0x554404,_0x408236,_0x290b83)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a188_0x2cd23b=a188_0x4301;function a188_0x4301(_0x5d8175,_0x3d79a2){_0x5d8175=_0x5d8175-0xf4;const _0x141422=a188_0x1414();let _0x4301f5=_0x141422[_0x5d8175];return _0x4301f5;}(function(_0x2da829,_0x463c97){const _0x465c16=a188_0x4301,_0x178b67=_0x2da829();while(!![]){try{const _0xf5f70a=-parseInt(_0x465c16(0x123))/0x1*(parseInt(_0x465c16(0x132))/0x2)+-parseInt(_0x465c16(0x113))/0x3+parseInt(_0x465c16(0x11d))/0x4*(parseInt(_0x465c16(0xfd))/0x5)+-parseInt(_0x465c16(0x11f))/0x6+parseInt(_0x465c16(0x11a))/0x7*(-parseInt(_0x465c16(0x135))/0x8)+parseInt(_0x465c16(0x12d))/0x9+-parseInt(_0x465c16(0x12a))/0xa*(-parseInt(_0x465c16(0x12c))/0xb);if(_0xf5f70a===_0x463c97)break;else _0x178b67['push'](_0x178b67['shift']());}catch(_0xc3a2ae){_0x178b67['push'](_0x178b67['shift']());}}}(a188_0x1414,0x78d5a));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';function a188_0x1414(){const _0x55f173=['length','5GdwGCx','POST','pageName\x20cannot\x20exceed\x20100\x20characters.','utf8','page-pattern','isNaN','string','some','keys','isArray','ONEPAGE','validation','Custom_page_','apiError','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','isInteger','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','appCode','page-content','/smartapi/webcode/page/create','../../../templates/custom-pages','page-type','1898250IucbPR','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','Would\x20create\x20Custom\x20Page\x20','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','parent-menu-id','page-dir','number','1736161EortEh','write','Invalid\x20Custom\x20Page\x20pattern:\x20','25652PupYPy','pageId','1168872yLodvN','create','parse','str','32132okBAGn','compress','name','menuPath','createMenu','num','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','4924470KIxbeV','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','33GPyJjq','1648485BPqQYA','.json','stringify','toLowerCase','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','6KGbKkZ','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','8hVKCKl','now','Custom\x20Page\x20pattern\x20not\x20found:\x20','Created\x20Custom\x20Page\x20','trim','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','page.create','files','pageName','parentMenuId'];a188_0x1414=function(){return _0x55f173;};return a188_0x1414();}import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=['BLANK',a188_0x2cd23b(0x107),'DASHBOARD'],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a188_0x2cd23b(0x111));export const pageCreate={'service':'page','command':a188_0x2cd23b(0x120),'description':a188_0x2cd23b(0x129),'risk':a188_0x2cd23b(0x11b),'defaultOutputFormat':a188_0x2cd23b(0x124),'structuredErrors':!![],'rejectedFlags':[{'name':a188_0x2cd23b(0x112),'message':'page\x20create\x20does\x20not\x20accept\x20--page-type.','hint':a188_0x2cd23b(0xf7)},{'name':a188_0x2cd23b(0x10f),'message':a188_0x2cd23b(0x133),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'name','type':a188_0x2cd23b(0x103),'description':a188_0x2cd23b(0x10d)},{'name':a188_0x2cd23b(0x117),'type':a188_0x2cd23b(0x119),'description':'Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry'},{'name':a188_0x2cd23b(0x101),'type':a188_0x2cd23b(0x103),'description':'Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','enum':CUSTOM_PAGE_PATTERNS},{'name':'page-dir','type':a188_0x2cd23b(0x103),'description':'Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)'},APPCODE_FLAG],async 'validate'(_0x48f886){await readValidatedPageSource(_0x48f886);},async 'dryRun'(_0x590ac8){const _0x3fff52=a188_0x2cd23b,_0x55c00=readInput(_0x590ac8,await readValidatedPageSource(_0x590ac8));return{'method':_0x3fff52(0xfe),'url':_0x3fff52(0x110),'body':{'appCode':_0x55c00[_0x3fff52(0x10e)],'pageName':_0x55c00[_0x3fff52(0xfa)],..._0x55c00['parentMenuId']!=null?{'parentMenuId':_0x55c00[_0x3fff52(0xfb)]}:{},'createMenu':_0x55c00[_0x3fff52(0x127)],'codeContent':_0x55c00[_0x3fff52(0xf9)]},'description':_0x3fff52(0x115)+JSON[_0x3fff52(0x12f)](_0x55c00[_0x3fff52(0xfa)])+'\x20and\x20its\x20menu\x20entry.'};},async 'execute'(_0x4e43ed){const _0x229c51=a188_0x2cd23b,_0xe48cf0=readInput(_0x4e43ed,await readValidatedPageSource(_0x4e43ed)),_0x4aa2ec=await createCustomPage(_0xe48cf0);if(!Number[_0x229c51(0x10c)](_0x4aa2ec[_0x229c51(0x11e)])||_0x4aa2ec[_0x229c51(0x11e)]<=0x0)throw CliErrors[_0x229c51(0x10a)](_0x229c51(0x116));const _0x31a2bd=buildCustomPageDevelopmentUrl(_0xe48cf0[_0x229c51(0x10e)],_0x4aa2ec['menuPath']),_0x15931e=buildCustomPageEditUrl(_0xe48cf0['appCode'],_0x4aa2ec[_0x229c51(0x11e)]);return{'ok':!![],'data':{'operation':_0x229c51(0xf8),'pageType':'CUSTOM','pagePattern':readPagePattern(_0x4e43ed),'selector':{'appCode':_0xe48cf0[_0x229c51(0x10e)],'pageName':_0xe48cf0['pageName']},'before':null,'after':{'pageId':_0x4aa2ec['pageId'],'pageName':_0x4aa2ec[_0x229c51(0xfa)],'appCode':_0x4aa2ec['appCode'],'version':_0x4aa2ec['version'],'menuId':_0x4aa2ec['menuId'],'menuPath':_0x4aa2ec[_0x229c51(0x126)],'files':_0x4aa2ec[_0x229c51(0xf9)]??Object[_0x229c51(0x105)](_0xe48cf0[_0x229c51(0xf9)])},'dryRun':![],'request':_0xe48cf0,..._0x31a2bd?{'pageUrl':_0x31a2bd}:{},..._0x15931e?{'editPageUrl':_0x15931e}:{},'warnings':_0x31a2bd?[]:[_0x229c51(0x114)]},'message':_0x229c51(0xf5)+_0x4aa2ec['pageId']+'.'};}};function readPagePattern(_0x522609){const _0x39a868=a188_0x2cd23b,_0x58d7bf=_0x522609[_0x39a868(0x122)](_0x39a868(0x101))[_0x39a868(0xf6)](),_0x46e3e9=_0x522609[_0x39a868(0x122)](_0x39a868(0x118))[_0x39a868(0xf6)]();if(_0x58d7bf&&_0x46e3e9)throw CliErrors[_0x39a868(0x108)](_0x39a868(0x134));if(_0x46e3e9)return null;if(!_0x58d7bf)throw CliErrors['validation'](_0x39a868(0x12b));if(!CUSTOM_PAGE_PATTERNS['includes'](_0x58d7bf))throw CliErrors[_0x39a868(0x108)](_0x39a868(0x10b));return _0x58d7bf;}async function readPageSource(_0x2ae10e){const _0x204abb=a188_0x2cd23b,_0x54c5da=_0x2ae10e[_0x204abb(0x122)]('page-dir')[_0x204abb(0xf6)](),_0x300a49=readPagePattern(_0x2ae10e);if(_0x300a49===null){const _0x8fef9d=await readCustomPageDirectory(_0x54c5da);if(Object[_0x204abb(0x105)](_0x8fef9d)[_0x204abb(0xfc)]===0x0)throw CliErrors[_0x204abb(0x108)](_0x204abb(0x131));return _0x8fef9d;}let _0x2c68dd;try{_0x2c68dd=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x300a49[_0x204abb(0x130)]()+_0x204abb(0x12e)),_0x204abb(0x100));}catch{throw CliErrors[_0x204abb(0x108)](_0x204abb(0xf4)+_0x300a49+'.');}let _0x405be5;try{_0x405be5=JSON[_0x204abb(0x121)](_0x2c68dd);}catch{throw CliErrors[_0x204abb(0x108)]('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x300a49+'.');}if(!_0x405be5||typeof _0x405be5!=='object'||Array[_0x204abb(0x106)](_0x405be5)||Object['values'](_0x405be5)[_0x204abb(0x104)](_0x1071da=>typeof _0x1071da!==_0x204abb(0x103)))throw CliErrors[_0x204abb(0x108)](_0x204abb(0x11c)+_0x300a49+'.');return _0x405be5;}async function readValidatedPageSource(_0x3652b2){const _0x4711fc=await readPageSource(_0x3652b2);return await validateCustomPageContent(_0x4711fc),_0x4711fc;}function readInput(_0x509fcf,_0x596509){const _0xf5c08e=a188_0x2cd23b,_0x5a17c5=_0x509fcf[_0xf5c08e(0x122)](_0xf5c08e(0x125))[_0xf5c08e(0xf6)]()||_0xf5c08e(0x109)+Date[_0xf5c08e(0x136)]();if(_0x5a17c5[_0xf5c08e(0xfc)]>0x64)throw CliErrors['validation'](_0xf5c08e(0xff));const _0x50e7a5=_0x509fcf[_0xf5c08e(0x128)]('parent-menu-id',NaN),_0x55028f=!Number[_0xf5c08e(0x102)](_0x50e7a5);if(_0x55028f&&(!Number[_0xf5c08e(0x10c)](_0x50e7a5)||_0x50e7a5<=0x0))throw CliErrors[_0xf5c08e(0x108)]('--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.');return{'appCode':_0x509fcf[_0xf5c08e(0x10e)],'pageName':_0x5a17c5,..._0x55028f?{'parentMenuId':_0x50e7a5}:{},'createMenu':!![],'files':_0x596509};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a189_0x187d27=a189_0x487a;(function(_0x400dc8,_0x5b9a20){const _0x50404d=a189_0x487a,_0x274b0d=_0x400dc8();while(!![]){try{const _0x32b2c9=parseInt(_0x50404d(0x151))/0x1+parseInt(_0x50404d(0x144))/0x2*(-parseInt(_0x50404d(0x13f))/0x3)+-parseInt(_0x50404d(0x156))/0x4*(parseInt(_0x50404d(0x146))/0x5)+-parseInt(_0x50404d(0x14a))/0x6+-parseInt(_0x50404d(0x14e))/0x7+parseInt(_0x50404d(0x14f))/0x8+parseInt(_0x50404d(0x14b))/0x9;if(_0x32b2c9===_0x5b9a20)break;else _0x274b0d['push'](_0x274b0d['shift']());}catch(_0x1b887e){_0x274b0d['push'](_0x274b0d['shift']());}}}(a189_0x190d,0xa3e24));import{getCustomPageSource}from'../../../core/api-client.js';function a189_0x487a(_0x596cb1,_0x5af85a){_0x596cb1=_0x596cb1-0x13e;const _0x190d19=a189_0x190d();let _0x487aea=_0x190d19[_0x596cb1];return _0x487aea;}function a189_0x190d(){const _0x56e774=['Retrieved\x20Custom\x20Page\x20','getMinutes','126788SaxCgs','Custom\x20Page\x20ID','5740rtGlPx','join','pageCode','getHours','4471002wrzjwS','21014253NraBvC','padStart','getTime','815794tQHVxJ','6287928WDmcIP','custom-detail','259181GpFvlq','getDate','appcode','getSeconds','page','2460GIZDza','isNaN','read','getFullYear','getMonth','54QynVvG','trim','cookie'];a189_0x190d=function(){return _0x56e774;};return a189_0x190d();}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a189_0x187d27(0x155),'command':a189_0x187d27(0x150),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':a189_0x187d27(0x158),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a189_0x187d27(0x145)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x29859d){readCustomPageId(_0x29859d);},async 'execute'(_0x32d9ee){const _0x4454d1=a189_0x187d27,_0x572a51=readCustomPageId(_0x32d9ee),_0x36acbc=await getCustomPageSource(_0x572a51),{bundle:_0x28f1e5,createTime:_0x3347f2,updateTime:_0x2104ae,..._0x15a8d4}=_0x36acbc,_0x317d7e=_0x36acbc['id']??_0x572a51,_0x3545e5=_0x36acbc['appCode']?.['trim']()||_0x32d9ee['str'](_0x4454d1(0x153))[_0x4454d1(0x140)](),_0x43a4d6=buildCustomPageRuntimeUrl(_0x3545e5,_0x36acbc[_0x4454d1(0x148)]),_0x12e3c4=buildCustomPageEditUrl(_0x3545e5,_0x317d7e),_0x572cc9=await resolveCustomPageDevelopmentUrl(_0x3545e5,_0x317d7e,_0x32d9ee[_0x4454d1(0x141)]);return{'ok':!![],'data':{..._0x15a8d4,..._0x43a4d6?{'runtimePageUrl':_0x43a4d6}:{},..._0x572cc9?{'pageUrl':_0x572cc9}:{},..._0x12e3c4?{'editPageUrl':_0x12e3c4}:{},..._0x3347f2==null?{}:{'createTime':formatTime(_0x3347f2)},..._0x2104ae==null?{}:{'updateTime':formatTime(_0x2104ae)}},'message':_0x4454d1(0x142)+_0x572a51+'.'};}};function formatTime(_0x45c125){const _0x2d433a=a189_0x187d27,_0x42c3a3=new Date(_0x45c125);if(Number[_0x2d433a(0x157)](_0x42c3a3[_0x2d433a(0x14d)]()))return String(_0x45c125);const _0x1c3b77=[_0x42c3a3[_0x2d433a(0x159)](),String(_0x42c3a3[_0x2d433a(0x13e)]()+0x1)[_0x2d433a(0x14c)](0x2,'0'),String(_0x42c3a3[_0x2d433a(0x152)]())[_0x2d433a(0x14c)](0x2,'0')][_0x2d433a(0x147)]('-'),_0x6308f1=[String(_0x42c3a3[_0x2d433a(0x149)]())[_0x2d433a(0x14c)](0x2,'0'),String(_0x42c3a3[_0x2d433a(0x143)]())['padStart'](0x2,'0'),String(_0x42c3a3[_0x2d433a(0x154)]())['padStart'](0x2,'0')]['join'](':');return _0x1c3b77+'\x20'+_0x6308f1;}
|