@lovrabet/rabetbase-cli 2.4.7-beta.2 → 2.4.7
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/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/get.js +1 -1
- package/lib/commands/config/index.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/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/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/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/init/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/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/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/rules-cdn.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
|
-
function
|
|
1
|
+
function a131_0x57d5(_0xd5f4eb,_0xb48af8){_0xd5f4eb=_0xd5f4eb-0x15e;const _0x420cef=a131_0x420c();let _0x57d516=_0x420cef[_0xd5f4eb];return _0x57d516;}const a131_0x4bc9d9=a131_0x57d5;(function(_0x24846d,_0x5055d1){const _0x1396bd=a131_0x57d5,_0x41eb7a=_0x24846d();while(!![]){try{const _0x1eda11=parseInt(_0x1396bd(0x18d))/0x1+-parseInt(_0x1396bd(0x16f))/0x2+-parseInt(_0x1396bd(0x16b))/0x3+parseInt(_0x1396bd(0x187))/0x4+parseInt(_0x1396bd(0x161))/0x5*(-parseInt(_0x1396bd(0x17a))/0x6)+parseInt(_0x1396bd(0x189))/0x7+parseInt(_0x1396bd(0x160))/0x8;if(_0x1eda11===_0x5055d1)break;else _0x41eb7a['push'](_0x41eb7a['shift']());}catch(_0x3f12af){_0x41eb7a['push'](_0x41eb7a['shift']());}}}(a131_0x420c,0x1a209));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a131_0x420c(){const _0x3a287f=['290300EEOsIC','No\x20local\x20pages\x20matched\x20paths:\x20','485898hZbNPs','JS\x20URL\x20is\x20unreachable:\x20','push','message','147677xWOwSq','has','cwd','570208gdUplS','5YJpvey','CSS\x20URL\x20is\x20unreachable:\x20','cssUrl','Menu\x20sync\x20completed','parse','trim','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','setLogPath','length','info','243597ebvUiF','dryRun','Invalid\x20--params.','object','73482KQTdxD','filter','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Invalid\x20--params\x20JSON.','--params.','join','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','label',':\x20expected\x20a\x20non-empty\x20string.','string','jsUrl','815910evaQJK','path','Invalid\x20--params:\x20','menu-sync','procode','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','\x0a\x20\x20Available\x20local\x20paths:\x20','field','keys','map','get','import','pages'];a131_0x420c=function(){return _0x3a287f;};return a131_0x420c();}const MENU_SYNC_PARAM_KEYS=new Set([a131_0x4bc9d9(0x179),a131_0x4bc9d9(0x163)]);function validateParams(_0x5b92b3){const _0x18c35d=a131_0x4bc9d9,_0x1b97c7=[];return _0x5b92b3[_0x18c35d(0x179)]&&!isValidJsHttpsUrl(_0x5b92b3['jsUrl'])&&_0x1b97c7[_0x18c35d(0x18b)]({'field':'jsUrl','message':_0x18c35d(0x171)}),_0x5b92b3[_0x18c35d(0x163)]&&!isValidCssHttpsUrl(_0x5b92b3['cssUrl'])&&_0x1b97c7[_0x18c35d(0x18b)]({'field':_0x18c35d(0x163),'message':_0x18c35d(0x175)}),_0x1b97c7;}export async function runMenuSyncCore(_0x1ebad6,_0x1e4690,_0x43722b=[],_0x34e7e7,_0x31725d={}){const _0x31f307=a131_0x4bc9d9,_0x5d8034=parseMenuSyncParams(_0x34e7e7),_0x5e3032=[...new Set(_0x43722b['map'](_0x212640=>_0x212640[_0x31f307(0x166)]())[_0x31f307(0x170)](Boolean))],_0xc67391=_0x5d8034['jsUrl'],_0x289c66=_0x5d8034[_0x31f307(0x163)],_0x4475b7=[];if(_0xc67391)_0x4475b7[_0x31f307(0x18b)](_0xc67391);if(_0x289c66)_0x4475b7[_0x31f307(0x18b)](_0x289c66);const _0x2c866b=validateParams(_0x5d8034);if(_0x2c866b[_0x31f307(0x169)]>0x0){const _0x47fd97=_0x2c866b[_0x31f307(0x183)](_0x2cc4da=>_0x31f307(0x173)+_0x2cc4da[_0x31f307(0x181)]+':\x20'+_0x2cc4da[_0x31f307(0x18c)])[_0x31f307(0x174)](';\x20');throw new Error(_0x31f307(0x17c)+_0x47fd97);}logger[_0x31f307(0x168)](process[_0x31f307(0x15f)]()),logger[_0x31f307(0x16a)](_0x31f307(0x17d),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x1ebad6,'selectedCount':_0x5e3032['length'],'jsUrl':_0xc67391,'cssUrl':_0x289c66});if(_0xc67391){const _0x23349b=await isUrlReachable(_0xc67391);if(!_0x23349b)throw new Error(_0x31f307(0x18a)+_0xc67391);}if(_0x289c66){const _0x469490=await isUrlReachable(_0x289c66);if(!_0x469490)throw new Error(_0x31f307(0x162)+_0x289c66);}const _0x53f2c5=getLocalPages();if(_0x53f2c5[_0x31f307(0x169)]===0x0){if(_0x5e3032['length']>0x0)throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x5e3032[_0x31f307(0x174)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x31725d[_0x31f307(0x16c)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x2c4b99=await getOnlineMenuList(_0x1ebad6,_0x1e4690),_0x57903c=new Set(_0x2c4b99['map'](_0x43c8b7=>_0x43c8b7[_0x31f307(0x17b)]));let _0x42f1a2;if(_0x5e3032['length']>0x0){const _0x29daba=new Map(_0x53f2c5[_0x31f307(0x183)](_0x4d56b6=>[_0x4d56b6[_0x31f307(0x17b)],_0x4d56b6])),_0x180a5b=_0x5e3032[_0x31f307(0x170)](_0x10b9aa=>!_0x29daba[_0x31f307(0x15e)](_0x10b9aa));if(_0x180a5b[_0x31f307(0x169)]>0x0){const _0x44a6f3=_0x53f2c5[_0x31f307(0x183)](_0x125375=>_0x125375[_0x31f307(0x17b)])[_0x31f307(0x174)](',\x20');throw new Error(_0x31f307(0x188)+_0x180a5b[_0x31f307(0x174)](',\x20')+_0x31f307(0x180)+_0x44a6f3);}const _0x44c6bf=_0x5e3032[_0x31f307(0x170)](_0x2e2b23=>_0x57903c['has'](_0x2e2b23));if(_0x44c6bf[_0x31f307(0x169)]>0x0)throw new Error(_0x31f307(0x167)+_0x44c6bf[_0x31f307(0x174)](',\x20'));_0x42f1a2=_0x5e3032[_0x31f307(0x183)](_0x2bcbe1=>_0x29daba[_0x31f307(0x184)](_0x2bcbe1));}else _0x42f1a2=_0x53f2c5[_0x31f307(0x170)](_0x15ef5b=>!_0x57903c[_0x31f307(0x15e)](_0x15ef5b[_0x31f307(0x17b)]));if(_0x42f1a2[_0x31f307(0x169)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x31725d[_0x31f307(0x16c)]===!![],'targetPages':[],'plannedMenus':[]};const _0x1e185c=_0x42f1a2['map'](_0x533762=>({'type':_0x31f307(0x17e),'path':_0x533762[_0x31f307(0x17b)],'label':_0x533762[_0x31f307(0x176)],'loadScriptMode':_0x31f307(0x185),'resources':[..._0x4475b7]}));if(_0x31725d['dryRun'])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x42f1a2,'plannedMenus':_0x1e185c};const _0xd2ee0c=await createMenus(_0x1ebad6,_0x1e4690,_0x42f1a2,_0x4475b7['length']>0x0?_0x4475b7:undefined);return logger[_0x31f307(0x16a)](_0x31f307(0x17d),_0x31f307(0x164),{'count':_0x42f1a2[_0x31f307(0x169)],'resources':_0x4475b7}),{'created':_0xd2ee0c[_0x31f307(0x169)],'skipped':![],'dryRun':![],'targetPages':_0x42f1a2,'plannedMenus':_0x1e185c,'menus':_0xd2ee0c};}export function parseMenuSyncParams(_0x3ced82){const _0x37af75=a131_0x4bc9d9;if(!_0x3ced82||typeof _0x3ced82!==_0x37af75(0x178))return{};let _0x155d38;try{_0x155d38=JSON[_0x37af75(0x165)](_0x3ced82);}catch{throw new Error(_0x37af75(0x172));}if(typeof _0x155d38!==_0x37af75(0x16e)||_0x155d38===null||Array['isArray'](_0x155d38))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x226a68=_0x155d38;if(Object['hasOwn'](_0x226a68,_0x37af75(0x186)))throw new Error(_0x37af75(0x17f));const _0x53da85=Object[_0x37af75(0x182)](_0x226a68)['filter'](_0x4bc8b8=>!MENU_SYNC_PARAM_KEYS[_0x37af75(0x15e)](_0x4bc8b8));if(_0x53da85[_0x37af75(0x169)]>0x0)throw new Error('Invalid\x20--params\x20fields:\x20'+_0x53da85['join'](',\x20')+'.');for(const _0x34c661 of MENU_SYNC_PARAM_KEYS){const _0x498514=_0x226a68[_0x34c661];if(_0x498514!==undefined&&(typeof _0x498514!==_0x37af75(0x178)||_0x498514[_0x37af75(0x166)]()===''))throw new Error(_0x37af75(0x16d)+_0x34c661+_0x37af75(0x177));}return{'jsUrl':typeof _0x226a68[_0x37af75(0x179)]==='string'?_0x226a68[_0x37af75(0x179)][_0x37af75(0x166)]():undefined,'cssUrl':typeof _0x226a68['cssUrl']===_0x37af75(0x178)?_0x226a68[_0x37af75(0x163)][_0x37af75(0x166)]():undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x25cab8,_0x267ee9){const _0x2df8db=a133_0x5472,_0x19b3d3=_0x25cab8();while(!![]){try{const _0x32e3b9=-parseInt(_0x2df8db(0x229))/0x1+-parseInt(_0x2df8db(0x204))/0x2*(parseInt(_0x2df8db(0x212))/0x3)+-parseInt(_0x2df8db(0x21c))/0x4+parseInt(_0x2df8db(0x211))/0x5*(-parseInt(_0x2df8db(0x225))/0x6)+parseInt(_0x2df8db(0x208))/0x7+-parseInt(_0x2df8db(0x219))/0x8*(-parseInt(_0x2df8db(0x20f))/0x9)+parseInt(_0x2df8db(0x22e))/0xa;if(_0x32e3b9===_0x267ee9)break;else _0x19b3d3['push'](_0x19b3d3['shift']());}catch(_0x4411fe){_0x19b3d3['push'](_0x19b3d3['shift']());}}}(a133_0xb428,0xe339b));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';function a133_0xb428(){const _0x2c3432=['3676162LGJuAR','status','JS\x20URL\x20is\x20unreachable:\x20','jsUrl','4954803EdHaVJ','.\x20Allowed\x20values:\x20replace,\x20patch','object','.css','menu-asset-update','menu\x20asset-update\x20cannot\x20patch\x20','dryRun','639VRwbYS','\x22\x20(','580WrZBQJ','3RuqOkg','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','trim','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','--params.','label','menuIds','176856DueyXY','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','endsWith','2097384WSKYin','isArray','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','extend','length','path','paths','has','allSettled','22890slLcRq','join','map','push','258679LdqyRi','patch','mode','loadScriptMode','setLogPath','17169350KNXcJB','after','resources','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','message','cssUrl','\x20existing\x20JS\x20resources\x20for\x20\x22','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','Menu\x20asset\x20update\x20completed','some','value','filter','Start\x20non-interactive\x20menu\x20asset\x20update','parse','selection','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22',').\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','toLowerCase','string','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','all'];a133_0xb428=function(){return _0x2c3432;};return a133_0xb428();}function a133_0x5472(_0x156fd7,_0x32cd93){_0x156fd7=_0x156fd7-0x1ec;const _0xb42864=a133_0xb428();let _0x547219=_0xb42864[_0x156fd7];return _0x547219;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x1bf5c2){const _0x450367=a133_0x5472,_0x565948=[];return _0x1bf5c2[_0x450367(0x207)]&&!isValidJsHttpsUrl(_0x1bf5c2['jsUrl'])&&_0x565948[_0x450367(0x228)]({'field':'jsUrl','message':_0x450367(0x1ee)}),_0x1bf5c2[_0x450367(0x1f0)]&&!isValidCssHttpsUrl(_0x1bf5c2[_0x450367(0x1f0)])&&_0x565948[_0x450367(0x228)]({'field':'cssUrl','message':_0x450367(0x1ff)}),_0x565948;}export async function runMenuUpdateCore(_0x394d4e,_0x5111f3,_0x35e15d,_0x2759c8={}){const _0x3735bc=a133_0x5472,_0xb4cc83=parseUpdateParamsFlag(_0x35e15d),_0x105e31=normalizeMode(_0x2759c8[_0x3735bc(0x22b)]);validateSelection(_0x2759c8['selection']);const _0x112786=[];if(_0xb4cc83[_0x3735bc(0x207)])_0x112786[_0x3735bc(0x228)](_0xb4cc83['jsUrl']);if(_0xb4cc83[_0x3735bc(0x1f0)])_0x112786[_0x3735bc(0x228)](_0xb4cc83[_0x3735bc(0x1f0)]);const _0x36b699=validateParams(_0xb4cc83);if(_0x36b699[_0x3735bc(0x220)]>0x0){const _0x38a571=_0x36b699[_0x3735bc(0x227)](_0x1b96fa=>_0x3735bc(0x216)+_0x1b96fa['field']+':\x20'+_0x1b96fa[_0x3735bc(0x1ef)])[_0x3735bc(0x226)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x38a571);}if(_0x112786[_0x3735bc(0x220)]===0x0)throw new Error(_0x3735bc(0x202)+_0x3735bc(0x1f2));logger[_0x3735bc(0x22d)](process['cwd']()),logger['info']('menu-asset-update',_0x3735bc(0x1f9),{'appCode':_0x394d4e,'jsUrl':_0xb4cc83[_0x3735bc(0x207)],'cssUrl':_0xb4cc83[_0x3735bc(0x1f0)],'mode':_0x105e31,'dryRun':_0x2759c8[_0x3735bc(0x20e)]===!![]});if(_0xb4cc83[_0x3735bc(0x207)]){const _0x4f7e15=await isUrlReachable(_0xb4cc83[_0x3735bc(0x207)]);if(!_0x4f7e15)throw new Error(_0x3735bc(0x206)+_0xb4cc83['jsUrl']);}if(_0xb4cc83[_0x3735bc(0x1f0)]){const _0x558baa=await isUrlReachable(_0xb4cc83['cssUrl']);if(!_0x558baa)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0xb4cc83[_0x3735bc(0x1f0)]);}const _0x286437=await getOnlineMenuList(_0x394d4e,_0x5111f3),_0x3b4d83=_0x286437[_0x3735bc(0x1f8)](_0x1307f6=>_0x1307f6['resources'][_0x3735bc(0x220)]>0x0),_0x2b3690=selectMenusForUpdate(_0x3b4d83,_0x2759c8[_0x3735bc(0x1fb)]);if(_0x2b3690[_0x3735bc(0x220)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x2759c8['dryRun']===!![]};const _0x4b508c=_0x2b3690[_0x3735bc(0x227)](_0xb090ee=>buildMenuUpdateDiff(_0xb090ee,_0xb4cc83,_0x105e31,_0x2759c8['force']===!![],_0x2759c8[_0x3735bc(0x22c)]));if(_0x2759c8['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x4b508c};const _0x5cff2c=await Promise[_0x3735bc(0x224)](_0x2b3690[_0x3735bc(0x227)]((_0x1b7484,_0x5bd79e)=>updateMenuCdnUrl(_0x394d4e,_0x5111f3,{'id':_0x1b7484['id'],'label':_0x1b7484[_0x3735bc(0x217)],'path':_0x1b7484[_0x3735bc(0x221)],'resources':_0x4b508c[_0x5bd79e][_0x3735bc(0x1ec)]['resources'],'extend':_0x1b7484[_0x3735bc(0x21f)]??null,'loadScriptMode':_0x2759c8[_0x3735bc(0x22c)]}))),_0x1b56ae=_0x5cff2c[_0x3735bc(0x1f8)](_0x1388b8=>_0x1388b8['status']==='fulfilled')[_0x3735bc(0x227)](_0xe5b30c=>_0xe5b30c[_0x3735bc(0x1f7)]),_0x280d54=_0x5cff2c[_0x3735bc(0x1f8)](_0x3f6dcf=>_0x3f6dcf[_0x3735bc(0x205)]==='rejected')['length'];return logger['info'](_0x3735bc(0x20c),_0x3735bc(0x1f5),{'count':_0x2b3690[_0x3735bc(0x220)],'resources':_0x112786}),{'updated':_0x1b56ae[_0x3735bc(0x220)],'failed':_0x280d54,'skipped':![],'menus':_0x1b56ae};}function validateSelection(_0x3eac65){const _0x3d5019=a133_0x5472;if(!_0x3eac65)throw new Error(_0x3d5019(0x21a));if(_0x3eac65[_0x3d5019(0x203)]&&(_0x3eac65[_0x3d5019(0x218)][_0x3d5019(0x220)]>0x0||_0x3eac65[_0x3d5019(0x222)][_0x3d5019(0x220)]>0x0))throw new Error(_0x3d5019(0x1f4));if(!_0x3eac65[_0x3d5019(0x203)]&&_0x3eac65[_0x3d5019(0x218)][_0x3d5019(0x220)]===0x0&&_0x3eac65[_0x3d5019(0x222)][_0x3d5019(0x220)]===0x0)throw new Error(_0x3d5019(0x21a));}export function selectMenusForUpdate(_0x520b76,_0x401147){const _0x2e036f=a133_0x5472;validateSelection(_0x401147);if(_0x401147[_0x2e036f(0x203)])return _0x520b76;const _0x2b5959=new Set(_0x520b76[_0x2e036f(0x227)](_0x3f392e=>_0x3f392e['id'])),_0x5b714c=new Set(_0x520b76['map'](_0x1c5b85=>_0x1c5b85['path'])),_0x525413=_0x401147['menuIds'][_0x2e036f(0x1f8)](_0x696433=>!_0x2b5959[_0x2e036f(0x223)](_0x696433)),_0xc93528=_0x401147[_0x2e036f(0x222)][_0x2e036f(0x1f8)](_0x54ca20=>!_0x5b714c[_0x2e036f(0x223)](_0x54ca20));if(_0x525413[_0x2e036f(0x220)]>0x0||_0xc93528[_0x2e036f(0x220)]>0x0){const _0xa320b7=[..._0x525413[_0x2e036f(0x227)](_0x9a0078=>String(_0x9a0078)),..._0xc93528][_0x2e036f(0x226)](',\x20');throw new Error(_0x2e036f(0x215)+_0xa320b7);}const _0x5bb2b2=new Set(_0x401147[_0x2e036f(0x218)]),_0x506099=new Set(_0x401147[_0x2e036f(0x222)]);return _0x520b76[_0x2e036f(0x1f8)](_0x181d0e=>_0x5bb2b2[_0x2e036f(0x223)](_0x181d0e['id'])||_0x506099[_0x2e036f(0x223)](_0x181d0e['path']));}function normalizeMode(_0x5b0b63){const _0x4b9cb3=a133_0x5472;if(!_0x5b0b63)return'patch';if(_0x5b0b63==='replace'||_0x5b0b63===_0x4b9cb3(0x22a))return _0x5b0b63;throw new Error('Invalid\x20--mode:\x20'+_0x5b0b63+_0x4b9cb3(0x209));}function buildMenuUpdateDiff(_0x2c69bc,_0x330315,_0x550309,_0x76ffca,_0x22fcd3){const _0x47859d=a133_0x5472,_0x473fab=[..._0x2c69bc[_0x47859d(0x1ed)]];_0x550309===_0x47859d(0x22a)&&assertUnambiguousPatchResources(_0x2c69bc,_0x473fab,_0x330315);const _0x45cbc9=_0x550309===_0x47859d(0x22a)?patchResources(_0x473fab,_0x330315):replaceResources(_0x330315),_0x4413e0=[],_0x4f5b0b=_0x473fab['some'](isJsResource),_0x181b0c=_0x45cbc9[_0x47859d(0x1f6)](isJsResource);if(_0x4f5b0b&&!_0x181b0c){const _0x8cf551=_0x47859d(0x1fd)+_0x2c69bc[_0x47859d(0x217)]+_0x47859d(0x210)+_0x2c69bc['path']+_0x47859d(0x1fe)+_0x47859d(0x21e);if(!_0x76ffca)throw new Error(_0x8cf551);_0x4413e0[_0x47859d(0x228)](_0x8cf551);}const _0x5b1e26=_0x473fab[_0x47859d(0x1f6)](isCssResource),_0x3650e2=_0x45cbc9[_0x47859d(0x1f6)](isCssResource);_0x5b1e26&&!_0x3650e2&&_0x4413e0['push'](_0x47859d(0x1f3)+_0x2c69bc[_0x47859d(0x217)]+_0x47859d(0x210)+_0x2c69bc['path']+').');const _0x1fd3f9=typeof _0x2c69bc[_0x47859d(0x21f)]?.['loadScriptMode']===_0x47859d(0x201)?_0x2c69bc[_0x47859d(0x21f)][_0x47859d(0x22c)]:null,_0x583d29=_0x22fcd3?{'loadScriptMode':_0x1fd3f9}:{},_0x320dbe=_0x22fcd3?{'loadScriptMode':_0x22fcd3}:{};return{'id':_0x2c69bc['id'],'label':_0x2c69bc['label'],'path':_0x2c69bc[_0x47859d(0x221)],'mode':_0x550309,'before':{'resources':_0x473fab,..._0x583d29},'after':{'resources':_0x45cbc9,..._0x320dbe},'warnings':_0x4413e0};}function replaceResources(_0x456577){const _0x399d81=a133_0x5472;return[_0x456577[_0x399d81(0x207)],_0x456577[_0x399d81(0x1f0)]]['filter'](_0x5e0f15=>!!_0x5e0f15);}function assertUnambiguousPatchResources(_0x29e298,_0x2aefb3,_0x6e4fa2){const _0x16adbf=a133_0x5472,_0x2c2661=_0x2aefb3[_0x16adbf(0x1f8)](isJsResource)[_0x16adbf(0x220)];if(_0x6e4fa2[_0x16adbf(0x207)]&&_0x2c2661>0x1)throw new Error(_0x16adbf(0x20d)+_0x2c2661+_0x16adbf(0x1f1)+_0x29e298['label']+_0x16adbf(0x210)+_0x29e298[_0x16adbf(0x221)]+')\x20'+_0x16adbf(0x1fc));const _0x2a1ec8=_0x2aefb3[_0x16adbf(0x1f8)](isCssResource)[_0x16adbf(0x220)];if(_0x6e4fa2[_0x16adbf(0x1f0)]&&_0x2a1ec8>0x1)throw new Error(_0x16adbf(0x20d)+_0x2a1ec8+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x29e298[_0x16adbf(0x217)]+'\x22\x20('+_0x29e298[_0x16adbf(0x221)]+')\x20'+_0x16adbf(0x213));}function patchResources(_0x4b908f,_0x2afe9a){const _0x20fbcd=a133_0x5472;let _0x3c5b85=![],_0x1c8ee2=![];const _0x79c28c=[];for(const _0x3f30e8 of _0x4b908f){if(isJsResource(_0x3f30e8)){if(_0x2afe9a[_0x20fbcd(0x207)]&&!_0x3c5b85)_0x79c28c[_0x20fbcd(0x228)](_0x2afe9a['jsUrl']),_0x3c5b85=!![];else!_0x2afe9a['jsUrl']&&_0x79c28c[_0x20fbcd(0x228)](_0x3f30e8);continue;}if(isCssResource(_0x3f30e8)){if(_0x2afe9a['cssUrl']&&!_0x1c8ee2)_0x79c28c[_0x20fbcd(0x228)](_0x2afe9a[_0x20fbcd(0x1f0)]),_0x1c8ee2=!![];else!_0x2afe9a[_0x20fbcd(0x1f0)]&&_0x79c28c['push'](_0x3f30e8);continue;}_0x79c28c[_0x20fbcd(0x228)](_0x3f30e8);}return _0x2afe9a[_0x20fbcd(0x207)]&&!_0x3c5b85&&_0x79c28c['unshift'](_0x2afe9a[_0x20fbcd(0x207)]),_0x2afe9a[_0x20fbcd(0x1f0)]&&!_0x1c8ee2&&_0x79c28c[_0x20fbcd(0x228)](_0x2afe9a[_0x20fbcd(0x1f0)]),_0x79c28c;}function isJsResource(_0x22c97a){const _0x5d6508=a133_0x5472;return stripQuery(_0x22c97a)[_0x5d6508(0x200)]()[_0x5d6508(0x21b)]('.js');}function isCssResource(_0x58c022){const _0x54c439=a133_0x5472;return stripQuery(_0x58c022)[_0x54c439(0x200)]()[_0x54c439(0x21b)](_0x54c439(0x20b));}function stripQuery(_0x5d74be){return _0x5d74be['split']('?')[0x0]??_0x5d74be;}function parseUpdateParamsFlag(_0x2560ec){const _0x4f0155=a133_0x5472;if(!_0x2560ec||typeof _0x2560ec!==_0x4f0155(0x201))return{};try{const _0x1eab1b=JSON[_0x4f0155(0x1fa)](_0x2560ec);if(typeof _0x1eab1b!==_0x4f0155(0x20a)||_0x1eab1b===null||Array[_0x4f0155(0x21d)](_0x1eab1b))return{};return{'jsUrl':typeof _0x1eab1b[_0x4f0155(0x207)]===_0x4f0155(0x201)?_0x1eab1b['jsUrl'][_0x4f0155(0x214)]():undefined,'cssUrl':typeof _0x1eab1b[_0x4f0155(0x1f0)]===_0x4f0155(0x201)?_0x1eab1b[_0x4f0155(0x1f0)]['trim']():undefined};}catch{return{};}}
|
|
1
|
+
(function(_0x49709e,_0x1e4004){const _0x4f9a4f=a133_0x5bc5,_0x32f7da=_0x49709e();while(!![]){try{const _0x3459d5=parseInt(_0x4f9a4f(0xac))/0x1+parseInt(_0x4f9a4f(0xc9))/0x2+-parseInt(_0x4f9a4f(0xb7))/0x3*(parseInt(_0x4f9a4f(0xe6))/0x4)+parseInt(_0x4f9a4f(0xd1))/0x5+-parseInt(_0x4f9a4f(0xe4))/0x6*(-parseInt(_0x4f9a4f(0xb9))/0x7)+-parseInt(_0x4f9a4f(0xae))/0x8*(-parseInt(_0x4f9a4f(0xea))/0x9)+-parseInt(_0x4f9a4f(0xb5))/0xa*(parseInt(_0x4f9a4f(0xe5))/0xb);if(_0x3459d5===_0x1e4004)break;else _0x32f7da['push'](_0x32f7da['shift']());}catch(_0x113ec7){_0x32f7da['push'](_0x32f7da['shift']());}}}(a133_0x294c,0xe9f5c));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(_0x7536bc){const _0x2ccd39=a133_0x5bc5,_0x585d35=[];return _0x7536bc[_0x2ccd39(0xc0)]&&!isValidJsHttpsUrl(_0x7536bc[_0x2ccd39(0xc0)])&&_0x585d35[_0x2ccd39(0xdc)]({'field':'jsUrl','message':_0x2ccd39(0xc3)}),_0x7536bc['cssUrl']&&!isValidCssHttpsUrl(_0x7536bc[_0x2ccd39(0xcc)])&&_0x585d35[_0x2ccd39(0xdc)]({'field':_0x2ccd39(0xcc),'message':_0x2ccd39(0xd8)}),_0x585d35;}export async function runMenuUpdateCore(_0x2dfd8c,_0x34a2b3,_0x3b571a,_0x54feee={}){const _0x416415=a133_0x5bc5,_0xc45b5b=parseUpdateParamsFlag(_0x3b571a),_0x3a6a88=normalizeMode(_0x54feee['mode']);validateSelection(_0x54feee['selection']);const _0xd98054=[];if(_0xc45b5b[_0x416415(0xc0)])_0xd98054['push'](_0xc45b5b[_0x416415(0xc0)]);if(_0xc45b5b[_0x416415(0xcc)])_0xd98054[_0x416415(0xdc)](_0xc45b5b[_0x416415(0xcc)]);const _0x1883c2=validateParams(_0xc45b5b);if(_0x1883c2['length']>0x0){const _0xa88398=_0x1883c2[_0x416415(0xad)](_0x40acf4=>_0x416415(0xca)+_0x40acf4[_0x416415(0xcf)]+':\x20'+_0x40acf4['message'])[_0x416415(0xe1)](';\x20');throw new Error(_0x416415(0xd0)+_0xa88398);}if(_0xd98054['length']===0x0)throw new Error(_0x416415(0xc5)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x416415(0xc2)](process['cwd']()),logger[_0x416415(0xee)]('menu-asset-update',_0x416415(0xb4),{'appCode':_0x2dfd8c,'jsUrl':_0xc45b5b['jsUrl'],'cssUrl':_0xc45b5b[_0x416415(0xcc)],'mode':_0x3a6a88,'dryRun':_0x54feee['dryRun']===!![]});if(_0xc45b5b[_0x416415(0xc0)]){const _0x2fc42b=await isUrlReachable(_0xc45b5b[_0x416415(0xc0)]);if(!_0x2fc42b)throw new Error(_0x416415(0xcd)+_0xc45b5b[_0x416415(0xc0)]);}if(_0xc45b5b[_0x416415(0xcc)]){const _0x455977=await isUrlReachable(_0xc45b5b[_0x416415(0xcc)]);if(!_0x455977)throw new Error(_0x416415(0xb8)+_0xc45b5b[_0x416415(0xcc)]);}const _0x1f9655=await getOnlineMenuList(_0x2dfd8c,_0x34a2b3),_0x283ca1=_0x1f9655[_0x416415(0xd4)](_0x56e213=>_0x56e213[_0x416415(0xba)][_0x416415(0xcb)]>0x0),_0xcef877=selectMenusForUpdate(_0x283ca1,_0x54feee[_0x416415(0xbc)]);if(_0xcef877[_0x416415(0xcb)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x54feee[_0x416415(0xd3)]===!![]};const _0xee021a=_0xcef877[_0x416415(0xad)](_0x5e52d1=>buildMenuUpdateDiff(_0x5e52d1,_0xc45b5b,_0x3a6a88,_0x54feee[_0x416415(0xbe)]===!![],_0x54feee[_0x416415(0xe2)]));if(_0x54feee[_0x416415(0xd3)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0xee021a};const _0x235828=await Promise[_0x416415(0xc1)](_0xcef877[_0x416415(0xad)]((_0x580cef,_0x19537f)=>updateMenuCdnUrl(_0x2dfd8c,_0x34a2b3,{'id':_0x580cef['id'],'label':_0x580cef['label'],'path':_0x580cef[_0x416415(0xde)],'resources':_0xee021a[_0x19537f]['after'][_0x416415(0xba)],'extend':_0x580cef[_0x416415(0xe3)]??null,'loadScriptMode':_0x54feee['loadScriptMode']}))),_0x41be78=_0x235828[_0x416415(0xd4)](_0x521f8a=>_0x521f8a[_0x416415(0xdf)]==='fulfilled')['map'](_0x3e6b19=>_0x3e6b19['value']),_0x1c6976=_0x235828[_0x416415(0xd4)](_0x2f0823=>_0x2f0823[_0x416415(0xdf)]===_0x416415(0xe7))['length'];return logger['info'](_0x416415(0xe0),_0x416415(0xaf),{'count':_0xcef877[_0x416415(0xcb)],'resources':_0xd98054}),{'updated':_0x41be78[_0x416415(0xcb)],'failed':_0x1c6976,'skipped':![],'menus':_0x41be78};}function validateSelection(_0x513158){const _0x5d4395=a133_0x5bc5;if(!_0x513158)throw new Error(_0x5d4395(0xb0));if(_0x513158[_0x5d4395(0xe9)]&&(_0x513158[_0x5d4395(0xb6)][_0x5d4395(0xcb)]>0x0||_0x513158['paths'][_0x5d4395(0xcb)]>0x0))throw new Error(_0x5d4395(0xc4));if(!_0x513158[_0x5d4395(0xe9)]&&_0x513158[_0x5d4395(0xb6)][_0x5d4395(0xcb)]===0x0&&_0x513158[_0x5d4395(0xbf)]['length']===0x0)throw new Error(_0x5d4395(0xb0));}export function selectMenusForUpdate(_0x580155,_0x97ba80){const _0x145c95=a133_0x5bc5;validateSelection(_0x97ba80);if(_0x97ba80['all'])return _0x580155;const _0x16a5e5=new Set(_0x580155[_0x145c95(0xad)](_0x2b385f=>_0x2b385f['id'])),_0x101e04=new Set(_0x580155[_0x145c95(0xad)](_0x366b87=>_0x366b87[_0x145c95(0xde)])),_0x57bca1=_0x97ba80[_0x145c95(0xb6)]['filter'](_0x4c55b0=>!_0x16a5e5[_0x145c95(0xd9)](_0x4c55b0)),_0x135457=_0x97ba80[_0x145c95(0xbf)][_0x145c95(0xd4)](_0x495d66=>!_0x101e04[_0x145c95(0xd9)](_0x495d66));if(_0x57bca1[_0x145c95(0xcb)]>0x0||_0x135457['length']>0x0){const _0x112a1e=[..._0x57bca1['map'](_0x315c91=>String(_0x315c91)),..._0x135457][_0x145c95(0xe1)](',\x20');throw new Error(_0x145c95(0xeb)+_0x112a1e);}const _0x2096a9=new Set(_0x97ba80['menuIds']),_0x32b05b=new Set(_0x97ba80[_0x145c95(0xbf)]);return _0x580155[_0x145c95(0xd4)](_0xc90b7d=>_0x2096a9[_0x145c95(0xd9)](_0xc90b7d['id'])||_0x32b05b['has'](_0xc90b7d[_0x145c95(0xde)]));}function normalizeMode(_0x11de83){const _0x4ac79e=a133_0x5bc5;if(!_0x11de83)return _0x4ac79e(0xdd);if(_0x11de83==='replace'||_0x11de83===_0x4ac79e(0xdd))return _0x11de83;throw new Error(_0x4ac79e(0xbd)+_0x11de83+'.\x20Allowed\x20values:\x20replace,\x20patch');}function buildMenuUpdateDiff(_0x219976,_0x2c5207,_0x1a6c96,_0x56273d,_0x314b3e){const _0x26a039=a133_0x5bc5,_0x473d2a=[..._0x219976['resources']];_0x1a6c96==='patch'&&assertUnambiguousPatchResources(_0x219976,_0x473d2a,_0x2c5207);const _0x1361c0=_0x1a6c96===_0x26a039(0xdd)?patchResources(_0x473d2a,_0x2c5207):replaceResources(_0x2c5207),_0x320fa1=[],_0x19482d=_0x473d2a[_0x26a039(0xec)](isJsResource),_0x3ec292=_0x1361c0[_0x26a039(0xec)](isJsResource);if(_0x19482d&&!_0x3ec292){const _0x250bce=_0x26a039(0xbb)+_0x219976[_0x26a039(0xab)]+'\x22\x20('+_0x219976[_0x26a039(0xde)]+_0x26a039(0xd5)+_0x26a039(0xce);if(!_0x56273d)throw new Error(_0x250bce);_0x320fa1['push'](_0x250bce);}const _0x64ea2c=_0x473d2a[_0x26a039(0xec)](isCssResource),_0x32b7bd=_0x1361c0[_0x26a039(0xec)](isCssResource);_0x64ea2c&&!_0x32b7bd&&_0x320fa1[_0x26a039(0xdc)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x219976[_0x26a039(0xab)]+'\x22\x20('+_0x219976['path']+').');const _0x4c3d87=typeof _0x219976[_0x26a039(0xe3)]?.['loadScriptMode']==='string'?_0x219976['extend'][_0x26a039(0xe2)]:null,_0x351b93=_0x314b3e?{'loadScriptMode':_0x4c3d87}:{},_0x3faa36=_0x314b3e?{'loadScriptMode':_0x314b3e}:{};return{'id':_0x219976['id'],'label':_0x219976['label'],'path':_0x219976['path'],'mode':_0x1a6c96,'before':{'resources':_0x473d2a,..._0x351b93},'after':{'resources':_0x1361c0,..._0x3faa36},'warnings':_0x320fa1};}function a133_0x294c(){const _0xc4bd6e=['paths','jsUrl','allSettled','setLogPath','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','endsWith','1891254wwQCjp','--params.','length','cssUrl','JS\x20URL\x20is\x20unreachable:\x20','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','field','Invalid\x20--params:\x20','4962595syQoHQ','\x20existing\x20JS\x20resources\x20for\x20\x22','dryRun','filter',').\x20','isArray','unshift','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','has','menu\x20asset-update\x20cannot\x20patch\x20','toLowerCase','push','patch','path','status','menu-asset-update','join','loadScriptMode','extend','153222LUFiAy','11xtDFvZ','2984woDdtX','rejected','string','all','61911FSLekT','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','some','split','info','\x22\x20(','label','633980XbDzrX','map','1152YarGUH','Menu\x20asset\x20update\x20completed','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','\x20existing\x20CSS\x20resources\x20for\x20\x22','.css','trim','Start\x20non-interactive\x20menu\x20asset\x20update','25558370SCOhCG','menuIds','5022DNlHmd','CSS\x20URL\x20is\x20unreachable:\x20','329INZFgt','resources','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','selection','Invalid\x20--mode:\x20','force'];a133_0x294c=function(){return _0xc4bd6e;};return a133_0x294c();}function replaceResources(_0x509185){const _0x1a21a4=a133_0x5bc5;return[_0x509185['jsUrl'],_0x509185['cssUrl']][_0x1a21a4(0xd4)](_0x466709=>!!_0x466709);}function a133_0x5bc5(_0x70398a,_0x43fc15){_0x70398a=_0x70398a-0xaa;const _0x294cb6=a133_0x294c();let _0x5bc597=_0x294cb6[_0x70398a];return _0x5bc597;}function assertUnambiguousPatchResources(_0x1ecb1c,_0x283d61,_0x19626b){const _0x22596a=a133_0x5bc5,_0x102e17=_0x283d61[_0x22596a(0xd4)](isJsResource)[_0x22596a(0xcb)];if(_0x19626b['jsUrl']&&_0x102e17>0x1)throw new Error(_0x22596a(0xda)+_0x102e17+_0x22596a(0xd2)+_0x1ecb1c[_0x22596a(0xab)]+_0x22596a(0xaa)+_0x1ecb1c['path']+')\x20'+_0x22596a(0xc7));const _0x404cd7=_0x283d61[_0x22596a(0xd4)](isCssResource)['length'];if(_0x19626b[_0x22596a(0xcc)]&&_0x404cd7>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x404cd7+_0x22596a(0xb1)+_0x1ecb1c[_0x22596a(0xab)]+_0x22596a(0xaa)+_0x1ecb1c['path']+')\x20'+_0x22596a(0xc6));}function patchResources(_0x4ed51f,_0x19b61c){const _0x20a4a3=a133_0x5bc5;let _0x76d413=![],_0x2a41f6=![];const _0xf8913=[];for(const _0x5d19a9 of _0x4ed51f){if(isJsResource(_0x5d19a9)){if(_0x19b61c['jsUrl']&&!_0x76d413)_0xf8913[_0x20a4a3(0xdc)](_0x19b61c[_0x20a4a3(0xc0)]),_0x76d413=!![];else!_0x19b61c['jsUrl']&&_0xf8913[_0x20a4a3(0xdc)](_0x5d19a9);continue;}if(isCssResource(_0x5d19a9)){if(_0x19b61c[_0x20a4a3(0xcc)]&&!_0x2a41f6)_0xf8913[_0x20a4a3(0xdc)](_0x19b61c['cssUrl']),_0x2a41f6=!![];else!_0x19b61c[_0x20a4a3(0xcc)]&&_0xf8913[_0x20a4a3(0xdc)](_0x5d19a9);continue;}_0xf8913[_0x20a4a3(0xdc)](_0x5d19a9);}return _0x19b61c[_0x20a4a3(0xc0)]&&!_0x76d413&&_0xf8913[_0x20a4a3(0xd7)](_0x19b61c[_0x20a4a3(0xc0)]),_0x19b61c[_0x20a4a3(0xcc)]&&!_0x2a41f6&&_0xf8913[_0x20a4a3(0xdc)](_0x19b61c[_0x20a4a3(0xcc)]),_0xf8913;}function isJsResource(_0x2b1237){const _0x37f42e=a133_0x5bc5;return stripQuery(_0x2b1237)[_0x37f42e(0xdb)]()[_0x37f42e(0xc8)]('.js');}function isCssResource(_0xa3c958){const _0x186778=a133_0x5bc5;return stripQuery(_0xa3c958)['toLowerCase']()[_0x186778(0xc8)](_0x186778(0xb2));}function stripQuery(_0x2c783a){const _0x5906f2=a133_0x5bc5;return _0x2c783a[_0x5906f2(0xed)]('?')[0x0]??_0x2c783a;}function parseUpdateParamsFlag(_0x1dde2d){const _0x4e1f1f=a133_0x5bc5;if(!_0x1dde2d||typeof _0x1dde2d!==_0x4e1f1f(0xe8))return{};try{const _0xb89a3d=JSON['parse'](_0x1dde2d);if(typeof _0xb89a3d!=='object'||_0xb89a3d===null||Array[_0x4e1f1f(0xd6)](_0xb89a3d))return{};return{'jsUrl':typeof _0xb89a3d['jsUrl']==='string'?_0xb89a3d[_0x4e1f1f(0xc0)][_0x4e1f1f(0xb3)]():undefined,'cssUrl':typeof _0xb89a3d[_0x4e1f1f(0xcc)]===_0x4e1f1f(0xe8)?_0xb89a3d[_0x4e1f1f(0xcc)][_0x4e1f1f(0xb3)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5d1895,_0x31766c){const _0x2bb459=a134_0x1e9c,_0x4dd27d=_0x5d1895();while(!![]){try{const _0x501615=-parseInt(_0x2bb459(0x163))/0x1+-parseInt(_0x2bb459(0x169))/0x2+-parseInt(_0x2bb459(0x16a))/0x3+parseInt(_0x2bb459(0x16c))/0x4+parseInt(_0x2bb459(0x166))/0x5*(parseInt(_0x2bb459(0x167))/0x6)+parseInt(_0x2bb459(0x16b))/0x7*(-parseInt(_0x2bb459(0x168))/0x8)+parseInt(_0x2bb459(0x164))/0x9;if(_0x501615===_0x31766c)break;else _0x4dd27d['push'](_0x4dd27d['shift']());}catch(_0x217c01){_0x4dd27d['push'](_0x4dd27d['shift']());}}}(a134_0x3967,0xaa2c1));function a134_0x1e9c(_0x5537fe,_0x55c3c3){_0x5537fe=_0x5537fe-0x162;const _0x39676a=a134_0x3967();let _0x1e9cfc=_0x39676a[_0x5537fe];return _0x1e9cfc;}export function isValidJsHttpsUrl(_0x6e64b7){const _0x26e7ad=a134_0x1e9c;return/^https:\/\/.+\.js(\?.*)?$/[_0x26e7ad(0x162)](_0x6e64b7[_0x26e7ad(0x165)]());}function a134_0x3967(){const _0x446f1f=['4041213agdjpZ','384188OTMnEb','631680XsOjXu','test','1245471GqrkJE','24065055YDqTXT','trim','547535EkfcHq','36uoBrmz','8XigcHl','288812SGpzsa'];a134_0x3967=function(){return _0x446f1f;};return a134_0x3967();}export function isValidCssHttpsUrl(_0x2ca791){const _0x264268=a134_0x1e9c;return/^https:\/\/.+\.css(\?.*)?$/[_0x264268(0x162)](_0x2ca791[_0x264268(0x165)]());}export async function isUrlReachable(_0x353ab4){try{const _0xd55a2c=await fetch(_0x353ab4,{'method':'HEAD'});return _0xd55a2c['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a135_0x440592=a135_0x529d;(function(_0x474467,_0x14635c){const _0x2c6d77=a135_0x529d,_0x46a854=_0x474467();while(!![]){try{const _0x1f0470=-parseInt(_0x2c6d77(0x140))/0x1*(-parseInt(_0x2c6d77(0x164))/0x2)+parseInt(_0x2c6d77(0x16b))/0x3*(-parseInt(_0x2c6d77(0x129))/0x4)+parseInt(_0x2c6d77(0x150))/0x5*(parseInt(_0x2c6d77(0x163))/0x6)+-parseInt(_0x2c6d77(0x127))/0x7+parseInt(_0x2c6d77(0x12e))/0x8+-parseInt(_0x2c6d77(0x145))/0x9*(parseInt(_0x2c6d77(0x155))/0xa)+parseInt(_0x2c6d77(0x13f))/0xb;if(_0x1f0470===_0x14635c)break;else _0x46a854['push'](_0x46a854['shift']());}catch(_0x66cf52){_0x46a854['push'](_0x46a854['shift']());}}}(a135_0x45b6,0xa33a5));import a135_0x30e9ac from'chalk';function a135_0x45b6(){const _0xa284b8=['9Sjjqlf','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','\x20failed.','Failed\x20to\x20fetch\x20online\x20menu\x20list','\x20menu(s)...','yellow','POST','boolean','\x20\x20Create\x20','Menu\x20sync\x20completed:\x20','localPages','306655QsCSxr','created','write','appCode','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','5272410YFRFLi','cyan','paths','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','selectedAppName','\x20menu(s)\x20created','trim','Menu\x20creation\x20failed','\x20\x20✓\x20Selected:\x20','Would\x20create\x20','yes','\x20menu(s)','cookie','appcode','30uslKZW','1494WsEogi','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','\x20\x20Cancelled.','length','str','params','\x20created,\x20','8250ZZRiVi','jsUrl','\x20page(s)','Sync\x20local\x20pages\x20as\x20platform\x20menus','\x20local\x20microfrontend\x20menu(s).','split','180691CgMMiY','targetPages','448fehiEA','failed','message','flag','rawFlags','1172056nDcLtP','\x20\x20Continue\x20with\x20creation?','sync','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20created.','gray','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','validation','Creating\x20','Created\x20','onlineMenuList','string','skipped','Fetching\x20online\x20menu\x20list...','cssUrl','size','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','7724486fkTfUG','501auOjFR','/smartapi/menu/create','✓\x20Menu\x20sync\x20completed:\x20','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages'];a135_0x45b6=function(){return _0xa284b8;};return a135_0x45b6();}import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';function a135_0x529d(_0x538343,_0x294a0d){_0x538343=_0x538343-0x126;const _0x45b6a5=a135_0x45b6();let _0x529d21=_0x45b6a5[_0x538343];return _0x529d21;}import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':a135_0x440592(0x130),'description':a135_0x440592(0x16e),'risk':a135_0x440592(0x152),'flags':[{'name':'params','type':a135_0x440592(0x139),'description':'Pre-fill\x20JS/CSS\x20URLs.\x20'+a135_0x440592(0x131)},{'name':a135_0x440592(0x157),'type':a135_0x440592(0x139),'description':a135_0x440592(0x146)},{'name':a135_0x440592(0x15f),'type':a135_0x440592(0x14c),'description':a135_0x440592(0x144)}],async 'dryRun'(_0x211139){const _0x415c8e=a135_0x440592;ensureRunnableContext(_0x211139[_0x415c8e(0x12d)],_0x211139[_0x415c8e(0x159)]);const _0x4ef648=await runMenuSyncCore(_0x211139['appCode'],_0x211139['cookie'],parsePaths(_0x211139[_0x415c8e(0x168)](_0x415c8e(0x157))),_0x211139[_0x415c8e(0x168)](_0x415c8e(0x169)),{'dryRun':!![]});return{'method':_0x415c8e(0x14b),'url':_0x415c8e(0x141),'body':_0x4ef648,'description':_0x4ef648[_0x415c8e(0x13a)]?_0x415c8e(0x13e):_0x415c8e(0x15e)+_0x4ef648[_0x415c8e(0x128)][_0x415c8e(0x167)]+_0x415c8e(0x16f)};},async 'execute'(_0x45b703){const _0x3b78e4=a135_0x440592;ensureRunnableContext(_0x45b703['rawFlags'],_0x45b703['selectedAppName']);const _0x5894b1=_0x45b703[_0x3b78e4(0x12c)](_0x3b78e4(0x15f)),_0x524905=_0x45b703[_0x3b78e4(0x168)](_0x3b78e4(0x169)),_0x2e5d1d=parsePaths(_0x45b703['str'](_0x3b78e4(0x157))),_0x410200=parseMenuSyncParams(_0x524905);if(_0x5894b1){const _0x3bccca=await runMenuSyncCore(_0x45b703[_0x3b78e4(0x153)],_0x45b703['cookie'],_0x2e5d1d,_0x524905);if(_0x3bccca[_0x3b78e4(0x13a)]){const _0x287b61=getLocalPages();_0x287b61[_0x3b78e4(0x167)]===0x0?writeCliSideChannelLine(_0x3b78e4(0x158)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x3b78e4(0x142)+_0x3bccca['created']+_0x3b78e4(0x15a));return{'ok':!![],'data':_0x3bccca,'message':_0x3bccca[_0x3b78e4(0x13a)]?'Menu\x20sync\x20skipped':_0x3b78e4(0x14e)+_0x3bccca[_0x3b78e4(0x151)]+_0x3b78e4(0x132)};}if(_0x2e5d1d[_0x3b78e4(0x167)]>0x0)throw CliErrors[_0x3b78e4(0x135)](_0x3b78e4(0x154),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x524905)throw CliErrors['validation']('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x3b78e4(0x143));requireInteractive();const _0x21ad70=startSpinner(_0x3b78e4(0x13b));let _0x44accd,_0x494da1,_0x2ebd58;try{const _0x2b834c=await fetchMenuData(_0x45b703[_0x3b78e4(0x153)],_0x45b703[_0x3b78e4(0x161)]);_0x44accd=_0x2b834c[_0x3b78e4(0x14f)],_0x494da1=_0x2b834c['onlinePaths'],_0x2ebd58=_0x2b834c[_0x3b78e4(0x138)],stopSpinner(_0x21ad70,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x1ced08){stopSpinner(_0x21ad70,_0x3b78e4(0x148),![]);throw CliErrors[_0x3b78e4(0x135)](_0x1ced08 instanceof Error?_0x1ced08[_0x3b78e4(0x12b)]:_0x3b78e4(0x148));}if(_0x44accd[_0x3b78e4(0x167)]===0x0)return writeCliSideChannelLine(a135_0x30e9ac[_0x3b78e4(0x14a)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x473ca7=buildCompareRows(_0x44accd,_0x494da1);writeCliSideChannelLine(renderCompareTable(_0x473ca7)),writeCliSideChannelLine('');const _0x298eaf=await selectPages(_0x44accd,_0x494da1);writeCliSideChannelLine(''),writeCliSideChannelLine(a135_0x30e9ac[_0x3b78e4(0x156)](_0x3b78e4(0x15d)+_0x298eaf[_0x3b78e4(0x167)]+_0x3b78e4(0x16d)));const _0x4a3c00=_0x410200[_0x3b78e4(0x16c)]&&_0x410200[_0x3b78e4(0x13c)];if(!_0x4a3c00){writeCliSideChannelLine(renderSyncSummary(_0x298eaf,_0x494da1[_0x3b78e4(0x13d)]>0x0));const _0x59351d=await askConfirm(_0x3b78e4(0x12f));if(!_0x59351d)return writeCliSideChannelLine(a135_0x30e9ac[_0x3b78e4(0x133)](_0x3b78e4(0x166))),{'ok':!![]};}let _0x44c570=_0x410200['jsUrl'],_0x367609=_0x410200[_0x3b78e4(0x13c)];!_0x44c570&&(_0x44c570=await askJsUrl());!_0x367609&&(_0x367609=await askCssUrl());const _0x453ad2=await askConfirm(_0x3b78e4(0x14d)+_0x298eaf[_0x3b78e4(0x167)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x44c570+'\x20and\x20CSS:\x20'+_0x367609+'?');if(!_0x453ad2)return writeCliSideChannelLine(a135_0x30e9ac['gray'](_0x3b78e4(0x166))),{'ok':!![]};const _0x46348b=[_0x44c570,_0x367609],_0x4547b9=startSpinner(_0x3b78e4(0x136)+_0x298eaf[_0x3b78e4(0x167)]+_0x3b78e4(0x149));try{const _0x1e1599=await doCreateMenus(_0x45b703[_0x3b78e4(0x153)],_0x45b703['cookie'],_0x298eaf,_0x46348b);return stopSpinner(_0x4547b9,_0x3b78e4(0x137)+_0x1e1599['created']+_0x3b78e4(0x160),!![]),{'ok':!![],'data':_0x1e1599,'message':_0x3b78e4(0x14e)+_0x1e1599['created']+_0x3b78e4(0x16a)+_0x1e1599[_0x3b78e4(0x12a)]+_0x3b78e4(0x147)};}catch(_0x26ca50){stopSpinner(_0x4547b9,_0x3b78e4(0x15c),![]);throw CliErrors[_0x3b78e4(0x135)](_0x26ca50 instanceof Error?_0x26ca50[_0x3b78e4(0x12b)]:_0x3b78e4(0x15c));}}};function ensureRunnableContext(_0xdfb8b2,_0x2fb719){const _0x458522=a135_0x440592,_0x343bd0=_0xdfb8b2[_0x458522(0x162)]?String(_0xdfb8b2['appcode'])[_0x458522(0x15b)]():'';if(!isInProject()&&!_0x2fb719&&!_0x343bd0)throw CliErrors[_0x458522(0x135)](_0x458522(0x134)+_0x458522(0x165));}function parsePaths(_0x1ae615){const _0x310849=a135_0x440592;return[...new Set(_0x1ae615[_0x310849(0x126)](',')['map'](_0x18e540=>_0x18e540[_0x310849(0x15b)]())['filter'](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a136_0x5d0509=a136_0x362f;(function(_0x2828c2,_0x5f3507){const _0x88af15=a136_0x362f,_0x276516=_0x2828c2();while(!![]){try{const _0x3385f0=-parseInt(_0x88af15(0x142))/0x1*(parseInt(_0x88af15(0x102))/0x2)+-parseInt(_0x88af15(0x12d))/0x3*(parseInt(_0x88af15(0x104))/0x4)+-parseInt(_0x88af15(0x11d))/0x5+parseInt(_0x88af15(0x11a))/0x6*(parseInt(_0x88af15(0x112))/0x7)+parseInt(_0x88af15(0x110))/0x8+-parseInt(_0x88af15(0x12a))/0x9*(parseInt(_0x88af15(0x136))/0xa)+parseInt(_0x88af15(0xe6))/0xb;if(_0x3385f0===_0x5f3507)break;else _0x276516['push'](_0x276516['shift']());}catch(_0x5216f5){_0x276516['push'](_0x276516['shift']());}}}(a136_0x9554,0xb180e));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':a136_0x5d0509(0xe7),'path':a136_0x5d0509(0x106)}];export const menuVisibilityUpdate={'service':a136_0x5d0509(0x10e),'command':a136_0x5d0509(0x10c),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':a136_0x5d0509(0x101),'structuredErrors':!![],'flags':[{'name':a136_0x5d0509(0xe4),'type':a136_0x5d0509(0x14c),'description':a136_0x5d0509(0x141)},{'name':'paths','type':'string','description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':'visible','type':a136_0x5d0509(0x119),'required':!![],'description':a136_0x5d0509(0x14d)},{'name':a136_0x5d0509(0xed),'type':a136_0x5d0509(0x119),'description':a136_0x5d0509(0x134)},{'name':a136_0x5d0509(0x145),'type':a136_0x5d0509(0x12f),'description':a136_0x5d0509(0xeb)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5e82d7){parseInput(_0x5e82d7),requireExplicitYes(_0x5e82d7);},async 'dryRun'(_0x35867c){const _0x53a568=a136_0x5d0509,_0x4a1580=await buildPlan(_0x35867c,!![]),_0x2e7c25=_0x4a1580[_0x53a568(0x11b)]['plannedActions']?.['length']??0x0,_0x10d886=_0x4a1580[_0x53a568(0x11b)][_0x53a568(0x11c)]['length']-_0x2e7c25;return menuDryRunResult(_0x4a1580[_0x53a568(0x11b)],{'method':_0x53a568(0xe7),'url':'/smartapi/menu/update','body':{'updates':_0x4a1580[_0x53a568(0x11b)][_0x53a568(0x127)]?.['map'](_0x3d21c3=>_0x3d21c3[_0x53a568(0x122)])??[]},'description':_0x53a568(0x140)+_0x2e7c25+'\x20menu(s);\x20skip\x20'+_0x10d886+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x4dd662){const _0x330b04=a136_0x5d0509;requireExplicitYes(_0x4dd662);const _0x553617=await buildPlan(_0x4dd662,![]);await recheckMutationSnapshot(_0x4dd662,_0x553617['plan'],_0x330b04(0xfe));const _0x57521b=[],_0x2e8285=[],_0x212a7c=[];for(const _0x46062f of _0x553617[_0x330b04(0x11b)]['targets']){if(_0x46062f[_0x330b04(0xf7)][_0x330b04(0xf4)]===_0x553617['plan']['requestedVisible']){_0x57521b[_0x330b04(0x148)]({'id':_0x46062f['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x4dd662[_0x330b04(0x107)],_0x4dd662[_0x330b04(0xf9)],{'id':_0x46062f['id'],'visible':_0x553617[_0x330b04(0x11b)][_0x330b04(0x120)]}),_0x57521b[_0x330b04(0x148)]({'id':_0x46062f['id'],'updated':!![],'skipped':![]});}catch(_0x536fd7){const _0x7ef503=mapMenuApiError(_0x536fd7,_0x330b04(0x158),_0x46062f['id']);if(isMenuResponseLoss(_0x536fd7)&&_0x7ef503['code']!==_0x330b04(0x12e)){_0x212a7c[_0x330b04(0x148)](_0x46062f['id']);continue;}_0x2e8285[_0x330b04(0x148)]({'id':_0x46062f['id'],'stage':'update','code':_0x7ef503[_0x330b04(0xee)],'message':_0x7ef503[_0x330b04(0x156)]});}}let _0x387cab;try{_0x387cab=await fetchMenuSnapshot(_0x4dd662['appCode'],_0x4dd662[_0x330b04(0xf9)]);}catch(_0x45f768){const _0x35c15a=describeMenuErrorCause(_0x45f768,'verify\x20menu\x20visibility\x20update'),_0x7122e0=_0x212a7c['map'](_0x47f4a0=>({'id':_0x47f4a0,'stage':_0x330b04(0x128),'code':'menu_verification_failed','message':_0x330b04(0xf8)+_0x47f4a0+_0x330b04(0x13d),'requestedStateConfirmed':![],'recovered':![]})),_0x2c49c2={'stage':_0x330b04(0xf6),'code':'menu_verification_failed','message':_0x330b04(0x10a),'targetIds':_0x553617[_0x330b04(0x11b)]['targets'][_0x330b04(0x129)](_0x17ee47=>_0x17ee47['id']),'requestedStateConfirmed':![],..._0x35c15a};throw menuFailure(asVerificationError(_0x45f768,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x553617[_0x330b04(0x11b)],{'stage':'verification','succeeded':_0x57521b,'failedRecords':[..._0x2e8285,..._0x7122e0,_0x2c49c2],'warnings':[_0x330b04(0x12c)],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x14f710=[];for(const _0x339279 of _0x57521b){const _0x3e31b1=Number(_0x339279['id']),_0x526f20=_0x553617[_0x330b04(0x13e)][_0x330b04(0x151)](_0x3e31b1),_0x290dad=_0x387cab[_0x330b04(0x159)][_0x330b04(0x151)](_0x3e31b1);try{verifyVisibilityUpdate(_0x526f20,_0x290dad,_0x553617['plan'][_0x330b04(0x120)]);}catch(_0x28a69b){const _0x483dfa=asVerificationError(_0x28a69b,_0x330b04(0x10f)+_0x3e31b1+_0x330b04(0x115));_0x14f710['push']({'id':_0x3e31b1,'stage':_0x330b04(0xf6),'code':_0x483dfa['code'],'message':_0x483dfa['message'],'requestedStateConfirmed':![]});}}for(const _0x26d2e8 of _0x212a7c){const _0x1c8f82=_0x553617[_0x330b04(0x13e)][_0x330b04(0x151)](_0x26d2e8),_0x499d53=_0x387cab[_0x330b04(0x159)][_0x330b04(0x151)](_0x26d2e8);try{verifyVisibilityUpdate(_0x1c8f82,_0x499d53,_0x553617[_0x330b04(0x11b)][_0x330b04(0x120)]),_0x57521b[_0x330b04(0x148)]({'id':_0x26d2e8,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x2a20fe){const _0x595aec=asVerificationError(_0x2a20fe,_0x330b04(0x116)+_0x26d2e8+_0x330b04(0x121));_0x14f710['push']({'id':_0x26d2e8,'stage':_0x330b04(0x128),'code':_0x595aec['code'],'message':_0x595aec['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x14f710['length']>0x0){const _0x2c4eaf=_0x14f710[_0x330b04(0x129)](_0x4e8a7b=>Number(_0x4e8a7b['id'])),_0x1a48e3=_0x57521b['filter'](_0x4430ec=>_0x4430ec['recovered']===!![])['length'],_0x29a675=menuError(_0x330b04(0x10b),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x2c4eaf['join'](',\x20')+'.',_0x330b04(0xec));throw menuFailure(_0x29a675,_0x553617[_0x330b04(0x11b)],{'stage':_0x330b04(0xf6),'succeeded':_0x57521b,'failedRecords':[..._0x2e8285,..._0x14f710],'warnings':[_0x330b04(0x13c)],'verification':{'status':_0x330b04(0x14a),..._0x2c4eaf['length']===0x1?{'targetId':_0x2c4eaf[0x0]}:{'targetIds':_0x2c4eaf},'recoveredCount':_0x1a48e3,'lookupCommand':_0x330b04(0x14f)}});}const _0x22a544=_0x57521b['filter'](_0x4f082f=>_0x4f082f[_0x330b04(0xe8)]===!![])['length'],_0x347a82=_0x57521b[_0x330b04(0x124)]-_0x22a544,_0x43473d={..._0x553617[_0x330b04(0x11b)],'succeeded':_0x57521b,'failed':_0x2e8285,'warnings':_0x2e8285[_0x330b04(0x124)]>0x0?[..._0x553617[_0x330b04(0x11b)][_0x330b04(0x13f)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x553617[_0x330b04(0x11b)]['warnings'],'verification':{'checkedBy':_0x330b04(0xe2),'snapshotHash':_0x387cab[_0x330b04(0x150)],'matchesRequestedState':_0x2e8285[_0x330b04(0x124)]===0x0,'recoveredCount':_0x212a7c[_0x330b04(0x124)]}};return{'ok':_0x2e8285[_0x330b04(0x124)]===0x0,'data':_0x43473d,'message':_0x2e8285['length']===0x0?_0x330b04(0x147)+_0x22a544+_0x330b04(0x13b)+_0x347a82+_0x330b04(0xff):_0x330b04(0xde)+_0x22a544+_0x330b04(0xf3)+_0x347a82+_0x330b04(0x126)+_0x2e8285[_0x330b04(0x124)]+_0x330b04(0x138)};}};function parseInput(_0x3e3381){const _0x12fc08=a136_0x5d0509,_0x323a07=parseMenuIds(_0x3e3381['str']('menu-ids')),_0x258c92=parseCsv(_0x3e3381[_0x12fc08(0x109)](_0x12fc08(0xe3)));if(_0x323a07[_0x12fc08(0x124)]===0x0&&_0x258c92[_0x12fc08(0x124)]===0x0)throw CliErrors[_0x12fc08(0x10d)](_0x12fc08(0x133));const _0xf64603=parseBooleanFlag(_0x3e3381,_0x12fc08(0xf4),!![]),_0x5add89=parseBooleanFlag(_0x3e3381,_0x12fc08(0xed),![]);let _0x43e5d0;if(hasFlag(_0x3e3381,_0x12fc08(0x145))){_0x43e5d0=_0x3e3381[_0x12fc08(0xfb)](_0x12fc08(0x145));if(!Number[_0x12fc08(0x123)](_0x43e5d0)||_0x43e5d0<0x0)throw CliErrors[_0x12fc08(0x10d)](_0x12fc08(0xdd));}return{'menuIds':_0x323a07,'paths':_0x258c92,'visible':_0xf64603,'expectVisible':_0x5add89,'expectedCount':_0x43e5d0};}async function buildPlan(_0x449d1b,_0x478843){const _0x4be283=a136_0x5d0509,_0x45f144=parseInput(_0x449d1b),_0x544db6=await fetchMutationSnapshot(_0x449d1b,'update\x20menu\x20visibility'),_0x5a95fc=selectTargets(_0x544db6[_0x4be283(0xe5)],_0x45f144[_0x4be283(0x100)],_0x45f144[_0x4be283(0xe3)]);if(_0x45f144[_0x4be283(0x135)]!==undefined&&_0x5a95fc[_0x4be283(0x124)]!==_0x45f144[_0x4be283(0x135)])throw menuError(_0x4be283(0x152),_0x4be283(0x117)+_0x5a95fc['length']+_0x4be283(0xf1)+_0x45f144[_0x4be283(0x135)]+'.',_0x4be283(0x103));if(_0x45f144[_0x4be283(0xfd)]!==undefined){const _0x4ef94f=_0x5a95fc[_0x4be283(0x144)](_0x4580ce=>_0x4580ce[_0x4be283(0xf4)]!==_0x45f144[_0x4be283(0xfd)]);if(_0x4ef94f['length']>0x0)throw menuError(_0x4be283(0xea),_0x4be283(0xf0)+_0x4ef94f[_0x4be283(0x129)](_0xb8452f=>_0xb8452f['id'])[_0x4be283(0x149)](',\x20')+'.',_0x4be283(0x157));}const _0x23cfa8=_0x5a95fc[_0x4be283(0x129)](_0x22ba0e=>({'id':_0x22ba0e['id'],'label':_0x22ba0e[_0x4be283(0x12b)],'path':_0x22ba0e[_0x4be283(0x130)],'before':{'visible':_0x22ba0e[_0x4be283(0xf4)]},'after':{'visible':_0x45f144[_0x4be283(0xf4)]}})),_0x53b58f=_0x23cfa8[_0x4be283(0x144)](_0x4cca99=>_0x4cca99[_0x4be283(0xf7)][_0x4be283(0xf4)]!==_0x45f144[_0x4be283(0xf4)])[_0x4be283(0x129)](_0x4d72a0=>({'stage':'update-menu-visibility','method':'POST','path':'/smartapi/menu/update','body':{'appCode':_0x449d1b[_0x4be283(0x107)],'id':_0x4d72a0['id'],'visible':_0x45f144[_0x4be283(0xf4)]}})),_0x4485eb=mutationResult({'operation':_0x4be283(0x10c),'selector':{'menuIds':_0x45f144['menuIds'],'paths':_0x45f144[_0x4be283(0xe3)]},'before':{'menus':_0x5a95fc[_0x4be283(0x129)](_0x317cff=>({'id':_0x317cff['id'],'path':_0x317cff[_0x4be283(0x130)],'visible':_0x317cff[_0x4be283(0xf4)]}))},'after':{'menus':_0x5a95fc[_0x4be283(0x129)](_0x179374=>({'id':_0x179374['id'],'path':_0x179374[_0x4be283(0x130)],'visible':_0x45f144['visible']}))},'dryRun':_0x478843,'backend':[...BACKEND],'plannedActions':_0x53b58f,'snapshotHash':_0x544db6[_0x4be283(0x150)],'warnings':_0x53b58f[_0x4be283(0x124)]===0x0?[_0x4be283(0x111)]:[]});return{'plan':{..._0x4485eb,'requestedVisible':_0x45f144[_0x4be283(0xf4)],'targets':_0x23cfa8},'beforeById':new Map(_0x5a95fc[_0x4be283(0x129)](_0x2619b6=>[_0x2619b6['id'],_0x2619b6]))};}function selectTargets(_0x3ac615,_0xeadb8a,_0x55cce0){const _0x4f2a14=a136_0x5d0509,_0x25226c=new Map(_0x3ac615['map'](_0x156f4e=>[_0x156f4e['id'],_0x156f4e])),_0x592c31=new Map(),_0x59ff90=_0xeadb8a[_0x4f2a14(0x144)](_0x595807=>!_0x25226c[_0x4f2a14(0x154)](_0x595807));if(_0x59ff90[_0x4f2a14(0x124)]>0x0)throw menuError(_0x4f2a14(0x125),_0x4f2a14(0xe9)+_0x59ff90['join'](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x211b82 of _0xeadb8a){_0x592c31['set'](_0x211b82,_0x25226c['get'](_0x211b82));}for(const _0x442fb1 of _0x55cce0){const _0x117b5f=_0x3ac615[_0x4f2a14(0x144)](_0x49a065=>_0x49a065[_0x4f2a14(0x130)]===_0x442fb1);if(_0x117b5f[_0x4f2a14(0x124)]===0x0)throw menuError(_0x4f2a14(0x125),_0x4f2a14(0x153)+JSON[_0x4f2a14(0xef)](_0x442fb1)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x117b5f[_0x4f2a14(0x124)]>0x1)throw menuError(_0x4f2a14(0x11e),_0x4f2a14(0xfc)+JSON['stringify'](_0x442fb1)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x117b5f['map'](_0x427510=>_0x427510['id'])[_0x4f2a14(0x149)](',\x20')+'.');const _0x19644c=_0x117b5f[0x0];_0x592c31[_0x4f2a14(0x105)](_0x19644c['id'],_0x19644c);}return[..._0x592c31[_0x4f2a14(0x131)]()];}function a136_0x9554(){const _0x595d42=['2128670fdANKb','menu_selector_ambiguous','flagMissing','requestedVisible','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','body','isSafeInteger','length','menu_selector_not_found','\x20skipped,\x20','plannedActions','update-recovery','map','573867YcKLgP','label','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','228339SCHuVg','menu_permission_denied','number','path','values','childrenIds','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','expectedCount','40ABuqUE','pageType','\x20failed.','false','split','\x20menu(s);\x20skipped\x20','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','beforeById','warnings','Would\x20update\x20visibility\x20for\x20','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','168013guZNXH','some','filter','expected-count','datasetId','Updated\x20visibility\x20for\x20','push','join','failed','sort','string','Requested\x20menu\x20visibility','resourcesValid','rabetbase\x20menu\x20list\x20--format\x20compress','hash','get','menu_expected_count_mismatch','Menu\x20path\x20selector\x20not\x20found:\x20','has','modelType','message','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','update\x20visibility\x20for','byId','url','trim','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Menu\x20visibility\x20update\x20completed:\x20','depth','\x20must\x20be\x20true\x20or\x20false.','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','menu\x20list','paths','menu-ids','menus','16779752qVQhLg','POST','updated','Menu\x20id\x20selector(s)\x20not\x20found:\x20','menu_state_drift','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','expect-visible','code','stringify','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','\x20menu(s),\x20expected\x20','pageId','\x20updated,\x20','visible','resources','verification','before','Response\x20was\x20lost\x20for\x20menu\x20','cookie','isArray','num','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','expectVisible','update\x20menu\x20visibility','\x20unchanged\x20menu(s).','menuIds','high-risk-write','6DAILzI','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','44BrICmm','set','/smartapi/menu/update','appCode','childrenCount','str','Final\x20menu\x20visibility\x20readback\x20failed.','menu_verification_failed','visibility-update','validation','menu','Menu\x20','6660024cOUzMH','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','2738309zOeMgk','type','datasetCode','\x20visibility\x20update\x20could\x20not\x20be\x20verified','Response\x20was\x20lost\x20and\x20menu\x20','Selected\x20','parentId','boolean','6PfmTLE','plan','targets'];a136_0x9554=function(){return _0x595d42;};return a136_0x9554();}function a136_0x362f(_0x2a53f7,_0x4bedeb){_0x2a53f7=_0x2a53f7-0xdb;const _0x9554ad=a136_0x9554();let _0x362f45=_0x9554ad[_0x2a53f7];return _0x362f45;}function parseMenuIds(_0x2312a9){const _0x30a092=a136_0x5d0509,_0x4b160f=parseCsv(_0x2312a9),_0x37c9d2=_0x4b160f[_0x30a092(0x129)](Number);if(_0x37c9d2[_0x30a092(0x143)](_0xda5038=>!Number[_0x30a092(0x123)](_0xda5038)||_0xda5038<=0x0))throw CliErrors[_0x30a092(0x10d)](_0x30a092(0xe1));return[...new Set(_0x37c9d2)];}function parseCsv(_0x50cb0e){const _0x496efd=a136_0x5d0509;return[...new Set(_0x50cb0e[_0x496efd(0x13a)](',')['map'](_0x1f5f0b=>_0x1f5f0b[_0x496efd(0xdc)]())['filter'](Boolean))];}function parseBooleanFlag(_0x480836,_0xcf6fe4,_0x8f34b0){const _0x5722d0=a136_0x5d0509;if(!hasFlag(_0x480836,_0xcf6fe4)){if(_0x8f34b0)throw CliErrors[_0x5722d0(0x11f)](_0xcf6fe4);return undefined;}const _0x922294=_0x480836['rawFlags'][_0xcf6fe4];if(_0x922294===!![]||_0x922294===![])return _0x922294;if(_0x922294==='true')return!![];if(_0x922294===_0x5722d0(0x139))return![];throw CliErrors['validation']('--'+_0xcf6fe4+_0x5722d0(0xe0));}function verifyVisibilityUpdate(_0x2292f4,_0x413740,_0x386d01){const _0x23b179=a136_0x5d0509;assertVerified(!!_0x413740,_0x23b179(0x10f)+_0x2292f4['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x413740[_0x23b179(0xf4)]===_0x386d01,_0x23b179(0x10f)+_0x2292f4['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x2f2516=[['id',_0x413740['id'],_0x2292f4['id']],[_0x23b179(0x118),_0x413740[_0x23b179(0x118)],_0x2292f4[_0x23b179(0x118)]],[_0x23b179(0xdf),_0x413740[_0x23b179(0xdf)],_0x2292f4[_0x23b179(0xdf)]],['label',_0x413740[_0x23b179(0x12b)],_0x2292f4['label']],['path',_0x413740[_0x23b179(0x130)],_0x2292f4['path']],[_0x23b179(0xdb),_0x413740['url'],_0x2292f4[_0x23b179(0xdb)]],[_0x23b179(0x113),_0x413740[_0x23b179(0x113)],_0x2292f4[_0x23b179(0x113)]],[_0x23b179(0x14b),_0x413740['sort'],_0x2292f4['sort']],[_0x23b179(0xf5),_0x413740[_0x23b179(0xf5)],_0x2292f4[_0x23b179(0xf5)]],[_0x23b179(0x14e),_0x413740[_0x23b179(0x14e)],_0x2292f4[_0x23b179(0x14e)]],[_0x23b179(0x132),_0x413740[_0x23b179(0x132)],_0x2292f4[_0x23b179(0x132)]],[_0x23b179(0x108),_0x413740[_0x23b179(0x108)],_0x2292f4[_0x23b179(0x108)]],[_0x23b179(0xf2),_0x413740[_0x23b179(0xf2)],_0x2292f4[_0x23b179(0xf2)]],[_0x23b179(0x137),_0x413740[_0x23b179(0x137)],_0x2292f4['pageType']],[_0x23b179(0x155),_0x413740[_0x23b179(0x155)],_0x2292f4[_0x23b179(0x155)]],['datasetId',_0x413740[_0x23b179(0x146)],_0x2292f4[_0x23b179(0x146)]],[_0x23b179(0x114),_0x413740['datasetCode'],_0x2292f4['datasetCode']]];for(const [_0x4bbf49,_0x2ea6c5,_0x2e93b3]of _0x2f2516){assertVerified(sameValue(_0x2ea6c5,_0x2e93b3),_0x23b179(0x10f)+_0x2292f4['id']+'\x20'+_0x4bbf49+'\x20changed\x20unexpectedly.');}}function sameValue(_0x286b6b,_0x3d2534){const _0xcfd9a8=a136_0x5d0509;if(Array['isArray'](_0x286b6b)||Array[_0xcfd9a8(0xfa)](_0x3d2534))return JSON['stringify'](_0x286b6b)===JSON['stringify'](_0x3d2534);return _0x286b6b===_0x3d2534;}
|
|
1
|
+
const a136_0x16e0ff=a136_0x2694;(function(_0x3674e0,_0x1ba958){const _0x443562=a136_0x2694,_0x415aa1=_0x3674e0();while(!![]){try{const _0x2aa114=parseInt(_0x443562(0x15f))/0x1+parseInt(_0x443562(0x175))/0x2+parseInt(_0x443562(0x18e))/0x3+-parseInt(_0x443562(0x193))/0x4*(-parseInt(_0x443562(0x191))/0x5)+-parseInt(_0x443562(0x174))/0x6*(-parseInt(_0x443562(0x1b3))/0x7)+-parseInt(_0x443562(0x1d1))/0x8+-parseInt(_0x443562(0x17c))/0x9;if(_0x2aa114===_0x1ba958)break;else _0x415aa1['push'](_0x415aa1['shift']());}catch(_0x5be92a){_0x415aa1['push'](_0x415aa1['shift']());}}}(a136_0x3538,0xc8ed0));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a136_0x3538(){const _0x46f0ed=['isSafeInteger','number','215oLpKWs','Menu\x20','21292MOlVSO','plan','path','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','appCode','update','Updated\x20visibility\x20for\x20','str','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','\x20skipped,\x20','join','push','rabetbase\x20menu\x20list\x20--format\x20compress','get','sort','\x20visibility\x20update\x20could\x20not\x20be\x20verified','true','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','set','menu\x20list','\x20unchanged\x20menu(s).','code','verification','num','modelType','menu','flagMissing','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','expect-visible','update-menu-visibility','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','32102hBohQf','targets','pageId','\x20failed.','\x20must\x20be\x20true\x20or\x20false.','split','menu_verification_failed','visibility-update','isArray','url','Menu\x20id\x20selector(s)\x20not\x20found:\x20','\x20menu(s),\x20expected\x20','menu_selector_ambiguous','menus','requestedVisible','\x20updated,\x20','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','depth','byId','update-recovery','trim','high-risk-write','some','\x20menu(s);\x20skipped\x20','datasetId','expectedCount','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','menu_selector_not_found','resources','body','6743248TkQhWP','visible','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','string','filter','updated','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','1427477NKayGU','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','paths','cookie','menuIds','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','childrenIds','before','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','message','menu-ids','boolean','parentId','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','values','has','Requested\x20menu\x20visibility','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','plannedActions','beforeById','validation','1002GvWihK','935046wlFuNl','type','Menu\x20path\x20selector\x20not\x20found:\x20','hash','expected-count','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','stringify','19381536cMHuJw','Menu\x20visibility\x20update\x20completed:\x20','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','\x20menu(s);\x20skip\x20','length','expectVisible','recovered','map','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','pageType','label','\x20changed\x20unexpectedly.','false','POST','/smartapi/menu/update','resourcesValid','warnings','datasetCode','2788953auvPvM'];a136_0x3538=function(){return _0x46f0ed;};return a136_0x3538();}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';function a136_0x2694(_0x51aaf1,_0x58d1d0){_0x51aaf1=_0x51aaf1-0x15e;const _0x3538ff=a136_0x3538();let _0x269405=_0x3538ff[_0x51aaf1];return _0x269405;}const BACKEND=[{'method':a136_0x16e0ff(0x189),'path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a136_0x16e0ff(0x1ac),'command':a136_0x16e0ff(0x1ba),'description':a136_0x16e0ff(0x196),'risk':a136_0x16e0ff(0x1c8),'structuredErrors':!![],'flags':[{'name':a136_0x16e0ff(0x169),'type':'string','description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':a136_0x16e0ff(0x161),'type':a136_0x16e0ff(0x1d5),'description':a136_0x16e0ff(0x170)},{'name':a136_0x16e0ff(0x1d2),'type':a136_0x16e0ff(0x16a),'required':!![],'description':a136_0x16e0ff(0x16f)},{'name':'expect-visible','type':a136_0x16e0ff(0x16a),'description':a136_0x16e0ff(0x17e)},{'name':'expected-count','type':a136_0x16e0ff(0x190),'description':a136_0x16e0ff(0x1d3)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x12fa57){parseInput(_0x12fa57),requireExplicitYes(_0x12fa57);},async 'dryRun'(_0x2d22b9){const _0x32f5da=a136_0x16e0ff,_0x4934c9=await buildPlan(_0x2d22b9,!![]),_0x124b3e=_0x4934c9[_0x32f5da(0x194)][_0x32f5da(0x171)]?.[_0x32f5da(0x180)]??0x0,_0x3f7720=_0x4934c9[_0x32f5da(0x194)][_0x32f5da(0x1b4)]['length']-_0x124b3e;return menuDryRunResult(_0x4934c9[_0x32f5da(0x194)],{'method':_0x32f5da(0x189),'url':'/smartapi/menu/update','body':{'updates':_0x4934c9[_0x32f5da(0x194)][_0x32f5da(0x171)]?.['map'](_0x4cf08f=>_0x4cf08f[_0x32f5da(0x1d0)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x124b3e+_0x32f5da(0x17f)+_0x3f7720+_0x32f5da(0x1a7)});},async 'execute'(_0x5a4e6e){const _0x31fea3=a136_0x16e0ff;requireExplicitYes(_0x5a4e6e);const _0x249895=await buildPlan(_0x5a4e6e,![]);await recheckMutationSnapshot(_0x5a4e6e,_0x249895[_0x31fea3(0x194)],'update\x20menu\x20visibility');const _0x355156=[],_0x55399e=[],_0xf909=[];for(const _0x2e6d58 of _0x249895['plan'][_0x31fea3(0x1b4)]){if(_0x2e6d58[_0x31fea3(0x166)]['visible']===_0x249895[_0x31fea3(0x194)][_0x31fea3(0x1c1)]){_0x355156[_0x31fea3(0x19e)]({'id':_0x2e6d58['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x5a4e6e[_0x31fea3(0x197)],_0x5a4e6e['cookie'],{'id':_0x2e6d58['id'],'visible':_0x249895[_0x31fea3(0x194)][_0x31fea3(0x1c1)]}),_0x355156['push']({'id':_0x2e6d58['id'],'updated':!![],'skipped':![]});}catch(_0x35a6be){const _0x3d5efc=mapMenuApiError(_0x35a6be,'update\x20visibility\x20for',_0x2e6d58['id']);if(isMenuResponseLoss(_0x35a6be)&&_0x3d5efc[_0x31fea3(0x1a8)]!=='menu_permission_denied'){_0xf909[_0x31fea3(0x19e)](_0x2e6d58['id']);continue;}_0x55399e[_0x31fea3(0x19e)]({'id':_0x2e6d58['id'],'stage':_0x31fea3(0x198),'code':_0x3d5efc['code'],'message':_0x3d5efc['message']});}}let _0x3dc735;try{_0x3dc735=await fetchMenuSnapshot(_0x5a4e6e[_0x31fea3(0x197)],_0x5a4e6e[_0x31fea3(0x162)]);}catch(_0x4479cc){const _0x27de9e=describeMenuErrorCause(_0x4479cc,'verify\x20menu\x20visibility\x20update'),_0x4dc94b=_0xf909[_0x31fea3(0x183)](_0x175e15=>({'id':_0x175e15,'stage':'update-recovery','code':_0x31fea3(0x1b9),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x175e15+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0xa653bd={'stage':'verification','code':_0x31fea3(0x1b9),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x249895[_0x31fea3(0x194)][_0x31fea3(0x1b4)][_0x31fea3(0x183)](_0x4bfd37=>_0x4bfd37['id']),'requestedStateConfirmed':![],..._0x27de9e};throw menuFailure(asVerificationError(_0x4479cc,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x249895[_0x31fea3(0x194)],{'stage':'verification','succeeded':_0x355156,'failedRecords':[..._0x55399e,..._0x4dc94b,_0xa653bd],'warnings':[_0x31fea3(0x1d4)],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x4202e6=[];for(const _0x4c51dc of _0x355156){const _0x5bf27e=Number(_0x4c51dc['id']),_0x445f18=_0x249895[_0x31fea3(0x172)][_0x31fea3(0x1a0)](_0x5bf27e),_0x287492=_0x3dc735[_0x31fea3(0x1c5)][_0x31fea3(0x1a0)](_0x5bf27e);try{verifyVisibilityUpdate(_0x445f18,_0x287492,_0x249895[_0x31fea3(0x194)][_0x31fea3(0x1c1)]);}catch(_0xfc4c4c){const _0x489483=asVerificationError(_0xfc4c4c,'Menu\x20'+_0x5bf27e+_0x31fea3(0x1a2));_0x4202e6[_0x31fea3(0x19e)]({'id':_0x5bf27e,'stage':_0x31fea3(0x1a9),'code':_0x489483['code'],'message':_0x489483[_0x31fea3(0x168)],'requestedStateConfirmed':![]});}}for(const _0x36667c of _0xf909){const _0x20a5ba=_0x249895[_0x31fea3(0x172)]['get'](_0x36667c),_0x51a590=_0x3dc735[_0x31fea3(0x1c5)]['get'](_0x36667c);try{verifyVisibilityUpdate(_0x20a5ba,_0x51a590,_0x249895[_0x31fea3(0x194)][_0x31fea3(0x1c1)]),_0x355156[_0x31fea3(0x19e)]({'id':_0x36667c,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x213cc5){const _0x9711d=asVerificationError(_0x213cc5,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x36667c+_0x31fea3(0x16c));_0x4202e6[_0x31fea3(0x19e)]({'id':_0x36667c,'stage':_0x31fea3(0x1c6),'code':_0x9711d['code'],'message':_0x9711d['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x4202e6['length']>0x0){const _0x976bc0=_0x4202e6[_0x31fea3(0x183)](_0x771cf1=>Number(_0x771cf1['id'])),_0x3f727d=_0x355156[_0x31fea3(0x1d6)](_0x11ec80=>_0x11ec80[_0x31fea3(0x182)]===!![])[_0x31fea3(0x180)],_0xd55866=menuError('menu_verification_failed',_0x31fea3(0x164)+_0x976bc0[_0x31fea3(0x19d)](',\x20')+'.',_0x31fea3(0x1b2));throw menuFailure(_0xd55866,_0x249895[_0x31fea3(0x194)],{'stage':'verification','succeeded':_0x355156,'failedRecords':[..._0x55399e,..._0x4202e6],'warnings':[_0x31fea3(0x1b1)],'verification':{'status':'failed',..._0x976bc0[_0x31fea3(0x180)]===0x1?{'targetId':_0x976bc0[0x0]}:{'targetIds':_0x976bc0},'recoveredCount':_0x3f727d,'lookupCommand':_0x31fea3(0x19f)}});}const _0x49f6fc=_0x355156['filter'](_0x433511=>_0x433511[_0x31fea3(0x1d7)]===!![])[_0x31fea3(0x180)],_0x354fd6=_0x355156[_0x31fea3(0x180)]-_0x49f6fc,_0x4e80fd={..._0x249895['plan'],'succeeded':_0x355156,'failed':_0x55399e,'warnings':_0x55399e[_0x31fea3(0x180)]>0x0?[..._0x249895[_0x31fea3(0x194)]['warnings'],_0x31fea3(0x1ae)]:_0x249895[_0x31fea3(0x194)][_0x31fea3(0x18c)],'verification':{'checkedBy':_0x31fea3(0x1a6),'snapshotHash':_0x3dc735[_0x31fea3(0x178)],'matchesRequestedState':_0x55399e[_0x31fea3(0x180)]===0x0,'recoveredCount':_0xf909['length']}};return{'ok':_0x55399e[_0x31fea3(0x180)]===0x0,'data':_0x4e80fd,'message':_0x55399e[_0x31fea3(0x180)]===0x0?_0x31fea3(0x199)+_0x49f6fc+_0x31fea3(0x1ca)+_0x354fd6+_0x31fea3(0x1a7):_0x31fea3(0x17d)+_0x49f6fc+_0x31fea3(0x1c2)+_0x354fd6+_0x31fea3(0x19c)+_0x55399e[_0x31fea3(0x180)]+_0x31fea3(0x1b6)};}};function parseInput(_0x13fbdd){const _0x556c6d=a136_0x16e0ff,_0x2e8cfc=parseMenuIds(_0x13fbdd[_0x556c6d(0x19a)](_0x556c6d(0x169))),_0x24a81d=parseCsv(_0x13fbdd['str']('paths'));if(_0x2e8cfc[_0x556c6d(0x180)]===0x0&&_0x24a81d[_0x556c6d(0x180)]===0x0)throw CliErrors[_0x556c6d(0x173)](_0x556c6d(0x184));const _0x59c475=parseBooleanFlag(_0x13fbdd,'visible',!![]),_0xefe550=parseBooleanFlag(_0x13fbdd,_0x556c6d(0x1af),![]);let _0x410582;if(hasFlag(_0x13fbdd,_0x556c6d(0x179))){_0x410582=_0x13fbdd[_0x556c6d(0x1aa)](_0x556c6d(0x179));if(!Number[_0x556c6d(0x18f)](_0x410582)||_0x410582<0x0)throw CliErrors['validation'](_0x556c6d(0x17a));}return{'menuIds':_0x2e8cfc,'paths':_0x24a81d,'visible':_0x59c475,'expectVisible':_0xefe550,'expectedCount':_0x410582};}async function buildPlan(_0x425dfe,_0x3db529){const _0x24a486=a136_0x16e0ff,_0x4ae94f=parseInput(_0x425dfe),_0xabd9a1=await fetchMutationSnapshot(_0x425dfe,'update\x20menu\x20visibility'),_0x1a4ea6=selectTargets(_0xabd9a1[_0x24a486(0x1c0)],_0x4ae94f[_0x24a486(0x163)],_0x4ae94f[_0x24a486(0x161)]);if(_0x4ae94f[_0x24a486(0x1cc)]!==undefined&&_0x1a4ea6[_0x24a486(0x180)]!==_0x4ae94f[_0x24a486(0x1cc)])throw menuError('menu_expected_count_mismatch','Selected\x20'+_0x1a4ea6[_0x24a486(0x180)]+_0x24a486(0x1be)+_0x4ae94f[_0x24a486(0x1cc)]+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x4ae94f[_0x24a486(0x181)]!==undefined){const _0x1e5bd0=_0x1a4ea6[_0x24a486(0x1d6)](_0x2a7422=>_0x2a7422[_0x24a486(0x1d2)]!==_0x4ae94f[_0x24a486(0x181)]);if(_0x1e5bd0[_0x24a486(0x180)]>0x0)throw menuError('menu_state_drift','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x1e5bd0['map'](_0x23be0f=>_0x23be0f['id'])[_0x24a486(0x19d)](',\x20')+'.',_0x24a486(0x15e));}const _0x22b7f4=_0x1a4ea6['map'](_0x442bbf=>({'id':_0x442bbf['id'],'label':_0x442bbf[_0x24a486(0x186)],'path':_0x442bbf[_0x24a486(0x195)],'before':{'visible':_0x442bbf['visible']},'after':{'visible':_0x4ae94f[_0x24a486(0x1d2)]}})),_0x3daa19=_0x22b7f4[_0x24a486(0x1d6)](_0xeec3f0=>_0xeec3f0['before'][_0x24a486(0x1d2)]!==_0x4ae94f['visible'])[_0x24a486(0x183)](_0x574dfe=>({'stage':_0x24a486(0x1b0),'method':'POST','path':_0x24a486(0x18a),'body':{'appCode':_0x425dfe['appCode'],'id':_0x574dfe['id'],'visible':_0x4ae94f['visible']}})),_0xbb3b4a=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x4ae94f[_0x24a486(0x163)],'paths':_0x4ae94f['paths']},'before':{'menus':_0x1a4ea6[_0x24a486(0x183)](_0x24abbb=>({'id':_0x24abbb['id'],'path':_0x24abbb[_0x24a486(0x195)],'visible':_0x24abbb['visible']}))},'after':{'menus':_0x1a4ea6[_0x24a486(0x183)](_0x1a9298=>({'id':_0x1a9298['id'],'path':_0x1a9298['path'],'visible':_0x4ae94f[_0x24a486(0x1d2)]}))},'dryRun':_0x3db529,'backend':[...BACKEND],'plannedActions':_0x3daa19,'snapshotHash':_0xabd9a1[_0x24a486(0x178)],'warnings':_0x3daa19[_0x24a486(0x180)]===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0xbb3b4a,'requestedVisible':_0x4ae94f[_0x24a486(0x1d2)],'targets':_0x22b7f4},'beforeById':new Map(_0x1a4ea6['map'](_0x1b9f7c=>[_0x1b9f7c['id'],_0x1b9f7c]))};}function selectTargets(_0x2a79b8,_0x803a9c,_0x28f3bc){const _0x26ca8e=a136_0x16e0ff,_0x2745c2=new Map(_0x2a79b8['map'](_0xccf883=>[_0xccf883['id'],_0xccf883])),_0x54b880=new Map(),_0x13c0f1=_0x803a9c[_0x26ca8e(0x1d6)](_0x31eeb1=>!_0x2745c2[_0x26ca8e(0x16e)](_0x31eeb1));if(_0x13c0f1['length']>0x0)throw menuError(_0x26ca8e(0x1ce),_0x26ca8e(0x1bd)+_0x13c0f1[_0x26ca8e(0x19d)](',\x20')+'.',_0x26ca8e(0x1a4));for(const _0xc957e6 of _0x803a9c){_0x54b880[_0x26ca8e(0x1a5)](_0xc957e6,_0x2745c2[_0x26ca8e(0x1a0)](_0xc957e6));}for(const _0x2ca679 of _0x28f3bc){const _0x32d246=_0x2a79b8[_0x26ca8e(0x1d6)](_0x1c3de8=>_0x1c3de8[_0x26ca8e(0x195)]===_0x2ca679);if(_0x32d246[_0x26ca8e(0x180)]===0x0)throw menuError(_0x26ca8e(0x1ce),_0x26ca8e(0x177)+JSON[_0x26ca8e(0x17b)](_0x2ca679)+'.',_0x26ca8e(0x160));if(_0x32d246[_0x26ca8e(0x180)]>0x1)throw menuError(_0x26ca8e(0x1bf),_0x26ca8e(0x167)+JSON[_0x26ca8e(0x17b)](_0x2ca679)+'.',_0x26ca8e(0x19b)+_0x32d246[_0x26ca8e(0x183)](_0x2ce2bc=>_0x2ce2bc['id'])[_0x26ca8e(0x19d)](',\x20')+'.');const _0x57460f=_0x32d246[0x0];_0x54b880[_0x26ca8e(0x1a5)](_0x57460f['id'],_0x57460f);}return[..._0x54b880[_0x26ca8e(0x16d)]()];}function parseMenuIds(_0x970995){const _0x332d7d=a136_0x16e0ff,_0x51f590=parseCsv(_0x970995),_0x1852c2=_0x51f590[_0x332d7d(0x183)](Number);if(_0x1852c2[_0x332d7d(0x1c9)](_0x3c4810=>!Number[_0x332d7d(0x18f)](_0x3c4810)||_0x3c4810<=0x0))throw CliErrors['validation'](_0x332d7d(0x1cd));return[...new Set(_0x1852c2)];}function parseCsv(_0x5be45b){const _0x1a066d=a136_0x16e0ff;return[...new Set(_0x5be45b[_0x1a066d(0x1b8)](',')[_0x1a066d(0x183)](_0x41daae=>_0x41daae[_0x1a066d(0x1c7)]())[_0x1a066d(0x1d6)](Boolean))];}function parseBooleanFlag(_0x488fbd,_0x537eac,_0x317a8a){const _0xef0e4=a136_0x16e0ff;if(!hasFlag(_0x488fbd,_0x537eac)){if(_0x317a8a)throw CliErrors[_0xef0e4(0x1ad)](_0x537eac);return undefined;}const _0x2e4dbb=_0x488fbd['rawFlags'][_0x537eac];if(_0x2e4dbb===!![]||_0x2e4dbb===![])return _0x2e4dbb;if(_0x2e4dbb===_0xef0e4(0x1a3))return!![];if(_0x2e4dbb===_0xef0e4(0x188))return![];throw CliErrors[_0xef0e4(0x173)]('--'+_0x537eac+_0xef0e4(0x1b7));}function verifyVisibilityUpdate(_0x1f18b0,_0x1cbbe7,_0x2eb692){const _0x55ec78=a136_0x16e0ff;assertVerified(!!_0x1cbbe7,_0x55ec78(0x192)+_0x1f18b0['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x1cbbe7[_0x55ec78(0x1d2)]===_0x2eb692,_0x55ec78(0x192)+_0x1f18b0['id']+_0x55ec78(0x1c3));const _0x598787=[['id',_0x1cbbe7['id'],_0x1f18b0['id']],[_0x55ec78(0x16b),_0x1cbbe7[_0x55ec78(0x16b)],_0x1f18b0[_0x55ec78(0x16b)]],[_0x55ec78(0x1c4),_0x1cbbe7['depth'],_0x1f18b0[_0x55ec78(0x1c4)]],[_0x55ec78(0x186),_0x1cbbe7[_0x55ec78(0x186)],_0x1f18b0[_0x55ec78(0x186)]],[_0x55ec78(0x195),_0x1cbbe7[_0x55ec78(0x195)],_0x1f18b0[_0x55ec78(0x195)]],[_0x55ec78(0x1bc),_0x1cbbe7[_0x55ec78(0x1bc)],_0x1f18b0['url']],[_0x55ec78(0x176),_0x1cbbe7['type'],_0x1f18b0[_0x55ec78(0x176)]],[_0x55ec78(0x1a1),_0x1cbbe7['sort'],_0x1f18b0[_0x55ec78(0x1a1)]],[_0x55ec78(0x1cf),_0x1cbbe7[_0x55ec78(0x1cf)],_0x1f18b0['resources']],['resourcesValid',_0x1cbbe7[_0x55ec78(0x18b)],_0x1f18b0[_0x55ec78(0x18b)]],[_0x55ec78(0x165),_0x1cbbe7['childrenIds'],_0x1f18b0[_0x55ec78(0x165)]],['childrenCount',_0x1cbbe7['childrenCount'],_0x1f18b0['childrenCount']],[_0x55ec78(0x1b5),_0x1cbbe7['pageId'],_0x1f18b0[_0x55ec78(0x1b5)]],[_0x55ec78(0x185),_0x1cbbe7[_0x55ec78(0x185)],_0x1f18b0[_0x55ec78(0x185)]],[_0x55ec78(0x1ab),_0x1cbbe7[_0x55ec78(0x1ab)],_0x1f18b0['modelType']],[_0x55ec78(0x1cb),_0x1cbbe7[_0x55ec78(0x1cb)],_0x1f18b0[_0x55ec78(0x1cb)]],[_0x55ec78(0x18d),_0x1cbbe7[_0x55ec78(0x18d)],_0x1f18b0[_0x55ec78(0x18d)]]];for(const [_0x255b60,_0xcb26eb,_0x9ab825]of _0x598787){assertVerified(sameValue(_0xcb26eb,_0x9ab825),'Menu\x20'+_0x1f18b0['id']+'\x20'+_0x255b60+_0x55ec78(0x187));}}function sameValue(_0x24b80b,_0xded510){const _0x226bc9=a136_0x16e0ff;if(Array['isArray'](_0x24b80b)||Array[_0x226bc9(0x1bb)](_0xded510))return JSON[_0x226bc9(0x17b)](_0x24b80b)===JSON[_0x226bc9(0x17b)](_0xded510);return _0x24b80b===_0xded510;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a137_0x514e62=a137_0x163e;function a137_0x6271(){const _0x55a3f5=['8PNJDpx','configName','POST','configCode','channelType','23qWeULT','1511111gUNnXi','connectTimeout','9UQlcqv','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','7457483mdCswU','15650OxyPXN','description','172vZJEeO','429081bBtXHV','mutation','6562370GoPyRI','write','Inspect\x20with\x20','/notification/channel-config/create','77135aVvGsh','2145036uQYyHY','channelConfig','planned','notification_config_create_outcome_unknown','document','config-create','isSafeInteger',';\x20no\x20automatic\x20retry\x20was\x20attempted.',';\x20do\x20not\x20resubmit.','endpointUrl','verification','create','appCode'];a137_0x6271=function(){return _0x55a3f5;};return a137_0x6271();}(function(_0x58fd73,_0x1260aa){const _0x4ca1ed=a137_0x163e,_0x5361a1=_0x58fd73();while(!![]){try{const _0x2e199c=-parseInt(_0x4ca1ed(0x110))/0x1*(parseInt(_0x4ca1ed(0x116))/0x2)+-parseInt(_0x4ca1ed(0x119))/0x3+-parseInt(_0x4ca1ed(0x118))/0x4*(parseInt(_0x4ca1ed(0x11f))/0x5)+parseInt(_0x4ca1ed(0xfe))/0x6+parseInt(_0x4ca1ed(0x111))/0x7*(-parseInt(_0x4ca1ed(0x10b))/0x8)+parseInt(_0x4ca1ed(0x113))/0x9*(parseInt(_0x4ca1ed(0x11b))/0xa)+parseInt(_0x4ca1ed(0x115))/0xb;if(_0x2e199c===_0x1260aa)break;else _0x5361a1['push'](_0x5361a1['shift']());}catch(_0x3ce71d){_0x5361a1['push'](_0x5361a1['shift']());}}}(a137_0x6271,0x777f4));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a137_0x514e62(0x11e);async function prepareCreate(_0x28c5ff){const _0xa491fb=a137_0x514e62,_0x46bb4e=await readNotificationDocument(_0x28c5ff,_0xa491fb(0x109)),_0x17f50a=createMutationInput(_0x28c5ff[_0xa491fb(0x10a)],_0x46bb4e);return{'document':_0x46bb4e,'input':_0x17f50a,'planned':projectNotificationConfig({'appCode':_0x28c5ff[_0xa491fb(0x10a)],'configName':_0x46bb4e['configName'],'channelType':_0x46bb4e[_0xa491fb(0x10f)],'endpointUrl':_0x46bb4e[_0xa491fb(0x107)],'channelConfig':_0x46bb4e[_0xa491fb(0xff)],'description':_0x46bb4e[_0xa491fb(0x117)],'connectTimeout':_0x46bb4e[_0xa491fb(0x112)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x46bb4e['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a137_0x163e(_0xbff865,_0x2b2d2e){_0xbff865=_0xbff865-0xfe;const _0x62715c=a137_0x6271();let _0x163ecb=_0x62715c[_0xbff865];return _0x163ecb;}export const notificationConfigCreate={'service':'notification','command':a137_0x514e62(0x103),'description':'Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','risk':a137_0x514e62(0x11c),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x8a1718){assertSingleNotificationSource(_0x8a1718);},async 'dryRun'(_0x19bddf){const _0x1b766e=a137_0x514e62,_0x29f9c4=await prepareCreate(_0x19bddf),_0x492dd3=notificationLookupCommand(_0x19bddf[_0x1b766e(0x10a)],_0x29f9c4[_0x1b766e(0x102)][_0x1b766e(0x10f)]);return asDryRunResult({'operation':_0x1b766e(0x109),'selector':{'appCode':_0x19bddf[_0x1b766e(0x10a)],'configName':_0x29f9c4['document'][_0x1b766e(0x10c)],'channelType':_0x29f9c4[_0x1b766e(0x102)][_0x1b766e(0x10f)]},'before':null,'after':_0x29f9c4[_0x1b766e(0x100)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x492dd3}},{'method':_0x1b766e(0x10d),'url':CREATE_PATH});},async 'execute'(_0x203549){const _0x3fe219=a137_0x514e62,_0x537ab8=await prepareCreate(_0x203549),_0x3193c5=notificationLookupCommand(_0x203549['appCode'],_0x537ab8[_0x3fe219(0x102)]['channelType']);let _0x388664;try{_0x388664=await createNotificationChannelConfig(_0x537ab8['input']);}catch(_0x3453b6){if(isPlatformTransportFailure(_0x3453b6))throw notificationError(_0x3fe219(0x101),'Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.',_0x3fe219(0x11d)+_0x3193c5+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x3fe219(0x109),_0x3fe219(0x11a),_0x3fe219(0x11d)+_0x3193c5+_0x3fe219(0x105));}if(!Number[_0x3fe219(0x104)](_0x388664)||_0x388664<=0x0)throw notificationError(_0x3fe219(0x101),_0x3fe219(0x114),_0x3fe219(0x11d)+_0x3193c5+_0x3fe219(0x106));let _0x5f17dc;try{const _0x4d2275=await getNotificationChannelConfig(_0x388664,_0x203549[_0x3fe219(0x10a)]);_0x5f17dc=normalizeExactNotificationConfig(_0x4d2275,_0x388664,_0x203549[_0x3fe219(0x10a)]);}catch{throw safeApiFailure('create',_0x3fe219(0x108),'Inspect\x20with\x20'+_0x3193c5+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x5f17dc[_0x3fe219(0x10a)],'id':_0x5f17dc['id'],'configCode':_0x5f17dc[_0x3fe219(0x10e)],'configName':_0x5f17dc[_0x3fe219(0x10c)],'channelType':_0x5f17dc[_0x3fe219(0x10f)]},'before':null,'after':projectNotificationConfig(_0x5f17dc),'dryRun':![],'backend':{'method':_0x3fe219(0x10d),'path':CREATE_PATH},'warnings':[],'verification':{'status':'verified','lookupCommand':_0x3193c5}},'message':'Created\x20notification\x20config\x20'+_0x5f17dc['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a138_0x5bc245=a138_0x2f83;(function(_0x227873,_0x5c9173){const _0x4bf8f0=a138_0x2f83,_0x4ac4a7=_0x227873();while(!![]){try{const _0xff9a00=-parseInt(_0x4bf8f0(0xea))/0x1+parseInt(_0x4bf8f0(0xda))/0x2*(parseInt(_0x4bf8f0(0xf6))/0x3)+parseInt(_0x4bf8f0(0xed))/0x4*(-parseInt(_0x4bf8f0(0xec))/0x5)+parseInt(_0x4bf8f0(0xf2))/0x6+-parseInt(_0x4bf8f0(0xd8))/0x7*(-parseInt(_0x4bf8f0(0xf0))/0x8)+-parseInt(_0x4bf8f0(0xf5))/0x9*(-parseInt(_0x4bf8f0(0xe3))/0xa)+parseInt(_0x4bf8f0(0xee))/0xb;if(_0xff9a00===_0x5c9173)break;else _0x4ac4a7['push'](_0x4ac4a7['shift']());}catch(_0xe2a696){_0x4ac4a7['push'](_0x4ac4a7['shift']());}}}(a138_0x57ce,0x20ad3));import{asDryRunResult}from'../../commands/common/dry-run.js';function a138_0x2f83(_0x40cc33,_0x406f8a){_0x40cc33=_0x40cc33-0xd7;const _0x57ce17=a138_0x57ce();let _0x2f83d7=_0x57ce17[_0x40cc33];return _0x2f83d7;}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=a138_0x5bc245(0xe7),REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';async function prepareDelete(_0x3ec000){const _0x54a013=a138_0x5bc245,_0xb3e0ab=readNotificationId(_0x3ec000),_0xd6d486=await requireExactNotificationConfig(_0x3ec000[_0x54a013(0xd9)],_0xb3e0ab,_0x54a013(0xe4));return{'id':_0xb3e0ab,'before':_0xd6d486};}export const notificationConfigDelete={'service':a138_0x5bc245(0xe9),'command':a138_0x5bc245(0xf1),'description':a138_0x5bc245(0xe5),'risk':a138_0x5bc245(0xf4),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0xc3bf89){readNotificationId(_0xc3bf89),requireNotificationExplicitYes(_0xc3bf89);},async 'dryRun'(_0x1a6a56){const _0x193642=a138_0x5bc245,_0x1e0bf0=await prepareDelete(_0x1a6a56),_0x549fc0=notificationLookupCommand(_0x1a6a56[_0x193642(0xd9)],_0x1e0bf0['before'][_0x193642(0xfa)]);return asDryRunResult({'operation':_0x193642(0xe4),'selector':notificationSelector(_0x1e0bf0['before']),'before':projectNotificationConfig(_0x1e0bf0[_0x193642(0xeb)]),'after':null,'dryRun':!![],'backend':{'method':_0x193642(0xe2),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x193642(0xdc),'lookupCommand':_0x549fc0}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x1f995f){const _0x34888d=a138_0x5bc245;requireNotificationExplicitYes(_0x1f995f);const _0xd1ea3a=await prepareDelete(_0x1f995f),_0x18c272=notificationLookupCommand(_0x1f995f[_0x34888d(0xd9)],_0xd1ea3a[_0x34888d(0xeb)][_0x34888d(0xfa)]);let _0x4a1b9a=![];try{await deleteNotificationChannelConfig(_0xd1ea3a['id'],_0x1f995f[_0x34888d(0xd9)]);}catch(_0x32e242){if(!isPlatformTransportFailure(_0x32e242))throw safeApiFailure(_0x34888d(0xe4),_0x34888d(0xf8),_0x34888d(0xf3)+_0x18c272+_0x34888d(0xdd));_0x4a1b9a=!![];}let _0xa31153;try{_0xa31153=await listNotificationChannelConfigs(_0x1f995f[_0x34888d(0xd9)],_0xd1ea3a['before'][_0x34888d(0xfa)]),validateNotificationDeleteReadback(_0xa31153,_0x1f995f[_0x34888d(0xd9)],_0xd1ea3a[_0x34888d(0xeb)][_0x34888d(0xfa)]);}catch{throw notificationError(_0x4a1b9a?_0x34888d(0xef):_0x34888d(0xd7),_0x34888d(0xde)+_0xd1ea3a['id']+_0x34888d(0xe6),'Inspect\x20with\x20'+_0x18c272+_0x34888d(0xe8));}if(_0xa31153['some'](_0x49df36=>_0x49df36['id']===_0xd1ea3a['id']))throw notificationError(_0x4a1b9a?_0x34888d(0xef):_0x34888d(0xf9),_0x34888d(0xde)+_0xd1ea3a['id']+_0x34888d(0xdb),'Inspect\x20with\x20'+_0x18c272+_0x34888d(0xe8));const _0x19f29a=[REFERENCE_WARNING];return _0x4a1b9a&&_0x19f29a[_0x34888d(0xdf)](_0x34888d(0xe1)),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0xd1ea3a[_0x34888d(0xeb)]),'before':projectNotificationConfig(_0xd1ea3a[_0x34888d(0xeb)]),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x19f29a,'verification':{'status':_0x34888d(0xe0),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x4a1b9a,'lookupCommand':_0x18c272}},'message':_0x34888d(0xf7)+_0xd1ea3a['id']};}};function a138_0x57ce(){const _0x1b6dd8=['270QQKvWT','delete','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','\x20delete\x20could\x20not\x20be\x20verified.','/notification/channel-config/delete',';\x20do\x20not\x20resubmit\x20automatically.','notification','151459NoYSFx','before','15cQgRaK','164204vnJbfp','25817PruYLg','notification_config_delete_outcome_unknown','162952ZLzNSF','config-delete','86676znJpci','Inspect\x20with\x20','high-risk-write','65943wzQCdm','39JPRaaf','Deleted\x20notification\x20config\x20','mutation','notification_config_delete_verification_failed','channelType','notification_config_delete_verification_unavailable','35AedWDv','appCode','14152EpssKa','\x20remains\x20present\x20after\x20delete.','planned',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Notification\x20config\x20','unshift','verified','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','POST'];a138_0x57ce=function(){return _0x1b6dd8;};return a138_0x57ce();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a139_0x5abb(_0x25fb66,_0xbdac28){_0x25fb66=_0x25fb66-0x1bb;const _0x21dcd9=a139_0x21dc();let _0x5abb19=_0x21dcd9[_0x25fb66];return _0x5abb19;}const a139_0x199ddd=a139_0x5abb;(function(_0x5f1653,_0x6b28e6){const _0x534bfa=a139_0x5abb,_0x142f80=_0x5f1653();while(!![]){try{const _0x20896b=-parseInt(_0x534bfa(0x1cb))/0x1*(-parseInt(_0x534bfa(0x1cd))/0x2)+-parseInt(_0x534bfa(0x1c0))/0x3*(-parseInt(_0x534bfa(0x1c4))/0x4)+-parseInt(_0x534bfa(0x1c6))/0x5*(parseInt(_0x534bfa(0x1c5))/0x6)+parseInt(_0x534bfa(0x1bf))/0x7*(parseInt(_0x534bfa(0x1cc))/0x8)+-parseInt(_0x534bfa(0x1bc))/0x9*(parseInt(_0x534bfa(0x1c1))/0xa)+-parseInt(_0x534bfa(0x1bd))/0xb*(-parseInt(_0x534bfa(0x1c7))/0xc)+-parseInt(_0x534bfa(0x1c3))/0xd;if(_0x20896b===_0x6b28e6)break;else _0x142f80['push'](_0x142f80['shift']());}catch(_0x1cbc73){_0x142f80['push'](_0x142f80['shift']());}}}(a139_0x21dc,0x51056));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a139_0x21dc(){const _0xcea6b0=['3511566GBnyUc','5SaCrqI','7232712LuiIMc','appCode','type','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','42791rOWfaK','124216eXEvSa','10AxDsVS','notification','Found\x20','string','36InfpAV','11DmVpRs','EMAIL','273aGJBQz','362601HHwDdO','1134890QIjNmH','length','2236286YNWfTF','4caEBBr'];a139_0x21dc=function(){return _0xcea6b0;};return a139_0x21dc();}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a139_0x199ddd(0x1ce),'command':'config-list','description':a139_0x199ddd(0x1ca),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a139_0x199ddd(0x1c9),'type':a139_0x199ddd(0x1bb),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES,'default':a139_0x199ddd(0x1be)}],async 'validate'(_0x4ddf7f){readNotificationChannelType(_0x4ddf7f);},async 'execute'(_0x11e69e){const _0x367179=a139_0x199ddd,_0x4ba6e3=readNotificationChannelType(_0x11e69e),_0x5c12cb=await listNotificationChannelConfigs(_0x11e69e['appCode'],_0x4ba6e3),_0x34e166=_0x5c12cb['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x11e69e[_0x367179(0x1c8)],'channelType':_0x4ba6e3,'count':_0x34e166[_0x367179(0x1c2)],'configs':_0x34e166},'message':_0x367179(0x1cf)+_0x34e166[_0x367179(0x1c2)]+'\x20'+_0x4ba6e3+'\x20notification\x20config(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a140_0x28fe(_0x3bfe71,_0x435287){_0x3bfe71=_0x3bfe71-0xf2;const _0x28ac20=a140_0x28ac();let _0x28fef5=_0x28ac20[_0x3bfe71];return _0x28fef5;}const a140_0xa9dae=a140_0x28fe;(function(_0x54ac2d,_0xd5657d){const _0x148dc6=a140_0x28fe,_0x2f5afd=_0x54ac2d();while(!![]){try{const _0x4d3ab1=parseInt(_0x148dc6(0x117))/0x1*(parseInt(_0x148dc6(0x10c))/0x2)+parseInt(_0x148dc6(0x10d))/0x3+-parseInt(_0x148dc6(0x101))/0x4*(-parseInt(_0x148dc6(0x108))/0x5)+-parseInt(_0x148dc6(0x106))/0x6+parseInt(_0x148dc6(0x112))/0x7+-parseInt(_0x148dc6(0x109))/0x8+parseInt(_0x148dc6(0xfb))/0x9;if(_0x4d3ab1===_0xd5657d)break;else _0x2f5afd['push'](_0x2f5afd['shift']());}catch(_0x14b11d){_0x2f5afd['push'](_0x2f5afd['shift']());}}}(a140_0x28ac,0xbdb9b));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';function a140_0x28ac(){const _0x474f6b=['6227330OSfrre','9907584hXydOp','\x20with\x20',';\x20no\x20automatic\x20retry\x20was\x20attempted.','50Llpvba','4457706hjkQzz','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','channelType','notification_config_update_verification_unavailable','allMatch','1765750oUDNEM','provesChange','Notification\x20config\x20','before','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','4923kFPUDe','Updated\x20notification\x20config\x20','verified','high-risk-write','/notification/channel-config/update','update','Inspect\x20ID\x20','appCode','\x20via\x20','Inspect\x20with\x20--id\x20','611415QziyVY','config-update','notification','notification_config_update_outcome_unknown','planned','notification_config_update_verification_failed','4ajbHKr','patch','payload',';\x20do\x20not\x20resubmit\x20automatically.','verifiedFields','6954390BrtSCW','POST'];a140_0x28ac=function(){return _0x474f6b;};return a140_0x28ac();}const UPDATE_PATH=a140_0xa9dae(0xf5);async function prepareUpdate(_0x457248){const _0x6467d8=a140_0xa9dae,_0x5b1599=readNotificationId(_0x457248),_0x1ce73c=await readNotificationDocument(_0x457248,_0x6467d8(0xf6)),_0x3f1d2d=await requireExactNotificationConfig(_0x457248['appCode'],_0x5b1599,_0x6467d8(0xf6));return{'id':_0x5b1599,'patch':_0x1ce73c,'before':_0x3f1d2d,'payload':mergeUpdateInput(_0x3f1d2d,_0x1ce73c),'planned':plannedUpdateProjection(_0x3f1d2d,_0x1ce73c)};}export const notificationConfigUpdate={'service':a140_0xa9dae(0xfd),'command':a140_0xa9dae(0xfc),'description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':a140_0xa9dae(0xf4),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x7133e7){readNotificationId(_0x7133e7),assertSingleNotificationSource(_0x7133e7),requireNotificationExplicitYes(_0x7133e7);},async 'dryRun'(_0x5cbb02){const _0x5602f8=a140_0xa9dae,_0x5610c9=await prepareUpdate(_0x5cbb02),_0x1528e4=notificationLookupCommand(_0x5cbb02[_0x5602f8(0xf8)],_0x5610c9[_0x5602f8(0x115)][_0x5602f8(0x10f)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x5610c9[_0x5602f8(0x115)]),'before':projectNotificationConfig(_0x5610c9[_0x5602f8(0x115)]),'after':_0x5610c9['planned'],'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x5602f8(0xff),'lookupCommand':_0x1528e4}},{'method':_0x5602f8(0x107),'url':UPDATE_PATH});},async 'execute'(_0x1454b9){const _0x1adcac=a140_0xa9dae;requireNotificationExplicitYes(_0x1454b9);const _0x34b98a=await prepareUpdate(_0x1454b9),_0x500c26=notificationLookupCommand(_0x1454b9[_0x1adcac(0xf8)],_0x34b98a[_0x1adcac(0x115)][_0x1adcac(0x10f)]);let _0x5f325e=![];try{await updateNotificationChannelConfig(_0x34b98a[_0x1adcac(0x103)]);}catch(_0x18b912){if(!isPlatformTransportFailure(_0x18b912))throw safeApiFailure('update','mutation',_0x1adcac(0xf7)+_0x34b98a['id']+_0x1adcac(0x10a)+_0x500c26+_0x1adcac(0x10b));_0x5f325e=!![];}let _0x2f2a10;try{const _0x54ce87=await getNotificationChannelConfig(_0x34b98a['id'],_0x1454b9['appCode']);_0x2f2a10=normalizeExactNotificationConfig(_0x54ce87,_0x34b98a['id'],_0x1454b9[_0x1adcac(0xf8)]);}catch{throw notificationError(_0x5f325e?_0x1adcac(0xfe):_0x1adcac(0x110),_0x1adcac(0x114)+_0x34b98a['id']+_0x1adcac(0x116),_0x1adcac(0xfa)+_0x34b98a['id']+'\x20via\x20'+_0x500c26+_0x1adcac(0x104));}const _0x3c8db1=requestedSafeFieldsMatch(_0x34b98a[_0x1adcac(0x115)],_0x2f2a10,_0x34b98a[_0x1adcac(0x102)]);if(!_0x3c8db1[_0x1adcac(0x111)]||_0x5f325e&&!_0x3c8db1[_0x1adcac(0x113)])throw notificationError(_0x5f325e?_0x1adcac(0xfe):_0x1adcac(0x100),'Notification\x20config\x20'+_0x34b98a['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x1adcac(0xfa)+_0x34b98a['id']+_0x1adcac(0xf9)+_0x500c26+_0x1adcac(0x104));const _0x5cfaab=_0x5f325e?[_0x1adcac(0x10e)]:[];return{'ok':!![],'data':{'operation':_0x1adcac(0xf6),'selector':notificationSelector(_0x2f2a10),'before':projectNotificationConfig(_0x34b98a[_0x1adcac(0x115)]),'after':projectNotificationConfig(_0x2f2a10),'dryRun':![],'backend':{'method':_0x1adcac(0x107),'path':UPDATE_PATH},'warnings':_0x5cfaab,'verification':{'status':_0x1adcac(0xf3),'recoveredAfterUnknownResponse':_0x5f325e,'verifiedFields':_0x3c8db1[_0x1adcac(0x105)],'lookupCommand':_0x500c26}},'message':_0x1adcac(0xf2)+_0x2f2a10['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4e38f8,_0x1186db){const _0x26b9b6=a141_0x8006,_0x39713b=_0x4e38f8();while(!![]){try{const _0x317ec2=-parseInt(_0x26b9b6(0x112))/0x1+parseInt(_0x26b9b6(0x10f))/0x2+-parseInt(_0x26b9b6(0x111))/0x3+parseInt(_0x26b9b6(0x114))/0x4+-parseInt(_0x26b9b6(0x110))/0x5+-parseInt(_0x26b9b6(0x115))/0x6+parseInt(_0x26b9b6(0x113))/0x7;if(_0x317ec2===_0x1186db)break;else _0x39713b['push'](_0x39713b['shift']());}catch(_0x25e5d1){_0x39713b['push'](_0x39713b['shift']());}}}(a141_0x1ebd,0x4e0eb));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a141_0x8006(_0x181218,_0x3408f6){_0x181218=_0x181218-0x10f;const _0x1ebde2=a141_0x1ebd();let _0x800607=_0x1ebde2[_0x181218];return _0x800607;}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a141_0x1ebd(){const _0x39bac9=['394293evIqro','9006025iZuicJ','1307844yTzHjD','3360966dKLPGR','542402zfQnyN','2603415tGpNwt','269631bajTSB'];a141_0x1ebd=function(){return _0x39bac9;};return a141_0x1ebd();}
|