@lovrabet/rabetbase-cli 2.5.0-beta.2 → 2.5.0-beta.3
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/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/guides/custom-page-workflow.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-custom-list.md +5 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a129_0x1e57ca=a129_0x20c0;function a129_0x2a4e(){const _0x8bff44=['import','14oYaAzZ','5759670sXCUMf','filter','has','Invalid\x20--params.','get','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','3247555yjUcMh','map','cwd','3142952ZYMPau','38243640cIVfYZ','JS\x20URL\x20is\x20unreachable:\x20','CSS\x20URL\x20is\x20unreachable:\x20','path','parse','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','setLogPath','Menu\x20sync\x20completed','No\x20local\x20pages\x20matched\x20paths:\x20','8050095UswwfP','info','dryRun','message','--params.','Invalid\x20--params\x20JSON.','113868ekdsaN','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.',':\x20expected\x20a\x20non-empty\x20string.','1KIOmzJ','cssUrl','menu-sync','254640DjQxgg','6iBieJk','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','join','trim','length','push','hasOwn','keys','string','procode','Invalid\x20--params:\x20','jsUrl'];a129_0x2a4e=function(){return _0x8bff44;};return a129_0x2a4e();}(function(_0x2a26c7,_0x166ffa){const _0x9f46b=a129_0x20c0,_0x2f825f=_0x2a26c7();while(!![]){try{const _0x303e39=parseInt(_0x9f46b(0xae))/0x1*(-parseInt(_0x9f46b(0xaa))/0x2)+-parseInt(_0x9f46b(0xb2))/0x3*(-parseInt(_0x9f46b(0xb1))/0x4)+-parseInt(_0x9f46b(0xc6))/0x5+-parseInt(_0x9f46b(0xc0))/0x6+-parseInt(_0x9f46b(0xbf))/0x7*(parseInt(_0x9f46b(0xc9))/0x8)+-parseInt(_0x9f46b(0xd3))/0x9+parseInt(_0x9f46b(0xca))/0xa;if(_0x303e39===_0x166ffa)break;else _0x2f825f['push'](_0x2f825f['shift']());}catch(_0x4fb4d9){_0x2f825f['push'](_0x2f825f['shift']());}}}(a129_0x2a4e,0x93bad));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a129_0x20c0(_0x35ac48,_0x5a824b){_0x35ac48=_0x35ac48-0xa8;const _0x2a4e77=a129_0x2a4e();let _0x20c080=_0x2a4e77[_0x35ac48];return _0x20c080;}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([a129_0x1e57ca(0xbd),'cssUrl']);function validateParams(_0x5f1b5a){const _0x222acd=a129_0x1e57ca,_0x4860c1=[];return _0x5f1b5a[_0x222acd(0xbd)]&&!isValidJsHttpsUrl(_0x5f1b5a[_0x222acd(0xbd)])&&_0x4860c1[_0x222acd(0xb7)]({'field':_0x222acd(0xbd),'message':_0x222acd(0xab)}),_0x5f1b5a[_0x222acd(0xaf)]&&!isValidCssHttpsUrl(_0x5f1b5a[_0x222acd(0xaf)])&&_0x4860c1[_0x222acd(0xb7)]({'field':_0x222acd(0xaf),'message':_0x222acd(0xc5)}),_0x4860c1;}export async function runMenuSyncCore(_0x3ad625,_0x5c049e,_0x1d4721=[],_0x53f86e,_0x4e8da6={}){const _0x108678=a129_0x1e57ca,_0x13f82a=parseMenuSyncParams(_0x53f86e),_0x8aded9=[...new Set(_0x1d4721[_0x108678(0xc7)](_0x15b3fd=>_0x15b3fd[_0x108678(0xb5)]())['filter'](Boolean))],_0x29d3b0=_0x13f82a['jsUrl'],_0x5085c6=_0x13f82a[_0x108678(0xaf)],_0x3b9d02=[];if(_0x29d3b0)_0x3b9d02[_0x108678(0xb7)](_0x29d3b0);if(_0x5085c6)_0x3b9d02['push'](_0x5085c6);const _0x3fb79c=validateParams(_0x13f82a);if(_0x3fb79c[_0x108678(0xb6)]>0x0){const _0x343b3d=_0x3fb79c['map'](_0x39b3e8=>_0x108678(0xa8)+_0x39b3e8['field']+':\x20'+_0x39b3e8[_0x108678(0xd6)])[_0x108678(0xb4)](';\x20');throw new Error(_0x108678(0xbc)+_0x343b3d);}logger[_0x108678(0xd0)](process[_0x108678(0xc8)]()),logger[_0x108678(0xd4)](_0x108678(0xb0),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x3ad625,'selectedCount':_0x8aded9['length'],'jsUrl':_0x29d3b0,'cssUrl':_0x5085c6});if(_0x29d3b0){const _0x1be756=await isUrlReachable(_0x29d3b0);if(!_0x1be756)throw new Error(_0x108678(0xcb)+_0x29d3b0);}if(_0x5085c6){const _0x15ccba=await isUrlReachable(_0x5085c6);if(!_0x15ccba)throw new Error(_0x108678(0xcc)+_0x5085c6);}const _0x46ac88=getLocalPages();if(_0x46ac88[_0x108678(0xb6)]===0x0){if(_0x8aded9[_0x108678(0xb6)]>0x0)throw new Error(_0x108678(0xd2)+_0x8aded9[_0x108678(0xb4)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x4e8da6[_0x108678(0xd5)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x27d459=await getOnlineMenuList(_0x3ad625,_0x5c049e),_0x5a8020=new Set(_0x27d459[_0x108678(0xc7)](_0xc02ae3=>_0xc02ae3[_0x108678(0xcd)]));let _0x380eca;if(_0x8aded9['length']>0x0){const _0x69b2e7=new Map(_0x46ac88[_0x108678(0xc7)](_0x45a8cd=>[_0x45a8cd[_0x108678(0xcd)],_0x45a8cd])),_0x548507=_0x8aded9['filter'](_0x4dab97=>!_0x69b2e7[_0x108678(0xc2)](_0x4dab97));if(_0x548507[_0x108678(0xb6)]>0x0){const _0x19203e=_0x46ac88[_0x108678(0xc7)](_0xad8521=>_0xad8521[_0x108678(0xcd)])[_0x108678(0xb4)](',\x20');throw new Error(_0x108678(0xd2)+_0x548507[_0x108678(0xb4)](',\x20')+'\x0a\x20\x20Available\x20local\x20paths:\x20'+_0x19203e);}const _0x10ed26=_0x8aded9[_0x108678(0xc1)](_0x168a0f=>_0x5a8020[_0x108678(0xc2)](_0x168a0f));if(_0x10ed26[_0x108678(0xb6)]>0x0)throw new Error(_0x108678(0xcf)+_0x10ed26[_0x108678(0xb4)](',\x20'));_0x380eca=_0x8aded9['map'](_0x3b7ffa=>_0x69b2e7[_0x108678(0xc4)](_0x3b7ffa));}else _0x380eca=_0x46ac88['filter'](_0x27fc0d=>!_0x5a8020[_0x108678(0xc2)](_0x27fc0d[_0x108678(0xcd)]));if(_0x380eca['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x4e8da6['dryRun']===!![],'targetPages':[],'plannedMenus':[]};const _0x3aac50=_0x380eca[_0x108678(0xc7)](_0x113836=>({'type':_0x108678(0xbb),'path':_0x113836[_0x108678(0xcd)],'label':_0x113836['label'],'loadScriptMode':_0x108678(0xbe),'resources':[..._0x3b9d02]}));if(_0x4e8da6[_0x108678(0xd5)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x380eca,'plannedMenus':_0x3aac50};const _0x3a9c48=await createMenus(_0x3ad625,_0x5c049e,_0x380eca,_0x3b9d02[_0x108678(0xb6)]>0x0?_0x3b9d02:undefined);return logger[_0x108678(0xd4)]('menu-sync',_0x108678(0xd1),{'count':_0x380eca['length'],'resources':_0x3b9d02}),{'created':_0x3a9c48['length'],'skipped':![],'dryRun':![],'targetPages':_0x380eca,'plannedMenus':_0x3aac50,'menus':_0x3a9c48};}export function parseMenuSyncParams(_0x3eab49){const _0x567499=a129_0x1e57ca;if(!_0x3eab49||typeof _0x3eab49!==_0x567499(0xba))return{};let _0x34e06f;try{_0x34e06f=JSON[_0x567499(0xce)](_0x3eab49);}catch{throw new Error(_0x567499(0xa9));}if(typeof _0x34e06f!=='object'||_0x34e06f===null||Array['isArray'](_0x34e06f))throw new Error(_0x567499(0xb3));const _0x4ae16f=_0x34e06f;if(Object[_0x567499(0xb8)](_0x4ae16f,'pages'))throw new Error(_0x567499(0xac));const _0x184c08=Object[_0x567499(0xb9)](_0x4ae16f)[_0x567499(0xc1)](_0x589ab7=>!MENU_SYNC_PARAM_KEYS[_0x567499(0xc2)](_0x589ab7));if(_0x184c08[_0x567499(0xb6)]>0x0)throw new Error('Invalid\x20--params\x20fields:\x20'+_0x184c08['join'](',\x20')+'.');for(const _0x7ba770 of MENU_SYNC_PARAM_KEYS){const _0x414a28=_0x4ae16f[_0x7ba770];if(_0x414a28!==undefined&&(typeof _0x414a28!==_0x567499(0xba)||_0x414a28[_0x567499(0xb5)]()===''))throw new Error(_0x567499(0xc3)+_0x7ba770+_0x567499(0xad));}return{'jsUrl':typeof _0x4ae16f[_0x567499(0xbd)]===_0x567499(0xba)?_0x4ae16f[_0x567499(0xbd)][_0x567499(0xb5)]():undefined,'cssUrl':typeof _0x4ae16f[_0x567499(0xaf)]===_0x567499(0xba)?_0x4ae16f[_0x567499(0xaf)][_0x567499(0xb5)]():undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4eaa80,_0x5adf26){const _0x12f7bc=a131_0x595d,_0x5178b4=_0x4eaa80();while(!![]){try{const _0x40fdf7=parseInt(_0x12f7bc(0x1f7))/0x1*(-parseInt(_0x12f7bc(0x1ed))/0x2)+parseInt(_0x12f7bc(0x1e6))/0x3*(parseInt(_0x12f7bc(0x1c5))/0x4)+-parseInt(_0x12f7bc(0x205))/0x5+-parseInt(_0x12f7bc(0x1ce))/0x6+-parseInt(_0x12f7bc(0x1cb))/0x7+-parseInt(_0x12f7bc(0x1cc))/0x8*(parseInt(_0x12f7bc(0x1e8))/0x9)+parseInt(_0x12f7bc(0x203))/0xa;if(_0x40fdf7===_0x5adf26)break;else _0x5178b4['push'](_0x5178b4['shift']());}catch(_0x5d1642){_0x5178b4['push'](_0x5178b4['shift']());}}}(a131_0x28f3,0x2ce89));function a131_0x28f3(){const _0x1ce8f4=['Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','selection','label','has','all','push','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','cwd','patch','message','unshift','split','paths','resources','cssUrl','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','Menu\x20asset\x20update\x20completed','filter','length','4035cUICtD','extend','1239633EpXDdN','\x22\x20(','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','.\x20Allowed\x20values:\x20replace,\x20patch','info','1902aDHOZv','.js','path','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','menuIds','setLogPath','status','join','JS\x20URL\x20is\x20unreachable:\x20','parse','98yOTFsf','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','replace','menu\x20asset-update\x20cannot\x20patch\x20','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','Invalid\x20--params:\x20','force','jsUrl','allSettled','trim','dryRun','some','9323070pXfPzK','--params.','1767620eFfCvV','value','map','fulfilled','string','Start\x20non-interactive\x20menu\x20asset\x20update','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','after','loadScriptMode','852NUskmN','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','.css','endsWith','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','toLowerCase','2062333JwZuyw','16kwduvF','menu-asset-update','108192LnWjNW',').\x20','Invalid\x20--mode:\x20','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','mode'];a131_0x28f3=function(){return _0x1ce8f4;};return a131_0x28f3();}import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x3ae42a){const _0x48d8c0=a131_0x595d,_0x6bf6ad=[];return _0x3ae42a[_0x48d8c0(0x1fe)]&&!isValidJsHttpsUrl(_0x3ae42a[_0x48d8c0(0x1fe)])&&_0x6bf6ad[_0x48d8c0(0x1d8)]({'field':_0x48d8c0(0x1fe),'message':_0x48d8c0(0x1d1)}),_0x3ae42a['cssUrl']&&!isValidCssHttpsUrl(_0x3ae42a[_0x48d8c0(0x1e1)])&&_0x6bf6ad['push']({'field':_0x48d8c0(0x1e1),'message':_0x48d8c0(0x1e2)}),_0x6bf6ad;}export async function runMenuUpdateCore(_0x22408f,_0x416bfe,_0x3e099a,_0x503c45={}){const _0xbe702c=a131_0x595d,_0x4789e0=parseUpdateParamsFlag(_0x3e099a),_0x1267ae=normalizeMode(_0x503c45[_0xbe702c(0x1d2)]);validateSelection(_0x503c45['selection']);const _0x50fb94=[];if(_0x4789e0[_0xbe702c(0x1fe)])_0x50fb94['push'](_0x4789e0['jsUrl']);if(_0x4789e0[_0xbe702c(0x1e1)])_0x50fb94['push'](_0x4789e0['cssUrl']);const _0x56267d=validateParams(_0x4789e0);if(_0x56267d['length']>0x0){const _0x4592f2=_0x56267d[_0xbe702c(0x207)](_0xd06c1d=>_0xbe702c(0x204)+_0xd06c1d['field']+':\x20'+_0xd06c1d[_0xbe702c(0x1dc)])['join'](';\x20');throw new Error(_0xbe702c(0x1fc)+_0x4592f2);}if(_0x50fb94['length']===0x0)throw new Error(_0xbe702c(0x1fb)+_0xbe702c(0x1f8));logger[_0xbe702c(0x1f2)](process[_0xbe702c(0x1da)]()),logger[_0xbe702c(0x1ec)](_0xbe702c(0x1cd),_0xbe702c(0x20a),{'appCode':_0x22408f,'jsUrl':_0x4789e0[_0xbe702c(0x1fe)],'cssUrl':_0x4789e0[_0xbe702c(0x1e1)],'mode':_0x1267ae,'dryRun':_0x503c45[_0xbe702c(0x201)]===!![]});if(_0x4789e0['jsUrl']){const _0x220294=await isUrlReachable(_0x4789e0[_0xbe702c(0x1fe)]);if(!_0x220294)throw new Error(_0xbe702c(0x1f5)+_0x4789e0[_0xbe702c(0x1fe)]);}if(_0x4789e0[_0xbe702c(0x1e1)]){const _0x1c2db1=await isUrlReachable(_0x4789e0['cssUrl']);if(!_0x1c2db1)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x4789e0['cssUrl']);}const _0x591376=await getOnlineMenuList(_0x22408f,_0x416bfe),_0x203e2c=_0x591376['filter'](_0x3bdce7=>_0x3bdce7[_0xbe702c(0x1e0)][_0xbe702c(0x1e5)]>0x0),_0x45af3c=selectMenusForUpdate(_0x203e2c,_0x503c45[_0xbe702c(0x1d4)]);if(_0x45af3c[_0xbe702c(0x1e5)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x503c45[_0xbe702c(0x201)]===!![]};const _0x4824b2=_0x45af3c['map'](_0x18d803=>buildMenuUpdateDiff(_0x18d803,_0x4789e0,_0x1267ae,_0x503c45[_0xbe702c(0x1fd)]===!![],_0x503c45[_0xbe702c(0x1c4)]));if(_0x503c45[_0xbe702c(0x201)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x4824b2};const _0x1d4e0b=await Promise[_0xbe702c(0x1ff)](_0x45af3c['map']((_0x4bd8b6,_0x251de6)=>updateMenuCdnUrl(_0x22408f,_0x416bfe,{'id':_0x4bd8b6['id'],'label':_0x4bd8b6[_0xbe702c(0x1d5)],'path':_0x4bd8b6['path'],'resources':_0x4824b2[_0x251de6][_0xbe702c(0x20c)]['resources'],'extend':_0x4bd8b6[_0xbe702c(0x1e7)]??null,'loadScriptMode':_0x503c45[_0xbe702c(0x1c4)]}))),_0x52e96c=_0x1d4e0b[_0xbe702c(0x1e4)](_0x162df8=>_0x162df8[_0xbe702c(0x1f3)]===_0xbe702c(0x208))[_0xbe702c(0x207)](_0x21f704=>_0x21f704[_0xbe702c(0x206)]),_0x152a47=_0x1d4e0b[_0xbe702c(0x1e4)](_0x7c9cce=>_0x7c9cce[_0xbe702c(0x1f3)]==='rejected')[_0xbe702c(0x1e5)];return logger[_0xbe702c(0x1ec)](_0xbe702c(0x1cd),_0xbe702c(0x1e3),{'count':_0x45af3c[_0xbe702c(0x1e5)],'resources':_0x50fb94}),{'updated':_0x52e96c[_0xbe702c(0x1e5)],'failed':_0x152a47,'skipped':![],'menus':_0x52e96c};}function validateSelection(_0x54dd87){const _0xc6570b=a131_0x595d;if(!_0x54dd87)throw new Error(_0xc6570b(0x1d9));if(_0x54dd87[_0xc6570b(0x1d7)]&&(_0x54dd87[_0xc6570b(0x1f1)][_0xc6570b(0x1e5)]>0x0||_0x54dd87[_0xc6570b(0x1df)][_0xc6570b(0x1e5)]>0x0))throw new Error(_0xc6570b(0x1c6));if(!_0x54dd87[_0xc6570b(0x1d7)]&&_0x54dd87[_0xc6570b(0x1f1)][_0xc6570b(0x1e5)]===0x0&&_0x54dd87['paths'][_0xc6570b(0x1e5)]===0x0)throw new Error(_0xc6570b(0x1d9));}export function selectMenusForUpdate(_0x2b3e75,_0x3f0d77){const _0x1a1775=a131_0x595d;validateSelection(_0x3f0d77);if(_0x3f0d77[_0x1a1775(0x1d7)])return _0x2b3e75;const _0x8d1952=new Set(_0x2b3e75[_0x1a1775(0x207)](_0x291886=>_0x291886['id'])),_0x4370ea=new Set(_0x2b3e75[_0x1a1775(0x207)](_0x4f07b3=>_0x4f07b3[_0x1a1775(0x1ef)])),_0x25ce66=_0x3f0d77['menuIds'][_0x1a1775(0x1e4)](_0x1a0e4d=>!_0x8d1952['has'](_0x1a0e4d)),_0x47fe48=_0x3f0d77[_0x1a1775(0x1df)][_0x1a1775(0x1e4)](_0x1dd1b8=>!_0x4370ea['has'](_0x1dd1b8));if(_0x25ce66[_0x1a1775(0x1e5)]>0x0||_0x47fe48[_0x1a1775(0x1e5)]>0x0){const _0x4a3aa1=[..._0x25ce66[_0x1a1775(0x207)](_0x2c8323=>String(_0x2c8323)),..._0x47fe48][_0x1a1775(0x1f4)](',\x20');throw new Error(_0x1a1775(0x1ea)+_0x4a3aa1);}const _0x19e23c=new Set(_0x3f0d77[_0x1a1775(0x1f1)]),_0x11ac4a=new Set(_0x3f0d77[_0x1a1775(0x1df)]);return _0x2b3e75[_0x1a1775(0x1e4)](_0x853996=>_0x19e23c[_0x1a1775(0x1d6)](_0x853996['id'])||_0x11ac4a[_0x1a1775(0x1d6)](_0x853996['path']));}function normalizeMode(_0x359eb4){const _0x211af2=a131_0x595d;if(!_0x359eb4)return _0x211af2(0x1db);if(_0x359eb4===_0x211af2(0x1f9)||_0x359eb4==='patch')return _0x359eb4;throw new Error(_0x211af2(0x1d0)+_0x359eb4+_0x211af2(0x1eb));}function buildMenuUpdateDiff(_0xac1f1,_0x5882d6,_0x43aff4,_0x3c9e5b,_0x1d7999){const _0x1c8977=a131_0x595d,_0x4f6f1c=[..._0xac1f1[_0x1c8977(0x1e0)]];_0x43aff4===_0x1c8977(0x1db)&&assertUnambiguousPatchResources(_0xac1f1,_0x4f6f1c,_0x5882d6);const _0x1033c8=_0x43aff4===_0x1c8977(0x1db)?patchResources(_0x4f6f1c,_0x5882d6):replaceResources(_0x5882d6),_0x277dd8=[],_0x3a6511=_0x4f6f1c[_0x1c8977(0x202)](isJsResource),_0x45bea6=_0x1033c8[_0x1c8977(0x202)](isJsResource);if(_0x3a6511&&!_0x45bea6){const _0x2fdb9a=_0x1c8977(0x1f0)+_0xac1f1['label']+'\x22\x20('+_0xac1f1[_0x1c8977(0x1ef)]+_0x1c8977(0x1cf)+_0x1c8977(0x1d3);if(!_0x3c9e5b)throw new Error(_0x2fdb9a);_0x277dd8[_0x1c8977(0x1d8)](_0x2fdb9a);}const _0xcadc52=_0x4f6f1c['some'](isCssResource),_0x2e8ccd=_0x1033c8['some'](isCssResource);_0xcadc52&&!_0x2e8ccd&&_0x277dd8[_0x1c8977(0x1d8)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0xac1f1[_0x1c8977(0x1d5)]+_0x1c8977(0x1e9)+_0xac1f1[_0x1c8977(0x1ef)]+').');const _0x251505=typeof _0xac1f1[_0x1c8977(0x1e7)]?.[_0x1c8977(0x1c4)]===_0x1c8977(0x209)?_0xac1f1[_0x1c8977(0x1e7)][_0x1c8977(0x1c4)]:null,_0x60fe32=_0x1d7999?{'loadScriptMode':_0x251505}:{},_0x4ab5ea=_0x1d7999?{'loadScriptMode':_0x1d7999}:{};return{'id':_0xac1f1['id'],'label':_0xac1f1['label'],'path':_0xac1f1[_0x1c8977(0x1ef)],'mode':_0x43aff4,'before':{'resources':_0x4f6f1c,..._0x60fe32},'after':{'resources':_0x1033c8,..._0x4ab5ea},'warnings':_0x277dd8};}function replaceResources(_0xd6ffee){const _0x5ab236=a131_0x595d;return[_0xd6ffee['jsUrl'],_0xd6ffee[_0x5ab236(0x1e1)]][_0x5ab236(0x1e4)](_0x416c8e=>!!_0x416c8e);}function assertUnambiguousPatchResources(_0x5d98b0,_0x243fb9,_0xe2ca14){const _0x3ec885=a131_0x595d,_0x1e9ee6=_0x243fb9[_0x3ec885(0x1e4)](isJsResource)[_0x3ec885(0x1e5)];if(_0xe2ca14[_0x3ec885(0x1fe)]&&_0x1e9ee6>0x1)throw new Error(_0x3ec885(0x1fa)+_0x1e9ee6+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x5d98b0[_0x3ec885(0x1d5)]+_0x3ec885(0x1e9)+_0x5d98b0[_0x3ec885(0x1ef)]+')\x20'+_0x3ec885(0x1c9));const _0x4b2c64=_0x243fb9[_0x3ec885(0x1e4)](isCssResource)[_0x3ec885(0x1e5)];if(_0xe2ca14[_0x3ec885(0x1e1)]&&_0x4b2c64>0x1)throw new Error(_0x3ec885(0x1fa)+_0x4b2c64+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x5d98b0[_0x3ec885(0x1d5)]+'\x22\x20('+_0x5d98b0[_0x3ec885(0x1ef)]+')\x20'+_0x3ec885(0x20b));}function patchResources(_0x5bdf8a,_0x5927c7){const _0x1842c3=a131_0x595d;let _0x492e24=![],_0xa61b7e=![];const _0x216624=[];for(const _0x72bf26 of _0x5bdf8a){if(isJsResource(_0x72bf26)){if(_0x5927c7[_0x1842c3(0x1fe)]&&!_0x492e24)_0x216624[_0x1842c3(0x1d8)](_0x5927c7['jsUrl']),_0x492e24=!![];else!_0x5927c7[_0x1842c3(0x1fe)]&&_0x216624[_0x1842c3(0x1d8)](_0x72bf26);continue;}if(isCssResource(_0x72bf26)){if(_0x5927c7[_0x1842c3(0x1e1)]&&!_0xa61b7e)_0x216624[_0x1842c3(0x1d8)](_0x5927c7[_0x1842c3(0x1e1)]),_0xa61b7e=!![];else!_0x5927c7['cssUrl']&&_0x216624[_0x1842c3(0x1d8)](_0x72bf26);continue;}_0x216624[_0x1842c3(0x1d8)](_0x72bf26);}return _0x5927c7[_0x1842c3(0x1fe)]&&!_0x492e24&&_0x216624[_0x1842c3(0x1dd)](_0x5927c7[_0x1842c3(0x1fe)]),_0x5927c7[_0x1842c3(0x1e1)]&&!_0xa61b7e&&_0x216624[_0x1842c3(0x1d8)](_0x5927c7[_0x1842c3(0x1e1)]),_0x216624;}function isJsResource(_0xedefee){const _0x1e85e8=a131_0x595d;return stripQuery(_0xedefee)[_0x1e85e8(0x1ca)]()[_0x1e85e8(0x1c8)](_0x1e85e8(0x1ee));}function isCssResource(_0x13c9ea){const _0x472dca=a131_0x595d;return stripQuery(_0x13c9ea)[_0x472dca(0x1ca)]()['endsWith'](_0x472dca(0x1c7));}function stripQuery(_0x52a8e9){const _0x2f65cb=a131_0x595d;return _0x52a8e9[_0x2f65cb(0x1de)]('?')[0x0]??_0x52a8e9;}function a131_0x595d(_0x13f63a,_0x4646f9){_0x13f63a=_0x13f63a-0x1c4;const _0x28f3e1=a131_0x28f3();let _0x595df2=_0x28f3e1[_0x13f63a];return _0x595df2;}function parseUpdateParamsFlag(_0x16c561){const _0x3aec03=a131_0x595d;if(!_0x16c561||typeof _0x16c561!=='string')return{};try{const _0x303b89=JSON[_0x3aec03(0x1f6)](_0x16c561);if(typeof _0x303b89!=='object'||_0x303b89===null||Array['isArray'](_0x303b89))return{};return{'jsUrl':typeof _0x303b89[_0x3aec03(0x1fe)]===_0x3aec03(0x209)?_0x303b89[_0x3aec03(0x1fe)][_0x3aec03(0x200)]():undefined,'cssUrl':typeof _0x303b89[_0x3aec03(0x1e1)]===_0x3aec03(0x209)?_0x303b89[_0x3aec03(0x1e1)][_0x3aec03(0x200)]():undefined};}catch{return{};}}
|
|
1
|
+
(function(_0x10549c,_0x5b3387){const _0xf600eb=a131_0x222b,_0x5d95c4=_0x10549c();while(!![]){try{const _0x32e867=parseInt(_0xf600eb(0x150))/0x1+-parseInt(_0xf600eb(0x13c))/0x2+parseInt(_0xf600eb(0x13e))/0x3+-parseInt(_0xf600eb(0x155))/0x4*(-parseInt(_0xf600eb(0x162))/0x5)+parseInt(_0xf600eb(0x160))/0x6*(parseInt(_0xf600eb(0x15a))/0x7)+-parseInt(_0xf600eb(0x189))/0x8*(parseInt(_0xf600eb(0x183))/0x9)+-parseInt(_0xf600eb(0x153))/0xa*(-parseInt(_0xf600eb(0x170))/0xb);if(_0x32e867===_0x5b3387)break;else _0x5d95c4['push'](_0x5d95c4['shift']());}catch(_0x5205d0){_0x5d95c4['push'](_0x5d95c4['shift']());}}}(a131_0x568d,0x41e56));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x50efc2){const _0x4da89a=a131_0x222b,_0x569880=[];return _0x50efc2[_0x4da89a(0x149)]&&!isValidJsHttpsUrl(_0x50efc2['jsUrl'])&&_0x569880[_0x4da89a(0x187)]({'field':_0x4da89a(0x149),'message':_0x4da89a(0x14f)}),_0x50efc2[_0x4da89a(0x177)]&&!isValidCssHttpsUrl(_0x50efc2['cssUrl'])&&_0x569880['push']({'field':_0x4da89a(0x177),'message':_0x4da89a(0x17d)}),_0x569880;}export async function runMenuUpdateCore(_0x260f4b,_0x108367,_0x4fd6e8,_0x351375={}){const _0x5d5ef2=a131_0x222b,_0x5270de=parseUpdateParamsFlag(_0x4fd6e8),_0x4791fe=normalizeMode(_0x351375[_0x5d5ef2(0x16a)]);validateSelection(_0x351375[_0x5d5ef2(0x15c)]);const _0x155877=[];if(_0x5270de[_0x5d5ef2(0x149)])_0x155877[_0x5d5ef2(0x187)](_0x5270de[_0x5d5ef2(0x149)]);if(_0x5270de[_0x5d5ef2(0x177)])_0x155877[_0x5d5ef2(0x187)](_0x5270de['cssUrl']);const _0x57d9f2=validateParams(_0x5270de);if(_0x57d9f2['length']>0x0){const _0x1ee0be=_0x57d9f2[_0x5d5ef2(0x158)](_0x337f97=>_0x5d5ef2(0x165)+_0x337f97[_0x5d5ef2(0x184)]+':\x20'+_0x337f97[_0x5d5ef2(0x182)])[_0x5d5ef2(0x178)](';\x20');throw new Error(_0x5d5ef2(0x172)+_0x1ee0be);}if(_0x155877[_0x5d5ef2(0x16b)]===0x0)throw new Error(_0x5d5ef2(0x159)+_0x5d5ef2(0x15e));logger[_0x5d5ef2(0x143)](process[_0x5d5ef2(0x152)]()),logger[_0x5d5ef2(0x169)](_0x5d5ef2(0x15d),_0x5d5ef2(0x144),{'appCode':_0x260f4b,'jsUrl':_0x5270de[_0x5d5ef2(0x149)],'cssUrl':_0x5270de[_0x5d5ef2(0x177)],'mode':_0x4791fe,'dryRun':_0x351375[_0x5d5ef2(0x154)]===!![]});if(_0x5270de['jsUrl']){const _0x535ae8=await isUrlReachable(_0x5270de[_0x5d5ef2(0x149)]);if(!_0x535ae8)throw new Error(_0x5d5ef2(0x14c)+_0x5270de[_0x5d5ef2(0x149)]);}if(_0x5270de[_0x5d5ef2(0x177)]){const _0x40f6b6=await isUrlReachable(_0x5270de[_0x5d5ef2(0x177)]);if(!_0x40f6b6)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x5270de['cssUrl']);}const _0x5c270a=await getOnlineMenuList(_0x260f4b,_0x108367),_0x4c5eab=_0x5c270a[_0x5d5ef2(0x181)](_0x39c6a5=>_0x39c6a5[_0x5d5ef2(0x180)][_0x5d5ef2(0x16b)]>0x0),_0x3789da=selectMenusForUpdate(_0x4c5eab,_0x351375['selection']);if(_0x3789da[_0x5d5ef2(0x16b)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x351375[_0x5d5ef2(0x154)]===!![]};const _0x645836=_0x3789da[_0x5d5ef2(0x158)](_0xf2e4a=>buildMenuUpdateDiff(_0xf2e4a,_0x5270de,_0x4791fe,_0x351375[_0x5d5ef2(0x145)]===!![],_0x351375[_0x5d5ef2(0x14b)]));if(_0x351375[_0x5d5ef2(0x154)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x645836};const _0x58ccea=await Promise[_0x5d5ef2(0x156)](_0x3789da[_0x5d5ef2(0x158)]((_0x56cab9,_0x41033b)=>updateMenuCdnUrl(_0x260f4b,_0x108367,{'id':_0x56cab9['id'],'label':_0x56cab9[_0x5d5ef2(0x151)],'path':_0x56cab9[_0x5d5ef2(0x147)],'resources':_0x645836[_0x41033b][_0x5d5ef2(0x14e)]['resources'],'extend':_0x56cab9['extend']??null,'loadScriptMode':_0x351375['loadScriptMode']}))),_0x30e21e=_0x58ccea[_0x5d5ef2(0x181)](_0x40941b=>_0x40941b[_0x5d5ef2(0x163)]===_0x5d5ef2(0x13d))['map'](_0x316d29=>_0x316d29[_0x5d5ef2(0x176)]),_0x492e0c=_0x58ccea[_0x5d5ef2(0x181)](_0x24f533=>_0x24f533[_0x5d5ef2(0x163)]===_0x5d5ef2(0x173))[_0x5d5ef2(0x16b)];return logger[_0x5d5ef2(0x169)]('menu-asset-update',_0x5d5ef2(0x18a),{'count':_0x3789da[_0x5d5ef2(0x16b)],'resources':_0x155877}),{'updated':_0x30e21e[_0x5d5ef2(0x16b)],'failed':_0x492e0c,'skipped':![],'menus':_0x30e21e};}function validateSelection(_0x415bd9){const _0x4990d2=a131_0x222b;if(!_0x415bd9)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x415bd9['all']&&(_0x415bd9[_0x4990d2(0x141)][_0x4990d2(0x16b)]>0x0||_0x415bd9['paths']['length']>0x0))throw new Error(_0x4990d2(0x16f));if(!_0x415bd9[_0x4990d2(0x18b)]&&_0x415bd9['menuIds'][_0x4990d2(0x16b)]===0x0&&_0x415bd9[_0x4990d2(0x157)][_0x4990d2(0x16b)]===0x0)throw new Error(_0x4990d2(0x148));}export function selectMenusForUpdate(_0x32bc67,_0x56648a){const _0x11dc98=a131_0x222b;validateSelection(_0x56648a);if(_0x56648a[_0x11dc98(0x18b)])return _0x32bc67;const _0x1e7978=new Set(_0x32bc67[_0x11dc98(0x158)](_0x3f89ce=>_0x3f89ce['id'])),_0x42c265=new Set(_0x32bc67[_0x11dc98(0x158)](_0x320d50=>_0x320d50[_0x11dc98(0x147)])),_0x1e75e9=_0x56648a[_0x11dc98(0x141)][_0x11dc98(0x181)](_0x50d1df=>!_0x1e7978[_0x11dc98(0x167)](_0x50d1df)),_0x2a0f75=_0x56648a[_0x11dc98(0x157)][_0x11dc98(0x181)](_0x487142=>!_0x42c265['has'](_0x487142));if(_0x1e75e9[_0x11dc98(0x16b)]>0x0||_0x2a0f75['length']>0x0){const _0x156577=[..._0x1e75e9[_0x11dc98(0x158)](_0x5dcdc4=>String(_0x5dcdc4)),..._0x2a0f75][_0x11dc98(0x178)](',\x20');throw new Error(_0x11dc98(0x14a)+_0x156577);}const _0x149c51=new Set(_0x56648a[_0x11dc98(0x141)]),_0x211853=new Set(_0x56648a[_0x11dc98(0x157)]);return _0x32bc67[_0x11dc98(0x181)](_0x58ac81=>_0x149c51[_0x11dc98(0x167)](_0x58ac81['id'])||_0x211853[_0x11dc98(0x167)](_0x58ac81[_0x11dc98(0x147)]));}function normalizeMode(_0x48ae3e){const _0x1d6183=a131_0x222b;if(!_0x48ae3e)return _0x1d6183(0x185);if(_0x48ae3e===_0x1d6183(0x171)||_0x48ae3e===_0x1d6183(0x185))return _0x48ae3e;throw new Error(_0x1d6183(0x188)+_0x48ae3e+_0x1d6183(0x179));}function buildMenuUpdateDiff(_0x52c174,_0x34f9ef,_0x4dc0e1,_0x182d4c,_0x4e07e2){const _0x1343a0=a131_0x222b,_0x549989=[..._0x52c174[_0x1343a0(0x180)]];_0x4dc0e1==='patch'&&assertUnambiguousPatchResources(_0x52c174,_0x549989,_0x34f9ef);const _0x489d9c=_0x4dc0e1===_0x1343a0(0x185)?patchResources(_0x549989,_0x34f9ef):replaceResources(_0x34f9ef),_0x217464=[],_0x3a814e=_0x549989[_0x1343a0(0x168)](isJsResource),_0x3ec5a5=_0x489d9c['some'](isJsResource);if(_0x3a814e&&!_0x3ec5a5){const _0x276792=_0x1343a0(0x14d)+_0x52c174['label']+'\x22\x20('+_0x52c174['path']+_0x1343a0(0x17f)+_0x1343a0(0x17b);if(!_0x182d4c)throw new Error(_0x276792);_0x217464[_0x1343a0(0x187)](_0x276792);}const _0x35a5ec=_0x549989[_0x1343a0(0x168)](isCssResource),_0x171f53=_0x489d9c[_0x1343a0(0x168)](isCssResource);_0x35a5ec&&!_0x171f53&&_0x217464[_0x1343a0(0x187)](_0x1343a0(0x17a)+_0x52c174[_0x1343a0(0x151)]+'\x22\x20('+_0x52c174[_0x1343a0(0x147)]+').');const _0x1db202=typeof _0x52c174[_0x1343a0(0x13f)]?.[_0x1343a0(0x14b)]==='string'?_0x52c174[_0x1343a0(0x13f)][_0x1343a0(0x14b)]:null,_0x47138a=_0x4e07e2?{'loadScriptMode':_0x1db202}:{},_0x3ebd93=_0x4e07e2?{'loadScriptMode':_0x4e07e2}:{};return{'id':_0x52c174['id'],'label':_0x52c174[_0x1343a0(0x151)],'path':_0x52c174[_0x1343a0(0x147)],'mode':_0x4dc0e1,'before':{'resources':_0x549989,..._0x47138a},'after':{'resources':_0x489d9c,..._0x3ebd93},'warnings':_0x217464};}function a131_0x222b(_0x3e04ca,_0x20cc09){_0x3e04ca=_0x3e04ca-0x13c;const _0x568db8=a131_0x568d();let _0x222b0d=_0x568db8[_0x3e04ca];return _0x222b0d;}function replaceResources(_0x30a5cb){const _0x43f21c=a131_0x222b;return[_0x30a5cb[_0x43f21c(0x149)],_0x30a5cb[_0x43f21c(0x177)]]['filter'](_0x339893=>!!_0x339893);}function assertUnambiguousPatchResources(_0x446459,_0x2fa224,_0x186e19){const _0x32d232=a131_0x222b,_0x1eafd1=_0x2fa224[_0x32d232(0x181)](isJsResource)[_0x32d232(0x16b)];if(_0x186e19[_0x32d232(0x149)]&&_0x1eafd1>0x1)throw new Error(_0x32d232(0x15b)+_0x1eafd1+_0x32d232(0x164)+_0x446459['label']+_0x32d232(0x17c)+_0x446459[_0x32d232(0x147)]+')\x20'+_0x32d232(0x166));const _0xa84f9c=_0x2fa224['filter'](isCssResource)[_0x32d232(0x16b)];if(_0x186e19[_0x32d232(0x177)]&&_0xa84f9c>0x1)throw new Error(_0x32d232(0x15b)+_0xa84f9c+_0x32d232(0x174)+_0x446459[_0x32d232(0x151)]+'\x22\x20('+_0x446459[_0x32d232(0x147)]+')\x20'+_0x32d232(0x16d));}function a131_0x568d(){const _0x1b83af=['path','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','jsUrl','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','loadScriptMode','JS\x20URL\x20is\x20unreachable:\x20','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','after','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','152979PyxVAZ','label','cwd','548770LPzWnd','dryRun','714052vwntQm','allSettled','paths','map','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','36561EBEFsC','menu\x20asset-update\x20cannot\x20patch\x20','selection','menu-asset-update','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','unshift','450iEJtdd','split','5ixIsaD','status','\x20existing\x20JS\x20resources\x20for\x20\x22','--params.','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','has','some','info','mode','length','.css','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','.js','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','66QuJdry','replace','Invalid\x20--params:\x20','rejected','\x20existing\x20CSS\x20resources\x20for\x20\x22','toLowerCase','value','cssUrl','join','.\x20Allowed\x20values:\x20replace,\x20patch','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','\x22\x20(','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','isArray',').\x20','resources','filter','message','1791gBdzpl','field','patch','parse','push','Invalid\x20--mode:\x20','20432plbXLY','Menu\x20asset\x20update\x20completed','all','object','625324keajNf','fulfilled','115017ilnvFD','extend','string','menuIds','endsWith','setLogPath','Start\x20non-interactive\x20menu\x20asset\x20update','force','trim'];a131_0x568d=function(){return _0x1b83af;};return a131_0x568d();}function patchResources(_0x5a04f3,_0xa689e5){const _0x309a9e=a131_0x222b;let _0x281699=![],_0x51af81=![];const _0x3d593c=[];for(const _0xd01b9d of _0x5a04f3){if(isJsResource(_0xd01b9d)){if(_0xa689e5[_0x309a9e(0x149)]&&!_0x281699)_0x3d593c[_0x309a9e(0x187)](_0xa689e5['jsUrl']),_0x281699=!![];else!_0xa689e5[_0x309a9e(0x149)]&&_0x3d593c[_0x309a9e(0x187)](_0xd01b9d);continue;}if(isCssResource(_0xd01b9d)){if(_0xa689e5[_0x309a9e(0x177)]&&!_0x51af81)_0x3d593c['push'](_0xa689e5['cssUrl']),_0x51af81=!![];else!_0xa689e5[_0x309a9e(0x177)]&&_0x3d593c[_0x309a9e(0x187)](_0xd01b9d);continue;}_0x3d593c['push'](_0xd01b9d);}return _0xa689e5[_0x309a9e(0x149)]&&!_0x281699&&_0x3d593c[_0x309a9e(0x15f)](_0xa689e5[_0x309a9e(0x149)]),_0xa689e5['cssUrl']&&!_0x51af81&&_0x3d593c[_0x309a9e(0x187)](_0xa689e5[_0x309a9e(0x177)]),_0x3d593c;}function isJsResource(_0x29814a){const _0x485115=a131_0x222b;return stripQuery(_0x29814a)[_0x485115(0x175)]()[_0x485115(0x142)](_0x485115(0x16e));}function isCssResource(_0x45c402){const _0x516aea=a131_0x222b;return stripQuery(_0x45c402)['toLowerCase']()[_0x516aea(0x142)](_0x516aea(0x16c));}function stripQuery(_0x522991){const _0x37cf6a=a131_0x222b;return _0x522991[_0x37cf6a(0x161)]('?')[0x0]??_0x522991;}function parseUpdateParamsFlag(_0x26dacf){const _0x151a52=a131_0x222b;if(!_0x26dacf||typeof _0x26dacf!==_0x151a52(0x140))return{};try{const _0x28b724=JSON[_0x151a52(0x186)](_0x26dacf);if(typeof _0x28b724!==_0x151a52(0x18c)||_0x28b724===null||Array[_0x151a52(0x17e)](_0x28b724))return{};return{'jsUrl':typeof _0x28b724[_0x151a52(0x149)]===_0x151a52(0x140)?_0x28b724['jsUrl'][_0x151a52(0x146)]():undefined,'cssUrl':typeof _0x28b724[_0x151a52(0x177)]===_0x151a52(0x140)?_0x28b724[_0x151a52(0x177)][_0x151a52(0x146)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1762d3,_0xe5c53a){const _0x3e73d3=a132_0x618f,_0x1f5734=_0x1762d3();while(!![]){try{const _0x1691ff=-parseInt(_0x3e73d3(0x16e))/0x1*(-parseInt(_0x3e73d3(0x170))/0x2)+parseInt(_0x3e73d3(0x173))/0x3+parseInt(_0x3e73d3(0x176))/0x4+parseInt(_0x3e73d3(0x177))/0x5+-parseInt(_0x3e73d3(0x16f))/0x6+parseInt(_0x3e73d3(0x174))/0x7+-parseInt(_0x3e73d3(0x171))/0x8;if(_0x1691ff===_0xe5c53a)break;else _0x1f5734['push'](_0x1f5734['shift']());}catch(_0x39beb7){_0x1f5734['push'](_0x1f5734['shift']());}}}(a132_0xc509,0xdab16));export function isValidJsHttpsUrl(_0x1140b7){const _0x4c6d6b=a132_0x618f;return/^https:\/\/.+\.js(\?.*)?$/[_0x4c6d6b(0x172)](_0x1140b7[_0x4c6d6b(0x16d)]());}function a132_0x618f(_0x3a8028,_0x3c7334){_0x3a8028=_0x3a8028-0x16d;const _0xc509d4=a132_0xc509();let _0x618f76=_0xc509d4[_0x3a8028];return _0x618f76;}export function isValidCssHttpsUrl(_0x7d70a5){const _0x10ebfc=a132_0x618f;return/^https:\/\/.+\.css(\?.*)?$/[_0x10ebfc(0x172)](_0x7d70a5[_0x10ebfc(0x16d)]());}export async function isUrlReachable(_0x21b3cd){const _0x224bc8=a132_0x618f;try{const _0x2e9662=await fetch(_0x21b3cd,{'method':_0x224bc8(0x175)});return _0x2e9662['ok'];}catch{return![];}}function a132_0xc509(){const _0x48a3b7=['581MMkwht','6555720QjyTMV','2788IYBpRl','16046376kAYUcy','test','822069QeajRa','12190584fkAzEk','HEAD','3966344zwmDPJ','885740lILrzz','trim'];a132_0xc509=function(){return _0x48a3b7;};return a132_0xc509();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a133_0x4582bf=a133_0x5030;(function(_0x46bf29,_0x2a14ca){const _0x585148=a133_0x5030,_0x164079=_0x46bf29();while(!![]){try{const _0x3815e0=-parseInt(_0x585148(0x194))/0x1*(-parseInt(_0x585148(0x190))/0x2)+parseInt(_0x585148(0x187))/0x3+-parseInt(_0x585148(0x17f))/0x4+-parseInt(_0x585148(0x198))/0x5*(parseInt(_0x585148(0x181))/0x6)+parseInt(_0x585148(0x18f))/0x7+-parseInt(_0x585148(0x17e))/0x8*(-parseInt(_0x585148(0x18c))/0x9)+-parseInt(_0x585148(0x168))/0xa;if(_0x3815e0===_0x2a14ca)break;else _0x164079['push'](_0x164079['shift']());}catch(_0x2b816a){_0x164079['push'](_0x164079['shift']());}}}(a133_0x4dc1,0xe4fe1));import a133_0x5ad759 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';function a133_0x4dc1(){const _0x588645=['\x20menu(s)\x20with\x20JS:\x20','menu','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','Creating\x20','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','cyan','yellow','appcode','\x20created,\x20','Menu\x20creation\x20failed','\x20created.','filter','map','Menu\x20sync\x20skipped','2114320oqAPdG','\x20local\x20microfrontend\x20menu(s).','Menu\x20sync\x20completed:\x20','Fetching\x20online\x20menu\x20list...','trim','\x20\x20Continue\x20with\x20creation?','\x20menu(s)\x20created','length','paths','appCode','gray','cssUrl','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','\x20menu(s)...','localPages','selectedAppName','failed','\x20\x20Create\x20','cookie','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','\x20menu(s)','jsUrl','8HFNcXY','5649968cjZzcl','/smartapi/menu/create','54cSuVyq','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','created','message','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','targetPages','2180247vkZHfn','flag','skipped','✓\x20Menu\x20sync\x20completed:\x20','\x20\x20Cancelled.','6377607BPcsUm','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','rawFlags','4085326nXJOWb','20BzaXgA','POST','params','string','54781gzdijW','onlineMenuList','size','str','2735MVSzvl','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','yes','sync','\x20failed.','\x20\x20✓\x20Selected:\x20','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','validation'];a133_0x4dc1=function(){return _0x588645;};return a133_0x4dc1();}import{isInProject}from'../../context.js';export const menuSync={'service':a133_0x4582bf(0x1a1),'command':a133_0x4582bf(0x19b),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':'write','flags':[{'name':a133_0x4582bf(0x192),'type':a133_0x4582bf(0x193),'description':'Pre-fill\x20JS/CSS\x20URLs.\x20'+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a133_0x4582bf(0x170),'type':a133_0x4582bf(0x193),'description':a133_0x4582bf(0x18d)},{'name':'yes','type':'boolean','description':a133_0x4582bf(0x1a4)}],async 'dryRun'(_0x30103f){const _0x32685e=a133_0x4582bf;ensureRunnableContext(_0x30103f[_0x32685e(0x18e)],_0x30103f[_0x32685e(0x177)]);const _0x302fe3=await runMenuSyncCore(_0x30103f[_0x32685e(0x171)],_0x30103f[_0x32685e(0x17a)],parsePaths(_0x30103f['str'](_0x32685e(0x170))),_0x30103f[_0x32685e(0x197)](_0x32685e(0x192)),{'dryRun':!![]});return{'method':_0x32685e(0x191),'url':_0x32685e(0x180),'body':_0x302fe3,'description':_0x302fe3[_0x32685e(0x189)]?_0x32685e(0x185):'Would\x20create\x20'+_0x302fe3[_0x32685e(0x186)][_0x32685e(0x16f)]+_0x32685e(0x169)};},async 'execute'(_0xf707f7){const _0x26e511=a133_0x4582bf;ensureRunnableContext(_0xf707f7['rawFlags'],_0xf707f7[_0x26e511(0x177)]);const _0x35f165=_0xf707f7[_0x26e511(0x188)](_0x26e511(0x19a)),_0x45aa4a=_0xf707f7['str']('params'),_0x27aec9=parsePaths(_0xf707f7[_0x26e511(0x197)](_0x26e511(0x170))),_0x12d4b5=parseMenuSyncParams(_0x45aa4a);if(_0x35f165){const _0x4535af=await runMenuSyncCore(_0xf707f7[_0x26e511(0x171)],_0xf707f7[_0x26e511(0x17a)],_0x27aec9,_0x45aa4a);if(_0x4535af[_0x26e511(0x189)]){const _0x88f099=getLocalPages();_0x88f099[_0x26e511(0x16f)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x26e511(0x199));}else writeCliSideChannelLine(_0x26e511(0x18a)+_0x4535af[_0x26e511(0x183)]+_0x26e511(0x16e));return{'ok':!![],'data':_0x4535af,'message':_0x4535af[_0x26e511(0x189)]?_0x26e511(0x167):'Menu\x20sync\x20completed:\x20'+_0x4535af['created']+_0x26e511(0x164)};}if(_0x27aec9['length']>0x0)throw CliErrors['validation'](_0x26e511(0x17b),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x45aa4a)throw CliErrors[_0x26e511(0x19f)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x26e511(0x182));requireInteractive();const _0x290b7e=startSpinner(_0x26e511(0x16b));let _0x3fae62,_0x3dfdf9,_0x1e580c;try{const _0x40465d=await fetchMenuData(_0xf707f7['appCode'],_0xf707f7['cookie']);_0x3fae62=_0x40465d[_0x26e511(0x176)],_0x3dfdf9=_0x40465d['onlinePaths'],_0x1e580c=_0x40465d[_0x26e511(0x195)],stopSpinner(_0x290b7e,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x3b1e0d){stopSpinner(_0x290b7e,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x26e511(0x19f)](_0x3b1e0d instanceof Error?_0x3b1e0d[_0x26e511(0x184)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x3fae62[_0x26e511(0x16f)]===0x0)return writeCliSideChannelLine(a133_0x5ad759[_0x26e511(0x160)](_0x26e511(0x1a2))),{'ok':!![]};const _0x17c240=buildCompareRows(_0x3fae62,_0x3dfdf9);writeCliSideChannelLine(renderCompareTable(_0x17c240)),writeCliSideChannelLine('');const _0x252259=await selectPages(_0x3fae62,_0x3dfdf9);writeCliSideChannelLine(''),writeCliSideChannelLine(a133_0x5ad759[_0x26e511(0x1a5)](_0x26e511(0x19d)+_0x252259[_0x26e511(0x16f)]+'\x20page(s)'));const _0x4c033b=_0x12d4b5[_0x26e511(0x17d)]&&_0x12d4b5[_0x26e511(0x173)];if(!_0x4c033b){writeCliSideChannelLine(renderSyncSummary(_0x252259,_0x3dfdf9[_0x26e511(0x196)]>0x0));const _0x79a2e2=await askConfirm(_0x26e511(0x16d));if(!_0x79a2e2)return writeCliSideChannelLine(a133_0x5ad759[_0x26e511(0x172)](_0x26e511(0x18b))),{'ok':!![]};}let _0x37fa63=_0x12d4b5[_0x26e511(0x17d)],_0x498fec=_0x12d4b5['cssUrl'];!_0x37fa63&&(_0x37fa63=await askJsUrl());!_0x498fec&&(_0x498fec=await askCssUrl());const _0x2c1c6d=await askConfirm(_0x26e511(0x179)+_0x252259['length']+_0x26e511(0x1a0)+_0x37fa63+'\x20and\x20CSS:\x20'+_0x498fec+'?');if(!_0x2c1c6d)return writeCliSideChannelLine(a133_0x5ad759[_0x26e511(0x172)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x3b9099=[_0x37fa63,_0x498fec],_0x1f1dd6=startSpinner(_0x26e511(0x1a3)+_0x252259[_0x26e511(0x16f)]+_0x26e511(0x175));try{const _0x549a4e=await doCreateMenus(_0xf707f7['appCode'],_0xf707f7[_0x26e511(0x17a)],_0x252259,_0x3b9099);return stopSpinner(_0x1f1dd6,'Created\x20'+_0x549a4e[_0x26e511(0x183)]+_0x26e511(0x17c),!![]),{'ok':!![],'data':_0x549a4e,'message':_0x26e511(0x16a)+_0x549a4e[_0x26e511(0x183)]+_0x26e511(0x162)+_0x549a4e[_0x26e511(0x178)]+_0x26e511(0x19c)};}catch(_0x56effa){stopSpinner(_0x1f1dd6,_0x26e511(0x163),![]);throw CliErrors['validation'](_0x56effa instanceof Error?_0x56effa[_0x26e511(0x184)]:_0x26e511(0x163));}}};function ensureRunnableContext(_0x50fd1b,_0x1d64ac){const _0x11ba66=a133_0x4582bf,_0x377c71=_0x50fd1b[_0x11ba66(0x161)]?String(_0x50fd1b['appcode'])[_0x11ba66(0x16c)]():'';if(!isInProject()&&!_0x1d64ac&&!_0x377c71)throw CliErrors[_0x11ba66(0x19f)](_0x11ba66(0x174)+_0x11ba66(0x19e));}function a133_0x5030(_0x193c6d,_0x36ada7){_0x193c6d=_0x193c6d-0x160;const _0x4dc10c=a133_0x4dc1();let _0x5030a5=_0x4dc10c[_0x193c6d];return _0x5030a5;}function parsePaths(_0xa6515e){const _0x2ade41=a133_0x4582bf;return[...new Set(_0xa6515e['split'](',')[_0x2ade41(0x166)](_0x3de746=>_0x3de746['trim']())[_0x2ade41(0x165)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a134_0x22b5(){const _0x748fcf=['\x20menu(s),\x20expected\x20','validation','datasetId','map','Requested\x20menu\x20visibility','menu_expected_count_mismatch','POST','flagMissing','update\x20visibility\x20for','10VIeIXK','beforeById','label','menu','296608WHXSzI','str','modelType','Selected\x20','menu-ids','stringify','appCode','4195OZsfdH','menu_permission_denied','isSafeInteger','warnings','46965wgBNAR','hash','Response\x20was\x20lost\x20and\x20menu\x20','\x20failed.','rawFlags','verification','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','type','1706257EHmRVt','sort','high-risk-write','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','\x20menu(s);\x20skip\x20','menuIds','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','/smartapi/menu/update','parentId','trim','Final\x20menu\x20visibility\x20readback\x20failed.','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','join','length','true','recovered','message','Updated\x20visibility\x20for\x20','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','expected-count','push','get','failed','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','url','1764819oOvQkx','byId','\x20must\x20be\x20true\x20or\x20false.','update\x20menu\x20visibility','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','44OyiLsC','menu\x20list','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','isArray','plan','childrenIds','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','has','\x20skipped,\x20','childrenCount','path','130326SYBMJs','update','35917wtiSUd','menu_verification_failed','requestedVisible','pageId','num','pageType','resourcesValid','\x20updated,\x20','Response\x20was\x20lost\x20for\x20menu\x20','\x20menu(s);\x20skipped\x20','Menu\x20','Menu\x20id\x20selector(s)\x20not\x20found:\x20','values','update-recovery','paths','expectVisible','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','visible','plannedActions','before','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','expectedCount','datasetCode','\x20visibility\x20update\x20could\x20not\x20be\x20verified','resources','depth','code','split','rabetbase\x20menu\x20list\x20--format\x20compress','menu_state_drift','targets','\x20unchanged\x20menu(s).','number','menus','visibility-update','boolean','menu_selector_not_found','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','filter','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.'];a134_0x22b5=function(){return _0x748fcf;};return a134_0x22b5();}const a134_0x654c5=a134_0x54a9;(function(_0x3b09fe,_0x37b4e8){const _0x31905c=a134_0x54a9,_0xd4b9a0=_0x3b09fe();while(!![]){try{const _0x141c5d=parseInt(_0x31905c(0x1e0))/0x1+-parseInt(_0x31905c(0x214))/0x2*(-parseInt(_0x31905c(0x223))/0x3)+-parseInt(_0x31905c(0x1d2))/0x4*(parseInt(_0x31905c(0x21f))/0x5)+-parseInt(_0x31905c(0x1de))/0x6+parseInt(_0x31905c(0x22b))/0x7+parseInt(_0x31905c(0x218))/0x8+-parseInt(_0x31905c(0x1cd))/0x9;if(_0x141c5d===_0x37b4e8)break;else _0xd4b9a0['push'](_0xd4b9a0['shift']());}catch(_0x3ea09f){_0xd4b9a0['push'](_0xd4b9a0['shift']());}}}(a134_0x22b5,0x2902a));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';function a134_0x54a9(_0x5af347,_0x187e6a){_0x5af347=_0x5af347-0x1c8;const _0x22b5a4=a134_0x22b5();let _0x54a9d8=_0x22b5a4[_0x5af347];return _0x54a9d8;}const BACKEND=[{'method':a134_0x654c5(0x211),'path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a134_0x654c5(0x217),'command':a134_0x654c5(0x204),'description':a134_0x654c5(0x1d9),'risk':a134_0x654c5(0x22d),'structuredErrors':!![],'flags':[{'name':a134_0x654c5(0x21c),'type':'string','description':a134_0x654c5(0x1f5)},{'name':a134_0x654c5(0x1ee),'type':'string','description':a134_0x654c5(0x1f1)},{'name':'visible','type':a134_0x654c5(0x205),'required':!![],'description':a134_0x654c5(0x20f)},{'name':'expect-visible','type':a134_0x654c5(0x205),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a134_0x654c5(0x23e),'type':a134_0x654c5(0x202),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x493dd3){parseInput(_0x493dd3),requireExplicitYes(_0x493dd3);},async 'dryRun'(_0x39c325){const _0x35a0e5=a134_0x654c5,_0x5724bd=await buildPlan(_0x39c325,!![]),_0x525482=_0x5724bd[_0x35a0e5(0x1d6)][_0x35a0e5(0x1f3)]?.[_0x35a0e5(0x238)]??0x0,_0x5be4de=_0x5724bd[_0x35a0e5(0x1d6)][_0x35a0e5(0x200)][_0x35a0e5(0x238)]-_0x525482;return menuDryRunResult(_0x5724bd[_0x35a0e5(0x1d6)],{'method':'POST','url':_0x35a0e5(0x232),'body':{'updates':_0x5724bd[_0x35a0e5(0x1d6)][_0x35a0e5(0x1f3)]?.[_0x35a0e5(0x20e)](_0x56ece6=>_0x56ece6['body'])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x525482+_0x35a0e5(0x22f)+_0x5be4de+_0x35a0e5(0x201)});},async 'execute'(_0x3b667e){const _0xd1722a=a134_0x654c5;requireExplicitYes(_0x3b667e);const _0x5eb19a=await buildPlan(_0x3b667e,![]);await recheckMutationSnapshot(_0x3b667e,_0x5eb19a['plan'],'update\x20menu\x20visibility');const _0x1bd8a1=[],_0x1bbe9d=[],_0xd93be7=[];for(const _0x493689 of _0x5eb19a[_0xd1722a(0x1d6)][_0xd1722a(0x200)]){if(_0x493689[_0xd1722a(0x1f4)]['visible']===_0x5eb19a['plan'][_0xd1722a(0x1e2)]){_0x1bd8a1['push']({'id':_0x493689['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x3b667e[_0xd1722a(0x21e)],_0x3b667e['cookie'],{'id':_0x493689['id'],'visible':_0x5eb19a[_0xd1722a(0x1d6)][_0xd1722a(0x1e2)]}),_0x1bd8a1[_0xd1722a(0x1c8)]({'id':_0x493689['id'],'updated':!![],'skipped':![]});}catch(_0x30fad5){const _0x2e7234=mapMenuApiError(_0x30fad5,_0xd1722a(0x213),_0x493689['id']);if(isMenuResponseLoss(_0x30fad5)&&_0x2e7234['code']!==_0xd1722a(0x220)){_0xd93be7[_0xd1722a(0x1c8)](_0x493689['id']);continue;}_0x1bbe9d['push']({'id':_0x493689['id'],'stage':_0xd1722a(0x1df),'code':_0x2e7234[_0xd1722a(0x1fc)],'message':_0x2e7234[_0xd1722a(0x23b)]});}}let _0xe52816;try{_0xe52816=await fetchMenuSnapshot(_0x3b667e[_0xd1722a(0x21e)],_0x3b667e['cookie']);}catch(_0x188d3d){const _0x1a69f8=describeMenuErrorCause(_0x188d3d,'verify\x20menu\x20visibility\x20update'),_0x4faf14=_0xd93be7['map'](_0x24a6f5=>({'id':_0x24a6f5,'stage':_0xd1722a(0x1ed),'code':_0xd1722a(0x1e1),'message':_0xd1722a(0x1e8)+_0x24a6f5+_0xd1722a(0x22e),'requestedStateConfirmed':![],'recovered':![]})),_0x4de5cd={'stage':'verification','code':'menu_verification_failed','message':_0xd1722a(0x235),'targetIds':_0x5eb19a[_0xd1722a(0x1d6)][_0xd1722a(0x200)][_0xd1722a(0x20e)](_0x16dd9b=>_0x16dd9b['id']),'requestedStateConfirmed':![],..._0x1a69f8};throw menuFailure(asVerificationError(_0x188d3d,_0xd1722a(0x1d8)),_0x5eb19a[_0xd1722a(0x1d6)],{'stage':'verification','succeeded':_0x1bd8a1,'failedRecords':[..._0x1bbe9d,..._0x4faf14,_0x4de5cd],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0xd1722a(0x1ca),'recoveredCount':0x0,'lookupCommand':_0xd1722a(0x1fe)}});}const _0x2d6926=[];for(const _0x56e226 of _0x1bd8a1){const _0xc9dbfb=Number(_0x56e226['id']),_0x5678e2=_0x5eb19a[_0xd1722a(0x215)][_0xd1722a(0x1c9)](_0xc9dbfb),_0x4eae08=_0xe52816[_0xd1722a(0x1ce)]['get'](_0xc9dbfb);try{verifyVisibilityUpdate(_0x5678e2,_0x4eae08,_0x5eb19a[_0xd1722a(0x1d6)][_0xd1722a(0x1e2)]);}catch(_0x2dbade){const _0x15778d=asVerificationError(_0x2dbade,_0xd1722a(0x1ea)+_0xc9dbfb+_0xd1722a(0x1f9));_0x2d6926[_0xd1722a(0x1c8)]({'id':_0xc9dbfb,'stage':_0xd1722a(0x228),'code':_0x15778d[_0xd1722a(0x1fc)],'message':_0x15778d[_0xd1722a(0x23b)],'requestedStateConfirmed':![]});}}for(const _0x95f035 of _0xd93be7){const _0x3aef13=_0x5eb19a[_0xd1722a(0x215)][_0xd1722a(0x1c9)](_0x95f035),_0x582259=_0xe52816[_0xd1722a(0x1ce)][_0xd1722a(0x1c9)](_0x95f035);try{verifyVisibilityUpdate(_0x3aef13,_0x582259,_0x5eb19a['plan'][_0xd1722a(0x1e2)]),_0x1bd8a1[_0xd1722a(0x1c8)]({'id':_0x95f035,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x5da0ce){const _0x4fb381=asVerificationError(_0x5da0ce,_0xd1722a(0x225)+_0x95f035+_0xd1722a(0x1d4));_0x2d6926['push']({'id':_0x95f035,'stage':_0xd1722a(0x1ed),'code':_0x4fb381['code'],'message':_0x4fb381[_0xd1722a(0x23b)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x2d6926['length']>0x0){const _0x858596=_0x2d6926['map'](_0x3b2de3=>Number(_0x3b2de3['id'])),_0x5b479c=_0x1bd8a1[_0xd1722a(0x209)](_0x1c78f9=>_0x1c78f9[_0xd1722a(0x23a)]===!![])['length'],_0x553a6e=menuError('menu_verification_failed','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x858596[_0xd1722a(0x237)](',\x20')+'.',_0xd1722a(0x1f6));throw menuFailure(_0x553a6e,_0x5eb19a[_0xd1722a(0x1d6)],{'stage':_0xd1722a(0x228),'succeeded':_0x1bd8a1,'failedRecords':[..._0x1bbe9d,..._0x2d6926],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0xd1722a(0x1ca),..._0x858596[_0xd1722a(0x238)]===0x1?{'targetId':_0x858596[0x0]}:{'targetIds':_0x858596},'recoveredCount':_0x5b479c,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x2ced50=_0x1bd8a1['filter'](_0x40e6e3=>_0x40e6e3['updated']===!![])[_0xd1722a(0x238)],_0x449e2c=_0x1bd8a1['length']-_0x2ced50,_0x1ba2dc={..._0x5eb19a['plan'],'succeeded':_0x1bd8a1,'failed':_0x1bbe9d,'warnings':_0x1bbe9d[_0xd1722a(0x238)]>0x0?[..._0x5eb19a[_0xd1722a(0x1d6)][_0xd1722a(0x222)],_0xd1722a(0x1f0)]:_0x5eb19a['plan'][_0xd1722a(0x222)],'verification':{'checkedBy':_0xd1722a(0x1d3),'snapshotHash':_0xe52816[_0xd1722a(0x224)],'matchesRequestedState':_0x1bbe9d['length']===0x0,'recoveredCount':_0xd93be7[_0xd1722a(0x238)]}};return{'ok':_0x1bbe9d[_0xd1722a(0x238)]===0x0,'data':_0x1ba2dc,'message':_0x1bbe9d[_0xd1722a(0x238)]===0x0?_0xd1722a(0x23c)+_0x2ced50+_0xd1722a(0x1e9)+_0x449e2c+_0xd1722a(0x201):'Menu\x20visibility\x20update\x20completed:\x20'+_0x2ced50+_0xd1722a(0x1e7)+_0x449e2c+_0xd1722a(0x1db)+_0x1bbe9d[_0xd1722a(0x238)]+_0xd1722a(0x226)};}};function parseInput(_0x4df43f){const _0x4b5ff9=a134_0x654c5,_0xd9960b=parseMenuIds(_0x4df43f[_0x4b5ff9(0x219)](_0x4b5ff9(0x21c))),_0x5a6e52=parseCsv(_0x4df43f['str'](_0x4b5ff9(0x1ee)));if(_0xd9960b['length']===0x0&&_0x5a6e52[_0x4b5ff9(0x238)]===0x0)throw CliErrors['validation']('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x385ec1=parseBooleanFlag(_0x4df43f,_0x4b5ff9(0x1f2),!![]),_0x31ac59=parseBooleanFlag(_0x4df43f,'expect-visible',![]);let _0x542666;if(hasFlag(_0x4df43f,_0x4b5ff9(0x23e))){_0x542666=_0x4df43f[_0x4b5ff9(0x1e4)]('expected-count');if(!Number[_0x4b5ff9(0x221)](_0x542666)||_0x542666<0x0)throw CliErrors['validation']('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0xd9960b,'paths':_0x5a6e52,'visible':_0x385ec1,'expectVisible':_0x31ac59,'expectedCount':_0x542666};}async function buildPlan(_0x294ecc,_0x3e26e8){const _0xc4a7a0=a134_0x654c5,_0x31464c=parseInput(_0x294ecc),_0xab4a00=await fetchMutationSnapshot(_0x294ecc,_0xc4a7a0(0x1d0)),_0x476d2e=selectTargets(_0xab4a00[_0xc4a7a0(0x203)],_0x31464c[_0xc4a7a0(0x230)],_0x31464c[_0xc4a7a0(0x1ee)]);if(_0x31464c[_0xc4a7a0(0x1f7)]!==undefined&&_0x476d2e[_0xc4a7a0(0x238)]!==_0x31464c[_0xc4a7a0(0x1f7)])throw menuError(_0xc4a7a0(0x210),_0xc4a7a0(0x21b)+_0x476d2e['length']+_0xc4a7a0(0x20b)+_0x31464c[_0xc4a7a0(0x1f7)]+'.',_0xc4a7a0(0x229));if(_0x31464c[_0xc4a7a0(0x1ef)]!==undefined){const _0x4fda1a=_0x476d2e[_0xc4a7a0(0x209)](_0x2e6cf9=>_0x2e6cf9[_0xc4a7a0(0x1f2)]!==_0x31464c[_0xc4a7a0(0x1ef)]);if(_0x4fda1a[_0xc4a7a0(0x238)]>0x0)throw menuError(_0xc4a7a0(0x1ff),_0xc4a7a0(0x207)+_0x4fda1a['map'](_0x325370=>_0x325370['id'])[_0xc4a7a0(0x237)](',\x20')+'.',_0xc4a7a0(0x20a));}const _0x250a06=_0x476d2e[_0xc4a7a0(0x20e)](_0x7b032b=>({'id':_0x7b032b['id'],'label':_0x7b032b[_0xc4a7a0(0x216)],'path':_0x7b032b[_0xc4a7a0(0x1dd)],'before':{'visible':_0x7b032b['visible']},'after':{'visible':_0x31464c[_0xc4a7a0(0x1f2)]}})),_0x383649=_0x250a06[_0xc4a7a0(0x209)](_0x1d5365=>_0x1d5365[_0xc4a7a0(0x1f4)]['visible']!==_0x31464c[_0xc4a7a0(0x1f2)])['map'](_0x211eef=>({'stage':'update-menu-visibility','method':_0xc4a7a0(0x211),'path':_0xc4a7a0(0x232),'body':{'appCode':_0x294ecc['appCode'],'id':_0x211eef['id'],'visible':_0x31464c[_0xc4a7a0(0x1f2)]}})),_0x3549fc=mutationResult({'operation':_0xc4a7a0(0x204),'selector':{'menuIds':_0x31464c[_0xc4a7a0(0x230)],'paths':_0x31464c['paths']},'before':{'menus':_0x476d2e[_0xc4a7a0(0x20e)](_0x550f03=>({'id':_0x550f03['id'],'path':_0x550f03[_0xc4a7a0(0x1dd)],'visible':_0x550f03['visible']}))},'after':{'menus':_0x476d2e['map'](_0x3dd169=>({'id':_0x3dd169['id'],'path':_0x3dd169[_0xc4a7a0(0x1dd)],'visible':_0x31464c[_0xc4a7a0(0x1f2)]}))},'dryRun':_0x3e26e8,'backend':[...BACKEND],'plannedActions':_0x383649,'snapshotHash':_0xab4a00[_0xc4a7a0(0x224)],'warnings':_0x383649[_0xc4a7a0(0x238)]===0x0?[_0xc4a7a0(0x236)]:[]});return{'plan':{..._0x3549fc,'requestedVisible':_0x31464c[_0xc4a7a0(0x1f2)],'targets':_0x250a06},'beforeById':new Map(_0x476d2e['map'](_0x161a69=>[_0x161a69['id'],_0x161a69]))};}function selectTargets(_0x5e3a1e,_0x1832b7,_0x6efb0a){const _0x4cd2d0=a134_0x654c5,_0x332e39=new Map(_0x5e3a1e['map'](_0x421746=>[_0x421746['id'],_0x421746])),_0x5741df=new Map(),_0x1485fa=_0x1832b7[_0x4cd2d0(0x209)](_0x3b7975=>!_0x332e39[_0x4cd2d0(0x1da)](_0x3b7975));if(_0x1485fa[_0x4cd2d0(0x238)]>0x0)throw menuError(_0x4cd2d0(0x206),_0x4cd2d0(0x1eb)+_0x1485fa[_0x4cd2d0(0x237)](',\x20')+'.',_0x4cd2d0(0x208));for(const _0xbe82b8 of _0x1832b7){_0x5741df['set'](_0xbe82b8,_0x332e39[_0x4cd2d0(0x1c9)](_0xbe82b8));}for(const _0x3629d8 of _0x6efb0a){const _0x2a1195=_0x5e3a1e[_0x4cd2d0(0x209)](_0x5b6f4e=>_0x5b6f4e[_0x4cd2d0(0x1dd)]===_0x3629d8);if(_0x2a1195['length']===0x0)throw menuError(_0x4cd2d0(0x206),'Menu\x20path\x20selector\x20not\x20found:\x20'+JSON['stringify'](_0x3629d8)+'.',_0x4cd2d0(0x23d));if(_0x2a1195[_0x4cd2d0(0x238)]>0x1)throw menuError('menu_selector_ambiguous',_0x4cd2d0(0x1d1)+JSON[_0x4cd2d0(0x21d)](_0x3629d8)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x2a1195['map'](_0x1fcc1a=>_0x1fcc1a['id'])[_0x4cd2d0(0x237)](',\x20')+'.');const _0x3838d3=_0x2a1195[0x0];_0x5741df['set'](_0x3838d3['id'],_0x3838d3);}return[..._0x5741df[_0x4cd2d0(0x1ec)]()];}function parseMenuIds(_0x44243c){const _0x19da41=a134_0x654c5,_0x8ad0ca=parseCsv(_0x44243c),_0x542871=_0x8ad0ca[_0x19da41(0x20e)](Number);if(_0x542871['some'](_0x2470bc=>!Number[_0x19da41(0x221)](_0x2470bc)||_0x2470bc<=0x0))throw CliErrors[_0x19da41(0x20c)](_0x19da41(0x231));return[...new Set(_0x542871)];}function parseCsv(_0x478a96){const _0x4982e3=a134_0x654c5;return[...new Set(_0x478a96[_0x4982e3(0x1fd)](',')['map'](_0x41ea3c=>_0x41ea3c[_0x4982e3(0x234)]())['filter'](Boolean))];}function parseBooleanFlag(_0x592ae8,_0x638c66,_0x286b9f){const _0x3f2ad9=a134_0x654c5;if(!hasFlag(_0x592ae8,_0x638c66)){if(_0x286b9f)throw CliErrors[_0x3f2ad9(0x212)](_0x638c66);return undefined;}const _0x5c7046=_0x592ae8[_0x3f2ad9(0x227)][_0x638c66];if(_0x5c7046===!![]||_0x5c7046===![])return _0x5c7046;if(_0x5c7046===_0x3f2ad9(0x239))return!![];if(_0x5c7046==='false')return![];throw CliErrors[_0x3f2ad9(0x20c)]('--'+_0x638c66+_0x3f2ad9(0x1cf));}function verifyVisibilityUpdate(_0x1bcabf,_0x2a4cf0,_0x30060e){const _0x22f805=a134_0x654c5;assertVerified(!!_0x2a4cf0,_0x22f805(0x1ea)+_0x1bcabf['id']+_0x22f805(0x1cb)),assertVerified(_0x2a4cf0[_0x22f805(0x1f2)]===_0x30060e,_0x22f805(0x1ea)+_0x1bcabf['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x12e9c5=[['id',_0x2a4cf0['id'],_0x1bcabf['id']],[_0x22f805(0x233),_0x2a4cf0[_0x22f805(0x233)],_0x1bcabf[_0x22f805(0x233)]],[_0x22f805(0x1fb),_0x2a4cf0[_0x22f805(0x1fb)],_0x1bcabf[_0x22f805(0x1fb)]],[_0x22f805(0x216),_0x2a4cf0[_0x22f805(0x216)],_0x1bcabf[_0x22f805(0x216)]],[_0x22f805(0x1dd),_0x2a4cf0[_0x22f805(0x1dd)],_0x1bcabf[_0x22f805(0x1dd)]],[_0x22f805(0x1cc),_0x2a4cf0[_0x22f805(0x1cc)],_0x1bcabf[_0x22f805(0x1cc)]],[_0x22f805(0x22a),_0x2a4cf0[_0x22f805(0x22a)],_0x1bcabf['type']],[_0x22f805(0x22c),_0x2a4cf0[_0x22f805(0x22c)],_0x1bcabf[_0x22f805(0x22c)]],[_0x22f805(0x1fa),_0x2a4cf0['resources'],_0x1bcabf[_0x22f805(0x1fa)]],[_0x22f805(0x1e6),_0x2a4cf0['resourcesValid'],_0x1bcabf[_0x22f805(0x1e6)]],['childrenIds',_0x2a4cf0[_0x22f805(0x1d7)],_0x1bcabf['childrenIds']],[_0x22f805(0x1dc),_0x2a4cf0[_0x22f805(0x1dc)],_0x1bcabf['childrenCount']],[_0x22f805(0x1e3),_0x2a4cf0[_0x22f805(0x1e3)],_0x1bcabf[_0x22f805(0x1e3)]],[_0x22f805(0x1e5),_0x2a4cf0[_0x22f805(0x1e5)],_0x1bcabf[_0x22f805(0x1e5)]],[_0x22f805(0x21a),_0x2a4cf0['modelType'],_0x1bcabf['modelType']],[_0x22f805(0x20d),_0x2a4cf0[_0x22f805(0x20d)],_0x1bcabf['datasetId']],[_0x22f805(0x1f8),_0x2a4cf0[_0x22f805(0x1f8)],_0x1bcabf[_0x22f805(0x1f8)]]];for(const [_0x486f44,_0x5722f2,_0x602495]of _0x12e9c5){assertVerified(sameValue(_0x5722f2,_0x602495),'Menu\x20'+_0x1bcabf['id']+'\x20'+_0x486f44+'\x20changed\x20unexpectedly.');}}function sameValue(_0x4d4fa3,_0x4c049d){const _0x599ca1=a134_0x654c5;if(Array[_0x599ca1(0x1d5)](_0x4d4fa3)||Array['isArray'](_0x4c049d))return JSON[_0x599ca1(0x21d)](_0x4d4fa3)===JSON[_0x599ca1(0x21d)](_0x4c049d);return _0x4d4fa3===_0x4c049d;}
|
|
1
|
+
const a134_0x3998c8=a134_0x3c4f;(function(_0x4b06f9,_0xfa79d2){const _0x2af424=a134_0x3c4f,_0x2cf1ed=_0x4b06f9();while(!![]){try{const _0x5785b5=parseInt(_0x2af424(0x221))/0x1+parseInt(_0x2af424(0x227))/0x2*(parseInt(_0x2af424(0x1ce))/0x3)+parseInt(_0x2af424(0x200))/0x4*(-parseInt(_0x2af424(0x21d))/0x5)+parseInt(_0x2af424(0x1d5))/0x6+-parseInt(_0x2af424(0x218))/0x7*(-parseInt(_0x2af424(0x1ee))/0x8)+-parseInt(_0x2af424(0x215))/0x9+parseInt(_0x2af424(0x1d1))/0xa;if(_0x5785b5===_0xfa79d2)break;else _0x2cf1ed['push'](_0x2cf1ed['shift']());}catch(_0x52897d){_0x2cf1ed['push'](_0x2cf1ed['shift']());}}}(a134_0x2283,0x5c326));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a134_0x2283(){const _0x36ac29=['1996mFEzDd','verification','parentId','/smartapi/menu/update','update\x20visibility\x20for','modelType','path','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','updated','menu','menu\x20list','label','plannedActions','push','visible','isArray','menu_expected_count_mismatch','beforeById','pageType','resourcesValid','message','1596591FICQpO','menuIds','datasetCode','2464XVhJJv','url','byId','map','\x20skipped,\x20','5935YOMmWT','type','menu_verification_failed','Selected\x20','39320brkrvs','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','expect-visible','failed','childrenIds','requestedVisible','1186XwFkUH','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','values','update\x20menu\x20visibility','\x20menu(s),\x20expected\x20','menu_selector_not_found','paths','pageId','number','set','targets','\x20unchanged\x20menu(s).','\x20changed\x20unexpectedly.','Response\x20was\x20lost\x20for\x20menu\x20','\x20menu(s);\x20skip\x20','rawFlags','before','string','depth','code','get','split','datasetId','validation','join','expectVisible','expected-count','plan','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','1677mTcTvh','some','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','3245890zVtwmN','Requested\x20menu\x20visibility','length','sort','2625132OiPHGj','resources','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','body','\x20menu(s);\x20skipped\x20','recovered','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','childrenCount','boolean','Menu\x20visibility\x20update\x20completed:\x20','Menu\x20','warnings','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','menu_permission_denied','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','POST','hash','cookie','isSafeInteger','trim','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Menu\x20id\x20selector(s)\x20not\x20found:\x20','filter','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','str','328VfxliN','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Menu\x20path\x20selector\x20not\x20found:\x20','true','update-recovery','menu_selector_ambiguous','menu-ids','rabetbase\x20menu\x20list\x20--format\x20compress','verify\x20menu\x20visibility\x20update','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','stringify','update-menu-visibility','expectedCount','false','appCode','flagMissing','visibility-update','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.'];a134_0x2283=function(){return _0x36ac29;};return a134_0x2283();}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':a134_0x3998c8(0x203)}];export const menuVisibilityUpdate={'service':a134_0x3998c8(0x209),'command':a134_0x3998c8(0x1fe),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':'high-risk-write','structuredErrors':!![],'flags':[{'name':a134_0x3998c8(0x1f4),'type':a134_0x3998c8(0x239),'description':a134_0x3998c8(0x1e3)},{'name':a134_0x3998c8(0x22e),'type':a134_0x3998c8(0x239),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a134_0x3998c8(0x20e),'type':a134_0x3998c8(0x1dd),'required':!![],'description':a134_0x3998c8(0x1d2)},{'name':'expect-visible','type':a134_0x3998c8(0x1dd),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':'expected-count','type':a134_0x3998c8(0x230),'description':a134_0x3998c8(0x207)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3e362a){parseInput(_0x3e362a),requireExplicitYes(_0x3e362a);},async 'dryRun'(_0x5b2807){const _0x1fe0dd=a134_0x3998c8,_0xba992e=await buildPlan(_0x5b2807,!![]),_0x267678=_0xba992e['plan'][_0x1fe0dd(0x20c)]?.[_0x1fe0dd(0x1d3)]??0x0,_0x231a40=_0xba992e['plan']['targets'][_0x1fe0dd(0x1d3)]-_0x267678;return menuDryRunResult(_0xba992e[_0x1fe0dd(0x1cc)],{'method':_0x1fe0dd(0x1e4),'url':_0x1fe0dd(0x203),'body':{'updates':_0xba992e[_0x1fe0dd(0x1cc)][_0x1fe0dd(0x20c)]?.[_0x1fe0dd(0x21b)](_0x1776df=>_0x1776df[_0x1fe0dd(0x1d8)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x267678+_0x1fe0dd(0x236)+_0x231a40+_0x1fe0dd(0x233)});},async 'execute'(_0x49c977){const _0x591ae2=a134_0x3998c8;requireExplicitYes(_0x49c977);const _0x580857=await buildPlan(_0x49c977,![]);await recheckMutationSnapshot(_0x49c977,_0x580857[_0x591ae2(0x1cc)],_0x591ae2(0x22b));const _0x2d65f5=[],_0x4e923a=[],_0x493cbf=[];for(const _0x1292ef of _0x580857[_0x591ae2(0x1cc)][_0x591ae2(0x232)]){if(_0x1292ef[_0x591ae2(0x238)][_0x591ae2(0x20e)]===_0x580857[_0x591ae2(0x1cc)]['requestedVisible']){_0x2d65f5['push']({'id':_0x1292ef['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x49c977[_0x591ae2(0x1fc)],_0x49c977[_0x591ae2(0x1e6)],{'id':_0x1292ef['id'],'visible':_0x580857[_0x591ae2(0x1cc)][_0x591ae2(0x226)]}),_0x2d65f5[_0x591ae2(0x20d)]({'id':_0x1292ef['id'],'updated':!![],'skipped':![]});}catch(_0x562c02){const _0x44a81d=mapMenuApiError(_0x562c02,_0x591ae2(0x204),_0x1292ef['id']);if(isMenuResponseLoss(_0x562c02)&&_0x44a81d[_0x591ae2(0x23b)]!==_0x591ae2(0x1e2)){_0x493cbf[_0x591ae2(0x20d)](_0x1292ef['id']);continue;}_0x4e923a[_0x591ae2(0x20d)]({'id':_0x1292ef['id'],'stage':'update','code':_0x44a81d[_0x591ae2(0x23b)],'message':_0x44a81d[_0x591ae2(0x214)]});}}let _0x15b441;try{_0x15b441=await fetchMenuSnapshot(_0x49c977['appCode'],_0x49c977['cookie']);}catch(_0xfdafa4){const _0x5104cc=describeMenuErrorCause(_0xfdafa4,_0x591ae2(0x1f6)),_0x29fa30=_0x493cbf[_0x591ae2(0x21b)](_0x958971=>({'id':_0x958971,'stage':_0x591ae2(0x1f2),'code':_0x591ae2(0x21f),'message':_0x591ae2(0x235)+_0x958971+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x45fdd8={'stage':_0x591ae2(0x201),'code':_0x591ae2(0x21f),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x580857['plan'][_0x591ae2(0x232)][_0x591ae2(0x21b)](_0x2d00e7=>_0x2d00e7['id']),'requestedStateConfirmed':![],..._0x5104cc};throw menuFailure(asVerificationError(_0xfdafa4,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x580857[_0x591ae2(0x1cc)],{'stage':_0x591ae2(0x201),'succeeded':_0x2d65f5,'failedRecords':[..._0x4e923a,..._0x29fa30,_0x45fdd8],'warnings':[_0x591ae2(0x228)],'verification':{'status':_0x591ae2(0x224),'recoveredCount':0x0,'lookupCommand':_0x591ae2(0x1f5)}});}const _0x282a10=[];for(const _0xd47ac9 of _0x2d65f5){const _0x3c9c98=Number(_0xd47ac9['id']),_0x484983=_0x580857['beforeById'][_0x591ae2(0x23c)](_0x3c9c98),_0x217b46=_0x15b441[_0x591ae2(0x21a)][_0x591ae2(0x23c)](_0x3c9c98);try{verifyVisibilityUpdate(_0x484983,_0x217b46,_0x580857[_0x591ae2(0x1cc)][_0x591ae2(0x226)]);}catch(_0x2fe3b9){const _0x363bc0=asVerificationError(_0x2fe3b9,'Menu\x20'+_0x3c9c98+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x282a10[_0x591ae2(0x20d)]({'id':_0x3c9c98,'stage':_0x591ae2(0x201),'code':_0x363bc0[_0x591ae2(0x23b)],'message':_0x363bc0['message'],'requestedStateConfirmed':![]});}}for(const _0x34f9b8 of _0x493cbf){const _0x4b234a=_0x580857[_0x591ae2(0x211)][_0x591ae2(0x23c)](_0x34f9b8),_0x5b22b3=_0x15b441[_0x591ae2(0x21a)][_0x591ae2(0x23c)](_0x34f9b8);try{verifyVisibilityUpdate(_0x4b234a,_0x5b22b3,_0x580857[_0x591ae2(0x1cc)][_0x591ae2(0x226)]),_0x2d65f5['push']({'id':_0x34f9b8,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x61b6bb){const _0xd6150=asVerificationError(_0x61b6bb,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x34f9b8+_0x591ae2(0x1e1));_0x282a10[_0x591ae2(0x20d)]({'id':_0x34f9b8,'stage':_0x591ae2(0x1f2),'code':_0xd6150[_0x591ae2(0x23b)],'message':_0xd6150[_0x591ae2(0x214)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x282a10['length']>0x0){const _0x6acb75=_0x282a10[_0x591ae2(0x21b)](_0x16ef4e=>Number(_0x16ef4e['id'])),_0xa615f5=_0x2d65f5[_0x591ae2(0x1eb)](_0x2c5b81=>_0x2c5b81[_0x591ae2(0x1da)]===!![])[_0x591ae2(0x1d3)],_0x4011e6=menuError(_0x591ae2(0x21f),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x6acb75[_0x591ae2(0x240)](',\x20')+'.',_0x591ae2(0x1d0));throw menuFailure(_0x4011e6,_0x580857[_0x591ae2(0x1cc)],{'stage':_0x591ae2(0x201),'succeeded':_0x2d65f5,'failedRecords':[..._0x4e923a,..._0x282a10],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x591ae2(0x224),..._0x6acb75[_0x591ae2(0x1d3)]===0x1?{'targetId':_0x6acb75[0x0]}:{'targetIds':_0x6acb75},'recoveredCount':_0xa615f5,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x47b7c6=_0x2d65f5['filter'](_0x50eeb8=>_0x50eeb8[_0x591ae2(0x208)]===!![])[_0x591ae2(0x1d3)],_0x38de51=_0x2d65f5['length']-_0x47b7c6,_0x557ff6={..._0x580857[_0x591ae2(0x1cc)],'succeeded':_0x2d65f5,'failed':_0x4e923a,'warnings':_0x4e923a[_0x591ae2(0x1d3)]>0x0?[..._0x580857[_0x591ae2(0x1cc)]['warnings'],_0x591ae2(0x1ef)]:_0x580857[_0x591ae2(0x1cc)][_0x591ae2(0x1e0)],'verification':{'checkedBy':_0x591ae2(0x20a),'snapshotHash':_0x15b441[_0x591ae2(0x1e5)],'matchesRequestedState':_0x4e923a[_0x591ae2(0x1d3)]===0x0,'recoveredCount':_0x493cbf[_0x591ae2(0x1d3)]}};return{'ok':_0x4e923a[_0x591ae2(0x1d3)]===0x0,'data':_0x557ff6,'message':_0x4e923a[_0x591ae2(0x1d3)]===0x0?'Updated\x20visibility\x20for\x20'+_0x47b7c6+_0x591ae2(0x1d9)+_0x38de51+_0x591ae2(0x233):_0x591ae2(0x1de)+_0x47b7c6+'\x20updated,\x20'+_0x38de51+_0x591ae2(0x21c)+_0x4e923a[_0x591ae2(0x1d3)]+'\x20failed.'};}};function parseInput(_0x49a1a7){const _0x2beb10=a134_0x3998c8,_0x503d2d=parseMenuIds(_0x49a1a7[_0x2beb10(0x1ed)](_0x2beb10(0x1f4))),_0x187cb2=parseCsv(_0x49a1a7['str'](_0x2beb10(0x22e)));if(_0x503d2d[_0x2beb10(0x1d3)]===0x0&&_0x187cb2[_0x2beb10(0x1d3)]===0x0)throw CliErrors['validation'](_0x2beb10(0x229));const _0x45c947=parseBooleanFlag(_0x49a1a7,_0x2beb10(0x20e),!![]),_0x479e07=parseBooleanFlag(_0x49a1a7,_0x2beb10(0x223),![]);let _0x3d07ec;if(hasFlag(_0x49a1a7,_0x2beb10(0x1cb))){_0x3d07ec=_0x49a1a7['num'](_0x2beb10(0x1cb));if(!Number[_0x2beb10(0x1e7)](_0x3d07ec)||_0x3d07ec<0x0)throw CliErrors[_0x2beb10(0x23f)](_0x2beb10(0x1e9));}return{'menuIds':_0x503d2d,'paths':_0x187cb2,'visible':_0x45c947,'expectVisible':_0x479e07,'expectedCount':_0x3d07ec};}async function buildPlan(_0x2e09a9,_0x431c78){const _0x145b7c=a134_0x3998c8,_0x3ef22b=parseInput(_0x2e09a9),_0x17b3a0=await fetchMutationSnapshot(_0x2e09a9,_0x145b7c(0x22b)),_0x112ec0=selectTargets(_0x17b3a0['menus'],_0x3ef22b[_0x145b7c(0x216)],_0x3ef22b[_0x145b7c(0x22e)]);if(_0x3ef22b[_0x145b7c(0x1fa)]!==undefined&&_0x112ec0[_0x145b7c(0x1d3)]!==_0x3ef22b['expectedCount'])throw menuError(_0x145b7c(0x210),_0x145b7c(0x220)+_0x112ec0[_0x145b7c(0x1d3)]+_0x145b7c(0x22c)+_0x3ef22b['expectedCount']+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x3ef22b['expectVisible']!==undefined){const _0x2416a0=_0x112ec0[_0x145b7c(0x1eb)](_0x1cfbce=>_0x1cfbce[_0x145b7c(0x20e)]!==_0x3ef22b[_0x145b7c(0x241)]);if(_0x2416a0[_0x145b7c(0x1d3)]>0x0)throw menuError('menu_state_drift',_0x145b7c(0x1db)+_0x2416a0[_0x145b7c(0x21b)](_0x1aeb24=>_0x1aeb24['id'])[_0x145b7c(0x240)](',\x20')+'.',_0x145b7c(0x222));}const _0x30d3ef=_0x112ec0['map'](_0x22ac09=>({'id':_0x22ac09['id'],'label':_0x22ac09[_0x145b7c(0x20b)],'path':_0x22ac09['path'],'before':{'visible':_0x22ac09[_0x145b7c(0x20e)]},'after':{'visible':_0x3ef22b['visible']}})),_0x34f691=_0x30d3ef['filter'](_0x415b35=>_0x415b35[_0x145b7c(0x238)][_0x145b7c(0x20e)]!==_0x3ef22b['visible'])[_0x145b7c(0x21b)](_0x14f1c5=>({'stage':_0x145b7c(0x1f9),'method':_0x145b7c(0x1e4),'path':_0x145b7c(0x203),'body':{'appCode':_0x2e09a9['appCode'],'id':_0x14f1c5['id'],'visible':_0x3ef22b[_0x145b7c(0x20e)]}})),_0x4dfc49=mutationResult({'operation':_0x145b7c(0x1fe),'selector':{'menuIds':_0x3ef22b[_0x145b7c(0x216)],'paths':_0x3ef22b['paths']},'before':{'menus':_0x112ec0['map'](_0x5d1c2f=>({'id':_0x5d1c2f['id'],'path':_0x5d1c2f['path'],'visible':_0x5d1c2f[_0x145b7c(0x20e)]}))},'after':{'menus':_0x112ec0[_0x145b7c(0x21b)](_0x3c34dc=>({'id':_0x3c34dc['id'],'path':_0x3c34dc[_0x145b7c(0x206)],'visible':_0x3ef22b['visible']}))},'dryRun':_0x431c78,'backend':[...BACKEND],'plannedActions':_0x34f691,'snapshotHash':_0x17b3a0[_0x145b7c(0x1e5)],'warnings':_0x34f691[_0x145b7c(0x1d3)]===0x0?[_0x145b7c(0x1cd)]:[]});return{'plan':{..._0x4dfc49,'requestedVisible':_0x3ef22b[_0x145b7c(0x20e)],'targets':_0x30d3ef},'beforeById':new Map(_0x112ec0[_0x145b7c(0x21b)](_0x2c5c37=>[_0x2c5c37['id'],_0x2c5c37]))};}function selectTargets(_0x53f202,_0x310c1b,_0x1fa64f){const _0xc9e161=a134_0x3998c8,_0x2cd6d8=new Map(_0x53f202[_0xc9e161(0x21b)](_0x4654d0=>[_0x4654d0['id'],_0x4654d0])),_0x183464=new Map(),_0x5f9325=_0x310c1b[_0xc9e161(0x1eb)](_0x49468c=>!_0x2cd6d8['has'](_0x49468c));if(_0x5f9325[_0xc9e161(0x1d3)]>0x0)throw menuError(_0xc9e161(0x22d),_0xc9e161(0x1ea)+_0x5f9325[_0xc9e161(0x240)](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x15f9f3 of _0x310c1b){_0x183464[_0xc9e161(0x231)](_0x15f9f3,_0x2cd6d8['get'](_0x15f9f3));}for(const _0x471bcc of _0x1fa64f){const _0x275e4d=_0x53f202[_0xc9e161(0x1eb)](_0x3eebb4=>_0x3eebb4[_0xc9e161(0x206)]===_0x471bcc);if(_0x275e4d['length']===0x0)throw menuError(_0xc9e161(0x22d),_0xc9e161(0x1f0)+JSON[_0xc9e161(0x1f8)](_0x471bcc)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x275e4d['length']>0x1)throw menuError(_0xc9e161(0x1f3),_0xc9e161(0x1ec)+JSON[_0xc9e161(0x1f8)](_0x471bcc)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x275e4d[_0xc9e161(0x21b)](_0x16283c=>_0x16283c['id'])[_0xc9e161(0x240)](',\x20')+'.');const _0x164a9a=_0x275e4d[0x0];_0x183464[_0xc9e161(0x231)](_0x164a9a['id'],_0x164a9a);}return[..._0x183464[_0xc9e161(0x22a)]()];}function parseMenuIds(_0x3a38c9){const _0x11cd85=a134_0x3998c8,_0x1d9467=parseCsv(_0x3a38c9),_0x56cc7f=_0x1d9467[_0x11cd85(0x21b)](Number);if(_0x56cc7f[_0x11cd85(0x1cf)](_0x1643fc=>!Number[_0x11cd85(0x1e7)](_0x1643fc)||_0x1643fc<=0x0))throw CliErrors[_0x11cd85(0x23f)](_0x11cd85(0x1ff));return[...new Set(_0x56cc7f)];}function parseCsv(_0x1d27f0){const _0x49c9f=a134_0x3998c8;return[...new Set(_0x1d27f0[_0x49c9f(0x23d)](',')[_0x49c9f(0x21b)](_0x42e109=>_0x42e109[_0x49c9f(0x1e8)]())[_0x49c9f(0x1eb)](Boolean))];}function parseBooleanFlag(_0x469876,_0x256982,_0x3fd9c9){const _0x3a3c43=a134_0x3998c8;if(!hasFlag(_0x469876,_0x256982)){if(_0x3fd9c9)throw CliErrors[_0x3a3c43(0x1fd)](_0x256982);return undefined;}const _0xe085f2=_0x469876[_0x3a3c43(0x237)][_0x256982];if(_0xe085f2===!![]||_0xe085f2===![])return _0xe085f2;if(_0xe085f2===_0x3a3c43(0x1f1))return!![];if(_0xe085f2===_0x3a3c43(0x1fb))return![];throw CliErrors[_0x3a3c43(0x23f)]('--'+_0x256982+'\x20must\x20be\x20true\x20or\x20false.');}function a134_0x3c4f(_0x460acd,_0x66ba81){_0x460acd=_0x460acd-0x1cb;const _0x22838d=a134_0x2283();let _0x3c4ff0=_0x22838d[_0x460acd];return _0x3c4ff0;}function verifyVisibilityUpdate(_0x1df414,_0x176ae7,_0x4bc0d7){const _0x2f6112=a134_0x3998c8;assertVerified(!!_0x176ae7,'Menu\x20'+_0x1df414['id']+_0x2f6112(0x1f7)),assertVerified(_0x176ae7['visible']===_0x4bc0d7,_0x2f6112(0x1df)+_0x1df414['id']+_0x2f6112(0x1d7));const _0x47caef=[['id',_0x176ae7['id'],_0x1df414['id']],[_0x2f6112(0x202),_0x176ae7[_0x2f6112(0x202)],_0x1df414[_0x2f6112(0x202)]],[_0x2f6112(0x23a),_0x176ae7['depth'],_0x1df414['depth']],[_0x2f6112(0x20b),_0x176ae7['label'],_0x1df414[_0x2f6112(0x20b)]],[_0x2f6112(0x206),_0x176ae7[_0x2f6112(0x206)],_0x1df414['path']],['url',_0x176ae7[_0x2f6112(0x219)],_0x1df414[_0x2f6112(0x219)]],[_0x2f6112(0x21e),_0x176ae7['type'],_0x1df414[_0x2f6112(0x21e)]],[_0x2f6112(0x1d4),_0x176ae7[_0x2f6112(0x1d4)],_0x1df414['sort']],['resources',_0x176ae7[_0x2f6112(0x1d6)],_0x1df414[_0x2f6112(0x1d6)]],['resourcesValid',_0x176ae7[_0x2f6112(0x213)],_0x1df414[_0x2f6112(0x213)]],['childrenIds',_0x176ae7[_0x2f6112(0x225)],_0x1df414[_0x2f6112(0x225)]],[_0x2f6112(0x1dc),_0x176ae7[_0x2f6112(0x1dc)],_0x1df414[_0x2f6112(0x1dc)]],[_0x2f6112(0x22f),_0x176ae7[_0x2f6112(0x22f)],_0x1df414['pageId']],[_0x2f6112(0x212),_0x176ae7[_0x2f6112(0x212)],_0x1df414['pageType']],['modelType',_0x176ae7[_0x2f6112(0x205)],_0x1df414[_0x2f6112(0x205)]],[_0x2f6112(0x23e),_0x176ae7[_0x2f6112(0x23e)],_0x1df414[_0x2f6112(0x23e)]],[_0x2f6112(0x217),_0x176ae7[_0x2f6112(0x217)],_0x1df414['datasetCode']]];for(const [_0x303d68,_0x132e13,_0x96d91f]of _0x47caef){assertVerified(sameValue(_0x132e13,_0x96d91f),_0x2f6112(0x1df)+_0x1df414['id']+'\x20'+_0x303d68+_0x2f6112(0x234));}}function sameValue(_0x19bca3,_0x13854f){const _0xac0663=a134_0x3998c8;if(Array[_0xac0663(0x20f)](_0x19bca3)||Array[_0xac0663(0x20f)](_0x13854f))return JSON[_0xac0663(0x1f8)](_0x19bca3)===JSON[_0xac0663(0x1f8)](_0x13854f);return _0x19bca3===_0x13854f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a135_0x5dd607=a135_0x4113;function a135_0x5203(){const _0xc5215a=['39eJZxox','isSafeInteger','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','notification_config_create_outcome_unknown','30lSRFZO','verification','4235445tINRyp','create','/notification/channel-config/create','229422vCIrpf','configCode','Created\x20notification\x20config\x20','Inspect\x20with\x20','configName','5LRDZkF','319759nRwVkb','3399592daTQyf','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','notification','document','1744848INpDFK',';\x20no\x20automatic\x20retry\x20was\x20attempted.',';\x20do\x20not\x20resubmit\x20automatically.','31058WeoZmo','appCode','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','7fdJJHY','POST','channelType','47982TXFQbZ','endpointUrl','input'];a135_0x5203=function(){return _0xc5215a;};return a135_0x5203();}function a135_0x4113(_0x554fb7,_0x28b909){_0x554fb7=_0x554fb7-0xe6;const _0x5203c6=a135_0x5203();let _0x411318=_0x5203c6[_0x554fb7];return _0x411318;}(function(_0x5c513d,_0x216382){const _0x3c1da2=a135_0x4113,_0x4ec008=_0x5c513d();while(!![]){try{const _0x56cb36=-parseInt(_0x3c1da2(0x105))/0x1+-parseInt(_0x3c1da2(0xf3))/0x2*(-parseInt(_0x3c1da2(0xfc))/0x3)+parseInt(_0x3c1da2(0xf0))/0x4+-parseInt(_0x3c1da2(0xea))/0x5*(parseInt(_0x3c1da2(0xf9))/0x6)+-parseInt(_0x3c1da2(0xf6))/0x7*(-parseInt(_0x3c1da2(0xec))/0x8)+-parseInt(_0x3c1da2(0x102))/0x9+-parseInt(_0x3c1da2(0x100))/0xa*(parseInt(_0x3c1da2(0xeb))/0xb);if(_0x56cb36===_0x216382)break;else _0x4ec008['push'](_0x4ec008['shift']());}catch(_0x1325e1){_0x4ec008['push'](_0x4ec008['shift']());}}}(a135_0x5203,0x4161f));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=a135_0x5dd607(0x104);async function prepareCreate(_0x26f85c){const _0xf3a93b=a135_0x5dd607,_0x25dce0=await readNotificationDocument(_0x26f85c,_0xf3a93b(0x103)),_0x502182=createMutationInput(_0x26f85c[_0xf3a93b(0xf4)],_0x25dce0);return{'document':_0x25dce0,'input':_0x502182,'planned':projectNotificationConfig({'appCode':_0x26f85c[_0xf3a93b(0xf4)],'configName':_0x25dce0['configName'],'channelType':_0x25dce0['channelType'],'endpointUrl':_0x25dce0[_0xf3a93b(0xfa)],'channelConfig':_0x25dce0['channelConfig'],'description':_0x25dce0['description'],'connectTimeout':_0x25dce0['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x25dce0['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a135_0x5dd607(0xee),'command':'config-create','description':a135_0x5dd607(0xed),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x24c335){assertSingleNotificationSource(_0x24c335);},async 'dryRun'(_0x46b125){const _0x3ace90=a135_0x5dd607,_0x12b0ea=await prepareCreate(_0x46b125),_0x5c2ca3=notificationLookupCommand(_0x46b125[_0x3ace90(0xf4)],_0x12b0ea[_0x3ace90(0xef)][_0x3ace90(0xf8)]);return asDryRunResult({'operation':'create','selector':{'appCode':_0x46b125[_0x3ace90(0xf4)],'configName':_0x12b0ea[_0x3ace90(0xef)][_0x3ace90(0xe9)],'channelType':_0x12b0ea[_0x3ace90(0xef)][_0x3ace90(0xf8)]},'before':null,'after':_0x12b0ea['planned'],'dryRun':!![],'backend':{'method':_0x3ace90(0xf7),'path':CREATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x5c2ca3}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x5d1ba){const _0x4375e9=a135_0x5dd607,_0x1d63e6=await prepareCreate(_0x5d1ba),_0x362ace=notificationLookupCommand(_0x5d1ba[_0x4375e9(0xf4)],_0x1d63e6['document']['channelType']);let _0x440229;try{_0x440229=await createNotificationChannelConfig(_0x1d63e6[_0x4375e9(0xfb)]);}catch(_0x55f3dc){if(isPlatformTransportFailure(_0x55f3dc))throw notificationError(_0x4375e9(0xff),_0x4375e9(0xfe),_0x4375e9(0xe8)+_0x362ace+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x4375e9(0x103),'mutation',_0x4375e9(0xe8)+_0x362ace+_0x4375e9(0xf1));}if(!Number[_0x4375e9(0xfd)](_0x440229)||_0x440229<=0x0)throw notificationError(_0x4375e9(0xff),_0x4375e9(0xf5),'Inspect\x20with\x20'+_0x362ace+';\x20do\x20not\x20resubmit.');let _0x21730d;try{const _0x536ead=await getNotificationChannelConfig(_0x440229,_0x5d1ba['appCode']);_0x21730d=normalizeExactNotificationConfig(_0x536ead,_0x440229,_0x5d1ba[_0x4375e9(0xf4)]);}catch{throw safeApiFailure(_0x4375e9(0x103),_0x4375e9(0x101),'Inspect\x20with\x20'+_0x362ace+_0x4375e9(0xf2));}return{'ok':!![],'data':{'operation':_0x4375e9(0x103),'selector':{'appCode':_0x21730d[_0x4375e9(0xf4)],'id':_0x21730d['id'],'configCode':_0x21730d[_0x4375e9(0xe6)],'configName':_0x21730d[_0x4375e9(0xe9)],'channelType':_0x21730d[_0x4375e9(0xf8)]},'before':null,'after':projectNotificationConfig(_0x21730d),'dryRun':![],'backend':{'method':_0x4375e9(0xf7),'path':CREATE_PATH},'warnings':[],'verification':{'status':'verified','lookupCommand':_0x362ace}},'message':_0x4375e9(0xe7)+_0x21730d['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a136_0x1c78(_0xa322f9,_0x55877d){_0xa322f9=_0xa322f9-0x13d;const _0x164527=a136_0x1645();let _0x1c787d=_0x164527[_0xa322f9];return _0x1c787d;}const a136_0x4d60b5=a136_0x1c78;(function(_0x361c56,_0x540a45){const _0x8a3f00=a136_0x1c78,_0x330f18=_0x361c56();while(!![]){try{const _0x212709=parseInt(_0x8a3f00(0x154))/0x1+parseInt(_0x8a3f00(0x158))/0x2*(parseInt(_0x8a3f00(0x13e))/0x3)+parseInt(_0x8a3f00(0x146))/0x4*(-parseInt(_0x8a3f00(0x144))/0x5)+-parseInt(_0x8a3f00(0x14a))/0x6*(-parseInt(_0x8a3f00(0x152))/0x7)+parseInt(_0x8a3f00(0x140))/0x8*(parseInt(_0x8a3f00(0x14b))/0x9)+parseInt(_0x8a3f00(0x15b))/0xa+parseInt(_0x8a3f00(0x145))/0xb*(-parseInt(_0x8a3f00(0x148))/0xc);if(_0x212709===_0x540a45)break;else _0x330f18['push'](_0x330f18['shift']());}catch(_0x3159a3){_0x330f18['push'](_0x330f18['shift']());}}}(a136_0x1645,0x5caf3));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a136_0x1645(){const _0x3fe2f9=['6219470VqQtHO','unshift','verified','Notification\x20config\x20',';\x20do\x20not\x20resubmit\x20automatically.','896652MBotPg','POST','72FLTZBb','\x20remains\x20present\x20after\x20delete.','notification_config_delete_verification_failed','delete','30aAvDAW','739442geeuTs','276272NhYIyo',';\x20no\x20automatic\x20retry\x20was\x20attempted.','180sIQobw','notification_config_delete_verification_unavailable','866676zMTacU','72486gUxRWy','/notification/channel-config/delete','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','notification','\x20delete\x20could\x20not\x20be\x20verified.','channelType','notification_config_delete_outcome_unknown','35QHAPyg','Inspect\x20with\x20','86826NHrSoh','config-delete','some','appCode','2NTqhdd','high-risk-write','before'];a136_0x1645=function(){return _0x3fe2f9;};return a136_0x1645();}import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a136_0x4d60b5(0x14c),REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';async function prepareDelete(_0x4df1b9){const _0x2a0a00=a136_0x4d60b5,_0x3444c9=readNotificationId(_0x4df1b9),_0x373e29=await requireExactNotificationConfig(_0x4df1b9[_0x2a0a00(0x157)],_0x3444c9,'delete');return{'id':_0x3444c9,'before':_0x373e29};}export const notificationConfigDelete={'service':a136_0x4d60b5(0x14e),'command':a136_0x4d60b5(0x155),'description':a136_0x4d60b5(0x14d),'risk':a136_0x4d60b5(0x159),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x2685e2){readNotificationId(_0x2685e2),requireNotificationExplicitYes(_0x2685e2);},async 'dryRun'(_0x334f72){const _0x3e03de=a136_0x4d60b5,_0x2c1305=await prepareDelete(_0x334f72),_0x298221=notificationLookupCommand(_0x334f72[_0x3e03de(0x157)],_0x2c1305[_0x3e03de(0x15a)][_0x3e03de(0x150)]);return asDryRunResult({'operation':_0x3e03de(0x143),'selector':notificationSelector(_0x2c1305[_0x3e03de(0x15a)]),'before':projectNotificationConfig(_0x2c1305[_0x3e03de(0x15a)]),'after':null,'dryRun':!![],'backend':{'method':_0x3e03de(0x13f),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x298221}},{'method':_0x3e03de(0x13f),'url':DELETE_PATH});},async 'execute'(_0x37b5f8){const _0x3b018b=a136_0x4d60b5;requireNotificationExplicitYes(_0x37b5f8);const _0x1c6987=await prepareDelete(_0x37b5f8),_0xabe203=notificationLookupCommand(_0x37b5f8[_0x3b018b(0x157)],_0x1c6987['before']['channelType']);let _0xb99532=![];try{await deleteNotificationChannelConfig(_0x1c6987['id'],_0x37b5f8[_0x3b018b(0x157)]);}catch(_0x45c1b3){if(!isPlatformTransportFailure(_0x45c1b3))throw safeApiFailure(_0x3b018b(0x143),'mutation',_0x3b018b(0x153)+_0xabe203+_0x3b018b(0x147));_0xb99532=!![];}let _0x5f20d3;try{_0x5f20d3=await listNotificationChannelConfigs(_0x37b5f8['appCode'],_0x1c6987[_0x3b018b(0x15a)][_0x3b018b(0x150)]),validateNotificationDeleteReadback(_0x5f20d3,_0x37b5f8['appCode'],_0x1c6987[_0x3b018b(0x15a)]['channelType']);}catch{throw notificationError(_0xb99532?_0x3b018b(0x151):_0x3b018b(0x149),_0x3b018b(0x15e)+_0x1c6987['id']+_0x3b018b(0x14f),'Inspect\x20with\x20'+_0xabe203+_0x3b018b(0x13d));}if(_0x5f20d3[_0x3b018b(0x156)](_0x2c36de=>_0x2c36de['id']===_0x1c6987['id']))throw notificationError(_0xb99532?_0x3b018b(0x151):_0x3b018b(0x142),_0x3b018b(0x15e)+_0x1c6987['id']+_0x3b018b(0x141),_0x3b018b(0x153)+_0xabe203+_0x3b018b(0x13d));const _0x595392=[REFERENCE_WARNING];return _0xb99532&&_0x595392[_0x3b018b(0x15c)]('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0x1c6987[_0x3b018b(0x15a)]),'before':projectNotificationConfig(_0x1c6987['before']),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x595392,'verification':{'status':_0x3b018b(0x15d),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0xb99532,'lookupCommand':_0xabe203}},'message':'Deleted\x20notification\x20config\x20'+_0x1c6987['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a137_0x1c1a7e=a137_0x557e;(function(_0x1afa8f,_0x5007a9){const _0x1f09c2=a137_0x557e,_0x2c6791=_0x1afa8f();while(!![]){try{const _0x4750f9=-parseInt(_0x1f09c2(0x9d))/0x1+-parseInt(_0x1f09c2(0x99))/0x2*(-parseInt(_0x1f09c2(0xa2))/0x3)+-parseInt(_0x1f09c2(0x92))/0x4*(-parseInt(_0x1f09c2(0x90))/0x5)+parseInt(_0x1f09c2(0x95))/0x6*(-parseInt(_0x1f09c2(0x96))/0x7)+-parseInt(_0x1f09c2(0x9f))/0x8+-parseInt(_0x1f09c2(0x9e))/0x9+parseInt(_0x1f09c2(0xa1))/0xa;if(_0x4750f9===_0x5007a9)break;else _0x2c6791['push'](_0x2c6791['shift']());}catch(_0x31e02a){_0x2c6791['push'](_0x2c6791['shift']());}}}(a137_0x514c,0xa35e7));function a137_0x557e(_0x17098f,_0x101939){_0x17098f=_0x17098f-0x8f;const _0x514cef=a137_0x514c();let _0x557e9c=_0x514cef[_0x17098f];return _0x557e9c;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a137_0x514c(){const _0x1ac4d8=['appCode','1564fCADAE','length','string','map','548596cnYjfi','1952748CudYJG','6305816ICULnk','config-list','19359490GHnlkY','102YMQhmT','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','105kFfbOA','Notification\x20channel\x20type','58024tejVFT','type','\x20notification\x20config(s)','24114GbWbxu','77yUvXzb','notification'];a137_0x514c=function(){return _0x1ac4d8;};return a137_0x514c();}export const notificationConfigList={'service':a137_0x1c1a7e(0x97),'command':a137_0x1c1a7e(0xa0),'description':a137_0x1c1a7e(0x8f),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a137_0x1c1a7e(0x93),'type':a137_0x1c1a7e(0x9b),'description':a137_0x1c1a7e(0x91),'enum':NOTIFICATION_CHANNEL_TYPES,'default':'EMAIL'}],async 'validate'(_0x29c0fc){readNotificationChannelType(_0x29c0fc);},async 'execute'(_0x356185){const _0x30e8fb=a137_0x1c1a7e,_0x2ebb17=readNotificationChannelType(_0x356185),_0x32ec19=await listNotificationChannelConfigs(_0x356185[_0x30e8fb(0x98)],_0x2ebb17),_0x3ece79=_0x32ec19[_0x30e8fb(0x9c)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x356185[_0x30e8fb(0x98)],'channelType':_0x2ebb17,'count':_0x3ece79[_0x30e8fb(0x9a)],'configs':_0x3ece79},'message':'Found\x20'+_0x3ece79[_0x30e8fb(0x9a)]+'\x20'+_0x2ebb17+_0x30e8fb(0x94)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a138_0x48f159=a138_0x15f4;function a138_0x4fdd(){const _0x15ae15=['channelType','notification','payload','Notification\x20config\x20','\x20via\x20','config-update','21486KezDCQ','before','POST','Inspect\x20with\x20--id\x20','3027508EvoSMg','update','1265340cDhBBG','Inspect\x20ID\x20','Updated\x20notification\x20config\x20','verified','\x20with\x20','appCode','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','notification_config_update_verification_unavailable','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',';\x20do\x20not\x20resubmit\x20automatically.','134233FluutZ','150TxJUnN','planned','3ffzamG','805sIGZLi',';\x20no\x20automatic\x20retry\x20was\x20attempted.','allMatch','provesChange','patch','notification_config_update_outcome_unknown','24ftHYnD','2561535zWtwEg','717827hjQdUP','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','1220474BnywbC'];a138_0x4fdd=function(){return _0x15ae15;};return a138_0x4fdd();}(function(_0x264ab6,_0x36de9d){const _0x2aae3b=a138_0x15f4,_0x4234b3=_0x264ab6();while(!![]){try{const _0x43fd9b=-parseInt(_0x2aae3b(0xbc))/0x1+-parseInt(_0x2aae3b(0xa5))/0x2+parseInt(_0x2aae3b(0xbf))/0x3*(-parseInt(_0x2aae3b(0xb0))/0x4)+-parseInt(_0x2aae3b(0xb2))/0x5+-parseInt(_0x2aae3b(0xac))/0x6*(-parseInt(_0x2aae3b(0xc0))/0x7)+parseInt(_0x2aae3b(0xa1))/0x8*(parseInt(_0x2aae3b(0xa2))/0x9)+parseInt(_0x2aae3b(0xbd))/0xa*(parseInt(_0x2aae3b(0xa3))/0xb);if(_0x43fd9b===_0x36de9d)break;else _0x4234b3['push'](_0x4234b3['shift']());}catch(_0xc5fc27){_0x4234b3['push'](_0x4234b3['shift']());}}}(a138_0x4fdd,0x77a74));import{asDryRunResult}from'../../commands/common/dry-run.js';function a138_0x15f4(_0x2ca61b,_0x51c5c4){_0x2ca61b=_0x2ca61b-0x9d;const _0x4fdddf=a138_0x4fdd();let _0x15f480=_0x4fdddf[_0x2ca61b];return _0x15f480;}import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH='/notification/channel-config/update';async function prepareUpdate(_0x2123fa){const _0x49537a=a138_0x15f4,_0x5f23cf=readNotificationId(_0x2123fa),_0x3b93b3=await readNotificationDocument(_0x2123fa,_0x49537a(0xb1)),_0x830904=await requireExactNotificationConfig(_0x2123fa['appCode'],_0x5f23cf,_0x49537a(0xb1));return{'id':_0x5f23cf,'patch':_0x3b93b3,'before':_0x830904,'payload':mergeUpdateInput(_0x830904,_0x3b93b3),'planned':plannedUpdateProjection(_0x830904,_0x3b93b3)};}export const notificationConfigUpdate={'service':a138_0x48f159(0xa7),'command':a138_0x48f159(0xab),'description':a138_0x48f159(0xb8),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x1657f4){readNotificationId(_0x1657f4),assertSingleNotificationSource(_0x1657f4),requireNotificationExplicitYes(_0x1657f4);},async 'dryRun'(_0x2bd057){const _0x16c416=a138_0x48f159,_0x6db62b=await prepareUpdate(_0x2bd057),_0x2cd444=notificationLookupCommand(_0x2bd057[_0x16c416(0xb7)],_0x6db62b[_0x16c416(0xad)][_0x16c416(0xa6)]);return asDryRunResult({'operation':_0x16c416(0xb1),'selector':notificationSelector(_0x6db62b['before']),'before':projectNotificationConfig(_0x6db62b[_0x16c416(0xad)]),'after':_0x6db62b['planned'],'dryRun':!![],'backend':{'method':_0x16c416(0xae),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x16c416(0xbe),'lookupCommand':_0x2cd444}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x1a6259){const _0x3451ad=a138_0x48f159;requireNotificationExplicitYes(_0x1a6259);const _0x3cff15=await prepareUpdate(_0x1a6259),_0x448c34=notificationLookupCommand(_0x1a6259[_0x3451ad(0xb7)],_0x3cff15['before']['channelType']);let _0xecd1ab=![];try{await updateNotificationChannelConfig(_0x3cff15[_0x3451ad(0xa8)]);}catch(_0x286cb7){if(!isPlatformTransportFailure(_0x286cb7))throw safeApiFailure(_0x3451ad(0xb1),'mutation',_0x3451ad(0xb3)+_0x3cff15['id']+_0x3451ad(0xb6)+_0x448c34+_0x3451ad(0xc1));_0xecd1ab=!![];}let _0x1a68fa;try{const _0x220f82=await getNotificationChannelConfig(_0x3cff15['id'],_0x1a6259[_0x3451ad(0xb7)]);_0x1a68fa=normalizeExactNotificationConfig(_0x220f82,_0x3cff15['id'],_0x1a6259[_0x3451ad(0xb7)]);}catch{throw notificationError(_0xecd1ab?_0x3451ad(0xa0):_0x3451ad(0xb9),_0x3451ad(0xa9)+_0x3cff15['id']+_0x3451ad(0xba),_0x3451ad(0xaf)+_0x3cff15['id']+_0x3451ad(0xaa)+_0x448c34+';\x20do\x20not\x20resubmit\x20automatically.');}const _0x51bda7=requestedSafeFieldsMatch(_0x3cff15[_0x3451ad(0xad)],_0x1a68fa,_0x3cff15[_0x3451ad(0x9f)]);if(!_0x51bda7[_0x3451ad(0x9d)]||_0xecd1ab&&!_0x51bda7[_0x3451ad(0x9e)])throw notificationError(_0xecd1ab?_0x3451ad(0xa0):'notification_config_update_verification_failed','Notification\x20config\x20'+_0x3cff15['id']+_0x3451ad(0xa4),_0x3451ad(0xaf)+_0x3cff15['id']+_0x3451ad(0xaa)+_0x448c34+_0x3451ad(0xbb));const _0x2b8ecd=_0xecd1ab?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x1a68fa),'before':projectNotificationConfig(_0x3cff15[_0x3451ad(0xad)]),'after':projectNotificationConfig(_0x1a68fa),'dryRun':![],'backend':{'method':_0x3451ad(0xae),'path':UPDATE_PATH},'warnings':_0x2b8ecd,'verification':{'status':_0x3451ad(0xb5),'recoveredAfterUnknownResponse':_0xecd1ab,'verifiedFields':_0x51bda7['verifiedFields'],'lookupCommand':_0x448c34}},'message':_0x3451ad(0xb4)+_0x1a68fa['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a139_0x31fa(_0x58299f,_0x265657){_0x58299f=_0x58299f-0xb2;const _0x5e7938=a139_0x5e79();let _0x31fa75=_0x5e7938[_0x58299f];return _0x31fa75;}(function(_0x3dc81b,_0x2ea1ed){const _0x406856=a139_0x31fa,_0x2dd438=_0x3dc81b();while(!![]){try{const _0x50a2f7=parseInt(_0x406856(0xb2))/0x1+-parseInt(_0x406856(0xbb))/0x2*(-parseInt(_0x406856(0xba))/0x3)+-parseInt(_0x406856(0xb5))/0x4*(parseInt(_0x406856(0xb4))/0x5)+-parseInt(_0x406856(0xb6))/0x6+parseInt(_0x406856(0xb7))/0x7+-parseInt(_0x406856(0xb9))/0x8*(-parseInt(_0x406856(0xb8))/0x9)+-parseInt(_0x406856(0xb3))/0xa;if(_0x50a2f7===_0x2ea1ed)break;else _0x2dd438['push'](_0x2dd438['shift']());}catch(_0x21342d){_0x2dd438['push'](_0x2dd438['shift']());}}}(a139_0x5e79,0x5a9bb));import{notificationConfigList}from'../../commands/notification/config-list.js';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 a139_0x5e79(){const _0x4d90ca=['2080434ISmiCg','2570470NEzBnq','5058aWsXYu','7640kGzkAt','3axiINK','524926uQdlRH','735886IGYvXs','6630450yOUcCC','5JpwAVc','2085416xjmDEy'];a139_0x5e79=function(){return _0x4d90ca;};return a139_0x5e79();}
|