@lovrabet/rabetbase-cli 2.5.0-beta.6 → 2.5.0
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/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/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/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/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/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-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/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/doctor.js +1 -1
- package/lib/commands/file/index.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/template.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/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/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/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.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/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.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/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/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.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 +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a130_0xa2d235=a130_0x5b6d;(function(_0x1982d4,_0x5ddbb5){const _0x4e9d02=a130_0x5b6d,_0x58261a=_0x1982d4();while(!![]){try{const _0x5e6004=-parseInt(_0x4e9d02(0x1d5))/0x1*(-parseInt(_0x4e9d02(0x1ba))/0x2)+parseInt(_0x4e9d02(0x1d7))/0x3*(parseInt(_0x4e9d02(0x1d6))/0x4)+parseInt(_0x4e9d02(0x1a7))/0x5+parseInt(_0x4e9d02(0x1db))/0x6*(parseInt(_0x4e9d02(0x1b8))/0x7)+parseInt(_0x4e9d02(0x1c0))/0x8*(-parseInt(_0x4e9d02(0x1c2))/0x9)+-parseInt(_0x4e9d02(0x1cb))/0xa*(-parseInt(_0x4e9d02(0x1bc))/0xb)+parseInt(_0x4e9d02(0x1ae))/0xc*(-parseInt(_0x4e9d02(0x1cd))/0xd);if(_0x5e6004===_0x5ddbb5)break;else _0x58261a['push'](_0x58261a['shift']());}catch(_0x182ba7){_0x58261a['push'](_0x58261a['shift']());}}}(a130_0xcff3,0xbfba3));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';function a130_0xcff3(){const _0x4b8d30=['Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','get','keys','pages','3365620syEaqj','No\x20local\x20pages\x20matched\x20paths:\x20','20267ECcwWv','Invalid\x20--params\x20JSON.','cwd','has',':\x20expected\x20a\x20non-empty\x20string.','cssUrl','length','Menu\x20sync\x20completed','2gUYDds','14108ODVHvg','66tWzppv','--params.','Invalid\x20--params.','Invalid\x20--params:\x20','6uTzano','1828690OqXHDQ','parse','CSS\x20URL\x20is\x20unreachable:\x20','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','jsUrl','\x0a\x20\x20Available\x20local\x20paths:\x20','map','14352rcCfYF','menu-sync','hasOwn','path','join','filter','string','object','setLogPath','label','1318219DgwxSE','trim','1517668ENRBiD','push','44xGCLgm','import','isArray','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','17392pUrZjK','procode','3501sdfjKD','info','dryRun','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','field'];a130_0xcff3=function(){return _0x4b8d30;};return a130_0xcff3();}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a130_0xa2d235(0x1ab),'cssUrl']);function validateParams(_0x164fed){const _0x5141a2=a130_0xa2d235,_0x5fe0fa=[];return _0x164fed[_0x5141a2(0x1ab)]&&!isValidJsHttpsUrl(_0x164fed[_0x5141a2(0x1ab)])&&_0x5fe0fa[_0x5141a2(0x1bb)]({'field':_0x5141a2(0x1ab),'message':_0x5141a2(0x1c5)}),_0x164fed[_0x5141a2(0x1d2)]&&!isValidCssHttpsUrl(_0x164fed[_0x5141a2(0x1d2)])&&_0x5fe0fa[_0x5141a2(0x1bb)]({'field':_0x5141a2(0x1d2),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x5fe0fa;}function a130_0x5b6d(_0x1e9831,_0x234c8a){_0x1e9831=_0x1e9831-0x1a7;const _0xcff3bf=a130_0xcff3();let _0x5b6d78=_0xcff3bf[_0x1e9831];return _0x5b6d78;}export async function runMenuSyncCore(_0x3d85a3,_0x1de6d9,_0x1fc408=[],_0x21880c,_0x2ab201={}){const _0x1c6b5e=a130_0xa2d235,_0x3d02d2=parseMenuSyncParams(_0x21880c),_0x373030=[...new Set(_0x1fc408[_0x1c6b5e(0x1ad)](_0xb3adc5=>_0xb3adc5['trim']())[_0x1c6b5e(0x1b3)](Boolean))],_0x144a01=_0x3d02d2['jsUrl'],_0x1eec94=_0x3d02d2[_0x1c6b5e(0x1d2)],_0x419bcc=[];if(_0x144a01)_0x419bcc['push'](_0x144a01);if(_0x1eec94)_0x419bcc['push'](_0x1eec94);const _0x32f989=validateParams(_0x3d02d2);if(_0x32f989[_0x1c6b5e(0x1d3)]>0x0){const _0x2d11a6=_0x32f989['map'](_0x13e35f=>_0x1c6b5e(0x1d8)+_0x13e35f[_0x1c6b5e(0x1c6)]+':\x20'+_0x13e35f['message'])[_0x1c6b5e(0x1b2)](';\x20');throw new Error(_0x1c6b5e(0x1da)+_0x2d11a6);}logger[_0x1c6b5e(0x1b6)](process[_0x1c6b5e(0x1cf)]()),logger['info'](_0x1c6b5e(0x1af),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x3d85a3,'selectedCount':_0x373030[_0x1c6b5e(0x1d3)],'jsUrl':_0x144a01,'cssUrl':_0x1eec94});if(_0x144a01){const _0x19a2b3=await isUrlReachable(_0x144a01);if(!_0x19a2b3)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x144a01);}if(_0x1eec94){const _0x3e3b16=await isUrlReachable(_0x1eec94);if(!_0x3e3b16)throw new Error(_0x1c6b5e(0x1a9)+_0x1eec94);}const _0x571086=getLocalPages();if(_0x571086[_0x1c6b5e(0x1d3)]===0x0){if(_0x373030[_0x1c6b5e(0x1d3)]>0x0)throw new Error(_0x1c6b5e(0x1cc)+_0x373030[_0x1c6b5e(0x1b2)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x2ab201[_0x1c6b5e(0x1c4)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x32c2d7=await getOnlineMenuList(_0x3d85a3,_0x1de6d9),_0x2f2e15=new Set(_0x32c2d7[_0x1c6b5e(0x1ad)](_0x1d596b=>_0x1d596b[_0x1c6b5e(0x1b1)]));let _0x94393a;if(_0x373030['length']>0x0){const _0x318cfe=new Map(_0x571086['map'](_0x1f09cc=>[_0x1f09cc['path'],_0x1f09cc])),_0x377e6d=_0x373030[_0x1c6b5e(0x1b3)](_0x280cd4=>!_0x318cfe['has'](_0x280cd4));if(_0x377e6d[_0x1c6b5e(0x1d3)]>0x0){const _0x8c1424=_0x571086[_0x1c6b5e(0x1ad)](_0x16aa18=>_0x16aa18[_0x1c6b5e(0x1b1)])[_0x1c6b5e(0x1b2)](',\x20');throw new Error(_0x1c6b5e(0x1cc)+_0x377e6d[_0x1c6b5e(0x1b2)](',\x20')+_0x1c6b5e(0x1ac)+_0x8c1424);}const _0x5ce352=_0x373030['filter'](_0x3c3c4f=>_0x2f2e15[_0x1c6b5e(0x1d0)](_0x3c3c4f));if(_0x5ce352['length']>0x0)throw new Error(_0x1c6b5e(0x1bf)+_0x5ce352[_0x1c6b5e(0x1b2)](',\x20'));_0x94393a=_0x373030[_0x1c6b5e(0x1ad)](_0x5e8fd1=>_0x318cfe[_0x1c6b5e(0x1c8)](_0x5e8fd1));}else _0x94393a=_0x571086[_0x1c6b5e(0x1b3)](_0x24e1cc=>!_0x2f2e15[_0x1c6b5e(0x1d0)](_0x24e1cc['path']));if(_0x94393a[_0x1c6b5e(0x1d3)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x2ab201[_0x1c6b5e(0x1c4)]===!![],'targetPages':[],'plannedMenus':[]};const _0x5ea439=_0x94393a[_0x1c6b5e(0x1ad)](_0x3065b5=>({'type':_0x1c6b5e(0x1c1),'path':_0x3065b5['path'],'label':_0x3065b5[_0x1c6b5e(0x1b7)],'loadScriptMode':_0x1c6b5e(0x1bd),'resources':[..._0x419bcc]}));if(_0x2ab201[_0x1c6b5e(0x1c4)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x94393a,'plannedMenus':_0x5ea439};const _0x99a4e5=await createMenus(_0x3d85a3,_0x1de6d9,_0x94393a,_0x419bcc[_0x1c6b5e(0x1d3)]>0x0?_0x419bcc:undefined);return logger[_0x1c6b5e(0x1c3)](_0x1c6b5e(0x1af),_0x1c6b5e(0x1d4),{'count':_0x94393a['length'],'resources':_0x419bcc}),{'created':_0x99a4e5['length'],'skipped':![],'dryRun':![],'targetPages':_0x94393a,'plannedMenus':_0x5ea439,'menus':_0x99a4e5};}export function parseMenuSyncParams(_0x232f1d){const _0x1a9a5c=a130_0xa2d235;if(!_0x232f1d||typeof _0x232f1d!==_0x1a9a5c(0x1b4))return{};let _0x586de2;try{_0x586de2=JSON[_0x1a9a5c(0x1a8)](_0x232f1d);}catch{throw new Error(_0x1a9a5c(0x1ce));}if(typeof _0x586de2!==_0x1a9a5c(0x1b5)||_0x586de2===null||Array[_0x1a9a5c(0x1be)](_0x586de2))throw new Error(_0x1a9a5c(0x1c7));const _0x45e66d=_0x586de2;if(Object[_0x1a9a5c(0x1b0)](_0x45e66d,_0x1a9a5c(0x1ca)))throw new Error(_0x1a9a5c(0x1aa));const _0x1fbd53=Object[_0x1a9a5c(0x1c9)](_0x45e66d)[_0x1a9a5c(0x1b3)](_0x3fea7b=>!MENU_SYNC_PARAM_KEYS[_0x1a9a5c(0x1d0)](_0x3fea7b));if(_0x1fbd53['length']>0x0)throw new Error('Invalid\x20--params\x20fields:\x20'+_0x1fbd53[_0x1a9a5c(0x1b2)](',\x20')+'.');for(const _0x5a8e29 of MENU_SYNC_PARAM_KEYS){const _0x153f66=_0x45e66d[_0x5a8e29];if(_0x153f66!==undefined&&(typeof _0x153f66!==_0x1a9a5c(0x1b4)||_0x153f66['trim']()===''))throw new Error(_0x1a9a5c(0x1d9)+_0x5a8e29+_0x1a9a5c(0x1d1));}return{'jsUrl':typeof _0x45e66d[_0x1a9a5c(0x1ab)]===_0x1a9a5c(0x1b4)?_0x45e66d[_0x1a9a5c(0x1ab)][_0x1a9a5c(0x1b9)]():undefined,'cssUrl':typeof _0x45e66d[_0x1a9a5c(0x1d2)]===_0x1a9a5c(0x1b4)?_0x45e66d['cssUrl'][_0x1a9a5c(0x1b9)]():undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x298ebf,_0x30be09){const _0x311728=a132_0x5ddc,_0x47c7a6=_0x298ebf();while(!![]){try{const _0x59bb94=-parseInt(_0x311728(0x1e8))/0x1*(-parseInt(_0x311728(0x1d5))/0x2)+-parseInt(_0x311728(0x1b3))/0x3+parseInt(_0x311728(0x1b1))/0x4+-parseInt(_0x311728(0x1c4))/0x5+parseInt(_0x311728(0x1ef))/0x6*(parseInt(_0x311728(0x1d6))/0x7)+parseInt(_0x311728(0x1ee))/0x8+parseInt(_0x311728(0x1f4))/0x9*(-parseInt(_0x311728(0x1f6))/0xa);if(_0x59bb94===_0x30be09)break;else _0x47c7a6['push'](_0x47c7a6['shift']());}catch(_0x8b03d7){_0x47c7a6['push'](_0x47c7a6['shift']());}}}(a132_0x2bef,0xce993));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a132_0x5ddc(_0x4f6ea7,_0x44dde1){_0x4f6ea7=_0x4f6ea7-0x1ad;const _0x2bef14=a132_0x2bef();let _0x5ddc67=_0x2bef14[_0x4f6ea7];return _0x5ddc67;}import{logger}from'../../../utils/logger.js';function validateParams(_0x421053){const _0x4e858e=a132_0x5ddc,_0x529eb1=[];return _0x421053[_0x4e858e(0x1e5)]&&!isValidJsHttpsUrl(_0x421053[_0x4e858e(0x1e5)])&&_0x529eb1[_0x4e858e(0x1f1)]({'field':_0x4e858e(0x1e5),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x421053[_0x4e858e(0x1ce)]&&!isValidCssHttpsUrl(_0x421053[_0x4e858e(0x1ce)])&&_0x529eb1[_0x4e858e(0x1f1)]({'field':_0x4e858e(0x1ce),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x529eb1;}export async function runMenuUpdateCore(_0x4634cf,_0x570801,_0x5a3f2b,_0x3e4515={}){const _0x54686a=a132_0x5ddc,_0x9496a1=parseUpdateParamsFlag(_0x5a3f2b),_0x2cc0cc=normalizeMode(_0x3e4515['mode']);validateSelection(_0x3e4515[_0x54686a(0x1f3)]);const _0xed686c=[];if(_0x9496a1[_0x54686a(0x1e5)])_0xed686c[_0x54686a(0x1f1)](_0x9496a1[_0x54686a(0x1e5)]);if(_0x9496a1[_0x54686a(0x1ce)])_0xed686c[_0x54686a(0x1f1)](_0x9496a1[_0x54686a(0x1ce)]);const _0x387238=validateParams(_0x9496a1);if(_0x387238['length']>0x0){const _0x27cc85=_0x387238[_0x54686a(0x1f5)](_0x3ed811=>'--params.'+_0x3ed811['field']+':\x20'+_0x3ed811[_0x54686a(0x1ed)])[_0x54686a(0x1e4)](';\x20');throw new Error(_0x54686a(0x1e7)+_0x27cc85);}if(_0xed686c[_0x54686a(0x1d9)]===0x0)throw new Error(_0x54686a(0x1d7)+_0x54686a(0x1de));logger[_0x54686a(0x1dd)](process[_0x54686a(0x1ae)]()),logger['info']('menu-asset-update',_0x54686a(0x1c8),{'appCode':_0x4634cf,'jsUrl':_0x9496a1[_0x54686a(0x1e5)],'cssUrl':_0x9496a1[_0x54686a(0x1ce)],'mode':_0x2cc0cc,'dryRun':_0x3e4515[_0x54686a(0x1ca)]===!![]});if(_0x9496a1[_0x54686a(0x1e5)]){const _0x15dee3=await isUrlReachable(_0x9496a1[_0x54686a(0x1e5)]);if(!_0x15dee3)throw new Error(_0x54686a(0x1cc)+_0x9496a1['jsUrl']);}if(_0x9496a1[_0x54686a(0x1ce)]){const _0x24b981=await isUrlReachable(_0x9496a1['cssUrl']);if(!_0x24b981)throw new Error(_0x54686a(0x1c3)+_0x9496a1[_0x54686a(0x1ce)]);}const _0x32586c=await getOnlineMenuList(_0x4634cf,_0x570801),_0x37a338=_0x32586c[_0x54686a(0x1e3)](_0x168cc7=>_0x168cc7[_0x54686a(0x1af)][_0x54686a(0x1d9)]>0x0),_0x42ed21=selectMenusForUpdate(_0x37a338,_0x3e4515['selection']);if(_0x42ed21[_0x54686a(0x1d9)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x3e4515['dryRun']===!![]};const _0x682ed3=_0x42ed21[_0x54686a(0x1f5)](_0x1f7645=>buildMenuUpdateDiff(_0x1f7645,_0x9496a1,_0x2cc0cc,_0x3e4515[_0x54686a(0x1c6)]===!![],_0x3e4515['loadScriptMode']));if(_0x3e4515['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x682ed3};const _0xb69df7=await Promise[_0x54686a(0x1d2)](_0x42ed21['map']((_0x787535,_0x232f34)=>updateMenuCdnUrl(_0x4634cf,_0x570801,{'id':_0x787535['id'],'label':_0x787535[_0x54686a(0x1bf)],'path':_0x787535[_0x54686a(0x1db)],'resources':_0x682ed3[_0x232f34][_0x54686a(0x1c1)][_0x54686a(0x1af)],'extend':_0x787535[_0x54686a(0x1f0)]??null,'loadScriptMode':_0x3e4515[_0x54686a(0x1eb)]}))),_0x1b25b8=_0xb69df7['filter'](_0x1fbcfc=>_0x1fbcfc[_0x54686a(0x1f2)]===_0x54686a(0x1c5))[_0x54686a(0x1f5)](_0x56223f=>_0x56223f[_0x54686a(0x1ea)]),_0x4f1efa=_0xb69df7[_0x54686a(0x1e3)](_0x286c57=>_0x286c57['status']===_0x54686a(0x1c7))['length'];return logger['info'](_0x54686a(0x1c9),_0x54686a(0x1bc),{'count':_0x42ed21['length'],'resources':_0xed686c}),{'updated':_0x1b25b8['length'],'failed':_0x4f1efa,'skipped':![],'menus':_0x1b25b8};}function validateSelection(_0x1cee1f){const _0x35a42e=a132_0x5ddc;if(!_0x1cee1f)throw new Error(_0x35a42e(0x1c2));if(_0x1cee1f[_0x35a42e(0x1cb)]&&(_0x1cee1f[_0x35a42e(0x1e2)][_0x35a42e(0x1d9)]>0x0||_0x1cee1f['paths'][_0x35a42e(0x1d9)]>0x0))throw new Error(_0x35a42e(0x1b4));if(!_0x1cee1f[_0x35a42e(0x1cb)]&&_0x1cee1f[_0x35a42e(0x1e2)][_0x35a42e(0x1d9)]===0x0&&_0x1cee1f['paths'][_0x35a42e(0x1d9)]===0x0)throw new Error(_0x35a42e(0x1c2));}export function selectMenusForUpdate(_0x19c8e1,_0x2ba186){const _0x4fc3bd=a132_0x5ddc;validateSelection(_0x2ba186);if(_0x2ba186[_0x4fc3bd(0x1cb)])return _0x19c8e1;const _0x13b2ef=new Set(_0x19c8e1[_0x4fc3bd(0x1f5)](_0x235a2e=>_0x235a2e['id'])),_0x2d4044=new Set(_0x19c8e1[_0x4fc3bd(0x1f5)](_0x11eaa0=>_0x11eaa0[_0x4fc3bd(0x1db)])),_0x203859=_0x2ba186[_0x4fc3bd(0x1e2)]['filter'](_0x211dd1=>!_0x13b2ef[_0x4fc3bd(0x1d8)](_0x211dd1)),_0x540832=_0x2ba186[_0x4fc3bd(0x1ec)]['filter'](_0x591913=>!_0x2d4044[_0x4fc3bd(0x1d8)](_0x591913));if(_0x203859[_0x4fc3bd(0x1d9)]>0x0||_0x540832['length']>0x0){const _0xccd8cb=[..._0x203859['map'](_0x544690=>String(_0x544690)),..._0x540832][_0x4fc3bd(0x1e4)](',\x20');throw new Error(_0x4fc3bd(0x1d1)+_0xccd8cb);}const _0x44a6d4=new Set(_0x2ba186['menuIds']),_0x5e2d26=new Set(_0x2ba186[_0x4fc3bd(0x1ec)]);return _0x19c8e1[_0x4fc3bd(0x1e3)](_0x1aec83=>_0x44a6d4[_0x4fc3bd(0x1d8)](_0x1aec83['id'])||_0x5e2d26['has'](_0x1aec83[_0x4fc3bd(0x1db)]));}function normalizeMode(_0x447b50){const _0x39f23c=a132_0x5ddc;if(!_0x447b50)return'patch';if(_0x447b50===_0x39f23c(0x1b9)||_0x447b50==='patch')return _0x447b50;throw new Error(_0x39f23c(0x1d3)+_0x447b50+_0x39f23c(0x1b2));}function buildMenuUpdateDiff(_0x586f62,_0x5b387b,_0x287b61,_0x4e9d93,_0x400c1f){const _0x5b3995=a132_0x5ddc,_0x41512a=[..._0x586f62['resources']];_0x287b61==='patch'&&assertUnambiguousPatchResources(_0x586f62,_0x41512a,_0x5b387b);const _0x5e9b85=_0x287b61===_0x5b3995(0x1dc)?patchResources(_0x41512a,_0x5b387b):replaceResources(_0x5b387b),_0x125f7e=[],_0x3b23a5=_0x41512a[_0x5b3995(0x1b7)](isJsResource),_0x356749=_0x5e9b85[_0x5b3995(0x1b7)](isJsResource);if(_0x3b23a5&&!_0x356749){const _0x3bd3a1=_0x5b3995(0x1c0)+_0x586f62[_0x5b3995(0x1bf)]+_0x5b3995(0x1ad)+_0x586f62[_0x5b3995(0x1db)]+_0x5b3995(0x1da)+_0x5b3995(0x1be);if(!_0x4e9d93)throw new Error(_0x3bd3a1);_0x125f7e[_0x5b3995(0x1f1)](_0x3bd3a1);}const _0x930fed=_0x41512a[_0x5b3995(0x1b7)](isCssResource),_0xa3b305=_0x5e9b85[_0x5b3995(0x1b7)](isCssResource);_0x930fed&&!_0xa3b305&&_0x125f7e[_0x5b3995(0x1f1)](_0x5b3995(0x1e6)+_0x586f62[_0x5b3995(0x1bf)]+_0x5b3995(0x1ad)+_0x586f62[_0x5b3995(0x1db)]+').');const _0x3aab7e=typeof _0x586f62[_0x5b3995(0x1f0)]?.[_0x5b3995(0x1eb)]==='string'?_0x586f62['extend'][_0x5b3995(0x1eb)]:null,_0x51eca8=_0x400c1f?{'loadScriptMode':_0x3aab7e}:{},_0x2562d4=_0x400c1f?{'loadScriptMode':_0x400c1f}:{};return{'id':_0x586f62['id'],'label':_0x586f62[_0x5b3995(0x1bf)],'path':_0x586f62['path'],'mode':_0x287b61,'before':{'resources':_0x41512a,..._0x51eca8},'after':{'resources':_0x5e9b85,..._0x2562d4},'warnings':_0x125f7e};}function replaceResources(_0x5089f4){const _0x227af2=a132_0x5ddc;return[_0x5089f4['jsUrl'],_0x5089f4[_0x227af2(0x1ce)]]['filter'](_0x16133b=>!!_0x16133b);}function assertUnambiguousPatchResources(_0x50becb,_0x47bd85,_0x543c60){const _0x3c747f=a132_0x5ddc,_0x3339fd=_0x47bd85[_0x3c747f(0x1e3)](isJsResource)[_0x3c747f(0x1d9)];if(_0x543c60[_0x3c747f(0x1e5)]&&_0x3339fd>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x3339fd+_0x3c747f(0x1cf)+_0x50becb['label']+_0x3c747f(0x1ad)+_0x50becb[_0x3c747f(0x1db)]+')\x20'+_0x3c747f(0x1bb));const _0x2943c6=_0x47bd85[_0x3c747f(0x1e3)](isCssResource)[_0x3c747f(0x1d9)];if(_0x543c60['cssUrl']&&_0x2943c6>0x1)throw new Error(_0x3c747f(0x1b0)+_0x2943c6+_0x3c747f(0x1e9)+_0x50becb[_0x3c747f(0x1bf)]+_0x3c747f(0x1ad)+_0x50becb[_0x3c747f(0x1db)]+')\x20'+_0x3c747f(0x1d0));}function patchResources(_0x5c3f6a,_0x2a55f2){const _0x29c576=a132_0x5ddc;let _0x2bbd53=![],_0xaee4a0=![];const _0x53e9ee=[];for(const _0x1f5aa5 of _0x5c3f6a){if(isJsResource(_0x1f5aa5)){if(_0x2a55f2['jsUrl']&&!_0x2bbd53)_0x53e9ee['push'](_0x2a55f2[_0x29c576(0x1e5)]),_0x2bbd53=!![];else!_0x2a55f2[_0x29c576(0x1e5)]&&_0x53e9ee[_0x29c576(0x1f1)](_0x1f5aa5);continue;}if(isCssResource(_0x1f5aa5)){if(_0x2a55f2['cssUrl']&&!_0xaee4a0)_0x53e9ee[_0x29c576(0x1f1)](_0x2a55f2[_0x29c576(0x1ce)]),_0xaee4a0=!![];else!_0x2a55f2['cssUrl']&&_0x53e9ee[_0x29c576(0x1f1)](_0x1f5aa5);continue;}_0x53e9ee[_0x29c576(0x1f1)](_0x1f5aa5);}return _0x2a55f2[_0x29c576(0x1e5)]&&!_0x2bbd53&&_0x53e9ee[_0x29c576(0x1bd)](_0x2a55f2[_0x29c576(0x1e5)]),_0x2a55f2[_0x29c576(0x1ce)]&&!_0xaee4a0&&_0x53e9ee[_0x29c576(0x1f1)](_0x2a55f2[_0x29c576(0x1ce)]),_0x53e9ee;}function isJsResource(_0x39eea8){const _0x27834b=a132_0x5ddc;return stripQuery(_0x39eea8)[_0x27834b(0x1cd)]()[_0x27834b(0x1d4)](_0x27834b(0x1b5));}function isCssResource(_0x1acfd7){const _0x553f6c=a132_0x5ddc;return stripQuery(_0x1acfd7)[_0x553f6c(0x1cd)]()[_0x553f6c(0x1d4)](_0x553f6c(0x1b8));}function stripQuery(_0x2d81a4){const _0x26cd0f=a132_0x5ddc;return _0x2d81a4[_0x26cd0f(0x1ba)]('?')[0x0]??_0x2d81a4;}function a132_0x2bef(){const _0x3c31dc=['toLowerCase','cssUrl','\x20existing\x20JS\x20resources\x20for\x20\x22','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','allSettled','Invalid\x20--mode:\x20','endsWith','217680ZbgTEQ','8751883XKSZhT','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','has','length',').\x20','path','patch','setLogPath','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','string','trim','parse','menuIds','filter','join','jsUrl','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','Invalid\x20--params:\x20','4agrfdC','\x20existing\x20CSS\x20resources\x20for\x20\x22','value','loadScriptMode','paths','message','1441512pIWfes','6VcNGKu','extend','push','status','selection','45TieHkx','map','1053410RdAngb','\x22\x20(','cwd','resources','menu\x20asset-update\x20cannot\x20patch\x20','4506788UtbDsq','.\x20Allowed\x20values:\x20replace,\x20patch','855390EyLwtY','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','.js','isArray','some','.css','replace','split','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','Menu\x20asset\x20update\x20completed','unshift','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','label','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','after','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','CSS\x20URL\x20is\x20unreachable:\x20','6672265nuibJA','fulfilled','force','rejected','Start\x20non-interactive\x20menu\x20asset\x20update','menu-asset-update','dryRun','all','JS\x20URL\x20is\x20unreachable:\x20'];a132_0x2bef=function(){return _0x3c31dc;};return a132_0x2bef();}function parseUpdateParamsFlag(_0x7d52fb){const _0x3576ff=a132_0x5ddc;if(!_0x7d52fb||typeof _0x7d52fb!=='string')return{};try{const _0x1d7483=JSON[_0x3576ff(0x1e1)](_0x7d52fb);if(typeof _0x1d7483!=='object'||_0x1d7483===null||Array[_0x3576ff(0x1b6)](_0x1d7483))return{};return{'jsUrl':typeof _0x1d7483[_0x3576ff(0x1e5)]===_0x3576ff(0x1df)?_0x1d7483[_0x3576ff(0x1e5)]['trim']():undefined,'cssUrl':typeof _0x1d7483[_0x3576ff(0x1ce)]===_0x3576ff(0x1df)?_0x1d7483[_0x3576ff(0x1ce)][_0x3576ff(0x1e0)]():undefined};}catch{return{};}}
|
|
1
|
+
(function(_0x35ca54,_0x4acfb7){const _0x29b558=a132_0x2213,_0x188e3c=_0x35ca54();while(!![]){try{const _0x13c4a5=parseInt(_0x29b558(0x12e))/0x1*(-parseInt(_0x29b558(0x11d))/0x2)+parseInt(_0x29b558(0x140))/0x3*(-parseInt(_0x29b558(0x128))/0x4)+-parseInt(_0x29b558(0x130))/0x5*(-parseInt(_0x29b558(0x113))/0x6)+parseInt(_0x29b558(0x13c))/0x7*(parseInt(_0x29b558(0x114))/0x8)+-parseInt(_0x29b558(0x148))/0x9+parseInt(_0x29b558(0x10c))/0xa*(parseInt(_0x29b558(0x12b))/0xb)+-parseInt(_0x29b558(0x134))/0xc*(parseInt(_0x29b558(0x111))/0xd);if(_0x13c4a5===_0x4acfb7)break;else _0x188e3c['push'](_0x188e3c['shift']());}catch(_0x37b96e){_0x188e3c['push'](_0x188e3c['shift']());}}}(a132_0x5973,0x8c217));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(_0x42f3bb){const _0x288aa9=a132_0x2213,_0x4ea1fb=[];return _0x42f3bb['jsUrl']&&!isValidJsHttpsUrl(_0x42f3bb[_0x288aa9(0x14f)])&&_0x4ea1fb['push']({'field':_0x288aa9(0x14f),'message':_0x288aa9(0x12d)}),_0x42f3bb[_0x288aa9(0x14a)]&&!isValidCssHttpsUrl(_0x42f3bb['cssUrl'])&&_0x4ea1fb[_0x288aa9(0x126)]({'field':'cssUrl','message':_0x288aa9(0x117)}),_0x4ea1fb;}export async function runMenuUpdateCore(_0x4645a1,_0x556931,_0xbe0c83,_0x877ad4={}){const _0x564b36=a132_0x2213,_0xa77859=parseUpdateParamsFlag(_0xbe0c83),_0x1fac29=normalizeMode(_0x877ad4['mode']);validateSelection(_0x877ad4[_0x564b36(0x133)]);const _0x3147e8=[];if(_0xa77859[_0x564b36(0x14f)])_0x3147e8[_0x564b36(0x126)](_0xa77859[_0x564b36(0x14f)]);if(_0xa77859[_0x564b36(0x14a)])_0x3147e8['push'](_0xa77859['cssUrl']);const _0x438ff0=validateParams(_0xa77859);if(_0x438ff0[_0x564b36(0x110)]>0x0){const _0x36674a=_0x438ff0[_0x564b36(0x12f)](_0x23263a=>_0x564b36(0x13e)+_0x23263a['field']+':\x20'+_0x23263a[_0x564b36(0x14e)])[_0x564b36(0x121)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x36674a);}if(_0x3147e8['length']===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x564b36(0x109)](process[_0x564b36(0x13d)]()),logger['info'](_0x564b36(0x112),'Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x4645a1,'jsUrl':_0xa77859[_0x564b36(0x14f)],'cssUrl':_0xa77859[_0x564b36(0x14a)],'mode':_0x1fac29,'dryRun':_0x877ad4[_0x564b36(0x10b)]===!![]});if(_0xa77859['jsUrl']){const _0x24c403=await isUrlReachable(_0xa77859[_0x564b36(0x14f)]);if(!_0x24c403)throw new Error(_0x564b36(0x10d)+_0xa77859[_0x564b36(0x14f)]);}if(_0xa77859[_0x564b36(0x14a)]){const _0x4d779c=await isUrlReachable(_0xa77859['cssUrl']);if(!_0x4d779c)throw new Error(_0x564b36(0x127)+_0xa77859[_0x564b36(0x14a)]);}const _0x181744=await getOnlineMenuList(_0x4645a1,_0x556931),_0x2e335f=_0x181744[_0x564b36(0x135)](_0x69b0f8=>_0x69b0f8[_0x564b36(0x142)][_0x564b36(0x110)]>0x0),_0x4ff0d1=selectMenusForUpdate(_0x2e335f,_0x877ad4['selection']);if(_0x4ff0d1[_0x564b36(0x110)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x877ad4[_0x564b36(0x10b)]===!![]};const _0x36e6ad=_0x4ff0d1[_0x564b36(0x12f)](_0x26678d=>buildMenuUpdateDiff(_0x26678d,_0xa77859,_0x1fac29,_0x877ad4['force']===!![],_0x877ad4[_0x564b36(0x11f)]));if(_0x877ad4[_0x564b36(0x10b)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x36e6ad};const _0x569c92=await Promise[_0x564b36(0x143)](_0x4ff0d1['map']((_0x1d91f3,_0xe33140)=>updateMenuCdnUrl(_0x4645a1,_0x556931,{'id':_0x1d91f3['id'],'label':_0x1d91f3[_0x564b36(0x14b)],'path':_0x1d91f3[_0x564b36(0x137)],'resources':_0x36e6ad[_0xe33140][_0x564b36(0x141)][_0x564b36(0x142)],'extend':_0x1d91f3[_0x564b36(0x129)]??null,'loadScriptMode':_0x877ad4['loadScriptMode']}))),_0x5325ff=_0x569c92[_0x564b36(0x135)](_0x3b8594=>_0x3b8594[_0x564b36(0x12c)]===_0x564b36(0x10f))[_0x564b36(0x12f)](_0x23f6da=>_0x23f6da[_0x564b36(0x146)]),_0x19be01=_0x569c92['filter'](_0x27f7c6=>_0x27f7c6[_0x564b36(0x12c)]===_0x564b36(0x138))[_0x564b36(0x110)];return logger['info'](_0x564b36(0x112),'Menu\x20asset\x20update\x20completed',{'count':_0x4ff0d1[_0x564b36(0x110)],'resources':_0x3147e8}),{'updated':_0x5325ff[_0x564b36(0x110)],'failed':_0x19be01,'skipped':![],'menus':_0x5325ff};}function validateSelection(_0xbfa8b8){const _0x5ecbdd=a132_0x2213;if(!_0xbfa8b8)throw new Error(_0x5ecbdd(0x14c));if(_0xbfa8b8[_0x5ecbdd(0x124)]&&(_0xbfa8b8[_0x5ecbdd(0x11e)]['length']>0x0||_0xbfa8b8[_0x5ecbdd(0x136)]['length']>0x0))throw new Error(_0x5ecbdd(0x120));if(!_0xbfa8b8[_0x5ecbdd(0x124)]&&_0xbfa8b8[_0x5ecbdd(0x11e)][_0x5ecbdd(0x110)]===0x0&&_0xbfa8b8[_0x5ecbdd(0x136)][_0x5ecbdd(0x110)]===0x0)throw new Error(_0x5ecbdd(0x14c));}export function selectMenusForUpdate(_0x185429,_0x3379dd){const _0xffbefb=a132_0x2213;validateSelection(_0x3379dd);if(_0x3379dd['all'])return _0x185429;const _0x59597b=new Set(_0x185429[_0xffbefb(0x12f)](_0x1a456e=>_0x1a456e['id'])),_0x1b9155=new Set(_0x185429[_0xffbefb(0x12f)](_0x5288a7=>_0x5288a7[_0xffbefb(0x137)])),_0x20053f=_0x3379dd[_0xffbefb(0x11e)][_0xffbefb(0x135)](_0x12e92a=>!_0x59597b[_0xffbefb(0x147)](_0x12e92a)),_0x3966b3=_0x3379dd['paths']['filter'](_0x4ed253=>!_0x1b9155[_0xffbefb(0x147)](_0x4ed253));if(_0x20053f[_0xffbefb(0x110)]>0x0||_0x3966b3[_0xffbefb(0x110)]>0x0){const _0x3e0e45=[..._0x20053f['map'](_0x3b4a08=>String(_0x3b4a08)),..._0x3966b3][_0xffbefb(0x121)](',\x20');throw new Error(_0xffbefb(0x13f)+_0x3e0e45);}const _0x4addeb=new Set(_0x3379dd[_0xffbefb(0x11e)]),_0x5d2c8d=new Set(_0x3379dd['paths']);return _0x185429['filter'](_0x40fb85=>_0x4addeb[_0xffbefb(0x147)](_0x40fb85['id'])||_0x5d2c8d[_0xffbefb(0x147)](_0x40fb85['path']));}function normalizeMode(_0x2d4e08){const _0x21544c=a132_0x2213;if(!_0x2d4e08)return _0x21544c(0x11b);if(_0x2d4e08==='replace'||_0x2d4e08==='patch')return _0x2d4e08;throw new Error(_0x21544c(0x119)+_0x2d4e08+_0x21544c(0x132));}function buildMenuUpdateDiff(_0x2ad06c,_0x30fe22,_0x185d4b,_0x400c31,_0x2d9387){const _0x2a9825=a132_0x2213,_0x3a0e31=[..._0x2ad06c[_0x2a9825(0x142)]];_0x185d4b===_0x2a9825(0x11b)&&assertUnambiguousPatchResources(_0x2ad06c,_0x3a0e31,_0x30fe22);const _0x4443c6=_0x185d4b===_0x2a9825(0x11b)?patchResources(_0x3a0e31,_0x30fe22):replaceResources(_0x30fe22),_0x3fa52f=[],_0x3e9e06=_0x3a0e31[_0x2a9825(0x14d)](isJsResource),_0x99fe0b=_0x4443c6[_0x2a9825(0x14d)](isJsResource);if(_0x3e9e06&&!_0x99fe0b){const _0x1ff177=_0x2a9825(0x131)+_0x2ad06c[_0x2a9825(0x14b)]+_0x2a9825(0x123)+_0x2ad06c['path']+_0x2a9825(0x12a)+_0x2a9825(0x139);if(!_0x400c31)throw new Error(_0x1ff177);_0x3fa52f[_0x2a9825(0x126)](_0x1ff177);}const _0x4c034f=_0x3a0e31[_0x2a9825(0x14d)](isCssResource),_0x3eef26=_0x4443c6[_0x2a9825(0x14d)](isCssResource);_0x4c034f&&!_0x3eef26&&_0x3fa52f[_0x2a9825(0x126)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x2ad06c[_0x2a9825(0x14b)]+_0x2a9825(0x123)+_0x2ad06c[_0x2a9825(0x137)]+').');const _0x125aff=typeof _0x2ad06c['extend']?.[_0x2a9825(0x11f)]===_0x2a9825(0x115)?_0x2ad06c[_0x2a9825(0x129)][_0x2a9825(0x11f)]:null,_0x3bd30a=_0x2d9387?{'loadScriptMode':_0x125aff}:{},_0x1d8ebd=_0x2d9387?{'loadScriptMode':_0x2d9387}:{};return{'id':_0x2ad06c['id'],'label':_0x2ad06c['label'],'path':_0x2ad06c['path'],'mode':_0x185d4b,'before':{'resources':_0x3a0e31,..._0x3bd30a},'after':{'resources':_0x4443c6,..._0x1d8ebd},'warnings':_0x3fa52f};}function replaceResources(_0x56ec2b){const _0xae6c17=a132_0x2213;return[_0x56ec2b[_0xae6c17(0x14f)],_0x56ec2b[_0xae6c17(0x14a)]]['filter'](_0x2555fc=>!!_0x2555fc);}function assertUnambiguousPatchResources(_0x25ea62,_0x25c6ff,_0x22d4c7){const _0x3b7b36=a132_0x2213,_0x1481eb=_0x25c6ff[_0x3b7b36(0x135)](isJsResource)[_0x3b7b36(0x110)];if(_0x22d4c7[_0x3b7b36(0x14f)]&&_0x1481eb>0x1)throw new Error(_0x3b7b36(0x125)+_0x1481eb+_0x3b7b36(0x149)+_0x25ea62[_0x3b7b36(0x14b)]+_0x3b7b36(0x123)+_0x25ea62[_0x3b7b36(0x137)]+')\x20'+_0x3b7b36(0x145));const _0x2391f7=_0x25c6ff['filter'](isCssResource)[_0x3b7b36(0x110)];if(_0x22d4c7[_0x3b7b36(0x14a)]&&_0x2391f7>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x2391f7+_0x3b7b36(0x13a)+_0x25ea62[_0x3b7b36(0x14b)]+_0x3b7b36(0x123)+_0x25ea62['path']+')\x20'+_0x3b7b36(0x13b));}function patchResources(_0x5547fa,_0x4f95d9){const _0x2b6155=a132_0x2213;let _0x12d0c1=![],_0x5355d9=![];const _0x31bb47=[];for(const _0x125d93 of _0x5547fa){if(isJsResource(_0x125d93)){if(_0x4f95d9[_0x2b6155(0x14f)]&&!_0x12d0c1)_0x31bb47[_0x2b6155(0x126)](_0x4f95d9[_0x2b6155(0x14f)]),_0x12d0c1=!![];else!_0x4f95d9[_0x2b6155(0x14f)]&&_0x31bb47[_0x2b6155(0x126)](_0x125d93);continue;}if(isCssResource(_0x125d93)){if(_0x4f95d9[_0x2b6155(0x14a)]&&!_0x5355d9)_0x31bb47[_0x2b6155(0x126)](_0x4f95d9[_0x2b6155(0x14a)]),_0x5355d9=!![];else!_0x4f95d9['cssUrl']&&_0x31bb47['push'](_0x125d93);continue;}_0x31bb47['push'](_0x125d93);}return _0x4f95d9['jsUrl']&&!_0x12d0c1&&_0x31bb47[_0x2b6155(0x10a)](_0x4f95d9[_0x2b6155(0x14f)]),_0x4f95d9['cssUrl']&&!_0x5355d9&&_0x31bb47[_0x2b6155(0x126)](_0x4f95d9[_0x2b6155(0x14a)]),_0x31bb47;}function a132_0x5973(){const _0x54ec23=['patch','object','495266HwdZTv','menuIds','loadScriptMode','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','join','.js','\x22\x20(','all','menu\x20asset-update\x20cannot\x20patch\x20','push','CSS\x20URL\x20is\x20unreachable:\x20','4lpJoSI','extend',').\x20','760133QWxzgd','status','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','1RpArbK','map','50gIQPHL','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','.\x20Allowed\x20values:\x20replace,\x20patch','selection','2102460reSXWv','filter','paths','path','rejected','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','\x20existing\x20CSS\x20resources\x20for\x20\x22','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','7385PDKsVd','cwd','--params.','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','221196xoONRz','after','resources','allSettled','split','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','value','has','3291633QlNkKK','\x20existing\x20JS\x20resources\x20for\x20\x22','cssUrl','label','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','some','message','jsUrl','parse','isArray','setLogPath','unshift','dryRun','90lDAFGJ','JS\x20URL\x20is\x20unreachable:\x20','trim','fulfilled','length','39wZRbtj','menu-asset-update','177900KkIqfG','6584qrIpzv','string','endsWith','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','toLowerCase','Invalid\x20--mode:\x20','.css'];a132_0x5973=function(){return _0x54ec23;};return a132_0x5973();}function a132_0x2213(_0x588c2a,_0x4884a5){_0x588c2a=_0x588c2a-0x109;const _0x597390=a132_0x5973();let _0x221302=_0x597390[_0x588c2a];return _0x221302;}function isJsResource(_0x196fbb){const _0x40b64e=a132_0x2213;return stripQuery(_0x196fbb)[_0x40b64e(0x118)]()[_0x40b64e(0x116)](_0x40b64e(0x122));}function isCssResource(_0x5a541e){const _0x119507=a132_0x2213;return stripQuery(_0x5a541e)[_0x119507(0x118)]()[_0x119507(0x116)](_0x119507(0x11a));}function stripQuery(_0x50b7df){const _0x235f69=a132_0x2213;return _0x50b7df[_0x235f69(0x144)]('?')[0x0]??_0x50b7df;}function parseUpdateParamsFlag(_0x34f12f){const _0x2a2c18=a132_0x2213;if(!_0x34f12f||typeof _0x34f12f!==_0x2a2c18(0x115))return{};try{const _0x6aa3eb=JSON[_0x2a2c18(0x150)](_0x34f12f);if(typeof _0x6aa3eb!==_0x2a2c18(0x11c)||_0x6aa3eb===null||Array[_0x2a2c18(0x151)](_0x6aa3eb))return{};return{'jsUrl':typeof _0x6aa3eb[_0x2a2c18(0x14f)]==='string'?_0x6aa3eb[_0x2a2c18(0x14f)]['trim']():undefined,'cssUrl':typeof _0x6aa3eb[_0x2a2c18(0x14a)]===_0x2a2c18(0x115)?_0x6aa3eb[_0x2a2c18(0x14a)][_0x2a2c18(0x10e)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a133_0x4a7b(){const _0x5231e6=['129CcDeoi','trim','3865txRKuP','1082376RVqLAU','test','810232UBDqpK','18747126rmmbSU','34444rzzCox','344835KkgObi','5628DIlkpP','6064737tvnkRz'];a133_0x4a7b=function(){return _0x5231e6;};return a133_0x4a7b();}function a133_0x201f(_0x334cbe,_0xf0952a){_0x334cbe=_0x334cbe-0x1db;const _0x4a7bd6=a133_0x4a7b();let _0x201f32=_0x4a7bd6[_0x334cbe];return _0x201f32;}(function(_0x3c0050,_0xa61a66){const _0x1accf2=a133_0x201f,_0x399600=_0x3c0050();while(!![]){try{const _0xfa5927=parseInt(_0x1accf2(0x1e4))/0x1+parseInt(_0x1accf2(0x1e3))/0x2*(-parseInt(_0x1accf2(0x1dc))/0x3)+parseInt(_0x1accf2(0x1df))/0x4+-parseInt(_0x1accf2(0x1de))/0x5*(parseInt(_0x1accf2(0x1e5))/0x6)+-parseInt(_0x1accf2(0x1db))/0x7+parseInt(_0x1accf2(0x1e1))/0x8+parseInt(_0x1accf2(0x1e2))/0x9;if(_0xfa5927===_0xa61a66)break;else _0x399600['push'](_0x399600['shift']());}catch(_0x1032bc){_0x399600['push'](_0x399600['shift']());}}}(a133_0x4a7b,0x722ff));export function isValidJsHttpsUrl(_0x121640){const _0x351506=a133_0x201f;return/^https:\/\/.+\.js(\?.*)?$/[_0x351506(0x1e0)](_0x121640[_0x351506(0x1dd)]());}export function isValidCssHttpsUrl(_0xb7dbef){const _0xd52f7d=a133_0x201f;return/^https:\/\/.+\.css(\?.*)?$/[_0xd52f7d(0x1e0)](_0xb7dbef[_0xd52f7d(0x1dd)]());}export async function isUrlReachable(_0x1790b6){try{const _0x10dfdf=await fetch(_0x1790b6,{'method':'HEAD'});return _0x10dfdf['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a134_0xff4f(){const _0x57576c=['✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','16DORCQr','3543KyAkLp','length','sync','Menu\x20creation\x20failed','appcode','map','paths','Menu\x20sync\x20skipped','5946743CknoTc','25JNIIXe','flag','\x20page(s)','Creating\x20','jsUrl','Pre-fill\x20JS/CSS\x20URLs.\x20','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','2806110qvOMZO','selectedAppName','cookie','onlineMenuList','Failed\x20to\x20fetch\x20online\x20menu\x20list','string','cssUrl','\x20menu(s)','failed','filter','Sync\x20local\x20pages\x20as\x20platform\x20menus','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','yes','\x20\x20Create\x20','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','localPages','57326fQmnyI','✓\x20Menu\x20sync\x20completed:\x20','skipped','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20created.','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','POST','message','validation','\x20menu(s)\x20created','\x20created,\x20','Menu\x20sync\x20completed:\x20','10016ycILQl','boolean','Fetching\x20online\x20menu\x20list...','/smartapi/menu/create','228uVcgtj','str','onlinePaths','14kfZgUP','\x20menu(s)...','rawFlags','740106ocgjMp','Would\x20create\x20','gray','size','write','1658682JHzJhL','appCode','Created\x20','targetPages','split','Online\x20menu\x20list\x20fetched','\x20menu(s)\x20with\x20JS:\x20','created','params','\x20local\x20microfrontend\x20menu(s).'];a134_0xff4f=function(){return _0x57576c;};return a134_0xff4f();}const a134_0x248192=a134_0x47e3;(function(_0x4d0966,_0x521734){const _0x5be1ad=a134_0x47e3,_0x4e848a=_0x4d0966();while(!![]){try{const _0x410bad=-parseInt(_0x5be1ad(0x144))/0x1+-parseInt(_0x5be1ad(0x156))/0x2*(-parseInt(_0x5be1ad(0x16d))/0x3)+parseInt(_0x5be1ad(0x152))/0x4*(parseInt(_0x5be1ad(0x12b))/0x5)+parseInt(_0x5be1ad(0x15c))/0x6*(parseInt(_0x5be1ad(0x159))/0x7)+-parseInt(_0x5be1ad(0x16c))/0x8*(parseInt(_0x5be1ad(0x161))/0x9)+-parseInt(_0x5be1ad(0x133))/0xa+parseInt(_0x5be1ad(0x12a))/0xb;if(_0x410bad===_0x521734)break;else _0x4e848a['push'](_0x4e848a['shift']());}catch(_0x559103){_0x4e848a['push'](_0x4e848a['shift']());}}}(a134_0xff4f,0x37a60));import a134_0xb0c515 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';function a134_0x47e3(_0x301748,_0x6c199f){_0x301748=_0x301748-0x129;const _0xff4fe5=a134_0xff4f();let _0x47e39e=_0xff4fe5[_0x301748];return _0x47e39e;}import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':a134_0x248192(0x16f),'description':a134_0x248192(0x13d),'risk':a134_0x248192(0x160),'flags':[{'name':'params','type':a134_0x248192(0x138),'description':a134_0x248192(0x130)+a134_0x248192(0x148)},{'name':a134_0x248192(0x173),'type':a134_0x248192(0x138),'description':a134_0x248192(0x14a)},{'name':'yes','type':a134_0x248192(0x153),'description':a134_0x248192(0x142)}],async 'dryRun'(_0x576e6f){const _0x196a6f=a134_0x248192;ensureRunnableContext(_0x576e6f[_0x196a6f(0x15b)],_0x576e6f['selectedAppName']);const _0x2b6447=await runMenuSyncCore(_0x576e6f[_0x196a6f(0x162)],_0x576e6f[_0x196a6f(0x135)],parsePaths(_0x576e6f[_0x196a6f(0x157)](_0x196a6f(0x173))),_0x576e6f[_0x196a6f(0x157)](_0x196a6f(0x169)),{'dryRun':!![]});return{'method':_0x196a6f(0x14c),'url':_0x196a6f(0x155),'body':_0x2b6447,'description':_0x2b6447[_0x196a6f(0x146)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0x196a6f(0x15d)+_0x2b6447[_0x196a6f(0x164)][_0x196a6f(0x16e)]+_0x196a6f(0x16a)};},async 'execute'(_0x4577d){const _0x6dfdbe=a134_0x248192;ensureRunnableContext(_0x4577d[_0x6dfdbe(0x15b)],_0x4577d[_0x6dfdbe(0x134)]);const _0x279d34=_0x4577d[_0x6dfdbe(0x12c)](_0x6dfdbe(0x13f)),_0x4bbc21=_0x4577d[_0x6dfdbe(0x157)](_0x6dfdbe(0x169)),_0x1a5249=parsePaths(_0x4577d[_0x6dfdbe(0x157)](_0x6dfdbe(0x173))),_0x14d4cc=parseMenuSyncParams(_0x4bbc21);if(_0x279d34){const _0xfb9485=await runMenuSyncCore(_0x4577d['appCode'],_0x4577d['cookie'],_0x1a5249,_0x4bbc21);if(_0xfb9485['skipped']){const _0x7d4102=getLocalPages();_0x7d4102[_0x6dfdbe(0x16e)]===0x0?writeCliSideChannelLine(_0x6dfdbe(0x13e)):writeCliSideChannelLine(_0x6dfdbe(0x16b));}else writeCliSideChannelLine(_0x6dfdbe(0x145)+_0xfb9485[_0x6dfdbe(0x168)]+_0x6dfdbe(0x14f));return{'ok':!![],'data':_0xfb9485,'message':_0xfb9485[_0x6dfdbe(0x146)]?_0x6dfdbe(0x129):_0x6dfdbe(0x151)+_0xfb9485['created']+_0x6dfdbe(0x149)};}if(_0x1a5249[_0x6dfdbe(0x16e)]>0x0)throw CliErrors[_0x6dfdbe(0x14e)](_0x6dfdbe(0x147),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x4bbc21)throw CliErrors['validation'](_0x6dfdbe(0x141),_0x6dfdbe(0x14b));requireInteractive();const _0x585de4=startSpinner(_0x6dfdbe(0x154));let _0x1d3ccd,_0x366861,_0x4e0264;try{const _0x5dab9d=await fetchMenuData(_0x4577d[_0x6dfdbe(0x162)],_0x4577d['cookie']);_0x1d3ccd=_0x5dab9d[_0x6dfdbe(0x143)],_0x366861=_0x5dab9d[_0x6dfdbe(0x158)],_0x4e0264=_0x5dab9d[_0x6dfdbe(0x136)],stopSpinner(_0x585de4,_0x6dfdbe(0x166),!![]);}catch(_0x19350c){stopSpinner(_0x585de4,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x6dfdbe(0x14e)](_0x19350c instanceof Error?_0x19350c[_0x6dfdbe(0x14d)]:_0x6dfdbe(0x137));}if(_0x1d3ccd['length']===0x0)return writeCliSideChannelLine(a134_0xb0c515['yellow']('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x398302=buildCompareRows(_0x1d3ccd,_0x366861);writeCliSideChannelLine(renderCompareTable(_0x398302)),writeCliSideChannelLine('');const _0x7adf02=await selectPages(_0x1d3ccd,_0x366861);writeCliSideChannelLine(''),writeCliSideChannelLine(a134_0xb0c515['cyan']('\x20\x20✓\x20Selected:\x20'+_0x7adf02[_0x6dfdbe(0x16e)]+_0x6dfdbe(0x12d)));const _0x12067c=_0x14d4cc[_0x6dfdbe(0x12f)]&&_0x14d4cc['cssUrl'];if(!_0x12067c){writeCliSideChannelLine(renderSyncSummary(_0x7adf02,_0x366861[_0x6dfdbe(0x15f)]>0x0));const _0x2034e7=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x2034e7)return writeCliSideChannelLine(a134_0xb0c515[_0x6dfdbe(0x15e)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x1307dd=_0x14d4cc[_0x6dfdbe(0x12f)],_0x34a71a=_0x14d4cc[_0x6dfdbe(0x139)];!_0x1307dd&&(_0x1307dd=await askJsUrl());!_0x34a71a&&(_0x34a71a=await askCssUrl());const _0x201795=await askConfirm(_0x6dfdbe(0x140)+_0x7adf02['length']+_0x6dfdbe(0x167)+_0x1307dd+'\x20and\x20CSS:\x20'+_0x34a71a+'?');if(!_0x201795)return writeCliSideChannelLine(a134_0xb0c515[_0x6dfdbe(0x15e)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x409ae9=[_0x1307dd,_0x34a71a],_0x452da0=startSpinner(_0x6dfdbe(0x12e)+_0x7adf02['length']+_0x6dfdbe(0x15a));try{const _0x1d1024=await doCreateMenus(_0x4577d['appCode'],_0x4577d['cookie'],_0x7adf02,_0x409ae9);return stopSpinner(_0x452da0,_0x6dfdbe(0x163)+_0x1d1024['created']+_0x6dfdbe(0x13a),!![]),{'ok':!![],'data':_0x1d1024,'message':'Menu\x20sync\x20completed:\x20'+_0x1d1024[_0x6dfdbe(0x168)]+_0x6dfdbe(0x150)+_0x1d1024[_0x6dfdbe(0x13b)]+'\x20failed.'};}catch(_0x38dcc8){stopSpinner(_0x452da0,_0x6dfdbe(0x170),![]);throw CliErrors[_0x6dfdbe(0x14e)](_0x38dcc8 instanceof Error?_0x38dcc8[_0x6dfdbe(0x14d)]:'Menu\x20creation\x20failed');}}};function ensureRunnableContext(_0x882c29,_0x4c2e6b){const _0x4d8fba=a134_0x248192,_0x2b9a07=_0x882c29[_0x4d8fba(0x171)]?String(_0x882c29[_0x4d8fba(0x171)])['trim']():'';if(!isInProject()&&!_0x4c2e6b&&!_0x2b9a07)throw CliErrors[_0x4d8fba(0x14e)](_0x4d8fba(0x131)+_0x4d8fba(0x132));}function parsePaths(_0xb8175){const _0x59d073=a134_0x248192;return[...new Set(_0xb8175[_0x59d073(0x165)](',')[_0x59d073(0x172)](_0x5311e4=>_0x5311e4['trim']())[_0x59d073(0x13c)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a135_0x18f04c=a135_0x129f;(function(_0x20adbf,_0x2f8c05){const _0x53dcbc=a135_0x129f,_0x4cdbc3=_0x20adbf();while(!![]){try{const _0x591418=-parseInt(_0x53dcbc(0x1ab))/0x1*(-parseInt(_0x53dcbc(0x1c4))/0x2)+parseInt(_0x53dcbc(0x18b))/0x3*(parseInt(_0x53dcbc(0x1e8))/0x4)+parseInt(_0x53dcbc(0x184))/0x5*(-parseInt(_0x53dcbc(0x199))/0x6)+parseInt(_0x53dcbc(0x1b2))/0x7+parseInt(_0x53dcbc(0x1d6))/0x8*(parseInt(_0x53dcbc(0x1ed))/0x9)+parseInt(_0x53dcbc(0x190))/0xa+-parseInt(_0x53dcbc(0x1eb))/0xb;if(_0x591418===_0x2f8c05)break;else _0x4cdbc3['push'](_0x4cdbc3['shift']());}catch(_0x9f2b04){_0x4cdbc3['push'](_0x4cdbc3['shift']());}}}(a135_0x5cd2,0xdc68c));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':'POST','path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a135_0x18f04c(0x17a),'command':a135_0x18f04c(0x1e2),'description':a135_0x18f04c(0x1e5),'risk':a135_0x18f04c(0x1a0),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':'string','description':a135_0x18f04c(0x192)},{'name':a135_0x18f04c(0x1d5),'type':a135_0x18f04c(0x197),'description':a135_0x18f04c(0x1a1)},{'name':a135_0x18f04c(0x1ba),'type':a135_0x18f04c(0x1e7),'required':!![],'description':a135_0x18f04c(0x1cd)},{'name':a135_0x18f04c(0x17f),'type':a135_0x18f04c(0x1e7),'description':a135_0x18f04c(0x1e1)},{'name':'expected-count','type':'number','description':a135_0x18f04c(0x186)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x441893){parseInput(_0x441893),requireExplicitYes(_0x441893);},async 'dryRun'(_0x40ef2d){const _0x394449=a135_0x18f04c,_0x22c3a1=await buildPlan(_0x40ef2d,!![]),_0x129466=_0x22c3a1[_0x394449(0x1a2)][_0x394449(0x1a8)]?.['length']??0x0,_0x4789c6=_0x22c3a1[_0x394449(0x1a2)][_0x394449(0x1db)][_0x394449(0x1b8)]-_0x129466;return menuDryRunResult(_0x22c3a1['plan'],{'method':_0x394449(0x19e),'url':_0x394449(0x1d2),'body':{'updates':_0x22c3a1[_0x394449(0x1a2)][_0x394449(0x1a8)]?.[_0x394449(0x195)](_0x5f4044=>_0x5f4044['body'])??[]},'description':_0x394449(0x1c9)+_0x129466+_0x394449(0x1d9)+_0x4789c6+_0x394449(0x1dd)});},async 'execute'(_0x4edce6){const _0x205e9b=a135_0x18f04c;requireExplicitYes(_0x4edce6);const _0x484d47=await buildPlan(_0x4edce6,![]);await recheckMutationSnapshot(_0x4edce6,_0x484d47['plan'],_0x205e9b(0x180));const _0x4bef72=[],_0x5a63f6=[],_0x535a76=[];for(const _0x19a267 of _0x484d47[_0x205e9b(0x1a2)]['targets']){if(_0x19a267[_0x205e9b(0x1c7)][_0x205e9b(0x1ba)]===_0x484d47[_0x205e9b(0x1a2)][_0x205e9b(0x1b9)]){_0x4bef72[_0x205e9b(0x18c)]({'id':_0x19a267['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x4edce6[_0x205e9b(0x17c)],_0x4edce6[_0x205e9b(0x1ef)],{'id':_0x19a267['id'],'visible':_0x484d47[_0x205e9b(0x1a2)][_0x205e9b(0x1b9)]}),_0x4bef72[_0x205e9b(0x18c)]({'id':_0x19a267['id'],'updated':!![],'skipped':![]});}catch(_0x36c23b){const _0x14f8e6=mapMenuApiError(_0x36c23b,'update\x20visibility\x20for',_0x19a267['id']);if(isMenuResponseLoss(_0x36c23b)&&_0x14f8e6[_0x205e9b(0x1df)]!==_0x205e9b(0x182)){_0x535a76['push'](_0x19a267['id']);continue;}_0x5a63f6[_0x205e9b(0x18c)]({'id':_0x19a267['id'],'stage':_0x205e9b(0x1ce),'code':_0x14f8e6['code'],'message':_0x14f8e6[_0x205e9b(0x179)]});}}let _0x3588ea;try{_0x3588ea=await fetchMenuSnapshot(_0x4edce6['appCode'],_0x4edce6[_0x205e9b(0x1ef)]);}catch(_0x15f13d){const _0x546bc0=describeMenuErrorCause(_0x15f13d,'verify\x20menu\x20visibility\x20update'),_0x285e82=_0x535a76[_0x205e9b(0x195)](_0x3efe5f=>({'id':_0x3efe5f,'stage':_0x205e9b(0x1cb),'code':_0x205e9b(0x174),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x3efe5f+_0x205e9b(0x1bd),'requestedStateConfirmed':![],'recovered':![]})),_0x33fed6={'stage':'verification','code':'menu_verification_failed','message':_0x205e9b(0x1de),'targetIds':_0x484d47[_0x205e9b(0x1a2)][_0x205e9b(0x1db)][_0x205e9b(0x195)](_0x189ee5=>_0x189ee5['id']),'requestedStateConfirmed':![],..._0x546bc0};throw menuFailure(asVerificationError(_0x15f13d,_0x205e9b(0x1aa)),_0x484d47['plan'],{'stage':_0x205e9b(0x1dc),'succeeded':_0x4bef72,'failedRecords':[..._0x5a63f6,..._0x285e82,_0x33fed6],'warnings':[_0x205e9b(0x1b3)],'verification':{'status':_0x205e9b(0x1ad),'recoveredCount':0x0,'lookupCommand':_0x205e9b(0x17b)}});}const _0x52801c=[];for(const _0x4de2dd of _0x4bef72){const _0x251dd8=Number(_0x4de2dd['id']),_0x314204=_0x484d47[_0x205e9b(0x176)][_0x205e9b(0x1ec)](_0x251dd8),_0x568f3f=_0x3588ea['byId']['get'](_0x251dd8);try{verifyVisibilityUpdate(_0x314204,_0x568f3f,_0x484d47[_0x205e9b(0x1a2)][_0x205e9b(0x1b9)]);}catch(_0x58bb06){const _0x2a618f=asVerificationError(_0x58bb06,_0x205e9b(0x185)+_0x251dd8+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x52801c[_0x205e9b(0x18c)]({'id':_0x251dd8,'stage':_0x205e9b(0x1dc),'code':_0x2a618f[_0x205e9b(0x1df)],'message':_0x2a618f[_0x205e9b(0x179)],'requestedStateConfirmed':![]});}}for(const _0x271302 of _0x535a76){const _0x4ef6c4=_0x484d47[_0x205e9b(0x176)][_0x205e9b(0x1ec)](_0x271302),_0x53c1b1=_0x3588ea[_0x205e9b(0x1c0)][_0x205e9b(0x1ec)](_0x271302);try{verifyVisibilityUpdate(_0x4ef6c4,_0x53c1b1,_0x484d47['plan'][_0x205e9b(0x1b9)]),_0x4bef72[_0x205e9b(0x18c)]({'id':_0x271302,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x39e216){const _0x3ba0db=asVerificationError(_0x39e216,_0x205e9b(0x17d)+_0x271302+_0x205e9b(0x171));_0x52801c['push']({'id':_0x271302,'stage':'update-recovery','code':_0x3ba0db[_0x205e9b(0x1df)],'message':_0x3ba0db[_0x205e9b(0x179)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x52801c['length']>0x0){const _0x3dbdf7=_0x52801c[_0x205e9b(0x195)](_0x3ab6a2=>Number(_0x3ab6a2['id'])),_0x41b075=_0x4bef72[_0x205e9b(0x1c2)](_0xf3ec1f=>_0xf3ec1f[_0x205e9b(0x1b5)]===!![])[_0x205e9b(0x1b8)],_0x2de8e2=menuError(_0x205e9b(0x174),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x3dbdf7[_0x205e9b(0x1ca)](',\x20')+'.',_0x205e9b(0x1e0));throw menuFailure(_0x2de8e2,_0x484d47[_0x205e9b(0x1a2)],{'stage':_0x205e9b(0x1dc),'succeeded':_0x4bef72,'failedRecords':[..._0x5a63f6,..._0x52801c],'warnings':[_0x205e9b(0x1e3)],'verification':{'status':_0x205e9b(0x1ad),..._0x3dbdf7[_0x205e9b(0x1b8)]===0x1?{'targetId':_0x3dbdf7[0x0]}:{'targetIds':_0x3dbdf7},'recoveredCount':_0x41b075,'lookupCommand':_0x205e9b(0x17b)}});}const _0x1db499=_0x4bef72['filter'](_0x197b05=>_0x197b05[_0x205e9b(0x19a)]===!![])['length'],_0x69a064=_0x4bef72[_0x205e9b(0x1b8)]-_0x1db499,_0x29e3dd={..._0x484d47[_0x205e9b(0x1a2)],'succeeded':_0x4bef72,'failed':_0x5a63f6,'warnings':_0x5a63f6[_0x205e9b(0x1b8)]>0x0?[..._0x484d47[_0x205e9b(0x1a2)][_0x205e9b(0x188)],_0x205e9b(0x1d3)]:_0x484d47['plan']['warnings'],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x3588ea[_0x205e9b(0x1bc)],'matchesRequestedState':_0x5a63f6['length']===0x0,'recoveredCount':_0x535a76[_0x205e9b(0x1b8)]}};return{'ok':_0x5a63f6[_0x205e9b(0x1b8)]===0x0,'data':_0x29e3dd,'message':_0x5a63f6[_0x205e9b(0x1b8)]===0x0?_0x205e9b(0x1a4)+_0x1db499+_0x205e9b(0x175)+_0x69a064+_0x205e9b(0x1dd):_0x205e9b(0x1e4)+_0x1db499+_0x205e9b(0x19b)+_0x69a064+_0x205e9b(0x194)+_0x5a63f6[_0x205e9b(0x1b8)]+_0x205e9b(0x1ae)};}};function parseInput(_0x34138f){const _0x65a998=a135_0x18f04c,_0x4b5e31=parseMenuIds(_0x34138f[_0x65a998(0x18d)](_0x65a998(0x196))),_0x268d27=parseCsv(_0x34138f['str'](_0x65a998(0x1d5)));if(_0x4b5e31['length']===0x0&&_0x268d27[_0x65a998(0x1b8)]===0x0)throw CliErrors['validation'](_0x65a998(0x19d));const _0x5b2ac8=parseBooleanFlag(_0x34138f,_0x65a998(0x1ba),!![]),_0x152cfe=parseBooleanFlag(_0x34138f,'expect-visible',![]);let _0x39cd67;if(hasFlag(_0x34138f,'expected-count')){_0x39cd67=_0x34138f[_0x65a998(0x1d0)](_0x65a998(0x183));if(!Number[_0x65a998(0x1ac)](_0x39cd67)||_0x39cd67<0x0)throw CliErrors[_0x65a998(0x1af)]('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0x4b5e31,'paths':_0x268d27,'visible':_0x5b2ac8,'expectVisible':_0x152cfe,'expectedCount':_0x39cd67};}async function buildPlan(_0x5dd833,_0x35ac7d){const _0x1f3100=a135_0x18f04c,_0x43aa6d=parseInput(_0x5dd833),_0x5a65dc=await fetchMutationSnapshot(_0x5dd833,_0x1f3100(0x180)),_0x2c2cfa=selectTargets(_0x5a65dc[_0x1f3100(0x1c3)],_0x43aa6d[_0x1f3100(0x19f)],_0x43aa6d['paths']);if(_0x43aa6d[_0x1f3100(0x1c5)]!==undefined&&_0x2c2cfa[_0x1f3100(0x1b8)]!==_0x43aa6d[_0x1f3100(0x1c5)])throw menuError(_0x1f3100(0x172),_0x1f3100(0x17e)+_0x2c2cfa[_0x1f3100(0x1b8)]+_0x1f3100(0x1b6)+_0x43aa6d['expectedCount']+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x43aa6d[_0x1f3100(0x1bf)]!==undefined){const _0x46a5cb=_0x2c2cfa[_0x1f3100(0x1c2)](_0x1c76c1=>_0x1c76c1[_0x1f3100(0x1ba)]!==_0x43aa6d[_0x1f3100(0x1bf)]);if(_0x46a5cb[_0x1f3100(0x1b8)]>0x0)throw menuError(_0x1f3100(0x1f0),_0x1f3100(0x1a3)+_0x46a5cb[_0x1f3100(0x195)](_0xae104f=>_0xae104f['id'])[_0x1f3100(0x1ca)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x97469d=_0x2c2cfa[_0x1f3100(0x195)](_0x128988=>({'id':_0x128988['id'],'label':_0x128988[_0x1f3100(0x191)],'path':_0x128988[_0x1f3100(0x173)],'before':{'visible':_0x128988[_0x1f3100(0x1ba)]},'after':{'visible':_0x43aa6d[_0x1f3100(0x1ba)]}})),_0x304d38=_0x97469d[_0x1f3100(0x1c2)](_0x48b624=>_0x48b624[_0x1f3100(0x1c7)]['visible']!==_0x43aa6d[_0x1f3100(0x1ba)])[_0x1f3100(0x195)](_0x46139b=>({'stage':_0x1f3100(0x187),'method':_0x1f3100(0x19e),'path':_0x1f3100(0x1d2),'body':{'appCode':_0x5dd833[_0x1f3100(0x17c)],'id':_0x46139b['id'],'visible':_0x43aa6d[_0x1f3100(0x1ba)]}})),_0x3ee618=mutationResult({'operation':_0x1f3100(0x1e2),'selector':{'menuIds':_0x43aa6d['menuIds'],'paths':_0x43aa6d['paths']},'before':{'menus':_0x2c2cfa[_0x1f3100(0x195)](_0x294ab8=>({'id':_0x294ab8['id'],'path':_0x294ab8['path'],'visible':_0x294ab8[_0x1f3100(0x1ba)]}))},'after':{'menus':_0x2c2cfa[_0x1f3100(0x195)](_0x3ce2e9=>({'id':_0x3ce2e9['id'],'path':_0x3ce2e9[_0x1f3100(0x173)],'visible':_0x43aa6d[_0x1f3100(0x1ba)]}))},'dryRun':_0x35ac7d,'backend':[...BACKEND],'plannedActions':_0x304d38,'snapshotHash':_0x5a65dc['hash'],'warnings':_0x304d38[_0x1f3100(0x1b8)]===0x0?[_0x1f3100(0x198)]:[]});return{'plan':{..._0x3ee618,'requestedVisible':_0x43aa6d[_0x1f3100(0x1ba)],'targets':_0x97469d},'beforeById':new Map(_0x2c2cfa[_0x1f3100(0x195)](_0x4ac56e=>[_0x4ac56e['id'],_0x4ac56e]))};}function selectTargets(_0x4bd063,_0x3f90d1,_0x36376b){const _0x96bc91=a135_0x18f04c,_0x516d0f=new Map(_0x4bd063[_0x96bc91(0x195)](_0x26906c=>[_0x26906c['id'],_0x26906c])),_0x553c21=new Map(),_0x21f34c=_0x3f90d1[_0x96bc91(0x1c2)](_0x8f1be1=>!_0x516d0f[_0x96bc91(0x1ea)](_0x8f1be1));if(_0x21f34c[_0x96bc91(0x1b8)]>0x0)throw menuError(_0x96bc91(0x1d1),_0x96bc91(0x1d7)+_0x21f34c[_0x96bc91(0x1ca)](',\x20')+'.',_0x96bc91(0x1b4));for(const _0x45cc6e of _0x3f90d1){_0x553c21[_0x96bc91(0x1bb)](_0x45cc6e,_0x516d0f[_0x96bc91(0x1ec)](_0x45cc6e));}for(const _0x59a884 of _0x36376b){const _0xf080f5=_0x4bd063['filter'](_0x9eab1a=>_0x9eab1a[_0x96bc91(0x173)]===_0x59a884);if(_0xf080f5['length']===0x0)throw menuError(_0x96bc91(0x1d1),_0x96bc91(0x1da)+JSON[_0x96bc91(0x1a9)](_0x59a884)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0xf080f5[_0x96bc91(0x1b8)]>0x1)throw menuError(_0x96bc91(0x18f),_0x96bc91(0x1cf)+JSON[_0x96bc91(0x1a9)](_0x59a884)+'.',_0x96bc91(0x1ee)+_0xf080f5[_0x96bc91(0x195)](_0xcd8936=>_0xcd8936['id'])['join'](',\x20')+'.');const _0x17059a=_0xf080f5[0x0];_0x553c21[_0x96bc91(0x1bb)](_0x17059a['id'],_0x17059a);}return[..._0x553c21['values']()];}function parseMenuIds(_0x530afc){const _0x3faf48=a135_0x18f04c,_0x473b0b=parseCsv(_0x530afc),_0x57271c=_0x473b0b[_0x3faf48(0x195)](Number);if(_0x57271c[_0x3faf48(0x1b7)](_0x11566a=>!Number[_0x3faf48(0x1ac)](_0x11566a)||_0x11566a<=0x0))throw CliErrors[_0x3faf48(0x1af)](_0x3faf48(0x189));return[...new Set(_0x57271c)];}function parseCsv(_0x32e464){const _0x1f82eb=a135_0x18f04c;return[...new Set(_0x32e464[_0x1f82eb(0x19c)](',')[_0x1f82eb(0x195)](_0x403b6f=>_0x403b6f[_0x1f82eb(0x1d4)]())['filter'](Boolean))];}function parseBooleanFlag(_0x49ef2e,_0x641aa2,_0x4adafd){const _0xf9c451=a135_0x18f04c;if(!hasFlag(_0x49ef2e,_0x641aa2)){if(_0x4adafd)throw CliErrors[_0xf9c451(0x1c8)](_0x641aa2);return undefined;}const _0x161572=_0x49ef2e['rawFlags'][_0x641aa2];if(_0x161572===!![]||_0x161572===![])return _0x161572;if(_0x161572===_0xf9c451(0x1a7))return!![];if(_0x161572===_0xf9c451(0x1b1))return![];throw CliErrors[_0xf9c451(0x1af)]('--'+_0x641aa2+'\x20must\x20be\x20true\x20or\x20false.');}function a135_0x129f(_0x1ee465,_0x466bc9){_0x1ee465=_0x1ee465-0x171;const _0x5cd2af=a135_0x5cd2();let _0x129fcb=_0x5cd2af[_0x1ee465];return _0x129fcb;}function verifyVisibilityUpdate(_0x4750ef,_0xe162be,_0x38b0c9){const _0x2b97c4=a135_0x18f04c;assertVerified(!!_0xe162be,_0x2b97c4(0x185)+_0x4750ef['id']+_0x2b97c4(0x1e6)),assertVerified(_0xe162be['visible']===_0x38b0c9,_0x2b97c4(0x185)+_0x4750ef['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x3645b0=[['id',_0xe162be['id'],_0x4750ef['id']],[_0x2b97c4(0x178),_0xe162be['parentId'],_0x4750ef['parentId']],['depth',_0xe162be[_0x2b97c4(0x18e)],_0x4750ef[_0x2b97c4(0x18e)]],[_0x2b97c4(0x191),_0xe162be['label'],_0x4750ef[_0x2b97c4(0x191)]],[_0x2b97c4(0x173),_0xe162be[_0x2b97c4(0x173)],_0x4750ef[_0x2b97c4(0x173)]],[_0x2b97c4(0x181),_0xe162be[_0x2b97c4(0x181)],_0x4750ef['url']],['type',_0xe162be[_0x2b97c4(0x1cc)],_0x4750ef[_0x2b97c4(0x1cc)]],[_0x2b97c4(0x1d8),_0xe162be[_0x2b97c4(0x1d8)],_0x4750ef[_0x2b97c4(0x1d8)]],[_0x2b97c4(0x1c6),_0xe162be[_0x2b97c4(0x1c6)],_0x4750ef[_0x2b97c4(0x1c6)]],[_0x2b97c4(0x1a6),_0xe162be[_0x2b97c4(0x1a6)],_0x4750ef[_0x2b97c4(0x1a6)]],[_0x2b97c4(0x18a),_0xe162be['childrenIds'],_0x4750ef['childrenIds']],[_0x2b97c4(0x1a5),_0xe162be[_0x2b97c4(0x1a5)],_0x4750ef[_0x2b97c4(0x1a5)]],[_0x2b97c4(0x177),_0xe162be['pageId'],_0x4750ef[_0x2b97c4(0x177)]],[_0x2b97c4(0x1b0),_0xe162be[_0x2b97c4(0x1b0)],_0x4750ef[_0x2b97c4(0x1b0)]],[_0x2b97c4(0x1e9),_0xe162be[_0x2b97c4(0x1e9)],_0x4750ef[_0x2b97c4(0x1e9)]],[_0x2b97c4(0x193),_0xe162be[_0x2b97c4(0x193)],_0x4750ef[_0x2b97c4(0x193)]],[_0x2b97c4(0x1be),_0xe162be['datasetCode'],_0x4750ef['datasetCode']]];for(const [_0x34110b,_0xe122bd,_0x3ba3c8]of _0x3645b0){assertVerified(sameValue(_0xe122bd,_0x3ba3c8),_0x2b97c4(0x185)+_0x4750ef['id']+'\x20'+_0x34110b+'\x20changed\x20unexpectedly.');}}function a135_0x5cd2(){const _0x1d7f25=['stringify','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','122311fJDnxQ','isSafeInteger','failed','\x20failed.','validation','pageType','false','11423188ikloYH','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','recovered','\x20menu(s),\x20expected\x20','some','length','requestedVisible','visible','set','hash','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','datasetCode','expectVisible','byId','isArray','filter','menus','28stKbao','expectedCount','resources','before','flagMissing','Would\x20update\x20visibility\x20for\x20','join','update-recovery','type','Requested\x20menu\x20visibility','update','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','num','menu_selector_not_found','/smartapi/menu/update','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','trim','paths','4167816KIEukL','Menu\x20id\x20selector(s)\x20not\x20found:\x20','sort','\x20menu(s);\x20skip\x20','Menu\x20path\x20selector\x20not\x20found:\x20','targets','verification','\x20unchanged\x20menu(s).','Final\x20menu\x20visibility\x20readback\x20failed.','code','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','visibility-update','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Menu\x20visibility\x20update\x20completed:\x20','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','boolean','456392hJIBSA','modelType','has','55805475pezbiQ','get','9guFnkp','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','cookie','menu_state_drift','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','menu_expected_count_mismatch','path','menu_verification_failed','\x20menu(s);\x20skipped\x20','beforeById','pageId','parentId','message','menu','rabetbase\x20menu\x20list\x20--format\x20compress','appCode','Response\x20was\x20lost\x20and\x20menu\x20','Selected\x20','expect-visible','update\x20menu\x20visibility','url','menu_permission_denied','expected-count','1823695wxGhTv','Menu\x20','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','update-menu-visibility','warnings','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','childrenIds','18PglYNw','push','str','depth','menu_selector_ambiguous','17909570beroSc','label','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','datasetId','\x20skipped,\x20','map','menu-ids','string','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','6pEHOMT','updated','\x20updated,\x20','split','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','POST','menuIds','high-risk-write','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','plan','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Updated\x20visibility\x20for\x20','childrenCount','resourcesValid','true','plannedActions'];a135_0x5cd2=function(){return _0x1d7f25;};return a135_0x5cd2();}function sameValue(_0x7ad9c,_0x5d9f06){const _0xd8c423=a135_0x18f04c;if(Array[_0xd8c423(0x1c1)](_0x7ad9c)||Array[_0xd8c423(0x1c1)](_0x5d9f06))return JSON[_0xd8c423(0x1a9)](_0x7ad9c)===JSON[_0xd8c423(0x1a9)](_0x5d9f06);return _0x7ad9c===_0x5d9f06;}
|
|
1
|
+
const a135_0x4a82ce=a135_0x5e37;(function(_0x264136,_0x44e43a){const _0x5c6dee=a135_0x5e37,_0x59fdd7=_0x264136();while(!![]){try{const _0x110cff=-parseInt(_0x5c6dee(0x162))/0x1*(parseInt(_0x5c6dee(0x16d))/0x2)+-parseInt(_0x5c6dee(0x113))/0x3+-parseInt(_0x5c6dee(0x171))/0x4+-parseInt(_0x5c6dee(0x170))/0x5+-parseInt(_0x5c6dee(0x12a))/0x6*(-parseInt(_0x5c6dee(0x168))/0x7)+-parseInt(_0x5c6dee(0x12c))/0x8+parseInt(_0x5c6dee(0x13b))/0x9;if(_0x110cff===_0x44e43a)break;else _0x59fdd7['push'](_0x59fdd7['shift']());}catch(_0x25f05d){_0x59fdd7['push'](_0x59fdd7['shift']());}}}(a135_0x5796,0x5f51c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a135_0x5796(){const _0x562586=['\x20menu(s);\x20skipped\x20','resourcesValid','verify\x20menu\x20visibility\x20update','failed','638910kiZsRj','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','expectVisible','flagMissing','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','menu\x20list','expectedCount','pageType','Updated\x20visibility\x20for\x20','Response\x20was\x20lost\x20and\x20menu\x20','datasetCode','expected-count','menu_expected_count_mismatch','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','type','Response\x20was\x20lost\x20for\x20menu\x20','recovered','hash','\x20changed\x20unexpectedly.','Final\x20menu\x20visibility\x20readback\x20failed.','menu_selector_not_found','12CcIDuY','boolean','1626408nfGoqq','join','childrenIds','stringify','set','path','byId','Menu\x20path\x20selector\x20not\x20found:\x20','expect-visible','plannedActions','update\x20visibility\x20for','updated','get','warnings','Menu\x20id\x20selector(s)\x20not\x20found:\x20','17533800FCzvJC','sort','update-recovery','\x20unchanged\x20menu(s).','code','rawFlags','pageId','visibility-update','message','string','resources','modelType','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','menuIds','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','POST','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','\x20skipped,\x20','\x20updated,\x20','before','childrenCount','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','isSafeInteger','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','number','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','update','rabetbase\x20menu\x20list\x20--format\x20compress','plan','label','targets','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','has','\x20must\x20be\x20true\x20or\x20false.','paths','Requested\x20menu\x20visibility','appCode','update\x20menu\x20visibility','27539aMpTNN','verification','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','true','menu-ids','filter','280063PVDZha','datasetId','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','body','length','28MdBtaB','visible','push','884870Muicpc','2635996jAaDkx','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','\x20failed.','/smartapi/menu/update','menu_verification_failed','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','Menu\x20','map','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','Selected\x20','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','validation','false','requestedVisible','parentId','isArray','depth','Menu\x20visibility\x20update\x20completed:\x20','cookie','url','beforeById','Would\x20update\x20visibility\x20for\x20','values','some'];a135_0x5796=function(){return _0x562586;};return a135_0x5796();}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':a135_0x4a82ce(0x14b),'path':a135_0x4a82ce(0x174)}];export const menuVisibilityUpdate={'service':'menu','command':a135_0x4a82ce(0x142),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':'high-risk-write','structuredErrors':!![],'flags':[{'name':a135_0x4a82ce(0x166),'type':'string','description':a135_0x4a82ce(0x153)},{'name':a135_0x4a82ce(0x15e),'type':a135_0x4a82ce(0x144),'description':a135_0x4a82ce(0x119)},{'name':a135_0x4a82ce(0x16e),'type':a135_0x4a82ce(0x12b),'required':!![],'description':a135_0x4a82ce(0x15f)},{'name':'expect-visible','type':'boolean','description':a135_0x4a82ce(0x15b)},{'name':a135_0x4a82ce(0x120),'type':a135_0x4a82ce(0x154),'description':a135_0x4a82ce(0x151)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1f6f00){parseInput(_0x1f6f00),requireExplicitYes(_0x1f6f00);},async 'dryRun'(_0x32282e){const _0x16d57d=a135_0x4a82ce,_0x3c0dd9=await buildPlan(_0x32282e,!![]),_0x48feac=_0x3c0dd9[_0x16d57d(0x158)][_0x16d57d(0x135)]?.[_0x16d57d(0x16c)]??0x0,_0x5a86f4=_0x3c0dd9[_0x16d57d(0x158)]['targets'][_0x16d57d(0x16c)]-_0x48feac;return menuDryRunResult(_0x3c0dd9['plan'],{'method':_0x16d57d(0x14b),'url':'/smartapi/menu/update','body':{'updates':_0x3c0dd9[_0x16d57d(0x158)][_0x16d57d(0x135)]?.[_0x16d57d(0x178)](_0x111d82=>_0x111d82[_0x16d57d(0x16b)])??[]},'description':_0x16d57d(0x186)+_0x48feac+'\x20menu(s);\x20skip\x20'+_0x5a86f4+_0x16d57d(0x13e)});},async 'execute'(_0x2ba8d3){const _0x590615=a135_0x4a82ce;requireExplicitYes(_0x2ba8d3);const _0x46106f=await buildPlan(_0x2ba8d3,![]);await recheckMutationSnapshot(_0x2ba8d3,_0x46106f[_0x590615(0x158)],'update\x20menu\x20visibility');const _0x1348b6=[],_0x3c6aba=[],_0x1e83ae=[];for(const _0x214e08 of _0x46106f[_0x590615(0x158)][_0x590615(0x15a)]){if(_0x214e08[_0x590615(0x14f)][_0x590615(0x16e)]===_0x46106f[_0x590615(0x158)]['requestedVisible']){_0x1348b6[_0x590615(0x16f)]({'id':_0x214e08['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x2ba8d3[_0x590615(0x160)],_0x2ba8d3[_0x590615(0x183)],{'id':_0x214e08['id'],'visible':_0x46106f[_0x590615(0x158)]['requestedVisible']}),_0x1348b6[_0x590615(0x16f)]({'id':_0x214e08['id'],'updated':!![],'skipped':![]});}catch(_0x31c4da){const _0x2ab59c=mapMenuApiError(_0x31c4da,_0x590615(0x136),_0x214e08['id']);if(isMenuResponseLoss(_0x31c4da)&&_0x2ab59c[_0x590615(0x13f)]!=='menu_permission_denied'){_0x1e83ae['push'](_0x214e08['id']);continue;}_0x3c6aba[_0x590615(0x16f)]({'id':_0x214e08['id'],'stage':_0x590615(0x156),'code':_0x2ab59c[_0x590615(0x13f)],'message':_0x2ab59c['message']});}}let _0x473d5e;try{_0x473d5e=await fetchMenuSnapshot(_0x2ba8d3['appCode'],_0x2ba8d3['cookie']);}catch(_0x166291){const _0x27bced=describeMenuErrorCause(_0x166291,_0x590615(0x111)),_0xd42b3b=_0x1e83ae[_0x590615(0x178)](_0x58255c=>({'id':_0x58255c,'stage':_0x590615(0x13d),'code':_0x590615(0x175),'message':_0x590615(0x124)+_0x58255c+_0x590615(0x114),'requestedStateConfirmed':![],'recovered':![]})),_0x3fe776={'stage':_0x590615(0x163),'code':_0x590615(0x175),'message':_0x590615(0x128),'targetIds':_0x46106f[_0x590615(0x158)]['targets'][_0x590615(0x178)](_0x4f943b=>_0x4f943b['id']),'requestedStateConfirmed':![],..._0x27bced};throw menuFailure(asVerificationError(_0x166291,_0x590615(0x17b)),_0x46106f[_0x590615(0x158)],{'stage':'verification','succeeded':_0x1348b6,'failedRecords':[..._0x3c6aba,..._0xd42b3b,_0x3fe776],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':_0x590615(0x157)}});}const _0x255bf5=[];for(const _0x310f7c of _0x1348b6){const _0x43adce=Number(_0x310f7c['id']),_0x577bf1=_0x46106f[_0x590615(0x185)][_0x590615(0x138)](_0x43adce),_0x4c5a1e=_0x473d5e['byId'][_0x590615(0x138)](_0x43adce);try{verifyVisibilityUpdate(_0x577bf1,_0x4c5a1e,_0x46106f['plan'][_0x590615(0x17e)]);}catch(_0x4b8378){const _0x572653=asVerificationError(_0x4b8378,_0x590615(0x177)+_0x43adce+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x255bf5['push']({'id':_0x43adce,'stage':_0x590615(0x163),'code':_0x572653[_0x590615(0x13f)],'message':_0x572653[_0x590615(0x143)],'requestedStateConfirmed':![]});}}for(const _0x10d6f8 of _0x1e83ae){const _0x5028ba=_0x46106f[_0x590615(0x185)][_0x590615(0x138)](_0x10d6f8),_0x1ed8cd=_0x473d5e[_0x590615(0x132)]['get'](_0x10d6f8);try{verifyVisibilityUpdate(_0x5028ba,_0x1ed8cd,_0x46106f['plan']['requestedVisible']),_0x1348b6['push']({'id':_0x10d6f8,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x4adab2){const _0x3b433d=asVerificationError(_0x4adab2,_0x590615(0x11e)+_0x10d6f8+_0x590615(0x148));_0x255bf5['push']({'id':_0x10d6f8,'stage':'update-recovery','code':_0x3b433d['code'],'message':_0x3b433d[_0x590615(0x143)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x255bf5['length']>0x0){const _0x57b2d3=_0x255bf5[_0x590615(0x178)](_0x3ed0ea=>Number(_0x3ed0ea['id'])),_0x4c8d4a=_0x1348b6['filter'](_0x62f161=>_0x62f161[_0x590615(0x125)]===!![])[_0x590615(0x16c)],_0x3a59c1=menuError('menu_verification_failed',_0x590615(0x172)+_0x57b2d3[_0x590615(0x12d)](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x3a59c1,_0x46106f[_0x590615(0x158)],{'stage':'verification','succeeded':_0x1348b6,'failedRecords':[..._0x3c6aba,..._0x255bf5],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x590615(0x112),..._0x57b2d3[_0x590615(0x16c)]===0x1?{'targetId':_0x57b2d3[0x0]}:{'targetIds':_0x57b2d3},'recoveredCount':_0x4c8d4a,'lookupCommand':_0x590615(0x157)}});}const _0x426379=_0x1348b6[_0x590615(0x167)](_0x2786b8=>_0x2786b8[_0x590615(0x137)]===!![])[_0x590615(0x16c)],_0x17031e=_0x1348b6[_0x590615(0x16c)]-_0x426379,_0xc8355f={..._0x46106f[_0x590615(0x158)],'succeeded':_0x1348b6,'failed':_0x3c6aba,'warnings':_0x3c6aba[_0x590615(0x16c)]>0x0?[..._0x46106f['plan'][_0x590615(0x139)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x46106f[_0x590615(0x158)][_0x590615(0x139)],'verification':{'checkedBy':_0x590615(0x11a),'snapshotHash':_0x473d5e[_0x590615(0x126)],'matchesRequestedState':_0x3c6aba['length']===0x0,'recoveredCount':_0x1e83ae['length']}};return{'ok':_0x3c6aba[_0x590615(0x16c)]===0x0,'data':_0xc8355f,'message':_0x3c6aba[_0x590615(0x16c)]===0x0?_0x590615(0x11d)+_0x426379+_0x590615(0x10f)+_0x17031e+_0x590615(0x13e):_0x590615(0x182)+_0x426379+_0x590615(0x14e)+_0x17031e+_0x590615(0x14d)+_0x3c6aba[_0x590615(0x16c)]+_0x590615(0x173)};}};function parseInput(_0xba331e){const _0x46a639=a135_0x4a82ce,_0x38c75e=parseMenuIds(_0xba331e['str']('menu-ids')),_0x552a11=parseCsv(_0xba331e['str'](_0x46a639(0x15e)));if(_0x38c75e[_0x46a639(0x16c)]===0x0&&_0x552a11[_0x46a639(0x16c)]===0x0)throw CliErrors['validation'](_0x46a639(0x122));const _0x47934c=parseBooleanFlag(_0xba331e,'visible',!![]),_0x45b719=parseBooleanFlag(_0xba331e,_0x46a639(0x134),![]);let _0x57cb49;if(hasFlag(_0xba331e,_0x46a639(0x120))){_0x57cb49=_0xba331e['num']('expected-count');if(!Number[_0x46a639(0x152)](_0x57cb49)||_0x57cb49<0x0)throw CliErrors['validation'](_0x46a639(0x155));}return{'menuIds':_0x38c75e,'paths':_0x552a11,'visible':_0x47934c,'expectVisible':_0x45b719,'expectedCount':_0x57cb49};}function a135_0x5e37(_0x472bca,_0x5f48b1){_0x472bca=_0x472bca-0x10e;const _0x579665=a135_0x5796();let _0x5e3765=_0x579665[_0x472bca];return _0x5e3765;}async function buildPlan(_0x184f54,_0x2aef55){const _0x310045=a135_0x4a82ce,_0x10e575=parseInput(_0x184f54),_0x397ee0=await fetchMutationSnapshot(_0x184f54,_0x310045(0x161)),_0x797518=selectTargets(_0x397ee0['menus'],_0x10e575['menuIds'],_0x10e575['paths']);if(_0x10e575[_0x310045(0x11b)]!==undefined&&_0x797518[_0x310045(0x16c)]!==_0x10e575[_0x310045(0x11b)])throw menuError(_0x310045(0x121),_0x310045(0x17a)+_0x797518['length']+'\x20menu(s),\x20expected\x20'+_0x10e575[_0x310045(0x11b)]+'.',_0x310045(0x176));if(_0x10e575[_0x310045(0x117)]!==undefined){const _0x552ccf=_0x797518['filter'](_0x5a18ef=>_0x5a18ef[_0x310045(0x16e)]!==_0x10e575[_0x310045(0x117)]);if(_0x552ccf[_0x310045(0x16c)]>0x0)throw menuError('menu_state_drift',_0x310045(0x115)+_0x552ccf[_0x310045(0x178)](_0xebbf8f=>_0xebbf8f['id'])[_0x310045(0x12d)](',\x20')+'.',_0x310045(0x179));}const _0x1a371a=_0x797518[_0x310045(0x178)](_0x3d9edc=>({'id':_0x3d9edc['id'],'label':_0x3d9edc[_0x310045(0x159)],'path':_0x3d9edc['path'],'before':{'visible':_0x3d9edc['visible']},'after':{'visible':_0x10e575[_0x310045(0x16e)]}})),_0x3e6777=_0x1a371a[_0x310045(0x167)](_0x20722e=>_0x20722e[_0x310045(0x14f)]['visible']!==_0x10e575[_0x310045(0x16e)])['map'](_0x132aab=>({'stage':'update-menu-visibility','method':_0x310045(0x14b),'path':'/smartapi/menu/update','body':{'appCode':_0x184f54['appCode'],'id':_0x132aab['id'],'visible':_0x10e575[_0x310045(0x16e)]}})),_0x4d0eb0=mutationResult({'operation':_0x310045(0x142),'selector':{'menuIds':_0x10e575[_0x310045(0x149)],'paths':_0x10e575[_0x310045(0x15e)]},'before':{'menus':_0x797518[_0x310045(0x178)](_0x1bac84=>({'id':_0x1bac84['id'],'path':_0x1bac84['path'],'visible':_0x1bac84[_0x310045(0x16e)]}))},'after':{'menus':_0x797518[_0x310045(0x178)](_0x17c8a1=>({'id':_0x17c8a1['id'],'path':_0x17c8a1['path'],'visible':_0x10e575[_0x310045(0x16e)]}))},'dryRun':_0x2aef55,'backend':[...BACKEND],'plannedActions':_0x3e6777,'snapshotHash':_0x397ee0[_0x310045(0x126)],'warnings':_0x3e6777[_0x310045(0x16c)]===0x0?[_0x310045(0x16a)]:[]});return{'plan':{..._0x4d0eb0,'requestedVisible':_0x10e575[_0x310045(0x16e)],'targets':_0x1a371a},'beforeById':new Map(_0x797518[_0x310045(0x178)](_0x4c9d4a=>[_0x4c9d4a['id'],_0x4c9d4a]))};}function selectTargets(_0xa0d7ee,_0x5407a5,_0x3a4384){const _0x3aa99c=a135_0x4a82ce,_0x3c6547=new Map(_0xa0d7ee['map'](_0x5971be=>[_0x5971be['id'],_0x5971be])),_0x283ace=new Map(),_0x2bbdda=_0x5407a5[_0x3aa99c(0x167)](_0x4de4c3=>!_0x3c6547[_0x3aa99c(0x15c)](_0x4de4c3));if(_0x2bbdda[_0x3aa99c(0x16c)]>0x0)throw menuError(_0x3aa99c(0x129),_0x3aa99c(0x13a)+_0x2bbdda['join'](',\x20')+'.',_0x3aa99c(0x14c));for(const _0x165096 of _0x5407a5){_0x283ace[_0x3aa99c(0x130)](_0x165096,_0x3c6547[_0x3aa99c(0x138)](_0x165096));}for(const _0x251a4a of _0x3a4384){const _0x5053ed=_0xa0d7ee[_0x3aa99c(0x167)](_0x478f25=>_0x478f25[_0x3aa99c(0x131)]===_0x251a4a);if(_0x5053ed[_0x3aa99c(0x16c)]===0x0)throw menuError('menu_selector_not_found',_0x3aa99c(0x133)+JSON[_0x3aa99c(0x12f)](_0x251a4a)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x5053ed[_0x3aa99c(0x16c)]>0x1)throw menuError('menu_selector_ambiguous','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON['stringify'](_0x251a4a)+'.',_0x3aa99c(0x116)+_0x5053ed[_0x3aa99c(0x178)](_0x235f13=>_0x235f13['id'])[_0x3aa99c(0x12d)](',\x20')+'.');const _0x506791=_0x5053ed[0x0];_0x283ace[_0x3aa99c(0x130)](_0x506791['id'],_0x506791);}return[..._0x283ace[_0x3aa99c(0x187)]()];}function parseMenuIds(_0x241550){const _0x488be4=a135_0x4a82ce,_0x4284c4=parseCsv(_0x241550),_0x17441f=_0x4284c4[_0x488be4(0x178)](Number);if(_0x17441f[_0x488be4(0x10e)](_0x2ffa85=>!Number[_0x488be4(0x152)](_0x2ffa85)||_0x2ffa85<=0x0))throw CliErrors[_0x488be4(0x17c)](_0x488be4(0x164));return[...new Set(_0x17441f)];}function parseCsv(_0x226884){const _0x590005=a135_0x4a82ce;return[...new Set(_0x226884['split'](',')[_0x590005(0x178)](_0x3758b0=>_0x3758b0['trim']())[_0x590005(0x167)](Boolean))];}function parseBooleanFlag(_0xe89bfa,_0x98b108,_0x3047bf){const _0x141148=a135_0x4a82ce;if(!hasFlag(_0xe89bfa,_0x98b108)){if(_0x3047bf)throw CliErrors[_0x141148(0x118)](_0x98b108);return undefined;}const _0x522580=_0xe89bfa[_0x141148(0x140)][_0x98b108];if(_0x522580===!![]||_0x522580===![])return _0x522580;if(_0x522580===_0x141148(0x165))return!![];if(_0x522580===_0x141148(0x17d))return![];throw CliErrors[_0x141148(0x17c)]('--'+_0x98b108+_0x141148(0x15d));}function verifyVisibilityUpdate(_0x31473f,_0x13dad7,_0x5a0ee9){const _0x25d9bc=a135_0x4a82ce;assertVerified(!!_0x13dad7,'Menu\x20'+_0x31473f['id']+_0x25d9bc(0x147)),assertVerified(_0x13dad7[_0x25d9bc(0x16e)]===_0x5a0ee9,'Menu\x20'+_0x31473f['id']+_0x25d9bc(0x14a));const _0x1ef185=[['id',_0x13dad7['id'],_0x31473f['id']],[_0x25d9bc(0x17f),_0x13dad7[_0x25d9bc(0x17f)],_0x31473f[_0x25d9bc(0x17f)]],[_0x25d9bc(0x181),_0x13dad7[_0x25d9bc(0x181)],_0x31473f[_0x25d9bc(0x181)]],['label',_0x13dad7[_0x25d9bc(0x159)],_0x31473f['label']],['path',_0x13dad7[_0x25d9bc(0x131)],_0x31473f[_0x25d9bc(0x131)]],[_0x25d9bc(0x184),_0x13dad7[_0x25d9bc(0x184)],_0x31473f[_0x25d9bc(0x184)]],[_0x25d9bc(0x123),_0x13dad7[_0x25d9bc(0x123)],_0x31473f[_0x25d9bc(0x123)]],[_0x25d9bc(0x13c),_0x13dad7[_0x25d9bc(0x13c)],_0x31473f['sort']],[_0x25d9bc(0x145),_0x13dad7[_0x25d9bc(0x145)],_0x31473f[_0x25d9bc(0x145)]],[_0x25d9bc(0x110),_0x13dad7['resourcesValid'],_0x31473f['resourcesValid']],[_0x25d9bc(0x12e),_0x13dad7[_0x25d9bc(0x12e)],_0x31473f['childrenIds']],[_0x25d9bc(0x150),_0x13dad7['childrenCount'],_0x31473f[_0x25d9bc(0x150)]],['pageId',_0x13dad7[_0x25d9bc(0x141)],_0x31473f[_0x25d9bc(0x141)]],[_0x25d9bc(0x11c),_0x13dad7[_0x25d9bc(0x11c)],_0x31473f[_0x25d9bc(0x11c)]],['modelType',_0x13dad7['modelType'],_0x31473f[_0x25d9bc(0x146)]],[_0x25d9bc(0x169),_0x13dad7[_0x25d9bc(0x169)],_0x31473f[_0x25d9bc(0x169)]],[_0x25d9bc(0x11f),_0x13dad7[_0x25d9bc(0x11f)],_0x31473f[_0x25d9bc(0x11f)]]];for(const [_0x3bafa4,_0x285c0c,_0x2d91d5]of _0x1ef185){assertVerified(sameValue(_0x285c0c,_0x2d91d5),_0x25d9bc(0x177)+_0x31473f['id']+'\x20'+_0x3bafa4+_0x25d9bc(0x127));}}function sameValue(_0x4f6420,_0x45dd3d){const _0x52ca35=a135_0x4a82ce;if(Array[_0x52ca35(0x180)](_0x4f6420)||Array[_0x52ca35(0x180)](_0x45dd3d))return JSON['stringify'](_0x4f6420)===JSON[_0x52ca35(0x12f)](_0x45dd3d);return _0x4f6420===_0x45dd3d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a136_0x593862=a136_0x2b23;(function(_0x3c00cd,_0x5764a1){const _0x2ed617=a136_0x2b23,_0x9030e8=_0x3c00cd();while(!![]){try{const _0x26bd90=parseInt(_0x2ed617(0xf2))/0x1*(-parseInt(_0x2ed617(0x101))/0x2)+-parseInt(_0x2ed617(0x100))/0x3*(-parseInt(_0x2ed617(0xfb))/0x4)+parseInt(_0x2ed617(0xed))/0x5*(-parseInt(_0x2ed617(0x10c))/0x6)+parseInt(_0x2ed617(0xfd))/0x7*(-parseInt(_0x2ed617(0x103))/0x8)+parseInt(_0x2ed617(0xfc))/0x9*(-parseInt(_0x2ed617(0xf4))/0xa)+-parseInt(_0x2ed617(0xff))/0xb+parseInt(_0x2ed617(0xf5))/0xc;if(_0x26bd90===_0x5764a1)break;else _0x9030e8['push'](_0x9030e8['shift']());}catch(_0x4effef){_0x9030e8['push'](_0x9030e8['shift']());}}}(a136_0x3895,0x8efda));import{asDryRunResult}from'../../commands/common/dry-run.js';function a136_0x2b23(_0x222d27,_0x5c51cf){_0x222d27=_0x222d27-0xec;const _0x3895ec=a136_0x3895();let _0x2b2371=_0x3895ec[_0x222d27];return _0x2b2371;}import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH='/notification/channel-config/create';function a136_0x3895(){const _0x2860d8=['planned','appCode','verification','5wAjIoT','notification_config_create_outcome_unknown','verified','POST','notification','79DYAvUC','endpointUrl','2129990seBdzu','20191620ncASkS','Inspect\x20with\x20','description','mutation','isSafeInteger','connectTimeout','3524504XmnKXP','9yCBQLb','189231gKmRJB','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','12194226OdwayN','3PyIAGu','1264ZBxbwD','input','56kpxNiU','Created\x20notification\x20config\x20','channelType','config-create','document','configName',';\x20do\x20not\x20resubmit.','configCode','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','2504082NPRbxw','write','create'];a136_0x3895=function(){return _0x2860d8;};return a136_0x3895();}async function prepareCreate(_0x46eb8e){const _0x2bfee5=a136_0x2b23,_0x99204e=await readNotificationDocument(_0x46eb8e,_0x2bfee5(0x10e)),_0x408893=createMutationInput(_0x46eb8e[_0x2bfee5(0x110)],_0x99204e);return{'document':_0x99204e,'input':_0x408893,'planned':projectNotificationConfig({'appCode':_0x46eb8e['appCode'],'configName':_0x99204e['configName'],'channelType':_0x99204e[_0x2bfee5(0x105)],'endpointUrl':_0x99204e[_0x2bfee5(0xf3)],'channelConfig':_0x99204e['channelConfig'],'description':_0x99204e[_0x2bfee5(0xf7)],'connectTimeout':_0x99204e[_0x2bfee5(0xfa)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x99204e['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a136_0x593862(0xf1),'command':a136_0x593862(0x106),'description':'Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','risk':a136_0x593862(0x10d),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x286fc3){assertSingleNotificationSource(_0x286fc3);},async 'dryRun'(_0x1f87a2){const _0x5b6e31=a136_0x593862,_0x4be833=await prepareCreate(_0x1f87a2),_0x27981e=notificationLookupCommand(_0x1f87a2[_0x5b6e31(0x110)],_0x4be833[_0x5b6e31(0x107)]['channelType']);return asDryRunResult({'operation':_0x5b6e31(0x10e),'selector':{'appCode':_0x1f87a2[_0x5b6e31(0x110)],'configName':_0x4be833[_0x5b6e31(0x107)][_0x5b6e31(0x108)],'channelType':_0x4be833[_0x5b6e31(0x107)][_0x5b6e31(0x105)]},'before':null,'after':_0x4be833[_0x5b6e31(0x10f)],'dryRun':!![],'backend':{'method':_0x5b6e31(0xf0),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x5b6e31(0x10f),'lookupCommand':_0x27981e}},{'method':_0x5b6e31(0xf0),'url':CREATE_PATH});},async 'execute'(_0x5614e2){const _0x3a8576=a136_0x593862,_0x521f81=await prepareCreate(_0x5614e2),_0x581660=notificationLookupCommand(_0x5614e2['appCode'],_0x521f81[_0x3a8576(0x107)][_0x3a8576(0x105)]);let _0x122b58;try{_0x122b58=await createNotificationChannelConfig(_0x521f81[_0x3a8576(0x102)]);}catch(_0x13ef18){if(isPlatformTransportFailure(_0x13ef18))throw notificationError('notification_config_create_outcome_unknown',_0x3a8576(0xfe),_0x3a8576(0xf6)+_0x581660+_0x3a8576(0x109));throw safeApiFailure(_0x3a8576(0x10e),_0x3a8576(0xf8),'Inspect\x20with\x20'+_0x581660+';\x20no\x20automatic\x20retry\x20was\x20attempted.');}if(!Number[_0x3a8576(0xf9)](_0x122b58)||_0x122b58<=0x0)throw notificationError(_0x3a8576(0xee),_0x3a8576(0x10b),_0x3a8576(0xf6)+_0x581660+';\x20do\x20not\x20resubmit.');let _0xd9b17a;try{const _0x27b113=await getNotificationChannelConfig(_0x122b58,_0x5614e2[_0x3a8576(0x110)]);_0xd9b17a=normalizeExactNotificationConfig(_0x27b113,_0x122b58,_0x5614e2[_0x3a8576(0x110)]);}catch{throw safeApiFailure(_0x3a8576(0x10e),_0x3a8576(0xec),_0x3a8576(0xf6)+_0x581660+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x3a8576(0x10e),'selector':{'appCode':_0xd9b17a[_0x3a8576(0x110)],'id':_0xd9b17a['id'],'configCode':_0xd9b17a[_0x3a8576(0x10a)],'configName':_0xd9b17a[_0x3a8576(0x108)],'channelType':_0xd9b17a[_0x3a8576(0x105)]},'before':null,'after':projectNotificationConfig(_0xd9b17a),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3a8576(0xef),'lookupCommand':_0x581660}},'message':_0x3a8576(0x104)+_0xd9b17a['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a137_0x365e91=a137_0x1230;(function(_0x209b86,_0x36abac){const _0x14734e=a137_0x1230,_0x5b65d5=_0x209b86();while(!![]){try{const _0x3ef8d0=-parseInt(_0x14734e(0x1de))/0x1*(parseInt(_0x14734e(0x1e9))/0x2)+-parseInt(_0x14734e(0x1f4))/0x3+parseInt(_0x14734e(0x1f7))/0x4*(-parseInt(_0x14734e(0x1ef))/0x5)+parseInt(_0x14734e(0x1e4))/0x6+-parseInt(_0x14734e(0x1fa))/0x7+-parseInt(_0x14734e(0x1f8))/0x8+-parseInt(_0x14734e(0x1ea))/0x9*(-parseInt(_0x14734e(0x1f6))/0xa);if(_0x3ef8d0===_0x36abac)break;else _0x5b65d5['push'](_0x5b65d5['shift']());}catch(_0x51650d){_0x5b65d5['push'](_0x5b65d5['shift']());}}}(a137_0x174a,0xb4698));import{asDryRunResult}from'../../commands/common/dry-run.js';function a137_0x174a(){const _0x35c0b5=['unshift','notification_config_delete_verification_unavailable','3122187KIWDGf','delete','42500950tPpFxM','216xcVySB','7428600KaaniM','before','6044787PcYqpl','Notification\x20config\x20','appCode','notification_config_delete_verification_failed','671059MpLhhr','planned','POST','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','high-risk-write',';\x20no\x20automatic\x20retry\x20was\x20attempted.','5639628vtKEvg','channelType','config-delete','/notification/channel-config/delete','mutation','4gCixML','9QFPHrW','notification_config_delete_outcome_unknown','\x20remains\x20present\x20after\x20delete.',';\x20do\x20not\x20resubmit\x20automatically.','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','25565sTLLlf','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','Inspect\x20with\x20'];a137_0x174a=function(){return _0x35c0b5;};return a137_0x174a();}import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a137_0x365e91(0x1e7),REFERENCE_WARNING=a137_0x365e91(0x1e1);function a137_0x1230(_0x655bcc,_0x42e960){_0x655bcc=_0x655bcc-0x1de;const _0x174a6b=a137_0x174a();let _0x123029=_0x174a6b[_0x655bcc];return _0x123029;}async function prepareDelete(_0x34120f){const _0x1cb229=a137_0x365e91,_0x5203a6=readNotificationId(_0x34120f),_0x36b653=await requireExactNotificationConfig(_0x34120f[_0x1cb229(0x1fc)],_0x5203a6,_0x1cb229(0x1f5));return{'id':_0x5203a6,'before':_0x36b653};}export const notificationConfigDelete={'service':'notification','command':a137_0x365e91(0x1e6),'description':a137_0x365e91(0x1ee),'risk':a137_0x365e91(0x1e2),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x388269){readNotificationId(_0x388269),requireNotificationExplicitYes(_0x388269);},async 'dryRun'(_0x548e97){const _0xf4b900=a137_0x365e91,_0x57884b=await prepareDelete(_0x548e97),_0x4931e0=notificationLookupCommand(_0x548e97[_0xf4b900(0x1fc)],_0x57884b[_0xf4b900(0x1f9)][_0xf4b900(0x1e5)]);return asDryRunResult({'operation':_0xf4b900(0x1f5),'selector':notificationSelector(_0x57884b[_0xf4b900(0x1f9)]),'before':projectNotificationConfig(_0x57884b[_0xf4b900(0x1f9)]),'after':null,'dryRun':!![],'backend':{'method':_0xf4b900(0x1e0),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0xf4b900(0x1df),'lookupCommand':_0x4931e0}},{'method':_0xf4b900(0x1e0),'url':DELETE_PATH});},async 'execute'(_0x3c213a){const _0x3defd4=a137_0x365e91;requireNotificationExplicitYes(_0x3c213a);const _0x47d152=await prepareDelete(_0x3c213a),_0x82f5a0=notificationLookupCommand(_0x3c213a[_0x3defd4(0x1fc)],_0x47d152['before'][_0x3defd4(0x1e5)]);let _0xac8a99=![];try{await deleteNotificationChannelConfig(_0x47d152['id'],_0x3c213a[_0x3defd4(0x1fc)]);}catch(_0x47e99f){if(!isPlatformTransportFailure(_0x47e99f))throw safeApiFailure(_0x3defd4(0x1f5),_0x3defd4(0x1e8),'Inspect\x20with\x20'+_0x82f5a0+_0x3defd4(0x1e3));_0xac8a99=!![];}let _0x3c68ba;try{_0x3c68ba=await listNotificationChannelConfigs(_0x3c213a['appCode'],_0x47d152['before'][_0x3defd4(0x1e5)]),validateNotificationDeleteReadback(_0x3c68ba,_0x3c213a['appCode'],_0x47d152['before'][_0x3defd4(0x1e5)]);}catch{throw notificationError(_0xac8a99?_0x3defd4(0x1eb):_0x3defd4(0x1f3),_0x3defd4(0x1fb)+_0x47d152['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x3defd4(0x1f1)+_0x82f5a0+_0x3defd4(0x1ed));}if(_0x3c68ba['some'](_0x3079c4=>_0x3079c4['id']===_0x47d152['id']))throw notificationError(_0xac8a99?'notification_config_delete_outcome_unknown':_0x3defd4(0x1fd),_0x3defd4(0x1fb)+_0x47d152['id']+_0x3defd4(0x1ec),_0x3defd4(0x1f1)+_0x82f5a0+';\x20do\x20not\x20resubmit\x20automatically.');const _0x13ed97=[REFERENCE_WARNING];return _0xac8a99&&_0x13ed97[_0x3defd4(0x1f2)](_0x3defd4(0x1f0)),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0x47d152[_0x3defd4(0x1f9)]),'before':projectNotificationConfig(_0x47d152[_0x3defd4(0x1f9)]),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x13ed97,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0xac8a99,'lookupCommand':_0x82f5a0}},'message':'Deleted\x20notification\x20config\x20'+_0x47d152['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a138_0x1478b1=a138_0x1170;(function(_0x5f4109,_0x384c3b){const _0x5aac3c=a138_0x1170,_0x51d35d=_0x5f4109();while(!![]){try{const _0x4fa5fb=-parseInt(_0x5aac3c(0x152))/0x1*(parseInt(_0x5aac3c(0x15c))/0x2)+-parseInt(_0x5aac3c(0x162))/0x3*(parseInt(_0x5aac3c(0x158))/0x4)+-parseInt(_0x5aac3c(0x161))/0x5*(parseInt(_0x5aac3c(0x166))/0x6)+-parseInt(_0x5aac3c(0x155))/0x7*(parseInt(_0x5aac3c(0x160))/0x8)+-parseInt(_0x5aac3c(0x168))/0x9*(-parseInt(_0x5aac3c(0x167))/0xa)+-parseInt(_0x5aac3c(0x156))/0xb*(-parseInt(_0x5aac3c(0x15a))/0xc)+parseInt(_0x5aac3c(0x157))/0xd;if(_0x4fa5fb===_0x384c3b)break;else _0x51d35d['push'](_0x51d35d['shift']());}catch(_0x2c0d55){_0x51d35d['push'](_0x51d35d['shift']());}}}(a138_0x27b1,0x4c04c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a138_0x1170(_0x461374,_0x47f7b4){_0x461374=_0x461374-0x152;const _0x27b176=a138_0x27b1();let _0x117007=_0x27b176[_0x461374];return _0x117007;}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a138_0x27b1(){const _0x46fa67=['243OkYFhU','type','1927IYrYfr','read','notification','133QRxTUk','11dEwjsL','12234534GJfIRV','4KfGlcX','Found\x20','5138580UUEoOc','appCode','150WqDrEU','map','\x20notification\x20config(s)','Notification\x20channel\x20type','96816lLbiMh','5OGmyaE','1104051lZGbVW','string','EMAIL','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','1894668fCOfoH','110gbPJqS'];a138_0x27b1=function(){return _0x46fa67;};return a138_0x27b1();}export const notificationConfigList={'service':a138_0x1478b1(0x154),'command':'config-list','description':a138_0x1478b1(0x165),'risk':a138_0x1478b1(0x153),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a138_0x1478b1(0x169),'type':a138_0x1478b1(0x163),'description':a138_0x1478b1(0x15f),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a138_0x1478b1(0x164)}],async 'validate'(_0x3bfce2){readNotificationChannelType(_0x3bfce2);},async 'execute'(_0x802064){const _0x110272=a138_0x1478b1,_0x2747b2=readNotificationChannelType(_0x802064),_0xf3824a=await listNotificationChannelConfigs(_0x802064[_0x110272(0x15b)],_0x2747b2),_0x5e63ea=_0xf3824a[_0x110272(0x15d)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x802064[_0x110272(0x15b)],'channelType':_0x2747b2,'count':_0x5e63ea['length'],'configs':_0x5e63ea},'message':_0x110272(0x159)+_0x5e63ea['length']+'\x20'+_0x2747b2+_0x110272(0x15e)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a139_0x3ee437=a139_0x39b0;(function(_0x26e5ea,_0x590e5f){const _0x28db9a=a139_0x39b0,_0x2cd702=_0x26e5ea();while(!![]){try{const _0x517dad=-parseInt(_0x28db9a(0x1c3))/0x1*(parseInt(_0x28db9a(0x1b5))/0x2)+-parseInt(_0x28db9a(0x1d2))/0x3*(-parseInt(_0x28db9a(0x1b3))/0x4)+parseInt(_0x28db9a(0x1b9))/0x5*(parseInt(_0x28db9a(0x1b6))/0x6)+-parseInt(_0x28db9a(0x1bf))/0x7+parseInt(_0x28db9a(0x1cc))/0x8*(parseInt(_0x28db9a(0x1bb))/0x9)+-parseInt(_0x28db9a(0x1d1))/0xa*(-parseInt(_0x28db9a(0x1c7))/0xb)+parseInt(_0x28db9a(0x1c1))/0xc;if(_0x517dad===_0x590e5f)break;else _0x2cd702['push'](_0x2cd702['shift']());}catch(_0x1e6fb9){_0x2cd702['push'](_0x2cd702['shift']());}}}(a139_0x3a8a,0x8ddc7));import{asDryRunResult}from'../../commands/common/dry-run.js';function a139_0x3a8a(){const _0x319b3c=['4vKmZkj','planned','205622rMLTiY','36TkAJzw',';\x20do\x20not\x20resubmit\x20automatically.','\x20via\x20','653090nOVEFF','verified','126veyGCt','notification_config_update_verification_failed','patch','Inspect\x20with\x20--id\x20','3803240TZNtpp',';\x20no\x20automatic\x20retry\x20was\x20attempted.','3731760LIxLhh','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','11goFWWd','appCode','\x20with\x20','before','360107WHgTnL','notification_config_update_verification_unavailable','Notification\x20config\x20','payload','notification','27088YDBCaP','channelType','notification_config_update_outcome_unknown','POST','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','210iJhTeO','1277205beCtqi','/notification/channel-config/update','update','mutation','config-update','provesChange','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.'];a139_0x3a8a=function(){return _0x319b3c;};return a139_0x3a8a();}import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';function a139_0x39b0(_0x11f447,_0x5a0cb2){_0x11f447=_0x11f447-0x1ae;const _0x3a8a6b=a139_0x3a8a();let _0x39b059=_0x3a8a6b[_0x11f447];return _0x39b059;}const UPDATE_PATH=a139_0x3ee437(0x1d3);async function prepareUpdate(_0x13609b){const _0x80d115=a139_0x3ee437,_0x53d8e6=readNotificationId(_0x13609b),_0x498c3d=await readNotificationDocument(_0x13609b,_0x80d115(0x1ae)),_0x4342e8=await requireExactNotificationConfig(_0x13609b[_0x80d115(0x1c4)],_0x53d8e6,_0x80d115(0x1ae));return{'id':_0x53d8e6,'patch':_0x498c3d,'before':_0x4342e8,'payload':mergeUpdateInput(_0x4342e8,_0x498c3d),'planned':plannedUpdateProjection(_0x4342e8,_0x498c3d)};}export const notificationConfigUpdate={'service':a139_0x3ee437(0x1cb),'command':a139_0x3ee437(0x1b0),'description':a139_0x3ee437(0x1d0),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x1dcf1e){readNotificationId(_0x1dcf1e),assertSingleNotificationSource(_0x1dcf1e),requireNotificationExplicitYes(_0x1dcf1e);},async 'dryRun'(_0x430ff3){const _0x144ddf=a139_0x3ee437,_0x1396e9=await prepareUpdate(_0x430ff3),_0x27d6b0=notificationLookupCommand(_0x430ff3[_0x144ddf(0x1c4)],_0x1396e9[_0x144ddf(0x1c6)][_0x144ddf(0x1cd)]);return asDryRunResult({'operation':_0x144ddf(0x1ae),'selector':notificationSelector(_0x1396e9[_0x144ddf(0x1c6)]),'before':projectNotificationConfig(_0x1396e9[_0x144ddf(0x1c6)]),'after':_0x1396e9[_0x144ddf(0x1b4)],'dryRun':!![],'backend':{'method':_0x144ddf(0x1cf),'path':UPDATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x27d6b0}},{'method':_0x144ddf(0x1cf),'url':UPDATE_PATH});},async 'execute'(_0x56c211){const _0x31db6f=a139_0x3ee437;requireNotificationExplicitYes(_0x56c211);const _0x442de0=await prepareUpdate(_0x56c211),_0x210509=notificationLookupCommand(_0x56c211['appCode'],_0x442de0[_0x31db6f(0x1c6)][_0x31db6f(0x1cd)]);let _0x19f410=![];try{await updateNotificationChannelConfig(_0x442de0[_0x31db6f(0x1ca)]);}catch(_0x4b0a7b){if(!isPlatformTransportFailure(_0x4b0a7b))throw safeApiFailure('update',_0x31db6f(0x1af),'Inspect\x20ID\x20'+_0x442de0['id']+_0x31db6f(0x1c5)+_0x210509+_0x31db6f(0x1c0));_0x19f410=!![];}let _0x92b6c5;try{const _0x409b55=await getNotificationChannelConfig(_0x442de0['id'],_0x56c211['appCode']);_0x92b6c5=normalizeExactNotificationConfig(_0x409b55,_0x442de0['id'],_0x56c211[_0x31db6f(0x1c4)]);}catch{throw notificationError(_0x19f410?'notification_config_update_outcome_unknown':_0x31db6f(0x1c8),_0x31db6f(0x1c9)+_0x442de0['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x31db6f(0x1be)+_0x442de0['id']+_0x31db6f(0x1b8)+_0x210509+_0x31db6f(0x1b7));}const _0x1c19ef=requestedSafeFieldsMatch(_0x442de0[_0x31db6f(0x1c6)],_0x92b6c5,_0x442de0[_0x31db6f(0x1bd)]);if(!_0x1c19ef['allMatch']||_0x19f410&&!_0x1c19ef[_0x31db6f(0x1b1)])throw notificationError(_0x19f410?_0x31db6f(0x1ce):_0x31db6f(0x1bc),'Notification\x20config\x20'+_0x442de0['id']+_0x31db6f(0x1c2),_0x31db6f(0x1be)+_0x442de0['id']+_0x31db6f(0x1b8)+_0x210509+';\x20do\x20not\x20resubmit\x20automatically.');const _0xd91b7c=_0x19f410?[_0x31db6f(0x1b2)]:[];return{'ok':!![],'data':{'operation':_0x31db6f(0x1ae),'selector':notificationSelector(_0x92b6c5),'before':projectNotificationConfig(_0x442de0[_0x31db6f(0x1c6)]),'after':projectNotificationConfig(_0x92b6c5),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0xd91b7c,'verification':{'status':_0x31db6f(0x1ba),'recoveredAfterUnknownResponse':_0x19f410,'verifiedFields':_0x1c19ef['verifiedFields'],'lookupCommand':_0x210509}},'message':'Updated\x20notification\x20config\x20'+_0x92b6c5['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf8f3b9,_0x25af3f){const _0x38cf30=a140_0x161c,_0x27a10e=_0xf8f3b9();while(!![]){try{const _0x108eb8=-parseInt(_0x38cf30(0x10e))/0x1+parseInt(_0x38cf30(0x111))/0x2*(-parseInt(_0x38cf30(0x115))/0x3)+parseInt(_0x38cf30(0x110))/0x4+parseInt(_0x38cf30(0x113))/0x5*(-parseInt(_0x38cf30(0x10d))/0x6)+parseInt(_0x38cf30(0x10f))/0x7*(-parseInt(_0x38cf30(0x112))/0x8)+-parseInt(_0x38cf30(0x116))/0x9+-parseInt(_0x38cf30(0x117))/0xa*(-parseInt(_0x38cf30(0x114))/0xb);if(_0x108eb8===_0x25af3f)break;else _0x27a10e['push'](_0x27a10e['shift']());}catch(_0x49be49){_0x27a10e['push'](_0x27a10e['shift']());}}}(a140_0x36a3,0x412fb));import{notificationConfigList}from'../../commands/notification/config-list.js';function a140_0x36a3(){const _0x4959e5=['1065520mHZYoX','24424FgkapT','104jRirbW','213145MFbYxa','573441ocUKAl','6KSpMij','289872THuHga','90DbZoth','18aPXUuS','61906sbdsUW','119609aqcAqW'];a140_0x36a3=function(){return _0x4959e5;};return a140_0x36a3();}import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a140_0x161c(_0x3c17dd,_0x14f00f){_0x3c17dd=_0x3c17dd-0x10d;const _0x36a3a8=a140_0x36a3();let _0x161c69=_0x36a3a8[_0x3c17dd];return _0x161c69;}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|