@lovrabet/rabetbase-cli 2.4.6 → 2.4.7-beta.1
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.d.ts +2 -0
- package/lib/commands/kb/search.js +1 -0
- 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.d.ts +16 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/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 +4 -4
- package/skills/rabetbase/references/rabetbase-kb.md +13 -3
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a131_0x4db512=a131_0x360f;(function(_0xe07679,_0x59e5f9){const _0x2ed1b2=a131_0x360f,_0x104663=_0xe07679();while(!![]){try{const _0xf8504c=parseInt(_0x2ed1b2(0xbd))/0x1+parseInt(_0x2ed1b2(0xc1))/0x2+-parseInt(_0x2ed1b2(0xc0))/0x3*(parseInt(_0x2ed1b2(0xaa))/0x4)+-parseInt(_0x2ed1b2(0xbc))/0x5+-parseInt(_0x2ed1b2(0xa1))/0x6*(parseInt(_0x2ed1b2(0xb6))/0x7)+-parseInt(_0x2ed1b2(0xc3))/0x8+parseInt(_0x2ed1b2(0xba))/0x9*(parseInt(_0x2ed1b2(0xbf))/0xa);if(_0xf8504c===_0x59e5f9)break;else _0x104663['push'](_0x104663['shift']());}catch(_0xe6795b){_0x104663['push'](_0x104663['shift']());}}}(a131_0x2c4a,0x347eb));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a131_0x2c4a(){const _0x12140f=['filter','4mYJlhI','trim','--params.','cssUrl','push','string','dryRun','menu-sync','Invalid\x20--params\x20JSON.','jsUrl','object','\x0a\x20\x20Available\x20local\x20paths:\x20','336ASwWAG','message','parse','No\x20local\x20pages\x20matched\x20paths:\x20','44037fhZPxz','keys','1735320RLHnLK','348504bkjXTK','hasOwn','2380zkZKoj','480585TYKnkl','71460UCWjID','import','3217744oAIRXB','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','has','field',':\x20expected\x20a\x20non-empty\x20string.','join','pages','cwd','JS\x20URL\x20is\x20unreachable:\x20','Start\x20non-interactive\x20menu\x20sync','path','53034oUgjFU','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','get','info','map','Invalid\x20--params.','label','length'];a131_0x2c4a=function(){return _0x12140f;};return a131_0x2c4a();}import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a131_0x4db512(0xb3),a131_0x4db512(0xad)]);function validateParams(_0x420008){const _0x4ad41b=a131_0x4db512,_0x407c67=[];return _0x420008[_0x4ad41b(0xb3)]&&!isValidJsHttpsUrl(_0x420008[_0x4ad41b(0xb3)])&&_0x407c67[_0x4ad41b(0xae)]({'field':_0x4ad41b(0xb3),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x420008[_0x4ad41b(0xad)]&&!isValidCssHttpsUrl(_0x420008[_0x4ad41b(0xad)])&&_0x407c67[_0x4ad41b(0xae)]({'field':'cssUrl','message':_0x4ad41b(0xa2)}),_0x407c67;}export async function runMenuSyncCore(_0x509550,_0x47eea9,_0x300d12=[],_0x147f7e,_0x5cc7cb={}){const _0x114fe3=a131_0x4db512,_0x3678aa=parseMenuSyncParams(_0x147f7e),_0x460e1e=[...new Set(_0x300d12[_0x114fe3(0xa5)](_0x23c914=>_0x23c914[_0x114fe3(0xab)]())[_0x114fe3(0xa9)](Boolean))],_0x3be95c=_0x3678aa['jsUrl'],_0x17767a=_0x3678aa[_0x114fe3(0xad)],_0x56a119=[];if(_0x3be95c)_0x56a119[_0x114fe3(0xae)](_0x3be95c);if(_0x17767a)_0x56a119['push'](_0x17767a);const _0x266f91=validateParams(_0x3678aa);if(_0x266f91[_0x114fe3(0xa8)]>0x0){const _0x4542ce=_0x266f91[_0x114fe3(0xa5)](_0x2c0030=>_0x114fe3(0xac)+_0x2c0030[_0x114fe3(0xc6)]+':\x20'+_0x2c0030[_0x114fe3(0xb7)])['join'](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x4542ce);}logger['setLogPath'](process[_0x114fe3(0xca)]()),logger['info'](_0x114fe3(0xb1),_0x114fe3(0xcc),{'appCode':_0x509550,'selectedCount':_0x460e1e[_0x114fe3(0xa8)],'jsUrl':_0x3be95c,'cssUrl':_0x17767a});if(_0x3be95c){const _0x461e51=await isUrlReachable(_0x3be95c);if(!_0x461e51)throw new Error(_0x114fe3(0xcb)+_0x3be95c);}if(_0x17767a){const _0x2fc442=await isUrlReachable(_0x17767a);if(!_0x2fc442)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x17767a);}const _0x96c9d5=getLocalPages();if(_0x96c9d5[_0x114fe3(0xa8)]===0x0){if(_0x460e1e[_0x114fe3(0xa8)]>0x0)throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x460e1e['join'](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x5cc7cb[_0x114fe3(0xb0)]===!![],'targetPages':[],'plannedMenus':[]};}const _0xc794ac=await getOnlineMenuList(_0x509550,_0x47eea9),_0x24eea2=new Set(_0xc794ac[_0x114fe3(0xa5)](_0x495a1d=>_0x495a1d[_0x114fe3(0xcd)]));let _0x16058b;if(_0x460e1e[_0x114fe3(0xa8)]>0x0){const _0x16a1e8=new Map(_0x96c9d5[_0x114fe3(0xa5)](_0x53e52b=>[_0x53e52b[_0x114fe3(0xcd)],_0x53e52b])),_0x510de4=_0x460e1e['filter'](_0xfb95fd=>!_0x16a1e8[_0x114fe3(0xc5)](_0xfb95fd));if(_0x510de4[_0x114fe3(0xa8)]>0x0){const _0x570777=_0x96c9d5[_0x114fe3(0xa5)](_0x16851c=>_0x16851c['path'])[_0x114fe3(0xc8)](',\x20');throw new Error(_0x114fe3(0xb9)+_0x510de4[_0x114fe3(0xc8)](',\x20')+_0x114fe3(0xb5)+_0x570777);}const _0x13f5d8=_0x460e1e[_0x114fe3(0xa9)](_0x2fc01f=>_0x24eea2[_0x114fe3(0xc5)](_0x2fc01f));if(_0x13f5d8[_0x114fe3(0xa8)]>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0x13f5d8[_0x114fe3(0xc8)](',\x20'));_0x16058b=_0x460e1e[_0x114fe3(0xa5)](_0x375e0f=>_0x16a1e8[_0x114fe3(0xa3)](_0x375e0f));}else _0x16058b=_0x96c9d5[_0x114fe3(0xa9)](_0x16e7b3=>!_0x24eea2[_0x114fe3(0xc5)](_0x16e7b3[_0x114fe3(0xcd)]));if(_0x16058b['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x5cc7cb[_0x114fe3(0xb0)]===!![],'targetPages':[],'plannedMenus':[]};const _0x474060=_0x16058b[_0x114fe3(0xa5)](_0x1d07f3=>({'type':'procode','path':_0x1d07f3[_0x114fe3(0xcd)],'label':_0x1d07f3[_0x114fe3(0xa7)],'loadScriptMode':_0x114fe3(0xc2),'resources':[..._0x56a119]}));if(_0x5cc7cb['dryRun'])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x16058b,'plannedMenus':_0x474060};const _0x30545c=await createMenus(_0x509550,_0x47eea9,_0x16058b,_0x56a119[_0x114fe3(0xa8)]>0x0?_0x56a119:undefined);return logger[_0x114fe3(0xa4)](_0x114fe3(0xb1),'Menu\x20sync\x20completed',{'count':_0x16058b[_0x114fe3(0xa8)],'resources':_0x56a119}),{'created':_0x30545c[_0x114fe3(0xa8)],'skipped':![],'dryRun':![],'targetPages':_0x16058b,'plannedMenus':_0x474060,'menus':_0x30545c};}function a131_0x360f(_0x4aa126,_0x3dde5b){_0x4aa126=_0x4aa126-0xa1;const _0x2c4ae0=a131_0x2c4a();let _0x360f21=_0x2c4ae0[_0x4aa126];return _0x360f21;}export function parseMenuSyncParams(_0x1154d3){const _0x5f3914=a131_0x4db512;if(!_0x1154d3||typeof _0x1154d3!==_0x5f3914(0xaf))return{};let _0x52e26a;try{_0x52e26a=JSON[_0x5f3914(0xb8)](_0x1154d3);}catch{throw new Error(_0x5f3914(0xb2));}if(typeof _0x52e26a!==_0x5f3914(0xb4)||_0x52e26a===null||Array['isArray'](_0x52e26a))throw new Error(_0x5f3914(0xc4));const _0xffbd85=_0x52e26a;if(Object[_0x5f3914(0xbe)](_0xffbd85,_0x5f3914(0xc9)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0xe9426a=Object[_0x5f3914(0xbb)](_0xffbd85)[_0x5f3914(0xa9)](_0xebe633=>!MENU_SYNC_PARAM_KEYS[_0x5f3914(0xc5)](_0xebe633));if(_0xe9426a[_0x5f3914(0xa8)]>0x0)throw new Error('Invalid\x20--params\x20fields:\x20'+_0xe9426a[_0x5f3914(0xc8)](',\x20')+'.');for(const _0x58ab37 of MENU_SYNC_PARAM_KEYS){const _0x263d5a=_0xffbd85[_0x58ab37];if(_0x263d5a!==undefined&&(typeof _0x263d5a!=='string'||_0x263d5a[_0x5f3914(0xab)]()===''))throw new Error(_0x5f3914(0xa6)+_0x58ab37+_0x5f3914(0xc7));}return{'jsUrl':typeof _0xffbd85[_0x5f3914(0xb3)]===_0x5f3914(0xaf)?_0xffbd85[_0x5f3914(0xb3)][_0x5f3914(0xab)]():undefined,'cssUrl':typeof _0xffbd85[_0x5f3914(0xad)]===_0x5f3914(0xaf)?_0xffbd85[_0x5f3914(0xad)][_0x5f3914(0xab)]():undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x356e4e,_0x1c0636){const _0x453d63=a132_0x2496,_0x4c8299=_0x356e4e();while(!![]){try{const _0x33ad06=-parseInt(_0x453d63(0x96))/0x1*(-parseInt(_0x453d63(0xba))/0x2)+parseInt(_0x453d63(0xad))/0x3+parseInt(_0x453d63(0x9e))/0x4*(parseInt(_0x453d63(0xc1))/0x5)+-parseInt(_0x453d63(0xb3))/0x6+parseInt(_0x453d63(0xb8))/0x7*(-parseInt(_0x453d63(0x90))/0x8)+-parseInt(_0x453d63(0xb4))/0x9+parseInt(_0x453d63(0xbc))/0xa*(-parseInt(_0x453d63(0xbf))/0xb);if(_0x33ad06===_0x1c0636)break;else _0x4c8299['push'](_0x4c8299['shift']());}catch(_0x497e1c){_0x4c8299['push'](_0x4c8299['shift']());}}}(a132_0x49de,0x890de));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(_0x2fec40){const _0xbc3de1=a132_0x2496,_0x50f8cf=[];return _0x2fec40[_0xbc3de1(0xbb)]&&!isValidJsHttpsUrl(_0x2fec40[_0xbc3de1(0xbb)])&&_0x50f8cf[_0xbc3de1(0x91)]({'field':_0xbc3de1(0xbb),'message':_0xbc3de1(0xc5)}),_0x2fec40[_0xbc3de1(0xaf)]&&!isValidCssHttpsUrl(_0x2fec40[_0xbc3de1(0xaf)])&&_0x50f8cf['push']({'field':_0xbc3de1(0xaf),'message':_0xbc3de1(0xa7)}),_0x50f8cf;}export async function runMenuUpdateCore(_0x45f820,_0x5a533b,_0x27d741,_0x345447={}){const _0x5d705c=a132_0x2496,_0x525a1c=parseUpdateParamsFlag(_0x27d741),_0x4e5ee9=normalizeMode(_0x345447['mode']);validateSelection(_0x345447['selection']);const _0x29f401=[];if(_0x525a1c['jsUrl'])_0x29f401[_0x5d705c(0x91)](_0x525a1c[_0x5d705c(0xbb)]);if(_0x525a1c[_0x5d705c(0xaf)])_0x29f401['push'](_0x525a1c[_0x5d705c(0xaf)]);const _0x4ff265=validateParams(_0x525a1c);if(_0x4ff265[_0x5d705c(0xab)]>0x0){const _0x7670bc=_0x4ff265[_0x5d705c(0x88)](_0x55f87e=>'--params.'+_0x55f87e[_0x5d705c(0xc2)]+':\x20'+_0x55f87e[_0x5d705c(0xae)])[_0x5d705c(0x87)](';\x20');throw new Error(_0x5d705c(0x9f)+_0x7670bc);}if(_0x29f401['length']===0x0)throw new Error(_0x5d705c(0xa3)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x5d705c(0xa9)](process['cwd']()),logger['info'](_0x5d705c(0x9d),'Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x45f820,'jsUrl':_0x525a1c[_0x5d705c(0xbb)],'cssUrl':_0x525a1c['cssUrl'],'mode':_0x4e5ee9,'dryRun':_0x345447['dryRun']===!![]});if(_0x525a1c[_0x5d705c(0xbb)]){const _0x3cfdfd=await isUrlReachable(_0x525a1c['jsUrl']);if(!_0x3cfdfd)throw new Error(_0x5d705c(0xc0)+_0x525a1c[_0x5d705c(0xbb)]);}if(_0x525a1c['cssUrl']){const _0x1d5fb0=await isUrlReachable(_0x525a1c['cssUrl']);if(!_0x1d5fb0)throw new Error(_0x5d705c(0x94)+_0x525a1c['cssUrl']);}const _0x2d6af5=await getOnlineMenuList(_0x45f820,_0x5a533b),_0x4dba17=_0x2d6af5[_0x5d705c(0xc7)](_0x221d65=>_0x221d65[_0x5d705c(0xb5)][_0x5d705c(0xab)]>0x0),_0x629aca=selectMenusForUpdate(_0x4dba17,_0x345447[_0x5d705c(0xb9)]);if(_0x629aca['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x345447['dryRun']===!![]};const _0x9d9d1e=_0x629aca[_0x5d705c(0x88)](_0x4d8f2d=>buildMenuUpdateDiff(_0x4d8f2d,_0x525a1c,_0x4e5ee9,_0x345447[_0x5d705c(0xc8)]===!![],_0x345447[_0x5d705c(0x8c)]));if(_0x345447[_0x5d705c(0x98)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x9d9d1e};const _0x567b19=await Promise['allSettled'](_0x629aca['map']((_0x3497c3,_0x53e316)=>updateMenuCdnUrl(_0x45f820,_0x5a533b,{'id':_0x3497c3['id'],'label':_0x3497c3[_0x5d705c(0xbe)],'path':_0x3497c3[_0x5d705c(0xb2)],'resources':_0x9d9d1e[_0x53e316][_0x5d705c(0xa2)][_0x5d705c(0xb5)],'extend':_0x3497c3['extend']??null,'loadScriptMode':_0x345447['loadScriptMode']}))),_0x4cf800=_0x567b19[_0x5d705c(0xc7)](_0x2d7f61=>_0x2d7f61[_0x5d705c(0xac)]==='fulfilled')[_0x5d705c(0x88)](_0x7c0277=>_0x7c0277['value']),_0x5a71ef=_0x567b19[_0x5d705c(0xc7)](_0xd12b67=>_0xd12b67[_0x5d705c(0xac)]===_0x5d705c(0xb7))['length'];return logger[_0x5d705c(0x84)](_0x5d705c(0x9d),_0x5d705c(0xb0),{'count':_0x629aca[_0x5d705c(0xab)],'resources':_0x29f401}),{'updated':_0x4cf800[_0x5d705c(0xab)],'failed':_0x5a71ef,'skipped':![],'menus':_0x4cf800};}function validateSelection(_0x514c86){const _0x412d78=a132_0x2496;if(!_0x514c86)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x514c86[_0x412d78(0xc4)]&&(_0x514c86[_0x412d78(0xa5)]['length']>0x0||_0x514c86['paths'][_0x412d78(0xab)]>0x0))throw new Error(_0x412d78(0x89));if(!_0x514c86[_0x412d78(0xc4)]&&_0x514c86['menuIds'][_0x412d78(0xab)]===0x0&&_0x514c86[_0x412d78(0x8f)][_0x412d78(0xab)]===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}function a132_0x2496(_0x4f46fc,_0x370857){_0x4f46fc=_0x4f46fc-0x84;const _0x49de86=a132_0x49de();let _0x2496f4=_0x49de86[_0x4f46fc];return _0x2496f4;}export function selectMenusForUpdate(_0x11a626,_0x820446){const _0x48f8a7=a132_0x2496;validateSelection(_0x820446);if(_0x820446[_0x48f8a7(0xc4)])return _0x11a626;const _0x3af562=new Set(_0x11a626[_0x48f8a7(0x88)](_0x1d9aa5=>_0x1d9aa5['id'])),_0x48721b=new Set(_0x11a626[_0x48f8a7(0x88)](_0x582b65=>_0x582b65[_0x48f8a7(0xb2)])),_0x4c7a17=_0x820446[_0x48f8a7(0xa5)][_0x48f8a7(0xc7)](_0x4e063e=>!_0x3af562[_0x48f8a7(0xa1)](_0x4e063e)),_0x275454=_0x820446['paths'][_0x48f8a7(0xc7)](_0x55f5c0=>!_0x48721b['has'](_0x55f5c0));if(_0x4c7a17[_0x48f8a7(0xab)]>0x0||_0x275454['length']>0x0){const _0x53baf1=[..._0x4c7a17[_0x48f8a7(0x88)](_0x4a5ddf=>String(_0x4a5ddf)),..._0x275454][_0x48f8a7(0x87)](',\x20');throw new Error(_0x48f8a7(0xa4)+_0x53baf1);}const _0x56edf3=new Set(_0x820446[_0x48f8a7(0xa5)]),_0x35f392=new Set(_0x820446['paths']);return _0x11a626['filter'](_0x5566bd=>_0x56edf3['has'](_0x5566bd['id'])||_0x35f392[_0x48f8a7(0xa1)](_0x5566bd[_0x48f8a7(0xb2)]));}function normalizeMode(_0x5ed497){const _0x532b42=a132_0x2496;if(!_0x5ed497)return'patch';if(_0x5ed497===_0x532b42(0x86)||_0x5ed497===_0x532b42(0x99))return _0x5ed497;throw new Error(_0x532b42(0xaa)+_0x5ed497+_0x532b42(0xa8));}function a132_0x49de(){const _0x3fc20a=['12260IeAFUL','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','label','9658gZLAIx','JS\x20URL\x20is\x20unreachable:\x20','20MRfOdT','field','string','all','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','.css','filter','force','object','info','\x20existing\x20JS\x20resources\x20for\x20\x22','replace','join','map','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','isArray','.js','loadScriptMode','some','endsWith','paths','48wGkzlD','push','\x20existing\x20CSS\x20resources\x20for\x20\x22','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','CSS\x20URL\x20is\x20unreachable:\x20','parse','227EiQIXy','\x22\x20(','dryRun','patch','toLowerCase','menu\x20asset-update\x20cannot\x20patch\x20','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','menu-asset-update','273332Vobczu','Invalid\x20--params:\x20','split','has','after','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','menuIds','trim','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','.\x20Allowed\x20values:\x20replace,\x20patch','setLogPath','Invalid\x20--mode:\x20','length','status','2217897PSOpWO','message','cssUrl','Menu\x20asset\x20update\x20completed','unshift','path','1217376AfSszV','1260198DIzHTL','resources','extend','rejected','1666gRQhQe','selection','8542UERDkO','jsUrl'];a132_0x49de=function(){return _0x3fc20a;};return a132_0x49de();}function buildMenuUpdateDiff(_0x46b726,_0x3c4dd2,_0x3b063c,_0x28f063,_0xd6f9fb){const _0x3dc277=a132_0x2496,_0x2df3d9=[..._0x46b726[_0x3dc277(0xb5)]];_0x3b063c===_0x3dc277(0x99)&&assertUnambiguousPatchResources(_0x46b726,_0x2df3d9,_0x3c4dd2);const _0x5b96e1=_0x3b063c==='patch'?patchResources(_0x2df3d9,_0x3c4dd2):replaceResources(_0x3c4dd2),_0x34f871=[],_0x12482e=_0x2df3d9['some'](isJsResource),_0x39cca8=_0x5b96e1[_0x3dc277(0x8d)](isJsResource);if(_0x12482e&&!_0x39cca8){const _0x288006='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x46b726['label']+_0x3dc277(0x97)+_0x46b726[_0x3dc277(0xb2)]+').\x20'+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x28f063)throw new Error(_0x288006);_0x34f871['push'](_0x288006);}const _0x27eef9=_0x2df3d9['some'](isCssResource),_0xd11074=_0x5b96e1[_0x3dc277(0x8d)](isCssResource);_0x27eef9&&!_0xd11074&&_0x34f871[_0x3dc277(0x91)](_0x3dc277(0x93)+_0x46b726[_0x3dc277(0xbe)]+_0x3dc277(0x97)+_0x46b726[_0x3dc277(0xb2)]+').');const _0x577526=typeof _0x46b726[_0x3dc277(0xb6)]?.[_0x3dc277(0x8c)]===_0x3dc277(0xc3)?_0x46b726['extend'][_0x3dc277(0x8c)]:null,_0x330698=_0xd6f9fb?{'loadScriptMode':_0x577526}:{},_0x58f6ee=_0xd6f9fb?{'loadScriptMode':_0xd6f9fb}:{};return{'id':_0x46b726['id'],'label':_0x46b726['label'],'path':_0x46b726[_0x3dc277(0xb2)],'mode':_0x3b063c,'before':{'resources':_0x2df3d9,..._0x330698},'after':{'resources':_0x5b96e1,..._0x58f6ee},'warnings':_0x34f871};}function replaceResources(_0x32ccf6){const _0x4e6d5e=a132_0x2496;return[_0x32ccf6['jsUrl'],_0x32ccf6[_0x4e6d5e(0xaf)]]['filter'](_0x2198c3=>!!_0x2198c3);}function assertUnambiguousPatchResources(_0x3d1d8b,_0x1cde27,_0x427cbd){const _0x4b66e1=a132_0x2496,_0x1fb101=_0x1cde27[_0x4b66e1(0xc7)](isJsResource)[_0x4b66e1(0xab)];if(_0x427cbd[_0x4b66e1(0xbb)]&&_0x1fb101>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x1fb101+_0x4b66e1(0x85)+_0x3d1d8b[_0x4b66e1(0xbe)]+_0x4b66e1(0x97)+_0x3d1d8b[_0x4b66e1(0xb2)]+')\x20'+_0x4b66e1(0xbd));const _0xa7f814=_0x1cde27[_0x4b66e1(0xc7)](isCssResource)['length'];if(_0x427cbd['cssUrl']&&_0xa7f814>0x1)throw new Error(_0x4b66e1(0x9b)+_0xa7f814+_0x4b66e1(0x92)+_0x3d1d8b['label']+_0x4b66e1(0x97)+_0x3d1d8b[_0x4b66e1(0xb2)]+')\x20'+_0x4b66e1(0x9c));}function patchResources(_0x42c4a6,_0x5576d9){const _0x3b6d64=a132_0x2496;let _0x162d16=![],_0x122499=![];const _0x448441=[];for(const _0x4e0cc9 of _0x42c4a6){if(isJsResource(_0x4e0cc9)){if(_0x5576d9[_0x3b6d64(0xbb)]&&!_0x162d16)_0x448441['push'](_0x5576d9['jsUrl']),_0x162d16=!![];else!_0x5576d9['jsUrl']&&_0x448441[_0x3b6d64(0x91)](_0x4e0cc9);continue;}if(isCssResource(_0x4e0cc9)){if(_0x5576d9[_0x3b6d64(0xaf)]&&!_0x122499)_0x448441[_0x3b6d64(0x91)](_0x5576d9[_0x3b6d64(0xaf)]),_0x122499=!![];else!_0x5576d9[_0x3b6d64(0xaf)]&&_0x448441[_0x3b6d64(0x91)](_0x4e0cc9);continue;}_0x448441[_0x3b6d64(0x91)](_0x4e0cc9);}return _0x5576d9[_0x3b6d64(0xbb)]&&!_0x162d16&&_0x448441[_0x3b6d64(0xb1)](_0x5576d9[_0x3b6d64(0xbb)]),_0x5576d9[_0x3b6d64(0xaf)]&&!_0x122499&&_0x448441[_0x3b6d64(0x91)](_0x5576d9[_0x3b6d64(0xaf)]),_0x448441;}function isJsResource(_0xff5b58){const _0x1056a5=a132_0x2496;return stripQuery(_0xff5b58)[_0x1056a5(0x9a)]()['endsWith'](_0x1056a5(0x8b));}function isCssResource(_0x15b20c){const _0x455867=a132_0x2496;return stripQuery(_0x15b20c)[_0x455867(0x9a)]()[_0x455867(0x8e)](_0x455867(0xc6));}function stripQuery(_0x1369ee){const _0x6b2bf7=a132_0x2496;return _0x1369ee[_0x6b2bf7(0xa0)]('?')[0x0]??_0x1369ee;}function parseUpdateParamsFlag(_0x1639cc){const _0x5bd86b=a132_0x2496;if(!_0x1639cc||typeof _0x1639cc!==_0x5bd86b(0xc3))return{};try{const _0x464967=JSON[_0x5bd86b(0x95)](_0x1639cc);if(typeof _0x464967!==_0x5bd86b(0xc9)||_0x464967===null||Array[_0x5bd86b(0x8a)](_0x464967))return{};return{'jsUrl':typeof _0x464967['jsUrl']===_0x5bd86b(0xc3)?_0x464967[_0x5bd86b(0xbb)][_0x5bd86b(0xa6)]():undefined,'cssUrl':typeof _0x464967[_0x5bd86b(0xaf)]===_0x5bd86b(0xc3)?_0x464967['cssUrl'][_0x5bd86b(0xa6)]():undefined};}catch{return{};}}
|
|
1
|
+
(function(_0x1884e3,_0x2d27b1){const _0x5cf25e=a133_0x155e,_0x331906=_0x1884e3();while(!![]){try{const _0x25d90f=-parseInt(_0x5cf25e(0x128))/0x1+parseInt(_0x5cf25e(0x13b))/0x2*(-parseInt(_0x5cf25e(0x124))/0x3)+parseInt(_0x5cf25e(0x101))/0x4+parseInt(_0x5cf25e(0x13c))/0x5+-parseInt(_0x5cf25e(0xff))/0x6+-parseInt(_0x5cf25e(0x136))/0x7*(-parseInt(_0x5cf25e(0xfd))/0x8)+-parseInt(_0x5cf25e(0x12c))/0x9*(parseInt(_0x5cf25e(0x10f))/0xa);if(_0x25d90f===_0x2d27b1)break;else _0x331906['push'](_0x331906['shift']());}catch(_0x4bd100){_0x331906['push'](_0x331906['shift']());}}}(a133_0x457d,0x46f12));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(_0x528474){const _0x3c4383=a133_0x155e,_0x2998bd=[];return _0x528474[_0x3c4383(0x10d)]&&!isValidJsHttpsUrl(_0x528474[_0x3c4383(0x10d)])&&_0x2998bd[_0x3c4383(0xfb)]({'field':_0x3c4383(0x10d),'message':_0x3c4383(0x135)}),_0x528474[_0x3c4383(0x117)]&&!isValidCssHttpsUrl(_0x528474['cssUrl'])&&_0x2998bd['push']({'field':_0x3c4383(0x117),'message':_0x3c4383(0x100)}),_0x2998bd;}export async function runMenuUpdateCore(_0x30be04,_0x45956f,_0x3bd35b,_0x20e967={}){const _0x334a35=a133_0x155e,_0x23f9e8=parseUpdateParamsFlag(_0x3bd35b),_0xa9699c=normalizeMode(_0x20e967[_0x334a35(0xfe)]);validateSelection(_0x20e967[_0x334a35(0x126)]);const _0x328eb0=[];if(_0x23f9e8[_0x334a35(0x10d)])_0x328eb0[_0x334a35(0xfb)](_0x23f9e8[_0x334a35(0x10d)]);if(_0x23f9e8[_0x334a35(0x117)])_0x328eb0[_0x334a35(0xfb)](_0x23f9e8[_0x334a35(0x117)]);const _0xd4dfad=validateParams(_0x23f9e8);if(_0xd4dfad[_0x334a35(0xfc)]>0x0){const _0x20d5cb=_0xd4dfad['map'](_0x520a8a=>_0x334a35(0x12d)+_0x520a8a['field']+':\x20'+_0x520a8a[_0x334a35(0x12f)])[_0x334a35(0x132)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x20d5cb);}if(_0x328eb0[_0x334a35(0xfc)]===0x0)throw new Error(_0x334a35(0x12b)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger['setLogPath'](process[_0x334a35(0x140)]()),logger[_0x334a35(0x13d)](_0x334a35(0x113),_0x334a35(0x121),{'appCode':_0x30be04,'jsUrl':_0x23f9e8[_0x334a35(0x10d)],'cssUrl':_0x23f9e8[_0x334a35(0x117)],'mode':_0xa9699c,'dryRun':_0x20e967['dryRun']===!![]});if(_0x23f9e8['jsUrl']){const _0x2004cb=await isUrlReachable(_0x23f9e8['jsUrl']);if(!_0x2004cb)throw new Error(_0x334a35(0x108)+_0x23f9e8[_0x334a35(0x10d)]);}if(_0x23f9e8[_0x334a35(0x117)]){const _0x8a42bd=await isUrlReachable(_0x23f9e8['cssUrl']);if(!_0x8a42bd)throw new Error(_0x334a35(0x131)+_0x23f9e8['cssUrl']);}const _0x401b3c=await getOnlineMenuList(_0x30be04,_0x45956f),_0x48af2a=_0x401b3c[_0x334a35(0x109)](_0x10ac5b=>_0x10ac5b[_0x334a35(0x122)]['length']>0x0),_0x4a5783=selectMenusForUpdate(_0x48af2a,_0x20e967[_0x334a35(0x126)]);if(_0x4a5783[_0x334a35(0xfc)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x20e967[_0x334a35(0x116)]===!![]};const _0x5e81a1=_0x4a5783[_0x334a35(0x13a)](_0x50b347=>buildMenuUpdateDiff(_0x50b347,_0x23f9e8,_0xa9699c,_0x20e967[_0x334a35(0x105)]===!![],_0x20e967[_0x334a35(0x12a)]));if(_0x20e967[_0x334a35(0x116)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x5e81a1};const _0x201480=await Promise['allSettled'](_0x4a5783[_0x334a35(0x13a)]((_0x1a19dc,_0x53408c)=>updateMenuCdnUrl(_0x30be04,_0x45956f,{'id':_0x1a19dc['id'],'label':_0x1a19dc['label'],'path':_0x1a19dc['path'],'resources':_0x5e81a1[_0x53408c][_0x334a35(0x102)]['resources'],'extend':_0x1a19dc[_0x334a35(0x141)]??null,'loadScriptMode':_0x20e967[_0x334a35(0x12a)]}))),_0x15b3bd=_0x201480[_0x334a35(0x109)](_0x218fcd=>_0x218fcd[_0x334a35(0x115)]===_0x334a35(0x123))[_0x334a35(0x13a)](_0x466960=>_0x466960[_0x334a35(0x120)]),_0x510734=_0x201480[_0x334a35(0x109)](_0x168127=>_0x168127['status']===_0x334a35(0x10c))[_0x334a35(0xfc)];return logger[_0x334a35(0x13d)]('menu-asset-update',_0x334a35(0x12e),{'count':_0x4a5783[_0x334a35(0xfc)],'resources':_0x328eb0}),{'updated':_0x15b3bd[_0x334a35(0xfc)],'failed':_0x510734,'skipped':![],'menus':_0x15b3bd};}function validateSelection(_0x31305a){const _0x119765=a133_0x155e;if(!_0x31305a)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x31305a[_0x119765(0x11e)]&&(_0x31305a[_0x119765(0x104)][_0x119765(0xfc)]>0x0||_0x31305a['paths'][_0x119765(0xfc)]>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x31305a['all']&&_0x31305a[_0x119765(0x104)][_0x119765(0xfc)]===0x0&&_0x31305a[_0x119765(0x139)][_0x119765(0xfc)]===0x0)throw new Error(_0x119765(0x11a));}function a133_0x457d(){const _0x37df14=['\x20existing\x20CSS\x20resources\x20for\x20\x22','rejected','jsUrl','.\x20Allowed\x20values:\x20replace,\x20patch','12590dyDNuR','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.',').\x20','isArray','menu-asset-update','endsWith','status','dryRun','cssUrl','object','replace','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','unshift','label','trim','all','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','value','Start\x20non-interactive\x20menu\x20asset\x20update','resources','fulfilled','39Brtiug','.js','selection','menu\x20asset-update\x20cannot\x20patch\x20','7188qtNmal','some','loadScriptMode','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','369PIzoff','--params.','Menu\x20asset\x20update\x20completed','message','split','CSS\x20URL\x20is\x20unreachable:\x20','join','\x22\x20(','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','14psUQvV','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','paths','map','6272pewscj','507270IZjMXm','info','patch','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','cwd','extend','parse','string','push','length','277416LCdyew','mode','1343286JBGLDT','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','1772904xljbvI','after','toLowerCase','menuIds','force','path','has','JS\x20URL\x20is\x20unreachable:\x20','filter','\x20existing\x20JS\x20resources\x20for\x20\x22'];a133_0x457d=function(){return _0x37df14;};return a133_0x457d();}export function selectMenusForUpdate(_0x33ff54,_0x3ad012){const _0x5725dd=a133_0x155e;validateSelection(_0x3ad012);if(_0x3ad012[_0x5725dd(0x11e)])return _0x33ff54;const _0x1e3e00=new Set(_0x33ff54[_0x5725dd(0x13a)](_0x3052c7=>_0x3052c7['id'])),_0xbaa554=new Set(_0x33ff54[_0x5725dd(0x13a)](_0x50fc17=>_0x50fc17[_0x5725dd(0x106)])),_0x1eea6f=_0x3ad012[_0x5725dd(0x104)][_0x5725dd(0x109)](_0x532c1a=>!_0x1e3e00['has'](_0x532c1a)),_0x248454=_0x3ad012[_0x5725dd(0x139)][_0x5725dd(0x109)](_0x5e6f09=>!_0xbaa554['has'](_0x5e6f09));if(_0x1eea6f['length']>0x0||_0x248454[_0x5725dd(0xfc)]>0x0){const _0xa5aa87=[..._0x1eea6f[_0x5725dd(0x13a)](_0x42e01d=>String(_0x42e01d)),..._0x248454]['join'](',\x20');throw new Error(_0x5725dd(0x138)+_0xa5aa87);}const _0x3d0b10=new Set(_0x3ad012[_0x5725dd(0x104)]),_0x53b4af=new Set(_0x3ad012[_0x5725dd(0x139)]);return _0x33ff54[_0x5725dd(0x109)](_0x4818c3=>_0x3d0b10[_0x5725dd(0x107)](_0x4818c3['id'])||_0x53b4af[_0x5725dd(0x107)](_0x4818c3[_0x5725dd(0x106)]));}function normalizeMode(_0x161da0){const _0xcccb04=a133_0x155e;if(!_0x161da0)return _0xcccb04(0x13e);if(_0x161da0===_0xcccb04(0x119)||_0x161da0==='patch')return _0x161da0;throw new Error('Invalid\x20--mode:\x20'+_0x161da0+_0xcccb04(0x10e));}function a133_0x155e(_0x320ee6,_0x53c177){_0x320ee6=_0x320ee6-0xfa;const _0x457df7=a133_0x457d();let _0x155e74=_0x457df7[_0x320ee6];return _0x155e74;}function buildMenuUpdateDiff(_0x17e2c5,_0x11c033,_0xaa3691,_0x3c1412,_0x304a3d){const _0x532ffa=a133_0x155e,_0x2518d5=[..._0x17e2c5[_0x532ffa(0x122)]];_0xaa3691===_0x532ffa(0x13e)&&assertUnambiguousPatchResources(_0x17e2c5,_0x2518d5,_0x11c033);const _0x4b5403=_0xaa3691===_0x532ffa(0x13e)?patchResources(_0x2518d5,_0x11c033):replaceResources(_0x11c033),_0x13ad7e=[],_0x5e72c0=_0x2518d5['some'](isJsResource),_0x423a18=_0x4b5403[_0x532ffa(0x129)](isJsResource);if(_0x5e72c0&&!_0x423a18){const _0x3d7dda=_0x532ffa(0x13f)+_0x17e2c5['label']+_0x532ffa(0x133)+_0x17e2c5[_0x532ffa(0x106)]+_0x532ffa(0x111)+_0x532ffa(0x11f);if(!_0x3c1412)throw new Error(_0x3d7dda);_0x13ad7e[_0x532ffa(0xfb)](_0x3d7dda);}const _0x414ca9=_0x2518d5[_0x532ffa(0x129)](isCssResource),_0x5722c9=_0x4b5403[_0x532ffa(0x129)](isCssResource);_0x414ca9&&!_0x5722c9&&_0x13ad7e['push'](_0x532ffa(0x134)+_0x17e2c5['label']+_0x532ffa(0x133)+_0x17e2c5[_0x532ffa(0x106)]+').');const _0x3944c7=typeof _0x17e2c5['extend']?.[_0x532ffa(0x12a)]===_0x532ffa(0xfa)?_0x17e2c5['extend'][_0x532ffa(0x12a)]:null,_0x4f01dd=_0x304a3d?{'loadScriptMode':_0x3944c7}:{},_0x4f8f74=_0x304a3d?{'loadScriptMode':_0x304a3d}:{};return{'id':_0x17e2c5['id'],'label':_0x17e2c5[_0x532ffa(0x11c)],'path':_0x17e2c5[_0x532ffa(0x106)],'mode':_0xaa3691,'before':{'resources':_0x2518d5,..._0x4f01dd},'after':{'resources':_0x4b5403,..._0x4f8f74},'warnings':_0x13ad7e};}function replaceResources(_0x2c058b){const _0x375020=a133_0x155e;return[_0x2c058b['jsUrl'],_0x2c058b['cssUrl']][_0x375020(0x109)](_0x29457e=>!!_0x29457e);}function assertUnambiguousPatchResources(_0x25b995,_0x27943c,_0x438651){const _0x43f8d7=a133_0x155e,_0x312711=_0x27943c['filter'](isJsResource)[_0x43f8d7(0xfc)];if(_0x438651[_0x43f8d7(0x10d)]&&_0x312711>0x1)throw new Error(_0x43f8d7(0x127)+_0x312711+_0x43f8d7(0x10a)+_0x25b995['label']+_0x43f8d7(0x133)+_0x25b995[_0x43f8d7(0x106)]+')\x20'+_0x43f8d7(0x137));const _0x17989a=_0x27943c[_0x43f8d7(0x109)](isCssResource)[_0x43f8d7(0xfc)];if(_0x438651[_0x43f8d7(0x117)]&&_0x17989a>0x1)throw new Error(_0x43f8d7(0x127)+_0x17989a+_0x43f8d7(0x10b)+_0x25b995['label']+_0x43f8d7(0x133)+_0x25b995[_0x43f8d7(0x106)]+')\x20'+_0x43f8d7(0x110));}function patchResources(_0x48e86d,_0x26a763){const _0x596052=a133_0x155e;let _0x106020=![],_0x2e2d3f=![];const _0x158792=[];for(const _0x4efd62 of _0x48e86d){if(isJsResource(_0x4efd62)){if(_0x26a763['jsUrl']&&!_0x106020)_0x158792[_0x596052(0xfb)](_0x26a763[_0x596052(0x10d)]),_0x106020=!![];else!_0x26a763[_0x596052(0x10d)]&&_0x158792[_0x596052(0xfb)](_0x4efd62);continue;}if(isCssResource(_0x4efd62)){if(_0x26a763[_0x596052(0x117)]&&!_0x2e2d3f)_0x158792['push'](_0x26a763[_0x596052(0x117)]),_0x2e2d3f=!![];else!_0x26a763['cssUrl']&&_0x158792[_0x596052(0xfb)](_0x4efd62);continue;}_0x158792[_0x596052(0xfb)](_0x4efd62);}return _0x26a763[_0x596052(0x10d)]&&!_0x106020&&_0x158792[_0x596052(0x11b)](_0x26a763[_0x596052(0x10d)]),_0x26a763['cssUrl']&&!_0x2e2d3f&&_0x158792[_0x596052(0xfb)](_0x26a763['cssUrl']),_0x158792;}function isJsResource(_0x2aa444){const _0x3a7735=a133_0x155e;return stripQuery(_0x2aa444)[_0x3a7735(0x103)]()['endsWith'](_0x3a7735(0x125));}function isCssResource(_0x1e5adc){const _0xcdedf4=a133_0x155e;return stripQuery(_0x1e5adc)[_0xcdedf4(0x103)]()[_0xcdedf4(0x114)]('.css');}function stripQuery(_0x2c8d05){const _0x7c6bdd=a133_0x155e;return _0x2c8d05[_0x7c6bdd(0x130)]('?')[0x0]??_0x2c8d05;}function parseUpdateParamsFlag(_0x38a77e){const _0x15f16c=a133_0x155e;if(!_0x38a77e||typeof _0x38a77e!==_0x15f16c(0xfa))return{};try{const _0x570bc0=JSON[_0x15f16c(0x142)](_0x38a77e);if(typeof _0x570bc0!==_0x15f16c(0x118)||_0x570bc0===null||Array[_0x15f16c(0x112)](_0x570bc0))return{};return{'jsUrl':typeof _0x570bc0[_0x15f16c(0x10d)]==='string'?_0x570bc0['jsUrl']['trim']():undefined,'cssUrl':typeof _0x570bc0[_0x15f16c(0x117)]==='string'?_0x570bc0[_0x15f16c(0x117)][_0x15f16c(0x11d)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a134_0x2807(){const _0x1dbdba=['1136107vEEMaQ','72dZmoUl','8lGCEsy','HEAD','5LIvPvX','trim','test','8768088ZIdFtn','4572672BLjqwa','120sQpgan','4485964BpFzqj','2638FxSHqf','137577OaKdiT','625713XEIdxJ'];a134_0x2807=function(){return _0x1dbdba;};return a134_0x2807();}function a134_0x5478(_0x57c397,_0x2241d4){_0x57c397=_0x57c397-0xf0;const _0x2807f2=a134_0x2807();let _0x54780c=_0x2807f2[_0x57c397];return _0x54780c;}(function(_0x11936e,_0xcc0b9f){const _0x1ffc91=a134_0x5478,_0x9c0873=_0x11936e();while(!![]){try{const _0x3754f7=-parseInt(_0x1ffc91(0xf9))/0x1+-parseInt(_0x1ffc91(0xf7))/0x2*(-parseInt(_0x1ffc91(0xfb))/0x3)+-parseInt(_0x1ffc91(0xf6))/0x4*(-parseInt(_0x1ffc91(0xf0))/0x5)+-parseInt(_0x1ffc91(0xf4))/0x6+-parseInt(_0x1ffc91(0xfa))/0x7*(-parseInt(_0x1ffc91(0xfc))/0x8)+parseInt(_0x1ffc91(0xf3))/0x9+parseInt(_0x1ffc91(0xf5))/0xa*(-parseInt(_0x1ffc91(0xf8))/0xb);if(_0x3754f7===_0xcc0b9f)break;else _0x9c0873['push'](_0x9c0873['shift']());}catch(_0x63d519){_0x9c0873['push'](_0x9c0873['shift']());}}}(a134_0x2807,0xb789b));export function isValidJsHttpsUrl(_0x300aa5){const _0x507e74=a134_0x5478;return/^https:\/\/.+\.js(\?.*)?$/[_0x507e74(0xf2)](_0x300aa5[_0x507e74(0xf1)]());}export function isValidCssHttpsUrl(_0x5f01d7){const _0x3328a6=a134_0x5478;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x5f01d7[_0x3328a6(0xf1)]());}export async function isUrlReachable(_0x264bed){const _0x5a272d=a134_0x5478;try{const _0x39189e=await fetch(_0x264bed,{'method':_0x5a272d(0xfd)});return _0x39189e['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a135_0x3223c1=a135_0x2c78;(function(_0x37a799,_0x507e9c){const _0x334650=a135_0x2c78,_0x2b6545=_0x37a799();while(!![]){try{const _0x2c7109=-parseInt(_0x334650(0x1cd))/0x1*(parseInt(_0x334650(0x210))/0x2)+parseInt(_0x334650(0x1ef))/0x3*(-parseInt(_0x334650(0x1ca))/0x4)+parseInt(_0x334650(0x1d2))/0x5*(-parseInt(_0x334650(0x1cb))/0x6)+-parseInt(_0x334650(0x204))/0x7*(-parseInt(_0x334650(0x1ec))/0x8)+parseInt(_0x334650(0x20e))/0x9+-parseInt(_0x334650(0x1d6))/0xa+parseInt(_0x334650(0x1ce))/0xb*(parseInt(_0x334650(0x20f))/0xc);if(_0x2c7109===_0x507e9c)break;else _0x2b6545['push'](_0x2b6545['shift']());}catch(_0xbabb1d){_0x2b6545['push'](_0x2b6545['shift']());}}}(a135_0x4fa0,0x1ef10));import a135_0x1b3148 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';function a135_0x2c78(_0x173902,_0x5a41b4){_0x173902=_0x173902-0x1c9;const _0x4fa068=a135_0x4fa0();let _0x2c780c=_0x4fa068[_0x173902];return _0x2c780c;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':a135_0x3223c1(0x1ee),'description':a135_0x3223c1(0x1eb),'risk':'write','flags':[{'name':a135_0x3223c1(0x20b),'type':a135_0x3223c1(0x1f5),'description':a135_0x3223c1(0x1f1)+a135_0x3223c1(0x1d9)},{'name':a135_0x3223c1(0x1fb),'type':a135_0x3223c1(0x1f5),'description':a135_0x3223c1(0x1e0)},{'name':a135_0x3223c1(0x1e5),'type':a135_0x3223c1(0x1c9),'description':a135_0x3223c1(0x1cf)}],async 'dryRun'(_0x4ef47f){const _0x168d3d=a135_0x3223c1;ensureRunnableContext(_0x4ef47f[_0x168d3d(0x203)],_0x4ef47f[_0x168d3d(0x1de)]);const _0x50aa6b=await runMenuSyncCore(_0x4ef47f[_0x168d3d(0x205)],_0x4ef47f[_0x168d3d(0x1ff)],parsePaths(_0x4ef47f[_0x168d3d(0x202)](_0x168d3d(0x1fb))),_0x4ef47f[_0x168d3d(0x202)]('params'),{'dryRun':!![]});return{'method':_0x168d3d(0x1f4),'url':_0x168d3d(0x1e3),'body':_0x50aa6b,'description':_0x50aa6b[_0x168d3d(0x1f2)]?_0x168d3d(0x1ed):_0x168d3d(0x1e9)+_0x50aa6b['targetPages']['length']+_0x168d3d(0x1e6)};},async 'execute'(_0x1f94f5){const _0x412512=a135_0x3223c1;ensureRunnableContext(_0x1f94f5[_0x412512(0x203)],_0x1f94f5['selectedAppName']);const _0x41b423=_0x1f94f5[_0x412512(0x1e8)](_0x412512(0x1e5)),_0x296e35=_0x1f94f5['str']('params'),_0x3be105=parsePaths(_0x1f94f5['str'](_0x412512(0x1fb))),_0x36835a=parseMenuSyncParams(_0x296e35);if(_0x41b423){const _0x3dec7e=await runMenuSyncCore(_0x1f94f5['appCode'],_0x1f94f5[_0x412512(0x1ff)],_0x3be105,_0x296e35);if(_0x3dec7e[_0x412512(0x1f2)]){const _0xc76dbe=getLocalPages();_0xc76dbe['length']===0x0?writeCliSideChannelLine(_0x412512(0x1f8)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x3dec7e[_0x412512(0x1f3)]+_0x412512(0x1fc));return{'ok':!![],'data':_0x3dec7e,'message':_0x3dec7e[_0x412512(0x1f2)]?_0x412512(0x1cc):_0x412512(0x201)+_0x3dec7e[_0x412512(0x1f3)]+_0x412512(0x1e2)};}if(_0x3be105[_0x412512(0x212)]>0x0)throw CliErrors[_0x412512(0x1f6)](_0x412512(0x20a),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x296e35)throw CliErrors[_0x412512(0x1f6)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');requireInteractive();const _0x27a863=startSpinner(_0x412512(0x1e1));let _0x13b937,_0x3846e2,_0x59d85b;try{const _0x2a8fb2=await fetchMenuData(_0x1f94f5[_0x412512(0x205)],_0x1f94f5[_0x412512(0x1ff)]);_0x13b937=_0x2a8fb2['localPages'],_0x3846e2=_0x2a8fb2[_0x412512(0x1d5)],_0x59d85b=_0x2a8fb2[_0x412512(0x1d0)],stopSpinner(_0x27a863,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x561e4e){stopSpinner(_0x27a863,_0x412512(0x1f0),![]);throw CliErrors[_0x412512(0x1f6)](_0x561e4e instanceof Error?_0x561e4e[_0x412512(0x1fe)]:_0x412512(0x1f0));}if(_0x13b937[_0x412512(0x212)]===0x0)return writeCliSideChannelLine(a135_0x1b3148['yellow'](_0x412512(0x1ea))),{'ok':!![]};const _0x291be9=buildCompareRows(_0x13b937,_0x3846e2);writeCliSideChannelLine(renderCompareTable(_0x291be9)),writeCliSideChannelLine('');const _0x55829b=await selectPages(_0x13b937,_0x3846e2);writeCliSideChannelLine(''),writeCliSideChannelLine(a135_0x1b3148[_0x412512(0x1d1)](_0x412512(0x20d)+_0x55829b[_0x412512(0x212)]+_0x412512(0x1e4)));const _0x3dc14f=_0x36835a['jsUrl']&&_0x36835a[_0x412512(0x1dc)];if(!_0x3dc14f){writeCliSideChannelLine(renderSyncSummary(_0x55829b,_0x3846e2[_0x412512(0x1db)]>0x0));const _0x4b1c5d=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x4b1c5d)return writeCliSideChannelLine(a135_0x1b3148[_0x412512(0x200)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x4413ce=_0x36835a[_0x412512(0x211)],_0x2fc3d9=_0x36835a['cssUrl'];!_0x4413ce&&(_0x4413ce=await askJsUrl());!_0x2fc3d9&&(_0x2fc3d9=await askCssUrl());const _0x240925=await askConfirm('\x20\x20Create\x20'+_0x55829b[_0x412512(0x212)]+_0x412512(0x1da)+_0x4413ce+_0x412512(0x1df)+_0x2fc3d9+'?');if(!_0x240925)return writeCliSideChannelLine(a135_0x1b3148[_0x412512(0x200)](_0x412512(0x1d3))),{'ok':!![]};const _0x3603ab=[_0x4413ce,_0x2fc3d9],_0x4adedf=startSpinner(_0x412512(0x209)+_0x55829b['length']+_0x412512(0x1dd));try{const _0x2d1531=await doCreateMenus(_0x1f94f5[_0x412512(0x205)],_0x1f94f5[_0x412512(0x1ff)],_0x55829b,_0x3603ab);return stopSpinner(_0x4adedf,_0x412512(0x1d7)+_0x2d1531[_0x412512(0x1f3)]+'\x20menu(s)',!![]),{'ok':!![],'data':_0x2d1531,'message':'Menu\x20sync\x20completed:\x20'+_0x2d1531[_0x412512(0x1f3)]+_0x412512(0x1fa)+_0x2d1531[_0x412512(0x1e7)]+_0x412512(0x1d8)};}catch(_0x1b9f5f){stopSpinner(_0x4adedf,_0x412512(0x1f7),![]);throw CliErrors['validation'](_0x1b9f5f instanceof Error?_0x1b9f5f[_0x412512(0x1fe)]:'Menu\x20creation\x20failed');}}};function a135_0x4fa0(){const _0x274084=['string','validation','Menu\x20creation\x20failed','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','split','\x20created,\x20','paths','\x20menu(s)\x20created','filter','message','cookie','gray','Menu\x20sync\x20completed:\x20','str','rawFlags','56URmCtC','appCode','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','trim','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','Creating\x20','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','params','appcode','\x20\x20✓\x20Selected:\x20','900045TjQylJ','912708gbHFRC','1836dlJExK','jsUrl','length','boolean','160wsqVlr','978RxJcLV','Menu\x20sync\x20skipped','27ndQpBR','44qAkkwQ','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','onlineMenuList','cyan','6135tMAcmC','\x20\x20Cancelled.','map','onlinePaths','206700oRzBsC','Created\x20','\x20failed.','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20menu(s)\x20with\x20JS:\x20','size','cssUrl','\x20menu(s)...','selectedAppName','\x20and\x20CSS:\x20','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Fetching\x20online\x20menu\x20list...','\x20created.','/smartapi/menu/create','\x20page(s)','yes','\x20local\x20microfrontend\x20menu(s).','failed','flag','Would\x20create\x20','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','Sync\x20local\x20pages\x20as\x20platform\x20menus','66472PqtxOv','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','sync','7389LFCLjO','Failed\x20to\x20fetch\x20online\x20menu\x20list','Pre-fill\x20JS/CSS\x20URLs.\x20','skipped','created','POST'];a135_0x4fa0=function(){return _0x274084;};return a135_0x4fa0();}function ensureRunnableContext(_0x4bc0de,_0x447926){const _0x5305f8=a135_0x3223c1,_0x17b402=_0x4bc0de[_0x5305f8(0x20c)]?String(_0x4bc0de[_0x5305f8(0x20c)])[_0x5305f8(0x207)]():'';if(!isInProject()&&!_0x447926&&!_0x17b402)throw CliErrors[_0x5305f8(0x1f6)](_0x5305f8(0x206)+_0x5305f8(0x208));}function parsePaths(_0x42edfa){const _0x5807b4=a135_0x3223c1;return[...new Set(_0x42edfa[_0x5807b4(0x1f9)](',')[_0x5807b4(0x1d4)](_0x3bea13=>_0x3bea13[_0x5807b4(0x207)]())[_0x5807b4(0x1fd)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a135_0x2120ce=a135_0x4a9f;(function(_0x3494a0,_0xb94942){const _0x58fe6b=a135_0x4a9f,_0xb38a5f=_0x3494a0();while(!![]){try{const _0x2c8f94=parseInt(_0x58fe6b(0x135))/0x1*(parseInt(_0x58fe6b(0x13a))/0x2)+-parseInt(_0x58fe6b(0x107))/0x3*(-parseInt(_0x58fe6b(0x112))/0x4)+-parseInt(_0x58fe6b(0x110))/0x5+parseInt(_0x58fe6b(0x136))/0x6*(parseInt(_0x58fe6b(0x144))/0x7)+parseInt(_0x58fe6b(0x11d))/0x8*(-parseInt(_0x58fe6b(0x165))/0x9)+-parseInt(_0x58fe6b(0x11f))/0xa+parseInt(_0x58fe6b(0x155))/0xb*(-parseInt(_0x58fe6b(0x106))/0xc);if(_0x2c8f94===_0xb94942)break;else _0xb38a5f['push'](_0xb38a5f['shift']());}catch(_0x1545de){_0xb38a5f['push'](_0xb38a5f['shift']());}}}(a135_0x1773,0x7a936));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':a135_0x2120ce(0x105),'path':a135_0x2120ce(0x139)}];export const menuVisibilityUpdate={'service':'menu','command':a135_0x2120ce(0x120),'description':a135_0x2120ce(0xfb),'risk':a135_0x2120ce(0x14f),'structuredErrors':!![],'flags':[{'name':a135_0x2120ce(0x130),'type':a135_0x2120ce(0x14c),'description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':a135_0x2120ce(0x127),'type':a135_0x2120ce(0x14c),'description':a135_0x2120ce(0x16e)},{'name':a135_0x2120ce(0x13d),'type':'boolean','required':!![],'description':a135_0x2120ce(0x154)},{'name':a135_0x2120ce(0x150),'type':a135_0x2120ce(0x125),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':'expected-count','type':a135_0x2120ce(0x174),'description':a135_0x2120ce(0x163)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1bde33){parseInput(_0x1bde33),requireExplicitYes(_0x1bde33);},async 'dryRun'(_0x2ea41f){const _0x4b70d6=a135_0x2120ce,_0x5c296d=await buildPlan(_0x2ea41f,!![]),_0x574b2f=_0x5c296d['plan'][_0x4b70d6(0x15f)]?.[_0x4b70d6(0x160)]??0x0,_0x41c15e=_0x5c296d['plan'][_0x4b70d6(0x151)][_0x4b70d6(0x160)]-_0x574b2f;return menuDryRunResult(_0x5c296d[_0x4b70d6(0x149)],{'method':_0x4b70d6(0x105),'url':_0x4b70d6(0x139),'body':{'updates':_0x5c296d[_0x4b70d6(0x149)][_0x4b70d6(0x15f)]?.[_0x4b70d6(0x158)](_0x2516bd=>_0x2516bd[_0x4b70d6(0x159)])??[]},'description':_0x4b70d6(0x15d)+_0x574b2f+_0x4b70d6(0x12d)+_0x41c15e+_0x4b70d6(0x103)});},async 'execute'(_0x7a7cee){const _0x1f6607=a135_0x2120ce;requireExplicitYes(_0x7a7cee);const _0x3c412f=await buildPlan(_0x7a7cee,![]);await recheckMutationSnapshot(_0x7a7cee,_0x3c412f['plan'],'update\x20menu\x20visibility');const _0x23330b=[],_0x57d6c3=[],_0x2aff0d=[];for(const _0x5ebc15 of _0x3c412f['plan'][_0x1f6607(0x151)]){if(_0x5ebc15['before']['visible']===_0x3c412f[_0x1f6607(0x149)][_0x1f6607(0x13f)]){_0x23330b['push']({'id':_0x5ebc15['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x7a7cee[_0x1f6607(0x11c)],_0x7a7cee[_0x1f6607(0x13c)],{'id':_0x5ebc15['id'],'visible':_0x3c412f[_0x1f6607(0x149)][_0x1f6607(0x13f)]}),_0x23330b[_0x1f6607(0x102)]({'id':_0x5ebc15['id'],'updated':!![],'skipped':![]});}catch(_0x484cf4){const _0x5bfab9=mapMenuApiError(_0x484cf4,_0x1f6607(0x13e),_0x5ebc15['id']);if(isMenuResponseLoss(_0x484cf4)&&_0x5bfab9[_0x1f6607(0x161)]!==_0x1f6607(0x10d)){_0x2aff0d['push'](_0x5ebc15['id']);continue;}_0x57d6c3[_0x1f6607(0x102)]({'id':_0x5ebc15['id'],'stage':_0x1f6607(0x138),'code':_0x5bfab9[_0x1f6607(0x161)],'message':_0x5bfab9['message']});}}let _0x5ad2a6;try{_0x5ad2a6=await fetchMenuSnapshot(_0x7a7cee['appCode'],_0x7a7cee[_0x1f6607(0x13c)]);}catch(_0x4cf1bd){const _0x528100=describeMenuErrorCause(_0x4cf1bd,'verify\x20menu\x20visibility\x20update'),_0x387847=_0x2aff0d[_0x1f6607(0x158)](_0x96ea99=>({'id':_0x96ea99,'stage':'update-recovery','code':_0x1f6607(0x10b),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x96ea99+_0x1f6607(0x118),'requestedStateConfirmed':![],'recovered':![]})),_0x489983={'stage':'verification','code':_0x1f6607(0x10b),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x3c412f['plan']['targets'][_0x1f6607(0x158)](_0xb44ffc=>_0xb44ffc['id']),'requestedStateConfirmed':![],..._0x528100};throw menuFailure(asVerificationError(_0x4cf1bd,_0x1f6607(0x12b)),_0x3c412f['plan'],{'stage':_0x1f6607(0x146),'succeeded':_0x23330b,'failedRecords':[..._0x57d6c3,..._0x387847,_0x489983],'warnings':[_0x1f6607(0xf7)],'verification':{'status':_0x1f6607(0x108),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x1dc741=[];for(const _0x345c8a of _0x23330b){const _0x36946e=Number(_0x345c8a['id']),_0xb7c010=_0x3c412f[_0x1f6607(0x12a)]['get'](_0x36946e),_0x1624d8=_0x5ad2a6[_0x1f6607(0x15e)][_0x1f6607(0x15c)](_0x36946e);try{verifyVisibilityUpdate(_0xb7c010,_0x1624d8,_0x3c412f[_0x1f6607(0x149)][_0x1f6607(0x13f)]);}catch(_0x5a87c6){const _0x4f990e=asVerificationError(_0x5a87c6,'Menu\x20'+_0x36946e+_0x1f6607(0x117));_0x1dc741[_0x1f6607(0x102)]({'id':_0x36946e,'stage':_0x1f6607(0x146),'code':_0x4f990e[_0x1f6607(0x161)],'message':_0x4f990e[_0x1f6607(0x121)],'requestedStateConfirmed':![]});}}for(const _0x59bc25 of _0x2aff0d){const _0x5cec4f=_0x3c412f[_0x1f6607(0x12a)][_0x1f6607(0x15c)](_0x59bc25),_0x297572=_0x5ad2a6[_0x1f6607(0x15e)]['get'](_0x59bc25);try{verifyVisibilityUpdate(_0x5cec4f,_0x297572,_0x3c412f['plan'][_0x1f6607(0x13f)]),_0x23330b[_0x1f6607(0x102)]({'id':_0x59bc25,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x36a74a){const _0x5a0dd7=asVerificationError(_0x36a74a,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x59bc25+_0x1f6607(0x169));_0x1dc741[_0x1f6607(0x102)]({'id':_0x59bc25,'stage':_0x1f6607(0x12c),'code':_0x5a0dd7['code'],'message':_0x5a0dd7['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x1dc741[_0x1f6607(0x160)]>0x0){const _0x139839=_0x1dc741[_0x1f6607(0x158)](_0x5304ce=>Number(_0x5304ce['id'])),_0x5d2a82=_0x23330b['filter'](_0x205593=>_0x205593[_0x1f6607(0x126)]===!![])['length'],_0x37638e=menuError(_0x1f6607(0x10b),_0x1f6607(0x16d)+_0x139839[_0x1f6607(0x15a)](',\x20')+'.',_0x1f6607(0x16b));throw menuFailure(_0x37638e,_0x3c412f['plan'],{'stage':_0x1f6607(0x146),'succeeded':_0x23330b,'failedRecords':[..._0x57d6c3,..._0x1dc741],'warnings':[_0x1f6607(0x166)],'verification':{'status':'failed',..._0x139839['length']===0x1?{'targetId':_0x139839[0x0]}:{'targetIds':_0x139839},'recoveredCount':_0x5d2a82,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x3242eb=_0x23330b[_0x1f6607(0x10a)](_0x555403=>_0x555403[_0x1f6607(0x148)]===!![])[_0x1f6607(0x160)],_0x22ae05=_0x23330b[_0x1f6607(0x160)]-_0x3242eb,_0x176705={..._0x3c412f[_0x1f6607(0x149)],'succeeded':_0x23330b,'failed':_0x57d6c3,'warnings':_0x57d6c3['length']>0x0?[..._0x3c412f['plan'][_0x1f6607(0x162)],_0x1f6607(0x14d)]:_0x3c412f[_0x1f6607(0x149)][_0x1f6607(0x162)],'verification':{'checkedBy':_0x1f6607(0x16a),'snapshotHash':_0x5ad2a6[_0x1f6607(0x175)],'matchesRequestedState':_0x57d6c3[_0x1f6607(0x160)]===0x0,'recoveredCount':_0x2aff0d['length']}};return{'ok':_0x57d6c3[_0x1f6607(0x160)]===0x0,'data':_0x176705,'message':_0x57d6c3[_0x1f6607(0x160)]===0x0?'Updated\x20visibility\x20for\x20'+_0x3242eb+_0x1f6607(0x13b)+_0x22ae05+_0x1f6607(0x103):_0x1f6607(0x147)+_0x3242eb+_0x1f6607(0x153)+_0x22ae05+_0x1f6607(0xff)+_0x57d6c3['length']+_0x1f6607(0x131)};}};function parseInput(_0x1f5652){const _0x50c767=a135_0x2120ce,_0x1cefd0=parseMenuIds(_0x1f5652[_0x50c767(0x176)](_0x50c767(0x130))),_0x2b0dc5=parseCsv(_0x1f5652['str']('paths'));if(_0x1cefd0[_0x50c767(0x160)]===0x0&&_0x2b0dc5['length']===0x0)throw CliErrors[_0x50c767(0x11b)](_0x50c767(0x145));const _0x49a121=parseBooleanFlag(_0x1f5652,'visible',!![]),_0x1fddd8=parseBooleanFlag(_0x1f5652,'expect-visible',![]);let _0x3b5c7c;if(hasFlag(_0x1f5652,_0x50c767(0x113))){_0x3b5c7c=_0x1f5652[_0x50c767(0x109)](_0x50c767(0x113));if(!Number[_0x50c767(0x142)](_0x3b5c7c)||_0x3b5c7c<0x0)throw CliErrors[_0x50c767(0x11b)](_0x50c767(0x128));}return{'menuIds':_0x1cefd0,'paths':_0x2b0dc5,'visible':_0x49a121,'expectVisible':_0x1fddd8,'expectedCount':_0x3b5c7c};}async function buildPlan(_0x480bfb,_0x442477){const _0x4f5cd7=a135_0x2120ce,_0x53c9c6=parseInput(_0x480bfb),_0x306a38=await fetchMutationSnapshot(_0x480bfb,_0x4f5cd7(0x12e)),_0x364b23=selectTargets(_0x306a38[_0x4f5cd7(0xf9)],_0x53c9c6[_0x4f5cd7(0x10c)],_0x53c9c6[_0x4f5cd7(0x127)]);if(_0x53c9c6[_0x4f5cd7(0xfc)]!==undefined&&_0x364b23[_0x4f5cd7(0x160)]!==_0x53c9c6[_0x4f5cd7(0xfc)])throw menuError(_0x4f5cd7(0x14a),_0x4f5cd7(0x171)+_0x364b23[_0x4f5cd7(0x160)]+_0x4f5cd7(0x11a)+_0x53c9c6['expectedCount']+'.',_0x4f5cd7(0x172));if(_0x53c9c6[_0x4f5cd7(0x137)]!==undefined){const _0x599cd9=_0x364b23['filter'](_0x222285=>_0x222285['visible']!==_0x53c9c6[_0x4f5cd7(0x137)]);if(_0x599cd9[_0x4f5cd7(0x160)]>0x0)throw menuError('menu_state_drift',_0x4f5cd7(0x164)+_0x599cd9[_0x4f5cd7(0x158)](_0x26d650=>_0x26d650['id'])[_0x4f5cd7(0x15a)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x437260=_0x364b23['map'](_0x3ebf55=>({'id':_0x3ebf55['id'],'label':_0x3ebf55[_0x4f5cd7(0xfe)],'path':_0x3ebf55[_0x4f5cd7(0x14e)],'before':{'visible':_0x3ebf55[_0x4f5cd7(0x13d)]},'after':{'visible':_0x53c9c6[_0x4f5cd7(0x13d)]}})),_0x2e4b10=_0x437260[_0x4f5cd7(0x10a)](_0x99451c=>_0x99451c['before']['visible']!==_0x53c9c6['visible'])[_0x4f5cd7(0x158)](_0x16370f=>({'stage':'update-menu-visibility','method':_0x4f5cd7(0x105),'path':_0x4f5cd7(0x139),'body':{'appCode':_0x480bfb[_0x4f5cd7(0x11c)],'id':_0x16370f['id'],'visible':_0x53c9c6['visible']}})),_0x28f023=mutationResult({'operation':_0x4f5cd7(0x120),'selector':{'menuIds':_0x53c9c6['menuIds'],'paths':_0x53c9c6[_0x4f5cd7(0x127)]},'before':{'menus':_0x364b23[_0x4f5cd7(0x158)](_0xcd5f2f=>({'id':_0xcd5f2f['id'],'path':_0xcd5f2f[_0x4f5cd7(0x14e)],'visible':_0xcd5f2f['visible']}))},'after':{'menus':_0x364b23[_0x4f5cd7(0x158)](_0x365bd3=>({'id':_0x365bd3['id'],'path':_0x365bd3[_0x4f5cd7(0x14e)],'visible':_0x53c9c6[_0x4f5cd7(0x13d)]}))},'dryRun':_0x442477,'backend':[...BACKEND],'plannedActions':_0x2e4b10,'snapshotHash':_0x306a38[_0x4f5cd7(0x175)],'warnings':_0x2e4b10[_0x4f5cd7(0x160)]===0x0?[_0x4f5cd7(0xf8)]:[]});return{'plan':{..._0x28f023,'requestedVisible':_0x53c9c6['visible'],'targets':_0x437260},'beforeById':new Map(_0x364b23[_0x4f5cd7(0x158)](_0x3e7db=>[_0x3e7db['id'],_0x3e7db]))};}function selectTargets(_0x566c13,_0x1ef52d,_0x3a05a4){const _0x4942f2=a135_0x2120ce,_0x10525b=new Map(_0x566c13['map'](_0x1dd37e=>[_0x1dd37e['id'],_0x1dd37e])),_0x340924=new Map(),_0x117602=_0x1ef52d[_0x4942f2(0x10a)](_0x3f7755=>!_0x10525b[_0x4942f2(0x115)](_0x3f7755));if(_0x117602[_0x4942f2(0x160)]>0x0)throw menuError('menu_selector_not_found',_0x4942f2(0x10e)+_0x117602[_0x4942f2(0x15a)](',\x20')+'.',_0x4942f2(0x129));for(const _0x273fb3 of _0x1ef52d){_0x340924[_0x4942f2(0x168)](_0x273fb3,_0x10525b[_0x4942f2(0x15c)](_0x273fb3));}for(const _0xb56f5a of _0x3a05a4){const _0x27063a=_0x566c13[_0x4942f2(0x10a)](_0x30cc8f=>_0x30cc8f['path']===_0xb56f5a);if(_0x27063a[_0x4942f2(0x160)]===0x0)throw menuError(_0x4942f2(0x100),_0x4942f2(0x134)+JSON[_0x4942f2(0x116)](_0xb56f5a)+'.',_0x4942f2(0x124));if(_0x27063a[_0x4942f2(0x160)]>0x1)throw menuError('menu_selector_ambiguous','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x4942f2(0x116)](_0xb56f5a)+'.',_0x4942f2(0x173)+_0x27063a[_0x4942f2(0x158)](_0x476c4d=>_0x476c4d['id'])['join'](',\x20')+'.');const _0x2f6e14=_0x27063a[0x0];_0x340924['set'](_0x2f6e14['id'],_0x2f6e14);}return[..._0x340924[_0x4942f2(0x140)]()];}function a135_0x1773(){const _0x1bf69d=['update\x20menu\x20visibility','sort','menu-ids','\x20failed.','rawFlags','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','Menu\x20path\x20selector\x20not\x20found:\x20','100052QQzrGV','6rzvmRD','expectVisible','update','/smartapi/menu/update','14HSxhVI','\x20menu(s);\x20skipped\x20','cookie','visible','update\x20visibility\x20for','requestedVisible','values','resources','isSafeInteger','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','168497DhHqBw','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','verification','Menu\x20visibility\x20update\x20completed:\x20','updated','plan','menu_expected_count_mismatch','datasetCode','string','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','path','high-risk-write','expect-visible','targets','false','\x20updated,\x20','Requested\x20menu\x20visibility','49258aAxEPD','type','Menu\x20','map','body','join','flagMissing','get','Would\x20update\x20visibility\x20for\x20','byId','plannedActions','length','code','warnings','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','18UGgNsQ','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','resourcesValid','set','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','menu\x20list','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','pageId','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','true','childrenCount','Selected\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','number','hash','str','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','menus','datasetId','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','expectedCount','url','label','\x20skipped,\x20','menu_selector_not_found','depth','push','\x20unchanged\x20menu(s).','trim','POST','2640BzgcSJ','709377EIdtGh','failed','num','filter','menu_verification_failed','menuIds','menu_permission_denied','Menu\x20id\x20selector(s)\x20not\x20found:\x20','parentId','754115KElkTS','split','16OYdkZt','expected-count','pageType','has','stringify','\x20visibility\x20update\x20could\x20not\x20be\x20verified','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','childrenIds','\x20menu(s),\x20expected\x20','validation','appCode','38576zjWBfR','\x20changed\x20unexpectedly.','225740tsAZAP','visibility-update','message','\x20must\x20be\x20true\x20or\x20false.','isArray','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','boolean','recovered','paths','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','beforeById','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','update-recovery','\x20menu(s);\x20skip\x20'];a135_0x1773=function(){return _0x1bf69d;};return a135_0x1773();}function parseMenuIds(_0xa793e){const _0x3a3cb8=a135_0x2120ce,_0x5d8e69=parseCsv(_0xa793e),_0x3e438b=_0x5d8e69[_0x3a3cb8(0x158)](Number);if(_0x3e438b['some'](_0x5abe1a=>!Number[_0x3a3cb8(0x142)](_0x5abe1a)||_0x5abe1a<=0x0))throw CliErrors[_0x3a3cb8(0x11b)](_0x3a3cb8(0x143));return[...new Set(_0x3e438b)];}function parseCsv(_0x4d5b81){const _0x32ed0b=a135_0x2120ce;return[...new Set(_0x4d5b81[_0x32ed0b(0x111)](',')['map'](_0xbb7813=>_0xbb7813[_0x32ed0b(0x104)]())[_0x32ed0b(0x10a)](Boolean))];}function a135_0x4a9f(_0x3df24e,_0x4fe8c7){_0x3df24e=_0x3df24e-0xf7;const _0x17730d=a135_0x1773();let _0x4a9f18=_0x17730d[_0x3df24e];return _0x4a9f18;}function parseBooleanFlag(_0x46ea6c,_0x521d53,_0x4b606f){const _0x571691=a135_0x2120ce;if(!hasFlag(_0x46ea6c,_0x521d53)){if(_0x4b606f)throw CliErrors[_0x571691(0x15b)](_0x521d53);return undefined;}const _0x2bd071=_0x46ea6c[_0x571691(0x132)][_0x521d53];if(_0x2bd071===!![]||_0x2bd071===![])return _0x2bd071;if(_0x2bd071===_0x571691(0x16f))return!![];if(_0x2bd071===_0x571691(0x152))return![];throw CliErrors[_0x571691(0x11b)]('--'+_0x521d53+_0x571691(0x122));}function verifyVisibilityUpdate(_0xffa525,_0x392e23,_0x5ec446){const _0x2b3cc5=a135_0x2120ce;assertVerified(!!_0x392e23,_0x2b3cc5(0x157)+_0xffa525['id']+_0x2b3cc5(0x133)),assertVerified(_0x392e23[_0x2b3cc5(0x13d)]===_0x5ec446,_0x2b3cc5(0x157)+_0xffa525['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x5c733b=[['id',_0x392e23['id'],_0xffa525['id']],[_0x2b3cc5(0x10f),_0x392e23[_0x2b3cc5(0x10f)],_0xffa525[_0x2b3cc5(0x10f)]],[_0x2b3cc5(0x101),_0x392e23[_0x2b3cc5(0x101)],_0xffa525['depth']],[_0x2b3cc5(0xfe),_0x392e23[_0x2b3cc5(0xfe)],_0xffa525[_0x2b3cc5(0xfe)]],[_0x2b3cc5(0x14e),_0x392e23['path'],_0xffa525[_0x2b3cc5(0x14e)]],['url',_0x392e23['url'],_0xffa525[_0x2b3cc5(0xfd)]],[_0x2b3cc5(0x156),_0x392e23[_0x2b3cc5(0x156)],_0xffa525[_0x2b3cc5(0x156)]],[_0x2b3cc5(0x12f),_0x392e23[_0x2b3cc5(0x12f)],_0xffa525[_0x2b3cc5(0x12f)]],['resources',_0x392e23[_0x2b3cc5(0x141)],_0xffa525[_0x2b3cc5(0x141)]],['resourcesValid',_0x392e23[_0x2b3cc5(0x167)],_0xffa525[_0x2b3cc5(0x167)]],[_0x2b3cc5(0x119),_0x392e23[_0x2b3cc5(0x119)],_0xffa525[_0x2b3cc5(0x119)]],[_0x2b3cc5(0x170),_0x392e23['childrenCount'],_0xffa525['childrenCount']],[_0x2b3cc5(0x16c),_0x392e23['pageId'],_0xffa525['pageId']],[_0x2b3cc5(0x114),_0x392e23['pageType'],_0xffa525[_0x2b3cc5(0x114)]],['modelType',_0x392e23['modelType'],_0xffa525['modelType']],[_0x2b3cc5(0xfa),_0x392e23[_0x2b3cc5(0xfa)],_0xffa525[_0x2b3cc5(0xfa)]],[_0x2b3cc5(0x14b),_0x392e23[_0x2b3cc5(0x14b)],_0xffa525['datasetCode']]];for(const [_0x92c007,_0xa233e8,_0x20caea]of _0x5c733b){assertVerified(sameValue(_0xa233e8,_0x20caea),_0x2b3cc5(0x157)+_0xffa525['id']+'\x20'+_0x92c007+_0x2b3cc5(0x11e));}}function sameValue(_0x13a9c7,_0x2ca8e8){const _0x525b9c=a135_0x2120ce;if(Array['isArray'](_0x13a9c7)||Array[_0x525b9c(0x123)](_0x2ca8e8))return JSON[_0x525b9c(0x116)](_0x13a9c7)===JSON[_0x525b9c(0x116)](_0x2ca8e8);return _0x13a9c7===_0x2ca8e8;}
|
|
1
|
+
const a136_0xb02dbe=a136_0x2dc1;(function(_0x5b4914,_0x48ced8){const _0x54c1d4=a136_0x2dc1,_0x1a96ce=_0x5b4914();while(!![]){try{const _0x24c70a=parseInt(_0x54c1d4(0x1c8))/0x1+-parseInt(_0x54c1d4(0x19e))/0x2*(parseInt(_0x54c1d4(0x1eb))/0x3)+-parseInt(_0x54c1d4(0x1b8))/0x4+parseInt(_0x54c1d4(0x1f8))/0x5+parseInt(_0x54c1d4(0x1cf))/0x6*(parseInt(_0x54c1d4(0x1c0))/0x7)+-parseInt(_0x54c1d4(0x1be))/0x8+parseInt(_0x54c1d4(0x203))/0x9;if(_0x24c70a===_0x48ced8)break;else _0x1a96ce['push'](_0x1a96ce['shift']());}catch(_0x483030){_0x1a96ce['push'](_0x1a96ce['shift']());}}}(a136_0x2abf,0x4ab74));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_0xb02dbe(0x1a7),'path':a136_0xb02dbe(0x197)}];function a136_0x2abf(){const _0xc1658=['--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','expect-visible','get','menu_verification_failed','rawFlags','22953sKOiSo','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','before','pageType','expectedCount','validation','label','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','visibility-update','targets','boolean','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','2175645CQiZky','isSafeInteger','resourcesValid','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','menu_permission_denied','Final\x20menu\x20visibility\x20readback\x20failed.','path','code','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','datasetId','2553651wBNkjA','menu_state_drift','updated','\x20menu(s),\x20expected\x20','hash','\x20menu(s);\x20skip\x20','Response\x20was\x20lost\x20for\x20menu\x20','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','stringify','byId','menu-ids','update-recovery','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','\x20visibility\x20update\x20could\x20not\x20be\x20verified','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','/smartapi/menu/update','\x20failed.','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','requestedVisible','warnings','menuIds','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','2LkWwZJ','menu_selector_not_found','modelType','expectVisible','failed','length','menu\x20list','Would\x20update\x20visibility\x20for\x20','push','POST','update\x20menu\x20visibility','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','\x20updated,\x20','parentId','map','string','menu','verification','sort','depth','menus','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','values','rabetbase\x20menu\x20list\x20--format\x20compress','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','652916tGQyeC','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','expected-count','message','childrenIds','url','4502128MBjiOz','Menu\x20','7ipabwW','set','str','isArray','join','datasetCode','type','Menu\x20visibility\x20update\x20completed:\x20','67019NVWFGo','paths','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','plannedActions','true','visible','false','1522770XygnTv','childrenCount','has','Selected\x20','resources','Menu\x20id\x20selector(s)\x20not\x20found:\x20','plan','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Updated\x20visibility\x20for\x20','update-menu-visibility','update','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','cookie','\x20unchanged\x20menu(s).','trim','flagMissing','pageId','some','filter','appCode','verify\x20menu\x20visibility\x20update','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'];a136_0x2abf=function(){return _0xc1658;};return a136_0x2abf();}function a136_0x2dc1(_0x463227,_0x5cb106){_0x463227=_0x463227-0x194;const _0x2abf5a=a136_0x2abf();let _0x2dc1c8=_0x2abf5a[_0x463227];return _0x2dc1c8;}export const menuVisibilityUpdate={'service':a136_0xb02dbe(0x1ae),'command':a136_0xb02dbe(0x1f3),'description':a136_0xb02dbe(0x1d6),'risk':'high-risk-write','structuredErrors':!![],'flags':[{'name':a136_0xb02dbe(0x20d),'type':'string','description':a136_0xb02dbe(0x1a9)},{'name':a136_0xb02dbe(0x1c9),'type':a136_0xb02dbe(0x1ad),'description':a136_0xb02dbe(0x201)},{'name':a136_0xb02dbe(0x1cd),'type':a136_0xb02dbe(0x1f5),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a136_0xb02dbe(0x1e7),'type':a136_0xb02dbe(0x1f5),'description':a136_0xb02dbe(0x1da)},{'name':a136_0xb02dbe(0x1ba),'type':'number','description':a136_0xb02dbe(0x1e5)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x498d91){parseInput(_0x498d91),requireExplicitYes(_0x498d91);},async 'dryRun'(_0x1587e0){const _0x4d9a76=a136_0xb02dbe,_0x2bb15d=await buildPlan(_0x1587e0,!![]),_0x33a6e8=_0x2bb15d['plan'][_0x4d9a76(0x1cb)]?.[_0x4d9a76(0x1a3)]??0x0,_0x296e01=_0x2bb15d['plan'][_0x4d9a76(0x1f4)][_0x4d9a76(0x1a3)]-_0x33a6e8;return menuDryRunResult(_0x2bb15d['plan'],{'method':_0x4d9a76(0x1a7),'url':'/smartapi/menu/update','body':{'updates':_0x2bb15d[_0x4d9a76(0x1d5)]['plannedActions']?.[_0x4d9a76(0x1ac)](_0x3700c7=>_0x3700c7['body'])??[]},'description':_0x4d9a76(0x1a5)+_0x33a6e8+_0x4d9a76(0x208)+_0x296e01+_0x4d9a76(0x1dd)});},async 'execute'(_0x577ffe){const _0x248011=a136_0xb02dbe;requireExplicitYes(_0x577ffe);const _0x3830da=await buildPlan(_0x577ffe,![]);await recheckMutationSnapshot(_0x577ffe,_0x3830da[_0x248011(0x1d5)],'update\x20menu\x20visibility');const _0x5789ff=[],_0x3a05a9=[],_0x37ecb5=[];for(const _0x257117 of _0x3830da[_0x248011(0x1d5)][_0x248011(0x1f4)]){if(_0x257117[_0x248011(0x1ed)][_0x248011(0x1cd)]===_0x3830da[_0x248011(0x1d5)][_0x248011(0x19a)]){_0x5789ff[_0x248011(0x1a6)]({'id':_0x257117['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x577ffe['appCode'],_0x577ffe[_0x248011(0x1dc)],{'id':_0x257117['id'],'visible':_0x3830da['plan']['requestedVisible']}),_0x5789ff[_0x248011(0x1a6)]({'id':_0x257117['id'],'updated':!![],'skipped':![]});}catch(_0x1f42b5){const _0xe4c778=mapMenuApiError(_0x1f42b5,'update\x20visibility\x20for',_0x257117['id']);if(isMenuResponseLoss(_0x1f42b5)&&_0xe4c778[_0x248011(0x1ff)]!==_0x248011(0x1fc)){_0x37ecb5[_0x248011(0x1a6)](_0x257117['id']);continue;}_0x3a05a9[_0x248011(0x1a6)]({'id':_0x257117['id'],'stage':_0x248011(0x1d9),'code':_0xe4c778[_0x248011(0x1ff)],'message':_0xe4c778['message']});}}let _0x2d12b5;try{_0x2d12b5=await fetchMenuSnapshot(_0x577ffe[_0x248011(0x1e3)],_0x577ffe['cookie']);}catch(_0x3eb137){const _0x44c925=describeMenuErrorCause(_0x3eb137,_0x248011(0x1e4)),_0x31a5af=_0x37ecb5[_0x248011(0x1ac)](_0x1fc6ca=>({'id':_0x1fc6ca,'stage':_0x248011(0x20e),'code':_0x248011(0x1e9),'message':_0x248011(0x209)+_0x1fc6ca+_0x248011(0x1db),'requestedStateConfirmed':![],'recovered':![]})),_0x214a6f={'stage':_0x248011(0x1af),'code':'menu_verification_failed','message':_0x248011(0x1fd),'targetIds':_0x3830da[_0x248011(0x1d5)][_0x248011(0x1f4)][_0x248011(0x1ac)](_0x528e9d=>_0x528e9d['id']),'requestedStateConfirmed':![],..._0x44c925};throw menuFailure(asVerificationError(_0x3eb137,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x3830da[_0x248011(0x1d5)],{'stage':'verification','succeeded':_0x5789ff,'failedRecords':[..._0x3a05a9,..._0x31a5af,_0x214a6f],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x248011(0x1a2),'recoveredCount':0x0,'lookupCommand':_0x248011(0x1b5)}});}const _0x125528=[];for(const _0x173476 of _0x5789ff){const _0x24ab71=Number(_0x173476['id']),_0x289dc6=_0x3830da['beforeById'][_0x248011(0x1e8)](_0x24ab71),_0x493b62=_0x2d12b5[_0x248011(0x20c)]['get'](_0x24ab71);try{verifyVisibilityUpdate(_0x289dc6,_0x493b62,_0x3830da[_0x248011(0x1d5)][_0x248011(0x19a)]);}catch(_0xbc8075){const _0x2c8a1c=asVerificationError(_0xbc8075,'Menu\x20'+_0x24ab71+_0x248011(0x195));_0x125528[_0x248011(0x1a6)]({'id':_0x24ab71,'stage':_0x248011(0x1af),'code':_0x2c8a1c[_0x248011(0x1ff)],'message':_0x2c8a1c[_0x248011(0x1bb)],'requestedStateConfirmed':![]});}}for(const _0x3c2321 of _0x37ecb5){const _0x4460a6=_0x3830da['beforeById'][_0x248011(0x1e8)](_0x3c2321),_0x326f1a=_0x2d12b5[_0x248011(0x20c)][_0x248011(0x1e8)](_0x3c2321);try{verifyVisibilityUpdate(_0x4460a6,_0x326f1a,_0x3830da['plan'][_0x248011(0x19a)]),_0x5789ff[_0x248011(0x1a6)]({'id':_0x3c2321,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x1909b3){const _0xe9028=asVerificationError(_0x1909b3,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x3c2321+_0x248011(0x1b9));_0x125528[_0x248011(0x1a6)]({'id':_0x3c2321,'stage':_0x248011(0x20e),'code':_0xe9028[_0x248011(0x1ff)],'message':_0xe9028[_0x248011(0x1bb)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x125528[_0x248011(0x1a3)]>0x0){const _0x1a82f9=_0x125528[_0x248011(0x1ac)](_0x2eb12f=>Number(_0x2eb12f['id'])),_0x1bb7ea=_0x5789ff[_0x248011(0x1e2)](_0x304b79=>_0x304b79['recovered']===!![])['length'],_0xb9c5ce=menuError(_0x248011(0x1e9),_0x248011(0x19d)+_0x1a82f9[_0x248011(0x1c4)](',\x20')+'.',_0x248011(0x1ec));throw menuFailure(_0xb9c5ce,_0x3830da['plan'],{'stage':_0x248011(0x1af),'succeeded':_0x5789ff,'failedRecords':[..._0x3a05a9,..._0x125528],'warnings':[_0x248011(0x1f7)],'verification':{'status':_0x248011(0x1a2),..._0x1a82f9[_0x248011(0x1a3)]===0x1?{'targetId':_0x1a82f9[0x0]}:{'targetIds':_0x1a82f9},'recoveredCount':_0x1bb7ea,'lookupCommand':_0x248011(0x1b5)}});}const _0x708203=_0x5789ff['filter'](_0x5ad6e0=>_0x5ad6e0[_0x248011(0x205)]===!![])[_0x248011(0x1a3)],_0x2f5454=_0x5789ff[_0x248011(0x1a3)]-_0x708203,_0xef9533={..._0x3830da[_0x248011(0x1d5)],'succeeded':_0x5789ff,'failed':_0x3a05a9,'warnings':_0x3a05a9['length']>0x0?[..._0x3830da[_0x248011(0x1d5)]['warnings'],_0x248011(0x1f6)]:_0x3830da['plan'][_0x248011(0x19b)],'verification':{'checkedBy':_0x248011(0x1a4),'snapshotHash':_0x2d12b5['hash'],'matchesRequestedState':_0x3a05a9['length']===0x0,'recoveredCount':_0x37ecb5['length']}};return{'ok':_0x3a05a9[_0x248011(0x1a3)]===0x0,'data':_0xef9533,'message':_0x3a05a9['length']===0x0?_0x248011(0x1d7)+_0x708203+'\x20menu(s);\x20skipped\x20'+_0x2f5454+_0x248011(0x1dd):_0x248011(0x1c7)+_0x708203+_0x248011(0x1aa)+_0x2f5454+'\x20skipped,\x20'+_0x3a05a9['length']+_0x248011(0x198)};}};function parseInput(_0x7bc3d8){const _0x540de3=a136_0xb02dbe,_0x453c0f=parseMenuIds(_0x7bc3d8[_0x540de3(0x1c2)](_0x540de3(0x20d))),_0x35aa4f=parseCsv(_0x7bc3d8[_0x540de3(0x1c2)](_0x540de3(0x1c9)));if(_0x453c0f[_0x540de3(0x1a3)]===0x0&&_0x35aa4f[_0x540de3(0x1a3)]===0x0)throw CliErrors[_0x540de3(0x1f0)](_0x540de3(0x194));const _0x167ce9=parseBooleanFlag(_0x7bc3d8,_0x540de3(0x1cd),!![]),_0x3ff88f=parseBooleanFlag(_0x7bc3d8,'expect-visible',![]);let _0x3dc0af;if(hasFlag(_0x7bc3d8,_0x540de3(0x1ba))){_0x3dc0af=_0x7bc3d8['num'](_0x540de3(0x1ba));if(!Number[_0x540de3(0x1f9)](_0x3dc0af)||_0x3dc0af<0x0)throw CliErrors[_0x540de3(0x1f0)](_0x540de3(0x1b6));}return{'menuIds':_0x453c0f,'paths':_0x35aa4f,'visible':_0x167ce9,'expectVisible':_0x3ff88f,'expectedCount':_0x3dc0af};}async function buildPlan(_0x4b8cf0,_0x44b896){const _0x1bcc8d=a136_0xb02dbe,_0x482f08=parseInput(_0x4b8cf0),_0x3f85e2=await fetchMutationSnapshot(_0x4b8cf0,_0x1bcc8d(0x1a8)),_0x1ea71d=selectTargets(_0x3f85e2[_0x1bcc8d(0x1b2)],_0x482f08[_0x1bcc8d(0x19c)],_0x482f08[_0x1bcc8d(0x1c9)]);if(_0x482f08[_0x1bcc8d(0x1ef)]!==undefined&&_0x1ea71d[_0x1bcc8d(0x1a3)]!==_0x482f08[_0x1bcc8d(0x1ef)])throw menuError('menu_expected_count_mismatch',_0x1bcc8d(0x1d2)+_0x1ea71d[_0x1bcc8d(0x1a3)]+_0x1bcc8d(0x206)+_0x482f08['expectedCount']+'.',_0x1bcc8d(0x1b3));if(_0x482f08['expectVisible']!==undefined){const _0x3ea0d3=_0x1ea71d['filter'](_0x41848a=>_0x41848a[_0x1bcc8d(0x1cd)]!==_0x482f08[_0x1bcc8d(0x1a1)]);if(_0x3ea0d3['length']>0x0)throw menuError(_0x1bcc8d(0x204),_0x1bcc8d(0x20a)+_0x3ea0d3[_0x1bcc8d(0x1ac)](_0x157646=>_0x157646['id'])['join'](',\x20')+'.',_0x1bcc8d(0x1ca));}const _0x40b8e6=_0x1ea71d[_0x1bcc8d(0x1ac)](_0x1b6567=>({'id':_0x1b6567['id'],'label':_0x1b6567[_0x1bcc8d(0x1f1)],'path':_0x1b6567[_0x1bcc8d(0x1fe)],'before':{'visible':_0x1b6567['visible']},'after':{'visible':_0x482f08[_0x1bcc8d(0x1cd)]}})),_0x3bd6a7=_0x40b8e6[_0x1bcc8d(0x1e2)](_0x423097=>_0x423097[_0x1bcc8d(0x1ed)][_0x1bcc8d(0x1cd)]!==_0x482f08[_0x1bcc8d(0x1cd)])[_0x1bcc8d(0x1ac)](_0x21304b=>({'stage':_0x1bcc8d(0x1d8),'method':_0x1bcc8d(0x1a7),'path':_0x1bcc8d(0x197),'body':{'appCode':_0x4b8cf0[_0x1bcc8d(0x1e3)],'id':_0x21304b['id'],'visible':_0x482f08[_0x1bcc8d(0x1cd)]}})),_0x87eb37=mutationResult({'operation':_0x1bcc8d(0x1f3),'selector':{'menuIds':_0x482f08[_0x1bcc8d(0x19c)],'paths':_0x482f08[_0x1bcc8d(0x1c9)]},'before':{'menus':_0x1ea71d['map'](_0x419f73=>({'id':_0x419f73['id'],'path':_0x419f73['path'],'visible':_0x419f73[_0x1bcc8d(0x1cd)]}))},'after':{'menus':_0x1ea71d[_0x1bcc8d(0x1ac)](_0x40f380=>({'id':_0x40f380['id'],'path':_0x40f380[_0x1bcc8d(0x1fe)],'visible':_0x482f08[_0x1bcc8d(0x1cd)]}))},'dryRun':_0x44b896,'backend':[...BACKEND],'plannedActions':_0x3bd6a7,'snapshotHash':_0x3f85e2[_0x1bcc8d(0x207)],'warnings':_0x3bd6a7['length']===0x0?[_0x1bcc8d(0x199)]:[]});return{'plan':{..._0x87eb37,'requestedVisible':_0x482f08['visible'],'targets':_0x40b8e6},'beforeById':new Map(_0x1ea71d[_0x1bcc8d(0x1ac)](_0x5d74b8=>[_0x5d74b8['id'],_0x5d74b8]))};}function selectTargets(_0x77280d,_0xb9dacd,_0x275033){const _0x2a3694=a136_0xb02dbe,_0x179b0b=new Map(_0x77280d[_0x2a3694(0x1ac)](_0xcf39be=>[_0xcf39be['id'],_0xcf39be])),_0x4821e8=new Map(),_0x21f0b7=_0xb9dacd[_0x2a3694(0x1e2)](_0x3782ae=>!_0x179b0b[_0x2a3694(0x1d1)](_0x3782ae));if(_0x21f0b7['length']>0x0)throw menuError(_0x2a3694(0x19f),_0x2a3694(0x1d4)+_0x21f0b7[_0x2a3694(0x1c4)](',\x20')+'.',_0x2a3694(0x1b7));for(const _0x238c4d of _0xb9dacd){_0x4821e8[_0x2a3694(0x1c1)](_0x238c4d,_0x179b0b[_0x2a3694(0x1e8)](_0x238c4d));}for(const _0x526f06 of _0x275033){const _0x2374dc=_0x77280d['filter'](_0x5decd9=>_0x5decd9[_0x2a3694(0x1fe)]===_0x526f06);if(_0x2374dc[_0x2a3694(0x1a3)]===0x0)throw menuError(_0x2a3694(0x19f),'Menu\x20path\x20selector\x20not\x20found:\x20'+JSON[_0x2a3694(0x20b)](_0x526f06)+'.',_0x2a3694(0x200));if(_0x2374dc[_0x2a3694(0x1a3)]>0x1)throw menuError('menu_selector_ambiguous',_0x2a3694(0x196)+JSON[_0x2a3694(0x20b)](_0x526f06)+'.',_0x2a3694(0x1fb)+_0x2374dc[_0x2a3694(0x1ac)](_0x2b1eaf=>_0x2b1eaf['id'])[_0x2a3694(0x1c4)](',\x20')+'.');const _0x4bdcd0=_0x2374dc[0x0];_0x4821e8[_0x2a3694(0x1c1)](_0x4bdcd0['id'],_0x4bdcd0);}return[..._0x4821e8[_0x2a3694(0x1b4)]()];}function parseMenuIds(_0xd1a01f){const _0x3d2c64=a136_0xb02dbe,_0x2d15ba=parseCsv(_0xd1a01f),_0x442489=_0x2d15ba[_0x3d2c64(0x1ac)](Number);if(_0x442489[_0x3d2c64(0x1e1)](_0x2b67be=>!Number[_0x3d2c64(0x1f9)](_0x2b67be)||_0x2b67be<=0x0))throw CliErrors[_0x3d2c64(0x1f0)](_0x3d2c64(0x1e6));return[...new Set(_0x442489)];}function parseCsv(_0x41218e){const _0x2aa41f=a136_0xb02dbe;return[...new Set(_0x41218e['split'](',')[_0x2aa41f(0x1ac)](_0x3ddbdf=>_0x3ddbdf[_0x2aa41f(0x1de)]())[_0x2aa41f(0x1e2)](Boolean))];}function parseBooleanFlag(_0x3c8271,_0x9aac2e,_0x4b312b){const _0x24d3d3=a136_0xb02dbe;if(!hasFlag(_0x3c8271,_0x9aac2e)){if(_0x4b312b)throw CliErrors[_0x24d3d3(0x1df)](_0x9aac2e);return undefined;}const _0x13598b=_0x3c8271[_0x24d3d3(0x1ea)][_0x9aac2e];if(_0x13598b===!![]||_0x13598b===![])return _0x13598b;if(_0x13598b===_0x24d3d3(0x1cc))return!![];if(_0x13598b===_0x24d3d3(0x1ce))return![];throw CliErrors[_0x24d3d3(0x1f0)]('--'+_0x9aac2e+'\x20must\x20be\x20true\x20or\x20false.');}function verifyVisibilityUpdate(_0x5b5aae,_0x218751,_0xbe20e1){const _0x2fb5c1=a136_0xb02dbe;assertVerified(!!_0x218751,'Menu\x20'+_0x5b5aae['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x218751[_0x2fb5c1(0x1cd)]===_0xbe20e1,'Menu\x20'+_0x5b5aae['id']+_0x2fb5c1(0x1f2));const _0x2e046e=[['id',_0x218751['id'],_0x5b5aae['id']],[_0x2fb5c1(0x1ab),_0x218751['parentId'],_0x5b5aae['parentId']],[_0x2fb5c1(0x1b1),_0x218751[_0x2fb5c1(0x1b1)],_0x5b5aae['depth']],[_0x2fb5c1(0x1f1),_0x218751[_0x2fb5c1(0x1f1)],_0x5b5aae[_0x2fb5c1(0x1f1)]],[_0x2fb5c1(0x1fe),_0x218751[_0x2fb5c1(0x1fe)],_0x5b5aae[_0x2fb5c1(0x1fe)]],['url',_0x218751[_0x2fb5c1(0x1bd)],_0x5b5aae[_0x2fb5c1(0x1bd)]],[_0x2fb5c1(0x1c6),_0x218751['type'],_0x5b5aae['type']],[_0x2fb5c1(0x1b0),_0x218751[_0x2fb5c1(0x1b0)],_0x5b5aae[_0x2fb5c1(0x1b0)]],[_0x2fb5c1(0x1d3),_0x218751[_0x2fb5c1(0x1d3)],_0x5b5aae['resources']],[_0x2fb5c1(0x1fa),_0x218751['resourcesValid'],_0x5b5aae[_0x2fb5c1(0x1fa)]],['childrenIds',_0x218751[_0x2fb5c1(0x1bc)],_0x5b5aae[_0x2fb5c1(0x1bc)]],[_0x2fb5c1(0x1d0),_0x218751[_0x2fb5c1(0x1d0)],_0x5b5aae['childrenCount']],[_0x2fb5c1(0x1e0),_0x218751[_0x2fb5c1(0x1e0)],_0x5b5aae[_0x2fb5c1(0x1e0)]],['pageType',_0x218751[_0x2fb5c1(0x1ee)],_0x5b5aae[_0x2fb5c1(0x1ee)]],[_0x2fb5c1(0x1a0),_0x218751[_0x2fb5c1(0x1a0)],_0x5b5aae['modelType']],[_0x2fb5c1(0x202),_0x218751['datasetId'],_0x5b5aae['datasetId']],[_0x2fb5c1(0x1c5),_0x218751['datasetCode'],_0x5b5aae[_0x2fb5c1(0x1c5)]]];for(const [_0x5cc936,_0x59f739,_0x54de49]of _0x2e046e){assertVerified(sameValue(_0x59f739,_0x54de49),_0x2fb5c1(0x1bf)+_0x5b5aae['id']+'\x20'+_0x5cc936+'\x20changed\x20unexpectedly.');}}function sameValue(_0x32863a,_0x21aaa6){const _0x3d0807=a136_0xb02dbe;if(Array[_0x3d0807(0x1c3)](_0x32863a)||Array[_0x3d0807(0x1c3)](_0x21aaa6))return JSON[_0x3d0807(0x20b)](_0x32863a)===JSON['stringify'](_0x21aaa6);return _0x32863a===_0x21aaa6;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a137_0x29b9c5=a137_0x4680;function a137_0x4680(_0x82fd7e,_0x1593f0){_0x82fd7e=_0x82fd7e-0xda;const _0x2a9f20=a137_0x2a9f();let _0x4680f2=_0x2a9f20[_0x82fd7e];return _0x4680f2;}(function(_0x6b3d26,_0x50188a){const _0x38b9fd=a137_0x4680,_0xce1c41=_0x6b3d26();while(!![]){try{const _0x445e84=-parseInt(_0x38b9fd(0xf8))/0x1+parseInt(_0x38b9fd(0xee))/0x2+parseInt(_0x38b9fd(0xda))/0x3+parseInt(_0x38b9fd(0xdc))/0x4*(parseInt(_0x38b9fd(0xe0))/0x5)+parseInt(_0x38b9fd(0xec))/0x6+-parseInt(_0x38b9fd(0xf7))/0x7*(-parseInt(_0x38b9fd(0xe9))/0x8)+-parseInt(_0x38b9fd(0xf6))/0x9;if(_0x445e84===_0x50188a)break;else _0xce1c41['push'](_0xce1c41['shift']());}catch(_0x5ea3ac){_0xce1c41['push'](_0xce1c41['shift']());}}}(a137_0x2a9f,0x67aa8));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';function a137_0x2a9f(){const _0x1882db=['planned','create',';\x20no\x20automatic\x20retry\x20was\x20attempted.','appCode','readTimeout','16868619BqkIbu','757463erjRLV','706377AMwRvx','2442849FCKdSu','Inspect\x20with\x20','1796804tmcUll','connectTimeout','channelType','configName','5UYmOge',';\x20do\x20not\x20resubmit.','document','mutation','POST','input','description','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','configCode','24eUipTT','verified','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','5060430xaVAeS','notification_config_create_outcome_unknown','1147536KtMpmV','verification','write'];a137_0x2a9f=function(){return _0x1882db;};return a137_0x2a9f();}const CREATE_PATH='/notification/channel-config/create';async function prepareCreate(_0x25951c){const _0x4b4cb4=a137_0x4680,_0x1a3d5f=await readNotificationDocument(_0x25951c,_0x4b4cb4(0xf2)),_0x34d676=createMutationInput(_0x25951c['appCode'],_0x1a3d5f);return{'document':_0x1a3d5f,'input':_0x34d676,'planned':projectNotificationConfig({'appCode':_0x25951c[_0x4b4cb4(0xf4)],'configName':_0x1a3d5f[_0x4b4cb4(0xdf)],'channelType':_0x1a3d5f['channelType'],'endpointUrl':_0x1a3d5f['endpointUrl'],'channelConfig':_0x1a3d5f['channelConfig'],'description':_0x1a3d5f[_0x4b4cb4(0xe6)],'connectTimeout':_0x1a3d5f[_0x4b4cb4(0xdd)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x1a3d5f[_0x4b4cb4(0xf5)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':'config-create','description':a137_0x29b9c5(0xeb),'risk':a137_0x29b9c5(0xf0),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x10682a){assertSingleNotificationSource(_0x10682a);},async 'dryRun'(_0x25d544){const _0x16559a=a137_0x29b9c5,_0x2ae33c=await prepareCreate(_0x25d544),_0x57e21c=notificationLookupCommand(_0x25d544['appCode'],_0x2ae33c['document'][_0x16559a(0xde)]);return asDryRunResult({'operation':_0x16559a(0xf2),'selector':{'appCode':_0x25d544['appCode'],'configName':_0x2ae33c[_0x16559a(0xe2)][_0x16559a(0xdf)],'channelType':_0x2ae33c[_0x16559a(0xe2)]['channelType']},'before':null,'after':_0x2ae33c[_0x16559a(0xf1)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x16559a(0xf1),'lookupCommand':_0x57e21c}},{'method':_0x16559a(0xe4),'url':CREATE_PATH});},async 'execute'(_0x85e5be){const _0x6c8d1a=a137_0x29b9c5,_0xc3cbef=await prepareCreate(_0x85e5be),_0x371d0f=notificationLookupCommand(_0x85e5be[_0x6c8d1a(0xf4)],_0xc3cbef[_0x6c8d1a(0xe2)]['channelType']);let _0x195a0d;try{_0x195a0d=await createNotificationChannelConfig(_0xc3cbef[_0x6c8d1a(0xe5)]);}catch(_0x3601e5){if(isPlatformTransportFailure(_0x3601e5))throw notificationError('notification_config_create_outcome_unknown',_0x6c8d1a(0xe7),_0x6c8d1a(0xdb)+_0x371d0f+_0x6c8d1a(0xe1));throw safeApiFailure(_0x6c8d1a(0xf2),_0x6c8d1a(0xe3),_0x6c8d1a(0xdb)+_0x371d0f+_0x6c8d1a(0xf3));}if(!Number['isSafeInteger'](_0x195a0d)||_0x195a0d<=0x0)throw notificationError(_0x6c8d1a(0xed),'Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.',_0x6c8d1a(0xdb)+_0x371d0f+_0x6c8d1a(0xe1));let _0x35b7e3;try{const _0x731dfc=await getNotificationChannelConfig(_0x195a0d,_0x85e5be[_0x6c8d1a(0xf4)]);_0x35b7e3=normalizeExactNotificationConfig(_0x731dfc,_0x195a0d,_0x85e5be[_0x6c8d1a(0xf4)]);}catch{throw safeApiFailure('create',_0x6c8d1a(0xef),_0x6c8d1a(0xdb)+_0x371d0f+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x6c8d1a(0xf2),'selector':{'appCode':_0x35b7e3[_0x6c8d1a(0xf4)],'id':_0x35b7e3['id'],'configCode':_0x35b7e3[_0x6c8d1a(0xe8)],'configName':_0x35b7e3[_0x6c8d1a(0xdf)],'channelType':_0x35b7e3[_0x6c8d1a(0xde)]},'before':null,'after':projectNotificationConfig(_0x35b7e3),'dryRun':![],'backend':{'method':_0x6c8d1a(0xe4),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x6c8d1a(0xea),'lookupCommand':_0x371d0f}},'message':'Created\x20notification\x20config\x20'+_0x35b7e3['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a138_0x3b2277=a138_0x5049;(function(_0x30218c,_0x11e055){const _0x576405=a138_0x5049,_0xa76f90=_0x30218c();while(!![]){try{const _0x5db42b=-parseInt(_0x576405(0x11c))/0x1*(parseInt(_0x576405(0x134))/0x2)+-parseInt(_0x576405(0x118))/0x3*(parseInt(_0x576405(0x11e))/0x4)+parseInt(_0x576405(0x11f))/0x5+parseInt(_0x576405(0x11d))/0x6+-parseInt(_0x576405(0x119))/0x7*(-parseInt(_0x576405(0x128))/0x8)+-parseInt(_0x576405(0x116))/0x9*(-parseInt(_0x576405(0x11a))/0xa)+-parseInt(_0x576405(0x12b))/0xb*(parseInt(_0x576405(0x136))/0xc);if(_0x5db42b===_0x11e055)break;else _0xa76f90['push'](_0xa76f90['shift']());}catch(_0xf12073){_0xa76f90['push'](_0xa76f90['shift']());}}}(a138_0x289d,0xee662));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH='/notification/channel-config/delete',REFERENCE_WARNING=a138_0x3b2277(0x12a);function a138_0x5049(_0x515b71,_0x45a5d8){_0x515b71=_0x515b71-0x115;const _0x289d5e=a138_0x289d();let _0x5049a1=_0x289d5e[_0x515b71];return _0x5049a1;}function a138_0x289d(){const _0x11646c=['5161149EVlpGA','84730RhmhpA','POST','703930uoXjHE','8948412gZvIFj','653792rAOeNc','8637025xqxmGc','high-risk-write','appCode','notification','Inspect\x20with\x20',';\x20do\x20not\x20resubmit\x20automatically.','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','some','planned','16hWuUzf',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','3476SgBAPh','notification_config_delete_outcome_unknown','channelType','mutation','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','before','\x20remains\x20present\x20after\x20delete.','notification_config_delete_verification_failed','\x20delete\x20could\x20not\x20be\x20verified.','2FwrNjA','Notification\x20config\x20','94728CRtMeb','delete','1359zvCBgN','Deleted\x20notification\x20config\x20','33fwYMCD'];a138_0x289d=function(){return _0x11646c;};return a138_0x289d();}async function prepareDelete(_0x5d7d08){const _0x3b767b=a138_0x3b2277,_0x5c554c=readNotificationId(_0x5d7d08),_0x44bbec=await requireExactNotificationConfig(_0x5d7d08[_0x3b767b(0x121)],_0x5c554c,_0x3b767b(0x115));return{'id':_0x5c554c,'before':_0x44bbec};}export const notificationConfigDelete={'service':a138_0x3b2277(0x122),'command':'config-delete','description':a138_0x3b2277(0x12f),'risk':a138_0x3b2277(0x120),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x3c0e25){readNotificationId(_0x3c0e25),requireNotificationExplicitYes(_0x3c0e25);},async 'dryRun'(_0x5e8aee){const _0x31f830=a138_0x3b2277,_0x1e6dde=await prepareDelete(_0x5e8aee),_0x1f9af8=notificationLookupCommand(_0x5e8aee['appCode'],_0x1e6dde[_0x31f830(0x130)][_0x31f830(0x12d)]);return asDryRunResult({'operation':_0x31f830(0x115),'selector':notificationSelector(_0x1e6dde[_0x31f830(0x130)]),'before':projectNotificationConfig(_0x1e6dde[_0x31f830(0x130)]),'after':null,'dryRun':!![],'backend':{'method':_0x31f830(0x11b),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x31f830(0x127),'lookupCommand':_0x1f9af8}},{'method':_0x31f830(0x11b),'url':DELETE_PATH});},async 'execute'(_0x58167c){const _0x45f589=a138_0x3b2277;requireNotificationExplicitYes(_0x58167c);const _0x2d4af0=await prepareDelete(_0x58167c),_0x59d0d3=notificationLookupCommand(_0x58167c[_0x45f589(0x121)],_0x2d4af0[_0x45f589(0x130)][_0x45f589(0x12d)]);let _0x17c466=![];try{await deleteNotificationChannelConfig(_0x2d4af0['id'],_0x58167c[_0x45f589(0x121)]);}catch(_0x388e7c){if(!isPlatformTransportFailure(_0x388e7c))throw safeApiFailure(_0x45f589(0x115),_0x45f589(0x12e),_0x45f589(0x123)+_0x59d0d3+_0x45f589(0x129));_0x17c466=!![];}let _0x347cb0;try{_0x347cb0=await listNotificationChannelConfigs(_0x58167c[_0x45f589(0x121)],_0x2d4af0[_0x45f589(0x130)][_0x45f589(0x12d)]),validateNotificationDeleteReadback(_0x347cb0,_0x58167c[_0x45f589(0x121)],_0x2d4af0['before'][_0x45f589(0x12d)]);}catch{throw notificationError(_0x17c466?_0x45f589(0x12c):'notification_config_delete_verification_unavailable',_0x45f589(0x135)+_0x2d4af0['id']+_0x45f589(0x133),_0x45f589(0x123)+_0x59d0d3+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x347cb0[_0x45f589(0x126)](_0x1bb62d=>_0x1bb62d['id']===_0x2d4af0['id']))throw notificationError(_0x17c466?_0x45f589(0x12c):_0x45f589(0x132),_0x45f589(0x135)+_0x2d4af0['id']+_0x45f589(0x131),_0x45f589(0x123)+_0x59d0d3+_0x45f589(0x124));const _0x57163f=[REFERENCE_WARNING];return _0x17c466&&_0x57163f['unshift'](_0x45f589(0x125)),{'ok':!![],'data':{'operation':_0x45f589(0x115),'selector':notificationSelector(_0x2d4af0[_0x45f589(0x130)]),'before':projectNotificationConfig(_0x2d4af0[_0x45f589(0x130)]),'after':null,'dryRun':![],'backend':{'method':_0x45f589(0x11b),'path':DELETE_PATH},'warnings':_0x57163f,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x17c466,'lookupCommand':_0x59d0d3}},'message':_0x45f589(0x117)+_0x2d4af0['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a139_0x1828(){const _0x58e9a1=['read','30536sFZjDg','length','5773096aGawXj','12GOCnIg','appCode','Found\x20','1453514ykpjvY','string','config-list','notification','3EjvReL','136581JoYqaJ','map','EMAIL','3205975eYvUSv','6063984CyhejE','889mAHfFf','25534800ypVoss','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values'];a139_0x1828=function(){return _0x58e9a1;};return a139_0x1828();}const a139_0x4ab137=a139_0x11c4;(function(_0x26c1ab,_0x30ed5a){const _0x1deba9=a139_0x11c4,_0x560130=_0x26c1ab();while(!![]){try{const _0x59a65b=parseInt(_0x1deba9(0x93))/0x1+parseInt(_0x1deba9(0x8e))/0x2*(-parseInt(_0x1deba9(0x92))/0x3)+parseInt(_0x1deba9(0x8a))/0x4+parseInt(_0x1deba9(0x96))/0x5*(parseInt(_0x1deba9(0x8b))/0x6)+-parseInt(_0x1deba9(0x84))/0x7*(-parseInt(_0x1deba9(0x88))/0x8)+parseInt(_0x1deba9(0x83))/0x9+-parseInt(_0x1deba9(0x85))/0xa;if(_0x59a65b===_0x30ed5a)break;else _0x560130['push'](_0x560130['shift']());}catch(_0x2c3cf2){_0x560130['push'](_0x560130['shift']());}}}(a139_0x1828,0xb4cbf));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a139_0x11c4(_0x3af0d4,_0x2a0f53){_0x3af0d4=_0x3af0d4-0x83;const _0x1828e7=a139_0x1828();let _0x11c488=_0x1828e7[_0x3af0d4];return _0x11c488;}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a139_0x4ab137(0x91),'command':a139_0x4ab137(0x90),'description':a139_0x4ab137(0x86),'risk':a139_0x4ab137(0x87),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a139_0x4ab137(0x8f),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES,'default':a139_0x4ab137(0x95)}],async 'validate'(_0x3f46c3){readNotificationChannelType(_0x3f46c3);},async 'execute'(_0x48098e){const _0x48b2f2=a139_0x4ab137,_0x3250e7=readNotificationChannelType(_0x48098e),_0x3a951f=await listNotificationChannelConfigs(_0x48098e[_0x48b2f2(0x8c)],_0x3250e7),_0x49750e=_0x3a951f[_0x48b2f2(0x94)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x48098e[_0x48b2f2(0x8c)],'channelType':_0x3250e7,'count':_0x49750e['length'],'configs':_0x49750e},'message':_0x48b2f2(0x8d)+_0x49750e[_0x48b2f2(0x89)]+'\x20'+_0x3250e7+'\x20notification\x20config(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a140_0x356e7f=a140_0x5bca;(function(_0x1c964d,_0xfa140a){const _0x753c38=a140_0x5bca,_0x2b30e6=_0x1c964d();while(!![]){try{const _0x1c8f7c=parseInt(_0x753c38(0x155))/0x1*(-parseInt(_0x753c38(0x14d))/0x2)+-parseInt(_0x753c38(0x156))/0x3+-parseInt(_0x753c38(0x14f))/0x4*(-parseInt(_0x753c38(0x13a))/0x5)+parseInt(_0x753c38(0x13d))/0x6+-parseInt(_0x753c38(0x150))/0x7+-parseInt(_0x753c38(0x13f))/0x8+-parseInt(_0x753c38(0x151))/0x9*(-parseInt(_0x753c38(0x136))/0xa);if(_0x1c8f7c===_0xfa140a)break;else _0x2b30e6['push'](_0x2b30e6['shift']());}catch(_0x5234c9){_0x2b30e6['push'](_0x2b30e6['shift']());}}}(a140_0x4c1c,0xede87));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_0x5bca(_0xdda017,_0x25003e){_0xdda017=_0xdda017-0x135;const _0x4c1c73=a140_0x4c1c();let _0x5bca85=_0x4c1c73[_0xdda017];return _0x5bca85;}const UPDATE_PATH=a140_0x356e7f(0x157);function a140_0x4c1c(){const _0x4b1e68=['440fLirWI','10425751odxQJN','272259HdOXFa','POST','notification_config_update_verification_unavailable','Inspect\x20with\x20--id\x20','632945mjseTr','5143488oZuglQ','/notification/channel-config/update','appCode','1790qzlHUr','Inspect\x20ID\x20','notification_config_update_verification_failed','channelType','3380UILCYz','patch','verified','9532194FVuaSN','high-risk-write','8006344VStqQp','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','Updated\x20notification\x20config\x20','\x20via\x20','before','mutation','notification_config_update_outcome_unknown','Notification\x20config\x20','planned',';\x20do\x20not\x20resubmit\x20automatically.','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','notification','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','\x20with\x20','6SSkffN','update'];a140_0x4c1c=function(){return _0x4b1e68;};return a140_0x4c1c();}async function prepareUpdate(_0x223e30){const _0x3f3815=a140_0x356e7f,_0x4d476e=readNotificationId(_0x223e30),_0x1a361e=await readNotificationDocument(_0x223e30,_0x3f3815(0x14e)),_0x23e519=await requireExactNotificationConfig(_0x223e30[_0x3f3815(0x135)],_0x4d476e,_0x3f3815(0x14e));return{'id':_0x4d476e,'patch':_0x1a361e,'before':_0x23e519,'payload':mergeUpdateInput(_0x23e519,_0x1a361e),'planned':plannedUpdateProjection(_0x23e519,_0x1a361e)};}export const notificationConfigUpdate={'service':a140_0x356e7f(0x14a),'command':'config-update','description':a140_0x356e7f(0x140),'risk':a140_0x356e7f(0x13e),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x18bf96){readNotificationId(_0x18bf96),assertSingleNotificationSource(_0x18bf96),requireNotificationExplicitYes(_0x18bf96);},async 'dryRun'(_0x2af628){const _0x492226=a140_0x356e7f,_0x8d27e6=await prepareUpdate(_0x2af628),_0x3420f5=notificationLookupCommand(_0x2af628['appCode'],_0x8d27e6[_0x492226(0x143)]['channelType']);return asDryRunResult({'operation':_0x492226(0x14e),'selector':notificationSelector(_0x8d27e6[_0x492226(0x143)]),'before':projectNotificationConfig(_0x8d27e6[_0x492226(0x143)]),'after':_0x8d27e6['planned'],'dryRun':!![],'backend':{'method':_0x492226(0x152),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x492226(0x147),'lookupCommand':_0x3420f5}},{'method':_0x492226(0x152),'url':UPDATE_PATH});},async 'execute'(_0x1a8bb2){const _0x566040=a140_0x356e7f;requireNotificationExplicitYes(_0x1a8bb2);const _0x53524d=await prepareUpdate(_0x1a8bb2),_0x53403e=notificationLookupCommand(_0x1a8bb2[_0x566040(0x135)],_0x53524d['before'][_0x566040(0x139)]);let _0x24704f=![];try{await updateNotificationChannelConfig(_0x53524d['payload']);}catch(_0x4695af){if(!isPlatformTransportFailure(_0x4695af))throw safeApiFailure('update',_0x566040(0x144),_0x566040(0x137)+_0x53524d['id']+_0x566040(0x14c)+_0x53403e+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x24704f=!![];}let _0x45100a;try{const _0x388d7f=await getNotificationChannelConfig(_0x53524d['id'],_0x1a8bb2[_0x566040(0x135)]);_0x45100a=normalizeExactNotificationConfig(_0x388d7f,_0x53524d['id'],_0x1a8bb2[_0x566040(0x135)]);}catch{throw notificationError(_0x24704f?_0x566040(0x145):_0x566040(0x153),_0x566040(0x146)+_0x53524d['id']+_0x566040(0x14b),'Inspect\x20with\x20--id\x20'+_0x53524d['id']+'\x20via\x20'+_0x53403e+_0x566040(0x148));}const _0x137439=requestedSafeFieldsMatch(_0x53524d['before'],_0x45100a,_0x53524d[_0x566040(0x13b)]);if(!_0x137439['allMatch']||_0x24704f&&!_0x137439['provesChange'])throw notificationError(_0x24704f?'notification_config_update_outcome_unknown':_0x566040(0x138),'Notification\x20config\x20'+_0x53524d['id']+_0x566040(0x149),_0x566040(0x154)+_0x53524d['id']+_0x566040(0x142)+_0x53403e+_0x566040(0x148));const _0x7b7a17=_0x24704f?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x45100a),'before':projectNotificationConfig(_0x53524d[_0x566040(0x143)]),'after':projectNotificationConfig(_0x45100a),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x7b7a17,'verification':{'status':_0x566040(0x13c),'recoveredAfterUnknownResponse':_0x24704f,'verifiedFields':_0x137439['verifiedFields'],'lookupCommand':_0x53403e}},'message':_0x566040(0x141)+_0x45100a['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xe03c2e,_0x253cbd){const _0x11948a=a141_0x534e,_0x210a75=_0xe03c2e();while(!![]){try{const _0x473fde=parseInt(_0x11948a(0x17d))/0x1*(parseInt(_0x11948a(0x17b))/0x2)+parseInt(_0x11948a(0x17c))/0x3+parseInt(_0x11948a(0x17f))/0x4+-parseInt(_0x11948a(0x180))/0x5+-parseInt(_0x11948a(0x17e))/0x6+-parseInt(_0x11948a(0x181))/0x7+-parseInt(_0x11948a(0x182))/0x8*(-parseInt(_0x11948a(0x17a))/0x9);if(_0x473fde===_0x253cbd)break;else _0x210a75['push'](_0x210a75['shift']());}catch(_0x290f6f){_0x210a75['push'](_0x210a75['shift']());}}}(a141_0xa11b,0x41305));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a141_0x534e(_0x4b76a8,_0x470bc3){_0x4b76a8=_0x4b76a8-0x17a;const _0xa11b48=a141_0xa11b();let _0x534e05=_0xa11b48[_0x4b76a8];return _0x534e05;}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_0xa11b(){const _0x1df427=['1803672xlgoJb','1108496RYqKcb','720320kNJRjZ','3436755UQCrRK','1182976jMHUiV','18Ozcjnj','12ucnaTR','687084VOmoAM','66793TWvjBE'];a141_0xa11b=function(){return _0x1df427;};return a141_0xa11b();}
|