@lovrabet/rabetbase-cli 2.4.7 → 2.5.0-beta.2
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-business-group-update.md +17 -6
- 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
|
-
|
|
1
|
+
const a129_0x485bf1=a129_0x3714;(function(_0x458b15,_0x25a21f){const _0x3300c9=a129_0x3714,_0x3f5667=_0x458b15();while(!![]){try{const _0xe701a9=parseInt(_0x3300c9(0x8f))/0x1*(-parseInt(_0x3300c9(0x75))/0x2)+-parseInt(_0x3300c9(0x83))/0x3+parseInt(_0x3300c9(0x80))/0x4*(-parseInt(_0x3300c9(0xa0))/0x5)+parseInt(_0x3300c9(0x77))/0x6*(-parseInt(_0x3300c9(0x8e))/0x7)+-parseInt(_0x3300c9(0xa3))/0x8*(parseInt(_0x3300c9(0x97))/0x9)+-parseInt(_0x3300c9(0x99))/0xa*(parseInt(_0x3300c9(0x76))/0xb)+parseInt(_0x3300c9(0x87))/0xc;if(_0xe701a9===_0x25a21f)break;else _0x3f5667['push'](_0x3f5667['shift']());}catch(_0x325647){_0x3f5667['push'](_0x3f5667['shift']());}}}(a129_0x590c,0xbba96));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a129_0x3714(_0x45fa00,_0x57055b){_0x45fa00=_0x45fa00-0x6d;const _0x590cea=a129_0x590c();let _0x37146f=_0x590cea[_0x45fa00];return _0x37146f;}import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a129_0x590c(){const _0x5a926c=['36cTKoFo','Menu\x20sync\x20completed','has',':\x20expected\x20a\x20non-empty\x20string.','path','map','info','filter','\x0a\x20\x20Available\x20local\x20paths:\x20','8uaUSZP','label','length','1716252uUezKK','Invalid\x20--params.','keys','object','73952796PGGlVB','cssUrl','pages','isArray','string','field','Invalid\x20--params\x20JSON.','517895pDyTtL','1aTbCib','parse','menu-sync','JS\x20URL\x20is\x20unreachable:\x20','CSS\x20URL\x20is\x20unreachable:\x20','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','trim','405765nottbq','Invalid\x20--params\x20fields:\x20','10LFibXq','join','Start\x20non-interactive\x20menu\x20sync','get','push','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','dryRun','3197000pcWfUu','cwd','jsUrl','64JEGiFR','Invalid\x20--params:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','No\x20local\x20pages\x20matched\x20paths:\x20','import','hasOwn','--params.','procode','2890326OylHCt','14227774BOmsGs'];a129_0x590c=function(){return _0x5a926c;};return a129_0x590c();}import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a129_0x485bf1(0xa2),a129_0x485bf1(0x88)]);function validateParams(_0x948d6f){const _0x1560c7=a129_0x485bf1,_0x27a47f=[];return _0x948d6f[_0x1560c7(0xa2)]&&!isValidJsHttpsUrl(_0x948d6f[_0x1560c7(0xa2)])&&_0x27a47f[_0x1560c7(0x9d)]({'field':_0x1560c7(0xa2),'message':_0x1560c7(0x9e)}),_0x948d6f[_0x1560c7(0x88)]&&!isValidCssHttpsUrl(_0x948d6f['cssUrl'])&&_0x27a47f['push']({'field':'cssUrl','message':_0x1560c7(0x6e)}),_0x27a47f;}export async function runMenuSyncCore(_0x554715,_0x248810,_0x4752f3=[],_0x53ab9a,_0x6915dd={}){const _0x42defd=a129_0x485bf1,_0x1d9bc7=parseMenuSyncParams(_0x53ab9a),_0xb8b5f5=[...new Set(_0x4752f3[_0x42defd(0x7c)](_0x4f6bb7=>_0x4f6bb7[_0x42defd(0x96)]())[_0x42defd(0x7e)](Boolean))],_0x577352=_0x1d9bc7[_0x42defd(0xa2)],_0x4729d2=_0x1d9bc7[_0x42defd(0x88)],_0x3b099b=[];if(_0x577352)_0x3b099b['push'](_0x577352);if(_0x4729d2)_0x3b099b['push'](_0x4729d2);const _0x37921a=validateParams(_0x1d9bc7);if(_0x37921a[_0x42defd(0x82)]>0x0){const _0x23f1d6=_0x37921a[_0x42defd(0x7c)](_0x155606=>_0x42defd(0x73)+_0x155606[_0x42defd(0x8c)]+':\x20'+_0x155606['message'])[_0x42defd(0x9a)](';\x20');throw new Error(_0x42defd(0x6d)+_0x23f1d6);}logger['setLogPath'](process[_0x42defd(0xa1)]()),logger[_0x42defd(0x7d)](_0x42defd(0x91),_0x42defd(0x9b),{'appCode':_0x554715,'selectedCount':_0xb8b5f5[_0x42defd(0x82)],'jsUrl':_0x577352,'cssUrl':_0x4729d2});if(_0x577352){const _0x4a4cc4=await isUrlReachable(_0x577352);if(!_0x4a4cc4)throw new Error(_0x42defd(0x92)+_0x577352);}if(_0x4729d2){const _0x2a7e64=await isUrlReachable(_0x4729d2);if(!_0x2a7e64)throw new Error(_0x42defd(0x93)+_0x4729d2);}const _0x118ad0=getLocalPages();if(_0x118ad0['length']===0x0){if(_0xb8b5f5[_0x42defd(0x82)]>0x0)throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0xb8b5f5[_0x42defd(0x9a)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x6915dd[_0x42defd(0x9f)]===!![],'targetPages':[],'plannedMenus':[]};}const _0xc6979c=await getOnlineMenuList(_0x554715,_0x248810),_0x20fb07=new Set(_0xc6979c[_0x42defd(0x7c)](_0x3d66c1=>_0x3d66c1[_0x42defd(0x7b)]));let _0x4a056a;if(_0xb8b5f5[_0x42defd(0x82)]>0x0){const _0xd60657=new Map(_0x118ad0[_0x42defd(0x7c)](_0x3b4d10=>[_0x3b4d10['path'],_0x3b4d10])),_0x4e4805=_0xb8b5f5[_0x42defd(0x7e)](_0x1b694e=>!_0xd60657[_0x42defd(0x79)](_0x1b694e));if(_0x4e4805[_0x42defd(0x82)]>0x0){const _0x1f8c41=_0x118ad0[_0x42defd(0x7c)](_0x3fa4db=>_0x3fa4db['path'])[_0x42defd(0x9a)](',\x20');throw new Error(_0x42defd(0x70)+_0x4e4805[_0x42defd(0x9a)](',\x20')+_0x42defd(0x7f)+_0x1f8c41);}const _0xe91181=_0xb8b5f5[_0x42defd(0x7e)](_0x3ef6cd=>_0x20fb07['has'](_0x3ef6cd));if(_0xe91181[_0x42defd(0x82)]>0x0)throw new Error(_0x42defd(0x95)+_0xe91181['join'](',\x20'));_0x4a056a=_0xb8b5f5[_0x42defd(0x7c)](_0x5dfcd5=>_0xd60657[_0x42defd(0x9c)](_0x5dfcd5));}else _0x4a056a=_0x118ad0[_0x42defd(0x7e)](_0x3929f3=>!_0x20fb07[_0x42defd(0x79)](_0x3929f3['path']));if(_0x4a056a['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x6915dd['dryRun']===!![],'targetPages':[],'plannedMenus':[]};const _0x531ba3=_0x4a056a[_0x42defd(0x7c)](_0x35720c=>({'type':_0x42defd(0x74),'path':_0x35720c['path'],'label':_0x35720c[_0x42defd(0x81)],'loadScriptMode':_0x42defd(0x71),'resources':[..._0x3b099b]}));if(_0x6915dd[_0x42defd(0x9f)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x4a056a,'plannedMenus':_0x531ba3};const _0x9a3977=await createMenus(_0x554715,_0x248810,_0x4a056a,_0x3b099b[_0x42defd(0x82)]>0x0?_0x3b099b:undefined);return logger[_0x42defd(0x7d)](_0x42defd(0x91),_0x42defd(0x78),{'count':_0x4a056a[_0x42defd(0x82)],'resources':_0x3b099b}),{'created':_0x9a3977[_0x42defd(0x82)],'skipped':![],'dryRun':![],'targetPages':_0x4a056a,'plannedMenus':_0x531ba3,'menus':_0x9a3977};}export function parseMenuSyncParams(_0x42850d){const _0x314470=a129_0x485bf1;if(!_0x42850d||typeof _0x42850d!==_0x314470(0x8b))return{};let _0x5114d1;try{_0x5114d1=JSON[_0x314470(0x90)](_0x42850d);}catch{throw new Error(_0x314470(0x8d));}if(typeof _0x5114d1!==_0x314470(0x86)||_0x5114d1===null||Array[_0x314470(0x8a)](_0x5114d1))throw new Error(_0x314470(0x94));const _0x448655=_0x5114d1;if(Object[_0x314470(0x72)](_0x448655,_0x314470(0x89)))throw new Error(_0x314470(0x6f));const _0x442f30=Object[_0x314470(0x85)](_0x448655)['filter'](_0x6b1c6c=>!MENU_SYNC_PARAM_KEYS['has'](_0x6b1c6c));if(_0x442f30[_0x314470(0x82)]>0x0)throw new Error(_0x314470(0x98)+_0x442f30[_0x314470(0x9a)](',\x20')+'.');for(const _0xe714b2 of MENU_SYNC_PARAM_KEYS){const _0x21077c=_0x448655[_0xe714b2];if(_0x21077c!==undefined&&(typeof _0x21077c!==_0x314470(0x8b)||_0x21077c[_0x314470(0x96)]()===''))throw new Error(_0x314470(0x84)+_0xe714b2+_0x314470(0x7a));}return{'jsUrl':typeof _0x448655[_0x314470(0xa2)]==='string'?_0x448655[_0x314470(0xa2)][_0x314470(0x96)]():undefined,'cssUrl':typeof _0x448655[_0x314470(0x88)]==='string'?_0x448655[_0x314470(0x88)][_0x314470(0x96)]():undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x49709e,_0x1e4004){const _0x4f9a4f=a133_0x5bc5,_0x32f7da=_0x49709e();while(!![]){try{const _0x3459d5=parseInt(_0x4f9a4f(0xac))/0x1+parseInt(_0x4f9a4f(0xc9))/0x2+-parseInt(_0x4f9a4f(0xb7))/0x3*(parseInt(_0x4f9a4f(0xe6))/0x4)+parseInt(_0x4f9a4f(0xd1))/0x5+-parseInt(_0x4f9a4f(0xe4))/0x6*(-parseInt(_0x4f9a4f(0xb9))/0x7)+-parseInt(_0x4f9a4f(0xae))/0x8*(-parseInt(_0x4f9a4f(0xea))/0x9)+-parseInt(_0x4f9a4f(0xb5))/0xa*(parseInt(_0x4f9a4f(0xe5))/0xb);if(_0x3459d5===_0x1e4004)break;else _0x32f7da['push'](_0x32f7da['shift']());}catch(_0x113ec7){_0x32f7da['push'](_0x32f7da['shift']());}}}(a133_0x294c,0xe9f5c));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x7536bc){const _0x2ccd39=a133_0x5bc5,_0x585d35=[];return _0x7536bc[_0x2ccd39(0xc0)]&&!isValidJsHttpsUrl(_0x7536bc[_0x2ccd39(0xc0)])&&_0x585d35[_0x2ccd39(0xdc)]({'field':'jsUrl','message':_0x2ccd39(0xc3)}),_0x7536bc['cssUrl']&&!isValidCssHttpsUrl(_0x7536bc[_0x2ccd39(0xcc)])&&_0x585d35[_0x2ccd39(0xdc)]({'field':_0x2ccd39(0xcc),'message':_0x2ccd39(0xd8)}),_0x585d35;}export async function runMenuUpdateCore(_0x2dfd8c,_0x34a2b3,_0x3b571a,_0x54feee={}){const _0x416415=a133_0x5bc5,_0xc45b5b=parseUpdateParamsFlag(_0x3b571a),_0x3a6a88=normalizeMode(_0x54feee['mode']);validateSelection(_0x54feee['selection']);const _0xd98054=[];if(_0xc45b5b[_0x416415(0xc0)])_0xd98054['push'](_0xc45b5b[_0x416415(0xc0)]);if(_0xc45b5b[_0x416415(0xcc)])_0xd98054[_0x416415(0xdc)](_0xc45b5b[_0x416415(0xcc)]);const _0x1883c2=validateParams(_0xc45b5b);if(_0x1883c2['length']>0x0){const _0xa88398=_0x1883c2[_0x416415(0xad)](_0x40acf4=>_0x416415(0xca)+_0x40acf4[_0x416415(0xcf)]+':\x20'+_0x40acf4['message'])[_0x416415(0xe1)](';\x20');throw new Error(_0x416415(0xd0)+_0xa88398);}if(_0xd98054['length']===0x0)throw new Error(_0x416415(0xc5)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x416415(0xc2)](process['cwd']()),logger[_0x416415(0xee)]('menu-asset-update',_0x416415(0xb4),{'appCode':_0x2dfd8c,'jsUrl':_0xc45b5b['jsUrl'],'cssUrl':_0xc45b5b[_0x416415(0xcc)],'mode':_0x3a6a88,'dryRun':_0x54feee['dryRun']===!![]});if(_0xc45b5b[_0x416415(0xc0)]){const _0x2fc42b=await isUrlReachable(_0xc45b5b[_0x416415(0xc0)]);if(!_0x2fc42b)throw new Error(_0x416415(0xcd)+_0xc45b5b[_0x416415(0xc0)]);}if(_0xc45b5b[_0x416415(0xcc)]){const _0x455977=await isUrlReachable(_0xc45b5b[_0x416415(0xcc)]);if(!_0x455977)throw new Error(_0x416415(0xb8)+_0xc45b5b[_0x416415(0xcc)]);}const _0x1f9655=await getOnlineMenuList(_0x2dfd8c,_0x34a2b3),_0x283ca1=_0x1f9655[_0x416415(0xd4)](_0x56e213=>_0x56e213[_0x416415(0xba)][_0x416415(0xcb)]>0x0),_0xcef877=selectMenusForUpdate(_0x283ca1,_0x54feee[_0x416415(0xbc)]);if(_0xcef877[_0x416415(0xcb)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x54feee[_0x416415(0xd3)]===!![]};const _0xee021a=_0xcef877[_0x416415(0xad)](_0x5e52d1=>buildMenuUpdateDiff(_0x5e52d1,_0xc45b5b,_0x3a6a88,_0x54feee[_0x416415(0xbe)]===!![],_0x54feee[_0x416415(0xe2)]));if(_0x54feee[_0x416415(0xd3)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0xee021a};const _0x235828=await Promise[_0x416415(0xc1)](_0xcef877[_0x416415(0xad)]((_0x580cef,_0x19537f)=>updateMenuCdnUrl(_0x2dfd8c,_0x34a2b3,{'id':_0x580cef['id'],'label':_0x580cef['label'],'path':_0x580cef[_0x416415(0xde)],'resources':_0xee021a[_0x19537f]['after'][_0x416415(0xba)],'extend':_0x580cef[_0x416415(0xe3)]??null,'loadScriptMode':_0x54feee['loadScriptMode']}))),_0x41be78=_0x235828[_0x416415(0xd4)](_0x521f8a=>_0x521f8a[_0x416415(0xdf)]==='fulfilled')['map'](_0x3e6b19=>_0x3e6b19['value']),_0x1c6976=_0x235828[_0x416415(0xd4)](_0x2f0823=>_0x2f0823[_0x416415(0xdf)]===_0x416415(0xe7))['length'];return logger['info'](_0x416415(0xe0),_0x416415(0xaf),{'count':_0xcef877[_0x416415(0xcb)],'resources':_0xd98054}),{'updated':_0x41be78[_0x416415(0xcb)],'failed':_0x1c6976,'skipped':![],'menus':_0x41be78};}function validateSelection(_0x513158){const _0x5d4395=a133_0x5bc5;if(!_0x513158)throw new Error(_0x5d4395(0xb0));if(_0x513158[_0x5d4395(0xe9)]&&(_0x513158[_0x5d4395(0xb6)][_0x5d4395(0xcb)]>0x0||_0x513158['paths'][_0x5d4395(0xcb)]>0x0))throw new Error(_0x5d4395(0xc4));if(!_0x513158[_0x5d4395(0xe9)]&&_0x513158[_0x5d4395(0xb6)][_0x5d4395(0xcb)]===0x0&&_0x513158[_0x5d4395(0xbf)]['length']===0x0)throw new Error(_0x5d4395(0xb0));}export function selectMenusForUpdate(_0x580155,_0x97ba80){const _0x145c95=a133_0x5bc5;validateSelection(_0x97ba80);if(_0x97ba80['all'])return _0x580155;const _0x16a5e5=new Set(_0x580155[_0x145c95(0xad)](_0x2b385f=>_0x2b385f['id'])),_0x101e04=new Set(_0x580155[_0x145c95(0xad)](_0x366b87=>_0x366b87[_0x145c95(0xde)])),_0x57bca1=_0x97ba80[_0x145c95(0xb6)]['filter'](_0x4c55b0=>!_0x16a5e5[_0x145c95(0xd9)](_0x4c55b0)),_0x135457=_0x97ba80[_0x145c95(0xbf)][_0x145c95(0xd4)](_0x495d66=>!_0x101e04[_0x145c95(0xd9)](_0x495d66));if(_0x57bca1[_0x145c95(0xcb)]>0x0||_0x135457['length']>0x0){const _0x112a1e=[..._0x57bca1['map'](_0x315c91=>String(_0x315c91)),..._0x135457][_0x145c95(0xe1)](',\x20');throw new Error(_0x145c95(0xeb)+_0x112a1e);}const _0x2096a9=new Set(_0x97ba80['menuIds']),_0x32b05b=new Set(_0x97ba80[_0x145c95(0xbf)]);return _0x580155[_0x145c95(0xd4)](_0xc90b7d=>_0x2096a9[_0x145c95(0xd9)](_0xc90b7d['id'])||_0x32b05b['has'](_0xc90b7d[_0x145c95(0xde)]));}function normalizeMode(_0x11de83){const _0x4ac79e=a133_0x5bc5;if(!_0x11de83)return _0x4ac79e(0xdd);if(_0x11de83==='replace'||_0x11de83===_0x4ac79e(0xdd))return _0x11de83;throw new Error(_0x4ac79e(0xbd)+_0x11de83+'.\x20Allowed\x20values:\x20replace,\x20patch');}function buildMenuUpdateDiff(_0x219976,_0x2c5207,_0x1a6c96,_0x56273d,_0x314b3e){const _0x26a039=a133_0x5bc5,_0x473d2a=[..._0x219976['resources']];_0x1a6c96==='patch'&&assertUnambiguousPatchResources(_0x219976,_0x473d2a,_0x2c5207);const _0x1361c0=_0x1a6c96===_0x26a039(0xdd)?patchResources(_0x473d2a,_0x2c5207):replaceResources(_0x2c5207),_0x320fa1=[],_0x19482d=_0x473d2a[_0x26a039(0xec)](isJsResource),_0x3ec292=_0x1361c0[_0x26a039(0xec)](isJsResource);if(_0x19482d&&!_0x3ec292){const _0x250bce=_0x26a039(0xbb)+_0x219976[_0x26a039(0xab)]+'\x22\x20('+_0x219976[_0x26a039(0xde)]+_0x26a039(0xd5)+_0x26a039(0xce);if(!_0x56273d)throw new Error(_0x250bce);_0x320fa1['push'](_0x250bce);}const _0x64ea2c=_0x473d2a[_0x26a039(0xec)](isCssResource),_0x32b7bd=_0x1361c0[_0x26a039(0xec)](isCssResource);_0x64ea2c&&!_0x32b7bd&&_0x320fa1[_0x26a039(0xdc)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x219976[_0x26a039(0xab)]+'\x22\x20('+_0x219976['path']+').');const _0x4c3d87=typeof _0x219976[_0x26a039(0xe3)]?.['loadScriptMode']==='string'?_0x219976['extend'][_0x26a039(0xe2)]:null,_0x351b93=_0x314b3e?{'loadScriptMode':_0x4c3d87}:{},_0x3faa36=_0x314b3e?{'loadScriptMode':_0x314b3e}:{};return{'id':_0x219976['id'],'label':_0x219976['label'],'path':_0x219976['path'],'mode':_0x1a6c96,'before':{'resources':_0x473d2a,..._0x351b93},'after':{'resources':_0x1361c0,..._0x3faa36},'warnings':_0x320fa1};}function a133_0x294c(){const _0xc4bd6e=['paths','jsUrl','allSettled','setLogPath','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','endsWith','1891254wwQCjp','--params.','length','cssUrl','JS\x20URL\x20is\x20unreachable:\x20','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','field','Invalid\x20--params:\x20','4962595syQoHQ','\x20existing\x20JS\x20resources\x20for\x20\x22','dryRun','filter',').\x20','isArray','unshift','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','has','menu\x20asset-update\x20cannot\x20patch\x20','toLowerCase','push','patch','path','status','menu-asset-update','join','loadScriptMode','extend','153222LUFiAy','11xtDFvZ','2984woDdtX','rejected','string','all','61911FSLekT','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','some','split','info','\x22\x20(','label','633980XbDzrX','map','1152YarGUH','Menu\x20asset\x20update\x20completed','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','\x20existing\x20CSS\x20resources\x20for\x20\x22','.css','trim','Start\x20non-interactive\x20menu\x20asset\x20update','25558370SCOhCG','menuIds','5022DNlHmd','CSS\x20URL\x20is\x20unreachable:\x20','329INZFgt','resources','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','selection','Invalid\x20--mode:\x20','force'];a133_0x294c=function(){return _0xc4bd6e;};return a133_0x294c();}function replaceResources(_0x509185){const _0x1a21a4=a133_0x5bc5;return[_0x509185['jsUrl'],_0x509185['cssUrl']][_0x1a21a4(0xd4)](_0x466709=>!!_0x466709);}function a133_0x5bc5(_0x70398a,_0x43fc15){_0x70398a=_0x70398a-0xaa;const _0x294cb6=a133_0x294c();let _0x5bc597=_0x294cb6[_0x70398a];return _0x5bc597;}function assertUnambiguousPatchResources(_0x1ecb1c,_0x283d61,_0x19626b){const _0x22596a=a133_0x5bc5,_0x102e17=_0x283d61[_0x22596a(0xd4)](isJsResource)[_0x22596a(0xcb)];if(_0x19626b['jsUrl']&&_0x102e17>0x1)throw new Error(_0x22596a(0xda)+_0x102e17+_0x22596a(0xd2)+_0x1ecb1c[_0x22596a(0xab)]+_0x22596a(0xaa)+_0x1ecb1c['path']+')\x20'+_0x22596a(0xc7));const _0x404cd7=_0x283d61[_0x22596a(0xd4)](isCssResource)['length'];if(_0x19626b[_0x22596a(0xcc)]&&_0x404cd7>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x404cd7+_0x22596a(0xb1)+_0x1ecb1c[_0x22596a(0xab)]+_0x22596a(0xaa)+_0x1ecb1c['path']+')\x20'+_0x22596a(0xc6));}function patchResources(_0x4ed51f,_0x19b61c){const _0x20a4a3=a133_0x5bc5;let _0x76d413=![],_0x2a41f6=![];const _0xf8913=[];for(const _0x5d19a9 of _0x4ed51f){if(isJsResource(_0x5d19a9)){if(_0x19b61c['jsUrl']&&!_0x76d413)_0xf8913[_0x20a4a3(0xdc)](_0x19b61c[_0x20a4a3(0xc0)]),_0x76d413=!![];else!_0x19b61c['jsUrl']&&_0xf8913[_0x20a4a3(0xdc)](_0x5d19a9);continue;}if(isCssResource(_0x5d19a9)){if(_0x19b61c[_0x20a4a3(0xcc)]&&!_0x2a41f6)_0xf8913[_0x20a4a3(0xdc)](_0x19b61c['cssUrl']),_0x2a41f6=!![];else!_0x19b61c[_0x20a4a3(0xcc)]&&_0xf8913[_0x20a4a3(0xdc)](_0x5d19a9);continue;}_0xf8913[_0x20a4a3(0xdc)](_0x5d19a9);}return _0x19b61c[_0x20a4a3(0xc0)]&&!_0x76d413&&_0xf8913[_0x20a4a3(0xd7)](_0x19b61c[_0x20a4a3(0xc0)]),_0x19b61c[_0x20a4a3(0xcc)]&&!_0x2a41f6&&_0xf8913[_0x20a4a3(0xdc)](_0x19b61c[_0x20a4a3(0xcc)]),_0xf8913;}function isJsResource(_0x2b1237){const _0x37f42e=a133_0x5bc5;return stripQuery(_0x2b1237)[_0x37f42e(0xdb)]()[_0x37f42e(0xc8)]('.js');}function isCssResource(_0xa3c958){const _0x186778=a133_0x5bc5;return stripQuery(_0xa3c958)['toLowerCase']()[_0x186778(0xc8)](_0x186778(0xb2));}function stripQuery(_0x2c783a){const _0x5906f2=a133_0x5bc5;return _0x2c783a[_0x5906f2(0xed)]('?')[0x0]??_0x2c783a;}function parseUpdateParamsFlag(_0x1dde2d){const _0x4e1f1f=a133_0x5bc5;if(!_0x1dde2d||typeof _0x1dde2d!==_0x4e1f1f(0xe8))return{};try{const _0xb89a3d=JSON['parse'](_0x1dde2d);if(typeof _0xb89a3d!=='object'||_0xb89a3d===null||Array[_0x4e1f1f(0xd6)](_0xb89a3d))return{};return{'jsUrl':typeof _0xb89a3d['jsUrl']==='string'?_0xb89a3d[_0x4e1f1f(0xc0)][_0x4e1f1f(0xb3)]():undefined,'cssUrl':typeof _0xb89a3d[_0x4e1f1f(0xcc)]===_0x4e1f1f(0xe8)?_0xb89a3d[_0x4e1f1f(0xcc)][_0x4e1f1f(0xb3)]():undefined};}catch{return{};}}
|
|
1
|
+
(function(_0x4eaa80,_0x5adf26){const _0x12f7bc=a131_0x595d,_0x5178b4=_0x4eaa80();while(!![]){try{const _0x40fdf7=parseInt(_0x12f7bc(0x1f7))/0x1*(-parseInt(_0x12f7bc(0x1ed))/0x2)+parseInt(_0x12f7bc(0x1e6))/0x3*(parseInt(_0x12f7bc(0x1c5))/0x4)+-parseInt(_0x12f7bc(0x205))/0x5+-parseInt(_0x12f7bc(0x1ce))/0x6+-parseInt(_0x12f7bc(0x1cb))/0x7+-parseInt(_0x12f7bc(0x1cc))/0x8*(parseInt(_0x12f7bc(0x1e8))/0x9)+parseInt(_0x12f7bc(0x203))/0xa;if(_0x40fdf7===_0x5adf26)break;else _0x5178b4['push'](_0x5178b4['shift']());}catch(_0x5d1642){_0x5178b4['push'](_0x5178b4['shift']());}}}(a131_0x28f3,0x2ce89));function a131_0x28f3(){const _0x1ce8f4=['Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','selection','label','has','all','push','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','cwd','patch','message','unshift','split','paths','resources','cssUrl','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','Menu\x20asset\x20update\x20completed','filter','length','4035cUICtD','extend','1239633EpXDdN','\x22\x20(','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','.\x20Allowed\x20values:\x20replace,\x20patch','info','1902aDHOZv','.js','path','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','menuIds','setLogPath','status','join','JS\x20URL\x20is\x20unreachable:\x20','parse','98yOTFsf','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','replace','menu\x20asset-update\x20cannot\x20patch\x20','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','Invalid\x20--params:\x20','force','jsUrl','allSettled','trim','dryRun','some','9323070pXfPzK','--params.','1767620eFfCvV','value','map','fulfilled','string','Start\x20non-interactive\x20menu\x20asset\x20update','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','after','loadScriptMode','852NUskmN','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','.css','endsWith','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','toLowerCase','2062333JwZuyw','16kwduvF','menu-asset-update','108192LnWjNW',').\x20','Invalid\x20--mode:\x20','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','mode'];a131_0x28f3=function(){return _0x1ce8f4;};return a131_0x28f3();}import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x3ae42a){const _0x48d8c0=a131_0x595d,_0x6bf6ad=[];return _0x3ae42a[_0x48d8c0(0x1fe)]&&!isValidJsHttpsUrl(_0x3ae42a[_0x48d8c0(0x1fe)])&&_0x6bf6ad[_0x48d8c0(0x1d8)]({'field':_0x48d8c0(0x1fe),'message':_0x48d8c0(0x1d1)}),_0x3ae42a['cssUrl']&&!isValidCssHttpsUrl(_0x3ae42a[_0x48d8c0(0x1e1)])&&_0x6bf6ad['push']({'field':_0x48d8c0(0x1e1),'message':_0x48d8c0(0x1e2)}),_0x6bf6ad;}export async function runMenuUpdateCore(_0x22408f,_0x416bfe,_0x3e099a,_0x503c45={}){const _0xbe702c=a131_0x595d,_0x4789e0=parseUpdateParamsFlag(_0x3e099a),_0x1267ae=normalizeMode(_0x503c45[_0xbe702c(0x1d2)]);validateSelection(_0x503c45['selection']);const _0x50fb94=[];if(_0x4789e0[_0xbe702c(0x1fe)])_0x50fb94['push'](_0x4789e0['jsUrl']);if(_0x4789e0[_0xbe702c(0x1e1)])_0x50fb94['push'](_0x4789e0['cssUrl']);const _0x56267d=validateParams(_0x4789e0);if(_0x56267d['length']>0x0){const _0x4592f2=_0x56267d[_0xbe702c(0x207)](_0xd06c1d=>_0xbe702c(0x204)+_0xd06c1d['field']+':\x20'+_0xd06c1d[_0xbe702c(0x1dc)])['join'](';\x20');throw new Error(_0xbe702c(0x1fc)+_0x4592f2);}if(_0x50fb94['length']===0x0)throw new Error(_0xbe702c(0x1fb)+_0xbe702c(0x1f8));logger[_0xbe702c(0x1f2)](process[_0xbe702c(0x1da)]()),logger[_0xbe702c(0x1ec)](_0xbe702c(0x1cd),_0xbe702c(0x20a),{'appCode':_0x22408f,'jsUrl':_0x4789e0[_0xbe702c(0x1fe)],'cssUrl':_0x4789e0[_0xbe702c(0x1e1)],'mode':_0x1267ae,'dryRun':_0x503c45[_0xbe702c(0x201)]===!![]});if(_0x4789e0['jsUrl']){const _0x220294=await isUrlReachable(_0x4789e0[_0xbe702c(0x1fe)]);if(!_0x220294)throw new Error(_0xbe702c(0x1f5)+_0x4789e0[_0xbe702c(0x1fe)]);}if(_0x4789e0[_0xbe702c(0x1e1)]){const _0x1c2db1=await isUrlReachable(_0x4789e0['cssUrl']);if(!_0x1c2db1)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x4789e0['cssUrl']);}const _0x591376=await getOnlineMenuList(_0x22408f,_0x416bfe),_0x203e2c=_0x591376['filter'](_0x3bdce7=>_0x3bdce7[_0xbe702c(0x1e0)][_0xbe702c(0x1e5)]>0x0),_0x45af3c=selectMenusForUpdate(_0x203e2c,_0x503c45[_0xbe702c(0x1d4)]);if(_0x45af3c[_0xbe702c(0x1e5)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x503c45[_0xbe702c(0x201)]===!![]};const _0x4824b2=_0x45af3c['map'](_0x18d803=>buildMenuUpdateDiff(_0x18d803,_0x4789e0,_0x1267ae,_0x503c45[_0xbe702c(0x1fd)]===!![],_0x503c45[_0xbe702c(0x1c4)]));if(_0x503c45[_0xbe702c(0x201)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x4824b2};const _0x1d4e0b=await Promise[_0xbe702c(0x1ff)](_0x45af3c['map']((_0x4bd8b6,_0x251de6)=>updateMenuCdnUrl(_0x22408f,_0x416bfe,{'id':_0x4bd8b6['id'],'label':_0x4bd8b6[_0xbe702c(0x1d5)],'path':_0x4bd8b6['path'],'resources':_0x4824b2[_0x251de6][_0xbe702c(0x20c)]['resources'],'extend':_0x4bd8b6[_0xbe702c(0x1e7)]??null,'loadScriptMode':_0x503c45[_0xbe702c(0x1c4)]}))),_0x52e96c=_0x1d4e0b[_0xbe702c(0x1e4)](_0x162df8=>_0x162df8[_0xbe702c(0x1f3)]===_0xbe702c(0x208))[_0xbe702c(0x207)](_0x21f704=>_0x21f704[_0xbe702c(0x206)]),_0x152a47=_0x1d4e0b[_0xbe702c(0x1e4)](_0x7c9cce=>_0x7c9cce[_0xbe702c(0x1f3)]==='rejected')[_0xbe702c(0x1e5)];return logger[_0xbe702c(0x1ec)](_0xbe702c(0x1cd),_0xbe702c(0x1e3),{'count':_0x45af3c[_0xbe702c(0x1e5)],'resources':_0x50fb94}),{'updated':_0x52e96c[_0xbe702c(0x1e5)],'failed':_0x152a47,'skipped':![],'menus':_0x52e96c};}function validateSelection(_0x54dd87){const _0xc6570b=a131_0x595d;if(!_0x54dd87)throw new Error(_0xc6570b(0x1d9));if(_0x54dd87[_0xc6570b(0x1d7)]&&(_0x54dd87[_0xc6570b(0x1f1)][_0xc6570b(0x1e5)]>0x0||_0x54dd87[_0xc6570b(0x1df)][_0xc6570b(0x1e5)]>0x0))throw new Error(_0xc6570b(0x1c6));if(!_0x54dd87[_0xc6570b(0x1d7)]&&_0x54dd87[_0xc6570b(0x1f1)][_0xc6570b(0x1e5)]===0x0&&_0x54dd87['paths'][_0xc6570b(0x1e5)]===0x0)throw new Error(_0xc6570b(0x1d9));}export function selectMenusForUpdate(_0x2b3e75,_0x3f0d77){const _0x1a1775=a131_0x595d;validateSelection(_0x3f0d77);if(_0x3f0d77[_0x1a1775(0x1d7)])return _0x2b3e75;const _0x8d1952=new Set(_0x2b3e75[_0x1a1775(0x207)](_0x291886=>_0x291886['id'])),_0x4370ea=new Set(_0x2b3e75[_0x1a1775(0x207)](_0x4f07b3=>_0x4f07b3[_0x1a1775(0x1ef)])),_0x25ce66=_0x3f0d77['menuIds'][_0x1a1775(0x1e4)](_0x1a0e4d=>!_0x8d1952['has'](_0x1a0e4d)),_0x47fe48=_0x3f0d77[_0x1a1775(0x1df)][_0x1a1775(0x1e4)](_0x1dd1b8=>!_0x4370ea['has'](_0x1dd1b8));if(_0x25ce66[_0x1a1775(0x1e5)]>0x0||_0x47fe48[_0x1a1775(0x1e5)]>0x0){const _0x4a3aa1=[..._0x25ce66[_0x1a1775(0x207)](_0x2c8323=>String(_0x2c8323)),..._0x47fe48][_0x1a1775(0x1f4)](',\x20');throw new Error(_0x1a1775(0x1ea)+_0x4a3aa1);}const _0x19e23c=new Set(_0x3f0d77[_0x1a1775(0x1f1)]),_0x11ac4a=new Set(_0x3f0d77[_0x1a1775(0x1df)]);return _0x2b3e75[_0x1a1775(0x1e4)](_0x853996=>_0x19e23c[_0x1a1775(0x1d6)](_0x853996['id'])||_0x11ac4a[_0x1a1775(0x1d6)](_0x853996['path']));}function normalizeMode(_0x359eb4){const _0x211af2=a131_0x595d;if(!_0x359eb4)return _0x211af2(0x1db);if(_0x359eb4===_0x211af2(0x1f9)||_0x359eb4==='patch')return _0x359eb4;throw new Error(_0x211af2(0x1d0)+_0x359eb4+_0x211af2(0x1eb));}function buildMenuUpdateDiff(_0xac1f1,_0x5882d6,_0x43aff4,_0x3c9e5b,_0x1d7999){const _0x1c8977=a131_0x595d,_0x4f6f1c=[..._0xac1f1[_0x1c8977(0x1e0)]];_0x43aff4===_0x1c8977(0x1db)&&assertUnambiguousPatchResources(_0xac1f1,_0x4f6f1c,_0x5882d6);const _0x1033c8=_0x43aff4===_0x1c8977(0x1db)?patchResources(_0x4f6f1c,_0x5882d6):replaceResources(_0x5882d6),_0x277dd8=[],_0x3a6511=_0x4f6f1c[_0x1c8977(0x202)](isJsResource),_0x45bea6=_0x1033c8[_0x1c8977(0x202)](isJsResource);if(_0x3a6511&&!_0x45bea6){const _0x2fdb9a=_0x1c8977(0x1f0)+_0xac1f1['label']+'\x22\x20('+_0xac1f1[_0x1c8977(0x1ef)]+_0x1c8977(0x1cf)+_0x1c8977(0x1d3);if(!_0x3c9e5b)throw new Error(_0x2fdb9a);_0x277dd8[_0x1c8977(0x1d8)](_0x2fdb9a);}const _0xcadc52=_0x4f6f1c['some'](isCssResource),_0x2e8ccd=_0x1033c8['some'](isCssResource);_0xcadc52&&!_0x2e8ccd&&_0x277dd8[_0x1c8977(0x1d8)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0xac1f1[_0x1c8977(0x1d5)]+_0x1c8977(0x1e9)+_0xac1f1[_0x1c8977(0x1ef)]+').');const _0x251505=typeof _0xac1f1[_0x1c8977(0x1e7)]?.[_0x1c8977(0x1c4)]===_0x1c8977(0x209)?_0xac1f1[_0x1c8977(0x1e7)][_0x1c8977(0x1c4)]:null,_0x60fe32=_0x1d7999?{'loadScriptMode':_0x251505}:{},_0x4ab5ea=_0x1d7999?{'loadScriptMode':_0x1d7999}:{};return{'id':_0xac1f1['id'],'label':_0xac1f1['label'],'path':_0xac1f1[_0x1c8977(0x1ef)],'mode':_0x43aff4,'before':{'resources':_0x4f6f1c,..._0x60fe32},'after':{'resources':_0x1033c8,..._0x4ab5ea},'warnings':_0x277dd8};}function replaceResources(_0xd6ffee){const _0x5ab236=a131_0x595d;return[_0xd6ffee['jsUrl'],_0xd6ffee[_0x5ab236(0x1e1)]][_0x5ab236(0x1e4)](_0x416c8e=>!!_0x416c8e);}function assertUnambiguousPatchResources(_0x5d98b0,_0x243fb9,_0xe2ca14){const _0x3ec885=a131_0x595d,_0x1e9ee6=_0x243fb9[_0x3ec885(0x1e4)](isJsResource)[_0x3ec885(0x1e5)];if(_0xe2ca14[_0x3ec885(0x1fe)]&&_0x1e9ee6>0x1)throw new Error(_0x3ec885(0x1fa)+_0x1e9ee6+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x5d98b0[_0x3ec885(0x1d5)]+_0x3ec885(0x1e9)+_0x5d98b0[_0x3ec885(0x1ef)]+')\x20'+_0x3ec885(0x1c9));const _0x4b2c64=_0x243fb9[_0x3ec885(0x1e4)](isCssResource)[_0x3ec885(0x1e5)];if(_0xe2ca14[_0x3ec885(0x1e1)]&&_0x4b2c64>0x1)throw new Error(_0x3ec885(0x1fa)+_0x4b2c64+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x5d98b0[_0x3ec885(0x1d5)]+'\x22\x20('+_0x5d98b0[_0x3ec885(0x1ef)]+')\x20'+_0x3ec885(0x20b));}function patchResources(_0x5bdf8a,_0x5927c7){const _0x1842c3=a131_0x595d;let _0x492e24=![],_0xa61b7e=![];const _0x216624=[];for(const _0x72bf26 of _0x5bdf8a){if(isJsResource(_0x72bf26)){if(_0x5927c7[_0x1842c3(0x1fe)]&&!_0x492e24)_0x216624[_0x1842c3(0x1d8)](_0x5927c7['jsUrl']),_0x492e24=!![];else!_0x5927c7[_0x1842c3(0x1fe)]&&_0x216624[_0x1842c3(0x1d8)](_0x72bf26);continue;}if(isCssResource(_0x72bf26)){if(_0x5927c7[_0x1842c3(0x1e1)]&&!_0xa61b7e)_0x216624[_0x1842c3(0x1d8)](_0x5927c7[_0x1842c3(0x1e1)]),_0xa61b7e=!![];else!_0x5927c7['cssUrl']&&_0x216624[_0x1842c3(0x1d8)](_0x72bf26);continue;}_0x216624[_0x1842c3(0x1d8)](_0x72bf26);}return _0x5927c7[_0x1842c3(0x1fe)]&&!_0x492e24&&_0x216624[_0x1842c3(0x1dd)](_0x5927c7[_0x1842c3(0x1fe)]),_0x5927c7[_0x1842c3(0x1e1)]&&!_0xa61b7e&&_0x216624[_0x1842c3(0x1d8)](_0x5927c7[_0x1842c3(0x1e1)]),_0x216624;}function isJsResource(_0xedefee){const _0x1e85e8=a131_0x595d;return stripQuery(_0xedefee)[_0x1e85e8(0x1ca)]()[_0x1e85e8(0x1c8)](_0x1e85e8(0x1ee));}function isCssResource(_0x13c9ea){const _0x472dca=a131_0x595d;return stripQuery(_0x13c9ea)[_0x472dca(0x1ca)]()['endsWith'](_0x472dca(0x1c7));}function stripQuery(_0x52a8e9){const _0x2f65cb=a131_0x595d;return _0x52a8e9[_0x2f65cb(0x1de)]('?')[0x0]??_0x52a8e9;}function a131_0x595d(_0x13f63a,_0x4646f9){_0x13f63a=_0x13f63a-0x1c4;const _0x28f3e1=a131_0x28f3();let _0x595df2=_0x28f3e1[_0x13f63a];return _0x595df2;}function parseUpdateParamsFlag(_0x16c561){const _0x3aec03=a131_0x595d;if(!_0x16c561||typeof _0x16c561!=='string')return{};try{const _0x303b89=JSON[_0x3aec03(0x1f6)](_0x16c561);if(typeof _0x303b89!=='object'||_0x303b89===null||Array['isArray'](_0x303b89))return{};return{'jsUrl':typeof _0x303b89[_0x3aec03(0x1fe)]===_0x3aec03(0x209)?_0x303b89[_0x3aec03(0x1fe)][_0x3aec03(0x200)]():undefined,'cssUrl':typeof _0x303b89[_0x3aec03(0x1e1)]===_0x3aec03(0x209)?_0x303b89[_0x3aec03(0x1e1)][_0x3aec03(0x200)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5f0f36,_0x540755){const _0x1747f3=a132_0x1ba5,_0x21121a=_0x5f0f36();while(!![]){try{const _0x1f1882=parseInt(_0x1747f3(0xff))/0x1+parseInt(_0x1747f3(0x101))/0x2+parseInt(_0x1747f3(0xf7))/0x3*(parseInt(_0x1747f3(0xf5))/0x4)+parseInt(_0x1747f3(0xf8))/0x5*(parseInt(_0x1747f3(0xfa))/0x6)+parseInt(_0x1747f3(0xfb))/0x7*(-parseInt(_0x1747f3(0xf9))/0x8)+-parseInt(_0x1747f3(0xfe))/0x9+-parseInt(_0x1747f3(0x100))/0xa;if(_0x1f1882===_0x540755)break;else _0x21121a['push'](_0x21121a['shift']());}catch(_0x18940b){_0x21121a['push'](_0x21121a['shift']());}}}(a132_0x587e,0x43d93));function a132_0x587e(){const _0x36b5a8=['7mcwbCx','test','HEAD','3334635mJAViQ','487721datjQH','5888160iqcYEV','143640JzaCKK','36rGTxHj','trim','120699LGjQAK','1701055VMomkY','196888CvOGGc','6qdJrtu'];a132_0x587e=function(){return _0x36b5a8;};return a132_0x587e();}export function isValidJsHttpsUrl(_0x2b75f1){const _0x225313=a132_0x1ba5;return/^https:\/\/.+\.js(\?.*)?$/[_0x225313(0xfc)](_0x2b75f1[_0x225313(0xf6)]());}function a132_0x1ba5(_0x38e237,_0x4d7ac9){_0x38e237=_0x38e237-0xf5;const _0x587e60=a132_0x587e();let _0x1ba539=_0x587e60[_0x38e237];return _0x1ba539;}export function isValidCssHttpsUrl(_0xd5fdfd){const _0x1b2d49=a132_0x1ba5;return/^https:\/\/.+\.css(\?.*)?$/[_0x1b2d49(0xfc)](_0xd5fdfd[_0x1b2d49(0xf6)]());}export async function isUrlReachable(_0x459410){const _0x20bfef=a132_0x1ba5;try{const _0x5d4cfd=await fetch(_0x459410,{'method':_0x20bfef(0xfd)});return _0x5d4cfd['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a133_0x1132bb=a133_0x9490;(function(_0xbd2b56,_0x48c353){const _0x315bce=a133_0x9490,_0x54aebe=_0xbd2b56();while(!![]){try{const _0x158ad4=-parseInt(_0x315bce(0x202))/0x1+-parseInt(_0x315bce(0x1c5))/0x2+-parseInt(_0x315bce(0x1c1))/0x3*(-parseInt(_0x315bce(0x1da))/0x4)+-parseInt(_0x315bce(0x1c8))/0x5*(parseInt(_0x315bce(0x1dc))/0x6)+-parseInt(_0x315bce(0x1e7))/0x7*(-parseInt(_0x315bce(0x1c0))/0x8)+-parseInt(_0x315bce(0x1d8))/0x9+parseInt(_0x315bce(0x1c7))/0xa;if(_0x158ad4===_0x48c353)break;else _0x54aebe['push'](_0x54aebe['shift']());}catch(_0x3d32a4){_0x54aebe['push'](_0x54aebe['shift']());}}}(a133_0x2eb4,0xac219));import a133_0x5000f2 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a133_0x9490(_0x2b5fb8,_0x356e3b){_0x2b5fb8=_0x2b5fb8-0x1b9;const _0x2eb471=a133_0x2eb4();let _0x94904=_0x2eb471[_0x2b5fb8];return _0x94904;}import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';function a133_0x2eb4(){const _0x36cb8d=['string','Sync\x20local\x20pages\x20as\x20platform\x20menus','skipped','Failed\x20to\x20fetch\x20online\x20menu\x20list','validation','boolean','Online\x20menu\x20list\x20fetched','\x20and\x20CSS:\x20','2982627CbMXPp','cyan','52TqrjQI','split','47934CrqFez','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','localPages','\x20created.','POST','str','length','filter','appcode','Creating\x20','Menu\x20creation\x20failed','103376VItmEs','Pre-fill\x20JS/CSS\x20URLs.\x20','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','appCode','selectedAppName','write','trim','onlinePaths','message','\x20page(s)','paths','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','onlineMenuList','\x20\x20Cancelled.','rawFlags','Menu\x20sync\x20completed:\x20','\x20menu(s)...','failed','Would\x20create\x20','gray','params','cssUrl','targetPages','\x20menu(s)\x20with\x20JS:\x20','143317mQQFKW','yellow','cookie','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','jsUrl','Created\x20','Menu\x20sync\x20skipped','736rbgySu','180282cHrQhN','\x20menu(s)\x20created','menu','\x20\x20Continue\x20with\x20creation?','2805990mqLyUE','\x20menu(s)','8023910JUoBUi','225jTzMbE','Fetching\x20online\x20menu\x20list...','/smartapi/menu/create','flag','sync','\x20created,\x20','created','map'];a133_0x2eb4=function(){return _0x36cb8d;};return a133_0x2eb4();}import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a133_0x1132bb(0x1c3),'command':a133_0x1132bb(0x1cc),'description':a133_0x1132bb(0x1d1),'risk':a133_0x1132bb(0x1ed),'flags':[{'name':'params','type':a133_0x1132bb(0x1d0),'description':a133_0x1132bb(0x1e8)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a133_0x1132bb(0x1f2),'type':a133_0x1132bb(0x1d0),'description':a133_0x1132bb(0x1f3)},{'name':'yes','type':a133_0x1132bb(0x1d5),'description':a133_0x1132bb(0x1f5)}],async 'dryRun'(_0x31823c){const _0x113a20=a133_0x1132bb;ensureRunnableContext(_0x31823c[_0x113a20(0x1f8)],_0x31823c[_0x113a20(0x1ec)]);const _0x2816b2=await runMenuSyncCore(_0x31823c[_0x113a20(0x1eb)],_0x31823c[_0x113a20(0x1ba)],parsePaths(_0x31823c[_0x113a20(0x1e1)](_0x113a20(0x1f2))),_0x31823c[_0x113a20(0x1e1)](_0x113a20(0x1fe)),{'dryRun':!![]});return{'method':_0x113a20(0x1e0),'url':_0x113a20(0x1ca),'body':_0x2816b2,'description':_0x2816b2['skipped']?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0x113a20(0x1fc)+_0x2816b2[_0x113a20(0x200)][_0x113a20(0x1e2)]+'\x20local\x20microfrontend\x20menu(s).'};},async 'execute'(_0xd388c9){const _0x3bd5db=a133_0x1132bb;ensureRunnableContext(_0xd388c9['rawFlags'],_0xd388c9[_0x3bd5db(0x1ec)]);const _0x3fe547=_0xd388c9[_0x3bd5db(0x1cb)]('yes'),_0x5218b4=_0xd388c9[_0x3bd5db(0x1e1)](_0x3bd5db(0x1fe)),_0x1ec068=parsePaths(_0xd388c9[_0x3bd5db(0x1e1)]('paths')),_0x58803c=parseMenuSyncParams(_0x5218b4);if(_0x3fe547){const _0x1bd4f3=await runMenuSyncCore(_0xd388c9['appCode'],_0xd388c9[_0x3bd5db(0x1ba)],_0x1ec068,_0x5218b4);if(_0x1bd4f3[_0x3bd5db(0x1d2)]){const _0x275ab5=getLocalPages();_0x275ab5[_0x3bd5db(0x1e2)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x3bd5db(0x1f4));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x1bd4f3[_0x3bd5db(0x1ce)]+_0x3bd5db(0x1c2));return{'ok':!![],'data':_0x1bd4f3,'message':_0x1bd4f3[_0x3bd5db(0x1d2)]?_0x3bd5db(0x1bf):_0x3bd5db(0x1f9)+_0x1bd4f3[_0x3bd5db(0x1ce)]+_0x3bd5db(0x1df)};}if(_0x1ec068[_0x3bd5db(0x1e2)]>0x0)throw CliErrors['validation'](_0x3bd5db(0x1dd),_0x3bd5db(0x1bc));if(!isInteractive()&&_0x5218b4)throw CliErrors['validation'](_0x3bd5db(0x1bb),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');requireInteractive();const _0x1d5514=startSpinner(_0x3bd5db(0x1c9));let _0x1ca87d,_0x539f61,_0x45948c;try{const _0x2e5f95=await fetchMenuData(_0xd388c9[_0x3bd5db(0x1eb)],_0xd388c9[_0x3bd5db(0x1ba)]);_0x1ca87d=_0x2e5f95[_0x3bd5db(0x1de)],_0x539f61=_0x2e5f95[_0x3bd5db(0x1ef)],_0x45948c=_0x2e5f95[_0x3bd5db(0x1f6)],stopSpinner(_0x1d5514,_0x3bd5db(0x1d6),!![]);}catch(_0x12b6a8){stopSpinner(_0x1d5514,_0x3bd5db(0x1d3),![]);throw CliErrors[_0x3bd5db(0x1d4)](_0x12b6a8 instanceof Error?_0x12b6a8[_0x3bd5db(0x1f0)]:_0x3bd5db(0x1d3));}if(_0x1ca87d[_0x3bd5db(0x1e2)]===0x0)return writeCliSideChannelLine(a133_0x5000f2[_0x3bd5db(0x1b9)](_0x3bd5db(0x1ea))),{'ok':!![]};const _0x172a8f=buildCompareRows(_0x1ca87d,_0x539f61);writeCliSideChannelLine(renderCompareTable(_0x172a8f)),writeCliSideChannelLine('');const _0x3f8959=await selectPages(_0x1ca87d,_0x539f61);writeCliSideChannelLine(''),writeCliSideChannelLine(a133_0x5000f2[_0x3bd5db(0x1d9)]('\x20\x20✓\x20Selected:\x20'+_0x3f8959[_0x3bd5db(0x1e2)]+_0x3bd5db(0x1f1)));const _0x328648=_0x58803c[_0x3bd5db(0x1bd)]&&_0x58803c[_0x3bd5db(0x1ff)];if(!_0x328648){writeCliSideChannelLine(renderSyncSummary(_0x3f8959,_0x539f61['size']>0x0));const _0x379311=await askConfirm(_0x3bd5db(0x1c4));if(!_0x379311)return writeCliSideChannelLine(a133_0x5000f2[_0x3bd5db(0x1fd)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x4aadf5=_0x58803c[_0x3bd5db(0x1bd)],_0x397bc9=_0x58803c[_0x3bd5db(0x1ff)];!_0x4aadf5&&(_0x4aadf5=await askJsUrl());!_0x397bc9&&(_0x397bc9=await askCssUrl());const _0x61b53c=await askConfirm('\x20\x20Create\x20'+_0x3f8959['length']+_0x3bd5db(0x201)+_0x4aadf5+_0x3bd5db(0x1d7)+_0x397bc9+'?');if(!_0x61b53c)return writeCliSideChannelLine(a133_0x5000f2['gray'](_0x3bd5db(0x1f7))),{'ok':!![]};const _0x5a8223=[_0x4aadf5,_0x397bc9],_0x4759b3=startSpinner(_0x3bd5db(0x1e5)+_0x3f8959[_0x3bd5db(0x1e2)]+_0x3bd5db(0x1fa));try{const _0x340b98=await doCreateMenus(_0xd388c9['appCode'],_0xd388c9['cookie'],_0x3f8959,_0x5a8223);return stopSpinner(_0x4759b3,_0x3bd5db(0x1be)+_0x340b98[_0x3bd5db(0x1ce)]+_0x3bd5db(0x1c6),!![]),{'ok':!![],'data':_0x340b98,'message':_0x3bd5db(0x1f9)+_0x340b98[_0x3bd5db(0x1ce)]+_0x3bd5db(0x1cd)+_0x340b98[_0x3bd5db(0x1fb)]+'\x20failed.'};}catch(_0x29a9b9){stopSpinner(_0x4759b3,_0x3bd5db(0x1e6),![]);throw CliErrors[_0x3bd5db(0x1d4)](_0x29a9b9 instanceof Error?_0x29a9b9[_0x3bd5db(0x1f0)]:'Menu\x20creation\x20failed');}}};function ensureRunnableContext(_0x2863ef,_0x3a56fd){const _0x52769b=a133_0x1132bb,_0x24be36=_0x2863ef[_0x52769b(0x1e4)]?String(_0x2863ef['appcode'])[_0x52769b(0x1ee)]():'';if(!isInProject()&&!_0x3a56fd&&!_0x24be36)throw CliErrors[_0x52769b(0x1d4)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x52769b(0x1e9));}function parsePaths(_0x59c30e){const _0x204511=a133_0x1132bb;return[...new Set(_0x59c30e[_0x204511(0x1db)](',')[_0x204511(0x1cf)](_0x40d88b=>_0x40d88b['trim']())[_0x204511(0x1e3)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a136_0x16e0ff=a136_0x2694;(function(_0x3674e0,_0x1ba958){const _0x443562=a136_0x2694,_0x415aa1=_0x3674e0();while(!![]){try{const _0x2aa114=parseInt(_0x443562(0x15f))/0x1+parseInt(_0x443562(0x175))/0x2+parseInt(_0x443562(0x18e))/0x3+-parseInt(_0x443562(0x193))/0x4*(-parseInt(_0x443562(0x191))/0x5)+-parseInt(_0x443562(0x174))/0x6*(-parseInt(_0x443562(0x1b3))/0x7)+-parseInt(_0x443562(0x1d1))/0x8+-parseInt(_0x443562(0x17c))/0x9;if(_0x2aa114===_0x1ba958)break;else _0x415aa1['push'](_0x415aa1['shift']());}catch(_0x5be92a){_0x415aa1['push'](_0x415aa1['shift']());}}}(a136_0x3538,0xc8ed0));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a136_0x3538(){const _0x46f0ed=['isSafeInteger','number','215oLpKWs','Menu\x20','21292MOlVSO','plan','path','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','appCode','update','Updated\x20visibility\x20for\x20','str','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','\x20skipped,\x20','join','push','rabetbase\x20menu\x20list\x20--format\x20compress','get','sort','\x20visibility\x20update\x20could\x20not\x20be\x20verified','true','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','set','menu\x20list','\x20unchanged\x20menu(s).','code','verification','num','modelType','menu','flagMissing','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','expect-visible','update-menu-visibility','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','32102hBohQf','targets','pageId','\x20failed.','\x20must\x20be\x20true\x20or\x20false.','split','menu_verification_failed','visibility-update','isArray','url','Menu\x20id\x20selector(s)\x20not\x20found:\x20','\x20menu(s),\x20expected\x20','menu_selector_ambiguous','menus','requestedVisible','\x20updated,\x20','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','depth','byId','update-recovery','trim','high-risk-write','some','\x20menu(s);\x20skipped\x20','datasetId','expectedCount','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','menu_selector_not_found','resources','body','6743248TkQhWP','visible','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','string','filter','updated','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','1427477NKayGU','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','paths','cookie','menuIds','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','childrenIds','before','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','message','menu-ids','boolean','parentId','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','values','has','Requested\x20menu\x20visibility','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','plannedActions','beforeById','validation','1002GvWihK','935046wlFuNl','type','Menu\x20path\x20selector\x20not\x20found:\x20','hash','expected-count','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','stringify','19381536cMHuJw','Menu\x20visibility\x20update\x20completed:\x20','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','\x20menu(s);\x20skip\x20','length','expectVisible','recovered','map','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','pageType','label','\x20changed\x20unexpectedly.','false','POST','/smartapi/menu/update','resourcesValid','warnings','datasetCode','2788953auvPvM'];a136_0x3538=function(){return _0x46f0ed;};return a136_0x3538();}import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';function a136_0x2694(_0x51aaf1,_0x58d1d0){_0x51aaf1=_0x51aaf1-0x15e;const _0x3538ff=a136_0x3538();let _0x269405=_0x3538ff[_0x51aaf1];return _0x269405;}const BACKEND=[{'method':a136_0x16e0ff(0x189),'path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a136_0x16e0ff(0x1ac),'command':a136_0x16e0ff(0x1ba),'description':a136_0x16e0ff(0x196),'risk':a136_0x16e0ff(0x1c8),'structuredErrors':!![],'flags':[{'name':a136_0x16e0ff(0x169),'type':'string','description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':a136_0x16e0ff(0x161),'type':a136_0x16e0ff(0x1d5),'description':a136_0x16e0ff(0x170)},{'name':a136_0x16e0ff(0x1d2),'type':a136_0x16e0ff(0x16a),'required':!![],'description':a136_0x16e0ff(0x16f)},{'name':'expect-visible','type':a136_0x16e0ff(0x16a),'description':a136_0x16e0ff(0x17e)},{'name':'expected-count','type':a136_0x16e0ff(0x190),'description':a136_0x16e0ff(0x1d3)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x12fa57){parseInput(_0x12fa57),requireExplicitYes(_0x12fa57);},async 'dryRun'(_0x2d22b9){const _0x32f5da=a136_0x16e0ff,_0x4934c9=await buildPlan(_0x2d22b9,!![]),_0x124b3e=_0x4934c9[_0x32f5da(0x194)][_0x32f5da(0x171)]?.[_0x32f5da(0x180)]??0x0,_0x3f7720=_0x4934c9[_0x32f5da(0x194)][_0x32f5da(0x1b4)]['length']-_0x124b3e;return menuDryRunResult(_0x4934c9[_0x32f5da(0x194)],{'method':_0x32f5da(0x189),'url':'/smartapi/menu/update','body':{'updates':_0x4934c9[_0x32f5da(0x194)][_0x32f5da(0x171)]?.['map'](_0x4cf08f=>_0x4cf08f[_0x32f5da(0x1d0)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x124b3e+_0x32f5da(0x17f)+_0x3f7720+_0x32f5da(0x1a7)});},async 'execute'(_0x5a4e6e){const _0x31fea3=a136_0x16e0ff;requireExplicitYes(_0x5a4e6e);const _0x249895=await buildPlan(_0x5a4e6e,![]);await recheckMutationSnapshot(_0x5a4e6e,_0x249895[_0x31fea3(0x194)],'update\x20menu\x20visibility');const _0x355156=[],_0x55399e=[],_0xf909=[];for(const _0x2e6d58 of _0x249895['plan'][_0x31fea3(0x1b4)]){if(_0x2e6d58[_0x31fea3(0x166)]['visible']===_0x249895[_0x31fea3(0x194)][_0x31fea3(0x1c1)]){_0x355156[_0x31fea3(0x19e)]({'id':_0x2e6d58['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x5a4e6e[_0x31fea3(0x197)],_0x5a4e6e['cookie'],{'id':_0x2e6d58['id'],'visible':_0x249895[_0x31fea3(0x194)][_0x31fea3(0x1c1)]}),_0x355156['push']({'id':_0x2e6d58['id'],'updated':!![],'skipped':![]});}catch(_0x35a6be){const _0x3d5efc=mapMenuApiError(_0x35a6be,'update\x20visibility\x20for',_0x2e6d58['id']);if(isMenuResponseLoss(_0x35a6be)&&_0x3d5efc[_0x31fea3(0x1a8)]!=='menu_permission_denied'){_0xf909[_0x31fea3(0x19e)](_0x2e6d58['id']);continue;}_0x55399e[_0x31fea3(0x19e)]({'id':_0x2e6d58['id'],'stage':_0x31fea3(0x198),'code':_0x3d5efc['code'],'message':_0x3d5efc['message']});}}let _0x3dc735;try{_0x3dc735=await fetchMenuSnapshot(_0x5a4e6e[_0x31fea3(0x197)],_0x5a4e6e[_0x31fea3(0x162)]);}catch(_0x4479cc){const _0x27de9e=describeMenuErrorCause(_0x4479cc,'verify\x20menu\x20visibility\x20update'),_0x4dc94b=_0xf909[_0x31fea3(0x183)](_0x175e15=>({'id':_0x175e15,'stage':'update-recovery','code':_0x31fea3(0x1b9),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x175e15+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0xa653bd={'stage':'verification','code':_0x31fea3(0x1b9),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x249895[_0x31fea3(0x194)][_0x31fea3(0x1b4)][_0x31fea3(0x183)](_0x4bfd37=>_0x4bfd37['id']),'requestedStateConfirmed':![],..._0x27de9e};throw menuFailure(asVerificationError(_0x4479cc,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x249895[_0x31fea3(0x194)],{'stage':'verification','succeeded':_0x355156,'failedRecords':[..._0x55399e,..._0x4dc94b,_0xa653bd],'warnings':[_0x31fea3(0x1d4)],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x4202e6=[];for(const _0x4c51dc of _0x355156){const _0x5bf27e=Number(_0x4c51dc['id']),_0x445f18=_0x249895[_0x31fea3(0x172)][_0x31fea3(0x1a0)](_0x5bf27e),_0x287492=_0x3dc735[_0x31fea3(0x1c5)][_0x31fea3(0x1a0)](_0x5bf27e);try{verifyVisibilityUpdate(_0x445f18,_0x287492,_0x249895[_0x31fea3(0x194)][_0x31fea3(0x1c1)]);}catch(_0xfc4c4c){const _0x489483=asVerificationError(_0xfc4c4c,'Menu\x20'+_0x5bf27e+_0x31fea3(0x1a2));_0x4202e6[_0x31fea3(0x19e)]({'id':_0x5bf27e,'stage':_0x31fea3(0x1a9),'code':_0x489483['code'],'message':_0x489483[_0x31fea3(0x168)],'requestedStateConfirmed':![]});}}for(const _0x36667c of _0xf909){const _0x20a5ba=_0x249895[_0x31fea3(0x172)]['get'](_0x36667c),_0x51a590=_0x3dc735[_0x31fea3(0x1c5)]['get'](_0x36667c);try{verifyVisibilityUpdate(_0x20a5ba,_0x51a590,_0x249895[_0x31fea3(0x194)][_0x31fea3(0x1c1)]),_0x355156[_0x31fea3(0x19e)]({'id':_0x36667c,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x213cc5){const _0x9711d=asVerificationError(_0x213cc5,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x36667c+_0x31fea3(0x16c));_0x4202e6[_0x31fea3(0x19e)]({'id':_0x36667c,'stage':_0x31fea3(0x1c6),'code':_0x9711d['code'],'message':_0x9711d['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x4202e6['length']>0x0){const _0x976bc0=_0x4202e6[_0x31fea3(0x183)](_0x771cf1=>Number(_0x771cf1['id'])),_0x3f727d=_0x355156[_0x31fea3(0x1d6)](_0x11ec80=>_0x11ec80[_0x31fea3(0x182)]===!![])[_0x31fea3(0x180)],_0xd55866=menuError('menu_verification_failed',_0x31fea3(0x164)+_0x976bc0[_0x31fea3(0x19d)](',\x20')+'.',_0x31fea3(0x1b2));throw menuFailure(_0xd55866,_0x249895[_0x31fea3(0x194)],{'stage':'verification','succeeded':_0x355156,'failedRecords':[..._0x55399e,..._0x4202e6],'warnings':[_0x31fea3(0x1b1)],'verification':{'status':'failed',..._0x976bc0[_0x31fea3(0x180)]===0x1?{'targetId':_0x976bc0[0x0]}:{'targetIds':_0x976bc0},'recoveredCount':_0x3f727d,'lookupCommand':_0x31fea3(0x19f)}});}const _0x49f6fc=_0x355156['filter'](_0x433511=>_0x433511[_0x31fea3(0x1d7)]===!![])[_0x31fea3(0x180)],_0x354fd6=_0x355156[_0x31fea3(0x180)]-_0x49f6fc,_0x4e80fd={..._0x249895['plan'],'succeeded':_0x355156,'failed':_0x55399e,'warnings':_0x55399e[_0x31fea3(0x180)]>0x0?[..._0x249895[_0x31fea3(0x194)]['warnings'],_0x31fea3(0x1ae)]:_0x249895[_0x31fea3(0x194)][_0x31fea3(0x18c)],'verification':{'checkedBy':_0x31fea3(0x1a6),'snapshotHash':_0x3dc735[_0x31fea3(0x178)],'matchesRequestedState':_0x55399e[_0x31fea3(0x180)]===0x0,'recoveredCount':_0xf909['length']}};return{'ok':_0x55399e[_0x31fea3(0x180)]===0x0,'data':_0x4e80fd,'message':_0x55399e[_0x31fea3(0x180)]===0x0?_0x31fea3(0x199)+_0x49f6fc+_0x31fea3(0x1ca)+_0x354fd6+_0x31fea3(0x1a7):_0x31fea3(0x17d)+_0x49f6fc+_0x31fea3(0x1c2)+_0x354fd6+_0x31fea3(0x19c)+_0x55399e[_0x31fea3(0x180)]+_0x31fea3(0x1b6)};}};function parseInput(_0x13fbdd){const _0x556c6d=a136_0x16e0ff,_0x2e8cfc=parseMenuIds(_0x13fbdd[_0x556c6d(0x19a)](_0x556c6d(0x169))),_0x24a81d=parseCsv(_0x13fbdd['str']('paths'));if(_0x2e8cfc[_0x556c6d(0x180)]===0x0&&_0x24a81d[_0x556c6d(0x180)]===0x0)throw CliErrors[_0x556c6d(0x173)](_0x556c6d(0x184));const _0x59c475=parseBooleanFlag(_0x13fbdd,'visible',!![]),_0xefe550=parseBooleanFlag(_0x13fbdd,_0x556c6d(0x1af),![]);let _0x410582;if(hasFlag(_0x13fbdd,_0x556c6d(0x179))){_0x410582=_0x13fbdd[_0x556c6d(0x1aa)](_0x556c6d(0x179));if(!Number[_0x556c6d(0x18f)](_0x410582)||_0x410582<0x0)throw CliErrors['validation'](_0x556c6d(0x17a));}return{'menuIds':_0x2e8cfc,'paths':_0x24a81d,'visible':_0x59c475,'expectVisible':_0xefe550,'expectedCount':_0x410582};}async function buildPlan(_0x425dfe,_0x3db529){const _0x24a486=a136_0x16e0ff,_0x4ae94f=parseInput(_0x425dfe),_0xabd9a1=await fetchMutationSnapshot(_0x425dfe,'update\x20menu\x20visibility'),_0x1a4ea6=selectTargets(_0xabd9a1[_0x24a486(0x1c0)],_0x4ae94f[_0x24a486(0x163)],_0x4ae94f[_0x24a486(0x161)]);if(_0x4ae94f[_0x24a486(0x1cc)]!==undefined&&_0x1a4ea6[_0x24a486(0x180)]!==_0x4ae94f[_0x24a486(0x1cc)])throw menuError('menu_expected_count_mismatch','Selected\x20'+_0x1a4ea6[_0x24a486(0x180)]+_0x24a486(0x1be)+_0x4ae94f[_0x24a486(0x1cc)]+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x4ae94f[_0x24a486(0x181)]!==undefined){const _0x1e5bd0=_0x1a4ea6[_0x24a486(0x1d6)](_0x2a7422=>_0x2a7422[_0x24a486(0x1d2)]!==_0x4ae94f[_0x24a486(0x181)]);if(_0x1e5bd0[_0x24a486(0x180)]>0x0)throw menuError('menu_state_drift','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x1e5bd0['map'](_0x23be0f=>_0x23be0f['id'])[_0x24a486(0x19d)](',\x20')+'.',_0x24a486(0x15e));}const _0x22b7f4=_0x1a4ea6['map'](_0x442bbf=>({'id':_0x442bbf['id'],'label':_0x442bbf[_0x24a486(0x186)],'path':_0x442bbf[_0x24a486(0x195)],'before':{'visible':_0x442bbf['visible']},'after':{'visible':_0x4ae94f[_0x24a486(0x1d2)]}})),_0x3daa19=_0x22b7f4[_0x24a486(0x1d6)](_0xeec3f0=>_0xeec3f0['before'][_0x24a486(0x1d2)]!==_0x4ae94f['visible'])[_0x24a486(0x183)](_0x574dfe=>({'stage':_0x24a486(0x1b0),'method':'POST','path':_0x24a486(0x18a),'body':{'appCode':_0x425dfe['appCode'],'id':_0x574dfe['id'],'visible':_0x4ae94f['visible']}})),_0xbb3b4a=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x4ae94f[_0x24a486(0x163)],'paths':_0x4ae94f['paths']},'before':{'menus':_0x1a4ea6[_0x24a486(0x183)](_0x24abbb=>({'id':_0x24abbb['id'],'path':_0x24abbb[_0x24a486(0x195)],'visible':_0x24abbb['visible']}))},'after':{'menus':_0x1a4ea6[_0x24a486(0x183)](_0x1a9298=>({'id':_0x1a9298['id'],'path':_0x1a9298['path'],'visible':_0x4ae94f[_0x24a486(0x1d2)]}))},'dryRun':_0x3db529,'backend':[...BACKEND],'plannedActions':_0x3daa19,'snapshotHash':_0xabd9a1[_0x24a486(0x178)],'warnings':_0x3daa19[_0x24a486(0x180)]===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0xbb3b4a,'requestedVisible':_0x4ae94f[_0x24a486(0x1d2)],'targets':_0x22b7f4},'beforeById':new Map(_0x1a4ea6['map'](_0x1b9f7c=>[_0x1b9f7c['id'],_0x1b9f7c]))};}function selectTargets(_0x2a79b8,_0x803a9c,_0x28f3bc){const _0x26ca8e=a136_0x16e0ff,_0x2745c2=new Map(_0x2a79b8['map'](_0xccf883=>[_0xccf883['id'],_0xccf883])),_0x54b880=new Map(),_0x13c0f1=_0x803a9c[_0x26ca8e(0x1d6)](_0x31eeb1=>!_0x2745c2[_0x26ca8e(0x16e)](_0x31eeb1));if(_0x13c0f1['length']>0x0)throw menuError(_0x26ca8e(0x1ce),_0x26ca8e(0x1bd)+_0x13c0f1[_0x26ca8e(0x19d)](',\x20')+'.',_0x26ca8e(0x1a4));for(const _0xc957e6 of _0x803a9c){_0x54b880[_0x26ca8e(0x1a5)](_0xc957e6,_0x2745c2[_0x26ca8e(0x1a0)](_0xc957e6));}for(const _0x2ca679 of _0x28f3bc){const _0x32d246=_0x2a79b8[_0x26ca8e(0x1d6)](_0x1c3de8=>_0x1c3de8[_0x26ca8e(0x195)]===_0x2ca679);if(_0x32d246[_0x26ca8e(0x180)]===0x0)throw menuError(_0x26ca8e(0x1ce),_0x26ca8e(0x177)+JSON[_0x26ca8e(0x17b)](_0x2ca679)+'.',_0x26ca8e(0x160));if(_0x32d246[_0x26ca8e(0x180)]>0x1)throw menuError(_0x26ca8e(0x1bf),_0x26ca8e(0x167)+JSON[_0x26ca8e(0x17b)](_0x2ca679)+'.',_0x26ca8e(0x19b)+_0x32d246[_0x26ca8e(0x183)](_0x2ce2bc=>_0x2ce2bc['id'])[_0x26ca8e(0x19d)](',\x20')+'.');const _0x57460f=_0x32d246[0x0];_0x54b880[_0x26ca8e(0x1a5)](_0x57460f['id'],_0x57460f);}return[..._0x54b880[_0x26ca8e(0x16d)]()];}function parseMenuIds(_0x970995){const _0x332d7d=a136_0x16e0ff,_0x51f590=parseCsv(_0x970995),_0x1852c2=_0x51f590[_0x332d7d(0x183)](Number);if(_0x1852c2[_0x332d7d(0x1c9)](_0x3c4810=>!Number[_0x332d7d(0x18f)](_0x3c4810)||_0x3c4810<=0x0))throw CliErrors['validation'](_0x332d7d(0x1cd));return[...new Set(_0x1852c2)];}function parseCsv(_0x5be45b){const _0x1a066d=a136_0x16e0ff;return[...new Set(_0x5be45b[_0x1a066d(0x1b8)](',')[_0x1a066d(0x183)](_0x41daae=>_0x41daae[_0x1a066d(0x1c7)]())[_0x1a066d(0x1d6)](Boolean))];}function parseBooleanFlag(_0x488fbd,_0x537eac,_0x317a8a){const _0xef0e4=a136_0x16e0ff;if(!hasFlag(_0x488fbd,_0x537eac)){if(_0x317a8a)throw CliErrors[_0xef0e4(0x1ad)](_0x537eac);return undefined;}const _0x2e4dbb=_0x488fbd['rawFlags'][_0x537eac];if(_0x2e4dbb===!![]||_0x2e4dbb===![])return _0x2e4dbb;if(_0x2e4dbb===_0xef0e4(0x1a3))return!![];if(_0x2e4dbb===_0xef0e4(0x188))return![];throw CliErrors[_0xef0e4(0x173)]('--'+_0x537eac+_0xef0e4(0x1b7));}function verifyVisibilityUpdate(_0x1f18b0,_0x1cbbe7,_0x2eb692){const _0x55ec78=a136_0x16e0ff;assertVerified(!!_0x1cbbe7,_0x55ec78(0x192)+_0x1f18b0['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x1cbbe7[_0x55ec78(0x1d2)]===_0x2eb692,_0x55ec78(0x192)+_0x1f18b0['id']+_0x55ec78(0x1c3));const _0x598787=[['id',_0x1cbbe7['id'],_0x1f18b0['id']],[_0x55ec78(0x16b),_0x1cbbe7[_0x55ec78(0x16b)],_0x1f18b0[_0x55ec78(0x16b)]],[_0x55ec78(0x1c4),_0x1cbbe7['depth'],_0x1f18b0[_0x55ec78(0x1c4)]],[_0x55ec78(0x186),_0x1cbbe7[_0x55ec78(0x186)],_0x1f18b0[_0x55ec78(0x186)]],[_0x55ec78(0x195),_0x1cbbe7[_0x55ec78(0x195)],_0x1f18b0[_0x55ec78(0x195)]],[_0x55ec78(0x1bc),_0x1cbbe7[_0x55ec78(0x1bc)],_0x1f18b0['url']],[_0x55ec78(0x176),_0x1cbbe7['type'],_0x1f18b0[_0x55ec78(0x176)]],[_0x55ec78(0x1a1),_0x1cbbe7['sort'],_0x1f18b0[_0x55ec78(0x1a1)]],[_0x55ec78(0x1cf),_0x1cbbe7[_0x55ec78(0x1cf)],_0x1f18b0['resources']],['resourcesValid',_0x1cbbe7[_0x55ec78(0x18b)],_0x1f18b0[_0x55ec78(0x18b)]],[_0x55ec78(0x165),_0x1cbbe7['childrenIds'],_0x1f18b0[_0x55ec78(0x165)]],['childrenCount',_0x1cbbe7['childrenCount'],_0x1f18b0['childrenCount']],[_0x55ec78(0x1b5),_0x1cbbe7['pageId'],_0x1f18b0[_0x55ec78(0x1b5)]],[_0x55ec78(0x185),_0x1cbbe7[_0x55ec78(0x185)],_0x1f18b0[_0x55ec78(0x185)]],[_0x55ec78(0x1ab),_0x1cbbe7[_0x55ec78(0x1ab)],_0x1f18b0['modelType']],[_0x55ec78(0x1cb),_0x1cbbe7[_0x55ec78(0x1cb)],_0x1f18b0[_0x55ec78(0x1cb)]],[_0x55ec78(0x18d),_0x1cbbe7[_0x55ec78(0x18d)],_0x1f18b0[_0x55ec78(0x18d)]]];for(const [_0x255b60,_0xcb26eb,_0x9ab825]of _0x598787){assertVerified(sameValue(_0xcb26eb,_0x9ab825),'Menu\x20'+_0x1f18b0['id']+'\x20'+_0x255b60+_0x55ec78(0x187));}}function sameValue(_0x24b80b,_0xded510){const _0x226bc9=a136_0x16e0ff;if(Array['isArray'](_0x24b80b)||Array[_0x226bc9(0x1bb)](_0xded510))return JSON[_0x226bc9(0x17b)](_0x24b80b)===JSON[_0x226bc9(0x17b)](_0xded510);return _0x24b80b===_0xded510;}
|
|
1
|
+
function a134_0x22b5(){const _0x748fcf=['\x20menu(s),\x20expected\x20','validation','datasetId','map','Requested\x20menu\x20visibility','menu_expected_count_mismatch','POST','flagMissing','update\x20visibility\x20for','10VIeIXK','beforeById','label','menu','296608WHXSzI','str','modelType','Selected\x20','menu-ids','stringify','appCode','4195OZsfdH','menu_permission_denied','isSafeInteger','warnings','46965wgBNAR','hash','Response\x20was\x20lost\x20and\x20menu\x20','\x20failed.','rawFlags','verification','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','type','1706257EHmRVt','sort','high-risk-write','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','\x20menu(s);\x20skip\x20','menuIds','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','/smartapi/menu/update','parentId','trim','Final\x20menu\x20visibility\x20readback\x20failed.','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','join','length','true','recovered','message','Updated\x20visibility\x20for\x20','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','expected-count','push','get','failed','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','url','1764819oOvQkx','byId','\x20must\x20be\x20true\x20or\x20false.','update\x20menu\x20visibility','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','44OyiLsC','menu\x20list','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','isArray','plan','childrenIds','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','has','\x20skipped,\x20','childrenCount','path','130326SYBMJs','update','35917wtiSUd','menu_verification_failed','requestedVisible','pageId','num','pageType','resourcesValid','\x20updated,\x20','Response\x20was\x20lost\x20for\x20menu\x20','\x20menu(s);\x20skipped\x20','Menu\x20','Menu\x20id\x20selector(s)\x20not\x20found:\x20','values','update-recovery','paths','expectVisible','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','visible','plannedActions','before','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','expectedCount','datasetCode','\x20visibility\x20update\x20could\x20not\x20be\x20verified','resources','depth','code','split','rabetbase\x20menu\x20list\x20--format\x20compress','menu_state_drift','targets','\x20unchanged\x20menu(s).','number','menus','visibility-update','boolean','menu_selector_not_found','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','filter','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.'];a134_0x22b5=function(){return _0x748fcf;};return a134_0x22b5();}const a134_0x654c5=a134_0x54a9;(function(_0x3b09fe,_0x37b4e8){const _0x31905c=a134_0x54a9,_0xd4b9a0=_0x3b09fe();while(!![]){try{const _0x141c5d=parseInt(_0x31905c(0x1e0))/0x1+-parseInt(_0x31905c(0x214))/0x2*(-parseInt(_0x31905c(0x223))/0x3)+-parseInt(_0x31905c(0x1d2))/0x4*(parseInt(_0x31905c(0x21f))/0x5)+-parseInt(_0x31905c(0x1de))/0x6+parseInt(_0x31905c(0x22b))/0x7+parseInt(_0x31905c(0x218))/0x8+-parseInt(_0x31905c(0x1cd))/0x9;if(_0x141c5d===_0x37b4e8)break;else _0xd4b9a0['push'](_0xd4b9a0['shift']());}catch(_0x3ea09f){_0xd4b9a0['push'](_0xd4b9a0['shift']());}}}(a134_0x22b5,0x2902a));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';function a134_0x54a9(_0x5af347,_0x187e6a){_0x5af347=_0x5af347-0x1c8;const _0x22b5a4=a134_0x22b5();let _0x54a9d8=_0x22b5a4[_0x5af347];return _0x54a9d8;}const BACKEND=[{'method':a134_0x654c5(0x211),'path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a134_0x654c5(0x217),'command':a134_0x654c5(0x204),'description':a134_0x654c5(0x1d9),'risk':a134_0x654c5(0x22d),'structuredErrors':!![],'flags':[{'name':a134_0x654c5(0x21c),'type':'string','description':a134_0x654c5(0x1f5)},{'name':a134_0x654c5(0x1ee),'type':'string','description':a134_0x654c5(0x1f1)},{'name':'visible','type':a134_0x654c5(0x205),'required':!![],'description':a134_0x654c5(0x20f)},{'name':'expect-visible','type':a134_0x654c5(0x205),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a134_0x654c5(0x23e),'type':a134_0x654c5(0x202),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x493dd3){parseInput(_0x493dd3),requireExplicitYes(_0x493dd3);},async 'dryRun'(_0x39c325){const _0x35a0e5=a134_0x654c5,_0x5724bd=await buildPlan(_0x39c325,!![]),_0x525482=_0x5724bd[_0x35a0e5(0x1d6)][_0x35a0e5(0x1f3)]?.[_0x35a0e5(0x238)]??0x0,_0x5be4de=_0x5724bd[_0x35a0e5(0x1d6)][_0x35a0e5(0x200)][_0x35a0e5(0x238)]-_0x525482;return menuDryRunResult(_0x5724bd[_0x35a0e5(0x1d6)],{'method':'POST','url':_0x35a0e5(0x232),'body':{'updates':_0x5724bd[_0x35a0e5(0x1d6)][_0x35a0e5(0x1f3)]?.[_0x35a0e5(0x20e)](_0x56ece6=>_0x56ece6['body'])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x525482+_0x35a0e5(0x22f)+_0x5be4de+_0x35a0e5(0x201)});},async 'execute'(_0x3b667e){const _0xd1722a=a134_0x654c5;requireExplicitYes(_0x3b667e);const _0x5eb19a=await buildPlan(_0x3b667e,![]);await recheckMutationSnapshot(_0x3b667e,_0x5eb19a['plan'],'update\x20menu\x20visibility');const _0x1bd8a1=[],_0x1bbe9d=[],_0xd93be7=[];for(const _0x493689 of _0x5eb19a[_0xd1722a(0x1d6)][_0xd1722a(0x200)]){if(_0x493689[_0xd1722a(0x1f4)]['visible']===_0x5eb19a['plan'][_0xd1722a(0x1e2)]){_0x1bd8a1['push']({'id':_0x493689['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x3b667e[_0xd1722a(0x21e)],_0x3b667e['cookie'],{'id':_0x493689['id'],'visible':_0x5eb19a[_0xd1722a(0x1d6)][_0xd1722a(0x1e2)]}),_0x1bd8a1[_0xd1722a(0x1c8)]({'id':_0x493689['id'],'updated':!![],'skipped':![]});}catch(_0x30fad5){const _0x2e7234=mapMenuApiError(_0x30fad5,_0xd1722a(0x213),_0x493689['id']);if(isMenuResponseLoss(_0x30fad5)&&_0x2e7234['code']!==_0xd1722a(0x220)){_0xd93be7[_0xd1722a(0x1c8)](_0x493689['id']);continue;}_0x1bbe9d['push']({'id':_0x493689['id'],'stage':_0xd1722a(0x1df),'code':_0x2e7234[_0xd1722a(0x1fc)],'message':_0x2e7234[_0xd1722a(0x23b)]});}}let _0xe52816;try{_0xe52816=await fetchMenuSnapshot(_0x3b667e[_0xd1722a(0x21e)],_0x3b667e['cookie']);}catch(_0x188d3d){const _0x1a69f8=describeMenuErrorCause(_0x188d3d,'verify\x20menu\x20visibility\x20update'),_0x4faf14=_0xd93be7['map'](_0x24a6f5=>({'id':_0x24a6f5,'stage':_0xd1722a(0x1ed),'code':_0xd1722a(0x1e1),'message':_0xd1722a(0x1e8)+_0x24a6f5+_0xd1722a(0x22e),'requestedStateConfirmed':![],'recovered':![]})),_0x4de5cd={'stage':'verification','code':'menu_verification_failed','message':_0xd1722a(0x235),'targetIds':_0x5eb19a[_0xd1722a(0x1d6)][_0xd1722a(0x200)][_0xd1722a(0x20e)](_0x16dd9b=>_0x16dd9b['id']),'requestedStateConfirmed':![],..._0x1a69f8};throw menuFailure(asVerificationError(_0x188d3d,_0xd1722a(0x1d8)),_0x5eb19a[_0xd1722a(0x1d6)],{'stage':'verification','succeeded':_0x1bd8a1,'failedRecords':[..._0x1bbe9d,..._0x4faf14,_0x4de5cd],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0xd1722a(0x1ca),'recoveredCount':0x0,'lookupCommand':_0xd1722a(0x1fe)}});}const _0x2d6926=[];for(const _0x56e226 of _0x1bd8a1){const _0xc9dbfb=Number(_0x56e226['id']),_0x5678e2=_0x5eb19a[_0xd1722a(0x215)][_0xd1722a(0x1c9)](_0xc9dbfb),_0x4eae08=_0xe52816[_0xd1722a(0x1ce)]['get'](_0xc9dbfb);try{verifyVisibilityUpdate(_0x5678e2,_0x4eae08,_0x5eb19a[_0xd1722a(0x1d6)][_0xd1722a(0x1e2)]);}catch(_0x2dbade){const _0x15778d=asVerificationError(_0x2dbade,_0xd1722a(0x1ea)+_0xc9dbfb+_0xd1722a(0x1f9));_0x2d6926[_0xd1722a(0x1c8)]({'id':_0xc9dbfb,'stage':_0xd1722a(0x228),'code':_0x15778d[_0xd1722a(0x1fc)],'message':_0x15778d[_0xd1722a(0x23b)],'requestedStateConfirmed':![]});}}for(const _0x95f035 of _0xd93be7){const _0x3aef13=_0x5eb19a[_0xd1722a(0x215)][_0xd1722a(0x1c9)](_0x95f035),_0x582259=_0xe52816[_0xd1722a(0x1ce)][_0xd1722a(0x1c9)](_0x95f035);try{verifyVisibilityUpdate(_0x3aef13,_0x582259,_0x5eb19a['plan'][_0xd1722a(0x1e2)]),_0x1bd8a1[_0xd1722a(0x1c8)]({'id':_0x95f035,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x5da0ce){const _0x4fb381=asVerificationError(_0x5da0ce,_0xd1722a(0x225)+_0x95f035+_0xd1722a(0x1d4));_0x2d6926['push']({'id':_0x95f035,'stage':_0xd1722a(0x1ed),'code':_0x4fb381['code'],'message':_0x4fb381[_0xd1722a(0x23b)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x2d6926['length']>0x0){const _0x858596=_0x2d6926['map'](_0x3b2de3=>Number(_0x3b2de3['id'])),_0x5b479c=_0x1bd8a1[_0xd1722a(0x209)](_0x1c78f9=>_0x1c78f9[_0xd1722a(0x23a)]===!![])['length'],_0x553a6e=menuError('menu_verification_failed','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x858596[_0xd1722a(0x237)](',\x20')+'.',_0xd1722a(0x1f6));throw menuFailure(_0x553a6e,_0x5eb19a[_0xd1722a(0x1d6)],{'stage':_0xd1722a(0x228),'succeeded':_0x1bd8a1,'failedRecords':[..._0x1bbe9d,..._0x2d6926],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0xd1722a(0x1ca),..._0x858596[_0xd1722a(0x238)]===0x1?{'targetId':_0x858596[0x0]}:{'targetIds':_0x858596},'recoveredCount':_0x5b479c,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x2ced50=_0x1bd8a1['filter'](_0x40e6e3=>_0x40e6e3['updated']===!![])[_0xd1722a(0x238)],_0x449e2c=_0x1bd8a1['length']-_0x2ced50,_0x1ba2dc={..._0x5eb19a['plan'],'succeeded':_0x1bd8a1,'failed':_0x1bbe9d,'warnings':_0x1bbe9d[_0xd1722a(0x238)]>0x0?[..._0x5eb19a[_0xd1722a(0x1d6)][_0xd1722a(0x222)],_0xd1722a(0x1f0)]:_0x5eb19a['plan'][_0xd1722a(0x222)],'verification':{'checkedBy':_0xd1722a(0x1d3),'snapshotHash':_0xe52816[_0xd1722a(0x224)],'matchesRequestedState':_0x1bbe9d['length']===0x0,'recoveredCount':_0xd93be7[_0xd1722a(0x238)]}};return{'ok':_0x1bbe9d[_0xd1722a(0x238)]===0x0,'data':_0x1ba2dc,'message':_0x1bbe9d[_0xd1722a(0x238)]===0x0?_0xd1722a(0x23c)+_0x2ced50+_0xd1722a(0x1e9)+_0x449e2c+_0xd1722a(0x201):'Menu\x20visibility\x20update\x20completed:\x20'+_0x2ced50+_0xd1722a(0x1e7)+_0x449e2c+_0xd1722a(0x1db)+_0x1bbe9d[_0xd1722a(0x238)]+_0xd1722a(0x226)};}};function parseInput(_0x4df43f){const _0x4b5ff9=a134_0x654c5,_0xd9960b=parseMenuIds(_0x4df43f[_0x4b5ff9(0x219)](_0x4b5ff9(0x21c))),_0x5a6e52=parseCsv(_0x4df43f['str'](_0x4b5ff9(0x1ee)));if(_0xd9960b['length']===0x0&&_0x5a6e52[_0x4b5ff9(0x238)]===0x0)throw CliErrors['validation']('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x385ec1=parseBooleanFlag(_0x4df43f,_0x4b5ff9(0x1f2),!![]),_0x31ac59=parseBooleanFlag(_0x4df43f,'expect-visible',![]);let _0x542666;if(hasFlag(_0x4df43f,_0x4b5ff9(0x23e))){_0x542666=_0x4df43f[_0x4b5ff9(0x1e4)]('expected-count');if(!Number[_0x4b5ff9(0x221)](_0x542666)||_0x542666<0x0)throw CliErrors['validation']('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0xd9960b,'paths':_0x5a6e52,'visible':_0x385ec1,'expectVisible':_0x31ac59,'expectedCount':_0x542666};}async function buildPlan(_0x294ecc,_0x3e26e8){const _0xc4a7a0=a134_0x654c5,_0x31464c=parseInput(_0x294ecc),_0xab4a00=await fetchMutationSnapshot(_0x294ecc,_0xc4a7a0(0x1d0)),_0x476d2e=selectTargets(_0xab4a00[_0xc4a7a0(0x203)],_0x31464c[_0xc4a7a0(0x230)],_0x31464c[_0xc4a7a0(0x1ee)]);if(_0x31464c[_0xc4a7a0(0x1f7)]!==undefined&&_0x476d2e[_0xc4a7a0(0x238)]!==_0x31464c[_0xc4a7a0(0x1f7)])throw menuError(_0xc4a7a0(0x210),_0xc4a7a0(0x21b)+_0x476d2e['length']+_0xc4a7a0(0x20b)+_0x31464c[_0xc4a7a0(0x1f7)]+'.',_0xc4a7a0(0x229));if(_0x31464c[_0xc4a7a0(0x1ef)]!==undefined){const _0x4fda1a=_0x476d2e[_0xc4a7a0(0x209)](_0x2e6cf9=>_0x2e6cf9[_0xc4a7a0(0x1f2)]!==_0x31464c[_0xc4a7a0(0x1ef)]);if(_0x4fda1a[_0xc4a7a0(0x238)]>0x0)throw menuError(_0xc4a7a0(0x1ff),_0xc4a7a0(0x207)+_0x4fda1a['map'](_0x325370=>_0x325370['id'])[_0xc4a7a0(0x237)](',\x20')+'.',_0xc4a7a0(0x20a));}const _0x250a06=_0x476d2e[_0xc4a7a0(0x20e)](_0x7b032b=>({'id':_0x7b032b['id'],'label':_0x7b032b[_0xc4a7a0(0x216)],'path':_0x7b032b[_0xc4a7a0(0x1dd)],'before':{'visible':_0x7b032b['visible']},'after':{'visible':_0x31464c[_0xc4a7a0(0x1f2)]}})),_0x383649=_0x250a06[_0xc4a7a0(0x209)](_0x1d5365=>_0x1d5365[_0xc4a7a0(0x1f4)]['visible']!==_0x31464c[_0xc4a7a0(0x1f2)])['map'](_0x211eef=>({'stage':'update-menu-visibility','method':_0xc4a7a0(0x211),'path':_0xc4a7a0(0x232),'body':{'appCode':_0x294ecc['appCode'],'id':_0x211eef['id'],'visible':_0x31464c[_0xc4a7a0(0x1f2)]}})),_0x3549fc=mutationResult({'operation':_0xc4a7a0(0x204),'selector':{'menuIds':_0x31464c[_0xc4a7a0(0x230)],'paths':_0x31464c['paths']},'before':{'menus':_0x476d2e[_0xc4a7a0(0x20e)](_0x550f03=>({'id':_0x550f03['id'],'path':_0x550f03[_0xc4a7a0(0x1dd)],'visible':_0x550f03['visible']}))},'after':{'menus':_0x476d2e['map'](_0x3dd169=>({'id':_0x3dd169['id'],'path':_0x3dd169[_0xc4a7a0(0x1dd)],'visible':_0x31464c[_0xc4a7a0(0x1f2)]}))},'dryRun':_0x3e26e8,'backend':[...BACKEND],'plannedActions':_0x383649,'snapshotHash':_0xab4a00[_0xc4a7a0(0x224)],'warnings':_0x383649[_0xc4a7a0(0x238)]===0x0?[_0xc4a7a0(0x236)]:[]});return{'plan':{..._0x3549fc,'requestedVisible':_0x31464c[_0xc4a7a0(0x1f2)],'targets':_0x250a06},'beforeById':new Map(_0x476d2e['map'](_0x161a69=>[_0x161a69['id'],_0x161a69]))};}function selectTargets(_0x5e3a1e,_0x1832b7,_0x6efb0a){const _0x4cd2d0=a134_0x654c5,_0x332e39=new Map(_0x5e3a1e['map'](_0x421746=>[_0x421746['id'],_0x421746])),_0x5741df=new Map(),_0x1485fa=_0x1832b7[_0x4cd2d0(0x209)](_0x3b7975=>!_0x332e39[_0x4cd2d0(0x1da)](_0x3b7975));if(_0x1485fa[_0x4cd2d0(0x238)]>0x0)throw menuError(_0x4cd2d0(0x206),_0x4cd2d0(0x1eb)+_0x1485fa[_0x4cd2d0(0x237)](',\x20')+'.',_0x4cd2d0(0x208));for(const _0xbe82b8 of _0x1832b7){_0x5741df['set'](_0xbe82b8,_0x332e39[_0x4cd2d0(0x1c9)](_0xbe82b8));}for(const _0x3629d8 of _0x6efb0a){const _0x2a1195=_0x5e3a1e[_0x4cd2d0(0x209)](_0x5b6f4e=>_0x5b6f4e[_0x4cd2d0(0x1dd)]===_0x3629d8);if(_0x2a1195['length']===0x0)throw menuError(_0x4cd2d0(0x206),'Menu\x20path\x20selector\x20not\x20found:\x20'+JSON['stringify'](_0x3629d8)+'.',_0x4cd2d0(0x23d));if(_0x2a1195[_0x4cd2d0(0x238)]>0x1)throw menuError('menu_selector_ambiguous',_0x4cd2d0(0x1d1)+JSON[_0x4cd2d0(0x21d)](_0x3629d8)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x2a1195['map'](_0x1fcc1a=>_0x1fcc1a['id'])[_0x4cd2d0(0x237)](',\x20')+'.');const _0x3838d3=_0x2a1195[0x0];_0x5741df['set'](_0x3838d3['id'],_0x3838d3);}return[..._0x5741df[_0x4cd2d0(0x1ec)]()];}function parseMenuIds(_0x44243c){const _0x19da41=a134_0x654c5,_0x8ad0ca=parseCsv(_0x44243c),_0x542871=_0x8ad0ca[_0x19da41(0x20e)](Number);if(_0x542871['some'](_0x2470bc=>!Number[_0x19da41(0x221)](_0x2470bc)||_0x2470bc<=0x0))throw CliErrors[_0x19da41(0x20c)](_0x19da41(0x231));return[...new Set(_0x542871)];}function parseCsv(_0x478a96){const _0x4982e3=a134_0x654c5;return[...new Set(_0x478a96[_0x4982e3(0x1fd)](',')['map'](_0x41ea3c=>_0x41ea3c[_0x4982e3(0x234)]())['filter'](Boolean))];}function parseBooleanFlag(_0x592ae8,_0x638c66,_0x286b9f){const _0x3f2ad9=a134_0x654c5;if(!hasFlag(_0x592ae8,_0x638c66)){if(_0x286b9f)throw CliErrors[_0x3f2ad9(0x212)](_0x638c66);return undefined;}const _0x5c7046=_0x592ae8[_0x3f2ad9(0x227)][_0x638c66];if(_0x5c7046===!![]||_0x5c7046===![])return _0x5c7046;if(_0x5c7046===_0x3f2ad9(0x239))return!![];if(_0x5c7046==='false')return![];throw CliErrors[_0x3f2ad9(0x20c)]('--'+_0x638c66+_0x3f2ad9(0x1cf));}function verifyVisibilityUpdate(_0x1bcabf,_0x2a4cf0,_0x30060e){const _0x22f805=a134_0x654c5;assertVerified(!!_0x2a4cf0,_0x22f805(0x1ea)+_0x1bcabf['id']+_0x22f805(0x1cb)),assertVerified(_0x2a4cf0[_0x22f805(0x1f2)]===_0x30060e,_0x22f805(0x1ea)+_0x1bcabf['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x12e9c5=[['id',_0x2a4cf0['id'],_0x1bcabf['id']],[_0x22f805(0x233),_0x2a4cf0[_0x22f805(0x233)],_0x1bcabf[_0x22f805(0x233)]],[_0x22f805(0x1fb),_0x2a4cf0[_0x22f805(0x1fb)],_0x1bcabf[_0x22f805(0x1fb)]],[_0x22f805(0x216),_0x2a4cf0[_0x22f805(0x216)],_0x1bcabf[_0x22f805(0x216)]],[_0x22f805(0x1dd),_0x2a4cf0[_0x22f805(0x1dd)],_0x1bcabf[_0x22f805(0x1dd)]],[_0x22f805(0x1cc),_0x2a4cf0[_0x22f805(0x1cc)],_0x1bcabf[_0x22f805(0x1cc)]],[_0x22f805(0x22a),_0x2a4cf0[_0x22f805(0x22a)],_0x1bcabf['type']],[_0x22f805(0x22c),_0x2a4cf0[_0x22f805(0x22c)],_0x1bcabf[_0x22f805(0x22c)]],[_0x22f805(0x1fa),_0x2a4cf0['resources'],_0x1bcabf[_0x22f805(0x1fa)]],[_0x22f805(0x1e6),_0x2a4cf0['resourcesValid'],_0x1bcabf[_0x22f805(0x1e6)]],['childrenIds',_0x2a4cf0[_0x22f805(0x1d7)],_0x1bcabf['childrenIds']],[_0x22f805(0x1dc),_0x2a4cf0[_0x22f805(0x1dc)],_0x1bcabf['childrenCount']],[_0x22f805(0x1e3),_0x2a4cf0[_0x22f805(0x1e3)],_0x1bcabf[_0x22f805(0x1e3)]],[_0x22f805(0x1e5),_0x2a4cf0[_0x22f805(0x1e5)],_0x1bcabf[_0x22f805(0x1e5)]],[_0x22f805(0x21a),_0x2a4cf0['modelType'],_0x1bcabf['modelType']],[_0x22f805(0x20d),_0x2a4cf0[_0x22f805(0x20d)],_0x1bcabf['datasetId']],[_0x22f805(0x1f8),_0x2a4cf0[_0x22f805(0x1f8)],_0x1bcabf[_0x22f805(0x1f8)]]];for(const [_0x486f44,_0x5722f2,_0x602495]of _0x12e9c5){assertVerified(sameValue(_0x5722f2,_0x602495),'Menu\x20'+_0x1bcabf['id']+'\x20'+_0x486f44+'\x20changed\x20unexpectedly.');}}function sameValue(_0x4d4fa3,_0x4c049d){const _0x599ca1=a134_0x654c5;if(Array[_0x599ca1(0x1d5)](_0x4d4fa3)||Array['isArray'](_0x4c049d))return JSON[_0x599ca1(0x21d)](_0x4d4fa3)===JSON[_0x599ca1(0x21d)](_0x4c049d);return _0x4d4fa3===_0x4c049d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a135_0x1e37(_0x355ea3,_0x170506){_0x355ea3=_0x355ea3-0xcf;const _0x3bce5d=a135_0x3bce();let _0x1e37a5=_0x3bce5d[_0x355ea3];return _0x1e37a5;}const a135_0xc1c161=a135_0x1e37;(function(_0x3eda2f,_0x379bb1){const _0xb7121=a135_0x1e37,_0x1c0c67=_0x3eda2f();while(!![]){try{const _0x4c046b=parseInt(_0xb7121(0xeb))/0x1*(-parseInt(_0xb7121(0xe6))/0x2)+-parseInt(_0xb7121(0xde))/0x3+-parseInt(_0xb7121(0xe3))/0x4*(parseInt(_0xb7121(0xdd))/0x5)+parseInt(_0xb7121(0xdf))/0x6+-parseInt(_0xb7121(0xea))/0x7*(parseInt(_0xb7121(0xdb))/0x8)+-parseInt(_0xb7121(0xd3))/0x9+parseInt(_0xb7121(0xdc))/0xa;if(_0x4c046b===_0x379bb1)break;else _0x1c0c67['push'](_0x1c0c67['shift']());}catch(_0x246c03){_0x1c0c67['push'](_0x1c0c67['shift']());}}}(a135_0x3bce,0x4571d));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a135_0xc1c161(0xd5);function a135_0x3bce(){const _0x39e0cc=['4596KJXqmA',';\x20do\x20not\x20resubmit\x20automatically.','config-create','3632MZQNUb','channelType','notification','endpointUrl','1185681ldhcYl','132MTCbsI','write','Inspect\x20with\x20','description','input','appCode','verification','document','isSafeInteger','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','connectTimeout','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source',';\x20do\x20not\x20resubmit.','planned',';\x20no\x20automatic\x20retry\x20was\x20attempted.','configName','297774OLLXfF','POST','/notification/channel-config/create','Created\x20notification\x20config\x20','configCode','notification_config_create_outcome_unknown','channelConfig','readTimeout','8rGuseu','9630610gvkRxT','1170vfzuVS','1376877JNfhiz','2948340QkJcWX','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','verified','create'];a135_0x3bce=function(){return _0x39e0cc;};return a135_0x3bce();}async function prepareCreate(_0x341e24){const _0x460d13=a135_0xc1c161,_0x23e255=await readNotificationDocument(_0x341e24,_0x460d13(0xe2)),_0x5f11d0=createMutationInput(_0x341e24[_0x460d13(0xf0)],_0x23e255);return{'document':_0x23e255,'input':_0x5f11d0,'planned':projectNotificationConfig({'appCode':_0x341e24['appCode'],'configName':_0x23e255[_0x460d13(0xd2)],'channelType':_0x23e255[_0x460d13(0xe7)],'endpointUrl':_0x23e255[_0x460d13(0xe9)],'channelConfig':_0x23e255[_0x460d13(0xd9)],'description':_0x23e255[_0x460d13(0xee)],'connectTimeout':_0x23e255[_0x460d13(0xf5)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x23e255[_0x460d13(0xda)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a135_0xc1c161(0xe8),'command':a135_0xc1c161(0xe5),'description':a135_0xc1c161(0xf6),'risk':a135_0xc1c161(0xec),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x5737ab){assertSingleNotificationSource(_0x5737ab);},async 'dryRun'(_0x4f9106){const _0x13ac66=a135_0xc1c161,_0x171ca2=await prepareCreate(_0x4f9106),_0x4590bb=notificationLookupCommand(_0x4f9106[_0x13ac66(0xf0)],_0x171ca2[_0x13ac66(0xf2)][_0x13ac66(0xe7)]);return asDryRunResult({'operation':_0x13ac66(0xe2),'selector':{'appCode':_0x4f9106['appCode'],'configName':_0x171ca2[_0x13ac66(0xf2)][_0x13ac66(0xd2)],'channelType':_0x171ca2[_0x13ac66(0xf2)][_0x13ac66(0xe7)]},'before':null,'after':_0x171ca2[_0x13ac66(0xd0)],'dryRun':!![],'backend':{'method':_0x13ac66(0xd4),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x13ac66(0xd0),'lookupCommand':_0x4590bb}},{'method':_0x13ac66(0xd4),'url':CREATE_PATH});},async 'execute'(_0x1024c3){const _0x54632c=a135_0xc1c161,_0x4bf27a=await prepareCreate(_0x1024c3),_0x930d4b=notificationLookupCommand(_0x1024c3[_0x54632c(0xf0)],_0x4bf27a[_0x54632c(0xf2)][_0x54632c(0xe7)]);let _0x5eca2b;try{_0x5eca2b=await createNotificationChannelConfig(_0x4bf27a[_0x54632c(0xef)]);}catch(_0x4ec235){if(isPlatformTransportFailure(_0x4ec235))throw notificationError(_0x54632c(0xd8),_0x54632c(0xe0),'Inspect\x20with\x20'+_0x930d4b+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x54632c(0xe2),'mutation',_0x54632c(0xed)+_0x930d4b+_0x54632c(0xd1));}if(!Number[_0x54632c(0xf3)](_0x5eca2b)||_0x5eca2b<=0x0)throw notificationError(_0x54632c(0xd8),_0x54632c(0xf4),_0x54632c(0xed)+_0x930d4b+_0x54632c(0xcf));let _0xcf65fb;try{const _0x2ec7a6=await getNotificationChannelConfig(_0x5eca2b,_0x1024c3['appCode']);_0xcf65fb=normalizeExactNotificationConfig(_0x2ec7a6,_0x5eca2b,_0x1024c3[_0x54632c(0xf0)]);}catch{throw safeApiFailure(_0x54632c(0xe2),_0x54632c(0xf1),'Inspect\x20with\x20'+_0x930d4b+_0x54632c(0xe4));}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0xcf65fb['appCode'],'id':_0xcf65fb['id'],'configCode':_0xcf65fb[_0x54632c(0xd7)],'configName':_0xcf65fb[_0x54632c(0xd2)],'channelType':_0xcf65fb[_0x54632c(0xe7)]},'before':null,'after':projectNotificationConfig(_0xcf65fb),'dryRun':![],'backend':{'method':_0x54632c(0xd4),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x54632c(0xe1),'lookupCommand':_0x930d4b}},'message':_0x54632c(0xd6)+_0xcf65fb['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a136_0x5b4ae2=a136_0x4846;(function(_0x508470,_0x452c72){const _0x3248cd=a136_0x4846,_0x5c6c43=_0x508470();while(!![]){try{const _0x5e425a=-parseInt(_0x3248cd(0x139))/0x1+-parseInt(_0x3248cd(0x120))/0x2*(parseInt(_0x3248cd(0x12d))/0x3)+parseInt(_0x3248cd(0x13b))/0x4*(-parseInt(_0x3248cd(0x12b))/0x5)+parseInt(_0x3248cd(0x135))/0x6+-parseInt(_0x3248cd(0x126))/0x7*(-parseInt(_0x3248cd(0x136))/0x8)+parseInt(_0x3248cd(0x13e))/0x9*(parseInt(_0x3248cd(0x129))/0xa)+parseInt(_0x3248cd(0x127))/0xb;if(_0x5e425a===_0x452c72)break;else _0x5c6c43['push'](_0x5c6c43['shift']());}catch(_0x2f9553){_0x5c6c43['push'](_0x5c6c43['shift']());}}}(a136_0x3d2f,0x71b14));function a136_0x4846(_0x241e98,_0x4887aa){_0x241e98=_0x241e98-0x11d;const _0x3d2f5e=a136_0x3d2f();let _0x4846f9=_0x3d2f5e[_0x241e98];return _0x4846f9;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a136_0x3d2f(){const _0x34b717=['4095NVDtzh','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','high-risk-write','notification_config_delete_verification_failed','682xsbKth',';\x20do\x20not\x20resubmit\x20automatically.','POST','Deleted\x20notification\x20config\x20','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','config-delete','77cTgXYd','10652741hoipUC','delete','50UGuOtn','before','60055gSMQIQ','Inspect\x20with\x20','6444GJumlc','\x20delete\x20could\x20not\x20be\x20verified.','notification_config_delete_outcome_unknown','notification_config_delete_verification_unavailable','appCode','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','unshift','2326500NHklrQ','233224HbDDtB','channelType','\x20remains\x20present\x20after\x20delete.','216745dfJdZL','planned','88sSMFzq','verified','Notification\x20config\x20'];a136_0x3d2f=function(){return _0x34b717;};return a136_0x3d2f();}import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH='/notification/channel-config/delete',REFERENCE_WARNING=a136_0x5b4ae2(0x132);async function prepareDelete(_0x500f37){const _0x3fc897=a136_0x5b4ae2,_0x4c3929=readNotificationId(_0x500f37),_0x46f9f2=await requireExactNotificationConfig(_0x500f37['appCode'],_0x4c3929,_0x3fc897(0x128));return{'id':_0x4c3929,'before':_0x46f9f2};}export const notificationConfigDelete={'service':'notification','command':a136_0x5b4ae2(0x125),'description':a136_0x5b4ae2(0x124),'risk':a136_0x5b4ae2(0x11e),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x247090){readNotificationId(_0x247090),requireNotificationExplicitYes(_0x247090);},async 'dryRun'(_0x4930b5){const _0x5719b8=a136_0x5b4ae2,_0xd78f=await prepareDelete(_0x4930b5),_0x41eb79=notificationLookupCommand(_0x4930b5['appCode'],_0xd78f['before'][_0x5719b8(0x137)]);return asDryRunResult({'operation':_0x5719b8(0x128),'selector':notificationSelector(_0xd78f[_0x5719b8(0x12a)]),'before':projectNotificationConfig(_0xd78f[_0x5719b8(0x12a)]),'after':null,'dryRun':!![],'backend':{'method':_0x5719b8(0x122),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x5719b8(0x13a),'lookupCommand':_0x41eb79}},{'method':_0x5719b8(0x122),'url':DELETE_PATH});},async 'execute'(_0xcbd6e1){const _0xabb693=a136_0x5b4ae2;requireNotificationExplicitYes(_0xcbd6e1);const _0x20a6c0=await prepareDelete(_0xcbd6e1),_0x4dbfa8=notificationLookupCommand(_0xcbd6e1[_0xabb693(0x131)],_0x20a6c0['before'][_0xabb693(0x137)]);let _0x1d3ae9=![];try{await deleteNotificationChannelConfig(_0x20a6c0['id'],_0xcbd6e1[_0xabb693(0x131)]);}catch(_0x5e3de7){if(!isPlatformTransportFailure(_0x5e3de7))throw safeApiFailure('delete','mutation',_0xabb693(0x12c)+_0x4dbfa8+_0xabb693(0x133));_0x1d3ae9=!![];}let _0x1d6123;try{_0x1d6123=await listNotificationChannelConfigs(_0xcbd6e1[_0xabb693(0x131)],_0x20a6c0[_0xabb693(0x12a)][_0xabb693(0x137)]),validateNotificationDeleteReadback(_0x1d6123,_0xcbd6e1[_0xabb693(0x131)],_0x20a6c0[_0xabb693(0x12a)][_0xabb693(0x137)]);}catch{throw notificationError(_0x1d3ae9?_0xabb693(0x12f):_0xabb693(0x130),_0xabb693(0x13d)+_0x20a6c0['id']+_0xabb693(0x12e),_0xabb693(0x12c)+_0x4dbfa8+_0xabb693(0x121));}if(_0x1d6123['some'](_0xef1e42=>_0xef1e42['id']===_0x20a6c0['id']))throw notificationError(_0x1d3ae9?_0xabb693(0x12f):_0xabb693(0x11f),_0xabb693(0x13d)+_0x20a6c0['id']+_0xabb693(0x138),_0xabb693(0x12c)+_0x4dbfa8+_0xabb693(0x121));const _0x48caa4=[REFERENCE_WARNING];return _0x1d3ae9&&_0x48caa4[_0xabb693(0x134)](_0xabb693(0x11d)),{'ok':!![],'data':{'operation':_0xabb693(0x128),'selector':notificationSelector(_0x20a6c0[_0xabb693(0x12a)]),'before':projectNotificationConfig(_0x20a6c0['before']),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x48caa4,'verification':{'status':_0xabb693(0x13c),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x1d3ae9,'lookupCommand':_0x4dbfa8}},'message':_0xabb693(0x123)+_0x20a6c0['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a137_0x781b0a=a137_0x547a;(function(_0x5c1507,_0xd083fa){const _0x5343ca=a137_0x547a,_0x4a7111=_0x5c1507();while(!![]){try{const _0x41d4bb=-parseInt(_0x5343ca(0x11f))/0x1*(-parseInt(_0x5343ca(0x11b))/0x2)+-parseInt(_0x5343ca(0x116))/0x3*(-parseInt(_0x5343ca(0x11d))/0x4)+parseInt(_0x5343ca(0x11a))/0x5+-parseInt(_0x5343ca(0x11e))/0x6+-parseInt(_0x5343ca(0x10f))/0x7*(-parseInt(_0x5343ca(0x10d))/0x8)+-parseInt(_0x5343ca(0x119))/0x9*(-parseInt(_0x5343ca(0x115))/0xa)+-parseInt(_0x5343ca(0x110))/0xb*(parseInt(_0x5343ca(0x113))/0xc);if(_0x41d4bb===_0xd083fa)break;else _0x4a7111['push'](_0x4a7111['shift']());}catch(_0x5c7124){_0x4a7111['push'](_0x4a7111['shift']());}}}(a137_0x128e,0x5f206));function a137_0x128e(){const _0x999c24=['2024892nfVAnf','length','24190xwmUlL','9159YCYaXD','notification','EMAIL','243JluZig','3464575WhJFIN','38xHGgms','map','820dRUgSP','50574lbdmRq','8233SzDyZF','Notification\x20channel\x20type','309872TBMRRO','\x20notification\x20config(s)','7nhfrma','77TUTkzl','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','appCode'];a137_0x128e=function(){return _0x999c24;};return a137_0x128e();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a137_0x547a(_0x1e4036,_0x5d7e18){_0x1e4036=_0x1e4036-0x10c;const _0x128ea9=a137_0x128e();let _0x547a66=_0x128ea9[_0x1e4036];return _0x547a66;}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a137_0x781b0a(0x117),'command':'config-list','description':a137_0x781b0a(0x111),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':'string','description':a137_0x781b0a(0x10c),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a137_0x781b0a(0x118)}],async 'validate'(_0x449a1f){readNotificationChannelType(_0x449a1f);},async 'execute'(_0x258fef){const _0x136f1c=a137_0x781b0a,_0xc4bd9c=readNotificationChannelType(_0x258fef),_0x46b675=await listNotificationChannelConfigs(_0x258fef[_0x136f1c(0x112)],_0xc4bd9c),_0x7d8673=_0x46b675[_0x136f1c(0x11c)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x258fef['appCode'],'channelType':_0xc4bd9c,'count':_0x7d8673[_0x136f1c(0x114)],'configs':_0x7d8673},'message':'Found\x20'+_0x7d8673['length']+'\x20'+_0xc4bd9c+_0x136f1c(0x10e)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a138_0xf4d8(_0x4484db,_0x45f0d4){_0x4484db=_0x4484db-0x10d;const _0x23cdf2=a138_0x23cd();let _0xf4d847=_0x23cdf2[_0x4484db];return _0xf4d847;}const a138_0x548380=a138_0xf4d8;(function(_0x21fb40,_0x3ff4e7){const _0x4a9f19=a138_0xf4d8,_0x44455a=_0x21fb40();while(!![]){try{const _0x16919b=parseInt(_0x4a9f19(0x128))/0x1*(-parseInt(_0x4a9f19(0x111))/0x2)+-parseInt(_0x4a9f19(0x12f))/0x3+-parseInt(_0x4a9f19(0x124))/0x4+-parseInt(_0x4a9f19(0x10e))/0x5*(parseInt(_0x4a9f19(0x11a))/0x6)+parseInt(_0x4a9f19(0x10f))/0x7*(parseInt(_0x4a9f19(0x11f))/0x8)+parseInt(_0x4a9f19(0x12c))/0x9+-parseInt(_0x4a9f19(0x123))/0xa*(-parseInt(_0x4a9f19(0x11e))/0xb);if(_0x16919b===_0x3ff4e7)break;else _0x44455a['push'](_0x44455a['shift']());}catch(_0x2e7b9e){_0x44455a['push'](_0x44455a['shift']());}}}(a138_0x23cd,0xf2593));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_0x23cd(){const _0x357b5c=['notification_config_update_outcome_unknown','verifiedFields','3648882owoKaz','provesChange',';\x20do\x20not\x20resubmit\x20automatically.','appCode','54923cKWpbF','64hbtaeL','mutation','channelType','\x20with\x20','710swGjUH','3892196GEitWB','Inspect\x20ID\x20','\x20via\x20','notification_config_update_verification_failed','9dWdMLN','patch','POST','Notification\x20config\x20','16966746ZySHuI','verified','Inspect\x20with\x20--id\x20','994239wWsxFE','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','update','notification_config_update_verification_unavailable','before','/notification/channel-config/update','5LrGbpM','1090698BsSMGS','payload','129098FOvUSC','allMatch','high-risk-write','notification','planned','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','Updated\x20notification\x20config\x20'];a138_0x23cd=function(){return _0x357b5c;};return a138_0x23cd();}const UPDATE_PATH=a138_0x548380(0x10d);async function prepareUpdate(_0x23250){const _0x141d28=a138_0x548380,_0x473c05=readNotificationId(_0x23250),_0x5ad244=await readNotificationDocument(_0x23250,'update'),_0x331ea9=await requireExactNotificationConfig(_0x23250[_0x141d28(0x11d)],_0x473c05,'update');return{'id':_0x473c05,'patch':_0x5ad244,'before':_0x331ea9,'payload':mergeUpdateInput(_0x331ea9,_0x5ad244),'planned':plannedUpdateProjection(_0x331ea9,_0x5ad244)};}export const notificationConfigUpdate={'service':a138_0x548380(0x114),'command':'config-update','description':a138_0x548380(0x131),'risk':a138_0x548380(0x113),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x43aa8f){readNotificationId(_0x43aa8f),assertSingleNotificationSource(_0x43aa8f),requireNotificationExplicitYes(_0x43aa8f);},async 'dryRun'(_0x301eba){const _0x220ee3=a138_0x548380,_0x4babc6=await prepareUpdate(_0x301eba),_0x27a1a1=notificationLookupCommand(_0x301eba[_0x220ee3(0x11d)],_0x4babc6[_0x220ee3(0x135)][_0x220ee3(0x121)]);return asDryRunResult({'operation':_0x220ee3(0x133),'selector':notificationSelector(_0x4babc6[_0x220ee3(0x135)]),'before':projectNotificationConfig(_0x4babc6[_0x220ee3(0x135)]),'after':_0x4babc6[_0x220ee3(0x115)],'dryRun':!![],'backend':{'method':_0x220ee3(0x12a),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x220ee3(0x115),'lookupCommand':_0x27a1a1}},{'method':_0x220ee3(0x12a),'url':UPDATE_PATH});},async 'execute'(_0x5ccd47){const _0xaaa1bd=a138_0x548380;requireNotificationExplicitYes(_0x5ccd47);const _0x4f19a2=await prepareUpdate(_0x5ccd47),_0x54ec5e=notificationLookupCommand(_0x5ccd47[_0xaaa1bd(0x11d)],_0x4f19a2['before'][_0xaaa1bd(0x121)]);let _0x4d9eea=![];try{await updateNotificationChannelConfig(_0x4f19a2[_0xaaa1bd(0x110)]);}catch(_0x315eca){if(!isPlatformTransportFailure(_0x315eca))throw safeApiFailure(_0xaaa1bd(0x133),_0xaaa1bd(0x120),_0xaaa1bd(0x125)+_0x4f19a2['id']+_0xaaa1bd(0x122)+_0x54ec5e+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x4d9eea=!![];}let _0x24582c;try{const _0x4a0728=await getNotificationChannelConfig(_0x4f19a2['id'],_0x5ccd47[_0xaaa1bd(0x11d)]);_0x24582c=normalizeExactNotificationConfig(_0x4a0728,_0x4f19a2['id'],_0x5ccd47[_0xaaa1bd(0x11d)]);}catch{throw notificationError(_0x4d9eea?_0xaaa1bd(0x118):_0xaaa1bd(0x134),_0xaaa1bd(0x12b)+_0x4f19a2['id']+_0xaaa1bd(0x116),_0xaaa1bd(0x12e)+_0x4f19a2['id']+_0xaaa1bd(0x126)+_0x54ec5e+_0xaaa1bd(0x11c));}const _0x5ebf4d=requestedSafeFieldsMatch(_0x4f19a2['before'],_0x24582c,_0x4f19a2[_0xaaa1bd(0x129)]);if(!_0x5ebf4d[_0xaaa1bd(0x112)]||_0x4d9eea&&!_0x5ebf4d[_0xaaa1bd(0x11b)])throw notificationError(_0x4d9eea?_0xaaa1bd(0x118):_0xaaa1bd(0x127),'Notification\x20config\x20'+_0x4f19a2['id']+_0xaaa1bd(0x130),_0xaaa1bd(0x12e)+_0x4f19a2['id']+'\x20via\x20'+_0x54ec5e+';\x20do\x20not\x20resubmit\x20automatically.');const _0x59130d=_0x4d9eea?[_0xaaa1bd(0x132)]:[];return{'ok':!![],'data':{'operation':_0xaaa1bd(0x133),'selector':notificationSelector(_0x24582c),'before':projectNotificationConfig(_0x4f19a2[_0xaaa1bd(0x135)]),'after':projectNotificationConfig(_0x24582c),'dryRun':![],'backend':{'method':_0xaaa1bd(0x12a),'path':UPDATE_PATH},'warnings':_0x59130d,'verification':{'status':_0xaaa1bd(0x12d),'recoveredAfterUnknownResponse':_0x4d9eea,'verifiedFields':_0x5ebf4d[_0xaaa1bd(0x119)],'lookupCommand':_0x54ec5e}},'message':_0xaaa1bd(0x117)+_0x24582c['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a139_0x3028(_0x11f96c,_0x6b7b68){_0x11f96c=_0x11f96c-0xe4;const _0x2d5ee6=a139_0x2d5e();let _0x3028ef=_0x2d5ee6[_0x11f96c];return _0x3028ef;}(function(_0x1681fb,_0x44122f){const _0x48f356=a139_0x3028,_0x4cca82=_0x1681fb();while(!![]){try{const _0x12404d=-parseInt(_0x48f356(0xec))/0x1*(-parseInt(_0x48f356(0xf1))/0x2)+-parseInt(_0x48f356(0xe9))/0x3*(parseInt(_0x48f356(0xe4))/0x4)+-parseInt(_0x48f356(0xee))/0x5*(parseInt(_0x48f356(0xe7))/0x6)+-parseInt(_0x48f356(0xf0))/0x7*(-parseInt(_0x48f356(0xeb))/0x8)+parseInt(_0x48f356(0xed))/0x9*(-parseInt(_0x48f356(0xef))/0xa)+parseInt(_0x48f356(0xe5))/0xb*(parseInt(_0x48f356(0xe6))/0xc)+parseInt(_0x48f356(0xea))/0xd*(-parseInt(_0x48f356(0xe8))/0xe);if(_0x12404d===_0x44122f)break;else _0x4cca82['push'](_0x4cca82['shift']());}catch(_0xb4a6b6){_0x4cca82['push'](_0x4cca82['shift']());}}}(a139_0x2d5e,0x3d4a9));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_0x2d5e(){const _0x2fce3b=['10TwGZRp','28YANHUg','134746mliApm','716oIQvZP','110gHnHaZ','502380HBUinJ','264vbQbmM','14uHvomz','3636UBKBOZ','1222754gGAGgf','171968HMwtbP','4mYtShV','371367voLpng','19410KzAhbK'];a139_0x2d5e=function(){return _0x2fce3b;};return a139_0x2d5e();}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|