@lovrabet/rabetbase-cli 2.5.0-beta.3 → 2.5.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.d.ts +13 -0
- package/lib/commands/db/table-diff-shared.js +1 -0
- 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.d.ts +1 -7
- 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 +6 -6
- package/skills/rabetbase/guides/database-connection-workflow.md +9 -9
- package/skills/rabetbase/references/rabetbase-config.md +2 -3
- package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
- package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +4 -3
- package/skills/rabetbase/references/rabetbase-db-diff.md +7 -22
- package/skills/rabetbase/references/rabetbase-db-tables.md +14 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x113b9a,_0x45565c){const _0x548faa=a129_0x7e0c,_0x4226e3=_0x113b9a();while(!![]){try{const _0x3c5024=parseInt(_0x548faa(0x20f))/0x1*(-parseInt(_0x548faa(0x1f1))/0x2)+-parseInt(_0x548faa(0x20e))/0x3*(-parseInt(_0x548faa(0x20b))/0x4)+-parseInt(_0x548faa(0x204))/0x5*(parseInt(_0x548faa(0x203))/0x6)+-parseInt(_0x548faa(0x217))/0x7*(parseInt(_0x548faa(0x211))/0x8)+parseInt(_0x548faa(0x218))/0x9+-parseInt(_0x548faa(0x208))/0xa*(-parseInt(_0x548faa(0x1f9))/0xb)+parseInt(_0x548faa(0x216))/0xc;if(_0x3c5024===_0x45565c)break;else _0x4226e3['push'](_0x4226e3['shift']());}catch(_0x48bbf8){_0x4226e3['push'](_0x4226e3['shift']());}}}(a129_0x19d2,0x1b1fa));import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a129_0xd7c9a,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x1b1857,_0x158f1d){const _0x2f3a74=a129_0x7e0c,_0x1353e3=getEnv();logger[_0x2f3a74(0x202)]('get-online-menu-list',isProduction(_0x1353e3)?_0x2f3a74(0x1ff)+_0x1b1857+')':_0x2f3a74(0x206)+_0x1b1857+')');const _0x2d7ff0=await fetchMenuSnapshot(_0x1b1857,_0x158f1d,{'verbose':!![]});return logger[_0x2f3a74(0x202)](_0x2f3a74(0x207),_0x2f3a74(0x212)+_0x2d7ff0[_0x2f3a74(0x214)]+_0x2f3a74(0x20c)),_0x2d7ff0[_0x2f3a74(0x1fb)][_0x2f3a74(0x1f6)](toProcessedMenuItem);}export async function createMenu(_0x26d863,_0xc4ff94,_0x1d2d5f){const _0x45ce2a=a129_0x7e0c;logger['info'](_0x45ce2a(0x205),_0x45ce2a(0x210)+_0x1d2d5f['label']+'\x20('+_0x1d2d5f[_0x45ce2a(0x1f7)]+')');const _0x5edbed={'appCode':_0x26d863,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x45ce2a(0x219),'resources':_0x1d2d5f[_0x45ce2a(0x1fc)]?JSON['stringify'](_0x1d2d5f[_0x45ce2a(0x1fc)]):undefined},..._0x1d2d5f},_0x6fdcba=await createMenuRecord(_0x5edbed,_0xc4ff94,_0x45ce2a(0x1f4)+_0x1d2d5f[_0x45ce2a(0x1f5)]+'\x22');return logger[_0x45ce2a(0x202)]('create-menu',_0x45ce2a(0x1f8)+_0x1d2d5f[_0x45ce2a(0x1f5)]),_0x6fdcba;}async function createSingleMenu(_0xd237ae,_0x5c0981,_0xbd619a,_0x40e4bd){const _0x1bfd4f=a129_0x7e0c,_0x1eadc1={'appCode':_0xd237ae,'type':'procode','sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x40e4bd?JSON[_0x1bfd4f(0x1ef)](_0x40e4bd):undefined},'label':_0xbd619a['label'],'path':_0xbd619a['path']},_0x5dcd01=await createMenuRecord(_0x1eadc1,_0x5c0981,_0x1bfd4f(0x1f4)+_0xbd619a[_0x1bfd4f(0x1f5)]+'\x22');return logger[_0x1bfd4f(0x202)](_0x1bfd4f(0x205),_0x1bfd4f(0x1f8)+_0xbd619a[_0x1bfd4f(0x1f5)]),_0x5dcd01;}function a129_0x7e0c(_0x14887a,_0x5ad889){_0x14887a=_0x14887a-0x1ef;const _0x19d292=a129_0x19d2();let _0x7e0c8c=_0x19d292[_0x14887a];return _0x7e0c8c;}function a129_0x19d2(){const _0x485634=['12916saGOPw','\x20online\x20menus\x20successfully','Delete\x20','147HCKsvl','6212VcSbOK','Creating\x20menu:\x20','8936RhyZJj','Fetched\x20','Menu\x20assets\x20synced:\x20','total','loadScriptMode','402708DPWurs','1211MULzbc','1038438HoTxFf','import','stringify','Regroup\x20','4gOrGld','Update\x20menu\x20assets\x20\x22','all','Create\x20menu\x20\x22','label','map','path','Menu\x20created\x20successfully:\x20','33OzfhTB','extend','menus','resources','\x20menu','create-menus','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','length','Batch\x20menu\x20creation\x20completed,\x20total\x20','info','114mEhGtA','36115OiqieU','create-menu','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','get-online-menu-list','489460AEiclO','update-menu-cdn-url','\x20menu\x20group(s)'];a129_0x19d2=function(){return _0x485634;};return a129_0x19d2();}export async function createMenus(_0x1510fd,_0x123235,_0x22380c,_0x325311){const _0x56b4e5=a129_0x7e0c;logger[_0x56b4e5(0x202)](_0x56b4e5(0x1fe),'Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x22380c[_0x56b4e5(0x200)]);const _0x27f8c8=await Promise[_0x56b4e5(0x1f3)](_0x22380c[_0x56b4e5(0x1f6)](_0x5b50c3=>createSingleMenu(_0x1510fd,_0x123235,_0x5b50c3,_0x325311)));return logger['info'](_0x56b4e5(0x1fe),_0x56b4e5(0x201)+_0x22380c['length']),_0x27f8c8;}export async function updateMenuCdnUrl(_0x2fa695,_0x39e583,_0x19f8d7){const _0x186c43=a129_0x7e0c;logger['info'](_0x186c43(0x209),'Updating\x20menu\x20asset\x20links:\x20'+_0x19f8d7['label']+'\x20('+_0x19f8d7[_0x186c43(0x1f7)]+')');const _0x47ee7e={'id':_0x19f8d7['id'],'appCode':_0x2fa695,'extend':{..._0x19f8d7[_0x186c43(0x1fa)]??{},..._0x19f8d7[_0x186c43(0x215)]?{'loadScriptMode':_0x19f8d7[_0x186c43(0x215)]}:{},'resources':_0x19f8d7[_0x186c43(0x1fc)]?JSON['stringify'](_0x19f8d7[_0x186c43(0x1fc)]):undefined}},_0x36b6d3=await updateMenuRecord(_0x47ee7e,_0x39e583,_0x186c43(0x1f2)+_0x19f8d7[_0x186c43(0x1f5)]+'\x22');return logger[_0x186c43(0x202)]('update-menu-cdn-url',_0x186c43(0x213)+_0x19f8d7[_0x186c43(0x1f5)],undefined),_0x36b6d3;}export async function createMenuEntity(_0x14cc99,_0x22d2f4,_0x4a10bf){const _0x35acff=a129_0x7e0c;return createMenuRecord({'appCode':_0x14cc99,..._0x4a10bf},_0x22d2f4,_0x35acff(0x1f4)+_0x4a10bf[_0x35acff(0x1f5)]+'\x22');}export async function updateMenuEntity(_0x39d23f,_0x446136,_0x20c9c8){return updateMenuRecord({'appCode':_0x39d23f,..._0x20c9c8},_0x446136,'Update\x20menu\x20'+_0x20c9c8['id']);}export async function batchDeleteMenuEntities(_0x825f3f,_0x4c1e77){const _0x2ab10d=a129_0x7e0c;return batchDeleteMenuRecords(_0x4c1e77,_0x825f3f,_0x2ab10d(0x20d)+_0x4c1e77['length']+_0x2ab10d(0x1fd)+(_0x4c1e77[_0x2ab10d(0x200)]===0x1?'':'s'));}export async function startMenuRegroup(_0x581fc3,_0x2f74f4){const _0xb32940=a129_0x7e0c;return a129_0xd7c9a(_0x2f74f4,_0x581fc3,_0xb32940(0x1f0)+_0x2f74f4['menuGroups'][_0xb32940(0x200)]+_0xb32940(0x20a));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a130_0x176b99=a130_0x3e3a;(function(_0x1a2b27,_0x2af987){const _0x255d86=a130_0x3e3a,_0x319822=_0x1a2b27();while(!![]){try{const _0x4c9727=-parseInt(_0x255d86(0xe1))/0x1+-parseInt(_0x255d86(0x100))/0x2+-parseInt(_0x255d86(0xe9))/0x3+parseInt(_0x255d86(0xec))/0x4*(parseInt(_0x255d86(0xe8))/0x5)+parseInt(_0x255d86(0xff))/0x6+parseInt(_0x255d86(0xe5))/0x7*(-parseInt(_0x255d86(0xf9))/0x8)+parseInt(_0x255d86(0xfb))/0x9;if(_0x4c9727===_0x2af987)break;else _0x319822['push'](_0x319822['shift']());}catch(_0x5b3f33){_0x319822['push'](_0x319822['shift']());}}}(a130_0x110d,0xa4c40));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a130_0x110d(){const _0x2f7df9=['2755YRviHt','2853561ihjcYB','JS\x20URL\x20is\x20unreachable:\x20','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','512hjTsce','get','setLogPath','Invalid\x20--params.','--params.','Invalid\x20--params\x20fields:\x20','join','map','string','Invalid\x20--params:\x20','CSS\x20URL\x20is\x20unreachable:\x20','info','message','53008fRGtXQ','Menu\x20sync\x20completed','13315365boFAUd','pages','\x0a\x20\x20Available\x20local\x20paths:\x20','dryRun','6575304eZIKvJ','366342BbonuR','has','Invalid\x20--params\x20JSON.','filter','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','trim','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','menu-sync','object','path','length','jsUrl','405969cXUAZc','push','Start\x20non-interactive\x20menu\x20sync','label','455IaKnhl','cssUrl','field'];a130_0x110d=function(){return _0x2f7df9;};return a130_0x110d();}const MENU_SYNC_PARAM_KEYS=new Set(['jsUrl',a130_0x176b99(0xe6)]);function validateParams(_0x339ac9){const _0x370207=a130_0x176b99,_0x5b5e09=[];return _0x339ac9[_0x370207(0xe0)]&&!isValidJsHttpsUrl(_0x339ac9[_0x370207(0xe0)])&&_0x5b5e09['push']({'field':_0x370207(0xe0),'message':_0x370207(0x106)}),_0x339ac9[_0x370207(0xe6)]&&!isValidCssHttpsUrl(_0x339ac9[_0x370207(0xe6)])&&_0x5b5e09[_0x370207(0xe2)]({'field':_0x370207(0xe6),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x5b5e09;}export async function runMenuSyncCore(_0x3407d0,_0x3eb35f,_0x32fa4c=[],_0xdadbef,_0x214782={}){const _0x4a551c=a130_0x176b99,_0x201e8b=parseMenuSyncParams(_0xdadbef),_0x41ca0d=[...new Set(_0x32fa4c[_0x4a551c(0xf3)](_0x25ef30=>_0x25ef30[_0x4a551c(0x105)]())[_0x4a551c(0x103)](Boolean))],_0x42ef0a=_0x201e8b[_0x4a551c(0xe0)],_0x12d474=_0x201e8b['cssUrl'],_0x4f19f3=[];if(_0x42ef0a)_0x4f19f3['push'](_0x42ef0a);if(_0x12d474)_0x4f19f3[_0x4a551c(0xe2)](_0x12d474);const _0x407736=validateParams(_0x201e8b);if(_0x407736[_0x4a551c(0xdf)]>0x0){const _0x332fb4=_0x407736[_0x4a551c(0xf3)](_0x2837f6=>_0x4a551c(0xf0)+_0x2837f6[_0x4a551c(0xe7)]+':\x20'+_0x2837f6[_0x4a551c(0xf8)])[_0x4a551c(0xf2)](';\x20');throw new Error(_0x4a551c(0xf5)+_0x332fb4);}logger[_0x4a551c(0xee)](process['cwd']()),logger[_0x4a551c(0xf7)]('menu-sync',_0x4a551c(0xe3),{'appCode':_0x3407d0,'selectedCount':_0x41ca0d[_0x4a551c(0xdf)],'jsUrl':_0x42ef0a,'cssUrl':_0x12d474});if(_0x42ef0a){const _0x4ee2c1=await isUrlReachable(_0x42ef0a);if(!_0x4ee2c1)throw new Error(_0x4a551c(0xea)+_0x42ef0a);}if(_0x12d474){const _0x4fd636=await isUrlReachable(_0x12d474);if(!_0x4fd636)throw new Error(_0x4a551c(0xf6)+_0x12d474);}const _0x5d1532=getLocalPages();if(_0x5d1532[_0x4a551c(0xdf)]===0x0){if(_0x41ca0d[_0x4a551c(0xdf)]>0x0)throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x41ca0d[_0x4a551c(0xf2)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x214782['dryRun']===!![],'targetPages':[],'plannedMenus':[]};}const _0x2edcce=await getOnlineMenuList(_0x3407d0,_0x3eb35f),_0x3bdba4=new Set(_0x2edcce[_0x4a551c(0xf3)](_0x2bb8a2=>_0x2bb8a2[_0x4a551c(0xde)]));let _0x439f4b;if(_0x41ca0d['length']>0x0){const _0x19d79b=new Map(_0x5d1532['map'](_0x3ae7ae=>[_0x3ae7ae[_0x4a551c(0xde)],_0x3ae7ae])),_0x51dd6c=_0x41ca0d[_0x4a551c(0x103)](_0x205c9=>!_0x19d79b[_0x4a551c(0x101)](_0x205c9));if(_0x51dd6c['length']>0x0){const _0x15f5e0=_0x5d1532[_0x4a551c(0xf3)](_0x25c1fc=>_0x25c1fc[_0x4a551c(0xde)])[_0x4a551c(0xf2)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x51dd6c[_0x4a551c(0xf2)](',\x20')+_0x4a551c(0xfd)+_0x15f5e0);}const _0x35d896=_0x41ca0d[_0x4a551c(0x103)](_0x432caf=>_0x3bdba4[_0x4a551c(0x101)](_0x432caf));if(_0x35d896[_0x4a551c(0xdf)]>0x0)throw new Error(_0x4a551c(0x104)+_0x35d896[_0x4a551c(0xf2)](',\x20'));_0x439f4b=_0x41ca0d['map'](_0x212aa7=>_0x19d79b[_0x4a551c(0xed)](_0x212aa7));}else _0x439f4b=_0x5d1532[_0x4a551c(0x103)](_0x22e996=>!_0x3bdba4[_0x4a551c(0x101)](_0x22e996[_0x4a551c(0xde)]));if(_0x439f4b[_0x4a551c(0xdf)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x214782[_0x4a551c(0xfe)]===!![],'targetPages':[],'plannedMenus':[]};const _0x4b487a=_0x439f4b[_0x4a551c(0xf3)](_0x984a00=>({'type':'procode','path':_0x984a00[_0x4a551c(0xde)],'label':_0x984a00[_0x4a551c(0xe4)],'loadScriptMode':'import','resources':[..._0x4f19f3]}));if(_0x214782[_0x4a551c(0xfe)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x439f4b,'plannedMenus':_0x4b487a};const _0x3f5b87=await createMenus(_0x3407d0,_0x3eb35f,_0x439f4b,_0x4f19f3[_0x4a551c(0xdf)]>0x0?_0x4f19f3:undefined);return logger[_0x4a551c(0xf7)](_0x4a551c(0x107),_0x4a551c(0xfa),{'count':_0x439f4b[_0x4a551c(0xdf)],'resources':_0x4f19f3}),{'created':_0x3f5b87['length'],'skipped':![],'dryRun':![],'targetPages':_0x439f4b,'plannedMenus':_0x4b487a,'menus':_0x3f5b87};}function a130_0x3e3a(_0x175844,_0x1c7bb1){_0x175844=_0x175844-0xde;const _0x110dae=a130_0x110d();let _0x3e3a=_0x110dae[_0x175844];return _0x3e3a;}export function parseMenuSyncParams(_0x24b595){const _0x386486=a130_0x176b99;if(!_0x24b595||typeof _0x24b595!=='string')return{};let _0x5271dc;try{_0x5271dc=JSON['parse'](_0x24b595);}catch{throw new Error(_0x386486(0x102));}if(typeof _0x5271dc!==_0x386486(0x108)||_0x5271dc===null||Array['isArray'](_0x5271dc))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x3beb87=_0x5271dc;if(Object['hasOwn'](_0x3beb87,_0x386486(0xfc)))throw new Error(_0x386486(0xeb));const _0xd1f62=Object['keys'](_0x3beb87)[_0x386486(0x103)](_0x4f2105=>!MENU_SYNC_PARAM_KEYS['has'](_0x4f2105));if(_0xd1f62[_0x386486(0xdf)]>0x0)throw new Error(_0x386486(0xf1)+_0xd1f62[_0x386486(0xf2)](',\x20')+'.');for(const _0x4ae863 of MENU_SYNC_PARAM_KEYS){const _0x4bc03c=_0x3beb87[_0x4ae863];if(_0x4bc03c!==undefined&&(typeof _0x4bc03c!=='string'||_0x4bc03c[_0x386486(0x105)]()===''))throw new Error(_0x386486(0xef)+_0x4ae863+':\x20expected\x20a\x20non-empty\x20string.');}return{'jsUrl':typeof _0x3beb87['jsUrl']===_0x386486(0xf4)?_0x3beb87[_0x386486(0xe0)][_0x386486(0x105)]():undefined,'cssUrl':typeof _0x3beb87[_0x386486(0xe6)]===_0x386486(0xf4)?_0x3beb87[_0x386486(0xe6)]['trim']():undefined};}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
(function(_0x390624,_0x1df0c){const _0x2f1ba3=a132_0x1548,_0xf7082b=_0x390624();while(!![]){try{const _0x37c777=parseInt(_0x2f1ba3(0x142))/0x1*(parseInt(_0x2f1ba3(0x14e))/0x2)+-parseInt(_0x2f1ba3(0x11f))/0x3*(-parseInt(_0x2f1ba3(0x133))/0x4)+parseInt(_0x2f1ba3(0x11e))/0x5+-parseInt(_0x2f1ba3(0x10d))/0x6*(parseInt(_0x2f1ba3(0x13e))/0x7)+parseInt(_0x2f1ba3(0x13b))/0x8+-parseInt(_0x2f1ba3(0x126))/0x9+-parseInt(_0x2f1ba3(0x14b))/0xa*(-parseInt(_0x2f1ba3(0x11a))/0xb);if(_0x37c777===_0x1df0c)break;else _0xf7082b['push'](_0xf7082b['shift']());}catch(_0x5d4a70){_0xf7082b['push'](_0xf7082b['shift']());}}}(a132_0x4f30,0x282fd));function a132_0x1548(_0x1c1ae9,_0x1099a0){_0x1c1ae9=_0x1c1ae9-0x10d;const _0x4f30d9=a132_0x4f30();let _0x1548ae=_0x4f30d9[_0x1c1ae9];return _0x1548ae;}import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a132_0x4f30(){const _0x39c8a4=['4870RmzJIt','--params.','cwd','8cRdAqQ','18BddmPL','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','paths','patch','selection','.js','filter','setLogPath','Menu\x20asset\x20update\x20completed','dryRun','has','unshift','string','462gxNLvX','Start\x20non-interactive\x20menu\x20asset\x20update','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','label','201895nNXcYZ','32724RWLbof','join','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','some','\x22\x20(','.\x20Allowed\x20values:\x20replace,\x20patch','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','1483695uHZoKi','all','fulfilled','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','value','.css','push','\x20existing\x20JS\x20resources\x20for\x20\x22','map','endsWith','object','status','info','32gobBER','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','menu\x20asset-update\x20cannot\x20patch\x20','length','trim','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','path','cssUrl','1601888nNKmvt','extend','Invalid\x20--mode:\x20','527513dUnggP','loadScriptMode','jsUrl','Invalid\x20--params:\x20','51801TdylGT','split','parse','toLowerCase','field','resources','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','force','menuIds'];a132_0x4f30=function(){return _0x39c8a4;};return a132_0x4f30();}import{logger}from'../../../utils/logger.js';function validateParams(_0xa735eb){const _0x1f6aff=a132_0x1548,_0x59d44f=[];return _0xa735eb[_0x1f6aff(0x140)]&&!isValidJsHttpsUrl(_0xa735eb[_0x1f6aff(0x140)])&&_0x59d44f[_0x1f6aff(0x12c)]({'field':_0x1f6aff(0x140),'message':_0x1f6aff(0x10e)}),_0xa735eb[_0x1f6aff(0x13a)]&&!isValidCssHttpsUrl(_0xa735eb['cssUrl'])&&_0x59d44f[_0x1f6aff(0x12c)]({'field':_0x1f6aff(0x13a),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x59d44f;}export async function runMenuUpdateCore(_0x391edc,_0x2636bf,_0x549836,_0x1428bb={}){const _0x25a939=a132_0x1548,_0x1212ff=parseUpdateParamsFlag(_0x549836),_0x2ace98=normalizeMode(_0x1428bb['mode']);validateSelection(_0x1428bb[_0x25a939(0x111)]);const _0x536a78=[];if(_0x1212ff['jsUrl'])_0x536a78[_0x25a939(0x12c)](_0x1212ff[_0x25a939(0x140)]);if(_0x1212ff['cssUrl'])_0x536a78[_0x25a939(0x12c)](_0x1212ff['cssUrl']);const _0x448108=validateParams(_0x1212ff);if(_0x448108[_0x25a939(0x136)]>0x0){const _0xe51ac0=_0x448108['map'](_0x524ae7=>_0x25a939(0x14c)+_0x524ae7[_0x25a939(0x146)]+':\x20'+_0x524ae7['message'])['join'](';\x20');throw new Error(_0x25a939(0x141)+_0xe51ac0);}if(_0x536a78[_0x25a939(0x136)]===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x25a939(0x114)](process[_0x25a939(0x14d)]()),logger[_0x25a939(0x132)]('menu-asset-update',_0x25a939(0x11b),{'appCode':_0x391edc,'jsUrl':_0x1212ff['jsUrl'],'cssUrl':_0x1212ff[_0x25a939(0x13a)],'mode':_0x2ace98,'dryRun':_0x1428bb[_0x25a939(0x116)]===!![]});if(_0x1212ff[_0x25a939(0x140)]){const _0x1c4245=await isUrlReachable(_0x1212ff['jsUrl']);if(!_0x1c4245)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x1212ff[_0x25a939(0x140)]);}if(_0x1212ff['cssUrl']){const _0x37422d=await isUrlReachable(_0x1212ff[_0x25a939(0x13a)]);if(!_0x37422d)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x1212ff[_0x25a939(0x13a)]);}const _0x90eaf=await getOnlineMenuList(_0x391edc,_0x2636bf),_0x3705b6=_0x90eaf[_0x25a939(0x113)](_0x3c19d2=>_0x3c19d2[_0x25a939(0x147)]['length']>0x0),_0xdfb61c=selectMenusForUpdate(_0x3705b6,_0x1428bb['selection']);if(_0xdfb61c[_0x25a939(0x136)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x1428bb[_0x25a939(0x116)]===!![]};const _0x5ed0ac=_0xdfb61c[_0x25a939(0x12e)](_0x3a3fe9=>buildMenuUpdateDiff(_0x3a3fe9,_0x1212ff,_0x2ace98,_0x1428bb[_0x25a939(0x149)]===!![],_0x1428bb[_0x25a939(0x13f)]));if(_0x1428bb['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x5ed0ac};const _0x40cfd1=await Promise['allSettled'](_0xdfb61c[_0x25a939(0x12e)]((_0x123ae6,_0xa42dfb)=>updateMenuCdnUrl(_0x391edc,_0x2636bf,{'id':_0x123ae6['id'],'label':_0x123ae6['label'],'path':_0x123ae6['path'],'resources':_0x5ed0ac[_0xa42dfb]['after'][_0x25a939(0x147)],'extend':_0x123ae6[_0x25a939(0x13c)]??null,'loadScriptMode':_0x1428bb[_0x25a939(0x13f)]}))),_0xfa752c=_0x40cfd1[_0x25a939(0x113)](_0xbf45a6=>_0xbf45a6[_0x25a939(0x131)]===_0x25a939(0x128))['map'](_0x28cf65=>_0x28cf65[_0x25a939(0x12a)]),_0x3da1ea=_0x40cfd1[_0x25a939(0x113)](_0x1acf07=>_0x1acf07[_0x25a939(0x131)]==='rejected')[_0x25a939(0x136)];return logger[_0x25a939(0x132)]('menu-asset-update',_0x25a939(0x115),{'count':_0xdfb61c[_0x25a939(0x136)],'resources':_0x536a78}),{'updated':_0xfa752c[_0x25a939(0x136)],'failed':_0x3da1ea,'skipped':![],'menus':_0xfa752c};}function validateSelection(_0x15d4ba){const _0x473e44=a132_0x1548;if(!_0x15d4ba)throw new Error(_0x473e44(0x11c));if(_0x15d4ba[_0x473e44(0x127)]&&(_0x15d4ba[_0x473e44(0x14a)][_0x473e44(0x136)]>0x0||_0x15d4ba[_0x473e44(0x10f)][_0x473e44(0x136)]>0x0))throw new Error(_0x473e44(0x129));if(!_0x15d4ba[_0x473e44(0x127)]&&_0x15d4ba[_0x473e44(0x14a)]['length']===0x0&&_0x15d4ba[_0x473e44(0x10f)]['length']===0x0)throw new Error(_0x473e44(0x11c));}export function selectMenusForUpdate(_0x3f4f10,_0x5098a5){const _0x5d4129=a132_0x1548;validateSelection(_0x5098a5);if(_0x5098a5[_0x5d4129(0x127)])return _0x3f4f10;const _0x3a54f3=new Set(_0x3f4f10['map'](_0x1fc882=>_0x1fc882['id'])),_0xe91fdd=new Set(_0x3f4f10[_0x5d4129(0x12e)](_0x2562a2=>_0x2562a2[_0x5d4129(0x139)])),_0x214527=_0x5098a5[_0x5d4129(0x14a)][_0x5d4129(0x113)](_0x7fb8ec=>!_0x3a54f3[_0x5d4129(0x117)](_0x7fb8ec)),_0x5fba7a=_0x5098a5['paths']['filter'](_0x5774ef=>!_0xe91fdd['has'](_0x5774ef));if(_0x214527[_0x5d4129(0x136)]>0x0||_0x5fba7a['length']>0x0){const _0x5b3f6c=[..._0x214527['map'](_0x3af4d7=>String(_0x3af4d7)),..._0x5fba7a][_0x5d4129(0x120)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x5b3f6c);}const _0x255772=new Set(_0x5098a5['menuIds']),_0x3372c3=new Set(_0x5098a5['paths']);return _0x3f4f10[_0x5d4129(0x113)](_0x445756=>_0x255772[_0x5d4129(0x117)](_0x445756['id'])||_0x3372c3[_0x5d4129(0x117)](_0x445756[_0x5d4129(0x139)]));}function normalizeMode(_0x13de72){const _0x372dff=a132_0x1548;if(!_0x13de72)return'patch';if(_0x13de72==='replace'||_0x13de72===_0x372dff(0x110))return _0x13de72;throw new Error(_0x372dff(0x13d)+_0x13de72+_0x372dff(0x124));}function buildMenuUpdateDiff(_0x51c0b1,_0x3b6d85,_0x3fc417,_0x462d7b,_0x5b9762){const _0x3df686=a132_0x1548,_0x1155ea=[..._0x51c0b1['resources']];_0x3fc417==='patch'&&assertUnambiguousPatchResources(_0x51c0b1,_0x1155ea,_0x3b6d85);const _0xf449af=_0x3fc417===_0x3df686(0x110)?patchResources(_0x1155ea,_0x3b6d85):replaceResources(_0x3b6d85),_0x2dd690=[],_0x5c1cae=_0x1155ea[_0x3df686(0x122)](isJsResource),_0xebea2d=_0xf449af['some'](isJsResource);if(_0x5c1cae&&!_0xebea2d){const _0xf804fe=_0x3df686(0x125)+_0x51c0b1[_0x3df686(0x11d)]+_0x3df686(0x123)+_0x51c0b1[_0x3df686(0x139)]+').\x20'+_0x3df686(0x121);if(!_0x462d7b)throw new Error(_0xf804fe);_0x2dd690[_0x3df686(0x12c)](_0xf804fe);}const _0x3bce68=_0x1155ea[_0x3df686(0x122)](isCssResource),_0x247a71=_0xf449af['some'](isCssResource);_0x3bce68&&!_0x247a71&&_0x2dd690[_0x3df686(0x12c)](_0x3df686(0x134)+_0x51c0b1['label']+_0x3df686(0x123)+_0x51c0b1['path']+').');const _0x2f1eeb=typeof _0x51c0b1['extend']?.[_0x3df686(0x13f)]===_0x3df686(0x119)?_0x51c0b1[_0x3df686(0x13c)][_0x3df686(0x13f)]:null,_0x19785e=_0x5b9762?{'loadScriptMode':_0x2f1eeb}:{},_0x4f1c05=_0x5b9762?{'loadScriptMode':_0x5b9762}:{};return{'id':_0x51c0b1['id'],'label':_0x51c0b1[_0x3df686(0x11d)],'path':_0x51c0b1[_0x3df686(0x139)],'mode':_0x3fc417,'before':{'resources':_0x1155ea,..._0x19785e},'after':{'resources':_0xf449af,..._0x4f1c05},'warnings':_0x2dd690};}function replaceResources(_0x38259f){const _0x30a97f=a132_0x1548;return[_0x38259f[_0x30a97f(0x140)],_0x38259f['cssUrl']]['filter'](_0x59ac44=>!!_0x59ac44);}function assertUnambiguousPatchResources(_0x56a8a8,_0x27044c,_0x3db5a6){const _0x3bf1d8=a132_0x1548,_0x1b48b3=_0x27044c['filter'](isJsResource)[_0x3bf1d8(0x136)];if(_0x3db5a6['jsUrl']&&_0x1b48b3>0x1)throw new Error(_0x3bf1d8(0x135)+_0x1b48b3+_0x3bf1d8(0x12d)+_0x56a8a8[_0x3bf1d8(0x11d)]+_0x3bf1d8(0x123)+_0x56a8a8['path']+')\x20'+_0x3bf1d8(0x148));const _0x5f380e=_0x27044c[_0x3bf1d8(0x113)](isCssResource)[_0x3bf1d8(0x136)];if(_0x3db5a6[_0x3bf1d8(0x13a)]&&_0x5f380e>0x1)throw new Error(_0x3bf1d8(0x135)+_0x5f380e+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x56a8a8[_0x3bf1d8(0x11d)]+_0x3bf1d8(0x123)+_0x56a8a8[_0x3bf1d8(0x139)]+')\x20'+_0x3bf1d8(0x138));}function patchResources(_0x15dff1,_0x258521){const _0x2bb738=a132_0x1548;let _0x2eaec2=![],_0x1af335=![];const _0x3feaec=[];for(const _0x11f171 of _0x15dff1){if(isJsResource(_0x11f171)){if(_0x258521[_0x2bb738(0x140)]&&!_0x2eaec2)_0x3feaec[_0x2bb738(0x12c)](_0x258521['jsUrl']),_0x2eaec2=!![];else!_0x258521['jsUrl']&&_0x3feaec[_0x2bb738(0x12c)](_0x11f171);continue;}if(isCssResource(_0x11f171)){if(_0x258521[_0x2bb738(0x13a)]&&!_0x1af335)_0x3feaec[_0x2bb738(0x12c)](_0x258521['cssUrl']),_0x1af335=!![];else!_0x258521['cssUrl']&&_0x3feaec[_0x2bb738(0x12c)](_0x11f171);continue;}_0x3feaec['push'](_0x11f171);}return _0x258521['jsUrl']&&!_0x2eaec2&&_0x3feaec[_0x2bb738(0x118)](_0x258521['jsUrl']),_0x258521[_0x2bb738(0x13a)]&&!_0x1af335&&_0x3feaec[_0x2bb738(0x12c)](_0x258521[_0x2bb738(0x13a)]),_0x3feaec;}function isJsResource(_0x59bbfe){const _0x58f1e3=a132_0x1548;return stripQuery(_0x59bbfe)[_0x58f1e3(0x145)]()[_0x58f1e3(0x12f)](_0x58f1e3(0x112));}function isCssResource(_0x697d76){const _0xbdd7b0=a132_0x1548;return stripQuery(_0x697d76)['toLowerCase']()[_0xbdd7b0(0x12f)](_0xbdd7b0(0x12b));}function stripQuery(_0x1151d1){const _0x5c14e7=a132_0x1548;return _0x1151d1[_0x5c14e7(0x143)]('?')[0x0]??_0x1151d1;}function parseUpdateParamsFlag(_0x5b0242){const _0x4fafc9=a132_0x1548;if(!_0x5b0242||typeof _0x5b0242!=='string')return{};try{const _0x86c37c=JSON[_0x4fafc9(0x144)](_0x5b0242);if(typeof _0x86c37c!==_0x4fafc9(0x130)||_0x86c37c===null||Array['isArray'](_0x86c37c))return{};return{'jsUrl':typeof _0x86c37c[_0x4fafc9(0x140)]===_0x4fafc9(0x119)?_0x86c37c[_0x4fafc9(0x140)][_0x4fafc9(0x137)]():undefined,'cssUrl':typeof _0x86c37c['cssUrl']===_0x4fafc9(0x119)?_0x86c37c[_0x4fafc9(0x13a)]['trim']():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d7b24,_0x2afc56){const _0x36d071=a133_0x497e,_0x255413=_0x3d7b24();while(!![]){try{const _0x39c8c0=-parseInt(_0x36d071(0x1b0))/0x1*(-parseInt(_0x36d071(0x1b6))/0x2)+-parseInt(_0x36d071(0x1ab))/0x3*(parseInt(_0x36d071(0x1b1))/0x4)+parseInt(_0x36d071(0x1b7))/0x5+-parseInt(_0x36d071(0x1af))/0x6+parseInt(_0x36d071(0x1ac))/0x7+parseInt(_0x36d071(0x1ad))/0x8*(-parseInt(_0x36d071(0x1b3))/0x9)+parseInt(_0x36d071(0x1ae))/0xa*(parseInt(_0x36d071(0x1b2))/0xb);if(_0x39c8c0===_0x2afc56)break;else _0x255413['push'](_0x255413['shift']());}catch(_0x149302){_0x255413['push'](_0x255413['shift']());}}}(a133_0x157f,0x61de4));function a133_0x157f(){const _0x17041e=['42650COTzzr','1508675cFedng','21tOTnFE','1130437tRTaIs','10288jujhok','10BSSiAz','851742vNTuic','7vixSsH','256492qRrrkw','5217839zidRJG','666EMzPpU','HEAD','test'];a133_0x157f=function(){return _0x17041e;};return a133_0x157f();}export function isValidJsHttpsUrl(_0x52b997){const _0x4bbe03=a133_0x497e;return/^https:\/\/.+\.js(\?.*)?$/[_0x4bbe03(0x1b5)](_0x52b997['trim']());}function a133_0x497e(_0x13731d,_0x4f1c78){_0x13731d=_0x13731d-0x1ab;const _0x157f3e=a133_0x157f();let _0x497e0c=_0x157f3e[_0x13731d];return _0x497e0c;}export function isValidCssHttpsUrl(_0x1bad2a){const _0xbd7bf0=a133_0x497e;return/^https:\/\/.+\.css(\?.*)?$/[_0xbd7bf0(0x1b5)](_0x1bad2a['trim']());}export async function isUrlReachable(_0x1f8e63){const _0x53bfb4=a133_0x497e;try{const _0x3dcce4=await fetch(_0x1f8e63,{'method':_0x53bfb4(0x1b4)});return _0x3dcce4['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a134_0x26451e=a134_0x3018;(function(_0x17fbf3,_0x380528){const _0x5373a8=a134_0x3018,_0x1c643f=_0x17fbf3();while(!![]){try{const _0x3d084e=-parseInt(_0x5373a8(0x80))/0x1*(-parseInt(_0x5373a8(0xa9))/0x2)+-parseInt(_0x5373a8(0x7d))/0x3*(parseInt(_0x5373a8(0x8e))/0x4)+parseInt(_0x5373a8(0xaa))/0x5+parseInt(_0x5373a8(0xb4))/0x6*(-parseInt(_0x5373a8(0xb7))/0x7)+parseInt(_0x5373a8(0xa8))/0x8+parseInt(_0x5373a8(0xba))/0x9+-parseInt(_0x5373a8(0x7a))/0xa;if(_0x3d084e===_0x380528)break;else _0x1c643f['push'](_0x1c643f['shift']());}catch(_0x540225){_0x1c643f['push'](_0x1c643f['shift']());}}}(a134_0x4d53,0x421c8));import a134_0x485593 from'chalk';function a134_0x3018(_0x3e4240,_0x2c180e){_0x3e4240=_0x3e4240-0x70;const _0x4d537b=a134_0x4d53();let _0x3018a7=_0x4d537b[_0x3e4240];return _0x3018a7;}import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';function a134_0x4d53(){const _0x5da74e=['targetPages','message','\x20\x20✓\x20Selected:\x20','skipped','\x20menu(s)\x20with\x20JS:\x20','size','\x20created,\x20','Pre-fill\x20JS/CSS\x20URLs.\x20','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','paths','3677150axCRCF','created','yellow','3aIwDUh','onlineMenuList','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','490109hBYyub','\x20failed.','cookie','✓\x20Menu\x20sync\x20completed:\x20','menu','appCode','\x20\x20Cancelled.','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','str','length','Failed\x20to\x20fetch\x20online\x20menu\x20list','Menu\x20sync\x20completed:\x20','rawFlags','localPages','908016ndqaTZ','string','cssUrl','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','Fetching\x20online\x20menu\x20list...','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','Online\x20menu\x20list\x20fetched','params','Menu\x20sync\x20skipped','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','flag','trim','\x20and\x20CSS:\x20','failed','\x20menu(s)...','appcode','\x20page(s)','split','POST','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','sync','\x20\x20Create\x20','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','3499896TLhxXA','2FFPSUq','183295MCQDyJ','filter','yes','boolean','map','/smartapi/menu/create','selectedAppName','\x20local\x20microfrontend\x20menu(s).','Would\x20create\x20','Created\x20','2469954OGixFb','onlinePaths','jsUrl','7mugzcY','gray','validation','2816235YreJdi'];a134_0x4d53=function(){return _0x5da74e;};return a134_0x4d53();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a134_0x26451e(0x84),'command':a134_0x26451e(0xa2),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':'write','flags':[{'name':a134_0x26451e(0x95),'type':a134_0x26451e(0x8f),'description':a134_0x26451e(0x77)+a134_0x26451e(0xa5)},{'name':a134_0x26451e(0x79),'type':'string','description':a134_0x26451e(0x87)},{'name':a134_0x26451e(0xac),'type':a134_0x26451e(0xad),'description':a134_0x26451e(0xa7)}],async 'dryRun'(_0x363e89){const _0x46e5aa=a134_0x26451e;ensureRunnableContext(_0x363e89[_0x46e5aa(0x8c)],_0x363e89['selectedAppName']);const _0x241739=await runMenuSyncCore(_0x363e89['appCode'],_0x363e89[_0x46e5aa(0x82)],parsePaths(_0x363e89[_0x46e5aa(0x88)](_0x46e5aa(0x79))),_0x363e89['str']('params'),{'dryRun':!![]});return{'method':_0x46e5aa(0xa0),'url':_0x46e5aa(0xaf),'body':_0x241739,'description':_0x241739['skipped']?_0x46e5aa(0x7f):_0x46e5aa(0xb2)+_0x241739[_0x46e5aa(0x70)]['length']+_0x46e5aa(0xb1)};},async 'execute'(_0x4a1409){const _0x4db92d=a134_0x26451e;ensureRunnableContext(_0x4a1409[_0x4db92d(0x8c)],_0x4a1409[_0x4db92d(0xb0)]);const _0x18bcae=_0x4a1409[_0x4db92d(0x98)]('yes'),_0x598314=_0x4a1409[_0x4db92d(0x88)](_0x4db92d(0x95)),_0xedce36=parsePaths(_0x4a1409['str']('paths')),_0x161331=parseMenuSyncParams(_0x598314);if(_0x18bcae){const _0x5f2d73=await runMenuSyncCore(_0x4a1409['appCode'],_0x4a1409[_0x4db92d(0x82)],_0xedce36,_0x598314);if(_0x5f2d73[_0x4db92d(0x73)]){const _0x4a7524=getLocalPages();_0x4a7524[_0x4db92d(0x89)]===0x0?writeCliSideChannelLine(_0x4db92d(0x97)):writeCliSideChannelLine(_0x4db92d(0x78));}else writeCliSideChannelLine(_0x4db92d(0x83)+_0x5f2d73['created']+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x5f2d73,'message':_0x5f2d73[_0x4db92d(0x73)]?_0x4db92d(0x96):_0x4db92d(0x8b)+_0x5f2d73[_0x4db92d(0x7b)]+'\x20created.'};}if(_0xedce36[_0x4db92d(0x89)]>0x0)throw CliErrors['validation'](_0x4db92d(0xa4),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x598314)throw CliErrors['validation'](_0x4db92d(0xa1),_0x4db92d(0x93));requireInteractive();const _0x241728=startSpinner(_0x4db92d(0x92));let _0x3bd21d,_0x17e2dd,_0x18828d;try{const _0x391d77=await fetchMenuData(_0x4a1409[_0x4db92d(0x85)],_0x4a1409[_0x4db92d(0x82)]);_0x3bd21d=_0x391d77[_0x4db92d(0x8d)],_0x17e2dd=_0x391d77[_0x4db92d(0xb5)],_0x18828d=_0x391d77[_0x4db92d(0x7e)],stopSpinner(_0x241728,_0x4db92d(0x94),!![]);}catch(_0x599789){stopSpinner(_0x241728,_0x4db92d(0x8a),![]);throw CliErrors[_0x4db92d(0xb9)](_0x599789 instanceof Error?_0x599789[_0x4db92d(0x71)]:_0x4db92d(0x8a));}if(_0x3bd21d[_0x4db92d(0x89)]===0x0)return writeCliSideChannelLine(a134_0x485593[_0x4db92d(0x7c)](_0x4db92d(0x91))),{'ok':!![]};const _0x2d9cc8=buildCompareRows(_0x3bd21d,_0x17e2dd);writeCliSideChannelLine(renderCompareTable(_0x2d9cc8)),writeCliSideChannelLine('');const _0x2f51b6=await selectPages(_0x3bd21d,_0x17e2dd);writeCliSideChannelLine(''),writeCliSideChannelLine(a134_0x485593['cyan'](_0x4db92d(0x72)+_0x2f51b6[_0x4db92d(0x89)]+_0x4db92d(0x9e)));const _0x396909=_0x161331[_0x4db92d(0xb6)]&&_0x161331[_0x4db92d(0x90)];if(!_0x396909){writeCliSideChannelLine(renderSyncSummary(_0x2f51b6,_0x17e2dd[_0x4db92d(0x75)]>0x0));const _0x293225=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x293225)return writeCliSideChannelLine(a134_0x485593[_0x4db92d(0xb8)](_0x4db92d(0x86))),{'ok':!![]};}let _0x1692b6=_0x161331[_0x4db92d(0xb6)],_0x151ead=_0x161331[_0x4db92d(0x90)];!_0x1692b6&&(_0x1692b6=await askJsUrl());!_0x151ead&&(_0x151ead=await askCssUrl());const _0x4c4512=await askConfirm(_0x4db92d(0xa3)+_0x2f51b6['length']+_0x4db92d(0x74)+_0x1692b6+_0x4db92d(0x9a)+_0x151ead+'?');if(!_0x4c4512)return writeCliSideChannelLine(a134_0x485593[_0x4db92d(0xb8)](_0x4db92d(0x86))),{'ok':!![]};const _0xc5cc3b=[_0x1692b6,_0x151ead],_0x246497=startSpinner('Creating\x20'+_0x2f51b6[_0x4db92d(0x89)]+_0x4db92d(0x9c));try{const _0x5ab047=await doCreateMenus(_0x4a1409['appCode'],_0x4a1409[_0x4db92d(0x82)],_0x2f51b6,_0xc5cc3b);return stopSpinner(_0x246497,_0x4db92d(0xb3)+_0x5ab047['created']+'\x20menu(s)',!![]),{'ok':!![],'data':_0x5ab047,'message':_0x4db92d(0x8b)+_0x5ab047[_0x4db92d(0x7b)]+_0x4db92d(0x76)+_0x5ab047[_0x4db92d(0x9b)]+_0x4db92d(0x81)};}catch(_0x16f03a){stopSpinner(_0x246497,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x4db92d(0xb9)](_0x16f03a instanceof Error?_0x16f03a[_0x4db92d(0x71)]:'Menu\x20creation\x20failed');}}};function ensureRunnableContext(_0x3ca59b,_0x597c7d){const _0x357718=a134_0x26451e,_0x31f327=_0x3ca59b[_0x357718(0x9d)]?String(_0x3ca59b[_0x357718(0x9d)])[_0x357718(0x99)]():'';if(!isInProject()&&!_0x597c7d&&!_0x31f327)throw CliErrors[_0x357718(0xb9)](_0x357718(0xa6)+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x5dabb2){const _0x5ca266=a134_0x26451e;return[...new Set(_0x5dabb2[_0x5ca266(0x9f)](',')[_0x5ca266(0xae)](_0x1b5dab=>_0x1b5dab[_0x5ca266(0x99)]())[_0x5ca266(0xab)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a135_0x342536=a135_0x5192;(function(_0xade0c2,_0x1a5754){const _0x11d1c3=a135_0x5192,_0x4d7488=_0xade0c2();while(!![]){try{const _0x2b7d55=-parseInt(_0x11d1c3(0x202))/0x1+-parseInt(_0x11d1c3(0x240))/0x2+-parseInt(_0x11d1c3(0x210))/0x3+parseInt(_0x11d1c3(0x23a))/0x4+parseInt(_0x11d1c3(0x1d3))/0x5*(-parseInt(_0x11d1c3(0x1ef))/0x6)+-parseInt(_0x11d1c3(0x1f2))/0x7+parseInt(_0x11d1c3(0x1e5))/0x8;if(_0x2b7d55===_0x1a5754)break;else _0x4d7488['push'](_0x4d7488['shift']());}catch(_0x3b6194){_0x4d7488['push'](_0x4d7488['shift']());}}}(a135_0x2703,0xc8745));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';function a135_0x5192(_0x4f0fbf,_0x386f5e){_0x4f0fbf=_0x4f0fbf-0x1cf;const _0x2703d2=a135_0x2703();let _0x519264=_0x2703d2[_0x4f0fbf];return _0x519264;}import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a135_0x342536(0x1f5)}];export const menuVisibilityUpdate={'service':a135_0x342536(0x200),'command':a135_0x342536(0x1f1),'description':a135_0x342536(0x21c),'risk':a135_0x342536(0x209),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':a135_0x342536(0x1d9),'description':a135_0x342536(0x235)},{'name':a135_0x342536(0x211),'type':a135_0x342536(0x1d9),'description':a135_0x342536(0x1ea)},{'name':a135_0x342536(0x225),'type':a135_0x342536(0x1ff),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a135_0x342536(0x223),'type':a135_0x342536(0x1ff),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a135_0x342536(0x222),'type':'number','description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5f4acb){parseInput(_0x5f4acb),requireExplicitYes(_0x5f4acb);},async 'dryRun'(_0x89908e){const _0x1a30d5=a135_0x342536,_0x5c403d=await buildPlan(_0x89908e,!![]),_0x183f21=_0x5c403d[_0x1a30d5(0x230)][_0x1a30d5(0x20f)]?.[_0x1a30d5(0x1de)]??0x0,_0x2d98d5=_0x5c403d[_0x1a30d5(0x230)][_0x1a30d5(0x23b)]['length']-_0x183f21;return menuDryRunResult(_0x5c403d[_0x1a30d5(0x230)],{'method':_0x1a30d5(0x1d5),'url':_0x1a30d5(0x1f5),'body':{'updates':_0x5c403d[_0x1a30d5(0x230)][_0x1a30d5(0x20f)]?.[_0x1a30d5(0x219)](_0x24b8bb=>_0x24b8bb['body'])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x183f21+'\x20menu(s);\x20skip\x20'+_0x2d98d5+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x9cec2b){const _0xdead29=a135_0x342536;requireExplicitYes(_0x9cec2b);const _0x3c3625=await buildPlan(_0x9cec2b,![]);await recheckMutationSnapshot(_0x9cec2b,_0x3c3625['plan'],_0xdead29(0x232));const _0x41a6ae=[],_0x22822e=[],_0x4732f1=[];for(const _0x474f1a of _0x3c3625['plan']['targets']){if(_0x474f1a[_0xdead29(0x208)][_0xdead29(0x225)]===_0x3c3625[_0xdead29(0x230)][_0xdead29(0x215)]){_0x41a6ae[_0xdead29(0x20b)]({'id':_0x474f1a['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x9cec2b[_0xdead29(0x227)],_0x9cec2b[_0xdead29(0x1fb)],{'id':_0x474f1a['id'],'visible':_0x3c3625[_0xdead29(0x230)][_0xdead29(0x215)]}),_0x41a6ae[_0xdead29(0x20b)]({'id':_0x474f1a['id'],'updated':!![],'skipped':![]});}catch(_0x2de758){const _0x2ce631=mapMenuApiError(_0x2de758,_0xdead29(0x1d1),_0x474f1a['id']);if(isMenuResponseLoss(_0x2de758)&&_0x2ce631[_0xdead29(0x23d)]!==_0xdead29(0x1fd)){_0x4732f1['push'](_0x474f1a['id']);continue;}_0x22822e[_0xdead29(0x20b)]({'id':_0x474f1a['id'],'stage':'update','code':_0x2ce631[_0xdead29(0x23d)],'message':_0x2ce631[_0xdead29(0x1e4)]});}}let _0x5cef3b;try{_0x5cef3b=await fetchMenuSnapshot(_0x9cec2b[_0xdead29(0x227)],_0x9cec2b[_0xdead29(0x1fb)]);}catch(_0x4b6a10){const _0x3c8b8f=describeMenuErrorCause(_0x4b6a10,_0xdead29(0x20a)),_0x4f658f=_0x4732f1[_0xdead29(0x219)](_0x18fee9=>({'id':_0x18fee9,'stage':'update-recovery','code':_0xdead29(0x1df),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x18fee9+_0xdead29(0x224),'requestedStateConfirmed':![],'recovered':![]})),_0x3decff={'stage':'verification','code':'menu_verification_failed','message':_0xdead29(0x20c),'targetIds':_0x3c3625['plan'][_0xdead29(0x23b)][_0xdead29(0x219)](_0x2eada9=>_0x2eada9['id']),'requestedStateConfirmed':![],..._0x3c8b8f};throw menuFailure(asVerificationError(_0x4b6a10,_0xdead29(0x21b)),_0x3c3625['plan'],{'stage':_0xdead29(0x22e),'succeeded':_0x41a6ae,'failedRecords':[..._0x22822e,..._0x4f658f,_0x3decff],'warnings':[_0xdead29(0x1f8)],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':_0xdead29(0x1fe)}});}const _0x1ba17a=[];for(const _0x49e6e1 of _0x41a6ae){const _0x128098=Number(_0x49e6e1['id']),_0x564c91=_0x3c3625[_0xdead29(0x22a)][_0xdead29(0x221)](_0x128098),_0x1a693f=_0x5cef3b[_0xdead29(0x1d0)]['get'](_0x128098);try{verifyVisibilityUpdate(_0x564c91,_0x1a693f,_0x3c3625[_0xdead29(0x230)][_0xdead29(0x215)]);}catch(_0x4db0f1){const _0x3fef9e=asVerificationError(_0x4db0f1,_0xdead29(0x213)+_0x128098+_0xdead29(0x233));_0x1ba17a[_0xdead29(0x20b)]({'id':_0x128098,'stage':_0xdead29(0x22e),'code':_0x3fef9e[_0xdead29(0x23d)],'message':_0x3fef9e[_0xdead29(0x1e4)],'requestedStateConfirmed':![]});}}for(const _0x1edcee of _0x4732f1){const _0x28d5cb=_0x3c3625[_0xdead29(0x22a)][_0xdead29(0x221)](_0x1edcee),_0x5c363b=_0x5cef3b['byId'][_0xdead29(0x221)](_0x1edcee);try{verifyVisibilityUpdate(_0x28d5cb,_0x5c363b,_0x3c3625[_0xdead29(0x230)][_0xdead29(0x215)]),_0x41a6ae[_0xdead29(0x20b)]({'id':_0x1edcee,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x48740a){const _0x3fe0f5=asVerificationError(_0x48740a,_0xdead29(0x205)+_0x1edcee+_0xdead29(0x214));_0x1ba17a['push']({'id':_0x1edcee,'stage':_0xdead29(0x228),'code':_0x3fe0f5[_0xdead29(0x23d)],'message':_0x3fe0f5['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x1ba17a[_0xdead29(0x1de)]>0x0){const _0x14812b=_0x1ba17a[_0xdead29(0x219)](_0x4ebc1b=>Number(_0x4ebc1b['id'])),_0x30e898=_0x41a6ae['filter'](_0x4b6833=>_0x4b6833[_0xdead29(0x241)]===!![])['length'],_0x1a82ba=menuError(_0xdead29(0x1df),_0xdead29(0x1e6)+_0x14812b[_0xdead29(0x22d)](',\x20')+'.',_0xdead29(0x1f6));throw menuFailure(_0x1a82ba,_0x3c3625[_0xdead29(0x230)],{'stage':_0xdead29(0x22e),'succeeded':_0x41a6ae,'failedRecords':[..._0x22822e,..._0x1ba17a],'warnings':[_0xdead29(0x1e7)],'verification':{'status':_0xdead29(0x1ee),..._0x14812b[_0xdead29(0x1de)]===0x1?{'targetId':_0x14812b[0x0]}:{'targetIds':_0x14812b},'recoveredCount':_0x30e898,'lookupCommand':_0xdead29(0x1fe)}});}const _0x27e3d2=_0x41a6ae[_0xdead29(0x1e2)](_0x542118=>_0x542118['updated']===!![])[_0xdead29(0x1de)],_0x18572b=_0x41a6ae['length']-_0x27e3d2,_0x57a2c2={..._0x3c3625[_0xdead29(0x230)],'succeeded':_0x41a6ae,'failed':_0x22822e,'warnings':_0x22822e['length']>0x0?[..._0x3c3625['plan'][_0xdead29(0x1e0)],_0xdead29(0x242)]:_0x3c3625['plan'][_0xdead29(0x1e0)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x5cef3b['hash'],'matchesRequestedState':_0x22822e[_0xdead29(0x1de)]===0x0,'recoveredCount':_0x4732f1[_0xdead29(0x1de)]}};return{'ok':_0x22822e[_0xdead29(0x1de)]===0x0,'data':_0x57a2c2,'message':_0x22822e['length']===0x0?'Updated\x20visibility\x20for\x20'+_0x27e3d2+'\x20menu(s);\x20skipped\x20'+_0x18572b+_0xdead29(0x212):_0xdead29(0x217)+_0x27e3d2+_0xdead29(0x1eb)+_0x18572b+_0xdead29(0x204)+_0x22822e[_0xdead29(0x1de)]+_0xdead29(0x1da)};}};function parseInput(_0x21de01){const _0x222a17=a135_0x342536,_0x59d8d9=parseMenuIds(_0x21de01[_0x222a17(0x1e8)]('menu-ids')),_0x3c0672=parseCsv(_0x21de01[_0x222a17(0x1e8)](_0x222a17(0x211)));if(_0x59d8d9[_0x222a17(0x1de)]===0x0&&_0x3c0672[_0x222a17(0x1de)]===0x0)throw CliErrors['validation'](_0x222a17(0x1d2));const _0x2b4040=parseBooleanFlag(_0x21de01,_0x222a17(0x225),!![]),_0x3d09c7=parseBooleanFlag(_0x21de01,_0x222a17(0x223),![]);let _0x48e38d;if(hasFlag(_0x21de01,_0x222a17(0x222))){_0x48e38d=_0x21de01[_0x222a17(0x238)](_0x222a17(0x222));if(!Number[_0x222a17(0x1d4)](_0x48e38d)||_0x48e38d<0x0)throw CliErrors[_0x222a17(0x23e)](_0x222a17(0x237));}return{'menuIds':_0x59d8d9,'paths':_0x3c0672,'visible':_0x2b4040,'expectVisible':_0x3d09c7,'expectedCount':_0x48e38d};}async function buildPlan(_0x34b076,_0x2100b3){const _0x4505e2=a135_0x342536,_0x3407d8=parseInput(_0x34b076),_0x2ef513=await fetchMutationSnapshot(_0x34b076,'update\x20menu\x20visibility'),_0x19bc53=selectTargets(_0x2ef513[_0x4505e2(0x1d6)],_0x3407d8[_0x4505e2(0x1f3)],_0x3407d8['paths']);if(_0x3407d8[_0x4505e2(0x1db)]!==undefined&&_0x19bc53[_0x4505e2(0x1de)]!==_0x3407d8[_0x4505e2(0x1db)])throw menuError(_0x4505e2(0x1e1),'Selected\x20'+_0x19bc53[_0x4505e2(0x1de)]+_0x4505e2(0x1ed)+_0x3407d8[_0x4505e2(0x1db)]+'.',_0x4505e2(0x21f));if(_0x3407d8[_0x4505e2(0x207)]!==undefined){const _0x1d211e=_0x19bc53[_0x4505e2(0x1e2)](_0x277e3a=>_0x277e3a[_0x4505e2(0x225)]!==_0x3407d8[_0x4505e2(0x207)]);if(_0x1d211e[_0x4505e2(0x1de)]>0x0)throw menuError('menu_state_drift',_0x4505e2(0x229)+_0x1d211e[_0x4505e2(0x219)](_0x4d52ef=>_0x4d52ef['id'])[_0x4505e2(0x22d)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x4f2eb5=_0x19bc53['map'](_0xe4292d=>({'id':_0xe4292d['id'],'label':_0xe4292d['label'],'path':_0xe4292d['path'],'before':{'visible':_0xe4292d['visible']},'after':{'visible':_0x3407d8[_0x4505e2(0x225)]}})),_0x467d51=_0x4f2eb5[_0x4505e2(0x1e2)](_0x529a3e=>_0x529a3e[_0x4505e2(0x208)][_0x4505e2(0x225)]!==_0x3407d8[_0x4505e2(0x225)])[_0x4505e2(0x219)](_0x92fe4b=>({'stage':'update-menu-visibility','method':_0x4505e2(0x1d5),'path':'/smartapi/menu/update','body':{'appCode':_0x34b076[_0x4505e2(0x227)],'id':_0x92fe4b['id'],'visible':_0x3407d8['visible']}})),_0x5c0e11=mutationResult({'operation':_0x4505e2(0x1f1),'selector':{'menuIds':_0x3407d8[_0x4505e2(0x1f3)],'paths':_0x3407d8[_0x4505e2(0x211)]},'before':{'menus':_0x19bc53[_0x4505e2(0x219)](_0x315c35=>({'id':_0x315c35['id'],'path':_0x315c35[_0x4505e2(0x1fc)],'visible':_0x315c35[_0x4505e2(0x225)]}))},'after':{'menus':_0x19bc53[_0x4505e2(0x219)](_0x1ec7fc=>({'id':_0x1ec7fc['id'],'path':_0x1ec7fc[_0x4505e2(0x1fc)],'visible':_0x3407d8[_0x4505e2(0x225)]}))},'dryRun':_0x2100b3,'backend':[...BACKEND],'plannedActions':_0x467d51,'snapshotHash':_0x2ef513['hash'],'warnings':_0x467d51[_0x4505e2(0x1de)]===0x0?[_0x4505e2(0x239)]:[]});return{'plan':{..._0x5c0e11,'requestedVisible':_0x3407d8[_0x4505e2(0x225)],'targets':_0x4f2eb5},'beforeById':new Map(_0x19bc53[_0x4505e2(0x219)](_0x4a5619=>[_0x4a5619['id'],_0x4a5619]))};}function selectTargets(_0x137c24,_0x146276,_0x5d2ee9){const _0x64134b=a135_0x342536,_0x52a3c5=new Map(_0x137c24[_0x64134b(0x219)](_0x3ed2af=>[_0x3ed2af['id'],_0x3ed2af])),_0x3061d6=new Map(),_0x401d46=_0x146276['filter'](_0xcdc4cf=>!_0x52a3c5[_0x64134b(0x22f)](_0xcdc4cf));if(_0x401d46[_0x64134b(0x1de)]>0x0)throw menuError(_0x64134b(0x231),'Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x401d46[_0x64134b(0x22d)](',\x20')+'.',_0x64134b(0x226));for(const _0x219a33 of _0x146276){_0x3061d6['set'](_0x219a33,_0x52a3c5['get'](_0x219a33));}for(const _0x4e4fb2 of _0x5d2ee9){const _0x369391=_0x137c24[_0x64134b(0x1e2)](_0x30b55d=>_0x30b55d[_0x64134b(0x1fc)]===_0x4e4fb2);if(_0x369391['length']===0x0)throw menuError(_0x64134b(0x231),_0x64134b(0x1dd)+JSON[_0x64134b(0x21a)](_0x4e4fb2)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x369391[_0x64134b(0x1de)]>0x1)throw menuError(_0x64134b(0x218),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON['stringify'](_0x4e4fb2)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x369391['map'](_0x2a8127=>_0x2a8127['id'])['join'](',\x20')+'.');const _0x55b849=_0x369391[0x0];_0x3061d6[_0x64134b(0x21e)](_0x55b849['id'],_0x55b849);}return[..._0x3061d6[_0x64134b(0x206)]()];}function parseMenuIds(_0x2af31a){const _0x5e92aa=a135_0x342536,_0x3026d9=parseCsv(_0x2af31a),_0x522861=_0x3026d9[_0x5e92aa(0x219)](Number);if(_0x522861[_0x5e92aa(0x234)](_0x55cb1d=>!Number['isSafeInteger'](_0x55cb1d)||_0x55cb1d<=0x0))throw CliErrors[_0x5e92aa(0x23e)](_0x5e92aa(0x1f0));return[...new Set(_0x522861)];}function parseCsv(_0x57d9a0){const _0x3fe296=a135_0x342536;return[...new Set(_0x57d9a0[_0x3fe296(0x216)](',')[_0x3fe296(0x219)](_0x418ccb=>_0x418ccb[_0x3fe296(0x22b)]())[_0x3fe296(0x1e2)](Boolean))];}function parseBooleanFlag(_0x3d1a6a,_0x48bb28,_0x3a64c3){const _0xd2d4e7=a135_0x342536;if(!hasFlag(_0x3d1a6a,_0x48bb28)){if(_0x3a64c3)throw CliErrors[_0xd2d4e7(0x20d)](_0x48bb28);return undefined;}const _0x256864=_0x3d1a6a[_0xd2d4e7(0x1f9)][_0x48bb28];if(_0x256864===!![]||_0x256864===![])return _0x256864;if(_0x256864===_0xd2d4e7(0x21d))return!![];if(_0x256864==='false')return![];throw CliErrors[_0xd2d4e7(0x23e)]('--'+_0x48bb28+'\x20must\x20be\x20true\x20or\x20false.');}function a135_0x2703(){const _0xaba0ce=['plannedActions','3467118sDlVKW','paths','\x20unchanged\x20menu(s).','Menu\x20','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','requestedVisible','split','Menu\x20visibility\x20update\x20completed:\x20','menu_selector_ambiguous','map','stringify','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','true','set','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','datasetCode','get','expected-count','expect-visible','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','visible','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','appCode','update-recovery','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','beforeById','trim','type','join','verification','has','plan','menu_selector_not_found','update\x20menu\x20visibility','\x20visibility\x20update\x20could\x20not\x20be\x20verified','some','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','num','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','2089160ikHJax','targets','isArray','code','validation','parentId','2031270FuEipA','recovered','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','pageType','byId','update\x20visibility\x20for','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','5wlREUC','isSafeInteger','POST','menus','resourcesValid','modelType','string','\x20failed.','expectedCount','label','Menu\x20path\x20selector\x20not\x20found:\x20','length','menu_verification_failed','warnings','menu_expected_count_mismatch','filter','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','message','41833768gnEFMu','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','str','datasetId','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','\x20updated,\x20','\x20changed\x20unexpectedly.','\x20menu(s),\x20expected\x20','failed','5375334kMnjuX','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','visibility-update','2356039AeqhLt','menuIds','url','/smartapi/menu/update','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','pageId','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','rawFlags','sort','cookie','path','menu_permission_denied','rabetbase\x20menu\x20list\x20--format\x20compress','boolean','menu','resources','1526643wZHJeY','childrenCount','\x20skipped,\x20','Response\x20was\x20lost\x20and\x20menu\x20','values','expectVisible','before','high-risk-write','verify\x20menu\x20visibility\x20update','push','Final\x20menu\x20visibility\x20readback\x20failed.','flagMissing','depth'];a135_0x2703=function(){return _0xaba0ce;};return a135_0x2703();}function verifyVisibilityUpdate(_0x1f3141,_0x27b7de,_0x1b0727){const _0x25268d=a135_0x342536;assertVerified(!!_0x27b7de,_0x25268d(0x213)+_0x1f3141['id']+_0x25268d(0x1e3)),assertVerified(_0x27b7de[_0x25268d(0x225)]===_0x1b0727,'Menu\x20'+_0x1f3141['id']+_0x25268d(0x236));const _0x45c122=[['id',_0x27b7de['id'],_0x1f3141['id']],[_0x25268d(0x23f),_0x27b7de['parentId'],_0x1f3141[_0x25268d(0x23f)]],[_0x25268d(0x20e),_0x27b7de[_0x25268d(0x20e)],_0x1f3141['depth']],[_0x25268d(0x1dc),_0x27b7de['label'],_0x1f3141[_0x25268d(0x1dc)]],[_0x25268d(0x1fc),_0x27b7de['path'],_0x1f3141['path']],[_0x25268d(0x1f4),_0x27b7de['url'],_0x1f3141[_0x25268d(0x1f4)]],[_0x25268d(0x22c),_0x27b7de['type'],_0x1f3141['type']],[_0x25268d(0x1fa),_0x27b7de[_0x25268d(0x1fa)],_0x1f3141['sort']],[_0x25268d(0x201),_0x27b7de[_0x25268d(0x201)],_0x1f3141[_0x25268d(0x201)]],[_0x25268d(0x1d7),_0x27b7de[_0x25268d(0x1d7)],_0x1f3141['resourcesValid']],['childrenIds',_0x27b7de['childrenIds'],_0x1f3141['childrenIds']],[_0x25268d(0x203),_0x27b7de[_0x25268d(0x203)],_0x1f3141['childrenCount']],[_0x25268d(0x1f7),_0x27b7de['pageId'],_0x1f3141[_0x25268d(0x1f7)]],[_0x25268d(0x1cf),_0x27b7de['pageType'],_0x1f3141[_0x25268d(0x1cf)]],[_0x25268d(0x1d8),_0x27b7de[_0x25268d(0x1d8)],_0x1f3141[_0x25268d(0x1d8)]],[_0x25268d(0x1e9),_0x27b7de[_0x25268d(0x1e9)],_0x1f3141[_0x25268d(0x1e9)]],[_0x25268d(0x220),_0x27b7de['datasetCode'],_0x1f3141[_0x25268d(0x220)]]];for(const [_0x367f63,_0x2967b3,_0x53fc59]of _0x45c122){assertVerified(sameValue(_0x2967b3,_0x53fc59),_0x25268d(0x213)+_0x1f3141['id']+'\x20'+_0x367f63+_0x25268d(0x1ec));}}function sameValue(_0x50a87a,_0x2c2de6){const _0x3c8744=a135_0x342536;if(Array[_0x3c8744(0x23c)](_0x50a87a)||Array[_0x3c8744(0x23c)](_0x2c2de6))return JSON[_0x3c8744(0x21a)](_0x50a87a)===JSON['stringify'](_0x2c2de6);return _0x50a87a===_0x2c2de6;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a136_0x503175=a136_0xb922;(function(_0x4dc622,_0x6735e5){const _0x14c0df=a136_0xb922,_0x54c459=_0x4dc622();while(!![]){try{const _0xc179f0=-parseInt(_0x14c0df(0x163))/0x1+-parseInt(_0x14c0df(0x179))/0x2+-parseInt(_0x14c0df(0x166))/0x3+-parseInt(_0x14c0df(0x168))/0x4*(-parseInt(_0x14c0df(0x165))/0x5)+-parseInt(_0x14c0df(0x169))/0x6*(-parseInt(_0x14c0df(0x16d))/0x7)+parseInt(_0x14c0df(0x16b))/0x8+parseInt(_0x14c0df(0x16f))/0x9;if(_0xc179f0===_0x6735e5)break;else _0x54c459['push'](_0x54c459['shift']());}catch(_0x21b876){_0x54c459['push'](_0x54c459['shift']());}}}(a136_0x46d4,0x9787a));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';function a136_0x46d4(){const _0x4b9f67=['Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','notification_config_create_outcome_unknown','configCode','channelType','write','appCode',';\x20do\x20not\x20resubmit.','notification',';\x20no\x20automatic\x20retry\x20was\x20attempted.','1236420hvOmog','POST','Inspect\x20with\x20','readTimeout','endpointUrl','configName','description','connectTimeout','document','700634xQADnu','/notification/channel-config/create','4554755PxEKEM','2435043rbupfk','planned','4mqQkWT','1503174hmuRsg','Created\x20notification\x20config\x20','4782360KtKpsr','verified','21tQdZLf','create','4417722GuqMwJ'];a136_0x46d4=function(){return _0x4b9f67;};return a136_0x46d4();}function a136_0xb922(_0x4d4624,_0x37eb1b){_0x4d4624=_0x4d4624-0x15d;const _0x46d464=a136_0x46d4();let _0xb9227f=_0x46d464[_0x4d4624];return _0xb9227f;}const CREATE_PATH=a136_0x503175(0x164);async function prepareCreate(_0x148743){const _0x25b175=a136_0x503175,_0x1b9ace=await readNotificationDocument(_0x148743,_0x25b175(0x16e)),_0x55f8f6=createMutationInput(_0x148743[_0x25b175(0x175)],_0x1b9ace);return{'document':_0x1b9ace,'input':_0x55f8f6,'planned':projectNotificationConfig({'appCode':_0x148743['appCode'],'configName':_0x1b9ace['configName'],'channelType':_0x1b9ace[_0x25b175(0x173)],'endpointUrl':_0x1b9ace[_0x25b175(0x15e)],'channelConfig':_0x1b9ace['channelConfig'],'description':_0x1b9ace[_0x25b175(0x160)],'connectTimeout':_0x1b9ace[_0x25b175(0x161)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x1b9ace[_0x25b175(0x15d)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a136_0x503175(0x177),'command':'config-create','description':'Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','risk':a136_0x503175(0x174),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x869f81){assertSingleNotificationSource(_0x869f81);},async 'dryRun'(_0x1cb73b){const _0x1b9ebf=a136_0x503175,_0x144cd4=await prepareCreate(_0x1cb73b),_0x179bf3=notificationLookupCommand(_0x1cb73b[_0x1b9ebf(0x175)],_0x144cd4[_0x1b9ebf(0x162)][_0x1b9ebf(0x173)]);return asDryRunResult({'operation':_0x1b9ebf(0x16e),'selector':{'appCode':_0x1cb73b[_0x1b9ebf(0x175)],'configName':_0x144cd4[_0x1b9ebf(0x162)][_0x1b9ebf(0x15f)],'channelType':_0x144cd4[_0x1b9ebf(0x162)][_0x1b9ebf(0x173)]},'before':null,'after':_0x144cd4[_0x1b9ebf(0x167)],'dryRun':!![],'backend':{'method':_0x1b9ebf(0x17a),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x1b9ebf(0x167),'lookupCommand':_0x179bf3}},{'method':_0x1b9ebf(0x17a),'url':CREATE_PATH});},async 'execute'(_0x27ed24){const _0x514180=a136_0x503175,_0x1b95c8=await prepareCreate(_0x27ed24),_0x32393e=notificationLookupCommand(_0x27ed24[_0x514180(0x175)],_0x1b95c8['document'][_0x514180(0x173)]);let _0x81862f;try{_0x81862f=await createNotificationChannelConfig(_0x1b95c8['input']);}catch(_0x3bea41){if(isPlatformTransportFailure(_0x3bea41))throw notificationError('notification_config_create_outcome_unknown',_0x514180(0x170),_0x514180(0x17b)+_0x32393e+_0x514180(0x176));throw safeApiFailure(_0x514180(0x16e),'mutation',_0x514180(0x17b)+_0x32393e+_0x514180(0x178));}if(!Number['isSafeInteger'](_0x81862f)||_0x81862f<=0x0)throw notificationError(_0x514180(0x171),'Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.',_0x514180(0x17b)+_0x32393e+';\x20do\x20not\x20resubmit.');let _0x46885d;try{const _0x56a32a=await getNotificationChannelConfig(_0x81862f,_0x27ed24[_0x514180(0x175)]);_0x46885d=normalizeExactNotificationConfig(_0x56a32a,_0x81862f,_0x27ed24[_0x514180(0x175)]);}catch{throw safeApiFailure('create','verification','Inspect\x20with\x20'+_0x32393e+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x514180(0x16e),'selector':{'appCode':_0x46885d[_0x514180(0x175)],'id':_0x46885d['id'],'configCode':_0x46885d[_0x514180(0x172)],'configName':_0x46885d[_0x514180(0x15f)],'channelType':_0x46885d[_0x514180(0x173)]},'before':null,'after':projectNotificationConfig(_0x46885d),'dryRun':![],'backend':{'method':_0x514180(0x17a),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x514180(0x16c),'lookupCommand':_0x32393e}},'message':_0x514180(0x16a)+_0x46885d['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a137_0x42ace3=a137_0x456a;(function(_0x28fd2b,_0x3e34bf){const _0x280419=a137_0x456a,_0x591651=_0x28fd2b();while(!![]){try{const _0x57a06e=-parseInt(_0x280419(0x95))/0x1+-parseInt(_0x280419(0xa3))/0x2*(-parseInt(_0x280419(0x93))/0x3)+parseInt(_0x280419(0x90))/0x4+parseInt(_0x280419(0x96))/0x5+-parseInt(_0x280419(0x8e))/0x6*(parseInt(_0x280419(0x8f))/0x7)+-parseInt(_0x280419(0x92))/0x8+-parseInt(_0x280419(0xa5))/0x9*(-parseInt(_0x280419(0x91))/0xa);if(_0x57a06e===_0x3e34bf)break;else _0x591651['push'](_0x591651['shift']());}catch(_0x339fcc){_0x591651['push'](_0x591651['shift']());}}}(a137_0x3f3b,0xe6924));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH='/notification/channel-config/delete',REFERENCE_WARNING=a137_0x42ace3(0xa9);function a137_0x456a(_0x5125c4,_0x2a7745){_0x5125c4=_0x5125c4-0x8c;const _0x3f3b6b=a137_0x3f3b();let _0x456a50=_0x3f3b6b[_0x5125c4];return _0x456a50;}async function prepareDelete(_0x49d6c7){const _0xc42b17=a137_0x42ace3,_0xd9db0e=readNotificationId(_0x49d6c7),_0x5b7f46=await requireExactNotificationConfig(_0x49d6c7['appCode'],_0xd9db0e,_0xc42b17(0x9a));return{'id':_0xd9db0e,'before':_0x5b7f46};}function a137_0x3f3b(){const _0x203314=['771638FeRQyS','verified','924597wGwlbv','config-delete','Deleted\x20notification\x20config\x20','Inspect\x20with\x20','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','Notification\x20config\x20','notification_config_delete_verification_failed','channelType','appCode','6JAxaYy','6714393PdqHuz','2183600nUyajk','130FCMEeL','10413216PXyJNh','3wMOuOg','notification_config_delete_outcome_unknown','915455sEItUU','9267390uvgFvv','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','planned','mutation','delete','notification','unshift','notification_config_delete_verification_unavailable','\x20delete\x20could\x20not\x20be\x20verified.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','before','some','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'];a137_0x3f3b=function(){return _0x203314;};return a137_0x3f3b();}export const notificationConfigDelete={'service':a137_0x42ace3(0x9b),'command':a137_0x42ace3(0xa6),'description':a137_0x42ace3(0x97),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x250dd7){readNotificationId(_0x250dd7),requireNotificationExplicitYes(_0x250dd7);},async 'dryRun'(_0x4ed54a){const _0x27d3d4=a137_0x42ace3,_0x371fb2=await prepareDelete(_0x4ed54a),_0x156387=notificationLookupCommand(_0x4ed54a['appCode'],_0x371fb2[_0x27d3d4(0xa0)][_0x27d3d4(0x8c)]);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x371fb2['before']),'before':projectNotificationConfig(_0x371fb2[_0x27d3d4(0xa0)]),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x27d3d4(0x98),'lookupCommand':_0x156387}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0xb2e32f){const _0x113ecf=a137_0x42ace3;requireNotificationExplicitYes(_0xb2e32f);const _0x4651ff=await prepareDelete(_0xb2e32f),_0x5606a9=notificationLookupCommand(_0xb2e32f[_0x113ecf(0x8d)],_0x4651ff[_0x113ecf(0xa0)][_0x113ecf(0x8c)]);let _0x23b93a=![];try{await deleteNotificationChannelConfig(_0x4651ff['id'],_0xb2e32f['appCode']);}catch(_0x5265d4){if(!isPlatformTransportFailure(_0x5265d4))throw safeApiFailure(_0x113ecf(0x9a),_0x113ecf(0x99),_0x113ecf(0xa8)+_0x5606a9+_0x113ecf(0x9f));_0x23b93a=!![];}let _0x1b011d;try{_0x1b011d=await listNotificationChannelConfigs(_0xb2e32f[_0x113ecf(0x8d)],_0x4651ff[_0x113ecf(0xa0)]['channelType']),validateNotificationDeleteReadback(_0x1b011d,_0xb2e32f[_0x113ecf(0x8d)],_0x4651ff[_0x113ecf(0xa0)][_0x113ecf(0x8c)]);}catch{throw notificationError(_0x23b93a?'notification_config_delete_outcome_unknown':_0x113ecf(0x9d),_0x113ecf(0xaa)+_0x4651ff['id']+_0x113ecf(0x9e),'Inspect\x20with\x20'+_0x5606a9+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x1b011d[_0x113ecf(0xa1)](_0x41e66d=>_0x41e66d['id']===_0x4651ff['id']))throw notificationError(_0x23b93a?_0x113ecf(0x94):_0x113ecf(0xab),_0x113ecf(0xaa)+_0x4651ff['id']+'\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20'+_0x5606a9+';\x20do\x20not\x20resubmit\x20automatically.');const _0x2bba86=[REFERENCE_WARNING];return _0x23b93a&&_0x2bba86[_0x113ecf(0x9c)](_0x113ecf(0xa2)),{'ok':!![],'data':{'operation':_0x113ecf(0x9a),'selector':notificationSelector(_0x4651ff[_0x113ecf(0xa0)]),'before':projectNotificationConfig(_0x4651ff['before']),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x2bba86,'verification':{'status':_0x113ecf(0xa4),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x23b93a,'lookupCommand':_0x5606a9}},'message':_0x113ecf(0xa7)+_0x4651ff['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a138_0x590c(_0xaba433,_0x2b7e7d){_0xaba433=_0xaba433-0x78;const _0x2a90b7=a138_0x2a90();let _0x590cd9=_0x2a90b7[_0xaba433];return _0x590cd9;}const a138_0x5bd26b=a138_0x590c;(function(_0x252fcd,_0x649eeb){const _0x508307=a138_0x590c,_0x434885=_0x252fcd();while(!![]){try{const _0x55e612=-parseInt(_0x508307(0x85))/0x1*(parseInt(_0x508307(0x8b))/0x2)+-parseInt(_0x508307(0x82))/0x3+-parseInt(_0x508307(0x84))/0x4+-parseInt(_0x508307(0x80))/0x5*(-parseInt(_0x508307(0x81))/0x6)+-parseInt(_0x508307(0x8c))/0x7+parseInt(_0x508307(0x78))/0x8*(-parseInt(_0x508307(0x86))/0x9)+parseInt(_0x508307(0x83))/0xa;if(_0x55e612===_0x649eeb)break;else _0x434885['push'](_0x434885['shift']());}catch(_0x343d4c){_0x434885['push'](_0x434885['shift']());}}}(a138_0x2a90,0x7de35));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a138_0x2a90(){const _0x50b2d4=['appCode','\x20notification\x20config(s)','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','20nzppaZ','816078paYYNw','1022463aJwtuF','11925970qOmBmO','1446136SBykIC','42tSXopT','3435066AdKxPZ','type','config-list','map','read','6078xKpVwV','65415iLQAMy','length','8DMTkFx','Notification\x20channel\x20type','Found\x20','EMAIL','string'];a138_0x2a90=function(){return _0x50b2d4;};return a138_0x2a90();}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':a138_0x5bd26b(0x88),'description':a138_0x5bd26b(0x7f),'risk':a138_0x5bd26b(0x8a),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a138_0x5bd26b(0x87),'type':a138_0x5bd26b(0x7c),'description':a138_0x5bd26b(0x79),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a138_0x5bd26b(0x7b)}],async 'validate'(_0x4eaa1b){readNotificationChannelType(_0x4eaa1b);},async 'execute'(_0x12d659){const _0xa59456=a138_0x5bd26b,_0x134e31=readNotificationChannelType(_0x12d659),_0x1297d8=await listNotificationChannelConfigs(_0x12d659[_0xa59456(0x7d)],_0x134e31),_0x3e0346=_0x1297d8[_0xa59456(0x89)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x12d659[_0xa59456(0x7d)],'channelType':_0x134e31,'count':_0x3e0346[_0xa59456(0x8d)],'configs':_0x3e0346},'message':_0xa59456(0x7a)+_0x3e0346[_0xa59456(0x8d)]+'\x20'+_0x134e31+_0xa59456(0x7e)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a139_0x704993=a139_0x517c;(function(_0x47506c,_0x252a80){const _0x42bc8c=a139_0x517c,_0x54469e=_0x47506c();while(!![]){try{const _0x32ca6e=parseInt(_0x42bc8c(0x1ab))/0x1+parseInt(_0x42bc8c(0x1bb))/0x2+parseInt(_0x42bc8c(0x1a9))/0x3+parseInt(_0x42bc8c(0x1b9))/0x4*(-parseInt(_0x42bc8c(0x1ae))/0x5)+parseInt(_0x42bc8c(0x1ba))/0x6*(-parseInt(_0x42bc8c(0x19f))/0x7)+parseInt(_0x42bc8c(0x1a2))/0x8+parseInt(_0x42bc8c(0x1a4))/0x9;if(_0x32ca6e===_0x252a80)break;else _0x54469e['push'](_0x54469e['shift']());}catch(_0x59c028){_0x54469e['push'](_0x54469e['shift']());}}}(a139_0x26ac,0xc98d2));import{asDryRunResult}from'../../commands/common/dry-run.js';function a139_0x26ac(){const _0x10c334=['verifiedFields','\x20via\x20','Notification\x20config\x20','POST','notification_config_update_verification_unavailable','4mIhvaU','6BpvcOe','363466KSPryd','allMatch','provesChange','/notification/channel-config/update','appCode','mutation','3949981uBofNW','planned',';\x20do\x20not\x20resubmit\x20automatically.','1331472rpwByk','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','12178107cOSCkK','patch','Inspect\x20ID\x20','Inspect\x20with\x20--id\x20','channelType','2050005DlDVWL','update','614254mweRlN','\x20with\x20','notification_config_update_outcome_unknown','8045210YSXiEs','notification','payload','Updated\x20notification\x20config\x20','before','verified'];a139_0x26ac=function(){return _0x10c334;};return a139_0x26ac();}import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';function a139_0x517c(_0xda0f2c,_0x49bdbc){_0xda0f2c=_0xda0f2c-0x19f;const _0x26ac28=a139_0x26ac();let _0x517cb4=_0x26ac28[_0xda0f2c];return _0x517cb4;}const UPDATE_PATH=a139_0x704993(0x1be);async function prepareUpdate(_0x41099a){const _0x3a9311=a139_0x704993,_0x2fc337=readNotificationId(_0x41099a),_0x36b30f=await readNotificationDocument(_0x41099a,_0x3a9311(0x1aa)),_0x5e7a76=await requireExactNotificationConfig(_0x41099a[_0x3a9311(0x1bf)],_0x2fc337,'update');return{'id':_0x2fc337,'patch':_0x36b30f,'before':_0x5e7a76,'payload':mergeUpdateInput(_0x5e7a76,_0x36b30f),'planned':plannedUpdateProjection(_0x5e7a76,_0x36b30f)};}export const notificationConfigUpdate={'service':a139_0x704993(0x1af),'command':'config-update','description':a139_0x704993(0x1a3),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x31aa93){readNotificationId(_0x31aa93),assertSingleNotificationSource(_0x31aa93),requireNotificationExplicitYes(_0x31aa93);},async 'dryRun'(_0x143eda){const _0x4a5850=a139_0x704993,_0x205c9f=await prepareUpdate(_0x143eda),_0x54c4ef=notificationLookupCommand(_0x143eda[_0x4a5850(0x1bf)],_0x205c9f[_0x4a5850(0x1b2)][_0x4a5850(0x1a8)]);return asDryRunResult({'operation':_0x4a5850(0x1aa),'selector':notificationSelector(_0x205c9f[_0x4a5850(0x1b2)]),'before':projectNotificationConfig(_0x205c9f[_0x4a5850(0x1b2)]),'after':_0x205c9f[_0x4a5850(0x1a0)],'dryRun':!![],'backend':{'method':_0x4a5850(0x1b7),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x4a5850(0x1a0),'lookupCommand':_0x54c4ef}},{'method':_0x4a5850(0x1b7),'url':UPDATE_PATH});},async 'execute'(_0x3ee04f){const _0x3d1d06=a139_0x704993;requireNotificationExplicitYes(_0x3ee04f);const _0x4ad9e7=await prepareUpdate(_0x3ee04f),_0x139fa8=notificationLookupCommand(_0x3ee04f[_0x3d1d06(0x1bf)],_0x4ad9e7[_0x3d1d06(0x1b2)][_0x3d1d06(0x1a8)]);let _0xb1eb71=![];try{await updateNotificationChannelConfig(_0x4ad9e7[_0x3d1d06(0x1b0)]);}catch(_0x3bf856){if(!isPlatformTransportFailure(_0x3bf856))throw safeApiFailure(_0x3d1d06(0x1aa),_0x3d1d06(0x1c0),_0x3d1d06(0x1a6)+_0x4ad9e7['id']+_0x3d1d06(0x1ac)+_0x139fa8+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0xb1eb71=!![];}let _0x41f6ca;try{const _0x456bcc=await getNotificationChannelConfig(_0x4ad9e7['id'],_0x3ee04f[_0x3d1d06(0x1bf)]);_0x41f6ca=normalizeExactNotificationConfig(_0x456bcc,_0x4ad9e7['id'],_0x3ee04f[_0x3d1d06(0x1bf)]);}catch{throw notificationError(_0xb1eb71?_0x3d1d06(0x1ad):_0x3d1d06(0x1b8),'Notification\x20config\x20'+_0x4ad9e7['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x3d1d06(0x1a7)+_0x4ad9e7['id']+_0x3d1d06(0x1b5)+_0x139fa8+_0x3d1d06(0x1a1));}const _0x1ed5f0=requestedSafeFieldsMatch(_0x4ad9e7[_0x3d1d06(0x1b2)],_0x41f6ca,_0x4ad9e7[_0x3d1d06(0x1a5)]);if(!_0x1ed5f0[_0x3d1d06(0x1bc)]||_0xb1eb71&&!_0x1ed5f0[_0x3d1d06(0x1bd)])throw notificationError(_0xb1eb71?_0x3d1d06(0x1ad):'notification_config_update_verification_failed',_0x3d1d06(0x1b6)+_0x4ad9e7['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x3d1d06(0x1a7)+_0x4ad9e7['id']+'\x20via\x20'+_0x139fa8+_0x3d1d06(0x1a1));const _0x5b3a85=_0xb1eb71?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x41f6ca),'before':projectNotificationConfig(_0x4ad9e7[_0x3d1d06(0x1b2)]),'after':projectNotificationConfig(_0x41f6ca),'dryRun':![],'backend':{'method':_0x3d1d06(0x1b7),'path':UPDATE_PATH},'warnings':_0x5b3a85,'verification':{'status':_0x3d1d06(0x1b3),'recoveredAfterUnknownResponse':_0xb1eb71,'verifiedFields':_0x1ed5f0[_0x3d1d06(0x1b4)],'lookupCommand':_0x139fa8}},'message':_0x3d1d06(0x1b1)+_0x41f6ca['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a140_0x3f91(_0x559212,_0x2e0491){_0x559212=_0x559212-0x76;const _0x516726=a140_0x5167();let _0x3f916a=_0x516726[_0x559212];return _0x3f916a;}(function(_0x3fc833,_0x17f040){const _0x25d2a0=a140_0x3f91,_0x46e761=_0x3fc833();while(!![]){try{const _0x3a167c=-parseInt(_0x25d2a0(0x7b))/0x1+parseInt(_0x25d2a0(0x76))/0x2*(parseInt(_0x25d2a0(0x79))/0x3)+parseInt(_0x25d2a0(0x80))/0x4+parseInt(_0x25d2a0(0x7e))/0x5*(-parseInt(_0x25d2a0(0x77))/0x6)+-parseInt(_0x25d2a0(0x78))/0x7*(-parseInt(_0x25d2a0(0x7a))/0x8)+-parseInt(_0x25d2a0(0x7c))/0x9+parseInt(_0x25d2a0(0x7f))/0xa*(parseInt(_0x25d2a0(0x7d))/0xb);if(_0x3a167c===_0x17f040)break;else _0x46e761['push'](_0x46e761['shift']());}catch(_0xd98cb4){_0x46e761['push'](_0x46e761['shift']());}}}(a140_0x5167,0xc198d));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a140_0x5167(){const _0x3a04f6=['1380712mJxWTd','905698XtbxKu','9079659PhPLES','11121oyocIC','1040npJcOn','10210uRzJeF','1899968tAihle','21002YuTlQd','34152aBjbUO','49UlBxIU','336YCjQJD'];a140_0x5167=function(){return _0x3a04f6;};return a140_0x5167();}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|