@lovrabet/rabetbase-cli 2.5.0-beta.5 → 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/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(_0x390624,_0x1df0c){const _0x2f1ba3=a132_0x1548,_0xf7082b=_0x390624();while(!![]){try{const _0x37c777=parseInt(_0x2f1ba3(0x142))/0x1*(parseInt(_0x2f1ba3(0x14e))/0x2)+-parseInt(_0x2f1ba3(0x11f))/0x3*(-parseInt(_0x2f1ba3(0x133))/0x4)+parseInt(_0x2f1ba3(0x11e))/0x5+-parseInt(_0x2f1ba3(0x10d))/0x6*(parseInt(_0x2f1ba3(0x13e))/0x7)+parseInt(_0x2f1ba3(0x13b))/0x8+-parseInt(_0x2f1ba3(0x126))/0x9+-parseInt(_0x2f1ba3(0x14b))/0xa*(-parseInt(_0x2f1ba3(0x11a))/0xb);if(_0x37c777===_0x1df0c)break;else _0xf7082b['push'](_0xf7082b['shift']());}catch(_0x5d4a70){_0xf7082b['push'](_0xf7082b['shift']());}}}(a132_0x4f30,0x282fd));function a132_0x1548(_0x1c1ae9,_0x1099a0){_0x1c1ae9=_0x1c1ae9-0x10d;const _0x4f30d9=a132_0x4f30();let _0x1548ae=_0x4f30d9[_0x1c1ae9];return _0x1548ae;}import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a132_0x4f30(){const _0x39c8a4=['4870RmzJIt','--params.','cwd','8cRdAqQ','18BddmPL','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','paths','patch','selection','.js','filter','setLogPath','Menu\x20asset\x20update\x20completed','dryRun','has','unshift','string','462gxNLvX','Start\x20non-interactive\x20menu\x20asset\x20update','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','label','201895nNXcYZ','32724RWLbof','join','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','some','\x22\x20(','.\x20Allowed\x20values:\x20replace,\x20patch','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','1483695uHZoKi','all','fulfilled','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','value','.css','push','\x20existing\x20JS\x20resources\x20for\x20\x22','map','endsWith','object','status','info','32gobBER','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','menu\x20asset-update\x20cannot\x20patch\x20','length','trim','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','path','cssUrl','1601888nNKmvt','extend','Invalid\x20--mode:\x20','527513dUnggP','loadScriptMode','jsUrl','Invalid\x20--params:\x20','51801TdylGT','split','parse','toLowerCase','field','resources','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','force','menuIds'];a132_0x4f30=function(){return _0x39c8a4;};return a132_0x4f30();}import{logger}from'../../../utils/logger.js';function validateParams(_0xa735eb){const _0x1f6aff=a132_0x1548,_0x59d44f=[];return _0xa735eb[_0x1f6aff(0x140)]&&!isValidJsHttpsUrl(_0xa735eb[_0x1f6aff(0x140)])&&_0x59d44f[_0x1f6aff(0x12c)]({'field':_0x1f6aff(0x140),'message':_0x1f6aff(0x10e)}),_0xa735eb[_0x1f6aff(0x13a)]&&!isValidCssHttpsUrl(_0xa735eb['cssUrl'])&&_0x59d44f[_0x1f6aff(0x12c)]({'field':_0x1f6aff(0x13a),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x59d44f;}export async function runMenuUpdateCore(_0x391edc,_0x2636bf,_0x549836,_0x1428bb={}){const _0x25a939=a132_0x1548,_0x1212ff=parseUpdateParamsFlag(_0x549836),_0x2ace98=normalizeMode(_0x1428bb['mode']);validateSelection(_0x1428bb[_0x25a939(0x111)]);const _0x536a78=[];if(_0x1212ff['jsUrl'])_0x536a78[_0x25a939(0x12c)](_0x1212ff[_0x25a939(0x140)]);if(_0x1212ff['cssUrl'])_0x536a78[_0x25a939(0x12c)](_0x1212ff['cssUrl']);const _0x448108=validateParams(_0x1212ff);if(_0x448108[_0x25a939(0x136)]>0x0){const _0xe51ac0=_0x448108['map'](_0x524ae7=>_0x25a939(0x14c)+_0x524ae7[_0x25a939(0x146)]+':\x20'+_0x524ae7['message'])['join'](';\x20');throw new Error(_0x25a939(0x141)+_0xe51ac0);}if(_0x536a78[_0x25a939(0x136)]===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x25a939(0x114)](process[_0x25a939(0x14d)]()),logger[_0x25a939(0x132)]('menu-asset-update',_0x25a939(0x11b),{'appCode':_0x391edc,'jsUrl':_0x1212ff['jsUrl'],'cssUrl':_0x1212ff[_0x25a939(0x13a)],'mode':_0x2ace98,'dryRun':_0x1428bb[_0x25a939(0x116)]===!![]});if(_0x1212ff[_0x25a939(0x140)]){const _0x1c4245=await isUrlReachable(_0x1212ff['jsUrl']);if(!_0x1c4245)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x1212ff[_0x25a939(0x140)]);}if(_0x1212ff['cssUrl']){const _0x37422d=await isUrlReachable(_0x1212ff[_0x25a939(0x13a)]);if(!_0x37422d)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x1212ff[_0x25a939(0x13a)]);}const _0x90eaf=await getOnlineMenuList(_0x391edc,_0x2636bf),_0x3705b6=_0x90eaf[_0x25a939(0x113)](_0x3c19d2=>_0x3c19d2[_0x25a939(0x147)]['length']>0x0),_0xdfb61c=selectMenusForUpdate(_0x3705b6,_0x1428bb['selection']);if(_0xdfb61c[_0x25a939(0x136)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x1428bb[_0x25a939(0x116)]===!![]};const _0x5ed0ac=_0xdfb61c[_0x25a939(0x12e)](_0x3a3fe9=>buildMenuUpdateDiff(_0x3a3fe9,_0x1212ff,_0x2ace98,_0x1428bb[_0x25a939(0x149)]===!![],_0x1428bb[_0x25a939(0x13f)]));if(_0x1428bb['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x5ed0ac};const _0x40cfd1=await Promise['allSettled'](_0xdfb61c[_0x25a939(0x12e)]((_0x123ae6,_0xa42dfb)=>updateMenuCdnUrl(_0x391edc,_0x2636bf,{'id':_0x123ae6['id'],'label':_0x123ae6['label'],'path':_0x123ae6['path'],'resources':_0x5ed0ac[_0xa42dfb]['after'][_0x25a939(0x147)],'extend':_0x123ae6[_0x25a939(0x13c)]??null,'loadScriptMode':_0x1428bb[_0x25a939(0x13f)]}))),_0xfa752c=_0x40cfd1[_0x25a939(0x113)](_0xbf45a6=>_0xbf45a6[_0x25a939(0x131)]===_0x25a939(0x128))['map'](_0x28cf65=>_0x28cf65[_0x25a939(0x12a)]),_0x3da1ea=_0x40cfd1[_0x25a939(0x113)](_0x1acf07=>_0x1acf07[_0x25a939(0x131)]==='rejected')[_0x25a939(0x136)];return logger[_0x25a939(0x132)]('menu-asset-update',_0x25a939(0x115),{'count':_0xdfb61c[_0x25a939(0x136)],'resources':_0x536a78}),{'updated':_0xfa752c[_0x25a939(0x136)],'failed':_0x3da1ea,'skipped':![],'menus':_0xfa752c};}function validateSelection(_0x15d4ba){const _0x473e44=a132_0x1548;if(!_0x15d4ba)throw new Error(_0x473e44(0x11c));if(_0x15d4ba[_0x473e44(0x127)]&&(_0x15d4ba[_0x473e44(0x14a)][_0x473e44(0x136)]>0x0||_0x15d4ba[_0x473e44(0x10f)][_0x473e44(0x136)]>0x0))throw new Error(_0x473e44(0x129));if(!_0x15d4ba[_0x473e44(0x127)]&&_0x15d4ba[_0x473e44(0x14a)]['length']===0x0&&_0x15d4ba[_0x473e44(0x10f)]['length']===0x0)throw new Error(_0x473e44(0x11c));}export function selectMenusForUpdate(_0x3f4f10,_0x5098a5){const _0x5d4129=a132_0x1548;validateSelection(_0x5098a5);if(_0x5098a5[_0x5d4129(0x127)])return _0x3f4f10;const _0x3a54f3=new Set(_0x3f4f10['map'](_0x1fc882=>_0x1fc882['id'])),_0xe91fdd=new Set(_0x3f4f10[_0x5d4129(0x12e)](_0x2562a2=>_0x2562a2[_0x5d4129(0x139)])),_0x214527=_0x5098a5[_0x5d4129(0x14a)][_0x5d4129(0x113)](_0x7fb8ec=>!_0x3a54f3[_0x5d4129(0x117)](_0x7fb8ec)),_0x5fba7a=_0x5098a5['paths']['filter'](_0x5774ef=>!_0xe91fdd['has'](_0x5774ef));if(_0x214527[_0x5d4129(0x136)]>0x0||_0x5fba7a['length']>0x0){const _0x5b3f6c=[..._0x214527['map'](_0x3af4d7=>String(_0x3af4d7)),..._0x5fba7a][_0x5d4129(0x120)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x5b3f6c);}const _0x255772=new Set(_0x5098a5['menuIds']),_0x3372c3=new Set(_0x5098a5['paths']);return _0x3f4f10[_0x5d4129(0x113)](_0x445756=>_0x255772[_0x5d4129(0x117)](_0x445756['id'])||_0x3372c3[_0x5d4129(0x117)](_0x445756[_0x5d4129(0x139)]));}function normalizeMode(_0x13de72){const _0x372dff=a132_0x1548;if(!_0x13de72)return'patch';if(_0x13de72==='replace'||_0x13de72===_0x372dff(0x110))return _0x13de72;throw new Error(_0x372dff(0x13d)+_0x13de72+_0x372dff(0x124));}function buildMenuUpdateDiff(_0x51c0b1,_0x3b6d85,_0x3fc417,_0x462d7b,_0x5b9762){const _0x3df686=a132_0x1548,_0x1155ea=[..._0x51c0b1['resources']];_0x3fc417==='patch'&&assertUnambiguousPatchResources(_0x51c0b1,_0x1155ea,_0x3b6d85);const _0xf449af=_0x3fc417===_0x3df686(0x110)?patchResources(_0x1155ea,_0x3b6d85):replaceResources(_0x3b6d85),_0x2dd690=[],_0x5c1cae=_0x1155ea[_0x3df686(0x122)](isJsResource),_0xebea2d=_0xf449af['some'](isJsResource);if(_0x5c1cae&&!_0xebea2d){const _0xf804fe=_0x3df686(0x125)+_0x51c0b1[_0x3df686(0x11d)]+_0x3df686(0x123)+_0x51c0b1[_0x3df686(0x139)]+').\x20'+_0x3df686(0x121);if(!_0x462d7b)throw new Error(_0xf804fe);_0x2dd690[_0x3df686(0x12c)](_0xf804fe);}const _0x3bce68=_0x1155ea[_0x3df686(0x122)](isCssResource),_0x247a71=_0xf449af['some'](isCssResource);_0x3bce68&&!_0x247a71&&_0x2dd690[_0x3df686(0x12c)](_0x3df686(0x134)+_0x51c0b1['label']+_0x3df686(0x123)+_0x51c0b1['path']+').');const _0x2f1eeb=typeof _0x51c0b1['extend']?.[_0x3df686(0x13f)]===_0x3df686(0x119)?_0x51c0b1[_0x3df686(0x13c)][_0x3df686(0x13f)]:null,_0x19785e=_0x5b9762?{'loadScriptMode':_0x2f1eeb}:{},_0x4f1c05=_0x5b9762?{'loadScriptMode':_0x5b9762}:{};return{'id':_0x51c0b1['id'],'label':_0x51c0b1[_0x3df686(0x11d)],'path':_0x51c0b1[_0x3df686(0x139)],'mode':_0x3fc417,'before':{'resources':_0x1155ea,..._0x19785e},'after':{'resources':_0xf449af,..._0x4f1c05},'warnings':_0x2dd690};}function replaceResources(_0x38259f){const _0x30a97f=a132_0x1548;return[_0x38259f[_0x30a97f(0x140)],_0x38259f['cssUrl']]['filter'](_0x59ac44=>!!_0x59ac44);}function assertUnambiguousPatchResources(_0x56a8a8,_0x27044c,_0x3db5a6){const _0x3bf1d8=a132_0x1548,_0x1b48b3=_0x27044c['filter'](isJsResource)[_0x3bf1d8(0x136)];if(_0x3db5a6['jsUrl']&&_0x1b48b3>0x1)throw new Error(_0x3bf1d8(0x135)+_0x1b48b3+_0x3bf1d8(0x12d)+_0x56a8a8[_0x3bf1d8(0x11d)]+_0x3bf1d8(0x123)+_0x56a8a8['path']+')\x20'+_0x3bf1d8(0x148));const _0x5f380e=_0x27044c[_0x3bf1d8(0x113)](isCssResource)[_0x3bf1d8(0x136)];if(_0x3db5a6[_0x3bf1d8(0x13a)]&&_0x5f380e>0x1)throw new Error(_0x3bf1d8(0x135)+_0x5f380e+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x56a8a8[_0x3bf1d8(0x11d)]+_0x3bf1d8(0x123)+_0x56a8a8[_0x3bf1d8(0x139)]+')\x20'+_0x3bf1d8(0x138));}function patchResources(_0x15dff1,_0x258521){const _0x2bb738=a132_0x1548;let _0x2eaec2=![],_0x1af335=![];const _0x3feaec=[];for(const _0x11f171 of _0x15dff1){if(isJsResource(_0x11f171)){if(_0x258521[_0x2bb738(0x140)]&&!_0x2eaec2)_0x3feaec[_0x2bb738(0x12c)](_0x258521['jsUrl']),_0x2eaec2=!![];else!_0x258521['jsUrl']&&_0x3feaec[_0x2bb738(0x12c)](_0x11f171);continue;}if(isCssResource(_0x11f171)){if(_0x258521[_0x2bb738(0x13a)]&&!_0x1af335)_0x3feaec[_0x2bb738(0x12c)](_0x258521['cssUrl']),_0x1af335=!![];else!_0x258521['cssUrl']&&_0x3feaec[_0x2bb738(0x12c)](_0x11f171);continue;}_0x3feaec['push'](_0x11f171);}return _0x258521['jsUrl']&&!_0x2eaec2&&_0x3feaec[_0x2bb738(0x118)](_0x258521['jsUrl']),_0x258521[_0x2bb738(0x13a)]&&!_0x1af335&&_0x3feaec[_0x2bb738(0x12c)](_0x258521[_0x2bb738(0x13a)]),_0x3feaec;}function isJsResource(_0x59bbfe){const _0x58f1e3=a132_0x1548;return stripQuery(_0x59bbfe)[_0x58f1e3(0x145)]()[_0x58f1e3(0x12f)](_0x58f1e3(0x112));}function isCssResource(_0x697d76){const _0xbdd7b0=a132_0x1548;return stripQuery(_0x697d76)['toLowerCase']()[_0xbdd7b0(0x12f)](_0xbdd7b0(0x12b));}function stripQuery(_0x1151d1){const _0x5c14e7=a132_0x1548;return _0x1151d1[_0x5c14e7(0x143)]('?')[0x0]??_0x1151d1;}function parseUpdateParamsFlag(_0x5b0242){const _0x4fafc9=a132_0x1548;if(!_0x5b0242||typeof _0x5b0242!=='string')return{};try{const _0x86c37c=JSON[_0x4fafc9(0x144)](_0x5b0242);if(typeof _0x86c37c!==_0x4fafc9(0x130)||_0x86c37c===null||Array['isArray'](_0x86c37c))return{};return{'jsUrl':typeof _0x86c37c[_0x4fafc9(0x140)]===_0x4fafc9(0x119)?_0x86c37c[_0x4fafc9(0x140)][_0x4fafc9(0x137)]():undefined,'cssUrl':typeof _0x86c37c['cssUrl']===_0x4fafc9(0x119)?_0x86c37c[_0x4fafc9(0x13a)]['trim']():undefined};}catch{return{};}}
|
|
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_0x342536=a135_0x5192;(function(_0xade0c2,_0x1a5754){const _0x11d1c3=a135_0x5192,_0x4d7488=_0xade0c2();while(!![]){try{const _0x2b7d55=-parseInt(_0x11d1c3(0x202))/0x1+-parseInt(_0x11d1c3(0x240))/0x2+-parseInt(_0x11d1c3(0x210))/0x3+parseInt(_0x11d1c3(0x23a))/0x4+parseInt(_0x11d1c3(0x1d3))/0x5*(-parseInt(_0x11d1c3(0x1ef))/0x6)+-parseInt(_0x11d1c3(0x1f2))/0x7+parseInt(_0x11d1c3(0x1e5))/0x8;if(_0x2b7d55===_0x1a5754)break;else _0x4d7488['push'](_0x4d7488['shift']());}catch(_0x3b6194){_0x4d7488['push'](_0x4d7488['shift']());}}}(a135_0x2703,0xc8745));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';function a135_0x5192(_0x4f0fbf,_0x386f5e){_0x4f0fbf=_0x4f0fbf-0x1cf;const _0x2703d2=a135_0x2703();let _0x519264=_0x2703d2[_0x4f0fbf];return _0x519264;}import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a135_0x342536(0x1f5)}];export const menuVisibilityUpdate={'service':a135_0x342536(0x200),'command':a135_0x342536(0x1f1),'description':a135_0x342536(0x21c),'risk':a135_0x342536(0x209),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':a135_0x342536(0x1d9),'description':a135_0x342536(0x235)},{'name':a135_0x342536(0x211),'type':a135_0x342536(0x1d9),'description':a135_0x342536(0x1ea)},{'name':a135_0x342536(0x225),'type':a135_0x342536(0x1ff),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a135_0x342536(0x223),'type':a135_0x342536(0x1ff),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a135_0x342536(0x222),'type':'number','description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5f4acb){parseInput(_0x5f4acb),requireExplicitYes(_0x5f4acb);},async 'dryRun'(_0x89908e){const _0x1a30d5=a135_0x342536,_0x5c403d=await buildPlan(_0x89908e,!![]),_0x183f21=_0x5c403d[_0x1a30d5(0x230)][_0x1a30d5(0x20f)]?.[_0x1a30d5(0x1de)]??0x0,_0x2d98d5=_0x5c403d[_0x1a30d5(0x230)][_0x1a30d5(0x23b)]['length']-_0x183f21;return menuDryRunResult(_0x5c403d[_0x1a30d5(0x230)],{'method':_0x1a30d5(0x1d5),'url':_0x1a30d5(0x1f5),'body':{'updates':_0x5c403d[_0x1a30d5(0x230)][_0x1a30d5(0x20f)]?.[_0x1a30d5(0x219)](_0x24b8bb=>_0x24b8bb['body'])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x183f21+'\x20menu(s);\x20skip\x20'+_0x2d98d5+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x9cec2b){const _0xdead29=a135_0x342536;requireExplicitYes(_0x9cec2b);const _0x3c3625=await buildPlan(_0x9cec2b,![]);await recheckMutationSnapshot(_0x9cec2b,_0x3c3625['plan'],_0xdead29(0x232));const _0x41a6ae=[],_0x22822e=[],_0x4732f1=[];for(const _0x474f1a of _0x3c3625['plan']['targets']){if(_0x474f1a[_0xdead29(0x208)][_0xdead29(0x225)]===_0x3c3625[_0xdead29(0x230)][_0xdead29(0x215)]){_0x41a6ae[_0xdead29(0x20b)]({'id':_0x474f1a['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x9cec2b[_0xdead29(0x227)],_0x9cec2b[_0xdead29(0x1fb)],{'id':_0x474f1a['id'],'visible':_0x3c3625[_0xdead29(0x230)][_0xdead29(0x215)]}),_0x41a6ae[_0xdead29(0x20b)]({'id':_0x474f1a['id'],'updated':!![],'skipped':![]});}catch(_0x2de758){const _0x2ce631=mapMenuApiError(_0x2de758,_0xdead29(0x1d1),_0x474f1a['id']);if(isMenuResponseLoss(_0x2de758)&&_0x2ce631[_0xdead29(0x23d)]!==_0xdead29(0x1fd)){_0x4732f1['push'](_0x474f1a['id']);continue;}_0x22822e[_0xdead29(0x20b)]({'id':_0x474f1a['id'],'stage':'update','code':_0x2ce631[_0xdead29(0x23d)],'message':_0x2ce631[_0xdead29(0x1e4)]});}}let _0x5cef3b;try{_0x5cef3b=await fetchMenuSnapshot(_0x9cec2b[_0xdead29(0x227)],_0x9cec2b[_0xdead29(0x1fb)]);}catch(_0x4b6a10){const _0x3c8b8f=describeMenuErrorCause(_0x4b6a10,_0xdead29(0x20a)),_0x4f658f=_0x4732f1[_0xdead29(0x219)](_0x18fee9=>({'id':_0x18fee9,'stage':'update-recovery','code':_0xdead29(0x1df),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x18fee9+_0xdead29(0x224),'requestedStateConfirmed':![],'recovered':![]})),_0x3decff={'stage':'verification','code':'menu_verification_failed','message':_0xdead29(0x20c),'targetIds':_0x3c3625['plan'][_0xdead29(0x23b)][_0xdead29(0x219)](_0x2eada9=>_0x2eada9['id']),'requestedStateConfirmed':![],..._0x3c8b8f};throw menuFailure(asVerificationError(_0x4b6a10,_0xdead29(0x21b)),_0x3c3625['plan'],{'stage':_0xdead29(0x22e),'succeeded':_0x41a6ae,'failedRecords':[..._0x22822e,..._0x4f658f,_0x3decff],'warnings':[_0xdead29(0x1f8)],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':_0xdead29(0x1fe)}});}const _0x1ba17a=[];for(const _0x49e6e1 of _0x41a6ae){const _0x128098=Number(_0x49e6e1['id']),_0x564c91=_0x3c3625[_0xdead29(0x22a)][_0xdead29(0x221)](_0x128098),_0x1a693f=_0x5cef3b[_0xdead29(0x1d0)]['get'](_0x128098);try{verifyVisibilityUpdate(_0x564c91,_0x1a693f,_0x3c3625[_0xdead29(0x230)][_0xdead29(0x215)]);}catch(_0x4db0f1){const _0x3fef9e=asVerificationError(_0x4db0f1,_0xdead29(0x213)+_0x128098+_0xdead29(0x233));_0x1ba17a[_0xdead29(0x20b)]({'id':_0x128098,'stage':_0xdead29(0x22e),'code':_0x3fef9e[_0xdead29(0x23d)],'message':_0x3fef9e[_0xdead29(0x1e4)],'requestedStateConfirmed':![]});}}for(const _0x1edcee of _0x4732f1){const _0x28d5cb=_0x3c3625[_0xdead29(0x22a)][_0xdead29(0x221)](_0x1edcee),_0x5c363b=_0x5cef3b['byId'][_0xdead29(0x221)](_0x1edcee);try{verifyVisibilityUpdate(_0x28d5cb,_0x5c363b,_0x3c3625[_0xdead29(0x230)][_0xdead29(0x215)]),_0x41a6ae[_0xdead29(0x20b)]({'id':_0x1edcee,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x48740a){const _0x3fe0f5=asVerificationError(_0x48740a,_0xdead29(0x205)+_0x1edcee+_0xdead29(0x214));_0x1ba17a['push']({'id':_0x1edcee,'stage':_0xdead29(0x228),'code':_0x3fe0f5[_0xdead29(0x23d)],'message':_0x3fe0f5['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x1ba17a[_0xdead29(0x1de)]>0x0){const _0x14812b=_0x1ba17a[_0xdead29(0x219)](_0x4ebc1b=>Number(_0x4ebc1b['id'])),_0x30e898=_0x41a6ae['filter'](_0x4b6833=>_0x4b6833[_0xdead29(0x241)]===!![])['length'],_0x1a82ba=menuError(_0xdead29(0x1df),_0xdead29(0x1e6)+_0x14812b[_0xdead29(0x22d)](',\x20')+'.',_0xdead29(0x1f6));throw menuFailure(_0x1a82ba,_0x3c3625[_0xdead29(0x230)],{'stage':_0xdead29(0x22e),'succeeded':_0x41a6ae,'failedRecords':[..._0x22822e,..._0x1ba17a],'warnings':[_0xdead29(0x1e7)],'verification':{'status':_0xdead29(0x1ee),..._0x14812b[_0xdead29(0x1de)]===0x1?{'targetId':_0x14812b[0x0]}:{'targetIds':_0x14812b},'recoveredCount':_0x30e898,'lookupCommand':_0xdead29(0x1fe)}});}const _0x27e3d2=_0x41a6ae[_0xdead29(0x1e2)](_0x542118=>_0x542118['updated']===!![])[_0xdead29(0x1de)],_0x18572b=_0x41a6ae['length']-_0x27e3d2,_0x57a2c2={..._0x3c3625[_0xdead29(0x230)],'succeeded':_0x41a6ae,'failed':_0x22822e,'warnings':_0x22822e['length']>0x0?[..._0x3c3625['plan'][_0xdead29(0x1e0)],_0xdead29(0x242)]:_0x3c3625['plan'][_0xdead29(0x1e0)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x5cef3b['hash'],'matchesRequestedState':_0x22822e[_0xdead29(0x1de)]===0x0,'recoveredCount':_0x4732f1[_0xdead29(0x1de)]}};return{'ok':_0x22822e[_0xdead29(0x1de)]===0x0,'data':_0x57a2c2,'message':_0x22822e['length']===0x0?'Updated\x20visibility\x20for\x20'+_0x27e3d2+'\x20menu(s);\x20skipped\x20'+_0x18572b+_0xdead29(0x212):_0xdead29(0x217)+_0x27e3d2+_0xdead29(0x1eb)+_0x18572b+_0xdead29(0x204)+_0x22822e[_0xdead29(0x1de)]+_0xdead29(0x1da)};}};function parseInput(_0x21de01){const _0x222a17=a135_0x342536,_0x59d8d9=parseMenuIds(_0x21de01[_0x222a17(0x1e8)]('menu-ids')),_0x3c0672=parseCsv(_0x21de01[_0x222a17(0x1e8)](_0x222a17(0x211)));if(_0x59d8d9[_0x222a17(0x1de)]===0x0&&_0x3c0672[_0x222a17(0x1de)]===0x0)throw CliErrors['validation'](_0x222a17(0x1d2));const _0x2b4040=parseBooleanFlag(_0x21de01,_0x222a17(0x225),!![]),_0x3d09c7=parseBooleanFlag(_0x21de01,_0x222a17(0x223),![]);let _0x48e38d;if(hasFlag(_0x21de01,_0x222a17(0x222))){_0x48e38d=_0x21de01[_0x222a17(0x238)](_0x222a17(0x222));if(!Number[_0x222a17(0x1d4)](_0x48e38d)||_0x48e38d<0x0)throw CliErrors[_0x222a17(0x23e)](_0x222a17(0x237));}return{'menuIds':_0x59d8d9,'paths':_0x3c0672,'visible':_0x2b4040,'expectVisible':_0x3d09c7,'expectedCount':_0x48e38d};}async function buildPlan(_0x34b076,_0x2100b3){const _0x4505e2=a135_0x342536,_0x3407d8=parseInput(_0x34b076),_0x2ef513=await fetchMutationSnapshot(_0x34b076,'update\x20menu\x20visibility'),_0x19bc53=selectTargets(_0x2ef513[_0x4505e2(0x1d6)],_0x3407d8[_0x4505e2(0x1f3)],_0x3407d8['paths']);if(_0x3407d8[_0x4505e2(0x1db)]!==undefined&&_0x19bc53[_0x4505e2(0x1de)]!==_0x3407d8[_0x4505e2(0x1db)])throw menuError(_0x4505e2(0x1e1),'Selected\x20'+_0x19bc53[_0x4505e2(0x1de)]+_0x4505e2(0x1ed)+_0x3407d8[_0x4505e2(0x1db)]+'.',_0x4505e2(0x21f));if(_0x3407d8[_0x4505e2(0x207)]!==undefined){const _0x1d211e=_0x19bc53[_0x4505e2(0x1e2)](_0x277e3a=>_0x277e3a[_0x4505e2(0x225)]!==_0x3407d8[_0x4505e2(0x207)]);if(_0x1d211e[_0x4505e2(0x1de)]>0x0)throw menuError('menu_state_drift',_0x4505e2(0x229)+_0x1d211e[_0x4505e2(0x219)](_0x4d52ef=>_0x4d52ef['id'])[_0x4505e2(0x22d)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x4f2eb5=_0x19bc53['map'](_0xe4292d=>({'id':_0xe4292d['id'],'label':_0xe4292d['label'],'path':_0xe4292d['path'],'before':{'visible':_0xe4292d['visible']},'after':{'visible':_0x3407d8[_0x4505e2(0x225)]}})),_0x467d51=_0x4f2eb5[_0x4505e2(0x1e2)](_0x529a3e=>_0x529a3e[_0x4505e2(0x208)][_0x4505e2(0x225)]!==_0x3407d8[_0x4505e2(0x225)])[_0x4505e2(0x219)](_0x92fe4b=>({'stage':'update-menu-visibility','method':_0x4505e2(0x1d5),'path':'/smartapi/menu/update','body':{'appCode':_0x34b076[_0x4505e2(0x227)],'id':_0x92fe4b['id'],'visible':_0x3407d8['visible']}})),_0x5c0e11=mutationResult({'operation':_0x4505e2(0x1f1),'selector':{'menuIds':_0x3407d8[_0x4505e2(0x1f3)],'paths':_0x3407d8[_0x4505e2(0x211)]},'before':{'menus':_0x19bc53[_0x4505e2(0x219)](_0x315c35=>({'id':_0x315c35['id'],'path':_0x315c35[_0x4505e2(0x1fc)],'visible':_0x315c35[_0x4505e2(0x225)]}))},'after':{'menus':_0x19bc53[_0x4505e2(0x219)](_0x1ec7fc=>({'id':_0x1ec7fc['id'],'path':_0x1ec7fc[_0x4505e2(0x1fc)],'visible':_0x3407d8[_0x4505e2(0x225)]}))},'dryRun':_0x2100b3,'backend':[...BACKEND],'plannedActions':_0x467d51,'snapshotHash':_0x2ef513['hash'],'warnings':_0x467d51[_0x4505e2(0x1de)]===0x0?[_0x4505e2(0x239)]:[]});return{'plan':{..._0x5c0e11,'requestedVisible':_0x3407d8[_0x4505e2(0x225)],'targets':_0x4f2eb5},'beforeById':new Map(_0x19bc53[_0x4505e2(0x219)](_0x4a5619=>[_0x4a5619['id'],_0x4a5619]))};}function selectTargets(_0x137c24,_0x146276,_0x5d2ee9){const _0x64134b=a135_0x342536,_0x52a3c5=new Map(_0x137c24[_0x64134b(0x219)](_0x3ed2af=>[_0x3ed2af['id'],_0x3ed2af])),_0x3061d6=new Map(),_0x401d46=_0x146276['filter'](_0xcdc4cf=>!_0x52a3c5[_0x64134b(0x22f)](_0xcdc4cf));if(_0x401d46[_0x64134b(0x1de)]>0x0)throw menuError(_0x64134b(0x231),'Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x401d46[_0x64134b(0x22d)](',\x20')+'.',_0x64134b(0x226));for(const _0x219a33 of _0x146276){_0x3061d6['set'](_0x219a33,_0x52a3c5['get'](_0x219a33));}for(const _0x4e4fb2 of _0x5d2ee9){const _0x369391=_0x137c24[_0x64134b(0x1e2)](_0x30b55d=>_0x30b55d[_0x64134b(0x1fc)]===_0x4e4fb2);if(_0x369391['length']===0x0)throw menuError(_0x64134b(0x231),_0x64134b(0x1dd)+JSON[_0x64134b(0x21a)](_0x4e4fb2)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x369391[_0x64134b(0x1de)]>0x1)throw menuError(_0x64134b(0x218),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON['stringify'](_0x4e4fb2)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x369391['map'](_0x2a8127=>_0x2a8127['id'])['join'](',\x20')+'.');const _0x55b849=_0x369391[0x0];_0x3061d6[_0x64134b(0x21e)](_0x55b849['id'],_0x55b849);}return[..._0x3061d6[_0x64134b(0x206)]()];}function parseMenuIds(_0x2af31a){const _0x5e92aa=a135_0x342536,_0x3026d9=parseCsv(_0x2af31a),_0x522861=_0x3026d9[_0x5e92aa(0x219)](Number);if(_0x522861[_0x5e92aa(0x234)](_0x55cb1d=>!Number['isSafeInteger'](_0x55cb1d)||_0x55cb1d<=0x0))throw CliErrors[_0x5e92aa(0x23e)](_0x5e92aa(0x1f0));return[...new Set(_0x522861)];}function parseCsv(_0x57d9a0){const _0x3fe296=a135_0x342536;return[...new Set(_0x57d9a0[_0x3fe296(0x216)](',')[_0x3fe296(0x219)](_0x418ccb=>_0x418ccb[_0x3fe296(0x22b)]())[_0x3fe296(0x1e2)](Boolean))];}function parseBooleanFlag(_0x3d1a6a,_0x48bb28,_0x3a64c3){const _0xd2d4e7=a135_0x342536;if(!hasFlag(_0x3d1a6a,_0x48bb28)){if(_0x3a64c3)throw CliErrors[_0xd2d4e7(0x20d)](_0x48bb28);return undefined;}const _0x256864=_0x3d1a6a[_0xd2d4e7(0x1f9)][_0x48bb28];if(_0x256864===!![]||_0x256864===![])return _0x256864;if(_0x256864===_0xd2d4e7(0x21d))return!![];if(_0x256864==='false')return![];throw CliErrors[_0xd2d4e7(0x23e)]('--'+_0x48bb28+'\x20must\x20be\x20true\x20or\x20false.');}function a135_0x2703(){const _0xaba0ce=['plannedActions','3467118sDlVKW','paths','\x20unchanged\x20menu(s).','Menu\x20','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','requestedVisible','split','Menu\x20visibility\x20update\x20completed:\x20','menu_selector_ambiguous','map','stringify','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','true','set','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','datasetCode','get','expected-count','expect-visible','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','visible','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','appCode','update-recovery','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','beforeById','trim','type','join','verification','has','plan','menu_selector_not_found','update\x20menu\x20visibility','\x20visibility\x20update\x20could\x20not\x20be\x20verified','some','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','num','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','2089160ikHJax','targets','isArray','code','validation','parentId','2031270FuEipA','recovered','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','pageType','byId','update\x20visibility\x20for','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','5wlREUC','isSafeInteger','POST','menus','resourcesValid','modelType','string','\x20failed.','expectedCount','label','Menu\x20path\x20selector\x20not\x20found:\x20','length','menu_verification_failed','warnings','menu_expected_count_mismatch','filter','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','message','41833768gnEFMu','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','str','datasetId','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','\x20updated,\x20','\x20changed\x20unexpectedly.','\x20menu(s),\x20expected\x20','failed','5375334kMnjuX','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','visibility-update','2356039AeqhLt','menuIds','url','/smartapi/menu/update','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','pageId','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','rawFlags','sort','cookie','path','menu_permission_denied','rabetbase\x20menu\x20list\x20--format\x20compress','boolean','menu','resources','1526643wZHJeY','childrenCount','\x20skipped,\x20','Response\x20was\x20lost\x20and\x20menu\x20','values','expectVisible','before','high-risk-write','verify\x20menu\x20visibility\x20update','push','Final\x20menu\x20visibility\x20readback\x20failed.','flagMissing','depth'];a135_0x2703=function(){return _0xaba0ce;};return a135_0x2703();}function verifyVisibilityUpdate(_0x1f3141,_0x27b7de,_0x1b0727){const _0x25268d=a135_0x342536;assertVerified(!!_0x27b7de,_0x25268d(0x213)+_0x1f3141['id']+_0x25268d(0x1e3)),assertVerified(_0x27b7de[_0x25268d(0x225)]===_0x1b0727,'Menu\x20'+_0x1f3141['id']+_0x25268d(0x236));const _0x45c122=[['id',_0x27b7de['id'],_0x1f3141['id']],[_0x25268d(0x23f),_0x27b7de['parentId'],_0x1f3141[_0x25268d(0x23f)]],[_0x25268d(0x20e),_0x27b7de[_0x25268d(0x20e)],_0x1f3141['depth']],[_0x25268d(0x1dc),_0x27b7de['label'],_0x1f3141[_0x25268d(0x1dc)]],[_0x25268d(0x1fc),_0x27b7de['path'],_0x1f3141['path']],[_0x25268d(0x1f4),_0x27b7de['url'],_0x1f3141[_0x25268d(0x1f4)]],[_0x25268d(0x22c),_0x27b7de['type'],_0x1f3141['type']],[_0x25268d(0x1fa),_0x27b7de[_0x25268d(0x1fa)],_0x1f3141['sort']],[_0x25268d(0x201),_0x27b7de[_0x25268d(0x201)],_0x1f3141[_0x25268d(0x201)]],[_0x25268d(0x1d7),_0x27b7de[_0x25268d(0x1d7)],_0x1f3141['resourcesValid']],['childrenIds',_0x27b7de['childrenIds'],_0x1f3141['childrenIds']],[_0x25268d(0x203),_0x27b7de[_0x25268d(0x203)],_0x1f3141['childrenCount']],[_0x25268d(0x1f7),_0x27b7de['pageId'],_0x1f3141[_0x25268d(0x1f7)]],[_0x25268d(0x1cf),_0x27b7de['pageType'],_0x1f3141[_0x25268d(0x1cf)]],[_0x25268d(0x1d8),_0x27b7de[_0x25268d(0x1d8)],_0x1f3141[_0x25268d(0x1d8)]],[_0x25268d(0x1e9),_0x27b7de[_0x25268d(0x1e9)],_0x1f3141[_0x25268d(0x1e9)]],[_0x25268d(0x220),_0x27b7de['datasetCode'],_0x1f3141[_0x25268d(0x220)]]];for(const [_0x367f63,_0x2967b3,_0x53fc59]of _0x45c122){assertVerified(sameValue(_0x2967b3,_0x53fc59),_0x25268d(0x213)+_0x1f3141['id']+'\x20'+_0x367f63+_0x25268d(0x1ec));}}function sameValue(_0x50a87a,_0x2c2de6){const _0x3c8744=a135_0x342536;if(Array[_0x3c8744(0x23c)](_0x50a87a)||Array[_0x3c8744(0x23c)](_0x2c2de6))return JSON[_0x3c8744(0x21a)](_0x50a87a)===JSON['stringify'](_0x2c2de6);return _0x50a87a===_0x2c2de6;}
|
|
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
|
-
const
|
|
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
|
-
|
|
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
|
-
|
|
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();}
|