@lovrabet/rabetbase-cli 2.5.7 → 2.5.8-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/README.md +7 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.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/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.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-restore.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/dataset/user-deleted-field-list.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/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.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/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.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/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.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/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/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.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/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -2
- 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/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-management-client.d.ts +19 -0
- package/lib/core/kb-management-client.js +1 -0
- package/lib/core/kb-search-client.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/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.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/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.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/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/references/rabetbase-kb.md +7 -6
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xe767b1,_0x4d86b0){const _0x1d8df5=a186_0x1c6d,_0x5a1f1e=_0xe767b1();while(!![]){try{const _0x476858=parseInt(_0x1d8df5(0x1b6))/0x1+-parseInt(_0x1d8df5(0x194))/0x2*(-parseInt(_0x1d8df5(0x1b4))/0x3)+-parseInt(_0x1d8df5(0x1b0))/0x4*(-parseInt(_0x1d8df5(0x1a9))/0x5)+-parseInt(_0x1d8df5(0x1ba))/0x6*(-parseInt(_0x1d8df5(0x1c3))/0x7)+parseInt(_0x1d8df5(0x1d7))/0x8*(-parseInt(_0x1d8df5(0x1ae))/0x9)+parseInt(_0x1d8df5(0x197))/0xa+parseInt(_0x1d8df5(0x1c6))/0xb*(-parseInt(_0x1d8df5(0x1d3))/0xc);if(_0x476858===_0x4d86b0)break;else _0x5a1f1e['push'](_0x5a1f1e['shift']());}catch(_0x27bac7){_0x5a1f1e['push'](_0x5a1f1e['shift']());}}}(a186_0x2366,0x9e993));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a186_0x2366(){const _0x52dff7=['343CnXRlZ','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','fulfilled','55blWenA','after','resources','message','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','object','Start\x20non-interactive\x20menu\x20asset\x20update','menu-asset-update','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','has','dryRun','join','3607248rWvUhI','jsUrl','info','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','24xQCned','rejected','field','\x22\x20(','isArray','loadScriptMode','push','38MFIYJb','.css','patch','3285500KxBFIc','value','cssUrl','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','mode','replace','trim','status','--params.','string','length','JS\x20URL\x20is\x20unreachable:\x20','Invalid\x20--params:\x20','endsWith','\x20existing\x20JS\x20resources\x20for\x20\x22','map','filter','paths','5wsoDZl','allSettled','path','some','menuIds','2680146ErphxP','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','4825468latyFx','unshift','split','setLogPath','15756nhjEdD','menu\x20asset-update\x20cannot\x20patch\x20','666565tewFyO','\x20existing\x20CSS\x20resources\x20for\x20\x22','extend','label','91194cLZMZQ','cwd','selection','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','toLowerCase','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','Invalid\x20--mode:\x20','all'];a186_0x2366=function(){return _0x52dff7;};return a186_0x2366();}import{logger}from'../../../utils/logger.js';function validateParams(_0x1a8182){const _0x5241a4=a186_0x1c6d,_0x5d22d5=[];return _0x1a8182[_0x5241a4(0x1d4)]&&!isValidJsHttpsUrl(_0x1a8182['jsUrl'])&&_0x5d22d5[_0x5241a4(0x193)]({'field':_0x5241a4(0x1d4),'message':_0x5241a4(0x1cb)}),_0x1a8182[_0x5241a4(0x199)]&&!isValidCssHttpsUrl(_0x1a8182[_0x5241a4(0x199)])&&_0x5d22d5['push']({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x5d22d5;}export async function runMenuUpdateCore(_0x1947f6,_0xad0e8b,_0x32084d,_0x42b06d={}){const _0x62d309=a186_0x1c6d,_0x19c75c=parseUpdateParamsFlag(_0x32084d),_0x10f60a=normalizeMode(_0x42b06d[_0x62d309(0x19b)]);validateSelection(_0x42b06d[_0x62d309(0x1bc)]);const _0x45c37b=[];if(_0x19c75c[_0x62d309(0x1d4)])_0x45c37b[_0x62d309(0x193)](_0x19c75c[_0x62d309(0x1d4)]);if(_0x19c75c['cssUrl'])_0x45c37b[_0x62d309(0x193)](_0x19c75c[_0x62d309(0x199)]);const _0x78926a=validateParams(_0x19c75c);if(_0x78926a['length']>0x0){const _0x14a365=_0x78926a['map'](_0x2d73b5=>_0x62d309(0x19f)+_0x2d73b5[_0x62d309(0x18f)]+':\x20'+_0x2d73b5[_0x62d309(0x1c9)])['join'](';\x20');throw new Error(_0x62d309(0x1a3)+_0x14a365);}if(_0x45c37b['length']===0x0)throw new Error(_0x62d309(0x1c4)+_0x62d309(0x1c0));logger[_0x62d309(0x1b3)](process[_0x62d309(0x1bb)]()),logger[_0x62d309(0x1d5)]('menu-asset-update',_0x62d309(0x1cd),{'appCode':_0x1947f6,'jsUrl':_0x19c75c[_0x62d309(0x1d4)],'cssUrl':_0x19c75c['cssUrl'],'mode':_0x10f60a,'dryRun':_0x42b06d[_0x62d309(0x1d1)]===!![]});if(_0x19c75c[_0x62d309(0x1d4)]){const _0x5f15bb=await isUrlReachable(_0x19c75c[_0x62d309(0x1d4)]);if(!_0x5f15bb)throw new Error(_0x62d309(0x1a2)+_0x19c75c[_0x62d309(0x1d4)]);}if(_0x19c75c['cssUrl']){const _0x306136=await isUrlReachable(_0x19c75c['cssUrl']);if(!_0x306136)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x19c75c[_0x62d309(0x199)]);}const _0x3d544d=await getOnlineMenuList(_0x1947f6,_0xad0e8b),_0x149370=_0x3d544d[_0x62d309(0x1a7)](_0x58569a=>_0x58569a['resources'][_0x62d309(0x1a1)]>0x0),_0x4a67df=selectMenusForUpdate(_0x149370,_0x42b06d[_0x62d309(0x1bc)]);if(_0x4a67df[_0x62d309(0x1a1)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x42b06d['dryRun']===!![]};const _0x2779f1=_0x4a67df['map'](_0x189ed3=>buildMenuUpdateDiff(_0x189ed3,_0x19c75c,_0x10f60a,_0x42b06d['force']===!![],_0x42b06d[_0x62d309(0x192)]));if(_0x42b06d[_0x62d309(0x1d1)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x2779f1};const _0x4a09e4=await Promise[_0x62d309(0x1aa)](_0x4a67df['map']((_0x36205c,_0x1a9cb5)=>updateMenuCdnUrl(_0x1947f6,_0xad0e8b,{'id':_0x36205c['id'],'label':_0x36205c['label'],'path':_0x36205c[_0x62d309(0x1ab)],'resources':_0x2779f1[_0x1a9cb5][_0x62d309(0x1c7)][_0x62d309(0x1c8)],'extend':_0x36205c[_0x62d309(0x1b8)]??null,'loadScriptMode':_0x42b06d[_0x62d309(0x192)]}))),_0x111225=_0x4a09e4[_0x62d309(0x1a7)](_0x1ed6dc=>_0x1ed6dc[_0x62d309(0x19e)]===_0x62d309(0x1c5))[_0x62d309(0x1a6)](_0x4f460e=>_0x4f460e[_0x62d309(0x198)]),_0x5320ff=_0x4a09e4[_0x62d309(0x1a7)](_0x12761c=>_0x12761c[_0x62d309(0x19e)]===_0x62d309(0x1d8))[_0x62d309(0x1a1)];return logger[_0x62d309(0x1d5)](_0x62d309(0x1ce),'Menu\x20asset\x20update\x20completed',{'count':_0x4a67df[_0x62d309(0x1a1)],'resources':_0x45c37b}),{'updated':_0x111225[_0x62d309(0x1a1)],'failed':_0x5320ff,'skipped':![],'menus':_0x111225};}function validateSelection(_0x751622){const _0x40701b=a186_0x1c6d;if(!_0x751622)throw new Error(_0x40701b(0x1af));if(_0x751622[_0x40701b(0x1c2)]&&(_0x751622[_0x40701b(0x1ad)][_0x40701b(0x1a1)]>0x0||_0x751622['paths'][_0x40701b(0x1a1)]>0x0))throw new Error(_0x40701b(0x1d6));if(!_0x751622[_0x40701b(0x1c2)]&&_0x751622[_0x40701b(0x1ad)]['length']===0x0&&_0x751622[_0x40701b(0x1a8)][_0x40701b(0x1a1)]===0x0)throw new Error(_0x40701b(0x1af));}export function selectMenusForUpdate(_0x2d102a,_0x80814d){const _0x4fe534=a186_0x1c6d;validateSelection(_0x80814d);if(_0x80814d['all'])return _0x2d102a;const _0x1159c0=new Set(_0x2d102a[_0x4fe534(0x1a6)](_0x59dfde=>_0x59dfde['id'])),_0x7a4330=new Set(_0x2d102a[_0x4fe534(0x1a6)](_0x418f69=>_0x418f69[_0x4fe534(0x1ab)])),_0x57d5af=_0x80814d[_0x4fe534(0x1ad)][_0x4fe534(0x1a7)](_0x4103a8=>!_0x1159c0[_0x4fe534(0x1d0)](_0x4103a8)),_0x4fccd1=_0x80814d[_0x4fe534(0x1a8)][_0x4fe534(0x1a7)](_0x486d63=>!_0x7a4330[_0x4fe534(0x1d0)](_0x486d63));if(_0x57d5af[_0x4fe534(0x1a1)]>0x0||_0x4fccd1[_0x4fe534(0x1a1)]>0x0){const _0x6e2908=[..._0x57d5af[_0x4fe534(0x1a6)](_0x5716ad=>String(_0x5716ad)),..._0x4fccd1][_0x4fe534(0x1d2)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x6e2908);}const _0xb7edc3=new Set(_0x80814d[_0x4fe534(0x1ad)]),_0x1b6028=new Set(_0x80814d[_0x4fe534(0x1a8)]);return _0x2d102a[_0x4fe534(0x1a7)](_0x65ffbc=>_0xb7edc3[_0x4fe534(0x1d0)](_0x65ffbc['id'])||_0x1b6028[_0x4fe534(0x1d0)](_0x65ffbc[_0x4fe534(0x1ab)]));}function normalizeMode(_0x4f20ae){const _0x537446=a186_0x1c6d;if(!_0x4f20ae)return _0x537446(0x196);if(_0x4f20ae===_0x537446(0x19c)||_0x4f20ae===_0x537446(0x196))return _0x4f20ae;throw new Error(_0x537446(0x1c1)+_0x4f20ae+'.\x20Allowed\x20values:\x20replace,\x20patch');}function buildMenuUpdateDiff(_0xf3ded8,_0x2e9ae4,_0x385d50,_0x3fde2b,_0x139108){const _0x2be76c=a186_0x1c6d,_0x304897=[..._0xf3ded8[_0x2be76c(0x1c8)]];_0x385d50==='patch'&&assertUnambiguousPatchResources(_0xf3ded8,_0x304897,_0x2e9ae4);const _0x366a33=_0x385d50===_0x2be76c(0x196)?patchResources(_0x304897,_0x2e9ae4):replaceResources(_0x2e9ae4),_0x3e0245=[],_0x2fb37f=_0x304897['some'](isJsResource),_0x35e27e=_0x366a33[_0x2be76c(0x1ac)](isJsResource);if(_0x2fb37f&&!_0x35e27e){const _0x3dfd64=_0x2be76c(0x1cf)+_0xf3ded8[_0x2be76c(0x1b9)]+_0x2be76c(0x190)+_0xf3ded8[_0x2be76c(0x1ab)]+').\x20'+_0x2be76c(0x1bd);if(!_0x3fde2b)throw new Error(_0x3dfd64);_0x3e0245['push'](_0x3dfd64);}const _0xd978a8=_0x304897[_0x2be76c(0x1ac)](isCssResource),_0x4a04d8=_0x366a33['some'](isCssResource);_0xd978a8&&!_0x4a04d8&&_0x3e0245[_0x2be76c(0x193)](_0x2be76c(0x19a)+_0xf3ded8[_0x2be76c(0x1b9)]+_0x2be76c(0x190)+_0xf3ded8['path']+').');const _0x153c25=typeof _0xf3ded8[_0x2be76c(0x1b8)]?.[_0x2be76c(0x192)]===_0x2be76c(0x1a0)?_0xf3ded8[_0x2be76c(0x1b8)]['loadScriptMode']:null,_0x123a95=_0x139108?{'loadScriptMode':_0x153c25}:{},_0x211f43=_0x139108?{'loadScriptMode':_0x139108}:{};return{'id':_0xf3ded8['id'],'label':_0xf3ded8['label'],'path':_0xf3ded8[_0x2be76c(0x1ab)],'mode':_0x385d50,'before':{'resources':_0x304897,..._0x123a95},'after':{'resources':_0x366a33,..._0x211f43},'warnings':_0x3e0245};}function replaceResources(_0x48729f){const _0xb5986c=a186_0x1c6d;return[_0x48729f[_0xb5986c(0x1d4)],_0x48729f[_0xb5986c(0x199)]][_0xb5986c(0x1a7)](_0x18f177=>!!_0x18f177);}function assertUnambiguousPatchResources(_0x5120b9,_0x30ff39,_0x513500){const _0x2171ec=a186_0x1c6d,_0x54d132=_0x30ff39[_0x2171ec(0x1a7)](isJsResource)[_0x2171ec(0x1a1)];if(_0x513500[_0x2171ec(0x1d4)]&&_0x54d132>0x1)throw new Error(_0x2171ec(0x1b5)+_0x54d132+_0x2171ec(0x1a5)+_0x5120b9[_0x2171ec(0x1b9)]+_0x2171ec(0x190)+_0x5120b9[_0x2171ec(0x1ab)]+')\x20'+_0x2171ec(0x1ca));const _0xb481a9=_0x30ff39[_0x2171ec(0x1a7)](isCssResource)[_0x2171ec(0x1a1)];if(_0x513500[_0x2171ec(0x199)]&&_0xb481a9>0x1)throw new Error(_0x2171ec(0x1b5)+_0xb481a9+_0x2171ec(0x1b7)+_0x5120b9[_0x2171ec(0x1b9)]+_0x2171ec(0x190)+_0x5120b9[_0x2171ec(0x1ab)]+')\x20'+_0x2171ec(0x1be));}function patchResources(_0x1c9be5,_0x41f9d4){const _0xa92581=a186_0x1c6d;let _0x3913fe=![],_0x45bd54=![];const _0x4915c8=[];for(const _0x40ddea of _0x1c9be5){if(isJsResource(_0x40ddea)){if(_0x41f9d4[_0xa92581(0x1d4)]&&!_0x3913fe)_0x4915c8[_0xa92581(0x193)](_0x41f9d4[_0xa92581(0x1d4)]),_0x3913fe=!![];else!_0x41f9d4['jsUrl']&&_0x4915c8['push'](_0x40ddea);continue;}if(isCssResource(_0x40ddea)){if(_0x41f9d4[_0xa92581(0x199)]&&!_0x45bd54)_0x4915c8['push'](_0x41f9d4['cssUrl']),_0x45bd54=!![];else!_0x41f9d4['cssUrl']&&_0x4915c8[_0xa92581(0x193)](_0x40ddea);continue;}_0x4915c8[_0xa92581(0x193)](_0x40ddea);}return _0x41f9d4['jsUrl']&&!_0x3913fe&&_0x4915c8[_0xa92581(0x1b1)](_0x41f9d4[_0xa92581(0x1d4)]),_0x41f9d4['cssUrl']&&!_0x45bd54&&_0x4915c8['push'](_0x41f9d4[_0xa92581(0x199)]),_0x4915c8;}function isJsResource(_0x20626f){const _0x2efee7=a186_0x1c6d;return stripQuery(_0x20626f)[_0x2efee7(0x1bf)]()[_0x2efee7(0x1a4)]('.js');}function a186_0x1c6d(_0xe0d9cd,_0x2e7117){_0xe0d9cd=_0xe0d9cd-0x18f;const _0x23669b=a186_0x2366();let _0x1c6d1a=_0x23669b[_0xe0d9cd];return _0x1c6d1a;}function isCssResource(_0x302082){const _0x568ba5=a186_0x1c6d;return stripQuery(_0x302082)[_0x568ba5(0x1bf)]()[_0x568ba5(0x1a4)](_0x568ba5(0x195));}function stripQuery(_0x439438){const _0x20e35a=a186_0x1c6d;return _0x439438[_0x20e35a(0x1b2)]('?')[0x0]??_0x439438;}function parseUpdateParamsFlag(_0x174dd9){const _0xc70072=a186_0x1c6d;if(!_0x174dd9||typeof _0x174dd9!==_0xc70072(0x1a0))return{};try{const _0x515bcb=JSON['parse'](_0x174dd9);if(typeof _0x515bcb!==_0xc70072(0x1cc)||_0x515bcb===null||Array[_0xc70072(0x191)](_0x515bcb))return{};return{'jsUrl':typeof _0x515bcb[_0xc70072(0x1d4)]===_0xc70072(0x1a0)?_0x515bcb[_0xc70072(0x1d4)][_0xc70072(0x19d)]():undefined,'cssUrl':typeof _0x515bcb['cssUrl']===_0xc70072(0x1a0)?_0x515bcb['cssUrl'][_0xc70072(0x19d)]():undefined};}catch{return{};}}
|
|
1
|
+
(function(_0x2413bc,_0x2a4124){const _0x5f0103=a186_0xc246,_0x1d40f6=_0x2413bc();while(!![]){try{const _0x1f3c95=-parseInt(_0x5f0103(0xcd))/0x1+parseInt(_0x5f0103(0xd1))/0x2+parseInt(_0x5f0103(0xd0))/0x3+parseInt(_0x5f0103(0xa5))/0x4+-parseInt(_0x5f0103(0xdd))/0x5*(parseInt(_0x5f0103(0xc6))/0x6)+parseInt(_0x5f0103(0xbd))/0x7+-parseInt(_0x5f0103(0xab))/0x8;if(_0x1f3c95===_0x2a4124)break;else _0x1d40f6['push'](_0x1d40f6['shift']());}catch(_0x281eb8){_0x1d40f6['push'](_0x1d40f6['shift']());}}}(a186_0x5568,0xa0fce));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a186_0xc246(_0x1a46b2,_0x3a780a){_0x1a46b2=_0x1a46b2-0xa2;const _0x5568c=a186_0x5568();let _0xc2463c=_0x5568c[_0x1a46b2];return _0xc2463c;}import{logger}from'../../../utils/logger.js';function validateParams(_0x207f07){const _0x3f2258=a186_0xc246,_0x167dd4=[];return _0x207f07[_0x3f2258(0xce)]&&!isValidJsHttpsUrl(_0x207f07[_0x3f2258(0xce)])&&_0x167dd4['push']({'field':'jsUrl','message':_0x3f2258(0xcc)}),_0x207f07[_0x3f2258(0xa8)]&&!isValidCssHttpsUrl(_0x207f07[_0x3f2258(0xa8)])&&_0x167dd4[_0x3f2258(0xbb)]({'field':_0x3f2258(0xa8),'message':_0x3f2258(0xcb)}),_0x167dd4;}export async function runMenuUpdateCore(_0x2c5b77,_0x44479f,_0x205613,_0x4d119b={}){const _0x25ff99=a186_0xc246,_0x4c42cb=parseUpdateParamsFlag(_0x205613),_0x505b4d=normalizeMode(_0x4d119b[_0x25ff99(0xd9)]);validateSelection(_0x4d119b['selection']);const _0x596f5d=[];if(_0x4c42cb[_0x25ff99(0xce)])_0x596f5d[_0x25ff99(0xbb)](_0x4c42cb[_0x25ff99(0xce)]);if(_0x4c42cb[_0x25ff99(0xa8)])_0x596f5d[_0x25ff99(0xbb)](_0x4c42cb['cssUrl']);const _0x2f03b6=validateParams(_0x4c42cb);if(_0x2f03b6[_0x25ff99(0xbc)]>0x0){const _0x12e754=_0x2f03b6['map'](_0x58ba34=>_0x25ff99(0xc7)+_0x58ba34['field']+':\x20'+_0x58ba34['message'])['join'](';\x20');throw new Error(_0x25ff99(0xb3)+_0x12e754);}if(_0x596f5d['length']===0x0)throw new Error(_0x25ff99(0xa2)+_0x25ff99(0xb1));logger[_0x25ff99(0xca)](process['cwd']()),logger[_0x25ff99(0xae)](_0x25ff99(0xe1),_0x25ff99(0xd4),{'appCode':_0x2c5b77,'jsUrl':_0x4c42cb[_0x25ff99(0xce)],'cssUrl':_0x4c42cb[_0x25ff99(0xa8)],'mode':_0x505b4d,'dryRun':_0x4d119b[_0x25ff99(0xb2)]===!![]});if(_0x4c42cb['jsUrl']){const _0x32a5b9=await isUrlReachable(_0x4c42cb[_0x25ff99(0xce)]);if(!_0x32a5b9)throw new Error(_0x25ff99(0xcf)+_0x4c42cb[_0x25ff99(0xce)]);}if(_0x4c42cb[_0x25ff99(0xa8)]){const _0x272e75=await isUrlReachable(_0x4c42cb[_0x25ff99(0xa8)]);if(!_0x272e75)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x4c42cb[_0x25ff99(0xa8)]);}const _0x5eba9e=await getOnlineMenuList(_0x2c5b77,_0x44479f),_0x122602=_0x5eba9e[_0x25ff99(0xdf)](_0x1baa44=>_0x1baa44[_0x25ff99(0xe4)]['length']>0x0),_0x2dfbab=selectMenusForUpdate(_0x122602,_0x4d119b[_0x25ff99(0xc1)]);if(_0x2dfbab['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x4d119b['dryRun']===!![]};const _0x3897ba=_0x2dfbab[_0x25ff99(0xad)](_0x27ecab=>buildMenuUpdateDiff(_0x27ecab,_0x4c42cb,_0x505b4d,_0x4d119b[_0x25ff99(0xc3)]===!![],_0x4d119b[_0x25ff99(0xaa)]));if(_0x4d119b['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x3897ba};const _0x50b5c4=await Promise[_0x25ff99(0xc9)](_0x2dfbab['map']((_0x34ae76,_0x5b4304)=>updateMenuCdnUrl(_0x2c5b77,_0x44479f,{'id':_0x34ae76['id'],'label':_0x34ae76['label'],'path':_0x34ae76[_0x25ff99(0xe2)],'resources':_0x3897ba[_0x5b4304][_0x25ff99(0xa7)][_0x25ff99(0xe4)],'extend':_0x34ae76['extend']??null,'loadScriptMode':_0x4d119b['loadScriptMode']}))),_0x4a19fb=_0x50b5c4[_0x25ff99(0xdf)](_0x542899=>_0x542899[_0x25ff99(0xb4)]===_0x25ff99(0xe0))[_0x25ff99(0xad)](_0x53b968=>_0x53b968['value']),_0x37a9f1=_0x50b5c4[_0x25ff99(0xdf)](_0x12d4c2=>_0x12d4c2[_0x25ff99(0xb4)]===_0x25ff99(0xd8))[_0x25ff99(0xbc)];return logger[_0x25ff99(0xae)](_0x25ff99(0xe1),_0x25ff99(0xa6),{'count':_0x2dfbab[_0x25ff99(0xbc)],'resources':_0x596f5d}),{'updated':_0x4a19fb[_0x25ff99(0xbc)],'failed':_0x37a9f1,'skipped':![],'menus':_0x4a19fb};}function validateSelection(_0x37a5d9){const _0x16eca1=a186_0xc246;if(!_0x37a5d9)throw new Error(_0x16eca1(0xb9));if(_0x37a5d9[_0x16eca1(0xac)]&&(_0x37a5d9[_0x16eca1(0xd5)][_0x16eca1(0xbc)]>0x0||_0x37a5d9['paths'][_0x16eca1(0xbc)]>0x0))throw new Error(_0x16eca1(0xa9));if(!_0x37a5d9[_0x16eca1(0xac)]&&_0x37a5d9[_0x16eca1(0xd5)]['length']===0x0&&_0x37a5d9[_0x16eca1(0xc5)]['length']===0x0)throw new Error(_0x16eca1(0xb9));}export function selectMenusForUpdate(_0x9c42d7,_0x28c2eb){const _0xc2a77f=a186_0xc246;validateSelection(_0x28c2eb);if(_0x28c2eb[_0xc2a77f(0xac)])return _0x9c42d7;const _0x51a758=new Set(_0x9c42d7[_0xc2a77f(0xad)](_0x1a9f9c=>_0x1a9f9c['id'])),_0x159628=new Set(_0x9c42d7[_0xc2a77f(0xad)](_0x503370=>_0x503370[_0xc2a77f(0xe2)])),_0x35f129=_0x28c2eb[_0xc2a77f(0xd5)]['filter'](_0x5cea5c=>!_0x51a758['has'](_0x5cea5c)),_0x4db505=_0x28c2eb[_0xc2a77f(0xc5)][_0xc2a77f(0xdf)](_0x1b24c8=>!_0x159628[_0xc2a77f(0xda)](_0x1b24c8));if(_0x35f129[_0xc2a77f(0xbc)]>0x0||_0x4db505['length']>0x0){const _0xea4d64=[..._0x35f129['map'](_0xa42ad5=>String(_0xa42ad5)),..._0x4db505]['join'](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0xea4d64);}const _0x576fe7=new Set(_0x28c2eb[_0xc2a77f(0xd5)]),_0x27aeaf=new Set(_0x28c2eb[_0xc2a77f(0xc5)]);return _0x9c42d7[_0xc2a77f(0xdf)](_0x146646=>_0x576fe7[_0xc2a77f(0xda)](_0x146646['id'])||_0x27aeaf['has'](_0x146646[_0xc2a77f(0xe2)]));}function normalizeMode(_0x5e828f){const _0x13d67e=a186_0xc246;if(!_0x5e828f)return _0x13d67e(0xe3);if(_0x5e828f===_0x13d67e(0xd7)||_0x5e828f===_0x13d67e(0xe3))return _0x5e828f;throw new Error(_0x13d67e(0xc4)+_0x5e828f+_0x13d67e(0xba));}function buildMenuUpdateDiff(_0x1f5419,_0x3ac8c6,_0x22e898,_0x296430,_0x52cf06){const _0x188c55=a186_0xc246,_0xedfa03=[..._0x1f5419[_0x188c55(0xe4)]];_0x22e898===_0x188c55(0xe3)&&assertUnambiguousPatchResources(_0x1f5419,_0xedfa03,_0x3ac8c6);const _0x47f2ff=_0x22e898===_0x188c55(0xe3)?patchResources(_0xedfa03,_0x3ac8c6):replaceResources(_0x3ac8c6),_0x496082=[],_0x2b1b89=_0xedfa03['some'](isJsResource),_0x534951=_0x47f2ff['some'](isJsResource);if(_0x2b1b89&&!_0x534951){const _0x167fc3=_0x188c55(0xdb)+_0x1f5419[_0x188c55(0xd6)]+_0x188c55(0xbe)+_0x1f5419[_0x188c55(0xe2)]+').\x20'+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x296430)throw new Error(_0x167fc3);_0x496082[_0x188c55(0xbb)](_0x167fc3);}const _0x19a16c=_0xedfa03[_0x188c55(0xb8)](isCssResource),_0x27f010=_0x47f2ff[_0x188c55(0xb8)](isCssResource);_0x19a16c&&!_0x27f010&&_0x496082[_0x188c55(0xbb)](_0x188c55(0xc8)+_0x1f5419[_0x188c55(0xd6)]+_0x188c55(0xbe)+_0x1f5419[_0x188c55(0xe2)]+').');const _0x4a54de=typeof _0x1f5419[_0x188c55(0xbf)]?.[_0x188c55(0xaa)]===_0x188c55(0xd3)?_0x1f5419[_0x188c55(0xbf)][_0x188c55(0xaa)]:null,_0x4d52dd=_0x52cf06?{'loadScriptMode':_0x4a54de}:{},_0x3eb557=_0x52cf06?{'loadScriptMode':_0x52cf06}:{};return{'id':_0x1f5419['id'],'label':_0x1f5419[_0x188c55(0xd6)],'path':_0x1f5419[_0x188c55(0xe2)],'mode':_0x22e898,'before':{'resources':_0xedfa03,..._0x4d52dd},'after':{'resources':_0x47f2ff,..._0x3eb557},'warnings':_0x496082};}function a186_0x5568(){const _0x720d3b=['menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','.\x20Allowed\x20values:\x20replace,\x20patch','push','length','4946669vPXuWm','\x22\x20(','extend','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','selection','menu\x20asset-update\x20cannot\x20patch\x20','force','Invalid\x20--mode:\x20','paths','36bphSjv','--params.','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','allSettled','setLogPath','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','254426ONSKUl','jsUrl','JS\x20URL\x20is\x20unreachable:\x20','1181100WduAbB','147322zBGdWc','\x20existing\x20CSS\x20resources\x20for\x20\x22','string','Start\x20non-interactive\x20menu\x20asset\x20update','menuIds','label','replace','rejected','mode','has','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','\x20existing\x20JS\x20resources\x20for\x20\x22','310610xBfNSY','trim','filter','fulfilled','menu-asset-update','path','patch','resources','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','endsWith','parse','4427668TVhRjC','Menu\x20asset\x20update\x20completed','after','cssUrl','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','loadScriptMode','7955048UdHIWD','all','map','info','isArray','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','dryRun','Invalid\x20--params:\x20','status','.css','toLowerCase','.js','some'];a186_0x5568=function(){return _0x720d3b;};return a186_0x5568();}function replaceResources(_0x56c4f0){const _0x14ad0d=a186_0xc246;return[_0x56c4f0[_0x14ad0d(0xce)],_0x56c4f0[_0x14ad0d(0xa8)]][_0x14ad0d(0xdf)](_0x3a8ab3=>!!_0x3a8ab3);}function assertUnambiguousPatchResources(_0x3e71cf,_0x49291e,_0x5dbbea){const _0x47ef59=a186_0xc246,_0x53863f=_0x49291e[_0x47ef59(0xdf)](isJsResource)[_0x47ef59(0xbc)];if(_0x5dbbea[_0x47ef59(0xce)]&&_0x53863f>0x1)throw new Error(_0x47ef59(0xc2)+_0x53863f+_0x47ef59(0xdc)+_0x3e71cf[_0x47ef59(0xd6)]+_0x47ef59(0xbe)+_0x3e71cf[_0x47ef59(0xe2)]+')\x20'+_0x47ef59(0xb0));const _0x1bdc33=_0x49291e['filter'](isCssResource)['length'];if(_0x5dbbea[_0x47ef59(0xa8)]&&_0x1bdc33>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x1bdc33+_0x47ef59(0xd2)+_0x3e71cf[_0x47ef59(0xd6)]+'\x22\x20('+_0x3e71cf[_0x47ef59(0xe2)]+')\x20'+_0x47ef59(0xc0));}function patchResources(_0x42760f,_0x32276f){const _0x3b0012=a186_0xc246;let _0x24d352=![],_0x212215=![];const _0x29437a=[];for(const _0x4e4aa0 of _0x42760f){if(isJsResource(_0x4e4aa0)){if(_0x32276f[_0x3b0012(0xce)]&&!_0x24d352)_0x29437a[_0x3b0012(0xbb)](_0x32276f[_0x3b0012(0xce)]),_0x24d352=!![];else!_0x32276f['jsUrl']&&_0x29437a['push'](_0x4e4aa0);continue;}if(isCssResource(_0x4e4aa0)){if(_0x32276f[_0x3b0012(0xa8)]&&!_0x212215)_0x29437a[_0x3b0012(0xbb)](_0x32276f['cssUrl']),_0x212215=!![];else!_0x32276f['cssUrl']&&_0x29437a[_0x3b0012(0xbb)](_0x4e4aa0);continue;}_0x29437a['push'](_0x4e4aa0);}return _0x32276f[_0x3b0012(0xce)]&&!_0x24d352&&_0x29437a['unshift'](_0x32276f[_0x3b0012(0xce)]),_0x32276f[_0x3b0012(0xa8)]&&!_0x212215&&_0x29437a[_0x3b0012(0xbb)](_0x32276f[_0x3b0012(0xa8)]),_0x29437a;}function isJsResource(_0x59b75d){const _0x25defe=a186_0xc246;return stripQuery(_0x59b75d)[_0x25defe(0xb6)]()[_0x25defe(0xa3)](_0x25defe(0xb7));}function isCssResource(_0x5ead66){const _0x1f04f5=a186_0xc246;return stripQuery(_0x5ead66)[_0x1f04f5(0xb6)]()[_0x1f04f5(0xa3)](_0x1f04f5(0xb5));}function stripQuery(_0x8720b0){return _0x8720b0['split']('?')[0x0]??_0x8720b0;}function parseUpdateParamsFlag(_0x178c5d){const _0x4e8b1e=a186_0xc246;if(!_0x178c5d||typeof _0x178c5d!==_0x4e8b1e(0xd3))return{};try{const _0x59d01b=JSON[_0x4e8b1e(0xa4)](_0x178c5d);if(typeof _0x59d01b!=='object'||_0x59d01b===null||Array[_0x4e8b1e(0xaf)](_0x59d01b))return{};return{'jsUrl':typeof _0x59d01b[_0x4e8b1e(0xce)]===_0x4e8b1e(0xd3)?_0x59d01b[_0x4e8b1e(0xce)][_0x4e8b1e(0xde)]():undefined,'cssUrl':typeof _0x59d01b['cssUrl']===_0x4e8b1e(0xd3)?_0x59d01b['cssUrl'][_0x4e8b1e(0xde)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4b2d98,_0x2dabf8){const _0x1f58db=a187_0x1576,_0x30409c=_0x4b2d98();while(!![]){try{const _0x336860=parseInt(_0x1f58db(0x1bd))/0x1+-parseInt(_0x1f58db(0x1b7))/0x2+parseInt(_0x1f58db(0x1b8))/0x3*(parseInt(_0x1f58db(0x1bf))/0x4)+-parseInt(_0x1f58db(0x1b6))/0x5*(parseInt(_0x1f58db(0x1be))/0x6)+parseInt(_0x1f58db(0x1b3))/0x7+-parseInt(_0x1f58db(0x1ba))/0x8+parseInt(_0x1f58db(0x1bb))/0x9*(parseInt(_0x1f58db(0x1b5))/0xa);if(_0x336860===_0x2dabf8)break;else _0x30409c['push'](_0x30409c['shift']());}catch(_0x5d1afd){_0x30409c['push'](_0x30409c['shift']());}}}(a187_0x512b,0x1ad79));export function isValidJsHttpsUrl(_0x58ebbf){const _0x32368a=a187_0x1576;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x58ebbf[_0x32368a(0x1bc)]());}function a187_0x1576(_0x4684f7,_0x3f63d3){_0x4684f7=_0x4684f7-0x1b3;const _0x512bb2=a187_0x512b();let _0x15768b=_0x512bb2[_0x4684f7];return _0x15768b;}export function isValidCssHttpsUrl(_0x45814a){const _0x53e73a=a187_0x1576;return/^https:\/\/.+\.css(\?.*)?$/[_0x53e73a(0x1b4)](_0x45814a[_0x53e73a(0x1bc)]());}function a187_0x512b(){const _0x3234c4=['386902twAxVE','9OwWCQn','cancel','1361656nbSBQc','18curLtB','trim','160287WQVuhB','438niCKjf','111412LduDWu','HEAD','body','bytes=0-0','GET','1218091Foxjtp','test','492610frVCdH','2930uRswnp'];a187_0x512b=function(){return _0x3234c4;};return a187_0x512b();}export async function isUrlReachable(_0x4ddebf){const _0x304d33=a187_0x1576;try{const _0x247b4b=await fetch(_0x4ddebf,{'method':_0x304d33(0x1c0)});if(_0x247b4b['ok'])return!![];}catch{}try{const _0x2253ea=await fetch(_0x4ddebf,{'method':_0x304d33(0x1c3),'headers':{'Range':_0x304d33(0x1c2)}}),_0x40b769=_0x2253ea['ok'];try{await _0x2253ea[_0x304d33(0x1c1)]?.[_0x304d33(0x1b9)]();}catch{}return _0x40b769;}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a188_0x284b9c=a188_0x175a;(function(_0x3ec123,_0x46b026){const _0x4b29a0=a188_0x175a,_0x15b749=_0x3ec123();while(!![]){try{const _0x2b45a1=parseInt(_0x4b29a0(0x1c5))/0x1+parseInt(_0x4b29a0(0x1c6))/0x2+parseInt(_0x4b29a0(0x1bf))/0x3+-parseInt(_0x4b29a0(0x1c1))/0x4+-parseInt(_0x4b29a0(0x1c7))/0x5*(parseInt(_0x4b29a0(0x1cb))/0x6)+parseInt(_0x4b29a0(0x1cc))/0x7+-parseInt(_0x4b29a0(0x1cd))/0x8;if(_0x2b45a1===_0x46b026)break;else _0x15b749['push'](_0x15b749['shift']());}catch(_0x2a65ef){_0x15b749['push'](_0x15b749['shift']());}}}(a188_0x26af,0x332bc));import{getSmartAppRecord}from'../../core/api-client.js';function a188_0x26af(){const _0x427900=['20208ZDZVeq','70oudjrK','all','menu','cookie','127056zNmbhS','1532720AYZFMb','201464pRCAtO','\x20in\x20menu\x20host\x20','Inspected\x20','boundMenus','1185177svcVNU','\x20menu(s)\x20for\x20','958356EsWhgC','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','subapp-assets-status','read','146709NYWKZg'];a188_0x26af=function(){return _0x427900;};return a188_0x26af();}function a188_0x175a(_0x246e62,_0x5cfc6c){_0x246e62=_0x246e62-0x1bc;const _0x26aff9=a188_0x26af();let _0x175ad5=_0x26aff9[_0x246e62];return _0x175ad5;}import{getOnlineMenuList}from'../../commands/menu/shared/service.js';import{buildSubappAssetsStatus,getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';export const menuSubappAssetsStatus={'service':a188_0x284b9c(0x1c9),'command':a188_0x284b9c(0x1c3),'description':a188_0x284b9c(0x1c2),'risk':a188_0x284b9c(0x1c4),'strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x38d104){getSubappSelector(_0x38d104);},async 'execute'(_0x8c824e){const _0x147ba1=a188_0x284b9c,{appCode:_0x2366ac,appName:_0x4963eb}=getSubappSelector(_0x8c824e),[_0x59c76e,_0x55f305]=await Promise[_0x147ba1(0x1c8)]([getSmartAppRecord(_0x2366ac,_0x8c824e[_0x147ba1(0x1ca)]),getOnlineMenuList(_0x2366ac,_0x8c824e[_0x147ba1(0x1ca)])]),_0x3e60a4={'appCode':_0x2366ac,...buildSubappAssetsStatus(_0x59c76e,_0x55f305,_0x4963eb)};return{'ok':!![],'data':_0x3e60a4,'message':_0x147ba1(0x1bd)+_0x3e60a4[_0x147ba1(0x1be)]+_0x147ba1(0x1c0)+_0x4963eb+_0x147ba1(0x1bc)+_0x2366ac+'.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a189_0x56793d=a189_0x4646;function a189_0x4646(_0x17750f,_0xa41640){_0x17750f=_0x17750f-0x80;const _0x5f4238=a189_0x5f42();let _0x464611=_0x5f4238[_0x17750f];return _0x464611;}(function(_0x56a256,_0x25d687){const _0x320b78=a189_0x4646,_0x3aaeba=_0x56a256();while(!![]){try{const _0x2053c7=-parseInt(_0x320b78(0x80))/0x1+parseInt(_0x320b78(0x81))/0x2*(-parseInt(_0x320b78(0xb6))/0x3)+-parseInt(_0x320b78(0xc6))/0x4*(parseInt(_0x320b78(0xc2))/0x5)+parseInt(_0x320b78(0x9d))/0x6+parseInt(_0x320b78(0xb3))/0x7*(parseInt(_0x320b78(0xbb))/0x8)+parseInt(_0x320b78(0xbe))/0x9*(parseInt(_0x320b78(0xa2))/0xa)+parseInt(_0x320b78(0x85))/0xb;if(_0x2053c7===_0x25d687)break;else _0x3aaeba['push'](_0x3aaeba['shift']());}catch(_0x1aeb2d){_0x3aaeba['push'](_0x3aaeba['shift']());}}}(a189_0x5f42,0xcc890));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set(['skinColor',a189_0x56793d(0xba),'accessKey',a189_0x56793d(0x9a),a189_0x56793d(0xaa),a189_0x56793d(0xa1),a189_0x56793d(0xb8),'enableAutoSync',a189_0x56793d(0xb7),a189_0x56793d(0x98)]);function a189_0x5f42(){const _0x58f1bc=['App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.','1396609jpQcfx','1038kflJFw','object','apiError','Updated\x20shared\x20resources\x20for\x20','9306066aatSGv','Unknown\x20app.extend\x20fields:\x20','before','length','entries','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','digest','resources','subapp-assets-update','unchanged',';\x20found\x20','appPublishStatus','.\x20Refusing\x20update.','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','test','expected-hash','map','isArray','string','directDbEnabled','parse','assets','Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','POST','1982094VDVzuK','filter','isSafeInteger','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','enableSample','2819150bLbxnS','trim','Would\x20update\x20shared\x20assets\x20for\x20','\x20must\x20be\x20a\x20JSON\x20array.','cookie','stringify','has','some','tenantColumn','write','resources[','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','sha256','not\x20HTTPS','https:','\x20must\x20be\x20a\x20JSON\x20object.','menu','147HJsWcK','--resources\x20is\x20required.','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','3273SrqQuv','directDbId','vipDeploy','Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','enableOpenApi','580664UiwYQd','nextExtend','\x20contains\x20invalid\x20JSON.','9WKkzHK','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.','verified\x20app.extend','extend','909495wYHovP','update','validation','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','4nAqgFw','/smartapi/app/update','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20','str','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','protocol','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.'];a189_0x5f42=function(){return _0x58f1bc;};return a189_0x5f42();}function parseObject(_0x28e052,_0x207321){const _0x3dceda=a189_0x56793d;let _0x56231f=_0x28e052;if(typeof _0x28e052===_0x3dceda(0x97))try{_0x56231f=JSON[_0x3dceda(0x99)](_0x28e052);}catch{throw CliErrors['validation'](_0x207321+_0x3dceda(0xbd));}if(!_0x56231f||typeof _0x56231f!==_0x3dceda(0x82)||Array[_0x3dceda(0x96)](_0x56231f))throw CliErrors['validation'](_0x207321+_0x3dceda(0xb1));return _0x56231f;}function parseArray(_0x5eba91,_0x21bf06){const _0x2d2d8e=a189_0x56793d;let _0x24b0c8;try{_0x24b0c8=JSON[_0x2d2d8e(0x99)](_0x5eba91);}catch{throw CliErrors[_0x2d2d8e(0xc4)](_0x21bf06+_0x2d2d8e(0xbd));}if(!Array[_0x2d2d8e(0x96)](_0x24b0c8))throw CliErrors[_0x2d2d8e(0xc4)](_0x21bf06+_0x2d2d8e(0xa5));return _0x24b0c8[_0x2d2d8e(0x95)]((_0x2a54aa,_0x370024)=>parseObject(_0x2a54aa,_0x21bf06+'['+_0x370024+']'));}function validateResources(_0x3e88bf){const _0x5819f1=a189_0x56793d;if(_0x3e88bf['length']===0x0)throw CliErrors[_0x5819f1(0xc4)](_0x5819f1(0xb5));for(const [_0x326245,_0x592f90]of _0x3e88bf[_0x5819f1(0x89)]()){if(typeof _0x592f90!==_0x5819f1(0x97))throw CliErrors['validation'](_0x5819f1(0xac)+_0x326245+']\x20must\x20be\x20a\x20URL\x20string.');try{if(new URL(_0x592f90)[_0x5819f1(0xcb)]!==_0x5819f1(0xb0))throw new Error(_0x5819f1(0xaf));}catch{throw CliErrors[_0x5819f1(0xc4)](_0x5819f1(0xac)+_0x326245+']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.');}}if(new Set(_0x3e88bf)['size']!==_0x3e88bf[_0x5819f1(0x88)]||!_0x3e88bf[_0x5819f1(0xa9)](_0x3d742f=>/\.m?js(?:[?#]|$)/i[_0x5819f1(0x93)](_0x3d742f)))throw CliErrors[_0x5819f1(0xc4)](_0x5819f1(0xc5));return _0x3e88bf;}function prepare(_0x37f1ed,_0x3c8d07,_0xe69cf5){const _0xba18f1=a189_0x56793d;if(!Number[_0xba18f1(0x9f)](_0x37f1ed['id'])||(_0x37f1ed['id']??0x0)<=0x0||typeof _0x37f1ed[_0xba18f1(0x90)]!=='string'||!_0x37f1ed[_0xba18f1(0x90)])throw CliErrors[_0xba18f1(0xc4)](_0xba18f1(0xcc));const _0x46fb1a=parseObject(_0x37f1ed[_0xba18f1(0xc1)],'app.extend'),_0x4526df=Object['keys'](_0x46fb1a)[_0xba18f1(0x9e)](_0x186b3f=>!KNOWN_EXTEND_KEYS[_0xba18f1(0xa8)](_0x186b3f));if(_0x4526df[_0xba18f1(0x88)])throw CliErrors['validation'](_0xba18f1(0x86)+_0x4526df['join'](',\x20')+_0xba18f1(0x91));if(typeof _0x46fb1a[_0xba18f1(0x9a)]!==_0xba18f1(0x97))throw CliErrors[_0xba18f1(0xc4)](_0xba18f1(0x8a));const _0x2f32fd=parseArray(_0x46fb1a[_0xba18f1(0x9a)],'app.extend.assets'),_0x279658=_0x2f32fd[_0xba18f1(0x9e)](_0x12fda9=>_0x12fda9['appName']===_0x3c8d07);if(_0x279658[_0xba18f1(0x88)]!==0x1)throw CliErrors[_0xba18f1(0xc4)](_0xba18f1(0xc8)+_0x3c8d07+_0xba18f1(0x8f)+_0x279658[_0xba18f1(0x88)]+'.');const _0x26e81b=_0x279658[0x0];if(typeof _0x26e81b[_0xba18f1(0x8c)]!==_0xba18f1(0x97))throw CliErrors[_0xba18f1(0xc4)](_0xba18f1(0xca));let _0x5b0005;try{_0x5b0005=JSON['parse'](_0x26e81b['resources']);}catch{throw CliErrors['validation'](_0xba18f1(0xad));}if(!Array[_0xba18f1(0x96)](_0x5b0005)||_0x5b0005['some'](_0x3a87be=>typeof _0x3a87be!==_0xba18f1(0x97)))throw CliErrors[_0xba18f1(0xc4)](_0xba18f1(0x92));const _0x4912d2=_0x2f32fd[_0xba18f1(0x95)](_0x463255=>_0x463255===_0x26e81b?{..._0x463255,'resources':JSON[_0xba18f1(0xa7)](_0xe69cf5)}:_0x463255),_0x57089f={..._0x46fb1a,'assets':JSON[_0xba18f1(0xa7)](_0x4912d2)},_0x11f403=createHash(_0xba18f1(0xae))[_0xba18f1(0xc3)](JSON['stringify']({'appCode':_0x37f1ed['appCode'],'id':_0x37f1ed['id'],'appPublishStatus':_0x37f1ed[_0xba18f1(0x90)],'extend':_0x46fb1a,'appName':_0x3c8d07,'resources':_0xe69cf5}))[_0xba18f1(0x8b)]('hex');return{'before':_0x5b0005,'nextExtend':_0x57089f,'expectedHash':_0x11f403,'unchanged':isDeepStrictEqual(_0x5b0005,_0xe69cf5)};}function flags(_0x5dd20b){const _0x5e5ae1=a189_0x56793d,{appCode:_0xc1ad14,appName:_0x40f230}=getSubappSelector(_0x5dd20b),_0x117cf6=_0x5dd20b[_0x5e5ae1(0xc9)](_0x5e5ae1(0x8c))[_0x5e5ae1(0xa3)]();if(!_0x117cf6)throw CliErrors[_0x5e5ae1(0xc4)](_0x5e5ae1(0xb4));let _0x5b2178;try{_0x5b2178=JSON[_0x5e5ae1(0x99)](_0x117cf6);}catch{throw CliErrors['validation'](_0x5e5ae1(0xa0));}if(!Array[_0x5e5ae1(0x96)](_0x5b2178))throw CliErrors['validation'](_0x5e5ae1(0xa0));return{'appCode':_0xc1ad14,'appName':_0x40f230,'resources':validateResources(_0x5b2178)};}export const menuSubappAssetsUpdate={'service':a189_0x56793d(0xb2),'command':a189_0x56793d(0x8d),'description':a189_0x56793d(0x9b),'risk':a189_0x56793d(0xab),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a189_0x56793d(0x8c),'type':'string','required':!![],'description':'JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs'},{'name':a189_0x56793d(0x94),'type':a189_0x56793d(0x97),'description':a189_0x56793d(0xb9)}],async 'validate'(_0x3f7e54){flags(_0x3f7e54);},async 'dryRun'(_0x2d7d35){const _0x5f51fa=a189_0x56793d,{appCode:_0x2f89c6,appName:_0x5b9d8c,resources:_0xf0766e}=flags(_0x2d7d35),_0x4a5801=await getSmartAppRecord(_0x2f89c6,_0x2d7d35['cookie']),_0x24a1ce=prepare(_0x4a5801,_0x5b9d8c,_0xf0766e);return{'method':_0x5f51fa(0x9c),'url':_0x5f51fa(0xc7),'body':{'preview':{'appCode':_0x2f89c6,'appName':_0x5b9d8c,'before':_0x24a1ce[_0x5f51fa(0x87)],'after':_0xf0766e,'expectedHash':_0x24a1ce['expectedHash'],'unchanged':_0x24a1ce[_0x5f51fa(0x8e)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x24a1ce['unchanged']?_0x5f51fa(0xbf):_0x5f51fa(0xa4)+_0x5b9d8c+'.'};},async 'execute'(_0x181360){const _0x10ca66=a189_0x56793d,{appCode:_0x552de8,appName:_0x1303d2,resources:_0x22e08a}=flags(_0x181360),_0x4c611f=_0x181360['str'](_0x10ca66(0x94))['trim']();if(!/^[a-f0-9]{64}$/i[_0x10ca66(0x93)](_0x4c611f))throw CliErrors[_0x10ca66(0xc4)]('--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.');const _0x190084=await getSmartAppRecord(_0x552de8,_0x181360[_0x10ca66(0xa6)]),_0x560024=prepare(_0x190084,_0x1303d2,_0x22e08a);if(_0x4c611f!==_0x560024['expectedHash'])throw CliErrors['validation'](_0x10ca66(0xcd));if(_0x560024['unchanged'])return{'ok':!![],'data':{'appCode':_0x552de8,'appName':_0x1303d2,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':'Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.'};await updateSmartAppRecord({'id':_0x190084['id'],'appCode':_0x552de8,'appPublishStatus':_0x190084[_0x10ca66(0x90)],'extend':_0x560024[_0x10ca66(0xbc)]},_0x181360[_0x10ca66(0xa6)]);const _0x1efa3c=await getSmartAppRecord(_0x552de8,_0x181360['cookie']),_0x5ae52c=parseObject(_0x1efa3c[_0x10ca66(0xc1)],_0x10ca66(0xc0));if(_0x1efa3c['id']!==_0x190084['id']||_0x1efa3c[_0x10ca66(0x90)]!==_0x190084[_0x10ca66(0x90)]||!isDeepStrictEqual(_0x5ae52c,_0x560024[_0x10ca66(0xbc)]))throw CliErrors[_0x10ca66(0x83)]('App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.');return{'ok':!![],'data':{'appCode':_0x552de8,'appName':_0x1303d2,'updated':!![],'resources':_0x22e08a,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x10ca66(0x84)+_0x1303d2+'\x20in\x20menu\x20host\x20'+_0x552de8+';\x20independent\x20deployment\x20not\x20verified.'};}};
|
|
1
|
+
const a189_0x4c80e2=a189_0x33e8;(function(_0x4568f6,_0x1aeb2b){const _0x1955f0=a189_0x33e8,_0x411963=_0x4568f6();while(!![]){try{const _0x1a0985=-parseInt(_0x1955f0(0x122))/0x1*(parseInt(_0x1955f0(0x136))/0x2)+parseInt(_0x1955f0(0x137))/0x3*(parseInt(_0x1955f0(0x13d))/0x4)+-parseInt(_0x1955f0(0x14e))/0x5*(-parseInt(_0x1955f0(0x14c))/0x6)+-parseInt(_0x1955f0(0x14d))/0x7*(-parseInt(_0x1955f0(0x13a))/0x8)+parseInt(_0x1955f0(0x160))/0x9*(parseInt(_0x1955f0(0x169))/0xa)+parseInt(_0x1955f0(0x139))/0xb*(-parseInt(_0x1955f0(0x154))/0xc)+-parseInt(_0x1955f0(0x11f))/0xd;if(_0x1a0985===_0x1aeb2b)break;else _0x411963['push'](_0x411963['shift']());}catch(_0x3328e8){_0x411963['push'](_0x411963['shift']());}}}(a189_0xc204,0x54756));import{createHash}from'node:crypto';function a189_0xc204(){const _0x4375a9=['1496560vvbiFn','Updated\x20shared\x20resources\x20for\x20','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','152443cJzWAs','appCode','length','assets','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20','cookie','size','\x20in\x20menu\x20host\x20','not\x20HTTPS','subapp-assets-update','\x20contains\x20invalid\x20JSON.','directDbEnabled','app.extend.assets','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','str','/smartapi/app/update','directDbId','sha256','tenantColumn','unchanged','4bmdcpB','3dgracy','appPublishStatus','484979ajfqcU','3048OxQpVh','Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.','2063140JzWnqL','map','join','isSafeInteger','test','accessKey','validation','before','enableOpenApi','filter','nextExtend','string','extend','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','25278lqgEfO','4795PsFAek','5TurFgB','expected-hash','App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.','app.extend','\x20must\x20be\x20a\x20JSON\x20array.','enableAutoSync','24kRLvTX','Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','\x20must\x20be\x20a\x20JSON\x20object.','https:','.\x20Refusing\x20update.','apiError','resources',']\x20must\x20be\x20a\x20URL\x20string.','resources[','--resources\x20is\x20required.','POST','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','729dGxKXe','JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs','enableSample','trim','keys','digest','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','isArray','verified\x20app.extend','9030TZEuuy','appName','menu','parse','expectedHash',']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.','hex','skinColor','stringify'];a189_0xc204=function(){return _0x4375a9;};return a189_0xc204();}import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set([a189_0x4c80e2(0x11d),a189_0x4c80e2(0x145),a189_0x4c80e2(0x142),'assets',a189_0x4c80e2(0x134),a189_0x4c80e2(0x162),'vipDeploy',a189_0x4c80e2(0x153),a189_0x4c80e2(0x132),a189_0x4c80e2(0x12d)]);function a189_0x33e8(_0x46bcf0,_0x464665){_0x46bcf0=_0x46bcf0-0x11b;const _0xc204c5=a189_0xc204();let _0x33e8e3=_0xc204c5[_0x46bcf0];return _0x33e8e3;}function parseObject(_0x19a3b2,_0x5ee42d){const _0x317b4f=a189_0x4c80e2;let _0x1bc2cb=_0x19a3b2;if(typeof _0x19a3b2==='string')try{_0x1bc2cb=JSON[_0x317b4f(0x16c)](_0x19a3b2);}catch{throw CliErrors[_0x317b4f(0x143)](_0x5ee42d+_0x317b4f(0x12c));}if(!_0x1bc2cb||typeof _0x1bc2cb!=='object'||Array['isArray'](_0x1bc2cb))throw CliErrors['validation'](_0x5ee42d+_0x317b4f(0x156));return _0x1bc2cb;}function parseArray(_0x2932a2,_0x50f449){const _0x355dc7=a189_0x4c80e2;let _0x34bd52;try{_0x34bd52=JSON[_0x355dc7(0x16c)](_0x2932a2);}catch{throw CliErrors[_0x355dc7(0x143)](_0x50f449+_0x355dc7(0x12c));}if(!Array[_0x355dc7(0x167)](_0x34bd52))throw CliErrors[_0x355dc7(0x143)](_0x50f449+_0x355dc7(0x152));return _0x34bd52['map']((_0x355300,_0x5e0e70)=>parseObject(_0x355300,_0x50f449+'['+_0x5e0e70+']'));}function validateResources(_0x145071){const _0x5cd934=a189_0x4c80e2;if(_0x145071[_0x5cd934(0x124)]===0x0)throw CliErrors['validation'](_0x5cd934(0x12f));for(const [_0x378946,_0x46b405]of _0x145071['entries']()){if(typeof _0x46b405!==_0x5cd934(0x148))throw CliErrors[_0x5cd934(0x143)](_0x5cd934(0x15c)+_0x378946+_0x5cd934(0x15b));try{if(new URL(_0x46b405)['protocol']!==_0x5cd934(0x157))throw new Error(_0x5cd934(0x12a));}catch{throw CliErrors[_0x5cd934(0x143)]('resources['+_0x378946+_0x5cd934(0x11b));}}if(new Set(_0x145071)[_0x5cd934(0x128)]!==_0x145071[_0x5cd934(0x124)]||!_0x145071['some'](_0x4f0560=>/\.m?js(?:[?#]|$)/i[_0x5cd934(0x141)](_0x4f0560)))throw CliErrors['validation'](_0x5cd934(0x14a));return _0x145071;}function prepare(_0x5cc57b,_0x349e2d,_0xab59fb){const _0x3e890d=a189_0x4c80e2;if(!Number[_0x3e890d(0x140)](_0x5cc57b['id'])||(_0x5cc57b['id']??0x0)<=0x0||typeof _0x5cc57b[_0x3e890d(0x138)]!=='string'||!_0x5cc57b[_0x3e890d(0x138)])throw CliErrors[_0x3e890d(0x143)](_0x3e890d(0x14b));const _0x36426b=parseObject(_0x5cc57b[_0x3e890d(0x149)],_0x3e890d(0x151)),_0x414ea8=Object[_0x3e890d(0x164)](_0x36426b)[_0x3e890d(0x146)](_0x7e5fc1=>!KNOWN_EXTEND_KEYS['has'](_0x7e5fc1));if(_0x414ea8[_0x3e890d(0x124)])throw CliErrors[_0x3e890d(0x143)]('Unknown\x20app.extend\x20fields:\x20'+_0x414ea8[_0x3e890d(0x13f)](',\x20')+_0x3e890d(0x158));if(typeof _0x36426b[_0x3e890d(0x125)]!==_0x3e890d(0x148))throw CliErrors[_0x3e890d(0x143)](_0x3e890d(0x166));const _0x1d7310=parseArray(_0x36426b[_0x3e890d(0x125)],_0x3e890d(0x12e)),_0x598e0a=_0x1d7310['filter'](_0x390714=>_0x390714[_0x3e890d(0x16a)]===_0x349e2d);if(_0x598e0a[_0x3e890d(0x124)]!==0x1)throw CliErrors['validation'](_0x3e890d(0x126)+_0x349e2d+';\x20found\x20'+_0x598e0a[_0x3e890d(0x124)]+'.');const _0x30e0ec=_0x598e0a[0x0];if(typeof _0x30e0ec[_0x3e890d(0x15a)]!=='string')throw CliErrors['validation']('Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.');let _0x551a6c;try{_0x551a6c=JSON[_0x3e890d(0x16c)](_0x30e0ec['resources']);}catch{throw CliErrors[_0x3e890d(0x143)]('Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.');}if(!Array[_0x3e890d(0x167)](_0x551a6c)||_0x551a6c['some'](_0x515ffd=>typeof _0x515ffd!=='string'))throw CliErrors[_0x3e890d(0x143)](_0x3e890d(0x15f));const _0x301c7d=_0x1d7310[_0x3e890d(0x13e)](_0x3c5b04=>_0x3c5b04===_0x30e0ec?{..._0x3c5b04,'resources':JSON[_0x3e890d(0x11e)](_0xab59fb)}:_0x3c5b04),_0x1856bc={..._0x36426b,'assets':JSON[_0x3e890d(0x11e)](_0x301c7d)},_0x46f90a=createHash(_0x3e890d(0x133))['update'](JSON[_0x3e890d(0x11e)]({'appCode':_0x5cc57b[_0x3e890d(0x123)],'id':_0x5cc57b['id'],'appPublishStatus':_0x5cc57b[_0x3e890d(0x138)],'extend':_0x36426b,'appName':_0x349e2d,'resources':_0xab59fb}))[_0x3e890d(0x165)](_0x3e890d(0x11c));return{'before':_0x551a6c,'nextExtend':_0x1856bc,'expectedHash':_0x46f90a,'unchanged':isDeepStrictEqual(_0x551a6c,_0xab59fb)};}function flags(_0x5164fd){const _0x7a4dbc=a189_0x4c80e2,{appCode:_0x1b11bf,appName:_0x40a1ba}=getSubappSelector(_0x5164fd),_0xfdd430=_0x5164fd[_0x7a4dbc(0x130)](_0x7a4dbc(0x15a))['trim']();if(!_0xfdd430)throw CliErrors[_0x7a4dbc(0x143)](_0x7a4dbc(0x15d));let _0x308577;try{_0x308577=JSON['parse'](_0xfdd430);}catch{throw CliErrors['validation']('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');}if(!Array[_0x7a4dbc(0x167)](_0x308577))throw CliErrors['validation'](_0x7a4dbc(0x121));return{'appCode':_0x1b11bf,'appName':_0x40a1ba,'resources':validateResources(_0x308577)};}export const menuSubappAssetsUpdate={'service':a189_0x4c80e2(0x16b),'command':a189_0x4c80e2(0x12b),'description':a189_0x4c80e2(0x13b),'risk':'write','strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a189_0x4c80e2(0x15a),'type':a189_0x4c80e2(0x148),'required':!![],'description':a189_0x4c80e2(0x161)},{'name':a189_0x4c80e2(0x14f),'type':a189_0x4c80e2(0x148),'description':a189_0x4c80e2(0x155)}],async 'validate'(_0x37e07b){flags(_0x37e07b);},async 'dryRun'(_0x41695d){const _0x14bf33=a189_0x4c80e2,{appCode:_0x117d80,appName:_0x588c17,resources:_0x37bba2}=flags(_0x41695d),_0x5450c1=await getSmartAppRecord(_0x117d80,_0x41695d[_0x14bf33(0x127)]),_0x2e6441=prepare(_0x5450c1,_0x588c17,_0x37bba2);return{'method':_0x14bf33(0x15e),'url':_0x14bf33(0x131),'body':{'preview':{'appCode':_0x117d80,'appName':_0x588c17,'before':_0x2e6441[_0x14bf33(0x144)],'after':_0x37bba2,'expectedHash':_0x2e6441[_0x14bf33(0x16d)],'unchanged':_0x2e6441[_0x14bf33(0x135)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x2e6441[_0x14bf33(0x135)]?'Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.':'Would\x20update\x20shared\x20assets\x20for\x20'+_0x588c17+'.'};},async 'execute'(_0x380658){const _0x2f27de=a189_0x4c80e2,{appCode:_0x5275a0,appName:_0x1dc2e1,resources:_0x83826a}=flags(_0x380658),_0x2ddec2=_0x380658['str']('expected-hash')[_0x2f27de(0x163)]();if(!/^[a-f0-9]{64}$/i[_0x2f27de(0x141)](_0x2ddec2))throw CliErrors[_0x2f27de(0x143)]('--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.');const _0x395a37=await getSmartAppRecord(_0x5275a0,_0x380658[_0x2f27de(0x127)]),_0x2ef37a=prepare(_0x395a37,_0x1dc2e1,_0x83826a);if(_0x2ddec2!==_0x2ef37a[_0x2f27de(0x16d)])throw CliErrors[_0x2f27de(0x143)](_0x2f27de(0x150));if(_0x2ef37a['unchanged'])return{'ok':!![],'data':{'appCode':_0x5275a0,'appName':_0x1dc2e1,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':'Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.'};await updateSmartAppRecord({'id':_0x395a37['id'],'appCode':_0x5275a0,'appPublishStatus':_0x395a37[_0x2f27de(0x138)],'extend':_0x2ef37a[_0x2f27de(0x147)]},_0x380658[_0x2f27de(0x127)]);const _0x3a5061=await getSmartAppRecord(_0x5275a0,_0x380658[_0x2f27de(0x127)]),_0x5f2c39=parseObject(_0x3a5061['extend'],_0x2f27de(0x168));if(_0x3a5061['id']!==_0x395a37['id']||_0x3a5061[_0x2f27de(0x138)]!==_0x395a37[_0x2f27de(0x138)]||!isDeepStrictEqual(_0x5f2c39,_0x2ef37a[_0x2f27de(0x147)]))throw CliErrors[_0x2f27de(0x159)](_0x2f27de(0x13c));return{'ok':!![],'data':{'appCode':_0x5275a0,'appName':_0x1dc2e1,'updated':!![],'resources':_0x83826a,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x2f27de(0x120)+_0x1dc2e1+_0x2f27de(0x129)+_0x5275a0+';\x20independent\x20deployment\x20not\x20verified.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a190_0x4fff8d=a190_0x2a18;(function(_0x251311,_0x28be52){const _0x35c61f=a190_0x2a18,_0x12220b=_0x251311();while(!![]){try{const _0xd2d6d4=parseInt(_0x35c61f(0xdf))/0x1*(parseInt(_0x35c61f(0xfc))/0x2)+parseInt(_0x35c61f(0xf9))/0x3*(-parseInt(_0x35c61f(0xeb))/0x4)+-parseInt(_0x35c61f(0x10c))/0x5*(-parseInt(_0x35c61f(0x122))/0x6)+parseInt(_0x35c61f(0xe6))/0x7+parseInt(_0x35c61f(0x128))/0x8+parseInt(_0x35c61f(0x109))/0x9+-parseInt(_0x35c61f(0x119))/0xa;if(_0xd2d6d4===_0x28be52)break;else _0x12220b['push'](_0x12220b['shift']());}catch(_0x2517d8){_0x12220b['push'](_0x12220b['shift']());}}}(a190_0xfd96,0x76fe8));function a190_0x2a18(_0x685202,_0x371b9f){_0x685202=_0x685202-0xdd;const _0xfd96b1=a190_0xfd96();let _0x2a18f3=_0xfd96b1[_0x685202];return _0x2a18f3;}import a190_0x3fb286 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';function a190_0xfd96(){const _0x4f8f26=['13263210xvhDBB','string','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','validation','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','\x20\x20✓\x20Selected:\x20','Menu\x20sync\x20skipped','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','534nsUXJr','selectedAppName','onlinePaths','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','gray','trim','5553752UcMnsU','\x20page(s)','message','15422sewoHQ','\x20menu(s)...','onlineMenuList','Would\x20create\x20','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','failed','rawFlags','496153NCxRZx','cyan','\x20failed.','Menu\x20creation\x20failed','appCode','12ALnQqR','created','str','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','\x20\x20Create\x20','filter','\x20created.','localPages','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','boolean','paths','Register\x20local\x20pages\x20as\x20platform\x20menus','jsUrl','209130NPErRG','map','Online\x20menu\x20list\x20fetched','2VYfqmU','\x20and\x20CSS:\x20','size','\x20local\x20microfrontend\x20menu(s).','params','Created\x20','write','\x20created,\x20','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Creating\x20','cookie','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','length','8242110UmhBvH','Failed\x20to\x20fetch\x20online\x20menu\x20list','skipped','18345qsbXtg','menu','sync','POST','appName','Fetching\x20online\x20menu\x20list...','Menu\x20sync\x20completed:\x20','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','cssUrl','/smartapi/menu/create','flag','targetPages','\x20\x20Cancelled.'];a190_0xfd96=function(){return _0x4f8f26;};return a190_0xfd96();}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':a190_0x4fff8d(0x10d),'command':a190_0x4fff8d(0x10e),'description':a190_0x4fff8d(0xf7),'risk':a190_0x4fff8d(0x102),'flags':[{'name':a190_0x4fff8d(0x100),'type':a190_0x4fff8d(0x11a),'description':a190_0x4fff8d(0xf4)+a190_0x4fff8d(0x11b)},{'name':a190_0x4fff8d(0xf6),'type':a190_0x4fff8d(0x11a),'description':a190_0x4fff8d(0x104)},{'name':'yes','type':a190_0x4fff8d(0xf5),'description':a190_0x4fff8d(0xe3)}],async 'dryRun'(_0x448cc0){const _0x1703ba=a190_0x4fff8d;ensureRunnableContext(_0x448cc0[_0x1703ba(0xe5)],_0x448cc0[_0x1703ba(0x123)]);const _0x3918ec=await runMenuSyncCore(_0x448cc0[_0x1703ba(0xea)],_0x448cc0[_0x1703ba(0x106)],parsePaths(_0x448cc0[_0x1703ba(0xed)](_0x1703ba(0xf6))),_0x448cc0[_0x1703ba(0xed)](_0x1703ba(0x100)),{'dryRun':!![]});return{'method':_0x1703ba(0x10f),'url':_0x1703ba(0x115),'body':_0x3918ec,'description':_0x3918ec[_0x1703ba(0x10b)]?_0x1703ba(0xee):_0x1703ba(0xe2)+_0x3918ec[_0x1703ba(0x117)][_0x1703ba(0x108)]+_0x1703ba(0xff)};},async 'execute'(_0x1b430f){const _0x5a9957=a190_0x4fff8d;ensureRunnableContext(_0x1b430f[_0x5a9957(0xe5)],_0x1b430f[_0x5a9957(0x123)]);const _0x20b06a=_0x1b430f[_0x5a9957(0x116)]('yes'),_0x2c4f28=_0x1b430f['str'](_0x5a9957(0x100)),_0x39b970=parsePaths(_0x1b430f['str'](_0x5a9957(0xf6))),_0x4ac77b=parseMenuSyncParams(_0x2c4f28);if(_0x20b06a){const _0x5cdc72=await runMenuSyncCore(_0x1b430f['appCode'],_0x1b430f[_0x5a9957(0x106)],_0x39b970,_0x2c4f28);if(_0x5cdc72[_0x5a9957(0x10b)]){const _0x108950=getLocalPages();_0x108950[_0x5a9957(0x108)]===0x0?writeCliSideChannelLine(_0x5a9957(0x107)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x5cdc72['created']+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x5cdc72,'message':_0x5cdc72[_0x5a9957(0x10b)]?_0x5a9957(0x11f):_0x5a9957(0x112)+_0x5cdc72[_0x5a9957(0xec)]+_0x5a9957(0xf2)};}if(_0x39b970['length']>0x0)throw CliErrors[_0x5a9957(0x11c)](_0x5a9957(0x121),_0x5a9957(0x113));if(!isInteractive()&&_0x2c4f28)throw CliErrors[_0x5a9957(0x11c)](_0x5a9957(0x125),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');requireInteractive(),writeCliSideChannelLine(_0x5a9957(0x120));const _0x56e968=startSpinner(_0x5a9957(0x111));let _0x262ee6,_0x1e9bd,_0x44f8cf;try{const _0x340a05=await fetchMenuData(_0x1b430f['appCode'],_0x1b430f[_0x5a9957(0x106)]);_0x262ee6=_0x340a05[_0x5a9957(0xf3)],_0x1e9bd=_0x340a05[_0x5a9957(0x124)],_0x44f8cf=_0x340a05[_0x5a9957(0xe1)],stopSpinner(_0x56e968,_0x5a9957(0xfb),!![]);}catch(_0xed0dc9){stopSpinner(_0x56e968,_0x5a9957(0x10a),![]);throw CliErrors['validation'](_0xed0dc9 instanceof Error?_0xed0dc9[_0x5a9957(0xde)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x262ee6[_0x5a9957(0x108)]===0x0)return writeCliSideChannelLine(a190_0x3fb286['yellow'](_0x5a9957(0x11d))),{'ok':!![]};const _0x4944c4=buildCompareRows(_0x262ee6,_0x1e9bd);writeCliSideChannelLine(renderCompareTable(_0x4944c4)),writeCliSideChannelLine('');const _0x4d3e33=await selectPages(_0x262ee6,_0x1e9bd);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0x3fb286[_0x5a9957(0xe7)](_0x5a9957(0x11e)+_0x4d3e33[_0x5a9957(0x108)]+_0x5a9957(0xdd)));const _0x4e84a8=_0x4ac77b[_0x5a9957(0xf8)]&&_0x4ac77b[_0x5a9957(0x114)];if(!_0x4e84a8){writeCliSideChannelLine(renderSyncSummary(_0x4d3e33,_0x1e9bd[_0x5a9957(0xfe)]>0x0));const _0x131c6d=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x131c6d)return writeCliSideChannelLine(a190_0x3fb286[_0x5a9957(0x126)](_0x5a9957(0x118))),{'ok':!![]};}let _0x310954=_0x4ac77b[_0x5a9957(0xf8)],_0x56046e=_0x4ac77b['cssUrl'];!_0x310954&&!_0x4ac77b[_0x5a9957(0x110)]&&(_0x310954=await askJsUrl());!_0x56046e&&!_0x4ac77b['appName']&&(_0x56046e=await askCssUrl());const _0x2addc7=await askConfirm(_0x4ac77b[_0x5a9957(0x110)]?'\x20\x20Create\x20'+_0x4d3e33[_0x5a9957(0x108)]+'\x20menu(s)\x20bound\x20to\x20'+_0x4ac77b[_0x5a9957(0x110)]+'?':_0x5a9957(0xf0)+_0x4d3e33[_0x5a9957(0x108)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x310954+_0x5a9957(0xfd)+_0x56046e+'?');if(!_0x2addc7)return writeCliSideChannelLine(a190_0x3fb286[_0x5a9957(0x126)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x6d8aaf=[_0x310954,_0x56046e][_0x5a9957(0xf1)](_0x355e64=>Boolean(_0x355e64));_0x4ac77b[_0x5a9957(0x110)]&&_0x6d8aaf[_0x5a9957(0x108)]===0x0&&await assertSharedResourcesConfigured(_0x1b430f[_0x5a9957(0xea)],_0x1b430f[_0x5a9957(0x106)],_0x4ac77b['appName']);const _0x44e563=startSpinner(_0x5a9957(0x105)+_0x4d3e33[_0x5a9957(0x108)]+_0x5a9957(0xe0));try{const _0x13619b=_0x4d3e33[_0x5a9957(0xfa)](_0x1d2b20=>resolvePage(_0x1d2b20,_0x4ac77b,_0x44f8cf)),_0x3319de=await doCreateMenus(_0x1b430f[_0x5a9957(0xea)],_0x1b430f[_0x5a9957(0x106)],_0x13619b,_0x6d8aaf,_0x4ac77b[_0x5a9957(0x110)]?{'appName':_0x4ac77b[_0x5a9957(0x110)]}:undefined);return stopSpinner(_0x44e563,_0x5a9957(0x101)+_0x3319de[_0x5a9957(0xec)]+'\x20menu(s)',!![]),{'ok':!![],'data':_0x3319de,'message':_0x5a9957(0x112)+_0x3319de['created']+_0x5a9957(0x103)+_0x3319de[_0x5a9957(0xe4)]+_0x5a9957(0xe8)};}catch(_0x5cbd5b){stopSpinner(_0x44e563,_0x5a9957(0xe9),![]);throw CliErrors[_0x5a9957(0x11c)](_0x5cbd5b instanceof Error?_0x5cbd5b[_0x5a9957(0xde)]:_0x5a9957(0xe9));}}};function ensureRunnableContext(_0x52ee51,_0x495e4b){const _0x29dc0f=a190_0x4fff8d,_0x260288=_0x52ee51['appcode']?String(_0x52ee51['appcode'])[_0x29dc0f(0x127)]():'';if(!isInProject()&&!_0x495e4b&&!_0x260288)throw CliErrors[_0x29dc0f(0x11c)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x29dc0f(0xef));}function parsePaths(_0x237080){const _0x26e36d=a190_0x4fff8d;return[...new Set(_0x237080['split'](',')[_0x26e36d(0xfa)](_0x46df21=>_0x46df21['trim']())[_0x26e36d(0xf1)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a191_0x13cfa8=a191_0x44a5;(function(_0x48a82b,_0x4b6dbc){const _0xb8a722=a191_0x44a5,_0x47eb3b=_0x48a82b();while(!![]){try{const _0x1cb526=parseInt(_0xb8a722(0x23d))/0x1*(parseInt(_0xb8a722(0x221))/0x2)+-parseInt(_0xb8a722(0x247))/0x3*(-parseInt(_0xb8a722(0x23e))/0x4)+parseInt(_0xb8a722(0x245))/0x5*(parseInt(_0xb8a722(0x20c))/0x6)+parseInt(_0xb8a722(0x24d))/0x7+-parseInt(_0xb8a722(0x1fd))/0x8+parseInt(_0xb8a722(0x235))/0x9+-parseInt(_0xb8a722(0x1f6))/0xa*(parseInt(_0xb8a722(0x208))/0xb);if(_0x1cb526===_0x4b6dbc)break;else _0x47eb3b['push'](_0x47eb3b['shift']());}catch(_0x415a02){_0x47eb3b['push'](_0x47eb3b['shift']());}}}(a191_0x4433,0x2b5cc));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}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x13cfa8(0x217),'path':a191_0x13cfa8(0x210)}];export const menuVisibilityUpdate={'service':a191_0x13cfa8(0x252),'command':a191_0x13cfa8(0x26d),'description':a191_0x13cfa8(0x263),'risk':a191_0x13cfa8(0x232),'structuredErrors':!![],'flags':[{'name':a191_0x13cfa8(0x21d),'type':a191_0x13cfa8(0x265),'description':a191_0x13cfa8(0x20f)},{'name':a191_0x13cfa8(0x1f5),'type':'string','description':a191_0x13cfa8(0x22e)},{'name':a191_0x13cfa8(0x25e),'type':a191_0x13cfa8(0x267),'required':!![],'description':a191_0x13cfa8(0x224)},{'name':a191_0x13cfa8(0x231),'type':'boolean','description':a191_0x13cfa8(0x22f)},{'name':a191_0x13cfa8(0x253),'type':a191_0x13cfa8(0x259),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x37bcb4){parseInput(_0x37bcb4);},async 'dryRun'(_0x2ae65d){const _0x3a90fa=a191_0x13cfa8,_0x51b4e1=await buildPlan(_0x2ae65d,!![]),_0x3b746d=_0x51b4e1[_0x3a90fa(0x226)][_0x3a90fa(0x262)]?.['length']??0x0,_0x412217=_0x51b4e1['plan'][_0x3a90fa(0x220)][_0x3a90fa(0x22d)]-_0x3b746d;return menuDryRunResult(_0x51b4e1['plan'],{'method':'POST','url':_0x3a90fa(0x210),'body':{'updates':_0x51b4e1[_0x3a90fa(0x226)][_0x3a90fa(0x262)]?.[_0x3a90fa(0x238)](_0x198ee7=>_0x198ee7['body'])??[]},'description':_0x3a90fa(0x260)+_0x3b746d+_0x3a90fa(0x1f7)+_0x412217+_0x3a90fa(0x26f)});},async 'execute'(_0xb79562){const _0x124176=a191_0x13cfa8,_0x1db06f=await buildPlan(_0xb79562,![]);await recheckMutationSnapshot(_0xb79562,_0x1db06f[_0x124176(0x226)],_0x124176(0x254));const _0x3312f5=[],_0x28a02c=[],_0x215c23=[];for(const _0x306231 of _0x1db06f[_0x124176(0x226)][_0x124176(0x220)]){if(_0x306231[_0x124176(0x216)][_0x124176(0x25e)]===_0x1db06f['plan'][_0x124176(0x1f4)]){_0x3312f5[_0x124176(0x206)]({'id':_0x306231['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0xb79562[_0x124176(0x23f)],_0xb79562[_0x124176(0x203)],{'id':_0x306231['id'],'visible':_0x1db06f[_0x124176(0x226)]['requestedVisible']}),_0x3312f5[_0x124176(0x206)]({'id':_0x306231['id'],'updated':!![],'skipped':![]});}catch(_0x3cadfe){const _0x4d50d5=mapMenuApiError(_0x3cadfe,_0x124176(0x26e),_0x306231['id']);if(isMenuResponseLoss(_0x3cadfe)&&_0x4d50d5[_0x124176(0x21e)]!==_0x124176(0x1fc)){_0x215c23['push'](_0x306231['id']);continue;}_0x28a02c[_0x124176(0x206)]({'id':_0x306231['id'],'stage':_0x124176(0x24e),'code':_0x4d50d5[_0x124176(0x21e)],'message':_0x4d50d5[_0x124176(0x234)]});}}let _0x65a74c;try{_0x65a74c=await fetchMenuSnapshot(_0xb79562[_0x124176(0x23f)],_0xb79562['cookie']);}catch(_0x17872e){const _0xb89c1=describeMenuErrorCause(_0x17872e,_0x124176(0x230)),_0x426143=_0x215c23[_0x124176(0x238)](_0x18193e=>({'id':_0x18193e,'stage':_0x124176(0x270),'code':_0x124176(0x242),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x18193e+_0x124176(0x20a),'requestedStateConfirmed':![],'recovered':![]})),_0x1e983b={'stage':_0x124176(0x205),'code':_0x124176(0x242),'message':_0x124176(0x1f9),'targetIds':_0x1db06f[_0x124176(0x226)]['targets'][_0x124176(0x238)](_0x35758f=>_0x35758f['id']),'requestedStateConfirmed':![],..._0xb89c1};throw menuFailure(asVerificationError(_0x17872e,_0x124176(0x241)),_0x1db06f[_0x124176(0x226)],{'stage':'verification','succeeded':_0x3312f5,'failedRecords':[..._0x28a02c,..._0x426143,_0x1e983b],'warnings':[_0x124176(0x24a)],'verification':{'status':_0x124176(0x213),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x6ccebe=[];for(const _0x397509 of _0x3312f5){const _0x2ce952=Number(_0x397509['id']),_0x489884=_0x1db06f[_0x124176(0x223)][_0x124176(0x24f)](_0x2ce952),_0x4a5620=_0x65a74c[_0x124176(0x21f)][_0x124176(0x24f)](_0x2ce952);try{verifyVisibilityUpdate(_0x489884,_0x4a5620,_0x1db06f[_0x124176(0x226)][_0x124176(0x1f4)]);}catch(_0x3a0d48){const _0x5e31ec=asVerificationError(_0x3a0d48,_0x124176(0x239)+_0x2ce952+_0x124176(0x23b));_0x6ccebe['push']({'id':_0x2ce952,'stage':_0x124176(0x205),'code':_0x5e31ec['code'],'message':_0x5e31ec[_0x124176(0x234)],'requestedStateConfirmed':![]});}}for(const _0x3d9a3e of _0x215c23){const _0x40a46f=_0x1db06f[_0x124176(0x223)][_0x124176(0x24f)](_0x3d9a3e),_0x4b88a8=_0x65a74c[_0x124176(0x21f)][_0x124176(0x24f)](_0x3d9a3e);try{verifyVisibilityUpdate(_0x40a46f,_0x4b88a8,_0x1db06f[_0x124176(0x226)][_0x124176(0x1f4)]),_0x3312f5[_0x124176(0x206)]({'id':_0x3d9a3e,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x1bc705){const _0x4171e6=asVerificationError(_0x1bc705,_0x124176(0x222)+_0x3d9a3e+_0x124176(0x1fb));_0x6ccebe[_0x124176(0x206)]({'id':_0x3d9a3e,'stage':'update-recovery','code':_0x4171e6[_0x124176(0x21e)],'message':_0x4171e6[_0x124176(0x234)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x6ccebe[_0x124176(0x22d)]>0x0){const _0x2017e3=_0x6ccebe['map'](_0x560dec=>Number(_0x560dec['id'])),_0x1210ee=_0x3312f5['filter'](_0x7cd8fb=>_0x7cd8fb[_0x124176(0x244)]===!![])[_0x124176(0x22d)],_0x55ee6f=menuError(_0x124176(0x242),_0x124176(0x269)+_0x2017e3[_0x124176(0x215)](',\x20')+'.',_0x124176(0x209));throw menuFailure(_0x55ee6f,_0x1db06f[_0x124176(0x226)],{'stage':'verification','succeeded':_0x3312f5,'failedRecords':[..._0x28a02c,..._0x6ccebe],'warnings':[_0x124176(0x21b)],'verification':{'status':_0x124176(0x213),..._0x2017e3[_0x124176(0x22d)]===0x1?{'targetId':_0x2017e3[0x0]}:{'targetIds':_0x2017e3},'recoveredCount':_0x1210ee,'lookupCommand':_0x124176(0x264)}});}const _0x4ee310=_0x3312f5['filter'](_0x47c9e9=>_0x47c9e9[_0x124176(0x225)]===!![])[_0x124176(0x22d)],_0x289692=_0x3312f5[_0x124176(0x22d)]-_0x4ee310,_0x370865={..._0x1db06f[_0x124176(0x226)],'succeeded':_0x3312f5,'failed':_0x28a02c,'warnings':_0x28a02c[_0x124176(0x22d)]>0x0?[..._0x1db06f['plan'][_0x124176(0x26a)],_0x124176(0x255)]:_0x1db06f['plan']['warnings'],'verification':{'checkedBy':_0x124176(0x1f3),'snapshotHash':_0x65a74c[_0x124176(0x204)],'matchesRequestedState':_0x28a02c[_0x124176(0x22d)]===0x0,'recoveredCount':_0x215c23[_0x124176(0x22d)]}};return{'ok':_0x28a02c[_0x124176(0x22d)]===0x0,'data':_0x370865,'message':_0x28a02c[_0x124176(0x22d)]===0x0?_0x124176(0x21c)+_0x4ee310+_0x124176(0x26c)+_0x289692+_0x124176(0x26f):'Menu\x20visibility\x20update\x20completed:\x20'+_0x4ee310+'\x20updated,\x20'+_0x289692+_0x124176(0x257)+_0x28a02c[_0x124176(0x22d)]+'\x20failed.'};}};function parseInput(_0x36a106){const _0x5a55c3=a191_0x13cfa8,_0x5cb88f=parseMenuIds(_0x36a106['str'](_0x5a55c3(0x21d))),_0x4bb10c=parseCsv(_0x36a106[_0x5a55c3(0x1fa)](_0x5a55c3(0x1f5)));if(_0x5cb88f[_0x5a55c3(0x22d)]===0x0&&_0x4bb10c[_0x5a55c3(0x22d)]===0x0)throw CliErrors[_0x5a55c3(0x25b)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x1fd9ab=parseBooleanFlag(_0x36a106,'visible',!![]),_0xd48b1a=parseBooleanFlag(_0x36a106,_0x5a55c3(0x231),![]);let _0x475e3c;if(hasFlag(_0x36a106,_0x5a55c3(0x253))){_0x475e3c=_0x36a106['num'](_0x5a55c3(0x253));if(!Number[_0x5a55c3(0x23a)](_0x475e3c)||_0x475e3c<0x0)throw CliErrors[_0x5a55c3(0x25b)](_0x5a55c3(0x251));}return{'menuIds':_0x5cb88f,'paths':_0x4bb10c,'visible':_0x1fd9ab,'expectVisible':_0xd48b1a,'expectedCount':_0x475e3c};}function a191_0x44a5(_0x86e888,_0x102a09){_0x86e888=_0x86e888-0x1f1;const _0x443313=a191_0x4433();let _0x44a51d=_0x443313[_0x86e888];return _0x44a51d;}async function buildPlan(_0x2dc208,_0x364616){const _0x4dd5bd=a191_0x13cfa8,_0x91826b=parseInput(_0x2dc208),_0x17a6b4=await fetchMutationSnapshot(_0x2dc208,'update\x20menu\x20visibility'),_0x2ff7c8=selectTargets(_0x17a6b4[_0x4dd5bd(0x250)],_0x91826b[_0x4dd5bd(0x24c)],_0x91826b['paths']);if(_0x91826b[_0x4dd5bd(0x1fe)]!==undefined&&_0x2ff7c8[_0x4dd5bd(0x22d)]!==_0x91826b[_0x4dd5bd(0x1fe)])throw menuError('menu_expected_count_mismatch',_0x4dd5bd(0x1f1)+_0x2ff7c8[_0x4dd5bd(0x22d)]+_0x4dd5bd(0x25a)+_0x91826b[_0x4dd5bd(0x1fe)]+'.',_0x4dd5bd(0x248));if(_0x91826b['expectVisible']!==undefined){const _0x4a9b83=_0x2ff7c8['filter'](_0x41a7e0=>_0x41a7e0['visible']!==_0x91826b[_0x4dd5bd(0x268)]);if(_0x4a9b83[_0x4dd5bd(0x22d)]>0x0)throw menuError('menu_state_drift',_0x4dd5bd(0x219)+_0x4a9b83[_0x4dd5bd(0x238)](_0x332917=>_0x332917['id'])[_0x4dd5bd(0x215)](',\x20')+'.',_0x4dd5bd(0x25f));}const _0x2626a8=_0x2ff7c8[_0x4dd5bd(0x238)](_0x3c4530=>({'id':_0x3c4530['id'],'label':_0x3c4530[_0x4dd5bd(0x1ff)],'path':_0x3c4530[_0x4dd5bd(0x22a)],'before':{'visible':_0x3c4530[_0x4dd5bd(0x25e)]},'after':{'visible':_0x91826b[_0x4dd5bd(0x25e)]}})),_0x3fcaa7=_0x2626a8[_0x4dd5bd(0x20e)](_0x2e4ae9=>_0x2e4ae9[_0x4dd5bd(0x216)][_0x4dd5bd(0x25e)]!==_0x91826b['visible'])[_0x4dd5bd(0x238)](_0x4dad56=>({'stage':'update-menu-visibility','method':'POST','path':_0x4dd5bd(0x210),'body':{'appCode':_0x2dc208['appCode'],'id':_0x4dad56['id'],'visible':_0x91826b['visible']}})),_0x520e15=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x91826b[_0x4dd5bd(0x24c)],'paths':_0x91826b[_0x4dd5bd(0x1f5)]},'before':{'menus':_0x2ff7c8[_0x4dd5bd(0x238)](_0x53dd49=>({'id':_0x53dd49['id'],'path':_0x53dd49[_0x4dd5bd(0x22a)],'visible':_0x53dd49[_0x4dd5bd(0x25e)]}))},'after':{'menus':_0x2ff7c8[_0x4dd5bd(0x238)](_0x142b1b=>({'id':_0x142b1b['id'],'path':_0x142b1b[_0x4dd5bd(0x22a)],'visible':_0x91826b['visible']}))},'dryRun':_0x364616,'backend':[...BACKEND],'plannedActions':_0x3fcaa7,'snapshotHash':_0x17a6b4['hash'],'warnings':_0x3fcaa7[_0x4dd5bd(0x22d)]===0x0?[_0x4dd5bd(0x202)]:[]});return{'plan':{..._0x520e15,'requestedVisible':_0x91826b['visible'],'targets':_0x2626a8},'beforeById':new Map(_0x2ff7c8['map'](_0x189d5b=>[_0x189d5b['id'],_0x189d5b]))};}function selectTargets(_0x222758,_0x591eaf,_0x427f89){const _0x4807c5=a191_0x13cfa8,_0x1cce5f=new Map(_0x222758[_0x4807c5(0x238)](_0x12064b=>[_0x12064b['id'],_0x12064b])),_0x56b8e7=new Map(),_0x1c0791=_0x591eaf[_0x4807c5(0x20e)](_0x230429=>!_0x1cce5f[_0x4807c5(0x1f2)](_0x230429));if(_0x1c0791[_0x4807c5(0x22d)]>0x0)throw menuError(_0x4807c5(0x26b),_0x4807c5(0x233)+_0x1c0791['join'](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x15fdcd of _0x591eaf){_0x56b8e7[_0x4807c5(0x214)](_0x15fdcd,_0x1cce5f[_0x4807c5(0x24f)](_0x15fdcd));}for(const _0x3c9478 of _0x427f89){const _0x30834c=_0x222758['filter'](_0x863ea8=>_0x863ea8['path']===_0x3c9478);if(_0x30834c['length']===0x0)throw menuError(_0x4807c5(0x26b),'Menu\x20path\x20selector\x20not\x20found:\x20'+JSON[_0x4807c5(0x22c)](_0x3c9478)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x30834c['length']>0x1)throw menuError(_0x4807c5(0x207),_0x4807c5(0x212)+JSON[_0x4807c5(0x22c)](_0x3c9478)+'.',_0x4807c5(0x201)+_0x30834c[_0x4807c5(0x238)](_0x337ce2=>_0x337ce2['id'])[_0x4807c5(0x215)](',\x20')+'.');const _0x123644=_0x30834c[0x0];_0x56b8e7[_0x4807c5(0x214)](_0x123644['id'],_0x123644);}return[..._0x56b8e7['values']()];}function parseMenuIds(_0x5eaa20){const _0x51591b=a191_0x13cfa8,_0x33c6b2=parseCsv(_0x5eaa20),_0x8e87fd=_0x33c6b2[_0x51591b(0x238)](Number);if(_0x8e87fd[_0x51591b(0x258)](_0x44df11=>!Number[_0x51591b(0x23a)](_0x44df11)||_0x44df11<=0x0))throw CliErrors[_0x51591b(0x25b)](_0x51591b(0x249));return[...new Set(_0x8e87fd)];}function parseCsv(_0x5504ec){const _0x5e6140=a191_0x13cfa8;return[...new Set(_0x5504ec[_0x5e6140(0x227)](',')['map'](_0x3179f8=>_0x3179f8[_0x5e6140(0x243)]())[_0x5e6140(0x20e)](Boolean))];}function a191_0x4433(){const _0x395ade=['Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','pageType','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Updated\x20visibility\x20for\x20','menu-ids','code','byId','targets','34LMwkly','Response\x20was\x20lost\x20and\x20menu\x20','beforeById','Requested\x20menu\x20visibility','updated','plan','split','resourcesValid','sort','path','flagMissing','stringify','length','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','verify\x20menu\x20visibility\x20update','expect-visible','write','Menu\x20id\x20selector(s)\x20not\x20found:\x20','message','2611917LfndfR','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','true','map','Menu\x20','isSafeInteger','\x20visibility\x20update\x20could\x20not\x20be\x20verified','pageId','16883NXEeuI','4556MFhfZY','appCode','parentId','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','menu_verification_failed','trim','recovered','1551460vysJvW','rawFlags','219gAmUJC','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','type','menuIds','47467djihlj','update','get','menus','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','menu','expected-count','update\x20menu\x20visibility','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','datasetId','\x20skipped,\x20','some','number','\x20menu(s),\x20expected\x20','validation','url','\x20must\x20be\x20true\x20or\x20false.','visible','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','Would\x20update\x20visibility\x20for\x20','childrenIds','plannedActions','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','rabetbase\x20menu\x20list\x20--format\x20compress','string','modelType','boolean','expectVisible','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','warnings','menu_selector_not_found','\x20menu(s);\x20skipped\x20','visibility-update','update\x20visibility\x20for','\x20unchanged\x20menu(s).','update-recovery','Selected\x20','has','menu\x20list','requestedVisible','paths','245960eWHZLr','\x20menu(s);\x20skip\x20','datasetCode','Final\x20menu\x20visibility\x20readback\x20failed.','str','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','menu_permission_denied','1872992iSRppj','expectedCount','label','isArray','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','cookie','hash','verification','push','menu_selector_ambiguous','253VULCEe','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','depth','6hpvVOe','childrenCount','filter','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','/smartapi/menu/update','\x20changed\x20unexpectedly.','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','failed','set','join','before','POST','resources'];a191_0x4433=function(){return _0x395ade;};return a191_0x4433();}function parseBooleanFlag(_0x313c98,_0x439b71,_0x576ab7){const _0xdd5be1=a191_0x13cfa8;if(!hasFlag(_0x313c98,_0x439b71)){if(_0x576ab7)throw CliErrors[_0xdd5be1(0x22b)](_0x439b71);return undefined;}const _0x1ebe57=_0x313c98[_0xdd5be1(0x246)][_0x439b71];if(_0x1ebe57===!![]||_0x1ebe57===![])return _0x1ebe57;if(_0x1ebe57===_0xdd5be1(0x237))return!![];if(_0x1ebe57==='false')return![];throw CliErrors[_0xdd5be1(0x25b)]('--'+_0x439b71+_0xdd5be1(0x25d));}function verifyVisibilityUpdate(_0x4ccaa4,_0x236941,_0xe6ec16){const _0x234314=a191_0x13cfa8;assertVerified(!!_0x236941,_0x234314(0x239)+_0x4ccaa4['id']+_0x234314(0x236)),assertVerified(_0x236941[_0x234314(0x25e)]===_0xe6ec16,_0x234314(0x239)+_0x4ccaa4['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x24eba1=[['id',_0x236941['id'],_0x4ccaa4['id']],[_0x234314(0x240),_0x236941[_0x234314(0x240)],_0x4ccaa4['parentId']],[_0x234314(0x20b),_0x236941['depth'],_0x4ccaa4[_0x234314(0x20b)]],[_0x234314(0x1ff),_0x236941['label'],_0x4ccaa4[_0x234314(0x1ff)]],[_0x234314(0x22a),_0x236941[_0x234314(0x22a)],_0x4ccaa4[_0x234314(0x22a)]],[_0x234314(0x25c),_0x236941[_0x234314(0x25c)],_0x4ccaa4[_0x234314(0x25c)]],[_0x234314(0x24b),_0x236941[_0x234314(0x24b)],_0x4ccaa4[_0x234314(0x24b)]],[_0x234314(0x229),_0x236941[_0x234314(0x229)],_0x4ccaa4[_0x234314(0x229)]],['resources',_0x236941[_0x234314(0x218)],_0x4ccaa4[_0x234314(0x218)]],[_0x234314(0x228),_0x236941[_0x234314(0x228)],_0x4ccaa4['resourcesValid']],[_0x234314(0x261),_0x236941[_0x234314(0x261)],_0x4ccaa4[_0x234314(0x261)]],[_0x234314(0x20d),_0x236941['childrenCount'],_0x4ccaa4['childrenCount']],[_0x234314(0x23c),_0x236941['pageId'],_0x4ccaa4['pageId']],[_0x234314(0x21a),_0x236941[_0x234314(0x21a)],_0x4ccaa4['pageType']],['modelType',_0x236941[_0x234314(0x266)],_0x4ccaa4[_0x234314(0x266)]],[_0x234314(0x256),_0x236941[_0x234314(0x256)],_0x4ccaa4[_0x234314(0x256)]],['datasetCode',_0x236941[_0x234314(0x1f8)],_0x4ccaa4['datasetCode']]];for(const [_0x1e3efb,_0x51ffa5,_0x5aa8ba]of _0x24eba1){assertVerified(sameValue(_0x51ffa5,_0x5aa8ba),_0x234314(0x239)+_0x4ccaa4['id']+'\x20'+_0x1e3efb+_0x234314(0x211));}}function sameValue(_0x4506f1,_0x3f486e){const _0x112328=a191_0x13cfa8;if(Array[_0x112328(0x200)](_0x4506f1)||Array[_0x112328(0x200)](_0x3f486e))return JSON['stringify'](_0x4506f1)===JSON[_0x112328(0x22c)](_0x3f486e);return _0x4506f1===_0x3f486e;}
|
|
1
|
+
const a191_0x2387f3=a191_0x2fc1;(function(_0x3938eb,_0x4bce7b){const _0x5c42d3=a191_0x2fc1,_0x4bf9b9=_0x3938eb();while(!![]){try{const _0x8d5df5=parseInt(_0x5c42d3(0x1ff))/0x1+-parseInt(_0x5c42d3(0x238))/0x2+-parseInt(_0x5c42d3(0x209))/0x3+-parseInt(_0x5c42d3(0x1f9))/0x4+parseInt(_0x5c42d3(0x213))/0x5+-parseInt(_0x5c42d3(0x1f3))/0x6*(parseInt(_0x5c42d3(0x228))/0x7)+-parseInt(_0x5c42d3(0x258))/0x8*(-parseInt(_0x5c42d3(0x24d))/0x9);if(_0x8d5df5===_0x4bce7b)break;else _0x4bf9b9['push'](_0x4bf9b9['shift']());}catch(_0x5c8db9){_0x4bf9b9['push'](_0x4bf9b9['shift']());}}}(a191_0x2873,0xe5820));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}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';function a191_0x2873(){const _0x4be784=['appCode','menu-ids','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','write','3348903eLihxf','menu','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','verification','failed','menu_state_drift','type','\x20skipped,\x20','str','requestedVisible','8591150oHAwyS','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','length','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','map','Response\x20was\x20lost\x20for\x20menu\x20','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','has','update\x20visibility\x20for','Selected\x20','Requested\x20menu\x20visibility','rawFlags','cookie','visible','expected-count','visibility-update','update\x20menu\x20visibility','\x20changed\x20unexpectedly.','string','775103fTVtJx','menu_permission_denied','hash','plannedActions','isSafeInteger','Final\x20menu\x20visibility\x20readback\x20failed.','label','url','/smartapi/menu/update','paths','Menu\x20visibility\x20update\x20completed:\x20','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','resourcesValid','expect-visible','\x20visibility\x20update\x20could\x20not\x20be\x20verified','datasetCode','2806932gMwJVh','Menu\x20path\x20selector\x20not\x20found:\x20','false','recovered','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','flagMissing','depth','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','menu_verification_failed','\x20unchanged\x20menu(s).','split','rabetbase\x20menu\x20list\x20--format\x20compress','parentId','get','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Updated\x20visibility\x20for\x20','code','childrenIds','join','stringify','31193271tHvqpZ','isArray','message','Menu\x20id\x20selector(s)\x20not\x20found:\x20','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','plan','expectedCount','\x20menu(s);\x20skip\x20','path','warnings','validation','8jSfufv','pageId','verify\x20menu\x20visibility\x20update','menu_selector_not_found','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','resources','targets','menu\x20list','boolean','before','update-recovery','Response\x20was\x20lost\x20and\x20menu\x20','Would\x20update\x20visibility\x20for\x20','filter','modelType','update-menu-visibility','true','\x20must\x20be\x20true\x20or\x20false.','body','pageType','set','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','30FaADJC','Menu\x20','childrenCount','sort','menuIds','trim','5964300fTQzQY','\x20menu(s),\x20expected\x20','\x20failed.','expectVisible','byId','POST','320402tUFuim','datasetId','num','update','push'];a191_0x2873=function(){return _0x4be784;};return a191_0x2873();}const BACKEND=[{'method':a191_0x2387f3(0x1fe),'path':a191_0x2387f3(0x230)}];export const menuVisibilityUpdate={'service':a191_0x2387f3(0x20a),'command':a191_0x2387f3(0x224),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':a191_0x2387f3(0x208),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':a191_0x2387f3(0x227),'description':a191_0x2387f3(0x1f2)},{'name':a191_0x2387f3(0x231),'type':'string','description':a191_0x2387f3(0x215)},{'name':a191_0x2387f3(0x222),'type':a191_0x2387f3(0x1e5),'required':!![],'description':a191_0x2387f3(0x21f)},{'name':a191_0x2387f3(0x235),'type':a191_0x2387f3(0x1e5),'description':a191_0x2387f3(0x214)},{'name':a191_0x2387f3(0x223),'type':'number','description':a191_0x2387f3(0x1e0)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x43dc7e){parseInput(_0x43dc7e);},async 'dryRun'(_0x18b9d0){const _0x67b469=a191_0x2387f3,_0x158fba=await buildPlan(_0x18b9d0,!![]),_0x3e90b8=_0x158fba[_0x67b469(0x252)][_0x67b469(0x22b)]?.[_0x67b469(0x216)]??0x0,_0x11a852=_0x158fba[_0x67b469(0x252)]['targets'][_0x67b469(0x216)]-_0x3e90b8;return menuDryRunResult(_0x158fba[_0x67b469(0x252)],{'method':'POST','url':_0x67b469(0x230),'body':{'updates':_0x158fba[_0x67b469(0x252)][_0x67b469(0x22b)]?.[_0x67b469(0x218)](_0x576576=>_0x576576[_0x67b469(0x1ef)])??[]},'description':_0x67b469(0x1e9)+_0x3e90b8+_0x67b469(0x254)+_0x11a852+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x5e81fd){const _0x23bba9=a191_0x2387f3,_0x153aeb=await buildPlan(_0x5e81fd,![]);await recheckMutationSnapshot(_0x5e81fd,_0x153aeb[_0x23bba9(0x252)],_0x23bba9(0x225));const _0x2ec5de=[],_0x356ba8=[],_0x3f34e2=[];for(const _0x57911e of _0x153aeb['plan'][_0x23bba9(0x1e3)]){if(_0x57911e[_0x23bba9(0x1e6)][_0x23bba9(0x222)]===_0x153aeb['plan'][_0x23bba9(0x212)]){_0x2ec5de[_0x23bba9(0x203)]({'id':_0x57911e['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x5e81fd[_0x23bba9(0x204)],_0x5e81fd[_0x23bba9(0x221)],{'id':_0x57911e['id'],'visible':_0x153aeb[_0x23bba9(0x252)][_0x23bba9(0x212)]}),_0x2ec5de[_0x23bba9(0x203)]({'id':_0x57911e['id'],'updated':!![],'skipped':![]});}catch(_0x27c646){const _0x140896=mapMenuApiError(_0x27c646,_0x23bba9(0x21d),_0x57911e['id']);if(isMenuResponseLoss(_0x27c646)&&_0x140896[_0x23bba9(0x249)]!==_0x23bba9(0x229)){_0x3f34e2[_0x23bba9(0x203)](_0x57911e['id']);continue;}_0x356ba8[_0x23bba9(0x203)]({'id':_0x57911e['id'],'stage':_0x23bba9(0x202),'code':_0x140896[_0x23bba9(0x249)],'message':_0x140896[_0x23bba9(0x24f)]});}}let _0x239989;try{_0x239989=await fetchMenuSnapshot(_0x5e81fd[_0x23bba9(0x204)],_0x5e81fd[_0x23bba9(0x221)]);}catch(_0x4368c8){const _0x48b7b7=describeMenuErrorCause(_0x4368c8,_0x23bba9(0x1de)),_0x36165a=_0x3f34e2[_0x23bba9(0x218)](_0x15facd=>({'id':_0x15facd,'stage':_0x23bba9(0x1e7),'code':_0x23bba9(0x240),'message':_0x23bba9(0x219)+_0x15facd+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x57bc19={'stage':'verification','code':_0x23bba9(0x240),'message':_0x23bba9(0x22d),'targetIds':_0x153aeb[_0x23bba9(0x252)][_0x23bba9(0x1e3)][_0x23bba9(0x218)](_0x3cc16b=>_0x3cc16b['id']),'requestedStateConfirmed':![],..._0x48b7b7};throw menuFailure(asVerificationError(_0x4368c8,_0x23bba9(0x21a)),_0x153aeb[_0x23bba9(0x252)],{'stage':_0x23bba9(0x20c),'succeeded':_0x2ec5de,'failedRecords':[..._0x356ba8,..._0x36165a,_0x57bc19],'warnings':[_0x23bba9(0x21b)],'verification':{'status':_0x23bba9(0x20d),'recoveredCount':0x0,'lookupCommand':_0x23bba9(0x243)}});}const _0x3cac62=[];for(const _0xd40354 of _0x2ec5de){const _0x5e17b7=Number(_0xd40354['id']),_0x5303a8=_0x153aeb['beforeById']['get'](_0x5e17b7),_0x154cc0=_0x239989[_0x23bba9(0x1fd)][_0x23bba9(0x245)](_0x5e17b7);try{verifyVisibilityUpdate(_0x5303a8,_0x154cc0,_0x153aeb[_0x23bba9(0x252)][_0x23bba9(0x212)]);}catch(_0x310221){const _0x3e0265=asVerificationError(_0x310221,_0x23bba9(0x1f4)+_0x5e17b7+_0x23bba9(0x236));_0x3cac62[_0x23bba9(0x203)]({'id':_0x5e17b7,'stage':_0x23bba9(0x20c),'code':_0x3e0265[_0x23bba9(0x249)],'message':_0x3e0265['message'],'requestedStateConfirmed':![]});}}for(const _0x39da7c of _0x3f34e2){const _0x27042f=_0x153aeb['beforeById']['get'](_0x39da7c),_0x2ff28b=_0x239989[_0x23bba9(0x1fd)][_0x23bba9(0x245)](_0x39da7c);try{verifyVisibilityUpdate(_0x27042f,_0x2ff28b,_0x153aeb[_0x23bba9(0x252)][_0x23bba9(0x212)]),_0x2ec5de['push']({'id':_0x39da7c,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x21f3cf){const _0x3a9686=asVerificationError(_0x21f3cf,_0x23bba9(0x1e8)+_0x39da7c+_0x23bba9(0x23c));_0x3cac62[_0x23bba9(0x203)]({'id':_0x39da7c,'stage':'update-recovery','code':_0x3a9686[_0x23bba9(0x249)],'message':_0x3a9686[_0x23bba9(0x24f)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x3cac62[_0x23bba9(0x216)]>0x0){const _0x10468f=_0x3cac62['map'](_0x2e60be=>Number(_0x2e60be['id'])),_0x1e838d=_0x2ec5de[_0x23bba9(0x1ea)](_0x2cb771=>_0x2cb771[_0x23bba9(0x23b)]===!![])[_0x23bba9(0x216)],_0x6dcd22=menuError(_0x23bba9(0x240),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x10468f[_0x23bba9(0x24b)](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x6dcd22,_0x153aeb[_0x23bba9(0x252)],{'stage':_0x23bba9(0x20c),'succeeded':_0x2ec5de,'failedRecords':[..._0x356ba8,..._0x3cac62],'warnings':[_0x23bba9(0x20b)],'verification':{'status':_0x23bba9(0x20d),..._0x10468f[_0x23bba9(0x216)]===0x1?{'targetId':_0x10468f[0x0]}:{'targetIds':_0x10468f},'recoveredCount':_0x1e838d,'lookupCommand':_0x23bba9(0x243)}});}const _0x13ba85=_0x2ec5de[_0x23bba9(0x1ea)](_0x20ac24=>_0x20ac24['updated']===!![])[_0x23bba9(0x216)],_0x501da4=_0x2ec5de['length']-_0x13ba85,_0x4c4a08={..._0x153aeb[_0x23bba9(0x252)],'succeeded':_0x2ec5de,'failed':_0x356ba8,'warnings':_0x356ba8[_0x23bba9(0x216)]>0x0?[..._0x153aeb[_0x23bba9(0x252)][_0x23bba9(0x256)],_0x23bba9(0x206)]:_0x153aeb[_0x23bba9(0x252)][_0x23bba9(0x256)],'verification':{'checkedBy':_0x23bba9(0x1e4),'snapshotHash':_0x239989[_0x23bba9(0x22a)],'matchesRequestedState':_0x356ba8[_0x23bba9(0x216)]===0x0,'recoveredCount':_0x3f34e2[_0x23bba9(0x216)]}};return{'ok':_0x356ba8['length']===0x0,'data':_0x4c4a08,'message':_0x356ba8['length']===0x0?_0x23bba9(0x248)+_0x13ba85+'\x20menu(s);\x20skipped\x20'+_0x501da4+_0x23bba9(0x241):_0x23bba9(0x232)+_0x13ba85+'\x20updated,\x20'+_0x501da4+_0x23bba9(0x210)+_0x356ba8[_0x23bba9(0x216)]+_0x23bba9(0x1fb)};}};function parseInput(_0x59038d){const _0x42569b=a191_0x2387f3,_0x1b3594=parseMenuIds(_0x59038d[_0x42569b(0x211)](_0x42569b(0x205))),_0x23f7f0=parseCsv(_0x59038d['str'](_0x42569b(0x231)));if(_0x1b3594['length']===0x0&&_0x23f7f0[_0x42569b(0x216)]===0x0)throw CliErrors[_0x42569b(0x257)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x393c06=parseBooleanFlag(_0x59038d,_0x42569b(0x222),!![]),_0x3ac212=parseBooleanFlag(_0x59038d,_0x42569b(0x235),![]);let _0x4c6d33;if(hasFlag(_0x59038d,'expected-count')){_0x4c6d33=_0x59038d[_0x42569b(0x201)]('expected-count');if(!Number[_0x42569b(0x22c)](_0x4c6d33)||_0x4c6d33<0x0)throw CliErrors[_0x42569b(0x257)](_0x42569b(0x251));}return{'menuIds':_0x1b3594,'paths':_0x23f7f0,'visible':_0x393c06,'expectVisible':_0x3ac212,'expectedCount':_0x4c6d33};}async function buildPlan(_0x408dac,_0x2f5712){const _0x464b2e=a191_0x2387f3,_0x4d3259=parseInput(_0x408dac),_0x200943=await fetchMutationSnapshot(_0x408dac,_0x464b2e(0x225)),_0x45fd57=selectTargets(_0x200943['menus'],_0x4d3259['menuIds'],_0x4d3259[_0x464b2e(0x231)]);if(_0x4d3259[_0x464b2e(0x253)]!==undefined&&_0x45fd57[_0x464b2e(0x216)]!==_0x4d3259[_0x464b2e(0x253)])throw menuError('menu_expected_count_mismatch',_0x464b2e(0x21e)+_0x45fd57[_0x464b2e(0x216)]+_0x464b2e(0x1fa)+_0x4d3259[_0x464b2e(0x253)]+'.',_0x464b2e(0x207));if(_0x4d3259[_0x464b2e(0x1fc)]!==undefined){const _0x1700be=_0x45fd57[_0x464b2e(0x1ea)](_0x5335e2=>_0x5335e2['visible']!==_0x4d3259[_0x464b2e(0x1fc)]);if(_0x1700be[_0x464b2e(0x216)]>0x0)throw menuError(_0x464b2e(0x20e),_0x464b2e(0x247)+_0x1700be['map'](_0x268418=>_0x268418['id'])[_0x464b2e(0x24b)](',\x20')+'.',_0x464b2e(0x1e1));}const _0x3e8a27=_0x45fd57[_0x464b2e(0x218)](_0xc68f8e=>({'id':_0xc68f8e['id'],'label':_0xc68f8e[_0x464b2e(0x22e)],'path':_0xc68f8e['path'],'before':{'visible':_0xc68f8e[_0x464b2e(0x222)]},'after':{'visible':_0x4d3259['visible']}})),_0x513b95=_0x3e8a27['filter'](_0x541552=>_0x541552[_0x464b2e(0x1e6)]['visible']!==_0x4d3259[_0x464b2e(0x222)])[_0x464b2e(0x218)](_0x192026=>({'stage':_0x464b2e(0x1ec),'method':_0x464b2e(0x1fe),'path':_0x464b2e(0x230),'body':{'appCode':_0x408dac[_0x464b2e(0x204)],'id':_0x192026['id'],'visible':_0x4d3259[_0x464b2e(0x222)]}})),_0x12bd49=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x4d3259[_0x464b2e(0x1f7)],'paths':_0x4d3259[_0x464b2e(0x231)]},'before':{'menus':_0x45fd57[_0x464b2e(0x218)](_0x13224c=>({'id':_0x13224c['id'],'path':_0x13224c[_0x464b2e(0x255)],'visible':_0x13224c[_0x464b2e(0x222)]}))},'after':{'menus':_0x45fd57[_0x464b2e(0x218)](_0x40acca=>({'id':_0x40acca['id'],'path':_0x40acca[_0x464b2e(0x255)],'visible':_0x4d3259['visible']}))},'dryRun':_0x2f5712,'backend':[...BACKEND],'plannedActions':_0x513b95,'snapshotHash':_0x200943[_0x464b2e(0x22a)],'warnings':_0x513b95[_0x464b2e(0x216)]===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0x12bd49,'requestedVisible':_0x4d3259['visible'],'targets':_0x3e8a27},'beforeById':new Map(_0x45fd57[_0x464b2e(0x218)](_0x11055a=>[_0x11055a['id'],_0x11055a]))};}function selectTargets(_0x4b9fab,_0x2f4833,_0x1d92a8){const _0x4dd0cf=a191_0x2387f3,_0x51d0a6=new Map(_0x4b9fab[_0x4dd0cf(0x218)](_0x1cc438=>[_0x1cc438['id'],_0x1cc438])),_0x463941=new Map(),_0x4fed58=_0x2f4833[_0x4dd0cf(0x1ea)](_0x1ced1f=>!_0x51d0a6[_0x4dd0cf(0x21c)](_0x1ced1f));if(_0x4fed58[_0x4dd0cf(0x216)]>0x0)throw menuError(_0x4dd0cf(0x1df),_0x4dd0cf(0x250)+_0x4fed58[_0x4dd0cf(0x24b)](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x4a833c of _0x2f4833){_0x463941['set'](_0x4a833c,_0x51d0a6[_0x4dd0cf(0x245)](_0x4a833c));}for(const _0x1d369a of _0x1d92a8){const _0xdee22=_0x4b9fab[_0x4dd0cf(0x1ea)](_0x14be77=>_0x14be77[_0x4dd0cf(0x255)]===_0x1d369a);if(_0xdee22['length']===0x0)throw menuError(_0x4dd0cf(0x1df),_0x4dd0cf(0x239)+JSON[_0x4dd0cf(0x24c)](_0x1d369a)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0xdee22[_0x4dd0cf(0x216)]>0x1)throw menuError('menu_selector_ambiguous',_0x4dd0cf(0x246)+JSON[_0x4dd0cf(0x24c)](_0x1d369a)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0xdee22[_0x4dd0cf(0x218)](_0x19be41=>_0x19be41['id'])[_0x4dd0cf(0x24b)](',\x20')+'.');const _0x604fa4=_0xdee22[0x0];_0x463941[_0x4dd0cf(0x1f1)](_0x604fa4['id'],_0x604fa4);}return[..._0x463941['values']()];}function a191_0x2fc1(_0x54b25b,_0x241590){_0x54b25b=_0x54b25b-0x1de;const _0x28736c=a191_0x2873();let _0x2fc115=_0x28736c[_0x54b25b];return _0x2fc115;}function parseMenuIds(_0x3feaba){const _0x1a73b7=a191_0x2387f3,_0x2e3ffa=parseCsv(_0x3feaba),_0x3520f1=_0x2e3ffa[_0x1a73b7(0x218)](Number);if(_0x3520f1['some'](_0x2933d3=>!Number[_0x1a73b7(0x22c)](_0x2933d3)||_0x2933d3<=0x0))throw CliErrors[_0x1a73b7(0x257)](_0x1a73b7(0x23f));return[...new Set(_0x3520f1)];}function parseCsv(_0x4b6280){const _0x408b2e=a191_0x2387f3;return[...new Set(_0x4b6280[_0x408b2e(0x242)](',')['map'](_0x3abf93=>_0x3abf93[_0x408b2e(0x1f8)]())['filter'](Boolean))];}function parseBooleanFlag(_0x18cf68,_0x23e62b,_0x240d54){const _0xf4f019=a191_0x2387f3;if(!hasFlag(_0x18cf68,_0x23e62b)){if(_0x240d54)throw CliErrors[_0xf4f019(0x23d)](_0x23e62b);return undefined;}const _0x552cb5=_0x18cf68[_0xf4f019(0x220)][_0x23e62b];if(_0x552cb5===!![]||_0x552cb5===![])return _0x552cb5;if(_0x552cb5===_0xf4f019(0x1ed))return!![];if(_0x552cb5===_0xf4f019(0x23a))return![];throw CliErrors['validation']('--'+_0x23e62b+_0xf4f019(0x1ee));}function verifyVisibilityUpdate(_0x160491,_0x502501,_0x38796b){const _0x3ba99c=a191_0x2387f3;assertVerified(!!_0x502501,_0x3ba99c(0x1f4)+_0x160491['id']+_0x3ba99c(0x217)),assertVerified(_0x502501['visible']===_0x38796b,_0x3ba99c(0x1f4)+_0x160491['id']+_0x3ba99c(0x233));const _0x2403c8=[['id',_0x502501['id'],_0x160491['id']],['parentId',_0x502501['parentId'],_0x160491[_0x3ba99c(0x244)]],[_0x3ba99c(0x23e),_0x502501['depth'],_0x160491['depth']],['label',_0x502501[_0x3ba99c(0x22e)],_0x160491[_0x3ba99c(0x22e)]],['path',_0x502501[_0x3ba99c(0x255)],_0x160491[_0x3ba99c(0x255)]],['url',_0x502501[_0x3ba99c(0x22f)],_0x160491[_0x3ba99c(0x22f)]],[_0x3ba99c(0x20f),_0x502501[_0x3ba99c(0x20f)],_0x160491[_0x3ba99c(0x20f)]],[_0x3ba99c(0x1f6),_0x502501[_0x3ba99c(0x1f6)],_0x160491[_0x3ba99c(0x1f6)]],[_0x3ba99c(0x1e2),_0x502501['resources'],_0x160491[_0x3ba99c(0x1e2)]],[_0x3ba99c(0x234),_0x502501[_0x3ba99c(0x234)],_0x160491[_0x3ba99c(0x234)]],[_0x3ba99c(0x24a),_0x502501[_0x3ba99c(0x24a)],_0x160491[_0x3ba99c(0x24a)]],['childrenCount',_0x502501[_0x3ba99c(0x1f5)],_0x160491[_0x3ba99c(0x1f5)]],[_0x3ba99c(0x259),_0x502501['pageId'],_0x160491[_0x3ba99c(0x259)]],['pageType',_0x502501['pageType'],_0x160491[_0x3ba99c(0x1f0)]],[_0x3ba99c(0x1eb),_0x502501['modelType'],_0x160491['modelType']],[_0x3ba99c(0x200),_0x502501[_0x3ba99c(0x200)],_0x160491['datasetId']],[_0x3ba99c(0x237),_0x502501[_0x3ba99c(0x237)],_0x160491[_0x3ba99c(0x237)]]];for(const [_0x107e4b,_0x51a53a,_0x5419cb]of _0x2403c8){assertVerified(sameValue(_0x51a53a,_0x5419cb),_0x3ba99c(0x1f4)+_0x160491['id']+'\x20'+_0x107e4b+_0x3ba99c(0x226));}}function sameValue(_0x33189c,_0xfa32bf){const _0x5b7e7c=a191_0x2387f3;if(Array[_0x5b7e7c(0x24e)](_0x33189c)||Array['isArray'](_0xfa32bf))return JSON[_0x5b7e7c(0x24c)](_0x33189c)===JSON['stringify'](_0xfa32bf);return _0x33189c===_0xfa32bf;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a192_0x3ad2de=a192_0x1b42;(function(_0x151303,_0x6c794){const _0x3f0010=a192_0x1b42,_0x6d9768=_0x151303();while(!![]){try{const _0x522ba2=parseInt(_0x3f0010(0xec))/0x1*(parseInt(_0x3f0010(0xdc))/0x2)+-parseInt(_0x3f0010(0xd9))/0x3+parseInt(_0x3f0010(0xeb))/0x4+-parseInt(_0x3f0010(0xed))/0x5*(-parseInt(_0x3f0010(0xcf))/0x6)+-parseInt(_0x3f0010(0xd1))/0x7+-parseInt(_0x3f0010(0xea))/0x8+parseInt(_0x3f0010(0xe7))/0x9*(parseInt(_0x3f0010(0xdb))/0xa);if(_0x522ba2===_0x6c794)break;else _0x6d9768['push'](_0x6d9768['shift']());}catch(_0x115b98){_0x6d9768['push'](_0x6d9768['shift']());}}}(a192_0x57fa,0x2845e));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='/notification/channel-config/create';function a192_0x57fa(){const _0x299a5f=['appCode','notification_config_create_outcome_unknown','24eGnghb','verified','459116ZgwshF','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source',';\x20no\x20automatic\x20retry\x20was\x20attempted.','readTimeout','document','POST','channelConfig','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','392094AighkN','Inspect\x20with\x20','20ZBDePV','2RxAcqt',';\x20do\x20not\x20resubmit.','mutation','configName','connectTimeout','channelType','notification','description',';\x20do\x20not\x20resubmit\x20automatically.','Created\x20notification\x20config\x20','config-create','209781KMiVbP','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','isSafeInteger','1503600iolowl','278804viJfXN','103479vQGWYf','411745SqamUW','input','create'];a192_0x57fa=function(){return _0x299a5f;};return a192_0x57fa();}function a192_0x1b42(_0x4a6a3f,_0x28c4b1){_0x4a6a3f=_0x4a6a3f-0xcc;const _0x57fa0b=a192_0x57fa();let _0x1b421d=_0x57fa0b[_0x4a6a3f];return _0x1b421d;}async function prepareCreate(_0x47615a){const _0x135f89=a192_0x1b42,_0x29194a=await readNotificationDocument(_0x47615a,_0x135f89(0xcc)),_0x52669e=createMutationInput(_0x47615a['appCode'],_0x29194a);return{'document':_0x29194a,'input':_0x52669e,'planned':projectNotificationConfig({'appCode':_0x47615a[_0x135f89(0xcd)],'configName':_0x29194a['configName'],'channelType':_0x29194a[_0x135f89(0xe1)],'endpointUrl':_0x29194a['endpointUrl'],'channelConfig':_0x29194a[_0x135f89(0xd7)],'description':_0x29194a[_0x135f89(0xe3)],'connectTimeout':_0x29194a[_0x135f89(0xe0)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x29194a[_0x135f89(0xd4)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a192_0x3ad2de(0xe2),'command':a192_0x3ad2de(0xe6),'description':a192_0x3ad2de(0xd2),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x2c2ed4){assertSingleNotificationSource(_0x2c2ed4);},async 'dryRun'(_0x312652){const _0x577fba=a192_0x3ad2de,_0x1940f7=await prepareCreate(_0x312652),_0x1e1979=notificationLookupCommand(_0x312652[_0x577fba(0xcd)],_0x1940f7[_0x577fba(0xd5)][_0x577fba(0xe1)]);return asDryRunResult({'operation':_0x577fba(0xcc),'selector':{'appCode':_0x312652[_0x577fba(0xcd)],'configName':_0x1940f7['document'][_0x577fba(0xdf)],'channelType':_0x1940f7[_0x577fba(0xd5)]['channelType']},'before':null,'after':_0x1940f7['planned'],'dryRun':!![],'backend':{'method':_0x577fba(0xd6),'path':CREATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x1e1979}},{'method':_0x577fba(0xd6),'url':CREATE_PATH});},async 'execute'(_0x2722a3){const _0x200417=a192_0x3ad2de,_0x2b5ac8=await prepareCreate(_0x2722a3),_0x275e23=notificationLookupCommand(_0x2722a3['appCode'],_0x2b5ac8[_0x200417(0xd5)]['channelType']);let _0x1f184b;try{_0x1f184b=await createNotificationChannelConfig(_0x2b5ac8[_0x200417(0xee)]);}catch(_0x4fecea){if(isPlatformTransportFailure(_0x4fecea))throw notificationError(_0x200417(0xce),_0x200417(0xd8),_0x200417(0xda)+_0x275e23+_0x200417(0xdd));throw safeApiFailure(_0x200417(0xcc),_0x200417(0xde),'Inspect\x20with\x20'+_0x275e23+_0x200417(0xd3));}if(!Number[_0x200417(0xe9)](_0x1f184b)||_0x1f184b<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x200417(0xe8),_0x200417(0xda)+_0x275e23+';\x20do\x20not\x20resubmit.');let _0x449b82;try{const _0x54f0b8=await getNotificationChannelConfig(_0x1f184b,_0x2722a3['appCode']);_0x449b82=normalizeExactNotificationConfig(_0x54f0b8,_0x1f184b,_0x2722a3['appCode']);}catch{throw safeApiFailure(_0x200417(0xcc),'verification',_0x200417(0xda)+_0x275e23+_0x200417(0xe4));}return{'ok':!![],'data':{'operation':_0x200417(0xcc),'selector':{'appCode':_0x449b82[_0x200417(0xcd)],'id':_0x449b82['id'],'configCode':_0x449b82['configCode'],'configName':_0x449b82[_0x200417(0xdf)],'channelType':_0x449b82[_0x200417(0xe1)]},'before':null,'after':projectNotificationConfig(_0x449b82),'dryRun':![],'backend':{'method':_0x200417(0xd6),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x200417(0xd0),'lookupCommand':_0x275e23}},'message':_0x200417(0xe5)+_0x449b82['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a193_0xa742f2=a193_0x4aa8;function a193_0x4aa8(_0x5bdfbe,_0x12e041){_0x5bdfbe=_0x5bdfbe-0x1b9;const _0xc97124=a193_0xc971();let _0x4aa833=_0xc97124[_0x5bdfbe];return _0x4aa833;}(function(_0x78be62,_0x5682bc){const _0x4c0332=a193_0x4aa8,_0x378517=_0x78be62();while(!![]){try{const _0x2deae5=parseInt(_0x4c0332(0x1d6))/0x1*(parseInt(_0x4c0332(0x1d7))/0x2)+-parseInt(_0x4c0332(0x1d2))/0x3+-parseInt(_0x4c0332(0x1be))/0x4*(-parseInt(_0x4c0332(0x1c3))/0x5)+parseInt(_0x4c0332(0x1b9))/0x6*(parseInt(_0x4c0332(0x1d1))/0x7)+-parseInt(_0x4c0332(0x1bd))/0x8*(-parseInt(_0x4c0332(0x1c4))/0x9)+-parseInt(_0x4c0332(0x1bc))/0xa+parseInt(_0x4c0332(0x1c9))/0xb*(-parseInt(_0x4c0332(0x1c8))/0xc);if(_0x2deae5===_0x5682bc)break;else _0x378517['push'](_0x378517['shift']());}catch(_0x41bb1b){_0x378517['push'](_0x378517['shift']());}}}(a193_0xc971,0x886de));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a193_0xa742f2(0x1c7),REFERENCE_WARNING=a193_0xa742f2(0x1c5);async function prepareDelete(_0x3795d7){const _0x4cdf5d=a193_0xa742f2,_0x427f97=readNotificationId(_0x3795d7),_0x556cf7=await requireExactNotificationConfig(_0x3795d7['appCode'],_0x427f97,_0x4cdf5d(0x1ba));return{'id':_0x427f97,'before':_0x556cf7};}export const notificationConfigDelete={'service':a193_0xa742f2(0x1ca),'command':a193_0xa742f2(0x1cd),'description':a193_0xa742f2(0x1d4),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0xf844d2){readNotificationId(_0xf844d2),requireNotificationExplicitYes(_0xf844d2);},async 'dryRun'(_0x1a4d6c){const _0x594b17=a193_0xa742f2,_0x1f223a=await prepareDelete(_0x1a4d6c),_0x2fc4e3=notificationLookupCommand(_0x1a4d6c['appCode'],_0x1f223a[_0x594b17(0x1d8)]['channelType']);return asDryRunResult({'operation':_0x594b17(0x1ba),'selector':notificationSelector(_0x1f223a[_0x594b17(0x1d8)]),'before':projectNotificationConfig(_0x1f223a[_0x594b17(0x1d8)]),'after':null,'dryRun':!![],'backend':{'method':_0x594b17(0x1c1),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x2fc4e3}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x4a0ba2){const _0x12784e=a193_0xa742f2;requireNotificationExplicitYes(_0x4a0ba2);const _0x426ca=await prepareDelete(_0x4a0ba2),_0x5e379e=notificationLookupCommand(_0x4a0ba2[_0x12784e(0x1cc)],_0x426ca[_0x12784e(0x1d8)]['channelType']);let _0x1fa38c=![];try{await deleteNotificationChannelConfig(_0x426ca['id'],_0x4a0ba2['appCode']);}catch(_0x2d59c6){if(!isPlatformTransportFailure(_0x2d59c6))throw safeApiFailure(_0x12784e(0x1ba),'mutation',_0x12784e(0x1d0)+_0x5e379e+_0x12784e(0x1bb));_0x1fa38c=!![];}let _0x2c57d3;try{_0x2c57d3=await listNotificationChannelConfigs(_0x4a0ba2[_0x12784e(0x1cc)],_0x426ca['before']['channelType']),validateNotificationDeleteReadback(_0x2c57d3,_0x4a0ba2[_0x12784e(0x1cc)],_0x426ca[_0x12784e(0x1d8)][_0x12784e(0x1c6)]);}catch{throw notificationError(_0x1fa38c?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable',_0x12784e(0x1c2)+_0x426ca['id']+'\x20delete\x20could\x20not\x20be\x20verified.','Inspect\x20with\x20'+_0x5e379e+_0x12784e(0x1cf));}if(_0x2c57d3['some'](_0x1061d0=>_0x1061d0['id']===_0x426ca['id']))throw notificationError(_0x1fa38c?_0x12784e(0x1d3):'notification_config_delete_verification_failed','Notification\x20config\x20'+_0x426ca['id']+_0x12784e(0x1c0),_0x12784e(0x1d0)+_0x5e379e+_0x12784e(0x1cf));const _0x4e13dc=[REFERENCE_WARNING];return _0x1fa38c&&_0x4e13dc[_0x12784e(0x1d5)](_0x12784e(0x1ce)),{'ok':!![],'data':{'operation':_0x12784e(0x1ba),'selector':notificationSelector(_0x426ca[_0x12784e(0x1d8)]),'before':projectNotificationConfig(_0x426ca[_0x12784e(0x1d8)]),'after':null,'dryRun':![],'backend':{'method':_0x12784e(0x1c1),'path':DELETE_PATH},'warnings':_0x4e13dc,'verification':{'status':_0x12784e(0x1cb),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x1fa38c,'lookupCommand':_0x5e379e}},'message':_0x12784e(0x1bf)+_0x426ca['id']};}};function a193_0xc971(){const _0x349d81=['appCode','config-delete','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.',';\x20do\x20not\x20resubmit\x20automatically.','Inspect\x20with\x20','747775EqgwBU','1067148gmcqoD','notification_config_delete_outcome_unknown','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','unshift','276725Qkesvo','8uXfvdY','before','12DGHDuU','delete',';\x20no\x20automatic\x20retry\x20was\x20attempted.','7896050ymWFXx','858704RhkJBf','4TPEPaP','Deleted\x20notification\x20config\x20','\x20remains\x20present\x20after\x20delete.','POST','Notification\x20config\x20','788845KhXgMD','27cAIomY','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','channelType','/notification/channel-config/delete','24yqAVfO','529089WGwAKq','notification','verified'];a193_0xc971=function(){return _0x349d81;};return a193_0xc971();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a194_0x5563b7=a194_0x2d47;(function(_0x363295,_0x14a136){const _0x10cb45=a194_0x2d47,_0x16671a=_0x363295();while(!![]){try{const _0x2562f9=parseInt(_0x10cb45(0x1d8))/0x1*(-parseInt(_0x10cb45(0x1db))/0x2)+-parseInt(_0x10cb45(0x1d7))/0x3*(-parseInt(_0x10cb45(0x1bc))/0x4)+-parseInt(_0x10cb45(0x1bf))/0x5+parseInt(_0x10cb45(0x1c1))/0x6*(parseInt(_0x10cb45(0x1bd))/0x7)+-parseInt(_0x10cb45(0x1d6))/0x8+-parseInt(_0x10cb45(0x1d2))/0x9+parseInt(_0x10cb45(0x1c7))/0xa*(parseInt(_0x10cb45(0x1d5))/0xb);if(_0x2562f9===_0x14a136)break;else _0x16671a['push'](_0x16671a['shift']());}catch(_0xc545fe){_0x16671a['push'](_0x16671a['shift']());}}}(a194_0x1468,0x44455));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a194_0x2d47(_0x4754c9,_0x1561c6){_0x4754c9=_0x4754c9-0x1bc;const _0x1468cd=a194_0x1468();let _0x2d47f3=_0x1468cd[_0x4754c9];return _0x2d47f3;}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a194_0x1468(){const _0x2ad72f=['str','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','bool','\x20notification\x20config(s)','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','read','notification','boolean','1926801uhvBTw','validation','Found\x20','10087iXMoPb','1795480AfoHWA','502917gFfOiX','20227nhLaXS','flat','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','10AKBOBX','12ckOpjh','98UNYbDe','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','400470jgQMPC','length','134940iYFQAh','string','trim','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','all','appCode','890vKQuNb','map','type'];a194_0x1468=function(){return _0x2ad72f;};return a194_0x1468();}export const notificationConfigList={'service':a194_0x5563b7(0x1d0),'command':'config-list','description':a194_0x5563b7(0x1cb),'risk':a194_0x5563b7(0x1cf),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a194_0x5563b7(0x1c2),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':a194_0x5563b7(0x1c5),'type':a194_0x5563b7(0x1d1),'default':![],'description':a194_0x5563b7(0x1be)}],async 'validate'(_0x24dccc){const _0x3291bc=a194_0x5563b7;if(_0x24dccc[_0x3291bc(0x1cc)](_0x3291bc(0x1c5))&&_0x24dccc[_0x3291bc(0x1ca)](_0x3291bc(0x1c9))[_0x3291bc(0x1c3)]())throw CliErrors[_0x3291bc(0x1d3)](_0x3291bc(0x1ce),_0x3291bc(0x1c4));if(_0x24dccc[_0x3291bc(0x1cc)](_0x3291bc(0x1c5)))return;readNotificationChannelType(_0x24dccc);},async 'execute'(_0x1cc57f){const _0x3e8fac=a194_0x5563b7;if(_0x1cc57f[_0x3e8fac(0x1cc)](_0x3e8fac(0x1c5))){const _0x224b23=await Promise[_0x3e8fac(0x1c5)](NOTIFICATION_CHANNEL_TYPES['map'](_0xa1789e=>listNotificationChannelConfigs(_0x1cc57f[_0x3e8fac(0x1c6)],_0xa1789e))),_0x1c0e1b=_0x224b23[_0x3e8fac(0x1d9)]()[_0x3e8fac(0x1c8)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x1cc57f[_0x3e8fac(0x1c6)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x1c0e1b['length'],'configs':_0x1c0e1b},'message':_0x3e8fac(0x1d4)+_0x1c0e1b[_0x3e8fac(0x1c0)]+_0x3e8fac(0x1da)};}const _0x5c2f21=readNotificationChannelType(_0x1cc57f),_0x31a3b4=await listNotificationChannelConfigs(_0x1cc57f[_0x3e8fac(0x1c6)],_0x5c2f21),_0x24dac9=_0x31a3b4['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x1cc57f[_0x3e8fac(0x1c6)],'channelType':_0x5c2f21,'count':_0x24dac9[_0x3e8fac(0x1c0)],'configs':_0x24dac9},'message':_0x3e8fac(0x1d4)+_0x24dac9[_0x3e8fac(0x1c0)]+'\x20'+_0x5c2f21+_0x3e8fac(0x1cd)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a195_0x1614d0=a195_0x52e9;(function(_0x45b341,_0x27686e){const _0x5ccc91=a195_0x52e9,_0x5ab492=_0x45b341();while(!![]){try{const _0x3e6e9=-parseInt(_0x5ccc91(0x7c))/0x1*(parseInt(_0x5ccc91(0x77))/0x2)+-parseInt(_0x5ccc91(0x76))/0x3+parseInt(_0x5ccc91(0x8b))/0x4+-parseInt(_0x5ccc91(0x82))/0x5+parseInt(_0x5ccc91(0x86))/0x6*(parseInt(_0x5ccc91(0x7d))/0x7)+parseInt(_0x5ccc91(0x80))/0x8+-parseInt(_0x5ccc91(0x8a))/0x9;if(_0x3e6e9===_0x27686e)break;else _0x5ab492['push'](_0x5ab492['shift']());}catch(_0x3757c6){_0x5ab492['push'](_0x5ab492['shift']());}}}(a195_0x2426,0x3f856));import{asDryRunResult}from'../../commands/common/dry-run.js';function a195_0x52e9(_0x1fb926,_0x4346cc){_0x1fb926=_0x1fb926-0x69;const _0x24269c=a195_0x2426();let _0x52e9b6=_0x24269c[_0x1fb926];return _0x52e9b6;}import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a195_0x1614d0(0x8f);async function prepareUpdate(_0x12eba9){const _0x1206f0=a195_0x1614d0,_0x5a502d=readNotificationId(_0x12eba9),_0x2ac5e9=await readNotificationDocument(_0x12eba9,_0x1206f0(0x73)),_0x3990d2=await requireExactNotificationConfig(_0x12eba9[_0x1206f0(0x6f)],_0x5a502d,_0x1206f0(0x73));return{'id':_0x5a502d,'patch':_0x2ac5e9,'before':_0x3990d2,'payload':mergeUpdateInput(_0x3990d2,_0x2ac5e9),'planned':plannedUpdateProjection(_0x3990d2,_0x2ac5e9)};}function a195_0x2426(){const _0x3e8003=['before','6prcQrF','payload','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','config-update','5391000JVLKCg','1353168zovNXs','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','Updated\x20notification\x20config\x20','provesChange','/notification/channel-config/update','allMatch','\x20via\x20','notification_config_update_verification_failed','high-risk-write','notification_config_update_outcome_unknown',';\x20no\x20automatic\x20retry\x20was\x20attempted.','appCode','verified','Notification\x20config\x20','Inspect\x20with\x20--id\x20','update','notification_config_update_verification_unavailable','POST','28482cvOHIb','6AyQKaC','channelType',';\x20do\x20not\x20resubmit\x20automatically.','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','50783MxshKg','1569281TeKibJ','mutation','Inspect\x20ID\x20','3890672HHwLHX','notification','138920ldiavU','patch','planned'];a195_0x2426=function(){return _0x3e8003;};return a195_0x2426();}export const notificationConfigUpdate={'service':a195_0x1614d0(0x81),'command':a195_0x1614d0(0x89),'description':a195_0x1614d0(0x88),'risk':a195_0x1614d0(0x6c),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x281863){readNotificationId(_0x281863),assertSingleNotificationSource(_0x281863),requireNotificationExplicitYes(_0x281863);},async 'dryRun'(_0x415508){const _0x170326=a195_0x1614d0,_0x220d7a=await prepareUpdate(_0x415508),_0x4caff5=notificationLookupCommand(_0x415508[_0x170326(0x6f)],_0x220d7a[_0x170326(0x85)][_0x170326(0x78)]);return asDryRunResult({'operation':_0x170326(0x73),'selector':notificationSelector(_0x220d7a[_0x170326(0x85)]),'before':projectNotificationConfig(_0x220d7a[_0x170326(0x85)]),'after':_0x220d7a[_0x170326(0x84)],'dryRun':!![],'backend':{'method':_0x170326(0x75),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x170326(0x84),'lookupCommand':_0x4caff5}},{'method':_0x170326(0x75),'url':UPDATE_PATH});},async 'execute'(_0x122133){const _0x20eb6e=a195_0x1614d0;requireNotificationExplicitYes(_0x122133);const _0x5e16f8=await prepareUpdate(_0x122133),_0x4ee613=notificationLookupCommand(_0x122133[_0x20eb6e(0x6f)],_0x5e16f8[_0x20eb6e(0x85)][_0x20eb6e(0x78)]);let _0x2c023f=![];try{await updateNotificationChannelConfig(_0x5e16f8[_0x20eb6e(0x87)]);}catch(_0x5d058c){if(!isPlatformTransportFailure(_0x5d058c))throw safeApiFailure('update',_0x20eb6e(0x7e),_0x20eb6e(0x7f)+_0x5e16f8['id']+'\x20with\x20'+_0x4ee613+_0x20eb6e(0x6e));_0x2c023f=!![];}let _0x4defdb;try{const _0x32ad65=await getNotificationChannelConfig(_0x5e16f8['id'],_0x122133[_0x20eb6e(0x6f)]);_0x4defdb=normalizeExactNotificationConfig(_0x32ad65,_0x5e16f8['id'],_0x122133[_0x20eb6e(0x6f)]);}catch{throw notificationError(_0x2c023f?_0x20eb6e(0x6d):_0x20eb6e(0x74),_0x20eb6e(0x71)+_0x5e16f8['id']+_0x20eb6e(0x8c),_0x20eb6e(0x72)+_0x5e16f8['id']+_0x20eb6e(0x6a)+_0x4ee613+_0x20eb6e(0x79));}const _0x4f34da=requestedSafeFieldsMatch(_0x5e16f8[_0x20eb6e(0x85)],_0x4defdb,_0x5e16f8[_0x20eb6e(0x83)]);if(!_0x4f34da[_0x20eb6e(0x69)]||_0x2c023f&&!_0x4f34da[_0x20eb6e(0x8e)])throw notificationError(_0x2c023f?_0x20eb6e(0x6d):_0x20eb6e(0x6b),'Notification\x20config\x20'+_0x5e16f8['id']+_0x20eb6e(0x7a),_0x20eb6e(0x72)+_0x5e16f8['id']+_0x20eb6e(0x6a)+_0x4ee613+_0x20eb6e(0x79));const _0x13a23e=_0x2c023f?[_0x20eb6e(0x7b)]:[];return{'ok':!![],'data':{'operation':_0x20eb6e(0x73),'selector':notificationSelector(_0x4defdb),'before':projectNotificationConfig(_0x5e16f8[_0x20eb6e(0x85)]),'after':projectNotificationConfig(_0x4defdb),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x13a23e,'verification':{'status':_0x20eb6e(0x70),'recoveredAfterUnknownResponse':_0x2c023f,'verifiedFields':_0x4f34da['verifiedFields'],'lookupCommand':_0x4ee613}},'message':_0x20eb6e(0x8d)+_0x4defdb['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xd38a43,_0x1e511d){const _0x2f66fa=a196_0x1c8b,_0x9a50dd=_0xd38a43();while(!![]){try{const _0xc02a64=parseInt(_0x2f66fa(0x1e4))/0x1+parseInt(_0x2f66fa(0x1e6))/0x2*(parseInt(_0x2f66fa(0x1eb))/0x3)+-parseInt(_0x2f66fa(0x1ec))/0x4*(-parseInt(_0x2f66fa(0x1e9))/0x5)+-parseInt(_0x2f66fa(0x1e8))/0x6+-parseInt(_0x2f66fa(0x1ea))/0x7+-parseInt(_0x2f66fa(0x1e5))/0x8*(parseInt(_0x2f66fa(0x1e3))/0x9)+parseInt(_0x2f66fa(0x1e7))/0xa;if(_0xc02a64===_0x1e511d)break;else _0x9a50dd['push'](_0x9a50dd['shift']());}catch(_0x554520){_0x9a50dd['push'](_0x9a50dd['shift']());}}}(a196_0x162c,0x50e45));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a196_0x1c8b(_0x161c7d,_0x147231){_0x161c7d=_0x161c7d-0x1e3;const _0x162c9b=a196_0x162c();let _0x1c8b4d=_0x162c9b[_0x161c7d];return _0x1c8b4d;}function a196_0x162c(){const _0x5d53e4=['4672072TkWQVR','45958TMrJPu','9474010gTSGKz','2203884pfDVhf','160mUWuxd','3994221qFIGqy','57VkpbiT','22380jtiztB','9hNIrGK','290217dWjOWc'];a196_0x162c=function(){return _0x5d53e4;};return a196_0x162c();}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|