@lovrabet/rabetbase-cli 2.5.7-beta.1 → 2.5.8-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/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.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.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-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 +1 -1
- 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(_0x402a7c,_0x275f0e){const _0x465b8a=a186_0x134f,_0x5c8492=_0x402a7c();while(!![]){try{const _0x41e247=-parseInt(_0x465b8a(0x152))/0x1+-parseInt(_0x465b8a(0x16c))/0x2*(-parseInt(_0x465b8a(0x170))/0x3)+-parseInt(_0x465b8a(0x169))/0x4*(-parseInt(_0x465b8a(0x151))/0x5)+-parseInt(_0x465b8a(0x167))/0x6+-parseInt(_0x465b8a(0x14e))/0x7*(parseInt(_0x465b8a(0x148))/0x8)+parseInt(_0x465b8a(0x17a))/0x9+parseInt(_0x465b8a(0x166))/0xa;if(_0x41e247===_0x275f0e)break;else _0x5c8492['push'](_0x5c8492['shift']());}catch(_0x35f422){_0x5c8492['push'](_0x5c8492['shift']());}}}(a186_0x190d,0x866d7));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a186_0x190d(){const _0x35cc0a=[').\x20','resources','label','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','mode','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','4595193eHJInY','replace','paths','map','dryRun','path','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','menuIds','string','Invalid\x20--params:\x20','rejected','force','menu\x20asset-update\x20cannot\x20patch\x20','\x20existing\x20JS\x20resources\x20for\x20\x22','.\x20Allowed\x20values:\x20replace,\x20patch','field','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','--params.','21224GEkPsU','selection','patch','join','all','.js','2737HlzCgA','loadScriptMode','cwd','594595xleQfQ','552953GOgmph','extend','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','isArray','some','menu-asset-update','jsUrl','toLowerCase','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','CSS\x20URL\x20is\x20unreachable:\x20','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','has','unshift','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','filter','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','push','after','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','9456920qZahMz','219678MRHQIc','Menu\x20asset\x20update\x20completed','4ewLwJm','.css','endsWith','3042ukfwRj','\x22\x20(','trim','length','1188HrhKuC','fulfilled','cssUrl','JS\x20URL\x20is\x20unreachable:\x20'];a186_0x190d=function(){return _0x35cc0a;};return a186_0x190d();}function validateParams(_0x4efca3){const _0x2238a1=a186_0x134f,_0x44685b=[];return _0x4efca3[_0x2238a1(0x159)]&&!isValidJsHttpsUrl(_0x4efca3[_0x2238a1(0x159)])&&_0x44685b[_0x2238a1(0x163)]({'field':_0x2238a1(0x159),'message':_0x2238a1(0x165)}),_0x4efca3[_0x2238a1(0x172)]&&!isValidCssHttpsUrl(_0x4efca3['cssUrl'])&&_0x44685b[_0x2238a1(0x163)]({'field':_0x2238a1(0x172),'message':_0x2238a1(0x162)}),_0x44685b;}export async function runMenuUpdateCore(_0x11c0fd,_0x4c038c,_0x63bd66,_0x594bdc={}){const _0x3fc780=a186_0x134f,_0x4a0fa5=parseUpdateParamsFlag(_0x63bd66),_0x2fcc19=normalizeMode(_0x594bdc[_0x3fc780(0x178)]);validateSelection(_0x594bdc['selection']);const _0x37d685=[];if(_0x4a0fa5[_0x3fc780(0x159)])_0x37d685[_0x3fc780(0x163)](_0x4a0fa5[_0x3fc780(0x159)]);if(_0x4a0fa5[_0x3fc780(0x172)])_0x37d685['push'](_0x4a0fa5['cssUrl']);const _0x425e6b=validateParams(_0x4a0fa5);if(_0x425e6b[_0x3fc780(0x16f)]>0x0){const _0x46a105=_0x425e6b[_0x3fc780(0x17d)](_0x836790=>_0x3fc780(0x147)+_0x836790[_0x3fc780(0x145)]+':\x20'+_0x836790['message'])[_0x3fc780(0x14b)](';\x20');throw new Error(_0x3fc780(0x183)+_0x46a105);}if(_0x37d685[_0x3fc780(0x16f)]===0x0)throw new Error(_0x3fc780(0x160)+_0x3fc780(0x15d));logger['setLogPath'](process[_0x3fc780(0x150)]()),logger['info'](_0x3fc780(0x158),'Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x11c0fd,'jsUrl':_0x4a0fa5['jsUrl'],'cssUrl':_0x4a0fa5[_0x3fc780(0x172)],'mode':_0x2fcc19,'dryRun':_0x594bdc[_0x3fc780(0x17e)]===!![]});if(_0x4a0fa5[_0x3fc780(0x159)]){const _0x26267b=await isUrlReachable(_0x4a0fa5['jsUrl']);if(!_0x26267b)throw new Error(_0x3fc780(0x173)+_0x4a0fa5[_0x3fc780(0x159)]);}if(_0x4a0fa5['cssUrl']){const _0x31343a=await isUrlReachable(_0x4a0fa5['cssUrl']);if(!_0x31343a)throw new Error(_0x3fc780(0x15c)+_0x4a0fa5['cssUrl']);}const _0x205c11=await getOnlineMenuList(_0x11c0fd,_0x4c038c),_0x45d2e9=_0x205c11[_0x3fc780(0x161)](_0x3e535d=>_0x3e535d['resources'][_0x3fc780(0x16f)]>0x0),_0x2db70c=selectMenusForUpdate(_0x45d2e9,_0x594bdc[_0x3fc780(0x149)]);if(_0x2db70c[_0x3fc780(0x16f)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x594bdc['dryRun']===!![]};const _0x38c48b=_0x2db70c[_0x3fc780(0x17d)](_0x187ca3=>buildMenuUpdateDiff(_0x187ca3,_0x4a0fa5,_0x2fcc19,_0x594bdc[_0x3fc780(0x185)]===!![],_0x594bdc[_0x3fc780(0x14f)]));if(_0x594bdc[_0x3fc780(0x17e)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x38c48b};const _0x2ce807=await Promise['allSettled'](_0x2db70c[_0x3fc780(0x17d)]((_0x4d5019,_0x53d5e0)=>updateMenuCdnUrl(_0x11c0fd,_0x4c038c,{'id':_0x4d5019['id'],'label':_0x4d5019[_0x3fc780(0x176)],'path':_0x4d5019['path'],'resources':_0x38c48b[_0x53d5e0][_0x3fc780(0x164)]['resources'],'extend':_0x4d5019[_0x3fc780(0x153)]??null,'loadScriptMode':_0x594bdc[_0x3fc780(0x14f)]}))),_0x579408=_0x2ce807['filter'](_0x596200=>_0x596200['status']===_0x3fc780(0x171))[_0x3fc780(0x17d)](_0x479a41=>_0x479a41['value']),_0x135be3=_0x2ce807[_0x3fc780(0x161)](_0x229c5f=>_0x229c5f['status']===_0x3fc780(0x184))[_0x3fc780(0x16f)];return logger['info']('menu-asset-update',_0x3fc780(0x168),{'count':_0x2db70c[_0x3fc780(0x16f)],'resources':_0x37d685}),{'updated':_0x579408[_0x3fc780(0x16f)],'failed':_0x135be3,'skipped':![],'menus':_0x579408};}function validateSelection(_0xcd3a){const _0x27a379=a186_0x134f;if(!_0xcd3a)throw new Error(_0x27a379(0x179));if(_0xcd3a[_0x27a379(0x14c)]&&(_0xcd3a[_0x27a379(0x181)]['length']>0x0||_0xcd3a[_0x27a379(0x17c)]['length']>0x0))throw new Error(_0x27a379(0x154));if(!_0xcd3a[_0x27a379(0x14c)]&&_0xcd3a[_0x27a379(0x181)][_0x27a379(0x16f)]===0x0&&_0xcd3a[_0x27a379(0x17c)][_0x27a379(0x16f)]===0x0)throw new Error(_0x27a379(0x179));}export function selectMenusForUpdate(_0x2694c5,_0x1b95b7){const _0x471d79=a186_0x134f;validateSelection(_0x1b95b7);if(_0x1b95b7[_0x471d79(0x14c)])return _0x2694c5;const _0x4485de=new Set(_0x2694c5[_0x471d79(0x17d)](_0x3fe5b0=>_0x3fe5b0['id'])),_0x4b6d27=new Set(_0x2694c5[_0x471d79(0x17d)](_0xd842a9=>_0xd842a9[_0x471d79(0x17f)])),_0x536b78=_0x1b95b7['menuIds'][_0x471d79(0x161)](_0xc3078d=>!_0x4485de['has'](_0xc3078d)),_0x2cbbf7=_0x1b95b7[_0x471d79(0x17c)][_0x471d79(0x161)](_0x5616e5=>!_0x4b6d27[_0x471d79(0x15e)](_0x5616e5));if(_0x536b78['length']>0x0||_0x2cbbf7[_0x471d79(0x16f)]>0x0){const _0x2be5ac=[..._0x536b78[_0x471d79(0x17d)](_0x2fa015=>String(_0x2fa015)),..._0x2cbbf7][_0x471d79(0x14b)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x2be5ac);}const _0xfcab9b=new Set(_0x1b95b7['menuIds']),_0x5373db=new Set(_0x1b95b7[_0x471d79(0x17c)]);return _0x2694c5[_0x471d79(0x161)](_0x335d82=>_0xfcab9b[_0x471d79(0x15e)](_0x335d82['id'])||_0x5373db[_0x471d79(0x15e)](_0x335d82[_0x471d79(0x17f)]));}function normalizeMode(_0x208e73){const _0x5b1c8d=a186_0x134f;if(!_0x208e73)return _0x5b1c8d(0x14a);if(_0x208e73===_0x5b1c8d(0x17b)||_0x208e73===_0x5b1c8d(0x14a))return _0x208e73;throw new Error('Invalid\x20--mode:\x20'+_0x208e73+_0x5b1c8d(0x144));}function buildMenuUpdateDiff(_0x22ac4d,_0xc8c5d4,_0x597119,_0x7ade5c,_0x33210f){const _0x22d7f6=a186_0x134f,_0x4ebd5a=[..._0x22ac4d[_0x22d7f6(0x175)]];_0x597119==='patch'&&assertUnambiguousPatchResources(_0x22ac4d,_0x4ebd5a,_0xc8c5d4);const _0x3dab97=_0x597119===_0x22d7f6(0x14a)?patchResources(_0x4ebd5a,_0xc8c5d4):replaceResources(_0xc8c5d4),_0x14864f=[],_0x53ac5f=_0x4ebd5a['some'](isJsResource),_0x55379b=_0x3dab97[_0x22d7f6(0x157)](isJsResource);if(_0x53ac5f&&!_0x55379b){const _0x176bcb=_0x22d7f6(0x146)+_0x22ac4d[_0x22d7f6(0x176)]+_0x22d7f6(0x16d)+_0x22ac4d[_0x22d7f6(0x17f)]+_0x22d7f6(0x174)+_0x22d7f6(0x177);if(!_0x7ade5c)throw new Error(_0x176bcb);_0x14864f[_0x22d7f6(0x163)](_0x176bcb);}const _0x286d46=_0x4ebd5a['some'](isCssResource),_0x290239=_0x3dab97[_0x22d7f6(0x157)](isCssResource);_0x286d46&&!_0x290239&&_0x14864f[_0x22d7f6(0x163)](_0x22d7f6(0x180)+_0x22ac4d[_0x22d7f6(0x176)]+'\x22\x20('+_0x22ac4d[_0x22d7f6(0x17f)]+').');const _0x328415=typeof _0x22ac4d[_0x22d7f6(0x153)]?.['loadScriptMode']===_0x22d7f6(0x182)?_0x22ac4d[_0x22d7f6(0x153)][_0x22d7f6(0x14f)]:null,_0x4408b4=_0x33210f?{'loadScriptMode':_0x328415}:{},_0x345b95=_0x33210f?{'loadScriptMode':_0x33210f}:{};return{'id':_0x22ac4d['id'],'label':_0x22ac4d[_0x22d7f6(0x176)],'path':_0x22ac4d[_0x22d7f6(0x17f)],'mode':_0x597119,'before':{'resources':_0x4ebd5a,..._0x4408b4},'after':{'resources':_0x3dab97,..._0x345b95},'warnings':_0x14864f};}function replaceResources(_0x108957){const _0x14b14f=a186_0x134f;return[_0x108957[_0x14b14f(0x159)],_0x108957[_0x14b14f(0x172)]]['filter'](_0x2088b7=>!!_0x2088b7);}function assertUnambiguousPatchResources(_0x4e4ebf,_0x7c4230,_0x49fd08){const _0x43378a=a186_0x134f,_0x3502ed=_0x7c4230[_0x43378a(0x161)](isJsResource)[_0x43378a(0x16f)];if(_0x49fd08['jsUrl']&&_0x3502ed>0x1)throw new Error(_0x43378a(0x142)+_0x3502ed+_0x43378a(0x143)+_0x4e4ebf[_0x43378a(0x176)]+_0x43378a(0x16d)+_0x4e4ebf[_0x43378a(0x17f)]+')\x20'+_0x43378a(0x15b));const _0x2fd9e4=_0x7c4230[_0x43378a(0x161)](isCssResource)[_0x43378a(0x16f)];if(_0x49fd08['cssUrl']&&_0x2fd9e4>0x1)throw new Error(_0x43378a(0x142)+_0x2fd9e4+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x4e4ebf[_0x43378a(0x176)]+_0x43378a(0x16d)+_0x4e4ebf['path']+')\x20'+_0x43378a(0x155));}function patchResources(_0x353765,_0x5ab2f1){const _0x7a770c=a186_0x134f;let _0x53972c=![],_0x4f31ad=![];const _0x3d32e2=[];for(const _0x160d9c of _0x353765){if(isJsResource(_0x160d9c)){if(_0x5ab2f1[_0x7a770c(0x159)]&&!_0x53972c)_0x3d32e2['push'](_0x5ab2f1[_0x7a770c(0x159)]),_0x53972c=!![];else!_0x5ab2f1[_0x7a770c(0x159)]&&_0x3d32e2[_0x7a770c(0x163)](_0x160d9c);continue;}if(isCssResource(_0x160d9c)){if(_0x5ab2f1['cssUrl']&&!_0x4f31ad)_0x3d32e2[_0x7a770c(0x163)](_0x5ab2f1[_0x7a770c(0x172)]),_0x4f31ad=!![];else!_0x5ab2f1['cssUrl']&&_0x3d32e2['push'](_0x160d9c);continue;}_0x3d32e2[_0x7a770c(0x163)](_0x160d9c);}return _0x5ab2f1[_0x7a770c(0x159)]&&!_0x53972c&&_0x3d32e2[_0x7a770c(0x15f)](_0x5ab2f1[_0x7a770c(0x159)]),_0x5ab2f1[_0x7a770c(0x172)]&&!_0x4f31ad&&_0x3d32e2[_0x7a770c(0x163)](_0x5ab2f1[_0x7a770c(0x172)]),_0x3d32e2;}function isJsResource(_0x4979a5){const _0x56af31=a186_0x134f;return stripQuery(_0x4979a5)[_0x56af31(0x15a)]()[_0x56af31(0x16b)](_0x56af31(0x14d));}function isCssResource(_0x171aa2){const _0x2c2095=a186_0x134f;return stripQuery(_0x171aa2)[_0x2c2095(0x15a)]()[_0x2c2095(0x16b)](_0x2c2095(0x16a));}function stripQuery(_0x5c4287){return _0x5c4287['split']('?')[0x0]??_0x5c4287;}function a186_0x134f(_0x47599f,_0x18e572){_0x47599f=_0x47599f-0x142;const _0x190d4c=a186_0x190d();let _0x134fdb=_0x190d4c[_0x47599f];return _0x134fdb;}function parseUpdateParamsFlag(_0xbc7e0){const _0x38fab5=a186_0x134f;if(!_0xbc7e0||typeof _0xbc7e0!==_0x38fab5(0x182))return{};try{const _0x45c7f4=JSON['parse'](_0xbc7e0);if(typeof _0x45c7f4!=='object'||_0x45c7f4===null||Array[_0x38fab5(0x156)](_0x45c7f4))return{};return{'jsUrl':typeof _0x45c7f4[_0x38fab5(0x159)]==='string'?_0x45c7f4[_0x38fab5(0x159)][_0x38fab5(0x16e)]():undefined,'cssUrl':typeof _0x45c7f4[_0x38fab5(0x172)]==='string'?_0x45c7f4['cssUrl'][_0x38fab5(0x16e)]():undefined};}catch{return{};}}
|
|
1
|
+
(function(_0x47bfa9,_0x1b996e){const _0x4db602=a186_0x164f,_0x42ef70=_0x47bfa9();while(!![]){try{const _0x36b29b=-parseInt(_0x4db602(0x176))/0x1+parseInt(_0x4db602(0x167))/0x2+parseInt(_0x4db602(0x171))/0x3+parseInt(_0x4db602(0x141))/0x4*(parseInt(_0x4db602(0x14e))/0x5)+-parseInt(_0x4db602(0x172))/0x6+parseInt(_0x4db602(0x17c))/0x7*(parseInt(_0x4db602(0x179))/0x8)+-parseInt(_0x4db602(0x17e))/0x9*(parseInt(_0x4db602(0x142))/0xa);if(_0x36b29b===_0x1b996e)break;else _0x42ef70['push'](_0x42ef70['shift']());}catch(_0x3e6722){_0x42ef70['push'](_0x42ef70['shift']());}}}(a186_0x4dc0,0xc5d04));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x25b27e){const _0x37c498=a186_0x164f,_0x4dba58=[];return _0x25b27e[_0x37c498(0x14a)]&&!isValidJsHttpsUrl(_0x25b27e['jsUrl'])&&_0x4dba58['push']({'field':_0x37c498(0x14a),'message':_0x37c498(0x14d)}),_0x25b27e['cssUrl']&&!isValidCssHttpsUrl(_0x25b27e[_0x37c498(0x14b)])&&_0x4dba58[_0x37c498(0x17d)]({'field':_0x37c498(0x14b),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x4dba58;}export async function runMenuUpdateCore(_0x4da007,_0x54caf5,_0x110fb2,_0x5c0af6={}){const _0xd6118c=a186_0x164f,_0x3adf41=parseUpdateParamsFlag(_0x110fb2),_0x1342c4=normalizeMode(_0x5c0af6[_0xd6118c(0x153)]);validateSelection(_0x5c0af6['selection']);const _0x4a6f21=[];if(_0x3adf41[_0xd6118c(0x14a)])_0x4a6f21[_0xd6118c(0x17d)](_0x3adf41['jsUrl']);if(_0x3adf41[_0xd6118c(0x14b)])_0x4a6f21[_0xd6118c(0x17d)](_0x3adf41[_0xd6118c(0x14b)]);const _0x11bd50=validateParams(_0x3adf41);if(_0x11bd50[_0xd6118c(0x170)]>0x0){const _0x1a145b=_0x11bd50[_0xd6118c(0x173)](_0x4b710e=>_0xd6118c(0x151)+_0x4b710e[_0xd6118c(0x14f)]+':\x20'+_0x4b710e[_0xd6118c(0x156)])[_0xd6118c(0x15b)](';\x20');throw new Error(_0xd6118c(0x15c)+_0x1a145b);}if(_0x4a6f21['length']===0x0)throw new Error(_0xd6118c(0x15d)+_0xd6118c(0x174));logger[_0xd6118c(0x152)](process[_0xd6118c(0x149)]()),logger[_0xd6118c(0x147)](_0xd6118c(0x16a),'Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x4da007,'jsUrl':_0x3adf41[_0xd6118c(0x14a)],'cssUrl':_0x3adf41[_0xd6118c(0x14b)],'mode':_0x1342c4,'dryRun':_0x5c0af6['dryRun']===!![]});if(_0x3adf41[_0xd6118c(0x14a)]){const _0x3cdbfa=await isUrlReachable(_0x3adf41['jsUrl']);if(!_0x3cdbfa)throw new Error(_0xd6118c(0x178)+_0x3adf41[_0xd6118c(0x14a)]);}if(_0x3adf41['cssUrl']){const _0x5f54e6=await isUrlReachable(_0x3adf41['cssUrl']);if(!_0x5f54e6)throw new Error(_0xd6118c(0x160)+_0x3adf41[_0xd6118c(0x14b)]);}const _0x461a10=await getOnlineMenuList(_0x4da007,_0x54caf5),_0x46bc3b=_0x461a10[_0xd6118c(0x169)](_0x3d221e=>_0x3d221e[_0xd6118c(0x164)][_0xd6118c(0x170)]>0x0),_0x140772=selectMenusForUpdate(_0x46bc3b,_0x5c0af6['selection']);if(_0x140772[_0xd6118c(0x170)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x5c0af6['dryRun']===!![]};const _0x4895f9=_0x140772['map'](_0x1cd83f=>buildMenuUpdateDiff(_0x1cd83f,_0x3adf41,_0x1342c4,_0x5c0af6[_0xd6118c(0x161)]===!![],_0x5c0af6[_0xd6118c(0x13c)]));if(_0x5c0af6[_0xd6118c(0x15a)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x4895f9};const _0x8ab203=await Promise[_0xd6118c(0x154)](_0x140772[_0xd6118c(0x173)]((_0x448f3f,_0x3bee71)=>updateMenuCdnUrl(_0x4da007,_0x54caf5,{'id':_0x448f3f['id'],'label':_0x448f3f[_0xd6118c(0x13e)],'path':_0x448f3f[_0xd6118c(0x162)],'resources':_0x4895f9[_0x3bee71][_0xd6118c(0x165)][_0xd6118c(0x164)],'extend':_0x448f3f[_0xd6118c(0x14c)]??null,'loadScriptMode':_0x5c0af6[_0xd6118c(0x13c)]}))),_0x27f27c=_0x8ab203['filter'](_0x5bc560=>_0x5bc560[_0xd6118c(0x158)]===_0xd6118c(0x175))[_0xd6118c(0x173)](_0x2739ab=>_0x2739ab[_0xd6118c(0x177)]),_0x1bc755=_0x8ab203[_0xd6118c(0x169)](_0x41c715=>_0x41c715[_0xd6118c(0x158)]===_0xd6118c(0x143))[_0xd6118c(0x170)];return logger['info'](_0xd6118c(0x16a),_0xd6118c(0x166),{'count':_0x140772[_0xd6118c(0x170)],'resources':_0x4a6f21}),{'updated':_0x27f27c['length'],'failed':_0x1bc755,'skipped':![],'menus':_0x27f27c};}function validateSelection(_0x4a4b98){const _0x388c53=a186_0x164f;if(!_0x4a4b98)throw new Error(_0x388c53(0x180));if(_0x4a4b98[_0x388c53(0x163)]&&(_0x4a4b98[_0x388c53(0x140)]['length']>0x0||_0x4a4b98[_0x388c53(0x150)][_0x388c53(0x170)]>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x4a4b98[_0x388c53(0x163)]&&_0x4a4b98[_0x388c53(0x140)][_0x388c53(0x170)]===0x0&&_0x4a4b98[_0x388c53(0x150)][_0x388c53(0x170)]===0x0)throw new Error(_0x388c53(0x180));}export function selectMenusForUpdate(_0x1aa47c,_0x4ef1e4){const _0x230c56=a186_0x164f;validateSelection(_0x4ef1e4);if(_0x4ef1e4[_0x230c56(0x163)])return _0x1aa47c;const _0x212fa7=new Set(_0x1aa47c[_0x230c56(0x173)](_0x54b0f8=>_0x54b0f8['id'])),_0x47a005=new Set(_0x1aa47c['map'](_0x43b1ca=>_0x43b1ca[_0x230c56(0x162)])),_0x3bc83f=_0x4ef1e4['menuIds']['filter'](_0x473919=>!_0x212fa7[_0x230c56(0x157)](_0x473919)),_0x134069=_0x4ef1e4[_0x230c56(0x150)][_0x230c56(0x169)](_0x10c7f9=>!_0x47a005[_0x230c56(0x157)](_0x10c7f9));if(_0x3bc83f[_0x230c56(0x170)]>0x0||_0x134069[_0x230c56(0x170)]>0x0){const _0x1eb18a=[..._0x3bc83f[_0x230c56(0x173)](_0x3e023f=>String(_0x3e023f)),..._0x134069][_0x230c56(0x15b)](',\x20');throw new Error(_0x230c56(0x16f)+_0x1eb18a);}const _0x2ce723=new Set(_0x4ef1e4[_0x230c56(0x140)]),_0x277134=new Set(_0x4ef1e4[_0x230c56(0x150)]);return _0x1aa47c['filter'](_0x9d7930=>_0x2ce723[_0x230c56(0x157)](_0x9d7930['id'])||_0x277134[_0x230c56(0x157)](_0x9d7930[_0x230c56(0x162)]));}function normalizeMode(_0x1b39a2){const _0x243e5c=a186_0x164f;if(!_0x1b39a2)return _0x243e5c(0x17a);if(_0x1b39a2===_0x243e5c(0x168)||_0x1b39a2===_0x243e5c(0x17a))return _0x1b39a2;throw new Error('Invalid\x20--mode:\x20'+_0x1b39a2+_0x243e5c(0x155));}function buildMenuUpdateDiff(_0x2d98bc,_0x1e6e64,_0x290fd7,_0x4a0f5c,_0x3838a0){const _0x30311b=a186_0x164f,_0x7e8120=[..._0x2d98bc[_0x30311b(0x164)]];_0x290fd7==='patch'&&assertUnambiguousPatchResources(_0x2d98bc,_0x7e8120,_0x1e6e64);const _0x439016=_0x290fd7===_0x30311b(0x17a)?patchResources(_0x7e8120,_0x1e6e64):replaceResources(_0x1e6e64),_0x53a917=[],_0x13b34b=_0x7e8120['some'](isJsResource),_0x49eebf=_0x439016['some'](isJsResource);if(_0x13b34b&&!_0x49eebf){const _0xd5a45f='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x2d98bc[_0x30311b(0x13e)]+'\x22\x20('+_0x2d98bc[_0x30311b(0x162)]+').\x20'+_0x30311b(0x148);if(!_0x4a0f5c)throw new Error(_0xd5a45f);_0x53a917[_0x30311b(0x17d)](_0xd5a45f);}const _0x203842=_0x7e8120[_0x30311b(0x145)](isCssResource),_0x3a047a=_0x439016[_0x30311b(0x145)](isCssResource);_0x203842&&!_0x3a047a&&_0x53a917['push'](_0x30311b(0x16e)+_0x2d98bc[_0x30311b(0x13e)]+_0x30311b(0x144)+_0x2d98bc[_0x30311b(0x162)]+').');const _0x6c9673=typeof _0x2d98bc[_0x30311b(0x14c)]?.[_0x30311b(0x13c)]===_0x30311b(0x15f)?_0x2d98bc[_0x30311b(0x14c)][_0x30311b(0x13c)]:null,_0x259142=_0x3838a0?{'loadScriptMode':_0x6c9673}:{},_0x220382=_0x3838a0?{'loadScriptMode':_0x3838a0}:{};return{'id':_0x2d98bc['id'],'label':_0x2d98bc[_0x30311b(0x13e)],'path':_0x2d98bc[_0x30311b(0x162)],'mode':_0x290fd7,'before':{'resources':_0x7e8120,..._0x259142},'after':{'resources':_0x439016,..._0x220382},'warnings':_0x53a917};}function replaceResources(_0x4d820b){const _0x141242=a186_0x164f;return[_0x4d820b[_0x141242(0x14a)],_0x4d820b[_0x141242(0x14b)]][_0x141242(0x169)](_0x11f35d=>!!_0x11f35d);}function assertUnambiguousPatchResources(_0x2cd129,_0xbf7c98,_0x3c0d1d){const _0x45eccb=a186_0x164f,_0x38470f=_0xbf7c98['filter'](isJsResource)[_0x45eccb(0x170)];if(_0x3c0d1d[_0x45eccb(0x14a)]&&_0x38470f>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x38470f+_0x45eccb(0x13d)+_0x2cd129[_0x45eccb(0x13e)]+_0x45eccb(0x144)+_0x2cd129[_0x45eccb(0x162)]+')\x20'+'with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');const _0x1a9f23=_0xbf7c98[_0x45eccb(0x169)](isCssResource)['length'];if(_0x3c0d1d[_0x45eccb(0x14b)]&&_0x1a9f23>0x1)throw new Error(_0x45eccb(0x13f)+_0x1a9f23+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x2cd129[_0x45eccb(0x13e)]+'\x22\x20('+_0x2cd129['path']+')\x20'+'with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');}function a186_0x164f(_0xb80aa2,_0x5ad79f){_0xb80aa2=_0xb80aa2-0x13c;const _0x4dc07e=a186_0x4dc0();let _0x164f09=_0x4dc07e[_0xb80aa2];return _0x164f09;}function patchResources(_0x26c369,_0x4eca51){const _0x36183d=a186_0x164f;let _0x579f79=![],_0x1486f3=![];const _0x162179=[];for(const _0x1d48a5 of _0x26c369){if(isJsResource(_0x1d48a5)){if(_0x4eca51[_0x36183d(0x14a)]&&!_0x579f79)_0x162179[_0x36183d(0x17d)](_0x4eca51[_0x36183d(0x14a)]),_0x579f79=!![];else!_0x4eca51[_0x36183d(0x14a)]&&_0x162179[_0x36183d(0x17d)](_0x1d48a5);continue;}if(isCssResource(_0x1d48a5)){if(_0x4eca51['cssUrl']&&!_0x1486f3)_0x162179[_0x36183d(0x17d)](_0x4eca51[_0x36183d(0x14b)]),_0x1486f3=!![];else!_0x4eca51[_0x36183d(0x14b)]&&_0x162179['push'](_0x1d48a5);continue;}_0x162179[_0x36183d(0x17d)](_0x1d48a5);}return _0x4eca51[_0x36183d(0x14a)]&&!_0x579f79&&_0x162179[_0x36183d(0x15e)](_0x4eca51[_0x36183d(0x14a)]),_0x4eca51[_0x36183d(0x14b)]&&!_0x1486f3&&_0x162179[_0x36183d(0x17d)](_0x4eca51[_0x36183d(0x14b)]),_0x162179;}function isJsResource(_0x1ff5f0){const _0x50aad0=a186_0x164f;return stripQuery(_0x1ff5f0)['toLowerCase']()[_0x50aad0(0x146)](_0x50aad0(0x159));}function a186_0x4dc0(){const _0x2e7dde=['status','.js','dryRun','join','Invalid\x20--params:\x20','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','unshift','string','CSS\x20URL\x20is\x20unreachable:\x20','force','path','all','resources','after','Menu\x20asset\x20update\x20completed','1379862JcEWSB','replace','filter','menu-asset-update','.css','split','isArray','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','length','2573715KBbIEI','7384464tOnMjh','map','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','fulfilled','314866HEIfPI','value','JS\x20URL\x20is\x20unreachable:\x20','56HRnKzV','patch','trim','1569442HoNFOU','push','7460757eyGnBk','object','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','loadScriptMode','\x20existing\x20JS\x20resources\x20for\x20\x22','label','menu\x20asset-update\x20cannot\x20patch\x20','menuIds','270196KBQdfX','10xGYBms','rejected','\x22\x20(','some','endsWith','info','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','cwd','jsUrl','cssUrl','extend','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','5bTdrBa','field','paths','--params.','setLogPath','mode','allSettled','.\x20Allowed\x20values:\x20replace,\x20patch','message','has'];a186_0x4dc0=function(){return _0x2e7dde;};return a186_0x4dc0();}function isCssResource(_0x29f224){const _0x4bfbda=a186_0x164f;return stripQuery(_0x29f224)['toLowerCase']()['endsWith'](_0x4bfbda(0x16b));}function stripQuery(_0x29593f){const _0x42725a=a186_0x164f;return _0x29593f[_0x42725a(0x16c)]('?')[0x0]??_0x29593f;}function parseUpdateParamsFlag(_0x23cee2){const _0x4fac5c=a186_0x164f;if(!_0x23cee2||typeof _0x23cee2!=='string')return{};try{const _0x42aa4e=JSON['parse'](_0x23cee2);if(typeof _0x42aa4e!==_0x4fac5c(0x17f)||_0x42aa4e===null||Array[_0x4fac5c(0x16d)](_0x42aa4e))return{};return{'jsUrl':typeof _0x42aa4e[_0x4fac5c(0x14a)]===_0x4fac5c(0x15f)?_0x42aa4e[_0x4fac5c(0x14a)][_0x4fac5c(0x17b)]():undefined,'cssUrl':typeof _0x42aa4e[_0x4fac5c(0x14b)]==='string'?_0x42aa4e[_0x4fac5c(0x14b)][_0x4fac5c(0x17b)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51eaf8,_0x11be22){const _0x2dcbfe=a187_0x4905,_0x236680=_0x51eaf8();while(!![]){try{const _0x2f7480=parseInt(_0x2dcbfe(0x1b8))/0x1+parseInt(_0x2dcbfe(0x1ae))/0x2*(parseInt(_0x2dcbfe(0x1b4))/0x3)+-parseInt(_0x2dcbfe(0x1ac))/0x4*(-parseInt(_0x2dcbfe(0x1aa))/0x5)+parseInt(_0x2dcbfe(0x1b0))/0x6*(-parseInt(_0x2dcbfe(0x1ab))/0x7)+parseInt(_0x2dcbfe(0x1b7))/0x8+-parseInt(_0x2dcbfe(0x1b3))/0x9+-parseInt(_0x2dcbfe(0x1b2))/0xa;if(_0x2f7480===_0x11be22)break;else _0x236680['push'](_0x236680['shift']());}catch(_0x4eea93){_0x236680['push'](_0x236680['shift']());}}}(a187_0xcab8,0x5e3c9));function a187_0x4905(_0x4f599d,_0x331eb0){_0x4f599d=_0x4f599d-0x1aa;const _0xcab89b=a187_0xcab8();let _0x49057a=_0xcab89b[_0x4f599d];return _0x49057a;}export function isValidJsHttpsUrl(_0x46b76f){const _0x57ef02=a187_0x4905;return/^https:\/\/.+\.js(\?.*)?$/[_0x57ef02(0x1b6)](_0x46b76f['trim']());}export function isValidCssHttpsUrl(_0x2e0179){const _0x17175a=a187_0x4905;return/^https:\/\/.+\.css(\?.*)?$/[_0x17175a(0x1b6)](_0x2e0179[_0x17175a(0x1b5)]());}export async function isUrlReachable(_0x43ddd7){const _0x4e5711=a187_0x4905;try{const _0x5466bb=await fetch(_0x43ddd7,{'method':_0x4e5711(0x1ba)});if(_0x5466bb['ok'])return!![];}catch{}try{const _0x3020f9=await fetch(_0x43ddd7,{'method':_0x4e5711(0x1ad),'headers':{'Range':_0x4e5711(0x1b1)}}),_0x5c7747=_0x3020f9['ok'];try{await _0x3020f9[_0x4e5711(0x1af)]?.[_0x4e5711(0x1b9)]();}catch{}return _0x5c7747;}catch{return![];}}function a187_0xcab8(){const _0x185f47=['6kyIkvF','bytes=0-0','10096150cpVaHd','1080963yhbVwv','3579FFMPru','trim','test','5857272YbFmev','696013zaVZGN','cancel','HEAD','158995dUzhdA','3013213pCPQGd','44wdmmUA','GET','282RAgphh','body'];a187_0xcab8=function(){return _0x185f47;};return a187_0xcab8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a188_0x379125=a188_0x1339;(function(_0x47d423,_0xa9dfdf){const _0x34d6a5=a188_0x1339,_0x29bba8=_0x47d423();while(!![]){try{const _0x5d2b78=parseInt(_0x34d6a5(0x1c6))/0x1+parseInt(_0x34d6a5(0x1c2))/0x2*(parseInt(_0x34d6a5(0x1ca))/0x3)+-parseInt(_0x34d6a5(0x1c7))/0x4+parseInt(_0x34d6a5(0x1cb))/0x5+parseInt(_0x34d6a5(0x1cf))/0x6+parseInt(_0x34d6a5(0x1bf))/0x7*(-parseInt(_0x34d6a5(0x1c3))/0x8)+parseInt(_0x34d6a5(0x1cc))/0x9*(-parseInt(_0x34d6a5(0x1c9))/0xa);if(_0x5d2b78===_0xa9dfdf)break;else _0x29bba8['push'](_0x29bba8['shift']());}catch(_0x5d39d1){_0x29bba8['push'](_0x29bba8['shift']());}}}(a188_0x30e5,0xacc42));function a188_0x1339(_0x16ef5c,_0x9fcca7){_0x16ef5c=_0x16ef5c-0x1be;const _0x30e5f9=a188_0x30e5();let _0x133960=_0x30e5f9[_0x16ef5c];return _0x133960;}import{getSmartAppRecord}from'../../core/api-client.js';function a188_0x30e5(){const _0x364f40=['Inspected\x20','148230XQyBPS','757209ZfQYaB','4161160WVHcuZ','612XbiiaU','\x20menu(s)\x20for\x20','cookie','2965068KquPyW','all','\x20in\x20menu\x20host\x20','4053ftWInX','boundMenus','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','6papbtN','12568rZpJMC','menu','read','556502GHtLUR','59592qqUldo'];a188_0x30e5=function(){return _0x364f40;};return a188_0x30e5();}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_0x379125(0x1c4),'command':'subapp-assets-status','description':a188_0x379125(0x1c1),'risk':a188_0x379125(0x1c5),'strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x4f96e3){getSubappSelector(_0x4f96e3);},async 'execute'(_0x335d23){const _0x4c3795=a188_0x379125,{appCode:_0x16dd71,appName:_0x42ad0f}=getSubappSelector(_0x335d23),[_0x5d316d,_0x51b0b8]=await Promise[_0x4c3795(0x1d0)]([getSmartAppRecord(_0x16dd71,_0x335d23[_0x4c3795(0x1ce)]),getOnlineMenuList(_0x16dd71,_0x335d23[_0x4c3795(0x1ce)])]),_0xfaa50={'appCode':_0x16dd71,...buildSubappAssetsStatus(_0x5d316d,_0x51b0b8,_0x42ad0f)};return{'ok':!![],'data':_0xfaa50,'message':_0x4c3795(0x1c8)+_0xfaa50[_0x4c3795(0x1c0)]+_0x4c3795(0x1cd)+_0x42ad0f+_0x4c3795(0x1be)+_0x16dd71+'.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a189_0x4135b7=a189_0x11aa;(function(_0x5d62d8,_0x49ad84){const _0x395681=a189_0x11aa,_0xf7c065=_0x5d62d8();while(!![]){try{const _0x3ffb98=parseInt(_0x395681(0x1f4))/0x1*(parseInt(_0x395681(0x1d9))/0x2)+-parseInt(_0x395681(0x1ee))/0x3+parseInt(_0x395681(0x1cb))/0x4*(parseInt(_0x395681(0x1e6))/0x5)+parseInt(_0x395681(0x1fc))/0x6+parseInt(_0x395681(0x208))/0x7+-parseInt(_0x395681(0x1e7))/0x8+parseInt(_0x395681(0x207))/0x9;if(_0x3ffb98===_0x49ad84)break;else _0xf7c065['push'](_0xf7c065['shift']());}catch(_0x17ace5){_0xf7c065['push'](_0xf7c065['shift']());}}}(a189_0x3d4a,0x97d6e));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';function a189_0x3d4a(){const _0x344a75=['Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','Updated\x20shared\x20resources\x20for\x20','expected-hash','\x20contains\x20invalid\x20JSON.','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','1423431MhAzji','App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.','appPublishStatus','resources[','object','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','1346SwAVXJ','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','before','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','appName','extend','app.extend','stringify','4120932jjOVSx','enableAutoSync','apiError','JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs','appCode','sha256','validation','length','resources','directDbEnabled','trim','23427tVfHeJ','583667gghbIC','\x20must\x20be\x20a\x20JSON\x20object.','--resources\x20is\x20required.','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','str','map','parse','unchanged','string','expectedHash','verified\x20app.extend','menu','enableOpenApi',']\x20must\x20be\x20a\x20URL\x20string.','hex','/smartapi/app/update','44HfueIw','nextExtend','write','cookie','update','some','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','entries','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.','tenantColumn','assets','skinColor','438sUsoZp','join',';\x20independent\x20deployment\x20not\x20verified.','app.extend.assets','filter','isSafeInteger','enableSample','test','isArray','.\x20Refusing\x20update.','\x20must\x20be\x20a\x20JSON\x20array.',';\x20found\x20','subapp-assets-update','166485eAMbcF','2699488DTAsWB','protocol'];a189_0x3d4a=function(){return _0x344a75;};return a189_0x3d4a();}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_0x4135b7(0x1d8),a189_0x4135b7(0x1c7),'accessKey','assets',a189_0x4135b7(0x1d6),a189_0x4135b7(0x1df),'vipDeploy',a189_0x4135b7(0x1fd),'directDbId',a189_0x4135b7(0x205)]);function parseObject(_0x16e62d,_0x5d3e5e){const _0x44a8d5=a189_0x4135b7;let _0x2072eb=_0x16e62d;if(typeof _0x16e62d===_0x44a8d5(0x1c3))try{_0x2072eb=JSON[_0x44a8d5(0x20f)](_0x16e62d);}catch{throw CliErrors[_0x44a8d5(0x202)](_0x5d3e5e+_0x44a8d5(0x1ec));}if(!_0x2072eb||typeof _0x2072eb!==_0x44a8d5(0x1f2)||Array[_0x44a8d5(0x1e1)](_0x2072eb))throw CliErrors['validation'](_0x5d3e5e+_0x44a8d5(0x209));return _0x2072eb;}function a189_0x11aa(_0x410eb8,_0x5ef039){_0x410eb8=_0x410eb8-0x1c2;const _0x3d4a82=a189_0x3d4a();let _0x11aa38=_0x3d4a82[_0x410eb8];return _0x11aa38;}function parseArray(_0x118bfe,_0x5b0ba6){const _0x3a47f8=a189_0x4135b7;let _0x20bf9b;try{_0x20bf9b=JSON[_0x3a47f8(0x20f)](_0x118bfe);}catch{throw CliErrors[_0x3a47f8(0x202)](_0x5b0ba6+'\x20contains\x20invalid\x20JSON.');}if(!Array[_0x3a47f8(0x1e1)](_0x20bf9b))throw CliErrors[_0x3a47f8(0x202)](_0x5b0ba6+_0x3a47f8(0x1e3));return _0x20bf9b[_0x3a47f8(0x20e)]((_0x15f508,_0x3e18fb)=>parseObject(_0x15f508,_0x5b0ba6+'['+_0x3e18fb+']'));}function validateResources(_0x4952fb){const _0x50e762=a189_0x4135b7;if(_0x4952fb['length']===0x0)throw CliErrors[_0x50e762(0x202)]('At\x20least\x20one\x20resource\x20URL\x20is\x20required.');for(const [_0xfaf047,_0x24952c]of _0x4952fb[_0x50e762(0x1d2)]()){if(typeof _0x24952c!==_0x50e762(0x1c3))throw CliErrors['validation']('resources['+_0xfaf047+_0x50e762(0x1c8));try{if(new URL(_0x24952c)[_0x50e762(0x1e8)]!=='https:')throw new Error('not\x20HTTPS');}catch{throw CliErrors['validation'](_0x50e762(0x1f1)+_0xfaf047+']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.');}}if(new Set(_0x4952fb)['size']!==_0x4952fb[_0x50e762(0x203)]||!_0x4952fb[_0x50e762(0x1d0)](_0x2fe4e5=>/\.m?js(?:[?#]|$)/i['test'](_0x2fe4e5)))throw CliErrors['validation'](_0x50e762(0x1f3));return _0x4952fb;}function prepare(_0x135944,_0x3aa5b0,_0x1953d1){const _0x5167b8=a189_0x4135b7;if(!Number[_0x5167b8(0x1de)](_0x135944['id'])||(_0x135944['id']??0x0)<=0x0||typeof _0x135944['appPublishStatus']!==_0x5167b8(0x1c3)||!_0x135944[_0x5167b8(0x1f0)])throw CliErrors['validation'](_0x5167b8(0x1d1));const _0x2f9c77=parseObject(_0x135944[_0x5167b8(0x1f9)],_0x5167b8(0x1fa)),_0x19cb3d=Object['keys'](_0x2f9c77)[_0x5167b8(0x1dd)](_0x26982e=>!KNOWN_EXTEND_KEYS['has'](_0x26982e));if(_0x19cb3d[_0x5167b8(0x203)])throw CliErrors[_0x5167b8(0x202)]('Unknown\x20app.extend\x20fields:\x20'+_0x19cb3d[_0x5167b8(0x1da)](',\x20')+_0x5167b8(0x1e2));if(typeof _0x2f9c77[_0x5167b8(0x1d7)]!==_0x5167b8(0x1c3))throw CliErrors['validation'](_0x5167b8(0x20c));const _0x173531=parseArray(_0x2f9c77[_0x5167b8(0x1d7)],_0x5167b8(0x1dc)),_0x339b1c=_0x173531[_0x5167b8(0x1dd)](_0xc6ac53=>_0xc6ac53[_0x5167b8(0x1f8)]===_0x3aa5b0);if(_0x339b1c[_0x5167b8(0x203)]!==0x1)throw CliErrors[_0x5167b8(0x202)](_0x5167b8(0x1d4)+_0x3aa5b0+_0x5167b8(0x1e4)+_0x339b1c[_0x5167b8(0x203)]+'.');const _0x304fe0=_0x339b1c[0x0];if(typeof _0x304fe0[_0x5167b8(0x204)]!==_0x5167b8(0x1c3))throw CliErrors['validation'](_0x5167b8(0x1f7));let _0x19170e;try{_0x19170e=JSON[_0x5167b8(0x20f)](_0x304fe0[_0x5167b8(0x204)]);}catch{throw CliErrors['validation'](_0x5167b8(0x1ed));}if(!Array['isArray'](_0x19170e)||_0x19170e[_0x5167b8(0x1d0)](_0x46d629=>typeof _0x46d629!=='string'))throw CliErrors[_0x5167b8(0x202)](_0x5167b8(0x1f5));const _0x38ee6f=_0x173531[_0x5167b8(0x20e)](_0xb5393c=>_0xb5393c===_0x304fe0?{..._0xb5393c,'resources':JSON[_0x5167b8(0x1fb)](_0x1953d1)}:_0xb5393c),_0x46102c={..._0x2f9c77,'assets':JSON['stringify'](_0x38ee6f)},_0x115215=createHash(_0x5167b8(0x201))[_0x5167b8(0x1cf)](JSON[_0x5167b8(0x1fb)]({'appCode':_0x135944[_0x5167b8(0x200)],'id':_0x135944['id'],'appPublishStatus':_0x135944['appPublishStatus'],'extend':_0x2f9c77,'appName':_0x3aa5b0,'resources':_0x1953d1}))['digest'](_0x5167b8(0x1c9));return{'before':_0x19170e,'nextExtend':_0x46102c,'expectedHash':_0x115215,'unchanged':isDeepStrictEqual(_0x19170e,_0x1953d1)};}function flags(_0x19fe7b){const _0x43a965=a189_0x4135b7,{appCode:_0x27233c,appName:_0x5a2c9e}=getSubappSelector(_0x19fe7b),_0x231f23=_0x19fe7b[_0x43a965(0x20d)]('resources')[_0x43a965(0x206)]();if(!_0x231f23)throw CliErrors[_0x43a965(0x202)](_0x43a965(0x20a));let _0x36a7d4;try{_0x36a7d4=JSON[_0x43a965(0x20f)](_0x231f23);}catch{throw CliErrors[_0x43a965(0x202)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');}if(!Array[_0x43a965(0x1e1)](_0x36a7d4))throw CliErrors[_0x43a965(0x202)](_0x43a965(0x1d3));return{'appCode':_0x27233c,'appName':_0x5a2c9e,'resources':validateResources(_0x36a7d4)};}export const menuSubappAssetsUpdate={'service':a189_0x4135b7(0x1c6),'command':a189_0x4135b7(0x1e5),'description':'Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','risk':a189_0x4135b7(0x1cd),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a189_0x4135b7(0x204),'type':a189_0x4135b7(0x1c3),'required':!![],'description':a189_0x4135b7(0x1ff)},{'name':a189_0x4135b7(0x1eb),'type':a189_0x4135b7(0x1c3),'description':a189_0x4135b7(0x1e9)}],async 'validate'(_0x457146){flags(_0x457146);},async 'dryRun'(_0x1cf194){const _0xc57855=a189_0x4135b7,{appCode:_0x4e6c73,appName:_0x4ee43d,resources:_0x259674}=flags(_0x1cf194),_0x79b96b=await getSmartAppRecord(_0x4e6c73,_0x1cf194[_0xc57855(0x1ce)]),_0x1cb904=prepare(_0x79b96b,_0x4ee43d,_0x259674);return{'method':'POST','url':_0xc57855(0x1ca),'body':{'preview':{'appCode':_0x4e6c73,'appName':_0x4ee43d,'before':_0x1cb904[_0xc57855(0x1f6)],'after':_0x259674,'expectedHash':_0x1cb904[_0xc57855(0x1c4)],'unchanged':_0x1cb904[_0xc57855(0x1c2)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x1cb904[_0xc57855(0x1c2)]?_0xc57855(0x1d5):'Would\x20update\x20shared\x20assets\x20for\x20'+_0x4ee43d+'.'};},async 'execute'(_0x7f4dbf){const _0xada29f=a189_0x4135b7,{appCode:_0x373d1e,appName:_0x909c4,resources:_0x54def6}=flags(_0x7f4dbf),_0xb5f5f9=_0x7f4dbf[_0xada29f(0x20d)](_0xada29f(0x1eb))['trim']();if(!/^[a-f0-9]{64}$/i[_0xada29f(0x1e0)](_0xb5f5f9))throw CliErrors[_0xada29f(0x202)](_0xada29f(0x20b));const _0x24d86d=await getSmartAppRecord(_0x373d1e,_0x7f4dbf[_0xada29f(0x1ce)]),_0x431da6=prepare(_0x24d86d,_0x909c4,_0x54def6);if(_0xb5f5f9!==_0x431da6[_0xada29f(0x1c4)])throw CliErrors[_0xada29f(0x202)]('App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.');if(_0x431da6['unchanged'])return{'ok':!![],'data':{'appCode':_0x373d1e,'appName':_0x909c4,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':'Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.'};await updateSmartAppRecord({'id':_0x24d86d['id'],'appCode':_0x373d1e,'appPublishStatus':_0x24d86d[_0xada29f(0x1f0)],'extend':_0x431da6[_0xada29f(0x1cc)]},_0x7f4dbf['cookie']);const _0x24b511=await getSmartAppRecord(_0x373d1e,_0x7f4dbf[_0xada29f(0x1ce)]),_0x2261e9=parseObject(_0x24b511[_0xada29f(0x1f9)],_0xada29f(0x1c5));if(_0x24b511['id']!==_0x24d86d['id']||_0x24b511[_0xada29f(0x1f0)]!==_0x24d86d[_0xada29f(0x1f0)]||!isDeepStrictEqual(_0x2261e9,_0x431da6[_0xada29f(0x1cc)]))throw CliErrors[_0xada29f(0x1fe)](_0xada29f(0x1ef));return{'ok':!![],'data':{'appCode':_0x373d1e,'appName':_0x909c4,'updated':!![],'resources':_0x54def6,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0xada29f(0x1ea)+_0x909c4+'\x20in\x20menu\x20host\x20'+_0x373d1e+_0xada29f(0x1db)};}};
|
|
1
|
+
const a189_0x70f018=a189_0x3ec5;function a189_0x3ec5(_0xb3587d,_0x2a7145){_0xb3587d=_0xb3587d-0xe8;const _0xc3e29a=a189_0xc3e2();let _0x3ec524=_0xc3e29a[_0xb3587d];return _0x3ec524;}(function(_0x46fa46,_0x4c2108){const _0x58fa20=a189_0x3ec5,_0x492c55=_0x46fa46();while(!![]){try{const _0x32c783=parseInt(_0x58fa20(0x10c))/0x1+-parseInt(_0x58fa20(0xf6))/0x2+-parseInt(_0x58fa20(0x139))/0x3+parseInt(_0x58fa20(0x12b))/0x4*(parseInt(_0x58fa20(0x102))/0x5)+parseInt(_0x58fa20(0x134))/0x6*(-parseInt(_0x58fa20(0x105))/0x7)+parseInt(_0x58fa20(0xfc))/0x8*(-parseInt(_0x58fa20(0x100))/0x9)+parseInt(_0x58fa20(0xe9))/0xa*(parseInt(_0x58fa20(0xf4))/0xb);if(_0x32c783===_0x4c2108)break;else _0x492c55['push'](_0x492c55['shift']());}catch(_0x33e7b4){_0x492c55['push'](_0x492c55['shift']());}}}(a189_0xc3e2,0xa1243));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';function a189_0xc3e2(){const _0x2a443a=['Unknown\x20app.extend\x20fields:\x20','tenantColumn','\x20contains\x20invalid\x20JSON.','cookie','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','6OToCKa','unchanged','JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs','nextExtend','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','2428392colIlE','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','258740ktoGzH','expectedHash','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','write',';\x20found\x20','filter','Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','validation','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','extend','POST','1639pgXRRv','size','2295786RxByOo','isSafeInteger','appPublishStatus','app.extend.assets','\x20must\x20be\x20a\x20JSON\x20object.','menu','920JjUlUJ','keys','parse','string','101115uwqPvi','verified\x20app.extend','913335DKezHl','skinColor','sha256','6265847WiIUum','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.','object','assets','trim','test','401311capyac','str','\x20in\x20menu\x20host\x20','Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','some','has','directDbEnabled','map','subapp-assets-update','App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.','digest','before','appCode','not\x20HTTPS','hex','expected-hash','length','entries',';\x20independent\x20deployment\x20not\x20verified.','https:','app.extend','directDbId','resources[','resources','isArray','join','enableAutoSync','stringify','enableOpenApi','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.',']\x20must\x20be\x20a\x20URL\x20string.','12GdznFf','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','protocol','enableSample'];a189_0xc3e2=function(){return _0x2a443a;};return a189_0xc3e2();}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_0x70f018(0x103),a189_0x70f018(0x128),'accessKey','assets',a189_0x70f018(0x130),a189_0x70f018(0x12e),'vipDeploy',a189_0x70f018(0x126),a189_0x70f018(0x121),a189_0x70f018(0x112)]);function parseObject(_0x5cc129,_0x7be5a3){const _0x43eebf=a189_0x70f018;let _0x56591d=_0x5cc129;if(typeof _0x5cc129===_0x43eebf(0xff))try{_0x56591d=JSON[_0x43eebf(0xfe)](_0x5cc129);}catch{throw CliErrors[_0x43eebf(0xf0)](_0x7be5a3+_0x43eebf(0x131));}if(!_0x56591d||typeof _0x56591d!==_0x43eebf(0x108)||Array['isArray'](_0x56591d))throw CliErrors[_0x43eebf(0xf0)](_0x7be5a3+_0x43eebf(0xfa));return _0x56591d;}function parseArray(_0x11b663,_0x625442){const _0x4e1f57=a189_0x70f018;let _0x3f0ee8;try{_0x3f0ee8=JSON['parse'](_0x11b663);}catch{throw CliErrors[_0x4e1f57(0xf0)](_0x625442+_0x4e1f57(0x131));}if(!Array[_0x4e1f57(0x124)](_0x3f0ee8))throw CliErrors['validation'](_0x625442+'\x20must\x20be\x20a\x20JSON\x20array.');return _0x3f0ee8[_0x4e1f57(0x113)]((_0x13370f,_0x3d5ad2)=>parseObject(_0x13370f,_0x625442+'['+_0x3d5ad2+']'));}function validateResources(_0x38cac5){const _0x3f606e=a189_0x70f018;if(_0x38cac5[_0x3f606e(0x11c)]===0x0)throw CliErrors[_0x3f606e(0xf0)](_0x3f606e(0x138));for(const [_0x285530,_0x34e662]of _0x38cac5[_0x3f606e(0x11d)]()){if(typeof _0x34e662!==_0x3f606e(0xff))throw CliErrors[_0x3f606e(0xf0)](_0x3f606e(0x122)+_0x285530+_0x3f606e(0x12a));try{if(new URL(_0x34e662)[_0x3f606e(0x12d)]!==_0x3f606e(0x11f))throw new Error(_0x3f606e(0x119));}catch{throw CliErrors[_0x3f606e(0xf0)](_0x3f606e(0x122)+_0x285530+']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.');}}if(new Set(_0x38cac5)[_0x3f606e(0xf5)]!==_0x38cac5['length']||!_0x38cac5[_0x3f606e(0x110)](_0x6fbea8=>/\.m?js(?:[?#]|$)/i[_0x3f606e(0x10b)](_0x6fbea8)))throw CliErrors[_0x3f606e(0xf0)]('Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.');return _0x38cac5;}function prepare(_0x378334,_0x6f4e52,_0x66288b){const _0x11bc69=a189_0x70f018;if(!Number[_0x11bc69(0xf7)](_0x378334['id'])||(_0x378334['id']??0x0)<=0x0||typeof _0x378334[_0x11bc69(0xf8)]!==_0x11bc69(0xff)||!_0x378334['appPublishStatus'])throw CliErrors[_0x11bc69(0xf0)](_0x11bc69(0x106));const _0x355c8c=parseObject(_0x378334[_0x11bc69(0xf2)],_0x11bc69(0x120)),_0x518359=Object[_0x11bc69(0xfd)](_0x355c8c)[_0x11bc69(0xee)](_0x42273f=>!KNOWN_EXTEND_KEYS[_0x11bc69(0x111)](_0x42273f));if(_0x518359[_0x11bc69(0x11c)])throw CliErrors[_0x11bc69(0xf0)](_0x11bc69(0x12f)+_0x518359[_0x11bc69(0x125)](',\x20')+'.\x20Refusing\x20update.');if(typeof _0x355c8c['assets']!==_0x11bc69(0xff))throw CliErrors[_0x11bc69(0xf0)]('app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.');const _0x59cb97=parseArray(_0x355c8c[_0x11bc69(0x109)],_0x11bc69(0xf9)),_0x59f3b1=_0x59cb97[_0x11bc69(0xee)](_0x3f006b=>_0x3f006b['appName']===_0x6f4e52);if(_0x59f3b1[_0x11bc69(0x11c)]!==0x1)throw CliErrors[_0x11bc69(0xf0)]('Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20'+_0x6f4e52+_0x11bc69(0xed)+_0x59f3b1['length']+'.');const _0x7730a=_0x59f3b1[0x0];if(typeof _0x7730a[_0x11bc69(0x123)]!==_0x11bc69(0xff))throw CliErrors[_0x11bc69(0xf0)](_0x11bc69(0x129));let _0x5ca7ed;try{_0x5ca7ed=JSON[_0x11bc69(0xfe)](_0x7730a[_0x11bc69(0x123)]);}catch{throw CliErrors[_0x11bc69(0xf0)](_0x11bc69(0x12c));}if(!Array[_0x11bc69(0x124)](_0x5ca7ed)||_0x5ca7ed['some'](_0x4e95bf=>typeof _0x4e95bf!==_0x11bc69(0xff)))throw CliErrors['validation'](_0x11bc69(0xe8));const _0x5ded60=_0x59cb97[_0x11bc69(0x113)](_0x5346d8=>_0x5346d8===_0x7730a?{..._0x5346d8,'resources':JSON[_0x11bc69(0x127)](_0x66288b)}:_0x5346d8),_0x4fc079={..._0x355c8c,'assets':JSON[_0x11bc69(0x127)](_0x5ded60)},_0x5379d1=createHash(_0x11bc69(0x104))['update'](JSON[_0x11bc69(0x127)]({'appCode':_0x378334[_0x11bc69(0x118)],'id':_0x378334['id'],'appPublishStatus':_0x378334[_0x11bc69(0xf8)],'extend':_0x355c8c,'appName':_0x6f4e52,'resources':_0x66288b}))[_0x11bc69(0x116)](_0x11bc69(0x11a));return{'before':_0x5ca7ed,'nextExtend':_0x4fc079,'expectedHash':_0x5379d1,'unchanged':isDeepStrictEqual(_0x5ca7ed,_0x66288b)};}function flags(_0x25db51){const _0x266da2=a189_0x70f018,{appCode:_0x3954ce,appName:_0x23147f}=getSubappSelector(_0x25db51),_0x65da3e=_0x25db51[_0x266da2(0x10d)](_0x266da2(0x123))[_0x266da2(0x10a)]();if(!_0x65da3e)throw CliErrors['validation']('--resources\x20is\x20required.');let _0x40cd1f;try{_0x40cd1f=JSON[_0x266da2(0xfe)](_0x65da3e);}catch{throw CliErrors[_0x266da2(0xf0)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');}if(!Array[_0x266da2(0x124)](_0x40cd1f))throw CliErrors[_0x266da2(0xf0)](_0x266da2(0xeb));return{'appCode':_0x3954ce,'appName':_0x23147f,'resources':validateResources(_0x40cd1f)};}export const menuSubappAssetsUpdate={'service':a189_0x70f018(0xfb),'command':a189_0x70f018(0x114),'description':a189_0x70f018(0x10f),'risk':a189_0x70f018(0xec),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a189_0x70f018(0x123),'type':a189_0x70f018(0xff),'required':!![],'description':a189_0x70f018(0x136)},{'name':'expected-hash','type':a189_0x70f018(0xff),'description':a189_0x70f018(0xef)}],async 'validate'(_0x19bb80){flags(_0x19bb80);},async 'dryRun'(_0x384e36){const _0x30fdc4=a189_0x70f018,{appCode:_0x362b21,appName:_0x33a738,resources:_0x342e1c}=flags(_0x384e36),_0x19c24d=await getSmartAppRecord(_0x362b21,_0x384e36[_0x30fdc4(0x132)]),_0x32ffd6=prepare(_0x19c24d,_0x33a738,_0x342e1c);return{'method':_0x30fdc4(0xf3),'url':'/smartapi/app/update','body':{'preview':{'appCode':_0x362b21,'appName':_0x33a738,'before':_0x32ffd6[_0x30fdc4(0x117)],'after':_0x342e1c,'expectedHash':_0x32ffd6[_0x30fdc4(0xea)],'unchanged':_0x32ffd6[_0x30fdc4(0x135)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x32ffd6[_0x30fdc4(0x135)]?_0x30fdc4(0x107):'Would\x20update\x20shared\x20assets\x20for\x20'+_0x33a738+'.'};},async 'execute'(_0x186b04){const _0x13905a=a189_0x70f018,{appCode:_0x23ad2b,appName:_0x21366f,resources:_0x59a189}=flags(_0x186b04),_0x48caf6=_0x186b04['str'](_0x13905a(0x11b))[_0x13905a(0x10a)]();if(!/^[a-f0-9]{64}$/i[_0x13905a(0x10b)](_0x48caf6))throw CliErrors['validation'](_0x13905a(0x133));const _0x6cb390=await getSmartAppRecord(_0x23ad2b,_0x186b04[_0x13905a(0x132)]),_0x2fa9b3=prepare(_0x6cb390,_0x21366f,_0x59a189);if(_0x48caf6!==_0x2fa9b3[_0x13905a(0xea)])throw CliErrors[_0x13905a(0xf0)](_0x13905a(0x115));if(_0x2fa9b3['unchanged'])return{'ok':!![],'data':{'appCode':_0x23ad2b,'appName':_0x21366f,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x13905a(0xf1)};await updateSmartAppRecord({'id':_0x6cb390['id'],'appCode':_0x23ad2b,'appPublishStatus':_0x6cb390[_0x13905a(0xf8)],'extend':_0x2fa9b3[_0x13905a(0x137)]},_0x186b04[_0x13905a(0x132)]);const _0x4cd250=await getSmartAppRecord(_0x23ad2b,_0x186b04['cookie']),_0x108924=parseObject(_0x4cd250[_0x13905a(0xf2)],_0x13905a(0x101));if(_0x4cd250['id']!==_0x6cb390['id']||_0x4cd250[_0x13905a(0xf8)]!==_0x6cb390['appPublishStatus']||!isDeepStrictEqual(_0x108924,_0x2fa9b3[_0x13905a(0x137)]))throw CliErrors['apiError']('App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.');return{'ok':!![],'data':{'appCode':_0x23ad2b,'appName':_0x21366f,'updated':!![],'resources':_0x59a189,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':'Updated\x20shared\x20resources\x20for\x20'+_0x21366f+_0x13905a(0x10e)+_0x23ad2b+_0x13905a(0x11e)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a190_0x10fc10=a190_0x33c3;(function(_0xfcc665,_0x3c6b7b){const _0x53dfac=a190_0x33c3,_0x390f75=_0xfcc665();while(!![]){try{const _0x5175f4=parseInt(_0x53dfac(0x14f))/0x1*(-parseInt(_0x53dfac(0x161))/0x2)+-parseInt(_0x53dfac(0x179))/0x3*(parseInt(_0x53dfac(0x166))/0x4)+parseInt(_0x53dfac(0x150))/0x5*(parseInt(_0x53dfac(0x164))/0x6)+-parseInt(_0x53dfac(0x139))/0x7*(-parseInt(_0x53dfac(0x149))/0x8)+parseInt(_0x53dfac(0x13c))/0x9*(parseInt(_0x53dfac(0x162))/0xa)+parseInt(_0x53dfac(0x140))/0xb*(parseInt(_0x53dfac(0x154))/0xc)+-parseInt(_0x53dfac(0x12b))/0xd;if(_0x5175f4===_0x3c6b7b)break;else _0x390f75['push'](_0x390f75['shift']());}catch(_0x24c78d){_0x390f75['push'](_0x390f75['shift']());}}}(a190_0x5904,0x67814));import a190_0xeb6fed from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';function a190_0x5904(){const _0x1d423f=['onlineMenuList','76024HgZRSe','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','gray','appcode','\x20menu(s)\x20created','map','\x20\x20Cancelled.','boolean','sync','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','\x20page(s)','filter','Failed\x20to\x20fetch\x20online\x20menu\x20list','flag','\x20menu(s)','Menu\x20creation\x20failed','trim','\x20\x20Create\x20','Register\x20local\x20pages\x20as\x20platform\x20menus','111qjMKnA','Menu\x20sync\x20skipped','appCode','4968405WVhIrR','Fetching\x20online\x20menu\x20list...','message','rawFlags','appName','\x20\x20Continue\x20with\x20creation?','write','selectedAppName','Creating\x20','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','onlinePaths','Created\x20','jsUrl','menu','35TGbYdM','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','74331kDlJme','Would\x20create\x20','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','paths','11rHOsDo','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','Menu\x20sync\x20completed:\x20','\x20failed.','\x20menu(s)\x20with\x20JS:\x20','length','str','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','failed','909064HBtuSd','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','targetPages','\x20local\x20microfrontend\x20menu(s).','string','\x20\x20✓\x20Selected:\x20','1bRSoSt','5dRzzeA','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','cookie','cssUrl','3137976WUoqCx','\x20menu(s)...','skipped','cyan','validation','params','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','created','Online\x20menu\x20list\x20fetched','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','POST','yes','1095922rGjXvZ','530nLqSli','split','4739604LMukKk'];a190_0x5904=function(){return _0x1d423f;};return a190_0x5904();}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_0x10fc10(0x138),'command':a190_0x10fc10(0x16e),'description':a190_0x10fc10(0x178),'risk':a190_0x10fc10(0x131),'flags':[{'name':a190_0x10fc10(0x159),'type':a190_0x10fc10(0x14d),'description':a190_0x10fc10(0x147)+a190_0x10fc10(0x15e)},{'name':a190_0x10fc10(0x13f),'type':a190_0x10fc10(0x14d),'description':a190_0x10fc10(0x16f)},{'name':'yes','type':a190_0x10fc10(0x16d),'description':a190_0x10fc10(0x167)}],async 'dryRun'(_0x1e7e37){const _0x204988=a190_0x10fc10;ensureRunnableContext(_0x1e7e37[_0x204988(0x12e)],_0x1e7e37[_0x204988(0x132)]);const _0x314071=await runMenuSyncCore(_0x1e7e37[_0x204988(0x17b)],_0x1e7e37[_0x204988(0x152)],parsePaths(_0x1e7e37[_0x204988(0x146)](_0x204988(0x13f))),_0x1e7e37[_0x204988(0x146)](_0x204988(0x159)),{'dryRun':!![]});return{'method':_0x204988(0x15f),'url':'/smartapi/menu/create','body':_0x314071,'description':_0x314071['skipped']?_0x204988(0x134):_0x204988(0x13d)+_0x314071[_0x204988(0x14b)][_0x204988(0x145)]+_0x204988(0x14c)};},async 'execute'(_0x326d4d){const _0x572d10=a190_0x10fc10;ensureRunnableContext(_0x326d4d[_0x572d10(0x12e)],_0x326d4d['selectedAppName']);const _0x56b930=_0x326d4d[_0x572d10(0x173)](_0x572d10(0x160)),_0x34fbf5=_0x326d4d[_0x572d10(0x146)](_0x572d10(0x159)),_0x4bbda9=parsePaths(_0x326d4d[_0x572d10(0x146)](_0x572d10(0x13f))),_0x1e5ca4=parseMenuSyncParams(_0x34fbf5);if(_0x56b930){const _0x461734=await runMenuSyncCore(_0x326d4d[_0x572d10(0x17b)],_0x326d4d['cookie'],_0x4bbda9,_0x34fbf5);if(_0x461734[_0x572d10(0x156)]){const _0x4b9d92=getLocalPages();_0x4b9d92[_0x572d10(0x145)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x572d10(0x13e));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x461734[_0x572d10(0x15c)]+_0x572d10(0x16a));return{'ok':!![],'data':_0x461734,'message':_0x461734[_0x572d10(0x156)]?_0x572d10(0x17a):'Menu\x20sync\x20completed:\x20'+_0x461734[_0x572d10(0x15c)]+'\x20created.'};}if(_0x4bbda9[_0x572d10(0x145)]>0x0)throw CliErrors[_0x572d10(0x158)](_0x572d10(0x151),_0x572d10(0x14a));if(!isInteractive()&&_0x34fbf5)throw CliErrors['validation'](_0x572d10(0x15b),_0x572d10(0x14a));requireInteractive(),writeCliSideChannelLine(_0x572d10(0x13b));const _0x277a4d=startSpinner(_0x572d10(0x12c));let _0x3cb28a,_0x218075,_0xc04c7;try{const _0x494808=await fetchMenuData(_0x326d4d[_0x572d10(0x17b)],_0x326d4d['cookie']);_0x3cb28a=_0x494808['localPages'],_0x218075=_0x494808[_0x572d10(0x135)],_0xc04c7=_0x494808[_0x572d10(0x165)],stopSpinner(_0x277a4d,_0x572d10(0x15d),!![]);}catch(_0x22e239){stopSpinner(_0x277a4d,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x572d10(0x158)](_0x22e239 instanceof Error?_0x22e239[_0x572d10(0x12d)]:_0x572d10(0x172));}if(_0x3cb28a[_0x572d10(0x145)]===0x0)return writeCliSideChannelLine(a190_0xeb6fed['yellow'](_0x572d10(0x141))),{'ok':!![]};const _0x1a37c8=buildCompareRows(_0x3cb28a,_0x218075);writeCliSideChannelLine(renderCompareTable(_0x1a37c8)),writeCliSideChannelLine('');const _0x201717=await selectPages(_0x3cb28a,_0x218075);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0xeb6fed[_0x572d10(0x157)](_0x572d10(0x14e)+_0x201717[_0x572d10(0x145)]+_0x572d10(0x170)));const _0x2af022=_0x1e5ca4['jsUrl']&&_0x1e5ca4[_0x572d10(0x153)];if(!_0x2af022){writeCliSideChannelLine(renderSyncSummary(_0x201717,_0x218075['size']>0x0));const _0x224925=await askConfirm(_0x572d10(0x130));if(!_0x224925)return writeCliSideChannelLine(a190_0xeb6fed[_0x572d10(0x168)](_0x572d10(0x16c))),{'ok':!![]};}let _0x4f492d=_0x1e5ca4[_0x572d10(0x137)],_0x3a9dc1=_0x1e5ca4[_0x572d10(0x153)];!_0x4f492d&&!_0x1e5ca4[_0x572d10(0x12f)]&&(_0x4f492d=await askJsUrl());!_0x3a9dc1&&!_0x1e5ca4[_0x572d10(0x12f)]&&(_0x3a9dc1=await askCssUrl());const _0x4d4b6f=await askConfirm(_0x1e5ca4[_0x572d10(0x12f)]?_0x572d10(0x177)+_0x201717[_0x572d10(0x145)]+'\x20menu(s)\x20bound\x20to\x20'+_0x1e5ca4['appName']+'?':_0x572d10(0x177)+_0x201717[_0x572d10(0x145)]+_0x572d10(0x144)+_0x4f492d+'\x20and\x20CSS:\x20'+_0x3a9dc1+'?');if(!_0x4d4b6f)return writeCliSideChannelLine(a190_0xeb6fed[_0x572d10(0x168)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x56c377=[_0x4f492d,_0x3a9dc1][_0x572d10(0x171)](_0x10ca18=>Boolean(_0x10ca18));_0x1e5ca4[_0x572d10(0x12f)]&&_0x56c377[_0x572d10(0x145)]===0x0&&await assertSharedResourcesConfigured(_0x326d4d[_0x572d10(0x17b)],_0x326d4d[_0x572d10(0x152)],_0x1e5ca4[_0x572d10(0x12f)]);const _0x174fef=startSpinner(_0x572d10(0x133)+_0x201717[_0x572d10(0x145)]+_0x572d10(0x155));try{const _0x320ca5=_0x201717[_0x572d10(0x16b)](_0x12a641=>resolvePage(_0x12a641,_0x1e5ca4,_0xc04c7)),_0x2b39da=await doCreateMenus(_0x326d4d['appCode'],_0x326d4d['cookie'],_0x320ca5,_0x56c377,_0x1e5ca4['appName']?{'appName':_0x1e5ca4[_0x572d10(0x12f)]}:undefined);return stopSpinner(_0x174fef,_0x572d10(0x136)+_0x2b39da[_0x572d10(0x15c)]+_0x572d10(0x174),!![]),{'ok':!![],'data':_0x2b39da,'message':_0x572d10(0x142)+_0x2b39da[_0x572d10(0x15c)]+'\x20created,\x20'+_0x2b39da[_0x572d10(0x148)]+_0x572d10(0x143)};}catch(_0x4105d7){stopSpinner(_0x174fef,_0x572d10(0x175),![]);throw CliErrors[_0x572d10(0x158)](_0x4105d7 instanceof Error?_0x4105d7[_0x572d10(0x12d)]:'Menu\x20creation\x20failed');}}};function ensureRunnableContext(_0x47130f,_0x3e2d5f){const _0x713c5b=a190_0x10fc10,_0x4b368f=_0x47130f[_0x713c5b(0x169)]?String(_0x47130f[_0x713c5b(0x169)])['trim']():'';if(!isInProject()&&!_0x3e2d5f&&!_0x4b368f)throw CliErrors['validation'](_0x713c5b(0x13a)+_0x713c5b(0x15a));}function a190_0x33c3(_0x2b7594,_0x16dc34){_0x2b7594=_0x2b7594-0x12b;const _0x5904f4=a190_0x5904();let _0x33c305=_0x5904f4[_0x2b7594];return _0x33c305;}function parsePaths(_0xcbd23c){const _0x57babd=a190_0x10fc10;return[...new Set(_0xcbd23c[_0x57babd(0x163)](',')[_0x57babd(0x16b)](_0x10d02b=>_0x10d02b[_0x57babd(0x176)]())[_0x57babd(0x171)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a191_0x351d3e=a191_0x5427;(function(_0xb85bbe,_0x53913a){const _0x5a6845=a191_0x5427,_0x31c357=_0xb85bbe();while(!![]){try{const _0x485e29=-parseInt(_0x5a6845(0x228))/0x1+-parseInt(_0x5a6845(0x1cf))/0x2*(-parseInt(_0x5a6845(0x232))/0x3)+parseInt(_0x5a6845(0x21b))/0x4*(parseInt(_0x5a6845(0x22c))/0x5)+parseInt(_0x5a6845(0x217))/0x6*(parseInt(_0x5a6845(0x20e))/0x7)+-parseInt(_0x5a6845(0x1ff))/0x8+parseInt(_0x5a6845(0x1c6))/0x9+-parseInt(_0x5a6845(0x206))/0xa*(parseInt(_0x5a6845(0x233))/0xb);if(_0x485e29===_0x53913a)break;else _0x31c357['push'](_0x31c357['shift']());}catch(_0x402b02){_0x31c357['push'](_0x31c357['shift']());}}}(a191_0x45bb,0xed85a));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_0x351d3e(0x21c),'path':a191_0x351d3e(0x204)}];export const menuVisibilityUpdate={'service':'menu','command':a191_0x351d3e(0x1f2),'description':a191_0x351d3e(0x208),'risk':a191_0x351d3e(0x1e7),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':'string','description':a191_0x351d3e(0x235)},{'name':'paths','type':'string','description':a191_0x351d3e(0x1cd)},{'name':a191_0x351d3e(0x1ec),'type':a191_0x351d3e(0x202),'required':!![],'description':a191_0x351d3e(0x1d6)},{'name':a191_0x351d3e(0x212),'type':a191_0x351d3e(0x202),'description':a191_0x351d3e(0x1c4)},{'name':a191_0x351d3e(0x1e8),'type':'number','description':a191_0x351d3e(0x224)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x36dc46){parseInput(_0x36dc46);},async 'dryRun'(_0x3399ec){const _0x2dc83d=a191_0x351d3e,_0x69925c=await buildPlan(_0x3399ec,!![]),_0x40e356=_0x69925c['plan'][_0x2dc83d(0x214)]?.['length']??0x0,_0x59cda7=_0x69925c[_0x2dc83d(0x1ee)]['targets'][_0x2dc83d(0x1bd)]-_0x40e356;return menuDryRunResult(_0x69925c[_0x2dc83d(0x1ee)],{'method':_0x2dc83d(0x21c),'url':'/smartapi/menu/update','body':{'updates':_0x69925c[_0x2dc83d(0x1ee)][_0x2dc83d(0x214)]?.['map'](_0x1d9af5=>_0x1d9af5[_0x2dc83d(0x1d5)])??[]},'description':_0x2dc83d(0x1f3)+_0x40e356+_0x2dc83d(0x22f)+_0x59cda7+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x390ad9){const _0x9b6307=a191_0x351d3e,_0x468250=await buildPlan(_0x390ad9,![]);await recheckMutationSnapshot(_0x390ad9,_0x468250[_0x9b6307(0x1ee)],_0x9b6307(0x22b));const _0x31025e=[],_0x4e0e49=[],_0x3ccf9b=[];for(const _0x2ac94e of _0x468250['plan']['targets']){if(_0x2ac94e[_0x9b6307(0x236)][_0x9b6307(0x1ec)]===_0x468250['plan']['requestedVisible']){_0x31025e[_0x9b6307(0x1c0)]({'id':_0x2ac94e['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x390ad9[_0x9b6307(0x1eb)],_0x390ad9[_0x9b6307(0x21a)],{'id':_0x2ac94e['id'],'visible':_0x468250['plan']['requestedVisible']}),_0x31025e[_0x9b6307(0x1c0)]({'id':_0x2ac94e['id'],'updated':!![],'skipped':![]});}catch(_0x592a9e){const _0x4dbed1=mapMenuApiError(_0x592a9e,'update\x20visibility\x20for',_0x2ac94e['id']);if(isMenuResponseLoss(_0x592a9e)&&_0x4dbed1[_0x9b6307(0x1cc)]!=='menu_permission_denied'){_0x3ccf9b[_0x9b6307(0x1c0)](_0x2ac94e['id']);continue;}_0x4e0e49[_0x9b6307(0x1c0)]({'id':_0x2ac94e['id'],'stage':_0x9b6307(0x1d9),'code':_0x4dbed1[_0x9b6307(0x1cc)],'message':_0x4dbed1[_0x9b6307(0x1c5)]});}}let _0x589d2f;try{_0x589d2f=await fetchMenuSnapshot(_0x390ad9[_0x9b6307(0x1eb)],_0x390ad9[_0x9b6307(0x21a)]);}catch(_0x23ee41){const _0x5806e5=describeMenuErrorCause(_0x23ee41,_0x9b6307(0x22d)),_0x201bee=_0x3ccf9b[_0x9b6307(0x20d)](_0x53cbcf=>({'id':_0x53cbcf,'stage':_0x9b6307(0x222),'code':_0x9b6307(0x1f1),'message':_0x9b6307(0x1d8)+_0x53cbcf+_0x9b6307(0x201),'requestedStateConfirmed':![],'recovered':![]})),_0x3f396e={'stage':_0x9b6307(0x1e2),'code':_0x9b6307(0x1f1),'message':_0x9b6307(0x1db),'targetIds':_0x468250[_0x9b6307(0x1ee)][_0x9b6307(0x1c8)][_0x9b6307(0x20d)](_0x1621b6=>_0x1621b6['id']),'requestedStateConfirmed':![],..._0x5806e5};throw menuFailure(asVerificationError(_0x23ee41,_0x9b6307(0x1fd)),_0x468250[_0x9b6307(0x1ee)],{'stage':_0x9b6307(0x1e2),'succeeded':_0x31025e,'failedRecords':[..._0x4e0e49,..._0x201bee,_0x3f396e],'warnings':[_0x9b6307(0x1f9)],'verification':{'status':_0x9b6307(0x1e0),'recoveredCount':0x0,'lookupCommand':_0x9b6307(0x1df)}});}const _0x3f8013=[];for(const _0x889857 of _0x31025e){const _0x675fce=Number(_0x889857['id']),_0x2631db=_0x468250[_0x9b6307(0x1e9)][_0x9b6307(0x211)](_0x675fce),_0x3fb3b6=_0x589d2f[_0x9b6307(0x1ce)]['get'](_0x675fce);try{verifyVisibilityUpdate(_0x2631db,_0x3fb3b6,_0x468250[_0x9b6307(0x1ee)][_0x9b6307(0x227)]);}catch(_0x1d8789){const _0x366380=asVerificationError(_0x1d8789,'Menu\x20'+_0x675fce+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x3f8013['push']({'id':_0x675fce,'stage':_0x9b6307(0x1e2),'code':_0x366380[_0x9b6307(0x1cc)],'message':_0x366380[_0x9b6307(0x1c5)],'requestedStateConfirmed':![]});}}for(const _0xc5457e of _0x3ccf9b){const _0x56fdb8=_0x468250[_0x9b6307(0x1e9)][_0x9b6307(0x211)](_0xc5457e),_0x483319=_0x589d2f[_0x9b6307(0x1ce)]['get'](_0xc5457e);try{verifyVisibilityUpdate(_0x56fdb8,_0x483319,_0x468250[_0x9b6307(0x1ee)][_0x9b6307(0x227)]),_0x31025e[_0x9b6307(0x1c0)]({'id':_0xc5457e,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x572e29){const _0x49d2e9=asVerificationError(_0x572e29,'Response\x20was\x20lost\x20and\x20menu\x20'+_0xc5457e+_0x9b6307(0x1ef));_0x3f8013['push']({'id':_0xc5457e,'stage':_0x9b6307(0x222),'code':_0x49d2e9['code'],'message':_0x49d2e9['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x3f8013['length']>0x0){const _0x7bce10=_0x3f8013[_0x9b6307(0x20d)](_0x4b29a3=>Number(_0x4b29a3['id'])),_0x1d8088=_0x31025e[_0x9b6307(0x216)](_0x12bdee=>_0x12bdee[_0x9b6307(0x1d0)]===!![])[_0x9b6307(0x1bd)],_0x559927=menuError(_0x9b6307(0x1f1),_0x9b6307(0x229)+_0x7bce10[_0x9b6307(0x1fb)](',\x20')+'.',_0x9b6307(0x20a));throw menuFailure(_0x559927,_0x468250[_0x9b6307(0x1ee)],{'stage':_0x9b6307(0x1e2),'succeeded':_0x31025e,'failedRecords':[..._0x4e0e49,..._0x3f8013],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x9b6307(0x1e0),..._0x7bce10['length']===0x1?{'targetId':_0x7bce10[0x0]}:{'targetIds':_0x7bce10},'recoveredCount':_0x1d8088,'lookupCommand':_0x9b6307(0x1df)}});}const _0x4450af=_0x31025e[_0x9b6307(0x216)](_0x565d19=>_0x565d19['updated']===!![])['length'],_0x50fc99=_0x31025e[_0x9b6307(0x1bd)]-_0x4450af,_0x106cfe={..._0x468250['plan'],'succeeded':_0x31025e,'failed':_0x4e0e49,'warnings':_0x4e0e49['length']>0x0?[..._0x468250[_0x9b6307(0x1ee)]['warnings'],_0x9b6307(0x218)]:_0x468250[_0x9b6307(0x1ee)][_0x9b6307(0x200)],'verification':{'checkedBy':_0x9b6307(0x1ed),'snapshotHash':_0x589d2f[_0x9b6307(0x1dd)],'matchesRequestedState':_0x4e0e49[_0x9b6307(0x1bd)]===0x0,'recoveredCount':_0x3ccf9b['length']}};return{'ok':_0x4e0e49['length']===0x0,'data':_0x106cfe,'message':_0x4e0e49[_0x9b6307(0x1bd)]===0x0?'Updated\x20visibility\x20for\x20'+_0x4450af+_0x9b6307(0x210)+_0x50fc99+_0x9b6307(0x20f):_0x9b6307(0x1d2)+_0x4450af+'\x20updated,\x20'+_0x50fc99+'\x20skipped,\x20'+_0x4e0e49[_0x9b6307(0x1bd)]+_0x9b6307(0x1e1)};}};function parseInput(_0x1d7689){const _0x2fec05=a191_0x351d3e,_0x48ec31=parseMenuIds(_0x1d7689['str']('menu-ids')),_0x1f4269=parseCsv(_0x1d7689[_0x2fec05(0x1da)](_0x2fec05(0x21f)));if(_0x48ec31[_0x2fec05(0x1bd)]===0x0&&_0x1f4269['length']===0x0)throw CliErrors[_0x2fec05(0x209)](_0x2fec05(0x1c2));const _0x21b7d1=parseBooleanFlag(_0x1d7689,_0x2fec05(0x1ec),!![]),_0x1dcbb5=parseBooleanFlag(_0x1d7689,_0x2fec05(0x212),![]);let _0x580e01;if(hasFlag(_0x1d7689,_0x2fec05(0x1e8))){_0x580e01=_0x1d7689['num'](_0x2fec05(0x1e8));if(!Number[_0x2fec05(0x1d3)](_0x580e01)||_0x580e01<0x0)throw CliErrors['validation'](_0x2fec05(0x1c3));}return{'menuIds':_0x48ec31,'paths':_0x1f4269,'visible':_0x21b7d1,'expectVisible':_0x1dcbb5,'expectedCount':_0x580e01};}function a191_0x5427(_0xfa2981,_0x1010f1){_0xfa2981=_0xfa2981-0x1bd;const _0x45bb6f=a191_0x45bb();let _0x5427c0=_0x45bb6f[_0xfa2981];return _0x5427c0;}async function buildPlan(_0x3c7aaf,_0x479a9c){const _0x57137a=a191_0x351d3e,_0x365dac=parseInput(_0x3c7aaf),_0x20bb0e=await fetchMutationSnapshot(_0x3c7aaf,'update\x20menu\x20visibility'),_0x3efb91=selectTargets(_0x20bb0e['menus'],_0x365dac['menuIds'],_0x365dac[_0x57137a(0x21f)]);if(_0x365dac[_0x57137a(0x1e6)]!==undefined&&_0x3efb91[_0x57137a(0x1bd)]!==_0x365dac[_0x57137a(0x1e6)])throw menuError('menu_expected_count_mismatch',_0x57137a(0x1fa)+_0x3efb91['length']+_0x57137a(0x234)+_0x365dac[_0x57137a(0x1e6)]+'.',_0x57137a(0x1e3));if(_0x365dac[_0x57137a(0x1c1)]!==undefined){const _0x551f7f=_0x3efb91[_0x57137a(0x216)](_0x2b5188=>_0x2b5188[_0x57137a(0x1ec)]!==_0x365dac[_0x57137a(0x1c1)]);if(_0x551f7f[_0x57137a(0x1bd)]>0x0)throw menuError('menu_state_drift','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x551f7f[_0x57137a(0x20d)](_0x1e76b8=>_0x1e76b8['id'])[_0x57137a(0x1fb)](',\x20')+'.',_0x57137a(0x20b));}const _0x105d99=_0x3efb91[_0x57137a(0x20d)](_0x20d134=>({'id':_0x20d134['id'],'label':_0x20d134[_0x57137a(0x1f0)],'path':_0x20d134[_0x57137a(0x1e5)],'before':{'visible':_0x20d134[_0x57137a(0x1ec)]},'after':{'visible':_0x365dac[_0x57137a(0x1ec)]}})),_0x2affa3=_0x105d99[_0x57137a(0x216)](_0x23fb1e=>_0x23fb1e[_0x57137a(0x236)][_0x57137a(0x1ec)]!==_0x365dac[_0x57137a(0x1ec)])['map'](_0x23c3c9=>({'stage':_0x57137a(0x223),'method':_0x57137a(0x21c),'path':_0x57137a(0x204),'body':{'appCode':_0x3c7aaf['appCode'],'id':_0x23c3c9['id'],'visible':_0x365dac['visible']}})),_0x40d82a=mutationResult({'operation':_0x57137a(0x1f2),'selector':{'menuIds':_0x365dac['menuIds'],'paths':_0x365dac[_0x57137a(0x21f)]},'before':{'menus':_0x3efb91[_0x57137a(0x20d)](_0x230b63=>({'id':_0x230b63['id'],'path':_0x230b63[_0x57137a(0x1e5)],'visible':_0x230b63[_0x57137a(0x1ec)]}))},'after':{'menus':_0x3efb91[_0x57137a(0x20d)](_0x3918f8=>({'id':_0x3918f8['id'],'path':_0x3918f8[_0x57137a(0x1e5)],'visible':_0x365dac[_0x57137a(0x1ec)]}))},'dryRun':_0x479a9c,'backend':[...BACKEND],'plannedActions':_0x2affa3,'snapshotHash':_0x20bb0e[_0x57137a(0x1dd)],'warnings':_0x2affa3[_0x57137a(0x1bd)]===0x0?[_0x57137a(0x1cb)]:[]});return{'plan':{..._0x40d82a,'requestedVisible':_0x365dac[_0x57137a(0x1ec)],'targets':_0x105d99},'beforeById':new Map(_0x3efb91[_0x57137a(0x20d)](_0x3d65ad=>[_0x3d65ad['id'],_0x3d65ad]))};}function selectTargets(_0x158a47,_0xb6778c,_0x3ce172){const _0x11ee88=a191_0x351d3e,_0x54b89d=new Map(_0x158a47[_0x11ee88(0x20d)](_0x5b0078=>[_0x5b0078['id'],_0x5b0078])),_0x5a26b4=new Map(),_0x2639f8=_0xb6778c['filter'](_0x3897eb=>!_0x54b89d[_0x11ee88(0x1fe)](_0x3897eb));if(_0x2639f8[_0x11ee88(0x1bd)]>0x0)throw menuError('menu_selector_not_found',_0x11ee88(0x213)+_0x2639f8[_0x11ee88(0x1fb)](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x5a1b3c of _0xb6778c){_0x5a26b4['set'](_0x5a1b3c,_0x54b89d['get'](_0x5a1b3c));}for(const _0x33fb25 of _0x3ce172){const _0x4dd501=_0x158a47['filter'](_0x5b4766=>_0x5b4766['path']===_0x33fb25);if(_0x4dd501[_0x11ee88(0x1bd)]===0x0)throw menuError(_0x11ee88(0x231),_0x11ee88(0x1d7)+JSON[_0x11ee88(0x1c9)](_0x33fb25)+'.',_0x11ee88(0x22e));if(_0x4dd501[_0x11ee88(0x1bd)]>0x1)throw menuError(_0x11ee88(0x205),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x11ee88(0x1c9)](_0x33fb25)+'.',_0x11ee88(0x1de)+_0x4dd501['map'](_0x171d3d=>_0x171d3d['id'])[_0x11ee88(0x1fb)](',\x20')+'.');const _0x7eb559=_0x4dd501[0x0];_0x5a26b4[_0x11ee88(0x226)](_0x7eb559['id'],_0x7eb559);}return[..._0x5a26b4[_0x11ee88(0x1ea)]()];}function parseMenuIds(_0x3a7e2b){const _0x4b94ac=a191_0x351d3e,_0xf777b5=parseCsv(_0x3a7e2b),_0x332dfe=_0xf777b5['map'](Number);if(_0x332dfe[_0x4b94ac(0x1c7)](_0x4b57d5=>!Number[_0x4b94ac(0x1d3)](_0x4b57d5)||_0x4b57d5<=0x0))throw CliErrors[_0x4b94ac(0x209)](_0x4b94ac(0x1f8));return[...new Set(_0x332dfe)];}function a191_0x45bb(){const _0x23a20a=['Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','pageId','path','expectedCount','write','expected-count','beforeById','values','appCode','visible','menu\x20list','plan','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','label','menu_verification_failed','visibility-update','Would\x20update\x20visibility\x20for\x20','type','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','\x20changed\x20unexpectedly.','childrenIds','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Selected\x20','join','true','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','has','9030992NWwxIV','warnings','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','boolean','modelType','/smartapi/menu/update','menu_selector_ambiguous','688400qDqgoD','depth','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','validation','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','resources','map','92834gshFWT','\x20unchanged\x20menu(s).','\x20menu(s);\x20skipped\x20','get','expect-visible','Menu\x20id\x20selector(s)\x20not\x20found:\x20','plannedActions','pageType','filter','666sITjAP','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','datasetCode','cookie','1598924YWuEPZ','POST','sort','Menu\x20','paths','url','trim','update-recovery','update-menu-visibility','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','set','requestedVisible','1677773eLlWFR','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','false','update\x20menu\x20visibility','10bxHdsw','verify\x20menu\x20visibility\x20update','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','\x20menu(s);\x20skip\x20','datasetId','menu_selector_not_found','30186tRLMTT','22LkvBHr','\x20menu(s),\x20expected\x20','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','before','length','split','\x20must\x20be\x20true\x20or\x20false.','push','expectVisible','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','message','10011483ZVuxbU','some','targets','stringify','isArray','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','code','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','byId','106PRiyqM','recovered','childrenCount','Menu\x20visibility\x20update\x20completed:\x20','isSafeInteger','flagMissing','body','Requested\x20menu\x20visibility','Menu\x20path\x20selector\x20not\x20found:\x20','Response\x20was\x20lost\x20for\x20menu\x20','update','str','Final\x20menu\x20visibility\x20readback\x20failed.','resourcesValid','hash','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','rabetbase\x20menu\x20list\x20--format\x20compress','failed','\x20failed.','verification'];a191_0x45bb=function(){return _0x23a20a;};return a191_0x45bb();}function parseCsv(_0x2159b5){const _0x2f51b6=a191_0x351d3e;return[...new Set(_0x2159b5[_0x2f51b6(0x1be)](',')[_0x2f51b6(0x20d)](_0x4aa946=>_0x4aa946[_0x2f51b6(0x221)]())[_0x2f51b6(0x216)](Boolean))];}function parseBooleanFlag(_0x4e0c57,_0x34cdd5,_0x466aa6){const _0x37d86c=a191_0x351d3e;if(!hasFlag(_0x4e0c57,_0x34cdd5)){if(_0x466aa6)throw CliErrors[_0x37d86c(0x1d4)](_0x34cdd5);return undefined;}const _0x83acfb=_0x4e0c57['rawFlags'][_0x34cdd5];if(_0x83acfb===!![]||_0x83acfb===![])return _0x83acfb;if(_0x83acfb===_0x37d86c(0x1fc))return!![];if(_0x83acfb===_0x37d86c(0x22a))return![];throw CliErrors[_0x37d86c(0x209)]('--'+_0x34cdd5+_0x37d86c(0x1bf));}function verifyVisibilityUpdate(_0x18fb33,_0x5a3379,_0xd7d44b){const _0x4c40d5=a191_0x351d3e;assertVerified(!!_0x5a3379,'Menu\x20'+_0x18fb33['id']+_0x4c40d5(0x1f5)),assertVerified(_0x5a3379[_0x4c40d5(0x1ec)]===_0xd7d44b,_0x4c40d5(0x21e)+_0x18fb33['id']+_0x4c40d5(0x225));const _0x16c148=[['id',_0x5a3379['id'],_0x18fb33['id']],['parentId',_0x5a3379['parentId'],_0x18fb33['parentId']],[_0x4c40d5(0x207),_0x5a3379[_0x4c40d5(0x207)],_0x18fb33[_0x4c40d5(0x207)]],['label',_0x5a3379[_0x4c40d5(0x1f0)],_0x18fb33[_0x4c40d5(0x1f0)]],[_0x4c40d5(0x1e5),_0x5a3379['path'],_0x18fb33['path']],['url',_0x5a3379['url'],_0x18fb33[_0x4c40d5(0x220)]],[_0x4c40d5(0x1f4),_0x5a3379[_0x4c40d5(0x1f4)],_0x18fb33[_0x4c40d5(0x1f4)]],[_0x4c40d5(0x21d),_0x5a3379[_0x4c40d5(0x21d)],_0x18fb33[_0x4c40d5(0x21d)]],[_0x4c40d5(0x20c),_0x5a3379['resources'],_0x18fb33[_0x4c40d5(0x20c)]],['resourcesValid',_0x5a3379['resourcesValid'],_0x18fb33[_0x4c40d5(0x1dc)]],['childrenIds',_0x5a3379[_0x4c40d5(0x1f7)],_0x18fb33[_0x4c40d5(0x1f7)]],[_0x4c40d5(0x1d1),_0x5a3379[_0x4c40d5(0x1d1)],_0x18fb33[_0x4c40d5(0x1d1)]],[_0x4c40d5(0x1e4),_0x5a3379[_0x4c40d5(0x1e4)],_0x18fb33[_0x4c40d5(0x1e4)]],[_0x4c40d5(0x215),_0x5a3379['pageType'],_0x18fb33[_0x4c40d5(0x215)]],[_0x4c40d5(0x203),_0x5a3379[_0x4c40d5(0x203)],_0x18fb33[_0x4c40d5(0x203)]],[_0x4c40d5(0x230),_0x5a3379[_0x4c40d5(0x230)],_0x18fb33['datasetId']],[_0x4c40d5(0x219),_0x5a3379[_0x4c40d5(0x219)],_0x18fb33['datasetCode']]];for(const [_0x36840e,_0x5e470f,_0x3d1bf3]of _0x16c148){assertVerified(sameValue(_0x5e470f,_0x3d1bf3),_0x4c40d5(0x21e)+_0x18fb33['id']+'\x20'+_0x36840e+_0x4c40d5(0x1f6));}}function sameValue(_0x47d080,_0x38d35a){const _0x1ea65d=a191_0x351d3e;if(Array['isArray'](_0x47d080)||Array[_0x1ea65d(0x1ca)](_0x38d35a))return JSON['stringify'](_0x47d080)===JSON[_0x1ea65d(0x1c9)](_0x38d35a);return _0x47d080===_0x38d35a;}
|
|
1
|
+
const a191_0x3c4aeb=a191_0x4692;(function(_0x14f96a,_0x3d287a){const _0x40d68d=a191_0x4692,_0x5ddb50=_0x14f96a();while(!![]){try{const _0x48e74f=-parseInt(_0x40d68d(0xc6))/0x1+-parseInt(_0x40d68d(0x103))/0x2*(-parseInt(_0x40d68d(0x120))/0x3)+parseInt(_0x40d68d(0xa9))/0x4*(parseInt(_0x40d68d(0xf1))/0x5)+parseInt(_0x40d68d(0xc4))/0x6*(-parseInt(_0x40d68d(0xf0))/0x7)+parseInt(_0x40d68d(0xa3))/0x8+-parseInt(_0x40d68d(0x116))/0x9*(-parseInt(_0x40d68d(0xbd))/0xa)+parseInt(_0x40d68d(0x113))/0xb*(-parseInt(_0x40d68d(0xd5))/0xc);if(_0x48e74f===_0x3d287a)break;else _0x5ddb50['push'](_0x5ddb50['shift']());}catch(_0x306d1f){_0x5ddb50['push'](_0x5ddb50['shift']());}}}(a191_0xd811,0xad939));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_0x3c4aeb(0xe2),'path':a191_0x3c4aeb(0xf8)}];export const menuVisibilityUpdate={'service':a191_0x3c4aeb(0x102),'command':a191_0x3c4aeb(0xfa),'description':a191_0x3c4aeb(0xc5),'risk':'write','structuredErrors':!![],'flags':[{'name':a191_0x3c4aeb(0xfb),'type':a191_0x3c4aeb(0xc2),'description':a191_0x3c4aeb(0xb6)},{'name':a191_0x3c4aeb(0x10f),'type':a191_0x3c4aeb(0xc2),'description':a191_0x3c4aeb(0x11c)},{'name':'visible','type':a191_0x3c4aeb(0xbe),'required':!![],'description':a191_0x3c4aeb(0xfd)},{'name':a191_0x3c4aeb(0xe5),'type':'boolean','description':a191_0x3c4aeb(0xee)},{'name':a191_0x3c4aeb(0xe6),'type':a191_0x3c4aeb(0xb9),'description':a191_0x3c4aeb(0xc9)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x76c1e4){parseInput(_0x76c1e4);},async 'dryRun'(_0x30173d){const _0x380ada=a191_0x3c4aeb,_0x4e9507=await buildPlan(_0x30173d,!![]),_0x528b9d=_0x4e9507['plan'][_0x380ada(0x112)]?.[_0x380ada(0xb4)]??0x0,_0x41577a=_0x4e9507[_0x380ada(0xd3)][_0x380ada(0xf9)][_0x380ada(0xb4)]-_0x528b9d;return menuDryRunResult(_0x4e9507[_0x380ada(0xd3)],{'method':_0x380ada(0xe2),'url':_0x380ada(0xf8),'body':{'updates':_0x4e9507[_0x380ada(0xd3)][_0x380ada(0x112)]?.[_0x380ada(0xce)](_0x3f2a31=>_0x3f2a31[_0x380ada(0xe9)])??[]},'description':_0x380ada(0xc1)+_0x528b9d+'\x20menu(s);\x20skip\x20'+_0x41577a+_0x380ada(0xe0)});},async 'execute'(_0x193ff0){const _0x2856a3=a191_0x3c4aeb,_0x251eb8=await buildPlan(_0x193ff0,![]);await recheckMutationSnapshot(_0x193ff0,_0x251eb8['plan'],_0x2856a3(0x10b));const _0x4aca71=[],_0x12c0c5=[],_0xffaed4=[];for(const _0x32700f of _0x251eb8['plan'][_0x2856a3(0xf9)]){if(_0x32700f[_0x2856a3(0xe4)]['visible']===_0x251eb8[_0x2856a3(0xd3)][_0x2856a3(0xcb)]){_0x4aca71['push']({'id':_0x32700f['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x193ff0[_0x2856a3(0xd6)],_0x193ff0[_0x2856a3(0x101)],{'id':_0x32700f['id'],'visible':_0x251eb8[_0x2856a3(0xd3)][_0x2856a3(0xcb)]}),_0x4aca71[_0x2856a3(0xc8)]({'id':_0x32700f['id'],'updated':!![],'skipped':![]});}catch(_0x2a332f){const _0x5055bf=mapMenuApiError(_0x2a332f,_0x2856a3(0xae),_0x32700f['id']);if(isMenuResponseLoss(_0x2a332f)&&_0x5055bf[_0x2856a3(0xf2)]!==_0x2856a3(0xed)){_0xffaed4['push'](_0x32700f['id']);continue;}_0x12c0c5[_0x2856a3(0xc8)]({'id':_0x32700f['id'],'stage':_0x2856a3(0x107),'code':_0x5055bf['code'],'message':_0x5055bf[_0x2856a3(0xff)]});}}let _0x2e12ac;try{_0x2e12ac=await fetchMenuSnapshot(_0x193ff0[_0x2856a3(0xd6)],_0x193ff0[_0x2856a3(0x101)]);}catch(_0x549e53){const _0x189b9a=describeMenuErrorCause(_0x549e53,_0x2856a3(0xe8)),_0x342b1f=_0xffaed4['map'](_0x467244=>({'id':_0x467244,'stage':'update-recovery','code':_0x2856a3(0xc7),'message':_0x2856a3(0x111)+_0x467244+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x21633c={'stage':_0x2856a3(0x11d),'code':_0x2856a3(0xc7),'message':_0x2856a3(0xac),'targetIds':_0x251eb8[_0x2856a3(0xd3)]['targets']['map'](_0x8644dc=>_0x8644dc['id']),'requestedStateConfirmed':![],..._0x189b9a};throw menuFailure(asVerificationError(_0x549e53,_0x2856a3(0xb8)),_0x251eb8['plan'],{'stage':_0x2856a3(0x11d),'succeeded':_0x4aca71,'failedRecords':[..._0x12c0c5,..._0x342b1f,_0x21633c],'warnings':[_0x2856a3(0xf7)],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x43b7f4=[];for(const _0xa20d8a of _0x4aca71){const _0x5bea0e=Number(_0xa20d8a['id']),_0x1194e5=_0x251eb8[_0x2856a3(0xd4)]['get'](_0x5bea0e),_0x2c3d0c=_0x2e12ac['byId']['get'](_0x5bea0e);try{verifyVisibilityUpdate(_0x1194e5,_0x2c3d0c,_0x251eb8['plan'][_0x2856a3(0xcb)]);}catch(_0x1eb4a3){const _0x357ff1=asVerificationError(_0x1eb4a3,_0x2856a3(0xab)+_0x5bea0e+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x43b7f4[_0x2856a3(0xc8)]({'id':_0x5bea0e,'stage':_0x2856a3(0x11d),'code':_0x357ff1[_0x2856a3(0xf2)],'message':_0x357ff1[_0x2856a3(0xff)],'requestedStateConfirmed':![]});}}for(const _0x19c703 of _0xffaed4){const _0x2198c6=_0x251eb8['beforeById'][_0x2856a3(0xb2)](_0x19c703),_0x508a75=_0x2e12ac[_0x2856a3(0xca)][_0x2856a3(0xb2)](_0x19c703);try{verifyVisibilityUpdate(_0x2198c6,_0x508a75,_0x251eb8[_0x2856a3(0xd3)][_0x2856a3(0xcb)]),_0x4aca71[_0x2856a3(0xc8)]({'id':_0x19c703,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x4bda75){const _0x374e18=asVerificationError(_0x4bda75,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x19c703+_0x2856a3(0xbf));_0x43b7f4[_0x2856a3(0xc8)]({'id':_0x19c703,'stage':'update-recovery','code':_0x374e18[_0x2856a3(0xf2)],'message':_0x374e18[_0x2856a3(0xff)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x43b7f4[_0x2856a3(0xb4)]>0x0){const _0x429939=_0x43b7f4[_0x2856a3(0xce)](_0x39188d=>Number(_0x39188d['id'])),_0x4ae229=_0x4aca71[_0x2856a3(0xaf)](_0x4309d7=>_0x4309d7['recovered']===!![])[_0x2856a3(0xb4)],_0x43a8d2=menuError(_0x2856a3(0xc7),_0x2856a3(0xaa)+_0x429939[_0x2856a3(0xd0)](',\x20')+'.',_0x2856a3(0xdc));throw menuFailure(_0x43a8d2,_0x251eb8[_0x2856a3(0xd3)],{'stage':'verification','succeeded':_0x4aca71,'failedRecords':[..._0x12c0c5,..._0x43b7f4],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x2856a3(0xba),..._0x429939[_0x2856a3(0xb4)]===0x1?{'targetId':_0x429939[0x0]}:{'targetIds':_0x429939},'recoveredCount':_0x4ae229,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x2ef58b=_0x4aca71['filter'](_0x5cb23c=>_0x5cb23c[_0x2856a3(0xec)]===!![])['length'],_0x4461ec=_0x4aca71[_0x2856a3(0xb4)]-_0x2ef58b,_0x765a5a={..._0x251eb8['plan'],'succeeded':_0x4aca71,'failed':_0x12c0c5,'warnings':_0x12c0c5[_0x2856a3(0xb4)]>0x0?[..._0x251eb8['plan'][_0x2856a3(0x10d)],_0x2856a3(0x115)]:_0x251eb8['plan'][_0x2856a3(0x10d)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x2e12ac[_0x2856a3(0xdd)],'matchesRequestedState':_0x12c0c5[_0x2856a3(0xb4)]===0x0,'recoveredCount':_0xffaed4[_0x2856a3(0xb4)]}};return{'ok':_0x12c0c5['length']===0x0,'data':_0x765a5a,'message':_0x12c0c5[_0x2856a3(0xb4)]===0x0?_0x2856a3(0xfe)+_0x2ef58b+'\x20menu(s);\x20skipped\x20'+_0x4461ec+_0x2856a3(0xe0):_0x2856a3(0x10e)+_0x2ef58b+_0x2856a3(0xcc)+_0x4461ec+'\x20skipped,\x20'+_0x12c0c5['length']+_0x2856a3(0xa8)};}};function parseInput(_0x136105){const _0x1b6ca0=a191_0x3c4aeb,_0x12bd6f=parseMenuIds(_0x136105[_0x1b6ca0(0xf6)](_0x1b6ca0(0xfb))),_0x57a187=parseCsv(_0x136105[_0x1b6ca0(0xf6)](_0x1b6ca0(0x10f)));if(_0x12bd6f[_0x1b6ca0(0xb4)]===0x0&&_0x57a187[_0x1b6ca0(0xb4)]===0x0)throw CliErrors[_0x1b6ca0(0x11e)](_0x1b6ca0(0x108));const _0x20cedd=parseBooleanFlag(_0x136105,_0x1b6ca0(0x110),!![]),_0x388c09=parseBooleanFlag(_0x136105,_0x1b6ca0(0xe5),![]);let _0x17d591;if(hasFlag(_0x136105,_0x1b6ca0(0xe6))){_0x17d591=_0x136105[_0x1b6ca0(0x11f)](_0x1b6ca0(0xe6));if(!Number['isSafeInteger'](_0x17d591)||_0x17d591<0x0)throw CliErrors[_0x1b6ca0(0x11e)](_0x1b6ca0(0xfc));}return{'menuIds':_0x12bd6f,'paths':_0x57a187,'visible':_0x20cedd,'expectVisible':_0x388c09,'expectedCount':_0x17d591};}async function buildPlan(_0x139b70,_0x1abbda){const _0x2a69fd=a191_0x3c4aeb,_0x217f66=parseInput(_0x139b70),_0x1fda34=await fetchMutationSnapshot(_0x139b70,_0x2a69fd(0x10b)),_0x3e2b42=selectTargets(_0x1fda34['menus'],_0x217f66[_0x2a69fd(0xf5)],_0x217f66[_0x2a69fd(0x10f)]);if(_0x217f66['expectedCount']!==undefined&&_0x3e2b42[_0x2a69fd(0xb4)]!==_0x217f66[_0x2a69fd(0xcf)])throw menuError('menu_expected_count_mismatch',_0x2a69fd(0xbb)+_0x3e2b42[_0x2a69fd(0xb4)]+'\x20menu(s),\x20expected\x20'+_0x217f66[_0x2a69fd(0xcf)]+'.',_0x2a69fd(0xde));if(_0x217f66[_0x2a69fd(0xb3)]!==undefined){const _0x53a697=_0x3e2b42[_0x2a69fd(0xaf)](_0x5ad430=>_0x5ad430['visible']!==_0x217f66[_0x2a69fd(0xb3)]);if(_0x53a697[_0x2a69fd(0xb4)]>0x0)throw menuError(_0x2a69fd(0xa5),'Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x53a697[_0x2a69fd(0xce)](_0x3647ca=>_0x3647ca['id'])['join'](',\x20')+'.',_0x2a69fd(0xa4));}const _0xde944=_0x3e2b42[_0x2a69fd(0xce)](_0x45876e=>({'id':_0x45876e['id'],'label':_0x45876e['label'],'path':_0x45876e[_0x2a69fd(0xdb)],'before':{'visible':_0x45876e[_0x2a69fd(0x110)]},'after':{'visible':_0x217f66[_0x2a69fd(0x110)]}})),_0x561462=_0xde944[_0x2a69fd(0xaf)](_0x309dee=>_0x309dee[_0x2a69fd(0xe4)]['visible']!==_0x217f66[_0x2a69fd(0x110)])[_0x2a69fd(0xce)](_0x44c1ea=>({'stage':'update-menu-visibility','method':_0x2a69fd(0xe2),'path':'/smartapi/menu/update','body':{'appCode':_0x139b70[_0x2a69fd(0xd6)],'id':_0x44c1ea['id'],'visible':_0x217f66[_0x2a69fd(0x110)]}})),_0x3a23ae=mutationResult({'operation':_0x2a69fd(0xfa),'selector':{'menuIds':_0x217f66[_0x2a69fd(0xf5)],'paths':_0x217f66[_0x2a69fd(0x10f)]},'before':{'menus':_0x3e2b42[_0x2a69fd(0xce)](_0x584d38=>({'id':_0x584d38['id'],'path':_0x584d38[_0x2a69fd(0xdb)],'visible':_0x584d38[_0x2a69fd(0x110)]}))},'after':{'menus':_0x3e2b42['map'](_0x447023=>({'id':_0x447023['id'],'path':_0x447023['path'],'visible':_0x217f66[_0x2a69fd(0x110)]}))},'dryRun':_0x1abbda,'backend':[...BACKEND],'plannedActions':_0x561462,'snapshotHash':_0x1fda34[_0x2a69fd(0xdd)],'warnings':_0x561462['length']===0x0?[_0x2a69fd(0x117)]:[]});return{'plan':{..._0x3a23ae,'requestedVisible':_0x217f66[_0x2a69fd(0x110)],'targets':_0xde944},'beforeById':new Map(_0x3e2b42['map'](_0x436102=>[_0x436102['id'],_0x436102]))};}function selectTargets(_0x42f717,_0x1cf65f,_0x1aba49){const _0x4a65ce=a191_0x3c4aeb,_0x9dab61=new Map(_0x42f717[_0x4a65ce(0xce)](_0x5588ad=>[_0x5588ad['id'],_0x5588ad])),_0x38dba2=new Map(),_0x3e8928=_0x1cf65f[_0x4a65ce(0xaf)](_0x3ce8a0=>!_0x9dab61[_0x4a65ce(0xb0)](_0x3ce8a0));if(_0x3e8928[_0x4a65ce(0xb4)]>0x0)throw menuError(_0x4a65ce(0xcd),_0x4a65ce(0x119)+_0x3e8928[_0x4a65ce(0xd0)](',\x20')+'.',_0x4a65ce(0xe3));for(const _0x4ac679 of _0x1cf65f){_0x38dba2[_0x4a65ce(0xd9)](_0x4ac679,_0x9dab61[_0x4a65ce(0xb2)](_0x4ac679));}for(const _0x286f54 of _0x1aba49){const _0x553ee0=_0x42f717[_0x4a65ce(0xaf)](_0x530b2e=>_0x530b2e[_0x4a65ce(0xdb)]===_0x286f54);if(_0x553ee0[_0x4a65ce(0xb4)]===0x0)throw menuError(_0x4a65ce(0xcd),_0x4a65ce(0xe1)+JSON[_0x4a65ce(0xf4)](_0x286f54)+'.',_0x4a65ce(0xef));if(_0x553ee0[_0x4a65ce(0xb4)]>0x1)throw menuError('menu_selector_ambiguous',_0x4a65ce(0x106)+JSON[_0x4a65ce(0xf4)](_0x286f54)+'.',_0x4a65ce(0xd8)+_0x553ee0[_0x4a65ce(0xce)](_0x2348b9=>_0x2348b9['id'])['join'](',\x20')+'.');const _0x151e6b=_0x553ee0[0x0];_0x38dba2[_0x4a65ce(0xd9)](_0x151e6b['id'],_0x151e6b);}return[..._0x38dba2[_0x4a65ce(0xb7)]()];}function parseMenuIds(_0x4da9b9){const _0x52cb4b=a191_0x3c4aeb,_0x2b128c=parseCsv(_0x4da9b9),_0x36ed02=_0x2b128c[_0x52cb4b(0xce)](Number);if(_0x36ed02[_0x52cb4b(0x11a)](_0x5648df=>!Number[_0x52cb4b(0xa6)](_0x5648df)||_0x5648df<=0x0))throw CliErrors['validation'](_0x52cb4b(0x100));return[...new Set(_0x36ed02)];}function parseCsv(_0x2f04b1){const _0x4e3c50=a191_0x3c4aeb;return[...new Set(_0x2f04b1[_0x4e3c50(0xf3)](',')['map'](_0xf6a508=>_0xf6a508[_0x4e3c50(0xb1)]())[_0x4e3c50(0xaf)](Boolean))];}function a191_0x4692(_0x573f00,_0x349d71){_0x573f00=_0x573f00-0xa3;const _0xd811f5=a191_0xd811();let _0x469253=_0xd811f5[_0x573f00];return _0x469253;}function a191_0xd811(){const _0x23a5c3=['menu_selector_not_found','map','expectedCount','join','flagMissing','datasetCode','plan','beforeById','492GnpbwJ','appCode','depth','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','set','pageId','path','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','hash','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','true','\x20unchanged\x20menu(s).','Menu\x20path\x20selector\x20not\x20found:\x20','POST','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','before','expect-visible','expected-count','sort','verify\x20menu\x20visibility\x20update','body','modelType','childrenIds','updated','menu_permission_denied','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','2726591ecQvVB','35LqyFUx','code','split','stringify','menuIds','str','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','/smartapi/menu/update','targets','visibility-update','menu-ids','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Requested\x20menu\x20visibility','Updated\x20visibility\x20for\x20','message','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','cookie','menu','427262vjXvDw','\x20changed\x20unexpectedly.','isArray','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','update','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','url','pageType','update\x20menu\x20visibility','rawFlags','warnings','Menu\x20visibility\x20update\x20completed:\x20','paths','visible','Response\x20was\x20lost\x20for\x20menu\x20','plannedActions','173228pPJMrd','type','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','5022mLzhup','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','datasetId','Menu\x20id\x20selector(s)\x20not\x20found:\x20','some','parentId','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','verification','validation','num','3MvFVbY','2727488saPStF','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','menu_state_drift','isSafeInteger','\x20must\x20be\x20true\x20or\x20false.','\x20failed.','666972gqeVko','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','Menu\x20','Final\x20menu\x20visibility\x20readback\x20failed.','childrenCount','update\x20visibility\x20for','filter','has','trim','get','expectVisible','length','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','values','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','number','failed','Selected\x20','resourcesValid','18510QkMKtY','boolean','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','label','Would\x20update\x20visibility\x20for\x20','string','resources','6wicTPr','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','1008476UqtjDl','menu_verification_failed','push','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','byId','requestedVisible','\x20updated,\x20'];a191_0xd811=function(){return _0x23a5c3;};return a191_0xd811();}function parseBooleanFlag(_0x477ead,_0x34ffba,_0x26256d){const _0x1f4045=a191_0x3c4aeb;if(!hasFlag(_0x477ead,_0x34ffba)){if(_0x26256d)throw CliErrors[_0x1f4045(0xd1)](_0x34ffba);return undefined;}const _0x1562b4=_0x477ead[_0x1f4045(0x10c)][_0x34ffba];if(_0x1562b4===!![]||_0x1562b4===![])return _0x1562b4;if(_0x1562b4===_0x1f4045(0xdf))return!![];if(_0x1562b4==='false')return![];throw CliErrors[_0x1f4045(0x11e)]('--'+_0x34ffba+_0x1f4045(0xa7));}function verifyVisibilityUpdate(_0x5bd747,_0x1bf084,_0x1279c7){const _0x29756e=a191_0x3c4aeb;assertVerified(!!_0x1bf084,_0x29756e(0xab)+_0x5bd747['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x1bf084[_0x29756e(0x110)]===_0x1279c7,_0x29756e(0xab)+_0x5bd747['id']+_0x29756e(0xb5));const _0x25571b=[['id',_0x1bf084['id'],_0x5bd747['id']],['parentId',_0x1bf084[_0x29756e(0x11b)],_0x5bd747[_0x29756e(0x11b)]],[_0x29756e(0xd7),_0x1bf084['depth'],_0x5bd747[_0x29756e(0xd7)]],[_0x29756e(0xc0),_0x1bf084[_0x29756e(0xc0)],_0x5bd747['label']],[_0x29756e(0xdb),_0x1bf084[_0x29756e(0xdb)],_0x5bd747['path']],[_0x29756e(0x109),_0x1bf084[_0x29756e(0x109)],_0x5bd747['url']],[_0x29756e(0x114),_0x1bf084[_0x29756e(0x114)],_0x5bd747[_0x29756e(0x114)]],[_0x29756e(0xe7),_0x1bf084[_0x29756e(0xe7)],_0x5bd747[_0x29756e(0xe7)]],[_0x29756e(0xc3),_0x1bf084['resources'],_0x5bd747[_0x29756e(0xc3)]],[_0x29756e(0xbc),_0x1bf084[_0x29756e(0xbc)],_0x5bd747[_0x29756e(0xbc)]],[_0x29756e(0xeb),_0x1bf084[_0x29756e(0xeb)],_0x5bd747[_0x29756e(0xeb)]],['childrenCount',_0x1bf084[_0x29756e(0xad)],_0x5bd747[_0x29756e(0xad)]],[_0x29756e(0xda),_0x1bf084[_0x29756e(0xda)],_0x5bd747[_0x29756e(0xda)]],['pageType',_0x1bf084[_0x29756e(0x10a)],_0x5bd747['pageType']],[_0x29756e(0xea),_0x1bf084[_0x29756e(0xea)],_0x5bd747[_0x29756e(0xea)]],[_0x29756e(0x118),_0x1bf084[_0x29756e(0x118)],_0x5bd747[_0x29756e(0x118)]],['datasetCode',_0x1bf084[_0x29756e(0xd2)],_0x5bd747[_0x29756e(0xd2)]]];for(const [_0xdc7e3e,_0x483d2c,_0x3677e9]of _0x25571b){assertVerified(sameValue(_0x483d2c,_0x3677e9),_0x29756e(0xab)+_0x5bd747['id']+'\x20'+_0xdc7e3e+_0x29756e(0x104));}}function sameValue(_0x4f073a,_0x323314){const _0x204659=a191_0x3c4aeb;if(Array[_0x204659(0x105)](_0x4f073a)||Array['isArray'](_0x323314))return JSON[_0x204659(0xf4)](_0x4f073a)===JSON['stringify'](_0x323314);return _0x4f073a===_0x323314;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a192_0x2b4a88=a192_0x2660;(function(_0x4c3cc4,_0x550521){const _0x284b93=a192_0x2660,_0x12c720=_0x4c3cc4();while(!![]){try{const _0x58eedf=-parseInt(_0x284b93(0x117))/0x1+parseInt(_0x284b93(0x120))/0x2*(-parseInt(_0x284b93(0x114))/0x3)+parseInt(_0x284b93(0x127))/0x4+-parseInt(_0x284b93(0x128))/0x5*(parseInt(_0x284b93(0x125))/0x6)+-parseInt(_0x284b93(0x133))/0x7+-parseInt(_0x284b93(0x132))/0x8*(-parseInt(_0x284b93(0x113))/0x9)+parseInt(_0x284b93(0x11d))/0xa*(parseInt(_0x284b93(0x116))/0xb);if(_0x58eedf===_0x550521)break;else _0x12c720['push'](_0x12c720['shift']());}catch(_0x387fb0){_0x12c720['push'](_0x12c720['shift']());}}}(a192_0x3e3f,0xb9e73));function a192_0x2660(_0x41b2c1,_0x3c74e1){_0x41b2c1=_0x41b2c1-0x112;const _0x3e3f1d=a192_0x3e3f();let _0x266016=_0x3e3f1d[_0x41b2c1];return _0x266016;}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=a192_0x2b4a88(0x12f);async function prepareCreate(_0x23cd15){const _0x4945e2=a192_0x2b4a88,_0x1c6798=await readNotificationDocument(_0x23cd15,_0x4945e2(0x12c)),_0x13c42d=createMutationInput(_0x23cd15[_0x4945e2(0x11b)],_0x1c6798);return{'document':_0x1c6798,'input':_0x13c42d,'planned':projectNotificationConfig({'appCode':_0x23cd15[_0x4945e2(0x11b)],'configName':_0x1c6798[_0x4945e2(0x12b)],'channelType':_0x1c6798[_0x4945e2(0x130)],'endpointUrl':_0x1c6798[_0x4945e2(0x12d)],'channelConfig':_0x1c6798[_0x4945e2(0x11a)],'description':_0x1c6798['description'],'connectTimeout':_0x1c6798[_0x4945e2(0x123)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x1c6798[_0x4945e2(0x129)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':'config-create','description':a192_0x2b4a88(0x119),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0xab8301){assertSingleNotificationSource(_0xab8301);},async 'dryRun'(_0x22a197){const _0x1f7c1c=a192_0x2b4a88,_0x36904f=await prepareCreate(_0x22a197),_0x59f84d=notificationLookupCommand(_0x22a197[_0x1f7c1c(0x11b)],_0x36904f[_0x1f7c1c(0x118)][_0x1f7c1c(0x130)]);return asDryRunResult({'operation':'create','selector':{'appCode':_0x22a197[_0x1f7c1c(0x11b)],'configName':_0x36904f[_0x1f7c1c(0x118)][_0x1f7c1c(0x12b)],'channelType':_0x36904f['document']['channelType']},'before':null,'after':_0x36904f[_0x1f7c1c(0x11c)],'dryRun':!![],'backend':{'method':_0x1f7c1c(0x122),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x1f7c1c(0x11c),'lookupCommand':_0x59f84d}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x58bc78){const _0x53ea61=a192_0x2b4a88,_0x407b02=await prepareCreate(_0x58bc78),_0x2890e9=notificationLookupCommand(_0x58bc78['appCode'],_0x407b02[_0x53ea61(0x118)]['channelType']);let _0x378936;try{_0x378936=await createNotificationChannelConfig(_0x407b02[_0x53ea61(0x131)]);}catch(_0x439a71){if(isPlatformTransportFailure(_0x439a71))throw notificationError('notification_config_create_outcome_unknown',_0x53ea61(0x124),_0x53ea61(0x134)+_0x2890e9+_0x53ea61(0x126));throw safeApiFailure(_0x53ea61(0x12c),_0x53ea61(0x11e),_0x53ea61(0x134)+_0x2890e9+_0x53ea61(0x12e));}if(!Number[_0x53ea61(0x121)](_0x378936)||_0x378936<=0x0)throw notificationError(_0x53ea61(0x115),'Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.',_0x53ea61(0x134)+_0x2890e9+_0x53ea61(0x126));let _0x517c5b;try{const _0x1c7442=await getNotificationChannelConfig(_0x378936,_0x58bc78[_0x53ea61(0x11b)]);_0x517c5b=normalizeExactNotificationConfig(_0x1c7442,_0x378936,_0x58bc78[_0x53ea61(0x11b)]);}catch{throw safeApiFailure(_0x53ea61(0x12c),_0x53ea61(0x112),_0x53ea61(0x134)+_0x2890e9+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x53ea61(0x12c),'selector':{'appCode':_0x517c5b['appCode'],'id':_0x517c5b['id'],'configCode':_0x517c5b[_0x53ea61(0x11f)],'configName':_0x517c5b[_0x53ea61(0x12b)],'channelType':_0x517c5b[_0x53ea61(0x130)]},'before':null,'after':projectNotificationConfig(_0x517c5b),'dryRun':![],'backend':{'method':_0x53ea61(0x122),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x53ea61(0x12a),'lookupCommand':_0x2890e9}},'message':'Created\x20notification\x20config\x20'+_0x517c5b['id']};}};function a192_0x3e3f(){const _0x34a7a6=['606BMmyMm','notification_config_create_outcome_unknown','154sZURgb','941036yAwnyt','document','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','channelConfig','appCode','planned','1604330VPrdGj','mutation','configCode','11312szrdhE','isSafeInteger','POST','connectTimeout','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','143352TkNSKU',';\x20do\x20not\x20resubmit.','3557912mEXJoK','45lZNtBa','readTimeout','verified','configName','create','endpointUrl',';\x20no\x20automatic\x20retry\x20was\x20attempted.','/notification/channel-config/create','channelType','input','180872wOdiFl','4959899uvXStB','Inspect\x20with\x20','verification','252NrOQGA'];a192_0x3e3f=function(){return _0x34a7a6;};return a192_0x3e3f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a193_0x2728c3=a193_0x496a;(function(_0x1d6b85,_0x2e8638){const _0x2214bb=a193_0x496a,_0x5229ea=_0x1d6b85();while(!![]){try{const _0x13885c=parseInt(_0x2214bb(0x12a))/0x1+parseInt(_0x2214bb(0x12e))/0x2+-parseInt(_0x2214bb(0x123))/0x3+-parseInt(_0x2214bb(0x133))/0x4*(parseInt(_0x2214bb(0x122))/0x5)+-parseInt(_0x2214bb(0x120))/0x6+-parseInt(_0x2214bb(0x12f))/0x7*(-parseInt(_0x2214bb(0x117))/0x8)+parseInt(_0x2214bb(0x12b))/0x9;if(_0x13885c===_0x2e8638)break;else _0x5229ea['push'](_0x5229ea['shift']());}catch(_0x3abe7c){_0x5229ea['push'](_0x5229ea['shift']());}}}(a193_0x504c,0xd9aca));import{asDryRunResult}from'../../commands/common/dry-run.js';function a193_0x496a(_0x5bdb53,_0x5948aa){_0x5bdb53=_0x5bdb53-0x117;const _0x504c2d=a193_0x504c();let _0x496ac5=_0x504c2d[_0x5bdb53];return _0x496ac5;}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_0x2728c3(0x119),REFERENCE_WARNING=a193_0x2728c3(0x131);async function prepareDelete(_0xdc260e){const _0x302d39=a193_0x2728c3,_0x3a39d5=readNotificationId(_0xdc260e),_0x524bb2=await requireExactNotificationConfig(_0xdc260e[_0x302d39(0x11e)],_0x3a39d5,_0x302d39(0x135));return{'id':_0x3a39d5,'before':_0x524bb2};}function a193_0x504c(){const _0x59fd77=['channelType','32Ikytrj',';\x20no\x20automatic\x20retry\x20was\x20attempted.','delete','high-risk-write','8yWWQyT','\x20remains\x20present\x20after\x20delete.','/notification/channel-config/delete','planned','config-delete',';\x20do\x20not\x20resubmit\x20automatically.','mutation','appCode','Notification\x20config\x20','746490lFcCCu','POST','269305UGljBW','5055783CtJUHV','Inspect\x20with\x20','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','notification_config_delete_verification_failed','notification','verified','655230eCKaTf','9931617okCIyi','\x20delete\x20could\x20not\x20be\x20verified.','before','632432choPup','7400393QMQOWe','unshift','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.'];a193_0x504c=function(){return _0x59fd77;};return a193_0x504c();}export const notificationConfigDelete={'service':a193_0x2728c3(0x128),'command':a193_0x2728c3(0x11b),'description':a193_0x2728c3(0x126),'risk':a193_0x2728c3(0x136),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x4028a0){readNotificationId(_0x4028a0),requireNotificationExplicitYes(_0x4028a0);},async 'dryRun'(_0x2c34d6){const _0x533dc3=a193_0x2728c3,_0x197797=await prepareDelete(_0x2c34d6),_0x3e69ae=notificationLookupCommand(_0x2c34d6[_0x533dc3(0x11e)],_0x197797[_0x533dc3(0x12d)]['channelType']);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x197797[_0x533dc3(0x12d)]),'before':projectNotificationConfig(_0x197797['before']),'after':null,'dryRun':!![],'backend':{'method':_0x533dc3(0x121),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x533dc3(0x11a),'lookupCommand':_0x3e69ae}},{'method':_0x533dc3(0x121),'url':DELETE_PATH});},async 'execute'(_0x2a7f21){const _0x208298=a193_0x2728c3;requireNotificationExplicitYes(_0x2a7f21);const _0x38fc65=await prepareDelete(_0x2a7f21),_0x24f410=notificationLookupCommand(_0x2a7f21[_0x208298(0x11e)],_0x38fc65['before']['channelType']);let _0x4a77b3=![];try{await deleteNotificationChannelConfig(_0x38fc65['id'],_0x2a7f21[_0x208298(0x11e)]);}catch(_0x2f5886){if(!isPlatformTransportFailure(_0x2f5886))throw safeApiFailure(_0x208298(0x135),_0x208298(0x11d),_0x208298(0x124)+_0x24f410+_0x208298(0x134));_0x4a77b3=!![];}let _0x531210;try{_0x531210=await listNotificationChannelConfigs(_0x2a7f21[_0x208298(0x11e)],_0x38fc65[_0x208298(0x12d)][_0x208298(0x132)]),validateNotificationDeleteReadback(_0x531210,_0x2a7f21[_0x208298(0x11e)],_0x38fc65[_0x208298(0x12d)][_0x208298(0x132)]);}catch{throw notificationError(_0x4a77b3?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable','Notification\x20config\x20'+_0x38fc65['id']+_0x208298(0x12c),'Inspect\x20with\x20'+_0x24f410+_0x208298(0x11c));}if(_0x531210['some'](_0x5ad970=>_0x5ad970['id']===_0x38fc65['id']))throw notificationError(_0x4a77b3?'notification_config_delete_outcome_unknown':_0x208298(0x127),_0x208298(0x11f)+_0x38fc65['id']+_0x208298(0x118),_0x208298(0x124)+_0x24f410+_0x208298(0x11c));const _0x2ae6b1=[REFERENCE_WARNING];return _0x4a77b3&&_0x2ae6b1[_0x208298(0x130)](_0x208298(0x125)),{'ok':!![],'data':{'operation':_0x208298(0x135),'selector':notificationSelector(_0x38fc65[_0x208298(0x12d)]),'before':projectNotificationConfig(_0x38fc65[_0x208298(0x12d)]),'after':null,'dryRun':![],'backend':{'method':_0x208298(0x121),'path':DELETE_PATH},'warnings':_0x2ae6b1,'verification':{'status':_0x208298(0x129),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x4a77b3,'lookupCommand':_0x24f410}},'message':'Deleted\x20notification\x20config\x20'+_0x38fc65['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a194_0x2a47c1=a194_0x5f66;function a194_0x5f66(_0x294cd5,_0x286e7){_0x294cd5=_0x294cd5-0x135;const _0x21db8e=a194_0x21db();let _0x5f666c=_0x21db8e[_0x294cd5];return _0x5f666c;}(function(_0x1e5861,_0x509e45){const _0x100d84=a194_0x5f66,_0x59b580=_0x1e5861();while(!![]){try{const _0x1b7dd7=parseInt(_0x100d84(0x142))/0x1+-parseInt(_0x100d84(0x148))/0x2+-parseInt(_0x100d84(0x13e))/0x3+-parseInt(_0x100d84(0x138))/0x4*(-parseInt(_0x100d84(0x14f))/0x5)+parseInt(_0x100d84(0x151))/0x6*(-parseInt(_0x100d84(0x14c))/0x7)+-parseInt(_0x100d84(0x147))/0x8*(-parseInt(_0x100d84(0x13b))/0x9)+parseInt(_0x100d84(0x14b))/0xa;if(_0x1b7dd7===_0x509e45)break;else _0x59b580['push'](_0x59b580['shift']());}catch(_0x36b1a6){_0x59b580['push'](_0x59b580['shift']());}}}(a194_0x21db,0x5d651));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a194_0x21db(){const _0x36c78f=['Found\x20','boolean','all','531915LrfYdt','read','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','type','appCode','8FekqWp','1254360hQzReA','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','string','2186850ZexaAm','389137DLBmSc','\x20notification\x20config(s)','flat','606835PwuMxo','config-list','6fAzWXG','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','notification','bool','validation','8aivGpp','Notification\x20channel\x20type','length','4506534NkfvUN','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','map','1286232tHFBDa'];a194_0x21db=function(){return _0x36c78f;};return a194_0x21db();}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a194_0x2a47c1(0x135),'command':a194_0x2a47c1(0x150),'description':a194_0x2a47c1(0x144),'risk':a194_0x2a47c1(0x143),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a194_0x2a47c1(0x14a),'description':a194_0x2a47c1(0x139),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a194_0x2a47c1(0x141),'type':a194_0x2a47c1(0x140),'default':![],'description':a194_0x2a47c1(0x13c)}],async 'validate'(_0x53e20e){const _0x420bc3=a194_0x2a47c1;if(_0x53e20e[_0x420bc3(0x136)](_0x420bc3(0x141))&&_0x53e20e['str'](_0x420bc3(0x145))['trim']())throw CliErrors[_0x420bc3(0x137)](_0x420bc3(0x152),_0x420bc3(0x149));if(_0x53e20e['bool']('all'))return;readNotificationChannelType(_0x53e20e);},async 'execute'(_0x3b308e){const _0x1e903e=a194_0x2a47c1;if(_0x3b308e[_0x1e903e(0x136)](_0x1e903e(0x141))){const _0x434850=await Promise['all'](NOTIFICATION_CHANNEL_TYPES[_0x1e903e(0x13d)](_0x559dd7=>listNotificationChannelConfigs(_0x3b308e[_0x1e903e(0x146)],_0x559dd7))),_0x46b3e2=_0x434850[_0x1e903e(0x14e)]()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3b308e[_0x1e903e(0x146)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x46b3e2[_0x1e903e(0x13a)],'configs':_0x46b3e2},'message':_0x1e903e(0x13f)+_0x46b3e2[_0x1e903e(0x13a)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x465a74=readNotificationChannelType(_0x3b308e),_0x94726a=await listNotificationChannelConfigs(_0x3b308e[_0x1e903e(0x146)],_0x465a74),_0x31f767=_0x94726a[_0x1e903e(0x13d)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3b308e['appCode'],'channelType':_0x465a74,'count':_0x31f767['length'],'configs':_0x31f767},'message':'Found\x20'+_0x31f767[_0x1e903e(0x13a)]+'\x20'+_0x465a74+_0x1e903e(0x14d)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a195_0x4e94(){const _0x99d8df=['\x20via\x20','notification_config_update_verification_failed','patch','/notification/channel-config/update','notification_config_update_verification_unavailable','5074GfqeYY','update','provesChange','Updated\x20notification\x20config\x20','491498duFStk','2032KUgJEK','POST','config-update','58qjGBxz','15592QNajmm','planned','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','20bObdhL','4311pwDmrS','payload','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','591060XIvlPX',';\x20do\x20not\x20resubmit\x20automatically.','notification_config_update_outcome_unknown','Notification\x20config\x20','Inspect\x20ID\x20','verifiedFields','457752TzmdVF','before','channelType','Inspect\x20with\x20--id\x20','511423uOEQCd','115fsLIfI','allMatch','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','mutation','appCode',';\x20no\x20automatic\x20retry\x20was\x20attempted.'];a195_0x4e94=function(){return _0x99d8df;};return a195_0x4e94();}const a195_0x23add6=a195_0x16e6;(function(_0x18930b,_0x5926e3){const _0x3c955e=a195_0x16e6,_0x389a16=_0x18930b();while(!![]){try{const _0x109974=-parseInt(_0x3c955e(0x7e))/0x1*(parseInt(_0x3c955e(0x9c))/0x2)+parseInt(_0x3c955e(0x8c))/0x3+parseInt(_0x3c955e(0x7f))/0x4*(-parseInt(_0x3c955e(0x91))/0x5)+-parseInt(_0x3c955e(0x86))/0x6+parseInt(_0x3c955e(0xa0))/0x7+parseInt(_0x3c955e(0xa1))/0x8*(parseInt(_0x3c955e(0x83))/0x9)+parseInt(_0x3c955e(0x82))/0xa*(parseInt(_0x3c955e(0x90))/0xb);if(_0x109974===_0x5926e3)break;else _0x389a16['push'](_0x389a16['shift']());}catch(_0x13e307){_0x389a16['push'](_0x389a16['shift']());}}}(a195_0x4e94,0x18efc));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';function a195_0x16e6(_0x450a88,_0x127f4a){_0x450a88=_0x450a88-0x7c;const _0x4e940d=a195_0x4e94();let _0x16e6f5=_0x4e940d[_0x450a88];return _0x16e6f5;}const UPDATE_PATH=a195_0x23add6(0x9a);async function prepareUpdate(_0x4cd3d9){const _0x3dc33d=readNotificationId(_0x4cd3d9),_0x42bbac=await readNotificationDocument(_0x4cd3d9,'update'),_0x4fcb6b=await requireExactNotificationConfig(_0x4cd3d9['appCode'],_0x3dc33d,'update');return{'id':_0x3dc33d,'patch':_0x42bbac,'before':_0x4fcb6b,'payload':mergeUpdateInput(_0x4fcb6b,_0x42bbac),'planned':plannedUpdateProjection(_0x4fcb6b,_0x42bbac)};}export const notificationConfigUpdate={'service':'notification','command':a195_0x23add6(0x7d),'description':a195_0x23add6(0x81),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0xe4285c){readNotificationId(_0xe4285c),assertSingleNotificationSource(_0xe4285c),requireNotificationExplicitYes(_0xe4285c);},async 'dryRun'(_0x8b8c09){const _0x99df6e=a195_0x23add6,_0x515c16=await prepareUpdate(_0x8b8c09),_0x4f83b6=notificationLookupCommand(_0x8b8c09[_0x99df6e(0x95)],_0x515c16[_0x99df6e(0x8d)]['channelType']);return asDryRunResult({'operation':_0x99df6e(0x9d),'selector':notificationSelector(_0x515c16[_0x99df6e(0x8d)]),'before':projectNotificationConfig(_0x515c16[_0x99df6e(0x8d)]),'after':_0x515c16[_0x99df6e(0x80)],'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x4f83b6}},{'method':_0x99df6e(0x7c),'url':UPDATE_PATH});},async 'execute'(_0x3d815d){const _0x48d37b=a195_0x23add6;requireNotificationExplicitYes(_0x3d815d);const _0x53ff58=await prepareUpdate(_0x3d815d),_0x54402e=notificationLookupCommand(_0x3d815d['appCode'],_0x53ff58[_0x48d37b(0x8d)][_0x48d37b(0x8e)]);let _0x195635=![];try{await updateNotificationChannelConfig(_0x53ff58[_0x48d37b(0x84)]);}catch(_0x3b1a9f){if(!isPlatformTransportFailure(_0x3b1a9f))throw safeApiFailure('update',_0x48d37b(0x94),_0x48d37b(0x8a)+_0x53ff58['id']+'\x20with\x20'+_0x54402e+_0x48d37b(0x96));_0x195635=!![];}let _0x36da74;try{const _0x4fb948=await getNotificationChannelConfig(_0x53ff58['id'],_0x3d815d[_0x48d37b(0x95)]);_0x36da74=normalizeExactNotificationConfig(_0x4fb948,_0x53ff58['id'],_0x3d815d[_0x48d37b(0x95)]);}catch{throw notificationError(_0x195635?_0x48d37b(0x88):_0x48d37b(0x9b),_0x48d37b(0x89)+_0x53ff58['id']+_0x48d37b(0x85),_0x48d37b(0x8f)+_0x53ff58['id']+'\x20via\x20'+_0x54402e+_0x48d37b(0x87));}const _0x677d53=requestedSafeFieldsMatch(_0x53ff58[_0x48d37b(0x8d)],_0x36da74,_0x53ff58[_0x48d37b(0x99)]);if(!_0x677d53[_0x48d37b(0x92)]||_0x195635&&!_0x677d53[_0x48d37b(0x9e)])throw notificationError(_0x195635?_0x48d37b(0x88):_0x48d37b(0x98),_0x48d37b(0x89)+_0x53ff58['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x48d37b(0x8f)+_0x53ff58['id']+_0x48d37b(0x97)+_0x54402e+_0x48d37b(0x87));const _0x18d1e7=_0x195635?[_0x48d37b(0x93)]:[];return{'ok':!![],'data':{'operation':_0x48d37b(0x9d),'selector':notificationSelector(_0x36da74),'before':projectNotificationConfig(_0x53ff58[_0x48d37b(0x8d)]),'after':projectNotificationConfig(_0x36da74),'dryRun':![],'backend':{'method':_0x48d37b(0x7c),'path':UPDATE_PATH},'warnings':_0x18d1e7,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x195635,'verifiedFields':_0x677d53[_0x48d37b(0x8b)],'lookupCommand':_0x54402e}},'message':_0x48d37b(0x9f)+_0x36da74['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a8fca,_0x54421c){const _0x470154=a196_0x2351,_0x485c2a=_0x5a8fca();while(!![]){try{const _0x1f8a58=parseInt(_0x470154(0xea))/0x1+-parseInt(_0x470154(0xeb))/0x2+parseInt(_0x470154(0xe3))/0x3*(parseInt(_0x470154(0xe5))/0x4)+parseInt(_0x470154(0xe8))/0x5+parseInt(_0x470154(0xec))/0x6*(parseInt(_0x470154(0xe9))/0x7)+-parseInt(_0x470154(0xe2))/0x8*(parseInt(_0x470154(0xe4))/0x9)+-parseInt(_0x470154(0xe6))/0xa*(parseInt(_0x470154(0xe7))/0xb);if(_0x1f8a58===_0x54421c)break;else _0x485c2a['push'](_0x485c2a['shift']());}catch(_0x3a6020){_0x485c2a['push'](_0x485c2a['shift']());}}}(a196_0xcbf6,0x25106));import{notificationConfigList}from'../../commands/notification/config-list.js';function a196_0x2351(_0x403a8c,_0x2f94bf){_0x403a8c=_0x403a8c-0xe2;const _0xcbf62d=a196_0xcbf6();let _0x2351fd=_0xcbf62d[_0x403a8c];return _0x2351fd;}import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a196_0xcbf6(){const _0x14695a=['503096JsmTrw','44325sMgrFU','1119566vCoZUw','21668dKlDQE','225664jMNsxZ','6enRSOO','154288txpBMp','807723ieVZfS','27cHyKEb','4lCxsll','30rDNjgy'];a196_0xcbf6=function(){return _0x14695a;};return a196_0xcbf6();}
|