@lovrabet/rabetbase-cli 2.5.0-beta.4 → 2.5.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a130_0x31de9a=a130_0x1cee;function a130_0x1cee(_0x413871,_0x4a34c1){_0x413871=_0x413871-0xff;const _0x175d6c=a130_0x175d();let _0x1cee17=_0x175d6c[_0x413871];return _0x1cee17;}(function(_0x42d02b,_0x41852d){const _0xf83a40=a130_0x1cee,_0x2faaf0=_0x42d02b();while(!![]){try{const _0x246d42=-parseInt(_0xf83a40(0x10c))/0x1+-parseInt(_0xf83a40(0x111))/0x2+-parseInt(_0xf83a40(0x12b))/0x3+-parseInt(_0xf83a40(0x11b))/0x4*(-parseInt(_0xf83a40(0x118))/0x5)+-parseInt(_0xf83a40(0x12d))/0x6*(-parseInt(_0xf83a40(0x123))/0x7)+parseInt(_0xf83a40(0x12c))/0x8*(parseInt(_0xf83a40(0x122))/0x9)+parseInt(_0xf83a40(0x112))/0xa;if(_0x246d42===_0x41852d)break;else _0x2faaf0['push'](_0x2faaf0['shift']());}catch(_0x1efc15){_0x2faaf0['push'](_0x2faaf0['shift']());}}}(a130_0x175d,0x56cab));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a130_0x175d(){const _0x2a7b4f=['parse',':\x20expected\x20a\x20non-empty\x20string.','dryRun','cssUrl','cwd','1835zvusIx','has','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','3200aivDAk','map','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','No\x20local\x20pages\x20matched\x20paths:\x20','keys','--params.','\x0a\x20\x20Available\x20local\x20paths:\x20','109017vgDuDg','7FUseNs','message','filter','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','import','string','CSS\x20URL\x20is\x20unreachable:\x20','hasOwn','534456atjdVf','224xoWGUN','1255698PpzXoi','trim','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','Invalid\x20--params\x20fields:\x20','JS\x20URL\x20is\x20unreachable:\x20','Invalid\x20--params.','join','path','info','menu-sync','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','procode','Start\x20non-interactive\x20menu\x20sync','Menu\x20sync\x20completed','69674pDavMm','pages','jsUrl','length','push','664074ewwikZ','933150beYpuG'];a130_0x175d=function(){return _0x2a7b4f;};return a130_0x175d();}import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set(['jsUrl',a130_0x31de9a(0x116)]);function validateParams(_0x1db3b6){const _0x5977e8=a130_0x31de9a,_0xc25705=[];return _0x1db3b6[_0x5977e8(0x10e)]&&!isValidJsHttpsUrl(_0x1db3b6[_0x5977e8(0x10e)])&&_0xc25705[_0x5977e8(0x110)]({'field':_0x5977e8(0x10e),'message':_0x5977e8(0x108)}),_0x1db3b6[_0x5977e8(0x116)]&&!isValidCssHttpsUrl(_0x1db3b6['cssUrl'])&&_0xc25705[_0x5977e8(0x110)]({'field':'cssUrl','message':_0x5977e8(0x100)}),_0xc25705;}export async function runMenuSyncCore(_0xbc0a3a,_0x171930,_0x13f77d=[],_0x29e5d0,_0x17101b={}){const _0x5c8f96=a130_0x31de9a,_0x1b85e1=parseMenuSyncParams(_0x29e5d0),_0x486ed2=[...new Set(_0x13f77d[_0x5c8f96(0x11c)](_0x2df3c1=>_0x2df3c1[_0x5c8f96(0xff)]())['filter'](Boolean))],_0x465c78=_0x1b85e1[_0x5c8f96(0x10e)],_0x442ab0=_0x1b85e1[_0x5c8f96(0x116)],_0x1db85a=[];if(_0x465c78)_0x1db85a[_0x5c8f96(0x110)](_0x465c78);if(_0x442ab0)_0x1db85a[_0x5c8f96(0x110)](_0x442ab0);const _0x486bb1=validateParams(_0x1b85e1);if(_0x486bb1['length']>0x0){const _0x119e53=_0x486bb1[_0x5c8f96(0x11c)](_0x31f1eb=>_0x5c8f96(0x120)+_0x31f1eb['field']+':\x20'+_0x31f1eb[_0x5c8f96(0x124)])[_0x5c8f96(0x104)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x119e53);}logger['setLogPath'](process[_0x5c8f96(0x117)]()),logger['info']('menu-sync',_0x5c8f96(0x10a),{'appCode':_0xbc0a3a,'selectedCount':_0x486ed2['length'],'jsUrl':_0x465c78,'cssUrl':_0x442ab0});if(_0x465c78){const _0x26e456=await isUrlReachable(_0x465c78);if(!_0x26e456)throw new Error(_0x5c8f96(0x102)+_0x465c78);}if(_0x442ab0){const _0x40cca3=await isUrlReachable(_0x442ab0);if(!_0x40cca3)throw new Error(_0x5c8f96(0x129)+_0x442ab0);}const _0x3ce8af=getLocalPages();if(_0x3ce8af['length']===0x0){if(_0x486ed2[_0x5c8f96(0x10f)]>0x0)throw new Error(_0x5c8f96(0x11e)+_0x486ed2[_0x5c8f96(0x104)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x17101b[_0x5c8f96(0x115)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x3c5c9e=await getOnlineMenuList(_0xbc0a3a,_0x171930),_0x171f06=new Set(_0x3c5c9e['map'](_0x5994b4=>_0x5994b4[_0x5c8f96(0x105)]));let _0x110633;if(_0x486ed2[_0x5c8f96(0x10f)]>0x0){const _0x4b0658=new Map(_0x3ce8af[_0x5c8f96(0x11c)](_0x14ed61=>[_0x14ed61['path'],_0x14ed61])),_0x34d553=_0x486ed2[_0x5c8f96(0x125)](_0x599043=>!_0x4b0658['has'](_0x599043));if(_0x34d553[_0x5c8f96(0x10f)]>0x0){const _0x2d00ea=_0x3ce8af[_0x5c8f96(0x11c)](_0x43cfd3=>_0x43cfd3[_0x5c8f96(0x105)])['join'](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x34d553['join'](',\x20')+_0x5c8f96(0x121)+_0x2d00ea);}const _0x214afd=_0x486ed2['filter'](_0x24611d=>_0x171f06['has'](_0x24611d));if(_0x214afd['length']>0x0)throw new Error(_0x5c8f96(0x11a)+_0x214afd[_0x5c8f96(0x104)](',\x20'));_0x110633=_0x486ed2[_0x5c8f96(0x11c)](_0x35e8e3=>_0x4b0658['get'](_0x35e8e3));}else _0x110633=_0x3ce8af['filter'](_0x332413=>!_0x171f06['has'](_0x332413[_0x5c8f96(0x105)]));if(_0x110633[_0x5c8f96(0x10f)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x17101b[_0x5c8f96(0x115)]===!![],'targetPages':[],'plannedMenus':[]};const _0x295f23=_0x110633[_0x5c8f96(0x11c)](_0x1cd6a3=>({'type':_0x5c8f96(0x109),'path':_0x1cd6a3[_0x5c8f96(0x105)],'label':_0x1cd6a3['label'],'loadScriptMode':_0x5c8f96(0x127),'resources':[..._0x1db85a]}));if(_0x17101b['dryRun'])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x110633,'plannedMenus':_0x295f23};const _0x3da184=await createMenus(_0xbc0a3a,_0x171930,_0x110633,_0x1db85a[_0x5c8f96(0x10f)]>0x0?_0x1db85a:undefined);return logger[_0x5c8f96(0x106)](_0x5c8f96(0x107),_0x5c8f96(0x10b),{'count':_0x110633[_0x5c8f96(0x10f)],'resources':_0x1db85a}),{'created':_0x3da184[_0x5c8f96(0x10f)],'skipped':![],'dryRun':![],'targetPages':_0x110633,'plannedMenus':_0x295f23,'menus':_0x3da184};}export function parseMenuSyncParams(_0x2d3aef){const _0x5e7b72=a130_0x31de9a;if(!_0x2d3aef||typeof _0x2d3aef!=='string')return{};let _0x18dbe7;try{_0x18dbe7=JSON[_0x5e7b72(0x113)](_0x2d3aef);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x18dbe7!=='object'||_0x18dbe7===null||Array['isArray'](_0x18dbe7))throw new Error(_0x5e7b72(0x126));const _0x16670d=_0x18dbe7;if(Object[_0x5e7b72(0x12a)](_0x16670d,_0x5e7b72(0x10d)))throw new Error(_0x5e7b72(0x11d));const _0x438fc0=Object[_0x5e7b72(0x11f)](_0x16670d)[_0x5e7b72(0x125)](_0x579c03=>!MENU_SYNC_PARAM_KEYS[_0x5e7b72(0x119)](_0x579c03));if(_0x438fc0['length']>0x0)throw new Error(_0x5e7b72(0x101)+_0x438fc0['join'](',\x20')+'.');for(const _0x253095 of MENU_SYNC_PARAM_KEYS){const _0x510b9e=_0x16670d[_0x253095];if(_0x510b9e!==undefined&&(typeof _0x510b9e!==_0x5e7b72(0x128)||_0x510b9e[_0x5e7b72(0xff)]()===''))throw new Error(_0x5e7b72(0x103)+_0x253095+_0x5e7b72(0x114));}return{'jsUrl':typeof _0x16670d[_0x5e7b72(0x10e)]===_0x5e7b72(0x128)?_0x16670d['jsUrl'][_0x5e7b72(0xff)]():undefined,'cssUrl':typeof _0x16670d['cssUrl']===_0x5e7b72(0x128)?_0x16670d[_0x5e7b72(0x116)][_0x5e7b72(0xff)]():undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4b1f8d,_0x321573){const _0x2188e5=a132_0x14a1,_0x21f9f1=_0x4b1f8d();while(!![]){try{const _0xbcfac2=-parseInt(_0x2188e5(0x9f))/0x1+-parseInt(_0x2188e5(0xb2))/0x2*(parseInt(_0x2188e5(0x98))/0x3)+-parseInt(_0x2188e5(0x7d))/0x4*(-parseInt(_0x2188e5(0xa3))/0x5)+parseInt(_0x2188e5(0x81))/0x6*(-parseInt(_0x2188e5(0x84))/0x7)+parseInt(_0x2188e5(0xb9))/0x8*(parseInt(_0x2188e5(0x7f))/0x9)+-parseInt(_0x2188e5(0xad))/0xa*(-parseInt(_0x2188e5(0xc1))/0xb)+parseInt(_0x2188e5(0xbe))/0xc;if(_0xbcfac2===_0x321573)break;else _0x21f9f1['push'](_0x21f9f1['shift']());}catch(_0xd2d6c4){_0x21f9f1['push'](_0x21f9f1['shift']());}}}(a132_0x586d,0x415dd));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(_0x469592){const _0x17021b=a132_0x14a1,_0x5e9718=[];return _0x469592[_0x17021b(0xab)]&&!isValidJsHttpsUrl(_0x469592[_0x17021b(0xab)])&&_0x5e9718[_0x17021b(0x97)]({'field':_0x17021b(0xab),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x469592['cssUrl']&&!isValidCssHttpsUrl(_0x469592[_0x17021b(0xaf)])&&_0x5e9718['push']({'field':_0x17021b(0xaf),'message':_0x17021b(0xbb)}),_0x5e9718;}export async function runMenuUpdateCore(_0x84c92e,_0x23d5d3,_0x5052d6,_0x1fa312={}){const _0x106186=a132_0x14a1,_0x2b495a=parseUpdateParamsFlag(_0x5052d6),_0x6d8e27=normalizeMode(_0x1fa312[_0x106186(0xbd)]);validateSelection(_0x1fa312[_0x106186(0x8d)]);const _0x50f876=[];if(_0x2b495a[_0x106186(0xab)])_0x50f876['push'](_0x2b495a[_0x106186(0xab)]);if(_0x2b495a[_0x106186(0xaf)])_0x50f876[_0x106186(0x97)](_0x2b495a[_0x106186(0xaf)]);const _0x5a07e5=validateParams(_0x2b495a);if(_0x5a07e5[_0x106186(0xb4)]>0x0){const _0xb445d0=_0x5a07e5[_0x106186(0xbc)](_0x4a4edd=>_0x106186(0xa7)+_0x4a4edd[_0x106186(0xa2)]+':\x20'+_0x4a4edd['message'])[_0x106186(0x9b)](';\x20');throw new Error(_0x106186(0xb3)+_0xb445d0);}if(_0x50f876[_0x106186(0xb4)]===0x0)throw new Error(_0x106186(0x95)+_0x106186(0x9d));logger[_0x106186(0x7b)](process[_0x106186(0x8f)]()),logger['info']('menu-asset-update','Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x84c92e,'jsUrl':_0x2b495a['jsUrl'],'cssUrl':_0x2b495a[_0x106186(0xaf)],'mode':_0x6d8e27,'dryRun':_0x1fa312['dryRun']===!![]});if(_0x2b495a[_0x106186(0xab)]){const _0x15affc=await isUrlReachable(_0x2b495a[_0x106186(0xab)]);if(!_0x15affc)throw new Error(_0x106186(0x9a)+_0x2b495a[_0x106186(0xab)]);}if(_0x2b495a['cssUrl']){const _0x565a68=await isUrlReachable(_0x2b495a['cssUrl']);if(!_0x565a68)throw new Error(_0x106186(0x96)+_0x2b495a[_0x106186(0xaf)]);}const _0x40e2c6=await getOnlineMenuList(_0x84c92e,_0x23d5d3),_0x584894=_0x40e2c6[_0x106186(0x91)](_0xc0dc74=>_0xc0dc74[_0x106186(0xa9)][_0x106186(0xb4)]>0x0),_0x4fce11=selectMenusForUpdate(_0x584894,_0x1fa312[_0x106186(0x8d)]);if(_0x4fce11['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x1fa312[_0x106186(0xa4)]===!![]};const _0x19ffb9=_0x4fce11[_0x106186(0xbc)](_0x124d29=>buildMenuUpdateDiff(_0x124d29,_0x2b495a,_0x6d8e27,_0x1fa312['force']===!![],_0x1fa312['loadScriptMode']));if(_0x1fa312[_0x106186(0xa4)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x19ffb9};const _0x1a5f95=await Promise[_0x106186(0x8a)](_0x4fce11[_0x106186(0xbc)]((_0x40ee78,_0x63ee5f)=>updateMenuCdnUrl(_0x84c92e,_0x23d5d3,{'id':_0x40ee78['id'],'label':_0x40ee78[_0x106186(0xb8)],'path':_0x40ee78[_0x106186(0xb6)],'resources':_0x19ffb9[_0x63ee5f][_0x106186(0x9e)][_0x106186(0xa9)],'extend':_0x40ee78[_0x106186(0xa1)]??null,'loadScriptMode':_0x1fa312[_0x106186(0x8e)]}))),_0x25bbea=_0x1a5f95[_0x106186(0x91)](_0x15dd80=>_0x15dd80['status']===_0x106186(0x7a))[_0x106186(0xbc)](_0x578033=>_0x578033[_0x106186(0xb5)]),_0x4d5ad9=_0x1a5f95['filter'](_0x4de617=>_0x4de617[_0x106186(0x9c)]===_0x106186(0x86))[_0x106186(0xb4)];return logger[_0x106186(0x82)](_0x106186(0xbf),_0x106186(0x83),{'count':_0x4fce11[_0x106186(0xb4)],'resources':_0x50f876}),{'updated':_0x25bbea['length'],'failed':_0x4d5ad9,'skipped':![],'menus':_0x25bbea};}function validateSelection(_0x55f86d){const _0x4b0ecd=a132_0x14a1;if(!_0x55f86d)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x55f86d[_0x4b0ecd(0xa8)]&&(_0x55f86d[_0x4b0ecd(0x93)][_0x4b0ecd(0xb4)]>0x0||_0x55f86d[_0x4b0ecd(0xba)][_0x4b0ecd(0xb4)]>0x0))throw new Error(_0x4b0ecd(0x8c));if(!_0x55f86d[_0x4b0ecd(0xa8)]&&_0x55f86d['menuIds'][_0x4b0ecd(0xb4)]===0x0&&_0x55f86d[_0x4b0ecd(0xba)]['length']===0x0)throw new Error(_0x4b0ecd(0xa0));}export function selectMenusForUpdate(_0x572d45,_0x26b26e){const _0x270c49=a132_0x14a1;validateSelection(_0x26b26e);if(_0x26b26e['all'])return _0x572d45;const _0x34c54e=new Set(_0x572d45[_0x270c49(0xbc)](_0x504666=>_0x504666['id'])),_0x53d94b=new Set(_0x572d45[_0x270c49(0xbc)](_0xef50b=>_0xef50b[_0x270c49(0xb6)])),_0x24a33f=_0x26b26e[_0x270c49(0x93)][_0x270c49(0x91)](_0x2ccd08=>!_0x34c54e[_0x270c49(0x7c)](_0x2ccd08)),_0x4ec8ee=_0x26b26e[_0x270c49(0xba)]['filter'](_0x16d5b6=>!_0x53d94b[_0x270c49(0x7c)](_0x16d5b6));if(_0x24a33f[_0x270c49(0xb4)]>0x0||_0x4ec8ee[_0x270c49(0xb4)]>0x0){const _0x113ac6=[..._0x24a33f[_0x270c49(0xbc)](_0x152f58=>String(_0x152f58)),..._0x4ec8ee][_0x270c49(0x9b)](',\x20');throw new Error(_0x270c49(0x94)+_0x113ac6);}const _0x4267b2=new Set(_0x26b26e[_0x270c49(0x93)]),_0x2aa9c4=new Set(_0x26b26e[_0x270c49(0xba)]);return _0x572d45['filter'](_0x6ba84f=>_0x4267b2[_0x270c49(0x7c)](_0x6ba84f['id'])||_0x2aa9c4[_0x270c49(0x7c)](_0x6ba84f['path']));}function normalizeMode(_0x4c2af3){const _0x1e45d2=a132_0x14a1;if(!_0x4c2af3)return _0x1e45d2(0x99);if(_0x4c2af3===_0x1e45d2(0x90)||_0x4c2af3===_0x1e45d2(0x99))return _0x4c2af3;throw new Error(_0x1e45d2(0x79)+_0x4c2af3+_0x1e45d2(0x89));}function buildMenuUpdateDiff(_0x17d71c,_0x1f7d44,_0x5adbd8,_0x482c54,_0x1422ee){const _0x21e783=a132_0x14a1,_0x4aa501=[..._0x17d71c['resources']];_0x5adbd8===_0x21e783(0x99)&&assertUnambiguousPatchResources(_0x17d71c,_0x4aa501,_0x1f7d44);const _0xb28a21=_0x5adbd8===_0x21e783(0x99)?patchResources(_0x4aa501,_0x1f7d44):replaceResources(_0x1f7d44),_0x168669=[],_0x50a096=_0x4aa501[_0x21e783(0x85)](isJsResource),_0x5465fc=_0xb28a21[_0x21e783(0x85)](isJsResource);if(_0x50a096&&!_0x5465fc){const _0xdb598d='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x17d71c[_0x21e783(0xb8)]+_0x21e783(0x92)+_0x17d71c[_0x21e783(0xb6)]+_0x21e783(0xb7)+_0x21e783(0xa6);if(!_0x482c54)throw new Error(_0xdb598d);_0x168669['push'](_0xdb598d);}const _0x7d05af=_0x4aa501[_0x21e783(0x85)](isCssResource),_0x4aa901=_0xb28a21['some'](isCssResource);_0x7d05af&&!_0x4aa901&&_0x168669[_0x21e783(0x97)](_0x21e783(0x87)+_0x17d71c['label']+_0x21e783(0x92)+_0x17d71c['path']+').');const _0x35eff3=typeof _0x17d71c['extend']?.[_0x21e783(0x8e)]==='string'?_0x17d71c[_0x21e783(0xa1)][_0x21e783(0x8e)]:null,_0x44ebe3=_0x1422ee?{'loadScriptMode':_0x35eff3}:{},_0x14e03a=_0x1422ee?{'loadScriptMode':_0x1422ee}:{};return{'id':_0x17d71c['id'],'label':_0x17d71c[_0x21e783(0xb8)],'path':_0x17d71c[_0x21e783(0xb6)],'mode':_0x5adbd8,'before':{'resources':_0x4aa501,..._0x44ebe3},'after':{'resources':_0xb28a21,..._0x14e03a},'warnings':_0x168669};}function replaceResources(_0x2f7852){const _0x519e98=a132_0x14a1;return[_0x2f7852[_0x519e98(0xab)],_0x2f7852[_0x519e98(0xaf)]]['filter'](_0xab3c09=>!!_0xab3c09);}function assertUnambiguousPatchResources(_0x2e04a7,_0x21ec82,_0x50c86e){const _0xdf4bf9=a132_0x14a1,_0x4301d7=_0x21ec82[_0xdf4bf9(0x91)](isJsResource)[_0xdf4bf9(0xb4)];if(_0x50c86e['jsUrl']&&_0x4301d7>0x1)throw new Error(_0xdf4bf9(0x7e)+_0x4301d7+_0xdf4bf9(0xaa)+_0x2e04a7[_0xdf4bf9(0xb8)]+'\x22\x20('+_0x2e04a7[_0xdf4bf9(0xb6)]+')\x20'+_0xdf4bf9(0xa5));const _0x53f099=_0x21ec82[_0xdf4bf9(0x91)](isCssResource)[_0xdf4bf9(0xb4)];if(_0x50c86e[_0xdf4bf9(0xaf)]&&_0x53f099>0x1)throw new Error(_0xdf4bf9(0x7e)+_0x53f099+_0xdf4bf9(0x80)+_0x2e04a7[_0xdf4bf9(0xb8)]+_0xdf4bf9(0x92)+_0x2e04a7[_0xdf4bf9(0xb6)]+')\x20'+_0xdf4bf9(0xb0));}function patchResources(_0x31473a,_0xb1aa5f){const _0x383f8d=a132_0x14a1;let _0x2e94c9=![],_0x26e59c=![];const _0x5ee0d1=[];for(const _0x7eb4f1 of _0x31473a){if(isJsResource(_0x7eb4f1)){if(_0xb1aa5f[_0x383f8d(0xab)]&&!_0x2e94c9)_0x5ee0d1[_0x383f8d(0x97)](_0xb1aa5f['jsUrl']),_0x2e94c9=!![];else!_0xb1aa5f[_0x383f8d(0xab)]&&_0x5ee0d1['push'](_0x7eb4f1);continue;}if(isCssResource(_0x7eb4f1)){if(_0xb1aa5f[_0x383f8d(0xaf)]&&!_0x26e59c)_0x5ee0d1[_0x383f8d(0x97)](_0xb1aa5f[_0x383f8d(0xaf)]),_0x26e59c=!![];else!_0xb1aa5f[_0x383f8d(0xaf)]&&_0x5ee0d1[_0x383f8d(0x97)](_0x7eb4f1);continue;}_0x5ee0d1[_0x383f8d(0x97)](_0x7eb4f1);}return _0xb1aa5f[_0x383f8d(0xab)]&&!_0x2e94c9&&_0x5ee0d1['unshift'](_0xb1aa5f['jsUrl']),_0xb1aa5f[_0x383f8d(0xaf)]&&!_0x26e59c&&_0x5ee0d1['push'](_0xb1aa5f[_0x383f8d(0xaf)]),_0x5ee0d1;}function isJsResource(_0x35d209){const _0x3cb83f=a132_0x14a1;return stripQuery(_0x35d209)[_0x3cb83f(0xc0)]()[_0x3cb83f(0xac)](_0x3cb83f(0x88));}function isCssResource(_0x3534a4){const _0x5460f5=a132_0x14a1;return stripQuery(_0x3534a4)[_0x5460f5(0xc0)]()[_0x5460f5(0xac)]('.css');}function stripQuery(_0x17bc5e){return _0x17bc5e['split']('?')[0x0]??_0x17bc5e;}function parseUpdateParamsFlag(_0x1000f1){const _0x16892a=a132_0x14a1;if(!_0x1000f1||typeof _0x1000f1!==_0x16892a(0x8b))return{};try{const _0x1f8755=JSON['parse'](_0x1000f1);if(typeof _0x1f8755!=='object'||_0x1f8755===null||Array[_0x16892a(0xb1)](_0x1f8755))return{};return{'jsUrl':typeof _0x1f8755[_0x16892a(0xab)]===_0x16892a(0x8b)?_0x1f8755['jsUrl'][_0x16892a(0xae)]():undefined,'cssUrl':typeof _0x1f8755['cssUrl']===_0x16892a(0x8b)?_0x1f8755[_0x16892a(0xaf)][_0x16892a(0xae)]():undefined};}catch{return{};}}function a132_0x14a1(_0x3254e3,_0x3a140e){_0x3254e3=_0x3254e3-0x79;const _0x586d6e=a132_0x586d();let _0x14a11b=_0x586d6e[_0x3254e3];return _0x14a11b;}function a132_0x586d(){const _0x1e8704=['1131092JfizKN','menu\x20asset-update\x20cannot\x20patch\x20','1605069RKTjjG','\x20existing\x20CSS\x20resources\x20for\x20\x22','300450RJSoer','info','Menu\x20asset\x20update\x20completed','35hQCMUw','some','rejected','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','.js','.\x20Allowed\x20values:\x20replace,\x20patch','allSettled','string','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','selection','loadScriptMode','cwd','replace','filter','\x22\x20(','menuIds','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','CSS\x20URL\x20is\x20unreachable:\x20','push','3aiqrwv','patch','JS\x20URL\x20is\x20unreachable:\x20','join','status','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','after','403815TVRrHx','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','extend','field','5VkqUyl','dryRun','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','--params.','all','resources','\x20existing\x20JS\x20resources\x20for\x20\x22','jsUrl','endsWith','10spcWNV','trim','cssUrl','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','isArray','1035750xJxLsJ','Invalid\x20--params:\x20','length','value','path',').\x20','label','24GfVUqs','paths','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','map','mode','6608988iNhNuW','menu-asset-update','toLowerCase','783871vFVMZT','Invalid\x20--mode:\x20','fulfilled','setLogPath','has'];a132_0x586d=function(){return _0x1e8704;};return a132_0x586d();}
|
|
1
|
+
(function(_0x298ebf,_0x30be09){const _0x311728=a132_0x5ddc,_0x47c7a6=_0x298ebf();while(!![]){try{const _0x59bb94=-parseInt(_0x311728(0x1e8))/0x1*(-parseInt(_0x311728(0x1d5))/0x2)+-parseInt(_0x311728(0x1b3))/0x3+parseInt(_0x311728(0x1b1))/0x4+-parseInt(_0x311728(0x1c4))/0x5+parseInt(_0x311728(0x1ef))/0x6*(parseInt(_0x311728(0x1d6))/0x7)+parseInt(_0x311728(0x1ee))/0x8+parseInt(_0x311728(0x1f4))/0x9*(-parseInt(_0x311728(0x1f6))/0xa);if(_0x59bb94===_0x30be09)break;else _0x47c7a6['push'](_0x47c7a6['shift']());}catch(_0x8b03d7){_0x47c7a6['push'](_0x47c7a6['shift']());}}}(a132_0x2bef,0xce993));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a132_0x5ddc(_0x4f6ea7,_0x44dde1){_0x4f6ea7=_0x4f6ea7-0x1ad;const _0x2bef14=a132_0x2bef();let _0x5ddc67=_0x2bef14[_0x4f6ea7];return _0x5ddc67;}import{logger}from'../../../utils/logger.js';function validateParams(_0x421053){const _0x4e858e=a132_0x5ddc,_0x529eb1=[];return _0x421053[_0x4e858e(0x1e5)]&&!isValidJsHttpsUrl(_0x421053[_0x4e858e(0x1e5)])&&_0x529eb1[_0x4e858e(0x1f1)]({'field':_0x4e858e(0x1e5),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x421053[_0x4e858e(0x1ce)]&&!isValidCssHttpsUrl(_0x421053[_0x4e858e(0x1ce)])&&_0x529eb1[_0x4e858e(0x1f1)]({'field':_0x4e858e(0x1ce),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x529eb1;}export async function runMenuUpdateCore(_0x4634cf,_0x570801,_0x5a3f2b,_0x3e4515={}){const _0x54686a=a132_0x5ddc,_0x9496a1=parseUpdateParamsFlag(_0x5a3f2b),_0x2cc0cc=normalizeMode(_0x3e4515['mode']);validateSelection(_0x3e4515[_0x54686a(0x1f3)]);const _0xed686c=[];if(_0x9496a1[_0x54686a(0x1e5)])_0xed686c[_0x54686a(0x1f1)](_0x9496a1[_0x54686a(0x1e5)]);if(_0x9496a1[_0x54686a(0x1ce)])_0xed686c[_0x54686a(0x1f1)](_0x9496a1[_0x54686a(0x1ce)]);const _0x387238=validateParams(_0x9496a1);if(_0x387238['length']>0x0){const _0x27cc85=_0x387238[_0x54686a(0x1f5)](_0x3ed811=>'--params.'+_0x3ed811['field']+':\x20'+_0x3ed811[_0x54686a(0x1ed)])[_0x54686a(0x1e4)](';\x20');throw new Error(_0x54686a(0x1e7)+_0x27cc85);}if(_0xed686c[_0x54686a(0x1d9)]===0x0)throw new Error(_0x54686a(0x1d7)+_0x54686a(0x1de));logger[_0x54686a(0x1dd)](process[_0x54686a(0x1ae)]()),logger['info']('menu-asset-update',_0x54686a(0x1c8),{'appCode':_0x4634cf,'jsUrl':_0x9496a1[_0x54686a(0x1e5)],'cssUrl':_0x9496a1[_0x54686a(0x1ce)],'mode':_0x2cc0cc,'dryRun':_0x3e4515[_0x54686a(0x1ca)]===!![]});if(_0x9496a1[_0x54686a(0x1e5)]){const _0x15dee3=await isUrlReachable(_0x9496a1[_0x54686a(0x1e5)]);if(!_0x15dee3)throw new Error(_0x54686a(0x1cc)+_0x9496a1['jsUrl']);}if(_0x9496a1[_0x54686a(0x1ce)]){const _0x24b981=await isUrlReachable(_0x9496a1['cssUrl']);if(!_0x24b981)throw new Error(_0x54686a(0x1c3)+_0x9496a1[_0x54686a(0x1ce)]);}const _0x32586c=await getOnlineMenuList(_0x4634cf,_0x570801),_0x37a338=_0x32586c[_0x54686a(0x1e3)](_0x168cc7=>_0x168cc7[_0x54686a(0x1af)][_0x54686a(0x1d9)]>0x0),_0x42ed21=selectMenusForUpdate(_0x37a338,_0x3e4515['selection']);if(_0x42ed21[_0x54686a(0x1d9)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x3e4515['dryRun']===!![]};const _0x682ed3=_0x42ed21[_0x54686a(0x1f5)](_0x1f7645=>buildMenuUpdateDiff(_0x1f7645,_0x9496a1,_0x2cc0cc,_0x3e4515[_0x54686a(0x1c6)]===!![],_0x3e4515['loadScriptMode']));if(_0x3e4515['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x682ed3};const _0xb69df7=await Promise[_0x54686a(0x1d2)](_0x42ed21['map']((_0x787535,_0x232f34)=>updateMenuCdnUrl(_0x4634cf,_0x570801,{'id':_0x787535['id'],'label':_0x787535[_0x54686a(0x1bf)],'path':_0x787535[_0x54686a(0x1db)],'resources':_0x682ed3[_0x232f34][_0x54686a(0x1c1)][_0x54686a(0x1af)],'extend':_0x787535[_0x54686a(0x1f0)]??null,'loadScriptMode':_0x3e4515[_0x54686a(0x1eb)]}))),_0x1b25b8=_0xb69df7['filter'](_0x1fbcfc=>_0x1fbcfc[_0x54686a(0x1f2)]===_0x54686a(0x1c5))[_0x54686a(0x1f5)](_0x56223f=>_0x56223f[_0x54686a(0x1ea)]),_0x4f1efa=_0xb69df7[_0x54686a(0x1e3)](_0x286c57=>_0x286c57['status']===_0x54686a(0x1c7))['length'];return logger['info'](_0x54686a(0x1c9),_0x54686a(0x1bc),{'count':_0x42ed21['length'],'resources':_0xed686c}),{'updated':_0x1b25b8['length'],'failed':_0x4f1efa,'skipped':![],'menus':_0x1b25b8};}function validateSelection(_0x1cee1f){const _0x35a42e=a132_0x5ddc;if(!_0x1cee1f)throw new Error(_0x35a42e(0x1c2));if(_0x1cee1f[_0x35a42e(0x1cb)]&&(_0x1cee1f[_0x35a42e(0x1e2)][_0x35a42e(0x1d9)]>0x0||_0x1cee1f['paths'][_0x35a42e(0x1d9)]>0x0))throw new Error(_0x35a42e(0x1b4));if(!_0x1cee1f[_0x35a42e(0x1cb)]&&_0x1cee1f[_0x35a42e(0x1e2)][_0x35a42e(0x1d9)]===0x0&&_0x1cee1f['paths'][_0x35a42e(0x1d9)]===0x0)throw new Error(_0x35a42e(0x1c2));}export function selectMenusForUpdate(_0x19c8e1,_0x2ba186){const _0x4fc3bd=a132_0x5ddc;validateSelection(_0x2ba186);if(_0x2ba186[_0x4fc3bd(0x1cb)])return _0x19c8e1;const _0x13b2ef=new Set(_0x19c8e1[_0x4fc3bd(0x1f5)](_0x235a2e=>_0x235a2e['id'])),_0x2d4044=new Set(_0x19c8e1[_0x4fc3bd(0x1f5)](_0x11eaa0=>_0x11eaa0[_0x4fc3bd(0x1db)])),_0x203859=_0x2ba186[_0x4fc3bd(0x1e2)]['filter'](_0x211dd1=>!_0x13b2ef[_0x4fc3bd(0x1d8)](_0x211dd1)),_0x540832=_0x2ba186[_0x4fc3bd(0x1ec)]['filter'](_0x591913=>!_0x2d4044[_0x4fc3bd(0x1d8)](_0x591913));if(_0x203859[_0x4fc3bd(0x1d9)]>0x0||_0x540832['length']>0x0){const _0xccd8cb=[..._0x203859['map'](_0x544690=>String(_0x544690)),..._0x540832][_0x4fc3bd(0x1e4)](',\x20');throw new Error(_0x4fc3bd(0x1d1)+_0xccd8cb);}const _0x44a6d4=new Set(_0x2ba186['menuIds']),_0x5e2d26=new Set(_0x2ba186[_0x4fc3bd(0x1ec)]);return _0x19c8e1[_0x4fc3bd(0x1e3)](_0x1aec83=>_0x44a6d4[_0x4fc3bd(0x1d8)](_0x1aec83['id'])||_0x5e2d26['has'](_0x1aec83[_0x4fc3bd(0x1db)]));}function normalizeMode(_0x447b50){const _0x39f23c=a132_0x5ddc;if(!_0x447b50)return'patch';if(_0x447b50===_0x39f23c(0x1b9)||_0x447b50==='patch')return _0x447b50;throw new Error(_0x39f23c(0x1d3)+_0x447b50+_0x39f23c(0x1b2));}function buildMenuUpdateDiff(_0x586f62,_0x5b387b,_0x287b61,_0x4e9d93,_0x400c1f){const _0x5b3995=a132_0x5ddc,_0x41512a=[..._0x586f62['resources']];_0x287b61==='patch'&&assertUnambiguousPatchResources(_0x586f62,_0x41512a,_0x5b387b);const _0x5e9b85=_0x287b61===_0x5b3995(0x1dc)?patchResources(_0x41512a,_0x5b387b):replaceResources(_0x5b387b),_0x125f7e=[],_0x3b23a5=_0x41512a[_0x5b3995(0x1b7)](isJsResource),_0x356749=_0x5e9b85[_0x5b3995(0x1b7)](isJsResource);if(_0x3b23a5&&!_0x356749){const _0x3bd3a1=_0x5b3995(0x1c0)+_0x586f62[_0x5b3995(0x1bf)]+_0x5b3995(0x1ad)+_0x586f62[_0x5b3995(0x1db)]+_0x5b3995(0x1da)+_0x5b3995(0x1be);if(!_0x4e9d93)throw new Error(_0x3bd3a1);_0x125f7e[_0x5b3995(0x1f1)](_0x3bd3a1);}const _0x930fed=_0x41512a[_0x5b3995(0x1b7)](isCssResource),_0xa3b305=_0x5e9b85[_0x5b3995(0x1b7)](isCssResource);_0x930fed&&!_0xa3b305&&_0x125f7e[_0x5b3995(0x1f1)](_0x5b3995(0x1e6)+_0x586f62[_0x5b3995(0x1bf)]+_0x5b3995(0x1ad)+_0x586f62[_0x5b3995(0x1db)]+').');const _0x3aab7e=typeof _0x586f62[_0x5b3995(0x1f0)]?.[_0x5b3995(0x1eb)]==='string'?_0x586f62['extend'][_0x5b3995(0x1eb)]:null,_0x51eca8=_0x400c1f?{'loadScriptMode':_0x3aab7e}:{},_0x2562d4=_0x400c1f?{'loadScriptMode':_0x400c1f}:{};return{'id':_0x586f62['id'],'label':_0x586f62[_0x5b3995(0x1bf)],'path':_0x586f62['path'],'mode':_0x287b61,'before':{'resources':_0x41512a,..._0x51eca8},'after':{'resources':_0x5e9b85,..._0x2562d4},'warnings':_0x125f7e};}function replaceResources(_0x5089f4){const _0x227af2=a132_0x5ddc;return[_0x5089f4['jsUrl'],_0x5089f4[_0x227af2(0x1ce)]]['filter'](_0x16133b=>!!_0x16133b);}function assertUnambiguousPatchResources(_0x50becb,_0x47bd85,_0x543c60){const _0x3c747f=a132_0x5ddc,_0x3339fd=_0x47bd85[_0x3c747f(0x1e3)](isJsResource)[_0x3c747f(0x1d9)];if(_0x543c60[_0x3c747f(0x1e5)]&&_0x3339fd>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x3339fd+_0x3c747f(0x1cf)+_0x50becb['label']+_0x3c747f(0x1ad)+_0x50becb[_0x3c747f(0x1db)]+')\x20'+_0x3c747f(0x1bb));const _0x2943c6=_0x47bd85[_0x3c747f(0x1e3)](isCssResource)[_0x3c747f(0x1d9)];if(_0x543c60['cssUrl']&&_0x2943c6>0x1)throw new Error(_0x3c747f(0x1b0)+_0x2943c6+_0x3c747f(0x1e9)+_0x50becb[_0x3c747f(0x1bf)]+_0x3c747f(0x1ad)+_0x50becb[_0x3c747f(0x1db)]+')\x20'+_0x3c747f(0x1d0));}function patchResources(_0x5c3f6a,_0x2a55f2){const _0x29c576=a132_0x5ddc;let _0x2bbd53=![],_0xaee4a0=![];const _0x53e9ee=[];for(const _0x1f5aa5 of _0x5c3f6a){if(isJsResource(_0x1f5aa5)){if(_0x2a55f2['jsUrl']&&!_0x2bbd53)_0x53e9ee['push'](_0x2a55f2[_0x29c576(0x1e5)]),_0x2bbd53=!![];else!_0x2a55f2[_0x29c576(0x1e5)]&&_0x53e9ee[_0x29c576(0x1f1)](_0x1f5aa5);continue;}if(isCssResource(_0x1f5aa5)){if(_0x2a55f2['cssUrl']&&!_0xaee4a0)_0x53e9ee[_0x29c576(0x1f1)](_0x2a55f2[_0x29c576(0x1ce)]),_0xaee4a0=!![];else!_0x2a55f2['cssUrl']&&_0x53e9ee[_0x29c576(0x1f1)](_0x1f5aa5);continue;}_0x53e9ee[_0x29c576(0x1f1)](_0x1f5aa5);}return _0x2a55f2[_0x29c576(0x1e5)]&&!_0x2bbd53&&_0x53e9ee[_0x29c576(0x1bd)](_0x2a55f2[_0x29c576(0x1e5)]),_0x2a55f2[_0x29c576(0x1ce)]&&!_0xaee4a0&&_0x53e9ee[_0x29c576(0x1f1)](_0x2a55f2[_0x29c576(0x1ce)]),_0x53e9ee;}function isJsResource(_0x39eea8){const _0x27834b=a132_0x5ddc;return stripQuery(_0x39eea8)[_0x27834b(0x1cd)]()[_0x27834b(0x1d4)](_0x27834b(0x1b5));}function isCssResource(_0x1acfd7){const _0x553f6c=a132_0x5ddc;return stripQuery(_0x1acfd7)[_0x553f6c(0x1cd)]()[_0x553f6c(0x1d4)](_0x553f6c(0x1b8));}function stripQuery(_0x2d81a4){const _0x26cd0f=a132_0x5ddc;return _0x2d81a4[_0x26cd0f(0x1ba)]('?')[0x0]??_0x2d81a4;}function a132_0x2bef(){const _0x3c31dc=['toLowerCase','cssUrl','\x20existing\x20JS\x20resources\x20for\x20\x22','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','allSettled','Invalid\x20--mode:\x20','endsWith','217680ZbgTEQ','8751883XKSZhT','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','has','length',').\x20','path','patch','setLogPath','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','string','trim','parse','menuIds','filter','join','jsUrl','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','Invalid\x20--params:\x20','4agrfdC','\x20existing\x20CSS\x20resources\x20for\x20\x22','value','loadScriptMode','paths','message','1441512pIWfes','6VcNGKu','extend','push','status','selection','45TieHkx','map','1053410RdAngb','\x22\x20(','cwd','resources','menu\x20asset-update\x20cannot\x20patch\x20','4506788UtbDsq','.\x20Allowed\x20values:\x20replace,\x20patch','855390EyLwtY','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','.js','isArray','some','.css','replace','split','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','Menu\x20asset\x20update\x20completed','unshift','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','label','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','after','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','CSS\x20URL\x20is\x20unreachable:\x20','6672265nuibJA','fulfilled','force','rejected','Start\x20non-interactive\x20menu\x20asset\x20update','menu-asset-update','dryRun','all','JS\x20URL\x20is\x20unreachable:\x20'];a132_0x2bef=function(){return _0x3c31dc;};return a132_0x2bef();}function parseUpdateParamsFlag(_0x7d52fb){const _0x3576ff=a132_0x5ddc;if(!_0x7d52fb||typeof _0x7d52fb!=='string')return{};try{const _0x1d7483=JSON[_0x3576ff(0x1e1)](_0x7d52fb);if(typeof _0x1d7483!=='object'||_0x1d7483===null||Array[_0x3576ff(0x1b6)](_0x1d7483))return{};return{'jsUrl':typeof _0x1d7483[_0x3576ff(0x1e5)]===_0x3576ff(0x1df)?_0x1d7483[_0x3576ff(0x1e5)]['trim']():undefined,'cssUrl':typeof _0x1d7483[_0x3576ff(0x1ce)]===_0x3576ff(0x1df)?_0x1d7483[_0x3576ff(0x1ce)][_0x3576ff(0x1e0)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x285192,_0xe2fe07){const _0x1a8b14=a133_0xf121,_0x3a4916=_0x285192();while(!![]){try{const _0xbb9213=parseInt(_0x1a8b14(0x7f))/0x1+-parseInt(_0x1a8b14(0x7e))/0x2*(parseInt(_0x1a8b14(0x82))/0x3)+parseInt(_0x1a8b14(0x81))/0x4*(parseInt(_0x1a8b14(0x7a))/0x5)+parseInt(_0x1a8b14(0x7b))/0x6*(-parseInt(_0x1a8b14(0x7d))/0x7)+-parseInt(_0x1a8b14(0x80))/0x8*(-parseInt(_0x1a8b14(0x84))/0x9)+-parseInt(_0x1a8b14(0x78))/0xa+parseInt(_0x1a8b14(0x83))/0xb*(parseInt(_0x1a8b14(0x85))/0xc);if(_0xbb9213===_0xe2fe07)break;else _0x3a4916['push'](_0x3a4916['shift']());}catch(_0x3c34e3){_0x3a4916['push'](_0x3a4916['shift']());}}}(a133_0x498a,0xd30f9));function a133_0x498a(){const _0x459f2e=['12649593NLdWkJ','1665eoxuPX','12NthIYc','test','8240700pbREQU','HEAD','20atOCYR','6KGPHSg','trim','4048387uhzngF','4376yCJLMX','318006BBqFKt','54232IDvhHX','656336TrLvnB','1524BwEIWX'];a133_0x498a=function(){return _0x459f2e;};return a133_0x498a();}export function isValidJsHttpsUrl(_0x2b21d5){const _0x43633a=a133_0xf121;return/^https:\/\/.+\.js(\?.*)?$/[_0x43633a(0x77)](_0x2b21d5[_0x43633a(0x7c)]());}export function isValidCssHttpsUrl(_0x11b796){const _0x7216a1=a133_0xf121;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x11b796[_0x7216a1(0x7c)]());}function a133_0xf121(_0x33d6b4,_0xda8cba){_0x33d6b4=_0x33d6b4-0x77;const _0x498aeb=a133_0x498a();let _0xf121f3=_0x498aeb[_0x33d6b4];return _0xf121f3;}export async function isUrlReachable(_0x2b2d5b){const _0x22769a=a133_0xf121;try{const _0x3067f0=await fetch(_0x2b2d5b,{'method':_0x22769a(0x79)});return _0x3067f0['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a134_0xc7259d=a134_0x1a25;(function(_0x3d8d22,_0x1cbe99){const _0x5e1707=a134_0x1a25,_0x38b16d=_0x3d8d22();while(!![]){try{const _0x2ebacc=parseInt(_0x5e1707(0x1ea))/0x1+parseInt(_0x5e1707(0x1c7))/0x2+parseInt(_0x5e1707(0x1c6))/0x3+-parseInt(_0x5e1707(0x1d8))/0x4*(-parseInt(_0x5e1707(0x1de))/0x5)+-parseInt(_0x5e1707(0x1e2))/0x6*(parseInt(_0x5e1707(0x1aa))/0x7)+-parseInt(_0x5e1707(0x1cd))/0x8+-parseInt(_0x5e1707(0x1db))/0x9*(-parseInt(_0x5e1707(0x1af))/0xa);if(_0x2ebacc===_0x1cbe99)break;else _0x38b16d['push'](_0x38b16d['shift']());}catch(_0x1edb77){_0x38b16d['push'](_0x38b16d['shift']());}}}(a134_0x1fc2,0x40afc));import a134_0x2b3dde from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a134_0x1a25(_0x2ce062,_0x4dc1be){_0x2ce062=_0x2ce062-0x1a4;const _0x1fc267=a134_0x1fc2();let _0x1a25d9=_0x1fc267[_0x2ce062];return _0x1a25d9;}function a134_0x1fc2(){const _0xa0dab6=['onlineMenuList','\x20menu(s)\x20created','Would\x20create\x20','params','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','failed','paths','15044wiKVKR','\x20created.','flag','477mOHuID','\x20\x20Create\x20','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','365KXjjIF','filter','rawFlags','boolean','6zmjEKs','\x20local\x20microfrontend\x20menu(s).','size','trim','validation','yes','Pre-fill\x20JS/CSS\x20URLs.\x20','\x20menu(s)','375422BzujpL','selectedAppName','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','Menu\x20creation\x20failed','message','appCode','cookie','2844884xveUvW','write','length','yellow','Created\x20','32460LJBPbf','\x20created,\x20','string','Failed\x20to\x20fetch\x20online\x20menu\x20list','✓\x20Menu\x20sync\x20completed:\x20','targetPages','\x20menu(s)...','created','cyan','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Sync\x20local\x20pages\x20as\x20platform\x20menus','\x20\x20Cancelled.','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','Online\x20menu\x20list\x20fetched','str','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','POST','cssUrl','appcode','\x20menu(s)\x20with\x20JS:\x20','\x20page(s)','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','266034uzMRkQ','275830FzhxiE','skipped','Fetching\x20online\x20menu\x20list...','\x20and\x20CSS:\x20','map','Menu\x20sync\x20completed:\x20','3017904NVnyqG','jsUrl','Creating\x20','\x20\x20Continue\x20with\x20creation?'];a134_0x1fc2=function(){return _0xa0dab6;};return a134_0x1fc2();}import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':'sync','description':a134_0xc7259d(0x1ba),'risk':a134_0xc7259d(0x1ab),'flags':[{'name':a134_0xc7259d(0x1d4),'type':'string','description':a134_0xc7259d(0x1e8)+a134_0xc7259d(0x1c5)},{'name':'paths','type':a134_0xc7259d(0x1b1),'description':a134_0xc7259d(0x1b9)},{'name':a134_0xc7259d(0x1e7),'type':a134_0xc7259d(0x1e1),'description':'Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages'}],async 'dryRun'(_0x3e3165){const _0x388f93=a134_0xc7259d;ensureRunnableContext(_0x3e3165[_0x388f93(0x1e0)],_0x3e3165[_0x388f93(0x1a4)]);const _0x206587=await runMenuSyncCore(_0x3e3165[_0x388f93(0x1a8)],_0x3e3165[_0x388f93(0x1a9)],parsePaths(_0x3e3165['str']('paths')),_0x3e3165[_0x388f93(0x1be)](_0x388f93(0x1d4)),{'dryRun':!![]});return{'method':_0x388f93(0x1c0),'url':'/smartapi/menu/create','body':_0x206587,'description':_0x206587[_0x388f93(0x1c8)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0x388f93(0x1d3)+_0x206587[_0x388f93(0x1b4)][_0x388f93(0x1ac)]+_0x388f93(0x1e3)};},async 'execute'(_0x3fcbf5){const _0x501f19=a134_0xc7259d;ensureRunnableContext(_0x3fcbf5[_0x501f19(0x1e0)],_0x3fcbf5['selectedAppName']);const _0x1cfae0=_0x3fcbf5[_0x501f19(0x1da)](_0x501f19(0x1e7)),_0x27762f=_0x3fcbf5[_0x501f19(0x1be)](_0x501f19(0x1d4)),_0x361e75=parsePaths(_0x3fcbf5[_0x501f19(0x1be)](_0x501f19(0x1d7))),_0x4ce77a=parseMenuSyncParams(_0x27762f);if(_0x1cfae0){const _0x527861=await runMenuSyncCore(_0x3fcbf5[_0x501f19(0x1a8)],_0x3fcbf5[_0x501f19(0x1a9)],_0x361e75,_0x27762f);if(_0x527861[_0x501f19(0x1c8)]){const _0x121243=getLocalPages();_0x121243[_0x501f19(0x1ac)]===0x0?writeCliSideChannelLine(_0x501f19(0x1d5)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x501f19(0x1b3)+_0x527861['created']+_0x501f19(0x1d2));return{'ok':!![],'data':_0x527861,'message':_0x527861[_0x501f19(0x1c8)]?'Menu\x20sync\x20skipped':_0x501f19(0x1cc)+_0x527861['created']+_0x501f19(0x1d9)};}if(_0x361e75[_0x501f19(0x1ac)]>0x0)throw CliErrors[_0x501f19(0x1e6)](_0x501f19(0x1dd),_0x501f19(0x1b8));if(!isInteractive()&&_0x27762f)throw CliErrors[_0x501f19(0x1e6)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x501f19(0x1b8));requireInteractive();const _0x282806=startSpinner(_0x501f19(0x1c9));let _0x6a84b,_0x4fc7c2,_0x381af3;try{const _0x3ed2f0=await fetchMenuData(_0x3fcbf5[_0x501f19(0x1a8)],_0x3fcbf5[_0x501f19(0x1a9)]);_0x6a84b=_0x3ed2f0['localPages'],_0x4fc7c2=_0x3ed2f0['onlinePaths'],_0x381af3=_0x3ed2f0[_0x501f19(0x1d1)],stopSpinner(_0x282806,_0x501f19(0x1bd),!![]);}catch(_0x11936d){stopSpinner(_0x282806,_0x501f19(0x1b2),![]);throw CliErrors[_0x501f19(0x1e6)](_0x11936d instanceof Error?_0x11936d[_0x501f19(0x1a7)]:_0x501f19(0x1b2));}if(_0x6a84b[_0x501f19(0x1ac)]===0x0)return writeCliSideChannelLine(a134_0x2b3dde[_0x501f19(0x1ad)](_0x501f19(0x1bf))),{'ok':!![]};const _0x385a14=buildCompareRows(_0x6a84b,_0x4fc7c2);writeCliSideChannelLine(renderCompareTable(_0x385a14)),writeCliSideChannelLine('');const _0x37d8e5=await selectPages(_0x6a84b,_0x4fc7c2);writeCliSideChannelLine(''),writeCliSideChannelLine(a134_0x2b3dde[_0x501f19(0x1b7)]('\x20\x20✓\x20Selected:\x20'+_0x37d8e5[_0x501f19(0x1ac)]+_0x501f19(0x1c4)));const _0x469485=_0x4ce77a[_0x501f19(0x1ce)]&&_0x4ce77a['cssUrl'];if(!_0x469485){writeCliSideChannelLine(renderSyncSummary(_0x37d8e5,_0x4fc7c2[_0x501f19(0x1e4)]>0x0));const _0x4a53b0=await askConfirm(_0x501f19(0x1d0));if(!_0x4a53b0)return writeCliSideChannelLine(a134_0x2b3dde['gray']('\x20\x20Cancelled.')),{'ok':!![]};}let _0x5cc7ae=_0x4ce77a[_0x501f19(0x1ce)],_0x1bc033=_0x4ce77a[_0x501f19(0x1c1)];!_0x5cc7ae&&(_0x5cc7ae=await askJsUrl());!_0x1bc033&&(_0x1bc033=await askCssUrl());const _0x3de8d4=await askConfirm(_0x501f19(0x1dc)+_0x37d8e5[_0x501f19(0x1ac)]+_0x501f19(0x1c3)+_0x5cc7ae+_0x501f19(0x1ca)+_0x1bc033+'?');if(!_0x3de8d4)return writeCliSideChannelLine(a134_0x2b3dde['gray'](_0x501f19(0x1bb))),{'ok':!![]};const _0x5bd7df=[_0x5cc7ae,_0x1bc033],_0x47f8a4=startSpinner(_0x501f19(0x1cf)+_0x37d8e5[_0x501f19(0x1ac)]+_0x501f19(0x1b5));try{const _0x2aecb4=await doCreateMenus(_0x3fcbf5['appCode'],_0x3fcbf5['cookie'],_0x37d8e5,_0x5bd7df);return stopSpinner(_0x47f8a4,_0x501f19(0x1ae)+_0x2aecb4[_0x501f19(0x1b6)]+_0x501f19(0x1e9),!![]),{'ok':!![],'data':_0x2aecb4,'message':_0x501f19(0x1cc)+_0x2aecb4[_0x501f19(0x1b6)]+_0x501f19(0x1b0)+_0x2aecb4[_0x501f19(0x1d6)]+'\x20failed.'};}catch(_0x28e339){stopSpinner(_0x47f8a4,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x501f19(0x1e6)](_0x28e339 instanceof Error?_0x28e339['message']:_0x501f19(0x1a6));}}};function ensureRunnableContext(_0x72754e,_0x34447a){const _0x5c3cac=a134_0xc7259d,_0x5a422b=_0x72754e[_0x5c3cac(0x1c2)]?String(_0x72754e[_0x5c3cac(0x1c2)])[_0x5c3cac(0x1e5)]():'';if(!isInProject()&&!_0x34447a&&!_0x5a422b)throw CliErrors[_0x5c3cac(0x1e6)](_0x5c3cac(0x1a5)+_0x5c3cac(0x1bc));}function parsePaths(_0xa3a0dc){const _0xe84c09=a134_0xc7259d;return[...new Set(_0xa3a0dc['split'](',')[_0xe84c09(0x1cb)](_0xdefd56=>_0xdefd56['trim']())[_0xe84c09(0x1df)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a135_0x18bd11=a135_0x500f;(function(_0x530aa1,_0x351123){const _0x18b2dc=a135_0x500f,_0x440ad4=_0x530aa1();while(!![]){try{const _0x3ce120=parseInt(_0x18b2dc(0x1c7))/0x1*(parseInt(_0x18b2dc(0x1b5))/0x2)+parseInt(_0x18b2dc(0x1e9))/0x3*(-parseInt(_0x18b2dc(0x1c2))/0x4)+parseInt(_0x18b2dc(0x1a8))/0x5+parseInt(_0x18b2dc(0x1f0))/0x6+-parseInt(_0x18b2dc(0x202))/0x7+-parseInt(_0x18b2dc(0x197))/0x8+parseInt(_0x18b2dc(0x1eb))/0x9*(-parseInt(_0x18b2dc(0x1d1))/0xa);if(_0x3ce120===_0x351123)break;else _0x440ad4['push'](_0x440ad4['shift']());}catch(_0x352464){_0x440ad4['push'](_0x440ad4['shift']());}}}(a135_0x518b,0xe6077));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a135_0x500f(_0x39cc68,_0x30b1ec){_0x39cc68=_0x39cc68-0x193;const _0x518bea=a135_0x518b();let _0x500f32=_0x518bea[_0x39cc68];return _0x500f32;}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_0x18bd11(0x1b7),'path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':'menu','command':a135_0x18bd11(0x19c),'description':a135_0x18bd11(0x198),'risk':a135_0x18bd11(0x1aa),'structuredErrors':!![],'flags':[{'name':a135_0x18bd11(0x1a9),'type':a135_0x18bd11(0x1c4),'description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':a135_0x18bd11(0x1ec),'type':a135_0x18bd11(0x1c4),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a135_0x18bd11(0x1c6),'type':a135_0x18bd11(0x1fb),'required':!![],'description':a135_0x18bd11(0x1be)},{'name':a135_0x18bd11(0x1db),'type':a135_0x18bd11(0x1fb),'description':a135_0x18bd11(0x1ea)},{'name':'expected-count','type':a135_0x18bd11(0x1cb),'description':a135_0x18bd11(0x1b0)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x33cab4){parseInput(_0x33cab4),requireExplicitYes(_0x33cab4);},async 'dryRun'(_0x5bf97b){const _0x136084=a135_0x18bd11,_0x2d82d1=await buildPlan(_0x5bf97b,!![]),_0x56d3c4=_0x2d82d1[_0x136084(0x1d8)][_0x136084(0x1ef)]?.[_0x136084(0x1ae)]??0x0,_0x2cf64d=_0x2d82d1['plan'][_0x136084(0x1b9)][_0x136084(0x1ae)]-_0x56d3c4;return menuDryRunResult(_0x2d82d1[_0x136084(0x1d8)],{'method':'POST','url':_0x136084(0x1ed),'body':{'updates':_0x2d82d1[_0x136084(0x1d8)][_0x136084(0x1ef)]?.[_0x136084(0x1a0)](_0x402ff2=>_0x402ff2[_0x136084(0x20a)])??[]},'description':_0x136084(0x1b4)+_0x56d3c4+_0x136084(0x1c0)+_0x2cf64d+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x2ca160){const _0x429505=a135_0x18bd11;requireExplicitYes(_0x2ca160);const _0x1105be=await buildPlan(_0x2ca160,![]);await recheckMutationSnapshot(_0x2ca160,_0x1105be[_0x429505(0x1d8)],_0x429505(0x1d7));const _0x31fe5c=[],_0x57cd59=[],_0x5aa672=[];for(const _0x2509d2 of _0x1105be[_0x429505(0x1d8)]['targets']){if(_0x2509d2[_0x429505(0x1bb)]['visible']===_0x1105be['plan'][_0x429505(0x1ce)]){_0x31fe5c[_0x429505(0x1a3)]({'id':_0x2509d2['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x2ca160['appCode'],_0x2ca160[_0x429505(0x200)],{'id':_0x2509d2['id'],'visible':_0x1105be[_0x429505(0x1d8)][_0x429505(0x1ce)]}),_0x31fe5c['push']({'id':_0x2509d2['id'],'updated':!![],'skipped':![]});}catch(_0x3407a8){const _0x568106=mapMenuApiError(_0x3407a8,_0x429505(0x193),_0x2509d2['id']);if(isMenuResponseLoss(_0x3407a8)&&_0x568106['code']!==_0x429505(0x205)){_0x5aa672[_0x429505(0x1a3)](_0x2509d2['id']);continue;}_0x57cd59['push']({'id':_0x2509d2['id'],'stage':_0x429505(0x1ee),'code':_0x568106[_0x429505(0x1cc)],'message':_0x568106[_0x429505(0x1f1)]});}}let _0xdbf582;try{_0xdbf582=await fetchMenuSnapshot(_0x2ca160[_0x429505(0x1d5)],_0x2ca160[_0x429505(0x200)]);}catch(_0x3c8571){const _0x26b41c=describeMenuErrorCause(_0x3c8571,'verify\x20menu\x20visibility\x20update'),_0x4a339f=_0x5aa672[_0x429505(0x1a0)](_0x5bba75=>({'id':_0x5bba75,'stage':_0x429505(0x1f7),'code':_0x429505(0x1bd),'message':_0x429505(0x1e3)+_0x5bba75+_0x429505(0x1a1),'requestedStateConfirmed':![],'recovered':![]})),_0x2cb8b9={'stage':'verification','code':_0x429505(0x1bd),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x1105be['plan'][_0x429505(0x1b9)][_0x429505(0x1a0)](_0x4a28bd=>_0x4a28bd['id']),'requestedStateConfirmed':![],..._0x26b41c};throw menuFailure(asVerificationError(_0x3c8571,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x1105be['plan'],{'stage':_0x429505(0x1a4),'succeeded':_0x31fe5c,'failedRecords':[..._0x57cd59,..._0x4a339f,_0x2cb8b9],'warnings':[_0x429505(0x1f4)],'verification':{'status':_0x429505(0x1f9),'recoveredCount':0x0,'lookupCommand':_0x429505(0x1ba)}});}const _0x4ea26a=[];for(const _0x4111a2 of _0x31fe5c){const _0x2fabb2=Number(_0x4111a2['id']),_0x2635c1=_0x1105be['beforeById'][_0x429505(0x19e)](_0x2fabb2),_0xab62ec=_0xdbf582['byId']['get'](_0x2fabb2);try{verifyVisibilityUpdate(_0x2635c1,_0xab62ec,_0x1105be[_0x429505(0x1d8)][_0x429505(0x1ce)]);}catch(_0x1d3d3e){const _0x37d0ad=asVerificationError(_0x1d3d3e,_0x429505(0x1fd)+_0x2fabb2+_0x429505(0x1dc));_0x4ea26a[_0x429505(0x1a3)]({'id':_0x2fabb2,'stage':'verification','code':_0x37d0ad['code'],'message':_0x37d0ad['message'],'requestedStateConfirmed':![]});}}for(const _0x63a7d6 of _0x5aa672){const _0xcea224=_0x1105be['beforeById'][_0x429505(0x19e)](_0x63a7d6),_0x43169f=_0xdbf582[_0x429505(0x19b)]['get'](_0x63a7d6);try{verifyVisibilityUpdate(_0xcea224,_0x43169f,_0x1105be[_0x429505(0x1d8)][_0x429505(0x1ce)]),_0x31fe5c[_0x429505(0x1a3)]({'id':_0x63a7d6,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x3df8b7){const _0x39866e=asVerificationError(_0x3df8b7,_0x429505(0x1e7)+_0x63a7d6+_0x429505(0x1c3));_0x4ea26a[_0x429505(0x1a3)]({'id':_0x63a7d6,'stage':'update-recovery','code':_0x39866e[_0x429505(0x1cc)],'message':_0x39866e[_0x429505(0x1f1)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x4ea26a['length']>0x0){const _0x1f809d=_0x4ea26a['map'](_0x1c8c8a=>Number(_0x1c8c8a['id'])),_0x4693e0=_0x31fe5c[_0x429505(0x1d6)](_0x276975=>_0x276975['recovered']===!![])[_0x429505(0x1ae)],_0x1e8270=menuError(_0x429505(0x1bd),_0x429505(0x1bc)+_0x1f809d[_0x429505(0x19d)](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x1e8270,_0x1105be[_0x429505(0x1d8)],{'stage':_0x429505(0x1a4),'succeeded':_0x31fe5c,'failedRecords':[..._0x57cd59,..._0x4ea26a],'warnings':[_0x429505(0x1ab)],'verification':{'status':'failed',..._0x1f809d[_0x429505(0x1ae)]===0x1?{'targetId':_0x1f809d[0x0]}:{'targetIds':_0x1f809d},'recoveredCount':_0x4693e0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x321952=_0x31fe5c['filter'](_0x44e4b7=>_0x44e4b7[_0x429505(0x1e4)]===!![])[_0x429505(0x1ae)],_0x828614=_0x31fe5c['length']-_0x321952,_0x345b53={..._0x1105be['plan'],'succeeded':_0x31fe5c,'failed':_0x57cd59,'warnings':_0x57cd59[_0x429505(0x1ae)]>0x0?[..._0x1105be[_0x429505(0x1d8)][_0x429505(0x1e5)],_0x429505(0x1a6)]:_0x1105be['plan'][_0x429505(0x1e5)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0xdbf582[_0x429505(0x1f6)],'matchesRequestedState':_0x57cd59[_0x429505(0x1ae)]===0x0,'recoveredCount':_0x5aa672[_0x429505(0x1ae)]}};return{'ok':_0x57cd59[_0x429505(0x1ae)]===0x0,'data':_0x345b53,'message':_0x57cd59[_0x429505(0x1ae)]===0x0?'Updated\x20visibility\x20for\x20'+_0x321952+_0x429505(0x1b6)+_0x828614+_0x429505(0x1fa):_0x429505(0x196)+_0x321952+_0x429505(0x1e2)+_0x828614+_0x429505(0x1fe)+_0x57cd59[_0x429505(0x1ae)]+_0x429505(0x1e0)};}};function parseInput(_0x5bf51e){const _0x34a70d=a135_0x18bd11,_0x38a588=parseMenuIds(_0x5bf51e['str'](_0x34a70d(0x1a9))),_0x3ad7bd=parseCsv(_0x5bf51e[_0x34a70d(0x19a)](_0x34a70d(0x1ec)));if(_0x38a588[_0x34a70d(0x1ae)]===0x0&&_0x3ad7bd[_0x34a70d(0x1ae)]===0x0)throw CliErrors['validation']('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x4995a9=parseBooleanFlag(_0x5bf51e,'visible',!![]),_0x179d06=parseBooleanFlag(_0x5bf51e,_0x34a70d(0x1db),![]);let _0x2adc65;if(hasFlag(_0x5bf51e,_0x34a70d(0x199))){_0x2adc65=_0x5bf51e['num'](_0x34a70d(0x199));if(!Number[_0x34a70d(0x1ff)](_0x2adc65)||_0x2adc65<0x0)throw CliErrors[_0x34a70d(0x1cd)]('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0x38a588,'paths':_0x3ad7bd,'visible':_0x4995a9,'expectVisible':_0x179d06,'expectedCount':_0x2adc65};}async function buildPlan(_0xe30943,_0x1e3619){const _0x54a9ac=a135_0x18bd11,_0x5a81a6=parseInput(_0xe30943),_0x3fd048=await fetchMutationSnapshot(_0xe30943,_0x54a9ac(0x1d7)),_0x3cf19f=selectTargets(_0x3fd048[_0x54a9ac(0x1e6)],_0x5a81a6[_0x54a9ac(0x1a7)],_0x5a81a6['paths']);if(_0x5a81a6['expectedCount']!==undefined&&_0x3cf19f[_0x54a9ac(0x1ae)]!==_0x5a81a6[_0x54a9ac(0x1f5)])throw menuError(_0x54a9ac(0x1ac),_0x54a9ac(0x1b2)+_0x3cf19f['length']+_0x54a9ac(0x1d3)+_0x5a81a6['expectedCount']+'.',_0x54a9ac(0x1f3));if(_0x5a81a6[_0x54a9ac(0x1b3)]!==undefined){const _0x47d11a=_0x3cf19f[_0x54a9ac(0x1d6)](_0x508893=>_0x508893[_0x54a9ac(0x1c6)]!==_0x5a81a6[_0x54a9ac(0x1b3)]);if(_0x47d11a[_0x54a9ac(0x1ae)]>0x0)throw menuError(_0x54a9ac(0x201),_0x54a9ac(0x1e1)+_0x47d11a[_0x54a9ac(0x1a0)](_0x3ae639=>_0x3ae639['id'])['join'](',\x20')+'.',_0x54a9ac(0x204));}const _0x243fa5=_0x3cf19f[_0x54a9ac(0x1a0)](_0x5b5501=>({'id':_0x5b5501['id'],'label':_0x5b5501[_0x54a9ac(0x195)],'path':_0x5b5501[_0x54a9ac(0x19f)],'before':{'visible':_0x5b5501[_0x54a9ac(0x1c6)]},'after':{'visible':_0x5a81a6[_0x54a9ac(0x1c6)]}})),_0x52756e=_0x243fa5[_0x54a9ac(0x1d6)](_0x1e1b84=>_0x1e1b84[_0x54a9ac(0x1bb)][_0x54a9ac(0x1c6)]!==_0x5a81a6['visible'])[_0x54a9ac(0x1a0)](_0x117190=>({'stage':_0x54a9ac(0x1d2),'method':'POST','path':_0x54a9ac(0x1ed),'body':{'appCode':_0xe30943['appCode'],'id':_0x117190['id'],'visible':_0x5a81a6[_0x54a9ac(0x1c6)]}})),_0x40e438=mutationResult({'operation':_0x54a9ac(0x19c),'selector':{'menuIds':_0x5a81a6['menuIds'],'paths':_0x5a81a6[_0x54a9ac(0x1ec)]},'before':{'menus':_0x3cf19f[_0x54a9ac(0x1a0)](_0x1999f1=>({'id':_0x1999f1['id'],'path':_0x1999f1[_0x54a9ac(0x19f)],'visible':_0x1999f1[_0x54a9ac(0x1c6)]}))},'after':{'menus':_0x3cf19f[_0x54a9ac(0x1a0)](_0x14c3b6=>({'id':_0x14c3b6['id'],'path':_0x14c3b6[_0x54a9ac(0x19f)],'visible':_0x5a81a6[_0x54a9ac(0x1c6)]}))},'dryRun':_0x1e3619,'backend':[...BACKEND],'plannedActions':_0x52756e,'snapshotHash':_0x3fd048['hash'],'warnings':_0x52756e['length']===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0x40e438,'requestedVisible':_0x5a81a6[_0x54a9ac(0x1c6)],'targets':_0x243fa5},'beforeById':new Map(_0x3cf19f['map'](_0x57056a=>[_0x57056a['id'],_0x57056a]))};}function selectTargets(_0x5782c3,_0x5cdfc6,_0x205e4b){const _0x28785e=a135_0x18bd11,_0x2c1746=new Map(_0x5782c3[_0x28785e(0x1a0)](_0x1a2549=>[_0x1a2549['id'],_0x1a2549])),_0x1b1dad=new Map(),_0x336e74=_0x5cdfc6[_0x28785e(0x1d6)](_0x5b6ee2=>!_0x2c1746[_0x28785e(0x1f8)](_0x5b6ee2));if(_0x336e74[_0x28785e(0x1ae)]>0x0)throw menuError(_0x28785e(0x207),'Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x336e74[_0x28785e(0x19d)](',\x20')+'.',_0x28785e(0x1a2));for(const _0x5de109 of _0x5cdfc6){_0x1b1dad[_0x28785e(0x1d0)](_0x5de109,_0x2c1746[_0x28785e(0x19e)](_0x5de109));}for(const _0x1d0778 of _0x205e4b){const _0x2a0553=_0x5782c3['filter'](_0x272613=>_0x272613['path']===_0x1d0778);if(_0x2a0553['length']===0x0)throw menuError('menu_selector_not_found',_0x28785e(0x1e8)+JSON['stringify'](_0x1d0778)+'.',_0x28785e(0x1b8));if(_0x2a0553[_0x28785e(0x1ae)]>0x1)throw menuError('menu_selector_ambiguous','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x28785e(0x1bf)](_0x1d0778)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x2a0553[_0x28785e(0x1a0)](_0x1669e8=>_0x1669e8['id'])[_0x28785e(0x19d)](',\x20')+'.');const _0x2e4ed4=_0x2a0553[0x0];_0x1b1dad[_0x28785e(0x1d0)](_0x2e4ed4['id'],_0x2e4ed4);}return[..._0x1b1dad['values']()];}function parseMenuIds(_0x9a7c72){const _0x14de91=a135_0x18bd11,_0x4ba289=parseCsv(_0x9a7c72),_0x118df7=_0x4ba289[_0x14de91(0x1a0)](Number);if(_0x118df7[_0x14de91(0x209)](_0x4e1c92=>!Number['isSafeInteger'](_0x4e1c92)||_0x4e1c92<=0x0))throw CliErrors[_0x14de91(0x1cd)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x118df7)];}function a135_0x518b(){const _0x190df=['menu_state_drift','10748472ZdbJLp','\x20must\x20be\x20true\x20or\x20false.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','menu_permission_denied','sort','menu_selector_not_found','\x20changed\x20unexpectedly.','some','body','split','update\x20visibility\x20for','resources','label','Menu\x20visibility\x20update\x20completed:\x20','11808936FXXLWO','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','expected-count','str','byId','visibility-update','join','get','path','map','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','push','verification','datasetId','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','menuIds','8361730ToFXnT','menu-ids','high-risk-write','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','menu_expected_count_mismatch','flagMissing','length','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','childrenCount','Selected\x20','expectVisible','Would\x20update\x20visibility\x20for\x20','3644650TllyfQ','\x20menu(s);\x20skipped\x20','POST','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','targets','rabetbase\x20menu\x20list\x20--format\x20compress','before','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','menu_verification_failed','Requested\x20menu\x20visibility','stringify','\x20menu(s);\x20skip\x20','resourcesValid','42160msrtPw','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','string','pageType','visible','1dyyVmp','modelType','true','url','number','code','validation','requestedVisible','pageId','set','10uVHrZY','update-menu-visibility','\x20menu(s),\x20expected\x20','false','appCode','filter','update\x20menu\x20visibility','plan','trim','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','expect-visible','\x20visibility\x20update\x20could\x20not\x20be\x20verified','datasetCode','type','isArray','\x20failed.','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','\x20updated,\x20','Response\x20was\x20lost\x20for\x20menu\x20','updated','warnings','menus','Response\x20was\x20lost\x20and\x20menu\x20','Menu\x20path\x20selector\x20not\x20found:\x20','6wSMqYZ','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','226809etyEwH','paths','/smartapi/menu/update','update','plannedActions','3032532QDSITL','message','depth','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','expectedCount','hash','update-recovery','has','failed','\x20unchanged\x20menu(s).','boolean','parentId','Menu\x20','\x20skipped,\x20','isSafeInteger','cookie'];a135_0x518b=function(){return _0x190df;};return a135_0x518b();}function parseCsv(_0x4feabd){const _0x291b24=a135_0x18bd11;return[...new Set(_0x4feabd[_0x291b24(0x20b)](',')[_0x291b24(0x1a0)](_0x264fe5=>_0x264fe5[_0x291b24(0x1d9)]())['filter'](Boolean))];}function parseBooleanFlag(_0x4ecfe,_0x2e08c0,_0x5412ae){const _0x43cbb7=a135_0x18bd11;if(!hasFlag(_0x4ecfe,_0x2e08c0)){if(_0x5412ae)throw CliErrors[_0x43cbb7(0x1ad)](_0x2e08c0);return undefined;}const _0x583cc8=_0x4ecfe['rawFlags'][_0x2e08c0];if(_0x583cc8===!![]||_0x583cc8===![])return _0x583cc8;if(_0x583cc8===_0x43cbb7(0x1c9))return!![];if(_0x583cc8===_0x43cbb7(0x1d4))return![];throw CliErrors[_0x43cbb7(0x1cd)]('--'+_0x2e08c0+_0x43cbb7(0x203));}function verifyVisibilityUpdate(_0x2d50ee,_0x1389c8,_0x2eb487){const _0x1507ff=a135_0x18bd11;assertVerified(!!_0x1389c8,'Menu\x20'+_0x2d50ee['id']+_0x1507ff(0x1af)),assertVerified(_0x1389c8[_0x1507ff(0x1c6)]===_0x2eb487,'Menu\x20'+_0x2d50ee['id']+_0x1507ff(0x1da));const _0x378e88=[['id',_0x1389c8['id'],_0x2d50ee['id']],['parentId',_0x1389c8[_0x1507ff(0x1fc)],_0x2d50ee[_0x1507ff(0x1fc)]],[_0x1507ff(0x1f2),_0x1389c8[_0x1507ff(0x1f2)],_0x2d50ee['depth']],[_0x1507ff(0x195),_0x1389c8[_0x1507ff(0x195)],_0x2d50ee['label']],[_0x1507ff(0x19f),_0x1389c8[_0x1507ff(0x19f)],_0x2d50ee['path']],['url',_0x1389c8[_0x1507ff(0x1ca)],_0x2d50ee['url']],['type',_0x1389c8[_0x1507ff(0x1de)],_0x2d50ee[_0x1507ff(0x1de)]],[_0x1507ff(0x206),_0x1389c8[_0x1507ff(0x206)],_0x2d50ee[_0x1507ff(0x206)]],['resources',_0x1389c8['resources'],_0x2d50ee[_0x1507ff(0x194)]],[_0x1507ff(0x1c1),_0x1389c8[_0x1507ff(0x1c1)],_0x2d50ee['resourcesValid']],['childrenIds',_0x1389c8['childrenIds'],_0x2d50ee['childrenIds']],[_0x1507ff(0x1b1),_0x1389c8[_0x1507ff(0x1b1)],_0x2d50ee[_0x1507ff(0x1b1)]],[_0x1507ff(0x1cf),_0x1389c8['pageId'],_0x2d50ee[_0x1507ff(0x1cf)]],[_0x1507ff(0x1c5),_0x1389c8[_0x1507ff(0x1c5)],_0x2d50ee['pageType']],[_0x1507ff(0x1c8),_0x1389c8[_0x1507ff(0x1c8)],_0x2d50ee['modelType']],[_0x1507ff(0x1a5),_0x1389c8['datasetId'],_0x2d50ee[_0x1507ff(0x1a5)]],[_0x1507ff(0x1dd),_0x1389c8['datasetCode'],_0x2d50ee[_0x1507ff(0x1dd)]]];for(const [_0xca35d4,_0x99e7a0,_0x282ef6]of _0x378e88){assertVerified(sameValue(_0x99e7a0,_0x282ef6),_0x1507ff(0x1fd)+_0x2d50ee['id']+'\x20'+_0xca35d4+_0x1507ff(0x208));}}function sameValue(_0x165352,_0xd3b4b5){const _0x15a8aa=a135_0x18bd11;if(Array[_0x15a8aa(0x1df)](_0x165352)||Array[_0x15a8aa(0x1df)](_0xd3b4b5))return JSON[_0x15a8aa(0x1bf)](_0x165352)===JSON[_0x15a8aa(0x1bf)](_0xd3b4b5);return _0x165352===_0xd3b4b5;}
|
|
1
|
+
const a135_0x18f04c=a135_0x129f;(function(_0x20adbf,_0x2f8c05){const _0x53dcbc=a135_0x129f,_0x4cdbc3=_0x20adbf();while(!![]){try{const _0x591418=-parseInt(_0x53dcbc(0x1ab))/0x1*(-parseInt(_0x53dcbc(0x1c4))/0x2)+parseInt(_0x53dcbc(0x18b))/0x3*(parseInt(_0x53dcbc(0x1e8))/0x4)+parseInt(_0x53dcbc(0x184))/0x5*(-parseInt(_0x53dcbc(0x199))/0x6)+parseInt(_0x53dcbc(0x1b2))/0x7+parseInt(_0x53dcbc(0x1d6))/0x8*(parseInt(_0x53dcbc(0x1ed))/0x9)+parseInt(_0x53dcbc(0x190))/0xa+-parseInt(_0x53dcbc(0x1eb))/0xb;if(_0x591418===_0x2f8c05)break;else _0x4cdbc3['push'](_0x4cdbc3['shift']());}catch(_0x9f2b04){_0x4cdbc3['push'](_0x4cdbc3['shift']());}}}(a135_0x5cd2,0xdc68c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a135_0x18f04c(0x17a),'command':a135_0x18f04c(0x1e2),'description':a135_0x18f04c(0x1e5),'risk':a135_0x18f04c(0x1a0),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':'string','description':a135_0x18f04c(0x192)},{'name':a135_0x18f04c(0x1d5),'type':a135_0x18f04c(0x197),'description':a135_0x18f04c(0x1a1)},{'name':a135_0x18f04c(0x1ba),'type':a135_0x18f04c(0x1e7),'required':!![],'description':a135_0x18f04c(0x1cd)},{'name':a135_0x18f04c(0x17f),'type':a135_0x18f04c(0x1e7),'description':a135_0x18f04c(0x1e1)},{'name':'expected-count','type':'number','description':a135_0x18f04c(0x186)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x441893){parseInput(_0x441893),requireExplicitYes(_0x441893);},async 'dryRun'(_0x40ef2d){const _0x394449=a135_0x18f04c,_0x22c3a1=await buildPlan(_0x40ef2d,!![]),_0x129466=_0x22c3a1[_0x394449(0x1a2)][_0x394449(0x1a8)]?.['length']??0x0,_0x4789c6=_0x22c3a1[_0x394449(0x1a2)][_0x394449(0x1db)][_0x394449(0x1b8)]-_0x129466;return menuDryRunResult(_0x22c3a1['plan'],{'method':_0x394449(0x19e),'url':_0x394449(0x1d2),'body':{'updates':_0x22c3a1[_0x394449(0x1a2)][_0x394449(0x1a8)]?.[_0x394449(0x195)](_0x5f4044=>_0x5f4044['body'])??[]},'description':_0x394449(0x1c9)+_0x129466+_0x394449(0x1d9)+_0x4789c6+_0x394449(0x1dd)});},async 'execute'(_0x4edce6){const _0x205e9b=a135_0x18f04c;requireExplicitYes(_0x4edce6);const _0x484d47=await buildPlan(_0x4edce6,![]);await recheckMutationSnapshot(_0x4edce6,_0x484d47['plan'],_0x205e9b(0x180));const _0x4bef72=[],_0x5a63f6=[],_0x535a76=[];for(const _0x19a267 of _0x484d47[_0x205e9b(0x1a2)]['targets']){if(_0x19a267[_0x205e9b(0x1c7)][_0x205e9b(0x1ba)]===_0x484d47[_0x205e9b(0x1a2)][_0x205e9b(0x1b9)]){_0x4bef72[_0x205e9b(0x18c)]({'id':_0x19a267['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x4edce6[_0x205e9b(0x17c)],_0x4edce6[_0x205e9b(0x1ef)],{'id':_0x19a267['id'],'visible':_0x484d47[_0x205e9b(0x1a2)][_0x205e9b(0x1b9)]}),_0x4bef72[_0x205e9b(0x18c)]({'id':_0x19a267['id'],'updated':!![],'skipped':![]});}catch(_0x36c23b){const _0x14f8e6=mapMenuApiError(_0x36c23b,'update\x20visibility\x20for',_0x19a267['id']);if(isMenuResponseLoss(_0x36c23b)&&_0x14f8e6[_0x205e9b(0x1df)]!==_0x205e9b(0x182)){_0x535a76['push'](_0x19a267['id']);continue;}_0x5a63f6[_0x205e9b(0x18c)]({'id':_0x19a267['id'],'stage':_0x205e9b(0x1ce),'code':_0x14f8e6['code'],'message':_0x14f8e6[_0x205e9b(0x179)]});}}let _0x3588ea;try{_0x3588ea=await fetchMenuSnapshot(_0x4edce6['appCode'],_0x4edce6[_0x205e9b(0x1ef)]);}catch(_0x15f13d){const _0x546bc0=describeMenuErrorCause(_0x15f13d,'verify\x20menu\x20visibility\x20update'),_0x285e82=_0x535a76[_0x205e9b(0x195)](_0x3efe5f=>({'id':_0x3efe5f,'stage':_0x205e9b(0x1cb),'code':_0x205e9b(0x174),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x3efe5f+_0x205e9b(0x1bd),'requestedStateConfirmed':![],'recovered':![]})),_0x33fed6={'stage':'verification','code':'menu_verification_failed','message':_0x205e9b(0x1de),'targetIds':_0x484d47[_0x205e9b(0x1a2)][_0x205e9b(0x1db)][_0x205e9b(0x195)](_0x189ee5=>_0x189ee5['id']),'requestedStateConfirmed':![],..._0x546bc0};throw menuFailure(asVerificationError(_0x15f13d,_0x205e9b(0x1aa)),_0x484d47['plan'],{'stage':_0x205e9b(0x1dc),'succeeded':_0x4bef72,'failedRecords':[..._0x5a63f6,..._0x285e82,_0x33fed6],'warnings':[_0x205e9b(0x1b3)],'verification':{'status':_0x205e9b(0x1ad),'recoveredCount':0x0,'lookupCommand':_0x205e9b(0x17b)}});}const _0x52801c=[];for(const _0x4de2dd of _0x4bef72){const _0x251dd8=Number(_0x4de2dd['id']),_0x314204=_0x484d47[_0x205e9b(0x176)][_0x205e9b(0x1ec)](_0x251dd8),_0x568f3f=_0x3588ea['byId']['get'](_0x251dd8);try{verifyVisibilityUpdate(_0x314204,_0x568f3f,_0x484d47[_0x205e9b(0x1a2)][_0x205e9b(0x1b9)]);}catch(_0x58bb06){const _0x2a618f=asVerificationError(_0x58bb06,_0x205e9b(0x185)+_0x251dd8+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x52801c[_0x205e9b(0x18c)]({'id':_0x251dd8,'stage':_0x205e9b(0x1dc),'code':_0x2a618f[_0x205e9b(0x1df)],'message':_0x2a618f[_0x205e9b(0x179)],'requestedStateConfirmed':![]});}}for(const _0x271302 of _0x535a76){const _0x4ef6c4=_0x484d47[_0x205e9b(0x176)][_0x205e9b(0x1ec)](_0x271302),_0x53c1b1=_0x3588ea[_0x205e9b(0x1c0)][_0x205e9b(0x1ec)](_0x271302);try{verifyVisibilityUpdate(_0x4ef6c4,_0x53c1b1,_0x484d47['plan'][_0x205e9b(0x1b9)]),_0x4bef72[_0x205e9b(0x18c)]({'id':_0x271302,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x39e216){const _0x3ba0db=asVerificationError(_0x39e216,_0x205e9b(0x17d)+_0x271302+_0x205e9b(0x171));_0x52801c['push']({'id':_0x271302,'stage':'update-recovery','code':_0x3ba0db[_0x205e9b(0x1df)],'message':_0x3ba0db[_0x205e9b(0x179)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x52801c['length']>0x0){const _0x3dbdf7=_0x52801c[_0x205e9b(0x195)](_0x3ab6a2=>Number(_0x3ab6a2['id'])),_0x41b075=_0x4bef72[_0x205e9b(0x1c2)](_0xf3ec1f=>_0xf3ec1f[_0x205e9b(0x1b5)]===!![])[_0x205e9b(0x1b8)],_0x2de8e2=menuError(_0x205e9b(0x174),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x3dbdf7[_0x205e9b(0x1ca)](',\x20')+'.',_0x205e9b(0x1e0));throw menuFailure(_0x2de8e2,_0x484d47[_0x205e9b(0x1a2)],{'stage':_0x205e9b(0x1dc),'succeeded':_0x4bef72,'failedRecords':[..._0x5a63f6,..._0x52801c],'warnings':[_0x205e9b(0x1e3)],'verification':{'status':_0x205e9b(0x1ad),..._0x3dbdf7[_0x205e9b(0x1b8)]===0x1?{'targetId':_0x3dbdf7[0x0]}:{'targetIds':_0x3dbdf7},'recoveredCount':_0x41b075,'lookupCommand':_0x205e9b(0x17b)}});}const _0x1db499=_0x4bef72['filter'](_0x197b05=>_0x197b05[_0x205e9b(0x19a)]===!![])['length'],_0x69a064=_0x4bef72[_0x205e9b(0x1b8)]-_0x1db499,_0x29e3dd={..._0x484d47[_0x205e9b(0x1a2)],'succeeded':_0x4bef72,'failed':_0x5a63f6,'warnings':_0x5a63f6[_0x205e9b(0x1b8)]>0x0?[..._0x484d47[_0x205e9b(0x1a2)][_0x205e9b(0x188)],_0x205e9b(0x1d3)]:_0x484d47['plan']['warnings'],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x3588ea[_0x205e9b(0x1bc)],'matchesRequestedState':_0x5a63f6['length']===0x0,'recoveredCount':_0x535a76[_0x205e9b(0x1b8)]}};return{'ok':_0x5a63f6[_0x205e9b(0x1b8)]===0x0,'data':_0x29e3dd,'message':_0x5a63f6[_0x205e9b(0x1b8)]===0x0?_0x205e9b(0x1a4)+_0x1db499+_0x205e9b(0x175)+_0x69a064+_0x205e9b(0x1dd):_0x205e9b(0x1e4)+_0x1db499+_0x205e9b(0x19b)+_0x69a064+_0x205e9b(0x194)+_0x5a63f6[_0x205e9b(0x1b8)]+_0x205e9b(0x1ae)};}};function parseInput(_0x34138f){const _0x65a998=a135_0x18f04c,_0x4b5e31=parseMenuIds(_0x34138f[_0x65a998(0x18d)](_0x65a998(0x196))),_0x268d27=parseCsv(_0x34138f['str'](_0x65a998(0x1d5)));if(_0x4b5e31['length']===0x0&&_0x268d27[_0x65a998(0x1b8)]===0x0)throw CliErrors['validation'](_0x65a998(0x19d));const _0x5b2ac8=parseBooleanFlag(_0x34138f,_0x65a998(0x1ba),!![]),_0x152cfe=parseBooleanFlag(_0x34138f,'expect-visible',![]);let _0x39cd67;if(hasFlag(_0x34138f,'expected-count')){_0x39cd67=_0x34138f[_0x65a998(0x1d0)](_0x65a998(0x183));if(!Number[_0x65a998(0x1ac)](_0x39cd67)||_0x39cd67<0x0)throw CliErrors[_0x65a998(0x1af)]('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0x4b5e31,'paths':_0x268d27,'visible':_0x5b2ac8,'expectVisible':_0x152cfe,'expectedCount':_0x39cd67};}async function buildPlan(_0x5dd833,_0x35ac7d){const _0x1f3100=a135_0x18f04c,_0x43aa6d=parseInput(_0x5dd833),_0x5a65dc=await fetchMutationSnapshot(_0x5dd833,_0x1f3100(0x180)),_0x2c2cfa=selectTargets(_0x5a65dc[_0x1f3100(0x1c3)],_0x43aa6d[_0x1f3100(0x19f)],_0x43aa6d['paths']);if(_0x43aa6d[_0x1f3100(0x1c5)]!==undefined&&_0x2c2cfa[_0x1f3100(0x1b8)]!==_0x43aa6d[_0x1f3100(0x1c5)])throw menuError(_0x1f3100(0x172),_0x1f3100(0x17e)+_0x2c2cfa[_0x1f3100(0x1b8)]+_0x1f3100(0x1b6)+_0x43aa6d['expectedCount']+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x43aa6d[_0x1f3100(0x1bf)]!==undefined){const _0x46a5cb=_0x2c2cfa[_0x1f3100(0x1c2)](_0x1c76c1=>_0x1c76c1[_0x1f3100(0x1ba)]!==_0x43aa6d[_0x1f3100(0x1bf)]);if(_0x46a5cb[_0x1f3100(0x1b8)]>0x0)throw menuError(_0x1f3100(0x1f0),_0x1f3100(0x1a3)+_0x46a5cb[_0x1f3100(0x195)](_0xae104f=>_0xae104f['id'])[_0x1f3100(0x1ca)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x97469d=_0x2c2cfa[_0x1f3100(0x195)](_0x128988=>({'id':_0x128988['id'],'label':_0x128988[_0x1f3100(0x191)],'path':_0x128988[_0x1f3100(0x173)],'before':{'visible':_0x128988[_0x1f3100(0x1ba)]},'after':{'visible':_0x43aa6d[_0x1f3100(0x1ba)]}})),_0x304d38=_0x97469d[_0x1f3100(0x1c2)](_0x48b624=>_0x48b624[_0x1f3100(0x1c7)]['visible']!==_0x43aa6d[_0x1f3100(0x1ba)])[_0x1f3100(0x195)](_0x46139b=>({'stage':_0x1f3100(0x187),'method':_0x1f3100(0x19e),'path':_0x1f3100(0x1d2),'body':{'appCode':_0x5dd833[_0x1f3100(0x17c)],'id':_0x46139b['id'],'visible':_0x43aa6d[_0x1f3100(0x1ba)]}})),_0x3ee618=mutationResult({'operation':_0x1f3100(0x1e2),'selector':{'menuIds':_0x43aa6d['menuIds'],'paths':_0x43aa6d['paths']},'before':{'menus':_0x2c2cfa[_0x1f3100(0x195)](_0x294ab8=>({'id':_0x294ab8['id'],'path':_0x294ab8['path'],'visible':_0x294ab8[_0x1f3100(0x1ba)]}))},'after':{'menus':_0x2c2cfa[_0x1f3100(0x195)](_0x3ce2e9=>({'id':_0x3ce2e9['id'],'path':_0x3ce2e9[_0x1f3100(0x173)],'visible':_0x43aa6d[_0x1f3100(0x1ba)]}))},'dryRun':_0x35ac7d,'backend':[...BACKEND],'plannedActions':_0x304d38,'snapshotHash':_0x5a65dc['hash'],'warnings':_0x304d38[_0x1f3100(0x1b8)]===0x0?[_0x1f3100(0x198)]:[]});return{'plan':{..._0x3ee618,'requestedVisible':_0x43aa6d[_0x1f3100(0x1ba)],'targets':_0x97469d},'beforeById':new Map(_0x2c2cfa[_0x1f3100(0x195)](_0x4ac56e=>[_0x4ac56e['id'],_0x4ac56e]))};}function selectTargets(_0x4bd063,_0x3f90d1,_0x36376b){const _0x96bc91=a135_0x18f04c,_0x516d0f=new Map(_0x4bd063[_0x96bc91(0x195)](_0x26906c=>[_0x26906c['id'],_0x26906c])),_0x553c21=new Map(),_0x21f34c=_0x3f90d1[_0x96bc91(0x1c2)](_0x8f1be1=>!_0x516d0f[_0x96bc91(0x1ea)](_0x8f1be1));if(_0x21f34c[_0x96bc91(0x1b8)]>0x0)throw menuError(_0x96bc91(0x1d1),_0x96bc91(0x1d7)+_0x21f34c[_0x96bc91(0x1ca)](',\x20')+'.',_0x96bc91(0x1b4));for(const _0x45cc6e of _0x3f90d1){_0x553c21[_0x96bc91(0x1bb)](_0x45cc6e,_0x516d0f[_0x96bc91(0x1ec)](_0x45cc6e));}for(const _0x59a884 of _0x36376b){const _0xf080f5=_0x4bd063['filter'](_0x9eab1a=>_0x9eab1a[_0x96bc91(0x173)]===_0x59a884);if(_0xf080f5['length']===0x0)throw menuError(_0x96bc91(0x1d1),_0x96bc91(0x1da)+JSON[_0x96bc91(0x1a9)](_0x59a884)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0xf080f5[_0x96bc91(0x1b8)]>0x1)throw menuError(_0x96bc91(0x18f),_0x96bc91(0x1cf)+JSON[_0x96bc91(0x1a9)](_0x59a884)+'.',_0x96bc91(0x1ee)+_0xf080f5[_0x96bc91(0x195)](_0xcd8936=>_0xcd8936['id'])['join'](',\x20')+'.');const _0x17059a=_0xf080f5[0x0];_0x553c21[_0x96bc91(0x1bb)](_0x17059a['id'],_0x17059a);}return[..._0x553c21['values']()];}function parseMenuIds(_0x530afc){const _0x3faf48=a135_0x18f04c,_0x473b0b=parseCsv(_0x530afc),_0x57271c=_0x473b0b[_0x3faf48(0x195)](Number);if(_0x57271c[_0x3faf48(0x1b7)](_0x11566a=>!Number[_0x3faf48(0x1ac)](_0x11566a)||_0x11566a<=0x0))throw CliErrors[_0x3faf48(0x1af)](_0x3faf48(0x189));return[...new Set(_0x57271c)];}function parseCsv(_0x32e464){const _0x1f82eb=a135_0x18f04c;return[...new Set(_0x32e464[_0x1f82eb(0x19c)](',')[_0x1f82eb(0x195)](_0x403b6f=>_0x403b6f[_0x1f82eb(0x1d4)]())['filter'](Boolean))];}function parseBooleanFlag(_0x49ef2e,_0x641aa2,_0x4adafd){const _0xf9c451=a135_0x18f04c;if(!hasFlag(_0x49ef2e,_0x641aa2)){if(_0x4adafd)throw CliErrors[_0xf9c451(0x1c8)](_0x641aa2);return undefined;}const _0x161572=_0x49ef2e['rawFlags'][_0x641aa2];if(_0x161572===!![]||_0x161572===![])return _0x161572;if(_0x161572===_0xf9c451(0x1a7))return!![];if(_0x161572===_0xf9c451(0x1b1))return![];throw CliErrors[_0xf9c451(0x1af)]('--'+_0x641aa2+'\x20must\x20be\x20true\x20or\x20false.');}function a135_0x129f(_0x1ee465,_0x466bc9){_0x1ee465=_0x1ee465-0x171;const _0x5cd2af=a135_0x5cd2();let _0x129fcb=_0x5cd2af[_0x1ee465];return _0x129fcb;}function verifyVisibilityUpdate(_0x4750ef,_0xe162be,_0x38b0c9){const _0x2b97c4=a135_0x18f04c;assertVerified(!!_0xe162be,_0x2b97c4(0x185)+_0x4750ef['id']+_0x2b97c4(0x1e6)),assertVerified(_0xe162be['visible']===_0x38b0c9,_0x2b97c4(0x185)+_0x4750ef['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x3645b0=[['id',_0xe162be['id'],_0x4750ef['id']],[_0x2b97c4(0x178),_0xe162be['parentId'],_0x4750ef['parentId']],['depth',_0xe162be[_0x2b97c4(0x18e)],_0x4750ef[_0x2b97c4(0x18e)]],[_0x2b97c4(0x191),_0xe162be['label'],_0x4750ef[_0x2b97c4(0x191)]],[_0x2b97c4(0x173),_0xe162be[_0x2b97c4(0x173)],_0x4750ef[_0x2b97c4(0x173)]],[_0x2b97c4(0x181),_0xe162be[_0x2b97c4(0x181)],_0x4750ef['url']],['type',_0xe162be[_0x2b97c4(0x1cc)],_0x4750ef[_0x2b97c4(0x1cc)]],[_0x2b97c4(0x1d8),_0xe162be[_0x2b97c4(0x1d8)],_0x4750ef[_0x2b97c4(0x1d8)]],[_0x2b97c4(0x1c6),_0xe162be[_0x2b97c4(0x1c6)],_0x4750ef[_0x2b97c4(0x1c6)]],[_0x2b97c4(0x1a6),_0xe162be[_0x2b97c4(0x1a6)],_0x4750ef[_0x2b97c4(0x1a6)]],[_0x2b97c4(0x18a),_0xe162be['childrenIds'],_0x4750ef['childrenIds']],[_0x2b97c4(0x1a5),_0xe162be[_0x2b97c4(0x1a5)],_0x4750ef[_0x2b97c4(0x1a5)]],[_0x2b97c4(0x177),_0xe162be['pageId'],_0x4750ef[_0x2b97c4(0x177)]],[_0x2b97c4(0x1b0),_0xe162be[_0x2b97c4(0x1b0)],_0x4750ef[_0x2b97c4(0x1b0)]],[_0x2b97c4(0x1e9),_0xe162be[_0x2b97c4(0x1e9)],_0x4750ef[_0x2b97c4(0x1e9)]],[_0x2b97c4(0x193),_0xe162be[_0x2b97c4(0x193)],_0x4750ef[_0x2b97c4(0x193)]],[_0x2b97c4(0x1be),_0xe162be['datasetCode'],_0x4750ef['datasetCode']]];for(const [_0x34110b,_0xe122bd,_0x3ba3c8]of _0x3645b0){assertVerified(sameValue(_0xe122bd,_0x3ba3c8),_0x2b97c4(0x185)+_0x4750ef['id']+'\x20'+_0x34110b+'\x20changed\x20unexpectedly.');}}function a135_0x5cd2(){const _0x1d7f25=['stringify','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','122311fJDnxQ','isSafeInteger','failed','\x20failed.','validation','pageType','false','11423188ikloYH','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','recovered','\x20menu(s),\x20expected\x20','some','length','requestedVisible','visible','set','hash','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','datasetCode','expectVisible','byId','isArray','filter','menus','28stKbao','expectedCount','resources','before','flagMissing','Would\x20update\x20visibility\x20for\x20','join','update-recovery','type','Requested\x20menu\x20visibility','update','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','num','menu_selector_not_found','/smartapi/menu/update','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','trim','paths','4167816KIEukL','Menu\x20id\x20selector(s)\x20not\x20found:\x20','sort','\x20menu(s);\x20skip\x20','Menu\x20path\x20selector\x20not\x20found:\x20','targets','verification','\x20unchanged\x20menu(s).','Final\x20menu\x20visibility\x20readback\x20failed.','code','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','visibility-update','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Menu\x20visibility\x20update\x20completed:\x20','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','boolean','456392hJIBSA','modelType','has','55805475pezbiQ','get','9guFnkp','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','cookie','menu_state_drift','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','menu_expected_count_mismatch','path','menu_verification_failed','\x20menu(s);\x20skipped\x20','beforeById','pageId','parentId','message','menu','rabetbase\x20menu\x20list\x20--format\x20compress','appCode','Response\x20was\x20lost\x20and\x20menu\x20','Selected\x20','expect-visible','update\x20menu\x20visibility','url','menu_permission_denied','expected-count','1823695wxGhTv','Menu\x20','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','update-menu-visibility','warnings','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','childrenIds','18PglYNw','push','str','depth','menu_selector_ambiguous','17909570beroSc','label','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','datasetId','\x20skipped,\x20','map','menu-ids','string','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','6pEHOMT','updated','\x20updated,\x20','split','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','POST','menuIds','high-risk-write','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','plan','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Updated\x20visibility\x20for\x20','childrenCount','resourcesValid','true','plannedActions'];a135_0x5cd2=function(){return _0x1d7f25;};return a135_0x5cd2();}function sameValue(_0x7ad9c,_0x5d9f06){const _0xd8c423=a135_0x18f04c;if(Array[_0xd8c423(0x1c1)](_0x7ad9c)||Array[_0xd8c423(0x1c1)](_0x5d9f06))return JSON[_0xd8c423(0x1a9)](_0x7ad9c)===JSON[_0xd8c423(0x1a9)](_0x5d9f06);return _0x7ad9c===_0x5d9f06;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a136_0xe1cace=a136_0xd5a9;(function(_0x3d9b56,_0x589f36){const _0x4f5fea=a136_0xd5a9,_0x16d48a=_0x3d9b56();while(!![]){try{const _0x198fa9=-parseInt(_0x4f5fea(0x1df))/0x1*(-parseInt(_0x4f5fea(0x1d4))/0x2)+-parseInt(_0x4f5fea(0x1dc))/0x3*(parseInt(_0x4f5fea(0x1ec))/0x4)+-parseInt(_0x4f5fea(0x1cd))/0x5*(parseInt(_0x4f5fea(0x1e8))/0x6)+parseInt(_0x4f5fea(0x1dd))/0x7+-parseInt(_0x4f5fea(0x1ea))/0x8+parseInt(_0x4f5fea(0x1d6))/0x9*(parseInt(_0x4f5fea(0x1eb))/0xa)+-parseInt(_0x4f5fea(0x1e1))/0xb*(-parseInt(_0x4f5fea(0x1ce))/0xc);if(_0x198fa9===_0x589f36)break;else _0x16d48a['push'](_0x16d48a['shift']());}catch(_0x1f77b3){_0x16d48a['push'](_0x16d48a['shift']());}}}(a136_0x440f,0x20e55));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a136_0xe1cace(0x1e7);async function prepareCreate(_0xd3f076){const _0x4463fa=a136_0xe1cace,_0x5e4a76=await readNotificationDocument(_0xd3f076,_0x4463fa(0x1ee)),_0x1c69e2=createMutationInput(_0xd3f076[_0x4463fa(0x1cb)],_0x5e4a76);return{'document':_0x5e4a76,'input':_0x1c69e2,'planned':projectNotificationConfig({'appCode':_0xd3f076[_0x4463fa(0x1cb)],'configName':_0x5e4a76[_0x4463fa(0x1d9)],'channelType':_0x5e4a76[_0x4463fa(0x1d2)],'endpointUrl':_0x5e4a76[_0x4463fa(0x1d8)],'channelConfig':_0x5e4a76['channelConfig'],'description':_0x5e4a76[_0x4463fa(0x1cc)],'connectTimeout':_0x5e4a76[_0x4463fa(0x1e2)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x5e4a76[_0x4463fa(0x1de)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a136_0xd5a9(_0x26634b,_0x480db0){_0x26634b=_0x26634b-0x1cb;const _0x440fb6=a136_0x440f();let _0xd5a9b=_0x440fb6[_0x26634b];return _0xd5a9b;}function a136_0x440f(){const _0x2d019b=['149996yxeJQC','readTimeout','7QIkhuI',';\x20do\x20not\x20resubmit\x20automatically.','154wFehHs','connectTimeout','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','planned','/notification/channel-config/create','94194SuPXYn','verification','2018760loGMkI','737390kXFewl','292OzwgcW','POST','create','Inspect\x20with\x20','appCode','description','45OrSlyo','431280LYyFbP','configCode',';\x20do\x20not\x20resubmit.','notification','channelType','isSafeInteger','35974ocdAlA','input','9djcBbL','document','endpointUrl','configName','mutation','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','8049jpDSWO'];a136_0x440f=function(){return _0x2d019b;};return a136_0x440f();}export const notificationConfigCreate={'service':a136_0xe1cace(0x1d1),'command':'config-create','description':a136_0xe1cace(0x1db),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x170f11){assertSingleNotificationSource(_0x170f11);},async 'dryRun'(_0x240e15){const _0x32e61c=a136_0xe1cace,_0x3795c6=await prepareCreate(_0x240e15),_0x577c9b=notificationLookupCommand(_0x240e15[_0x32e61c(0x1cb)],_0x3795c6[_0x32e61c(0x1d7)]['channelType']);return asDryRunResult({'operation':_0x32e61c(0x1ee),'selector':{'appCode':_0x240e15[_0x32e61c(0x1cb)],'configName':_0x3795c6[_0x32e61c(0x1d7)]['configName'],'channelType':_0x3795c6[_0x32e61c(0x1d7)][_0x32e61c(0x1d2)]},'before':null,'after':_0x3795c6[_0x32e61c(0x1e6)],'dryRun':!![],'backend':{'method':_0x32e61c(0x1ed),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x32e61c(0x1e6),'lookupCommand':_0x577c9b}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x367872){const _0x2c29ec=a136_0xe1cace,_0x5c6447=await prepareCreate(_0x367872),_0x26fa60=notificationLookupCommand(_0x367872[_0x2c29ec(0x1cb)],_0x5c6447[_0x2c29ec(0x1d7)][_0x2c29ec(0x1d2)]);let _0x43ef30;try{_0x43ef30=await createNotificationChannelConfig(_0x5c6447[_0x2c29ec(0x1d5)]);}catch(_0xeb014b){if(isPlatformTransportFailure(_0xeb014b))throw notificationError('notification_config_create_outcome_unknown',_0x2c29ec(0x1e5),'Inspect\x20with\x20'+_0x26fa60+_0x2c29ec(0x1d0));throw safeApiFailure(_0x2c29ec(0x1ee),_0x2c29ec(0x1da),_0x2c29ec(0x1ef)+_0x26fa60+_0x2c29ec(0x1e4));}if(!Number[_0x2c29ec(0x1d3)](_0x43ef30)||_0x43ef30<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x2c29ec(0x1e3),_0x2c29ec(0x1ef)+_0x26fa60+_0x2c29ec(0x1d0));let _0x360d14;try{const _0x18ca71=await getNotificationChannelConfig(_0x43ef30,_0x367872[_0x2c29ec(0x1cb)]);_0x360d14=normalizeExactNotificationConfig(_0x18ca71,_0x43ef30,_0x367872['appCode']);}catch{throw safeApiFailure(_0x2c29ec(0x1ee),_0x2c29ec(0x1e9),_0x2c29ec(0x1ef)+_0x26fa60+_0x2c29ec(0x1e0));}return{'ok':!![],'data':{'operation':_0x2c29ec(0x1ee),'selector':{'appCode':_0x360d14[_0x2c29ec(0x1cb)],'id':_0x360d14['id'],'configCode':_0x360d14[_0x2c29ec(0x1cf)],'configName':_0x360d14['configName'],'channelType':_0x360d14[_0x2c29ec(0x1d2)]},'before':null,'after':projectNotificationConfig(_0x360d14),'dryRun':![],'backend':{'method':_0x2c29ec(0x1ed),'path':CREATE_PATH},'warnings':[],'verification':{'status':'verified','lookupCommand':_0x26fa60}},'message':'Created\x20notification\x20config\x20'+_0x360d14['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a137_0x42c254=a137_0x55df;(function(_0x58fffd,_0x52c5db){const _0x19bdf6=a137_0x55df,_0x31b3ec=_0x58fffd();while(!![]){try{const _0x4639e4=parseInt(_0x19bdf6(0x16f))/0x1*(-parseInt(_0x19bdf6(0x184))/0x2)+-parseInt(_0x19bdf6(0x185))/0x3*(-parseInt(_0x19bdf6(0x17a))/0x4)+parseInt(_0x19bdf6(0x16e))/0x5+parseInt(_0x19bdf6(0x169))/0x6+-parseInt(_0x19bdf6(0x16b))/0x7+-parseInt(_0x19bdf6(0x17b))/0x8+parseInt(_0x19bdf6(0x171))/0x9*(-parseInt(_0x19bdf6(0x174))/0xa);if(_0x4639e4===_0x52c5db)break;else _0x31b3ec['push'](_0x31b3ec['shift']());}catch(_0x41d063){_0x31b3ec['push'](_0x31b3ec['shift']());}}}(a137_0x2362,0xba644));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a137_0x55df(_0x8e2343,_0x55cd51){_0x8e2343=_0x8e2343-0x169;const _0x2362b3=a137_0x2362();let _0x55df59=_0x2362b3[_0x8e2343];return _0x55df59;}function a137_0x2362(){const _0x427684=['planned','1189260HKWpqX','120026oGaHEB','delete','616176fgaNyY','\x20delete\x20could\x20not\x20be\x20verified.','Notification\x20config\x20','120qgOWlC','appCode',';\x20do\x20not\x20resubmit\x20automatically.','Inspect\x20with\x20','channelType','/notification/channel-config/delete','333192YqpVYh','38624zIqhFR','POST','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','notification','notification_config_delete_outcome_unknown','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','unshift','before','some','2xqJsQO','15lwZjPc','6407994HDJvYu','high-risk-write','87213aaBoJr','config-delete'];a137_0x2362=function(){return _0x427684;};return a137_0x2362();}import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a137_0x42c254(0x179),REFERENCE_WARNING=a137_0x42c254(0x180);async function prepareDelete(_0x318eec){const _0x1b8bc8=a137_0x42c254,_0x324c3d=readNotificationId(_0x318eec),_0x4496a5=await requireExactNotificationConfig(_0x318eec[_0x1b8bc8(0x175)],_0x324c3d,_0x1b8bc8(0x170));return{'id':_0x324c3d,'before':_0x4496a5};}export const notificationConfigDelete={'service':a137_0x42c254(0x17e),'command':a137_0x42c254(0x16c),'description':a137_0x42c254(0x17d),'risk':a137_0x42c254(0x16a),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x173c8e){readNotificationId(_0x173c8e),requireNotificationExplicitYes(_0x173c8e);},async 'dryRun'(_0x151020){const _0x583079=a137_0x42c254,_0x35e1b7=await prepareDelete(_0x151020),_0x1565ca=notificationLookupCommand(_0x151020[_0x583079(0x175)],_0x35e1b7[_0x583079(0x182)][_0x583079(0x178)]);return asDryRunResult({'operation':_0x583079(0x170),'selector':notificationSelector(_0x35e1b7[_0x583079(0x182)]),'before':projectNotificationConfig(_0x35e1b7[_0x583079(0x182)]),'after':null,'dryRun':!![],'backend':{'method':_0x583079(0x17c),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x583079(0x16d),'lookupCommand':_0x1565ca}},{'method':_0x583079(0x17c),'url':DELETE_PATH});},async 'execute'(_0x7cbf29){const _0x29a04b=a137_0x42c254;requireNotificationExplicitYes(_0x7cbf29);const _0x4e3de0=await prepareDelete(_0x7cbf29),_0x407bb3=notificationLookupCommand(_0x7cbf29['appCode'],_0x4e3de0[_0x29a04b(0x182)]['channelType']);let _0x3cccbd=![];try{await deleteNotificationChannelConfig(_0x4e3de0['id'],_0x7cbf29[_0x29a04b(0x175)]);}catch(_0x1b0dbe){if(!isPlatformTransportFailure(_0x1b0dbe))throw safeApiFailure(_0x29a04b(0x170),'mutation',_0x29a04b(0x177)+_0x407bb3+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x3cccbd=!![];}let _0x243026;try{_0x243026=await listNotificationChannelConfigs(_0x7cbf29[_0x29a04b(0x175)],_0x4e3de0[_0x29a04b(0x182)][_0x29a04b(0x178)]),validateNotificationDeleteReadback(_0x243026,_0x7cbf29[_0x29a04b(0x175)],_0x4e3de0[_0x29a04b(0x182)][_0x29a04b(0x178)]);}catch{throw notificationError(_0x3cccbd?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable',_0x29a04b(0x173)+_0x4e3de0['id']+_0x29a04b(0x172),_0x29a04b(0x177)+_0x407bb3+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x243026[_0x29a04b(0x183)](_0x567f5e=>_0x567f5e['id']===_0x4e3de0['id']))throw notificationError(_0x3cccbd?_0x29a04b(0x17f):'notification_config_delete_verification_failed',_0x29a04b(0x173)+_0x4e3de0['id']+'\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20'+_0x407bb3+_0x29a04b(0x176));const _0x2a1be1=[REFERENCE_WARNING];return _0x3cccbd&&_0x2a1be1[_0x29a04b(0x181)]('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x29a04b(0x170),'selector':notificationSelector(_0x4e3de0[_0x29a04b(0x182)]),'before':projectNotificationConfig(_0x4e3de0[_0x29a04b(0x182)]),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x2a1be1,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x3cccbd,'lookupCommand':_0x407bb3}},'message':'Deleted\x20notification\x20config\x20'+_0x4e3de0['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a138_0x51ce9a=a138_0x3348;(function(_0x139611,_0x3cb8ee){const _0x4ede20=a138_0x3348,_0x40d6a4=_0x139611();while(!![]){try{const _0x4f84af=parseInt(_0x4ede20(0x16c))/0x1*(-parseInt(_0x4ede20(0x17c))/0x2)+parseInt(_0x4ede20(0x17d))/0x3+-parseInt(_0x4ede20(0x17e))/0x4+parseInt(_0x4ede20(0x176))/0x5+parseInt(_0x4ede20(0x16d))/0x6*(parseInt(_0x4ede20(0x178))/0x7)+-parseInt(_0x4ede20(0x17a))/0x8+-parseInt(_0x4ede20(0x173))/0x9*(-parseInt(_0x4ede20(0x16e))/0xa);if(_0x4f84af===_0x3cb8ee)break;else _0x40d6a4['push'](_0x40d6a4['shift']());}catch(_0x5513b0){_0x40d6a4['push'](_0x40d6a4['shift']());}}}(a138_0x233f,0xc325e));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a138_0x3348(_0x339cbc,_0xf778de){_0x339cbc=_0x339cbc-0x16c;const _0x233f60=a138_0x233f();let _0x3348f1=_0x233f60[_0x339cbc];return _0x3348f1;}import{listNotificationChannelConfigs}from'../../core/api-client.js';function a138_0x233f(){const _0x1d2400=['4446964DDQRpB','11GwgeCA','6otbzAN','3430mdcEXl','map','type','appCode','length','8037FdLeoo','config-list','\x20notification\x20config(s)','5532715PBUlBo','string','6172103VOFcDj','notification','5876000nfThrv','EMAIL','12444juVLqo','1258314iOCXDJ'];a138_0x233f=function(){return _0x1d2400;};return a138_0x233f();}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a138_0x51ce9a(0x179),'command':a138_0x51ce9a(0x174),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a138_0x51ce9a(0x170),'type':a138_0x51ce9a(0x177),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES,'default':a138_0x51ce9a(0x17b)}],async 'validate'(_0x498233){readNotificationChannelType(_0x498233);},async 'execute'(_0x510dca){const _0x336817=a138_0x51ce9a,_0x439cb8=readNotificationChannelType(_0x510dca),_0x5e5fc9=await listNotificationChannelConfigs(_0x510dca[_0x336817(0x171)],_0x439cb8),_0x16dbdc=_0x5e5fc9[_0x336817(0x16f)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x510dca[_0x336817(0x171)],'channelType':_0x439cb8,'count':_0x16dbdc[_0x336817(0x172)],'configs':_0x16dbdc},'message':'Found\x20'+_0x16dbdc[_0x336817(0x172)]+'\x20'+_0x439cb8+_0x336817(0x175)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a139_0x4677(_0x3cde80,_0x49d2ae){_0x3cde80=_0x3cde80-0x147;const _0x27bee0=a139_0x27be();let _0x467751=_0x27bee0[_0x3cde80];return _0x467751;}const a139_0x46e46b=a139_0x4677;(function(_0x2823c4,_0x582cc4){const _0x1e8d0f=a139_0x4677,_0x253395=_0x2823c4();while(!![]){try{const _0x5d80d5=parseInt(_0x1e8d0f(0x150))/0x1+-parseInt(_0x1e8d0f(0x164))/0x2*(-parseInt(_0x1e8d0f(0x14c))/0x3)+-parseInt(_0x1e8d0f(0x154))/0x4*(-parseInt(_0x1e8d0f(0x153))/0x5)+parseInt(_0x1e8d0f(0x167))/0x6+parseInt(_0x1e8d0f(0x148))/0x7*(-parseInt(_0x1e8d0f(0x157))/0x8)+parseInt(_0x1e8d0f(0x16b))/0x9+parseInt(_0x1e8d0f(0x15c))/0xa*(-parseInt(_0x1e8d0f(0x15d))/0xb);if(_0x5d80d5===_0x582cc4)break;else _0x253395['push'](_0x253395['shift']());}catch(_0x2749c9){_0x253395['push'](_0x253395['shift']());}}}(a139_0x27be,0xa5757));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a139_0x27be(){const _0x670593=['Inspect\x20with\x20--id\x20','verified','channelType','50XjqKRX','1992034wsCFls','notification_config_update_outcome_unknown','config-update','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','notification','\x20via\x20','Inspect\x20ID\x20','5950LqpDOS','verifiedFields','Notification\x20config\x20','19128fNzjLY','Updated\x20notification\x20config\x20',';\x20do\x20not\x20resubmit\x20automatically.','appCode','4784193kQdVqM','patch','\x20with\x20','POST','5747WHQHzL','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','provesChange','high-risk-write','678buTtCX',';\x20no\x20automatic\x20retry\x20was\x20attempted.','notification_config_update_verification_unavailable','planned','810146jfbUdP','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','before','171025uDzuCY','44edlWoP','update','mutation','7896xAhhNd','/notification/channel-config/update'];a139_0x27be=function(){return _0x670593;};return a139_0x27be();}import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a139_0x46e46b(0x158);async function prepareUpdate(_0x1bd121){const _0x1be50a=a139_0x46e46b,_0x173db7=readNotificationId(_0x1bd121),_0x40b4de=await readNotificationDocument(_0x1bd121,_0x1be50a(0x155)),_0x19978f=await requireExactNotificationConfig(_0x1bd121[_0x1be50a(0x16a)],_0x173db7,'update');return{'id':_0x173db7,'patch':_0x40b4de,'before':_0x19978f,'payload':mergeUpdateInput(_0x19978f,_0x40b4de),'planned':plannedUpdateProjection(_0x19978f,_0x40b4de)};}export const notificationConfigUpdate={'service':a139_0x46e46b(0x161),'command':a139_0x46e46b(0x15f),'description':a139_0x46e46b(0x151),'risk':a139_0x46e46b(0x14b),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x45b2ff){readNotificationId(_0x45b2ff),assertSingleNotificationSource(_0x45b2ff),requireNotificationExplicitYes(_0x45b2ff);},async 'dryRun'(_0x16737f){const _0x3dc6dc=a139_0x46e46b,_0x1f9ec8=await prepareUpdate(_0x16737f),_0x5af83b=notificationLookupCommand(_0x16737f[_0x3dc6dc(0x16a)],_0x1f9ec8['before'][_0x3dc6dc(0x15b)]);return asDryRunResult({'operation':_0x3dc6dc(0x155),'selector':notificationSelector(_0x1f9ec8['before']),'before':projectNotificationConfig(_0x1f9ec8[_0x3dc6dc(0x152)]),'after':_0x1f9ec8[_0x3dc6dc(0x14f)],'dryRun':!![],'backend':{'method':_0x3dc6dc(0x147),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x3dc6dc(0x14f),'lookupCommand':_0x5af83b}},{'method':_0x3dc6dc(0x147),'url':UPDATE_PATH});},async 'execute'(_0xb78177){const _0x1864b8=a139_0x46e46b;requireNotificationExplicitYes(_0xb78177);const _0x49a898=await prepareUpdate(_0xb78177),_0x4e0d5a=notificationLookupCommand(_0xb78177[_0x1864b8(0x16a)],_0x49a898[_0x1864b8(0x152)][_0x1864b8(0x15b)]);let _0x5b5416=![];try{await updateNotificationChannelConfig(_0x49a898['payload']);}catch(_0x351a64){if(!isPlatformTransportFailure(_0x351a64))throw safeApiFailure(_0x1864b8(0x155),_0x1864b8(0x156),_0x1864b8(0x163)+_0x49a898['id']+_0x1864b8(0x16d)+_0x4e0d5a+_0x1864b8(0x14d));_0x5b5416=!![];}let _0x2d84b8;try{const _0x10eebd=await getNotificationChannelConfig(_0x49a898['id'],_0xb78177[_0x1864b8(0x16a)]);_0x2d84b8=normalizeExactNotificationConfig(_0x10eebd,_0x49a898['id'],_0xb78177[_0x1864b8(0x16a)]);}catch{throw notificationError(_0x5b5416?_0x1864b8(0x15e):_0x1864b8(0x14e),_0x1864b8(0x166)+_0x49a898['id']+_0x1864b8(0x149),_0x1864b8(0x159)+_0x49a898['id']+_0x1864b8(0x162)+_0x4e0d5a+_0x1864b8(0x169));}const _0x1e879b=requestedSafeFieldsMatch(_0x49a898[_0x1864b8(0x152)],_0x2d84b8,_0x49a898[_0x1864b8(0x16c)]);if(!_0x1e879b['allMatch']||_0x5b5416&&!_0x1e879b[_0x1864b8(0x14a)])throw notificationError(_0x5b5416?_0x1864b8(0x15e):'notification_config_update_verification_failed',_0x1864b8(0x166)+_0x49a898['id']+_0x1864b8(0x160),_0x1864b8(0x159)+_0x49a898['id']+'\x20via\x20'+_0x4e0d5a+_0x1864b8(0x169));const _0x205d21=_0x5b5416?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x2d84b8),'before':projectNotificationConfig(_0x49a898[_0x1864b8(0x152)]),'after':projectNotificationConfig(_0x2d84b8),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x205d21,'verification':{'status':_0x1864b8(0x15a),'recoveredAfterUnknownResponse':_0x5b5416,'verifiedFields':_0x1e879b[_0x1864b8(0x165)],'lookupCommand':_0x4e0d5a}},'message':_0x1864b8(0x168)+_0x2d84b8['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4811bb,_0x22db45){const _0x272e73=a140_0x151c,_0x13d8c4=_0x4811bb();while(!![]){try{const _0x4840c6=parseInt(_0x272e73(0x119))/0x1+-parseInt(_0x272e73(0x11b))/0x2*(-parseInt(_0x272e73(0x11e))/0x3)+parseInt(_0x272e73(0x118))/0x4+parseInt(_0x272e73(0x11d))/0x5+parseInt(_0x272e73(0x11c))/0x6+parseInt(_0x272e73(0x11a))/0x7+-parseInt(_0x272e73(0x11f))/0x8*(parseInt(_0x272e73(0x117))/0x9);if(_0x4840c6===_0x22db45)break;else _0x13d8c4['push'](_0x13d8c4['shift']());}catch(_0x324424){_0x13d8c4['push'](_0x13d8c4['shift']());}}}(a140_0x5e85,0x5249f));import{notificationConfigList}from'../../commands/notification/config-list.js';function a140_0x151c(_0x57f760,_0x108507){_0x57f760=_0x57f760-0x117;const _0x5e85aa=a140_0x5e85();let _0x151c33=_0x5e85aa[_0x57f760];return _0x151c33;}import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a140_0x5e85(){const _0x5f6dd0=['15374wgXaWT','3645504TGAQcA','1105770tfHGVD','249ehRPCG','3491656CQmjuN','45VjJgby','808216HOzpvF','596453uQVJvv','1778518RqmUJf'];a140_0x5e85=function(){return _0x5f6dd0;};return a140_0x5e85();}
|