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