@lovrabet/rabetbase-cli 2.5.3 → 2.5.4-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/README.md +11 -0
- 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/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.d.ts +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.d.ts +2 -0
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.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/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/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.d.ts +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.d.ts +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.d.ts +4 -0
- 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.d.ts +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.d.ts +14 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +1 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.d.ts +11 -10
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.d.ts +7 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.d.ts +5 -2
- 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.d.ts +15 -3
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.d.ts +2 -2
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +5 -0
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +31 -17
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +33 -11
- package/skills/rabetbase/guides/best-practices.md +1 -1
- package/skills/rabetbase/guides/conflict-detection.md +44 -92
- package/skills/rabetbase/guides/custom-page-flow-sdk.md +642 -0
- package/skills/rabetbase/guides/custom-page-flow-timeline-display.md +289 -0
- package/skills/rabetbase/guides/custom-page-workflow.md +12 -3
- package/skills/rabetbase/guides/sql-creation-workflow.md +44 -26
- package/skills/rabetbase/guides/sql-mybatis.md +18 -49
- package/skills/rabetbase/guides/typescript-sdk.md +18 -0
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +22 -6
- package/skills/rabetbase/knowledge/components.md +34 -28
- package/skills/rabetbase/knowledge/custom-page/generation-standards.md +2 -0
- package/skills/rabetbase/references/rabetbase-config.md +6 -4
- package/skills/rabetbase/references/rabetbase-flow-commands.md +8 -4
- package/skills/rabetbase/references/rabetbase-flow-resources.md +3 -3
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +2 -0
- package/skills/rabetbase/references/rabetbase-init.md +7 -5
- package/skills/rabetbase/references/rabetbase-kb.md +14 -4
- package/skills/rabetbase/references/rabetbase-page-custom-detail.md +3 -1
- package/skills/rabetbase/references/rabetbase-page-custom-list.md +3 -0
- package/skills/rabetbase/references/rabetbase-sql-push.md +5 -0
- package/skills/rabetbase/references/rabetbase-sql-validate.md +12 -6
- package/skills/rabetbase.manifest.json +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40907c,_0xd64309){const _0x57d187=a169_0x5b27,_0x3b9e62=_0x40907c();while(!![]){try{const _0x3d78fd=parseInt(_0x57d187(0xa7))/0x1+-parseInt(_0x57d187(0x8b))/0x2*(-parseInt(_0x57d187(0xa8))/0x3)+parseInt(_0x57d187(0x96))/0x4*(parseInt(_0x57d187(0x92))/0x5)+parseInt(_0x57d187(0xa4))/0x6*(parseInt(_0x57d187(0x8a))/0x7)+parseInt(_0x57d187(0x86))/0x8*(-parseInt(_0x57d187(0x9c))/0x9)+-parseInt(_0x57d187(0x88))/0xa+-parseInt(_0x57d187(0x87))/0xb;if(_0x3d78fd===_0xd64309)break;else _0x3b9e62['push'](_0x3b9e62['shift']());}catch(_0x384ade){_0x3b9e62['push'](_0x3b9e62['shift']());}}}(a169_0x41a8,0xd56ef));import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a169_0x3f5873,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x1160a2,_0x30ddc7){const _0x32930b=a169_0x5b27,_0x40b70b=getEnv();logger['info'](_0x32930b(0x81),isProduction(_0x40b70b)?_0x32930b(0xa5)+_0x1160a2+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0x1160a2+')');const _0x1a66d1=await fetchMenuSnapshot(_0x1160a2,_0x30ddc7,{'verbose':!![]});return logger['info'](_0x32930b(0x81),'Fetched\x20'+_0x1a66d1[_0x32930b(0x9a)]+'\x20online\x20menus\x20successfully'),_0x1a66d1[_0x32930b(0x97)][_0x32930b(0x91)](toProcessedMenuItem);}export async function createMenu(_0x3d4129,_0x5c60d1,_0x216954){const _0x108327=a169_0x5b27;logger[_0x108327(0xa0)](_0x108327(0x94),_0x108327(0x9b)+_0x216954['label']+'\x20('+_0x216954[_0x108327(0x8f)]+')');const _0x51916a={'appCode':_0x3d4129,'type':_0x108327(0x80),'sort':0x0,'extend':{'loadScriptMode':_0x108327(0xa6),'resources':_0x216954[_0x108327(0x8c)]?JSON[_0x108327(0x93)](_0x216954['resources']):undefined},..._0x216954},_0x2388eb=await createMenuRecord(_0x51916a,_0x5c60d1,_0x108327(0x98)+_0x216954['label']+'\x22');return logger[_0x108327(0xa0)](_0x108327(0x94),_0x108327(0xa1)+_0x216954['label']),_0x2388eb;}async function createSingleMenu(_0x540242,_0x2f4877,_0x588fdc,_0xa71315){const _0x26761c=a169_0x5b27,_0x1652da={'appCode':_0x540242,'type':_0x26761c(0x80),'sort':0x0,'extend':{'loadScriptMode':_0x26761c(0xa6),'resources':_0xa71315?JSON[_0x26761c(0x93)](_0xa71315):undefined},'label':_0x588fdc['label'],'path':_0x588fdc[_0x26761c(0x8f)]},_0xd987ad=await createMenuRecord(_0x1652da,_0x2f4877,_0x26761c(0x98)+_0x588fdc[_0x26761c(0x95)]+'\x22');return logger[_0x26761c(0xa0)](_0x26761c(0x94),_0x26761c(0xa1)+_0x588fdc[_0x26761c(0x95)]),_0xd987ad;}function a169_0x5b27(_0x43b930,_0x44688b){_0x43b930=_0x43b930-0x80;const _0x41a8d5=a169_0x41a8();let _0x5b27b7=_0x41a8d5[_0x43b930];return _0x5b27b7;}export async function createMenus(_0x2b5034,_0x5b91be,_0x41ee56,_0x17e5f9){const _0x18ea0f=a169_0x5b27;logger[_0x18ea0f(0xa0)](_0x18ea0f(0x99),'Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x41ee56[_0x18ea0f(0x84)]);const _0x572dd1=await Promise[_0x18ea0f(0x90)](_0x41ee56[_0x18ea0f(0x91)](_0x2332fa=>createSingleMenu(_0x2b5034,_0x5b91be,_0x2332fa,_0x17e5f9)));return logger[_0x18ea0f(0xa0)](_0x18ea0f(0x99),_0x18ea0f(0x85)+_0x41ee56['length']),_0x572dd1;}export async function updateMenuCdnUrl(_0x509298,_0x3fec21,_0x3afc07){const _0x198278=a169_0x5b27;logger[_0x198278(0xa0)](_0x198278(0xa3),_0x198278(0x83)+_0x3afc07['label']+'\x20('+_0x3afc07['path']+')');const _0x4c4deb={'id':_0x3afc07['id'],'appCode':_0x509298,'extend':{..._0x3afc07[_0x198278(0x9d)]??{},..._0x3afc07[_0x198278(0x8e)]?{'loadScriptMode':_0x3afc07[_0x198278(0x8e)]}:{},'resources':_0x3afc07['resources']?JSON[_0x198278(0x93)](_0x3afc07[_0x198278(0x8c)]):undefined}},_0x4e2986=await updateMenuRecord(_0x4c4deb,_0x3fec21,'Update\x20menu\x20assets\x20\x22'+_0x3afc07['label']+'\x22');return logger[_0x198278(0xa0)](_0x198278(0xa3),'Menu\x20assets\x20synced:\x20'+_0x3afc07['label'],undefined),_0x4e2986;}export async function createMenuEntity(_0x505ab2,_0x1daf0e,_0x59c3d8){const _0xc0773c=a169_0x5b27;return createMenuRecord({'appCode':_0x505ab2,..._0x59c3d8},_0x1daf0e,_0xc0773c(0x98)+_0x59c3d8[_0xc0773c(0x95)]+'\x22');}function a169_0x41a8(){const _0x304a1a=['create-menus','total','Creating\x20menu:\x20','1235511qZtBjW','extend','menuGroups','Update\x20menu\x20','info','Menu\x20created\x20successfully:\x20','\x20menu\x20group(s)','update-menu-cdn-url','8966538dcLFUw','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','import','1543708NEuriE','2580927cHqcGv','procode','get-online-menu-list','Regroup\x20','Updating\x20menu\x20asset\x20links:\x20','length','Batch\x20menu\x20creation\x20completed,\x20total\x20','16GnMYfb','39027505caAkMb','3322210TPdeYX','Delete\x20','7sNtGSu','2jLKoev','resources','\x20menu','loadScriptMode','path','all','map','69785NgNWmM','stringify','create-menu','label','324GIiNbk','menus','Create\x20menu\x20\x22'];a169_0x41a8=function(){return _0x304a1a;};return a169_0x41a8();}export async function updateMenuEntity(_0x4f2f87,_0x3c2f3d,_0x2b5d4f){const _0x3af177=a169_0x5b27;return updateMenuRecord({'appCode':_0x4f2f87,..._0x2b5d4f},_0x3c2f3d,_0x3af177(0x9f)+_0x2b5d4f['id']);}export async function batchDeleteMenuEntities(_0x4e4f95,_0x26dc64){const _0x3b239a=a169_0x5b27;return batchDeleteMenuRecords(_0x26dc64,_0x4e4f95,_0x3b239a(0x89)+_0x26dc64['length']+_0x3b239a(0x8d)+(_0x26dc64['length']===0x1?'':'s'));}export async function startMenuRegroup(_0x28a653,_0x51697a){const _0x15acb3=a169_0x5b27;return a169_0x3f5873(_0x51697a,_0x28a653,_0x15acb3(0x82)+_0x51697a[_0x15acb3(0x9e)][_0x15acb3(0x84)]+_0x15acb3(0xa2));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a170_0x1823af=a170_0x151b;(function(_0x2eb75c,_0x31bf7a){const _0x19b586=a170_0x151b,_0x57b7aa=_0x2eb75c();while(!![]){try{const _0x29bc6b=parseInt(_0x19b586(0x15a))/0x1*(parseInt(_0x19b586(0x16b))/0x2)+-parseInt(_0x19b586(0x169))/0x3*(-parseInt(_0x19b586(0x15d))/0x4)+-parseInt(_0x19b586(0x142))/0x5+parseInt(_0x19b586(0x14c))/0x6*(-parseInt(_0x19b586(0x15c))/0x7)+-parseInt(_0x19b586(0x153))/0x8+parseInt(_0x19b586(0x158))/0x9*(-parseInt(_0x19b586(0x146))/0xa)+parseInt(_0x19b586(0x16d))/0xb;if(_0x29bc6b===_0x31bf7a)break;else _0x57b7aa['push'](_0x57b7aa['shift']());}catch(_0x10b45c){_0x57b7aa['push'](_0x57b7aa['shift']());}}}(a170_0x2bc1,0xee71e));function a170_0x151b(_0x43b3c9,_0x1329cd){_0x43b3c9=_0x43b3c9-0x140;const _0x2bc169=a170_0x2bc1();let _0x151b3c=_0x2bc169[_0x43b3c9];return _0x151b3c;}import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a170_0x2bc1(){const _0x2a3202=['pages','Menu\x20sync\x20completed','dryRun','length','jsUrl','cwd','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','label','setLogPath','trim','field','3bHBaCt','filter','6KsyRfx','isArray','22328053AtsDvv','path','import','1675345emyKVI','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','CSS\x20URL\x20is\x20unreachable:\x20','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','10KtvCbW','cssUrl','hasOwn','get','push','No\x20local\x20pages\x20matched\x20paths:\x20','78BRLtqE','menu-sync','map','Invalid\x20--params\x20fields:\x20','procode','info','join','2817936RoWDna','message','has','string','Invalid\x20--params.','16785666recroS','keys','538247XbHpXN','parse','827491HmPRaN','5685040LHwzEe'];a170_0x2bc1=function(){return _0x2a3202;};return a170_0x2bc1();}import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a170_0x1823af(0x162),a170_0x1823af(0x147)]);function validateParams(_0x2c1645){const _0x2e3c1e=a170_0x1823af,_0x50fc85=[];return _0x2c1645['jsUrl']&&!isValidJsHttpsUrl(_0x2c1645[_0x2e3c1e(0x162)])&&_0x50fc85[_0x2e3c1e(0x14a)]({'field':_0x2e3c1e(0x162),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x2c1645[_0x2e3c1e(0x147)]&&!isValidCssHttpsUrl(_0x2c1645[_0x2e3c1e(0x147)])&&_0x50fc85[_0x2e3c1e(0x14a)]({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x50fc85;}export async function runMenuSyncCore(_0x27706e,_0x21f65b,_0x293d01=[],_0x204773,_0x90ef74={}){const _0x29ed5a=a170_0x1823af,_0x3757ab=parseMenuSyncParams(_0x204773),_0x3314bb=[...new Set(_0x293d01['map'](_0x1cfaac=>_0x1cfaac['trim']())[_0x29ed5a(0x16a)](Boolean))],_0x19e7bc=_0x3757ab[_0x29ed5a(0x162)],_0x8d1641=_0x3757ab['cssUrl'],_0x2651e8=[];if(_0x19e7bc)_0x2651e8['push'](_0x19e7bc);if(_0x8d1641)_0x2651e8['push'](_0x8d1641);const _0x4a38ed=validateParams(_0x3757ab);if(_0x4a38ed[_0x29ed5a(0x161)]>0x0){const _0x3d0001=_0x4a38ed['map'](_0x2e4f9a=>'--params.'+_0x2e4f9a[_0x29ed5a(0x168)]+':\x20'+_0x2e4f9a[_0x29ed5a(0x154)])[_0x29ed5a(0x152)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x3d0001);}logger[_0x29ed5a(0x166)](process[_0x29ed5a(0x163)]()),logger[_0x29ed5a(0x151)](_0x29ed5a(0x14d),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x27706e,'selectedCount':_0x3314bb[_0x29ed5a(0x161)],'jsUrl':_0x19e7bc,'cssUrl':_0x8d1641});if(_0x19e7bc){const _0x5084ac=await isUrlReachable(_0x19e7bc);if(!_0x5084ac)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x19e7bc);}if(_0x8d1641){const _0x26a1de=await isUrlReachable(_0x8d1641);if(!_0x26a1de)throw new Error(_0x29ed5a(0x144)+_0x8d1641);}const _0x528c5e=getLocalPages();if(_0x528c5e[_0x29ed5a(0x161)]===0x0){if(_0x3314bb['length']>0x0)throw new Error(_0x29ed5a(0x14b)+_0x3314bb['join'](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x90ef74['dryRun']===!![],'targetPages':[],'plannedMenus':[]};}const _0x1052f5=await getOnlineMenuList(_0x27706e,_0x21f65b),_0x3f176f=new Set(_0x1052f5[_0x29ed5a(0x14e)](_0x26f763=>_0x26f763[_0x29ed5a(0x140)]));let _0x1c83b1;if(_0x3314bb[_0x29ed5a(0x161)]>0x0){const _0x4d33b0=new Map(_0x528c5e['map'](_0x2ad2cb=>[_0x2ad2cb[_0x29ed5a(0x140)],_0x2ad2cb])),_0x1b8508=_0x3314bb[_0x29ed5a(0x16a)](_0x17cac7=>!_0x4d33b0[_0x29ed5a(0x155)](_0x17cac7));if(_0x1b8508[_0x29ed5a(0x161)]>0x0){const _0x34ce1b=_0x528c5e[_0x29ed5a(0x14e)](_0x106c1d=>_0x106c1d[_0x29ed5a(0x140)])[_0x29ed5a(0x152)](',\x20');throw new Error(_0x29ed5a(0x14b)+_0x1b8508['join'](',\x20')+'\x0a\x20\x20Available\x20local\x20paths:\x20'+_0x34ce1b);}const _0x17c330=_0x3314bb[_0x29ed5a(0x16a)](_0x231cb7=>_0x3f176f[_0x29ed5a(0x155)](_0x231cb7));if(_0x17c330[_0x29ed5a(0x161)]>0x0)throw new Error(_0x29ed5a(0x143)+_0x17c330['join'](',\x20'));_0x1c83b1=_0x3314bb[_0x29ed5a(0x14e)](_0x29e654=>_0x4d33b0[_0x29ed5a(0x149)](_0x29e654));}else _0x1c83b1=_0x528c5e['filter'](_0x480239=>!_0x3f176f[_0x29ed5a(0x155)](_0x480239[_0x29ed5a(0x140)]));if(_0x1c83b1[_0x29ed5a(0x161)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x90ef74[_0x29ed5a(0x160)]===!![],'targetPages':[],'plannedMenus':[]};const _0x28d0ae=_0x1c83b1[_0x29ed5a(0x14e)](_0x50b95d=>({'type':_0x29ed5a(0x150),'path':_0x50b95d[_0x29ed5a(0x140)],'label':_0x50b95d[_0x29ed5a(0x165)],'loadScriptMode':_0x29ed5a(0x141),'resources':[..._0x2651e8]}));if(_0x90ef74[_0x29ed5a(0x160)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x1c83b1,'plannedMenus':_0x28d0ae};const _0x5e081a=await createMenus(_0x27706e,_0x21f65b,_0x1c83b1,_0x2651e8[_0x29ed5a(0x161)]>0x0?_0x2651e8:undefined);return logger[_0x29ed5a(0x151)](_0x29ed5a(0x14d),_0x29ed5a(0x15f),{'count':_0x1c83b1[_0x29ed5a(0x161)],'resources':_0x2651e8}),{'created':_0x5e081a['length'],'skipped':![],'dryRun':![],'targetPages':_0x1c83b1,'plannedMenus':_0x28d0ae,'menus':_0x5e081a};}export function parseMenuSyncParams(_0x300eef){const _0x2a9136=a170_0x1823af;if(!_0x300eef||typeof _0x300eef!==_0x2a9136(0x156))return{};let _0x1a88fe;try{_0x1a88fe=JSON[_0x2a9136(0x15b)](_0x300eef);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x1a88fe!=='object'||_0x1a88fe===null||Array[_0x2a9136(0x16c)](_0x1a88fe))throw new Error(_0x2a9136(0x164));const _0x5630c2=_0x1a88fe;if(Object[_0x2a9136(0x148)](_0x5630c2,_0x2a9136(0x15e)))throw new Error(_0x2a9136(0x145));const _0x1932d3=Object[_0x2a9136(0x159)](_0x5630c2)[_0x2a9136(0x16a)](_0x4fad8b=>!MENU_SYNC_PARAM_KEYS[_0x2a9136(0x155)](_0x4fad8b));if(_0x1932d3[_0x2a9136(0x161)]>0x0)throw new Error(_0x2a9136(0x14f)+_0x1932d3[_0x2a9136(0x152)](',\x20')+'.');for(const _0x171a70 of MENU_SYNC_PARAM_KEYS){const _0x1f0a31=_0x5630c2[_0x171a70];if(_0x1f0a31!==undefined&&(typeof _0x1f0a31!==_0x2a9136(0x156)||_0x1f0a31[_0x2a9136(0x167)]()===''))throw new Error(_0x2a9136(0x157)+_0x171a70+':\x20expected\x20a\x20non-empty\x20string.');}return{'jsUrl':typeof _0x5630c2[_0x2a9136(0x162)]===_0x2a9136(0x156)?_0x5630c2[_0x2a9136(0x162)][_0x2a9136(0x167)]():undefined,'cssUrl':typeof _0x5630c2['cssUrl']===_0x2a9136(0x156)?_0x5630c2[_0x2a9136(0x147)]['trim']():undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3c11a9,_0x2a6ecd){const _0x4002c3=a172_0x457d,_0x327a2a=_0x3c11a9();while(!![]){try{const _0x462518=-parseInt(_0x4002c3(0x1c0))/0x1+parseInt(_0x4002c3(0x1b5))/0x2+parseInt(_0x4002c3(0x1c7))/0x3+parseInt(_0x4002c3(0x197))/0x4+parseInt(_0x4002c3(0x1ca))/0x5+-parseInt(_0x4002c3(0x1af))/0x6+-parseInt(_0x4002c3(0x1a0))/0x7*(parseInt(_0x4002c3(0x1b4))/0x8);if(_0x462518===_0x2a6ecd)break;else _0x327a2a['push'](_0x327a2a['shift']());}catch(_0x7f722b){_0x327a2a['push'](_0x327a2a['shift']());}}}(a172_0x3f2f,0xebbf6));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a172_0x457d(_0x5f0fd3,_0x1687c4){_0x5f0fd3=_0x5f0fd3-0x190;const _0x3f2f8a=a172_0x3f2f();let _0x457dbe=_0x3f2f8a[_0x5f0fd3];return _0x457dbe;}import{logger}from'../../../utils/logger.js';function validateParams(_0x39ec9e){const _0x32721f=a172_0x457d,_0x36240d=[];return _0x39ec9e[_0x32721f(0x195)]&&!isValidJsHttpsUrl(_0x39ec9e[_0x32721f(0x195)])&&_0x36240d[_0x32721f(0x19e)]({'field':_0x32721f(0x195),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x39ec9e['cssUrl']&&!isValidCssHttpsUrl(_0x39ec9e[_0x32721f(0x196)])&&_0x36240d[_0x32721f(0x19e)]({'field':_0x32721f(0x196),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x36240d;}export async function runMenuUpdateCore(_0x11fdd3,_0x396ccb,_0x431fdb,_0x830477={}){const _0x45a18d=a172_0x457d,_0x475349=parseUpdateParamsFlag(_0x431fdb),_0x210f58=normalizeMode(_0x830477['mode']);validateSelection(_0x830477[_0x45a18d(0x19a)]);const _0x30620e=[];if(_0x475349[_0x45a18d(0x195)])_0x30620e[_0x45a18d(0x19e)](_0x475349[_0x45a18d(0x195)]);if(_0x475349[_0x45a18d(0x196)])_0x30620e[_0x45a18d(0x19e)](_0x475349[_0x45a18d(0x196)]);const _0x14d7fe=validateParams(_0x475349);if(_0x14d7fe[_0x45a18d(0x199)]>0x0){const _0x388f05=_0x14d7fe[_0x45a18d(0x19f)](_0x54b694=>'--params.'+_0x54b694[_0x45a18d(0x1b3)]+':\x20'+_0x54b694[_0x45a18d(0x1c8)])[_0x45a18d(0x1ae)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x388f05);}if(_0x30620e['length']===0x0)throw new Error(_0x45a18d(0x1bb)+_0x45a18d(0x1bd));logger[_0x45a18d(0x19b)](process[_0x45a18d(0x1ab)]()),logger['info']('menu-asset-update',_0x45a18d(0x1cd),{'appCode':_0x11fdd3,'jsUrl':_0x475349[_0x45a18d(0x195)],'cssUrl':_0x475349[_0x45a18d(0x196)],'mode':_0x210f58,'dryRun':_0x830477[_0x45a18d(0x1a7)]===!![]});if(_0x475349[_0x45a18d(0x195)]){const _0x2fb260=await isUrlReachable(_0x475349[_0x45a18d(0x195)]);if(!_0x2fb260)throw new Error(_0x45a18d(0x1c1)+_0x475349[_0x45a18d(0x195)]);}if(_0x475349[_0x45a18d(0x196)]){const _0x50d0be=await isUrlReachable(_0x475349[_0x45a18d(0x196)]);if(!_0x50d0be)throw new Error(_0x45a18d(0x1a3)+_0x475349[_0x45a18d(0x196)]);}const _0x7c1114=await getOnlineMenuList(_0x11fdd3,_0x396ccb),_0x2500db=_0x7c1114[_0x45a18d(0x1be)](_0x302dc3=>_0x302dc3[_0x45a18d(0x1a8)][_0x45a18d(0x199)]>0x0),_0x39ea2e=selectMenusForUpdate(_0x2500db,_0x830477[_0x45a18d(0x19a)]);if(_0x39ea2e[_0x45a18d(0x199)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x830477['dryRun']===!![]};const _0x166ee7=_0x39ea2e[_0x45a18d(0x19f)](_0x583f1d=>buildMenuUpdateDiff(_0x583f1d,_0x475349,_0x210f58,_0x830477[_0x45a18d(0x1bc)]===!![],_0x830477['loadScriptMode']));if(_0x830477[_0x45a18d(0x1a7)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x166ee7};const _0x33246c=await Promise['allSettled'](_0x39ea2e[_0x45a18d(0x19f)]((_0x286e94,_0x131762)=>updateMenuCdnUrl(_0x11fdd3,_0x396ccb,{'id':_0x286e94['id'],'label':_0x286e94['label'],'path':_0x286e94['path'],'resources':_0x166ee7[_0x131762]['after'][_0x45a18d(0x1a8)],'extend':_0x286e94[_0x45a18d(0x19d)]??null,'loadScriptMode':_0x830477[_0x45a18d(0x191)]}))),_0x5922db=_0x33246c[_0x45a18d(0x1be)](_0x31eb22=>_0x31eb22['status']==='fulfilled')[_0x45a18d(0x19f)](_0xb6333c=>_0xb6333c[_0x45a18d(0x190)]),_0x5424eb=_0x33246c[_0x45a18d(0x1be)](_0x598c7a=>_0x598c7a['status']===_0x45a18d(0x1c2))['length'];return logger[_0x45a18d(0x1cc)]('menu-asset-update','Menu\x20asset\x20update\x20completed',{'count':_0x39ea2e[_0x45a18d(0x199)],'resources':_0x30620e}),{'updated':_0x5922db[_0x45a18d(0x199)],'failed':_0x5424eb,'skipped':![],'menus':_0x5922db};}function validateSelection(_0xb2288f){const _0x55bd90=a172_0x457d;if(!_0xb2288f)throw new Error(_0x55bd90(0x1a1));if(_0xb2288f[_0x55bd90(0x1ba)]&&(_0xb2288f[_0x55bd90(0x192)][_0x55bd90(0x199)]>0x0||_0xb2288f[_0x55bd90(0x1b6)][_0x55bd90(0x199)]>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0xb2288f[_0x55bd90(0x1ba)]&&_0xb2288f['menuIds'][_0x55bd90(0x199)]===0x0&&_0xb2288f[_0x55bd90(0x1b6)][_0x55bd90(0x199)]===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}export function selectMenusForUpdate(_0x56b10b,_0x421c59){const _0xcac12f=a172_0x457d;validateSelection(_0x421c59);if(_0x421c59[_0xcac12f(0x1ba)])return _0x56b10b;const _0x4373af=new Set(_0x56b10b['map'](_0x2661b9=>_0x2661b9['id'])),_0x3c6a58=new Set(_0x56b10b[_0xcac12f(0x19f)](_0x1c1d92=>_0x1c1d92[_0xcac12f(0x1bf)])),_0x29d190=_0x421c59['menuIds'][_0xcac12f(0x1be)](_0x294081=>!_0x4373af[_0xcac12f(0x1b7)](_0x294081)),_0x18e62c=_0x421c59[_0xcac12f(0x1b6)]['filter'](_0x1fe980=>!_0x3c6a58[_0xcac12f(0x1b7)](_0x1fe980));if(_0x29d190[_0xcac12f(0x199)]>0x0||_0x18e62c[_0xcac12f(0x199)]>0x0){const _0x3e691c=[..._0x29d190['map'](_0x121de3=>String(_0x121de3)),..._0x18e62c][_0xcac12f(0x1ae)](',\x20');throw new Error(_0xcac12f(0x1c4)+_0x3e691c);}const _0x123a19=new Set(_0x421c59['menuIds']),_0x509d88=new Set(_0x421c59[_0xcac12f(0x1b6)]);return _0x56b10b[_0xcac12f(0x1be)](_0x55ab14=>_0x123a19['has'](_0x55ab14['id'])||_0x509d88['has'](_0x55ab14[_0xcac12f(0x1bf)]));}function normalizeMode(_0x8f4c47){const _0x20af5c=a172_0x457d;if(!_0x8f4c47)return _0x20af5c(0x198);if(_0x8f4c47===_0x20af5c(0x1ac)||_0x8f4c47==='patch')return _0x8f4c47;throw new Error('Invalid\x20--mode:\x20'+_0x8f4c47+_0x20af5c(0x1c6));}function buildMenuUpdateDiff(_0x1ea745,_0x3a9aae,_0x59c4c9,_0x7e17f4,_0x150280){const _0x55d222=a172_0x457d,_0x3eaeef=[..._0x1ea745[_0x55d222(0x1a8)]];_0x59c4c9==='patch'&&assertUnambiguousPatchResources(_0x1ea745,_0x3eaeef,_0x3a9aae);const _0x36aaac=_0x59c4c9===_0x55d222(0x198)?patchResources(_0x3eaeef,_0x3a9aae):replaceResources(_0x3a9aae),_0x59a85c=[],_0x493c48=_0x3eaeef[_0x55d222(0x194)](isJsResource),_0x2a00fc=_0x36aaac[_0x55d222(0x194)](isJsResource);if(_0x493c48&&!_0x2a00fc){const _0xd84536=_0x55d222(0x1a4)+_0x1ea745[_0x55d222(0x1cb)]+'\x22\x20('+_0x1ea745[_0x55d222(0x1bf)]+_0x55d222(0x1a6)+_0x55d222(0x1c3);if(!_0x7e17f4)throw new Error(_0xd84536);_0x59a85c['push'](_0xd84536);}const _0x4c90bf=_0x3eaeef[_0x55d222(0x194)](isCssResource),_0x577fd1=_0x36aaac[_0x55d222(0x194)](isCssResource);_0x4c90bf&&!_0x577fd1&&_0x59a85c[_0x55d222(0x19e)](_0x55d222(0x1a9)+_0x1ea745[_0x55d222(0x1cb)]+_0x55d222(0x1ce)+_0x1ea745[_0x55d222(0x1bf)]+').');const _0x16aa56=typeof _0x1ea745[_0x55d222(0x19d)]?.[_0x55d222(0x191)]==='string'?_0x1ea745[_0x55d222(0x19d)][_0x55d222(0x191)]:null,_0x154707=_0x150280?{'loadScriptMode':_0x16aa56}:{},_0x138f24=_0x150280?{'loadScriptMode':_0x150280}:{};return{'id':_0x1ea745['id'],'label':_0x1ea745[_0x55d222(0x1cb)],'path':_0x1ea745[_0x55d222(0x1bf)],'mode':_0x59c4c9,'before':{'resources':_0x3eaeef,..._0x154707},'after':{'resources':_0x36aaac,..._0x138f24},'warnings':_0x59a85c};}function replaceResources(_0x1742ca){const _0x46a701=a172_0x457d;return[_0x1742ca[_0x46a701(0x195)],_0x1742ca[_0x46a701(0x196)]]['filter'](_0x397eda=>!!_0x397eda);}function a172_0x3f2f(){const _0x56d244=['1722441bRHJaS','message','.css','294810WwyNYw','label','info','Start\x20non-interactive\x20menu\x20asset\x20update','\x22\x20(','value','loadScriptMode','menuIds','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','some','jsUrl','cssUrl','6224380SDJFep','patch','length','selection','setLogPath','string','extend','push','map','4074NpUDsc','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','trim','CSS\x20URL\x20is\x20unreachable:\x20','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','menu\x20asset-update\x20cannot\x20patch\x20',').\x20','dryRun','resources','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','object','cwd','replace','split','join','7192788VSugbO','unshift','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','isArray','field','14392VoiJXs','3664390xTOXcg','paths','has','endsWith','toLowerCase','all','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','force','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','filter','path','809961mKCvfH','JS\x20URL\x20is\x20unreachable:\x20','rejected','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','parse','.\x20Allowed\x20values:\x20replace,\x20patch'];a172_0x3f2f=function(){return _0x56d244;};return a172_0x3f2f();}function assertUnambiguousPatchResources(_0x50f054,_0x7f0e37,_0x2382e9){const _0x2de6d0=a172_0x457d,_0x5ff8c7=_0x7f0e37['filter'](isJsResource)[_0x2de6d0(0x199)];if(_0x2382e9[_0x2de6d0(0x195)]&&_0x5ff8c7>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x5ff8c7+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x50f054[_0x2de6d0(0x1cb)]+_0x2de6d0(0x1ce)+_0x50f054[_0x2de6d0(0x1bf)]+')\x20'+_0x2de6d0(0x1b1));const _0x2cbf97=_0x7f0e37[_0x2de6d0(0x1be)](isCssResource)['length'];if(_0x2382e9[_0x2de6d0(0x196)]&&_0x2cbf97>0x1)throw new Error(_0x2de6d0(0x1a5)+_0x2cbf97+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x50f054[_0x2de6d0(0x1cb)]+_0x2de6d0(0x1ce)+_0x50f054['path']+')\x20'+_0x2de6d0(0x193));}function patchResources(_0x755702,_0x3915f5){const _0x4c670c=a172_0x457d;let _0x3626f4=![],_0x3eaf4e=![];const _0x432b03=[];for(const _0x330a64 of _0x755702){if(isJsResource(_0x330a64)){if(_0x3915f5['jsUrl']&&!_0x3626f4)_0x432b03[_0x4c670c(0x19e)](_0x3915f5[_0x4c670c(0x195)]),_0x3626f4=!![];else!_0x3915f5['jsUrl']&&_0x432b03[_0x4c670c(0x19e)](_0x330a64);continue;}if(isCssResource(_0x330a64)){if(_0x3915f5[_0x4c670c(0x196)]&&!_0x3eaf4e)_0x432b03[_0x4c670c(0x19e)](_0x3915f5['cssUrl']),_0x3eaf4e=!![];else!_0x3915f5[_0x4c670c(0x196)]&&_0x432b03[_0x4c670c(0x19e)](_0x330a64);continue;}_0x432b03['push'](_0x330a64);}return _0x3915f5[_0x4c670c(0x195)]&&!_0x3626f4&&_0x432b03[_0x4c670c(0x1b0)](_0x3915f5[_0x4c670c(0x195)]),_0x3915f5['cssUrl']&&!_0x3eaf4e&&_0x432b03[_0x4c670c(0x19e)](_0x3915f5[_0x4c670c(0x196)]),_0x432b03;}function isJsResource(_0x4a733f){const _0x4a4c4e=a172_0x457d;return stripQuery(_0x4a733f)['toLowerCase']()[_0x4a4c4e(0x1b8)]('.js');}function isCssResource(_0x5ab4c9){const _0x10c039=a172_0x457d;return stripQuery(_0x5ab4c9)[_0x10c039(0x1b9)]()[_0x10c039(0x1b8)](_0x10c039(0x1c9));}function stripQuery(_0x38a5ed){const _0xa0d2d3=a172_0x457d;return _0x38a5ed[_0xa0d2d3(0x1ad)]('?')[0x0]??_0x38a5ed;}function parseUpdateParamsFlag(_0x2fe81f){const _0x19b1b3=a172_0x457d;if(!_0x2fe81f||typeof _0x2fe81f!=='string')return{};try{const _0x2e9e29=JSON[_0x19b1b3(0x1c5)](_0x2fe81f);if(typeof _0x2e9e29!==_0x19b1b3(0x1aa)||_0x2e9e29===null||Array[_0x19b1b3(0x1b2)](_0x2e9e29))return{};return{'jsUrl':typeof _0x2e9e29[_0x19b1b3(0x195)]===_0x19b1b3(0x19c)?_0x2e9e29['jsUrl'][_0x19b1b3(0x1a2)]():undefined,'cssUrl':typeof _0x2e9e29[_0x19b1b3(0x196)]===_0x19b1b3(0x19c)?_0x2e9e29['cssUrl'][_0x19b1b3(0x1a2)]():undefined};}catch{return{};}}
|
|
1
|
+
(function(_0x1570d9,_0x1a90da){const _0x15d637=a172_0x370b,_0x5de6f2=_0x1570d9();while(!![]){try{const _0x33b88d=-parseInt(_0x15d637(0x170))/0x1*(parseInt(_0x15d637(0x160))/0x2)+parseInt(_0x15d637(0x173))/0x3+parseInt(_0x15d637(0x15f))/0x4*(-parseInt(_0x15d637(0x147))/0x5)+-parseInt(_0x15d637(0x149))/0x6*(-parseInt(_0x15d637(0x164))/0x7)+parseInt(_0x15d637(0x15a))/0x8+parseInt(_0x15d637(0x13d))/0x9*(parseInt(_0x15d637(0x16f))/0xa)+-parseInt(_0x15d637(0x139))/0xb;if(_0x33b88d===_0x1a90da)break;else _0x5de6f2['push'](_0x5de6f2['shift']());}catch(_0x43417a){_0x5de6f2['push'](_0x5de6f2['shift']());}}}(a172_0x43a8,0x66efe));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';function a172_0x370b(_0x581435,_0x2cbc7b){_0x581435=_0x581435-0x12d;const _0x43a8e3=a172_0x43a8();let _0x370b17=_0x43a8e3[_0x581435];return _0x370b17;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x1bb97d){const _0x58b232=a172_0x370b,_0x1f8bd0=[];return _0x1bb97d[_0x58b232(0x14f)]&&!isValidJsHttpsUrl(_0x1bb97d['jsUrl'])&&_0x1f8bd0[_0x58b232(0x145)]({'field':_0x58b232(0x14f),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x1bb97d[_0x58b232(0x148)]&&!isValidCssHttpsUrl(_0x1bb97d['cssUrl'])&&_0x1f8bd0[_0x58b232(0x145)]({'field':_0x58b232(0x148),'message':_0x58b232(0x167)}),_0x1f8bd0;}export async function runMenuUpdateCore(_0x2cfa5e,_0x537370,_0x38499b,_0x43dad8={}){const _0x1101cb=a172_0x370b,_0x12b644=parseUpdateParamsFlag(_0x38499b),_0x5de3af=normalizeMode(_0x43dad8['mode']);validateSelection(_0x43dad8[_0x1101cb(0x157)]);const _0x2813c3=[];if(_0x12b644[_0x1101cb(0x14f)])_0x2813c3[_0x1101cb(0x145)](_0x12b644[_0x1101cb(0x14f)]);if(_0x12b644[_0x1101cb(0x148)])_0x2813c3[_0x1101cb(0x145)](_0x12b644[_0x1101cb(0x148)]);const _0x51ab75=validateParams(_0x12b644);if(_0x51ab75['length']>0x0){const _0x2d6767=_0x51ab75[_0x1101cb(0x140)](_0x3b2376=>_0x1101cb(0x171)+_0x3b2376[_0x1101cb(0x142)]+':\x20'+_0x3b2376['message'])[_0x1101cb(0x159)](';\x20');throw new Error(_0x1101cb(0x12e)+_0x2d6767);}if(_0x2813c3[_0x1101cb(0x150)]===0x0)throw new Error(_0x1101cb(0x172)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger['setLogPath'](process[_0x1101cb(0x152)]()),logger[_0x1101cb(0x165)](_0x1101cb(0x162),_0x1101cb(0x14e),{'appCode':_0x2cfa5e,'jsUrl':_0x12b644[_0x1101cb(0x14f)],'cssUrl':_0x12b644[_0x1101cb(0x148)],'mode':_0x5de3af,'dryRun':_0x43dad8[_0x1101cb(0x13b)]===!![]});if(_0x12b644[_0x1101cb(0x14f)]){const _0x21bd2c=await isUrlReachable(_0x12b644['jsUrl']);if(!_0x21bd2c)throw new Error(_0x1101cb(0x158)+_0x12b644[_0x1101cb(0x14f)]);}if(_0x12b644[_0x1101cb(0x148)]){const _0x1756b3=await isUrlReachable(_0x12b644[_0x1101cb(0x148)]);if(!_0x1756b3)throw new Error(_0x1101cb(0x166)+_0x12b644[_0x1101cb(0x148)]);}const _0x3259c5=await getOnlineMenuList(_0x2cfa5e,_0x537370),_0x184e47=_0x3259c5[_0x1101cb(0x169)](_0x3eb938=>_0x3eb938[_0x1101cb(0x131)][_0x1101cb(0x150)]>0x0),_0x1ae6bb=selectMenusForUpdate(_0x184e47,_0x43dad8[_0x1101cb(0x157)]);if(_0x1ae6bb[_0x1101cb(0x150)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x43dad8[_0x1101cb(0x13b)]===!![]};const _0x1806af=_0x1ae6bb[_0x1101cb(0x140)](_0x3530b8=>buildMenuUpdateDiff(_0x3530b8,_0x12b644,_0x5de3af,_0x43dad8[_0x1101cb(0x12d)]===!![],_0x43dad8[_0x1101cb(0x15d)]));if(_0x43dad8[_0x1101cb(0x13b)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x1806af};const _0x93d0e1=await Promise[_0x1101cb(0x13c)](_0x1ae6bb[_0x1101cb(0x140)]((_0x1dc2ea,_0x3e59c8)=>updateMenuCdnUrl(_0x2cfa5e,_0x537370,{'id':_0x1dc2ea['id'],'label':_0x1dc2ea[_0x1101cb(0x161)],'path':_0x1dc2ea['path'],'resources':_0x1806af[_0x3e59c8]['after'][_0x1101cb(0x131)],'extend':_0x1dc2ea['extend']??null,'loadScriptMode':_0x43dad8['loadScriptMode']}))),_0x46affe=_0x93d0e1[_0x1101cb(0x169)](_0x24ee1e=>_0x24ee1e[_0x1101cb(0x134)]===_0x1101cb(0x16c))[_0x1101cb(0x140)](_0x32104d=>_0x32104d['value']),_0x362a4a=_0x93d0e1[_0x1101cb(0x169)](_0x5782ac=>_0x5782ac[_0x1101cb(0x134)]===_0x1101cb(0x15c))[_0x1101cb(0x150)];return logger[_0x1101cb(0x165)](_0x1101cb(0x162),_0x1101cb(0x14a),{'count':_0x1ae6bb[_0x1101cb(0x150)],'resources':_0x2813c3}),{'updated':_0x46affe[_0x1101cb(0x150)],'failed':_0x362a4a,'skipped':![],'menus':_0x46affe};}function validateSelection(_0x1977e1){const _0x23273c=a172_0x370b;if(!_0x1977e1)throw new Error(_0x23273c(0x174));if(_0x1977e1[_0x23273c(0x16e)]&&(_0x1977e1[_0x23273c(0x146)]['length']>0x0||_0x1977e1[_0x23273c(0x13f)][_0x23273c(0x150)]>0x0))throw new Error(_0x23273c(0x16d));if(!_0x1977e1[_0x23273c(0x16e)]&&_0x1977e1[_0x23273c(0x146)][_0x23273c(0x150)]===0x0&&_0x1977e1['paths']['length']===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}export function selectMenusForUpdate(_0x4fb056,_0xe34ed8){const _0x534cf5=a172_0x370b;validateSelection(_0xe34ed8);if(_0xe34ed8['all'])return _0x4fb056;const _0x547158=new Set(_0x4fb056[_0x534cf5(0x140)](_0x4478e5=>_0x4478e5['id'])),_0x359c72=new Set(_0x4fb056[_0x534cf5(0x140)](_0x1dcaf9=>_0x1dcaf9['path'])),_0x107eb1=_0xe34ed8[_0x534cf5(0x146)][_0x534cf5(0x169)](_0x1f3cb1=>!_0x547158[_0x534cf5(0x12f)](_0x1f3cb1)),_0x1a2ef9=_0xe34ed8[_0x534cf5(0x13f)][_0x534cf5(0x169)](_0xf7a993=>!_0x359c72['has'](_0xf7a993));if(_0x107eb1[_0x534cf5(0x150)]>0x0||_0x1a2ef9[_0x534cf5(0x150)]>0x0){const _0xcb57e2=[..._0x107eb1['map'](_0x47d723=>String(_0x47d723)),..._0x1a2ef9][_0x534cf5(0x159)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0xcb57e2);}const _0x2beec6=new Set(_0xe34ed8[_0x534cf5(0x146)]),_0x4ef857=new Set(_0xe34ed8[_0x534cf5(0x13f)]);return _0x4fb056[_0x534cf5(0x169)](_0x24ca20=>_0x2beec6['has'](_0x24ca20['id'])||_0x4ef857[_0x534cf5(0x12f)](_0x24ca20[_0x534cf5(0x15b)]));}function a172_0x43a8(){const _0x6765d4=['paths','map','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','field','endsWith','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','push','menuIds','5ysOniN','cssUrl','668208UfAUWk','Menu\x20asset\x20update\x20completed','parse','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','.\x20Allowed\x20values:\x20replace,\x20patch','Start\x20non-interactive\x20menu\x20asset\x20update','jsUrl','length','replace','cwd','unshift','object','.js','\x20existing\x20CSS\x20resources\x20for\x20\x22','selection','JS\x20URL\x20is\x20unreachable:\x20','join','3491864yTpMtr','path','rejected','loadScriptMode','menu\x20asset-update\x20cannot\x20patch\x20','1359192FwhSgG','1042066TwALyy','label','menu-asset-update','patch','14RSGVNN','info','CSS\x20URL\x20is\x20unreachable:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','some','filter','string','extend','fulfilled','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','all','58010nfjxom','1uxwLkm','--params.','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','365616peEHNQ','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','force','Invalid\x20--params:\x20','has',').\x20','resources','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','trim','status','isArray','\x22\x20(','split','Invalid\x20--mode:\x20','2844171MwVaHU','toLowerCase','dryRun','allSettled','1179YsdUgc','\x20existing\x20JS\x20resources\x20for\x20\x22'];a172_0x43a8=function(){return _0x6765d4;};return a172_0x43a8();}function normalizeMode(_0x4485ff){const _0x42fdd8=a172_0x370b;if(!_0x4485ff)return'patch';if(_0x4485ff===_0x42fdd8(0x151)||_0x4485ff===_0x42fdd8(0x163))return _0x4485ff;throw new Error(_0x42fdd8(0x138)+_0x4485ff+_0x42fdd8(0x14d));}function buildMenuUpdateDiff(_0x54ca6a,_0x55e1bd,_0x3d8448,_0x14ed3e,_0x336ea0){const _0x3bfc2e=a172_0x370b,_0x459289=[..._0x54ca6a[_0x3bfc2e(0x131)]];_0x3d8448===_0x3bfc2e(0x163)&&assertUnambiguousPatchResources(_0x54ca6a,_0x459289,_0x55e1bd);const _0xf9926f=_0x3d8448===_0x3bfc2e(0x163)?patchResources(_0x459289,_0x55e1bd):replaceResources(_0x55e1bd),_0x8674b=[],_0x5f4a08=_0x459289['some'](isJsResource),_0x226c6a=_0xf9926f['some'](isJsResource);if(_0x5f4a08&&!_0x226c6a){const _0xb397a6=_0x3bfc2e(0x14c)+_0x54ca6a[_0x3bfc2e(0x161)]+_0x3bfc2e(0x136)+_0x54ca6a['path']+_0x3bfc2e(0x130)+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x14ed3e)throw new Error(_0xb397a6);_0x8674b[_0x3bfc2e(0x145)](_0xb397a6);}const _0x53e245=_0x459289[_0x3bfc2e(0x168)](isCssResource),_0x1e3147=_0xf9926f[_0x3bfc2e(0x168)](isCssResource);_0x53e245&&!_0x1e3147&&_0x8674b[_0x3bfc2e(0x145)](_0x3bfc2e(0x132)+_0x54ca6a[_0x3bfc2e(0x161)]+_0x3bfc2e(0x136)+_0x54ca6a[_0x3bfc2e(0x15b)]+').');const _0x5c67b8=typeof _0x54ca6a['extend']?.[_0x3bfc2e(0x15d)]===_0x3bfc2e(0x16a)?_0x54ca6a[_0x3bfc2e(0x16b)][_0x3bfc2e(0x15d)]:null,_0x2361f2=_0x336ea0?{'loadScriptMode':_0x5c67b8}:{},_0x5070b6=_0x336ea0?{'loadScriptMode':_0x336ea0}:{};return{'id':_0x54ca6a['id'],'label':_0x54ca6a['label'],'path':_0x54ca6a[_0x3bfc2e(0x15b)],'mode':_0x3d8448,'before':{'resources':_0x459289,..._0x2361f2},'after':{'resources':_0xf9926f,..._0x5070b6},'warnings':_0x8674b};}function replaceResources(_0x1cb1d9){const _0x4e1b73=a172_0x370b;return[_0x1cb1d9[_0x4e1b73(0x14f)],_0x1cb1d9[_0x4e1b73(0x148)]][_0x4e1b73(0x169)](_0xc88d6d=>!!_0xc88d6d);}function assertUnambiguousPatchResources(_0x2b673e,_0xd83722,_0x211dc9){const _0x57b3f6=a172_0x370b,_0x1f0c80=_0xd83722[_0x57b3f6(0x169)](isJsResource)[_0x57b3f6(0x150)];if(_0x211dc9[_0x57b3f6(0x14f)]&&_0x1f0c80>0x1)throw new Error(_0x57b3f6(0x15e)+_0x1f0c80+_0x57b3f6(0x13e)+_0x2b673e[_0x57b3f6(0x161)]+_0x57b3f6(0x136)+_0x2b673e[_0x57b3f6(0x15b)]+')\x20'+_0x57b3f6(0x141));const _0x4ef42b=_0xd83722[_0x57b3f6(0x169)](isCssResource)['length'];if(_0x211dc9[_0x57b3f6(0x148)]&&_0x4ef42b>0x1)throw new Error(_0x57b3f6(0x15e)+_0x4ef42b+_0x57b3f6(0x156)+_0x2b673e[_0x57b3f6(0x161)]+_0x57b3f6(0x136)+_0x2b673e['path']+')\x20'+_0x57b3f6(0x144));}function patchResources(_0x19b45d,_0x47dcec){const _0x576a9d=a172_0x370b;let _0x530eab=![],_0x366fcc=![];const _0x37fd48=[];for(const _0x1a7e7f of _0x19b45d){if(isJsResource(_0x1a7e7f)){if(_0x47dcec[_0x576a9d(0x14f)]&&!_0x530eab)_0x37fd48['push'](_0x47dcec[_0x576a9d(0x14f)]),_0x530eab=!![];else!_0x47dcec[_0x576a9d(0x14f)]&&_0x37fd48[_0x576a9d(0x145)](_0x1a7e7f);continue;}if(isCssResource(_0x1a7e7f)){if(_0x47dcec[_0x576a9d(0x148)]&&!_0x366fcc)_0x37fd48[_0x576a9d(0x145)](_0x47dcec[_0x576a9d(0x148)]),_0x366fcc=!![];else!_0x47dcec['cssUrl']&&_0x37fd48[_0x576a9d(0x145)](_0x1a7e7f);continue;}_0x37fd48[_0x576a9d(0x145)](_0x1a7e7f);}return _0x47dcec[_0x576a9d(0x14f)]&&!_0x530eab&&_0x37fd48[_0x576a9d(0x153)](_0x47dcec[_0x576a9d(0x14f)]),_0x47dcec['cssUrl']&&!_0x366fcc&&_0x37fd48[_0x576a9d(0x145)](_0x47dcec[_0x576a9d(0x148)]),_0x37fd48;}function isJsResource(_0x1331d7){const _0x142367=a172_0x370b;return stripQuery(_0x1331d7)['toLowerCase']()[_0x142367(0x143)](_0x142367(0x155));}function isCssResource(_0x4f0b9b){const _0x44c51f=a172_0x370b;return stripQuery(_0x4f0b9b)[_0x44c51f(0x13a)]()[_0x44c51f(0x143)]('.css');}function stripQuery(_0x35633d){const _0x7c2bc0=a172_0x370b;return _0x35633d[_0x7c2bc0(0x137)]('?')[0x0]??_0x35633d;}function parseUpdateParamsFlag(_0x413df6){const _0x15e071=a172_0x370b;if(!_0x413df6||typeof _0x413df6!==_0x15e071(0x16a))return{};try{const _0x4b4067=JSON[_0x15e071(0x14b)](_0x413df6);if(typeof _0x4b4067!==_0x15e071(0x154)||_0x4b4067===null||Array[_0x15e071(0x135)](_0x4b4067))return{};return{'jsUrl':typeof _0x4b4067[_0x15e071(0x14f)]==='string'?_0x4b4067[_0x15e071(0x14f)][_0x15e071(0x133)]():undefined,'cssUrl':typeof _0x4b4067['cssUrl']==='string'?_0x4b4067['cssUrl']['trim']():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a173_0x1ea1(){const _0x5b5ca5=['135004XVHULZ','922wbHtia','662PubfQA','bytes=0-0','81570mcfsJF','7TYSXFh','test','trim','body','2364010lhSDyF','52092ZhBXHB','55NiceBj','3345606fMEVVp','3916UKaJwv','24YMIcsR','195368QljNQy'];a173_0x1ea1=function(){return _0x5b5ca5;};return a173_0x1ea1();}function a173_0x59f6(_0x5396cb,_0x1c1393){_0x5396cb=_0x5396cb-0x1ac;const _0x1ea1d1=a173_0x1ea1();let _0x59f641=_0x1ea1d1[_0x5396cb];return _0x59f641;}(function(_0x23fb0b,_0xd977c6){const _0x643df0=a173_0x59f6,_0x5d3b75=_0x23fb0b();while(!![]){try{const _0x4a5014=-parseInt(_0x643df0(0x1b6))/0x1*(parseInt(_0x643df0(0x1b5))/0x2)+parseInt(_0x643df0(0x1b2))/0x3*(-parseInt(_0x643df0(0x1b4))/0x4)+parseInt(_0x643df0(0x1af))/0x5*(-parseInt(_0x643df0(0x1b8))/0x6)+-parseInt(_0x643df0(0x1b9))/0x7*(parseInt(_0x643df0(0x1b3))/0x8)+-parseInt(_0x643df0(0x1b0))/0x9+-parseInt(_0x643df0(0x1ad))/0xa+-parseInt(_0x643df0(0x1b1))/0xb*(-parseInt(_0x643df0(0x1ae))/0xc);if(_0x4a5014===_0xd977c6)break;else _0x5d3b75['push'](_0x5d3b75['shift']());}catch(_0x21b3f1){_0x5d3b75['push'](_0x5d3b75['shift']());}}}(a173_0x1ea1,0x2dec9));export function isValidJsHttpsUrl(_0x433bd4){const _0x55a29f=a173_0x59f6;return/^https:\/\/.+\.js(\?.*)?$/[_0x55a29f(0x1ba)](_0x433bd4[_0x55a29f(0x1bb)]());}export function isValidCssHttpsUrl(_0x587c02){const _0x4283c1=a173_0x59f6;return/^https:\/\/.+\.css(\?.*)?$/[_0x4283c1(0x1ba)](_0x587c02[_0x4283c1(0x1bb)]());}export async function isUrlReachable(_0x263af7){const _0x462fa3=a173_0x59f6;try{const _0x4abe05=await fetch(_0x263af7,{'method':'HEAD'});if(_0x4abe05['ok'])return!![];}catch{}try{const _0x251595=await fetch(_0x263af7,{'method':'GET','headers':{'Range':_0x462fa3(0x1b7)}}),_0x5104e5=_0x251595['ok'];try{await _0x251595[_0x462fa3(0x1ac)]?.['cancel']();}catch{}return _0x5104e5;}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a174_0x4f792b=a174_0x27af;(function(_0x3ee2a0,_0x559fd9){const _0x5ab393=a174_0x27af,_0x7caac6=_0x3ee2a0();while(!![]){try{const _0x6864a0=-parseInt(_0x5ab393(0x70))/0x1+parseInt(_0x5ab393(0xa1))/0x2+-parseInt(_0x5ab393(0x68))/0x3+-parseInt(_0x5ab393(0x95))/0x4*(-parseInt(_0x5ab393(0x8b))/0x5)+-parseInt(_0x5ab393(0xa7))/0x6+parseInt(_0x5ab393(0x8c))/0x7+parseInt(_0x5ab393(0x97))/0x8*(parseInt(_0x5ab393(0x6f))/0x9);if(_0x6864a0===_0x559fd9)break;else _0x7caac6['push'](_0x7caac6['shift']());}catch(_0x3b5c3d){_0x7caac6['push'](_0x7caac6['shift']());}}}(a174_0x33e6,0xabf94));function a174_0x33e6(){const _0x254f33=['cookie','4959ltySBz','691948iemDnK','sync','message','Creating\x20','Menu\x20sync\x20completed:\x20','Created\x20','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','skipped','POST','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','\x20page(s)','\x20\x20Cancelled.','Menu\x20creation\x20failed','onlinePaths','length','Sync\x20local\x20pages\x20as\x20platform\x20menus','trim','selectedAppName','boolean','\x20\x20Continue\x20with\x20creation?','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','cssUrl','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','\x20created.','\x20and\x20CSS:\x20','size','\x20\x20✓\x20Selected:\x20','12605AZEjUU','2676030KOAtHh','Pre-fill\x20JS/CSS\x20URLs.\x20','\x20local\x20microfrontend\x20menu(s).','\x20\x20Create\x20','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','failed','appcode','str','cyan','148nZnwMj','paths','21872XyTPpY','split','yellow','Online\x20menu\x20list\x20fetched','jsUrl','\x20failed.','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','✓\x20Menu\x20sync\x20completed:\x20','Fetching\x20online\x20menu\x20list...','validation','348626PgWdGh','\x20menu(s)\x20with\x20JS:\x20','\x20created,\x20','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','params','appCode','138648eLrqaD','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','2210562crxkGo','string','created','yes','Failed\x20to\x20fetch\x20online\x20menu\x20list','targetPages'];a174_0x33e6=function(){return _0x254f33;};return a174_0x33e6();}import a174_0x46a43d from'chalk';function a174_0x27af(_0x4f5071,_0x2f267e){_0x4f5071=_0x4f5071-0x67;const _0x33e602=a174_0x33e6();let _0x27af7d=_0x33e602[_0x4f5071];return _0x27af7d;}import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';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,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':a174_0x4f792b(0x71),'description':a174_0x4f792b(0x7f),'risk':'write','flags':[{'name':a174_0x4f792b(0xa5),'type':a174_0x4f792b(0x69),'description':a174_0x4f792b(0x8d)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a174_0x4f792b(0x96),'type':a174_0x4f792b(0x69),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':a174_0x4f792b(0x6b),'type':a174_0x4f792b(0x82),'description':'Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages'}],async 'dryRun'(_0x20c6af){const _0x4c24af=a174_0x4f792b;ensureRunnableContext(_0x20c6af['rawFlags'],_0x20c6af[_0x4c24af(0x81)]);const _0x52b796=await runMenuSyncCore(_0x20c6af['appCode'],_0x20c6af[_0x4c24af(0x6e)],parsePaths(_0x20c6af['str'](_0x4c24af(0x96))),_0x20c6af[_0x4c24af(0x93)](_0x4c24af(0xa5)),{'dryRun':!![]});return{'method':_0x4c24af(0x78),'url':'/smartapi/menu/create','body':_0x52b796,'description':_0x52b796[_0x4c24af(0x77)]?_0x4c24af(0x84):'Would\x20create\x20'+_0x52b796[_0x4c24af(0x6d)][_0x4c24af(0x7e)]+_0x4c24af(0x8e)};},async 'execute'(_0x2725ad){const _0x38e112=a174_0x4f792b;ensureRunnableContext(_0x2725ad['rawFlags'],_0x2725ad[_0x38e112(0x81)]);const _0x21a673=_0x2725ad['flag'](_0x38e112(0x6b)),_0x23c35f=_0x2725ad['str'](_0x38e112(0xa5)),_0x5ee6b5=parsePaths(_0x2725ad[_0x38e112(0x93)](_0x38e112(0x96))),_0xe4550b=parseMenuSyncParams(_0x23c35f);if(_0x21a673){const _0x2e6c20=await runMenuSyncCore(_0x2725ad[_0x38e112(0xa6)],_0x2725ad['cookie'],_0x5ee6b5,_0x23c35f);if(_0x2e6c20[_0x38e112(0x77)]){const _0xd2b2c6=getLocalPages();_0xd2b2c6[_0x38e112(0x7e)]===0x0?writeCliSideChannelLine(_0x38e112(0x90)):writeCliSideChannelLine(_0x38e112(0x67));}else writeCliSideChannelLine(_0x38e112(0x9e)+_0x2e6c20[_0x38e112(0x6a)]+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x2e6c20,'message':_0x2e6c20[_0x38e112(0x77)]?'Menu\x20sync\x20skipped':_0x38e112(0x74)+_0x2e6c20[_0x38e112(0x6a)]+_0x38e112(0x87)};}if(_0x5ee6b5[_0x38e112(0x7e)]>0x0)throw CliErrors[_0x38e112(0xa0)]('menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.',_0x38e112(0x9d));if(!isInteractive()&&_0x23c35f)throw CliErrors[_0x38e112(0xa0)](_0x38e112(0xa4),_0x38e112(0x9d));requireInteractive();const _0x2ed76d=startSpinner(_0x38e112(0x9f));let _0x4b5d76,_0x1944f1,_0x3fd304;try{const _0x218952=await fetchMenuData(_0x2725ad[_0x38e112(0xa6)],_0x2725ad[_0x38e112(0x6e)]);_0x4b5d76=_0x218952['localPages'],_0x1944f1=_0x218952[_0x38e112(0x7d)],_0x3fd304=_0x218952['onlineMenuList'],stopSpinner(_0x2ed76d,_0x38e112(0x9a),!![]);}catch(_0x50a2cf){stopSpinner(_0x2ed76d,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x38e112(0xa0)](_0x50a2cf instanceof Error?_0x50a2cf[_0x38e112(0x72)]:_0x38e112(0x6c));}if(_0x4b5d76['length']===0x0)return writeCliSideChannelLine(a174_0x46a43d[_0x38e112(0x99)](_0x38e112(0x79))),{'ok':!![]};const _0x2231d1=buildCompareRows(_0x4b5d76,_0x1944f1);writeCliSideChannelLine(renderCompareTable(_0x2231d1)),writeCliSideChannelLine('');const _0x4c6fbe=await selectPages(_0x4b5d76,_0x1944f1);writeCliSideChannelLine(''),writeCliSideChannelLine(a174_0x46a43d[_0x38e112(0x94)](_0x38e112(0x8a)+_0x4c6fbe[_0x38e112(0x7e)]+_0x38e112(0x7a)));const _0x491188=_0xe4550b[_0x38e112(0x9b)]&&_0xe4550b['cssUrl'];if(!_0x491188){writeCliSideChannelLine(renderSyncSummary(_0x4c6fbe,_0x1944f1[_0x38e112(0x89)]>0x0));const _0x298b83=await askConfirm(_0x38e112(0x83));if(!_0x298b83)return writeCliSideChannelLine(a174_0x46a43d['gray'](_0x38e112(0x7b))),{'ok':!![]};}let _0x32db9a=_0xe4550b[_0x38e112(0x9b)],_0x2a215d=_0xe4550b[_0x38e112(0x85)];!_0x32db9a&&(_0x32db9a=await askJsUrl());!_0x2a215d&&(_0x2a215d=await askCssUrl());const _0x42f7b0=await askConfirm(_0x38e112(0x8f)+_0x4c6fbe[_0x38e112(0x7e)]+_0x38e112(0xa2)+_0x32db9a+_0x38e112(0x88)+_0x2a215d+'?');if(!_0x42f7b0)return writeCliSideChannelLine(a174_0x46a43d['gray'](_0x38e112(0x7b))),{'ok':!![]};const _0x24d1de=[_0x32db9a,_0x2a215d],_0xd093b8=startSpinner(_0x38e112(0x73)+_0x4c6fbe[_0x38e112(0x7e)]+'\x20menu(s)...');try{const _0x2346b0=await doCreateMenus(_0x2725ad[_0x38e112(0xa6)],_0x2725ad['cookie'],_0x4c6fbe,_0x24d1de);return stopSpinner(_0xd093b8,_0x38e112(0x75)+_0x2346b0['created']+'\x20menu(s)',!![]),{'ok':!![],'data':_0x2346b0,'message':_0x38e112(0x74)+_0x2346b0[_0x38e112(0x6a)]+_0x38e112(0xa3)+_0x2346b0[_0x38e112(0x91)]+_0x38e112(0x9c)};}catch(_0x440e81){stopSpinner(_0xd093b8,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x38e112(0xa0)](_0x440e81 instanceof Error?_0x440e81[_0x38e112(0x72)]:_0x38e112(0x7c));}}};function ensureRunnableContext(_0x45219e,_0x21b0dc){const _0x5d86a7=a174_0x4f792b,_0x3d22f8=_0x45219e[_0x5d86a7(0x92)]?String(_0x45219e[_0x5d86a7(0x92)])[_0x5d86a7(0x80)]():'';if(!isInProject()&&!_0x21b0dc&&!_0x3d22f8)throw CliErrors[_0x5d86a7(0xa0)](_0x5d86a7(0x86)+_0x5d86a7(0x76));}function parsePaths(_0x1be0d3){const _0x1d1d86=a174_0x4f792b;return[...new Set(_0x1be0d3[_0x1d1d86(0x98)](',')['map'](_0x15a12e=>_0x15a12e[_0x1d1d86(0x80)]())['filter'](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a175_0x1c70(_0x50acb4,_0x196507){_0x50acb4=_0x50acb4-0x1ce;const _0x4f4861=a175_0x4f48();let _0x1c705c=_0x4f4861[_0x50acb4];return _0x1c705c;}const a175_0x1a5a24=a175_0x1c70;(function(_0x972ca2,_0x43184a){const _0x613c78=a175_0x1c70,_0x572193=_0x972ca2();while(!![]){try{const _0x59be58=-parseInt(_0x613c78(0x1f2))/0x1*(-parseInt(_0x613c78(0x1d8))/0x2)+-parseInt(_0x613c78(0x226))/0x3*(parseInt(_0x613c78(0x1ce))/0x4)+parseInt(_0x613c78(0x253))/0x5*(parseInt(_0x613c78(0x1d5))/0x6)+parseInt(_0x613c78(0x22e))/0x7*(parseInt(_0x613c78(0x22a))/0x8)+parseInt(_0x613c78(0x23c))/0x9+parseInt(_0x613c78(0x21b))/0xa+-parseInt(_0x613c78(0x217))/0xb;if(_0x59be58===_0x43184a)break;else _0x572193['push'](_0x572193['shift']());}catch(_0x339b08){_0x572193['push'](_0x572193['shift']());}}}(a175_0x4f48,0x8a57b));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a175_0x1a5a24(0x230),'path':a175_0x1a5a24(0x1f7)}];export const menuVisibilityUpdate={'service':a175_0x1a5a24(0x216),'command':a175_0x1a5a24(0x248),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':'high-risk-write','structuredErrors':!![],'flags':[{'name':a175_0x1a5a24(0x228),'type':'string','description':a175_0x1a5a24(0x23d)},{'name':a175_0x1a5a24(0x1dd),'type':a175_0x1a5a24(0x1d7),'description':a175_0x1a5a24(0x1f1)},{'name':a175_0x1a5a24(0x1fe),'type':'boolean','required':!![],'description':a175_0x1a5a24(0x1e4)},{'name':'expect-visible','type':a175_0x1a5a24(0x220),'description':a175_0x1a5a24(0x213)},{'name':a175_0x1a5a24(0x21e),'type':'number','description':a175_0x1a5a24(0x252)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xbd6d49){parseInput(_0xbd6d49),requireExplicitYes(_0xbd6d49);},async 'dryRun'(_0xd29558){const _0x4201f6=a175_0x1a5a24,_0xa83b0d=await buildPlan(_0xd29558,!![]),_0x4e59ea=_0xa83b0d[_0x4201f6(0x219)][_0x4201f6(0x236)]?.['length']??0x0,_0x22337b=_0xa83b0d[_0x4201f6(0x219)][_0x4201f6(0x244)][_0x4201f6(0x231)]-_0x4e59ea;return menuDryRunResult(_0xa83b0d['plan'],{'method':_0x4201f6(0x230),'url':'/smartapi/menu/update','body':{'updates':_0xa83b0d[_0x4201f6(0x219)][_0x4201f6(0x236)]?.[_0x4201f6(0x241)](_0x3d5dfe=>_0x3d5dfe[_0x4201f6(0x24c)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x4e59ea+'\x20menu(s);\x20skip\x20'+_0x22337b+_0x4201f6(0x23f)});},async 'execute'(_0x335a43){const _0x1cd436=a175_0x1a5a24;requireExplicitYes(_0x335a43);const _0xf519d3=await buildPlan(_0x335a43,![]);await recheckMutationSnapshot(_0x335a43,_0xf519d3[_0x1cd436(0x219)],_0x1cd436(0x222));const _0x40b02e=[],_0x1fa372=[],_0x8d6b77=[];for(const _0x3ddfed of _0xf519d3['plan'][_0x1cd436(0x244)]){if(_0x3ddfed['before'][_0x1cd436(0x1fe)]===_0xf519d3[_0x1cd436(0x219)][_0x1cd436(0x1db)]){_0x40b02e[_0x1cd436(0x207)]({'id':_0x3ddfed['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x335a43[_0x1cd436(0x212)],_0x335a43['cookie'],{'id':_0x3ddfed['id'],'visible':_0xf519d3[_0x1cd436(0x219)][_0x1cd436(0x1db)]}),_0x40b02e[_0x1cd436(0x207)]({'id':_0x3ddfed['id'],'updated':!![],'skipped':![]});}catch(_0x134d39){const _0x2b5749=mapMenuApiError(_0x134d39,_0x1cd436(0x1e6),_0x3ddfed['id']);if(isMenuResponseLoss(_0x134d39)&&_0x2b5749[_0x1cd436(0x224)]!==_0x1cd436(0x21c)){_0x8d6b77[_0x1cd436(0x207)](_0x3ddfed['id']);continue;}_0x1fa372[_0x1cd436(0x207)]({'id':_0x3ddfed['id'],'stage':_0x1cd436(0x245),'code':_0x2b5749[_0x1cd436(0x224)],'message':_0x2b5749[_0x1cd436(0x209)]});}}let _0x33c67a;try{_0x33c67a=await fetchMenuSnapshot(_0x335a43[_0x1cd436(0x212)],_0x335a43[_0x1cd436(0x232)]);}catch(_0x511b27){const _0x1a1c8c=describeMenuErrorCause(_0x511b27,_0x1cd436(0x23e)),_0x84bc=_0x8d6b77['map'](_0x35fadb=>({'id':_0x35fadb,'stage':_0x1cd436(0x205),'code':_0x1cd436(0x1f3),'message':_0x1cd436(0x1df)+_0x35fadb+_0x1cd436(0x20b),'requestedStateConfirmed':![],'recovered':![]})),_0x3504fa={'stage':_0x1cd436(0x20c),'code':_0x1cd436(0x1f3),'message':_0x1cd436(0x1d9),'targetIds':_0xf519d3[_0x1cd436(0x219)][_0x1cd436(0x244)][_0x1cd436(0x241)](_0x34bbab=>_0x34bbab['id']),'requestedStateConfirmed':![],..._0x1a1c8c};throw menuFailure(asVerificationError(_0x511b27,_0x1cd436(0x208)),_0xf519d3[_0x1cd436(0x219)],{'stage':_0x1cd436(0x20c),'succeeded':_0x40b02e,'failedRecords':[..._0x1fa372,..._0x84bc,_0x3504fa],'warnings':[_0x1cd436(0x20f)],'verification':{'status':_0x1cd436(0x200),'recoveredCount':0x0,'lookupCommand':_0x1cd436(0x249)}});}const _0x5169a0=[];for(const _0x1ee55a of _0x40b02e){const _0x4cc3d4=Number(_0x1ee55a['id']),_0x5ad5b3=_0xf519d3[_0x1cd436(0x22c)]['get'](_0x4cc3d4),_0x568b21=_0x33c67a[_0x1cd436(0x1f8)][_0x1cd436(0x1d1)](_0x4cc3d4);try{verifyVisibilityUpdate(_0x5ad5b3,_0x568b21,_0xf519d3[_0x1cd436(0x219)][_0x1cd436(0x1db)]);}catch(_0x5265b5){const _0x53a404=asVerificationError(_0x5265b5,_0x1cd436(0x229)+_0x4cc3d4+_0x1cd436(0x1e7));_0x5169a0[_0x1cd436(0x207)]({'id':_0x4cc3d4,'stage':'verification','code':_0x53a404[_0x1cd436(0x224)],'message':_0x53a404[_0x1cd436(0x209)],'requestedStateConfirmed':![]});}}for(const _0x233ef0 of _0x8d6b77){const _0x4c2762=_0xf519d3[_0x1cd436(0x22c)][_0x1cd436(0x1d1)](_0x233ef0),_0x4d320b=_0x33c67a[_0x1cd436(0x1f8)][_0x1cd436(0x1d1)](_0x233ef0);try{verifyVisibilityUpdate(_0x4c2762,_0x4d320b,_0xf519d3[_0x1cd436(0x219)][_0x1cd436(0x1db)]),_0x40b02e[_0x1cd436(0x207)]({'id':_0x233ef0,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x1ba383){const _0x241ff3=asVerificationError(_0x1ba383,_0x1cd436(0x1eb)+_0x233ef0+_0x1cd436(0x1fb));_0x5169a0[_0x1cd436(0x207)]({'id':_0x233ef0,'stage':_0x1cd436(0x205),'code':_0x241ff3[_0x1cd436(0x224)],'message':_0x241ff3[_0x1cd436(0x209)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x5169a0['length']>0x0){const _0x526a38=_0x5169a0[_0x1cd436(0x241)](_0x3d9cf1=>Number(_0x3d9cf1['id'])),_0x30578d=_0x40b02e[_0x1cd436(0x24b)](_0xb55fb4=>_0xb55fb4['recovered']===!![])[_0x1cd436(0x231)],_0x58ba5a=menuError(_0x1cd436(0x1f3),_0x1cd436(0x246)+_0x526a38[_0x1cd436(0x221)](',\x20')+'.',_0x1cd436(0x22f));throw menuFailure(_0x58ba5a,_0xf519d3[_0x1cd436(0x219)],{'stage':'verification','succeeded':_0x40b02e,'failedRecords':[..._0x1fa372,..._0x5169a0],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x1cd436(0x200),..._0x526a38[_0x1cd436(0x231)]===0x1?{'targetId':_0x526a38[0x0]}:{'targetIds':_0x526a38},'recoveredCount':_0x30578d,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0xcefa9c=_0x40b02e[_0x1cd436(0x24b)](_0x563928=>_0x563928[_0x1cd436(0x20e)]===!![])[_0x1cd436(0x231)],_0x591b05=_0x40b02e[_0x1cd436(0x231)]-_0xcefa9c,_0xbf33ea={..._0xf519d3[_0x1cd436(0x219)],'succeeded':_0x40b02e,'failed':_0x1fa372,'warnings':_0x1fa372[_0x1cd436(0x231)]>0x0?[..._0xf519d3[_0x1cd436(0x219)][_0x1cd436(0x210)],_0x1cd436(0x20a)]:_0xf519d3[_0x1cd436(0x219)]['warnings'],'verification':{'checkedBy':_0x1cd436(0x1e5),'snapshotHash':_0x33c67a['hash'],'matchesRequestedState':_0x1fa372[_0x1cd436(0x231)]===0x0,'recoveredCount':_0x8d6b77[_0x1cd436(0x231)]}};return{'ok':_0x1fa372[_0x1cd436(0x231)]===0x0,'data':_0xbf33ea,'message':_0x1fa372[_0x1cd436(0x231)]===0x0?_0x1cd436(0x1de)+_0xcefa9c+_0x1cd436(0x211)+_0x591b05+_0x1cd436(0x23f):_0x1cd436(0x215)+_0xcefa9c+_0x1cd436(0x235)+_0x591b05+_0x1cd436(0x1f5)+_0x1fa372[_0x1cd436(0x231)]+_0x1cd436(0x1ea)};}};function parseInput(_0x226b47){const _0x5dbe7b=a175_0x1a5a24,_0x4b4786=parseMenuIds(_0x226b47['str'](_0x5dbe7b(0x228))),_0x105054=parseCsv(_0x226b47[_0x5dbe7b(0x237)](_0x5dbe7b(0x1dd)));if(_0x4b4786[_0x5dbe7b(0x231)]===0x0&&_0x105054[_0x5dbe7b(0x231)]===0x0)throw CliErrors['validation']('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x32d2ba=parseBooleanFlag(_0x226b47,_0x5dbe7b(0x1fe),!![]),_0x51fcb2=parseBooleanFlag(_0x226b47,_0x5dbe7b(0x1fd),![]);let _0x5f55e4;if(hasFlag(_0x226b47,'expected-count')){_0x5f55e4=_0x226b47[_0x5dbe7b(0x21d)](_0x5dbe7b(0x21e));if(!Number[_0x5dbe7b(0x1da)](_0x5f55e4)||_0x5f55e4<0x0)throw CliErrors[_0x5dbe7b(0x1e8)](_0x5dbe7b(0x22d));}return{'menuIds':_0x4b4786,'paths':_0x105054,'visible':_0x32d2ba,'expectVisible':_0x51fcb2,'expectedCount':_0x5f55e4};}async function buildPlan(_0x211f46,_0x259f9a){const _0x47bbbb=a175_0x1a5a24,_0x5b845d=parseInput(_0x211f46),_0x18e54c=await fetchMutationSnapshot(_0x211f46,_0x47bbbb(0x222)),_0x5e2045=selectTargets(_0x18e54c[_0x47bbbb(0x1d2)],_0x5b845d[_0x47bbbb(0x247)],_0x5b845d['paths']);if(_0x5b845d[_0x47bbbb(0x1fc)]!==undefined&&_0x5e2045[_0x47bbbb(0x231)]!==_0x5b845d[_0x47bbbb(0x1fc)])throw menuError(_0x47bbbb(0x1f9),_0x47bbbb(0x242)+_0x5e2045[_0x47bbbb(0x231)]+_0x47bbbb(0x206)+_0x5b845d[_0x47bbbb(0x1fc)]+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x5b845d[_0x47bbbb(0x204)]!==undefined){const _0x2dae2d=_0x5e2045[_0x47bbbb(0x24b)](_0x3e7408=>_0x3e7408['visible']!==_0x5b845d[_0x47bbbb(0x204)]);if(_0x2dae2d['length']>0x0)throw menuError(_0x47bbbb(0x22b),_0x47bbbb(0x1e1)+_0x2dae2d[_0x47bbbb(0x241)](_0x30e68e=>_0x30e68e['id'])[_0x47bbbb(0x221)](',\x20')+'.',_0x47bbbb(0x1f4));}const _0x46bad1=_0x5e2045[_0x47bbbb(0x241)](_0x280792=>({'id':_0x280792['id'],'label':_0x280792[_0x47bbbb(0x240)],'path':_0x280792['path'],'before':{'visible':_0x280792[_0x47bbbb(0x1fe)]},'after':{'visible':_0x5b845d['visible']}})),_0x30d1c3=_0x46bad1['filter'](_0x4665de=>_0x4665de[_0x47bbbb(0x1f6)][_0x47bbbb(0x1fe)]!==_0x5b845d[_0x47bbbb(0x1fe)])['map'](_0x45ba7e=>({'stage':_0x47bbbb(0x1ed),'method':_0x47bbbb(0x230),'path':_0x47bbbb(0x1f7),'body':{'appCode':_0x211f46['appCode'],'id':_0x45ba7e['id'],'visible':_0x5b845d[_0x47bbbb(0x1fe)]}})),_0x5c5085=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x5b845d['menuIds'],'paths':_0x5b845d[_0x47bbbb(0x1dd)]},'before':{'menus':_0x5e2045[_0x47bbbb(0x241)](_0x468514=>({'id':_0x468514['id'],'path':_0x468514[_0x47bbbb(0x227)],'visible':_0x468514[_0x47bbbb(0x1fe)]}))},'after':{'menus':_0x5e2045[_0x47bbbb(0x241)](_0x51b32c=>({'id':_0x51b32c['id'],'path':_0x51b32c['path'],'visible':_0x5b845d[_0x47bbbb(0x1fe)]}))},'dryRun':_0x259f9a,'backend':[...BACKEND],'plannedActions':_0x30d1c3,'snapshotHash':_0x18e54c[_0x47bbbb(0x1ff)],'warnings':_0x30d1c3['length']===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0x5c5085,'requestedVisible':_0x5b845d['visible'],'targets':_0x46bad1},'beforeById':new Map(_0x5e2045[_0x47bbbb(0x241)](_0x36bd09=>[_0x36bd09['id'],_0x36bd09]))};}function selectTargets(_0x48fb34,_0x1509da,_0x33fe1c){const _0x2f5a9a=a175_0x1a5a24,_0x1cd7bb=new Map(_0x48fb34['map'](_0x174052=>[_0x174052['id'],_0x174052])),_0x2bcca5=new Map(),_0x75746d=_0x1509da[_0x2f5a9a(0x24b)](_0x24cdb6=>!_0x1cd7bb[_0x2f5a9a(0x218)](_0x24cdb6));if(_0x75746d[_0x2f5a9a(0x231)]>0x0)throw menuError(_0x2f5a9a(0x223),_0x2f5a9a(0x1ee)+_0x75746d[_0x2f5a9a(0x221)](',\x20')+'.',_0x2f5a9a(0x21a));for(const _0x47ac75 of _0x1509da){_0x2bcca5[_0x2f5a9a(0x23a)](_0x47ac75,_0x1cd7bb[_0x2f5a9a(0x1d1)](_0x47ac75));}for(const _0xef940d of _0x33fe1c){const _0x3b5444=_0x48fb34[_0x2f5a9a(0x24b)](_0x1c19ee=>_0x1c19ee['path']===_0xef940d);if(_0x3b5444[_0x2f5a9a(0x231)]===0x0)throw menuError(_0x2f5a9a(0x223),_0x2f5a9a(0x1d0)+JSON[_0x2f5a9a(0x214)](_0xef940d)+'.',_0x2f5a9a(0x250));if(_0x3b5444['length']>0x1)throw menuError(_0x2f5a9a(0x1e9),_0x2f5a9a(0x203)+JSON[_0x2f5a9a(0x214)](_0xef940d)+'.',_0x2f5a9a(0x1e0)+_0x3b5444[_0x2f5a9a(0x241)](_0xcbc0b3=>_0xcbc0b3['id'])[_0x2f5a9a(0x221)](',\x20')+'.');const _0x566859=_0x3b5444[0x0];_0x2bcca5[_0x2f5a9a(0x23a)](_0x566859['id'],_0x566859);}return[..._0x2bcca5['values']()];}function parseMenuIds(_0x2205f0){const _0x5efc57=a175_0x1a5a24,_0x429d2c=parseCsv(_0x2205f0),_0x77cd24=_0x429d2c[_0x5efc57(0x241)](Number);if(_0x77cd24[_0x5efc57(0x1fa)](_0x36fe8d=>!Number[_0x5efc57(0x1da)](_0x36fe8d)||_0x36fe8d<=0x0))throw CliErrors['validation'](_0x5efc57(0x225));return[...new Set(_0x77cd24)];}function a175_0x4f48(){const _0x49dda1=['Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','datasetId','childrenCount','Requested\x20menu\x20visibility','menu\x20list','update\x20visibility\x20for','\x20visibility\x20update\x20could\x20not\x20be\x20verified','validation','menu_selector_ambiguous','\x20failed.','Response\x20was\x20lost\x20and\x20menu\x20','parentId','update-menu-visibility','Menu\x20id\x20selector(s)\x20not\x20found:\x20','false','resourcesValid','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','18827OgUEzN','menu_verification_failed','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','\x20skipped,\x20','before','/smartapi/menu/update','byId','menu_expected_count_mismatch','some','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','expectedCount','expect-visible','visible','hash','failed','true','pageType','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','expectVisible','update-recovery','\x20menu(s),\x20expected\x20','push','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','message','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','verification','pageId','updated','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','warnings','\x20menu(s);\x20skipped\x20','appCode','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','stringify','Menu\x20visibility\x20update\x20completed:\x20','menu','4542791AYmFyn','has','plan','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','4943960OkKjwM','menu_permission_denied','num','expected-count','split','boolean','join','update\x20menu\x20visibility','menu_selector_not_found','code','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','3106092UVJSxI','path','menu-ids','Menu\x20','448mPTWDv','menu_state_drift','beforeById','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','36218sRjNDq','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','POST','length','cookie','trim','\x20must\x20be\x20true\x20or\x20false.','\x20updated,\x20','plannedActions','str','isArray','url','set','\x20changed\x20unexpectedly.','3399129CPBAiu','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','verify\x20menu\x20visibility\x20update','\x20unchanged\x20menu(s).','label','map','Selected\x20','sort','targets','update','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','menuIds','visibility-update','rabetbase\x20menu\x20list\x20--format\x20compress','resources','filter','body','depth','rawFlags','flagMissing','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','2477310bQwzac','4DrzTMJ','datasetCode','Menu\x20path\x20selector\x20not\x20found:\x20','get','menus','type','childrenIds','6RHMXRC','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','string','38FqvXYE','Final\x20menu\x20visibility\x20readback\x20failed.','isSafeInteger','requestedVisible','modelType','paths','Updated\x20visibility\x20for\x20','Response\x20was\x20lost\x20for\x20menu\x20','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'];a175_0x4f48=function(){return _0x49dda1;};return a175_0x4f48();}function parseCsv(_0x73c108){const _0xc08dd3=a175_0x1a5a24;return[...new Set(_0x73c108[_0xc08dd3(0x21f)](',')[_0xc08dd3(0x241)](_0x2f338f=>_0x2f338f[_0xc08dd3(0x233)]())['filter'](Boolean))];}function parseBooleanFlag(_0x1eda5b,_0x2d21fc,_0x4c4bb6){const _0x3ef2f1=a175_0x1a5a24;if(!hasFlag(_0x1eda5b,_0x2d21fc)){if(_0x4c4bb6)throw CliErrors[_0x3ef2f1(0x24f)](_0x2d21fc);return undefined;}const _0x9f0640=_0x1eda5b[_0x3ef2f1(0x24e)][_0x2d21fc];if(_0x9f0640===!![]||_0x9f0640===![])return _0x9f0640;if(_0x9f0640===_0x3ef2f1(0x201))return!![];if(_0x9f0640===_0x3ef2f1(0x1ef))return![];throw CliErrors['validation']('--'+_0x2d21fc+_0x3ef2f1(0x234));}function verifyVisibilityUpdate(_0x4324b2,_0x4f0e4b,_0x37825e){const _0xf549ea=a175_0x1a5a24;assertVerified(!!_0x4f0e4b,_0xf549ea(0x229)+_0x4324b2['id']+_0xf549ea(0x1d6)),assertVerified(_0x4f0e4b['visible']===_0x37825e,_0xf549ea(0x229)+_0x4324b2['id']+_0xf549ea(0x251));const _0x384a78=[['id',_0x4f0e4b['id'],_0x4324b2['id']],[_0xf549ea(0x1ec),_0x4f0e4b[_0xf549ea(0x1ec)],_0x4324b2[_0xf549ea(0x1ec)]],[_0xf549ea(0x24d),_0x4f0e4b[_0xf549ea(0x24d)],_0x4324b2[_0xf549ea(0x24d)]],[_0xf549ea(0x240),_0x4f0e4b['label'],_0x4324b2[_0xf549ea(0x240)]],[_0xf549ea(0x227),_0x4f0e4b[_0xf549ea(0x227)],_0x4324b2[_0xf549ea(0x227)]],['url',_0x4f0e4b[_0xf549ea(0x239)],_0x4324b2[_0xf549ea(0x239)]],[_0xf549ea(0x1d3),_0x4f0e4b[_0xf549ea(0x1d3)],_0x4324b2[_0xf549ea(0x1d3)]],[_0xf549ea(0x243),_0x4f0e4b[_0xf549ea(0x243)],_0x4324b2[_0xf549ea(0x243)]],[_0xf549ea(0x24a),_0x4f0e4b[_0xf549ea(0x24a)],_0x4324b2['resources']],[_0xf549ea(0x1f0),_0x4f0e4b[_0xf549ea(0x1f0)],_0x4324b2['resourcesValid']],[_0xf549ea(0x1d4),_0x4f0e4b[_0xf549ea(0x1d4)],_0x4324b2[_0xf549ea(0x1d4)]],['childrenCount',_0x4f0e4b['childrenCount'],_0x4324b2[_0xf549ea(0x1e3)]],[_0xf549ea(0x20d),_0x4f0e4b[_0xf549ea(0x20d)],_0x4324b2[_0xf549ea(0x20d)]],[_0xf549ea(0x202),_0x4f0e4b[_0xf549ea(0x202)],_0x4324b2['pageType']],[_0xf549ea(0x1dc),_0x4f0e4b[_0xf549ea(0x1dc)],_0x4324b2[_0xf549ea(0x1dc)]],[_0xf549ea(0x1e2),_0x4f0e4b[_0xf549ea(0x1e2)],_0x4324b2[_0xf549ea(0x1e2)]],[_0xf549ea(0x1cf),_0x4f0e4b[_0xf549ea(0x1cf)],_0x4324b2[_0xf549ea(0x1cf)]]];for(const [_0x2536dc,_0x16f4cd,_0x26cefc]of _0x384a78){assertVerified(sameValue(_0x16f4cd,_0x26cefc),_0xf549ea(0x229)+_0x4324b2['id']+'\x20'+_0x2536dc+_0xf549ea(0x23b));}}function sameValue(_0x59a172,_0x463747){const _0x2924df=a175_0x1a5a24;if(Array[_0x2924df(0x238)](_0x59a172)||Array[_0x2924df(0x238)](_0x463747))return JSON[_0x2924df(0x214)](_0x59a172)===JSON[_0x2924df(0x214)](_0x463747);return _0x59a172===_0x463747;}
|
|
1
|
+
const a175_0x89fa30=a175_0x1248;(function(_0xd1e7bb,_0x4a9868){const _0x599e2b=a175_0x1248,_0x1c6136=_0xd1e7bb();while(!![]){try{const _0x148317=-parseInt(_0x599e2b(0x1dd))/0x1+-parseInt(_0x599e2b(0x1b6))/0x2+-parseInt(_0x599e2b(0x1b5))/0x3*(parseInt(_0x599e2b(0x1c9))/0x4)+-parseInt(_0x599e2b(0x16b))/0x5+-parseInt(_0x599e2b(0x1de))/0x6*(-parseInt(_0x599e2b(0x1d9))/0x7)+parseInt(_0x599e2b(0x16e))/0x8*(-parseInt(_0x599e2b(0x1e1))/0x9)+-parseInt(_0x599e2b(0x19c))/0xa*(-parseInt(_0x599e2b(0x1dc))/0xb);if(_0x148317===_0x4a9868)break;else _0x1c6136['push'](_0x1c6136['shift']());}catch(_0xb293cf){_0x1c6136['push'](_0x1c6136['shift']());}}}(a175_0x53b9,0xe20fe));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a175_0x89fa30(0x17a),'path':a175_0x89fa30(0x171)}];export const menuVisibilityUpdate={'service':a175_0x89fa30(0x169),'command':a175_0x89fa30(0x1a3),'description':a175_0x89fa30(0x1e6),'risk':a175_0x89fa30(0x190),'structuredErrors':!![],'flags':[{'name':a175_0x89fa30(0x1d0),'type':'string','description':a175_0x89fa30(0x196)},{'name':a175_0x89fa30(0x1a0),'type':a175_0x89fa30(0x1a1),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a175_0x89fa30(0x1e4),'type':a175_0x89fa30(0x1bd),'required':!![],'description':a175_0x89fa30(0x195)},{'name':a175_0x89fa30(0x1e8),'type':'boolean','description':a175_0x89fa30(0x1a5)},{'name':a175_0x89fa30(0x1ab),'type':a175_0x89fa30(0x1e7),'description':a175_0x89fa30(0x19b)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x47a532){parseInput(_0x47a532),requireExplicitYes(_0x47a532);},async 'dryRun'(_0x17c8ad){const _0x56dd0c=a175_0x89fa30,_0x5bedd9=await buildPlan(_0x17c8ad,!![]),_0x20c19f=_0x5bedd9[_0x56dd0c(0x1df)][_0x56dd0c(0x1cc)]?.[_0x56dd0c(0x19e)]??0x0,_0x529fb0=_0x5bedd9['plan'][_0x56dd0c(0x1a6)][_0x56dd0c(0x19e)]-_0x20c19f;return menuDryRunResult(_0x5bedd9[_0x56dd0c(0x1df)],{'method':_0x56dd0c(0x17a),'url':'/smartapi/menu/update','body':{'updates':_0x5bedd9[_0x56dd0c(0x1df)][_0x56dd0c(0x1cc)]?.[_0x56dd0c(0x189)](_0x5785e7=>_0x5785e7[_0x56dd0c(0x1cb)])??[]},'description':_0x56dd0c(0x1c1)+_0x20c19f+_0x56dd0c(0x1d2)+_0x529fb0+_0x56dd0c(0x1b3)});},async 'execute'(_0xccd406){const _0x9108c9=a175_0x89fa30;requireExplicitYes(_0xccd406);const _0x3e4225=await buildPlan(_0xccd406,![]);await recheckMutationSnapshot(_0xccd406,_0x3e4225['plan'],_0x9108c9(0x16d));const _0x43d08c=[],_0x2e4604=[],_0x474631=[];for(const _0x5de2ab of _0x3e4225[_0x9108c9(0x1df)][_0x9108c9(0x1a6)]){if(_0x5de2ab[_0x9108c9(0x1ea)][_0x9108c9(0x1e4)]===_0x3e4225['plan'][_0x9108c9(0x1bc)]){_0x43d08c['push']({'id':_0x5de2ab['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0xccd406[_0x9108c9(0x182)],_0xccd406[_0x9108c9(0x184)],{'id':_0x5de2ab['id'],'visible':_0x3e4225[_0x9108c9(0x1df)][_0x9108c9(0x1bc)]}),_0x43d08c[_0x9108c9(0x1a7)]({'id':_0x5de2ab['id'],'updated':!![],'skipped':![]});}catch(_0x400739){const _0x1f1b9a=mapMenuApiError(_0x400739,_0x9108c9(0x1bb),_0x5de2ab['id']);if(isMenuResponseLoss(_0x400739)&&_0x1f1b9a[_0x9108c9(0x197)]!=='menu_permission_denied'){_0x474631[_0x9108c9(0x1a7)](_0x5de2ab['id']);continue;}_0x2e4604['push']({'id':_0x5de2ab['id'],'stage':_0x9108c9(0x1b1),'code':_0x1f1b9a[_0x9108c9(0x197)],'message':_0x1f1b9a[_0x9108c9(0x1af)]});}}let _0x548cbf;try{_0x548cbf=await fetchMenuSnapshot(_0xccd406['appCode'],_0xccd406[_0x9108c9(0x184)]);}catch(_0xfa05bd){const _0x3f14d3=describeMenuErrorCause(_0xfa05bd,_0x9108c9(0x180)),_0x401a57=_0x474631[_0x9108c9(0x189)](_0x133415=>({'id':_0x133415,'stage':_0x9108c9(0x19d),'code':'menu_verification_failed','message':_0x9108c9(0x17f)+_0x133415+_0x9108c9(0x191),'requestedStateConfirmed':![],'recovered':![]})),_0x1fb0f9={'stage':'verification','code':_0x9108c9(0x18f),'message':_0x9108c9(0x183),'targetIds':_0x3e4225['plan'][_0x9108c9(0x1a6)][_0x9108c9(0x189)](_0x3629fc=>_0x3629fc['id']),'requestedStateConfirmed':![],..._0x3f14d3};throw menuFailure(asVerificationError(_0xfa05bd,_0x9108c9(0x1c4)),_0x3e4225[_0x9108c9(0x1df)],{'stage':_0x9108c9(0x1cd),'succeeded':_0x43d08c,'failedRecords':[..._0x2e4604,..._0x401a57,_0x1fb0f9],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x9108c9(0x16c),'recoveredCount':0x0,'lookupCommand':_0x9108c9(0x1db)}});}const _0x22ea2e=[];for(const _0x7a343c of _0x43d08c){const _0x17800a=Number(_0x7a343c['id']),_0x44437b=_0x3e4225[_0x9108c9(0x186)][_0x9108c9(0x175)](_0x17800a),_0x3f5ce4=_0x548cbf[_0x9108c9(0x1be)]['get'](_0x17800a);try{verifyVisibilityUpdate(_0x44437b,_0x3f5ce4,_0x3e4225['plan'][_0x9108c9(0x1bc)]);}catch(_0x5b415f){const _0x33da1c=asVerificationError(_0x5b415f,_0x9108c9(0x198)+_0x17800a+_0x9108c9(0x172));_0x22ea2e[_0x9108c9(0x1a7)]({'id':_0x17800a,'stage':'verification','code':_0x33da1c[_0x9108c9(0x197)],'message':_0x33da1c[_0x9108c9(0x1af)],'requestedStateConfirmed':![]});}}for(const _0xe5dad1 of _0x474631){const _0x349724=_0x3e4225[_0x9108c9(0x186)][_0x9108c9(0x175)](_0xe5dad1),_0x57409b=_0x548cbf[_0x9108c9(0x1be)][_0x9108c9(0x175)](_0xe5dad1);try{verifyVisibilityUpdate(_0x349724,_0x57409b,_0x3e4225[_0x9108c9(0x1df)]['requestedVisible']),_0x43d08c[_0x9108c9(0x1a7)]({'id':_0xe5dad1,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x2eaa64){const _0x58d6d3=asVerificationError(_0x2eaa64,_0x9108c9(0x1e0)+_0xe5dad1+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x22ea2e['push']({'id':_0xe5dad1,'stage':_0x9108c9(0x19d),'code':_0x58d6d3[_0x9108c9(0x197)],'message':_0x58d6d3[_0x9108c9(0x1af)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x22ea2e[_0x9108c9(0x19e)]>0x0){const _0x375698=_0x22ea2e[_0x9108c9(0x189)](_0x48d381=>Number(_0x48d381['id'])),_0x2937b1=_0x43d08c['filter'](_0x5ba761=>_0x5ba761['recovered']===!![])[_0x9108c9(0x19e)],_0x2bc940=menuError(_0x9108c9(0x18f),_0x9108c9(0x17e)+_0x375698[_0x9108c9(0x170)](',\x20')+'.',_0x9108c9(0x188));throw menuFailure(_0x2bc940,_0x3e4225[_0x9108c9(0x1df)],{'stage':_0x9108c9(0x1cd),'succeeded':_0x43d08c,'failedRecords':[..._0x2e4604,..._0x22ea2e],'warnings':[_0x9108c9(0x1c3)],'verification':{'status':_0x9108c9(0x16c),..._0x375698[_0x9108c9(0x19e)]===0x1?{'targetId':_0x375698[0x0]}:{'targetIds':_0x375698},'recoveredCount':_0x2937b1,'lookupCommand':_0x9108c9(0x1db)}});}const _0x53e6db=_0x43d08c[_0x9108c9(0x1b7)](_0x4ef243=>_0x4ef243[_0x9108c9(0x185)]===!![])[_0x9108c9(0x19e)],_0x49cb73=_0x43d08c[_0x9108c9(0x19e)]-_0x53e6db,_0x46dfcf={..._0x3e4225['plan'],'succeeded':_0x43d08c,'failed':_0x2e4604,'warnings':_0x2e4604[_0x9108c9(0x19e)]>0x0?[..._0x3e4225[_0x9108c9(0x1df)]['warnings'],_0x9108c9(0x1b8)]:_0x3e4225['plan'][_0x9108c9(0x1a8)],'verification':{'checkedBy':_0x9108c9(0x17c),'snapshotHash':_0x548cbf[_0x9108c9(0x1d4)],'matchesRequestedState':_0x2e4604[_0x9108c9(0x19e)]===0x0,'recoveredCount':_0x474631[_0x9108c9(0x19e)]}};return{'ok':_0x2e4604['length']===0x0,'data':_0x46dfcf,'message':_0x2e4604['length']===0x0?'Updated\x20visibility\x20for\x20'+_0x53e6db+_0x9108c9(0x1ca)+_0x49cb73+'\x20unchanged\x20menu(s).':_0x9108c9(0x194)+_0x53e6db+'\x20updated,\x20'+_0x49cb73+_0x9108c9(0x1d8)+_0x2e4604['length']+'\x20failed.'};}};function parseInput(_0x36fd1d){const _0x1a5272=a175_0x89fa30,_0x4a11be=parseMenuIds(_0x36fd1d[_0x1a5272(0x1da)](_0x1a5272(0x1d0))),_0x365865=parseCsv(_0x36fd1d[_0x1a5272(0x1da)](_0x1a5272(0x1a0)));if(_0x4a11be[_0x1a5272(0x19e)]===0x0&&_0x365865['length']===0x0)throw CliErrors['validation'](_0x1a5272(0x1ae));const _0x2accf3=parseBooleanFlag(_0x36fd1d,_0x1a5272(0x1e4),!![]),_0x311d3b=parseBooleanFlag(_0x36fd1d,_0x1a5272(0x1e8),![]);let _0x54af29;if(hasFlag(_0x36fd1d,_0x1a5272(0x1ab))){_0x54af29=_0x36fd1d[_0x1a5272(0x192)]('expected-count');if(!Number[_0x1a5272(0x1e3)](_0x54af29)||_0x54af29<0x0)throw CliErrors['validation'](_0x1a5272(0x1d6));}return{'menuIds':_0x4a11be,'paths':_0x365865,'visible':_0x2accf3,'expectVisible':_0x311d3b,'expectedCount':_0x54af29};}async function buildPlan(_0x3c1187,_0x5dfe93){const _0x10aba7=a175_0x89fa30,_0x256b83=parseInput(_0x3c1187),_0x30858f=await fetchMutationSnapshot(_0x3c1187,_0x10aba7(0x16d)),_0xe8a933=selectTargets(_0x30858f[_0x10aba7(0x1d3)],_0x256b83[_0x10aba7(0x1c0)],_0x256b83[_0x10aba7(0x1a0)]);if(_0x256b83[_0x10aba7(0x18c)]!==undefined&&_0xe8a933[_0x10aba7(0x19e)]!==_0x256b83[_0x10aba7(0x18c)])throw menuError(_0x10aba7(0x168),_0x10aba7(0x1ad)+_0xe8a933[_0x10aba7(0x19e)]+'\x20menu(s),\x20expected\x20'+_0x256b83[_0x10aba7(0x18c)]+'.',_0x10aba7(0x178));if(_0x256b83[_0x10aba7(0x1c2)]!==undefined){const _0x20f951=_0xe8a933[_0x10aba7(0x1b7)](_0x2c1739=>_0x2c1739[_0x10aba7(0x1e4)]!==_0x256b83[_0x10aba7(0x1c2)]);if(_0x20f951[_0x10aba7(0x19e)]>0x0)throw menuError(_0x10aba7(0x1b2),'Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x20f951[_0x10aba7(0x189)](_0x5bc1f6=>_0x5bc1f6['id'])[_0x10aba7(0x170)](',\x20')+'.',_0x10aba7(0x1d7));}const _0x3b5bc1=_0xe8a933[_0x10aba7(0x189)](_0x32c86f=>({'id':_0x32c86f['id'],'label':_0x32c86f['label'],'path':_0x32c86f[_0x10aba7(0x1b9)],'before':{'visible':_0x32c86f[_0x10aba7(0x1e4)]},'after':{'visible':_0x256b83[_0x10aba7(0x1e4)]}})),_0x24c069=_0x3b5bc1['filter'](_0x5be85b=>_0x5be85b['before']['visible']!==_0x256b83['visible'])[_0x10aba7(0x189)](_0x1de679=>({'stage':_0x10aba7(0x1aa),'method':'POST','path':'/smartapi/menu/update','body':{'appCode':_0x3c1187[_0x10aba7(0x182)],'id':_0x1de679['id'],'visible':_0x256b83['visible']}})),_0x2270a6=mutationResult({'operation':_0x10aba7(0x1a3),'selector':{'menuIds':_0x256b83[_0x10aba7(0x1c0)],'paths':_0x256b83[_0x10aba7(0x1a0)]},'before':{'menus':_0xe8a933[_0x10aba7(0x189)](_0x481cbc=>({'id':_0x481cbc['id'],'path':_0x481cbc[_0x10aba7(0x1b9)],'visible':_0x481cbc['visible']}))},'after':{'menus':_0xe8a933[_0x10aba7(0x189)](_0x1996fe=>({'id':_0x1996fe['id'],'path':_0x1996fe['path'],'visible':_0x256b83[_0x10aba7(0x1e4)]}))},'dryRun':_0x5dfe93,'backend':[...BACKEND],'plannedActions':_0x24c069,'snapshotHash':_0x30858f[_0x10aba7(0x1d4)],'warnings':_0x24c069[_0x10aba7(0x19e)]===0x0?[_0x10aba7(0x1c6)]:[]});return{'plan':{..._0x2270a6,'requestedVisible':_0x256b83[_0x10aba7(0x1e4)],'targets':_0x3b5bc1},'beforeById':new Map(_0xe8a933[_0x10aba7(0x189)](_0x18df3a=>[_0x18df3a['id'],_0x18df3a]))};}function a175_0x1248(_0x3cac4f,_0x8f8a8){_0x3cac4f=_0x3cac4f-0x168;const _0x53b92b=a175_0x53b9();let _0x124873=_0x53b92b[_0x3cac4f];return _0x124873;}function selectTargets(_0x3646dd,_0x39f9d4,_0x42d454){const _0x5300f5=a175_0x89fa30,_0x3fd79f=new Map(_0x3646dd[_0x5300f5(0x189)](_0x41a177=>[_0x41a177['id'],_0x41a177])),_0x593c24=new Map(),_0x48a1de=_0x39f9d4['filter'](_0x18f2c7=>!_0x3fd79f[_0x5300f5(0x1e9)](_0x18f2c7));if(_0x48a1de['length']>0x0)throw menuError(_0x5300f5(0x18a),_0x5300f5(0x17d)+_0x48a1de['join'](',\x20')+'.',_0x5300f5(0x1cf));for(const _0x3488c9 of _0x39f9d4){_0x593c24[_0x5300f5(0x174)](_0x3488c9,_0x3fd79f['get'](_0x3488c9));}for(const _0x33b58d of _0x42d454){const _0x592992=_0x3646dd[_0x5300f5(0x1b7)](_0x5d5a2d=>_0x5d5a2d['path']===_0x33b58d);if(_0x592992[_0x5300f5(0x19e)]===0x0)throw menuError('menu_selector_not_found',_0x5300f5(0x1ba)+JSON[_0x5300f5(0x179)](_0x33b58d)+'.',_0x5300f5(0x16a));if(_0x592992[_0x5300f5(0x19e)]>0x1)throw menuError(_0x5300f5(0x199),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x5300f5(0x179)](_0x33b58d)+'.',_0x5300f5(0x1a9)+_0x592992[_0x5300f5(0x189)](_0x8a2256=>_0x8a2256['id'])[_0x5300f5(0x170)](',\x20')+'.');const _0x4efd1d=_0x592992[0x0];_0x593c24[_0x5300f5(0x174)](_0x4efd1d['id'],_0x4efd1d);}return[..._0x593c24[_0x5300f5(0x1b4)]()];}function a175_0x53b9(){const _0x510981=['get','childrenCount','datasetId','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','stringify','POST','isArray','menu\x20list','Menu\x20id\x20selector(s)\x20not\x20found:\x20','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','Response\x20was\x20lost\x20for\x20menu\x20','verify\x20menu\x20visibility\x20update','modelType','appCode','Final\x20menu\x20visibility\x20readback\x20failed.','cookie','updated','beforeById','sort','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','map','menu_selector_not_found','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','expectedCount','url','split','menu_verification_failed','high-risk-write','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','num','\x20must\x20be\x20true\x20or\x20false.','Menu\x20visibility\x20update\x20completed:\x20','Requested\x20menu\x20visibility','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','code','Menu\x20','menu_selector_ambiguous','resourcesValid','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','1630TWjlKI','update-recovery','length','rawFlags','paths','string','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','visibility-update','trim','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','targets','push','warnings','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','update-menu-visibility','expected-count','resources','Selected\x20','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','message','datasetCode','update','menu_state_drift','\x20unchanged\x20menu(s).','values','337188Ochrco','1597676mFVZZs','filter','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','path','Menu\x20path\x20selector\x20not\x20found:\x20','update\x20visibility\x20for','requestedVisible','boolean','byId','pageType','menuIds','Would\x20update\x20visibility\x20for\x20','expectVisible','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','pageId','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','flagMissing','childrenIds','4SpzfWN','\x20menu(s);\x20skipped\x20','body','plannedActions','verification','type','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','menu-ids','true','\x20menu(s);\x20skip\x20','menus','hash','validation','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','\x20skipped,\x20','136003YBYlOo','str','rabetbase\x20menu\x20list\x20--format\x20compress','176803pLSrmw','690866bXdMox','522xjeAXO','plan','Response\x20was\x20lost\x20and\x20menu\x20','1595898cPCsKw','label','isSafeInteger','visible','depth','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','number','expect-visible','has','before','menu_expected_count_mismatch','menu','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','931370DLmUPh','failed','update\x20menu\x20visibility','72ApgGdl','parentId','join','/smartapi/menu/update','\x20visibility\x20update\x20could\x20not\x20be\x20verified','\x20changed\x20unexpectedly.','set'];a175_0x53b9=function(){return _0x510981;};return a175_0x53b9();}function parseMenuIds(_0x2a6ac4){const _0x25df92=a175_0x89fa30,_0x5727ae=parseCsv(_0x2a6ac4),_0x23e761=_0x5727ae[_0x25df92(0x189)](Number);if(_0x23e761['some'](_0x403639=>!Number[_0x25df92(0x1e3)](_0x403639)||_0x403639<=0x0))throw CliErrors[_0x25df92(0x1d5)](_0x25df92(0x18b));return[...new Set(_0x23e761)];}function parseCsv(_0xbe1327){const _0x43bd8a=a175_0x89fa30;return[...new Set(_0xbe1327[_0x43bd8a(0x18e)](',')[_0x43bd8a(0x189)](_0x52b6ff=>_0x52b6ff[_0x43bd8a(0x1a4)]())[_0x43bd8a(0x1b7)](Boolean))];}function parseBooleanFlag(_0x52a4bd,_0x1d05b4,_0x157824){const _0x1c0a89=a175_0x89fa30;if(!hasFlag(_0x52a4bd,_0x1d05b4)){if(_0x157824)throw CliErrors[_0x1c0a89(0x1c7)](_0x1d05b4);return undefined;}const _0x1c54c3=_0x52a4bd[_0x1c0a89(0x19f)][_0x1d05b4];if(_0x1c54c3===!![]||_0x1c54c3===![])return _0x1c54c3;if(_0x1c54c3===_0x1c0a89(0x1d1))return!![];if(_0x1c54c3==='false')return![];throw CliErrors[_0x1c0a89(0x1d5)]('--'+_0x1d05b4+_0x1c0a89(0x193));}function verifyVisibilityUpdate(_0x408ed8,_0x33d499,_0x3182d6){const _0x23660=a175_0x89fa30;assertVerified(!!_0x33d499,_0x23660(0x198)+_0x408ed8['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x33d499['visible']===_0x3182d6,_0x23660(0x198)+_0x408ed8['id']+_0x23660(0x1a2));const _0x216971=[['id',_0x33d499['id'],_0x408ed8['id']],[_0x23660(0x16f),_0x33d499[_0x23660(0x16f)],_0x408ed8[_0x23660(0x16f)]],[_0x23660(0x1e5),_0x33d499[_0x23660(0x1e5)],_0x408ed8[_0x23660(0x1e5)]],[_0x23660(0x1e2),_0x33d499['label'],_0x408ed8[_0x23660(0x1e2)]],[_0x23660(0x1b9),_0x33d499['path'],_0x408ed8['path']],['url',_0x33d499[_0x23660(0x18d)],_0x408ed8['url']],[_0x23660(0x1ce),_0x33d499[_0x23660(0x1ce)],_0x408ed8[_0x23660(0x1ce)]],[_0x23660(0x187),_0x33d499[_0x23660(0x187)],_0x408ed8[_0x23660(0x187)]],[_0x23660(0x1ac),_0x33d499['resources'],_0x408ed8[_0x23660(0x1ac)]],[_0x23660(0x19a),_0x33d499[_0x23660(0x19a)],_0x408ed8[_0x23660(0x19a)]],[_0x23660(0x1c8),_0x33d499[_0x23660(0x1c8)],_0x408ed8[_0x23660(0x1c8)]],[_0x23660(0x176),_0x33d499[_0x23660(0x176)],_0x408ed8[_0x23660(0x176)]],[_0x23660(0x1c5),_0x33d499[_0x23660(0x1c5)],_0x408ed8[_0x23660(0x1c5)]],[_0x23660(0x1bf),_0x33d499[_0x23660(0x1bf)],_0x408ed8['pageType']],[_0x23660(0x181),_0x33d499['modelType'],_0x408ed8[_0x23660(0x181)]],[_0x23660(0x177),_0x33d499['datasetId'],_0x408ed8[_0x23660(0x177)]],['datasetCode',_0x33d499[_0x23660(0x1b0)],_0x408ed8[_0x23660(0x1b0)]]];for(const [_0x55188f,_0x1989cf,_0x17be25]of _0x216971){assertVerified(sameValue(_0x1989cf,_0x17be25),_0x23660(0x198)+_0x408ed8['id']+'\x20'+_0x55188f+_0x23660(0x173));}}function sameValue(_0x4c2c9a,_0x2ee336){const _0xe05847=a175_0x89fa30;if(Array[_0xe05847(0x17b)](_0x4c2c9a)||Array[_0xe05847(0x17b)](_0x2ee336))return JSON[_0xe05847(0x179)](_0x4c2c9a)===JSON['stringify'](_0x2ee336);return _0x4c2c9a===_0x2ee336;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a176_0x1bd309=a176_0x2b88;function a176_0x2b88(_0x318da5,_0x50ed7b){_0x318da5=_0x318da5-0xfa;const _0x505520=a176_0x5055();let _0x2b88f1=_0x505520[_0x318da5];return _0x2b88f1;}(function(_0x26b857,_0x25ae5e){const _0xaf3ca2=a176_0x2b88,_0x594c18=_0x26b857();while(!![]){try{const _0xbdbe4=-parseInt(_0xaf3ca2(0x11e))/0x1+-parseInt(_0xaf3ca2(0x10d))/0x2*(-parseInt(_0xaf3ca2(0x109))/0x3)+parseInt(_0xaf3ca2(0x120))/0x4+-parseInt(_0xaf3ca2(0x101))/0x5+parseInt(_0xaf3ca2(0x115))/0x6*(-parseInt(_0xaf3ca2(0x10a))/0x7)+parseInt(_0xaf3ca2(0x103))/0x8*(parseInt(_0xaf3ca2(0x114))/0x9)+-parseInt(_0xaf3ca2(0x10b))/0xa*(-parseInt(_0xaf3ca2(0x117))/0xb);if(_0xbdbe4===_0x25ae5e)break;else _0x594c18['push'](_0x594c18['shift']());}catch(_0x33ddac){_0x594c18['push'](_0x594c18['shift']());}}}(a176_0x5055,0x34a02));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';function a176_0x5055(){const _0x3d584b=['Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','readTimeout','planned','228248yMNvfJ','POST','47616OfAKgr','verified','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','config-create','endpointUrl','description','notification','connectTimeout','1143525iLBhpQ','notification_config_create_outcome_unknown','8SnpFPp','configCode','configName',';\x20no\x20automatic\x20retry\x20was\x20attempted.',';\x20do\x20not\x20resubmit.','create','28140FRCksn','21RicbVy','4128490sMAhMF','isSafeInteger','52oumPnn','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','write','mutation','verification','channelConfig','Inspect\x20with\x20','2209689XfQhGQ','483294RwsAep','channelType','11tlpRKt','/notification/channel-config/create','appCode','document'];a176_0x5055=function(){return _0x3d584b;};return a176_0x5055();}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=a176_0x1bd309(0x118);async function prepareCreate(_0x1622bf){const _0x4cf6f0=a176_0x1bd309,_0x11e9fa=await readNotificationDocument(_0x1622bf,_0x4cf6f0(0x108)),_0x3e2736=createMutationInput(_0x1622bf[_0x4cf6f0(0x119)],_0x11e9fa);return{'document':_0x11e9fa,'input':_0x3e2736,'planned':projectNotificationConfig({'appCode':_0x1622bf[_0x4cf6f0(0x119)],'configName':_0x11e9fa['configName'],'channelType':_0x11e9fa[_0x4cf6f0(0x116)],'endpointUrl':_0x11e9fa[_0x4cf6f0(0xfd)],'channelConfig':_0x11e9fa[_0x4cf6f0(0x112)],'description':_0x11e9fa[_0x4cf6f0(0xfe)],'connectTimeout':_0x11e9fa[_0x4cf6f0(0x100)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x11e9fa[_0x4cf6f0(0x11c)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a176_0x1bd309(0xff),'command':a176_0x1bd309(0xfc),'description':a176_0x1bd309(0x11b),'risk':a176_0x1bd309(0x10f),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x21a9fa){assertSingleNotificationSource(_0x21a9fa);},async 'dryRun'(_0x187e46){const _0x3401a9=a176_0x1bd309,_0x587647=await prepareCreate(_0x187e46),_0x1398c3=notificationLookupCommand(_0x187e46[_0x3401a9(0x119)],_0x587647[_0x3401a9(0x11a)][_0x3401a9(0x116)]);return asDryRunResult({'operation':_0x3401a9(0x108),'selector':{'appCode':_0x187e46[_0x3401a9(0x119)],'configName':_0x587647[_0x3401a9(0x11a)][_0x3401a9(0x105)],'channelType':_0x587647[_0x3401a9(0x11a)][_0x3401a9(0x116)]},'before':null,'after':_0x587647[_0x3401a9(0x11d)],'dryRun':!![],'backend':{'method':_0x3401a9(0x11f),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3401a9(0x11d),'lookupCommand':_0x1398c3}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x22bedd){const _0x23db57=a176_0x1bd309,_0x4224ad=await prepareCreate(_0x22bedd),_0x4ca087=notificationLookupCommand(_0x22bedd['appCode'],_0x4224ad[_0x23db57(0x11a)]['channelType']);let _0x389540;try{_0x389540=await createNotificationChannelConfig(_0x4224ad['input']);}catch(_0x387d98){if(isPlatformTransportFailure(_0x387d98))throw notificationError('notification_config_create_outcome_unknown',_0x23db57(0x10e),'Inspect\x20with\x20'+_0x4ca087+_0x23db57(0x107));throw safeApiFailure(_0x23db57(0x108),_0x23db57(0x110),_0x23db57(0x113)+_0x4ca087+_0x23db57(0x106));}if(!Number[_0x23db57(0x10c)](_0x389540)||_0x389540<=0x0)throw notificationError(_0x23db57(0x102),_0x23db57(0xfb),_0x23db57(0x113)+_0x4ca087+';\x20do\x20not\x20resubmit.');let _0x7d1a00;try{const _0x38140e=await getNotificationChannelConfig(_0x389540,_0x22bedd['appCode']);_0x7d1a00=normalizeExactNotificationConfig(_0x38140e,_0x389540,_0x22bedd[_0x23db57(0x119)]);}catch{throw safeApiFailure(_0x23db57(0x108),_0x23db57(0x111),'Inspect\x20with\x20'+_0x4ca087+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x23db57(0x108),'selector':{'appCode':_0x7d1a00[_0x23db57(0x119)],'id':_0x7d1a00['id'],'configCode':_0x7d1a00[_0x23db57(0x104)],'configName':_0x7d1a00[_0x23db57(0x105)],'channelType':_0x7d1a00['channelType']},'before':null,'after':projectNotificationConfig(_0x7d1a00),'dryRun':![],'backend':{'method':_0x23db57(0x11f),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x23db57(0xfa),'lookupCommand':_0x4ca087}},'message':'Created\x20notification\x20config\x20'+_0x7d1a00['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a177_0x340a(){const _0x12723e=['114bgVirD','Deleted\x20notification\x20config\x20','delete','7UVrByj','unshift','/notification/channel-config/delete','1107128YvUWUh','some','verified','64475hjkTpx','config-delete','22koTrvI','notification_config_delete_outcome_unknown','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Inspect\x20with\x20','347556xkOEbx','before','2871132lZwqit','POST','611343NTkfIS','notification_config_delete_verification_failed','mutation','high-risk-write',';\x20do\x20not\x20resubmit\x20automatically.','planned','8rsjjeK','538890wiWFkL','90yPTEeR','2396728ZOiDYl','channelType','Notification\x20config\x20','appCode'];a177_0x340a=function(){return _0x12723e;};return a177_0x340a();}const a177_0x6c2391=a177_0x44a3;(function(_0x5e24a3,_0x526632){const _0x18d39c=a177_0x44a3,_0x58bb82=_0x5e24a3();while(!![]){try{const _0x396c69=-parseInt(_0x18d39c(0x10c))/0x1+parseInt(_0x18d39c(0x10b))/0x2*(parseInt(_0x18d39c(0x101))/0x3)+-parseInt(_0x18d39c(0x10e))/0x4+parseInt(_0x18d39c(0x11b))/0x5*(parseInt(_0x18d39c(0x112))/0x6)+-parseInt(_0x18d39c(0x115))/0x7*(parseInt(_0x18d39c(0x118))/0x8)+parseInt(_0x18d39c(0x105))/0x9*(parseInt(_0x18d39c(0x10d))/0xa)+-parseInt(_0x18d39c(0x11d))/0xb*(-parseInt(_0x18d39c(0x103))/0xc);if(_0x396c69===_0x526632)break;else _0x58bb82['push'](_0x58bb82['shift']());}catch(_0x1db78d){_0x58bb82['push'](_0x58bb82['shift']());}}}(a177_0x340a,0x7f657));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a177_0x6c2391(0x117),REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';async function prepareDelete(_0x4e8dae){const _0x3ecb4a=a177_0x6c2391,_0x188f8c=readNotificationId(_0x4e8dae),_0x191ef5=await requireExactNotificationConfig(_0x4e8dae[_0x3ecb4a(0x111)],_0x188f8c,_0x3ecb4a(0x114));return{'id':_0x188f8c,'before':_0x191ef5};}function a177_0x44a3(_0x178693,_0x1b138c){_0x178693=_0x178693-0x100;const _0x340aa3=a177_0x340a();let _0x44a31a=_0x340aa3[_0x178693];return _0x44a31a;}export const notificationConfigDelete={'service':'notification','command':a177_0x6c2391(0x11c),'description':'Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','risk':a177_0x6c2391(0x108),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x264316){readNotificationId(_0x264316),requireNotificationExplicitYes(_0x264316);},async 'dryRun'(_0x2b9eec){const _0x5864da=a177_0x6c2391,_0x417ab2=await prepareDelete(_0x2b9eec),_0x4451bf=notificationLookupCommand(_0x2b9eec[_0x5864da(0x111)],_0x417ab2[_0x5864da(0x102)]['channelType']);return asDryRunResult({'operation':_0x5864da(0x114),'selector':notificationSelector(_0x417ab2[_0x5864da(0x102)]),'before':projectNotificationConfig(_0x417ab2[_0x5864da(0x102)]),'after':null,'dryRun':!![],'backend':{'method':_0x5864da(0x104),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x5864da(0x10a),'lookupCommand':_0x4451bf}},{'method':_0x5864da(0x104),'url':DELETE_PATH});},async 'execute'(_0x476d6e){const _0x32aacb=a177_0x6c2391;requireNotificationExplicitYes(_0x476d6e);const _0x45f182=await prepareDelete(_0x476d6e),_0x594939=notificationLookupCommand(_0x476d6e[_0x32aacb(0x111)],_0x45f182[_0x32aacb(0x102)]['channelType']);let _0x25afd9=![];try{await deleteNotificationChannelConfig(_0x45f182['id'],_0x476d6e[_0x32aacb(0x111)]);}catch(_0x5e0ca6){if(!isPlatformTransportFailure(_0x5e0ca6))throw safeApiFailure(_0x32aacb(0x114),_0x32aacb(0x107),_0x32aacb(0x100)+_0x594939+_0x32aacb(0x120));_0x25afd9=!![];}let _0x363850;try{_0x363850=await listNotificationChannelConfigs(_0x476d6e[_0x32aacb(0x111)],_0x45f182[_0x32aacb(0x102)][_0x32aacb(0x10f)]),validateNotificationDeleteReadback(_0x363850,_0x476d6e['appCode'],_0x45f182[_0x32aacb(0x102)][_0x32aacb(0x10f)]);}catch{throw notificationError(_0x25afd9?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable',_0x32aacb(0x110)+_0x45f182['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x32aacb(0x100)+_0x594939+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x363850[_0x32aacb(0x119)](_0x3a1f12=>_0x3a1f12['id']===_0x45f182['id']))throw notificationError(_0x25afd9?_0x32aacb(0x11e):_0x32aacb(0x106),_0x32aacb(0x110)+_0x45f182['id']+'\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20'+_0x594939+_0x32aacb(0x109));const _0x13551d=[REFERENCE_WARNING];return _0x25afd9&&_0x13551d[_0x32aacb(0x116)](_0x32aacb(0x11f)),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0x45f182[_0x32aacb(0x102)]),'before':projectNotificationConfig(_0x45f182[_0x32aacb(0x102)]),'after':null,'dryRun':![],'backend':{'method':_0x32aacb(0x104),'path':DELETE_PATH},'warnings':_0x13551d,'verification':{'status':_0x32aacb(0x11a),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x25afd9,'lookupCommand':_0x594939}},'message':_0x32aacb(0x113)+_0x45f182['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a178_0x516e(){const _0x314b5b=['read','504102arbnzX','8802800UMeJcd','appCode','type','notification','string','Found\x20','1uzWJPp','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','319574qePUye','4607226oNuOpu','4068776YBYNha','map','length','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','boolean','2443200eCdPHT','str','config-list','all','trim','flat','validation','35DUEWEs','bool','2748pKKVFv','849VloxvP'];a178_0x516e=function(){return _0x314b5b;};return a178_0x516e();}const a178_0x5b708f=a178_0x393b;(function(_0x566e01,_0x38e253){const _0x23383e=a178_0x393b,_0x5648c8=_0x566e01();while(!![]){try{const _0x139dda=-parseInt(_0x23383e(0x203))/0x1*(-parseInt(_0x23383e(0x205))/0x2)+-parseInt(_0x23383e(0x1fa))/0x3*(-parseInt(_0x23383e(0x1f9))/0x4)+parseInt(_0x23383e(0x1f0))/0x5+parseInt(_0x23383e(0x1fc))/0x6*(-parseInt(_0x23383e(0x1f7))/0x7)+-parseInt(_0x23383e(0x1eb))/0x8+-parseInt(_0x23383e(0x206))/0x9+parseInt(_0x23383e(0x1fd))/0xa;if(_0x139dda===_0x38e253)break;else _0x5648c8['push'](_0x5648c8['shift']());}catch(_0x5f29b3){_0x5648c8['push'](_0x5648c8['shift']());}}}(a178_0x516e,0x44fa4));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';function a178_0x393b(_0x27f72c,_0x282bc2){_0x27f72c=_0x27f72c-0x1eb;const _0x516e81=a178_0x516e();let _0x393b55=_0x516e81[_0x27f72c];return _0x393b55;}export const notificationConfigList={'service':a178_0x5b708f(0x200),'command':a178_0x5b708f(0x1f2),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a178_0x5b708f(0x1fb),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a178_0x5b708f(0x1ff),'type':a178_0x5b708f(0x201),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':a178_0x5b708f(0x1f3),'type':a178_0x5b708f(0x1ef),'default':![],'description':a178_0x5b708f(0x1ee)}],async 'validate'(_0x29262e){const _0x53112e=a178_0x5b708f;if(_0x29262e[_0x53112e(0x1f8)](_0x53112e(0x1f3))&&_0x29262e[_0x53112e(0x1f1)](_0x53112e(0x1ff))[_0x53112e(0x1f4)]())throw CliErrors[_0x53112e(0x1f6)](_0x53112e(0x204),'Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.');if(_0x29262e['bool'](_0x53112e(0x1f3)))return;readNotificationChannelType(_0x29262e);},async 'execute'(_0x3f4666){const _0x1aa8b7=a178_0x5b708f;if(_0x3f4666['bool'](_0x1aa8b7(0x1f3))){const _0x33ddb6=await Promise[_0x1aa8b7(0x1f3)](NOTIFICATION_CHANNEL_TYPES[_0x1aa8b7(0x1ec)](_0x41ce07=>listNotificationChannelConfigs(_0x3f4666[_0x1aa8b7(0x1fe)],_0x41ce07))),_0x8eb712=_0x33ddb6[_0x1aa8b7(0x1f5)]()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3f4666[_0x1aa8b7(0x1fe)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x8eb712[_0x1aa8b7(0x1ed)],'configs':_0x8eb712},'message':_0x1aa8b7(0x202)+_0x8eb712[_0x1aa8b7(0x1ed)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x32639a=readNotificationChannelType(_0x3f4666),_0x43fc64=await listNotificationChannelConfigs(_0x3f4666[_0x1aa8b7(0x1fe)],_0x32639a),_0x2a9d1f=_0x43fc64[_0x1aa8b7(0x1ec)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3f4666[_0x1aa8b7(0x1fe)],'channelType':_0x32639a,'count':_0x2a9d1f[_0x1aa8b7(0x1ed)],'configs':_0x2a9d1f},'message':_0x1aa8b7(0x202)+_0x2a9d1f['length']+'\x20'+_0x32639a+'\x20notification\x20config(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a179_0x40db9a=a179_0x5204;function a179_0x5204(_0x54fbbc,_0x314740){_0x54fbbc=_0x54fbbc-0x85;const _0x94ffee=a179_0x94ff();let _0x5204f1=_0x94ffee[_0x54fbbc];return _0x5204f1;}(function(_0x7897cb,_0x1fc11a){const _0x1bacf1=a179_0x5204,_0x57d550=_0x7897cb();while(!![]){try{const _0x7ef2dc=parseInt(_0x1bacf1(0x8e))/0x1*(-parseInt(_0x1bacf1(0x9c))/0x2)+parseInt(_0x1bacf1(0xa4))/0x3+-parseInt(_0x1bacf1(0x92))/0x4*(parseInt(_0x1bacf1(0x8b))/0x5)+-parseInt(_0x1bacf1(0xa9))/0x6+parseInt(_0x1bacf1(0x96))/0x7*(parseInt(_0x1bacf1(0xa2))/0x8)+-parseInt(_0x1bacf1(0x9d))/0x9*(parseInt(_0x1bacf1(0x97))/0xa)+-parseInt(_0x1bacf1(0xa6))/0xb*(-parseInt(_0x1bacf1(0x8c))/0xc);if(_0x7ef2dc===_0x1fc11a)break;else _0x57d550['push'](_0x57d550['shift']());}catch(_0x98f10){_0x57d550['push'](_0x57d550['shift']());}}}(a179_0x94ff,0x79972));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a179_0x40db9a(0x9b);async function prepareUpdate(_0x38c2e3){const _0x2ea40b=a179_0x40db9a,_0x13b676=readNotificationId(_0x38c2e3),_0x3ed932=await readNotificationDocument(_0x38c2e3,'update'),_0x2e5b39=await requireExactNotificationConfig(_0x38c2e3[_0x2ea40b(0xa5)],_0x13b676,_0x2ea40b(0x98));return{'id':_0x13b676,'patch':_0x3ed932,'before':_0x2e5b39,'payload':mergeUpdateInput(_0x2e5b39,_0x3ed932),'planned':plannedUpdateProjection(_0x2e5b39,_0x3ed932)};}export const notificationConfigUpdate={'service':a179_0x40db9a(0x94),'command':a179_0x40db9a(0xaa),'description':a179_0x40db9a(0x90),'risk':a179_0x40db9a(0xa8),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x393b1a){readNotificationId(_0x393b1a),assertSingleNotificationSource(_0x393b1a),requireNotificationExplicitYes(_0x393b1a);},async 'dryRun'(_0xea34b1){const _0x383137=a179_0x40db9a,_0x100c66=await prepareUpdate(_0xea34b1),_0x59b9f7=notificationLookupCommand(_0xea34b1[_0x383137(0xa5)],_0x100c66[_0x383137(0x87)][_0x383137(0xac)]);return asDryRunResult({'operation':_0x383137(0x98),'selector':notificationSelector(_0x100c66['before']),'before':projectNotificationConfig(_0x100c66[_0x383137(0x87)]),'after':_0x100c66[_0x383137(0xa7)],'dryRun':!![],'backend':{'method':_0x383137(0xa0),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x383137(0xa7),'lookupCommand':_0x59b9f7}},{'method':_0x383137(0xa0),'url':UPDATE_PATH});},async 'execute'(_0x451a6e){const _0x1d67d4=a179_0x40db9a;requireNotificationExplicitYes(_0x451a6e);const _0x2ce655=await prepareUpdate(_0x451a6e),_0x274759=notificationLookupCommand(_0x451a6e[_0x1d67d4(0xa5)],_0x2ce655[_0x1d67d4(0x87)]['channelType']);let _0x230963=![];try{await updateNotificationChannelConfig(_0x2ce655[_0x1d67d4(0x89)]);}catch(_0x4fddc7){if(!isPlatformTransportFailure(_0x4fddc7))throw safeApiFailure(_0x1d67d4(0x98),_0x1d67d4(0x9e),_0x1d67d4(0xa1)+_0x2ce655['id']+_0x1d67d4(0xab)+_0x274759+_0x1d67d4(0x8f));_0x230963=!![];}let _0x4ee8b3;try{const _0xe935fb=await getNotificationChannelConfig(_0x2ce655['id'],_0x451a6e[_0x1d67d4(0xa5)]);_0x4ee8b3=normalizeExactNotificationConfig(_0xe935fb,_0x2ce655['id'],_0x451a6e[_0x1d67d4(0xa5)]);}catch{throw notificationError(_0x230963?_0x1d67d4(0x93):'notification_config_update_verification_unavailable','Notification\x20config\x20'+_0x2ce655['id']+_0x1d67d4(0x86),_0x1d67d4(0x95)+_0x2ce655['id']+_0x1d67d4(0x88)+_0x274759+_0x1d67d4(0x99));}const _0x4cf534=requestedSafeFieldsMatch(_0x2ce655[_0x1d67d4(0x87)],_0x4ee8b3,_0x2ce655[_0x1d67d4(0x91)]);if(!_0x4cf534[_0x1d67d4(0x85)]||_0x230963&&!_0x4cf534['provesChange'])throw notificationError(_0x230963?_0x1d67d4(0x93):_0x1d67d4(0xa3),_0x1d67d4(0x8a)+_0x2ce655['id']+_0x1d67d4(0x8d),_0x1d67d4(0x95)+_0x2ce655['id']+_0x1d67d4(0x88)+_0x274759+_0x1d67d4(0x99));const _0x1e03eb=_0x230963?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x1d67d4(0x98),'selector':notificationSelector(_0x4ee8b3),'before':projectNotificationConfig(_0x2ce655['before']),'after':projectNotificationConfig(_0x4ee8b3),'dryRun':![],'backend':{'method':_0x1d67d4(0xa0),'path':UPDATE_PATH},'warnings':_0x1e03eb,'verification':{'status':_0x1d67d4(0x9a),'recoveredAfterUnknownResponse':_0x230963,'verifiedFields':_0x4cf534['verifiedFields'],'lookupCommand':_0x274759}},'message':_0x1d67d4(0x9f)+_0x4ee8b3['id']};}};function a179_0x94ff(){const _0x2fafff=['\x20via\x20','payload','Notification\x20config\x20','146415sPOWUF','131184uUtTtc','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','1cgndAb',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','patch','24ZOCOLf','notification_config_update_outcome_unknown','notification','Inspect\x20with\x20--id\x20','4429852TyccjS','317270FCQIXS','update',';\x20do\x20not\x20resubmit\x20automatically.','verified','/notification/channel-config/update','1493658NYjmPU','243khhZBm','mutation','Updated\x20notification\x20config\x20','POST','Inspect\x20ID\x20','8WYKVtH','notification_config_update_verification_failed','254232bNJHQg','appCode','2101gMBrst','planned','high-risk-write','3170412lgQYiH','config-update','\x20with\x20','channelType','allMatch','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','before'];a179_0x94ff=function(){return _0x2fafff;};return a179_0x94ff();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x349402,_0x43e662){const _0x47815b=a180_0x8d08,_0x4ee278=_0x349402();while(!![]){try{const _0x10373f=-parseInt(_0x47815b(0x108))/0x1*(-parseInt(_0x47815b(0x103))/0x2)+-parseInt(_0x47815b(0x107))/0x3+-parseInt(_0x47815b(0xff))/0x4*(parseInt(_0x47815b(0x10a))/0x5)+parseInt(_0x47815b(0x102))/0x6*(parseInt(_0x47815b(0x109))/0x7)+parseInt(_0x47815b(0x100))/0x8*(-parseInt(_0x47815b(0x105))/0x9)+parseInt(_0x47815b(0x106))/0xa+-parseInt(_0x47815b(0x101))/0xb*(parseInt(_0x47815b(0x104))/0xc);if(_0x10373f===_0x43e662)break;else _0x4ee278['push'](_0x4ee278['shift']());}catch(_0x2d8a07){_0x4ee278['push'](_0x4ee278['shift']());}}}(a180_0x1f4a,0x7e9df));function a180_0x1f4a(){const _0x42b1a2=['65kilJTi','183364ddzavv','24phXXpK','66zhydGV','12QlFgKL','248ywzzaF','98160xfqJWH','427842qygifv','4537850FmJFCo','1784991WpHxjd','6803MTySAv','2113615UMrYGi'];a180_0x1f4a=function(){return _0x42b1a2;};return a180_0x1f4a();}function a180_0x8d08(_0xe9d8c,_0x589f8e){_0xe9d8c=_0xe9d8c-0xff;const _0x1f4ae6=a180_0x1f4a();let _0x8d08b5=_0x1f4ae6[_0xe9d8c];return _0x8d08b5;}import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|