@lovrabet/rabetbase-cli 2.5.10-beta.1 → 2.5.10-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.d.ts +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.d.ts +0 -28
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.d.ts +8 -0
- package/lib/core/instant-api-policy/endpoints.js +1 -0
- package/lib/core/kb-management-client.d.ts +3 -9
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +1 -4
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/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-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a188_0x3b92(_0x29d4c2,_0x3f6fc7){_0x29d4c2=_0x29d4c2-0x1c6;const _0x41fcf4=a188_0x41fc();let _0x3b92c4=_0x41fcf4[_0x29d4c2];return _0x3b92c4;}const a188_0x48cdaf=a188_0x3b92;(function(_0x902492,_0x5720ae){const _0x520678=a188_0x3b92,_0x449d32=_0x902492();while(!![]){try{const _0x5bedb9=-parseInt(_0x520678(0x1cd))/0x1+-parseInt(_0x520678(0x1d1))/0x2*(-parseInt(_0x520678(0x1d2))/0x3)+parseInt(_0x520678(0x1cf))/0x4*(-parseInt(_0x520678(0x1c8))/0x5)+parseInt(_0x520678(0x1cc))/0x6*(-parseInt(_0x520678(0x1cb))/0x7)+-parseInt(_0x520678(0x1d6))/0x8*(parseInt(_0x520678(0x1ce))/0x9)+parseInt(_0x520678(0x1d4))/0xa+parseInt(_0x520678(0x1c7))/0xb;if(_0x5bedb9===_0x5720ae)break;else _0x449d32['push'](_0x449d32['shift']());}catch(_0x24c77e){_0x449d32['push'](_0x449d32['shift']());}}}(a188_0x41fc,0xcb143));function a188_0x41fc(){const _0x13bca1=['18008CtUPtV','\x20menu(s)\x20for\x20','10ybQueK','281811NPCowK','cookie','4479580gDaJTJ','read','561992vihRlW','\x20in\x20menu\x20host\x20','39650886dHJJWd','300fCMhSh','all','boundMenus','14rWWmDQ','1164624BLSmEq','1416403pchlFy','207ZAaRFd'];a188_0x41fc=function(){return _0x13bca1;};return a188_0x41fc();}import{getSmartAppRecord}from'../../core/api-client.js';import{getOnlineMenuList}from'../../commands/menu/shared/service.js';import{buildSubappAssetsStatus,getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';export const menuSubappAssetsStatus={'service':'menu','command':'subapp-assets-status','description':'Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','risk':a188_0x48cdaf(0x1d5),'strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x260ce0){getSubappSelector(_0x260ce0);},async 'execute'(_0x41b471){const _0x474090=a188_0x48cdaf,{appCode:_0x1bc450,appName:_0x3a57fa}=getSubappSelector(_0x41b471),[_0x34750f,_0x35f2e1]=await Promise[_0x474090(0x1c9)]([getSmartAppRecord(_0x1bc450,_0x41b471[_0x474090(0x1d3)]),getOnlineMenuList(_0x1bc450,_0x41b471['cookie'])]),_0x2a20bf={'appCode':_0x1bc450,...buildSubappAssetsStatus(_0x34750f,_0x35f2e1,_0x3a57fa)};return{'ok':!![],'data':_0x2a20bf,'message':'Inspected\x20'+_0x2a20bf[_0x474090(0x1ca)]+_0x474090(0x1d0)+_0x3a57fa+_0x474090(0x1c6)+_0x1bc450+'.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a189_0x5d9452=a189_0x237d;(function(_0x27dd60,_0x52a51a){const _0x695b9=a189_0x237d,_0x2e478f=_0x27dd60();while(!![]){try{const _0x1bc54b=-parseInt(_0x695b9(0x71))/0x1+parseInt(_0x695b9(0x7d))/0x2+-parseInt(_0x695b9(0xb4))/0x3+-parseInt(_0x695b9(0x92))/0x4+parseInt(_0x695b9(0xb0))/0x5*(parseInt(_0x695b9(0x98))/0x6)+-parseInt(_0x695b9(0xa6))/0x7*(parseInt(_0x695b9(0xa5))/0x8)+parseInt(_0x695b9(0xaf))/0x9;if(_0x1bc54b===_0x52a51a)break;else _0x2e478f['push'](_0x2e478f['shift']());}catch(_0x286ccc){_0x2e478f['push'](_0x2e478f['shift']());}}}(a189_0x15f2,0xe9d0d));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';function a189_0x237d(_0x36471b,_0x49822c){_0x36471b=_0x36471b-0x70;const _0x15f297=a189_0x15f2();let _0x237db0=_0x15f297[_0x36471b];return _0x237db0;}import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set([a189_0x5d9452(0xab),a189_0x5d9452(0xaa),'accessKey',a189_0x5d9452(0x8c),a189_0x5d9452(0xb3),'enableSample',a189_0x5d9452(0xa7),a189_0x5d9452(0x7f),'directDbId','directDbEnabled']);function parseObject(_0x3febf0,_0x8ac8bd){const _0x414cf3=a189_0x5d9452;let _0x894538=_0x3febf0;if(typeof _0x3febf0===_0x414cf3(0x93))try{_0x894538=JSON[_0x414cf3(0x7c)](_0x3febf0);}catch{throw CliErrors[_0x414cf3(0x8a)](_0x8ac8bd+'\x20contains\x20invalid\x20JSON.');}if(!_0x894538||typeof _0x894538!=='object'||Array[_0x414cf3(0xa9)](_0x894538))throw CliErrors[_0x414cf3(0x8a)](_0x8ac8bd+_0x414cf3(0x79));return _0x894538;}function parseArray(_0x9c8fc5,_0x428603){const _0x273918=a189_0x5d9452;let _0x1c5a81;try{_0x1c5a81=JSON['parse'](_0x9c8fc5);}catch{throw CliErrors['validation'](_0x428603+_0x273918(0x74));}if(!Array[_0x273918(0xa9)](_0x1c5a81))throw CliErrors[_0x273918(0x8a)](_0x428603+'\x20must\x20be\x20a\x20JSON\x20array.');return _0x1c5a81[_0x273918(0x87)]((_0x5eb4ca,_0x26343f)=>parseObject(_0x5eb4ca,_0x428603+'['+_0x26343f+']'));}function validateResources(_0x2b6e95){const _0x267d9f=a189_0x5d9452;if(_0x2b6e95[_0x267d9f(0xb8)]===0x0)throw CliErrors['validation']('At\x20least\x20one\x20resource\x20URL\x20is\x20required.');for(const [_0x30c47d,_0x92b5d0]of _0x2b6e95[_0x267d9f(0xa1)]()){if(typeof _0x92b5d0!=='string')throw CliErrors[_0x267d9f(0x8a)](_0x267d9f(0xa8)+_0x30c47d+_0x267d9f(0x7b));try{if(new URL(_0x92b5d0)[_0x267d9f(0xbd)]!=='https:')throw new Error(_0x267d9f(0xc0));}catch{throw CliErrors[_0x267d9f(0x8a)](_0x267d9f(0xa8)+_0x30c47d+_0x267d9f(0xb9));}}if(new Set(_0x2b6e95)[_0x267d9f(0x70)]!==_0x2b6e95[_0x267d9f(0xb8)]||!_0x2b6e95[_0x267d9f(0x9b)](_0xca7cdb=>/\.m?js(?:[?#]|$)/i[_0x267d9f(0xc2)](_0xca7cdb)))throw CliErrors['validation'](_0x267d9f(0x86));return _0x2b6e95;}function prepare(_0x4d5465,_0x4eb738,_0x13339c){const _0x33b1b5=a189_0x5d9452;if(!Number[_0x33b1b5(0x73)](_0x4d5465['id'])||(_0x4d5465['id']??0x0)<=0x0||typeof _0x4d5465[_0x33b1b5(0x91)]!==_0x33b1b5(0x93)||!_0x4d5465[_0x33b1b5(0x91)])throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0xad));const _0x153b5b=parseObject(_0x4d5465[_0x33b1b5(0x96)],_0x33b1b5(0x90)),_0x2d1ff6=Object[_0x33b1b5(0x9c)](_0x153b5b)[_0x33b1b5(0x72)](_0x1acf5e=>!KNOWN_EXTEND_KEYS[_0x33b1b5(0x84)](_0x1acf5e));if(_0x2d1ff6[_0x33b1b5(0xb8)])throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0x9d)+_0x2d1ff6[_0x33b1b5(0x8b)](',\x20')+_0x33b1b5(0x83));if(typeof _0x153b5b[_0x33b1b5(0x8c)]!==_0x33b1b5(0x93))throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0xb2));const _0x280241=parseArray(_0x153b5b[_0x33b1b5(0x8c)],_0x33b1b5(0xbc)),_0x5bec1a=_0x280241[_0x33b1b5(0x72)](_0x4995ab=>_0x4995ab[_0x33b1b5(0x80)]===_0x4eb738);if(_0x5bec1a[_0x33b1b5(0xb8)]!==0x1)throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0xc1)+_0x4eb738+_0x33b1b5(0xac)+_0x5bec1a[_0x33b1b5(0xb8)]+'.');const _0x4ba31a=_0x5bec1a[0x0];if(typeof _0x4ba31a[_0x33b1b5(0xb5)]!==_0x33b1b5(0x93))throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0xae));let _0x415a2d;try{_0x415a2d=JSON[_0x33b1b5(0x7c)](_0x4ba31a[_0x33b1b5(0xb5)]);}catch{throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0x77));}if(!Array['isArray'](_0x415a2d)||_0x415a2d['some'](_0x4bbc5b=>typeof _0x4bbc5b!==_0x33b1b5(0x93)))throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0x8f));const _0x24b13f=_0x280241['map'](_0x512cfc=>_0x512cfc===_0x4ba31a?{..._0x512cfc,'resources':JSON[_0x33b1b5(0xa2)](_0x13339c)}:_0x512cfc),_0x4b8500={..._0x153b5b,'assets':JSON[_0x33b1b5(0xa2)](_0x24b13f)},_0x261f88=createHash(_0x33b1b5(0x94))[_0x33b1b5(0x7a)](JSON[_0x33b1b5(0xa2)]({'appCode':_0x4d5465[_0x33b1b5(0xbb)],'id':_0x4d5465['id'],'appPublishStatus':_0x4d5465['appPublishStatus'],'extend':_0x153b5b,'appName':_0x4eb738,'resources':_0x13339c}))[_0x33b1b5(0x81)](_0x33b1b5(0x99));return{'before':_0x415a2d,'nextExtend':_0x4b8500,'expectedHash':_0x261f88,'unchanged':isDeepStrictEqual(_0x415a2d,_0x13339c)};}function flags(_0x1c2ad0){const _0x4997ad=a189_0x5d9452,{appCode:_0x5199c9,appName:_0x3cc79e}=getSubappSelector(_0x1c2ad0),_0x525c49=_0x1c2ad0[_0x4997ad(0x7e)](_0x4997ad(0xb5))['trim']();if(!_0x525c49)throw CliErrors[_0x4997ad(0x8a)](_0x4997ad(0x78));let _0x94fbee;try{_0x94fbee=JSON[_0x4997ad(0x7c)](_0x525c49);}catch{throw CliErrors[_0x4997ad(0x8a)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');}if(!Array[_0x4997ad(0xa9)](_0x94fbee))throw CliErrors['validation'](_0x4997ad(0xa4));return{'appCode':_0x5199c9,'appName':_0x3cc79e,'resources':validateResources(_0x94fbee)};}export const menuSubappAssetsUpdate={'service':'menu','command':a189_0x5d9452(0xa3),'description':'Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','risk':a189_0x5d9452(0xbe),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a189_0x5d9452(0xb5),'type':'string','required':!![],'description':'JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs'},{'name':'expected-hash','type':a189_0x5d9452(0x93),'description':a189_0x5d9452(0xba)}],async 'validate'(_0x3e3e18){flags(_0x3e3e18);},async 'dryRun'(_0x4fb3c4){const _0x480f7a=a189_0x5d9452,{appCode:_0x2c397e,appName:_0x51107d,resources:_0x789c0d}=flags(_0x4fb3c4),_0x6f95af=await getSmartAppRecord(_0x2c397e,_0x4fb3c4[_0x480f7a(0x76)]),_0x3891b4=prepare(_0x6f95af,_0x51107d,_0x789c0d);return{'method':_0x480f7a(0xb7),'url':_0x480f7a(0xbf),'body':{'preview':{'appCode':_0x2c397e,'appName':_0x51107d,'before':_0x3891b4[_0x480f7a(0x8d)],'after':_0x789c0d,'expectedHash':_0x3891b4[_0x480f7a(0x9a)],'unchanged':_0x3891b4[_0x480f7a(0x88)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x3891b4[_0x480f7a(0x88)]?_0x480f7a(0x9e):_0x480f7a(0xa0)+_0x51107d+'.'};},async 'execute'(_0x2ea8cf){const _0x365bd5=a189_0x5d9452,{appCode:_0x40e591,appName:_0x114849,resources:_0x5e5704}=flags(_0x2ea8cf),_0x57a12d=_0x2ea8cf[_0x365bd5(0x7e)](_0x365bd5(0x82))['trim']();if(!/^[a-f0-9]{64}$/i[_0x365bd5(0xc2)](_0x57a12d))throw CliErrors[_0x365bd5(0x8a)](_0x365bd5(0x75));const _0x44dd66=await getSmartAppRecord(_0x40e591,_0x2ea8cf['cookie']),_0x4e528b=prepare(_0x44dd66,_0x114849,_0x5e5704);if(_0x57a12d!==_0x4e528b[_0x365bd5(0x9a)])throw CliErrors['validation'](_0x365bd5(0xb6));if(_0x4e528b[_0x365bd5(0x88)])return{'ok':!![],'data':{'appCode':_0x40e591,'appName':_0x114849,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x365bd5(0x97)};await updateSmartAppRecord({'id':_0x44dd66['id'],'appCode':_0x40e591,'appPublishStatus':_0x44dd66[_0x365bd5(0x91)],'extend':_0x4e528b['nextExtend']},_0x2ea8cf[_0x365bd5(0x76)]);const _0x54e47c=await getSmartAppRecord(_0x40e591,_0x2ea8cf[_0x365bd5(0x76)]),_0x645258=parseObject(_0x54e47c[_0x365bd5(0x96)],_0x365bd5(0xb1));if(_0x54e47c['id']!==_0x44dd66['id']||_0x54e47c[_0x365bd5(0x91)]!==_0x44dd66[_0x365bd5(0x91)]||!isDeepStrictEqual(_0x645258,_0x4e528b[_0x365bd5(0x95)]))throw CliErrors[_0x365bd5(0x8e)]('App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.');return{'ok':!![],'data':{'appCode':_0x40e591,'appName':_0x114849,'updated':!![],'resources':_0x5e5704,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x365bd5(0x9f)+_0x114849+_0x365bd5(0x89)+_0x40e591+_0x365bd5(0x85)};}};function a189_0x15f2(){const _0x21157f=['test','size','1153913apinot','filter','isSafeInteger','\x20contains\x20invalid\x20JSON.','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','cookie','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','--resources\x20is\x20required.','\x20must\x20be\x20a\x20JSON\x20object.','update',']\x20must\x20be\x20a\x20URL\x20string.','parse','2901276byNcTp','str','enableAutoSync','appName','digest','expected-hash','.\x20Refusing\x20update.','has',';\x20independent\x20deployment\x20not\x20verified.','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','map','unchanged','\x20in\x20menu\x20host\x20','validation','join','assets','before','apiError','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','app.extend','appPublishStatus','3326020ARYvff','string','sha256','nextExtend','extend','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','11301486YtJhkk','hex','expectedHash','some','keys','Unknown\x20app.extend\x20fields:\x20','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.','Updated\x20shared\x20resources\x20for\x20','Would\x20update\x20shared\x20assets\x20for\x20','entries','stringify','subapp-assets-update','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','2488jsfHRd','23555nrttFL','vipDeploy','resources[','isArray','enableOpenApi','skinColor',';\x20found\x20','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','19201095vBEjuY','5MgPHcu','verified\x20app.extend','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','tenantColumn','4434096ptQLXT','resources','App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.','POST','length',']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.','Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','appCode','app.extend.assets','protocol','write','/smartapi/app/update','not\x20HTTPS','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20'];a189_0x15f2=function(){return _0x21157f;};return a189_0x15f2();}
|
|
1
|
+
const a189_0x5993aa=a189_0x2e7d;(function(_0x12e37d,_0x20fbfb){const _0x22c894=a189_0x2e7d,_0x35080c=_0x12e37d();while(!![]){try{const _0x99c034=-parseInt(_0x22c894(0x148))/0x1+parseInt(_0x22c894(0x15b))/0x2*(-parseInt(_0x22c894(0x12b))/0x3)+parseInt(_0x22c894(0x13d))/0x4+parseInt(_0x22c894(0x12c))/0x5*(parseInt(_0x22c894(0x12d))/0x6)+parseInt(_0x22c894(0x164))/0x7*(parseInt(_0x22c894(0x169))/0x8)+parseInt(_0x22c894(0x141))/0x9*(-parseInt(_0x22c894(0x161))/0xa)+-parseInt(_0x22c894(0x13e))/0xb*(-parseInt(_0x22c894(0x146))/0xc);if(_0x99c034===_0x20fbfb)break;else _0x35080c['push'](_0x35080c['shift']());}catch(_0x426e2d){_0x35080c['push'](_0x35080c['shift']());}}}(a189_0x2995,0x510ea));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set([a189_0x5993aa(0x167),'enableOpenApi',a189_0x5993aa(0x165),'assets','tenantColumn',a189_0x5993aa(0x170),a189_0x5993aa(0x13a),a189_0x5993aa(0x130),'directDbId',a189_0x5993aa(0x131)]);function parseObject(_0x3b3c8c,_0x453639){const _0x1a354a=a189_0x5993aa;let _0x4411fe=_0x3b3c8c;if(typeof _0x3b3c8c===_0x1a354a(0x168))try{_0x4411fe=JSON[_0x1a354a(0x156)](_0x3b3c8c);}catch{throw CliErrors[_0x1a354a(0x135)](_0x453639+_0x1a354a(0x172));}if(!_0x4411fe||typeof _0x4411fe!==_0x1a354a(0x138)||Array[_0x1a354a(0x16c)](_0x4411fe))throw CliErrors['validation'](_0x453639+_0x1a354a(0x14a));return _0x4411fe;}function parseArray(_0x5576a8,_0xb14f0f){const _0x1b923f=a189_0x5993aa;let _0x2bdce2;try{_0x2bdce2=JSON[_0x1b923f(0x156)](_0x5576a8);}catch{throw CliErrors[_0x1b923f(0x135)](_0xb14f0f+_0x1b923f(0x172));}if(!Array['isArray'](_0x2bdce2))throw CliErrors[_0x1b923f(0x135)](_0xb14f0f+_0x1b923f(0x14f));return _0x2bdce2[_0x1b923f(0x16f)]((_0xf21589,_0x1c130b)=>parseObject(_0xf21589,_0xb14f0f+'['+_0x1c130b+']'));}function validateResources(_0x59e78f){const _0x295b58=a189_0x5993aa;if(_0x59e78f[_0x295b58(0x143)]===0x0)throw CliErrors[_0x295b58(0x135)](_0x295b58(0x140));for(const [_0x26dfd1,_0x32f32b]of _0x59e78f[_0x295b58(0x14d)]()){if(typeof _0x32f32b!=='string')throw CliErrors[_0x295b58(0x135)](_0x295b58(0x144)+_0x26dfd1+_0x295b58(0x14b));try{if(new URL(_0x32f32b)[_0x295b58(0x12f)]!==_0x295b58(0x162))throw new Error('not\x20HTTPS');}catch{throw CliErrors['validation'](_0x295b58(0x144)+_0x26dfd1+_0x295b58(0x137));}}if(new Set(_0x59e78f)[_0x295b58(0x171)]!==_0x59e78f[_0x295b58(0x143)]||!_0x59e78f[_0x295b58(0x16a)](_0x404fdd=>/\.m?js(?:[?#]|$)/i[_0x295b58(0x163)](_0x404fdd)))throw CliErrors['validation'](_0x295b58(0x126));return _0x59e78f;}function a189_0x2995(){const _0x5ecc7b=['write','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','assets','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','apiError','filter','1799109rojKbs','688030JplwRM','12abxsoM','resources','protocol','enableAutoSync','directDbEnabled','join','App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.','nextExtend','validation','isSafeInteger',']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.','object','before','vipDeploy','\x20in\x20menu\x20host\x20','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','235532HsALlS','1199704QoQmdl','unchanged','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','9XCPPyR','has','length','resources[','app.extend.assets','96ZgrvfX','digest','428715PCXOGQ','subapp-assets-update','\x20must\x20be\x20a\x20JSON\x20object.',']\x20must\x20be\x20a\x20URL\x20string.','expectedHash','entries','cookie','\x20must\x20be\x20a\x20JSON\x20array.','appName','hex','appCode','trim','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','.\x20Refusing\x20update.','parse','app.extend','update','--resources\x20is\x20required.','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','2xUGKSx','Would\x20update\x20shared\x20assets\x20for\x20','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','expected-hash','stringify','sha256','2340790zUdEHh','https:','test','175FvubSs','accessKey','appPublishStatus','skinColor','string','124128bYEeOx','some','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20','isArray','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.','extend','map','enableSample','size','\x20contains\x20invalid\x20JSON.'];a189_0x2995=function(){return _0x5ecc7b;};return a189_0x2995();}function a189_0x2e7d(_0x47cae6,_0x318f93){_0x47cae6=_0x47cae6-0x124;const _0x2995a1=a189_0x2995();let _0x2e7d06=_0x2995a1[_0x47cae6];return _0x2e7d06;}function prepare(_0x428708,_0x25f859,_0x2372f9){const _0x249f15=a189_0x5993aa;if(!Number[_0x249f15(0x136)](_0x428708['id'])||(_0x428708['id']??0x0)<=0x0||typeof _0x428708[_0x249f15(0x166)]!==_0x249f15(0x168)||!_0x428708[_0x249f15(0x166)])throw CliErrors[_0x249f15(0x135)](_0x249f15(0x174));const _0x15df47=parseObject(_0x428708['extend'],_0x249f15(0x157)),_0x5b054f=Object['keys'](_0x15df47)[_0x249f15(0x12a)](_0x4f9626=>!KNOWN_EXTEND_KEYS[_0x249f15(0x142)](_0x4f9626));if(_0x5b054f['length'])throw CliErrors['validation']('Unknown\x20app.extend\x20fields:\x20'+_0x5b054f[_0x249f15(0x132)](',\x20')+_0x249f15(0x155));if(typeof _0x15df47[_0x249f15(0x175)]!==_0x249f15(0x168))throw CliErrors[_0x249f15(0x135)](_0x249f15(0x15a));const _0x1c81df=parseArray(_0x15df47[_0x249f15(0x175)],_0x249f15(0x145)),_0x14c2c3=_0x1c81df[_0x249f15(0x12a)](_0x428007=>_0x428007[_0x249f15(0x150)]===_0x25f859);if(_0x14c2c3[_0x249f15(0x143)]!==0x1)throw CliErrors['validation'](_0x249f15(0x16b)+_0x25f859+';\x20found\x20'+_0x14c2c3['length']+'.');const _0x13c4d6=_0x14c2c3[0x0];if(typeof _0x13c4d6[_0x249f15(0x12e)]!==_0x249f15(0x168))throw CliErrors[_0x249f15(0x135)](_0x249f15(0x128));let _0x426d94;try{_0x426d94=JSON['parse'](_0x13c4d6['resources']);}catch{throw CliErrors['validation'](_0x249f15(0x124));}if(!Array[_0x249f15(0x16c)](_0x426d94)||_0x426d94[_0x249f15(0x16a)](_0x3d2eaa=>typeof _0x3d2eaa!==_0x249f15(0x168)))throw CliErrors[_0x249f15(0x135)](_0x249f15(0x154));const _0x248efc=_0x1c81df[_0x249f15(0x16f)](_0x2db5f9=>_0x2db5f9===_0x13c4d6?{..._0x2db5f9,'resources':JSON[_0x249f15(0x15f)](_0x2372f9)}:_0x2db5f9),_0x587641={..._0x15df47,'assets':JSON[_0x249f15(0x15f)](_0x248efc)},_0x252701=createHash(_0x249f15(0x160))[_0x249f15(0x158)](JSON[_0x249f15(0x15f)]({'appCode':_0x428708[_0x249f15(0x152)],'id':_0x428708['id'],'appPublishStatus':_0x428708[_0x249f15(0x166)],'extend':_0x15df47,'appName':_0x25f859,'resources':_0x2372f9}))[_0x249f15(0x147)](_0x249f15(0x151));return{'before':_0x426d94,'nextExtend':_0x587641,'expectedHash':_0x252701,'unchanged':isDeepStrictEqual(_0x426d94,_0x2372f9)};}function flags(_0x2d1e74){const _0x462451=a189_0x5993aa,{appCode:_0xbe64c,appName:_0x48f354}=getSubappSelector(_0x2d1e74),_0x2d7447=_0x2d1e74['str'](_0x462451(0x12e))[_0x462451(0x153)]();if(!_0x2d7447)throw CliErrors[_0x462451(0x135)](_0x462451(0x159));let _0x4a210e;try{_0x4a210e=JSON[_0x462451(0x156)](_0x2d7447);}catch{throw CliErrors[_0x462451(0x135)](_0x462451(0x15d));}if(!Array[_0x462451(0x16c)](_0x4a210e))throw CliErrors[_0x462451(0x135)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');return{'appCode':_0xbe64c,'appName':_0x48f354,'resources':validateResources(_0x4a210e)};}export const menuSubappAssetsUpdate={'service':'menu','command':a189_0x5993aa(0x149),'description':'Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','risk':a189_0x5993aa(0x173),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a189_0x5993aa(0x12e),'type':a189_0x5993aa(0x168),'required':!![],'description':a189_0x5993aa(0x125)},{'name':a189_0x5993aa(0x15e),'type':'string','description':'Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes'}],async 'validate'(_0x15adc4){flags(_0x15adc4);},async 'dryRun'(_0x93404){const _0x41ae2c=a189_0x5993aa,{appCode:_0x352e0f,appName:_0x52f378,resources:_0x270854}=flags(_0x93404),_0x3262ab=await getSmartAppRecord(_0x352e0f,_0x93404['cookie']),_0x26c00d=prepare(_0x3262ab,_0x52f378,_0x270854);return{'method':'POST','url':'/smartapi/app/update','body':{'preview':{'appCode':_0x352e0f,'appName':_0x52f378,'before':_0x26c00d[_0x41ae2c(0x139)],'after':_0x270854,'expectedHash':_0x26c00d[_0x41ae2c(0x14c)],'unchanged':_0x26c00d[_0x41ae2c(0x13f)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x26c00d[_0x41ae2c(0x13f)]?_0x41ae2c(0x16d):_0x41ae2c(0x15c)+_0x52f378+'.'};},async 'execute'(_0x2a2d61){const _0x153e99=a189_0x5993aa,{appCode:_0x261419,appName:_0x1595d1,resources:_0x1c5f1a}=flags(_0x2a2d61),_0x577e15=_0x2a2d61['str'](_0x153e99(0x15e))[_0x153e99(0x153)]();if(!/^[a-f0-9]{64}$/i[_0x153e99(0x163)](_0x577e15))throw CliErrors[_0x153e99(0x135)]('--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.');const _0xe47b2b=await getSmartAppRecord(_0x261419,_0x2a2d61[_0x153e99(0x14e)]),_0x3f7bab=prepare(_0xe47b2b,_0x1595d1,_0x1c5f1a);if(_0x577e15!==_0x3f7bab['expectedHash'])throw CliErrors[_0x153e99(0x135)](_0x153e99(0x133));if(_0x3f7bab[_0x153e99(0x13f)])return{'ok':!![],'data':{'appCode':_0x261419,'appName':_0x1595d1,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x153e99(0x13c)};await updateSmartAppRecord({'id':_0xe47b2b['id'],'appCode':_0x261419,'appPublishStatus':_0xe47b2b[_0x153e99(0x166)],'extend':_0x3f7bab[_0x153e99(0x134)]},_0x2a2d61['cookie']);const _0x145f78=await getSmartAppRecord(_0x261419,_0x2a2d61['cookie']),_0x990e45=parseObject(_0x145f78[_0x153e99(0x16e)],'verified\x20app.extend');if(_0x145f78['id']!==_0xe47b2b['id']||_0x145f78[_0x153e99(0x166)]!==_0xe47b2b[_0x153e99(0x166)]||!isDeepStrictEqual(_0x990e45,_0x3f7bab[_0x153e99(0x134)]))throw CliErrors[_0x153e99(0x129)](_0x153e99(0x127));return{'ok':!![],'data':{'appCode':_0x261419,'appName':_0x1595d1,'updated':!![],'resources':_0x1c5f1a,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':'Updated\x20shared\x20resources\x20for\x20'+_0x1595d1+_0x153e99(0x13b)+_0x261419+';\x20independent\x20deployment\x20not\x20verified.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a190_0x3ed1cb=a190_0xfe40;(function(_0x4b4323,_0x4c59a7){const _0x3dd4b2=a190_0xfe40,_0x4cd539=_0x4b4323();while(!![]){try{const _0x135850=parseInt(_0x3dd4b2(0x1d2))/0x1*(-parseInt(_0x3dd4b2(0x1b7))/0x2)+parseInt(_0x3dd4b2(0x1a3))/0x3*(parseInt(_0x3dd4b2(0x1e8))/0x4)+-parseInt(_0x3dd4b2(0x1ad))/0x5+parseInt(_0x3dd4b2(0x1e2))/0x6*(-parseInt(_0x3dd4b2(0x1c3))/0x7)+-parseInt(_0x3dd4b2(0x1ab))/0x8*(parseInt(_0x3dd4b2(0x1c0))/0x9)+-parseInt(_0x3dd4b2(0x1e0))/0xa+parseInt(_0x3dd4b2(0x1a8))/0xb*(parseInt(_0x3dd4b2(0x1db))/0xc);if(_0x135850===_0x4c59a7)break;else _0x4cd539['push'](_0x4cd539['shift']());}catch(_0x56b23d){_0x4cd539['push'](_0x4cd539['shift']());}}}(a190_0x29b3,0xc5d65));import a190_0xa3923c from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';function a190_0xfe40(_0x3cd03b,_0x5aee7b){_0x3cd03b=_0x3cd03b-0x1a1;const _0x29b34d=a190_0x29b3();let _0xfe408c=_0x29b34d[_0x3cd03b];return _0xfe408c;}import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';function a190_0x29b3(){const _0x29f4b2=['\x20menu(s)\x20created','\x20\x20Continue\x20with\x20creation?','map','appcode','Online\x20menu\x20list\x20fetched','onlineMenuList','1DIsHQF','cyan','localPages','\x20menu(s)','gray','\x20failed.','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','Menu\x20sync\x20skipped','34908oyxUVV','Failed\x20to\x20fetch\x20online\x20menu\x20list','Menu\x20sync\x20completed:\x20','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','Would\x20create\x20','3723190RhSeed','message','2373870WhEuqj','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','str','\x20menu(s)\x20bound\x20to\x20','split','paths','2044HfDKYC','onlinePaths','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','params','trim','8610ctveem','sync','targetPages','\x20\x20Cancelled.','size','8668nBrjBf','\x20page(s)','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','32AyCgZr','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','2498205vENPoR','filter','Menu\x20creation\x20failed','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','length','skipped','POST','cookie','\x20\x20Create\x20','string','466136vrHJCZ','\x20local\x20microfrontend\x20menu(s).','\x20and\x20CSS:\x20','selectedAppName','write','yes','appCode','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','rawFlags','3257658xLTpvZ','validation','created','7CoLVWZ','flag','appName','\x20\x20✓\x20Selected:\x20','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','yellow','boolean','✓\x20Menu\x20sync\x20completed:\x20','jsUrl'];a190_0x29b3=function(){return _0x29f4b2;};return a190_0x29b3();}import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':'menu','command':a190_0x3ed1cb(0x1a4),'description':'Register\x20local\x20pages\x20as\x20platform\x20menus','risk':a190_0x3ed1cb(0x1bb),'flags':[{'name':a190_0x3ed1cb(0x1a1),'type':'string','description':'Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20'+'JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.'},{'name':a190_0x3ed1cb(0x1e7),'type':a190_0x3ed1cb(0x1b6),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':a190_0x3ed1cb(0x1bc),'type':a190_0x3ed1cb(0x1c9),'description':a190_0x3ed1cb(0x1d9)}],async 'dryRun'(_0x577485){const _0x5c1047=a190_0x3ed1cb;ensureRunnableContext(_0x577485[_0x5c1047(0x1bf)],_0x577485[_0x5c1047(0x1ba)]);const _0x376ef9=await runMenuSyncCore(_0x577485[_0x5c1047(0x1bd)],_0x577485[_0x5c1047(0x1b4)],parsePaths(_0x577485['str'](_0x5c1047(0x1e7))),_0x577485[_0x5c1047(0x1e4)](_0x5c1047(0x1a1)),{'dryRun':!![]});return{'method':_0x5c1047(0x1b3),'url':'/smartapi/menu/create','body':_0x376ef9,'description':_0x376ef9['skipped']?_0x5c1047(0x1de):_0x5c1047(0x1df)+_0x376ef9[_0x5c1047(0x1a5)]['length']+_0x5c1047(0x1b8)};},async 'execute'(_0x305109){const _0x5125ff=a190_0x3ed1cb;ensureRunnableContext(_0x305109[_0x5125ff(0x1bf)],_0x305109[_0x5125ff(0x1ba)]);const _0x588a2a=_0x305109[_0x5125ff(0x1c4)](_0x5125ff(0x1bc)),_0x17c51f=_0x305109['str'](_0x5125ff(0x1a1)),_0x1fdbb5=parsePaths(_0x305109[_0x5125ff(0x1e4)](_0x5125ff(0x1e7))),_0x5dc527=parseMenuSyncParams(_0x17c51f);if(_0x588a2a){const _0x29c02e=await runMenuSyncCore(_0x305109[_0x5125ff(0x1bd)],_0x305109[_0x5125ff(0x1b4)],_0x1fdbb5,_0x17c51f);if(_0x29c02e[_0x5125ff(0x1b2)]){const _0x15d906=getLocalPages();_0x15d906['length']===0x0?writeCliSideChannelLine(_0x5125ff(0x1b0)):writeCliSideChannelLine(_0x5125ff(0x1e3));}else writeCliSideChannelLine(_0x5125ff(0x1ca)+_0x29c02e[_0x5125ff(0x1c2)]+_0x5125ff(0x1cc));return{'ok':!![],'data':_0x29c02e,'message':_0x29c02e['skipped']?_0x5125ff(0x1da):_0x5125ff(0x1dd)+_0x29c02e[_0x5125ff(0x1c2)]+'\x20created.'};}if(_0x1fdbb5['length']>0x0)throw CliErrors[_0x5125ff(0x1c1)](_0x5125ff(0x1ea),_0x5125ff(0x1ac));if(!isInteractive()&&_0x17c51f)throw CliErrors[_0x5125ff(0x1c1)](_0x5125ff(0x1d8),_0x5125ff(0x1ac));requireInteractive(),writeCliSideChannelLine(_0x5125ff(0x1be));const _0x5a103d=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x1dc110,_0x5b8396,_0x569a15;try{const _0x36db74=await fetchMenuData(_0x305109[_0x5125ff(0x1bd)],_0x305109[_0x5125ff(0x1b4)]);_0x1dc110=_0x36db74[_0x5125ff(0x1d4)],_0x5b8396=_0x36db74[_0x5125ff(0x1e9)],_0x569a15=_0x36db74[_0x5125ff(0x1d1)],stopSpinner(_0x5a103d,_0x5125ff(0x1d0),!![]);}catch(_0x7875de){stopSpinner(_0x5a103d,_0x5125ff(0x1dc),![]);throw CliErrors[_0x5125ff(0x1c1)](_0x7875de instanceof Error?_0x7875de['message']:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x1dc110[_0x5125ff(0x1b1)]===0x0)return writeCliSideChannelLine(a190_0xa3923c[_0x5125ff(0x1c8)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x333e37=buildCompareRows(_0x1dc110,_0x5b8396);writeCliSideChannelLine(renderCompareTable(_0x333e37)),writeCliSideChannelLine('');const _0x48d176=await selectPages(_0x1dc110,_0x5b8396);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0xa3923c[_0x5125ff(0x1d3)](_0x5125ff(0x1c6)+_0x48d176[_0x5125ff(0x1b1)]+_0x5125ff(0x1a9)));const _0x2277ae=_0x5dc527[_0x5125ff(0x1cb)]&&_0x5dc527['cssUrl'];if(!_0x2277ae){writeCliSideChannelLine(renderSyncSummary(_0x48d176,_0x5b8396[_0x5125ff(0x1a7)]>0x0));const _0x59bfec=await askConfirm(_0x5125ff(0x1cd));if(!_0x59bfec)return writeCliSideChannelLine(a190_0xa3923c[_0x5125ff(0x1d6)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x2c3fc5=_0x5dc527[_0x5125ff(0x1cb)],_0x427082=_0x5dc527['cssUrl'];!_0x2c3fc5&&!_0x5dc527[_0x5125ff(0x1c5)]&&(_0x2c3fc5=await askJsUrl());!_0x427082&&!_0x5dc527[_0x5125ff(0x1c5)]&&(_0x427082=await askCssUrl());const _0x3c0dc3=await askConfirm(_0x5dc527[_0x5125ff(0x1c5)]?_0x5125ff(0x1b5)+_0x48d176[_0x5125ff(0x1b1)]+_0x5125ff(0x1e5)+_0x5dc527[_0x5125ff(0x1c5)]+'?':_0x5125ff(0x1b5)+_0x48d176['length']+'\x20menu(s)\x20with\x20JS:\x20'+_0x2c3fc5+_0x5125ff(0x1b9)+_0x427082+'?');if(!_0x3c0dc3)return writeCliSideChannelLine(a190_0xa3923c[_0x5125ff(0x1d6)](_0x5125ff(0x1a6))),{'ok':!![]};const _0x117864=[_0x2c3fc5,_0x427082][_0x5125ff(0x1ae)](_0x5be1fc=>Boolean(_0x5be1fc));_0x5dc527[_0x5125ff(0x1c5)]&&_0x117864[_0x5125ff(0x1b1)]===0x0&&await assertSharedResourcesConfigured(_0x305109[_0x5125ff(0x1bd)],_0x305109[_0x5125ff(0x1b4)],_0x5dc527['appName']);const _0x3b924d=startSpinner('Creating\x20'+_0x48d176[_0x5125ff(0x1b1)]+'\x20menu(s)...');try{const _0x3e3658=_0x48d176[_0x5125ff(0x1ce)](_0x3c9ef2=>resolvePage(_0x3c9ef2,_0x5dc527,_0x569a15)),_0x51a354=await doCreateMenus(_0x305109[_0x5125ff(0x1bd)],_0x305109['cookie'],_0x3e3658,_0x117864,_0x5dc527[_0x5125ff(0x1c5)]?{'appName':_0x5dc527['appName']}:undefined);return stopSpinner(_0x3b924d,'Created\x20'+_0x51a354[_0x5125ff(0x1c2)]+_0x5125ff(0x1d5),!![]),{'ok':!![],'data':_0x51a354,'message':_0x5125ff(0x1dd)+_0x51a354[_0x5125ff(0x1c2)]+'\x20created,\x20'+_0x51a354['failed']+_0x5125ff(0x1d7)};}catch(_0x3b5234){stopSpinner(_0x3b924d,_0x5125ff(0x1af),![]);throw CliErrors['validation'](_0x3b5234 instanceof Error?_0x3b5234[_0x5125ff(0x1e1)]:_0x5125ff(0x1af));}}};function ensureRunnableContext(_0x4e789e,_0x239fe6){const _0x11fb14=a190_0x3ed1cb,_0x1a7b7c=_0x4e789e[_0x11fb14(0x1cf)]?String(_0x4e789e[_0x11fb14(0x1cf)])[_0x11fb14(0x1a2)]():'';if(!isInProject()&&!_0x239fe6&&!_0x1a7b7c)throw CliErrors['validation'](_0x11fb14(0x1c7)+_0x11fb14(0x1aa));}function parsePaths(_0x2b1fed){const _0x1baa46=a190_0x3ed1cb;return[...new Set(_0x2b1fed[_0x1baa46(0x1e6)](',')['map'](_0x56a25f=>_0x56a25f['trim']())[_0x1baa46(0x1ae)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a191_0x288a(){const _0x457847=['1047000AnWitr','parentId','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','some','length','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','datasetCode','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','paths','pageType','str','modelType','expected-count','\x20menu(s);\x20skipped\x20','verification','label','\x20updated,\x20','failed','beforeById','POST','update-recovery','Selected\x20','push','num','18PPsTIr','warnings','isArray','childrenCount','depth','Response\x20was\x20lost\x20and\x20menu\x20','number','get','filter','body','\x20menu(s),\x20expected\x20','cookie','\x20must\x20be\x20true\x20or\x20false.','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','resources','Menu\x20','targets','true','\x20menu(s);\x20skip\x20','plan','menu\x20list','join','trim','url','set','expect-visible','menu_selector_not_found','menu_verification_failed','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','boolean','Menu\x20path\x20selector\x20not\x20found:\x20','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','map','15850EWFgGU','visibility-update','48ERJFYK','validation','\x20failed.','visible','expectedCount','1012070oOOouz','childrenIds','appCode','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','code','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','resourcesValid','updated','645532mqimCF','string','update\x20visibility\x20for','\x20changed\x20unexpectedly.','hash','587484sTIlYJ','type','path','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','rawFlags','sort','false','requestedVisible','menu_permission_denied','datasetId','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','\x20visibility\x20update\x20could\x20not\x20be\x20verified','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','59311iGjBmO','message','stringify','update-menu-visibility','Menu\x20id\x20selector(s)\x20not\x20found:\x20','update\x20menu\x20visibility','Response\x20was\x20lost\x20for\x20menu\x20','verify\x20menu\x20visibility\x20update','menu_selector_ambiguous','pageId','menuIds','byId','Menu\x20visibility\x20update\x20completed:\x20','before','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','158270TPZYzc','\x20skipped,\x20','\x20unchanged\x20menu(s).','isSafeInteger','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','expectVisible','rabetbase\x20menu\x20list\x20--format\x20compress','menu-ids','plannedActions'];a191_0x288a=function(){return _0x457847;};return a191_0x288a();}const a191_0x14ee11=a191_0x2fff;(function(_0x4062e5,_0x26db31){const _0x272498=a191_0x2fff,_0x292f7f=_0x4062e5();while(!![]){try{const _0x226b09=parseInt(_0x272498(0x190))/0x1+parseInt(_0x272498(0x15d))/0x2*(-parseInt(_0x272498(0x15f))/0x3)+parseInt(_0x272498(0x16d))/0x4+-parseInt(_0x272498(0x164))/0x5+parseInt(_0x272498(0x13c))/0x6*(-parseInt(_0x272498(0x181))/0x7)+parseInt(_0x272498(0x19a))/0x8+parseInt(_0x272498(0x172))/0x9;if(_0x226b09===_0x26db31)break;else _0x292f7f['push'](_0x292f7f['shift']());}catch(_0x45d3d5){_0x292f7f['push'](_0x292f7f['shift']());}}}(a191_0x288a,0x27593));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';function a191_0x2fff(_0x44ee25,_0x3c48c8){_0x44ee25=_0x44ee25-0x12e;const _0x288a45=a191_0x288a();let _0x2ffff0=_0x288a45[_0x44ee25];return _0x2ffff0;}import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x14ee11(0x137),'path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':'menu','command':a191_0x14ee11(0x15e),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':'write','structuredErrors':!![],'flags':[{'name':'menu-ids','type':a191_0x14ee11(0x16e),'description':a191_0x14ee11(0x194)},{'name':a191_0x14ee11(0x1a5),'type':a191_0x14ee11(0x16e),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a191_0x14ee11(0x162),'type':a191_0x14ee11(0x159),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':'expect-visible','type':a191_0x14ee11(0x159),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a191_0x14ee11(0x130),'type':a191_0x14ee11(0x142),'description':a191_0x14ee11(0x195)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x17cbb3){parseInput(_0x17cbb3);},async 'dryRun'(_0x4b42b7){const _0x5e14e6=a191_0x14ee11,_0x5743b9=await buildPlan(_0x4b42b7,!![]),_0xc6e693=_0x5743b9[_0x5e14e6(0x14f)][_0x5e14e6(0x199)]?.[_0x5e14e6(0x19f)]??0x0,_0x132ae4=_0x5743b9['plan'][_0x5e14e6(0x14c)][_0x5e14e6(0x19f)]-_0xc6e693;return menuDryRunResult(_0x5743b9[_0x5e14e6(0x14f)],{'method':_0x5e14e6(0x137),'url':'/smartapi/menu/update','body':{'updates':_0x5743b9[_0x5e14e6(0x14f)][_0x5e14e6(0x199)]?.[_0x5e14e6(0x15c)](_0xecfd57=>_0xecfd57[_0x5e14e6(0x145)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0xc6e693+_0x5e14e6(0x14e)+_0x132ae4+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x2535e9){const _0x12080c=a191_0x14ee11,_0x29adc5=await buildPlan(_0x2535e9,![]);await recheckMutationSnapshot(_0x2535e9,_0x29adc5[_0x12080c(0x14f)],_0x12080c(0x186));const _0x16415c=[],_0x20e279=[],_0x49a0d8=[];for(const _0x4c1d03 of _0x29adc5[_0x12080c(0x14f)][_0x12080c(0x14c)]){if(_0x4c1d03[_0x12080c(0x18e)][_0x12080c(0x162)]===_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x179)]){_0x16415c[_0x12080c(0x13a)]({'id':_0x4c1d03['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x2535e9[_0x12080c(0x166)],_0x2535e9['cookie'],{'id':_0x4c1d03['id'],'visible':_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x179)]}),_0x16415c[_0x12080c(0x13a)]({'id':_0x4c1d03['id'],'updated':!![],'skipped':![]});}catch(_0xeefda1){const _0x4758d2=mapMenuApiError(_0xeefda1,_0x12080c(0x16f),_0x4c1d03['id']);if(isMenuResponseLoss(_0xeefda1)&&_0x4758d2[_0x12080c(0x168)]!==_0x12080c(0x17a)){_0x49a0d8[_0x12080c(0x13a)](_0x4c1d03['id']);continue;}_0x20e279[_0x12080c(0x13a)]({'id':_0x4c1d03['id'],'stage':'update','code':_0x4758d2[_0x12080c(0x168)],'message':_0x4758d2['message']});}}let _0x3c8d12;try{_0x3c8d12=await fetchMenuSnapshot(_0x2535e9[_0x12080c(0x166)],_0x2535e9[_0x12080c(0x147)]);}catch(_0xf9c251){const _0x389001=describeMenuErrorCause(_0xf9c251,_0x12080c(0x188)),_0x2ccb02=_0x49a0d8['map'](_0x512dc4=>({'id':_0x512dc4,'stage':_0x12080c(0x138),'code':_0x12080c(0x157),'message':_0x12080c(0x187)+_0x512dc4+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x1fc8df={'stage':_0x12080c(0x132),'code':_0x12080c(0x157),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x14c)]['map'](_0x398680=>_0x398680['id']),'requestedStateConfirmed':![],..._0x389001};throw menuFailure(asVerificationError(_0xf9c251,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x29adc5[_0x12080c(0x14f)],{'stage':_0x12080c(0x132),'succeeded':_0x16415c,'failedRecords':[..._0x20e279,..._0x2ccb02,_0x1fc8df],'warnings':[_0x12080c(0x158)],'verification':{'status':_0x12080c(0x135),'recoveredCount':0x0,'lookupCommand':_0x12080c(0x197)}});}const _0x46609c=[];for(const _0x5daef3 of _0x16415c){const _0x43a7b6=Number(_0x5daef3['id']),_0x536906=_0x29adc5['beforeById'][_0x12080c(0x143)](_0x43a7b6),_0x435024=_0x3c8d12[_0x12080c(0x18c)][_0x12080c(0x143)](_0x43a7b6);try{verifyVisibilityUpdate(_0x536906,_0x435024,_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x179)]);}catch(_0x1919c0){const _0x4d771a=asVerificationError(_0x1919c0,_0x12080c(0x14b)+_0x43a7b6+_0x12080c(0x17e));_0x46609c['push']({'id':_0x43a7b6,'stage':_0x12080c(0x132),'code':_0x4d771a[_0x12080c(0x168)],'message':_0x4d771a[_0x12080c(0x182)],'requestedStateConfirmed':![]});}}for(const _0x3481b6 of _0x49a0d8){const _0x48e9da=_0x29adc5[_0x12080c(0x136)][_0x12080c(0x143)](_0x3481b6),_0x56271d=_0x3c8d12['byId']['get'](_0x3481b6);try{verifyVisibilityUpdate(_0x48e9da,_0x56271d,_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x179)]),_0x16415c[_0x12080c(0x13a)]({'id':_0x3481b6,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x15d4cd){const _0x3ff25c=asVerificationError(_0x15d4cd,_0x12080c(0x141)+_0x3481b6+_0x12080c(0x149));_0x46609c[_0x12080c(0x13a)]({'id':_0x3481b6,'stage':_0x12080c(0x138),'code':_0x3ff25c[_0x12080c(0x168)],'message':_0x3ff25c[_0x12080c(0x182)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x46609c[_0x12080c(0x19f)]>0x0){const _0x231140=_0x46609c[_0x12080c(0x15c)](_0x3d844c=>Number(_0x3d844c['id'])),_0x5f3a76=_0x16415c[_0x12080c(0x144)](_0x20472c=>_0x20472c['recovered']===!![])['length'],_0x1348a2=menuError(_0x12080c(0x157),_0x12080c(0x180)+_0x231140[_0x12080c(0x151)](',\x20')+'.',_0x12080c(0x1a3));throw menuFailure(_0x1348a2,_0x29adc5['plan'],{'stage':'verification','succeeded':_0x16415c,'failedRecords':[..._0x20e279,..._0x46609c],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':'failed',..._0x231140['length']===0x1?{'targetId':_0x231140[0x0]}:{'targetIds':_0x231140},'recoveredCount':_0x5f3a76,'lookupCommand':_0x12080c(0x197)}});}const _0x3c8ecb=_0x16415c[_0x12080c(0x144)](_0x39f8f7=>_0x39f8f7[_0x12080c(0x16c)]===!![])['length'],_0x138c84=_0x16415c[_0x12080c(0x19f)]-_0x3c8ecb,_0x4a1d0b={..._0x29adc5['plan'],'succeeded':_0x16415c,'failed':_0x20e279,'warnings':_0x20e279[_0x12080c(0x19f)]>0x0?[..._0x29adc5['plan'][_0x12080c(0x13d)],_0x12080c(0x17c)]:_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x13d)],'verification':{'checkedBy':_0x12080c(0x150),'snapshotHash':_0x3c8d12[_0x12080c(0x171)],'matchesRequestedState':_0x20e279['length']===0x0,'recoveredCount':_0x49a0d8['length']}};return{'ok':_0x20e279['length']===0x0,'data':_0x4a1d0b,'message':_0x20e279[_0x12080c(0x19f)]===0x0?'Updated\x20visibility\x20for\x20'+_0x3c8ecb+_0x12080c(0x131)+_0x138c84+_0x12080c(0x192):_0x12080c(0x18d)+_0x3c8ecb+_0x12080c(0x134)+_0x138c84+_0x12080c(0x191)+_0x20e279['length']+_0x12080c(0x161)};}};function parseInput(_0x146878){const _0x2af24d=a191_0x14ee11,_0x10c7d8=parseMenuIds(_0x146878[_0x2af24d(0x12e)](_0x2af24d(0x198))),_0x569d3b=parseCsv(_0x146878[_0x2af24d(0x12e)]('paths'));if(_0x10c7d8[_0x2af24d(0x19f)]===0x0&&_0x569d3b[_0x2af24d(0x19f)]===0x0)throw CliErrors[_0x2af24d(0x160)](_0x2af24d(0x169));const _0x5f4720=parseBooleanFlag(_0x146878,_0x2af24d(0x162),!![]),_0x5b25f8=parseBooleanFlag(_0x146878,_0x2af24d(0x155),![]);let _0x10cb46;if(hasFlag(_0x146878,_0x2af24d(0x130))){_0x10cb46=_0x146878[_0x2af24d(0x13b)](_0x2af24d(0x130));if(!Number[_0x2af24d(0x193)](_0x10cb46)||_0x10cb46<0x0)throw CliErrors[_0x2af24d(0x160)](_0x2af24d(0x175));}return{'menuIds':_0x10c7d8,'paths':_0x569d3b,'visible':_0x5f4720,'expectVisible':_0x5b25f8,'expectedCount':_0x10cb46};}async function buildPlan(_0x4a2f2d,_0x453861){const _0x5ab096=a191_0x14ee11,_0x376379=parseInput(_0x4a2f2d),_0x32f88f=await fetchMutationSnapshot(_0x4a2f2d,'update\x20menu\x20visibility'),_0x1a7708=selectTargets(_0x32f88f['menus'],_0x376379[_0x5ab096(0x18b)],_0x376379[_0x5ab096(0x1a5)]);if(_0x376379[_0x5ab096(0x163)]!==undefined&&_0x1a7708[_0x5ab096(0x19f)]!==_0x376379[_0x5ab096(0x163)])throw menuError('menu_expected_count_mismatch',_0x5ab096(0x139)+_0x1a7708[_0x5ab096(0x19f)]+_0x5ab096(0x146)+_0x376379[_0x5ab096(0x163)]+'.',_0x5ab096(0x19c));if(_0x376379[_0x5ab096(0x196)]!==undefined){const _0x58e9c0=_0x1a7708[_0x5ab096(0x144)](_0x558aee=>_0x558aee[_0x5ab096(0x162)]!==_0x376379[_0x5ab096(0x196)]);if(_0x58e9c0[_0x5ab096(0x19f)]>0x0)throw menuError('menu_state_drift',_0x5ab096(0x15b)+_0x58e9c0[_0x5ab096(0x15c)](_0x8c8ab6=>_0x8c8ab6['id'])[_0x5ab096(0x151)](',\x20')+'.',_0x5ab096(0x167));}const _0x1784ca=_0x1a7708['map'](_0x2da43d=>({'id':_0x2da43d['id'],'label':_0x2da43d[_0x5ab096(0x133)],'path':_0x2da43d[_0x5ab096(0x174)],'before':{'visible':_0x2da43d[_0x5ab096(0x162)]},'after':{'visible':_0x376379[_0x5ab096(0x162)]}})),_0x12f5e6=_0x1784ca['filter'](_0x4de86a=>_0x4de86a[_0x5ab096(0x18e)][_0x5ab096(0x162)]!==_0x376379['visible'])[_0x5ab096(0x15c)](_0xb0f42f=>({'stage':_0x5ab096(0x184),'method':'POST','path':'/smartapi/menu/update','body':{'appCode':_0x4a2f2d[_0x5ab096(0x166)],'id':_0xb0f42f['id'],'visible':_0x376379[_0x5ab096(0x162)]}})),_0x5b6a93=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x376379[_0x5ab096(0x18b)],'paths':_0x376379[_0x5ab096(0x1a5)]},'before':{'menus':_0x1a7708[_0x5ab096(0x15c)](_0x3e3f6a=>({'id':_0x3e3f6a['id'],'path':_0x3e3f6a['path'],'visible':_0x3e3f6a['visible']}))},'after':{'menus':_0x1a7708[_0x5ab096(0x15c)](_0x5eb5df=>({'id':_0x5eb5df['id'],'path':_0x5eb5df[_0x5ab096(0x174)],'visible':_0x376379[_0x5ab096(0x162)]}))},'dryRun':_0x453861,'backend':[...BACKEND],'plannedActions':_0x12f5e6,'snapshotHash':_0x32f88f[_0x5ab096(0x171)],'warnings':_0x12f5e6[_0x5ab096(0x19f)]===0x0?[_0x5ab096(0x1a0)]:[]});return{'plan':{..._0x5b6a93,'requestedVisible':_0x376379['visible'],'targets':_0x1784ca},'beforeById':new Map(_0x1a7708[_0x5ab096(0x15c)](_0x2a14b8=>[_0x2a14b8['id'],_0x2a14b8]))};}function selectTargets(_0x3f33fa,_0x16c507,_0x401629){const _0x254fe8=a191_0x14ee11,_0x2a3ad6=new Map(_0x3f33fa[_0x254fe8(0x15c)](_0x43a3d0=>[_0x43a3d0['id'],_0x43a3d0])),_0x114a79=new Map(),_0x2ce1bb=_0x16c507[_0x254fe8(0x144)](_0x355e23=>!_0x2a3ad6['has'](_0x355e23));if(_0x2ce1bb[_0x254fe8(0x19f)]>0x0)throw menuError(_0x254fe8(0x156),_0x254fe8(0x185)+_0x2ce1bb[_0x254fe8(0x151)](',\x20')+'.',_0x254fe8(0x1a1));for(const _0x100852 of _0x16c507){_0x114a79[_0x254fe8(0x154)](_0x100852,_0x2a3ad6[_0x254fe8(0x143)](_0x100852));}for(const _0x53c52e of _0x401629){const _0x10b1bb=_0x3f33fa[_0x254fe8(0x144)](_0x17c157=>_0x17c157[_0x254fe8(0x174)]===_0x53c52e);if(_0x10b1bb[_0x254fe8(0x19f)]===0x0)throw menuError(_0x254fe8(0x156),_0x254fe8(0x15a)+JSON[_0x254fe8(0x183)](_0x53c52e)+'.',_0x254fe8(0x17d));if(_0x10b1bb['length']>0x1)throw menuError(_0x254fe8(0x189),_0x254fe8(0x1a4)+JSON[_0x254fe8(0x183)](_0x53c52e)+'.',_0x254fe8(0x18f)+_0x10b1bb[_0x254fe8(0x15c)](_0x31dde7=>_0x31dde7['id'])[_0x254fe8(0x151)](',\x20')+'.');const _0x189f5d=_0x10b1bb[0x0];_0x114a79[_0x254fe8(0x154)](_0x189f5d['id'],_0x189f5d);}return[..._0x114a79['values']()];}function parseMenuIds(_0x2cbdb7){const _0x2c90ec=a191_0x14ee11,_0x10bba9=parseCsv(_0x2cbdb7),_0x36d783=_0x10bba9['map'](Number);if(_0x36d783[_0x2c90ec(0x19e)](_0x2e6356=>!Number[_0x2c90ec(0x193)](_0x2e6356)||_0x2e6356<=0x0))throw CliErrors[_0x2c90ec(0x160)](_0x2c90ec(0x17f));return[...new Set(_0x36d783)];}function parseCsv(_0x2b20f7){const _0x14d05c=a191_0x14ee11;return[...new Set(_0x2b20f7['split'](',')[_0x14d05c(0x15c)](_0x560918=>_0x560918[_0x14d05c(0x152)]())['filter'](Boolean))];}function parseBooleanFlag(_0xe5f15b,_0xfe5ba,_0x3eeb84){const _0x25e32e=a191_0x14ee11;if(!hasFlag(_0xe5f15b,_0xfe5ba)){if(_0x3eeb84)throw CliErrors['flagMissing'](_0xfe5ba);return undefined;}const _0x4acabd=_0xe5f15b[_0x25e32e(0x176)][_0xfe5ba];if(_0x4acabd===!![]||_0x4acabd===![])return _0x4acabd;if(_0x4acabd===_0x25e32e(0x14d))return!![];if(_0x4acabd===_0x25e32e(0x178))return![];throw CliErrors[_0x25e32e(0x160)]('--'+_0xfe5ba+_0x25e32e(0x148));}function verifyVisibilityUpdate(_0x1dd8f5,_0x186cda,_0x4870c2){const _0x16cead=a191_0x14ee11;assertVerified(!!_0x186cda,'Menu\x20'+_0x1dd8f5['id']+_0x16cead(0x19d)),assertVerified(_0x186cda[_0x16cead(0x162)]===_0x4870c2,_0x16cead(0x14b)+_0x1dd8f5['id']+_0x16cead(0x16a));const _0x50fee0=[['id',_0x186cda['id'],_0x1dd8f5['id']],[_0x16cead(0x19b),_0x186cda[_0x16cead(0x19b)],_0x1dd8f5[_0x16cead(0x19b)]],['depth',_0x186cda[_0x16cead(0x140)],_0x1dd8f5[_0x16cead(0x140)]],['label',_0x186cda[_0x16cead(0x133)],_0x1dd8f5[_0x16cead(0x133)]],['path',_0x186cda[_0x16cead(0x174)],_0x1dd8f5[_0x16cead(0x174)]],[_0x16cead(0x153),_0x186cda[_0x16cead(0x153)],_0x1dd8f5[_0x16cead(0x153)]],[_0x16cead(0x173),_0x186cda[_0x16cead(0x173)],_0x1dd8f5['type']],[_0x16cead(0x177),_0x186cda[_0x16cead(0x177)],_0x1dd8f5[_0x16cead(0x177)]],[_0x16cead(0x14a),_0x186cda[_0x16cead(0x14a)],_0x1dd8f5[_0x16cead(0x14a)]],[_0x16cead(0x16b),_0x186cda[_0x16cead(0x16b)],_0x1dd8f5[_0x16cead(0x16b)]],[_0x16cead(0x165),_0x186cda[_0x16cead(0x165)],_0x1dd8f5[_0x16cead(0x165)]],['childrenCount',_0x186cda[_0x16cead(0x13f)],_0x1dd8f5[_0x16cead(0x13f)]],[_0x16cead(0x18a),_0x186cda[_0x16cead(0x18a)],_0x1dd8f5['pageId']],[_0x16cead(0x1a6),_0x186cda[_0x16cead(0x1a6)],_0x1dd8f5[_0x16cead(0x1a6)]],[_0x16cead(0x12f),_0x186cda[_0x16cead(0x12f)],_0x1dd8f5['modelType']],[_0x16cead(0x17b),_0x186cda['datasetId'],_0x1dd8f5[_0x16cead(0x17b)]],['datasetCode',_0x186cda[_0x16cead(0x1a2)],_0x1dd8f5[_0x16cead(0x1a2)]]];for(const [_0x181ef1,_0x266e51,_0x1d32e5]of _0x50fee0){assertVerified(sameValue(_0x266e51,_0x1d32e5),_0x16cead(0x14b)+_0x1dd8f5['id']+'\x20'+_0x181ef1+_0x16cead(0x170));}}function sameValue(_0x4a525c,_0x5f110f){const _0x472fde=a191_0x14ee11;if(Array[_0x472fde(0x13e)](_0x4a525c)||Array[_0x472fde(0x13e)](_0x5f110f))return JSON[_0x472fde(0x183)](_0x4a525c)===JSON[_0x472fde(0x183)](_0x5f110f);return _0x4a525c===_0x5f110f;}
|
|
1
|
+
const a191_0x13f24b=a191_0x4f71;(function(_0x346e48,_0x1c1ed4){const _0x15a9ee=a191_0x4f71,_0x5c583c=_0x346e48();while(!![]){try{const _0x4b78e8=parseInt(_0x15a9ee(0x17a))/0x1+-parseInt(_0x15a9ee(0x172))/0x2+parseInt(_0x15a9ee(0x1b8))/0x3+parseInt(_0x15a9ee(0x182))/0x4+-parseInt(_0x15a9ee(0x191))/0x5*(parseInt(_0x15a9ee(0x162))/0x6)+-parseInt(_0x15a9ee(0x192))/0x7*(parseInt(_0x15a9ee(0x160))/0x8)+-parseInt(_0x15a9ee(0x152))/0x9*(-parseInt(_0x15a9ee(0x168))/0xa);if(_0x4b78e8===_0x1c1ed4)break;else _0x5c583c['push'](_0x5c583c['shift']());}catch(_0x230398){_0x5c583c['push'](_0x5c583c['shift']());}}}(a191_0x3401,0x72bba));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';function a191_0x3401(){const _0x4731d7=['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','menu_state_drift','menu\x20list','paths','targets','resourcesValid','expectVisible','datasetId','1915896naXXAr','expected-count','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','failed','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','\x20menu(s);\x20skipped\x20','pageType','str','push','Menu\x20id\x20selector(s)\x20not\x20found:\x20','plan','verification','update\x20menu\x20visibility','split','visibility-update','map','updated','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','some','get','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','89577qxLZxC','hash','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','values','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','url','menu_verification_failed','/smartapi/menu/update','modelType','num','cookie','true','update-recovery','Menu\x20path\x20selector\x20not\x20found:\x20','1214296AiUzjY','before','12KyEfIS','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','flagMissing','string','visible','update\x20visibility\x20for','1110neolNr','menuIds','validation','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','label','isArray','datasetCode','sort','body','\x20updated,\x20','1240986HdNJyC','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','\x20failed.','isSafeInteger','byId','number','menu','508857IwPHZr','path','childrenCount','POST','expect-visible','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','menu_selector_not_found','menu-ids','720788xNKUKX','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','update','filter','parentId','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Menu\x20visibility\x20update\x20completed:\x20','beforeById','length','join','type','Updated\x20visibility\x20for\x20','boolean','update-menu-visibility','1078270OtCUPc','42SacCLt','recovered','set','Final\x20menu\x20visibility\x20readback\x20failed.','Response\x20was\x20lost\x20for\x20menu\x20','requestedVisible','\x20menu(s),\x20expected\x20','menu_expected_count_mismatch','\x20skipped,\x20','childrenIds','Would\x20update\x20visibility\x20for\x20','menu_permission_denied','Response\x20was\x20lost\x20and\x20menu\x20','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','stringify','expectedCount','resources','pageId','warnings','appCode','depth','message','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x20must\x20be\x20true\x20or\x20false.','\x20unchanged\x20menu(s).','Requested\x20menu\x20visibility','code','Menu\x20','Selected\x20','\x20visibility\x20update\x20could\x20not\x20be\x20verified'];a191_0x3401=function(){return _0x4731d7;};return a191_0x3401();}const BACKEND=[{'method':a191_0x13f24b(0x17d),'path':a191_0x13f24b(0x159)}];export const menuVisibilityUpdate={'service':a191_0x13f24b(0x179),'command':'visibility-update','description':a191_0x13f24b(0x183),'risk':'write','structuredErrors':!![],'flags':[{'name':a191_0x13f24b(0x181),'type':a191_0x13f24b(0x165),'description':a191_0x13f24b(0x163)},{'name':a191_0x13f24b(0x1b3),'type':a191_0x13f24b(0x165),'description':a191_0x13f24b(0x174)},{'name':a191_0x13f24b(0x166),'type':a191_0x13f24b(0x18f),'required':!![],'description':a191_0x13f24b(0x1ab)},{'name':a191_0x13f24b(0x17e),'type':a191_0x13f24b(0x18f),'description':a191_0x13f24b(0x156)},{'name':a191_0x13f24b(0x1b9),'type':a191_0x13f24b(0x178),'description':a191_0x13f24b(0x1ba)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x54b88a){parseInput(_0x54b88a);},async 'dryRun'(_0x58c60c){const _0x23cdef=a191_0x13f24b,_0x109a5b=await buildPlan(_0x58c60c,!![]),_0x548f03=_0x109a5b['plan']['plannedActions']?.[_0x23cdef(0x18b)]??0x0,_0xfd382a=_0x109a5b[_0x23cdef(0x1c2)][_0x23cdef(0x1b4)][_0x23cdef(0x18b)]-_0x548f03;return menuDryRunResult(_0x109a5b[_0x23cdef(0x1c2)],{'method':_0x23cdef(0x17d),'url':_0x23cdef(0x159),'body':{'updates':_0x109a5b[_0x23cdef(0x1c2)]['plannedActions']?.[_0x23cdef(0x14a)](_0x4a4e55=>_0x4a4e55[_0x23cdef(0x170)])??[]},'description':_0x23cdef(0x19c)+_0x548f03+'\x20menu(s);\x20skip\x20'+_0xfd382a+_0x23cdef(0x1aa)});},async 'execute'(_0x5f14a0){const _0x5b9142=a191_0x13f24b,_0xf07a94=await buildPlan(_0x5f14a0,![]);await recheckMutationSnapshot(_0x5f14a0,_0xf07a94[_0x5b9142(0x1c2)],_0x5b9142(0x1c4));const _0x3c9a75=[],_0x173688=[],_0x542d1d=[];for(const _0x270627 of _0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x1b4)]){if(_0x270627['before'][_0x5b9142(0x166)]===_0xf07a94['plan'][_0x5b9142(0x197)]){_0x3c9a75[_0x5b9142(0x1c0)]({'id':_0x270627['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x5f14a0[_0x5b9142(0x1a5)],_0x5f14a0['cookie'],{'id':_0x270627['id'],'visible':_0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x197)]}),_0x3c9a75[_0x5b9142(0x1c0)]({'id':_0x270627['id'],'updated':!![],'skipped':![]});}catch(_0x5aaeae){const _0x5acb9d=mapMenuApiError(_0x5aaeae,_0x5b9142(0x167),_0x270627['id']);if(isMenuResponseLoss(_0x5aaeae)&&_0x5acb9d['code']!==_0x5b9142(0x19d)){_0x542d1d[_0x5b9142(0x1c0)](_0x270627['id']);continue;}_0x173688[_0x5b9142(0x1c0)]({'id':_0x270627['id'],'stage':_0x5b9142(0x184),'code':_0x5acb9d[_0x5b9142(0x1ac)],'message':_0x5acb9d[_0x5b9142(0x1a7)]});}}let _0x1dea92;try{_0x1dea92=await fetchMenuSnapshot(_0x5f14a0[_0x5b9142(0x1a5)],_0x5f14a0[_0x5b9142(0x15c)]);}catch(_0x17f101){const _0x412536=describeMenuErrorCause(_0x17f101,'verify\x20menu\x20visibility\x20update'),_0x1c57eb=_0x542d1d['map'](_0x56bba0=>({'id':_0x56bba0,'stage':_0x5b9142(0x15e),'code':_0x5b9142(0x158),'message':_0x5b9142(0x196)+_0x56bba0+_0x5b9142(0x14d),'requestedStateConfirmed':![],'recovered':![]})),_0x468f80={'stage':_0x5b9142(0x1c3),'code':_0x5b9142(0x158),'message':_0x5b9142(0x195),'targetIds':_0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x1b4)][_0x5b9142(0x14a)](_0x494c07=>_0x494c07['id']),'requestedStateConfirmed':![],..._0x412536};throw menuFailure(asVerificationError(_0x17f101,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0xf07a94[_0x5b9142(0x1c2)],{'stage':_0x5b9142(0x1c3),'succeeded':_0x3c9a75,'failedRecords':[..._0x173688,..._0x1c57eb,_0x468f80],'warnings':[_0x5b9142(0x1b0)],'verification':{'status':_0x5b9142(0x1bb),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x504554=[];for(const _0x10dbb1 of _0x3c9a75){const _0x2a2390=Number(_0x10dbb1['id']),_0x3aa2bd=_0xf07a94[_0x5b9142(0x18a)][_0x5b9142(0x150)](_0x2a2390),_0x233ff9=_0x1dea92[_0x5b9142(0x177)][_0x5b9142(0x150)](_0x2a2390);try{verifyVisibilityUpdate(_0x3aa2bd,_0x233ff9,_0xf07a94['plan'][_0x5b9142(0x197)]);}catch(_0x4301b7){const _0x2a9b9b=asVerificationError(_0x4301b7,_0x5b9142(0x1ad)+_0x2a2390+_0x5b9142(0x1af));_0x504554['push']({'id':_0x2a2390,'stage':'verification','code':_0x2a9b9b['code'],'message':_0x2a9b9b['message'],'requestedStateConfirmed':![]});}}for(const _0x150dd4 of _0x542d1d){const _0x10dd87=_0xf07a94[_0x5b9142(0x18a)]['get'](_0x150dd4),_0x22bf57=_0x1dea92[_0x5b9142(0x177)][_0x5b9142(0x150)](_0x150dd4);try{verifyVisibilityUpdate(_0x10dd87,_0x22bf57,_0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x197)]),_0x3c9a75['push']({'id':_0x150dd4,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x1017fd){const _0x2274d9=asVerificationError(_0x1017fd,_0x5b9142(0x19e)+_0x150dd4+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x504554[_0x5b9142(0x1c0)]({'id':_0x150dd4,'stage':_0x5b9142(0x15e),'code':_0x2274d9[_0x5b9142(0x1ac)],'message':_0x2274d9[_0x5b9142(0x1a7)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x504554[_0x5b9142(0x18b)]>0x0){const _0x447a21=_0x504554[_0x5b9142(0x14a)](_0x1155d2=>Number(_0x1155d2['id'])),_0x53de4f=_0x3c9a75[_0x5b9142(0x185)](_0x502746=>_0x502746[_0x5b9142(0x193)]===!![])[_0x5b9142(0x18b)],_0x127c24=menuError('menu_verification_failed',_0x5b9142(0x14e)+_0x447a21[_0x5b9142(0x18c)](',\x20')+'.',_0x5b9142(0x188));throw menuFailure(_0x127c24,_0xf07a94['plan'],{'stage':_0x5b9142(0x1c3),'succeeded':_0x3c9a75,'failedRecords':[..._0x173688,..._0x504554],'warnings':[_0x5b9142(0x17f)],'verification':{'status':_0x5b9142(0x1bb),..._0x447a21[_0x5b9142(0x18b)]===0x1?{'targetId':_0x447a21[0x0]}:{'targetIds':_0x447a21},'recoveredCount':_0x53de4f,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0xe006bf=_0x3c9a75[_0x5b9142(0x185)](_0x5f0788=>_0x5f0788[_0x5b9142(0x14b)]===!![])[_0x5b9142(0x18b)],_0x681958=_0x3c9a75['length']-_0xe006bf,_0x5e087b={..._0xf07a94[_0x5b9142(0x1c2)],'succeeded':_0x3c9a75,'failed':_0x173688,'warnings':_0x173688['length']>0x0?[..._0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x1a4)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0xf07a94['plan'][_0x5b9142(0x1a4)],'verification':{'checkedBy':_0x5b9142(0x1b2),'snapshotHash':_0x1dea92['hash'],'matchesRequestedState':_0x173688[_0x5b9142(0x18b)]===0x0,'recoveredCount':_0x542d1d[_0x5b9142(0x18b)]}};return{'ok':_0x173688['length']===0x0,'data':_0x5e087b,'message':_0x173688[_0x5b9142(0x18b)]===0x0?_0x5b9142(0x18e)+_0xe006bf+_0x5b9142(0x1bd)+_0x681958+_0x5b9142(0x1aa):_0x5b9142(0x189)+_0xe006bf+_0x5b9142(0x171)+_0x681958+_0x5b9142(0x19a)+_0x173688[_0x5b9142(0x18b)]+_0x5b9142(0x175)};}};function parseInput(_0x2e57b2){const _0x338fff=a191_0x13f24b,_0x2002fc=parseMenuIds(_0x2e57b2[_0x338fff(0x1bf)](_0x338fff(0x181))),_0x5387f7=parseCsv(_0x2e57b2['str'](_0x338fff(0x1b3)));if(_0x2002fc[_0x338fff(0x18b)]===0x0&&_0x5387f7[_0x338fff(0x18b)]===0x0)throw CliErrors[_0x338fff(0x16a)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x716946=parseBooleanFlag(_0x2e57b2,_0x338fff(0x166),!![]),_0x4fffdd=parseBooleanFlag(_0x2e57b2,_0x338fff(0x17e),![]);let _0x29468e;if(hasFlag(_0x2e57b2,'expected-count')){_0x29468e=_0x2e57b2[_0x338fff(0x15b)](_0x338fff(0x1b9));if(!Number[_0x338fff(0x176)](_0x29468e)||_0x29468e<0x0)throw CliErrors['validation'](_0x338fff(0x1a8));}return{'menuIds':_0x2002fc,'paths':_0x5387f7,'visible':_0x716946,'expectVisible':_0x4fffdd,'expectedCount':_0x29468e};}async function buildPlan(_0x475e1a,_0x143b38){const _0x3ffdbe=a191_0x13f24b,_0x4ed40a=parseInput(_0x475e1a),_0x4602de=await fetchMutationSnapshot(_0x475e1a,_0x3ffdbe(0x1c4)),_0x558512=selectTargets(_0x4602de['menus'],_0x4ed40a[_0x3ffdbe(0x169)],_0x4ed40a[_0x3ffdbe(0x1b3)]);if(_0x4ed40a['expectedCount']!==undefined&&_0x558512[_0x3ffdbe(0x18b)]!==_0x4ed40a[_0x3ffdbe(0x1a1)])throw menuError(_0x3ffdbe(0x199),_0x3ffdbe(0x1ae)+_0x558512[_0x3ffdbe(0x18b)]+_0x3ffdbe(0x198)+_0x4ed40a['expectedCount']+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x4ed40a[_0x3ffdbe(0x1b6)]!==undefined){const _0x40f5a8=_0x558512[_0x3ffdbe(0x185)](_0x5c4ab3=>_0x5c4ab3[_0x3ffdbe(0x166)]!==_0x4ed40a[_0x3ffdbe(0x1b6)]);if(_0x40f5a8['length']>0x0)throw menuError(_0x3ffdbe(0x1b1),_0x3ffdbe(0x173)+_0x40f5a8[_0x3ffdbe(0x14a)](_0x2bc045=>_0x2bc045['id'])['join'](',\x20')+'.',_0x3ffdbe(0x14c));}const _0x42e4f4=_0x558512[_0x3ffdbe(0x14a)](_0xe62290=>({'id':_0xe62290['id'],'label':_0xe62290['label'],'path':_0xe62290[_0x3ffdbe(0x17b)],'before':{'visible':_0xe62290['visible']},'after':{'visible':_0x4ed40a[_0x3ffdbe(0x166)]}})),_0x3b158c=_0x42e4f4['filter'](_0x270c6e=>_0x270c6e[_0x3ffdbe(0x161)]['visible']!==_0x4ed40a['visible'])[_0x3ffdbe(0x14a)](_0x500bbd=>({'stage':_0x3ffdbe(0x190),'method':_0x3ffdbe(0x17d),'path':_0x3ffdbe(0x159),'body':{'appCode':_0x475e1a[_0x3ffdbe(0x1a5)],'id':_0x500bbd['id'],'visible':_0x4ed40a[_0x3ffdbe(0x166)]}})),_0x4c323d=mutationResult({'operation':_0x3ffdbe(0x1c6),'selector':{'menuIds':_0x4ed40a[_0x3ffdbe(0x169)],'paths':_0x4ed40a[_0x3ffdbe(0x1b3)]},'before':{'menus':_0x558512[_0x3ffdbe(0x14a)](_0xad7fcc=>({'id':_0xad7fcc['id'],'path':_0xad7fcc[_0x3ffdbe(0x17b)],'visible':_0xad7fcc[_0x3ffdbe(0x166)]}))},'after':{'menus':_0x558512[_0x3ffdbe(0x14a)](_0x3f90e9=>({'id':_0x3f90e9['id'],'path':_0x3f90e9['path'],'visible':_0x4ed40a[_0x3ffdbe(0x166)]}))},'dryRun':_0x143b38,'backend':[...BACKEND],'plannedActions':_0x3b158c,'snapshotHash':_0x4602de[_0x3ffdbe(0x153)],'warnings':_0x3b158c[_0x3ffdbe(0x18b)]===0x0?[_0x3ffdbe(0x151)]:[]});return{'plan':{..._0x4c323d,'requestedVisible':_0x4ed40a['visible'],'targets':_0x42e4f4},'beforeById':new Map(_0x558512['map'](_0x583210=>[_0x583210['id'],_0x583210]))};}function a191_0x4f71(_0x1bab6c,_0x138bd8){_0x1bab6c=_0x1bab6c-0x14a;const _0x34015d=a191_0x3401();let _0x4f7190=_0x34015d[_0x1bab6c];return _0x4f7190;}function selectTargets(_0x3a798f,_0x536c38,_0x7cfca2){const _0x6df624=a191_0x13f24b,_0x461e57=new Map(_0x3a798f[_0x6df624(0x14a)](_0x4f3179=>[_0x4f3179['id'],_0x4f3179])),_0x21037d=new Map(),_0x2d38ca=_0x536c38[_0x6df624(0x185)](_0x111cf9=>!_0x461e57['has'](_0x111cf9));if(_0x2d38ca['length']>0x0)throw menuError(_0x6df624(0x180),_0x6df624(0x1c1)+_0x2d38ca[_0x6df624(0x18c)](',\x20')+'.',_0x6df624(0x1bc));for(const _0x2886b4 of _0x536c38){_0x21037d['set'](_0x2886b4,_0x461e57[_0x6df624(0x150)](_0x2886b4));}for(const _0x53e51c of _0x7cfca2){const _0x1cb03c=_0x3a798f[_0x6df624(0x185)](_0x3e34bf=>_0x3e34bf['path']===_0x53e51c);if(_0x1cb03c['length']===0x0)throw menuError(_0x6df624(0x180),_0x6df624(0x15f)+JSON[_0x6df624(0x1a0)](_0x53e51c)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x1cb03c[_0x6df624(0x18b)]>0x1)throw menuError('menu_selector_ambiguous',_0x6df624(0x16b)+JSON[_0x6df624(0x1a0)](_0x53e51c)+'.',_0x6df624(0x154)+_0x1cb03c[_0x6df624(0x14a)](_0x4c99cc=>_0x4c99cc['id'])[_0x6df624(0x18c)](',\x20')+'.');const _0x5eb279=_0x1cb03c[0x0];_0x21037d[_0x6df624(0x194)](_0x5eb279['id'],_0x5eb279);}return[..._0x21037d[_0x6df624(0x155)]()];}function parseMenuIds(_0x3263c0){const _0x392259=a191_0x13f24b,_0x1e138b=parseCsv(_0x3263c0),_0x20ca4d=_0x1e138b[_0x392259(0x14a)](Number);if(_0x20ca4d[_0x392259(0x14f)](_0x292a23=>!Number['isSafeInteger'](_0x292a23)||_0x292a23<=0x0))throw CliErrors[_0x392259(0x16a)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x20ca4d)];}function parseCsv(_0x145c20){const _0x10aec4=a191_0x13f24b;return[...new Set(_0x145c20[_0x10aec4(0x1c5)](',')[_0x10aec4(0x14a)](_0x1c665e=>_0x1c665e['trim']())[_0x10aec4(0x185)](Boolean))];}function parseBooleanFlag(_0x29cdb9,_0x1cf487,_0x3ce0f7){const _0x28cdf8=a191_0x13f24b;if(!hasFlag(_0x29cdb9,_0x1cf487)){if(_0x3ce0f7)throw CliErrors[_0x28cdf8(0x164)](_0x1cf487);return undefined;}const _0x1fba93=_0x29cdb9['rawFlags'][_0x1cf487];if(_0x1fba93===!![]||_0x1fba93===![])return _0x1fba93;if(_0x1fba93===_0x28cdf8(0x15d))return!![];if(_0x1fba93==='false')return![];throw CliErrors[_0x28cdf8(0x16a)]('--'+_0x1cf487+_0x28cdf8(0x1a9));}function verifyVisibilityUpdate(_0x4b9ce6,_0x2d5da7,_0x53eedd){const _0x27f823=a191_0x13f24b;assertVerified(!!_0x2d5da7,_0x27f823(0x1ad)+_0x4b9ce6['id']+_0x27f823(0x19f)),assertVerified(_0x2d5da7[_0x27f823(0x166)]===_0x53eedd,_0x27f823(0x1ad)+_0x4b9ce6['id']+_0x27f823(0x187));const _0x34896a=[['id',_0x2d5da7['id'],_0x4b9ce6['id']],['parentId',_0x2d5da7['parentId'],_0x4b9ce6[_0x27f823(0x186)]],[_0x27f823(0x1a6),_0x2d5da7[_0x27f823(0x1a6)],_0x4b9ce6[_0x27f823(0x1a6)]],[_0x27f823(0x16c),_0x2d5da7[_0x27f823(0x16c)],_0x4b9ce6[_0x27f823(0x16c)]],[_0x27f823(0x17b),_0x2d5da7[_0x27f823(0x17b)],_0x4b9ce6['path']],[_0x27f823(0x157),_0x2d5da7['url'],_0x4b9ce6[_0x27f823(0x157)]],[_0x27f823(0x18d),_0x2d5da7[_0x27f823(0x18d)],_0x4b9ce6['type']],[_0x27f823(0x16f),_0x2d5da7['sort'],_0x4b9ce6['sort']],[_0x27f823(0x1a2),_0x2d5da7[_0x27f823(0x1a2)],_0x4b9ce6[_0x27f823(0x1a2)]],['resourcesValid',_0x2d5da7[_0x27f823(0x1b5)],_0x4b9ce6[_0x27f823(0x1b5)]],[_0x27f823(0x19b),_0x2d5da7[_0x27f823(0x19b)],_0x4b9ce6[_0x27f823(0x19b)]],[_0x27f823(0x17c),_0x2d5da7[_0x27f823(0x17c)],_0x4b9ce6[_0x27f823(0x17c)]],[_0x27f823(0x1a3),_0x2d5da7[_0x27f823(0x1a3)],_0x4b9ce6[_0x27f823(0x1a3)]],['pageType',_0x2d5da7['pageType'],_0x4b9ce6[_0x27f823(0x1be)]],['modelType',_0x2d5da7[_0x27f823(0x15a)],_0x4b9ce6[_0x27f823(0x15a)]],[_0x27f823(0x1b7),_0x2d5da7[_0x27f823(0x1b7)],_0x4b9ce6[_0x27f823(0x1b7)]],[_0x27f823(0x16e),_0x2d5da7[_0x27f823(0x16e)],_0x4b9ce6[_0x27f823(0x16e)]]];for(const [_0x1b0980,_0xcd3d50,_0x41b588]of _0x34896a){assertVerified(sameValue(_0xcd3d50,_0x41b588),_0x27f823(0x1ad)+_0x4b9ce6['id']+'\x20'+_0x1b0980+'\x20changed\x20unexpectedly.');}}function sameValue(_0x497a1d,_0x358ef0){const _0x30ce79=a191_0x13f24b;if(Array[_0x30ce79(0x16d)](_0x497a1d)||Array[_0x30ce79(0x16d)](_0x358ef0))return JSON[_0x30ce79(0x1a0)](_0x497a1d)===JSON['stringify'](_0x358ef0);return _0x497a1d===_0x358ef0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a192_0x10da7f=a192_0x27f2;(function(_0x5c54aa,_0x35efb9){const _0x38dea9=a192_0x27f2,_0x14ae03=_0x5c54aa();while(!![]){try{const _0x397365=parseInt(_0x38dea9(0x1d4))/0x1*(-parseInt(_0x38dea9(0x1ce))/0x2)+parseInt(_0x38dea9(0x1c8))/0x3+parseInt(_0x38dea9(0x1c2))/0x4*(-parseInt(_0x38dea9(0x1db))/0x5)+parseInt(_0x38dea9(0x1d1))/0x6+-parseInt(_0x38dea9(0x1dd))/0x7+-parseInt(_0x38dea9(0x1ba))/0x8*(parseInt(_0x38dea9(0x1d6))/0x9)+parseInt(_0x38dea9(0x1c0))/0xa;if(_0x397365===_0x35efb9)break;else _0x14ae03['push'](_0x14ae03['shift']());}catch(_0x327d30){_0x14ae03['push'](_0x14ae03['shift']());}}}(a192_0x113a,0xc2728));function a192_0x113a(){const _0x2d46fa=['configCode','9512286VXhNls','appCode','config-create','728uOVctP','Inspect\x20with\x20','Created\x20notification\x20config\x20','notification','verified','verification','32067480XojByP','configName','265916UoyaOZ','notification_config_create_outcome_unknown','channelType',';\x20do\x20not\x20resubmit\x20automatically.','input','POST','1973787qhvHGO','/notification/channel-config/create',';\x20no\x20automatic\x20retry\x20was\x20attempted.','endpointUrl','mutation','document','2776718fqyfcf','isSafeInteger',';\x20do\x20not\x20resubmit.','8145816boVPAG','description','write','1FjGFYm','readTimeout','54243CskJmN','create','planned','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','85EIACYU'];a192_0x113a=function(){return _0x2d46fa;};return a192_0x113a();}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=a192_0x10da7f(0x1c9);function a192_0x27f2(_0x90a9c1,_0x3b9c6){_0x90a9c1=_0x90a9c1-0x1b8;const _0x113ae6=a192_0x113a();let _0x27f2dc=_0x113ae6[_0x90a9c1];return _0x27f2dc;}async function prepareCreate(_0x2eaa24){const _0x5b5726=a192_0x10da7f,_0x5efcf1=await readNotificationDocument(_0x2eaa24,_0x5b5726(0x1d7)),_0x2fcb55=createMutationInput(_0x2eaa24[_0x5b5726(0x1b8)],_0x5efcf1);return{'document':_0x5efcf1,'input':_0x2fcb55,'planned':projectNotificationConfig({'appCode':_0x2eaa24[_0x5b5726(0x1b8)],'configName':_0x5efcf1[_0x5b5726(0x1c1)],'channelType':_0x5efcf1[_0x5b5726(0x1c4)],'endpointUrl':_0x5efcf1[_0x5b5726(0x1cb)],'channelConfig':_0x5efcf1['channelConfig'],'description':_0x5efcf1[_0x5b5726(0x1d2)],'connectTimeout':_0x5efcf1['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x5efcf1[_0x5b5726(0x1d5)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a192_0x10da7f(0x1bd),'command':a192_0x10da7f(0x1b9),'description':a192_0x10da7f(0x1da),'risk':a192_0x10da7f(0x1d3),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x87bbd3){assertSingleNotificationSource(_0x87bbd3);},async 'dryRun'(_0x5e0251){const _0x4327c8=a192_0x10da7f,_0xa83e27=await prepareCreate(_0x5e0251),_0x492daf=notificationLookupCommand(_0x5e0251['appCode'],_0xa83e27[_0x4327c8(0x1cd)][_0x4327c8(0x1c4)]);return asDryRunResult({'operation':_0x4327c8(0x1d7),'selector':{'appCode':_0x5e0251['appCode'],'configName':_0xa83e27[_0x4327c8(0x1cd)][_0x4327c8(0x1c1)],'channelType':_0xa83e27['document'][_0x4327c8(0x1c4)]},'before':null,'after':_0xa83e27[_0x4327c8(0x1d8)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x4327c8(0x1d8),'lookupCommand':_0x492daf}},{'method':_0x4327c8(0x1c7),'url':CREATE_PATH});},async 'execute'(_0x5ecfcc){const _0x308f89=a192_0x10da7f,_0x4931cb=await prepareCreate(_0x5ecfcc),_0x3ba27d=notificationLookupCommand(_0x5ecfcc['appCode'],_0x4931cb[_0x308f89(0x1cd)][_0x308f89(0x1c4)]);let _0x139dff;try{_0x139dff=await createNotificationChannelConfig(_0x4931cb[_0x308f89(0x1c6)]);}catch(_0x53647c){if(isPlatformTransportFailure(_0x53647c))throw notificationError(_0x308f89(0x1c3),'Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','Inspect\x20with\x20'+_0x3ba27d+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x308f89(0x1d7),_0x308f89(0x1cc),_0x308f89(0x1bb)+_0x3ba27d+_0x308f89(0x1ca));}if(!Number[_0x308f89(0x1cf)](_0x139dff)||_0x139dff<=0x0)throw notificationError(_0x308f89(0x1c3),_0x308f89(0x1d9),_0x308f89(0x1bb)+_0x3ba27d+_0x308f89(0x1d0));let _0x5d5000;try{const _0x299bc7=await getNotificationChannelConfig(_0x139dff,_0x5ecfcc['appCode']);_0x5d5000=normalizeExactNotificationConfig(_0x299bc7,_0x139dff,_0x5ecfcc[_0x308f89(0x1b8)]);}catch{throw safeApiFailure(_0x308f89(0x1d7),_0x308f89(0x1bf),_0x308f89(0x1bb)+_0x3ba27d+_0x308f89(0x1c5));}return{'ok':!![],'data':{'operation':_0x308f89(0x1d7),'selector':{'appCode':_0x5d5000[_0x308f89(0x1b8)],'id':_0x5d5000['id'],'configCode':_0x5d5000[_0x308f89(0x1dc)],'configName':_0x5d5000['configName'],'channelType':_0x5d5000[_0x308f89(0x1c4)]},'before':null,'after':projectNotificationConfig(_0x5d5000),'dryRun':![],'backend':{'method':_0x308f89(0x1c7),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x308f89(0x1be),'lookupCommand':_0x3ba27d}},'message':_0x308f89(0x1bc)+_0x5d5000['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a193_0x10b049=a193_0x4957;(function(_0x118da7,_0x1f1a2b){const _0xf33a7b=a193_0x4957,_0x1d09c6=_0x118da7();while(!![]){try{const _0x383e1c=-parseInt(_0xf33a7b(0x100))/0x1+parseInt(_0xf33a7b(0xfa))/0x2*(parseInt(_0xf33a7b(0xff))/0x3)+-parseInt(_0xf33a7b(0xe5))/0x4*(-parseInt(_0xf33a7b(0xfd))/0x5)+parseInt(_0xf33a7b(0xed))/0x6*(parseInt(_0xf33a7b(0xee))/0x7)+-parseInt(_0xf33a7b(0xf4))/0x8*(-parseInt(_0xf33a7b(0xf7))/0x9)+-parseInt(_0xf33a7b(0xe9))/0xa*(parseInt(_0xf33a7b(0xfe))/0xb)+-parseInt(_0xf33a7b(0xfb))/0xc;if(_0x383e1c===_0x1f1a2b)break;else _0x1d09c6['push'](_0x1d09c6['shift']());}catch(_0x2ddd51){_0x1d09c6['push'](_0x1d09c6['shift']());}}}(a193_0x39a8,0xae654));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a193_0x4957(_0x951989,_0x13defa){_0x951989=_0x951989-0xdd;const _0x39a817=a193_0x39a8();let _0x495710=_0x39a817[_0x951989];return _0x495710;}function a193_0x39a8(){const _0x365210=['6PEpIfW','12169260iiJSxb','before','85HgvJha','22fPCbTt','949128FmWcUd','574319lrQhYb','Deleted\x20notification\x20config\x20','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','\x20delete\x20could\x20not\x20be\x20verified.',';\x20do\x20not\x20resubmit\x20automatically.','POST','appCode','unshift','planned','11524DQpDZg','channelType','notification',';\x20no\x20automatic\x20retry\x20was\x20attempted.','1452080QNKryu','Inspect\x20with\x20','verified','notification_config_delete_outcome_unknown','68118RRPxOp','371vGeBEi','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','config-delete','notification_config_delete_verification_unavailable','/notification/channel-config/delete','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','80GvvUqt','delete','\x20remains\x20present\x20after\x20delete.','894015cQWHTQ','notification_config_delete_verification_failed','Notification\x20config\x20'];a193_0x39a8=function(){return _0x365210;};return a193_0x39a8();}import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a193_0x10b049(0xf2),REFERENCE_WARNING=a193_0x10b049(0xf3);async function prepareDelete(_0x4a2080){const _0x5ddf61=a193_0x10b049,_0x510a35=readNotificationId(_0x4a2080),_0x42234a=await requireExactNotificationConfig(_0x4a2080[_0x5ddf61(0xe2)],_0x510a35,_0x5ddf61(0xf5));return{'id':_0x510a35,'before':_0x42234a};}export const notificationConfigDelete={'service':a193_0x10b049(0xe7),'command':a193_0x10b049(0xf0),'description':a193_0x10b049(0xef),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x354edb){readNotificationId(_0x354edb),requireNotificationExplicitYes(_0x354edb);},async 'dryRun'(_0x5ac8b7){const _0x117496=a193_0x10b049,_0x11d28a=await prepareDelete(_0x5ac8b7),_0x237b5b=notificationLookupCommand(_0x5ac8b7[_0x117496(0xe2)],_0x11d28a[_0x117496(0xfc)][_0x117496(0xe6)]);return asDryRunResult({'operation':_0x117496(0xf5),'selector':notificationSelector(_0x11d28a['before']),'before':projectNotificationConfig(_0x11d28a['before']),'after':null,'dryRun':!![],'backend':{'method':_0x117496(0xe1),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x117496(0xe4),'lookupCommand':_0x237b5b}},{'method':_0x117496(0xe1),'url':DELETE_PATH});},async 'execute'(_0x5e7474){const _0x103306=a193_0x10b049;requireNotificationExplicitYes(_0x5e7474);const _0x5cf558=await prepareDelete(_0x5e7474),_0x4b4334=notificationLookupCommand(_0x5e7474[_0x103306(0xe2)],_0x5cf558[_0x103306(0xfc)][_0x103306(0xe6)]);let _0x1a0f0f=![];try{await deleteNotificationChannelConfig(_0x5cf558['id'],_0x5e7474[_0x103306(0xe2)]);}catch(_0x18cf0d){if(!isPlatformTransportFailure(_0x18cf0d))throw safeApiFailure(_0x103306(0xf5),'mutation','Inspect\x20with\x20'+_0x4b4334+_0x103306(0xe8));_0x1a0f0f=!![];}let _0x365613;try{_0x365613=await listNotificationChannelConfigs(_0x5e7474[_0x103306(0xe2)],_0x5cf558[_0x103306(0xfc)][_0x103306(0xe6)]),validateNotificationDeleteReadback(_0x365613,_0x5e7474[_0x103306(0xe2)],_0x5cf558['before'][_0x103306(0xe6)]);}catch{throw notificationError(_0x1a0f0f?_0x103306(0xec):_0x103306(0xf1),_0x103306(0xf9)+_0x5cf558['id']+_0x103306(0xdf),_0x103306(0xea)+_0x4b4334+_0x103306(0xe0));}if(_0x365613['some'](_0x59400a=>_0x59400a['id']===_0x5cf558['id']))throw notificationError(_0x1a0f0f?'notification_config_delete_outcome_unknown':_0x103306(0xf8),'Notification\x20config\x20'+_0x5cf558['id']+_0x103306(0xf6),_0x103306(0xea)+_0x4b4334+';\x20do\x20not\x20resubmit\x20automatically.');const _0x1b3e17=[REFERENCE_WARNING];return _0x1a0f0f&&_0x1b3e17[_0x103306(0xe3)](_0x103306(0xde)),{'ok':!![],'data':{'operation':_0x103306(0xf5),'selector':notificationSelector(_0x5cf558['before']),'before':projectNotificationConfig(_0x5cf558[_0x103306(0xfc)]),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x1b3e17,'verification':{'status':_0x103306(0xeb),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x1a0f0f,'lookupCommand':_0x4b4334}},'message':_0x103306(0xdd)+_0x5cf558['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a194_0x51ba(){const _0x5696cb=['809615JByGSt','config-list','appCode','\x20notification\x20config(s)','1909038Glqchx','boolean','length','all','18HYsKID','flat','4768Urhmoj','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','95btFwio','read','Found\x20','2288629fhdvnm','validation','map','9927fSamdt','trim','157844AHsEkg','str','2263408UlNzwx','type','1483955UwLBJf','110cOFXZF','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','string','bool'];a194_0x51ba=function(){return _0x5696cb;};return a194_0x51ba();}const a194_0x50ecd9=a194_0x3e8a;function a194_0x3e8a(_0x37cd52,_0x39cd90){_0x37cd52=_0x37cd52-0xe6;const _0x51baf8=a194_0x51ba();let _0x3e8aec=_0x51baf8[_0x37cd52];return _0x3e8aec;}(function(_0x295769,_0x28eb7c){const _0x5b386b=a194_0x3e8a,_0x32cda9=_0x295769();while(!![]){try{const _0x4903e8=-parseInt(_0x5b386b(0xe7))/0x1+parseInt(_0x5b386b(0xfd))/0x2+-parseInt(_0x5b386b(0xeb))/0x3+parseInt(_0x5b386b(0xfb))/0x4*(parseInt(_0x5b386b(0xf3))/0x5)+-parseInt(_0x5b386b(0xef))/0x6*(-parseInt(_0x5b386b(0xf6))/0x7)+-parseInt(_0x5b386b(0xf1))/0x8*(-parseInt(_0x5b386b(0xf9))/0x9)+-parseInt(_0x5b386b(0x100))/0xa*(parseInt(_0x5b386b(0xff))/0xb);if(_0x4903e8===_0x28eb7c)break;else _0x32cda9['push'](_0x32cda9['shift']());}catch(_0x2719a8){_0x32cda9['push'](_0x32cda9['shift']());}}}(a194_0x51ba,0x8ffd0));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':a194_0x50ecd9(0xe8),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a194_0x50ecd9(0xf4),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a194_0x50ecd9(0x102),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':a194_0x50ecd9(0xec),'default':![],'description':'List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type'}],async 'validate'(_0x5ba879){const _0xbb278a=a194_0x50ecd9;if(_0x5ba879[_0xbb278a(0xe6)](_0xbb278a(0xee))&&_0x5ba879[_0xbb278a(0xfc)](_0xbb278a(0xfe))[_0xbb278a(0xfa)]())throw CliErrors[_0xbb278a(0xf7)]('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.',_0xbb278a(0xf2));if(_0x5ba879[_0xbb278a(0xe6)]('all'))return;readNotificationChannelType(_0x5ba879);},async 'execute'(_0x3b2a91){const _0x36733a=a194_0x50ecd9;if(_0x3b2a91['bool'](_0x36733a(0xee))){const _0x3a9834=await Promise[_0x36733a(0xee)](NOTIFICATION_CHANNEL_TYPES['map'](_0x369515=>listNotificationChannelConfigs(_0x3b2a91[_0x36733a(0xe9)],_0x369515))),_0x33aa5a=_0x3a9834[_0x36733a(0xf0)]()[_0x36733a(0xf8)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3b2a91[_0x36733a(0xe9)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x33aa5a[_0x36733a(0xed)],'configs':_0x33aa5a},'message':_0x36733a(0xf5)+_0x33aa5a[_0x36733a(0xed)]+_0x36733a(0x101)};}const _0x23b988=readNotificationChannelType(_0x3b2a91),_0x422b5d=await listNotificationChannelConfigs(_0x3b2a91['appCode'],_0x23b988),_0x531dc1=_0x422b5d['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3b2a91[_0x36733a(0xe9)],'channelType':_0x23b988,'count':_0x531dc1['length'],'configs':_0x531dc1},'message':_0x36733a(0xf5)+_0x531dc1['length']+'\x20'+_0x23b988+_0x36733a(0xea)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a195_0x1e50(_0x101843,_0x2f1927){_0x101843=_0x101843-0x1c9;const _0x4108e1=a195_0x4108();let _0x1e5007=_0x4108e1[_0x101843];return _0x1e5007;}const a195_0x29df98=a195_0x1e50;(function(_0x3d19ff,_0xc97e62){const _0x3dfaaa=a195_0x1e50,_0x19a893=_0x3d19ff();while(!![]){try{const _0x2578a4=parseInt(_0x3dfaaa(0x1e3))/0x1*(parseInt(_0x3dfaaa(0x1cb))/0x2)+parseInt(_0x3dfaaa(0x1e7))/0x3*(-parseInt(_0x3dfaaa(0x1ed))/0x4)+parseInt(_0x3dfaaa(0x1c9))/0x5*(parseInt(_0x3dfaaa(0x1e2))/0x6)+parseInt(_0x3dfaaa(0x1d1))/0x7*(parseInt(_0x3dfaaa(0x1ea))/0x8)+parseInt(_0x3dfaaa(0x1d7))/0x9+parseInt(_0x3dfaaa(0x1db))/0xa*(-parseInt(_0x3dfaaa(0x1da))/0xb)+-parseInt(_0x3dfaaa(0x1e4))/0xc;if(_0x2578a4===_0xc97e62)break;else _0x19a893['push'](_0x19a893['shift']());}catch(_0x34f2ce){_0x19a893['push'](_0x19a893['shift']());}}}(a195_0x4108,0x5b9fd));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 a195_0x4108(){const _0x10f74a=['notification_config_update_verification_unavailable','/notification/channel-config/update','128895hjycWv','\x20via\x20','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','239352SbHDwb','provesChange','appCode','12vyxxBe','verifiedFields','15MFdXXw','POST','14cEuxlh','notification_config_update_outcome_unknown','high-risk-write','notification',';\x20do\x20not\x20resubmit\x20automatically.','patch','49eNRCjg',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Notification\x20config\x20','planned','mutation','allMatch','4961241kCMsRZ','payload','\x20with\x20','43043TrRUML','140KGpDqr','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','channelType','update','Inspect\x20with\x20--id\x20','Inspect\x20ID\x20','before','773754QRMFDa','13251PXFoNZ','8176152knszqR'];a195_0x4108=function(){return _0x10f74a;};return a195_0x4108();}const UPDATE_PATH=a195_0x29df98(0x1e6);async function prepareUpdate(_0x92b0ba){const _0x1ac35f=a195_0x29df98,_0x3ab90d=readNotificationId(_0x92b0ba),_0x5a9f40=await readNotificationDocument(_0x92b0ba,_0x1ac35f(0x1de)),_0x13bf21=await requireExactNotificationConfig(_0x92b0ba[_0x1ac35f(0x1ec)],_0x3ab90d,_0x1ac35f(0x1de));return{'id':_0x3ab90d,'patch':_0x5a9f40,'before':_0x13bf21,'payload':mergeUpdateInput(_0x13bf21,_0x5a9f40),'planned':plannedUpdateProjection(_0x13bf21,_0x5a9f40)};}export const notificationConfigUpdate={'service':a195_0x29df98(0x1ce),'command':'config-update','description':a195_0x29df98(0x1dc),'risk':a195_0x29df98(0x1cd),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4e28bd){readNotificationId(_0x4e28bd),assertSingleNotificationSource(_0x4e28bd),requireNotificationExplicitYes(_0x4e28bd);},async 'dryRun'(_0x2aa25f){const _0x2c0907=a195_0x29df98,_0x36372d=await prepareUpdate(_0x2aa25f),_0x53b4f5=notificationLookupCommand(_0x2aa25f[_0x2c0907(0x1ec)],_0x36372d[_0x2c0907(0x1e1)][_0x2c0907(0x1dd)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x36372d[_0x2c0907(0x1e1)]),'before':projectNotificationConfig(_0x36372d[_0x2c0907(0x1e1)]),'after':_0x36372d[_0x2c0907(0x1d4)],'dryRun':!![],'backend':{'method':_0x2c0907(0x1ca),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x2c0907(0x1d4),'lookupCommand':_0x53b4f5}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x122a62){const _0x495155=a195_0x29df98;requireNotificationExplicitYes(_0x122a62);const _0x1841ac=await prepareUpdate(_0x122a62),_0x267524=notificationLookupCommand(_0x122a62[_0x495155(0x1ec)],_0x1841ac[_0x495155(0x1e1)][_0x495155(0x1dd)]);let _0x104e65=![];try{await updateNotificationChannelConfig(_0x1841ac[_0x495155(0x1d8)]);}catch(_0x5038f4){if(!isPlatformTransportFailure(_0x5038f4))throw safeApiFailure(_0x495155(0x1de),_0x495155(0x1d5),_0x495155(0x1e0)+_0x1841ac['id']+_0x495155(0x1d9)+_0x267524+_0x495155(0x1d2));_0x104e65=!![];}let _0x1165d8;try{const _0x565425=await getNotificationChannelConfig(_0x1841ac['id'],_0x122a62['appCode']);_0x1165d8=normalizeExactNotificationConfig(_0x565425,_0x1841ac['id'],_0x122a62['appCode']);}catch{throw notificationError(_0x104e65?_0x495155(0x1cc):_0x495155(0x1e5),_0x495155(0x1d3)+_0x1841ac['id']+_0x495155(0x1e9),_0x495155(0x1df)+_0x1841ac['id']+_0x495155(0x1e8)+_0x267524+_0x495155(0x1cf));}const _0x4d4bae=requestedSafeFieldsMatch(_0x1841ac[_0x495155(0x1e1)],_0x1165d8,_0x1841ac[_0x495155(0x1d0)]);if(!_0x4d4bae[_0x495155(0x1d6)]||_0x104e65&&!_0x4d4bae[_0x495155(0x1eb)])throw notificationError(_0x104e65?_0x495155(0x1cc):'notification_config_update_verification_failed',_0x495155(0x1d3)+_0x1841ac['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x495155(0x1df)+_0x1841ac['id']+'\x20via\x20'+_0x267524+';\x20do\x20not\x20resubmit\x20automatically.');const _0x3c6937=_0x104e65?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x1165d8),'before':projectNotificationConfig(_0x1841ac[_0x495155(0x1e1)]),'after':projectNotificationConfig(_0x1165d8),'dryRun':![],'backend':{'method':_0x495155(0x1ca),'path':UPDATE_PATH},'warnings':_0x3c6937,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x104e65,'verifiedFields':_0x4d4bae[_0x495155(0x1ee)],'lookupCommand':_0x267524}},'message':'Updated\x20notification\x20config\x20'+_0x1165d8['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a196_0x8452(){const _0x155964=['202510OQlEjI','2191582fiBUsT','69217RjREBH','1221865tYhRNn','4241392UbulFf','507780XJKcLQ','4PbtOVW','500gcymCD','564ojZIZr','17206LxFmNI','18yHITpc'];a196_0x8452=function(){return _0x155964;};return a196_0x8452();}(function(_0x2a6b09,_0x17e95e){const _0x325a64=a196_0x11e0,_0x92518=_0x2a6b09();while(!![]){try{const _0x38ef92=-parseInt(_0x325a64(0xa8))/0x1+parseInt(_0x325a64(0xa7))/0x2+-parseInt(_0x325a64(0xab))/0x3+parseInt(_0x325a64(0xac))/0x4*(-parseInt(_0x325a64(0xa9))/0x5)+parseInt(_0x325a64(0xae))/0x6*(parseInt(_0x325a64(0xa4))/0x7)+-parseInt(_0x325a64(0xaa))/0x8*(parseInt(_0x325a64(0xa5))/0x9)+-parseInt(_0x325a64(0xad))/0xa*(-parseInt(_0x325a64(0xa6))/0xb);if(_0x38ef92===_0x17e95e)break;else _0x92518['push'](_0x92518['shift']());}catch(_0x59f8b0){_0x92518['push'](_0x92518['shift']());}}}(a196_0x8452,0xabe91));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a196_0x11e0(_0x22567e,_0x313dc1){_0x22567e=_0x22567e-0xa4;const _0x845250=a196_0x8452();let _0x11e043=_0x845250[_0x22567e];return _0x11e043;}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a197_0x51c5e6=a197_0x1529;function a197_0x1529(_0x4e21fd,_0x58287b){_0x4e21fd=_0x4e21fd-0x13a;const _0x3f4868=a197_0x3f48();let _0x152908=_0x3f4868[_0x4e21fd];return _0x152908;}(function(_0x332541,_0x12073e){const _0x1c55bc=a197_0x1529,_0x1da24a=_0x332541();while(!![]){try{const _0x5e2968=-parseInt(_0x1c55bc(0x172))/0x1*(parseInt(_0x1c55bc(0x15c))/0x2)+-parseInt(_0x1c55bc(0x16c))/0x3+-parseInt(_0x1c55bc(0x1a9))/0x4*(parseInt(_0x1c55bc(0x13b))/0x5)+parseInt(_0x1c55bc(0x140))/0x6+parseInt(_0x1c55bc(0x173))/0x7+-parseInt(_0x1c55bc(0x16b))/0x8*(-parseInt(_0x1c55bc(0x17d))/0x9)+-parseInt(_0x1c55bc(0x163))/0xa*(-parseInt(_0x1c55bc(0x148))/0xb);if(_0x5e2968===_0x12073e)break;else _0x1da24a['push'](_0x1da24a['shift']());}catch(_0x274719){_0x1da24a['push'](_0x1da24a['shift']());}}}(a197_0x3f48,0x9d1e4));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a197_0x51c5e6(0x193),a197_0x51c5e6(0x164),a197_0x51c5e6(0x174),'WECOM',a197_0x51c5e6(0x185)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x51c5e6(0x1ac),a197_0x51c5e6(0x17f),a197_0x51c5e6(0x16a),a197_0x51c5e6(0x13d),'description',a197_0x51c5e6(0x189),a197_0x51c5e6(0x162)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a197_0x51c5e6(0x180),a197_0x51c5e6(0x18d)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x51c5e6(0x199),'recipients',a197_0x51c5e6(0x144),a197_0x51c5e6(0x14f),a197_0x51c5e6(0x170),a197_0x51c5e6(0x15f),a197_0x51c5e6(0x1b2),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a197_0x51c5e6(0x1b0),'required':![],'description':a197_0x51c5e6(0x165)},{'name':a197_0x51c5e6(0x169),'type':'boolean','required':![],'default':![],'description':a197_0x51c5e6(0x188)},{'name':a197_0x51c5e6(0x150),'type':a197_0x51c5e6(0x1b0),'required':![],'description':a197_0x51c5e6(0x1b5)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x51c5e6(0x146),'required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x58c5c7,_0x76af1e,_0x90d2c2){return new CliError(_0x58c5c7,0x1,_0x76af1e,_0x90d2c2);}export function readNotificationId(_0x8fe525){const _0xcdbe92=a197_0x51c5e6,_0x47e231=_0x8fe525['num']('id');if(!Number[_0xcdbe92(0x192)](_0x47e231)||_0x47e231<=0x0)throw notificationError(_0xcdbe92(0x1af),_0xcdbe92(0x161));return _0x47e231;}export function requireNotificationExplicitYes(_0xf52d77){const _0xfb038=a197_0x51c5e6;if(_0xf52d77[_0xfb038(0x175)](_0xfb038(0x141))||_0xf52d77['bool']('yes'))return;throw notificationError(_0xfb038(0x160),_0xfb038(0x1b1),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x62e34f,_0x44819c=a197_0x51c5e6(0x18c),_0x27fdd0='EMAIL'){const _0x436a30=a197_0x51c5e6,_0x30fd27=_0x62e34f[_0x436a30(0x13f)](_0x44819c)[_0x436a30(0x16d)]()||_0x27fdd0;if(!NOTIFICATION_CHANNEL_TYPES[_0x436a30(0x159)](_0x30fd27))throw CliErrors['validation']('Invalid\x20--'+_0x44819c+':\x20'+_0x30fd27,_0x436a30(0x179)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x30fd27;}export function assertSingleNotificationSource(_0x1c235b){const _0x61d596=a197_0x51c5e6,_0x2f889f=[],_0x2f3d92=_0x1c235b['str']('file')['trim']();if(_0x2f3d92)_0x2f889f[_0x61d596(0x149)]({'kind':_0x61d596(0x18f),'path':_0x2f3d92});if(_0x1c235b[_0x61d596(0x175)](_0x61d596(0x169)))_0x2f889f[_0x61d596(0x149)]({'kind':_0x61d596(0x169)});const _0x2239d4=_0x1c235b[_0x61d596(0x13f)](_0x61d596(0x150))[_0x61d596(0x16d)]();if(_0x2239d4)_0x2f889f[_0x61d596(0x149)]({'kind':_0x61d596(0x198),'name':_0x2239d4});if(_0x2f889f[_0x61d596(0x157)]===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0x61d596(0x1a7));if(_0x2f889f[_0x61d596(0x157)]>0x1)throw CliErrors['validation'](_0x61d596(0x166),_0x61d596(0x1a7));return _0x2f889f[0x0];}export async function readNotificationDocument(_0x10ad61,_0x247707){const _0x484687=a197_0x51c5e6,_0x2f22ed=assertSingleNotificationSource(_0x10ad61),_0x256d4c=_0x2f22ed[_0x484687(0x186)]==='file'?_0x484687(0x171)+_0x2f22ed[_0x484687(0x147)]:_0x2f22ed['kind']===_0x484687(0x198)?_0x484687(0x17c)+_0x2f22ed[_0x484687(0x152)]:_0x484687(0x169);let _0x315757;try{if(_0x2f22ed['kind']==='file')_0x315757=await readFile(_0x2f22ed[_0x484687(0x147)],_0x484687(0x1a1));else{if(_0x2f22ed[_0x484687(0x186)]===_0x484687(0x198)){if(!(_0x2f22ed[_0x484687(0x152)]in process.env))throw notificationError(_0x484687(0x187),_0x484687(0x1a2)+_0x2f22ed['name']);_0x315757=process.env[_0x2f22ed.name]??'';}else _0x315757=await readStdin();}}catch(_0x733bd){if(_0x733bd instanceof CliError)throw _0x733bd;throw notificationError('notification_config_source_unavailable',_0x484687(0x167)+_0x256d4c+'.');}let _0x52de9f;try{_0x52de9f=JSON[_0x484687(0x176)](_0x315757);}catch{throw notificationError('notification_config_json_invalid',_0x484687(0x15a)+_0x256d4c+_0x484687(0x19b),_0x484687(0x17e));}if(!isJsonObject(_0x52de9f))throw notificationError(_0x484687(0x1a3),'Notification\x20JSON\x20from\x20'+_0x256d4c+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x52de9f,_0x247707);}export function projectNotificationListConfig(_0x221df8,_0x5e578b){const _0xd2948=a197_0x51c5e6;return{'id':typeof _0x221df8['id']===_0xd2948(0x146)?_0x221df8['id']:null,'configCode':requireResponseString(_0x221df8[_0xd2948(0x180)],_0xd2948(0x180),_0x5e578b),'configName':requireResponseString(_0x221df8[_0xd2948(0x1ac)],_0xd2948(0x1ac),_0x5e578b),'channelType':requireResponseString(_0x221df8[_0xd2948(0x17f)],_0xd2948(0x17f),_0x5e578b),'description':normalizeNullableString(_0x221df8[_0xd2948(0x19a)]),'createTime':normalizeNullableString(_0x221df8[_0xd2948(0x177)]),'updateTime':normalizeNullableString(_0x221df8[_0xd2948(0x142)])};}export function normalizeExactNotificationConfig(_0x26fee3,_0x597c15,_0x251c04){const _0x59c617=a197_0x51c5e6;if(!Number[_0x59c617(0x192)](_0x26fee3['id'])||_0x26fee3['id']!==_0x597c15)throw notificationError('notification_config_response_invalid',_0x59c617(0x13e)+_0x597c15+'.');if(_0x26fee3['appCode']!==_0x251c04)throw notificationError(_0x59c617(0x16f),_0x59c617(0x1ab)+_0x597c15+_0x59c617(0x1ad));const _0x1c8a3b=requireExactString(_0x26fee3[_0x59c617(0x1ac)],_0x59c617(0x1ac),_0x597c15),_0x4a6484=requireExactString(_0x26fee3[_0x59c617(0x180)],_0x59c617(0x180),_0x597c15),_0x14e422=requireExactString(_0x26fee3[_0x59c617(0x17f)],'channelType',_0x597c15);if(!NOTIFICATION_CHANNEL_TYPES[_0x59c617(0x159)](_0x14e422))throw notificationError(_0x59c617(0x16f),_0x59c617(0x1ab)+_0x597c15+'\x20has\x20an\x20unsupported\x20channelType.');const _0x56d655=responseNullableString(_0x26fee3[_0x59c617(0x16a)],_0x59c617(0x16a),_0x597c15),_0x59774e=responseNullableString(_0x26fee3[_0x59c617(0x13d)],'channelConfig',_0x597c15),_0x206c28=responseNullableString(_0x26fee3[_0x59c617(0x19a)],_0x59c617(0x19a),_0x597c15),_0x3c3296=responseNullableTimeout(_0x26fee3[_0x59c617(0x189)],_0x59c617(0x189),_0x597c15),_0x4c24d9=responseNullableTimeout(_0x26fee3[_0x59c617(0x162)],_0x59c617(0x162),_0x597c15);return{'id':_0x597c15,'appCode':_0x251c04,'configCode':_0x4a6484,'configName':_0x1c8a3b,'channelType':_0x14e422,'endpointUrl':redactSensitive(_0x56d655),'channelConfig':redactSensitive(_0x59774e),'description':_0x206c28,'connectTimeout':_0x3c3296,'readTimeout':_0x4c24d9,'endpointUrlRaw':_0x56d655,'channelConfigRaw':_0x59774e};}export async function requireExactNotificationConfig(_0x1f9206,_0x4478c4,_0x28caa2){const _0x3f6161=a197_0x51c5e6;let _0x540574;try{_0x540574=await getNotificationChannelConfig(_0x4478c4,_0x1f9206);}catch{throw safeApiFailure(_0x28caa2,_0x3f6161(0x183),_0x3f6161(0x191)+_0x1f9206+_0x3f6161(0x14e));}return normalizeExactNotificationConfig(_0x540574,_0x4478c4,_0x1f9206);}export function projectNotificationConfig(_0x54b332){const _0x2fbada=a197_0x51c5e6;return{'id':_0x54b332['id']??null,'appCode':_0x54b332[_0x2fbada(0x184)],'configCode':_0x54b332['configCode']??null,'configName':_0x54b332[_0x2fbada(0x1ac)],'channelType':_0x54b332[_0x2fbada(0x17f)],'endpointUrl':redactSensitive(_0x54b332['endpointUrl']),'channelConfig':redactSensitive(_0x54b332[_0x2fbada(0x13d)]),'description':_0x54b332[_0x2fbada(0x19a)]??null,'connectTimeout':_0x54b332['connectTimeout']??null,'readTimeout':_0x54b332['readTimeout']??null};}export function notificationSelector(_0x4b689a){const _0x126a9e=a197_0x51c5e6;return{'appCode':_0x4b689a[_0x126a9e(0x184)],'id':_0x4b689a['id'],'configCode':_0x4b689a[_0x126a9e(0x180)],'configName':_0x4b689a[_0x126a9e(0x1ac)],'channelType':_0x4b689a[_0x126a9e(0x17f)]};}export function createMutationInput(_0xe59177,_0x1be2d1){const _0x3eaf02=a197_0x51c5e6;return{'appCode':_0xe59177,'configName':_0x1be2d1[_0x3eaf02(0x1ac)],'channelType':_0x1be2d1['channelType'],...hasOwn(_0x1be2d1,_0x3eaf02(0x16a))?{'endpointUrl':_0x1be2d1[_0x3eaf02(0x16a)]}:{},...hasOwn(_0x1be2d1,_0x3eaf02(0x13d))?{'channelConfig':serializeChannelConfig(_0x1be2d1['channelConfig'])}:{},...hasOwn(_0x1be2d1,_0x3eaf02(0x19a))?{'description':_0x1be2d1[_0x3eaf02(0x19a)]}:{},...hasOwn(_0x1be2d1,_0x3eaf02(0x189))?{'connectTimeout':_0x1be2d1[_0x3eaf02(0x189)]}:{},...hasOwn(_0x1be2d1,_0x3eaf02(0x162))?{'readTimeout':_0x1be2d1[_0x3eaf02(0x162)]}:{}};}export function mergeUpdateInput(_0x385d00,_0x51deec){const _0x26595e=a197_0x51c5e6;return{'id':_0x385d00['id'],'appCode':_0x385d00['appCode'],'configName':_0x51deec[_0x26595e(0x1ac)]??_0x385d00[_0x26595e(0x1ac)],'channelType':_0x51deec[_0x26595e(0x17f)]??_0x385d00[_0x26595e(0x17f)],'endpointUrl':hasOwn(_0x51deec,_0x26595e(0x16a))?_0x51deec[_0x26595e(0x16a)]:_0x385d00[_0x26595e(0x13a)],'channelConfig':hasOwn(_0x51deec,_0x26595e(0x13d))?serializeChannelConfig(_0x51deec[_0x26595e(0x13d)]):_0x385d00['channelConfigRaw'],'description':hasOwn(_0x51deec,'description')?_0x51deec[_0x26595e(0x19a)]:_0x385d00[_0x26595e(0x19a)],'connectTimeout':hasOwn(_0x51deec,_0x26595e(0x189))?_0x51deec['connectTimeout']:_0x385d00[_0x26595e(0x189)],'readTimeout':hasOwn(_0x51deec,'readTimeout')?_0x51deec[_0x26595e(0x162)]:_0x385d00[_0x26595e(0x162)]};}export function plannedUpdateProjection(_0x249f5a,_0x297f56){const _0x4ae95b=a197_0x51c5e6;return projectNotificationConfig({'id':_0x249f5a['id'],'appCode':_0x249f5a[_0x4ae95b(0x184)],'configCode':_0x249f5a[_0x4ae95b(0x180)],'configName':_0x297f56['configName']??_0x249f5a[_0x4ae95b(0x1ac)],'channelType':_0x297f56[_0x4ae95b(0x17f)]??_0x249f5a[_0x4ae95b(0x17f)],'endpointUrl':hasOwn(_0x297f56,_0x4ae95b(0x16a))?_0x297f56[_0x4ae95b(0x16a)]:_0x249f5a[_0x4ae95b(0x13a)],'channelConfig':hasOwn(_0x297f56,_0x4ae95b(0x13d))?_0x297f56[_0x4ae95b(0x13d)]:_0x249f5a[_0x4ae95b(0x16e)],'description':hasOwn(_0x297f56,_0x4ae95b(0x19a))?_0x297f56['description']:_0x249f5a[_0x4ae95b(0x19a)],'connectTimeout':hasOwn(_0x297f56,_0x4ae95b(0x189))?_0x297f56[_0x4ae95b(0x189)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x249f5a[_0x4ae95b(0x189)],'readTimeout':hasOwn(_0x297f56,_0x4ae95b(0x162))?_0x297f56[_0x4ae95b(0x162)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x249f5a[_0x4ae95b(0x162)]});}export function requestedSafeFieldsMatch(_0x5de184,_0x4bb812,_0x41c5c0){const _0x51bcaf=a197_0x51c5e6,_0x5d9c9f=[],_0x3a4aaa=[],_0x1c0d45=[];for(const _0x1f573b of[_0x51bcaf(0x1ac),'channelType',_0x51bcaf(0x19a)]){if(!hasOwn(_0x41c5c0,_0x1f573b))continue;_0x1c0d45['push'](_0x1f573b),_0x5d9c9f[_0x51bcaf(0x149)](_0x4bb812[_0x1f573b]===_0x41c5c0[_0x1f573b]),_0x3a4aaa['push'](_0x5de184[_0x1f573b]!==_0x41c5c0[_0x1f573b]&&_0x4bb812[_0x1f573b]===_0x41c5c0[_0x1f573b]);}for(const _0x52dd23 of[_0x51bcaf(0x189),_0x51bcaf(0x162)]){if(!hasOwn(_0x41c5c0,_0x52dd23))continue;const _0x5d5df7=_0x41c5c0[_0x52dd23]??(_0x52dd23===_0x51bcaf(0x189)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x1c0d45[_0x51bcaf(0x149)](_0x52dd23),_0x5d9c9f['push'](_0x4bb812[_0x52dd23]===_0x5d5df7),_0x3a4aaa[_0x51bcaf(0x149)](_0x5de184[_0x52dd23]!==_0x5d5df7&&_0x4bb812[_0x52dd23]===_0x5d5df7);}return hasOwn(_0x41c5c0,_0x51bcaf(0x16a))&&_0x41c5c0[_0x51bcaf(0x16a)]===null&&(_0x1c0d45['push'](_0x51bcaf(0x190)),_0x5d9c9f['push'](_0x4bb812[_0x51bcaf(0x13a)]===null||_0x4bb812['endpointUrlRaw']===''),_0x3a4aaa[_0x51bcaf(0x149)](_0x5de184[_0x51bcaf(0x13a)]!==null&&_0x5de184['endpointUrlRaw']!==''&&(_0x4bb812['endpointUrlRaw']===null||_0x4bb812[_0x51bcaf(0x13a)]===''))),{'allMatch':_0x5d9c9f[_0x51bcaf(0x14a)](Boolean),'provesChange':_0x3a4aaa['some'](Boolean),'verifiedFields':_0x1c0d45};}export function validateNotificationDeleteReadback(_0x3ce576,_0x5945e9,_0x5275bf){const _0xef321d=a197_0x51c5e6;for(const [_0x444cae,_0x17ae58]of _0x3ce576[_0xef321d(0x19d)]()){if(!Number[_0xef321d(0x192)](_0x17ae58['id'])||_0x17ae58['id']<=0x0)throw notificationError(_0xef321d(0x16f),_0xef321d(0x15b)+(_0x444cae+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x17ae58['appCode']!==_0x5945e9)throw notificationError(_0xef321d(0x16f),_0xef321d(0x15b)+(_0x444cae+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x17ae58['channelType']!==_0x5275bf)throw notificationError(_0xef321d(0x16f),_0xef321d(0x15b)+(_0x444cae+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x57dc4a,_0x5855ca,_0xf5dc64){const _0x207cc5=a197_0x51c5e6;return notificationError(_0x207cc5(0x178)+_0x57dc4a+'_'+(_0x5855ca==='mutation'?_0x207cc5(0x1aa):_0x5855ca+_0x207cc5(0x19e)),_0x207cc5(0x1ab)+_0x57dc4a+'\x20'+_0x5855ca+'\x20failed.',_0xf5dc64);}export function notificationLookupCommand(_0x28dd42,_0x2858e9){const _0x160e3a=a197_0x51c5e6;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x28dd42+_0x160e3a(0x15e)+_0x2858e9+'\x20--format\x20compress';}function validateNotificationDocument(_0x3e73cb,_0x5e28a8){const _0x59b470=a197_0x51c5e6;for(const _0x587759 of Object[_0x59b470(0x18b)](_0x3e73cb)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x587759))throw notificationError(_0x59b470(0x14b),_0x59b470(0x14c)+_0x587759+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x59b470(0x155)](_0x587759))throw notificationError('notification_config_field_unknown',_0x59b470(0x13c)+_0x587759+'\x22.');}if(_0x5e28a8===_0x59b470(0x156)&&Object[_0x59b470(0x18b)](_0x3e73cb)[_0x59b470(0x157)]===0x0)throw notificationError(_0x59b470(0x1a5),_0x59b470(0x153));const _0x3e72c9={};if(hasOwn(_0x3e73cb,_0x59b470(0x1ac)))_0x3e72c9[_0x59b470(0x1ac)]=validateRequiredString(_0x3e73cb['configName'],_0x59b470(0x1ac),0x80);else{if(_0x5e28a8===_0x59b470(0x1b4))throw notificationError(_0x59b470(0x1a6),_0x59b470(0x197)+'\x22configName\x22.');}if(hasOwn(_0x3e73cb,_0x59b470(0x17f))){if(typeof _0x3e73cb['channelType']!=='string')throw invalidFieldType(_0x59b470(0x17f),_0x59b470(0x196));const _0x6358bf=_0x3e73cb[_0x59b470(0x17f)][_0x59b470(0x16d)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x59b470(0x159)](_0x6358bf))throw notificationError('notification_config_field_invalid',_0x59b470(0x181),_0x59b470(0x179)+NOTIFICATION_CHANNEL_TYPES[_0x59b470(0x195)](',\x20')+'.');_0x3e72c9[_0x59b470(0x17f)]=_0x6358bf;}else{if(_0x5e28a8===_0x59b470(0x1b4))throw notificationError('notification_config_field_required',_0x59b470(0x197)+_0x59b470(0x182));}for(const [_0x35a93e,_0x2f7386]of[['endpointUrl',0x200],[_0x59b470(0x19a),0x100]]){if(!hasOwn(_0x3e73cb,_0x35a93e))continue;const _0x22cba7=_0x3e73cb[_0x35a93e];if(_0x22cba7!==null&&typeof _0x22cba7!==_0x59b470(0x1b0))throw invalidFieldType(_0x35a93e,'a\x20string\x20or\x20null');if(typeof _0x22cba7===_0x59b470(0x1b0)&&_0x22cba7['length']>_0x2f7386)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x35a93e+_0x59b470(0x19f)+_0x2f7386+'\x20characters.');_0x3e72c9[_0x35a93e]=_0x22cba7;}if(hasOwn(_0x3e73cb,'channelConfig')){const _0x53a4b6=_0x3e73cb['channelConfig'];if(_0x53a4b6===null&&_0x5e28a8===_0x59b470(0x1b4))throw invalidFieldType(_0x59b470(0x13d),_0x59b470(0x17b));if(_0x53a4b6!==null&&!isJsonObject(_0x53a4b6))throw invalidFieldType(_0x59b470(0x13d),_0x5e28a8===_0x59b470(0x156)?_0x59b470(0x18e):_0x59b470(0x17b));_0x53a4b6!==null&&validateChannelConfigFields(_0x3e72c9[_0x59b470(0x17f)],_0x53a4b6),_0x3e72c9[_0x59b470(0x13d)]=_0x53a4b6;}for(const _0x3c8df4 of['connectTimeout',_0x59b470(0x162)]){if(!hasOwn(_0x3e73cb,_0x3c8df4))continue;const _0x575995=_0x3e73cb[_0x3c8df4];if(_0x575995!==null&&(!Number[_0x59b470(0x192)](_0x575995)||_0x575995<0x0))throw notificationError('notification_config_field_invalid',_0x59b470(0x14c)+_0x3c8df4+_0x59b470(0x194));_0x3e72c9[_0x3c8df4]=_0x575995;}return _0x3e72c9;}function validateRequiredString(_0x344ddf,_0xfe505d,_0x1c8bc2){const _0x516a78=a197_0x51c5e6;if(typeof _0x344ddf!==_0x516a78(0x1b0))throw invalidFieldType(_0xfe505d,'a\x20non-empty\x20string');const _0x35200b=_0x344ddf[_0x516a78(0x16d)]();if(!_0x35200b)throw notificationError(_0x516a78(0x145),_0x516a78(0x14c)+_0xfe505d+_0x516a78(0x17a));if(_0x35200b[_0x516a78(0x157)]>_0x1c8bc2)throw notificationError(_0x516a78(0x145),_0x516a78(0x14c)+_0xfe505d+_0x516a78(0x19f)+_0x1c8bc2+_0x516a78(0x19c));return _0x35200b;}function a197_0x3f48(){const _0x5bfa04=['utf8','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','notification_config_json_invalid','stringify','notification_config_update_empty','notification_config_field_required','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','messageTemplate','296yhcvUk','failed','Notification\x20config\x20','configName','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','apiError','notification_config_id_invalid','string','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','fromName','\x22\x20must\x20be\x20','create','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','endpointUrlRaw','24425CkSnJW','Unknown\x20notification\x20JSON\x20field\x20\x22','channelConfig','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','str','5219562MqOGAu','dry-run','updateTime','\x20has\x20invalid\x20field\x20\x22','ccList','notification_config_field_invalid','number','path','11ssVwHs','push','every','notification_config_field_forbidden','Notification\x20JSON\x20field\x20\x22','setEncoding','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','bccList','from-env','call','name','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','<redacted>','has','update','length','prototype','includes','Notification\x20JSON\x20from\x20','Notification\x20config\x20list\x20item\x20','3878PvcTZo','object','\x20--type\x20','subjectPrefix','notification_config_confirmation_required','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','readTimeout','8230780wCGQul','FEISHU','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','Notification\x20JSON\x20source\x20is\x20ambiguous.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x20is\x20missing\x20required\x20field\x20\x22','stdin','endpointUrl','17104FYAsBh','2584497vEEhoX','trim','channelConfigRaw','notification_config_response_invalid','replyTo','file\x20','1IvtfYO','375291ymCfoy','DINGTALK','bool','parse','createTime','notification_config_','Allowed\x20values:\x20','\x22\x20must\x20be\x20a\x20non-empty\x20string.','a\x20JSON\x20object','environment\x20variable\x20','513vpgLeh','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','channelType','configCode','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x22channelType\x22.','preflight','appCode','WEBHOOK','kind','notification_config_source_unavailable','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','connectTimeout','\x22\x20is\x20forbidden.','keys','type','channelCode','a\x20JSON\x20object\x20or\x20null','file','endpointUrl:null','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','isSafeInteger','EMAIL','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','join','a\x20supported\x20string','Create\x20JSON\x20requires\x20field\x20','env','emailTargets','description','\x20is\x20invalid.','\x20characters.','entries','_unavailable','\x22\x20cannot\x20exceed\x20','notification_config_channel_field_forbidden'];a197_0x3f48=function(){return _0x5bfa04;};return a197_0x3f48();}function validateChannelConfigFields(_0x1c1bcf,_0x492a7c){const _0x236da0=a197_0x51c5e6;if(hasOwn(_0x492a7c,_0x236da0(0x1a8)))throw forbiddenChannelConfigField('messageTemplate');if(_0x1c1bcf===_0x236da0(0x193))for(const _0x3f155d of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x492a7c,_0x3f155d))throw forbiddenChannelConfigField(_0x3f155d);}}function forbiddenChannelConfigField(_0x510932){const _0x48aede=a197_0x51c5e6;return notificationError(_0x48aede(0x1a0),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x510932+_0x48aede(0x18a));}function invalidFieldType(_0x58cc3d,_0x53d824){const _0x217029=a197_0x51c5e6;return notificationError('notification_config_field_invalid',_0x217029(0x14c)+_0x58cc3d+_0x217029(0x1b3)+_0x53d824+'.');}function serializeChannelConfig(_0x160061){const _0x3410de=a197_0x51c5e6;return _0x160061===null||_0x160061===undefined?null:JSON[_0x3410de(0x1a4)](_0x160061);}function redactSensitive(_0x112a9a){const _0x4d7d34=a197_0x51c5e6;return _0x112a9a===null||_0x112a9a===undefined||_0x112a9a===''?null:_0x4d7d34(0x154);}function requireResponseString(_0x2d3692,_0x72604d,_0x5809ee){const _0x44f2fb=a197_0x51c5e6;if(typeof _0x2d3692!==_0x44f2fb(0x1b0)||_0x2d3692[_0x44f2fb(0x16d)]()==='')throw CliErrors[_0x44f2fb(0x1ae)]('Invalid\x20notification\x20config\x20response.','Item\x20'+(_0x5809ee+0x1)+_0x44f2fb(0x168)+_0x72604d+'\x22.');return _0x2d3692[_0x44f2fb(0x16d)]();}function requireExactString(_0x37c336,_0x43c090,_0x3d21e3){const _0x31924c=a197_0x51c5e6;if(typeof _0x37c336!==_0x31924c(0x1b0)||_0x37c336[_0x31924c(0x16d)]()==='')throw notificationError(_0x31924c(0x16f),_0x31924c(0x1ab)+_0x3d21e3+_0x31924c(0x168)+_0x43c090+'\x22.');return _0x37c336['trim']();}function responseNullableString(_0x2f7ac1,_0x191b43,_0x587885){const _0x1255a5=a197_0x51c5e6;if(_0x2f7ac1===undefined||_0x2f7ac1===null)return null;if(typeof _0x2f7ac1!==_0x1255a5(0x1b0))throw notificationError('notification_config_response_invalid',_0x1255a5(0x1ab)+_0x587885+'\x20has\x20invalid\x20field\x20\x22'+_0x191b43+'\x22.');return _0x2f7ac1;}function responseNullableTimeout(_0xc820d1,_0x1a7c21,_0x586c72){const _0x179522=a197_0x51c5e6;if(_0xc820d1===undefined||_0xc820d1===null)return null;if(!Number[_0x179522(0x192)](_0xc820d1)||_0xc820d1<0x0)throw notificationError(_0x179522(0x16f),_0x179522(0x1ab)+_0x586c72+_0x179522(0x143)+_0x1a7c21+'\x22.');return _0xc820d1;}function normalizeNullableString(_0x5c3807){return typeof _0x5c3807==='string'?_0x5c3807:null;}function isJsonObject(_0xad4bc5){const _0x596d60=a197_0x51c5e6;return _0xad4bc5!==null&&typeof _0xad4bc5===_0x596d60(0x15d)&&!Array['isArray'](_0xad4bc5);}function hasOwn(_0x26518e,_0x3afee5){const _0x28e76e=a197_0x51c5e6;return Object[_0x28e76e(0x158)]['hasOwnProperty'][_0x28e76e(0x151)](_0x26518e,_0x3afee5);}async function readStdin(){const _0x2f0dd1=a197_0x51c5e6;let _0x3b7afb='';process['stdin'][_0x2f0dd1(0x14d)](_0x2f0dd1(0x1a1));for await(const _0x12875f of process[_0x2f0dd1(0x169)])_0x3b7afb+=_0x12875f;return _0x3b7afb;}
|
|
1
|
+
const a197_0x168f92=a197_0x3b06;(function(_0xfaaca2,_0x18bce2){const _0x15df05=a197_0x3b06,_0x13741e=_0xfaaca2();while(!![]){try{const _0x27af8f=parseInt(_0x15df05(0x202))/0x1*(parseInt(_0x15df05(0x229))/0x2)+-parseInt(_0x15df05(0x265))/0x3+-parseInt(_0x15df05(0x253))/0x4+-parseInt(_0x15df05(0x221))/0x5*(parseInt(_0x15df05(0x22f))/0x6)+parseInt(_0x15df05(0x203))/0x7+parseInt(_0x15df05(0x216))/0x8*(parseInt(_0x15df05(0x26c))/0x9)+parseInt(_0x15df05(0x239))/0xa*(parseInt(_0x15df05(0x222))/0xb);if(_0x27af8f===_0x18bce2)break;else _0x13741e['push'](_0x13741e['shift']());}catch(_0x28b16d){_0x13741e['push'](_0x13741e['shift']());}}}(a197_0x5a93,0x9f561));function a197_0x3b06(_0x23ca98,_0x320e3e){_0x23ca98=_0x23ca98-0x1f2;const _0x5a9361=a197_0x5a93();let _0x3b06a5=_0x5a9361[_0x23ca98];return _0x3b06a5;}import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a197_0x168f92(0x23c),a197_0x168f92(0x242),'DINGTALK',a197_0x168f92(0x256),a197_0x168f92(0x1f7)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x168f92(0x20e),a197_0x168f92(0x232),'endpointUrl',a197_0x168f92(0x23d),a197_0x168f92(0x21f),a197_0x168f92(0x204),a197_0x168f92(0x249)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x168f92(0x22b),'configCode','channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x168f92(0x266),'recipients',a197_0x168f92(0x25a),a197_0x168f92(0x228),a197_0x168f92(0x225),a197_0x168f92(0x22c),a197_0x168f92(0x22d),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x168f92(0x218),'type':a197_0x168f92(0x23f),'required':![],'description':a197_0x168f92(0x248)},{'name':a197_0x168f92(0x205),'type':a197_0x168f92(0x24a),'required':![],'default':![],'description':a197_0x168f92(0x213)},{'name':a197_0x168f92(0x1f6),'type':a197_0x168f92(0x23f),'required':![],'description':a197_0x168f92(0x214)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x168f92(0x227),'required':!![],'description':a197_0x168f92(0x23e)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5d8e8a,_0xbaee73,_0x1cfffc){return new CliError(_0x5d8e8a,0x1,_0xbaee73,_0x1cfffc);}export function readNotificationId(_0x5f1b35){const _0x5470a5=a197_0x168f92,_0x5dfcb6=_0x5f1b35[_0x5470a5(0x20a)]('id');if(!Number[_0x5470a5(0x23a)](_0x5dfcb6)||_0x5dfcb6<=0x0)throw notificationError(_0x5470a5(0x224),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x5dfcb6;}export function requireNotificationExplicitYes(_0xc8ed06){const _0x229019=a197_0x168f92;if(_0xc8ed06[_0x229019(0x1fc)](_0x229019(0x208))||_0xc8ed06[_0x229019(0x1fc)](_0x229019(0x243)))return;throw notificationError(_0x229019(0x220),_0x229019(0x233),_0x229019(0x25d));}export function readNotificationChannelType(_0x4fd084,_0x1f2203=a197_0x168f92(0x25c),_0x390988=a197_0x168f92(0x23c)){const _0x2e06e6=a197_0x168f92,_0x26a6c6=_0x4fd084['str'](_0x1f2203)[_0x2e06e6(0x223)]()||_0x390988;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x26a6c6))throw CliErrors[_0x2e06e6(0x245)](_0x2e06e6(0x255)+_0x1f2203+':\x20'+_0x26a6c6,_0x2e06e6(0x1ff)+NOTIFICATION_CHANNEL_TYPES[_0x2e06e6(0x244)](',\x20')+'.');return _0x26a6c6;}export function assertSingleNotificationSource(_0x3aad60){const _0x4b2d26=a197_0x168f92,_0x3aa1dc=[],_0x5646f2=_0x3aad60[_0x4b2d26(0x1f8)]('file')[_0x4b2d26(0x223)]();if(_0x5646f2)_0x3aa1dc[_0x4b2d26(0x247)]({'kind':'file','path':_0x5646f2});if(_0x3aad60[_0x4b2d26(0x1fc)](_0x4b2d26(0x205)))_0x3aa1dc[_0x4b2d26(0x247)]({'kind':_0x4b2d26(0x205)});const _0x41d5d7=_0x3aad60[_0x4b2d26(0x1f8)](_0x4b2d26(0x1f6))[_0x4b2d26(0x223)]();if(_0x41d5d7)_0x3aa1dc['push']({'kind':_0x4b2d26(0x21b),'name':_0x41d5d7});if(_0x3aa1dc['length']===0x0)throw CliErrors[_0x4b2d26(0x245)](_0x4b2d26(0x23b),_0x4b2d26(0x211));if(_0x3aa1dc[_0x4b2d26(0x251)]>0x1)throw CliErrors[_0x4b2d26(0x245)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x4b2d26(0x211));return _0x3aa1dc[0x0];}export async function readNotificationDocument(_0xfe41b3,_0x768cce){const _0x2ede71=a197_0x168f92,_0x45f00e=assertSingleNotificationSource(_0xfe41b3),_0x190890=_0x45f00e[_0x2ede71(0x264)]==='file'?_0x2ede71(0x262)+_0x45f00e['path']:_0x45f00e['kind']===_0x2ede71(0x21b)?_0x2ede71(0x261)+_0x45f00e['name']:_0x2ede71(0x205);let _0x36fbd9;try{if(_0x45f00e['kind']===_0x2ede71(0x218))_0x36fbd9=await readFile(_0x45f00e[_0x2ede71(0x1f9)],_0x2ede71(0x24f));else{if(_0x45f00e[_0x2ede71(0x264)]===_0x2ede71(0x21b)){if(!(_0x45f00e[_0x2ede71(0x246)]in process.env))throw notificationError(_0x2ede71(0x1f2),'Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x45f00e[_0x2ede71(0x246)]);_0x36fbd9=process.env[_0x45f00e.name]??'';}else _0x36fbd9=await readStdin();}}catch(_0x77b5e0){if(_0x77b5e0 instanceof CliError)throw _0x77b5e0;throw notificationError(_0x2ede71(0x1f2),_0x2ede71(0x20b)+_0x190890+'.');}let _0x2c8a95;try{_0x2c8a95=JSON[_0x2ede71(0x1f5)](_0x36fbd9);}catch{throw notificationError(_0x2ede71(0x231),_0x2ede71(0x1fd)+_0x190890+_0x2ede71(0x241),_0x2ede71(0x240));}if(!isJsonObject(_0x2c8a95))throw notificationError(_0x2ede71(0x231),_0x2ede71(0x1fd)+_0x190890+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x2c8a95,_0x768cce);}export function projectNotificationListConfig(_0x533d4b,_0x206d86){const _0x508011=a197_0x168f92;return{'id':typeof _0x533d4b['id']===_0x508011(0x227)?_0x533d4b['id']:null,'configCode':requireResponseString(_0x533d4b[_0x508011(0x24c)],_0x508011(0x24c),_0x206d86),'configName':requireResponseString(_0x533d4b[_0x508011(0x20e)],_0x508011(0x20e),_0x206d86),'channelType':requireResponseString(_0x533d4b[_0x508011(0x232)],_0x508011(0x232),_0x206d86),'description':normalizeNullableString(_0x533d4b['description']),'createTime':normalizeNullableString(_0x533d4b['createTime']),'updateTime':normalizeNullableString(_0x533d4b['updateTime'])};}export function normalizeExactNotificationConfig(_0x120647,_0x3e0abc,_0x23f010){const _0x5d5a0d=a197_0x168f92;if(!Number[_0x5d5a0d(0x23a)](_0x120647['id'])||_0x120647['id']!==_0x3e0abc)throw notificationError(_0x5d5a0d(0x26f),_0x5d5a0d(0x24d)+_0x3e0abc+'.');if(_0x120647[_0x5d5a0d(0x22b)]!==_0x23f010)throw notificationError(_0x5d5a0d(0x26f),_0x5d5a0d(0x257)+_0x3e0abc+_0x5d5a0d(0x206));const _0x925337=requireExactString(_0x120647['configName'],_0x5d5a0d(0x20e),_0x3e0abc),_0x3848c5=requireExactString(_0x120647['configCode'],'configCode',_0x3e0abc),_0x5d7b49=requireExactString(_0x120647['channelType'],_0x5d5a0d(0x232),_0x3e0abc);if(!NOTIFICATION_CHANNEL_TYPES[_0x5d5a0d(0x200)](_0x5d7b49))throw notificationError(_0x5d5a0d(0x26f),'Notification\x20config\x20'+_0x3e0abc+'\x20has\x20an\x20unsupported\x20channelType.');const _0x43271c=responseNullableString(_0x120647[_0x5d5a0d(0x1f3)],_0x5d5a0d(0x1f3),_0x3e0abc),_0x165a65=responseNullableString(_0x120647[_0x5d5a0d(0x23d)],'channelConfig',_0x3e0abc),_0x2cc229=responseNullableString(_0x120647[_0x5d5a0d(0x21f)],'description',_0x3e0abc),_0x15e4bf=responseNullableTimeout(_0x120647[_0x5d5a0d(0x204)],_0x5d5a0d(0x204),_0x3e0abc),_0x5bf752=responseNullableTimeout(_0x120647[_0x5d5a0d(0x249)],_0x5d5a0d(0x249),_0x3e0abc);return{'id':_0x3e0abc,'appCode':_0x23f010,'configCode':_0x3848c5,'configName':_0x925337,'channelType':_0x5d7b49,'endpointUrl':redactSensitive(_0x43271c),'channelConfig':redactSensitive(_0x165a65),'description':_0x2cc229,'connectTimeout':_0x15e4bf,'readTimeout':_0x5bf752,'endpointUrlRaw':_0x43271c,'channelConfigRaw':_0x165a65};}export async function requireExactNotificationConfig(_0x216d8b,_0x1f9427,_0x446cef){const _0x4e0c64=a197_0x168f92;let _0x262047;try{_0x262047=await getNotificationChannelConfig(_0x1f9427,_0x216d8b);}catch{throw safeApiFailure(_0x446cef,_0x4e0c64(0x24e),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x216d8b+_0x4e0c64(0x21d));}return normalizeExactNotificationConfig(_0x262047,_0x1f9427,_0x216d8b);}function a197_0x5a93(){const _0x41d83a=['Invalid\x20--','WECOM','Notification\x20config\x20','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','every','ccList','Invalid\x20notification\x20config\x20response.','type','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','channelConfigRaw','\x20--format\x20compress','isArray','environment\x20variable\x20','file\x20','has','kind','2541765NVVwXa','emailTargets','setEncoding','endpointUrl:null','\x20failed.','keys','\x20has\x20an\x20invalid\x20channelType.','869598MuIrAH','a\x20JSON\x20object','\x20--type\x20','notification_config_response_invalid','notification_config_source_unavailable','endpointUrl','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','parse','from-env','WEBHOOK','str','path','Notification\x20JSON\x20field\x20\x22','\x22\x20must\x20be\x20a\x20non-empty\x20string.','bool','Notification\x20JSON\x20from\x20','Create\x20JSON\x20requires\x20field\x20','Allowed\x20values:\x20','includes','prototype','19213ErvCcm','7776419Zgnlea','connectTimeout','stdin','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x20is\x20missing\x20required\x20field\x20\x22','dry-run','_unavailable','num','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','stringify','a\x20supported\x20string','configName','\x20has\x20an\x20invalid\x20id.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','<redacted>','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','notification_config_update_empty','88UAQlII','notification_config_field_required','file','rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20has\x20invalid\x20field\x20\x22','env','endpointUrlRaw','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','call','description','notification_config_confirmation_required','388145NmYYRP','2101oJbIym','trim','notification_config_id_invalid','replyTo','notification_config_field_invalid','number','bccList','26fPKZld','messageTemplate','appCode','subjectPrefix','fromName','apiError','90UxVloe','create','notification_config_json_invalid','channelType','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','\x22channelType\x22.','mutation','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x22\x20cannot\x20exceed\x20','Notification\x20config\x20list\x20item\x20','60510ObMmWF','isSafeInteger','Missing\x20notification\x20JSON\x20source.','EMAIL','channelConfig','Application-level\x20notification\x20config\x20ID','string','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x20is\x20invalid.','FEISHU','yes','join','validation','name','push','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','readTimeout','boolean','a\x20non-empty\x20string','configCode','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','preflight','utf8','\x22configName\x22.','length','object','3659752wCgPbT','\x20characters.'];a197_0x5a93=function(){return _0x41d83a;};return a197_0x5a93();}export function projectNotificationConfig(_0x334c74){const _0x56c538=a197_0x168f92;return{'id':_0x334c74['id']??null,'appCode':_0x334c74[_0x56c538(0x22b)],'configCode':_0x334c74['configCode']??null,'configName':_0x334c74[_0x56c538(0x20e)],'channelType':_0x334c74[_0x56c538(0x232)],'endpointUrl':redactSensitive(_0x334c74['endpointUrl']),'channelConfig':redactSensitive(_0x334c74[_0x56c538(0x23d)]),'description':_0x334c74[_0x56c538(0x21f)]??null,'connectTimeout':_0x334c74[_0x56c538(0x204)]??null,'readTimeout':_0x334c74[_0x56c538(0x249)]??null};}export function notificationSelector(_0x1f3552){const _0x175d08=a197_0x168f92;return{'appCode':_0x1f3552[_0x175d08(0x22b)],'id':_0x1f3552['id'],'configCode':_0x1f3552[_0x175d08(0x24c)],'configName':_0x1f3552[_0x175d08(0x20e)],'channelType':_0x1f3552[_0x175d08(0x232)]};}export function createMutationInput(_0x37d984,_0x4342c5){const _0x20fd67=a197_0x168f92;return{'appCode':_0x37d984,'configName':_0x4342c5[_0x20fd67(0x20e)],'channelType':_0x4342c5[_0x20fd67(0x232)],...hasOwn(_0x4342c5,_0x20fd67(0x1f3))?{'endpointUrl':_0x4342c5[_0x20fd67(0x1f3)]}:{},...hasOwn(_0x4342c5,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x4342c5[_0x20fd67(0x23d)])}:{},...hasOwn(_0x4342c5,_0x20fd67(0x21f))?{'description':_0x4342c5[_0x20fd67(0x21f)]}:{},...hasOwn(_0x4342c5,'connectTimeout')?{'connectTimeout':_0x4342c5[_0x20fd67(0x204)]}:{},...hasOwn(_0x4342c5,_0x20fd67(0x249))?{'readTimeout':_0x4342c5[_0x20fd67(0x249)]}:{}};}export function mergeUpdateInput(_0x44d235,_0x585a42){const _0x4ce6ef=a197_0x168f92;return{'id':_0x44d235['id'],'appCode':_0x44d235[_0x4ce6ef(0x22b)],'configName':_0x585a42['configName']??_0x44d235['configName'],'channelType':_0x585a42[_0x4ce6ef(0x232)]??_0x44d235['channelType'],'endpointUrl':hasOwn(_0x585a42,'endpointUrl')?_0x585a42[_0x4ce6ef(0x1f3)]:_0x44d235[_0x4ce6ef(0x21c)],'channelConfig':hasOwn(_0x585a42,_0x4ce6ef(0x23d))?serializeChannelConfig(_0x585a42[_0x4ce6ef(0x23d)]):_0x44d235[_0x4ce6ef(0x25e)],'description':hasOwn(_0x585a42,'description')?_0x585a42[_0x4ce6ef(0x21f)]:_0x44d235[_0x4ce6ef(0x21f)],'connectTimeout':hasOwn(_0x585a42,_0x4ce6ef(0x204))?_0x585a42[_0x4ce6ef(0x204)]:_0x44d235[_0x4ce6ef(0x204)],'readTimeout':hasOwn(_0x585a42,_0x4ce6ef(0x249))?_0x585a42['readTimeout']:_0x44d235[_0x4ce6ef(0x249)]};}export function plannedUpdateProjection(_0x1bef57,_0x23096a){const _0x10960f=a197_0x168f92;return projectNotificationConfig({'id':_0x1bef57['id'],'appCode':_0x1bef57['appCode'],'configCode':_0x1bef57[_0x10960f(0x24c)],'configName':_0x23096a[_0x10960f(0x20e)]??_0x1bef57[_0x10960f(0x20e)],'channelType':_0x23096a[_0x10960f(0x232)]??_0x1bef57['channelType'],'endpointUrl':hasOwn(_0x23096a,_0x10960f(0x1f3))?_0x23096a[_0x10960f(0x1f3)]:_0x1bef57[_0x10960f(0x21c)],'channelConfig':hasOwn(_0x23096a,_0x10960f(0x23d))?_0x23096a[_0x10960f(0x23d)]:_0x1bef57[_0x10960f(0x25e)],'description':hasOwn(_0x23096a,_0x10960f(0x21f))?_0x23096a[_0x10960f(0x21f)]:_0x1bef57[_0x10960f(0x21f)],'connectTimeout':hasOwn(_0x23096a,_0x10960f(0x204))?_0x23096a[_0x10960f(0x204)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x1bef57[_0x10960f(0x204)],'readTimeout':hasOwn(_0x23096a,_0x10960f(0x249))?_0x23096a['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x1bef57[_0x10960f(0x249)]});}export function requestedSafeFieldsMatch(_0x1b5e84,_0x43ef91,_0x555d7c){const _0x40ebef=a197_0x168f92,_0x18eaf6=[],_0x350fac=[],_0x5b3874=[];for(const _0x2c0b8e of[_0x40ebef(0x20e),'channelType',_0x40ebef(0x21f)]){if(!hasOwn(_0x555d7c,_0x2c0b8e))continue;_0x5b3874['push'](_0x2c0b8e),_0x18eaf6['push'](_0x43ef91[_0x2c0b8e]===_0x555d7c[_0x2c0b8e]),_0x350fac['push'](_0x1b5e84[_0x2c0b8e]!==_0x555d7c[_0x2c0b8e]&&_0x43ef91[_0x2c0b8e]===_0x555d7c[_0x2c0b8e]);}for(const _0x4e34c5 of['connectTimeout','readTimeout']){if(!hasOwn(_0x555d7c,_0x4e34c5))continue;const _0x304ab5=_0x555d7c[_0x4e34c5]??(_0x4e34c5===_0x40ebef(0x204)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x5b3874[_0x40ebef(0x247)](_0x4e34c5),_0x18eaf6[_0x40ebef(0x247)](_0x43ef91[_0x4e34c5]===_0x304ab5),_0x350fac[_0x40ebef(0x247)](_0x1b5e84[_0x4e34c5]!==_0x304ab5&&_0x43ef91[_0x4e34c5]===_0x304ab5);}return hasOwn(_0x555d7c,_0x40ebef(0x1f3))&&_0x555d7c[_0x40ebef(0x1f3)]===null&&(_0x5b3874[_0x40ebef(0x247)](_0x40ebef(0x268)),_0x18eaf6['push'](_0x43ef91[_0x40ebef(0x21c)]===null||_0x43ef91[_0x40ebef(0x21c)]===''),_0x350fac[_0x40ebef(0x247)](_0x1b5e84[_0x40ebef(0x21c)]!==null&&_0x1b5e84[_0x40ebef(0x21c)]!==''&&(_0x43ef91['endpointUrlRaw']===null||_0x43ef91[_0x40ebef(0x21c)]===''))),{'allMatch':_0x18eaf6[_0x40ebef(0x259)](Boolean),'provesChange':_0x350fac['some'](Boolean),'verifiedFields':_0x5b3874};}export function validateNotificationDeleteReadback(_0x40d470,_0x56b71f,_0xb543e9){const _0xb4ee89=a197_0x168f92;for(const [_0xebb45f,_0x5cb49f]of _0x40d470['entries']()){if(!Number[_0xb4ee89(0x23a)](_0x5cb49f['id'])||_0x5cb49f['id']<=0x0)throw notificationError(_0xb4ee89(0x26f),_0xb4ee89(0x238)+(_0xebb45f+0x1)+_0xb4ee89(0x20f));if(_0x5cb49f[_0xb4ee89(0x22b)]!==_0x56b71f)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0xebb45f+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x5cb49f[_0xb4ee89(0x232)]!==_0xb543e9)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0xebb45f+0x1)+_0xb4ee89(0x26b));}}export function safeApiFailure(_0x29e72c,_0x4500f9,_0x2320c4){const _0x55b59c=a197_0x168f92;return notificationError('notification_config_'+_0x29e72c+'_'+(_0x4500f9===_0x55b59c(0x235)?'failed':_0x4500f9+_0x55b59c(0x209)),'Notification\x20config\x20'+_0x29e72c+'\x20'+_0x4500f9+_0x55b59c(0x269),_0x2320c4);}export function notificationLookupCommand(_0x186924,_0x4d324e){const _0x1ded86=a197_0x168f92;return _0x1ded86(0x219)+_0x186924+_0x1ded86(0x26e)+_0x4d324e+_0x1ded86(0x25f);}function validateNotificationDocument(_0x125aa1,_0x26396e){const _0x41297b=a197_0x168f92;for(const _0x36a61b of Object[_0x41297b(0x26a)](_0x125aa1)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x36a61b))throw notificationError('notification_config_field_forbidden',_0x41297b(0x1fa)+_0x36a61b+_0x41297b(0x210));if(!ALLOWED_INPUT_FIELDS[_0x41297b(0x263)](_0x36a61b))throw notificationError('notification_config_field_unknown','Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x36a61b+'\x22.');}if(_0x26396e==='update'&&Object[_0x41297b(0x26a)](_0x125aa1)[_0x41297b(0x251)]===0x0)throw notificationError(_0x41297b(0x215),_0x41297b(0x1f4));const _0x5351e2={};if(hasOwn(_0x125aa1,'configName'))_0x5351e2['configName']=validateRequiredString(_0x125aa1[_0x41297b(0x20e)],_0x41297b(0x20e),0x80);else{if(_0x26396e===_0x41297b(0x230))throw notificationError(_0x41297b(0x217),'Create\x20JSON\x20requires\x20field\x20'+_0x41297b(0x250));}if(hasOwn(_0x125aa1,'channelType')){if(typeof _0x125aa1['channelType']!==_0x41297b(0x23f))throw invalidFieldType(_0x41297b(0x232),_0x41297b(0x20d));const _0xff8ca=_0x125aa1['channelType']['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x41297b(0x200)](_0xff8ca))throw notificationError(_0x41297b(0x226),_0x41297b(0x236),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x5351e2[_0x41297b(0x232)]=_0xff8ca;}else{if(_0x26396e===_0x41297b(0x230))throw notificationError(_0x41297b(0x217),_0x41297b(0x1fe)+_0x41297b(0x234));}for(const [_0x5c3c02,_0x2fbe8a]of[['endpointUrl',0x200],['description',0x100]]){if(!hasOwn(_0x125aa1,_0x5c3c02))continue;const _0x5b9266=_0x125aa1[_0x5c3c02];if(_0x5b9266!==null&&typeof _0x5b9266!==_0x41297b(0x23f))throw invalidFieldType(_0x5c3c02,'a\x20string\x20or\x20null');if(typeof _0x5b9266===_0x41297b(0x23f)&&_0x5b9266[_0x41297b(0x251)]>_0x2fbe8a)throw notificationError('notification_config_field_invalid',_0x41297b(0x1fa)+_0x5c3c02+'\x22\x20cannot\x20exceed\x20'+_0x2fbe8a+_0x41297b(0x254));_0x5351e2[_0x5c3c02]=_0x5b9266;}if(hasOwn(_0x125aa1,_0x41297b(0x23d))){const _0x9aaec=_0x125aa1['channelConfig'];if(_0x9aaec===null&&_0x26396e===_0x41297b(0x230))throw invalidFieldType(_0x41297b(0x23d),_0x41297b(0x26d));if(_0x9aaec!==null&&!isJsonObject(_0x9aaec))throw invalidFieldType('channelConfig',_0x26396e==='update'?'a\x20JSON\x20object\x20or\x20null':_0x41297b(0x26d));_0x9aaec!==null&&validateChannelConfigFields(_0x5351e2[_0x41297b(0x232)],_0x9aaec),_0x5351e2[_0x41297b(0x23d)]=_0x9aaec;}for(const _0x24820f of[_0x41297b(0x204),'readTimeout']){if(!hasOwn(_0x125aa1,_0x24820f))continue;const _0x225d94=_0x125aa1[_0x24820f];if(_0x225d94!==null&&(!Number[_0x41297b(0x23a)](_0x225d94)||_0x225d94<0x0))throw notificationError('notification_config_field_invalid',_0x41297b(0x1fa)+_0x24820f+_0x41297b(0x258));_0x5351e2[_0x24820f]=_0x225d94;}return _0x5351e2;}function validateRequiredString(_0x238ebf,_0x3d5d90,_0x4dae39){const _0x43c223=a197_0x168f92;if(typeof _0x238ebf!==_0x43c223(0x23f))throw invalidFieldType(_0x3d5d90,_0x43c223(0x24b));const _0x4f54e2=_0x238ebf[_0x43c223(0x223)]();if(!_0x4f54e2)throw notificationError(_0x43c223(0x226),_0x43c223(0x1fa)+_0x3d5d90+_0x43c223(0x1fb));if(_0x4f54e2[_0x43c223(0x251)]>_0x4dae39)throw notificationError(_0x43c223(0x226),_0x43c223(0x1fa)+_0x3d5d90+_0x43c223(0x237)+_0x4dae39+_0x43c223(0x254));return _0x4f54e2;}function validateChannelConfigFields(_0x215925,_0x454dd3){const _0x2663e4=a197_0x168f92;if(hasOwn(_0x454dd3,_0x2663e4(0x22a)))throw forbiddenChannelConfigField(_0x2663e4(0x22a));if(_0x215925===_0x2663e4(0x23c))for(const _0x1ba70d of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x454dd3,_0x1ba70d))throw forbiddenChannelConfigField(_0x1ba70d);}}function forbiddenChannelConfigField(_0x15774b){return notificationError('notification_config_channel_field_forbidden','Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x15774b+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x59dc13,_0x5835dc){const _0x55e2e8=a197_0x168f92;return notificationError(_0x55e2e8(0x226),_0x55e2e8(0x1fa)+_0x59dc13+'\x22\x20must\x20be\x20'+_0x5835dc+'.');}function serializeChannelConfig(_0x5ecfd0){const _0x55b129=a197_0x168f92;return _0x5ecfd0===null||_0x5ecfd0===undefined?null:JSON[_0x55b129(0x20c)](_0x5ecfd0);}function redactSensitive(_0x377c16){const _0x3945f5=a197_0x168f92;return _0x377c16===null||_0x377c16===undefined||_0x377c16===''?null:_0x3945f5(0x212);}function requireResponseString(_0x178b2e,_0x15cf07,_0x276eff){const _0x94af75=a197_0x168f92;if(typeof _0x178b2e!==_0x94af75(0x23f)||_0x178b2e[_0x94af75(0x223)]()==='')throw CliErrors[_0x94af75(0x22e)](_0x94af75(0x25b),'Item\x20'+(_0x276eff+0x1)+_0x94af75(0x207)+_0x15cf07+'\x22.');return _0x178b2e[_0x94af75(0x223)]();}function requireExactString(_0x55c319,_0x252ed1,_0x2e6df5){const _0x46c759=a197_0x168f92;if(typeof _0x55c319!==_0x46c759(0x23f)||_0x55c319[_0x46c759(0x223)]()==='')throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x2e6df5+_0x46c759(0x207)+_0x252ed1+'\x22.');return _0x55c319[_0x46c759(0x223)]();}function responseNullableString(_0x2c1ed6,_0x3aeaa7,_0x418fab){const _0x159e65=a197_0x168f92;if(_0x2c1ed6===undefined||_0x2c1ed6===null)return null;if(typeof _0x2c1ed6!==_0x159e65(0x23f))throw notificationError(_0x159e65(0x26f),_0x159e65(0x257)+_0x418fab+_0x159e65(0x21a)+_0x3aeaa7+'\x22.');return _0x2c1ed6;}function responseNullableTimeout(_0x28b6ad,_0x20cd13,_0x41d0a4){const _0x1f7e21=a197_0x168f92;if(_0x28b6ad===undefined||_0x28b6ad===null)return null;if(!Number[_0x1f7e21(0x23a)](_0x28b6ad)||_0x28b6ad<0x0)throw notificationError(_0x1f7e21(0x26f),'Notification\x20config\x20'+_0x41d0a4+_0x1f7e21(0x21a)+_0x20cd13+'\x22.');return _0x28b6ad;}function normalizeNullableString(_0x3b8422){return typeof _0x3b8422==='string'?_0x3b8422:null;}function isJsonObject(_0x2d5d3c){const _0x36a13d=a197_0x168f92;return _0x2d5d3c!==null&&typeof _0x2d5d3c===_0x36a13d(0x252)&&!Array[_0x36a13d(0x260)](_0x2d5d3c);}function hasOwn(_0x5ddb82,_0x4ab480){const _0x4d18cf=a197_0x168f92;return Object[_0x4d18cf(0x201)]['hasOwnProperty'][_0x4d18cf(0x21e)](_0x5ddb82,_0x4ab480);}async function readStdin(){const _0x5a8adb=a197_0x168f92;let _0x22f386='';process['stdin'][_0x5a8adb(0x267)]('utf8');for await(const _0x41a803 of process['stdin'])_0x22f386+=_0x41a803;return _0x22f386;}
|