@lovrabet/rabetbase-cli 2.4.7-beta.2 → 2.5.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +13 -3
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.d.ts +7 -0
- package/lib/api/generate-sdk-config-file.js +1 -0
- 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.d.ts +2 -5
- 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.d.ts +5 -0
- package/lib/commands/config/delete.js +1 -0
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.d.ts +12 -0
- package/lib/commands/config/init.js +1 -0
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +1 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.d.ts +6 -2
- 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.d.ts +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.d.ts +2 -2
- 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.d.ts +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.d.ts +10 -0
- package/lib/config/domain-config.js +1 -0
- package/lib/config/schema.d.ts +3 -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.d.ts +23 -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.d.ts +9 -0
- package/lib/constant/region.js +1 -0
- 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.d.ts +4 -6
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +2 -2
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.d.ts +11 -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.d.ts +2 -2
- 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/types/index.d.ts +28 -0
- package/lib/utils/ai_config.d.ts +1 -2
- 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 -3
- package/skills/rabetbase/SKILL.md +33 -28
- package/skills/rabetbase/guides/backend-function.md +41 -12
- package/skills/rabetbase/guides/bff-creation-workflow.md +6 -4
- package/skills/rabetbase/guides/custom-page-workflow.md +1 -1
- package/skills/rabetbase/guides/data-api-guidelines.md +8 -8
- package/skills/rabetbase/guides/database-connection-workflow.md +8 -16
- package/skills/rabetbase/guides/menu-anomaly-manual-cleanup.md +1 -6
- package/skills/rabetbase/guides/sdk-client-generation.md +146 -0
- package/skills/rabetbase/guides/sql-creation-workflow.md +1 -1
- package/skills/rabetbase/guides/troubleshooting.md +1 -1
- package/skills/rabetbase/guides/typescript-sdk.md +46 -10
- package/skills/rabetbase/references/rabetbase-api-list.md +4 -4
- package/skills/rabetbase/references/rabetbase-api-pull.md +44 -29
- package/skills/rabetbase/references/rabetbase-app-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-auth-login.md +4 -2
- package/skills/rabetbase/references/rabetbase-bff-push.md +3 -1
- package/skills/rabetbase/references/rabetbase-codegen-sql.md +3 -1
- package/skills/rabetbase/references/rabetbase-config.md +75 -30
- package/skills/rabetbase/references/rabetbase-dataset-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-db-analyze.md +3 -3
- package/skills/rabetbase/references/rabetbase-db-detail.md +2 -2
- package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +4 -4
- package/skills/rabetbase/references/rabetbase-db-diff.md +6 -9
- package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
- package/skills/rabetbase/references/rabetbase-init.md +57 -51
- package/skills/rabetbase/references/rabetbase-kb.md +2 -0
- package/skills/rabetbase/references/rabetbase-page-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-custom-detail.md +3 -3
- package/skills/rabetbase/references/rabetbase-page-custom-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-project-create.md +12 -3
- package/skills/rabetbase/references/rabetbase-project-upgrade.md +2 -2
- package/skills/rabetbase/references/rabetbase-role-user-resolve.md +2 -2
- package/skills/rabetbase/references/rabetbase-user-account.md +1 -1
- package/skills/rabetbase/references/rabetbase-workspace.md +6 -6
- package/skills/rabetbase.manifest.json +4 -3
- package/templates/README.md +17 -28
- package/templates/generate-api/api.ts.tpl +3 -3
- package/templates/generate-api/client.ts.tpl +10 -37
- package/lib/commands/data/filter.d.ts +0 -7
- package/lib/commands/data/filter.js +0 -1
- package/lib/commands/data/getOne.d.ts +0 -7
- package/lib/commands/data/getOne.js +0 -1
- package/lib/commands/data/index.d.ts +0 -8
- package/lib/commands/data/index.js +0 -1
- package/lib/commands/data/shared.d.ts +0 -33
- package/lib/commands/data/shared.js +0 -1
- package/lib/commands/init/index.d.ts +0 -11
- package/lib/commands/init/index.js +0 -1
- package/lib/utils/rules-cdn.d.ts +0 -38
- package/lib/utils/rules-cdn.js +0 -1
- package/templates/rules/lovrabet_rules.mdc.tpl +0 -893
- package/templates/skill/SKILL.md.tpl +0 -120
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a129_0xd2c6(_0x3a54b2,_0x38b59d){_0x3a54b2=_0x3a54b2-0x170;const _0x423faf=a129_0x423f();let _0xd2c60c=_0x423faf[_0x3a54b2];return _0xd2c60c;}const a129_0x1366fa=a129_0xd2c6;(function(_0x3c9080,_0x10b647){const _0x1182bc=a129_0xd2c6,_0x4f6c8e=_0x3c9080();while(!![]){try{const _0x20f89c=parseInt(_0x1182bc(0x187))/0x1*(-parseInt(_0x1182bc(0x190))/0x2)+-parseInt(_0x1182bc(0x178))/0x3+-parseInt(_0x1182bc(0x180))/0x4+parseInt(_0x1182bc(0x194))/0x5*(-parseInt(_0x1182bc(0x182))/0x6)+parseInt(_0x1182bc(0x196))/0x7+parseInt(_0x1182bc(0x19c))/0x8*(-parseInt(_0x1182bc(0x17a))/0x9)+parseInt(_0x1182bc(0x17f))/0xa;if(_0x20f89c===_0x10b647)break;else _0x4f6c8e['push'](_0x4f6c8e['shift']());}catch(_0x56038f){_0x4f6c8e['push'](_0x4f6c8e['shift']());}}}(a129_0x423f,0xde6c0));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';const MENU_SYNC_PARAM_KEYS=new Set([a129_0x1366fa(0x18a),a129_0x1366fa(0x177)]);function a129_0x423f(){const _0x1d4f25=['Invalid\x20--params\x20JSON.','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','message','has','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','keys','cssUrl','5451219naqKrT','map','181800OOnkxx','dryRun','path','procode','Invalid\x20--params.','42162980xxrzLG','4615276kScAjk','No\x20local\x20pages\x20matched\x20paths:\x20','492dpcnqN','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','filter','menu-sync','field','8563etZpdK','import','object','jsUrl','setLogPath','pages','--params.','Invalid\x20--params:\x20','trim','10Wectte','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','string','info','35180kxAkST','cwd','6664007wIDXBM','length','push','JS\x20URL\x20is\x20unreachable:\x20','get','Menu\x20sync\x20completed','264motWLM','Invalid\x20--params\x20fields:\x20','join','hasOwn','\x0a\x20\x20Available\x20local\x20paths:\x20','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.'];a129_0x423f=function(){return _0x1d4f25;};return a129_0x423f();}function validateParams(_0x5b69e2){const _0x2962de=a129_0x1366fa,_0x378a40=[];return _0x5b69e2[_0x2962de(0x18a)]&&!isValidJsHttpsUrl(_0x5b69e2[_0x2962de(0x18a)])&&_0x378a40['push']({'field':_0x2962de(0x18a),'message':_0x2962de(0x191)}),_0x5b69e2['cssUrl']&&!isValidCssHttpsUrl(_0x5b69e2[_0x2962de(0x177)])&&_0x378a40['push']({'field':_0x2962de(0x177),'message':_0x2962de(0x183)}),_0x378a40;}export async function runMenuSyncCore(_0x5807ca,_0x3969a8,_0x3a7388=[],_0xac56d,_0x116cec={}){const _0xcdb218=a129_0x1366fa,_0x167b10=parseMenuSyncParams(_0xac56d),_0x49979d=[...new Set(_0x3a7388[_0xcdb218(0x179)](_0x58d0b=>_0x58d0b[_0xcdb218(0x18f)]())[_0xcdb218(0x184)](Boolean))],_0x227540=_0x167b10[_0xcdb218(0x18a)],_0x36a885=_0x167b10['cssUrl'],_0x42d041=[];if(_0x227540)_0x42d041[_0xcdb218(0x198)](_0x227540);if(_0x36a885)_0x42d041[_0xcdb218(0x198)](_0x36a885);const _0x555673=validateParams(_0x167b10);if(_0x555673[_0xcdb218(0x197)]>0x0){const _0x369e9e=_0x555673[_0xcdb218(0x179)](_0x3c5a42=>_0xcdb218(0x18d)+_0x3c5a42[_0xcdb218(0x186)]+':\x20'+_0x3c5a42[_0xcdb218(0x173)])[_0xcdb218(0x19e)](';\x20');throw new Error(_0xcdb218(0x18e)+_0x369e9e);}logger[_0xcdb218(0x18b)](process[_0xcdb218(0x195)]()),logger[_0xcdb218(0x193)]('menu-sync','Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x5807ca,'selectedCount':_0x49979d['length'],'jsUrl':_0x227540,'cssUrl':_0x36a885});if(_0x227540){const _0x2ed54e=await isUrlReachable(_0x227540);if(!_0x2ed54e)throw new Error(_0xcdb218(0x199)+_0x227540);}if(_0x36a885){const _0x5dca66=await isUrlReachable(_0x36a885);if(!_0x5dca66)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x36a885);}const _0x938146=getLocalPages();if(_0x938146[_0xcdb218(0x197)]===0x0){if(_0x49979d[_0xcdb218(0x197)]>0x0)throw new Error(_0xcdb218(0x181)+_0x49979d[_0xcdb218(0x19e)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x116cec[_0xcdb218(0x17b)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x370d99=await getOnlineMenuList(_0x5807ca,_0x3969a8),_0x322e7c=new Set(_0x370d99[_0xcdb218(0x179)](_0x2b4a30=>_0x2b4a30[_0xcdb218(0x17c)]));let _0x434186;if(_0x49979d[_0xcdb218(0x197)]>0x0){const _0x57cded=new Map(_0x938146[_0xcdb218(0x179)](_0x1fe77e=>[_0x1fe77e[_0xcdb218(0x17c)],_0x1fe77e])),_0x17113d=_0x49979d[_0xcdb218(0x184)](_0x4246bf=>!_0x57cded[_0xcdb218(0x174)](_0x4246bf));if(_0x17113d[_0xcdb218(0x197)]>0x0){const _0x36d0a3=_0x938146[_0xcdb218(0x179)](_0x1d6336=>_0x1d6336[_0xcdb218(0x17c)])[_0xcdb218(0x19e)](',\x20');throw new Error(_0xcdb218(0x181)+_0x17113d[_0xcdb218(0x19e)](',\x20')+_0xcdb218(0x1a0)+_0x36d0a3);}const _0x1c46c4=_0x49979d[_0xcdb218(0x184)](_0x592616=>_0x322e7c[_0xcdb218(0x174)](_0x592616));if(_0x1c46c4['length']>0x0)throw new Error(_0xcdb218(0x175)+_0x1c46c4[_0xcdb218(0x19e)](',\x20'));_0x434186=_0x49979d[_0xcdb218(0x179)](_0x215515=>_0x57cded[_0xcdb218(0x19a)](_0x215515));}else _0x434186=_0x938146[_0xcdb218(0x184)](_0x6ee249=>!_0x322e7c[_0xcdb218(0x174)](_0x6ee249[_0xcdb218(0x17c)]));if(_0x434186['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x116cec['dryRun']===!![],'targetPages':[],'plannedMenus':[]};const _0x3ec6b6=_0x434186[_0xcdb218(0x179)](_0x37c68b=>({'type':_0xcdb218(0x17d),'path':_0x37c68b[_0xcdb218(0x17c)],'label':_0x37c68b['label'],'loadScriptMode':_0xcdb218(0x188),'resources':[..._0x42d041]}));if(_0x116cec[_0xcdb218(0x17b)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x434186,'plannedMenus':_0x3ec6b6};const _0x4a5a0f=await createMenus(_0x5807ca,_0x3969a8,_0x434186,_0x42d041[_0xcdb218(0x197)]>0x0?_0x42d041:undefined);return logger['info'](_0xcdb218(0x185),_0xcdb218(0x19b),{'count':_0x434186[_0xcdb218(0x197)],'resources':_0x42d041}),{'created':_0x4a5a0f[_0xcdb218(0x197)],'skipped':![],'dryRun':![],'targetPages':_0x434186,'plannedMenus':_0x3ec6b6,'menus':_0x4a5a0f};}export function parseMenuSyncParams(_0x310316){const _0x10420b=a129_0x1366fa;if(!_0x310316||typeof _0x310316!=='string')return{};let _0x5c450d;try{_0x5c450d=JSON['parse'](_0x310316);}catch{throw new Error(_0x10420b(0x171));}if(typeof _0x5c450d!==_0x10420b(0x189)||_0x5c450d===null||Array['isArray'](_0x5c450d))throw new Error(_0x10420b(0x172));const _0x50b7d4=_0x5c450d;if(Object[_0x10420b(0x19f)](_0x50b7d4,_0x10420b(0x18c)))throw new Error(_0x10420b(0x170));const _0x133959=Object[_0x10420b(0x176)](_0x50b7d4)[_0x10420b(0x184)](_0x3195cb=>!MENU_SYNC_PARAM_KEYS[_0x10420b(0x174)](_0x3195cb));if(_0x133959['length']>0x0)throw new Error(_0x10420b(0x19d)+_0x133959[_0x10420b(0x19e)](',\x20')+'.');for(const _0x430c70 of MENU_SYNC_PARAM_KEYS){const _0x40f10d=_0x50b7d4[_0x430c70];if(_0x40f10d!==undefined&&(typeof _0x40f10d!=='string'||_0x40f10d[_0x10420b(0x18f)]()===''))throw new Error(_0x10420b(0x17e)+_0x430c70+':\x20expected\x20a\x20non-empty\x20string.');}return{'jsUrl':typeof _0x50b7d4[_0x10420b(0x18a)]===_0x10420b(0x192)?_0x50b7d4['jsUrl'][_0x10420b(0x18f)]():undefined,'cssUrl':typeof _0x50b7d4[_0x10420b(0x177)]===_0x10420b(0x192)?_0x50b7d4['cssUrl'][_0x10420b(0x18f)]():undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x25cab8,_0x267ee9){const _0x2df8db=a133_0x5472,_0x19b3d3=_0x25cab8();while(!![]){try{const _0x32e3b9=-parseInt(_0x2df8db(0x229))/0x1+-parseInt(_0x2df8db(0x204))/0x2*(parseInt(_0x2df8db(0x212))/0x3)+-parseInt(_0x2df8db(0x21c))/0x4+parseInt(_0x2df8db(0x211))/0x5*(-parseInt(_0x2df8db(0x225))/0x6)+parseInt(_0x2df8db(0x208))/0x7+-parseInt(_0x2df8db(0x219))/0x8*(-parseInt(_0x2df8db(0x20f))/0x9)+parseInt(_0x2df8db(0x22e))/0xa;if(_0x32e3b9===_0x267ee9)break;else _0x19b3d3['push'](_0x19b3d3['shift']());}catch(_0x4411fe){_0x19b3d3['push'](_0x19b3d3['shift']());}}}(a133_0xb428,0xe339b));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';function a133_0xb428(){const _0x2c3432=['3676162LGJuAR','status','JS\x20URL\x20is\x20unreachable:\x20','jsUrl','4954803EdHaVJ','.\x20Allowed\x20values:\x20replace,\x20patch','object','.css','menu-asset-update','menu\x20asset-update\x20cannot\x20patch\x20','dryRun','639VRwbYS','\x22\x20(','580WrZBQJ','3RuqOkg','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','trim','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','--params.','label','menuIds','176856DueyXY','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','endsWith','2097384WSKYin','isArray','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','extend','length','path','paths','has','allSettled','22890slLcRq','join','map','push','258679LdqyRi','patch','mode','loadScriptMode','setLogPath','17169350KNXcJB','after','resources','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','message','cssUrl','\x20existing\x20JS\x20resources\x20for\x20\x22','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','Menu\x20asset\x20update\x20completed','some','value','filter','Start\x20non-interactive\x20menu\x20asset\x20update','parse','selection','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22',').\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','toLowerCase','string','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','all'];a133_0xb428=function(){return _0x2c3432;};return a133_0xb428();}function a133_0x5472(_0x156fd7,_0x32cd93){_0x156fd7=_0x156fd7-0x1ec;const _0xb42864=a133_0xb428();let _0x547219=_0xb42864[_0x156fd7];return _0x547219;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x1bf5c2){const _0x450367=a133_0x5472,_0x565948=[];return _0x1bf5c2[_0x450367(0x207)]&&!isValidJsHttpsUrl(_0x1bf5c2['jsUrl'])&&_0x565948[_0x450367(0x228)]({'field':'jsUrl','message':_0x450367(0x1ee)}),_0x1bf5c2[_0x450367(0x1f0)]&&!isValidCssHttpsUrl(_0x1bf5c2[_0x450367(0x1f0)])&&_0x565948[_0x450367(0x228)]({'field':'cssUrl','message':_0x450367(0x1ff)}),_0x565948;}export async function runMenuUpdateCore(_0x394d4e,_0x5111f3,_0x35e15d,_0x2759c8={}){const _0x3735bc=a133_0x5472,_0xb4cc83=parseUpdateParamsFlag(_0x35e15d),_0x105e31=normalizeMode(_0x2759c8[_0x3735bc(0x22b)]);validateSelection(_0x2759c8['selection']);const _0x112786=[];if(_0xb4cc83[_0x3735bc(0x207)])_0x112786[_0x3735bc(0x228)](_0xb4cc83['jsUrl']);if(_0xb4cc83[_0x3735bc(0x1f0)])_0x112786[_0x3735bc(0x228)](_0xb4cc83[_0x3735bc(0x1f0)]);const _0x36b699=validateParams(_0xb4cc83);if(_0x36b699[_0x3735bc(0x220)]>0x0){const _0x38a571=_0x36b699[_0x3735bc(0x227)](_0x1b96fa=>_0x3735bc(0x216)+_0x1b96fa['field']+':\x20'+_0x1b96fa[_0x3735bc(0x1ef)])[_0x3735bc(0x226)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x38a571);}if(_0x112786[_0x3735bc(0x220)]===0x0)throw new Error(_0x3735bc(0x202)+_0x3735bc(0x1f2));logger[_0x3735bc(0x22d)](process['cwd']()),logger['info']('menu-asset-update',_0x3735bc(0x1f9),{'appCode':_0x394d4e,'jsUrl':_0xb4cc83[_0x3735bc(0x207)],'cssUrl':_0xb4cc83[_0x3735bc(0x1f0)],'mode':_0x105e31,'dryRun':_0x2759c8[_0x3735bc(0x20e)]===!![]});if(_0xb4cc83[_0x3735bc(0x207)]){const _0x4f7e15=await isUrlReachable(_0xb4cc83[_0x3735bc(0x207)]);if(!_0x4f7e15)throw new Error(_0x3735bc(0x206)+_0xb4cc83['jsUrl']);}if(_0xb4cc83[_0x3735bc(0x1f0)]){const _0x558baa=await isUrlReachable(_0xb4cc83['cssUrl']);if(!_0x558baa)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0xb4cc83[_0x3735bc(0x1f0)]);}const _0x286437=await getOnlineMenuList(_0x394d4e,_0x5111f3),_0x3b4d83=_0x286437[_0x3735bc(0x1f8)](_0x1307f6=>_0x1307f6['resources'][_0x3735bc(0x220)]>0x0),_0x2b3690=selectMenusForUpdate(_0x3b4d83,_0x2759c8[_0x3735bc(0x1fb)]);if(_0x2b3690[_0x3735bc(0x220)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x2759c8['dryRun']===!![]};const _0x4b508c=_0x2b3690[_0x3735bc(0x227)](_0xb090ee=>buildMenuUpdateDiff(_0xb090ee,_0xb4cc83,_0x105e31,_0x2759c8['force']===!![],_0x2759c8[_0x3735bc(0x22c)]));if(_0x2759c8['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x4b508c};const _0x5cff2c=await Promise[_0x3735bc(0x224)](_0x2b3690[_0x3735bc(0x227)]((_0x1b7484,_0x5bd79e)=>updateMenuCdnUrl(_0x394d4e,_0x5111f3,{'id':_0x1b7484['id'],'label':_0x1b7484[_0x3735bc(0x217)],'path':_0x1b7484[_0x3735bc(0x221)],'resources':_0x4b508c[_0x5bd79e][_0x3735bc(0x1ec)]['resources'],'extend':_0x1b7484[_0x3735bc(0x21f)]??null,'loadScriptMode':_0x2759c8[_0x3735bc(0x22c)]}))),_0x1b56ae=_0x5cff2c[_0x3735bc(0x1f8)](_0x1388b8=>_0x1388b8['status']==='fulfilled')[_0x3735bc(0x227)](_0xe5b30c=>_0xe5b30c[_0x3735bc(0x1f7)]),_0x280d54=_0x5cff2c[_0x3735bc(0x1f8)](_0x3f6dcf=>_0x3f6dcf[_0x3735bc(0x205)]==='rejected')['length'];return logger['info'](_0x3735bc(0x20c),_0x3735bc(0x1f5),{'count':_0x2b3690[_0x3735bc(0x220)],'resources':_0x112786}),{'updated':_0x1b56ae[_0x3735bc(0x220)],'failed':_0x280d54,'skipped':![],'menus':_0x1b56ae};}function validateSelection(_0x3eac65){const _0x3d5019=a133_0x5472;if(!_0x3eac65)throw new Error(_0x3d5019(0x21a));if(_0x3eac65[_0x3d5019(0x203)]&&(_0x3eac65[_0x3d5019(0x218)][_0x3d5019(0x220)]>0x0||_0x3eac65[_0x3d5019(0x222)][_0x3d5019(0x220)]>0x0))throw new Error(_0x3d5019(0x1f4));if(!_0x3eac65[_0x3d5019(0x203)]&&_0x3eac65[_0x3d5019(0x218)][_0x3d5019(0x220)]===0x0&&_0x3eac65[_0x3d5019(0x222)][_0x3d5019(0x220)]===0x0)throw new Error(_0x3d5019(0x21a));}export function selectMenusForUpdate(_0x520b76,_0x401147){const _0x2e036f=a133_0x5472;validateSelection(_0x401147);if(_0x401147[_0x2e036f(0x203)])return _0x520b76;const _0x2b5959=new Set(_0x520b76[_0x2e036f(0x227)](_0x3f392e=>_0x3f392e['id'])),_0x5b714c=new Set(_0x520b76['map'](_0x1c5b85=>_0x1c5b85['path'])),_0x525413=_0x401147['menuIds'][_0x2e036f(0x1f8)](_0x696433=>!_0x2b5959[_0x2e036f(0x223)](_0x696433)),_0xc93528=_0x401147[_0x2e036f(0x222)][_0x2e036f(0x1f8)](_0x54ca20=>!_0x5b714c[_0x2e036f(0x223)](_0x54ca20));if(_0x525413[_0x2e036f(0x220)]>0x0||_0xc93528[_0x2e036f(0x220)]>0x0){const _0xa320b7=[..._0x525413[_0x2e036f(0x227)](_0x9a0078=>String(_0x9a0078)),..._0xc93528][_0x2e036f(0x226)](',\x20');throw new Error(_0x2e036f(0x215)+_0xa320b7);}const _0x5bb2b2=new Set(_0x401147[_0x2e036f(0x218)]),_0x506099=new Set(_0x401147[_0x2e036f(0x222)]);return _0x520b76[_0x2e036f(0x1f8)](_0x181d0e=>_0x5bb2b2[_0x2e036f(0x223)](_0x181d0e['id'])||_0x506099[_0x2e036f(0x223)](_0x181d0e['path']));}function normalizeMode(_0x5b0b63){const _0x4b9cb3=a133_0x5472;if(!_0x5b0b63)return'patch';if(_0x5b0b63==='replace'||_0x5b0b63===_0x4b9cb3(0x22a))return _0x5b0b63;throw new Error('Invalid\x20--mode:\x20'+_0x5b0b63+_0x4b9cb3(0x209));}function buildMenuUpdateDiff(_0x2c69bc,_0x330315,_0x550309,_0x76ffca,_0x22fcd3){const _0x47859d=a133_0x5472,_0x473fab=[..._0x2c69bc[_0x47859d(0x1ed)]];_0x550309===_0x47859d(0x22a)&&assertUnambiguousPatchResources(_0x2c69bc,_0x473fab,_0x330315);const _0x45cbc9=_0x550309===_0x47859d(0x22a)?patchResources(_0x473fab,_0x330315):replaceResources(_0x330315),_0x4413e0=[],_0x4f5b0b=_0x473fab['some'](isJsResource),_0x181b0c=_0x45cbc9[_0x47859d(0x1f6)](isJsResource);if(_0x4f5b0b&&!_0x181b0c){const _0x8cf551=_0x47859d(0x1fd)+_0x2c69bc[_0x47859d(0x217)]+_0x47859d(0x210)+_0x2c69bc['path']+_0x47859d(0x1fe)+_0x47859d(0x21e);if(!_0x76ffca)throw new Error(_0x8cf551);_0x4413e0[_0x47859d(0x228)](_0x8cf551);}const _0x5b1e26=_0x473fab[_0x47859d(0x1f6)](isCssResource),_0x3650e2=_0x45cbc9[_0x47859d(0x1f6)](isCssResource);_0x5b1e26&&!_0x3650e2&&_0x4413e0['push'](_0x47859d(0x1f3)+_0x2c69bc[_0x47859d(0x217)]+_0x47859d(0x210)+_0x2c69bc['path']+').');const _0x1fd3f9=typeof _0x2c69bc[_0x47859d(0x21f)]?.['loadScriptMode']===_0x47859d(0x201)?_0x2c69bc[_0x47859d(0x21f)][_0x47859d(0x22c)]:null,_0x583d29=_0x22fcd3?{'loadScriptMode':_0x1fd3f9}:{},_0x320dbe=_0x22fcd3?{'loadScriptMode':_0x22fcd3}:{};return{'id':_0x2c69bc['id'],'label':_0x2c69bc['label'],'path':_0x2c69bc[_0x47859d(0x221)],'mode':_0x550309,'before':{'resources':_0x473fab,..._0x583d29},'after':{'resources':_0x45cbc9,..._0x320dbe},'warnings':_0x4413e0};}function replaceResources(_0x456577){const _0x399d81=a133_0x5472;return[_0x456577[_0x399d81(0x207)],_0x456577[_0x399d81(0x1f0)]]['filter'](_0x5e0f15=>!!_0x5e0f15);}function assertUnambiguousPatchResources(_0x29e298,_0x2aefb3,_0x6e4fa2){const _0x16adbf=a133_0x5472,_0x2c2661=_0x2aefb3[_0x16adbf(0x1f8)](isJsResource)[_0x16adbf(0x220)];if(_0x6e4fa2[_0x16adbf(0x207)]&&_0x2c2661>0x1)throw new Error(_0x16adbf(0x20d)+_0x2c2661+_0x16adbf(0x1f1)+_0x29e298['label']+_0x16adbf(0x210)+_0x29e298[_0x16adbf(0x221)]+')\x20'+_0x16adbf(0x1fc));const _0x2a1ec8=_0x2aefb3[_0x16adbf(0x1f8)](isCssResource)[_0x16adbf(0x220)];if(_0x6e4fa2[_0x16adbf(0x1f0)]&&_0x2a1ec8>0x1)throw new Error(_0x16adbf(0x20d)+_0x2a1ec8+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x29e298[_0x16adbf(0x217)]+'\x22\x20('+_0x29e298[_0x16adbf(0x221)]+')\x20'+_0x16adbf(0x213));}function patchResources(_0x4b908f,_0x2afe9a){const _0x20fbcd=a133_0x5472;let _0x3c5b85=![],_0x1c8ee2=![];const _0x79c28c=[];for(const _0x3f30e8 of _0x4b908f){if(isJsResource(_0x3f30e8)){if(_0x2afe9a[_0x20fbcd(0x207)]&&!_0x3c5b85)_0x79c28c[_0x20fbcd(0x228)](_0x2afe9a['jsUrl']),_0x3c5b85=!![];else!_0x2afe9a['jsUrl']&&_0x79c28c[_0x20fbcd(0x228)](_0x3f30e8);continue;}if(isCssResource(_0x3f30e8)){if(_0x2afe9a['cssUrl']&&!_0x1c8ee2)_0x79c28c[_0x20fbcd(0x228)](_0x2afe9a[_0x20fbcd(0x1f0)]),_0x1c8ee2=!![];else!_0x2afe9a[_0x20fbcd(0x1f0)]&&_0x79c28c['push'](_0x3f30e8);continue;}_0x79c28c[_0x20fbcd(0x228)](_0x3f30e8);}return _0x2afe9a[_0x20fbcd(0x207)]&&!_0x3c5b85&&_0x79c28c['unshift'](_0x2afe9a[_0x20fbcd(0x207)]),_0x2afe9a[_0x20fbcd(0x1f0)]&&!_0x1c8ee2&&_0x79c28c[_0x20fbcd(0x228)](_0x2afe9a[_0x20fbcd(0x1f0)]),_0x79c28c;}function isJsResource(_0x22c97a){const _0x5d6508=a133_0x5472;return stripQuery(_0x22c97a)[_0x5d6508(0x200)]()[_0x5d6508(0x21b)]('.js');}function isCssResource(_0x58c022){const _0x54c439=a133_0x5472;return stripQuery(_0x58c022)[_0x54c439(0x200)]()[_0x54c439(0x21b)](_0x54c439(0x20b));}function stripQuery(_0x5d74be){return _0x5d74be['split']('?')[0x0]??_0x5d74be;}function parseUpdateParamsFlag(_0x2560ec){const _0x4f0155=a133_0x5472;if(!_0x2560ec||typeof _0x2560ec!==_0x4f0155(0x201))return{};try{const _0x1eab1b=JSON[_0x4f0155(0x1fa)](_0x2560ec);if(typeof _0x1eab1b!==_0x4f0155(0x20a)||_0x1eab1b===null||Array[_0x4f0155(0x21d)](_0x1eab1b))return{};return{'jsUrl':typeof _0x1eab1b[_0x4f0155(0x207)]===_0x4f0155(0x201)?_0x1eab1b['jsUrl'][_0x4f0155(0x214)]():undefined,'cssUrl':typeof _0x1eab1b[_0x4f0155(0x1f0)]===_0x4f0155(0x201)?_0x1eab1b[_0x4f0155(0x1f0)]['trim']():undefined};}catch{return{};}}
|
|
1
|
+
(function(_0x1db120,_0x2e0aa3){const _0xaa0b7f=a131_0x41e7,_0x2b5c13=_0x1db120();while(!![]){try{const _0x54c202=parseInt(_0xaa0b7f(0x1c1))/0x1+-parseInt(_0xaa0b7f(0x196))/0x2+parseInt(_0xaa0b7f(0x1a0))/0x3*(-parseInt(_0xaa0b7f(0x1c7))/0x4)+-parseInt(_0xaa0b7f(0x1c0))/0x5*(-parseInt(_0xaa0b7f(0x1b5))/0x6)+-parseInt(_0xaa0b7f(0x1b9))/0x7+parseInt(_0xaa0b7f(0x1ce))/0x8+-parseInt(_0xaa0b7f(0x1af))/0x9*(parseInt(_0xaa0b7f(0x1d2))/0xa);if(_0x54c202===_0x2e0aa3)break;else _0x2b5c13['push'](_0x2b5c13['shift']());}catch(_0x2dcfce){_0x2b5c13['push'](_0x2b5c13['shift']());}}}(a131_0x5a94,0xa2fa2));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 a131_0x41e7(_0x5c050f,_0x202fb9){_0x5c050f=_0x5c050f-0x190;const _0x5a9421=a131_0x5a94();let _0x41e7f0=_0x5a9421[_0x5c050f];return _0x41e7f0;}function validateParams(_0x562971){const _0x51e4df=a131_0x41e7,_0x325df4=[];return _0x562971[_0x51e4df(0x1ae)]&&!isValidJsHttpsUrl(_0x562971[_0x51e4df(0x1ae)])&&_0x325df4[_0x51e4df(0x1bb)]({'field':'jsUrl','message':_0x51e4df(0x1c2)}),_0x562971[_0x51e4df(0x197)]&&!isValidCssHttpsUrl(_0x562971[_0x51e4df(0x197)])&&_0x325df4[_0x51e4df(0x1bb)]({'field':'cssUrl','message':_0x51e4df(0x1be)}),_0x325df4;}export async function runMenuUpdateCore(_0x5c4fc9,_0x20d959,_0x430638,_0xbdc812={}){const _0x3a80d6=a131_0x41e7,_0x275a40=parseUpdateParamsFlag(_0x430638),_0x8d9342=normalizeMode(_0xbdc812[_0x3a80d6(0x1b0)]);validateSelection(_0xbdc812[_0x3a80d6(0x1ac)]);const _0x20be1e=[];if(_0x275a40['jsUrl'])_0x20be1e[_0x3a80d6(0x1bb)](_0x275a40[_0x3a80d6(0x1ae)]);if(_0x275a40[_0x3a80d6(0x197)])_0x20be1e['push'](_0x275a40[_0x3a80d6(0x197)]);const _0x2657b5=validateParams(_0x275a40);if(_0x2657b5[_0x3a80d6(0x1b7)]>0x0){const _0x13c332=_0x2657b5[_0x3a80d6(0x1bc)](_0x5db6cf=>_0x3a80d6(0x1a2)+_0x5db6cf[_0x3a80d6(0x1cd)]+':\x20'+_0x5db6cf[_0x3a80d6(0x193)])[_0x3a80d6(0x195)](';\x20');throw new Error(_0x3a80d6(0x1a8)+_0x13c332);}if(_0x20be1e[_0x3a80d6(0x1b7)]===0x0)throw new Error(_0x3a80d6(0x1c5)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x3a80d6(0x1cf)](process['cwd']()),logger[_0x3a80d6(0x1a1)](_0x3a80d6(0x1c6),'Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x5c4fc9,'jsUrl':_0x275a40['jsUrl'],'cssUrl':_0x275a40['cssUrl'],'mode':_0x8d9342,'dryRun':_0xbdc812['dryRun']===!![]});if(_0x275a40[_0x3a80d6(0x1ae)]){const _0x481ed9=await isUrlReachable(_0x275a40[_0x3a80d6(0x1ae)]);if(!_0x481ed9)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x275a40[_0x3a80d6(0x1ae)]);}if(_0x275a40[_0x3a80d6(0x197)]){const _0x13e84c=await isUrlReachable(_0x275a40['cssUrl']);if(!_0x13e84c)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x275a40['cssUrl']);}const _0x342329=await getOnlineMenuList(_0x5c4fc9,_0x20d959),_0x4d3ed1=_0x342329[_0x3a80d6(0x19b)](_0x30f0a9=>_0x30f0a9[_0x3a80d6(0x1b1)]['length']>0x0),_0x4c6d44=selectMenusForUpdate(_0x4d3ed1,_0xbdc812[_0x3a80d6(0x1ac)]);if(_0x4c6d44[_0x3a80d6(0x1b7)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0xbdc812[_0x3a80d6(0x1b4)]===!![]};const _0x115400=_0x4c6d44['map'](_0x12b20a=>buildMenuUpdateDiff(_0x12b20a,_0x275a40,_0x8d9342,_0xbdc812[_0x3a80d6(0x19f)]===!![],_0xbdc812['loadScriptMode']));if(_0xbdc812[_0x3a80d6(0x1b4)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x115400};const _0x5dae13=await Promise[_0x3a80d6(0x1b3)](_0x4c6d44[_0x3a80d6(0x1bc)]((_0xc615c0,_0xa305c)=>updateMenuCdnUrl(_0x5c4fc9,_0x20d959,{'id':_0xc615c0['id'],'label':_0xc615c0[_0x3a80d6(0x1a6)],'path':_0xc615c0[_0x3a80d6(0x192)],'resources':_0x115400[_0xa305c][_0x3a80d6(0x1a9)]['resources'],'extend':_0xc615c0[_0x3a80d6(0x1c8)]??null,'loadScriptMode':_0xbdc812['loadScriptMode']}))),_0x33a166=_0x5dae13[_0x3a80d6(0x19b)](_0x1c63c7=>_0x1c63c7[_0x3a80d6(0x1ad)]==='fulfilled')[_0x3a80d6(0x1bc)](_0x41c376=>_0x41c376[_0x3a80d6(0x199)]),_0x323b97=_0x5dae13['filter'](_0x30003e=>_0x30003e[_0x3a80d6(0x1ad)]===_0x3a80d6(0x19a))[_0x3a80d6(0x1b7)];return logger[_0x3a80d6(0x1a1)]('menu-asset-update','Menu\x20asset\x20update\x20completed',{'count':_0x4c6d44[_0x3a80d6(0x1b7)],'resources':_0x20be1e}),{'updated':_0x33a166[_0x3a80d6(0x1b7)],'failed':_0x323b97,'skipped':![],'menus':_0x33a166};}function a131_0x5a94(){const _0xad96d6=['menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','unshift','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','trim','path','message','some','join','112342hrTzEk','cssUrl','\x20existing\x20JS\x20resources\x20for\x20\x22','value','rejected','filter','toLowerCase','all','\x22\x20(','force','2609490SJHdds','info','--params.','.js','object','.css','label','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','Invalid\x20--params:\x20','after','menu\x20asset-update\x20cannot\x20patch\x20','has','selection','status','jsUrl','9fGucjx','mode','resources','.\x20Allowed\x20values:\x20replace,\x20patch','allSettled','dryRun','150924zbMwRm','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','length','replace','726516lhkUhK','menuIds','push','map','isArray','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','string','135hfodJe','339716QZCgyN','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','patch','endsWith','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','menu-asset-update','4YUyDNq','extend','loadScriptMode','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','Invalid\x20--mode:\x20','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','field','5936720lvRlAF','setLogPath','paths','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','636210YYQrWK','parse'];a131_0x5a94=function(){return _0xad96d6;};return a131_0x5a94();}function validateSelection(_0x13c8aa){const _0xb31f6=a131_0x41e7;if(!_0x13c8aa)throw new Error(_0xb31f6(0x1d4));if(_0x13c8aa['all']&&(_0x13c8aa[_0xb31f6(0x1ba)]['length']>0x0||_0x13c8aa[_0xb31f6(0x1d0)][_0xb31f6(0x1b7)]>0x0))throw new Error(_0xb31f6(0x1ca));if(!_0x13c8aa['all']&&_0x13c8aa[_0xb31f6(0x1ba)]['length']===0x0&&_0x13c8aa[_0xb31f6(0x1d0)][_0xb31f6(0x1b7)]===0x0)throw new Error(_0xb31f6(0x1d4));}export function selectMenusForUpdate(_0x46595a,_0x485aee){const _0x34913e=a131_0x41e7;validateSelection(_0x485aee);if(_0x485aee[_0x34913e(0x19d)])return _0x46595a;const _0x46524e=new Set(_0x46595a[_0x34913e(0x1bc)](_0xad5cc4=>_0xad5cc4['id'])),_0x20887f=new Set(_0x46595a[_0x34913e(0x1bc)](_0x34e6b8=>_0x34e6b8[_0x34913e(0x192)])),_0x4eeff7=_0x485aee[_0x34913e(0x1ba)][_0x34913e(0x19b)](_0x2e25ef=>!_0x46524e[_0x34913e(0x1ab)](_0x2e25ef)),_0x4ed7b0=_0x485aee[_0x34913e(0x1d0)][_0x34913e(0x19b)](_0x320a53=>!_0x20887f[_0x34913e(0x1ab)](_0x320a53));if(_0x4eeff7[_0x34913e(0x1b7)]>0x0||_0x4ed7b0[_0x34913e(0x1b7)]>0x0){const _0x471fda=[..._0x4eeff7['map'](_0x3ea466=>String(_0x3ea466)),..._0x4ed7b0][_0x34913e(0x195)](',\x20');throw new Error(_0x34913e(0x1b6)+_0x471fda);}const _0x38f5b3=new Set(_0x485aee[_0x34913e(0x1ba)]),_0x364213=new Set(_0x485aee[_0x34913e(0x1d0)]);return _0x46595a['filter'](_0x3b79cc=>_0x38f5b3[_0x34913e(0x1ab)](_0x3b79cc['id'])||_0x364213[_0x34913e(0x1ab)](_0x3b79cc[_0x34913e(0x192)]));}function normalizeMode(_0x5bcc10){const _0x27e0bb=a131_0x41e7;if(!_0x5bcc10)return'patch';if(_0x5bcc10===_0x27e0bb(0x1b8)||_0x5bcc10===_0x27e0bb(0x1c3))return _0x5bcc10;throw new Error(_0x27e0bb(0x1cb)+_0x5bcc10+_0x27e0bb(0x1b2));}function buildMenuUpdateDiff(_0x2fbb3e,_0x2e92d9,_0x382b64,_0x52cef5,_0x41475f){const _0x3d19e2=a131_0x41e7,_0x25792f=[..._0x2fbb3e['resources']];_0x382b64==='patch'&&assertUnambiguousPatchResources(_0x2fbb3e,_0x25792f,_0x2e92d9);const _0x3cc5c0=_0x382b64===_0x3d19e2(0x1c3)?patchResources(_0x25792f,_0x2e92d9):replaceResources(_0x2e92d9),_0x2f7ec5=[],_0x4ec684=_0x25792f[_0x3d19e2(0x194)](isJsResource),_0x42387a=_0x3cc5c0['some'](isJsResource);if(_0x4ec684&&!_0x42387a){const _0x2233eb=_0x3d19e2(0x1cc)+_0x2fbb3e[_0x3d19e2(0x1a6)]+_0x3d19e2(0x19e)+_0x2fbb3e[_0x3d19e2(0x192)]+').\x20'+_0x3d19e2(0x1a7);if(!_0x52cef5)throw new Error(_0x2233eb);_0x2f7ec5[_0x3d19e2(0x1bb)](_0x2233eb);}const _0x2b9ae3=_0x25792f[_0x3d19e2(0x194)](isCssResource),_0x8a213=_0x3cc5c0[_0x3d19e2(0x194)](isCssResource);_0x2b9ae3&&!_0x8a213&&_0x2f7ec5['push'](_0x3d19e2(0x1d1)+_0x2fbb3e[_0x3d19e2(0x1a6)]+_0x3d19e2(0x19e)+_0x2fbb3e[_0x3d19e2(0x192)]+').');const _0x34df8e=typeof _0x2fbb3e['extend']?.[_0x3d19e2(0x1c9)]===_0x3d19e2(0x1bf)?_0x2fbb3e[_0x3d19e2(0x1c8)][_0x3d19e2(0x1c9)]:null,_0x1e04c0=_0x41475f?{'loadScriptMode':_0x34df8e}:{},_0x50d7b7=_0x41475f?{'loadScriptMode':_0x41475f}:{};return{'id':_0x2fbb3e['id'],'label':_0x2fbb3e[_0x3d19e2(0x1a6)],'path':_0x2fbb3e[_0x3d19e2(0x192)],'mode':_0x382b64,'before':{'resources':_0x25792f,..._0x1e04c0},'after':{'resources':_0x3cc5c0,..._0x50d7b7},'warnings':_0x2f7ec5};}function replaceResources(_0x5b642f){const _0xb3a495=a131_0x41e7;return[_0x5b642f[_0xb3a495(0x1ae)],_0x5b642f[_0xb3a495(0x197)]][_0xb3a495(0x19b)](_0x34a03d=>!!_0x34a03d);}function assertUnambiguousPatchResources(_0x257a1e,_0x5bb069,_0x3c5c78){const _0x2e6fed=a131_0x41e7,_0x2cf60b=_0x5bb069[_0x2e6fed(0x19b)](isJsResource)[_0x2e6fed(0x1b7)];if(_0x3c5c78[_0x2e6fed(0x1ae)]&&_0x2cf60b>0x1)throw new Error(_0x2e6fed(0x1aa)+_0x2cf60b+_0x2e6fed(0x198)+_0x257a1e[_0x2e6fed(0x1a6)]+_0x2e6fed(0x19e)+_0x257a1e[_0x2e6fed(0x192)]+')\x20'+_0x2e6fed(0x190));const _0x287b2c=_0x5bb069['filter'](isCssResource)[_0x2e6fed(0x1b7)];if(_0x3c5c78[_0x2e6fed(0x197)]&&_0x287b2c>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x287b2c+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x257a1e[_0x2e6fed(0x1a6)]+'\x22\x20('+_0x257a1e[_0x2e6fed(0x192)]+')\x20'+'with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');}function patchResources(_0x25b098,_0x371e27){const _0xcff426=a131_0x41e7;let _0x509a22=![],_0x1c08cf=![];const _0x39a993=[];for(const _0x489e28 of _0x25b098){if(isJsResource(_0x489e28)){if(_0x371e27[_0xcff426(0x1ae)]&&!_0x509a22)_0x39a993[_0xcff426(0x1bb)](_0x371e27['jsUrl']),_0x509a22=!![];else!_0x371e27[_0xcff426(0x1ae)]&&_0x39a993['push'](_0x489e28);continue;}if(isCssResource(_0x489e28)){if(_0x371e27[_0xcff426(0x197)]&&!_0x1c08cf)_0x39a993[_0xcff426(0x1bb)](_0x371e27['cssUrl']),_0x1c08cf=!![];else!_0x371e27[_0xcff426(0x197)]&&_0x39a993[_0xcff426(0x1bb)](_0x489e28);continue;}_0x39a993['push'](_0x489e28);}return _0x371e27['jsUrl']&&!_0x509a22&&_0x39a993[_0xcff426(0x1d5)](_0x371e27[_0xcff426(0x1ae)]),_0x371e27[_0xcff426(0x197)]&&!_0x1c08cf&&_0x39a993['push'](_0x371e27[_0xcff426(0x197)]),_0x39a993;}function isJsResource(_0x32277b){const _0x3d7c78=a131_0x41e7;return stripQuery(_0x32277b)[_0x3d7c78(0x19c)]()[_0x3d7c78(0x1c4)](_0x3d7c78(0x1a3));}function isCssResource(_0x32372b){const _0x3d188a=a131_0x41e7;return stripQuery(_0x32372b)['toLowerCase']()['endsWith'](_0x3d188a(0x1a5));}function stripQuery(_0xc46958){return _0xc46958['split']('?')[0x0]??_0xc46958;}function parseUpdateParamsFlag(_0x396f28){const _0x168d0e=a131_0x41e7;if(!_0x396f28||typeof _0x396f28!==_0x168d0e(0x1bf))return{};try{const _0x177c31=JSON[_0x168d0e(0x1d3)](_0x396f28);if(typeof _0x177c31!==_0x168d0e(0x1a4)||_0x177c31===null||Array[_0x168d0e(0x1bd)](_0x177c31))return{};return{'jsUrl':typeof _0x177c31[_0x168d0e(0x1ae)]===_0x168d0e(0x1bf)?_0x177c31[_0x168d0e(0x1ae)][_0x168d0e(0x191)]():undefined,'cssUrl':typeof _0x177c31[_0x168d0e(0x197)]==='string'?_0x177c31['cssUrl'][_0x168d0e(0x191)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a132_0x2bd6(){const _0x4cc87d=['4085850ZsPicy','23997862eKNXsl','823945HHNEjt','508664GOrxsi','4864827bWCoQi','trim','4250708GbxPte','3921680YrFptZ'];a132_0x2bd6=function(){return _0x4cc87d;};return a132_0x2bd6();}function a132_0x2bb3(_0x2a7e82,_0x3331a2){_0x2a7e82=_0x2a7e82-0x6a;const _0x2bd628=a132_0x2bd6();let _0x2bb34f=_0x2bd628[_0x2a7e82];return _0x2bb34f;}(function(_0x2f1c35,_0x1baf2f){const _0x565edb=a132_0x2bb3,_0x1b715e=_0x2f1c35();while(!![]){try{const _0x399fc0=-parseInt(_0x565edb(0x71))/0x1+parseInt(_0x565edb(0x6a))/0x2+-parseInt(_0x565edb(0x6b))/0x3+parseInt(_0x565edb(0x6d))/0x4+-parseInt(_0x565edb(0x6e))/0x5+-parseInt(_0x565edb(0x6f))/0x6+parseInt(_0x565edb(0x70))/0x7;if(_0x399fc0===_0x1baf2f)break;else _0x1b715e['push'](_0x1b715e['shift']());}catch(_0x153ecf){_0x1b715e['push'](_0x1b715e['shift']());}}}(a132_0x2bd6,0xcbb6a));export function isValidJsHttpsUrl(_0x44330a){const _0x554d79=a132_0x2bb3;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x44330a[_0x554d79(0x6c)]());}export function isValidCssHttpsUrl(_0x13f108){const _0x67a7b1=a132_0x2bb3;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x13f108[_0x67a7b1(0x6c)]());}export async function isUrlReachable(_0x19c22d){try{const _0x8ba6d4=await fetch(_0x19c22d,{'method':'HEAD'});return _0x8ba6d4['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a133_0x46fe03=a133_0x17ae;(function(_0x52870,_0x13ab5d){const _0x1ba8c8=a133_0x17ae,_0x45df1a=_0x52870();while(!![]){try{const _0x328b06=-parseInt(_0x1ba8c8(0xd8))/0x1+-parseInt(_0x1ba8c8(0xe3))/0x2*(-parseInt(_0x1ba8c8(0xef))/0x3)+parseInt(_0x1ba8c8(0x10b))/0x4+-parseInt(_0x1ba8c8(0xcc))/0x5+parseInt(_0x1ba8c8(0xd2))/0x6*(parseInt(_0x1ba8c8(0xd4))/0x7)+-parseInt(_0x1ba8c8(0xd0))/0x8+-parseInt(_0x1ba8c8(0x101))/0x9;if(_0x328b06===_0x13ab5d)break;else _0x45df1a['push'](_0x45df1a['shift']());}catch(_0x8997f8){_0x45df1a['push'](_0x45df1a['shift']());}}}(a133_0x1e40,0x80f24));import a133_0x557e6f from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a133_0x1e40(){const _0x11dadb=['menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20\x20✓\x20Selected:\x20','Would\x20create\x20','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','targetPages','validation','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','yes','1636839Krkjnt','split','selectedAppName','Sync\x20local\x20pages\x20as\x20platform\x20menus','skipped','cyan','trim','params','message','cssUrl','3857448aXHMuh','Online\x20menu\x20list\x20fetched','boolean','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','appcode','2830635wIRCVX','yellow','Menu\x20creation\x20failed','paths','5781832vDPmkl','\x20created.','63174vAHzom','Menu\x20sync\x20completed:\x20','658snTPdx','length','string','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','391512IZwSsH','\x20\x20Create\x20','Fetching\x20online\x20menu\x20list...','cookie','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','\x20created,\x20','POST','\x20\x20Continue\x20with\x20creation?','write','str','created','2arYWJX','\x20menu(s)','\x20page(s)','menu','appCode','rawFlags','jsUrl','\x20\x20Cancelled.','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','failed','localPages','Pre-fill\x20JS/CSS\x20URLs.\x20','1308945HpDSqT','gray','Creating\x20','\x20menu(s)...','size','\x20local\x20microfrontend\x20menu(s).','\x20menu(s)\x20created'];a133_0x1e40=function(){return _0x11dadb;};return a133_0x1e40();}import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';function a133_0x17ae(_0x2718ec,_0x36dc7c){_0x2718ec=_0x2718ec-0xcc;const _0x1e403d=a133_0x1e40();let _0x17ae58=_0x1e403d[_0x2718ec];return _0x17ae58;}export const menuSync={'service':a133_0x46fe03(0xe6),'command':'sync','description':a133_0x46fe03(0x104),'risk':a133_0x46fe03(0xe0),'flags':[{'name':a133_0x46fe03(0x108),'type':'string','description':a133_0x46fe03(0xee)+a133_0x46fe03(0xf8)},{'name':a133_0x46fe03(0xcf),'type':a133_0x46fe03(0xd6),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':a133_0x46fe03(0x100),'type':a133_0x46fe03(0x10d),'description':a133_0x46fe03(0xfb)}],async 'dryRun'(_0x29fa02){const _0x41be89=a133_0x46fe03;ensureRunnableContext(_0x29fa02[_0x41be89(0xe8)],_0x29fa02[_0x41be89(0x103)]);const _0x3649ab=await runMenuSyncCore(_0x29fa02['appCode'],_0x29fa02[_0x41be89(0xdb)],parsePaths(_0x29fa02['str'](_0x41be89(0xcf))),_0x29fa02[_0x41be89(0xe1)]('params'),{'dryRun':!![]});return{'method':_0x41be89(0xde),'url':'/smartapi/menu/create','body':_0x3649ab,'description':_0x3649ab[_0x41be89(0x105)]?_0x41be89(0xd7):_0x41be89(0xfa)+_0x3649ab[_0x41be89(0xfc)][_0x41be89(0xd5)]+_0x41be89(0xf4)};},async 'execute'(_0x47749a){const _0x5e15c5=a133_0x46fe03;ensureRunnableContext(_0x47749a[_0x5e15c5(0xe8)],_0x47749a[_0x5e15c5(0x103)]);const _0x545c79=_0x47749a['flag'](_0x5e15c5(0x100)),_0x4d551e=_0x47749a[_0x5e15c5(0xe1)]('params'),_0x3dc6aa=parsePaths(_0x47749a[_0x5e15c5(0xe1)](_0x5e15c5(0xcf))),_0x42ab89=parseMenuSyncParams(_0x4d551e);if(_0x545c79){const _0x361b8f=await runMenuSyncCore(_0x47749a[_0x5e15c5(0xe7)],_0x47749a[_0x5e15c5(0xdb)],_0x3dc6aa,_0x4d551e);if(_0x361b8f[_0x5e15c5(0x105)]){const _0x439e66=getLocalPages();_0x439e66[_0x5e15c5(0xd5)]===0x0?writeCliSideChannelLine(_0x5e15c5(0xf7)):writeCliSideChannelLine(_0x5e15c5(0xff));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x361b8f[_0x5e15c5(0xe2)]+_0x5e15c5(0xf5));return{'ok':!![],'data':_0x361b8f,'message':_0x361b8f[_0x5e15c5(0x105)]?'Menu\x20sync\x20skipped':_0x5e15c5(0xd3)+_0x361b8f['created']+_0x5e15c5(0xd1)};}if(_0x3dc6aa[_0x5e15c5(0xd5)]>0x0)throw CliErrors[_0x5e15c5(0xfd)](_0x5e15c5(0x10e),_0x5e15c5(0xeb));if(!isInteractive()&&_0x4d551e)throw CliErrors['validation']('Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');requireInteractive();const _0x3ff2bc=startSpinner(_0x5e15c5(0xda));let _0x41ec09,_0x1f6b51,_0x16daa2;try{const _0x1ef5ff=await fetchMenuData(_0x47749a[_0x5e15c5(0xe7)],_0x47749a[_0x5e15c5(0xdb)]);_0x41ec09=_0x1ef5ff[_0x5e15c5(0xed)],_0x1f6b51=_0x1ef5ff['onlinePaths'],_0x16daa2=_0x1ef5ff['onlineMenuList'],stopSpinner(_0x3ff2bc,_0x5e15c5(0x10c),!![]);}catch(_0x2c8dd1){stopSpinner(_0x3ff2bc,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x5e15c5(0xfd)](_0x2c8dd1 instanceof Error?_0x2c8dd1['message']:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x41ec09[_0x5e15c5(0xd5)]===0x0)return writeCliSideChannelLine(a133_0x557e6f[_0x5e15c5(0xcd)](_0x5e15c5(0xfe))),{'ok':!![]};const _0x9e3640=buildCompareRows(_0x41ec09,_0x1f6b51);writeCliSideChannelLine(renderCompareTable(_0x9e3640)),writeCliSideChannelLine('');const _0x2f26f6=await selectPages(_0x41ec09,_0x1f6b51);writeCliSideChannelLine(''),writeCliSideChannelLine(a133_0x557e6f[_0x5e15c5(0x106)](_0x5e15c5(0xf9)+_0x2f26f6['length']+_0x5e15c5(0xe5)));const _0x1cd89c=_0x42ab89[_0x5e15c5(0xe9)]&&_0x42ab89[_0x5e15c5(0x10a)];if(!_0x1cd89c){writeCliSideChannelLine(renderSyncSummary(_0x2f26f6,_0x1f6b51[_0x5e15c5(0xf3)]>0x0));const _0x55165d=await askConfirm(_0x5e15c5(0xdf));if(!_0x55165d)return writeCliSideChannelLine(a133_0x557e6f[_0x5e15c5(0xf0)](_0x5e15c5(0xea))),{'ok':!![]};}let _0x238d74=_0x42ab89['jsUrl'],_0x15c2b6=_0x42ab89['cssUrl'];!_0x238d74&&(_0x238d74=await askJsUrl());!_0x15c2b6&&(_0x15c2b6=await askCssUrl());const _0x743600=await askConfirm(_0x5e15c5(0xd9)+_0x2f26f6[_0x5e15c5(0xd5)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x238d74+'\x20and\x20CSS:\x20'+_0x15c2b6+'?');if(!_0x743600)return writeCliSideChannelLine(a133_0x557e6f[_0x5e15c5(0xf0)](_0x5e15c5(0xea))),{'ok':!![]};const _0x235fd0=[_0x238d74,_0x15c2b6],_0x3a0ac8=startSpinner(_0x5e15c5(0xf1)+_0x2f26f6[_0x5e15c5(0xd5)]+_0x5e15c5(0xf2));try{const _0x61bf5d=await doCreateMenus(_0x47749a['appCode'],_0x47749a['cookie'],_0x2f26f6,_0x235fd0);return stopSpinner(_0x3a0ac8,'Created\x20'+_0x61bf5d[_0x5e15c5(0xe2)]+_0x5e15c5(0xe4),!![]),{'ok':!![],'data':_0x61bf5d,'message':_0x5e15c5(0xd3)+_0x61bf5d[_0x5e15c5(0xe2)]+_0x5e15c5(0xdd)+_0x61bf5d[_0x5e15c5(0xec)]+'\x20failed.'};}catch(_0x7bbe87){stopSpinner(_0x3a0ac8,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x5e15c5(0xfd)](_0x7bbe87 instanceof Error?_0x7bbe87[_0x5e15c5(0x109)]:_0x5e15c5(0xce));}}};function ensureRunnableContext(_0x120060,_0x114cb3){const _0x27f54d=a133_0x46fe03,_0x1a8ced=_0x120060[_0x27f54d(0x10f)]?String(_0x120060[_0x27f54d(0x10f)])['trim']():'';if(!isInProject()&&!_0x114cb3&&!_0x1a8ced)throw CliErrors[_0x27f54d(0xfd)](_0x27f54d(0xf6)+_0x27f54d(0xdc));}function parsePaths(_0x513aa9){const _0x4380af=a133_0x46fe03;return[...new Set(_0x513aa9[_0x4380af(0x102)](',')['map'](_0x3db79e=>_0x3db79e[_0x4380af(0x107)]())['filter'](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a136_0x5d0509=a136_0x362f;(function(_0x2828c2,_0x5f3507){const _0x88af15=a136_0x362f,_0x276516=_0x2828c2();while(!![]){try{const _0x3385f0=-parseInt(_0x88af15(0x142))/0x1*(parseInt(_0x88af15(0x102))/0x2)+-parseInt(_0x88af15(0x12d))/0x3*(parseInt(_0x88af15(0x104))/0x4)+-parseInt(_0x88af15(0x11d))/0x5+parseInt(_0x88af15(0x11a))/0x6*(parseInt(_0x88af15(0x112))/0x7)+parseInt(_0x88af15(0x110))/0x8+-parseInt(_0x88af15(0x12a))/0x9*(parseInt(_0x88af15(0x136))/0xa)+parseInt(_0x88af15(0xe6))/0xb;if(_0x3385f0===_0x5f3507)break;else _0x276516['push'](_0x276516['shift']());}catch(_0x5216f5){_0x276516['push'](_0x276516['shift']());}}}(a136_0x9554,0xb180e));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a136_0x5d0509(0xe7),'path':a136_0x5d0509(0x106)}];export const menuVisibilityUpdate={'service':a136_0x5d0509(0x10e),'command':a136_0x5d0509(0x10c),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':a136_0x5d0509(0x101),'structuredErrors':!![],'flags':[{'name':a136_0x5d0509(0xe4),'type':a136_0x5d0509(0x14c),'description':a136_0x5d0509(0x141)},{'name':'paths','type':'string','description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':'visible','type':a136_0x5d0509(0x119),'required':!![],'description':a136_0x5d0509(0x14d)},{'name':a136_0x5d0509(0xed),'type':a136_0x5d0509(0x119),'description':a136_0x5d0509(0x134)},{'name':a136_0x5d0509(0x145),'type':a136_0x5d0509(0x12f),'description':a136_0x5d0509(0xeb)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5e82d7){parseInput(_0x5e82d7),requireExplicitYes(_0x5e82d7);},async 'dryRun'(_0x35867c){const _0x53a568=a136_0x5d0509,_0x4a1580=await buildPlan(_0x35867c,!![]),_0x2e7c25=_0x4a1580[_0x53a568(0x11b)]['plannedActions']?.['length']??0x0,_0x10d886=_0x4a1580[_0x53a568(0x11b)][_0x53a568(0x11c)]['length']-_0x2e7c25;return menuDryRunResult(_0x4a1580[_0x53a568(0x11b)],{'method':_0x53a568(0xe7),'url':'/smartapi/menu/update','body':{'updates':_0x4a1580[_0x53a568(0x11b)][_0x53a568(0x127)]?.['map'](_0x3d21c3=>_0x3d21c3[_0x53a568(0x122)])??[]},'description':_0x53a568(0x140)+_0x2e7c25+'\x20menu(s);\x20skip\x20'+_0x10d886+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x4dd662){const _0x330b04=a136_0x5d0509;requireExplicitYes(_0x4dd662);const _0x553617=await buildPlan(_0x4dd662,![]);await recheckMutationSnapshot(_0x4dd662,_0x553617['plan'],_0x330b04(0xfe));const _0x57521b=[],_0x2e8285=[],_0x212a7c=[];for(const _0x46062f of _0x553617[_0x330b04(0x11b)]['targets']){if(_0x46062f[_0x330b04(0xf7)][_0x330b04(0xf4)]===_0x553617['plan']['requestedVisible']){_0x57521b[_0x330b04(0x148)]({'id':_0x46062f['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x4dd662[_0x330b04(0x107)],_0x4dd662[_0x330b04(0xf9)],{'id':_0x46062f['id'],'visible':_0x553617[_0x330b04(0x11b)][_0x330b04(0x120)]}),_0x57521b[_0x330b04(0x148)]({'id':_0x46062f['id'],'updated':!![],'skipped':![]});}catch(_0x536fd7){const _0x7ef503=mapMenuApiError(_0x536fd7,_0x330b04(0x158),_0x46062f['id']);if(isMenuResponseLoss(_0x536fd7)&&_0x7ef503['code']!==_0x330b04(0x12e)){_0x212a7c[_0x330b04(0x148)](_0x46062f['id']);continue;}_0x2e8285[_0x330b04(0x148)]({'id':_0x46062f['id'],'stage':'update','code':_0x7ef503[_0x330b04(0xee)],'message':_0x7ef503[_0x330b04(0x156)]});}}let _0x387cab;try{_0x387cab=await fetchMenuSnapshot(_0x4dd662['appCode'],_0x4dd662[_0x330b04(0xf9)]);}catch(_0x45f768){const _0x35c15a=describeMenuErrorCause(_0x45f768,'verify\x20menu\x20visibility\x20update'),_0x7122e0=_0x212a7c['map'](_0x47f4a0=>({'id':_0x47f4a0,'stage':_0x330b04(0x128),'code':'menu_verification_failed','message':_0x330b04(0xf8)+_0x47f4a0+_0x330b04(0x13d),'requestedStateConfirmed':![],'recovered':![]})),_0x2c49c2={'stage':_0x330b04(0xf6),'code':'menu_verification_failed','message':_0x330b04(0x10a),'targetIds':_0x553617[_0x330b04(0x11b)]['targets'][_0x330b04(0x129)](_0x17ee47=>_0x17ee47['id']),'requestedStateConfirmed':![],..._0x35c15a};throw menuFailure(asVerificationError(_0x45f768,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x553617[_0x330b04(0x11b)],{'stage':'verification','succeeded':_0x57521b,'failedRecords':[..._0x2e8285,..._0x7122e0,_0x2c49c2],'warnings':[_0x330b04(0x12c)],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x14f710=[];for(const _0x339279 of _0x57521b){const _0x3e31b1=Number(_0x339279['id']),_0x526f20=_0x553617[_0x330b04(0x13e)][_0x330b04(0x151)](_0x3e31b1),_0x290dad=_0x387cab[_0x330b04(0x159)][_0x330b04(0x151)](_0x3e31b1);try{verifyVisibilityUpdate(_0x526f20,_0x290dad,_0x553617['plan'][_0x330b04(0x120)]);}catch(_0x28a69b){const _0x483dfa=asVerificationError(_0x28a69b,_0x330b04(0x10f)+_0x3e31b1+_0x330b04(0x115));_0x14f710['push']({'id':_0x3e31b1,'stage':_0x330b04(0xf6),'code':_0x483dfa['code'],'message':_0x483dfa['message'],'requestedStateConfirmed':![]});}}for(const _0x26d2e8 of _0x212a7c){const _0x1c8f82=_0x553617[_0x330b04(0x13e)][_0x330b04(0x151)](_0x26d2e8),_0x499d53=_0x387cab[_0x330b04(0x159)][_0x330b04(0x151)](_0x26d2e8);try{verifyVisibilityUpdate(_0x1c8f82,_0x499d53,_0x553617[_0x330b04(0x11b)][_0x330b04(0x120)]),_0x57521b[_0x330b04(0x148)]({'id':_0x26d2e8,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x2a20fe){const _0x595aec=asVerificationError(_0x2a20fe,_0x330b04(0x116)+_0x26d2e8+_0x330b04(0x121));_0x14f710['push']({'id':_0x26d2e8,'stage':_0x330b04(0x128),'code':_0x595aec['code'],'message':_0x595aec['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x14f710['length']>0x0){const _0x2c4eaf=_0x14f710[_0x330b04(0x129)](_0x4e8a7b=>Number(_0x4e8a7b['id'])),_0x1a48e3=_0x57521b['filter'](_0x4430ec=>_0x4430ec['recovered']===!![])['length'],_0x29a675=menuError(_0x330b04(0x10b),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x2c4eaf['join'](',\x20')+'.',_0x330b04(0xec));throw menuFailure(_0x29a675,_0x553617[_0x330b04(0x11b)],{'stage':_0x330b04(0xf6),'succeeded':_0x57521b,'failedRecords':[..._0x2e8285,..._0x14f710],'warnings':[_0x330b04(0x13c)],'verification':{'status':_0x330b04(0x14a),..._0x2c4eaf['length']===0x1?{'targetId':_0x2c4eaf[0x0]}:{'targetIds':_0x2c4eaf},'recoveredCount':_0x1a48e3,'lookupCommand':_0x330b04(0x14f)}});}const _0x22a544=_0x57521b['filter'](_0x4f082f=>_0x4f082f[_0x330b04(0xe8)]===!![])['length'],_0x347a82=_0x57521b[_0x330b04(0x124)]-_0x22a544,_0x43473d={..._0x553617[_0x330b04(0x11b)],'succeeded':_0x57521b,'failed':_0x2e8285,'warnings':_0x2e8285[_0x330b04(0x124)]>0x0?[..._0x553617[_0x330b04(0x11b)][_0x330b04(0x13f)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x553617[_0x330b04(0x11b)]['warnings'],'verification':{'checkedBy':_0x330b04(0xe2),'snapshotHash':_0x387cab[_0x330b04(0x150)],'matchesRequestedState':_0x2e8285[_0x330b04(0x124)]===0x0,'recoveredCount':_0x212a7c[_0x330b04(0x124)]}};return{'ok':_0x2e8285[_0x330b04(0x124)]===0x0,'data':_0x43473d,'message':_0x2e8285['length']===0x0?_0x330b04(0x147)+_0x22a544+_0x330b04(0x13b)+_0x347a82+_0x330b04(0xff):_0x330b04(0xde)+_0x22a544+_0x330b04(0xf3)+_0x347a82+_0x330b04(0x126)+_0x2e8285[_0x330b04(0x124)]+_0x330b04(0x138)};}};function parseInput(_0x3e3381){const _0x12fc08=a136_0x5d0509,_0x323a07=parseMenuIds(_0x3e3381['str']('menu-ids')),_0x258c92=parseCsv(_0x3e3381[_0x12fc08(0x109)](_0x12fc08(0xe3)));if(_0x323a07[_0x12fc08(0x124)]===0x0&&_0x258c92[_0x12fc08(0x124)]===0x0)throw CliErrors[_0x12fc08(0x10d)](_0x12fc08(0x133));const _0xf64603=parseBooleanFlag(_0x3e3381,_0x12fc08(0xf4),!![]),_0x5add89=parseBooleanFlag(_0x3e3381,_0x12fc08(0xed),![]);let _0x43e5d0;if(hasFlag(_0x3e3381,_0x12fc08(0x145))){_0x43e5d0=_0x3e3381[_0x12fc08(0xfb)](_0x12fc08(0x145));if(!Number[_0x12fc08(0x123)](_0x43e5d0)||_0x43e5d0<0x0)throw CliErrors[_0x12fc08(0x10d)](_0x12fc08(0xdd));}return{'menuIds':_0x323a07,'paths':_0x258c92,'visible':_0xf64603,'expectVisible':_0x5add89,'expectedCount':_0x43e5d0};}async function buildPlan(_0x449d1b,_0x478843){const _0x4be283=a136_0x5d0509,_0x45f144=parseInput(_0x449d1b),_0x544db6=await fetchMutationSnapshot(_0x449d1b,'update\x20menu\x20visibility'),_0x5a95fc=selectTargets(_0x544db6[_0x4be283(0xe5)],_0x45f144[_0x4be283(0x100)],_0x45f144[_0x4be283(0xe3)]);if(_0x45f144[_0x4be283(0x135)]!==undefined&&_0x5a95fc[_0x4be283(0x124)]!==_0x45f144[_0x4be283(0x135)])throw menuError(_0x4be283(0x152),_0x4be283(0x117)+_0x5a95fc['length']+_0x4be283(0xf1)+_0x45f144[_0x4be283(0x135)]+'.',_0x4be283(0x103));if(_0x45f144[_0x4be283(0xfd)]!==undefined){const _0x4ef94f=_0x5a95fc[_0x4be283(0x144)](_0x4580ce=>_0x4580ce[_0x4be283(0xf4)]!==_0x45f144[_0x4be283(0xfd)]);if(_0x4ef94f['length']>0x0)throw menuError(_0x4be283(0xea),_0x4be283(0xf0)+_0x4ef94f[_0x4be283(0x129)](_0xb8452f=>_0xb8452f['id'])[_0x4be283(0x149)](',\x20')+'.',_0x4be283(0x157));}const _0x23cfa8=_0x5a95fc[_0x4be283(0x129)](_0x22ba0e=>({'id':_0x22ba0e['id'],'label':_0x22ba0e[_0x4be283(0x12b)],'path':_0x22ba0e[_0x4be283(0x130)],'before':{'visible':_0x22ba0e[_0x4be283(0xf4)]},'after':{'visible':_0x45f144[_0x4be283(0xf4)]}})),_0x53b58f=_0x23cfa8[_0x4be283(0x144)](_0x4cca99=>_0x4cca99[_0x4be283(0xf7)][_0x4be283(0xf4)]!==_0x45f144[_0x4be283(0xf4)])[_0x4be283(0x129)](_0x4d72a0=>({'stage':'update-menu-visibility','method':'POST','path':'/smartapi/menu/update','body':{'appCode':_0x449d1b[_0x4be283(0x107)],'id':_0x4d72a0['id'],'visible':_0x45f144[_0x4be283(0xf4)]}})),_0x4485eb=mutationResult({'operation':_0x4be283(0x10c),'selector':{'menuIds':_0x45f144['menuIds'],'paths':_0x45f144[_0x4be283(0xe3)]},'before':{'menus':_0x5a95fc[_0x4be283(0x129)](_0x317cff=>({'id':_0x317cff['id'],'path':_0x317cff[_0x4be283(0x130)],'visible':_0x317cff[_0x4be283(0xf4)]}))},'after':{'menus':_0x5a95fc[_0x4be283(0x129)](_0x179374=>({'id':_0x179374['id'],'path':_0x179374[_0x4be283(0x130)],'visible':_0x45f144['visible']}))},'dryRun':_0x478843,'backend':[...BACKEND],'plannedActions':_0x53b58f,'snapshotHash':_0x544db6[_0x4be283(0x150)],'warnings':_0x53b58f[_0x4be283(0x124)]===0x0?[_0x4be283(0x111)]:[]});return{'plan':{..._0x4485eb,'requestedVisible':_0x45f144[_0x4be283(0xf4)],'targets':_0x23cfa8},'beforeById':new Map(_0x5a95fc[_0x4be283(0x129)](_0x2619b6=>[_0x2619b6['id'],_0x2619b6]))};}function selectTargets(_0x3ac615,_0xeadb8a,_0x55cce0){const _0x4f2a14=a136_0x5d0509,_0x25226c=new Map(_0x3ac615['map'](_0x156f4e=>[_0x156f4e['id'],_0x156f4e])),_0x592c31=new Map(),_0x59ff90=_0xeadb8a[_0x4f2a14(0x144)](_0x595807=>!_0x25226c[_0x4f2a14(0x154)](_0x595807));if(_0x59ff90[_0x4f2a14(0x124)]>0x0)throw menuError(_0x4f2a14(0x125),_0x4f2a14(0xe9)+_0x59ff90['join'](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x211b82 of _0xeadb8a){_0x592c31['set'](_0x211b82,_0x25226c['get'](_0x211b82));}for(const _0x442fb1 of _0x55cce0){const _0x117b5f=_0x3ac615[_0x4f2a14(0x144)](_0x49a065=>_0x49a065[_0x4f2a14(0x130)]===_0x442fb1);if(_0x117b5f[_0x4f2a14(0x124)]===0x0)throw menuError(_0x4f2a14(0x125),_0x4f2a14(0x153)+JSON[_0x4f2a14(0xef)](_0x442fb1)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x117b5f[_0x4f2a14(0x124)]>0x1)throw menuError(_0x4f2a14(0x11e),_0x4f2a14(0xfc)+JSON['stringify'](_0x442fb1)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x117b5f['map'](_0x427510=>_0x427510['id'])[_0x4f2a14(0x149)](',\x20')+'.');const _0x19644c=_0x117b5f[0x0];_0x592c31[_0x4f2a14(0x105)](_0x19644c['id'],_0x19644c);}return[..._0x592c31[_0x4f2a14(0x131)]()];}function a136_0x9554(){const _0x595d42=['2128670fdANKb','menu_selector_ambiguous','flagMissing','requestedVisible','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','body','isSafeInteger','length','menu_selector_not_found','\x20skipped,\x20','plannedActions','update-recovery','map','573867YcKLgP','label','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','228339SCHuVg','menu_permission_denied','number','path','values','childrenIds','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','expectedCount','40ABuqUE','pageType','\x20failed.','false','split','\x20menu(s);\x20skipped\x20','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','beforeById','warnings','Would\x20update\x20visibility\x20for\x20','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','168013guZNXH','some','filter','expected-count','datasetId','Updated\x20visibility\x20for\x20','push','join','failed','sort','string','Requested\x20menu\x20visibility','resourcesValid','rabetbase\x20menu\x20list\x20--format\x20compress','hash','get','menu_expected_count_mismatch','Menu\x20path\x20selector\x20not\x20found:\x20','has','modelType','message','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','update\x20visibility\x20for','byId','url','trim','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Menu\x20visibility\x20update\x20completed:\x20','depth','\x20must\x20be\x20true\x20or\x20false.','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','menu\x20list','paths','menu-ids','menus','16779752qVQhLg','POST','updated','Menu\x20id\x20selector(s)\x20not\x20found:\x20','menu_state_drift','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','expect-visible','code','stringify','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','\x20menu(s),\x20expected\x20','pageId','\x20updated,\x20','visible','resources','verification','before','Response\x20was\x20lost\x20for\x20menu\x20','cookie','isArray','num','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','expectVisible','update\x20menu\x20visibility','\x20unchanged\x20menu(s).','menuIds','high-risk-write','6DAILzI','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','44BrICmm','set','/smartapi/menu/update','appCode','childrenCount','str','Final\x20menu\x20visibility\x20readback\x20failed.','menu_verification_failed','visibility-update','validation','menu','Menu\x20','6660024cOUzMH','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','2738309zOeMgk','type','datasetCode','\x20visibility\x20update\x20could\x20not\x20be\x20verified','Response\x20was\x20lost\x20and\x20menu\x20','Selected\x20','parentId','boolean','6PfmTLE','plan','targets'];a136_0x9554=function(){return _0x595d42;};return a136_0x9554();}function a136_0x362f(_0x2a53f7,_0x4bedeb){_0x2a53f7=_0x2a53f7-0xdb;const _0x9554ad=a136_0x9554();let _0x362f45=_0x9554ad[_0x2a53f7];return _0x362f45;}function parseMenuIds(_0x2312a9){const _0x30a092=a136_0x5d0509,_0x4b160f=parseCsv(_0x2312a9),_0x37c9d2=_0x4b160f[_0x30a092(0x129)](Number);if(_0x37c9d2[_0x30a092(0x143)](_0xda5038=>!Number[_0x30a092(0x123)](_0xda5038)||_0xda5038<=0x0))throw CliErrors[_0x30a092(0x10d)](_0x30a092(0xe1));return[...new Set(_0x37c9d2)];}function parseCsv(_0x50cb0e){const _0x496efd=a136_0x5d0509;return[...new Set(_0x50cb0e[_0x496efd(0x13a)](',')['map'](_0x1f5f0b=>_0x1f5f0b[_0x496efd(0xdc)]())['filter'](Boolean))];}function parseBooleanFlag(_0x480836,_0xcf6fe4,_0x8f34b0){const _0x5722d0=a136_0x5d0509;if(!hasFlag(_0x480836,_0xcf6fe4)){if(_0x8f34b0)throw CliErrors[_0x5722d0(0x11f)](_0xcf6fe4);return undefined;}const _0x922294=_0x480836['rawFlags'][_0xcf6fe4];if(_0x922294===!![]||_0x922294===![])return _0x922294;if(_0x922294==='true')return!![];if(_0x922294===_0x5722d0(0x139))return![];throw CliErrors['validation']('--'+_0xcf6fe4+_0x5722d0(0xe0));}function verifyVisibilityUpdate(_0x2292f4,_0x413740,_0x386d01){const _0x23b179=a136_0x5d0509;assertVerified(!!_0x413740,_0x23b179(0x10f)+_0x2292f4['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x413740[_0x23b179(0xf4)]===_0x386d01,_0x23b179(0x10f)+_0x2292f4['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x2f2516=[['id',_0x413740['id'],_0x2292f4['id']],[_0x23b179(0x118),_0x413740[_0x23b179(0x118)],_0x2292f4[_0x23b179(0x118)]],[_0x23b179(0xdf),_0x413740[_0x23b179(0xdf)],_0x2292f4[_0x23b179(0xdf)]],['label',_0x413740[_0x23b179(0x12b)],_0x2292f4['label']],['path',_0x413740[_0x23b179(0x130)],_0x2292f4['path']],[_0x23b179(0xdb),_0x413740['url'],_0x2292f4[_0x23b179(0xdb)]],[_0x23b179(0x113),_0x413740[_0x23b179(0x113)],_0x2292f4[_0x23b179(0x113)]],[_0x23b179(0x14b),_0x413740['sort'],_0x2292f4['sort']],[_0x23b179(0xf5),_0x413740[_0x23b179(0xf5)],_0x2292f4[_0x23b179(0xf5)]],[_0x23b179(0x14e),_0x413740[_0x23b179(0x14e)],_0x2292f4[_0x23b179(0x14e)]],[_0x23b179(0x132),_0x413740[_0x23b179(0x132)],_0x2292f4[_0x23b179(0x132)]],[_0x23b179(0x108),_0x413740[_0x23b179(0x108)],_0x2292f4[_0x23b179(0x108)]],[_0x23b179(0xf2),_0x413740[_0x23b179(0xf2)],_0x2292f4[_0x23b179(0xf2)]],[_0x23b179(0x137),_0x413740[_0x23b179(0x137)],_0x2292f4['pageType']],[_0x23b179(0x155),_0x413740[_0x23b179(0x155)],_0x2292f4[_0x23b179(0x155)]],['datasetId',_0x413740[_0x23b179(0x146)],_0x2292f4[_0x23b179(0x146)]],[_0x23b179(0x114),_0x413740['datasetCode'],_0x2292f4['datasetCode']]];for(const [_0x4bbf49,_0x2ea6c5,_0x2e93b3]of _0x2f2516){assertVerified(sameValue(_0x2ea6c5,_0x2e93b3),_0x23b179(0x10f)+_0x2292f4['id']+'\x20'+_0x4bbf49+'\x20changed\x20unexpectedly.');}}function sameValue(_0x286b6b,_0x3d2534){const _0xcfd9a8=a136_0x5d0509;if(Array['isArray'](_0x286b6b)||Array[_0xcfd9a8(0xfa)](_0x3d2534))return JSON['stringify'](_0x286b6b)===JSON['stringify'](_0x3d2534);return _0x286b6b===_0x3d2534;}
|
|
1
|
+
const a134_0x432d48=a134_0x4f01;(function(_0x242369,_0x2d64a3){const _0x71e078=a134_0x4f01,_0x367ca1=_0x242369();while(!![]){try{const _0x340ebe=-parseInt(_0x71e078(0x11e))/0x1+-parseInt(_0x71e078(0x146))/0x2+parseInt(_0x71e078(0x115))/0x3+-parseInt(_0x71e078(0x169))/0x4*(-parseInt(_0x71e078(0x121))/0x5)+-parseInt(_0x71e078(0x13e))/0x6*(-parseInt(_0x71e078(0x154))/0x7)+parseInt(_0x71e078(0x11d))/0x8*(parseInt(_0x71e078(0x14d))/0x9)+parseInt(_0x71e078(0x157))/0xa*(-parseInt(_0x71e078(0x109))/0xb);if(_0x340ebe===_0x2d64a3)break;else _0x367ca1['push'](_0x367ca1['shift']());}catch(_0x44ccc1){_0x367ca1['push'](_0x367ca1['shift']());}}}(a134_0x2381,0xe3d0b));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a134_0x432d48(0x143),'path':'/smartapi/menu/update'}];function a134_0x2381(){const _0x198986=['number','stringify','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','Response\x20was\x20lost\x20and\x20menu\x20','map','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','childrenIds','failed','flagMissing','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','/smartapi/menu/update','string','66AtpEHy','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','Response\x20was\x20lost\x20for\x20menu\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','targets','POST','split','update-recovery','1311074lqObCC','modelType','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','str','\x20menu(s),\x20expected\x20','Menu\x20visibility\x20update\x20completed:\x20','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','45lJsioE','before','expectedCount','Menu\x20path\x20selector\x20not\x20found:\x20','true','parentId','beforeById','877667FaCgQK','update-menu-visibility','resourcesValid','7750970GIlNlr','plannedActions','length','values','push','rabetbase\x20menu\x20list\x20--format\x20compress','body','message','filter','cookie','\x20skipped,\x20','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','\x20visibility\x20update\x20could\x20not\x20be\x20verified','warnings','menu\x20list','num','update','\x20menu(s);\x20skipped\x20','197836gnwWsg','join','validation','get','\x20changed\x20unexpectedly.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','code','expectVisible','url','pageType','set','byId','updated','hash','menu-ids','\x20menu(s);\x20skip\x20','\x20unchanged\x20menu(s).','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','plan','Updated\x20visibility\x20for\x20','type','Menu\x20','menu_state_drift','Selected\x20','label','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','some','isArray','datasetCode','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','sort','paths','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','expect-visible','depth','11PuEYnr','childrenCount','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Requested\x20menu\x20visibility','menu_selector_not_found','visible','high-risk-write','visibility-update','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','menu_permission_denied','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','rawFlags','3464772rcYYhL','update\x20visibility\x20for','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','boolean','appCode','resources','update\x20menu\x20visibility','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','486872OUjFDC','623022VrXYLj','menu_expected_count_mismatch','Final\x20menu\x20visibility\x20readback\x20failed.','15vUOqSD','pageId','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','menu','menus','Would\x20update\x20visibility\x20for\x20','menuIds','path','expected-count','false','\x20failed.','requestedVisible','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','menu_verification_failed','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','isSafeInteger'];a134_0x2381=function(){return _0x198986;};return a134_0x2381();}export const menuVisibilityUpdate={'service':a134_0x432d48(0x124),'command':a134_0x432d48(0x110),'description':a134_0x432d48(0x117),'risk':a134_0x432d48(0x10f),'structuredErrors':!![],'flags':[{'name':a134_0x432d48(0x177),'type':'string','description':a134_0x432d48(0x186)},{'name':a134_0x432d48(0x188),'type':a134_0x432d48(0x13d),'description':a134_0x432d48(0x133)},{'name':a134_0x432d48(0x10e),'type':a134_0x432d48(0x118),'required':!![],'description':a134_0x432d48(0x10c)},{'name':a134_0x432d48(0x18a),'type':a134_0x432d48(0x118),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a134_0x432d48(0x129),'type':a134_0x432d48(0x131),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4fefce){parseInput(_0x4fefce),requireExplicitYes(_0x4fefce);},async 'dryRun'(_0x12d2b1){const _0x4718de=a134_0x432d48,_0x110ac1=await buildPlan(_0x12d2b1,!![]),_0xbeb85f=_0x110ac1[_0x4718de(0x17b)][_0x4718de(0x158)]?.[_0x4718de(0x159)]??0x0,_0xec9ae4=_0x110ac1[_0x4718de(0x17b)][_0x4718de(0x142)][_0x4718de(0x159)]-_0xbeb85f;return menuDryRunResult(_0x110ac1['plan'],{'method':'POST','url':'/smartapi/menu/update','body':{'updates':_0x110ac1[_0x4718de(0x17b)][_0x4718de(0x158)]?.[_0x4718de(0x136)](_0x26f3c2=>_0x26f3c2[_0x4718de(0x15d)])??[]},'description':_0x4718de(0x126)+_0xbeb85f+_0x4718de(0x178)+_0xec9ae4+_0x4718de(0x179)});},async 'execute'(_0x13df24){const _0x35f9b1=a134_0x432d48;requireExplicitYes(_0x13df24);const _0xf010c9=await buildPlan(_0x13df24,![]);await recheckMutationSnapshot(_0x13df24,_0xf010c9[_0x35f9b1(0x17b)],'update\x20menu\x20visibility');const _0xb93d1e=[],_0x4c0f3d=[],_0x39bb19=[];for(const _0x720b78 of _0xf010c9[_0x35f9b1(0x17b)][_0x35f9b1(0x142)]){if(_0x720b78[_0x35f9b1(0x14e)][_0x35f9b1(0x10e)]===_0xf010c9['plan'][_0x35f9b1(0x12c)]){_0xb93d1e[_0x35f9b1(0x15b)]({'id':_0x720b78['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x13df24[_0x35f9b1(0x119)],_0x13df24[_0x35f9b1(0x160)],{'id':_0x720b78['id'],'visible':_0xf010c9['plan'][_0x35f9b1(0x12c)]}),_0xb93d1e[_0x35f9b1(0x15b)]({'id':_0x720b78['id'],'updated':!![],'skipped':![]});}catch(_0x23b24d){const _0x582368=mapMenuApiError(_0x23b24d,_0x35f9b1(0x116),_0x720b78['id']);if(isMenuResponseLoss(_0x23b24d)&&_0x582368[_0x35f9b1(0x16f)]!==_0x35f9b1(0x112)){_0x39bb19[_0x35f9b1(0x15b)](_0x720b78['id']);continue;}_0x4c0f3d[_0x35f9b1(0x15b)]({'id':_0x720b78['id'],'stage':_0x35f9b1(0x167),'code':_0x582368[_0x35f9b1(0x16f)],'message':_0x582368[_0x35f9b1(0x15e)]});}}let _0x3d11a0;try{_0x3d11a0=await fetchMenuSnapshot(_0x13df24[_0x35f9b1(0x119)],_0x13df24[_0x35f9b1(0x160)]);}catch(_0xde4af5){const _0x2a1bbf=describeMenuErrorCause(_0xde4af5,'verify\x20menu\x20visibility\x20update'),_0x8ebb15=_0x39bb19['map'](_0x512726=>({'id':_0x512726,'stage':_0x35f9b1(0x145),'code':_0x35f9b1(0x12e),'message':_0x35f9b1(0x140)+_0x512726+_0x35f9b1(0x113),'requestedStateConfirmed':![],'recovered':![]})),_0x124b81={'stage':'verification','code':_0x35f9b1(0x12e),'message':_0x35f9b1(0x120),'targetIds':_0xf010c9[_0x35f9b1(0x17b)]['targets'][_0x35f9b1(0x136)](_0x166f03=>_0x166f03['id']),'requestedStateConfirmed':![],..._0x2a1bbf};throw menuFailure(asVerificationError(_0xde4af5,_0x35f9b1(0x134)),_0xf010c9['plan'],{'stage':'verification','succeeded':_0xb93d1e,'failedRecords':[..._0x4c0f3d,..._0x8ebb15,_0x124b81],'warnings':[_0x35f9b1(0x10b)],'verification':{'status':_0x35f9b1(0x139),'recoveredCount':0x0,'lookupCommand':_0x35f9b1(0x15c)}});}const _0x324333=[];for(const _0x2fd67f of _0xb93d1e){const _0x518d6a=Number(_0x2fd67f['id']),_0x5b09f3=_0xf010c9[_0x35f9b1(0x153)][_0x35f9b1(0x16c)](_0x518d6a),_0x31e866=_0x3d11a0['byId'][_0x35f9b1(0x16c)](_0x518d6a);try{verifyVisibilityUpdate(_0x5b09f3,_0x31e866,_0xf010c9['plan'][_0x35f9b1(0x12c)]);}catch(_0x4476d7){const _0x15178d=asVerificationError(_0x4476d7,_0x35f9b1(0x17e)+_0x518d6a+_0x35f9b1(0x163));_0x324333[_0x35f9b1(0x15b)]({'id':_0x518d6a,'stage':'verification','code':_0x15178d['code'],'message':_0x15178d['message'],'requestedStateConfirmed':![]});}}for(const _0x1b8534 of _0x39bb19){const _0x49e44c=_0xf010c9[_0x35f9b1(0x153)][_0x35f9b1(0x16c)](_0x1b8534),_0x30b588=_0x3d11a0[_0x35f9b1(0x174)][_0x35f9b1(0x16c)](_0x1b8534);try{verifyVisibilityUpdate(_0x49e44c,_0x30b588,_0xf010c9[_0x35f9b1(0x17b)][_0x35f9b1(0x12c)]),_0xb93d1e[_0x35f9b1(0x15b)]({'id':_0x1b8534,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x19c354){const _0x2642d5=asVerificationError(_0x19c354,_0x35f9b1(0x135)+_0x1b8534+_0x35f9b1(0x13f));_0x324333[_0x35f9b1(0x15b)]({'id':_0x1b8534,'stage':_0x35f9b1(0x145),'code':_0x2642d5[_0x35f9b1(0x16f)],'message':_0x2642d5[_0x35f9b1(0x15e)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x324333[_0x35f9b1(0x159)]>0x0){const _0x1ec227=_0x324333[_0x35f9b1(0x136)](_0x1a5dcd=>Number(_0x1a5dcd['id'])),_0x2cf387=_0xb93d1e['filter'](_0x47f833=>_0x47f833['recovered']===!![])[_0x35f9b1(0x159)],_0x1c9537=menuError(_0x35f9b1(0x12e),_0x35f9b1(0x182)+_0x1ec227[_0x35f9b1(0x16a)](',\x20')+'.',_0x35f9b1(0x12f));throw menuFailure(_0x1c9537,_0xf010c9[_0x35f9b1(0x17b)],{'stage':'verification','succeeded':_0xb93d1e,'failedRecords':[..._0x4c0f3d,..._0x324333],'warnings':[_0x35f9b1(0x137)],'verification':{'status':'failed',..._0x1ec227[_0x35f9b1(0x159)]===0x1?{'targetId':_0x1ec227[0x0]}:{'targetIds':_0x1ec227},'recoveredCount':_0x2cf387,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x4c336e=_0xb93d1e[_0x35f9b1(0x15f)](_0x5cf86e=>_0x5cf86e[_0x35f9b1(0x175)]===!![])['length'],_0x173814=_0xb93d1e[_0x35f9b1(0x159)]-_0x4c336e,_0x19ba44={..._0xf010c9[_0x35f9b1(0x17b)],'succeeded':_0xb93d1e,'failed':_0x4c0f3d,'warnings':_0x4c0f3d[_0x35f9b1(0x159)]>0x0?[..._0xf010c9[_0x35f9b1(0x17b)]['warnings'],_0x35f9b1(0x123)]:_0xf010c9['plan'][_0x35f9b1(0x164)],'verification':{'checkedBy':_0x35f9b1(0x165),'snapshotHash':_0x3d11a0[_0x35f9b1(0x176)],'matchesRequestedState':_0x4c0f3d[_0x35f9b1(0x159)]===0x0,'recoveredCount':_0x39bb19['length']}};return{'ok':_0x4c0f3d[_0x35f9b1(0x159)]===0x0,'data':_0x19ba44,'message':_0x4c0f3d[_0x35f9b1(0x159)]===0x0?_0x35f9b1(0x17c)+_0x4c336e+_0x35f9b1(0x168)+_0x173814+_0x35f9b1(0x179):_0x35f9b1(0x14b)+_0x4c336e+'\x20updated,\x20'+_0x173814+_0x35f9b1(0x161)+_0x4c0f3d[_0x35f9b1(0x159)]+_0x35f9b1(0x12b)};}};function parseInput(_0x20e2b7){const _0x2913b9=a134_0x432d48,_0x4b484b=parseMenuIds(_0x20e2b7[_0x2913b9(0x149)](_0x2913b9(0x177))),_0x380c4b=parseCsv(_0x20e2b7[_0x2913b9(0x149)]('paths'));if(_0x4b484b[_0x2913b9(0x159)]===0x0&&_0x380c4b[_0x2913b9(0x159)]===0x0)throw CliErrors[_0x2913b9(0x16b)](_0x2913b9(0x148));const _0x47d2df=parseBooleanFlag(_0x20e2b7,_0x2913b9(0x10e),!![]),_0x472a18=parseBooleanFlag(_0x20e2b7,_0x2913b9(0x18a),![]);let _0x3cd0d1;if(hasFlag(_0x20e2b7,'expected-count')){_0x3cd0d1=_0x20e2b7[_0x2913b9(0x166)](_0x2913b9(0x129));if(!Number['isSafeInteger'](_0x3cd0d1)||_0x3cd0d1<0x0)throw CliErrors[_0x2913b9(0x16b)](_0x2913b9(0x111));}return{'menuIds':_0x4b484b,'paths':_0x380c4b,'visible':_0x47d2df,'expectVisible':_0x472a18,'expectedCount':_0x3cd0d1};}async function buildPlan(_0x3126c0,_0x5d0bb3){const _0x30b931=a134_0x432d48,_0x1d0d93=parseInput(_0x3126c0),_0x1406ba=await fetchMutationSnapshot(_0x3126c0,_0x30b931(0x11b)),_0x5799df=selectTargets(_0x1406ba[_0x30b931(0x125)],_0x1d0d93['menuIds'],_0x1d0d93['paths']);if(_0x1d0d93[_0x30b931(0x14f)]!==undefined&&_0x5799df[_0x30b931(0x159)]!==_0x1d0d93[_0x30b931(0x14f)])throw menuError(_0x30b931(0x11f),_0x30b931(0x180)+_0x5799df[_0x30b931(0x159)]+_0x30b931(0x14a)+_0x1d0d93[_0x30b931(0x14f)]+'.',_0x30b931(0x16e));if(_0x1d0d93[_0x30b931(0x170)]!==undefined){const _0x209591=_0x5799df['filter'](_0x5698cf=>_0x5698cf['visible']!==_0x1d0d93['expectVisible']);if(_0x209591['length']>0x0)throw menuError(_0x30b931(0x17f),_0x30b931(0x14c)+_0x209591[_0x30b931(0x136)](_0x1e6e34=>_0x1e6e34['id'])[_0x30b931(0x16a)](',\x20')+'.',_0x30b931(0x141));}const _0x322101=_0x5799df[_0x30b931(0x136)](_0x1844b2=>({'id':_0x1844b2['id'],'label':_0x1844b2['label'],'path':_0x1844b2[_0x30b931(0x128)],'before':{'visible':_0x1844b2[_0x30b931(0x10e)]},'after':{'visible':_0x1d0d93[_0x30b931(0x10e)]}})),_0x4e3b8f=_0x322101[_0x30b931(0x15f)](_0xbfc44=>_0xbfc44[_0x30b931(0x14e)][_0x30b931(0x10e)]!==_0x1d0d93[_0x30b931(0x10e)])[_0x30b931(0x136)](_0x3b6346=>({'stage':_0x30b931(0x155),'method':_0x30b931(0x143),'path':_0x30b931(0x13c),'body':{'appCode':_0x3126c0[_0x30b931(0x119)],'id':_0x3b6346['id'],'visible':_0x1d0d93['visible']}})),_0x4cffe8=mutationResult({'operation':_0x30b931(0x110),'selector':{'menuIds':_0x1d0d93[_0x30b931(0x127)],'paths':_0x1d0d93[_0x30b931(0x188)]},'before':{'menus':_0x5799df['map'](_0x1fe421=>({'id':_0x1fe421['id'],'path':_0x1fe421[_0x30b931(0x128)],'visible':_0x1fe421[_0x30b931(0x10e)]}))},'after':{'menus':_0x5799df[_0x30b931(0x136)](_0x10e887=>({'id':_0x10e887['id'],'path':_0x10e887['path'],'visible':_0x1d0d93['visible']}))},'dryRun':_0x5d0bb3,'backend':[...BACKEND],'plannedActions':_0x4e3b8f,'snapshotHash':_0x1406ba['hash'],'warnings':_0x4e3b8f['length']===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0x4cffe8,'requestedVisible':_0x1d0d93['visible'],'targets':_0x322101},'beforeById':new Map(_0x5799df[_0x30b931(0x136)](_0x5e88de=>[_0x5e88de['id'],_0x5e88de]))};}function selectTargets(_0x5e6569,_0x4ef83b,_0x33752f){const _0x543933=a134_0x432d48,_0x122072=new Map(_0x5e6569['map'](_0x339777=>[_0x339777['id'],_0x339777])),_0x4146cf=new Map(),_0x51566b=_0x4ef83b[_0x543933(0x15f)](_0xcd3193=>!_0x122072['has'](_0xcd3193));if(_0x51566b['length']>0x0)throw menuError(_0x543933(0x10d),'Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x51566b[_0x543933(0x16a)](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0xa0a2d5 of _0x4ef83b){_0x4146cf[_0x543933(0x173)](_0xa0a2d5,_0x122072[_0x543933(0x16c)](_0xa0a2d5));}for(const _0x1b94d6 of _0x33752f){const _0x3d1494=_0x5e6569[_0x543933(0x15f)](_0x348830=>_0x348830[_0x543933(0x128)]===_0x1b94d6);if(_0x3d1494['length']===0x0)throw menuError(_0x543933(0x10d),_0x543933(0x150)+JSON[_0x543933(0x132)](_0x1b94d6)+'.',_0x543933(0x13b));if(_0x3d1494[_0x543933(0x159)]>0x1)throw menuError('menu_selector_ambiguous',_0x543933(0x189)+JSON['stringify'](_0x1b94d6)+'.',_0x543933(0x162)+_0x3d1494[_0x543933(0x136)](_0x3c2c02=>_0x3c2c02['id'])[_0x543933(0x16a)](',\x20')+'.');const _0x20e4d7=_0x3d1494[0x0];_0x4146cf[_0x543933(0x173)](_0x20e4d7['id'],_0x20e4d7);}return[..._0x4146cf[_0x543933(0x15a)]()];}function parseMenuIds(_0x25366f){const _0x26da57=a134_0x432d48,_0x1a566f=parseCsv(_0x25366f),_0x1bdf6a=_0x1a566f[_0x26da57(0x136)](Number);if(_0x1bdf6a[_0x26da57(0x183)](_0x8fb63e=>!Number[_0x26da57(0x130)](_0x8fb63e)||_0x8fb63e<=0x0))throw CliErrors[_0x26da57(0x16b)](_0x26da57(0x17a));return[...new Set(_0x1bdf6a)];}function parseCsv(_0x1ffb36){const _0xca34cb=a134_0x432d48;return[...new Set(_0x1ffb36[_0xca34cb(0x144)](',')['map'](_0x286c43=>_0x286c43['trim']())['filter'](Boolean))];}function parseBooleanFlag(_0x59e9a9,_0x4ed325,_0x37e739){const _0x190c14=a134_0x432d48;if(!hasFlag(_0x59e9a9,_0x4ed325)){if(_0x37e739)throw CliErrors[_0x190c14(0x13a)](_0x4ed325);return undefined;}const _0x443cf4=_0x59e9a9[_0x190c14(0x114)][_0x4ed325];if(_0x443cf4===!![]||_0x443cf4===![])return _0x443cf4;if(_0x443cf4===_0x190c14(0x151))return!![];if(_0x443cf4===_0x190c14(0x12a))return![];throw CliErrors[_0x190c14(0x16b)]('--'+_0x4ed325+'\x20must\x20be\x20true\x20or\x20false.');}function a134_0x4f01(_0x3be524,_0x2e7567){_0x3be524=_0x3be524-0x109;const _0x23817c=a134_0x2381();let _0x4f0179=_0x23817c[_0x3be524];return _0x4f0179;}function verifyVisibilityUpdate(_0x3be305,_0x489f10,_0x3fa424){const _0x4387db=a134_0x432d48;assertVerified(!!_0x489f10,_0x4387db(0x17e)+_0x3be305['id']+_0x4387db(0x11c)),assertVerified(_0x489f10[_0x4387db(0x10e)]===_0x3fa424,_0x4387db(0x17e)+_0x3be305['id']+_0x4387db(0x12d));const _0x417b35=[['id',_0x489f10['id'],_0x3be305['id']],['parentId',_0x489f10[_0x4387db(0x152)],_0x3be305[_0x4387db(0x152)]],[_0x4387db(0x18b),_0x489f10[_0x4387db(0x18b)],_0x3be305[_0x4387db(0x18b)]],[_0x4387db(0x181),_0x489f10[_0x4387db(0x181)],_0x3be305[_0x4387db(0x181)]],['path',_0x489f10['path'],_0x3be305[_0x4387db(0x128)]],[_0x4387db(0x171),_0x489f10[_0x4387db(0x171)],_0x3be305[_0x4387db(0x171)]],[_0x4387db(0x17d),_0x489f10[_0x4387db(0x17d)],_0x3be305[_0x4387db(0x17d)]],[_0x4387db(0x187),_0x489f10[_0x4387db(0x187)],_0x3be305[_0x4387db(0x187)]],['resources',_0x489f10[_0x4387db(0x11a)],_0x3be305['resources']],[_0x4387db(0x156),_0x489f10['resourcesValid'],_0x3be305[_0x4387db(0x156)]],[_0x4387db(0x138),_0x489f10[_0x4387db(0x138)],_0x3be305['childrenIds']],[_0x4387db(0x10a),_0x489f10[_0x4387db(0x10a)],_0x3be305['childrenCount']],[_0x4387db(0x122),_0x489f10[_0x4387db(0x122)],_0x3be305[_0x4387db(0x122)]],[_0x4387db(0x172),_0x489f10[_0x4387db(0x172)],_0x3be305['pageType']],[_0x4387db(0x147),_0x489f10[_0x4387db(0x147)],_0x3be305['modelType']],['datasetId',_0x489f10['datasetId'],_0x3be305['datasetId']],[_0x4387db(0x185),_0x489f10[_0x4387db(0x185)],_0x3be305[_0x4387db(0x185)]]];for(const [_0x4f8786,_0x52e17e,_0xb57948]of _0x417b35){assertVerified(sameValue(_0x52e17e,_0xb57948),_0x4387db(0x17e)+_0x3be305['id']+'\x20'+_0x4f8786+_0x4387db(0x16d));}}function sameValue(_0x60156e,_0x38fc13){const _0x2c739b=a134_0x432d48;if(Array[_0x2c739b(0x184)](_0x60156e)||Array[_0x2c739b(0x184)](_0x38fc13))return JSON[_0x2c739b(0x132)](_0x60156e)===JSON[_0x2c739b(0x132)](_0x38fc13);return _0x60156e===_0x38fc13;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a135_0x39257e=a135_0x5c2a;function a135_0x2ba3(){const _0x4fd5e8=['5TpvbFf','channelType','connectTimeout','config-create','description','Inspect\x20with\x20','verification','385879eHpYPT','2568988BcMknd','POST','1333759YhzbEX','write','1098608RIlXqd',';\x20do\x20not\x20resubmit.','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','isSafeInteger','channelConfig','notification_config_create_outcome_unknown',';\x20no\x20automatic\x20retry\x20was\x20attempted.','mutation','2787222LiGnSX','readTimeout','planned','endpointUrl','document','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','appCode','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','514534zNgLlk','Created\x20notification\x20config\x20','verified','configName','create','1844124lsPHSd',';\x20do\x20not\x20resubmit\x20automatically.'];a135_0x2ba3=function(){return _0x4fd5e8;};return a135_0x2ba3();}(function(_0x2045aa,_0x339f4e){const _0x4c1ba3=a135_0x5c2a,_0xa830d6=_0x2045aa();while(!![]){try{const _0x4208ff=-parseInt(_0x4c1ba3(0x7d))/0x1+parseInt(_0x4c1ba3(0x92))/0x2+parseInt(_0x4c1ba3(0x97))/0x3+-parseInt(_0x4c1ba3(0x7e))/0x4+parseInt(_0x4c1ba3(0x99))/0x5*(parseInt(_0x4c1ba3(0x8a))/0x6)+parseInt(_0x4c1ba3(0x80))/0x7+-parseInt(_0x4c1ba3(0x82))/0x8;if(_0x4208ff===_0x339f4e)break;else _0xa830d6['push'](_0xa830d6['shift']());}catch(_0x58922e){_0xa830d6['push'](_0xa830d6['shift']());}}}(a135_0x2ba3,0x5847d));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 a135_0x5c2a(_0x213546,_0x1cc75a){_0x213546=_0x213546-0x7a;const _0x2ba3e3=a135_0x2ba3();let _0x5c2a19=_0x2ba3e3[_0x213546];return _0x5c2a19;}const CREATE_PATH='/notification/channel-config/create';async function prepareCreate(_0x44e447){const _0x6216f0=a135_0x5c2a,_0x16b568=await readNotificationDocument(_0x44e447,'create'),_0x3e69da=createMutationInput(_0x44e447[_0x6216f0(0x90)],_0x16b568);return{'document':_0x16b568,'input':_0x3e69da,'planned':projectNotificationConfig({'appCode':_0x44e447[_0x6216f0(0x90)],'configName':_0x16b568[_0x6216f0(0x95)],'channelType':_0x16b568[_0x6216f0(0x9a)],'endpointUrl':_0x16b568[_0x6216f0(0x8d)],'channelConfig':_0x16b568[_0x6216f0(0x86)],'description':_0x16b568[_0x6216f0(0x7a)],'connectTimeout':_0x16b568[_0x6216f0(0x9b)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x16b568[_0x6216f0(0x8b)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':a135_0x39257e(0x9c),'description':a135_0x39257e(0x91),'risk':a135_0x39257e(0x81),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4e49dd){assertSingleNotificationSource(_0x4e49dd);},async 'dryRun'(_0x59e5da){const _0x52a94b=a135_0x39257e,_0x1b51df=await prepareCreate(_0x59e5da),_0x644ecf=notificationLookupCommand(_0x59e5da[_0x52a94b(0x90)],_0x1b51df[_0x52a94b(0x8e)]['channelType']);return asDryRunResult({'operation':_0x52a94b(0x96),'selector':{'appCode':_0x59e5da[_0x52a94b(0x90)],'configName':_0x1b51df['document']['configName'],'channelType':_0x1b51df[_0x52a94b(0x8e)][_0x52a94b(0x9a)]},'before':null,'after':_0x1b51df[_0x52a94b(0x8c)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x644ecf}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x4e4789){const _0x588887=a135_0x39257e,_0x10de7c=await prepareCreate(_0x4e4789),_0x448106=notificationLookupCommand(_0x4e4789[_0x588887(0x90)],_0x10de7c[_0x588887(0x8e)][_0x588887(0x9a)]);let _0x4abd76;try{_0x4abd76=await createNotificationChannelConfig(_0x10de7c['input']);}catch(_0x189c87){if(isPlatformTransportFailure(_0x189c87))throw notificationError(_0x588887(0x87),_0x588887(0x84),_0x588887(0x7b)+_0x448106+_0x588887(0x83));throw safeApiFailure(_0x588887(0x96),_0x588887(0x89),_0x588887(0x7b)+_0x448106+_0x588887(0x88));}if(!Number[_0x588887(0x85)](_0x4abd76)||_0x4abd76<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x588887(0x8f),_0x588887(0x7b)+_0x448106+_0x588887(0x83));let _0x5a7cef;try{const _0x16d076=await getNotificationChannelConfig(_0x4abd76,_0x4e4789['appCode']);_0x5a7cef=normalizeExactNotificationConfig(_0x16d076,_0x4abd76,_0x4e4789[_0x588887(0x90)]);}catch{throw safeApiFailure(_0x588887(0x96),_0x588887(0x7c),_0x588887(0x7b)+_0x448106+_0x588887(0x98));}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x5a7cef[_0x588887(0x90)],'id':_0x5a7cef['id'],'configCode':_0x5a7cef['configCode'],'configName':_0x5a7cef[_0x588887(0x95)],'channelType':_0x5a7cef[_0x588887(0x9a)]},'before':null,'after':projectNotificationConfig(_0x5a7cef),'dryRun':![],'backend':{'method':_0x588887(0x7f),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x588887(0x94),'lookupCommand':_0x448106}},'message':_0x588887(0x93)+_0x5a7cef['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a136_0x4f5a(_0x2d6223,_0x10f357){_0x2d6223=_0x2d6223-0x1ab;const _0x4c6232=a136_0x4c62();let _0x4f5ab2=_0x4c6232[_0x2d6223];return _0x4f5ab2;}const a136_0x4316bd=a136_0x4f5a;(function(_0xe06cb9,_0x4b0684){const _0x1f8ed5=a136_0x4f5a,_0x39bd29=_0xe06cb9();while(!![]){try{const _0xf00d63=-parseInt(_0x1f8ed5(0x1b1))/0x1*(-parseInt(_0x1f8ed5(0x1bc))/0x2)+parseInt(_0x1f8ed5(0x1cb))/0x3+-parseInt(_0x1f8ed5(0x1be))/0x4*(-parseInt(_0x1f8ed5(0x1c8))/0x5)+parseInt(_0x1f8ed5(0x1ba))/0x6+-parseInt(_0x1f8ed5(0x1c0))/0x7*(parseInt(_0x1f8ed5(0x1b8))/0x8)+parseInt(_0x1f8ed5(0x1ac))/0x9*(-parseInt(_0x1f8ed5(0x1b5))/0xa)+-parseInt(_0x1f8ed5(0x1af))/0xb;if(_0xf00d63===_0x4b0684)break;else _0x39bd29['push'](_0x39bd29['shift']());}catch(_0x2958d3){_0x39bd29['push'](_0x39bd29['shift']());}}}(a136_0x4c62,0xdcb6f));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a136_0x4c62(){const _0x1240d3=['1383140OOFrVb','unshift','before','4444167mBDkJG','/notification/channel-config/delete','23517GzWTYi','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','verified','7516157kqGrOb','notification_config_delete_verification_unavailable','157543UkFqpf','notification_config_delete_outcome_unknown','notification_config_delete_verification_failed','notification','5690UnPMyC','channelType',';\x20no\x20automatic\x20retry\x20was\x20attempted.','72eKlVPk','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','8877360IkJjeQ','Deleted\x20notification\x20config\x20','6OVrsqz','Inspect\x20with\x20','4TcGEjx','config-delete','494725WZkYBF',';\x20do\x20not\x20resubmit\x20automatically.','some','Notification\x20config\x20','POST','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','appCode','delete'];a136_0x4c62=function(){return _0x1240d3;};return a136_0x4c62();}import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a136_0x4316bd(0x1ab),REFERENCE_WARNING=a136_0x4316bd(0x1c5);async function prepareDelete(_0x5cb5ad){const _0x3db94f=a136_0x4316bd,_0x52df53=readNotificationId(_0x5cb5ad),_0xf8ee21=await requireExactNotificationConfig(_0x5cb5ad['appCode'],_0x52df53,_0x3db94f(0x1c7));return{'id':_0x52df53,'before':_0xf8ee21};}export const notificationConfigDelete={'service':a136_0x4316bd(0x1b4),'command':a136_0x4316bd(0x1bf),'description':a136_0x4316bd(0x1ad),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x4ee628){readNotificationId(_0x4ee628),requireNotificationExplicitYes(_0x4ee628);},async 'dryRun'(_0x239622){const _0x24b8f3=a136_0x4316bd,_0x5d818d=await prepareDelete(_0x239622),_0x1f40ef=notificationLookupCommand(_0x239622[_0x24b8f3(0x1c6)],_0x5d818d[_0x24b8f3(0x1ca)][_0x24b8f3(0x1b6)]);return asDryRunResult({'operation':_0x24b8f3(0x1c7),'selector':notificationSelector(_0x5d818d[_0x24b8f3(0x1ca)]),'before':projectNotificationConfig(_0x5d818d['before']),'after':null,'dryRun':!![],'backend':{'method':_0x24b8f3(0x1c4),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x1f40ef}},{'method':_0x24b8f3(0x1c4),'url':DELETE_PATH});},async 'execute'(_0x270190){const _0x24cf4f=a136_0x4316bd;requireNotificationExplicitYes(_0x270190);const _0x41e032=await prepareDelete(_0x270190),_0x5cec70=notificationLookupCommand(_0x270190[_0x24cf4f(0x1c6)],_0x41e032[_0x24cf4f(0x1ca)][_0x24cf4f(0x1b6)]);let _0x227a95=![];try{await deleteNotificationChannelConfig(_0x41e032['id'],_0x270190[_0x24cf4f(0x1c6)]);}catch(_0xf4fa64){if(!isPlatformTransportFailure(_0xf4fa64))throw safeApiFailure(_0x24cf4f(0x1c7),'mutation',_0x24cf4f(0x1bd)+_0x5cec70+_0x24cf4f(0x1b7));_0x227a95=!![];}let _0x416cf8;try{_0x416cf8=await listNotificationChannelConfigs(_0x270190[_0x24cf4f(0x1c6)],_0x41e032[_0x24cf4f(0x1ca)][_0x24cf4f(0x1b6)]),validateNotificationDeleteReadback(_0x416cf8,_0x270190[_0x24cf4f(0x1c6)],_0x41e032['before'][_0x24cf4f(0x1b6)]);}catch{throw notificationError(_0x227a95?_0x24cf4f(0x1b2):_0x24cf4f(0x1b0),_0x24cf4f(0x1c3)+_0x41e032['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x24cf4f(0x1bd)+_0x5cec70+_0x24cf4f(0x1c1));}if(_0x416cf8[_0x24cf4f(0x1c2)](_0x172be7=>_0x172be7['id']===_0x41e032['id']))throw notificationError(_0x227a95?'notification_config_delete_outcome_unknown':_0x24cf4f(0x1b3),'Notification\x20config\x20'+_0x41e032['id']+'\x20remains\x20present\x20after\x20delete.',_0x24cf4f(0x1bd)+_0x5cec70+';\x20do\x20not\x20resubmit\x20automatically.');const _0x5428dd=[REFERENCE_WARNING];return _0x227a95&&_0x5428dd[_0x24cf4f(0x1c9)](_0x24cf4f(0x1b9)),{'ok':!![],'data':{'operation':_0x24cf4f(0x1c7),'selector':notificationSelector(_0x41e032[_0x24cf4f(0x1ca)]),'before':projectNotificationConfig(_0x41e032[_0x24cf4f(0x1ca)]),'after':null,'dryRun':![],'backend':{'method':_0x24cf4f(0x1c4),'path':DELETE_PATH},'warnings':_0x5428dd,'verification':{'status':_0x24cf4f(0x1ae),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x227a95,'lookupCommand':_0x5cec70}},'message':_0x24cf4f(0x1bb)+_0x41e032['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a137_0x1bfaba=a137_0x141c;(function(_0x256960,_0x421898){const _0x4d7e3d=a137_0x141c,_0x5708d4=_0x256960();while(!![]){try{const _0x577c51=-parseInt(_0x4d7e3d(0x1eb))/0x1+parseInt(_0x4d7e3d(0x1e3))/0x2*(parseInt(_0x4d7e3d(0x1e1))/0x3)+-parseInt(_0x4d7e3d(0x1e5))/0x4+-parseInt(_0x4d7e3d(0x1e9))/0x5+-parseInt(_0x4d7e3d(0x1f2))/0x6+-parseInt(_0x4d7e3d(0x1ee))/0x7*(parseInt(_0x4d7e3d(0x1ea))/0x8)+-parseInt(_0x4d7e3d(0x1e0))/0x9*(-parseInt(_0x4d7e3d(0x1e4))/0xa);if(_0x577c51===_0x421898)break;else _0x5708d4['push'](_0x5708d4['shift']());}catch(_0x5c8077){_0x5708d4['push'](_0x5708d4['shift']());}}}(a137_0x377f,0x64ade));function a137_0x377f(){const _0x50dae2=['10XeQrCX','90ioBTHA','760672mWJbVN','config-list','string','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','3648390zIPgIh','64wpdJDM','208799hpeati','\x20notification\x20config(s)','EMAIL','189539RwwonA','notification','Found\x20','Notification\x20channel\x20type','3231948uUaQov','length','type','appCode','1738701PsuXiu','334560YSfrXe','map'];a137_0x377f=function(){return _0x50dae2;};return a137_0x377f();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a137_0x141c(_0x27c5ef,_0x484db8){_0x27c5ef=_0x27c5ef-0x1df;const _0x377f61=a137_0x377f();let _0x141cff=_0x377f61[_0x27c5ef];return _0x141cff;}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a137_0x1bfaba(0x1ef),'command':a137_0x1bfaba(0x1e6),'description':a137_0x1bfaba(0x1e8),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a137_0x1bfaba(0x1f4),'type':a137_0x1bfaba(0x1e7),'description':a137_0x1bfaba(0x1f1),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a137_0x1bfaba(0x1ed)}],async 'validate'(_0x18fdec){readNotificationChannelType(_0x18fdec);},async 'execute'(_0x35c2a3){const _0x4f4956=a137_0x1bfaba,_0x2095fa=readNotificationChannelType(_0x35c2a3),_0x4b9e2d=await listNotificationChannelConfigs(_0x35c2a3[_0x4f4956(0x1df)],_0x2095fa),_0x29e606=_0x4b9e2d[_0x4f4956(0x1e2)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x35c2a3[_0x4f4956(0x1df)],'channelType':_0x2095fa,'count':_0x29e606[_0x4f4956(0x1f3)],'configs':_0x29e606},'message':_0x4f4956(0x1f0)+_0x29e606[_0x4f4956(0x1f3)]+'\x20'+_0x2095fa+_0x4f4956(0x1ec)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a138_0x33490d=a138_0x1f7f;(function(_0x1a0303,_0x24be7b){const _0x250f29=a138_0x1f7f,_0x222ab1=_0x1a0303();while(!![]){try{const _0x1c7bca=parseInt(_0x250f29(0x13c))/0x1+-parseInt(_0x250f29(0x12e))/0x2+parseInt(_0x250f29(0x12a))/0x3+parseInt(_0x250f29(0x13a))/0x4+-parseInt(_0x250f29(0x142))/0x5*(-parseInt(_0x250f29(0x129))/0x6)+-parseInt(_0x250f29(0x138))/0x7+-parseInt(_0x250f29(0x12d))/0x8*(parseInt(_0x250f29(0x13e))/0x9);if(_0x1c7bca===_0x24be7b)break;else _0x222ab1['push'](_0x222ab1['shift']());}catch(_0x17e6be){_0x222ab1['push'](_0x222ab1['shift']());}}}(a138_0x32ba,0xccb99));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';function a138_0x1f7f(_0x39d2ba,_0x5870e4){_0x39d2ba=_0x39d2ba-0x124;const _0x32baaf=a138_0x32ba();let _0x1f7f4b=_0x32baaf[_0x39d2ba];return _0x1f7f4b;}const UPDATE_PATH=a138_0x33490d(0x136);async function prepareUpdate(_0x2b5476){const _0x50a8ce=a138_0x33490d,_0x1a3f12=readNotificationId(_0x2b5476),_0x57433b=await readNotificationDocument(_0x2b5476,_0x50a8ce(0x143)),_0x198617=await requireExactNotificationConfig(_0x2b5476[_0x50a8ce(0x13f)],_0x1a3f12,_0x50a8ce(0x143));return{'id':_0x1a3f12,'patch':_0x57433b,'before':_0x198617,'payload':mergeUpdateInput(_0x198617,_0x57433b),'planned':plannedUpdateProjection(_0x198617,_0x57433b)};}export const notificationConfigUpdate={'service':'notification','command':a138_0x33490d(0x13b),'description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':a138_0x33490d(0x12c),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x192342){readNotificationId(_0x192342),assertSingleNotificationSource(_0x192342),requireNotificationExplicitYes(_0x192342);},async 'dryRun'(_0x4a2a59){const _0x1d4ea1=a138_0x33490d,_0x41a14d=await prepareUpdate(_0x4a2a59),_0x1a8b2f=notificationLookupCommand(_0x4a2a59[_0x1d4ea1(0x13f)],_0x41a14d[_0x1d4ea1(0x131)][_0x1d4ea1(0x144)]);return asDryRunResult({'operation':_0x1d4ea1(0x143),'selector':notificationSelector(_0x41a14d[_0x1d4ea1(0x131)]),'before':projectNotificationConfig(_0x41a14d[_0x1d4ea1(0x131)]),'after':_0x41a14d[_0x1d4ea1(0x141)],'dryRun':!![],'backend':{'method':_0x1d4ea1(0x140),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x1d4ea1(0x141),'lookupCommand':_0x1a8b2f}},{'method':_0x1d4ea1(0x140),'url':UPDATE_PATH});},async 'execute'(_0x4a266c){const _0x2f9c66=a138_0x33490d;requireNotificationExplicitYes(_0x4a266c);const _0x26a9c0=await prepareUpdate(_0x4a266c),_0x3808c0=notificationLookupCommand(_0x4a266c[_0x2f9c66(0x13f)],_0x26a9c0[_0x2f9c66(0x131)]['channelType']);let _0x40bb99=![];try{await updateNotificationChannelConfig(_0x26a9c0['payload']);}catch(_0x10d82b){if(!isPlatformTransportFailure(_0x10d82b))throw safeApiFailure(_0x2f9c66(0x143),_0x2f9c66(0x125),_0x2f9c66(0x132)+_0x26a9c0['id']+'\x20with\x20'+_0x3808c0+_0x2f9c66(0x128));_0x40bb99=!![];}let _0x177b44;try{const _0xa1eff9=await getNotificationChannelConfig(_0x26a9c0['id'],_0x4a266c[_0x2f9c66(0x13f)]);_0x177b44=normalizeExactNotificationConfig(_0xa1eff9,_0x26a9c0['id'],_0x4a266c['appCode']);}catch{throw notificationError(_0x40bb99?'notification_config_update_outcome_unknown':_0x2f9c66(0x134),_0x2f9c66(0x127)+_0x26a9c0['id']+_0x2f9c66(0x137),_0x2f9c66(0x12f)+_0x26a9c0['id']+'\x20via\x20'+_0x3808c0+_0x2f9c66(0x133));}const _0x25ac78=requestedSafeFieldsMatch(_0x26a9c0['before'],_0x177b44,_0x26a9c0[_0x2f9c66(0x13d)]);if(!_0x25ac78[_0x2f9c66(0x130)]||_0x40bb99&&!_0x25ac78['provesChange'])throw notificationError(_0x40bb99?'notification_config_update_outcome_unknown':_0x2f9c66(0x12b),_0x2f9c66(0x127)+_0x26a9c0['id']+_0x2f9c66(0x126),'Inspect\x20with\x20--id\x20'+_0x26a9c0['id']+_0x2f9c66(0x139)+_0x3808c0+_0x2f9c66(0x133));const _0x260e75=_0x40bb99?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x2f9c66(0x143),'selector':notificationSelector(_0x177b44),'before':projectNotificationConfig(_0x26a9c0[_0x2f9c66(0x131)]),'after':projectNotificationConfig(_0x177b44),'dryRun':![],'backend':{'method':_0x2f9c66(0x140),'path':UPDATE_PATH},'warnings':_0x260e75,'verification':{'status':_0x2f9c66(0x124),'recoveredAfterUnknownResponse':_0x40bb99,'verifiedFields':_0x25ac78[_0x2f9c66(0x135)],'lookupCommand':_0x3808c0}},'message':'Updated\x20notification\x20config\x20'+_0x177b44['id']};}};function a138_0x32ba(){const _0x37516e=['appCode','POST','planned','10riLaPz','update','channelType','verified','mutation','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','Notification\x20config\x20',';\x20no\x20automatic\x20retry\x20was\x20attempted.','4969278jSmAmu','3668670zmibUN','notification_config_update_verification_failed','high-risk-write','8tKioUy','1569510arCzRF','Inspect\x20with\x20--id\x20','allMatch','before','Inspect\x20ID\x20',';\x20do\x20not\x20resubmit\x20automatically.','notification_config_update_verification_unavailable','verifiedFields','/notification/channel-config/update','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','247996iciKYQ','\x20via\x20','5725748nixOUC','config-update','721455jzmrni','patch','30361248kBxqdB'];a138_0x32ba=function(){return _0x37516e;};return a138_0x32ba();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x560d7a,_0x22b1a7){const _0x478125=a139_0xef53,_0x12f3fa=_0x560d7a();while(!![]){try{const _0x1465a2=-parseInt(_0x478125(0xb6))/0x1+-parseInt(_0x478125(0xbb))/0x2+-parseInt(_0x478125(0xb5))/0x3+-parseInt(_0x478125(0xb7))/0x4+-parseInt(_0x478125(0xbc))/0x5*(-parseInt(_0x478125(0xb8))/0x6)+parseInt(_0x478125(0xba))/0x7*(parseInt(_0x478125(0xb4))/0x8)+parseInt(_0x478125(0xb9))/0x9;if(_0x1465a2===_0x22b1a7)break;else _0x12f3fa['push'](_0x12f3fa['shift']());}catch(_0x49577a){_0x12f3fa['push'](_0x12f3fa['shift']());}}}(a139_0x3566,0x5fd67));function a139_0xef53(_0x2a2595,_0x34003a){_0x2a2595=_0x2a2595-0xb4;const _0x35662a=a139_0x3566();let _0xef53eb=_0x35662a[_0x2a2595];return _0xef53eb;}import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a139_0x3566(){const _0x4b937d=['871914XRogMG','489767JzRkjn','2827372oARCZI','95358OxkyAH','16060491ifgfQg','21FiOMtt','1216822GuSuJb','55EehUEi','1410368WMPlTY'];a139_0x3566=function(){return _0x4b937d;};return a139_0x3566();}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|