@lovrabet/rabetbase-cli 2.5.4-beta.1 → 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 +4 -3
- 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.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.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.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 +2 -2
- package/skills/rabetbase/guides/sql-creation-workflow.md +1 -1
- package/skills/rabetbase/guides/sql-mybatis.md +12 -8
- package/skills/rabetbase/references/rabetbase-config.md +6 -4
- package/skills/rabetbase/references/rabetbase-init.md +7 -5
- package/skills/rabetbase/references/rabetbase-kb.md +8 -6
- package/skills/rabetbase.manifest.json +3 -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
|
-
|
|
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(_0x497ad2,_0x257fb1){const _0x3ba66e=a172_0x1579,_0x1d4353=_0x497ad2();while(!![]){try{const _0x59fed4=parseInt(_0x3ba66e(0x84))/0x1*(-parseInt(_0x3ba66e(0x9e))/0x2)+parseInt(_0x3ba66e(0x9d))/0x3+-parseInt(_0x3ba66e(0x7d))/0x4+-parseInt(_0x3ba66e(0xa4))/0x5+parseInt(_0x3ba66e(0x9a))/0x6*(parseInt(_0x3ba66e(0x77))/0x7)+parseInt(_0x3ba66e(0x7b))/0x8*(-parseInt(_0x3ba66e(0x98))/0x9)+parseInt(_0x3ba66e(0xb2))/0xa*(parseInt(_0x3ba66e(0x95))/0xb);if(_0x59fed4===_0x257fb1)break;else _0x1d4353['push'](_0x1d4353['shift']());}catch(_0xd72253){_0x1d4353['push'](_0x1d4353['shift']());}}}(a172_0x56a8,0x403c4));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a172_0x56a8(){const _0xb46b39=['resources','732tnRZIN','.\x20Allowed\x20values:\x20replace,\x20patch','field','1108323FxaPMq','293690hWhugZ','has','all','isArray','patch','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','1574610eMWYoY','Invalid\x20--mode:\x20','Start\x20non-interactive\x20menu\x20asset\x20update','trim','replace','.css','.js','map','CSS\x20URL\x20is\x20unreachable:\x20','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','\x22\x20(','length','join','parse','2690RGWWyJ','--params.','menuIds','unshift','allSettled','Menu\x20asset\x20update\x20completed','jsUrl','filter','menu\x20asset-update\x20cannot\x20patch\x20','loadScriptMode','JS\x20URL\x20is\x20unreachable:\x20','label','Invalid\x20--params:\x20','toLowerCase','15911fVmJnt','info','cssUrl','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','324072bJjHou','push','485280JHxEXV','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','after','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','string','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','force','3dMgInZ','endsWith','split','status','fulfilled','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','paths','selection','menu-asset-update','some','dryRun','\x20existing\x20CSS\x20resources\x20for\x20\x22',').\x20','path','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','setLogPath','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','25135uXvykr','extend','object','27KNKxpI'];a172_0x56a8=function(){return _0xb46b39;};return a172_0x56a8();}import{logger}from'../../../utils/logger.js';function validateParams(_0x3f9fbb){const _0x10740b=a172_0x1579,_0x2eb057=[];return _0x3f9fbb[_0x10740b(0x6f)]&&!isValidJsHttpsUrl(_0x3f9fbb['jsUrl'])&&_0x2eb057['push']({'field':_0x10740b(0x6f),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x3f9fbb[_0x10740b(0x79)]&&!isValidCssHttpsUrl(_0x3f9fbb[_0x10740b(0x79)])&&_0x2eb057[_0x10740b(0x7c)]({'field':_0x10740b(0x79),'message':_0x10740b(0x92)}),_0x2eb057;}export async function runMenuUpdateCore(_0x3a098e,_0x5066d8,_0x3ddebd,_0x44238e={}){const _0x2185e8=a172_0x1579,_0x2cef67=parseUpdateParamsFlag(_0x3ddebd),_0x1f52c8=normalizeMode(_0x44238e['mode']);validateSelection(_0x44238e[_0x2185e8(0x8b)]);const _0xc2675b=[];if(_0x2cef67[_0x2185e8(0x6f)])_0xc2675b[_0x2185e8(0x7c)](_0x2cef67['jsUrl']);if(_0x2cef67[_0x2185e8(0x79)])_0xc2675b[_0x2185e8(0x7c)](_0x2cef67[_0x2185e8(0x79)]);const _0x5e9e66=validateParams(_0x2cef67);if(_0x5e9e66['length']>0x0){const _0x4727a0=_0x5e9e66[_0x2185e8(0xab)](_0x7d3f13=>_0x2185e8(0xb3)+_0x7d3f13[_0x2185e8(0x9c)]+':\x20'+_0x7d3f13['message'])[_0x2185e8(0xb0)](';\x20');throw new Error(_0x2185e8(0x75)+_0x4727a0);}if(_0xc2675b[_0x2185e8(0xaf)]===0x0)throw new Error(_0x2185e8(0x7e)+_0x2185e8(0x89));logger[_0x2185e8(0x93)](process['cwd']()),logger[_0x2185e8(0x78)]('menu-asset-update',_0x2185e8(0xa6),{'appCode':_0x3a098e,'jsUrl':_0x2cef67[_0x2185e8(0x6f)],'cssUrl':_0x2cef67[_0x2185e8(0x79)],'mode':_0x1f52c8,'dryRun':_0x44238e['dryRun']===!![]});if(_0x2cef67[_0x2185e8(0x6f)]){const _0x3020a0=await isUrlReachable(_0x2cef67[_0x2185e8(0x6f)]);if(!_0x3020a0)throw new Error(_0x2185e8(0x73)+_0x2cef67[_0x2185e8(0x6f)]);}if(_0x2cef67[_0x2185e8(0x79)]){const _0x389c64=await isUrlReachable(_0x2cef67['cssUrl']);if(!_0x389c64)throw new Error(_0x2185e8(0xac)+_0x2cef67[_0x2185e8(0x79)]);}const _0xf04e7e=await getOnlineMenuList(_0x3a098e,_0x5066d8),_0x362480=_0xf04e7e[_0x2185e8(0x70)](_0x46a210=>_0x46a210[_0x2185e8(0x99)][_0x2185e8(0xaf)]>0x0),_0x2ceb9b=selectMenusForUpdate(_0x362480,_0x44238e[_0x2185e8(0x8b)]);if(_0x2ceb9b[_0x2185e8(0xaf)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x44238e[_0x2185e8(0x8e)]===!![]};const _0x4e9b7a=_0x2ceb9b[_0x2185e8(0xab)](_0x9f62b6=>buildMenuUpdateDiff(_0x9f62b6,_0x2cef67,_0x1f52c8,_0x44238e[_0x2185e8(0x83)]===!![],_0x44238e[_0x2185e8(0x72)]));if(_0x44238e[_0x2185e8(0x8e)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x4e9b7a};const _0x54791c=await Promise[_0x2185e8(0x6d)](_0x2ceb9b['map']((_0x5c0285,_0x3d0630)=>updateMenuCdnUrl(_0x3a098e,_0x5066d8,{'id':_0x5c0285['id'],'label':_0x5c0285['label'],'path':_0x5c0285[_0x2185e8(0x91)],'resources':_0x4e9b7a[_0x3d0630][_0x2185e8(0x7f)][_0x2185e8(0x99)],'extend':_0x5c0285[_0x2185e8(0x96)]??null,'loadScriptMode':_0x44238e[_0x2185e8(0x72)]}))),_0x1edd78=_0x54791c[_0x2185e8(0x70)](_0x510994=>_0x510994[_0x2185e8(0x87)]===_0x2185e8(0x88))[_0x2185e8(0xab)](_0x2c0ad7=>_0x2c0ad7['value']),_0x2c4b7a=_0x54791c[_0x2185e8(0x70)](_0x1dfa52=>_0x1dfa52[_0x2185e8(0x87)]==='rejected')[_0x2185e8(0xaf)];return logger['info'](_0x2185e8(0x8c),_0x2185e8(0x6e),{'count':_0x2ceb9b['length'],'resources':_0xc2675b}),{'updated':_0x1edd78[_0x2185e8(0xaf)],'failed':_0x2c4b7a,'skipped':![],'menus':_0x1edd78};}function validateSelection(_0x1a55d6){const _0x37ca73=a172_0x1579;if(!_0x1a55d6)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x1a55d6[_0x37ca73(0xa0)]&&(_0x1a55d6[_0x37ca73(0x6b)][_0x37ca73(0xaf)]>0x0||_0x1a55d6[_0x37ca73(0x8a)][_0x37ca73(0xaf)]>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x1a55d6[_0x37ca73(0xa0)]&&_0x1a55d6[_0x37ca73(0x6b)]['length']===0x0&&_0x1a55d6[_0x37ca73(0x8a)][_0x37ca73(0xaf)]===0x0)throw new Error(_0x37ca73(0x94));}export function selectMenusForUpdate(_0x5985bd,_0x3b9e5b){const _0x59b6cf=a172_0x1579;validateSelection(_0x3b9e5b);if(_0x3b9e5b['all'])return _0x5985bd;const _0x1d1d37=new Set(_0x5985bd[_0x59b6cf(0xab)](_0x5b0fb8=>_0x5b0fb8['id'])),_0xa0dab3=new Set(_0x5985bd['map'](_0x1d927b=>_0x1d927b[_0x59b6cf(0x91)])),_0x1dd401=_0x3b9e5b['menuIds'][_0x59b6cf(0x70)](_0x149d44=>!_0x1d1d37[_0x59b6cf(0x9f)](_0x149d44)),_0x22b1eb=_0x3b9e5b[_0x59b6cf(0x8a)][_0x59b6cf(0x70)](_0x2cab34=>!_0xa0dab3[_0x59b6cf(0x9f)](_0x2cab34));if(_0x1dd401[_0x59b6cf(0xaf)]>0x0||_0x22b1eb['length']>0x0){const _0x99e202=[..._0x1dd401[_0x59b6cf(0xab)](_0x1f6b70=>String(_0x1f6b70)),..._0x22b1eb][_0x59b6cf(0xb0)](',\x20');throw new Error(_0x59b6cf(0x82)+_0x99e202);}const _0xe8a21b=new Set(_0x3b9e5b[_0x59b6cf(0x6b)]),_0x26364b=new Set(_0x3b9e5b[_0x59b6cf(0x8a)]);return _0x5985bd[_0x59b6cf(0x70)](_0x5e5b8e=>_0xe8a21b[_0x59b6cf(0x9f)](_0x5e5b8e['id'])||_0x26364b[_0x59b6cf(0x9f)](_0x5e5b8e['path']));}function normalizeMode(_0x1a8480){const _0x465626=a172_0x1579;if(!_0x1a8480)return'patch';if(_0x1a8480===_0x465626(0xa8)||_0x1a8480===_0x465626(0xa2))return _0x1a8480;throw new Error(_0x465626(0xa5)+_0x1a8480+_0x465626(0x9b));}function buildMenuUpdateDiff(_0x33e83b,_0x18c40a,_0x588c9f,_0x3dd320,_0x3e749b){const _0x56aeda=a172_0x1579,_0x12aa12=[..._0x33e83b['resources']];_0x588c9f===_0x56aeda(0xa2)&&assertUnambiguousPatchResources(_0x33e83b,_0x12aa12,_0x18c40a);const _0x5712e1=_0x588c9f===_0x56aeda(0xa2)?patchResources(_0x12aa12,_0x18c40a):replaceResources(_0x18c40a),_0x30395c=[],_0x387819=_0x12aa12['some'](isJsResource),_0x118ed0=_0x5712e1[_0x56aeda(0x8d)](isJsResource);if(_0x387819&&!_0x118ed0){const _0x6be26=_0x56aeda(0xad)+_0x33e83b[_0x56aeda(0x74)]+_0x56aeda(0xae)+_0x33e83b[_0x56aeda(0x91)]+_0x56aeda(0x90)+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x3dd320)throw new Error(_0x6be26);_0x30395c[_0x56aeda(0x7c)](_0x6be26);}const _0x3eba63=_0x12aa12[_0x56aeda(0x8d)](isCssResource),_0x99fe9a=_0x5712e1[_0x56aeda(0x8d)](isCssResource);_0x3eba63&&!_0x99fe9a&&_0x30395c[_0x56aeda(0x7c)](_0x56aeda(0x80)+_0x33e83b[_0x56aeda(0x74)]+_0x56aeda(0xae)+_0x33e83b['path']+').');const _0x3af63f=typeof _0x33e83b[_0x56aeda(0x96)]?.[_0x56aeda(0x72)]===_0x56aeda(0x81)?_0x33e83b['extend'][_0x56aeda(0x72)]:null,_0x10e67b=_0x3e749b?{'loadScriptMode':_0x3af63f}:{},_0x7f0cbb=_0x3e749b?{'loadScriptMode':_0x3e749b}:{};return{'id':_0x33e83b['id'],'label':_0x33e83b['label'],'path':_0x33e83b['path'],'mode':_0x588c9f,'before':{'resources':_0x12aa12,..._0x10e67b},'after':{'resources':_0x5712e1,..._0x7f0cbb},'warnings':_0x30395c};}function replaceResources(_0x4d7c25){const _0x5eb5ba=a172_0x1579;return[_0x4d7c25['jsUrl'],_0x4d7c25[_0x5eb5ba(0x79)]][_0x5eb5ba(0x70)](_0x318b33=>!!_0x318b33);}function assertUnambiguousPatchResources(_0x22853c,_0x45636d,_0x40f3d9){const _0x236ed2=a172_0x1579,_0x4281f3=_0x45636d[_0x236ed2(0x70)](isJsResource)[_0x236ed2(0xaf)];if(_0x40f3d9[_0x236ed2(0x6f)]&&_0x4281f3>0x1)throw new Error(_0x236ed2(0x71)+_0x4281f3+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x22853c[_0x236ed2(0x74)]+_0x236ed2(0xae)+_0x22853c[_0x236ed2(0x91)]+')\x20'+_0x236ed2(0xa3));const _0x8fdd5b=_0x45636d['filter'](isCssResource)[_0x236ed2(0xaf)];if(_0x40f3d9[_0x236ed2(0x79)]&&_0x8fdd5b>0x1)throw new Error(_0x236ed2(0x71)+_0x8fdd5b+_0x236ed2(0x8f)+_0x22853c[_0x236ed2(0x74)]+_0x236ed2(0xae)+_0x22853c[_0x236ed2(0x91)]+')\x20'+_0x236ed2(0x7a));}function patchResources(_0xf291e5,_0x1e8182){const _0x434fea=a172_0x1579;let _0x653662=![],_0x168274=![];const _0x5c857b=[];for(const _0x556e30 of _0xf291e5){if(isJsResource(_0x556e30)){if(_0x1e8182['jsUrl']&&!_0x653662)_0x5c857b['push'](_0x1e8182[_0x434fea(0x6f)]),_0x653662=!![];else!_0x1e8182[_0x434fea(0x6f)]&&_0x5c857b[_0x434fea(0x7c)](_0x556e30);continue;}if(isCssResource(_0x556e30)){if(_0x1e8182[_0x434fea(0x79)]&&!_0x168274)_0x5c857b[_0x434fea(0x7c)](_0x1e8182['cssUrl']),_0x168274=!![];else!_0x1e8182[_0x434fea(0x79)]&&_0x5c857b[_0x434fea(0x7c)](_0x556e30);continue;}_0x5c857b['push'](_0x556e30);}return _0x1e8182['jsUrl']&&!_0x653662&&_0x5c857b[_0x434fea(0x6c)](_0x1e8182['jsUrl']),_0x1e8182['cssUrl']&&!_0x168274&&_0x5c857b[_0x434fea(0x7c)](_0x1e8182[_0x434fea(0x79)]),_0x5c857b;}function a172_0x1579(_0x29e782,_0x1d78ea){_0x29e782=_0x29e782-0x6b;const _0x56a87c=a172_0x56a8();let _0x157997=_0x56a87c[_0x29e782];return _0x157997;}function isJsResource(_0x1cae6c){const _0x12e9e6=a172_0x1579;return stripQuery(_0x1cae6c)[_0x12e9e6(0x76)]()[_0x12e9e6(0x85)](_0x12e9e6(0xaa));}function isCssResource(_0x49f1e7){const _0x379854=a172_0x1579;return stripQuery(_0x49f1e7)[_0x379854(0x76)]()[_0x379854(0x85)](_0x379854(0xa9));}function stripQuery(_0x1bb5ea){const _0x335a20=a172_0x1579;return _0x1bb5ea[_0x335a20(0x86)]('?')[0x0]??_0x1bb5ea;}function parseUpdateParamsFlag(_0x1d90a8){const _0x55481b=a172_0x1579;if(!_0x1d90a8||typeof _0x1d90a8!==_0x55481b(0x81))return{};try{const _0x4ed2f0=JSON[_0x55481b(0xb1)](_0x1d90a8);if(typeof _0x4ed2f0!==_0x55481b(0x97)||_0x4ed2f0===null||Array[_0x55481b(0xa1)](_0x4ed2f0))return{};return{'jsUrl':typeof _0x4ed2f0[_0x55481b(0x6f)]===_0x55481b(0x81)?_0x4ed2f0[_0x55481b(0x6f)][_0x55481b(0xa7)]():undefined,'cssUrl':typeof _0x4ed2f0['cssUrl']===_0x55481b(0x81)?_0x4ed2f0[_0x55481b(0x79)][_0x55481b(0xa7)]():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_0x3e28(){const _0x30a676=['\x20skipped,\x20','plan','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','\x20menu(s);\x20skipped\x20','parentId','\x20updated,\x20','childrenCount','isSafeInteger','84heqPvm','menu-ids','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','menu_selector_not_found','update\x20visibility\x20for','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','expect-visible','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','2448550FBCBpO','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','Menu\x20','menuIds','289zsJxTh','get','label','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','body','10dPmCNY','expectedCount','type','string','push','\x20failed.','sort','3xYffDn','6923213ZoTmks','2090064msQojC','update-recovery','Response\x20was\x20lost\x20and\x20menu\x20','url','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','path','verification','datasetCode','childrenIds','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','\x20unchanged\x20menu(s).','visible','Would\x20update\x20visibility\x20for\x20','7318EuAUID','rabetbase\x20menu\x20list\x20--format\x20compress','menu_state_drift','hash','Final\x20menu\x20visibility\x20readback\x20failed.','boolean','\x20visibility\x20update\x20could\x20not\x20be\x20verified','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','paths','modelType','beforeById','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','before','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','byId','num','message','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','menu','1543628pWBOoa','updated','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','failed','appCode','pageType','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','menu_expected_count_mismatch','Requested\x20menu\x20visibility','set','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','depth','resourcesValid','update-menu-visibility','high-risk-write','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','map','\x20menu(s);\x20skip\x20','some','POST','update\x20menu\x20visibility','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','7QZWkSS','cookie','datasetId','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','verify\x20menu\x20visibility\x20update','flagMissing','\x20menu(s),\x20expected\x20','18wQMFhz','visibility-update','split','validation','resources','/smartapi/menu/update','Updated\x20visibility\x20for\x20','requestedVisible','5077989tgnMgv','length','Menu\x20path\x20selector\x20not\x20found:\x20','update','pageId','\x20changed\x20unexpectedly.','Menu\x20visibility\x20update\x20completed:\x20','menu_verification_failed','Response\x20was\x20lost\x20for\x20menu\x20','stringify','number','rawFlags','plannedActions','join','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','warnings','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','2084295mlBRDS','code','filter','trim','targets','expected-count','str','menu_selector_ambiguous','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','isArray','menus','expectVisible'];a175_0x3e28=function(){return _0x30a676;};return a175_0x3e28();}const a175_0x58a28d=a175_0x1e2c;(function(_0x41b13b,_0x2f72cc){const _0x5d5b5a=a175_0x1e2c,_0x4d662c=_0x41b13b();while(!![]){try{const _0x110549=parseInt(_0x5d5b5a(0x142))/0x1*(parseInt(_0x5d5b5a(0x15d))/0x2)+parseInt(_0x5d5b5a(0x14e))/0x3*(-parseInt(_0x5d5b5a(0x170))/0x4)+parseInt(_0x5d5b5a(0x121))/0x5*(parseInt(_0x5d5b5a(0x18d))/0x6)+parseInt(_0x5d5b5a(0x186))/0x7*(parseInt(_0x5d5b5a(0x150))/0x8)+-parseInt(_0x5d5b5a(0x195))/0x9*(parseInt(_0x5d5b5a(0x147))/0xa)+parseInt(_0x5d5b5a(0x14f))/0xb+parseInt(_0x5d5b5a(0x135))/0xc*(-parseInt(_0x5d5b5a(0x13d))/0xd);if(_0x110549===_0x2f72cc)break;else _0x4d662c['push'](_0x4d662c['shift']());}catch(_0x1f7c55){_0x4d662c['push'](_0x4d662c['shift']());}}}(a175_0x3e28,0xe312b));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_0x58a28d(0x183),'path':a175_0x58a28d(0x192)}];export const menuVisibilityUpdate={'service':a175_0x58a28d(0x16f),'command':a175_0x58a28d(0x18e),'description':a175_0x58a28d(0x16a),'risk':a175_0x58a28d(0x17e),'structuredErrors':!![],'flags':[{'name':a175_0x58a28d(0x136),'type':a175_0x58a28d(0x14a),'description':a175_0x58a28d(0x154)},{'name':a175_0x58a28d(0x165),'type':'string','description':a175_0x58a28d(0x185)},{'name':'visible','type':'boolean','required':!![],'description':a175_0x58a28d(0x178)},{'name':a175_0x58a28d(0x13b),'type':a175_0x58a28d(0x162),'description':a175_0x58a28d(0x17f)},{'name':'expected-count','type':a175_0x58a28d(0x19f),'description':a175_0x58a28d(0x1a3)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4b1a35){parseInput(_0x4b1a35),requireExplicitYes(_0x4b1a35);},async 'dryRun'(_0x7a011f){const _0x4262a8=a175_0x58a28d,_0x40f102=await buildPlan(_0x7a011f,!![]),_0x16b203=_0x40f102[_0x4262a8(0x12e)]['plannedActions']?.[_0x4262a8(0x196)]??0x0,_0x1c0401=_0x40f102[_0x4262a8(0x12e)][_0x4262a8(0x125)]['length']-_0x16b203;return menuDryRunResult(_0x40f102[_0x4262a8(0x12e)],{'method':_0x4262a8(0x183),'url':_0x4262a8(0x192),'body':{'updates':_0x40f102['plan'][_0x4262a8(0x1a1)]?.[_0x4262a8(0x180)](_0xa1ebbd=>_0xa1ebbd[_0x4262a8(0x146)])??[]},'description':_0x4262a8(0x15c)+_0x16b203+_0x4262a8(0x181)+_0x1c0401+_0x4262a8(0x15a)});},async 'execute'(_0x6c659e){const _0x20bd0e=a175_0x58a28d;requireExplicitYes(_0x6c659e);const _0x1302ba=await buildPlan(_0x6c659e,![]);await recheckMutationSnapshot(_0x6c659e,_0x1302ba[_0x20bd0e(0x12e)],_0x20bd0e(0x184));const _0x4843ee=[],_0x1f67ca=[],_0x1ff524=[];for(const _0x50c31b of _0x1302ba['plan'][_0x20bd0e(0x125)]){if(_0x50c31b[_0x20bd0e(0x169)][_0x20bd0e(0x15b)]===_0x1302ba[_0x20bd0e(0x12e)]['requestedVisible']){_0x4843ee[_0x20bd0e(0x14b)]({'id':_0x50c31b['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x6c659e[_0x20bd0e(0x174)],_0x6c659e['cookie'],{'id':_0x50c31b['id'],'visible':_0x1302ba[_0x20bd0e(0x12e)][_0x20bd0e(0x194)]}),_0x4843ee[_0x20bd0e(0x14b)]({'id':_0x50c31b['id'],'updated':!![],'skipped':![]});}catch(_0x2fe774){const _0x4ed4ad=mapMenuApiError(_0x2fe774,_0x20bd0e(0x139),_0x50c31b['id']);if(isMenuResponseLoss(_0x2fe774)&&_0x4ed4ad[_0x20bd0e(0x122)]!=='menu_permission_denied'){_0x1ff524[_0x20bd0e(0x14b)](_0x50c31b['id']);continue;}_0x1f67ca[_0x20bd0e(0x14b)]({'id':_0x50c31b['id'],'stage':_0x20bd0e(0x198),'code':_0x4ed4ad['code'],'message':_0x4ed4ad['message']});}}let _0x3eadb6;try{_0x3eadb6=await fetchMenuSnapshot(_0x6c659e['appCode'],_0x6c659e[_0x20bd0e(0x187)]);}catch(_0x40d975){const _0x379aa8=describeMenuErrorCause(_0x40d975,_0x20bd0e(0x18a)),_0x1a030a=_0x1ff524[_0x20bd0e(0x180)](_0x26f589=>({'id':_0x26f589,'stage':_0x20bd0e(0x151),'code':_0x20bd0e(0x19c),'message':_0x20bd0e(0x19d)+_0x26f589+_0x20bd0e(0x176),'requestedStateConfirmed':![],'recovered':![]})),_0x4ec063={'stage':_0x20bd0e(0x156),'code':_0x20bd0e(0x19c),'message':_0x20bd0e(0x161),'targetIds':_0x1302ba[_0x20bd0e(0x12e)][_0x20bd0e(0x125)][_0x20bd0e(0x180)](_0x3e6f78=>_0x3e6f78['id']),'requestedStateConfirmed':![],..._0x379aa8};throw menuFailure(asVerificationError(_0x40d975,_0x20bd0e(0x13a)),_0x1302ba[_0x20bd0e(0x12e)],{'stage':_0x20bd0e(0x156),'succeeded':_0x4843ee,'failedRecords':[..._0x1f67ca,..._0x1a030a,_0x4ec063],'warnings':[_0x20bd0e(0x164)],'verification':{'status':_0x20bd0e(0x173),'recoveredCount':0x0,'lookupCommand':_0x20bd0e(0x15e)}});}const _0x54600b=[];for(const _0x599572 of _0x4843ee){const _0x125795=Number(_0x599572['id']),_0x5486cd=_0x1302ba[_0x20bd0e(0x167)][_0x20bd0e(0x143)](_0x125795),_0x8c37f7=_0x3eadb6[_0x20bd0e(0x16b)][_0x20bd0e(0x143)](_0x125795);try{verifyVisibilityUpdate(_0x5486cd,_0x8c37f7,_0x1302ba[_0x20bd0e(0x12e)][_0x20bd0e(0x194)]);}catch(_0x28ae24){const _0x334c77=asVerificationError(_0x28ae24,_0x20bd0e(0x140)+_0x125795+_0x20bd0e(0x163));_0x54600b[_0x20bd0e(0x14b)]({'id':_0x125795,'stage':_0x20bd0e(0x156),'code':_0x334c77[_0x20bd0e(0x122)],'message':_0x334c77[_0x20bd0e(0x16d)],'requestedStateConfirmed':![]});}}for(const _0x2d0eea of _0x1ff524){const _0x4eb6cc=_0x1302ba[_0x20bd0e(0x167)][_0x20bd0e(0x143)](_0x2d0eea),_0x5e2a99=_0x3eadb6[_0x20bd0e(0x16b)][_0x20bd0e(0x143)](_0x2d0eea);try{verifyVisibilityUpdate(_0x4eb6cc,_0x5e2a99,_0x1302ba['plan']['requestedVisible']),_0x4843ee[_0x20bd0e(0x14b)]({'id':_0x2d0eea,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x5ad0d3){const _0x5d0ccd=asVerificationError(_0x5ad0d3,_0x20bd0e(0x152)+_0x2d0eea+_0x20bd0e(0x16e));_0x54600b[_0x20bd0e(0x14b)]({'id':_0x2d0eea,'stage':_0x20bd0e(0x151),'code':_0x5d0ccd[_0x20bd0e(0x122)],'message':_0x5d0ccd[_0x20bd0e(0x16d)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x54600b[_0x20bd0e(0x196)]>0x0){const _0x2fc672=_0x54600b['map'](_0x540e25=>Number(_0x540e25['id'])),_0x377b9a=_0x4843ee[_0x20bd0e(0x123)](_0xa0a2af=>_0xa0a2af['recovered']===!![])[_0x20bd0e(0x196)],_0x59cf9b=menuError('menu_verification_failed',_0x20bd0e(0x120)+_0x2fc672[_0x20bd0e(0x1a2)](',\x20')+'.',_0x20bd0e(0x17a));throw menuFailure(_0x59cf9b,_0x1302ba[_0x20bd0e(0x12e)],{'stage':'verification','succeeded':_0x4843ee,'failedRecords':[..._0x1f67ca,..._0x54600b],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x20bd0e(0x173),..._0x2fc672[_0x20bd0e(0x196)]===0x1?{'targetId':_0x2fc672[0x0]}:{'targetIds':_0x2fc672},'recoveredCount':_0x377b9a,'lookupCommand':_0x20bd0e(0x15e)}});}const _0x38310d=_0x4843ee[_0x20bd0e(0x123)](_0x216fa0=>_0x216fa0[_0x20bd0e(0x171)]===!![])[_0x20bd0e(0x196)],_0x3f9a05=_0x4843ee[_0x20bd0e(0x196)]-_0x38310d,_0x5c7260={..._0x1302ba[_0x20bd0e(0x12e)],'succeeded':_0x4843ee,'failed':_0x1f67ca,'warnings':_0x1f67ca[_0x20bd0e(0x196)]>0x0?[..._0x1302ba[_0x20bd0e(0x12e)][_0x20bd0e(0x11f)],_0x20bd0e(0x137)]:_0x1302ba['plan'][_0x20bd0e(0x11f)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x3eadb6[_0x20bd0e(0x160)],'matchesRequestedState':_0x1f67ca[_0x20bd0e(0x196)]===0x0,'recoveredCount':_0x1ff524[_0x20bd0e(0x196)]}};return{'ok':_0x1f67ca[_0x20bd0e(0x196)]===0x0,'data':_0x5c7260,'message':_0x1f67ca[_0x20bd0e(0x196)]===0x0?_0x20bd0e(0x193)+_0x38310d+_0x20bd0e(0x130)+_0x3f9a05+'\x20unchanged\x20menu(s).':_0x20bd0e(0x19b)+_0x38310d+_0x20bd0e(0x132)+_0x3f9a05+_0x20bd0e(0x12d)+_0x1f67ca[_0x20bd0e(0x196)]+_0x20bd0e(0x14c)};}};function parseInput(_0x575371){const _0x2f866a=a175_0x58a28d,_0xcb68a8=parseMenuIds(_0x575371[_0x2f866a(0x127)](_0x2f866a(0x136))),_0x10ab03=parseCsv(_0x575371['str'](_0x2f866a(0x165)));if(_0xcb68a8['length']===0x0&&_0x10ab03['length']===0x0)throw CliErrors[_0x2f866a(0x190)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0xf1d2f6=parseBooleanFlag(_0x575371,'visible',!![]),_0x5c33a3=parseBooleanFlag(_0x575371,_0x2f866a(0x13b),![]);let _0x3d4d60;if(hasFlag(_0x575371,_0x2f866a(0x126))){_0x3d4d60=_0x575371[_0x2f866a(0x16c)](_0x2f866a(0x126));if(!Number[_0x2f866a(0x134)](_0x3d4d60)||_0x3d4d60<0x0)throw CliErrors[_0x2f866a(0x190)]('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0xcb68a8,'paths':_0x10ab03,'visible':_0xf1d2f6,'expectVisible':_0x5c33a3,'expectedCount':_0x3d4d60};}async function buildPlan(_0x478d27,_0x3751b1){const _0x3e1b81=a175_0x58a28d,_0x1ca2ce=parseInput(_0x478d27),_0x1b8e29=await fetchMutationSnapshot(_0x478d27,_0x3e1b81(0x184)),_0x2cddcc=selectTargets(_0x1b8e29[_0x3e1b81(0x12b)],_0x1ca2ce[_0x3e1b81(0x141)],_0x1ca2ce[_0x3e1b81(0x165)]);if(_0x1ca2ce[_0x3e1b81(0x148)]!==undefined&&_0x2cddcc[_0x3e1b81(0x196)]!==_0x1ca2ce['expectedCount'])throw menuError(_0x3e1b81(0x177),'Selected\x20'+_0x2cddcc[_0x3e1b81(0x196)]+_0x3e1b81(0x18c)+_0x1ca2ce[_0x3e1b81(0x148)]+'.',_0x3e1b81(0x13c));if(_0x1ca2ce[_0x3e1b81(0x12c)]!==undefined){const _0x40cfaf=_0x2cddcc[_0x3e1b81(0x123)](_0x2ca852=>_0x2ca852[_0x3e1b81(0x15b)]!==_0x1ca2ce['expectVisible']);if(_0x40cfaf[_0x3e1b81(0x196)]>0x0)throw menuError(_0x3e1b81(0x15f),_0x3e1b81(0x145)+_0x40cfaf[_0x3e1b81(0x180)](_0x50e912=>_0x50e912['id'])['join'](',\x20')+'.',_0x3e1b81(0x159));}const _0x4fea85=_0x2cddcc[_0x3e1b81(0x180)](_0x2ca53b=>({'id':_0x2ca53b['id'],'label':_0x2ca53b[_0x3e1b81(0x144)],'path':_0x2ca53b[_0x3e1b81(0x155)],'before':{'visible':_0x2ca53b[_0x3e1b81(0x15b)]},'after':{'visible':_0x1ca2ce['visible']}})),_0x2a19f7=_0x4fea85[_0x3e1b81(0x123)](_0x1e3bd1=>_0x1e3bd1['before'][_0x3e1b81(0x15b)]!==_0x1ca2ce[_0x3e1b81(0x15b)])[_0x3e1b81(0x180)](_0x4ab062=>({'stage':_0x3e1b81(0x17d),'method':_0x3e1b81(0x183),'path':_0x3e1b81(0x192),'body':{'appCode':_0x478d27['appCode'],'id':_0x4ab062['id'],'visible':_0x1ca2ce[_0x3e1b81(0x15b)]}})),_0x4aa7a2=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x1ca2ce[_0x3e1b81(0x141)],'paths':_0x1ca2ce['paths']},'before':{'menus':_0x2cddcc[_0x3e1b81(0x180)](_0x472f9b=>({'id':_0x472f9b['id'],'path':_0x472f9b[_0x3e1b81(0x155)],'visible':_0x472f9b[_0x3e1b81(0x15b)]}))},'after':{'menus':_0x2cddcc[_0x3e1b81(0x180)](_0x3704fe=>({'id':_0x3704fe['id'],'path':_0x3704fe[_0x3e1b81(0x155)],'visible':_0x1ca2ce[_0x3e1b81(0x15b)]}))},'dryRun':_0x3751b1,'backend':[...BACKEND],'plannedActions':_0x2a19f7,'snapshotHash':_0x1b8e29[_0x3e1b81(0x160)],'warnings':_0x2a19f7['length']===0x0?[_0x3e1b81(0x172)]:[]});return{'plan':{..._0x4aa7a2,'requestedVisible':_0x1ca2ce[_0x3e1b81(0x15b)],'targets':_0x4fea85},'beforeById':new Map(_0x2cddcc['map'](_0x4718bb=>[_0x4718bb['id'],_0x4718bb]))};}function selectTargets(_0x89ff17,_0x2a5798,_0x12fc2d){const _0x538c38=a175_0x58a28d,_0x45cb9a=new Map(_0x89ff17[_0x538c38(0x180)](_0x8bd71=>[_0x8bd71['id'],_0x8bd71])),_0x58e2de=new Map(),_0xd82da4=_0x2a5798[_0x538c38(0x123)](_0x22b214=>!_0x45cb9a['has'](_0x22b214));if(_0xd82da4[_0x538c38(0x196)]>0x0)throw menuError(_0x538c38(0x138),'Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0xd82da4['join'](',\x20')+'.',_0x538c38(0x13e));for(const _0x41f51c of _0x2a5798){_0x58e2de[_0x538c38(0x179)](_0x41f51c,_0x45cb9a[_0x538c38(0x143)](_0x41f51c));}for(const _0x13d3d0 of _0x12fc2d){const _0x2dc6bc=_0x89ff17['filter'](_0x453599=>_0x453599[_0x538c38(0x155)]===_0x13d3d0);if(_0x2dc6bc['length']===0x0)throw menuError(_0x538c38(0x138),_0x538c38(0x197)+JSON[_0x538c38(0x19e)](_0x13d3d0)+'.',_0x538c38(0x168));if(_0x2dc6bc['length']>0x1)throw menuError(_0x538c38(0x128),_0x538c38(0x13f)+JSON[_0x538c38(0x19e)](_0x13d3d0)+'.',_0x538c38(0x189)+_0x2dc6bc[_0x538c38(0x180)](_0x33ebd6=>_0x33ebd6['id'])[_0x538c38(0x1a2)](',\x20')+'.');const _0xe6b38b=_0x2dc6bc[0x0];_0x58e2de[_0x538c38(0x179)](_0xe6b38b['id'],_0xe6b38b);}return[..._0x58e2de['values']()];}function parseMenuIds(_0xe3fbce){const _0x5e9fb8=a175_0x58a28d,_0x1531a3=parseCsv(_0xe3fbce),_0x333977=_0x1531a3[_0x5e9fb8(0x180)](Number);if(_0x333977[_0x5e9fb8(0x182)](_0x3387de=>!Number[_0x5e9fb8(0x134)](_0x3387de)||_0x3387de<=0x0))throw CliErrors[_0x5e9fb8(0x190)](_0x5e9fb8(0x12f));return[...new Set(_0x333977)];}function parseCsv(_0x3050ae){const _0x39a1d9=a175_0x58a28d;return[...new Set(_0x3050ae[_0x39a1d9(0x18f)](',')[_0x39a1d9(0x180)](_0x9676d9=>_0x9676d9[_0x39a1d9(0x124)]())[_0x39a1d9(0x123)](Boolean))];}function parseBooleanFlag(_0xa0fa65,_0xa8e160,_0x5c376f){const _0xbbd29e=a175_0x58a28d;if(!hasFlag(_0xa0fa65,_0xa8e160)){if(_0x5c376f)throw CliErrors[_0xbbd29e(0x18b)](_0xa8e160);return undefined;}const _0x352a3b=_0xa0fa65[_0xbbd29e(0x1a0)][_0xa8e160];if(_0x352a3b===!![]||_0x352a3b===![])return _0x352a3b;if(_0x352a3b==='true')return!![];if(_0x352a3b==='false')return![];throw CliErrors['validation']('--'+_0xa8e160+'\x20must\x20be\x20true\x20or\x20false.');}function a175_0x1e2c(_0x5bb3d4,_0xbb42ec){_0x5bb3d4=_0x5bb3d4-0x11f;const _0x3e2820=a175_0x3e28();let _0x1e2c64=_0x3e2820[_0x5bb3d4];return _0x1e2c64;}function verifyVisibilityUpdate(_0xd084ab,_0x416823,_0x3985e5){const _0x26dc58=a175_0x58a28d;assertVerified(!!_0x416823,_0x26dc58(0x140)+_0xd084ab['id']+_0x26dc58(0x129)),assertVerified(_0x416823[_0x26dc58(0x15b)]===_0x3985e5,'Menu\x20'+_0xd084ab['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x20ee6a=[['id',_0x416823['id'],_0xd084ab['id']],[_0x26dc58(0x131),_0x416823['parentId'],_0xd084ab[_0x26dc58(0x131)]],[_0x26dc58(0x17b),_0x416823['depth'],_0xd084ab[_0x26dc58(0x17b)]],[_0x26dc58(0x144),_0x416823[_0x26dc58(0x144)],_0xd084ab[_0x26dc58(0x144)]],['path',_0x416823['path'],_0xd084ab[_0x26dc58(0x155)]],[_0x26dc58(0x153),_0x416823[_0x26dc58(0x153)],_0xd084ab[_0x26dc58(0x153)]],[_0x26dc58(0x149),_0x416823[_0x26dc58(0x149)],_0xd084ab['type']],[_0x26dc58(0x14d),_0x416823[_0x26dc58(0x14d)],_0xd084ab['sort']],[_0x26dc58(0x191),_0x416823[_0x26dc58(0x191)],_0xd084ab[_0x26dc58(0x191)]],[_0x26dc58(0x17c),_0x416823['resourcesValid'],_0xd084ab[_0x26dc58(0x17c)]],['childrenIds',_0x416823[_0x26dc58(0x158)],_0xd084ab[_0x26dc58(0x158)]],[_0x26dc58(0x133),_0x416823[_0x26dc58(0x133)],_0xd084ab['childrenCount']],[_0x26dc58(0x199),_0x416823[_0x26dc58(0x199)],_0xd084ab[_0x26dc58(0x199)]],[_0x26dc58(0x175),_0x416823['pageType'],_0xd084ab[_0x26dc58(0x175)]],['modelType',_0x416823[_0x26dc58(0x166)],_0xd084ab[_0x26dc58(0x166)]],[_0x26dc58(0x188),_0x416823['datasetId'],_0xd084ab[_0x26dc58(0x188)]],[_0x26dc58(0x157),_0x416823[_0x26dc58(0x157)],_0xd084ab['datasetCode']]];for(const [_0x3a1968,_0x26f819,_0x23e0af]of _0x20ee6a){assertVerified(sameValue(_0x26f819,_0x23e0af),_0x26dc58(0x140)+_0xd084ab['id']+'\x20'+_0x3a1968+_0x26dc58(0x19a));}}function sameValue(_0x1ff1bb,_0x4061c9){const _0x1f548f=a175_0x58a28d;if(Array['isArray'](_0x1ff1bb)||Array[_0x1f548f(0x12a)](_0x4061c9))return JSON[_0x1f548f(0x19e)](_0x1ff1bb)===JSON[_0x1f548f(0x19e)](_0x4061c9);return _0x1ff1bb===_0x4061c9;}
|
|
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
|
-
const
|
|
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
|
-
function
|
|
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];
|