@lovrabet/rabetbase-cli 2.5.4-beta.2 → 2.5.4-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/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/feishu-bind.d.ts +2 -0
- package/lib/commands/user-account/feishu-bind.js +1 -0
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +3 -2
- package/skills/rabetbase/references/rabetbase-user-account.md +20 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a9474,_0x128a98){const _0x471123=a169_0x272a,_0x500f29=_0x4a9474();while(!![]){try{const _0x4dcae8=-parseInt(_0x471123(0x1ad))/0x1+-parseInt(_0x471123(0x192))/0x2+parseInt(_0x471123(0x1a7))/0x3+parseInt(_0x471123(0x187))/0x4+-parseInt(_0x471123(0x195))/0x5*(parseInt(_0x471123(0x1ab))/0x6)+parseInt(_0x471123(0x18b))/0x7*(parseInt(_0x471123(0x1a1))/0x8)+parseInt(_0x471123(0x1a9))/0x9;if(_0x4dcae8===_0x128a98)break;else _0x500f29['push'](_0x500f29['shift']());}catch(_0x41f451){_0x500f29['push'](_0x500f29['shift']());}}}(a169_0x52a1,0x7c54d));import{getEnv,isProduction}from'../../../constant/env.js';function a169_0x272a(_0x32310b,_0x395e12){_0x32310b=_0x32310b-0x187;const _0x52a1b2=a169_0x52a1();let _0x272a74=_0x52a1b2[_0x32310b];return _0x272a74;}import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a169_0x354787,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x287277,_0x5d59c4){const _0x1b0cfc=a169_0x272a,_0x330b2c=getEnv();logger['info'](_0x1b0cfc(0x196),isProduction(_0x330b2c)?_0x1b0cfc(0x193)+_0x287277+')':_0x1b0cfc(0x1a2)+_0x287277+')');const _0x98498f=await fetchMenuSnapshot(_0x287277,_0x5d59c4,{'verbose':!![]});return logger[_0x1b0cfc(0x197)](_0x1b0cfc(0x196),'Fetched\x20'+_0x98498f[_0x1b0cfc(0x1a5)]+'\x20online\x20menus\x20successfully'),_0x98498f['menus'][_0x1b0cfc(0x18e)](toProcessedMenuItem);}export async function createMenu(_0x1c1cc7,_0x214a76,_0x5e3930){const _0x5c8b5f=a169_0x272a;logger[_0x5c8b5f(0x197)](_0x5c8b5f(0x19c),'Creating\x20menu:\x20'+_0x5e3930[_0x5c8b5f(0x18c)]+'\x20('+_0x5e3930[_0x5c8b5f(0x1a4)]+')');const _0xa9b1eb={'appCode':_0x1c1cc7,'type':_0x5c8b5f(0x189),'sort':0x0,'extend':{'loadScriptMode':_0x5c8b5f(0x188),'resources':_0x5e3930[_0x5c8b5f(0x199)]?JSON[_0x5c8b5f(0x1a3)](_0x5e3930[_0x5c8b5f(0x199)]):undefined},..._0x5e3930},_0x1868d2=await createMenuRecord(_0xa9b1eb,_0x214a76,'Create\x20menu\x20\x22'+_0x5e3930[_0x5c8b5f(0x18c)]+'\x22');return logger['info'](_0x5c8b5f(0x19c),'Menu\x20created\x20successfully:\x20'+_0x5e3930[_0x5c8b5f(0x18c)]),_0x1868d2;}function a169_0x52a1(){const _0x87166d=['info','Update\x20menu\x20assets\x20\x22','resources','extend','Update\x20menu\x20','create-menu','all','Delete\x20','create-menus','Start\x20batch\x20menu\x20creation,\x20total\x20','704CefOTW','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','stringify','path','total','update-menu-cdn-url','1080219qealvL','Updating\x20menu\x20asset\x20links:\x20','4473621mxuNbB','Menu\x20created\x20successfully:\x20','30RLLYgy','Regroup\x20','725865ZCwYaP','3266576KxwoFM','import','procode','Batch\x20menu\x20creation\x20completed,\x20total\x20','32011YhjsrB','label','length','map','loadScriptMode','Create\x20menu\x20\x22','\x20menu\x20group(s)','199648iMYWZY','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','\x20menu','741260CdyvKn','get-online-menu-list'];a169_0x52a1=function(){return _0x87166d;};return a169_0x52a1();}async function createSingleMenu(_0x34ab99,_0x3a9040,_0x2a0cf4,_0x10b890){const _0x220378=a169_0x272a,_0x37b710={'appCode':_0x34ab99,'type':_0x220378(0x189),'sort':0x0,'extend':{'loadScriptMode':_0x220378(0x188),'resources':_0x10b890?JSON[_0x220378(0x1a3)](_0x10b890):undefined},'label':_0x2a0cf4[_0x220378(0x18c)],'path':_0x2a0cf4['path']},_0x28310e=await createMenuRecord(_0x37b710,_0x3a9040,_0x220378(0x190)+_0x2a0cf4[_0x220378(0x18c)]+'\x22');return logger['info'](_0x220378(0x19c),_0x220378(0x1aa)+_0x2a0cf4[_0x220378(0x18c)]),_0x28310e;}export async function createMenus(_0x2f5ee6,_0x3719b9,_0x4c5e85,_0x5d6e10){const _0x1761b7=a169_0x272a;logger['info'](_0x1761b7(0x19f),_0x1761b7(0x1a0)+_0x4c5e85[_0x1761b7(0x18d)]);const _0x59ac34=await Promise[_0x1761b7(0x19d)](_0x4c5e85['map'](_0x47ec14=>createSingleMenu(_0x2f5ee6,_0x3719b9,_0x47ec14,_0x5d6e10)));return logger[_0x1761b7(0x197)](_0x1761b7(0x19f),_0x1761b7(0x18a)+_0x4c5e85[_0x1761b7(0x18d)]),_0x59ac34;}export async function updateMenuCdnUrl(_0x46d78a,_0x1a4a11,_0x2192cc){const _0x515a3d=a169_0x272a;logger[_0x515a3d(0x197)](_0x515a3d(0x1a6),_0x515a3d(0x1a8)+_0x2192cc[_0x515a3d(0x18c)]+'\x20('+_0x2192cc[_0x515a3d(0x1a4)]+')');const _0x5307df={'id':_0x2192cc['id'],'appCode':_0x46d78a,'extend':{..._0x2192cc[_0x515a3d(0x19a)]??{},..._0x2192cc[_0x515a3d(0x18f)]?{'loadScriptMode':_0x2192cc['loadScriptMode']}:{},'resources':_0x2192cc[_0x515a3d(0x199)]?JSON[_0x515a3d(0x1a3)](_0x2192cc[_0x515a3d(0x199)]):undefined}},_0x592a37=await updateMenuRecord(_0x5307df,_0x1a4a11,_0x515a3d(0x198)+_0x2192cc[_0x515a3d(0x18c)]+'\x22');return logger[_0x515a3d(0x197)](_0x515a3d(0x1a6),'Menu\x20assets\x20synced:\x20'+_0x2192cc[_0x515a3d(0x18c)],undefined),_0x592a37;}export async function createMenuEntity(_0x5edccb,_0x12b551,_0x5bee38){return createMenuRecord({'appCode':_0x5edccb,..._0x5bee38},_0x12b551,'Create\x20menu\x20\x22'+_0x5bee38['label']+'\x22');}export async function updateMenuEntity(_0x7c7eca,_0x1e64d6,_0x12b474){const _0x525104=a169_0x272a;return updateMenuRecord({'appCode':_0x7c7eca,..._0x12b474},_0x1e64d6,_0x525104(0x19b)+_0x12b474['id']);}export async function batchDeleteMenuEntities(_0x3fdb7b,_0x8fc797){const _0x17a9ba=a169_0x272a;return batchDeleteMenuRecords(_0x8fc797,_0x3fdb7b,_0x17a9ba(0x19e)+_0x8fc797[_0x17a9ba(0x18d)]+_0x17a9ba(0x194)+(_0x8fc797['length']===0x1?'':'s'));}export async function startMenuRegroup(_0x1c3f99,_0x3ae546){const _0x347dce=a169_0x272a;return a169_0x354787(_0x3ae546,_0x1c3f99,_0x347dce(0x1ac)+_0x3ae546['menuGroups'][_0x347dce(0x18d)]+_0x347dce(0x191));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a170_0x4da4d8=a170_0x21bd;(function(_0x5110b2,_0x48352f){const _0x46c834=a170_0x21bd,_0x41e234=_0x5110b2();while(!![]){try{const _0x282575=-parseInt(_0x46c834(0xec))/0x1*(parseInt(_0x46c834(0xe3))/0x2)+-parseInt(_0x46c834(0xed))/0x3*(parseInt(_0x46c834(0xe4))/0x4)+-parseInt(_0x46c834(0xe5))/0x5*(-parseInt(_0x46c834(0xff))/0x6)+-parseInt(_0x46c834(0xd7))/0x7*(-parseInt(_0x46c834(0xf2))/0x8)+parseInt(_0x46c834(0xdb))/0x9+-parseInt(_0x46c834(0xd6))/0xa+parseInt(_0x46c834(0xe1))/0xb*(parseInt(_0x46c834(0xe9))/0xc);if(_0x282575===_0x48352f)break;else _0x41e234['push'](_0x41e234['shift']());}catch(_0x1d3411){_0x41e234['push'](_0x41e234['shift']());}}}(a170_0x52df,0x90881));function a170_0x52df(){const _0x4e969a=['2142639LzoGLU','Invalid\x20--params\x20JSON.','string','menu-sync','Start\x20non-interactive\x20menu\x20sync',':\x20expected\x20a\x20non-empty\x20string.','248633fuditm','cssUrl','2260788FUkVfP','3941508YVlFIa','5wcMfBS','jsUrl','has','length','1224xvQSAN','info','trim','1ASCbwd','3pXCgTn','hasOwn','setLogPath','get','message','16616stvwmE','parse','Invalid\x20--params\x20fields:\x20','filter','import','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','No\x20local\x20pages\x20matched\x20paths:\x20','dryRun','path','join','map','--params.','push','3014250LcImlk','Menu\x20sync\x20completed','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','isArray','4482610HbjSHw','371gkWhTt','Invalid\x20--params.','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','\x0a\x20\x20Available\x20local\x20paths:\x20'];a170_0x52df=function(){return _0x4e969a;};return a170_0x52df();}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';import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a170_0x4da4d8(0xe6),a170_0x4da4d8(0xe2)]);function a170_0x21bd(_0x1eb8fb,_0x284202){_0x1eb8fb=_0x1eb8fb-0xd3;const _0x52df86=a170_0x52df();let _0x21bd67=_0x52df86[_0x1eb8fb];return _0x21bd67;}function validateParams(_0x31aa3e){const _0x1e1e65=a170_0x4da4d8,_0xe1e66a=[];return _0x31aa3e[_0x1e1e65(0xe6)]&&!isValidJsHttpsUrl(_0x31aa3e[_0x1e1e65(0xe6)])&&_0xe1e66a[_0x1e1e65(0xfe)]({'field':_0x1e1e65(0xe6),'message':_0x1e1e65(0xd4)}),_0x31aa3e['cssUrl']&&!isValidCssHttpsUrl(_0x31aa3e['cssUrl'])&&_0xe1e66a[_0x1e1e65(0xfe)]({'field':_0x1e1e65(0xe2),'message':_0x1e1e65(0xd9)}),_0xe1e66a;}export async function runMenuSyncCore(_0x11fb57,_0x2070ad,_0x406e88=[],_0x4e09fc,_0x5862a4={}){const _0x419ca7=a170_0x4da4d8,_0x4eba04=parseMenuSyncParams(_0x4e09fc),_0xa14f22=[...new Set(_0x406e88[_0x419ca7(0xfc)](_0xc8b0c7=>_0xc8b0c7[_0x419ca7(0xeb)]())[_0x419ca7(0xf5)](Boolean))],_0x15d5ac=_0x4eba04[_0x419ca7(0xe6)],_0x46c0db=_0x4eba04['cssUrl'],_0x49d8b5=[];if(_0x15d5ac)_0x49d8b5[_0x419ca7(0xfe)](_0x15d5ac);if(_0x46c0db)_0x49d8b5[_0x419ca7(0xfe)](_0x46c0db);const _0x279f9c=validateParams(_0x4eba04);if(_0x279f9c[_0x419ca7(0xe8)]>0x0){const _0x3f974e=_0x279f9c[_0x419ca7(0xfc)](_0x2de6fe=>_0x419ca7(0xfd)+_0x2de6fe['field']+':\x20'+_0x2de6fe[_0x419ca7(0xf1)])[_0x419ca7(0xfb)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x3f974e);}logger[_0x419ca7(0xef)](process['cwd']()),logger[_0x419ca7(0xea)](_0x419ca7(0xde),_0x419ca7(0xdf),{'appCode':_0x11fb57,'selectedCount':_0xa14f22[_0x419ca7(0xe8)],'jsUrl':_0x15d5ac,'cssUrl':_0x46c0db});if(_0x15d5ac){const _0x15bdf0=await isUrlReachable(_0x15d5ac);if(!_0x15bdf0)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x15d5ac);}if(_0x46c0db){const _0x4f4748=await isUrlReachable(_0x46c0db);if(!_0x4f4748)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x46c0db);}const _0x202c8e=getLocalPages();if(_0x202c8e['length']===0x0){if(_0xa14f22[_0x419ca7(0xe8)]>0x0)throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0xa14f22[_0x419ca7(0xfb)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x5862a4[_0x419ca7(0xf9)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x562f3c=await getOnlineMenuList(_0x11fb57,_0x2070ad),_0x14c620=new Set(_0x562f3c[_0x419ca7(0xfc)](_0x17794f=>_0x17794f[_0x419ca7(0xfa)]));let _0x9dbbb6;if(_0xa14f22[_0x419ca7(0xe8)]>0x0){const _0x48079d=new Map(_0x202c8e[_0x419ca7(0xfc)](_0x182683=>[_0x182683[_0x419ca7(0xfa)],_0x182683])),_0x2b11f6=_0xa14f22[_0x419ca7(0xf5)](_0x128127=>!_0x48079d[_0x419ca7(0xe7)](_0x128127));if(_0x2b11f6[_0x419ca7(0xe8)]>0x0){const _0x2be4b8=_0x202c8e['map'](_0x36c686=>_0x36c686[_0x419ca7(0xfa)])[_0x419ca7(0xfb)](',\x20');throw new Error(_0x419ca7(0xf8)+_0x2b11f6['join'](',\x20')+_0x419ca7(0xda)+_0x2be4b8);}const _0x52e25a=_0xa14f22[_0x419ca7(0xf5)](_0x4332e2=>_0x14c620[_0x419ca7(0xe7)](_0x4332e2));if(_0x52e25a['length']>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0x52e25a['join'](',\x20'));_0x9dbbb6=_0xa14f22[_0x419ca7(0xfc)](_0x1ddc3a=>_0x48079d[_0x419ca7(0xf0)](_0x1ddc3a));}else _0x9dbbb6=_0x202c8e['filter'](_0xe61e76=>!_0x14c620[_0x419ca7(0xe7)](_0xe61e76['path']));if(_0x9dbbb6[_0x419ca7(0xe8)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x5862a4[_0x419ca7(0xf9)]===!![],'targetPages':[],'plannedMenus':[]};const _0x10757c=_0x9dbbb6[_0x419ca7(0xfc)](_0x3858b6=>({'type':'procode','path':_0x3858b6[_0x419ca7(0xfa)],'label':_0x3858b6['label'],'loadScriptMode':_0x419ca7(0xf6),'resources':[..._0x49d8b5]}));if(_0x5862a4[_0x419ca7(0xf9)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x9dbbb6,'plannedMenus':_0x10757c};const _0x5030c6=await createMenus(_0x11fb57,_0x2070ad,_0x9dbbb6,_0x49d8b5[_0x419ca7(0xe8)]>0x0?_0x49d8b5:undefined);return logger[_0x419ca7(0xea)](_0x419ca7(0xde),_0x419ca7(0xd3),{'count':_0x9dbbb6['length'],'resources':_0x49d8b5}),{'created':_0x5030c6[_0x419ca7(0xe8)],'skipped':![],'dryRun':![],'targetPages':_0x9dbbb6,'plannedMenus':_0x10757c,'menus':_0x5030c6};}export function parseMenuSyncParams(_0x25f5c4){const _0x3715eb=a170_0x4da4d8;if(!_0x25f5c4||typeof _0x25f5c4!==_0x3715eb(0xdd))return{};let _0x27f74a;try{_0x27f74a=JSON[_0x3715eb(0xf3)](_0x25f5c4);}catch{throw new Error(_0x3715eb(0xdc));}if(typeof _0x27f74a!=='object'||_0x27f74a===null||Array[_0x3715eb(0xd5)](_0x27f74a))throw new Error(_0x3715eb(0xf7));const _0x3fed5e=_0x27f74a;if(Object[_0x3715eb(0xee)](_0x3fed5e,'pages'))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x3bbd42=Object['keys'](_0x3fed5e)[_0x3715eb(0xf5)](_0x267947=>!MENU_SYNC_PARAM_KEYS[_0x3715eb(0xe7)](_0x267947));if(_0x3bbd42[_0x3715eb(0xe8)]>0x0)throw new Error(_0x3715eb(0xf4)+_0x3bbd42[_0x3715eb(0xfb)](',\x20')+'.');for(const _0x2f6aa3 of MENU_SYNC_PARAM_KEYS){const _0xc0fdbc=_0x3fed5e[_0x2f6aa3];if(_0xc0fdbc!==undefined&&(typeof _0xc0fdbc!==_0x3715eb(0xdd)||_0xc0fdbc['trim']()===''))throw new Error(_0x3715eb(0xd8)+_0x2f6aa3+_0x3715eb(0xe0));}return{'jsUrl':typeof _0x3fed5e[_0x3715eb(0xe6)]===_0x3715eb(0xdd)?_0x3fed5e[_0x3715eb(0xe6)][_0x3715eb(0xeb)]():undefined,'cssUrl':typeof _0x3fed5e[_0x3715eb(0xe2)]===_0x3715eb(0xdd)?_0x3fed5e[_0x3715eb(0xe2)][_0x3715eb(0xeb)]():undefined};}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
(function(_0x5badfe,_0x4d8e6b){const _0x1e0299=a172_0x32f2,_0x3eaa90=_0x5badfe();while(!![]){try{const _0x4aa1ed=-parseInt(_0x1e0299(0x117))/0x1*(-parseInt(_0x1e0299(0x128))/0x2)+-parseInt(_0x1e0299(0x113))/0x3*(-parseInt(_0x1e0299(0x134))/0x4)+parseInt(_0x1e0299(0xf9))/0x5+-parseInt(_0x1e0299(0x111))/0x6+-parseInt(_0x1e0299(0xf3))/0x7+parseInt(_0x1e0299(0x10e))/0x8*(parseInt(_0x1e0299(0xf7))/0x9)+parseInt(_0x1e0299(0x104))/0xa*(-parseInt(_0x1e0299(0x100))/0xb);if(_0x4aa1ed===_0x4d8e6b)break;else _0x3eaa90['push'](_0x3eaa90['shift']());}catch(_0x3c3981){_0x3eaa90['push'](_0x3eaa90['shift']());}}}(a172_0x13e6,0x9874d));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x4cc996){const _0x339ef4=a172_0x32f2,_0x20afb3=[];return _0x4cc996[_0x339ef4(0x10d)]&&!isValidJsHttpsUrl(_0x4cc996[_0x339ef4(0x10d)])&&_0x20afb3[_0x339ef4(0xf1)]({'field':'jsUrl','message':_0x339ef4(0x118)}),_0x4cc996['cssUrl']&&!isValidCssHttpsUrl(_0x4cc996['cssUrl'])&&_0x20afb3[_0x339ef4(0xf1)]({'field':_0x339ef4(0x125),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x20afb3;}function a172_0x32f2(_0x33fbb5,_0x1b835e){_0x33fbb5=_0x33fbb5-0xee;const _0x13e637=a172_0x13e6();let _0x32f2aa=_0x13e637[_0x33fbb5];return _0x32f2aa;}export async function runMenuUpdateCore(_0x4cb311,_0x2f9ed7,_0x2ce061,_0x465fe3={}){const _0x3e4877=a172_0x32f2,_0xdf8441=parseUpdateParamsFlag(_0x2ce061),_0x12e983=normalizeMode(_0x465fe3['mode']);validateSelection(_0x465fe3['selection']);const _0x5e6cd0=[];if(_0xdf8441[_0x3e4877(0x10d)])_0x5e6cd0['push'](_0xdf8441[_0x3e4877(0x10d)]);if(_0xdf8441['cssUrl'])_0x5e6cd0[_0x3e4877(0xf1)](_0xdf8441[_0x3e4877(0x125)]);const _0x18c6d8=validateParams(_0xdf8441);if(_0x18c6d8[_0x3e4877(0x105)]>0x0){const _0x4179f1=_0x18c6d8['map'](_0xc4b907=>'--params.'+_0xc4b907[_0x3e4877(0x123)]+':\x20'+_0xc4b907[_0x3e4877(0xf6)])[_0x3e4877(0x12b)](';\x20');throw new Error(_0x3e4877(0x131)+_0x4179f1);}if(_0x5e6cd0[_0x3e4877(0x105)]===0x0)throw new Error(_0x3e4877(0x11b)+_0x3e4877(0x133));logger[_0x3e4877(0xfa)](process[_0x3e4877(0x11a)]()),logger[_0x3e4877(0x11d)]('menu-asset-update',_0x3e4877(0x124),{'appCode':_0x4cb311,'jsUrl':_0xdf8441[_0x3e4877(0x10d)],'cssUrl':_0xdf8441['cssUrl'],'mode':_0x12e983,'dryRun':_0x465fe3[_0x3e4877(0x121)]===!![]});if(_0xdf8441['jsUrl']){const _0x3c6d68=await isUrlReachable(_0xdf8441[_0x3e4877(0x10d)]);if(!_0x3c6d68)throw new Error(_0x3e4877(0x120)+_0xdf8441[_0x3e4877(0x10d)]);}if(_0xdf8441['cssUrl']){const _0x2e29f7=await isUrlReachable(_0xdf8441[_0x3e4877(0x125)]);if(!_0x2e29f7)throw new Error(_0x3e4877(0x115)+_0xdf8441[_0x3e4877(0x125)]);}const _0x121a51=await getOnlineMenuList(_0x4cb311,_0x2f9ed7),_0x1a89a3=_0x121a51[_0x3e4877(0xf4)](_0x9f1a2c=>_0x9f1a2c['resources'][_0x3e4877(0x105)]>0x0),_0x138f59=selectMenusForUpdate(_0x1a89a3,_0x465fe3[_0x3e4877(0x109)]);if(_0x138f59['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x465fe3['dryRun']===!![]};const _0x59c47e=_0x138f59[_0x3e4877(0xfc)](_0xe2dccc=>buildMenuUpdateDiff(_0xe2dccc,_0xdf8441,_0x12e983,_0x465fe3[_0x3e4877(0x102)]===!![],_0x465fe3[_0x3e4877(0xfe)]));if(_0x465fe3[_0x3e4877(0x121)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x59c47e};const _0x4f1488=await Promise[_0x3e4877(0x127)](_0x138f59['map']((_0x499434,_0x450890)=>updateMenuCdnUrl(_0x4cb311,_0x2f9ed7,{'id':_0x499434['id'],'label':_0x499434[_0x3e4877(0xf8)],'path':_0x499434[_0x3e4877(0x132)],'resources':_0x59c47e[_0x450890][_0x3e4877(0x12d)][_0x3e4877(0x12f)],'extend':_0x499434[_0x3e4877(0x11f)]??null,'loadScriptMode':_0x465fe3[_0x3e4877(0xfe)]}))),_0xe9faff=_0x4f1488[_0x3e4877(0xf4)](_0x2794de=>_0x2794de[_0x3e4877(0x12c)]==='fulfilled')[_0x3e4877(0xfc)](_0x4a3cd8=>_0x4a3cd8[_0x3e4877(0xff)]),_0x29d041=_0x4f1488['filter'](_0x4ae004=>_0x4ae004[_0x3e4877(0x12c)]==='rejected')[_0x3e4877(0x105)];return logger[_0x3e4877(0x11d)]('menu-asset-update','Menu\x20asset\x20update\x20completed',{'count':_0x138f59['length'],'resources':_0x5e6cd0}),{'updated':_0xe9faff[_0x3e4877(0x105)],'failed':_0x29d041,'skipped':![],'menus':_0xe9faff};}function validateSelection(_0x17f305){const _0x5cb8b3=a172_0x32f2;if(!_0x17f305)throw new Error(_0x5cb8b3(0xef));if(_0x17f305['all']&&(_0x17f305['menuIds']['length']>0x0||_0x17f305['paths']['length']>0x0))throw new Error(_0x5cb8b3(0xfd));if(!_0x17f305[_0x5cb8b3(0x11e)]&&_0x17f305[_0x5cb8b3(0x114)][_0x5cb8b3(0x105)]===0x0&&_0x17f305[_0x5cb8b3(0xf5)][_0x5cb8b3(0x105)]===0x0)throw new Error(_0x5cb8b3(0xef));}export function selectMenusForUpdate(_0x4a5e72,_0x56a08a){const _0x13e963=a172_0x32f2;validateSelection(_0x56a08a);if(_0x56a08a[_0x13e963(0x11e)])return _0x4a5e72;const _0x1a8fdc=new Set(_0x4a5e72[_0x13e963(0xfc)](_0x3bb10e=>_0x3bb10e['id'])),_0x129b98=new Set(_0x4a5e72[_0x13e963(0xfc)](_0x3d9748=>_0x3d9748[_0x13e963(0x132)])),_0x498a65=_0x56a08a[_0x13e963(0x114)]['filter'](_0x1c2220=>!_0x1a8fdc[_0x13e963(0x10b)](_0x1c2220)),_0x3a42e4=_0x56a08a['paths'][_0x13e963(0xf4)](_0x9c7af7=>!_0x129b98[_0x13e963(0x10b)](_0x9c7af7));if(_0x498a65['length']>0x0||_0x3a42e4['length']>0x0){const _0x6d1d52=[..._0x498a65[_0x13e963(0xfc)](_0x1453a4=>String(_0x1453a4)),..._0x3a42e4][_0x13e963(0x12b)](',\x20');throw new Error(_0x13e963(0x103)+_0x6d1d52);}const _0x96443f=new Set(_0x56a08a[_0x13e963(0x114)]),_0x40dd69=new Set(_0x56a08a['paths']);return _0x4a5e72[_0x13e963(0xf4)](_0x5b8b90=>_0x96443f[_0x13e963(0x10b)](_0x5b8b90['id'])||_0x40dd69[_0x13e963(0x10b)](_0x5b8b90['path']));}function normalizeMode(_0x23906d){const _0x55fd3c=a172_0x32f2;if(!_0x23906d)return _0x55fd3c(0xee);if(_0x23906d===_0x55fd3c(0x130)||_0x23906d===_0x55fd3c(0xee))return _0x23906d;throw new Error(_0x55fd3c(0x11c)+_0x23906d+_0x55fd3c(0x10f));}function buildMenuUpdateDiff(_0x2ddeae,_0x3cd493,_0x3c3a8b,_0x1cb1d6,_0xb7bc76){const _0x22e46d=a172_0x32f2,_0x2bc59a=[..._0x2ddeae[_0x22e46d(0x12f)]];_0x3c3a8b===_0x22e46d(0xee)&&assertUnambiguousPatchResources(_0x2ddeae,_0x2bc59a,_0x3cd493);const _0x71ba01=_0x3c3a8b==='patch'?patchResources(_0x2bc59a,_0x3cd493):replaceResources(_0x3cd493),_0x4065a4=[],_0x140a40=_0x2bc59a[_0x22e46d(0x116)](isJsResource),_0x4402ce=_0x71ba01[_0x22e46d(0x116)](isJsResource);if(_0x140a40&&!_0x4402ce){const _0x50387d=_0x22e46d(0x126)+_0x2ddeae['label']+'\x22\x20('+_0x2ddeae['path']+').\x20'+_0x22e46d(0x12e);if(!_0x1cb1d6)throw new Error(_0x50387d);_0x4065a4[_0x22e46d(0xf1)](_0x50387d);}const _0x4f1f40=_0x2bc59a[_0x22e46d(0x116)](isCssResource),_0x3efc45=_0x71ba01[_0x22e46d(0x116)](isCssResource);_0x4f1f40&&!_0x3efc45&&_0x4065a4[_0x22e46d(0xf1)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x2ddeae['label']+_0x22e46d(0x12a)+_0x2ddeae[_0x22e46d(0x132)]+').');const _0xf8df86=typeof _0x2ddeae[_0x22e46d(0x11f)]?.['loadScriptMode']===_0x22e46d(0x108)?_0x2ddeae[_0x22e46d(0x11f)][_0x22e46d(0xfe)]:null,_0x1573d9=_0xb7bc76?{'loadScriptMode':_0xf8df86}:{},_0x2c2011=_0xb7bc76?{'loadScriptMode':_0xb7bc76}:{};return{'id':_0x2ddeae['id'],'label':_0x2ddeae[_0x22e46d(0xf8)],'path':_0x2ddeae['path'],'mode':_0x3c3a8b,'before':{'resources':_0x2bc59a,..._0x1573d9},'after':{'resources':_0x71ba01,..._0x2c2011},'warnings':_0x4065a4};}function replaceResources(_0x1e0c42){const _0x58e283=a172_0x32f2;return[_0x1e0c42[_0x58e283(0x10d)],_0x1e0c42['cssUrl']][_0x58e283(0xf4)](_0xc2240c=>!!_0xc2240c);}function assertUnambiguousPatchResources(_0x1473d6,_0x530a9c,_0x3c9aba){const _0x854a69=a172_0x32f2,_0x3b4b80=_0x530a9c[_0x854a69(0xf4)](isJsResource)['length'];if(_0x3c9aba[_0x854a69(0x10d)]&&_0x3b4b80>0x1)throw new Error(_0x854a69(0x112)+_0x3b4b80+_0x854a69(0x119)+_0x1473d6[_0x854a69(0xf8)]+_0x854a69(0x12a)+_0x1473d6[_0x854a69(0x132)]+')\x20'+_0x854a69(0x110));const _0x1fcee1=_0x530a9c['filter'](isCssResource)[_0x854a69(0x105)];if(_0x3c9aba[_0x854a69(0x125)]&&_0x1fcee1>0x1)throw new Error(_0x854a69(0x112)+_0x1fcee1+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x1473d6[_0x854a69(0xf8)]+_0x854a69(0x12a)+_0x1473d6[_0x854a69(0x132)]+')\x20'+_0x854a69(0x101));}function patchResources(_0xdee22f,_0x17a66d){const _0x59cc06=a172_0x32f2;let _0x93cdc1=![],_0x235c38=![];const _0x4fd5c5=[];for(const _0x3b079a of _0xdee22f){if(isJsResource(_0x3b079a)){if(_0x17a66d[_0x59cc06(0x10d)]&&!_0x93cdc1)_0x4fd5c5[_0x59cc06(0xf1)](_0x17a66d[_0x59cc06(0x10d)]),_0x93cdc1=!![];else!_0x17a66d[_0x59cc06(0x10d)]&&_0x4fd5c5['push'](_0x3b079a);continue;}if(isCssResource(_0x3b079a)){if(_0x17a66d[_0x59cc06(0x125)]&&!_0x235c38)_0x4fd5c5['push'](_0x17a66d[_0x59cc06(0x125)]),_0x235c38=!![];else!_0x17a66d[_0x59cc06(0x125)]&&_0x4fd5c5[_0x59cc06(0xf1)](_0x3b079a);continue;}_0x4fd5c5[_0x59cc06(0xf1)](_0x3b079a);}return _0x17a66d[_0x59cc06(0x10d)]&&!_0x93cdc1&&_0x4fd5c5[_0x59cc06(0xfb)](_0x17a66d[_0x59cc06(0x10d)]),_0x17a66d['cssUrl']&&!_0x235c38&&_0x4fd5c5[_0x59cc06(0xf1)](_0x17a66d[_0x59cc06(0x125)]),_0x4fd5c5;}function isJsResource(_0x3571b0){const _0x4ea8f5=a172_0x32f2;return stripQuery(_0x3571b0)[_0x4ea8f5(0xf2)]()[_0x4ea8f5(0x129)](_0x4ea8f5(0xf0));}function a172_0x13e6(){const _0x235b22=['push','toLowerCase','4472048HWvbmk','filter','paths','message','1341bXKInq','label','3988700pnnMsh','setLogPath','unshift','map','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','loadScriptMode','value','22864435dTvqiF','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','force','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','10zbIQRw','length','trim','parse','string','selection','split','has','object','jsUrl','55504XJhXoC','.\x20Allowed\x20values:\x20replace,\x20patch','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','3289638CrgJun','menu\x20asset-update\x20cannot\x20patch\x20','7971Eeewys','menuIds','CSS\x20URL\x20is\x20unreachable:\x20','some','27717cuegDm','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','\x20existing\x20JS\x20resources\x20for\x20\x22','cwd','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','Invalid\x20--mode:\x20','info','all','extend','JS\x20URL\x20is\x20unreachable:\x20','dryRun','isArray','field','Start\x20non-interactive\x20menu\x20asset\x20update','cssUrl','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','allSettled','64xnLUJD','endsWith','\x22\x20(','join','status','after','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','resources','replace','Invalid\x20--params:\x20','path','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','1764yZxAdZ','patch','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','.js'];a172_0x13e6=function(){return _0x235b22;};return a172_0x13e6();}function isCssResource(_0x587c28){const _0x8d7f1d=a172_0x32f2;return stripQuery(_0x587c28)['toLowerCase']()[_0x8d7f1d(0x129)]('.css');}function stripQuery(_0x190798){const _0x15f41c=a172_0x32f2;return _0x190798[_0x15f41c(0x10a)]('?')[0x0]??_0x190798;}function parseUpdateParamsFlag(_0x8e9d94){const _0x4f4d1a=a172_0x32f2;if(!_0x8e9d94||typeof _0x8e9d94!==_0x4f4d1a(0x108))return{};try{const _0x55edc7=JSON[_0x4f4d1a(0x107)](_0x8e9d94);if(typeof _0x55edc7!==_0x4f4d1a(0x10c)||_0x55edc7===null||Array[_0x4f4d1a(0x122)](_0x55edc7))return{};return{'jsUrl':typeof _0x55edc7['jsUrl']===_0x4f4d1a(0x108)?_0x55edc7[_0x4f4d1a(0x10d)][_0x4f4d1a(0x106)]():undefined,'cssUrl':typeof _0x55edc7['cssUrl']===_0x4f4d1a(0x108)?_0x55edc7[_0x4f4d1a(0x125)]['trim']():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4073a1,_0x4ca0d3){const _0x496759=a173_0x108b,_0x1f485d=_0x4073a1();while(!![]){try{const _0x45858e=-parseInt(_0x496759(0x12e))/0x1*(parseInt(_0x496759(0x12c))/0x2)+-parseInt(_0x496759(0x126))/0x3+-parseInt(_0x496759(0x12f))/0x4*(parseInt(_0x496759(0x129))/0x5)+parseInt(_0x496759(0x125))/0x6*(parseInt(_0x496759(0x124))/0x7)+parseInt(_0x496759(0x133))/0x8+-parseInt(_0x496759(0x134))/0x9*(-parseInt(_0x496759(0x128))/0xa)+parseInt(_0x496759(0x12a))/0xb;if(_0x45858e===_0x4ca0d3)break;else _0x1f485d['push'](_0x1f485d['shift']());}catch(_0x3851aa){_0x1f485d['push'](_0x1f485d['shift']());}}}(a173_0x4a3d,0xe0fb1));export function isValidJsHttpsUrl(_0x16ab21){const _0x4dcba2=a173_0x108b;return/^https:\/\/.+\.js(\?.*)?$/[_0x4dcba2(0x131)](_0x16ab21[_0x4dcba2(0x12b)]());}export function isValidCssHttpsUrl(_0x3172b6){const _0x39fdcb=a173_0x108b;return/^https:\/\/.+\.css(\?.*)?$/[_0x39fdcb(0x131)](_0x3172b6['trim']());}function a173_0x108b(_0x3658fa,_0x4b90c2){_0x3658fa=_0x3658fa-0x124;const _0x4a3d1c=a173_0x4a3d();let _0x108b8c=_0x4a3d1c[_0x3658fa];return _0x108b8c;}export async function isUrlReachable(_0x4d1a23){const _0xad2cdc=a173_0x108b;try{const _0x14c051=await fetch(_0x4d1a23,{'method':_0xad2cdc(0x132)});if(_0x14c051['ok'])return!![];}catch{}try{const _0x5a0d8a=await fetch(_0x4d1a23,{'method':_0xad2cdc(0x127),'headers':{'Range':_0xad2cdc(0x130)}}),_0x52a029=_0x5a0d8a['ok'];try{await _0x5a0d8a[_0xad2cdc(0x12d)]?.['cancel']();}catch{}return _0x52a029;}catch{return![];}}function a173_0x4a3d(){const _0x1c5559=['4702728ulTxmM','GET','10lBmRRe','12875GBnfoC','24390916OUFxSb','trim','882214RWZTLE','body','2CYmMTM','1224zOdiTm','bytes=0-0','test','HEAD','4217496SAsuaY','106542paGgyY','3584FdcgtJ','16440ErjGzR'];a173_0x4a3d=function(){return _0x1c5559;};return a173_0x4a3d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a174_0x19f7a5=a174_0x2f1d;(function(_0x6f1634,_0x25d362){const _0x4c4f0e=a174_0x2f1d,_0x37c592=_0x6f1634();while(!![]){try{const _0x1d8207=parseInt(_0x4c4f0e(0xa7))/0x1*(-parseInt(_0x4c4f0e(0xc5))/0x2)+parseInt(_0x4c4f0e(0xb6))/0x3+-parseInt(_0x4c4f0e(0xa9))/0x4+-parseInt(_0x4c4f0e(0xda))/0x5+parseInt(_0x4c4f0e(0xa8))/0x6*(parseInt(_0x4c4f0e(0xa4))/0x7)+-parseInt(_0x4c4f0e(0xd6))/0x8+-parseInt(_0x4c4f0e(0xb3))/0x9*(-parseInt(_0x4c4f0e(0xb8))/0xa);if(_0x1d8207===_0x25d362)break;else _0x37c592['push'](_0x37c592['shift']());}catch(_0x3658d9){_0x37c592['push'](_0x37c592['shift']());}}}(a174_0x454d,0x46eb7));import a174_0x3b4ce8 from'chalk';function a174_0x454d(){const _0x52b670=['localPages','717353QTyFTs','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','\x20menu(s)\x20created','3ViMUuZ','18OmTYdk','329344VuAJcn','targetPages','\x20\x20Create\x20','created','gray','str','Menu\x20creation\x20failed','jsUrl','write','Sync\x20local\x20pages\x20as\x20platform\x20menus','9239067ageuQM','yellow','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','313824OVNHxt','\x20\x20Continue\x20with\x20creation?','10kYYXRe','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','sync','onlinePaths','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','yes','Pre-fill\x20JS/CSS\x20URLs.\x20','POST','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','string','skipped','params','Would\x20create\x20','69178BDWCMn','cyan','/smartapi/menu/create','rawFlags','Fetching\x20online\x20menu\x20list...','paths','\x20failed.','\x20\x20Cancelled.','\x20\x20✓\x20Selected:\x20','Menu\x20sync\x20completed:\x20','\x20menu(s)','✓\x20Menu\x20sync\x20completed:\x20','menu','appCode','appcode','selectedAppName','\x20created,\x20','3835760tsyOPv','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','split','cookie','2412740STkZIo','trim','map','\x20and\x20CSS:\x20','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','length','failed','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','message','validation','cssUrl','Failed\x20to\x20fetch\x20online\x20menu\x20list','flag'];a174_0x454d=function(){return _0x52b670;};return a174_0x454d();}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';function a174_0x2f1d(_0x2e56fe,_0x1e7a27){_0x2e56fe=_0x2e56fe-0x9b;const _0x454d52=a174_0x454d();let _0x2f1da9=_0x454d52[_0x2e56fe];return _0x2f1da9;}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':a174_0x19f7a5(0xd1),'command':a174_0x19f7a5(0xba),'description':a174_0x19f7a5(0xb2),'risk':a174_0x19f7a5(0xb1),'flags':[{'name':a174_0x19f7a5(0xc3),'type':a174_0x19f7a5(0xc1),'description':a174_0x19f7a5(0xbe)+a174_0x19f7a5(0xb5)},{'name':a174_0x19f7a5(0xca),'type':a174_0x19f7a5(0xc1),'description':a174_0x19f7a5(0xde)},{'name':a174_0x19f7a5(0xbd),'type':'boolean','description':a174_0x19f7a5(0xa5)}],async 'dryRun'(_0x2c6164){const _0x199007=a174_0x19f7a5;ensureRunnableContext(_0x2c6164[_0x199007(0xc8)],_0x2c6164[_0x199007(0xd4)]);const _0x363e25=await runMenuSyncCore(_0x2c6164[_0x199007(0xd2)],_0x2c6164[_0x199007(0xd9)],parsePaths(_0x2c6164[_0x199007(0xae)]('paths')),_0x2c6164[_0x199007(0xae)](_0x199007(0xc3)),{'dryRun':!![]});return{'method':_0x199007(0xbf),'url':_0x199007(0xc7),'body':_0x363e25,'description':_0x363e25[_0x199007(0xc2)]?_0x199007(0xd7):_0x199007(0xc4)+_0x363e25[_0x199007(0xaa)]['length']+'\x20local\x20microfrontend\x20menu(s).'};},async 'execute'(_0x4d56af){const _0x5d7239=a174_0x19f7a5;ensureRunnableContext(_0x4d56af[_0x5d7239(0xc8)],_0x4d56af['selectedAppName']);const _0x5a2e41=_0x4d56af[_0x5d7239(0xa2)](_0x5d7239(0xbd)),_0x404f63=_0x4d56af[_0x5d7239(0xae)](_0x5d7239(0xc3)),_0x3c0994=parsePaths(_0x4d56af[_0x5d7239(0xae)]('paths')),_0x24cd78=parseMenuSyncParams(_0x404f63);if(_0x5a2e41){const _0x54aba4=await runMenuSyncCore(_0x4d56af[_0x5d7239(0xd2)],_0x4d56af['cookie'],_0x3c0994,_0x404f63);if(_0x54aba4[_0x5d7239(0xc2)]){const _0x13f311=getLocalPages();_0x13f311[_0x5d7239(0x9b)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x5d7239(0xd0)+_0x54aba4[_0x5d7239(0xac)]+_0x5d7239(0xa6));return{'ok':!![],'data':_0x54aba4,'message':_0x54aba4[_0x5d7239(0xc2)]?'Menu\x20sync\x20skipped':_0x5d7239(0xce)+_0x54aba4[_0x5d7239(0xac)]+'\x20created.'};}if(_0x3c0994['length']>0x0)throw CliErrors[_0x5d7239(0x9f)](_0x5d7239(0x9d),_0x5d7239(0xc0));if(!isInteractive()&&_0x404f63)throw CliErrors[_0x5d7239(0x9f)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x5d7239(0xc0));requireInteractive();const _0x165c4f=startSpinner(_0x5d7239(0xc9));let _0x178b02,_0x15da8a,_0x1509dd;try{const _0x2ba9d4=await fetchMenuData(_0x4d56af[_0x5d7239(0xd2)],_0x4d56af['cookie']);_0x178b02=_0x2ba9d4[_0x5d7239(0xa3)],_0x15da8a=_0x2ba9d4[_0x5d7239(0xbb)],_0x1509dd=_0x2ba9d4['onlineMenuList'],stopSpinner(_0x165c4f,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x59e5fc){stopSpinner(_0x165c4f,_0x5d7239(0xa1),![]);throw CliErrors['validation'](_0x59e5fc instanceof Error?_0x59e5fc[_0x5d7239(0x9e)]:_0x5d7239(0xa1));}if(_0x178b02['length']===0x0)return writeCliSideChannelLine(a174_0x3b4ce8[_0x5d7239(0xb4)](_0x5d7239(0xbc))),{'ok':!![]};const _0x104c5c=buildCompareRows(_0x178b02,_0x15da8a);writeCliSideChannelLine(renderCompareTable(_0x104c5c)),writeCliSideChannelLine('');const _0x10da11=await selectPages(_0x178b02,_0x15da8a);writeCliSideChannelLine(''),writeCliSideChannelLine(a174_0x3b4ce8[_0x5d7239(0xc6)](_0x5d7239(0xcd)+_0x10da11[_0x5d7239(0x9b)]+'\x20page(s)'));const _0xb899d4=_0x24cd78[_0x5d7239(0xb0)]&&_0x24cd78[_0x5d7239(0xa0)];if(!_0xb899d4){writeCliSideChannelLine(renderSyncSummary(_0x10da11,_0x15da8a['size']>0x0));const _0x4b4b98=await askConfirm(_0x5d7239(0xb7));if(!_0x4b4b98)return writeCliSideChannelLine(a174_0x3b4ce8['gray'](_0x5d7239(0xcc))),{'ok':!![]};}let _0x2ca414=_0x24cd78['jsUrl'],_0x1d9699=_0x24cd78[_0x5d7239(0xa0)];!_0x2ca414&&(_0x2ca414=await askJsUrl());!_0x1d9699&&(_0x1d9699=await askCssUrl());const _0x3b43d2=await askConfirm(_0x5d7239(0xab)+_0x10da11[_0x5d7239(0x9b)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x2ca414+_0x5d7239(0xdd)+_0x1d9699+'?');if(!_0x3b43d2)return writeCliSideChannelLine(a174_0x3b4ce8[_0x5d7239(0xad)](_0x5d7239(0xcc))),{'ok':!![]};const _0x5ad321=[_0x2ca414,_0x1d9699],_0x576de2=startSpinner('Creating\x20'+_0x10da11[_0x5d7239(0x9b)]+'\x20menu(s)...');try{const _0x264b2c=await doCreateMenus(_0x4d56af['appCode'],_0x4d56af[_0x5d7239(0xd9)],_0x10da11,_0x5ad321);return stopSpinner(_0x576de2,'Created\x20'+_0x264b2c[_0x5d7239(0xac)]+_0x5d7239(0xcf),!![]),{'ok':!![],'data':_0x264b2c,'message':_0x5d7239(0xce)+_0x264b2c[_0x5d7239(0xac)]+_0x5d7239(0xd5)+_0x264b2c[_0x5d7239(0x9c)]+_0x5d7239(0xcb)};}catch(_0x593e94){stopSpinner(_0x576de2,_0x5d7239(0xaf),![]);throw CliErrors[_0x5d7239(0x9f)](_0x593e94 instanceof Error?_0x593e94['message']:_0x5d7239(0xaf));}}};function ensureRunnableContext(_0x440f0e,_0x5d5a98){const _0xa30355=a174_0x19f7a5,_0x4ed3a7=_0x440f0e[_0xa30355(0xd3)]?String(_0x440f0e[_0xa30355(0xd3)])[_0xa30355(0xdb)]():'';if(!isInProject()&&!_0x5d5a98&&!_0x4ed3a7)throw CliErrors[_0xa30355(0x9f)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0xa30355(0xb9));}function parsePaths(_0x2995d7){const _0x57a3b7=a174_0x19f7a5;return[...new Set(_0x2995d7[_0x57a3b7(0xd8)](',')[_0x57a3b7(0xdc)](_0xa3f370=>_0xa3f370['trim']())['filter'](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a175_0x157ea1=a175_0x4d5d;(function(_0x4a1416,_0x1b0676){const _0x40d62f=a175_0x4d5d,_0x88b115=_0x4a1416();while(!![]){try{const _0xc4b954=-parseInt(_0x40d62f(0x72))/0x1+parseInt(_0x40d62f(0x92))/0x2+-parseInt(_0x40d62f(0x90))/0x3*(-parseInt(_0x40d62f(0xb3))/0x4)+parseInt(_0x40d62f(0x6f))/0x5*(-parseInt(_0x40d62f(0x87))/0x6)+-parseInt(_0x40d62f(0xc6))/0x7+-parseInt(_0x40d62f(0x69))/0x8+parseInt(_0x40d62f(0x91))/0x9;if(_0xc4b954===_0x1b0676)break;else _0x88b115['push'](_0x88b115['shift']());}catch(_0x8c2655){_0x88b115['push'](_0x88b115['shift']());}}}(a175_0x35f0,0x6788b));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a175_0x4d5d(_0xee480c,_0x26fd3f){_0xee480c=_0xee480c-0x64;const _0x35f053=a175_0x35f0();let _0x4d5d23=_0x35f053[_0xee480c];return _0x4d5d23;}import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a175_0x35f0(){const _0x44d032=['Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','expect-visible','failed','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','number','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','childrenIds','5834320hWtnCJ','update-menu-visibility','childrenCount','Final\x20menu\x20visibility\x20readback\x20failed.','map','menu_permission_denied','55DnAYCM','\x20updated,\x20','values','810891lUeZPC','appCode','\x20menu(s);\x20skipped\x20','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','stringify','hash','flagMissing','paths','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','recovered','Updated\x20visibility\x20for\x20','Menu\x20path\x20selector\x20not\x20found:\x20','plan','menu','length','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','sort','url','join','visibility-update','POST','27636FJVUrp','high-risk-write','resources','expectedCount','code','Response\x20was\x20lost\x20and\x20menu\x20','Menu\x20id\x20selector(s)\x20not\x20found:\x20','updated','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','15FEoenZ','15123177cwFXOt','1375514rZBJPd','num','validation','boolean','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','menus','menu\x20list','menuIds','split','rawFlags','menu_selector_ambiguous','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','isSafeInteger','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','before','str','trim','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','visible','update-recovery','Selected\x20','menu_verification_failed','path','get','\x20skipped,\x20','true','some','set','string','/smartapi/menu/update','Menu\x20','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','depth','371460MjWjtC','modelType','datasetCode','Response\x20was\x20lost\x20for\x20menu\x20','type','byId','warnings','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','message','\x20unchanged\x20menu(s).','has','push','update\x20menu\x20visibility','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','\x20changed\x20unexpectedly.','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','Would\x20update\x20visibility\x20for\x20','verification','5722591VwFDCx','\x20failed.','requestedVisible','\x20must\x20be\x20true\x20or\x20false.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','\x20menu(s),\x20expected\x20','datasetId','pageType','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','filter','label','false','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','plannedActions','beforeById','pageId','resourcesValid','parentId','isArray','expected-count','menu-ids','Requested\x20menu\x20visibility'];a175_0x35f0=function(){return _0x44d032;};return a175_0x35f0();}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_0x157ea1(0x86),'path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a175_0x157ea1(0x7f),'command':a175_0x157ea1(0x85),'description':a175_0x157ea1(0x64),'risk':a175_0x157ea1(0x88),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':a175_0x157ea1(0xae),'description':a175_0x157ea1(0x7a)},{'name':a175_0x157ea1(0x79),'type':a175_0x157ea1(0xae),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a175_0x157ea1(0xa4),'type':a175_0x157ea1(0x95),'required':!![],'description':a175_0x157ea1(0xdb)},{'name':'expect-visible','type':'boolean','description':a175_0x157ea1(0xba)},{'name':'expected-count','type':a175_0x157ea1(0x66),'description':a175_0x157ea1(0x75)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x10156a){parseInput(_0x10156a),requireExplicitYes(_0x10156a);},async 'dryRun'(_0x22b250){const _0x8cea8f=a175_0x157ea1,_0x14a10a=await buildPlan(_0x22b250,!![]),_0x50a99d=_0x14a10a['plan'][_0x8cea8f(0xd3)]?.[_0x8cea8f(0x80)]??0x0,_0x238083=_0x14a10a[_0x8cea8f(0x7e)]['targets'][_0x8cea8f(0x80)]-_0x50a99d;return menuDryRunResult(_0x14a10a[_0x8cea8f(0x7e)],{'method':_0x8cea8f(0x86),'url':_0x8cea8f(0xaf),'body':{'updates':_0x14a10a[_0x8cea8f(0x7e)][_0x8cea8f(0xd3)]?.[_0x8cea8f(0x6d)](_0x2f30a8=>_0x2f30a8['body'])??[]},'description':_0x8cea8f(0xc4)+_0x50a99d+'\x20menu(s);\x20skip\x20'+_0x238083+_0x8cea8f(0xbd)});},async 'execute'(_0x9569e8){const _0x42551f=a175_0x157ea1;requireExplicitYes(_0x9569e8);const _0x415b60=await buildPlan(_0x9569e8,![]);await recheckMutationSnapshot(_0x9569e8,_0x415b60['plan'],_0x42551f(0xc0));const _0x423651=[],_0x29a3d0=[],_0x1ef372=[];for(const _0x453989 of _0x415b60['plan']['targets']){if(_0x453989[_0x42551f(0xa0)][_0x42551f(0xa4)]===_0x415b60[_0x42551f(0x7e)]['requestedVisible']){_0x423651[_0x42551f(0xbf)]({'id':_0x453989['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x9569e8[_0x42551f(0x73)],_0x9569e8['cookie'],{'id':_0x453989['id'],'visible':_0x415b60['plan']['requestedVisible']}),_0x423651[_0x42551f(0xbf)]({'id':_0x453989['id'],'updated':!![],'skipped':![]});}catch(_0x2abcbe){const _0x5b5b20=mapMenuApiError(_0x2abcbe,'update\x20visibility\x20for',_0x453989['id']);if(isMenuResponseLoss(_0x2abcbe)&&_0x5b5b20[_0x42551f(0x8b)]!==_0x42551f(0x6e)){_0x1ef372[_0x42551f(0xbf)](_0x453989['id']);continue;}_0x29a3d0[_0x42551f(0xbf)]({'id':_0x453989['id'],'stage':'update','code':_0x5b5b20['code'],'message':_0x5b5b20[_0x42551f(0xbc)]});}}let _0x40cf39;try{_0x40cf39=await fetchMenuSnapshot(_0x9569e8[_0x42551f(0x73)],_0x9569e8['cookie']);}catch(_0x33f97b){const _0x5b7aeb=describeMenuErrorCause(_0x33f97b,'verify\x20menu\x20visibility\x20update'),_0xc91008=_0x1ef372[_0x42551f(0x6d)](_0x20d17c=>({'id':_0x20d17c,'stage':_0x42551f(0xa5),'code':_0x42551f(0xa7),'message':_0x42551f(0xb6)+_0x20d17c+_0x42551f(0xce),'requestedStateConfirmed':![],'recovered':![]})),_0x17013f={'stage':_0x42551f(0xc5),'code':_0x42551f(0xa7),'message':_0x42551f(0x6c),'targetIds':_0x415b60[_0x42551f(0x7e)]['targets'][_0x42551f(0x6d)](_0x6c9eb5=>_0x6c9eb5['id']),'requestedStateConfirmed':![],..._0x5b7aeb};throw menuFailure(asVerificationError(_0x33f97b,_0x42551f(0x96)),_0x415b60[_0x42551f(0x7e)],{'stage':_0x42551f(0xc5),'succeeded':_0x423651,'failedRecords':[..._0x29a3d0,..._0xc91008,_0x17013f],'warnings':[_0x42551f(0x67)],'verification':{'status':_0x42551f(0xde),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x1cf2f2=[];for(const _0xc14584 of _0x423651){const _0x2ce194=Number(_0xc14584['id']),_0xae8eeb=_0x415b60[_0x42551f(0xd4)]['get'](_0x2ce194),_0x516746=_0x40cf39['byId'][_0x42551f(0xa9)](_0x2ce194);try{verifyVisibilityUpdate(_0xae8eeb,_0x516746,_0x415b60[_0x42551f(0x7e)][_0x42551f(0xc8)]);}catch(_0x1e17a6){const _0x41946f=asVerificationError(_0x1e17a6,'Menu\x20'+_0x2ce194+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x1cf2f2['push']({'id':_0x2ce194,'stage':_0x42551f(0xc5),'code':_0x41946f[_0x42551f(0x8b)],'message':_0x41946f['message'],'requestedStateConfirmed':![]});}}for(const _0x181db5 of _0x1ef372){const _0x565baa=_0x415b60['beforeById'][_0x42551f(0xa9)](_0x181db5),_0x5025b4=_0x40cf39[_0x42551f(0xb8)]['get'](_0x181db5);try{verifyVisibilityUpdate(_0x565baa,_0x5025b4,_0x415b60[_0x42551f(0x7e)][_0x42551f(0xc8)]),_0x423651['push']({'id':_0x181db5,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x1cc576){const _0x53bcdf=asVerificationError(_0x1cc576,_0x42551f(0x8c)+_0x181db5+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x1cf2f2[_0x42551f(0xbf)]({'id':_0x181db5,'stage':_0x42551f(0xa5),'code':_0x53bcdf[_0x42551f(0x8b)],'message':_0x53bcdf['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x1cf2f2[_0x42551f(0x80)]>0x0){const _0x250396=_0x1cf2f2[_0x42551f(0x6d)](_0x555d35=>Number(_0x555d35['id'])),_0x6159ad=_0x423651[_0x42551f(0xcf)](_0x11f56=>_0x11f56[_0x42551f(0x7b)]===!![])[_0x42551f(0x80)],_0x44f12c=menuError(_0x42551f(0xa7),_0x42551f(0x9f)+_0x250396[_0x42551f(0x84)](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x44f12c,_0x415b60[_0x42551f(0x7e)],{'stage':'verification','succeeded':_0x423651,'failedRecords':[..._0x29a3d0,..._0x1cf2f2],'warnings':[_0x42551f(0xc1)],'verification':{'status':_0x42551f(0xde),..._0x250396['length']===0x1?{'targetId':_0x250396[0x0]}:{'targetIds':_0x250396},'recoveredCount':_0x6159ad,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x197d79=_0x423651[_0x42551f(0xcf)](_0x4bd4b7=>_0x4bd4b7[_0x42551f(0x8e)]===!![])[_0x42551f(0x80)],_0xb71b03=_0x423651['length']-_0x197d79,_0xd970ca={..._0x415b60[_0x42551f(0x7e)],'succeeded':_0x423651,'failed':_0x29a3d0,'warnings':_0x29a3d0[_0x42551f(0x80)]>0x0?[..._0x415b60['plan'][_0x42551f(0xb9)],_0x42551f(0xbb)]:_0x415b60[_0x42551f(0x7e)]['warnings'],'verification':{'checkedBy':_0x42551f(0x98),'snapshotHash':_0x40cf39[_0x42551f(0x77)],'matchesRequestedState':_0x29a3d0[_0x42551f(0x80)]===0x0,'recoveredCount':_0x1ef372[_0x42551f(0x80)]}};return{'ok':_0x29a3d0[_0x42551f(0x80)]===0x0,'data':_0xd970ca,'message':_0x29a3d0[_0x42551f(0x80)]===0x0?_0x42551f(0x7c)+_0x197d79+_0x42551f(0x74)+_0xb71b03+_0x42551f(0xbd):'Menu\x20visibility\x20update\x20completed:\x20'+_0x197d79+_0x42551f(0x70)+_0xb71b03+_0x42551f(0xaa)+_0x29a3d0[_0x42551f(0x80)]+_0x42551f(0xc7)};}};function parseInput(_0x4984bc){const _0x51477a=a175_0x157ea1,_0x434982=parseMenuIds(_0x4984bc[_0x51477a(0xa1)](_0x51477a(0xda))),_0xfc7547=parseCsv(_0x4984bc[_0x51477a(0xa1)](_0x51477a(0x79)));if(_0x434982[_0x51477a(0x80)]===0x0&&_0xfc7547[_0x51477a(0x80)]===0x0)throw CliErrors['validation'](_0x51477a(0x65));const _0x521a74=parseBooleanFlag(_0x4984bc,'visible',!![]),_0xa0981f=parseBooleanFlag(_0x4984bc,_0x51477a(0xdd),![]);let _0x741750;if(hasFlag(_0x4984bc,_0x51477a(0xd9))){_0x741750=_0x4984bc[_0x51477a(0x93)](_0x51477a(0xd9));if(!Number[_0x51477a(0x9e)](_0x741750)||_0x741750<0x0)throw CliErrors[_0x51477a(0x94)](_0x51477a(0xa3));}return{'menuIds':_0x434982,'paths':_0xfc7547,'visible':_0x521a74,'expectVisible':_0xa0981f,'expectedCount':_0x741750};}async function buildPlan(_0x49f2c9,_0x17945f){const _0x23b4a9=a175_0x157ea1,_0x49d2c3=parseInput(_0x49f2c9),_0x515137=await fetchMutationSnapshot(_0x49f2c9,_0x23b4a9(0xc0)),_0x488809=selectTargets(_0x515137[_0x23b4a9(0x97)],_0x49d2c3[_0x23b4a9(0x99)],_0x49d2c3[_0x23b4a9(0x79)]);if(_0x49d2c3[_0x23b4a9(0x8a)]!==undefined&&_0x488809['length']!==_0x49d2c3[_0x23b4a9(0x8a)])throw menuError('menu_expected_count_mismatch',_0x23b4a9(0xa6)+_0x488809[_0x23b4a9(0x80)]+_0x23b4a9(0xcb)+_0x49d2c3['expectedCount']+'.',_0x23b4a9(0x8f));if(_0x49d2c3['expectVisible']!==undefined){const _0xada910=_0x488809[_0x23b4a9(0xcf)](_0x197518=>_0x197518[_0x23b4a9(0xa4)]!==_0x49d2c3['expectVisible']);if(_0xada910[_0x23b4a9(0x80)]>0x0)throw menuError('menu_state_drift',_0x23b4a9(0xd2)+_0xada910[_0x23b4a9(0x6d)](_0x2eb2bf=>_0x2eb2bf['id'])['join'](',\x20')+'.',_0x23b4a9(0x81));}const _0x1722d4=_0x488809[_0x23b4a9(0x6d)](_0x189906=>({'id':_0x189906['id'],'label':_0x189906['label'],'path':_0x189906['path'],'before':{'visible':_0x189906[_0x23b4a9(0xa4)]},'after':{'visible':_0x49d2c3['visible']}})),_0x559997=_0x1722d4[_0x23b4a9(0xcf)](_0x3635b7=>_0x3635b7[_0x23b4a9(0xa0)][_0x23b4a9(0xa4)]!==_0x49d2c3[_0x23b4a9(0xa4)])[_0x23b4a9(0x6d)](_0x4d7c5f=>({'stage':_0x23b4a9(0x6a),'method':'POST','path':_0x23b4a9(0xaf),'body':{'appCode':_0x49f2c9['appCode'],'id':_0x4d7c5f['id'],'visible':_0x49d2c3[_0x23b4a9(0xa4)]}})),_0x2f6c51=mutationResult({'operation':_0x23b4a9(0x85),'selector':{'menuIds':_0x49d2c3[_0x23b4a9(0x99)],'paths':_0x49d2c3[_0x23b4a9(0x79)]},'before':{'menus':_0x488809[_0x23b4a9(0x6d)](_0x193787=>({'id':_0x193787['id'],'path':_0x193787['path'],'visible':_0x193787[_0x23b4a9(0xa4)]}))},'after':{'menus':_0x488809['map'](_0xdeddea=>({'id':_0xdeddea['id'],'path':_0xdeddea[_0x23b4a9(0xa8)],'visible':_0x49d2c3[_0x23b4a9(0xa4)]}))},'dryRun':_0x17945f,'backend':[...BACKEND],'plannedActions':_0x559997,'snapshotHash':_0x515137[_0x23b4a9(0x77)],'warnings':_0x559997['length']===0x0?[_0x23b4a9(0xc3)]:[]});return{'plan':{..._0x2f6c51,'requestedVisible':_0x49d2c3[_0x23b4a9(0xa4)],'targets':_0x1722d4},'beforeById':new Map(_0x488809['map'](_0x1e4ad9=>[_0x1e4ad9['id'],_0x1e4ad9]))};}function selectTargets(_0x4403b2,_0xa3c37a,_0x38d961){const _0x4c1125=a175_0x157ea1,_0x42c8f1=new Map(_0x4403b2[_0x4c1125(0x6d)](_0x14c2d7=>[_0x14c2d7['id'],_0x14c2d7])),_0x201627=new Map(),_0x6f0071=_0xa3c37a[_0x4c1125(0xcf)](_0x37b25e=>!_0x42c8f1[_0x4c1125(0xbe)](_0x37b25e));if(_0x6f0071['length']>0x0)throw menuError('menu_selector_not_found',_0x4c1125(0x8d)+_0x6f0071[_0x4c1125(0x84)](',\x20')+'.',_0x4c1125(0x9d));for(const _0xac001f of _0xa3c37a){_0x201627[_0x4c1125(0xad)](_0xac001f,_0x42c8f1[_0x4c1125(0xa9)](_0xac001f));}for(const _0x1f327c of _0x38d961){const _0x3f7752=_0x4403b2[_0x4c1125(0xcf)](_0x13dc85=>_0x13dc85['path']===_0x1f327c);if(_0x3f7752[_0x4c1125(0x80)]===0x0)throw menuError('menu_selector_not_found',_0x4c1125(0x7d)+JSON[_0x4c1125(0x76)](_0x1f327c)+'.',_0x4c1125(0xdc));if(_0x3f7752[_0x4c1125(0x80)]>0x1)throw menuError(_0x4c1125(0x9c),_0x4c1125(0xb1)+JSON[_0x4c1125(0x76)](_0x1f327c)+'.',_0x4c1125(0xca)+_0x3f7752['map'](_0x1cf48d=>_0x1cf48d['id'])[_0x4c1125(0x84)](',\x20')+'.');const _0x5c3c88=_0x3f7752[0x0];_0x201627[_0x4c1125(0xad)](_0x5c3c88['id'],_0x5c3c88);}return[..._0x201627[_0x4c1125(0x71)]()];}function parseMenuIds(_0x3904bc){const _0xe537f9=a175_0x157ea1,_0x26ffb9=parseCsv(_0x3904bc),_0x3665dc=_0x26ffb9[_0xe537f9(0x6d)](Number);if(_0x3665dc[_0xe537f9(0xac)](_0x1d6f98=>!Number[_0xe537f9(0x9e)](_0x1d6f98)||_0x1d6f98<=0x0))throw CliErrors['validation']('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x3665dc)];}function parseCsv(_0x4e3113){const _0x31c5b5=a175_0x157ea1;return[...new Set(_0x4e3113[_0x31c5b5(0x9a)](',')['map'](_0x49890f=>_0x49890f[_0x31c5b5(0xa2)]())[_0x31c5b5(0xcf)](Boolean))];}function parseBooleanFlag(_0x530496,_0x45b01c,_0xf6c496){const _0x4f90b1=a175_0x157ea1;if(!hasFlag(_0x530496,_0x45b01c)){if(_0xf6c496)throw CliErrors[_0x4f90b1(0x78)](_0x45b01c);return undefined;}const _0x442407=_0x530496[_0x4f90b1(0x9b)][_0x45b01c];if(_0x442407===!![]||_0x442407===![])return _0x442407;if(_0x442407===_0x4f90b1(0xab))return!![];if(_0x442407===_0x4f90b1(0xd1))return![];throw CliErrors[_0x4f90b1(0x94)]('--'+_0x45b01c+_0x4f90b1(0xc9));}function verifyVisibilityUpdate(_0x3b35ba,_0x2508cd,_0x409582){const _0x152729=a175_0x157ea1;assertVerified(!!_0x2508cd,_0x152729(0xb0)+_0x3b35ba['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x2508cd[_0x152729(0xa4)]===_0x409582,_0x152729(0xb0)+_0x3b35ba['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x343268=[['id',_0x2508cd['id'],_0x3b35ba['id']],['parentId',_0x2508cd[_0x152729(0xd7)],_0x3b35ba[_0x152729(0xd7)]],['depth',_0x2508cd['depth'],_0x3b35ba[_0x152729(0xb2)]],['label',_0x2508cd['label'],_0x3b35ba[_0x152729(0xd0)]],[_0x152729(0xa8),_0x2508cd[_0x152729(0xa8)],_0x3b35ba['path']],[_0x152729(0x83),_0x2508cd['url'],_0x3b35ba[_0x152729(0x83)]],[_0x152729(0xb7),_0x2508cd[_0x152729(0xb7)],_0x3b35ba[_0x152729(0xb7)]],[_0x152729(0x82),_0x2508cd[_0x152729(0x82)],_0x3b35ba[_0x152729(0x82)]],['resources',_0x2508cd[_0x152729(0x89)],_0x3b35ba[_0x152729(0x89)]],[_0x152729(0xd6),_0x2508cd[_0x152729(0xd6)],_0x3b35ba[_0x152729(0xd6)]],['childrenIds',_0x2508cd[_0x152729(0x68)],_0x3b35ba['childrenIds']],['childrenCount',_0x2508cd[_0x152729(0x6b)],_0x3b35ba['childrenCount']],[_0x152729(0xd5),_0x2508cd[_0x152729(0xd5)],_0x3b35ba[_0x152729(0xd5)]],[_0x152729(0xcd),_0x2508cd[_0x152729(0xcd)],_0x3b35ba[_0x152729(0xcd)]],[_0x152729(0xb4),_0x2508cd[_0x152729(0xb4)],_0x3b35ba['modelType']],[_0x152729(0xcc),_0x2508cd[_0x152729(0xcc)],_0x3b35ba[_0x152729(0xcc)]],[_0x152729(0xb5),_0x2508cd[_0x152729(0xb5)],_0x3b35ba[_0x152729(0xb5)]]];for(const [_0x437a26,_0x532a33,_0x43d477]of _0x343268){assertVerified(sameValue(_0x532a33,_0x43d477),'Menu\x20'+_0x3b35ba['id']+'\x20'+_0x437a26+_0x152729(0xc2));}}function sameValue(_0x5be81b,_0x2e6d00){const _0x22660f=a175_0x157ea1;if(Array[_0x22660f(0xd8)](_0x5be81b)||Array['isArray'](_0x2e6d00))return JSON[_0x22660f(0x76)](_0x5be81b)===JSON[_0x22660f(0x76)](_0x2e6d00);return _0x5be81b===_0x2e6d00;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a176_0x338fc2=a176_0x3346;function a176_0x3346(_0x13495a,_0x2392ed){_0x13495a=_0x13495a-0x165;const _0x4a2f87=a176_0x4a2f();let _0x334612=_0x4a2f87[_0x13495a];return _0x334612;}(function(_0x5afafe,_0x10836a){const _0xe1a53=a176_0x3346,_0x1d1645=_0x5afafe();while(!![]){try{const _0x104765=parseInt(_0xe1a53(0x168))/0x1+parseInt(_0xe1a53(0x177))/0x2+parseInt(_0xe1a53(0x16e))/0x3*(parseInt(_0xe1a53(0x183))/0x4)+-parseInt(_0xe1a53(0x184))/0x5*(parseInt(_0xe1a53(0x178))/0x6)+-parseInt(_0xe1a53(0x175))/0x7+-parseInt(_0xe1a53(0x176))/0x8*(-parseInt(_0xe1a53(0x189))/0x9)+-parseInt(_0xe1a53(0x182))/0xa;if(_0x104765===_0x10836a)break;else _0x1d1645['push'](_0x1d1645['shift']());}catch(_0x2cbe76){_0x1d1645['push'](_0x1d1645['shift']());}}}(a176_0x4a2f,0x4f2dd));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a176_0x338fc2(0x17c);function a176_0x4a2f(){const _0xeb13c=[';\x20do\x20not\x20resubmit\x20automatically.','515835PtthNt','verified','POST','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source',';\x20do\x20not\x20resubmit.','readTimeout','12encxZN','description','verification','appCode','config-create','Created\x20notification\x20config\x20','channelType','1238447mFdpIU','18312riyZEl','1078934GJBKRZ','156cJtSDn','write','channelConfig','configCode','/notification/channel-config/create','planned','isSafeInteger','create','notification_config_create_outcome_unknown','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','8006630dwZUHe','389828vFYEuJ','98415qnvURl','connectTimeout','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','configName','document','1449IcBTWW','input',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Inspect\x20with\x20'];a176_0x4a2f=function(){return _0xeb13c;};return a176_0x4a2f();}async function prepareCreate(_0x118003){const _0x105089=a176_0x338fc2,_0x2814fd=await readNotificationDocument(_0x118003,'create'),_0x462fb1=createMutationInput(_0x118003[_0x105089(0x171)],_0x2814fd);return{'document':_0x2814fd,'input':_0x462fb1,'planned':projectNotificationConfig({'appCode':_0x118003[_0x105089(0x171)],'configName':_0x2814fd['configName'],'channelType':_0x2814fd[_0x105089(0x174)],'endpointUrl':_0x2814fd['endpointUrl'],'channelConfig':_0x2814fd[_0x105089(0x17a)],'description':_0x2814fd[_0x105089(0x16f)],'connectTimeout':_0x2814fd[_0x105089(0x185)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x2814fd[_0x105089(0x16d)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':a176_0x338fc2(0x172),'description':a176_0x338fc2(0x16b),'risk':a176_0x338fc2(0x179),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4bd290){assertSingleNotificationSource(_0x4bd290);},async 'dryRun'(_0x5403f6){const _0x2e8047=a176_0x338fc2,_0x2aa83f=await prepareCreate(_0x5403f6),_0x2aac2e=notificationLookupCommand(_0x5403f6[_0x2e8047(0x171)],_0x2aa83f['document']['channelType']);return asDryRunResult({'operation':_0x2e8047(0x17f),'selector':{'appCode':_0x5403f6['appCode'],'configName':_0x2aa83f[_0x2e8047(0x188)][_0x2e8047(0x187)],'channelType':_0x2aa83f[_0x2e8047(0x188)]['channelType']},'before':null,'after':_0x2aa83f[_0x2e8047(0x17d)],'dryRun':!![],'backend':{'method':_0x2e8047(0x16a),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x2e8047(0x17d),'lookupCommand':_0x2aac2e}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x5946b0){const _0x15390e=a176_0x338fc2,_0x3e9c8d=await prepareCreate(_0x5946b0),_0x1585d6=notificationLookupCommand(_0x5946b0[_0x15390e(0x171)],_0x3e9c8d[_0x15390e(0x188)][_0x15390e(0x174)]);let _0x47d19f;try{_0x47d19f=await createNotificationChannelConfig(_0x3e9c8d[_0x15390e(0x18a)]);}catch(_0x370b89){if(isPlatformTransportFailure(_0x370b89))throw notificationError('notification_config_create_outcome_unknown',_0x15390e(0x181),'Inspect\x20with\x20'+_0x1585d6+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x15390e(0x17f),'mutation',_0x15390e(0x166)+_0x1585d6+_0x15390e(0x165));}if(!Number[_0x15390e(0x17e)](_0x47d19f)||_0x47d19f<=0x0)throw notificationError(_0x15390e(0x180),_0x15390e(0x186),'Inspect\x20with\x20'+_0x1585d6+_0x15390e(0x16c));let _0x190554;try{const _0x44ed28=await getNotificationChannelConfig(_0x47d19f,_0x5946b0[_0x15390e(0x171)]);_0x190554=normalizeExactNotificationConfig(_0x44ed28,_0x47d19f,_0x5946b0[_0x15390e(0x171)]);}catch{throw safeApiFailure(_0x15390e(0x17f),_0x15390e(0x170),_0x15390e(0x166)+_0x1585d6+_0x15390e(0x167));}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x190554[_0x15390e(0x171)],'id':_0x190554['id'],'configCode':_0x190554[_0x15390e(0x17b)],'configName':_0x190554[_0x15390e(0x187)],'channelType':_0x190554[_0x15390e(0x174)]},'before':null,'after':projectNotificationConfig(_0x190554),'dryRun':![],'backend':{'method':_0x15390e(0x16a),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x15390e(0x169),'lookupCommand':_0x1585d6}},'message':_0x15390e(0x173)+_0x190554['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a177_0x4e49(){const _0x32add4=['/notification/channel-config/delete','616176GKtgDJ','high-risk-write','7271847rvuwyd','appCode','delete','unshift','config-delete','before','notification_config_delete_verification_failed','214552QBHbiw','1696806VDylGF','9384sdihND','\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20','channelType','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','1255205tdwTFp','339bWBTRS','POST','1VLfdzA','notification_config_delete_outcome_unknown','1283030STQRRK','Notification\x20config\x20','mutation',';\x20do\x20not\x20resubmit\x20automatically.','Deleted\x20notification\x20config\x20','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.',';\x20no\x20automatic\x20retry\x20was\x20attempted.'];a177_0x4e49=function(){return _0x32add4;};return a177_0x4e49();}const a177_0x41c30a=a177_0x1061;(function(_0x206449,_0x26222e){const _0x1567b6=a177_0x1061,_0x372b8a=_0x206449();while(!![]){try{const _0x5810b1=-parseInt(_0x1567b6(0x1a3))/0x1*(-parseInt(_0x1567b6(0x199))/0x2)+parseInt(_0x1567b6(0x1a1))/0x3*(parseInt(_0x1567b6(0x19b))/0x4)+parseInt(_0x1567b6(0x1a5))/0x5+parseInt(_0x1567b6(0x19a))/0x6+parseInt(_0x1567b6(0x1a0))/0x7+-parseInt(_0x1567b6(0x190))/0x8+-parseInt(_0x1567b6(0x192))/0x9;if(_0x5810b1===_0x26222e)break;else _0x372b8a['push'](_0x372b8a['shift']());}catch(_0x248337){_0x372b8a['push'](_0x372b8a['shift']());}}}(a177_0x4e49,0x3250b));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a177_0x1061(_0x178a69,_0xc5239d){_0x178a69=_0x178a69-0x18d;const _0x4e49a4=a177_0x4e49();let _0x1061a3=_0x4e49a4[_0x178a69];return _0x1061a3;}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_0x41c30a(0x18f),REFERENCE_WARNING=a177_0x41c30a(0x18d);async function prepareDelete(_0x3e2f36){const _0x30c98a=a177_0x41c30a,_0x2d6540=readNotificationId(_0x3e2f36),_0x2f30ec=await requireExactNotificationConfig(_0x3e2f36['appCode'],_0x2d6540,_0x30c98a(0x194));return{'id':_0x2d6540,'before':_0x2f30ec};}export const notificationConfigDelete={'service':'notification','command':a177_0x41c30a(0x196),'description':'Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','risk':a177_0x41c30a(0x191),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0xe14819){readNotificationId(_0xe14819),requireNotificationExplicitYes(_0xe14819);},async 'dryRun'(_0x13fe03){const _0x4ffee4=a177_0x41c30a,_0x29c245=await prepareDelete(_0x13fe03),_0x33e5f9=notificationLookupCommand(_0x13fe03['appCode'],_0x29c245[_0x4ffee4(0x197)][_0x4ffee4(0x19e)]);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x29c245['before']),'before':projectNotificationConfig(_0x29c245[_0x4ffee4(0x197)]),'after':null,'dryRun':!![],'backend':{'method':_0x4ffee4(0x1a2),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x33e5f9}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x2898f7){const _0x36c1fa=a177_0x41c30a;requireNotificationExplicitYes(_0x2898f7);const _0x318187=await prepareDelete(_0x2898f7),_0x1320af=notificationLookupCommand(_0x2898f7[_0x36c1fa(0x193)],_0x318187[_0x36c1fa(0x197)][_0x36c1fa(0x19e)]);let _0x5d4f80=![];try{await deleteNotificationChannelConfig(_0x318187['id'],_0x2898f7[_0x36c1fa(0x193)]);}catch(_0x5f29e8){if(!isPlatformTransportFailure(_0x5f29e8))throw safeApiFailure(_0x36c1fa(0x194),_0x36c1fa(0x1a7),_0x36c1fa(0x19d)+_0x1320af+_0x36c1fa(0x18e));_0x5d4f80=!![];}let _0x42b167;try{_0x42b167=await listNotificationChannelConfigs(_0x2898f7[_0x36c1fa(0x193)],_0x318187[_0x36c1fa(0x197)][_0x36c1fa(0x19e)]),validateNotificationDeleteReadback(_0x42b167,_0x2898f7['appCode'],_0x318187['before'][_0x36c1fa(0x19e)]);}catch{throw notificationError(_0x5d4f80?_0x36c1fa(0x1a4):'notification_config_delete_verification_unavailable',_0x36c1fa(0x1a6)+_0x318187['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x36c1fa(0x19d)+_0x1320af+_0x36c1fa(0x1a8));}if(_0x42b167['some'](_0x1b17de=>_0x1b17de['id']===_0x318187['id']))throw notificationError(_0x5d4f80?_0x36c1fa(0x1a4):_0x36c1fa(0x198),_0x36c1fa(0x1a6)+_0x318187['id']+_0x36c1fa(0x19c),_0x36c1fa(0x19d)+_0x1320af+_0x36c1fa(0x1a8));const _0x4ee2ed=[REFERENCE_WARNING];return _0x5d4f80&&_0x4ee2ed[_0x36c1fa(0x195)](_0x36c1fa(0x19f)),{'ok':!![],'data':{'operation':_0x36c1fa(0x194),'selector':notificationSelector(_0x318187['before']),'before':projectNotificationConfig(_0x318187[_0x36c1fa(0x197)]),'after':null,'dryRun':![],'backend':{'method':_0x36c1fa(0x1a2),'path':DELETE_PATH},'warnings':_0x4ee2ed,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x5d4f80,'lookupCommand':_0x1320af}},'message':_0x36c1fa(0x1a9)+_0x318187['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a178_0x248c43=a178_0x17da;(function(_0x103f29,_0x10cd04){const _0x38fdfd=a178_0x17da,_0x5cfcd4=_0x103f29();while(!![]){try{const _0x235c4e=-parseInt(_0x38fdfd(0xa7))/0x1+-parseInt(_0x38fdfd(0xa6))/0x2*(-parseInt(_0x38fdfd(0xab))/0x3)+parseInt(_0x38fdfd(0xae))/0x4*(-parseInt(_0x38fdfd(0xad))/0x5)+-parseInt(_0x38fdfd(0xbd))/0x6*(parseInt(_0x38fdfd(0xb9))/0x7)+parseInt(_0x38fdfd(0xb7))/0x8*(parseInt(_0x38fdfd(0xa4))/0x9)+-parseInt(_0x38fdfd(0xb2))/0xa+-parseInt(_0x38fdfd(0xbc))/0xb*(-parseInt(_0x38fdfd(0xa5))/0xc);if(_0x235c4e===_0x10cd04)break;else _0x5cfcd4['push'](_0x5cfcd4['shift']());}catch(_0x3b84a3){_0x5cfcd4['push'](_0x5cfcd4['shift']());}}}(a178_0x178f,0x56271));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a178_0x178f(){const _0x4e0c9b=['2247678GgmBOU','config-list','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','length','map','9ckAvxn','12lStPZT','26qMqbiQ','281753RKnTFU','all','string','flat','56367ZFiLGf','appCode','22915EDWEXZ','116iPOTXa','read','notification','validation','3593520pNIrAf','type','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','bool','Found\x20','3244216YmAdZi','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','7UfvtlE','Notification\x20channel\x20type','trim','9368942ImLWug'];a178_0x178f=function(){return _0x4e0c9b;};return a178_0x178f();}function a178_0x17da(_0x5242d7,_0x489627){_0x5242d7=_0x5242d7-0xa3;const _0x178f17=a178_0x178f();let _0x17da86=_0x178f17[_0x5242d7];return _0x17da86;}import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a178_0x248c43(0xb0),'command':a178_0x248c43(0xbe),'description':a178_0x248c43(0xb8),'risk':a178_0x248c43(0xaf),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a178_0x248c43(0xb3),'type':a178_0x248c43(0xa9),'description':a178_0x248c43(0xba),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a178_0x248c43(0xa8),'type':'boolean','default':![],'description':'List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type'}],async 'validate'(_0x5f3633){const _0x3a3b0b=a178_0x248c43;if(_0x5f3633[_0x3a3b0b(0xb5)](_0x3a3b0b(0xa8))&&_0x5f3633['str'](_0x3a3b0b(0xb3))[_0x3a3b0b(0xbb)]())throw CliErrors[_0x3a3b0b(0xb1)](_0x3a3b0b(0xbf),_0x3a3b0b(0xb4));if(_0x5f3633[_0x3a3b0b(0xb5)](_0x3a3b0b(0xa8)))return;readNotificationChannelType(_0x5f3633);},async 'execute'(_0x5bda9f){const _0x4e3bff=a178_0x248c43;if(_0x5bda9f[_0x4e3bff(0xb5)](_0x4e3bff(0xa8))){const _0x335a4f=await Promise[_0x4e3bff(0xa8)](NOTIFICATION_CHANNEL_TYPES[_0x4e3bff(0xa3)](_0x53903f=>listNotificationChannelConfigs(_0x5bda9f[_0x4e3bff(0xac)],_0x53903f))),_0x45351d=_0x335a4f[_0x4e3bff(0xaa)]()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5bda9f[_0x4e3bff(0xac)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x45351d[_0x4e3bff(0xc0)],'configs':_0x45351d},'message':_0x4e3bff(0xb6)+_0x45351d[_0x4e3bff(0xc0)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x569c8a=readNotificationChannelType(_0x5bda9f),_0x44c265=await listNotificationChannelConfigs(_0x5bda9f[_0x4e3bff(0xac)],_0x569c8a),_0x3c7d09=_0x44c265[_0x4e3bff(0xa3)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5bda9f[_0x4e3bff(0xac)],'channelType':_0x569c8a,'count':_0x3c7d09[_0x4e3bff(0xc0)],'configs':_0x3c7d09},'message':_0x4e3bff(0xb6)+_0x3c7d09['length']+'\x20'+_0x569c8a+'\x20notification\x20config(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a179_0x2df960=a179_0x2700;(function(_0x2bed98,_0x160c21){const _0x502058=a179_0x2700,_0x3eeb4f=_0x2bed98();while(!![]){try{const _0x12dee4=-parseInt(_0x502058(0x18a))/0x1+-parseInt(_0x502058(0x188))/0x2*(-parseInt(_0x502058(0x16a))/0x3)+-parseInt(_0x502058(0x173))/0x4+parseInt(_0x502058(0x16c))/0x5*(parseInt(_0x502058(0x189))/0x6)+parseInt(_0x502058(0x180))/0x7+parseInt(_0x502058(0x17a))/0x8+parseInt(_0x502058(0x17c))/0x9*(-parseInt(_0x502058(0x171))/0xa);if(_0x12dee4===_0x160c21)break;else _0x3eeb4f['push'](_0x3eeb4f['shift']());}catch(_0x2f7c5f){_0x3eeb4f['push'](_0x3eeb4f['shift']());}}}(a179_0x4b5f,0x649ff));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a179_0x2700(_0x2653d5,_0x27ebda){_0x2653d5=_0x2653d5-0x164;const _0x4b5f28=a179_0x4b5f();let _0x2700b9=_0x4b5f28[_0x2653d5];return _0x2700b9;}import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';function a179_0x4b5f(){const _0x420620=['planned','channelType','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','\x20with\x20','notification_config_update_verification_unavailable','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','1058811TlUgmI','Updated\x20notification\x20config\x20','3449995yWEqSP','/notification/channel-config/update','notification_config_update_verification_failed','appCode','provesChange','2950zibuVj',';\x20do\x20not\x20resubmit\x20automatically.','829884OMjbuQ','\x20via\x20','Inspect\x20ID\x20','Notification\x20config\x20','config-update','allMatch','update','2072440ERZRfw','notification','12492WSWdRr','notification_config_update_outcome_unknown','verifiedFields','mutation','1229718pZkcFi','POST',';\x20no\x20automatic\x20retry\x20was\x20attempted.','before','high-risk-write','patch','verified','payload','4fSAUDm','6fYRyWN','801512wUAGZk','Inspect\x20with\x20--id\x20','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.'];a179_0x4b5f=function(){return _0x420620;};return a179_0x4b5f();}const UPDATE_PATH=a179_0x2df960(0x16d);async function prepareUpdate(_0x1a9d8e){const _0x927663=readNotificationId(_0x1a9d8e),_0xcc185d=await readNotificationDocument(_0x1a9d8e,'update'),_0x46b02c=await requireExactNotificationConfig(_0x1a9d8e['appCode'],_0x927663,'update');return{'id':_0x927663,'patch':_0xcc185d,'before':_0x46b02c,'payload':mergeUpdateInput(_0x46b02c,_0xcc185d),'planned':plannedUpdateProjection(_0x46b02c,_0xcc185d)};}export const notificationConfigUpdate={'service':a179_0x2df960(0x17b),'command':a179_0x2df960(0x177),'description':a179_0x2df960(0x169),'risk':a179_0x2df960(0x184),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x46e3c9){readNotificationId(_0x46e3c9),assertSingleNotificationSource(_0x46e3c9),requireNotificationExplicitYes(_0x46e3c9);},async 'dryRun'(_0x16041f){const _0x94850=a179_0x2df960,_0x54c565=await prepareUpdate(_0x16041f),_0x1764ff=notificationLookupCommand(_0x16041f[_0x94850(0x16f)],_0x54c565[_0x94850(0x183)][_0x94850(0x165)]);return asDryRunResult({'operation':_0x94850(0x179),'selector':notificationSelector(_0x54c565['before']),'before':projectNotificationConfig(_0x54c565['before']),'after':_0x54c565[_0x94850(0x164)],'dryRun':!![],'backend':{'method':_0x94850(0x181),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x94850(0x164),'lookupCommand':_0x1764ff}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x44495d){const _0x193405=a179_0x2df960;requireNotificationExplicitYes(_0x44495d);const _0x569385=await prepareUpdate(_0x44495d),_0x3f7e94=notificationLookupCommand(_0x44495d[_0x193405(0x16f)],_0x569385[_0x193405(0x183)][_0x193405(0x165)]);let _0x4bbf0a=![];try{await updateNotificationChannelConfig(_0x569385[_0x193405(0x187)]);}catch(_0x6ee0d7){if(!isPlatformTransportFailure(_0x6ee0d7))throw safeApiFailure(_0x193405(0x179),_0x193405(0x17f),_0x193405(0x175)+_0x569385['id']+_0x193405(0x167)+_0x3f7e94+_0x193405(0x182));_0x4bbf0a=!![];}let _0x3ccde5;try{const _0x59b220=await getNotificationChannelConfig(_0x569385['id'],_0x44495d['appCode']);_0x3ccde5=normalizeExactNotificationConfig(_0x59b220,_0x569385['id'],_0x44495d['appCode']);}catch{throw notificationError(_0x4bbf0a?_0x193405(0x17d):_0x193405(0x168),_0x193405(0x176)+_0x569385['id']+_0x193405(0x166),_0x193405(0x18b)+_0x569385['id']+_0x193405(0x174)+_0x3f7e94+_0x193405(0x172));}const _0x3ea83b=requestedSafeFieldsMatch(_0x569385[_0x193405(0x183)],_0x3ccde5,_0x569385[_0x193405(0x185)]);if(!_0x3ea83b[_0x193405(0x178)]||_0x4bbf0a&&!_0x3ea83b[_0x193405(0x170)])throw notificationError(_0x4bbf0a?_0x193405(0x17d):_0x193405(0x16e),_0x193405(0x176)+_0x569385['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x193405(0x18b)+_0x569385['id']+_0x193405(0x174)+_0x3f7e94+';\x20do\x20not\x20resubmit\x20automatically.');const _0x5c640b=_0x4bbf0a?[_0x193405(0x18c)]:[];return{'ok':!![],'data':{'operation':_0x193405(0x179),'selector':notificationSelector(_0x3ccde5),'before':projectNotificationConfig(_0x569385[_0x193405(0x183)]),'after':projectNotificationConfig(_0x3ccde5),'dryRun':![],'backend':{'method':_0x193405(0x181),'path':UPDATE_PATH},'warnings':_0x5c640b,'verification':{'status':_0x193405(0x186),'recoveredAfterUnknownResponse':_0x4bbf0a,'verifiedFields':_0x3ea83b[_0x193405(0x17e)],'lookupCommand':_0x3f7e94}},'message':_0x193405(0x16b)+_0x3ccde5['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x9d753f,_0x1ae9d4){const _0x238872=a180_0x3ba3,_0x27b921=_0x9d753f();while(!![]){try{const _0x568f86=-parseInt(_0x238872(0x19b))/0x1+parseInt(_0x238872(0x19e))/0x2+parseInt(_0x238872(0x1a0))/0x3*(parseInt(_0x238872(0x19a))/0x4)+-parseInt(_0x238872(0x1a1))/0x5+parseInt(_0x238872(0x19d))/0x6+-parseInt(_0x238872(0x19c))/0x7+parseInt(_0x238872(0x19f))/0x8;if(_0x568f86===_0x1ae9d4)break;else _0x27b921['push'](_0x27b921['shift']());}catch(_0x183ab5){_0x27b921['push'](_0x27b921['shift']());}}}(a180_0x39dd,0x71bd0));function a180_0x3ba3(_0x36b4da,_0x28b5de){_0x36b4da=_0x36b4da-0x19a;const _0x39ddcb=a180_0x39dd();let _0x3ba3f2=_0x39ddcb[_0x36b4da];return _0x3ba3f2;}function a180_0x39dd(){const _0x29c893=['846952hlRQkD','1591156eKMmpC','3490110exkDoi','1187848rPgAcO','1020728cASWWo','225YLMoGy','1307590YzeXxD','26584AVNbAs'];a180_0x39dd=function(){return _0x29c893;};return a180_0x39dd();}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];
|