@lovrabet/rabetbase-cli 2.5.8-beta.2 → 2.5.9-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- 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.d.ts +8 -5
- 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.d.ts +5 -3
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +14 -11
- 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 +2 -2
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +3 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +17 -15
- package/skills/rabetbase/references/rabetbase-rule.md +8 -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(_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
|
+
(function(_0x32302f,_0x2a570f){const _0x4f638d=a186_0x21e5,_0x53660c=_0x32302f();while(!![]){try{const _0x32bb87=-parseInt(_0x4f638d(0x1a4))/0x1*(parseInt(_0x4f638d(0x1b3))/0x2)+-parseInt(_0x4f638d(0x1b9))/0x3*(parseInt(_0x4f638d(0x1e1))/0x4)+parseInt(_0x4f638d(0x1b2))/0x5*(-parseInt(_0x4f638d(0x1a5))/0x6)+-parseInt(_0x4f638d(0x1c5))/0x7+parseInt(_0x4f638d(0x1c7))/0x8+-parseInt(_0x4f638d(0x1d7))/0x9+parseInt(_0x4f638d(0x1c2))/0xa*(parseInt(_0x4f638d(0x1d4))/0xb);if(_0x32bb87===_0x2a570f)break;else _0x53660c['push'](_0x53660c['shift']());}catch(_0x1d8fc4){_0x53660c['push'](_0x53660c['shift']());}}}(a186_0x4475,0x5d404));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a186_0x4475(){const _0x2ba635=['all','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','resources','object','toLowerCase',').\x20','some','info','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','force','length','dryRun','80DJuMdI','8HLXcNz','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','trim','rejected','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','menu\x20asset-update\x20cannot\x20patch\x20','172332xaNisC','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','extend','.css','\x22\x20(','fulfilled','CSS\x20URL\x20is\x20unreachable:\x20','map','.\x20Allowed\x20values:\x20replace,\x20patch','1681180UHbeMU','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','setLogPath','2609201EjOyUc','cssUrl','1116336WHjveu','menuIds','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','field','after','status','jsUrl','loadScriptMode','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','path','Menu\x20asset\x20update\x20completed','\x20existing\x20CSS\x20resources\x20for\x20\x22','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','88HMscXP','menu-asset-update','paths','2895651nAxvqy','label','endsWith','split','unshift','string','message','join','isArray','.js','4fihqir','parse','JS\x20URL\x20is\x20unreachable:\x20','patch','push','Invalid\x20--params:\x20','has','filter','Invalid\x20--mode:\x20','--params.','allSettled','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','28947hBqclO','88056EnbwPv'];a186_0x4475=function(){return _0x2ba635;};return a186_0x4475();}function validateParams(_0x36fb0d){const _0x158dc5=a186_0x21e5,_0x5740fe=[];return _0x36fb0d[_0x158dc5(0x1cd)]&&!isValidJsHttpsUrl(_0x36fb0d[_0x158dc5(0x1cd)])&&_0x5740fe[_0x158dc5(0x1e5)]({'field':_0x158dc5(0x1cd),'message':_0x158dc5(0x1ae)}),_0x36fb0d[_0x158dc5(0x1c6)]&&!isValidCssHttpsUrl(_0x36fb0d['cssUrl'])&&_0x5740fe[_0x158dc5(0x1e5)]({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x5740fe;}export async function runMenuUpdateCore(_0xfc3039,_0x43d29e,_0x3e12eb,_0x31ca9b={}){const _0x49df87=a186_0x21e5,_0x5eb037=parseUpdateParamsFlag(_0x3e12eb),_0x535677=normalizeMode(_0x31ca9b['mode']);validateSelection(_0x31ca9b['selection']);const _0x5a341b=[];if(_0x5eb037[_0x49df87(0x1cd)])_0x5a341b[_0x49df87(0x1e5)](_0x5eb037[_0x49df87(0x1cd)]);if(_0x5eb037['cssUrl'])_0x5a341b[_0x49df87(0x1e5)](_0x5eb037[_0x49df87(0x1c6)]);const _0xcb298c=validateParams(_0x5eb037);if(_0xcb298c[_0x49df87(0x1b0)]>0x0){const _0x1d961b=_0xcb298c[_0x49df87(0x1c0)](_0x95534b=>_0x49df87(0x1ea)+_0x95534b[_0x49df87(0x1ca)]+':\x20'+_0x95534b[_0x49df87(0x1dd)])[_0x49df87(0x1de)](';\x20');throw new Error(_0x49df87(0x1e6)+_0x1d961b);}if(_0x5a341b['length']===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x49df87(0x1c9));logger[_0x49df87(0x1c4)](process['cwd']()),logger[_0x49df87(0x1ad)](_0x49df87(0x1d5),'Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0xfc3039,'jsUrl':_0x5eb037['jsUrl'],'cssUrl':_0x5eb037[_0x49df87(0x1c6)],'mode':_0x535677,'dryRun':_0x31ca9b['dryRun']===!![]});if(_0x5eb037[_0x49df87(0x1cd)]){const _0x4826c3=await isUrlReachable(_0x5eb037[_0x49df87(0x1cd)]);if(!_0x4826c3)throw new Error(_0x49df87(0x1e3)+_0x5eb037['jsUrl']);}if(_0x5eb037[_0x49df87(0x1c6)]){const _0x56ac3c=await isUrlReachable(_0x5eb037[_0x49df87(0x1c6)]);if(!_0x56ac3c)throw new Error(_0x49df87(0x1bf)+_0x5eb037[_0x49df87(0x1c6)]);}const _0x366000=await getOnlineMenuList(_0xfc3039,_0x43d29e),_0x59cd68=_0x366000[_0x49df87(0x1e8)](_0x1cff40=>_0x1cff40[_0x49df87(0x1a8)][_0x49df87(0x1b0)]>0x0),_0x1d1d5a=selectMenusForUpdate(_0x59cd68,_0x31ca9b['selection']);if(_0x1d1d5a[_0x49df87(0x1b0)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x31ca9b[_0x49df87(0x1b1)]===!![]};const _0x40c4c8=_0x1d1d5a[_0x49df87(0x1c0)](_0x57bdcd=>buildMenuUpdateDiff(_0x57bdcd,_0x5eb037,_0x535677,_0x31ca9b[_0x49df87(0x1af)]===!![],_0x31ca9b[_0x49df87(0x1ce)]));if(_0x31ca9b[_0x49df87(0x1b1)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x40c4c8};const _0x1e5c52=await Promise[_0x49df87(0x1eb)](_0x1d1d5a[_0x49df87(0x1c0)]((_0x2537ae,_0x1ccb50)=>updateMenuCdnUrl(_0xfc3039,_0x43d29e,{'id':_0x2537ae['id'],'label':_0x2537ae[_0x49df87(0x1d8)],'path':_0x2537ae[_0x49df87(0x1d0)],'resources':_0x40c4c8[_0x1ccb50][_0x49df87(0x1cb)]['resources'],'extend':_0x2537ae[_0x49df87(0x1bb)]??null,'loadScriptMode':_0x31ca9b[_0x49df87(0x1ce)]}))),_0x151417=_0x1e5c52['filter'](_0x22f53e=>_0x22f53e[_0x49df87(0x1cc)]===_0x49df87(0x1be))[_0x49df87(0x1c0)](_0x5db50d=>_0x5db50d['value']),_0x522906=_0x1e5c52[_0x49df87(0x1e8)](_0x49d01d=>_0x49d01d[_0x49df87(0x1cc)]===_0x49df87(0x1b6))[_0x49df87(0x1b0)];return logger[_0x49df87(0x1ad)]('menu-asset-update',_0x49df87(0x1d1),{'count':_0x1d1d5a['length'],'resources':_0x5a341b}),{'updated':_0x151417['length'],'failed':_0x522906,'skipped':![],'menus':_0x151417};}function validateSelection(_0x383ec8){const _0x354363=a186_0x21e5;if(!_0x383ec8)throw new Error(_0x354363(0x1a7));if(_0x383ec8[_0x354363(0x1a6)]&&(_0x383ec8[_0x354363(0x1c8)]['length']>0x0||_0x383ec8['paths'][_0x354363(0x1b0)]>0x0))throw new Error(_0x354363(0x1b7));if(!_0x383ec8[_0x354363(0x1a6)]&&_0x383ec8['menuIds']['length']===0x0&&_0x383ec8['paths'][_0x354363(0x1b0)]===0x0)throw new Error(_0x354363(0x1a7));}export function selectMenusForUpdate(_0x37f05e,_0x4b568c){const _0x206fd4=a186_0x21e5;validateSelection(_0x4b568c);if(_0x4b568c[_0x206fd4(0x1a6)])return _0x37f05e;const _0x380319=new Set(_0x37f05e[_0x206fd4(0x1c0)](_0xb0e38a=>_0xb0e38a['id'])),_0x4e2bc8=new Set(_0x37f05e[_0x206fd4(0x1c0)](_0x42b4c2=>_0x42b4c2['path'])),_0x24e1fa=_0x4b568c[_0x206fd4(0x1c8)][_0x206fd4(0x1e8)](_0xefa729=>!_0x380319[_0x206fd4(0x1e7)](_0xefa729)),_0x26b937=_0x4b568c[_0x206fd4(0x1d6)]['filter'](_0x23b34e=>!_0x4e2bc8[_0x206fd4(0x1e7)](_0x23b34e));if(_0x24e1fa[_0x206fd4(0x1b0)]>0x0||_0x26b937[_0x206fd4(0x1b0)]>0x0){const _0x3a5484=[..._0x24e1fa[_0x206fd4(0x1c0)](_0x4c57da=>String(_0x4c57da)),..._0x26b937][_0x206fd4(0x1de)](',\x20');throw new Error(_0x206fd4(0x1c3)+_0x3a5484);}const _0x154cd6=new Set(_0x4b568c[_0x206fd4(0x1c8)]),_0x293442=new Set(_0x4b568c[_0x206fd4(0x1d6)]);return _0x37f05e['filter'](_0x40f55e=>_0x154cd6[_0x206fd4(0x1e7)](_0x40f55e['id'])||_0x293442[_0x206fd4(0x1e7)](_0x40f55e[_0x206fd4(0x1d0)]));}function normalizeMode(_0x331001){const _0x4ccc0e=a186_0x21e5;if(!_0x331001)return _0x4ccc0e(0x1e4);if(_0x331001==='replace'||_0x331001===_0x4ccc0e(0x1e4))return _0x331001;throw new Error(_0x4ccc0e(0x1e9)+_0x331001+_0x4ccc0e(0x1c1));}function buildMenuUpdateDiff(_0x491df0,_0x5d6782,_0x547d3a,_0x95a37f,_0x24fc75){const _0x2dbf67=a186_0x21e5,_0x37f7ff=[..._0x491df0[_0x2dbf67(0x1a8)]];_0x547d3a===_0x2dbf67(0x1e4)&&assertUnambiguousPatchResources(_0x491df0,_0x37f7ff,_0x5d6782);const _0x244cd3=_0x547d3a===_0x2dbf67(0x1e4)?patchResources(_0x37f7ff,_0x5d6782):replaceResources(_0x5d6782),_0x176eec=[],_0x3c6c79=_0x37f7ff[_0x2dbf67(0x1ac)](isJsResource),_0x418a33=_0x244cd3['some'](isJsResource);if(_0x3c6c79&&!_0x418a33){const _0x24b958=_0x2dbf67(0x1ec)+_0x491df0[_0x2dbf67(0x1d8)]+_0x2dbf67(0x1bd)+_0x491df0[_0x2dbf67(0x1d0)]+_0x2dbf67(0x1ab)+_0x2dbf67(0x1b4);if(!_0x95a37f)throw new Error(_0x24b958);_0x176eec[_0x2dbf67(0x1e5)](_0x24b958);}const _0x12ccec=_0x37f7ff[_0x2dbf67(0x1ac)](isCssResource),_0x290f9f=_0x244cd3[_0x2dbf67(0x1ac)](isCssResource);_0x12ccec&&!_0x290f9f&&_0x176eec['push'](_0x2dbf67(0x1cf)+_0x491df0[_0x2dbf67(0x1d8)]+_0x2dbf67(0x1bd)+_0x491df0[_0x2dbf67(0x1d0)]+').');const _0x44f5c2=typeof _0x491df0[_0x2dbf67(0x1bb)]?.[_0x2dbf67(0x1ce)]===_0x2dbf67(0x1dc)?_0x491df0['extend']['loadScriptMode']:null,_0x174288=_0x24fc75?{'loadScriptMode':_0x44f5c2}:{},_0x5d192c=_0x24fc75?{'loadScriptMode':_0x24fc75}:{};return{'id':_0x491df0['id'],'label':_0x491df0['label'],'path':_0x491df0[_0x2dbf67(0x1d0)],'mode':_0x547d3a,'before':{'resources':_0x37f7ff,..._0x174288},'after':{'resources':_0x244cd3,..._0x5d192c},'warnings':_0x176eec};}function replaceResources(_0x465669){const _0x55e29=a186_0x21e5;return[_0x465669[_0x55e29(0x1cd)],_0x465669[_0x55e29(0x1c6)]]['filter'](_0x4d4698=>!!_0x4d4698);}function assertUnambiguousPatchResources(_0x386619,_0x406bbf,_0x3a7967){const _0x31cfb9=a186_0x21e5,_0x5cbd15=_0x406bbf['filter'](isJsResource)[_0x31cfb9(0x1b0)];if(_0x3a7967['jsUrl']&&_0x5cbd15>0x1)throw new Error(_0x31cfb9(0x1b8)+_0x5cbd15+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x386619['label']+_0x31cfb9(0x1bd)+_0x386619[_0x31cfb9(0x1d0)]+')\x20'+_0x31cfb9(0x1ba));const _0xc1a54e=_0x406bbf[_0x31cfb9(0x1e8)](isCssResource)['length'];if(_0x3a7967[_0x31cfb9(0x1c6)]&&_0xc1a54e>0x1)throw new Error(_0x31cfb9(0x1b8)+_0xc1a54e+_0x31cfb9(0x1d2)+_0x386619[_0x31cfb9(0x1d8)]+_0x31cfb9(0x1bd)+_0x386619['path']+')\x20'+_0x31cfb9(0x1d3));}function patchResources(_0x334037,_0x1e6ef2){const _0x443b88=a186_0x21e5;let _0x1fe90e=![],_0x1469c6=![];const _0xa75ef7=[];for(const _0x589465 of _0x334037){if(isJsResource(_0x589465)){if(_0x1e6ef2[_0x443b88(0x1cd)]&&!_0x1fe90e)_0xa75ef7[_0x443b88(0x1e5)](_0x1e6ef2[_0x443b88(0x1cd)]),_0x1fe90e=!![];else!_0x1e6ef2[_0x443b88(0x1cd)]&&_0xa75ef7[_0x443b88(0x1e5)](_0x589465);continue;}if(isCssResource(_0x589465)){if(_0x1e6ef2['cssUrl']&&!_0x1469c6)_0xa75ef7['push'](_0x1e6ef2[_0x443b88(0x1c6)]),_0x1469c6=!![];else!_0x1e6ef2['cssUrl']&&_0xa75ef7[_0x443b88(0x1e5)](_0x589465);continue;}_0xa75ef7[_0x443b88(0x1e5)](_0x589465);}return _0x1e6ef2[_0x443b88(0x1cd)]&&!_0x1fe90e&&_0xa75ef7[_0x443b88(0x1db)](_0x1e6ef2[_0x443b88(0x1cd)]),_0x1e6ef2[_0x443b88(0x1c6)]&&!_0x1469c6&&_0xa75ef7[_0x443b88(0x1e5)](_0x1e6ef2['cssUrl']),_0xa75ef7;}function isJsResource(_0xaadd28){const _0xce7451=a186_0x21e5;return stripQuery(_0xaadd28)[_0xce7451(0x1aa)]()[_0xce7451(0x1d9)](_0xce7451(0x1e0));}function a186_0x21e5(_0x402a43,_0x38aa5d){_0x402a43=_0x402a43-0x1a4;const _0x447572=a186_0x4475();let _0x21e5ed=_0x447572[_0x402a43];return _0x21e5ed;}function isCssResource(_0x5c16cb){const _0x5c1824=a186_0x21e5;return stripQuery(_0x5c16cb)['toLowerCase']()[_0x5c1824(0x1d9)](_0x5c1824(0x1bc));}function stripQuery(_0xfce4e3){const _0x2d0a4d=a186_0x21e5;return _0xfce4e3[_0x2d0a4d(0x1da)]('?')[0x0]??_0xfce4e3;}function parseUpdateParamsFlag(_0x247a95){const _0x275f80=a186_0x21e5;if(!_0x247a95||typeof _0x247a95!=='string')return{};try{const _0x117035=JSON[_0x275f80(0x1e2)](_0x247a95);if(typeof _0x117035!==_0x275f80(0x1a9)||_0x117035===null||Array[_0x275f80(0x1df)](_0x117035))return{};return{'jsUrl':typeof _0x117035[_0x275f80(0x1cd)]===_0x275f80(0x1dc)?_0x117035[_0x275f80(0x1cd)][_0x275f80(0x1b5)]():undefined,'cssUrl':typeof _0x117035[_0x275f80(0x1c6)]===_0x275f80(0x1dc)?_0x117035['cssUrl'][_0x275f80(0x1b5)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x480563,_0x26d363){const _0x41feb6=a187_0x37fb,_0x259622=_0x480563();while(!![]){try{const _0x3e64c5=-parseInt(_0x41feb6(0x1cb))/0x1*(-parseInt(_0x41feb6(0x1c5))/0x2)+parseInt(_0x41feb6(0x1ca))/0x3*(parseInt(_0x41feb6(0x1c7))/0x4)+parseInt(_0x41feb6(0x1d2))/0x5+parseInt(_0x41feb6(0x1cf))/0x6*(parseInt(_0x41feb6(0x1ce))/0x7)+parseInt(_0x41feb6(0x1d3))/0x8+-parseInt(_0x41feb6(0x1c9))/0x9+-parseInt(_0x41feb6(0x1d1))/0xa*(parseInt(_0x41feb6(0x1cc))/0xb);if(_0x3e64c5===_0x26d363)break;else _0x259622['push'](_0x259622['shift']());}catch(_0xa341d4){_0x259622['push'](_0x259622['shift']());}}}(a187_0x246e,0x4a311));export function isValidJsHttpsUrl(_0x4a6c1a){const _0x2b6fd2=a187_0x37fb;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x4a6c1a[_0x2b6fd2(0x1c6)]());}function a187_0x246e(){const _0x17d2e3=['400qJEvEZ','trim','152dvmavL','HEAD','5324346YAMYPI','8529cnVtkK','1042bgwOsI','11xCtFdo','body','7WjJUpJ','3172446YlSaYv','bytes=0-0','2033820quBJZr','839190QnlQqT','686816jWZAwH','test'];a187_0x246e=function(){return _0x17d2e3;};return a187_0x246e();}export function isValidCssHttpsUrl(_0x4fc51e){const _0x3af5d0=a187_0x37fb;return/^https:\/\/.+\.css(\?.*)?$/[_0x3af5d0(0x1c4)](_0x4fc51e['trim']());}function a187_0x37fb(_0x150bf6,_0x32863e){_0x150bf6=_0x150bf6-0x1c4;const _0x246e95=a187_0x246e();let _0x37fb1c=_0x246e95[_0x150bf6];return _0x37fb1c;}export async function isUrlReachable(_0x22bce5){const _0x2a198d=a187_0x37fb;try{const _0xa28e9b=await fetch(_0x22bce5,{'method':_0x2a198d(0x1c8)});if(_0xa28e9b['ok'])return!![];}catch{}try{const _0x1e2e44=await fetch(_0x22bce5,{'method':'GET','headers':{'Range':_0x2a198d(0x1d0)}}),_0x5a4bf5=_0x1e2e44['ok'];try{await _0x1e2e44[_0x2a198d(0x1cd)]?.['cancel']();}catch{}return _0x5a4bf5;}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a188_0x1e3e4a=a188_0x2378;function a188_0x64fe(){const _0x2f9dbf=['\x20menu(s)\x20for\x20','all','cookie','3075292BBAUVM','\x20in\x20menu\x20host\x20','Inspected\x20','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','3rFKFkc','138RHOzkc','283260JsclLq','242669pqzJKE','menu','70kIFqud','4076664DCbotk','127676EUjBDK','2789586sBbbji','481282ihUGXc','80YrEcwo'];a188_0x64fe=function(){return _0x2f9dbf;};return a188_0x64fe();}(function(_0x1e86c5,_0x51a99c){const _0x1b20af=a188_0x2378,_0x33f897=_0x1e86c5();while(!![]){try{const _0xeba50f=-parseInt(_0x1b20af(0x15d))/0x1+parseInt(_0x1b20af(0x156))/0x2*(parseInt(_0x1b20af(0x154))/0x3)+parseInt(_0x1b20af(0x15b))/0x4*(-parseInt(_0x1b20af(0x159))/0x5)+parseInt(_0x1b20af(0x155))/0x6*(-parseInt(_0x1b20af(0x157))/0x7)+-parseInt(_0x1b20af(0x15a))/0x8+parseInt(_0x1b20af(0x15c))/0x9+parseInt(_0x1b20af(0x14c))/0xa*(parseInt(_0x1b20af(0x150))/0xb);if(_0xeba50f===_0x51a99c)break;else _0x33f897['push'](_0x33f897['shift']());}catch(_0x5c94b8){_0x33f897['push'](_0x33f897['shift']());}}}(a188_0x64fe,0x6e9e0));import{getSmartAppRecord}from'../../core/api-client.js';import{getOnlineMenuList}from'../../commands/menu/shared/service.js';import{buildSubappAssetsStatus,getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';function a188_0x2378(_0x1dd1e5,_0x375f00){_0x1dd1e5=_0x1dd1e5-0x14c;const _0x64fe45=a188_0x64fe();let _0x237898=_0x64fe45[_0x1dd1e5];return _0x237898;}export const menuSubappAssetsStatus={'service':a188_0x1e3e4a(0x158),'command':'subapp-assets-status','description':a188_0x1e3e4a(0x153),'risk':'read','strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x95b5f1){getSubappSelector(_0x95b5f1);},async 'execute'(_0x45c98b){const _0x562122=a188_0x1e3e4a,{appCode:_0x4a002b,appName:_0x1e49b7}=getSubappSelector(_0x45c98b),[_0x56a460,_0x10a444]=await Promise[_0x562122(0x14e)]([getSmartAppRecord(_0x4a002b,_0x45c98b[_0x562122(0x14f)]),getOnlineMenuList(_0x4a002b,_0x45c98b[_0x562122(0x14f)])]),_0x11de13={'appCode':_0x4a002b,...buildSubappAssetsStatus(_0x56a460,_0x10a444,_0x1e49b7)};return{'ok':!![],'data':_0x11de13,'message':_0x562122(0x152)+_0x11de13['boundMenus']+_0x562122(0x14d)+_0x1e49b7+_0x562122(0x151)+_0x4a002b+'.'};}};
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a189_0x5c143e=a189_0x107f;(function(_0x156091,_0x304683){const _0x2bb03e=a189_0x107f,_0xa2f6f6=_0x156091();while(!![]){try{const _0xa9e90f=parseInt(_0x2bb03e(0x10c))/0x1+parseInt(_0x2bb03e(0xce))/0x2+parseInt(_0x2bb03e(0xc3))/0x3+parseInt(_0x2bb03e(0xf4))/0x4+-parseInt(_0x2bb03e(0xdf))/0x5*(parseInt(_0x2bb03e(0xe8))/0x6)+-parseInt(_0x2bb03e(0xe4))/0x7*(parseInt(_0x2bb03e(0x100))/0x8)+-parseInt(_0x2bb03e(0xc1))/0x9;if(_0xa9e90f===_0x304683)break;else _0xa2f6f6['push'](_0xa2f6f6['shift']());}catch(_0x339221){_0xa2f6f6['push'](_0xa2f6f6['shift']());}}}(a189_0x4b02,0x70119));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';function a189_0x107f(_0x5deed0,_0x2e62bd){_0x5deed0=_0x5deed0-0xbd;const _0x4b02c1=a189_0x4b02();let _0x107ffd=_0x4b02c1[_0x5deed0];return _0x107ffd;}import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a189_0x4b02(){const _0x365a20=['app.extend.assets','enableAutoSync','assets','string','isSafeInteger','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','490PVtDjd','--resources\x20is\x20required.','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','length','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','6594yEixXg','enableSample','entries','App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.','20970cyRChP','\x20must\x20be\x20a\x20JSON\x20array.','/smartapi/app/update','expectedHash','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','\x20contains\x20invalid\x20JSON.','\x20in\x20menu\x20host\x20',';\x20found\x20',';\x20independent\x20deployment\x20not\x20verified.','apiError','parse','stringify','198848bvhYXs','directDbId','.\x20Refusing\x20update.','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','trim','test','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','appName','str','update','expected-hash','size','6376BneOBy','POST','write','isArray','resources[','Unknown\x20app.extend\x20fields:\x20','Would\x20update\x20shared\x20assets\x20for\x20','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20',']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.','Updated\x20shared\x20resources\x20for\x20','697658ytymzs','object','nextExtend','filter','appPublishStatus','unchanged','1226736liBwcs','sha256','2197401wDjROY','join',']\x20must\x20be\x20a\x20URL\x20string.','not\x20HTTPS','has','cookie','extend','some','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','\x20must\x20be\x20a\x20JSON\x20object.','enableOpenApi','417568QMJIlG','appCode','resources','subapp-assets-update','before','vipDeploy','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','validation','menu','https:','map'];a189_0x4b02=function(){return _0x365a20;};return a189_0x4b02();}import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set(['skinColor',a189_0x5c143e(0xcd),'accessKey',a189_0x5c143e(0xdb),'tenantColumn',a189_0x5c143e(0xe5),a189_0x5c143e(0xd3),a189_0x5c143e(0xda),a189_0x5c143e(0xf5),'directDbEnabled']);function parseObject(_0x1ff76f,_0x1a9d38){const _0x5476cc=a189_0x5c143e;let _0x47a87f=_0x1ff76f;if(typeof _0x1ff76f===_0x5476cc(0xdc))try{_0x47a87f=JSON[_0x5476cc(0xf2)](_0x1ff76f);}catch{throw CliErrors['validation'](_0x1a9d38+_0x5476cc(0xed));}if(!_0x47a87f||typeof _0x47a87f!==_0x5476cc(0x10d)||Array[_0x5476cc(0x103)](_0x47a87f))throw CliErrors[_0x5476cc(0xd5)](_0x1a9d38+_0x5476cc(0xcc));return _0x47a87f;}function parseArray(_0x553938,_0x20620c){const _0x4bee16=a189_0x5c143e;let _0xe2748;try{_0xe2748=JSON[_0x4bee16(0xf2)](_0x553938);}catch{throw CliErrors['validation'](_0x20620c+_0x4bee16(0xed));}if(!Array[_0x4bee16(0x103)](_0xe2748))throw CliErrors['validation'](_0x20620c+_0x4bee16(0xe9));return _0xe2748['map']((_0x57f06b,_0x3077de)=>parseObject(_0x57f06b,_0x20620c+'['+_0x3077de+']'));}function validateResources(_0x43c09b){const _0x5a31d7=a189_0x5c143e;if(_0x43c09b[_0x5a31d7(0xe2)]===0x0)throw CliErrors[_0x5a31d7(0xd5)](_0x5a31d7(0xf7));for(const [_0x7d3a1,_0x55f450]of _0x43c09b[_0x5a31d7(0xe6)]()){if(typeof _0x55f450!==_0x5a31d7(0xdc))throw CliErrors[_0x5a31d7(0xd5)](_0x5a31d7(0x104)+_0x7d3a1+_0x5a31d7(0xc5));try{if(new URL(_0x55f450)['protocol']!==_0x5a31d7(0xd7))throw new Error(_0x5a31d7(0xc6));}catch{throw CliErrors[_0x5a31d7(0xd5)](_0x5a31d7(0x104)+_0x7d3a1+_0x5a31d7(0x10a));}}if(new Set(_0x43c09b)[_0x5a31d7(0xff)]!==_0x43c09b['length']||!_0x43c09b['some'](_0x449e60=>/\.m?js(?:[?#]|$)/i[_0x5a31d7(0xf9)](_0x449e60)))throw CliErrors['validation'](_0x5a31d7(0xec));return _0x43c09b;}function prepare(_0x38f8dd,_0x1e1efc,_0x3fe0ad){const _0x41f86f=a189_0x5c143e;if(!Number[_0x41f86f(0xdd)](_0x38f8dd['id'])||(_0x38f8dd['id']??0x0)<=0x0||typeof _0x38f8dd[_0x41f86f(0xbf)]!==_0x41f86f(0xdc)||!_0x38f8dd[_0x41f86f(0xbf)])throw CliErrors['validation'](_0x41f86f(0xfa));const _0x9ff0f5=parseObject(_0x38f8dd[_0x41f86f(0xc9)],'app.extend'),_0x872af8=Object['keys'](_0x9ff0f5)[_0x41f86f(0xbe)](_0x2e71b7=>!KNOWN_EXTEND_KEYS[_0x41f86f(0xc7)](_0x2e71b7));if(_0x872af8[_0x41f86f(0xe2)])throw CliErrors[_0x41f86f(0xd5)](_0x41f86f(0x105)+_0x872af8[_0x41f86f(0xc4)](',\x20')+_0x41f86f(0xf6));if(typeof _0x9ff0f5['assets']!=='string')throw CliErrors[_0x41f86f(0xd5)](_0x41f86f(0x107));const _0x1d39a8=parseArray(_0x9ff0f5[_0x41f86f(0xdb)],_0x41f86f(0xd9)),_0x102a6b=_0x1d39a8[_0x41f86f(0xbe)](_0x49e41b=>_0x49e41b[_0x41f86f(0xfb)]===_0x1e1efc);if(_0x102a6b[_0x41f86f(0xe2)]!==0x1)throw CliErrors['validation'](_0x41f86f(0x109)+_0x1e1efc+_0x41f86f(0xef)+_0x102a6b['length']+'.');const _0x86eda7=_0x102a6b[0x0];if(typeof _0x86eda7[_0x41f86f(0xd0)]!==_0x41f86f(0xdc))throw CliErrors[_0x41f86f(0xd5)](_0x41f86f(0x108));let _0x276233;try{_0x276233=JSON[_0x41f86f(0xf2)](_0x86eda7[_0x41f86f(0xd0)]);}catch{throw CliErrors['validation'](_0x41f86f(0xd4));}if(!Array['isArray'](_0x276233)||_0x276233[_0x41f86f(0xca)](_0x4f1915=>typeof _0x4f1915!=='string'))throw CliErrors[_0x41f86f(0xd5)](_0x41f86f(0xcb));const _0x3cb4cd=_0x1d39a8[_0x41f86f(0xd8)](_0x1942a6=>_0x1942a6===_0x86eda7?{..._0x1942a6,'resources':JSON[_0x41f86f(0xf3)](_0x3fe0ad)}:_0x1942a6),_0x2a65df={..._0x9ff0f5,'assets':JSON[_0x41f86f(0xf3)](_0x3cb4cd)},_0x3afb0b=createHash(_0x41f86f(0xc2))[_0x41f86f(0xfd)](JSON[_0x41f86f(0xf3)]({'appCode':_0x38f8dd[_0x41f86f(0xcf)],'id':_0x38f8dd['id'],'appPublishStatus':_0x38f8dd[_0x41f86f(0xbf)],'extend':_0x9ff0f5,'appName':_0x1e1efc,'resources':_0x3fe0ad}))['digest']('hex');return{'before':_0x276233,'nextExtend':_0x2a65df,'expectedHash':_0x3afb0b,'unchanged':isDeepStrictEqual(_0x276233,_0x3fe0ad)};}function flags(_0x5e57ee){const _0x562618=a189_0x5c143e,{appCode:_0x1aa203,appName:_0x519bf6}=getSubappSelector(_0x5e57ee),_0x49893b=_0x5e57ee[_0x562618(0xfc)](_0x562618(0xd0))[_0x562618(0xf8)]();if(!_0x49893b)throw CliErrors[_0x562618(0xd5)](_0x562618(0xe0));let _0xc53497;try{_0xc53497=JSON[_0x562618(0xf2)](_0x49893b);}catch{throw CliErrors['validation'](_0x562618(0xe3));}if(!Array[_0x562618(0x103)](_0xc53497))throw CliErrors['validation'](_0x562618(0xe3));return{'appCode':_0x1aa203,'appName':_0x519bf6,'resources':validateResources(_0xc53497)};}export const menuSubappAssetsUpdate={'service':a189_0x5c143e(0xd6),'command':a189_0x5c143e(0xd1),'description':'Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','risk':a189_0x5c143e(0x102),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':'resources','type':'string','required':!![],'description':'JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs'},{'name':a189_0x5c143e(0xfe),'type':'string','description':'Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes'}],async 'validate'(_0x3f6286){flags(_0x3f6286);},async 'dryRun'(_0x394b59){const _0x488667=a189_0x5c143e,{appCode:_0x441268,appName:_0x33dee8,resources:_0x884014}=flags(_0x394b59),_0x2a5fbc=await getSmartAppRecord(_0x441268,_0x394b59['cookie']),_0x183e42=prepare(_0x2a5fbc,_0x33dee8,_0x884014);return{'method':_0x488667(0x101),'url':_0x488667(0xea),'body':{'preview':{'appCode':_0x441268,'appName':_0x33dee8,'before':_0x183e42[_0x488667(0xd2)],'after':_0x884014,'expectedHash':_0x183e42[_0x488667(0xeb)],'unchanged':_0x183e42[_0x488667(0xc0)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x183e42[_0x488667(0xc0)]?'Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.':_0x488667(0x106)+_0x33dee8+'.'};},async 'execute'(_0x50a53d){const _0x527e41=a189_0x5c143e,{appCode:_0x7220ed,appName:_0x8a17c1,resources:_0x5234ef}=flags(_0x50a53d),_0x18f5ad=_0x50a53d[_0x527e41(0xfc)](_0x527e41(0xfe))[_0x527e41(0xf8)]();if(!/^[a-f0-9]{64}$/i[_0x527e41(0xf9)](_0x18f5ad))throw CliErrors['validation'](_0x527e41(0xde));const _0x508b54=await getSmartAppRecord(_0x7220ed,_0x50a53d[_0x527e41(0xc8)]),_0x57ffd8=prepare(_0x508b54,_0x8a17c1,_0x5234ef);if(_0x18f5ad!==_0x57ffd8['expectedHash'])throw CliErrors[_0x527e41(0xd5)]('App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.');if(_0x57ffd8[_0x527e41(0xc0)])return{'ok':!![],'data':{'appCode':_0x7220ed,'appName':_0x8a17c1,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x527e41(0xe1)};await updateSmartAppRecord({'id':_0x508b54['id'],'appCode':_0x7220ed,'appPublishStatus':_0x508b54['appPublishStatus'],'extend':_0x57ffd8[_0x527e41(0xbd)]},_0x50a53d[_0x527e41(0xc8)]);const _0x509a94=await getSmartAppRecord(_0x7220ed,_0x50a53d[_0x527e41(0xc8)]),_0x53f264=parseObject(_0x509a94[_0x527e41(0xc9)],'verified\x20app.extend');if(_0x509a94['id']!==_0x508b54['id']||_0x509a94[_0x527e41(0xbf)]!==_0x508b54[_0x527e41(0xbf)]||!isDeepStrictEqual(_0x53f264,_0x57ffd8[_0x527e41(0xbd)]))throw CliErrors[_0x527e41(0xf1)](_0x527e41(0xe7));return{'ok':!![],'data':{'appCode':_0x7220ed,'appName':_0x8a17c1,'updated':!![],'resources':_0x5234ef,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x527e41(0x10b)+_0x8a17c1+_0x527e41(0xee)+_0x7220ed+_0x527e41(0xf0)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a190_0x5b154a=a190_0xcb56;(function(_0x423520,_0x3cc4a3){const _0x4098b7=a190_0xcb56,_0x32c111=_0x423520();while(!![]){try{const _0x26061d=parseInt(_0x4098b7(0xdd))/0x1*(parseInt(_0x4098b7(0xde))/0x2)+parseInt(_0x4098b7(0xcc))/0x3+-parseInt(_0x4098b7(0xf6))/0x4*(parseInt(_0x4098b7(0xce))/0x5)+parseInt(_0x4098b7(0xdf))/0x6*(parseInt(_0x4098b7(0xf9))/0x7)+-parseInt(_0x4098b7(0xd3))/0x8+parseInt(_0x4098b7(0xda))/0x9+-parseInt(_0x4098b7(0x101))/0xa;if(_0x26061d===_0x3cc4a3)break;else _0x32c111['push'](_0x32c111['shift']());}catch(_0xbb03e3){_0x32c111['push'](_0x32c111['shift']());}}}(a190_0x2776,0xddcd8));function a190_0xcb56(_0x29548b,_0xd3b09e){_0x29548b=_0x29548b-0xc6;const _0x27763b=a190_0x2776();let _0xcb5616=_0x27763b[_0x29548b];return _0xcb5616;}import a190_0x131ff2 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';function a190_0x2776(){const _0x15628b=['split','POST','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','appCode','yellow','menu','\x20menu(s)\x20created','message','\x20page(s)','rawFlags','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','yes','validation','trim','8dWAvtr','gray','string','686TXZYaY','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','\x20local\x20microfrontend\x20menu(s).','length','\x20\x20✓\x20Selected:\x20','str','flag','\x20created.','30209970pXujid','sync','boolean','cookie','paths','Register\x20local\x20pages\x20as\x20platform\x20menus','selectedAppName','Fetching\x20online\x20menu\x20list...','onlineMenuList','map','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','Failed\x20to\x20fetch\x20online\x20menu\x20list','Menu\x20creation\x20failed','\x20created,\x20','\x20\x20Cancelled.','4953138gkuWsS','appcode','1277520vacEVC','cyan','Creating\x20','targetPages','write','3569648XCbfSl','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','Menu\x20sync\x20completed:\x20','/smartapi/menu/create','onlinePaths','✓\x20Menu\x20sync\x20completed:\x20','10245501RorpAQ','Online\x20menu\x20list\x20fetched','\x20\x20Continue\x20with\x20creation?','41273gJDtas','76mElSBx','32382eAEEfJ','skipped','\x20\x20Create\x20','jsUrl','Created\x20','created','params','appName'];a190_0x2776=function(){return _0x15628b;};return a190_0x2776();}import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':a190_0x5b154a(0xed),'command':a190_0x5b154a(0x102),'description':a190_0x5b154a(0x106),'risk':a190_0x5b154a(0xd2),'flags':[{'name':a190_0x5b154a(0xe5),'type':'string','description':'Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20'+a190_0x5b154a(0xea)},{'name':a190_0x5b154a(0x105),'type':a190_0x5b154a(0xf8),'description':a190_0x5b154a(0xe9)},{'name':a190_0x5b154a(0xf3),'type':a190_0x5b154a(0x103),'description':a190_0x5b154a(0xd5)}],async 'dryRun'(_0x569ad8){const _0x529ee0=a190_0x5b154a;ensureRunnableContext(_0x569ad8['rawFlags'],_0x569ad8[_0x529ee0(0x107)]);const _0x3f3d99=await runMenuSyncCore(_0x569ad8[_0x529ee0(0xeb)],_0x569ad8[_0x529ee0(0x104)],parsePaths(_0x569ad8[_0x529ee0(0xfe)](_0x529ee0(0x105))),_0x569ad8[_0x529ee0(0xfe)](_0x529ee0(0xe5)),{'dryRun':!![]});return{'method':_0x529ee0(0xe8),'url':_0x529ee0(0xd7),'body':_0x3f3d99,'description':_0x3f3d99[_0x529ee0(0xe0)]?_0x529ee0(0xfa):'Would\x20create\x20'+_0x3f3d99[_0x529ee0(0xd1)]['length']+_0x529ee0(0xfb)};},async 'execute'(_0x14a549){const _0x2d69f7=a190_0x5b154a;ensureRunnableContext(_0x14a549[_0x2d69f7(0xf1)],_0x14a549[_0x2d69f7(0x107)]);const _0x17610f=_0x14a549[_0x2d69f7(0xff)](_0x2d69f7(0xf3)),_0x1076cd=_0x14a549[_0x2d69f7(0xfe)]('params'),_0x16d0ce=parsePaths(_0x14a549[_0x2d69f7(0xfe)](_0x2d69f7(0x105))),_0x101a1a=parseMenuSyncParams(_0x1076cd);if(_0x17610f){const _0x15761f=await runMenuSyncCore(_0x14a549[_0x2d69f7(0xeb)],_0x14a549['cookie'],_0x16d0ce,_0x1076cd);if(_0x15761f[_0x2d69f7(0xe0)]){const _0x397293=getLocalPages();_0x397293[_0x2d69f7(0xfc)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x2d69f7(0xd9)+_0x15761f[_0x2d69f7(0xe4)]+_0x2d69f7(0xee));return{'ok':!![],'data':_0x15761f,'message':_0x15761f[_0x2d69f7(0xe0)]?'Menu\x20sync\x20skipped':_0x2d69f7(0xd6)+_0x15761f[_0x2d69f7(0xe4)]+_0x2d69f7(0x100)};}if(_0x16d0ce[_0x2d69f7(0xfc)]>0x0)throw CliErrors[_0x2d69f7(0xf4)](_0x2d69f7(0xd4),_0x2d69f7(0xf2));if(!isInteractive()&&_0x1076cd)throw CliErrors[_0x2d69f7(0xf4)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x2d69f7(0xf2));requireInteractive(),writeCliSideChannelLine('Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.');const _0xe3a3ef=startSpinner(_0x2d69f7(0x108));let _0xfd3a2e,_0x22cc9f,_0x1daadb;try{const _0x45ffd6=await fetchMenuData(_0x14a549[_0x2d69f7(0xeb)],_0x14a549[_0x2d69f7(0x104)]);_0xfd3a2e=_0x45ffd6['localPages'],_0x22cc9f=_0x45ffd6[_0x2d69f7(0xd8)],_0x1daadb=_0x45ffd6[_0x2d69f7(0x109)],stopSpinner(_0xe3a3ef,_0x2d69f7(0xdb),!![]);}catch(_0x17b2a3){stopSpinner(_0xe3a3ef,_0x2d69f7(0xc8),![]);throw CliErrors['validation'](_0x17b2a3 instanceof Error?_0x17b2a3[_0x2d69f7(0xef)]:_0x2d69f7(0xc8));}if(_0xfd3a2e[_0x2d69f7(0xfc)]===0x0)return writeCliSideChannelLine(a190_0x131ff2[_0x2d69f7(0xec)](_0x2d69f7(0xc7))),{'ok':!![]};const _0x579925=buildCompareRows(_0xfd3a2e,_0x22cc9f);writeCliSideChannelLine(renderCompareTable(_0x579925)),writeCliSideChannelLine('');const _0x351c9a=await selectPages(_0xfd3a2e,_0x22cc9f);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0x131ff2[_0x2d69f7(0xcf)](_0x2d69f7(0xfd)+_0x351c9a[_0x2d69f7(0xfc)]+_0x2d69f7(0xf0)));const _0x5df45d=_0x101a1a[_0x2d69f7(0xe2)]&&_0x101a1a['cssUrl'];if(!_0x5df45d){writeCliSideChannelLine(renderSyncSummary(_0x351c9a,_0x22cc9f['size']>0x0));const _0x52fee3=await askConfirm(_0x2d69f7(0xdc));if(!_0x52fee3)return writeCliSideChannelLine(a190_0x131ff2[_0x2d69f7(0xf7)](_0x2d69f7(0xcb))),{'ok':!![]};}let _0x1028f8=_0x101a1a['jsUrl'],_0x5d19da=_0x101a1a['cssUrl'];!_0x1028f8&&!_0x101a1a[_0x2d69f7(0xe6)]&&(_0x1028f8=await askJsUrl());!_0x5d19da&&!_0x101a1a[_0x2d69f7(0xe6)]&&(_0x5d19da=await askCssUrl());const _0x854850=await askConfirm(_0x101a1a['appName']?_0x2d69f7(0xe1)+_0x351c9a[_0x2d69f7(0xfc)]+'\x20menu(s)\x20bound\x20to\x20'+_0x101a1a['appName']+'?':'\x20\x20Create\x20'+_0x351c9a[_0x2d69f7(0xfc)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x1028f8+'\x20and\x20CSS:\x20'+_0x5d19da+'?');if(!_0x854850)return writeCliSideChannelLine(a190_0x131ff2[_0x2d69f7(0xf7)](_0x2d69f7(0xcb))),{'ok':!![]};const _0x702209=[_0x1028f8,_0x5d19da]['filter'](_0x59c1c4=>Boolean(_0x59c1c4));_0x101a1a[_0x2d69f7(0xe6)]&&_0x702209[_0x2d69f7(0xfc)]===0x0&&await assertSharedResourcesConfigured(_0x14a549[_0x2d69f7(0xeb)],_0x14a549[_0x2d69f7(0x104)],_0x101a1a[_0x2d69f7(0xe6)]);const _0xbe85de=startSpinner(_0x2d69f7(0xd0)+_0x351c9a['length']+'\x20menu(s)...');try{const _0x342a75=_0x351c9a[_0x2d69f7(0xc6)](_0x3b6fe9=>resolvePage(_0x3b6fe9,_0x101a1a,_0x1daadb)),_0x53304d=await doCreateMenus(_0x14a549[_0x2d69f7(0xeb)],_0x14a549[_0x2d69f7(0x104)],_0x342a75,_0x702209,_0x101a1a[_0x2d69f7(0xe6)]?{'appName':_0x101a1a['appName']}:undefined);return stopSpinner(_0xbe85de,_0x2d69f7(0xe3)+_0x53304d[_0x2d69f7(0xe4)]+'\x20menu(s)',!![]),{'ok':!![],'data':_0x53304d,'message':_0x2d69f7(0xd6)+_0x53304d[_0x2d69f7(0xe4)]+_0x2d69f7(0xca)+_0x53304d['failed']+'\x20failed.'};}catch(_0x1ae36e){stopSpinner(_0xbe85de,_0x2d69f7(0xc9),![]);throw CliErrors[_0x2d69f7(0xf4)](_0x1ae36e instanceof Error?_0x1ae36e['message']:'Menu\x20creation\x20failed');}}};function ensureRunnableContext(_0xb34f39,_0x5d8f9f){const _0x1b02c9=a190_0x5b154a,_0x5be0ed=_0xb34f39['appcode']?String(_0xb34f39[_0x1b02c9(0xcd)])[_0x1b02c9(0xf5)]():'';if(!isInProject()&&!_0x5d8f9f&&!_0x5be0ed)throw CliErrors[_0x1b02c9(0xf4)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x15125b){const _0x423250=a190_0x5b154a;return[...new Set(_0x15125b[_0x423250(0xe7)](',')['map'](_0x1b87c4=>_0x1b87c4['trim']())['filter'](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a191_0x190d35=a191_0x161a;(function(_0x531383,_0x33df41){const _0x238f17=a191_0x161a,_0x3bbd67=_0x531383();while(!![]){try{const _0x471982=parseInt(_0x238f17(0x129))/0x1+parseInt(_0x238f17(0x17b))/0x2*(-parseInt(_0x238f17(0x14d))/0x3)+-parseInt(_0x238f17(0x13f))/0x4*(-parseInt(_0x238f17(0x16a))/0x5)+parseInt(_0x238f17(0x128))/0x6*(parseInt(_0x238f17(0x14b))/0x7)+parseInt(_0x238f17(0x178))/0x8+parseInt(_0x238f17(0x143))/0x9*(-parseInt(_0x238f17(0x182))/0xa)+-parseInt(_0x238f17(0x16d))/0xb;if(_0x471982===_0x33df41)break;else _0x3bbd67['push'](_0x3bbd67['shift']());}catch(_0x58bd15){_0x3bbd67['push'](_0x3bbd67['shift']());}}}(a191_0x4114,0x3acca));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';function a191_0x4114(){const _0x5e0997=['childrenCount','label','length','expectedCount','menu_state_drift','\x20must\x20be\x20true\x20or\x20false.','rabetbase\x20menu\x20list\x20--format\x20compress','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','menu-ids','validation','type','update-recovery','paths','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','menu_expected_count_mismatch','Would\x20update\x20visibility\x20for\x20','push','expected-count','some','/smartapi/menu/update','updated','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','url','\x20skipped,\x20','rawFlags','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','menu_selector_not_found','565140CgzLaZ','262185NgtYyQ','pageType','warnings','cookie','Menu\x20visibility\x20update\x20completed:\x20','byId','Menu\x20id\x20selector(s)\x20not\x20found:\x20','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','Menu\x20path\x20selector\x20not\x20found:\x20','\x20unchanged\x20menu(s).','update\x20menu\x20visibility','depth','verify\x20menu\x20visibility\x20update','path','update-menu-visibility','Final\x20menu\x20visibility\x20readback\x20failed.','Response\x20was\x20lost\x20and\x20menu\x20','write','code','visible','update\x20visibility\x20for','\x20failed.','12voNrxm','stringify','before','expectVisible','1249137mrtdVu','verification','filter','targets','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','\x20changed\x20unexpectedly.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','join','21McVeCi','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','8097FJrUoE','Selected\x20','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','\x20menu(s);\x20skipped\x20','isArray','parentId','menu_verification_failed','map','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','has','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','sort','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','datasetCode','number','appCode','visibility-update','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','plannedActions','message','menuIds','datasetId','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','plan','Updated\x20visibility\x20for\x20','set','trim','menu','POST','335165iFeheo','Menu\x20','menu\x20list','4590872QNwtHH','boolean','failed','flagMissing','modelType','hash','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','childrenIds','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','get','str','3095624enaYVG','num','resources','146gFDgiL','\x20menu(s),\x20expected\x20','expect-visible','menus','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','requestedVisible','20ZkpvSG','pageId','beforeById','resourcesValid'];a191_0x4114=function(){return _0x5e0997;};return a191_0x4114();}import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x190d35(0x169),'path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a191_0x190d35(0x168),'command':a191_0x190d35(0x15d),'description':a191_0x190d35(0x155),'risk':a191_0x190d35(0x13a),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':'string','description':a191_0x190d35(0x173)},{'name':'paths','type':'string','description':a191_0x190d35(0x157)},{'name':a191_0x190d35(0x13c),'type':a191_0x190d35(0x16e),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a191_0x190d35(0x17d),'type':a191_0x190d35(0x16e),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':'expected-count','type':a191_0x190d35(0x15b),'description':a191_0x190d35(0x14c)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x50071d){parseInput(_0x50071d);},async 'dryRun'(_0x2929cb){const _0x31a1f0=a191_0x190d35,_0x4c753b=await buildPlan(_0x2929cb,!![]),_0x473dc0=_0x4c753b[_0x31a1f0(0x164)][_0x31a1f0(0x15f)]?.[_0x31a1f0(0x188)]??0x0,_0x2d8566=_0x4c753b[_0x31a1f0(0x164)]['targets'][_0x31a1f0(0x188)]-_0x473dc0;return menuDryRunResult(_0x4c753b[_0x31a1f0(0x164)],{'method':_0x31a1f0(0x169),'url':_0x31a1f0(0x199),'body':{'updates':_0x4c753b['plan'][_0x31a1f0(0x15f)]?.['map'](_0x486f01=>_0x486f01['body'])??[]},'description':_0x31a1f0(0x195)+_0x473dc0+'\x20menu(s);\x20skip\x20'+_0x2d8566+_0x31a1f0(0x132)});},async 'execute'(_0x5a8c66){const _0x58a6dd=a191_0x190d35,_0x1fb75b=await buildPlan(_0x5a8c66,![]);await recheckMutationSnapshot(_0x5a8c66,_0x1fb75b['plan'],_0x58a6dd(0x133));const _0x4d748f=[],_0x1936e3=[],_0x5ad471=[];for(const _0x2e6f20 of _0x1fb75b[_0x58a6dd(0x164)][_0x58a6dd(0x146)]){if(_0x2e6f20[_0x58a6dd(0x141)][_0x58a6dd(0x13c)]===_0x1fb75b[_0x58a6dd(0x164)][_0x58a6dd(0x181)]){_0x4d748f[_0x58a6dd(0x196)]({'id':_0x2e6f20['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x5a8c66[_0x58a6dd(0x15c)],_0x5a8c66['cookie'],{'id':_0x2e6f20['id'],'visible':_0x1fb75b[_0x58a6dd(0x164)]['requestedVisible']}),_0x4d748f['push']({'id':_0x2e6f20['id'],'updated':!![],'skipped':![]});}catch(_0x5991c0){const _0x5bf9cb=mapMenuApiError(_0x5991c0,_0x58a6dd(0x13d),_0x2e6f20['id']);if(isMenuResponseLoss(_0x5991c0)&&_0x5bf9cb[_0x58a6dd(0x13b)]!=='menu_permission_denied'){_0x5ad471[_0x58a6dd(0x196)](_0x2e6f20['id']);continue;}_0x1936e3[_0x58a6dd(0x196)]({'id':_0x2e6f20['id'],'stage':'update','code':_0x5bf9cb[_0x58a6dd(0x13b)],'message':_0x5bf9cb[_0x58a6dd(0x160)]});}}let _0x34a565;try{_0x34a565=await fetchMenuSnapshot(_0x5a8c66['appCode'],_0x5a8c66[_0x58a6dd(0x12c)]);}catch(_0x1d86ba){const _0x3bc879=describeMenuErrorCause(_0x1d86ba,_0x58a6dd(0x135)),_0x5cdd48=_0x5ad471[_0x58a6dd(0x154)](_0x4e6507=>({'id':_0x4e6507,'stage':'update-recovery','code':_0x58a6dd(0x153),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x4e6507+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x2b507c={'stage':_0x58a6dd(0x144),'code':_0x58a6dd(0x153),'message':_0x58a6dd(0x138),'targetIds':_0x1fb75b[_0x58a6dd(0x164)]['targets'][_0x58a6dd(0x154)](_0x4e5044=>_0x4e5044['id']),'requestedStateConfirmed':![],..._0x3bc879};throw menuFailure(asVerificationError(_0x1d86ba,_0x58a6dd(0x180)),_0x1fb75b[_0x58a6dd(0x164)],{'stage':_0x58a6dd(0x144),'succeeded':_0x4d748f,'failedRecords':[..._0x1936e3,..._0x5cdd48,_0x2b507c],'warnings':[_0x58a6dd(0x18d)],'verification':{'status':_0x58a6dd(0x16f),'recoveredCount':0x0,'lookupCommand':_0x58a6dd(0x18c)}});}const _0x31c1ba=[];for(const _0x39377b of _0x4d748f){const _0xba2a93=Number(_0x39377b['id']),_0x46a8f2=_0x1fb75b[_0x58a6dd(0x184)][_0x58a6dd(0x176)](_0xba2a93),_0x2e841b=_0x34a565[_0x58a6dd(0x12e)]['get'](_0xba2a93);try{verifyVisibilityUpdate(_0x46a8f2,_0x2e841b,_0x1fb75b[_0x58a6dd(0x164)][_0x58a6dd(0x181)]);}catch(_0x3e1308){const _0x4183d3=asVerificationError(_0x3e1308,_0x58a6dd(0x16b)+_0xba2a93+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x31c1ba[_0x58a6dd(0x196)]({'id':_0xba2a93,'stage':_0x58a6dd(0x144),'code':_0x4183d3['code'],'message':_0x4183d3[_0x58a6dd(0x160)],'requestedStateConfirmed':![]});}}for(const _0x1cd2a9 of _0x5ad471){const _0x335fb0=_0x1fb75b[_0x58a6dd(0x184)][_0x58a6dd(0x176)](_0x1cd2a9),_0x274bbf=_0x34a565[_0x58a6dd(0x12e)]['get'](_0x1cd2a9);try{verifyVisibilityUpdate(_0x335fb0,_0x274bbf,_0x1fb75b[_0x58a6dd(0x164)][_0x58a6dd(0x181)]),_0x4d748f[_0x58a6dd(0x196)]({'id':_0x1cd2a9,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x55442e){const _0x458426=asVerificationError(_0x55442e,_0x58a6dd(0x139)+_0x1cd2a9+_0x58a6dd(0x130));_0x31c1ba['push']({'id':_0x1cd2a9,'stage':_0x58a6dd(0x191),'code':_0x458426[_0x58a6dd(0x13b)],'message':_0x458426['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x31c1ba['length']>0x0){const _0x52ed1c=_0x31c1ba[_0x58a6dd(0x154)](_0x251f12=>Number(_0x251f12['id'])),_0x233c7e=_0x4d748f[_0x58a6dd(0x145)](_0x48f6b0=>_0x48f6b0['recovered']===!![])[_0x58a6dd(0x188)],_0x62f001=menuError(_0x58a6dd(0x153),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x52ed1c['join'](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x62f001,_0x1fb75b['plan'],{'stage':_0x58a6dd(0x144),'succeeded':_0x4d748f,'failedRecords':[..._0x1936e3,..._0x31c1ba],'warnings':[_0x58a6dd(0x163)],'verification':{'status':'failed',..._0x52ed1c[_0x58a6dd(0x188)]===0x1?{'targetId':_0x52ed1c[0x0]}:{'targetIds':_0x52ed1c},'recoveredCount':_0x233c7e,'lookupCommand':_0x58a6dd(0x18c)}});}const _0x76af33=_0x4d748f[_0x58a6dd(0x145)](_0x1fad1a=>_0x1fad1a[_0x58a6dd(0x121)]===!![])[_0x58a6dd(0x188)],_0x2c6700=_0x4d748f[_0x58a6dd(0x188)]-_0x76af33,_0x564f22={..._0x1fb75b['plan'],'succeeded':_0x4d748f,'failed':_0x1936e3,'warnings':_0x1936e3[_0x58a6dd(0x188)]>0x0?[..._0x1fb75b[_0x58a6dd(0x164)][_0x58a6dd(0x12b)],_0x58a6dd(0x17f)]:_0x1fb75b[_0x58a6dd(0x164)]['warnings'],'verification':{'checkedBy':_0x58a6dd(0x16c),'snapshotHash':_0x34a565[_0x58a6dd(0x172)],'matchesRequestedState':_0x1936e3[_0x58a6dd(0x188)]===0x0,'recoveredCount':_0x5ad471[_0x58a6dd(0x188)]}};return{'ok':_0x1936e3[_0x58a6dd(0x188)]===0x0,'data':_0x564f22,'message':_0x1936e3['length']===0x0?_0x58a6dd(0x165)+_0x76af33+_0x58a6dd(0x150)+_0x2c6700+'\x20unchanged\x20menu(s).':_0x58a6dd(0x12d)+_0x76af33+'\x20updated,\x20'+_0x2c6700+_0x58a6dd(0x124)+_0x1936e3[_0x58a6dd(0x188)]+_0x58a6dd(0x13e)};}};function a191_0x161a(_0x1986f0,_0x14c4c4){_0x1986f0=_0x1986f0-0x121;const _0x4114a0=a191_0x4114();let _0x161ac9=_0x4114a0[_0x1986f0];return _0x161ac9;}function parseInput(_0x36627b){const _0x89ae6d=a191_0x190d35,_0x4ce574=parseMenuIds(_0x36627b[_0x89ae6d(0x177)](_0x89ae6d(0x18e))),_0x4a1afb=parseCsv(_0x36627b['str'](_0x89ae6d(0x192)));if(_0x4ce574[_0x89ae6d(0x188)]===0x0&&_0x4a1afb[_0x89ae6d(0x188)]===0x0)throw CliErrors['validation']('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x53e4b3=parseBooleanFlag(_0x36627b,_0x89ae6d(0x13c),!![]),_0x5925ef=parseBooleanFlag(_0x36627b,'expect-visible',![]);let _0x4d49dd;if(hasFlag(_0x36627b,_0x89ae6d(0x197))){_0x4d49dd=_0x36627b[_0x89ae6d(0x179)](_0x89ae6d(0x197));if(!Number['isSafeInteger'](_0x4d49dd)||_0x4d49dd<0x0)throw CliErrors[_0x89ae6d(0x18f)]('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0x4ce574,'paths':_0x4a1afb,'visible':_0x53e4b3,'expectVisible':_0x5925ef,'expectedCount':_0x4d49dd};}async function buildPlan(_0x25cc81,_0xe635d){const _0xc77fae=a191_0x190d35,_0x443b46=parseInput(_0x25cc81),_0x4b9c14=await fetchMutationSnapshot(_0x25cc81,_0xc77fae(0x133)),_0x29a617=selectTargets(_0x4b9c14[_0xc77fae(0x17e)],_0x443b46['menuIds'],_0x443b46[_0xc77fae(0x192)]);if(_0x443b46['expectedCount']!==undefined&&_0x29a617[_0xc77fae(0x188)]!==_0x443b46['expectedCount'])throw menuError(_0xc77fae(0x194),_0xc77fae(0x14e)+_0x29a617[_0xc77fae(0x188)]+_0xc77fae(0x17c)+_0x443b46[_0xc77fae(0x189)]+'.',_0xc77fae(0x149));if(_0x443b46[_0xc77fae(0x142)]!==undefined){const _0x54a526=_0x29a617[_0xc77fae(0x145)](_0x2d2d87=>_0x2d2d87[_0xc77fae(0x13c)]!==_0x443b46[_0xc77fae(0x142)]);if(_0x54a526['length']>0x0)throw menuError(_0xc77fae(0x18a),_0xc77fae(0x147)+_0x54a526[_0xc77fae(0x154)](_0x338308=>_0x338308['id'])[_0xc77fae(0x14a)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0xce7a95=_0x29a617[_0xc77fae(0x154)](_0x4153db=>({'id':_0x4153db['id'],'label':_0x4153db['label'],'path':_0x4153db['path'],'before':{'visible':_0x4153db['visible']},'after':{'visible':_0x443b46['visible']}})),_0x2f0473=_0xce7a95['filter'](_0x22be0a=>_0x22be0a[_0xc77fae(0x141)][_0xc77fae(0x13c)]!==_0x443b46[_0xc77fae(0x13c)])['map'](_0xc42811=>({'stage':_0xc77fae(0x137),'method':_0xc77fae(0x169),'path':_0xc77fae(0x199),'body':{'appCode':_0x25cc81[_0xc77fae(0x15c)],'id':_0xc42811['id'],'visible':_0x443b46[_0xc77fae(0x13c)]}})),_0x4d7ae0=mutationResult({'operation':_0xc77fae(0x15d),'selector':{'menuIds':_0x443b46[_0xc77fae(0x161)],'paths':_0x443b46['paths']},'before':{'menus':_0x29a617[_0xc77fae(0x154)](_0x1bb013=>({'id':_0x1bb013['id'],'path':_0x1bb013[_0xc77fae(0x136)],'visible':_0x1bb013[_0xc77fae(0x13c)]}))},'after':{'menus':_0x29a617[_0xc77fae(0x154)](_0x1dda09=>({'id':_0x1dda09['id'],'path':_0x1dda09[_0xc77fae(0x136)],'visible':_0x443b46['visible']}))},'dryRun':_0xe635d,'backend':[...BACKEND],'plannedActions':_0x2f0473,'snapshotHash':_0x4b9c14['hash'],'warnings':_0x2f0473[_0xc77fae(0x188)]===0x0?[_0xc77fae(0x122)]:[]});return{'plan':{..._0x4d7ae0,'requestedVisible':_0x443b46[_0xc77fae(0x13c)],'targets':_0xce7a95},'beforeById':new Map(_0x29a617[_0xc77fae(0x154)](_0x257f38=>[_0x257f38['id'],_0x257f38]))};}function selectTargets(_0x5f4d56,_0x232076,_0x3a0e9a){const _0x152171=a191_0x190d35,_0x55f2bb=new Map(_0x5f4d56[_0x152171(0x154)](_0x51bbc6=>[_0x51bbc6['id'],_0x51bbc6])),_0x25278b=new Map(),_0x113245=_0x232076[_0x152171(0x145)](_0x10eb90=>!_0x55f2bb[_0x152171(0x156)](_0x10eb90));if(_0x113245[_0x152171(0x188)]>0x0)throw menuError(_0x152171(0x127),_0x152171(0x12f)+_0x113245[_0x152171(0x14a)](',\x20')+'.',_0x152171(0x14f));for(const _0x5eee9e of _0x232076){_0x25278b[_0x152171(0x166)](_0x5eee9e,_0x55f2bb[_0x152171(0x176)](_0x5eee9e));}for(const _0x1bc9f0 of _0x3a0e9a){const _0x26c20b=_0x5f4d56[_0x152171(0x145)](_0x3bfb21=>_0x3bfb21[_0x152171(0x136)]===_0x1bc9f0);if(_0x26c20b['length']===0x0)throw menuError('menu_selector_not_found',_0x152171(0x131)+JSON['stringify'](_0x1bc9f0)+'.',_0x152171(0x159));if(_0x26c20b[_0x152171(0x188)]>0x1)throw menuError('menu_selector_ambiguous',_0x152171(0x193)+JSON['stringify'](_0x1bc9f0)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x26c20b[_0x152171(0x154)](_0x2d2f62=>_0x2d2f62['id'])[_0x152171(0x14a)](',\x20')+'.');const _0x659928=_0x26c20b[0x0];_0x25278b[_0x152171(0x166)](_0x659928['id'],_0x659928);}return[..._0x25278b['values']()];}function parseMenuIds(_0xfd8b61){const _0x4ade22=a191_0x190d35,_0x252560=parseCsv(_0xfd8b61),_0x38654b=_0x252560[_0x4ade22(0x154)](Number);if(_0x38654b[_0x4ade22(0x198)](_0x156020=>!Number['isSafeInteger'](_0x156020)||_0x156020<=0x0))throw CliErrors[_0x4ade22(0x18f)](_0x4ade22(0x15e));return[...new Set(_0x38654b)];}function parseCsv(_0x1acc58){const _0x36d646=a191_0x190d35;return[...new Set(_0x1acc58['split'](',')['map'](_0xcbd1db=>_0xcbd1db[_0x36d646(0x167)]())['filter'](Boolean))];}function parseBooleanFlag(_0x2f0d83,_0x3c83ac,_0x35291f){const _0x5609cd=a191_0x190d35;if(!hasFlag(_0x2f0d83,_0x3c83ac)){if(_0x35291f)throw CliErrors[_0x5609cd(0x170)](_0x3c83ac);return undefined;}const _0x16c84b=_0x2f0d83[_0x5609cd(0x125)][_0x3c83ac];if(_0x16c84b===!![]||_0x16c84b===![])return _0x16c84b;if(_0x16c84b==='true')return!![];if(_0x16c84b==='false')return![];throw CliErrors[_0x5609cd(0x18f)]('--'+_0x3c83ac+_0x5609cd(0x18b));}function verifyVisibilityUpdate(_0x5a7097,_0x3c8536,_0x5186a2){const _0x2b325e=a191_0x190d35;assertVerified(!!_0x3c8536,_0x2b325e(0x16b)+_0x5a7097['id']+_0x2b325e(0x175)),assertVerified(_0x3c8536[_0x2b325e(0x13c)]===_0x5186a2,_0x2b325e(0x16b)+_0x5a7097['id']+_0x2b325e(0x126));const _0x10b9d3=[['id',_0x3c8536['id'],_0x5a7097['id']],[_0x2b325e(0x152),_0x3c8536[_0x2b325e(0x152)],_0x5a7097[_0x2b325e(0x152)]],[_0x2b325e(0x134),_0x3c8536[_0x2b325e(0x134)],_0x5a7097[_0x2b325e(0x134)]],['label',_0x3c8536[_0x2b325e(0x187)],_0x5a7097[_0x2b325e(0x187)]],[_0x2b325e(0x136),_0x3c8536['path'],_0x5a7097['path']],['url',_0x3c8536[_0x2b325e(0x123)],_0x5a7097['url']],[_0x2b325e(0x190),_0x3c8536[_0x2b325e(0x190)],_0x5a7097[_0x2b325e(0x190)]],[_0x2b325e(0x158),_0x3c8536[_0x2b325e(0x158)],_0x5a7097[_0x2b325e(0x158)]],[_0x2b325e(0x17a),_0x3c8536[_0x2b325e(0x17a)],_0x5a7097[_0x2b325e(0x17a)]],[_0x2b325e(0x185),_0x3c8536[_0x2b325e(0x185)],_0x5a7097[_0x2b325e(0x185)]],[_0x2b325e(0x174),_0x3c8536[_0x2b325e(0x174)],_0x5a7097[_0x2b325e(0x174)]],[_0x2b325e(0x186),_0x3c8536['childrenCount'],_0x5a7097[_0x2b325e(0x186)]],[_0x2b325e(0x183),_0x3c8536[_0x2b325e(0x183)],_0x5a7097[_0x2b325e(0x183)]],[_0x2b325e(0x12a),_0x3c8536['pageType'],_0x5a7097[_0x2b325e(0x12a)]],[_0x2b325e(0x171),_0x3c8536[_0x2b325e(0x171)],_0x5a7097[_0x2b325e(0x171)]],[_0x2b325e(0x162),_0x3c8536['datasetId'],_0x5a7097[_0x2b325e(0x162)]],[_0x2b325e(0x15a),_0x3c8536[_0x2b325e(0x15a)],_0x5a7097[_0x2b325e(0x15a)]]];for(const [_0x13c2f2,_0x2f4a38,_0x272b71]of _0x10b9d3){assertVerified(sameValue(_0x2f4a38,_0x272b71),_0x2b325e(0x16b)+_0x5a7097['id']+'\x20'+_0x13c2f2+_0x2b325e(0x148));}}function sameValue(_0x56c330,_0x2d56cc){const _0x375e70=a191_0x190d35;if(Array[_0x375e70(0x151)](_0x56c330)||Array['isArray'](_0x2d56cc))return JSON[_0x375e70(0x140)](_0x56c330)===JSON[_0x375e70(0x140)](_0x2d56cc);return _0x56c330===_0x2d56cc;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a192_0x20696f=a192_0x236f;(function(_0x233a30,_0x13e53c){const _0x520544=a192_0x236f,_0x238515=_0x233a30();while(!![]){try{const _0x21c879=-parseInt(_0x520544(0x181))/0x1+parseInt(_0x520544(0x186))/0x2+-parseInt(_0x520544(0x1a2))/0x3*(-parseInt(_0x520544(0x1a5))/0x4)+-parseInt(_0x520544(0x1a3))/0x5*(-parseInt(_0x520544(0x1a6))/0x6)+parseInt(_0x520544(0x194))/0x7+parseInt(_0x520544(0x192))/0x8*(parseInt(_0x520544(0x18d))/0x9)+parseInt(_0x520544(0x1a1))/0xa*(-parseInt(_0x520544(0x19c))/0xb);if(_0x21c879===_0x13e53c)break;else _0x238515['push'](_0x238515['shift']());}catch(_0x35a4f0){_0x238515['push'](_0x238515['shift']());}}}(a192_0x206b,0xb3881));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';function a192_0x206b(){const _0x314514=['connectTimeout','13624666CxOgAJ','channelType',';\x20no\x20automatic\x20retry\x20was\x20attempted.',';\x20do\x20not\x20resubmit\x20automatically.','Inspect\x20with\x20','20bzUKyz','231747vhVqcj','2859365DqHWZZ','config-create','76uLLHor','6Npcvtw','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','input','696631SXxAMH','/notification/channel-config/create','notification','readTimeout','planned','2492812iYAcOV','verification','configName','endpointUrl','channelConfig','write','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','1448073XiFncO','verified','Created\x20notification\x20config\x20','POST',';\x20do\x20not\x20resubmit.','8QnuCnH','mutation','3236079uOZcpF','create','description','document','appCode','configCode','notification_config_create_outcome_unknown'];a192_0x206b=function(){return _0x314514;};return a192_0x206b();}const CREATE_PATH=a192_0x20696f(0x182);async function prepareCreate(_0x4e0b75){const _0x517d36=a192_0x20696f,_0x480165=await readNotificationDocument(_0x4e0b75,_0x517d36(0x195)),_0x13250a=createMutationInput(_0x4e0b75[_0x517d36(0x198)],_0x480165);return{'document':_0x480165,'input':_0x13250a,'planned':projectNotificationConfig({'appCode':_0x4e0b75[_0x517d36(0x198)],'configName':_0x480165[_0x517d36(0x188)],'channelType':_0x480165[_0x517d36(0x19d)],'endpointUrl':_0x480165[_0x517d36(0x189)],'channelConfig':_0x480165[_0x517d36(0x18a)],'description':_0x480165[_0x517d36(0x196)],'connectTimeout':_0x480165[_0x517d36(0x19b)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x480165[_0x517d36(0x184)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a192_0x236f(_0x1a3d00,_0x3d4ade){_0x1a3d00=_0x1a3d00-0x181;const _0x206bb9=a192_0x206b();let _0x236fb1=_0x206bb9[_0x1a3d00];return _0x236fb1;}export const notificationConfigCreate={'service':a192_0x20696f(0x183),'command':a192_0x20696f(0x1a4),'description':'Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','risk':a192_0x20696f(0x18b),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x24d216){assertSingleNotificationSource(_0x24d216);},async 'dryRun'(_0x322f3c){const _0x33dc7f=a192_0x20696f,_0x435230=await prepareCreate(_0x322f3c),_0x10de9b=notificationLookupCommand(_0x322f3c[_0x33dc7f(0x198)],_0x435230['document'][_0x33dc7f(0x19d)]);return asDryRunResult({'operation':_0x33dc7f(0x195),'selector':{'appCode':_0x322f3c[_0x33dc7f(0x198)],'configName':_0x435230[_0x33dc7f(0x197)][_0x33dc7f(0x188)],'channelType':_0x435230['document'][_0x33dc7f(0x19d)]},'before':null,'after':_0x435230[_0x33dc7f(0x185)],'dryRun':!![],'backend':{'method':_0x33dc7f(0x190),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x33dc7f(0x185),'lookupCommand':_0x10de9b}},{'method':_0x33dc7f(0x190),'url':CREATE_PATH});},async 'execute'(_0x1be3b4){const _0x8eb697=a192_0x20696f,_0x195456=await prepareCreate(_0x1be3b4),_0x282004=notificationLookupCommand(_0x1be3b4[_0x8eb697(0x198)],_0x195456[_0x8eb697(0x197)]['channelType']);let _0x28662b;try{_0x28662b=await createNotificationChannelConfig(_0x195456[_0x8eb697(0x1a8)]);}catch(_0x4a463f){if(isPlatformTransportFailure(_0x4a463f))throw notificationError(_0x8eb697(0x19a),_0x8eb697(0x18c),_0x8eb697(0x1a0)+_0x282004+_0x8eb697(0x191));throw safeApiFailure(_0x8eb697(0x195),_0x8eb697(0x193),_0x8eb697(0x1a0)+_0x282004+_0x8eb697(0x19e));}if(!Number['isSafeInteger'](_0x28662b)||_0x28662b<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x8eb697(0x1a7),_0x8eb697(0x1a0)+_0x282004+_0x8eb697(0x191));let _0x269b3f;try{const _0x14b2db=await getNotificationChannelConfig(_0x28662b,_0x1be3b4[_0x8eb697(0x198)]);_0x269b3f=normalizeExactNotificationConfig(_0x14b2db,_0x28662b,_0x1be3b4[_0x8eb697(0x198)]);}catch{throw safeApiFailure(_0x8eb697(0x195),_0x8eb697(0x187),_0x8eb697(0x1a0)+_0x282004+_0x8eb697(0x19f));}return{'ok':!![],'data':{'operation':_0x8eb697(0x195),'selector':{'appCode':_0x269b3f[_0x8eb697(0x198)],'id':_0x269b3f['id'],'configCode':_0x269b3f[_0x8eb697(0x199)],'configName':_0x269b3f[_0x8eb697(0x188)],'channelType':_0x269b3f['channelType']},'before':null,'after':projectNotificationConfig(_0x269b3f),'dryRun':![],'backend':{'method':_0x8eb697(0x190),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x8eb697(0x18e),'lookupCommand':_0x282004}},'message':_0x8eb697(0x18f)+_0x269b3f['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a193_0x5e6fab=a193_0x2352;(function(_0xbf5653,_0x9357c2){const _0x5f296d=a193_0x2352,_0x57c18f=_0xbf5653();while(!![]){try{const _0x506dc3=parseInt(_0x5f296d(0x14e))/0x1+-parseInt(_0x5f296d(0x150))/0x2+-parseInt(_0x5f296d(0x151))/0x3+parseInt(_0x5f296d(0x152))/0x4*(-parseInt(_0x5f296d(0x148))/0x5)+-parseInt(_0x5f296d(0x13c))/0x6+-parseInt(_0x5f296d(0x145))/0x7*(parseInt(_0x5f296d(0x13a))/0x8)+parseInt(_0x5f296d(0x13d))/0x9;if(_0x506dc3===_0x9357c2)break;else _0x57c18f['push'](_0x57c18f['shift']());}catch(_0x4eba1f){_0x57c18f['push'](_0x57c18f['shift']());}}}(a193_0x1b3f,0xaaec9));function a193_0x1b3f(){const _0x4e047a=['notification_config_delete_outcome_unknown','channelType','\x20remains\x20present\x20after\x20delete.','POST','269776cFgnUk','high-risk-write','1800824tznjHG','69051WBRIKF','4QMHcfG','notification','before','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','appCode','planned','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','8GWdUgE','Notification\x20config\x20','2883300USGBUD','27417303cxpAgv',';\x20do\x20not\x20resubmit\x20automatically.','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','mutation','/notification/channel-config/delete','notification_config_delete_verification_unavailable','verified','delete','4934209qDxNZG','unshift','some','2535860sCLPeX','Inspect\x20with\x20'];a193_0x1b3f=function(){return _0x4e047a;};return a193_0x1b3f();}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_0x5e6fab(0x141),REFERENCE_WARNING=a193_0x5e6fab(0x139);function a193_0x2352(_0x557548,_0x1a6eb6){_0x557548=_0x557548-0x136;const _0x1b3f2e=a193_0x1b3f();let _0x2352af=_0x1b3f2e[_0x557548];return _0x2352af;}async function prepareDelete(_0x266981){const _0x1a6344=a193_0x5e6fab,_0x3a9c1a=readNotificationId(_0x266981),_0x492e42=await requireExactNotificationConfig(_0x266981[_0x1a6344(0x137)],_0x3a9c1a,_0x1a6344(0x144));return{'id':_0x3a9c1a,'before':_0x492e42};}export const notificationConfigDelete={'service':a193_0x5e6fab(0x153),'command':'config-delete','description':a193_0x5e6fab(0x13f),'risk':a193_0x5e6fab(0x14f),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x59ef4f){readNotificationId(_0x59ef4f),requireNotificationExplicitYes(_0x59ef4f);},async 'dryRun'(_0xb9125c){const _0x2023da=a193_0x5e6fab,_0x2e55b1=await prepareDelete(_0xb9125c),_0x1bff2b=notificationLookupCommand(_0xb9125c[_0x2023da(0x137)],_0x2e55b1[_0x2023da(0x154)]['channelType']);return asDryRunResult({'operation':_0x2023da(0x144),'selector':notificationSelector(_0x2e55b1[_0x2023da(0x154)]),'before':projectNotificationConfig(_0x2e55b1[_0x2023da(0x154)]),'after':null,'dryRun':!![],'backend':{'method':_0x2023da(0x14d),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x2023da(0x138),'lookupCommand':_0x1bff2b}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x4cf9cf){const _0xe6a9e6=a193_0x5e6fab;requireNotificationExplicitYes(_0x4cf9cf);const _0x30cc5e=await prepareDelete(_0x4cf9cf),_0x120e2b=notificationLookupCommand(_0x4cf9cf[_0xe6a9e6(0x137)],_0x30cc5e[_0xe6a9e6(0x154)]['channelType']);let _0x1828ba=![];try{await deleteNotificationChannelConfig(_0x30cc5e['id'],_0x4cf9cf['appCode']);}catch(_0x1159c5){if(!isPlatformTransportFailure(_0x1159c5))throw safeApiFailure(_0xe6a9e6(0x144),_0xe6a9e6(0x140),_0xe6a9e6(0x149)+_0x120e2b+_0xe6a9e6(0x136));_0x1828ba=!![];}let _0x29696b;try{_0x29696b=await listNotificationChannelConfigs(_0x4cf9cf[_0xe6a9e6(0x137)],_0x30cc5e[_0xe6a9e6(0x154)][_0xe6a9e6(0x14b)]),validateNotificationDeleteReadback(_0x29696b,_0x4cf9cf['appCode'],_0x30cc5e[_0xe6a9e6(0x154)]['channelType']);}catch{throw notificationError(_0x1828ba?_0xe6a9e6(0x14a):_0xe6a9e6(0x142),_0xe6a9e6(0x13b)+_0x30cc5e['id']+'\x20delete\x20could\x20not\x20be\x20verified.','Inspect\x20with\x20'+_0x120e2b+_0xe6a9e6(0x13e));}if(_0x29696b[_0xe6a9e6(0x147)](_0x54b56e=>_0x54b56e['id']===_0x30cc5e['id']))throw notificationError(_0x1828ba?_0xe6a9e6(0x14a):'notification_config_delete_verification_failed',_0xe6a9e6(0x13b)+_0x30cc5e['id']+_0xe6a9e6(0x14c),_0xe6a9e6(0x149)+_0x120e2b+_0xe6a9e6(0x13e));const _0x443618=[REFERENCE_WARNING];return _0x1828ba&&_0x443618[_0xe6a9e6(0x146)](_0xe6a9e6(0x155)),{'ok':!![],'data':{'operation':_0xe6a9e6(0x144),'selector':notificationSelector(_0x30cc5e['before']),'before':projectNotificationConfig(_0x30cc5e[_0xe6a9e6(0x154)]),'after':null,'dryRun':![],'backend':{'method':_0xe6a9e6(0x14d),'path':DELETE_PATH},'warnings':_0x443618,'verification':{'status':_0xe6a9e6(0x143),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x1828ba,'lookupCommand':_0x120e2b}},'message':'Deleted\x20notification\x20config\x20'+_0x30cc5e['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a194_0x2402b6=a194_0x4190;function a194_0x4190(_0x52cb18,_0x288f13){_0x52cb18=_0x52cb18-0x166;const _0x196a9c=a194_0x196a();let _0x419030=_0x196a9c[_0x52cb18];return _0x419030;}(function(_0x267448,_0x4225b5){const _0x2c595b=a194_0x4190,_0x451022=_0x267448();while(!![]){try{const _0x351035=parseInt(_0x2c595b(0x17e))/0x1*(-parseInt(_0x2c595b(0x17b))/0x2)+parseInt(_0x2c595b(0x172))/0x3*(parseInt(_0x2c595b(0x171))/0x4)+parseInt(_0x2c595b(0x183))/0x5+-parseInt(_0x2c595b(0x181))/0x6*(parseInt(_0x2c595b(0x173))/0x7)+parseInt(_0x2c595b(0x16c))/0x8*(-parseInt(_0x2c595b(0x16f))/0x9)+-parseInt(_0x2c595b(0x177))/0xa+parseInt(_0x2c595b(0x170))/0xb;if(_0x351035===_0x4225b5)break;else _0x451022['push'](_0x451022['shift']());}catch(_0x46edbe){_0x451022['push'](_0x451022['shift']());}}}(a194_0x196a,0x844cc));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';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_0x196a(){const _0x38a6d9=['4hGyXYH','1408326eBFJLy','1883wIMqFn','bool','appCode','all','9674720OqOUBK','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','Notification\x20channel\x20type','map','156802WMpEhx','trim','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','7xzmIyG','boolean','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','678xOqWrt','length','3450325ULonXM','notification','config-list','str','string','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','type','376048ZounCj','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','Found\x20','54KYNviG','13322155RDcssP'];a194_0x196a=function(){return _0x38a6d9;};return a194_0x196a();}export const notificationConfigList={'service':a194_0x2402b6(0x166),'command':a194_0x2402b6(0x167),'description':a194_0x2402b6(0x17d),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a194_0x2402b6(0x16b),'type':a194_0x2402b6(0x169),'description':a194_0x2402b6(0x179),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':a194_0x2402b6(0x17f),'default':![],'description':a194_0x2402b6(0x180)}],async 'validate'(_0x5d5e11){const _0x39045f=a194_0x2402b6;if(_0x5d5e11[_0x39045f(0x174)]('all')&&_0x5d5e11[_0x39045f(0x168)](_0x39045f(0x16b))[_0x39045f(0x17c)]())throw CliErrors['validation'](_0x39045f(0x16d),_0x39045f(0x178));if(_0x5d5e11[_0x39045f(0x174)](_0x39045f(0x176)))return;readNotificationChannelType(_0x5d5e11);},async 'execute'(_0x2b66cd){const _0x3f5504=a194_0x2402b6;if(_0x2b66cd[_0x3f5504(0x174)]('all')){const _0x40fab4=await Promise[_0x3f5504(0x176)](NOTIFICATION_CHANNEL_TYPES[_0x3f5504(0x17a)](_0x13a24d=>listNotificationChannelConfigs(_0x2b66cd[_0x3f5504(0x175)],_0x13a24d))),_0x303b89=_0x40fab4['flat']()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x2b66cd[_0x3f5504(0x175)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x303b89[_0x3f5504(0x182)],'configs':_0x303b89},'message':'Found\x20'+_0x303b89[_0x3f5504(0x182)]+_0x3f5504(0x16a)};}const _0x30a243=readNotificationChannelType(_0x2b66cd),_0x10037b=await listNotificationChannelConfigs(_0x2b66cd[_0x3f5504(0x175)],_0x30a243),_0x421dad=_0x10037b[_0x3f5504(0x17a)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x2b66cd[_0x3f5504(0x175)],'channelType':_0x30a243,'count':_0x421dad[_0x3f5504(0x182)],'configs':_0x421dad},'message':_0x3f5504(0x16e)+_0x421dad['length']+'\x20'+_0x30a243+'\x20notification\x20config(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a195_0x55fd(_0x31850f,_0x52485c){_0x31850f=_0x31850f-0x6c;const _0x4d7bcb=a195_0x4d7b();let _0x55fd0f=_0x4d7bcb[_0x31850f];return _0x55fd0f;}const a195_0x13b8bc=a195_0x55fd;(function(_0x30e301,_0x5892e2){const _0x4053d8=a195_0x55fd,_0x5a3962=_0x30e301();while(!![]){try{const _0x9138e6=-parseInt(_0x4053d8(0x77))/0x1*(parseInt(_0x4053d8(0x71))/0x2)+parseInt(_0x4053d8(0x87))/0x3+-parseInt(_0x4053d8(0x88))/0x4*(-parseInt(_0x4053d8(0x7f))/0x5)+-parseInt(_0x4053d8(0x7c))/0x6*(parseInt(_0x4053d8(0x8b))/0x7)+-parseInt(_0x4053d8(0x6f))/0x8+-parseInt(_0x4053d8(0x6e))/0x9*(parseInt(_0x4053d8(0x76))/0xa)+-parseInt(_0x4053d8(0x72))/0xb*(-parseInt(_0x4053d8(0x73))/0xc);if(_0x9138e6===_0x5892e2)break;else _0x5a3962['push'](_0x5a3962['shift']());}catch(_0x5be1bc){_0x5a3962['push'](_0x5a3962['shift']());}}}(a195_0x4d7b,0x3b068));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a195_0x13b8bc(0x70);async function prepareUpdate(_0x464f1e){const _0x2be1df=a195_0x13b8bc,_0x39932e=readNotificationId(_0x464f1e),_0x4b6ff5=await readNotificationDocument(_0x464f1e,_0x2be1df(0x6d)),_0x580116=await requireExactNotificationConfig(_0x464f1e[_0x2be1df(0x74)],_0x39932e,_0x2be1df(0x6d));return{'id':_0x39932e,'patch':_0x4b6ff5,'before':_0x580116,'payload':mergeUpdateInput(_0x580116,_0x4b6ff5),'planned':plannedUpdateProjection(_0x580116,_0x4b6ff5)};}export const notificationConfigUpdate={'service':'notification','command':'config-update','description':a195_0x13b8bc(0x91),'risk':a195_0x13b8bc(0x8f),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4eb9fc){readNotificationId(_0x4eb9fc),assertSingleNotificationSource(_0x4eb9fc),requireNotificationExplicitYes(_0x4eb9fc);},async 'dryRun'(_0x5766c5){const _0x2fe966=a195_0x13b8bc,_0x2366dd=await prepareUpdate(_0x5766c5),_0x8e1998=notificationLookupCommand(_0x5766c5[_0x2fe966(0x74)],_0x2366dd[_0x2fe966(0x7d)][_0x2fe966(0x7b)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x2366dd['before']),'before':projectNotificationConfig(_0x2366dd[_0x2fe966(0x7d)]),'after':_0x2366dd[_0x2fe966(0x8e)],'dryRun':!![],'backend':{'method':_0x2fe966(0x8c),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x2fe966(0x8e),'lookupCommand':_0x8e1998}},{'method':_0x2fe966(0x8c),'url':UPDATE_PATH});},async 'execute'(_0xf60063){const _0x29a125=a195_0x13b8bc;requireNotificationExplicitYes(_0xf60063);const _0xc7fc40=await prepareUpdate(_0xf60063),_0x2a8c5b=notificationLookupCommand(_0xf60063[_0x29a125(0x74)],_0xc7fc40[_0x29a125(0x7d)][_0x29a125(0x7b)]);let _0x4ca3f7=![];try{await updateNotificationChannelConfig(_0xc7fc40[_0x29a125(0x79)]);}catch(_0x4afeb4){if(!isPlatformTransportFailure(_0x4afeb4))throw safeApiFailure(_0x29a125(0x6d),_0x29a125(0x78),_0x29a125(0x8a)+_0xc7fc40['id']+_0x29a125(0x8d)+_0x2a8c5b+_0x29a125(0x75));_0x4ca3f7=!![];}let _0x5b92f2;try{const _0x55ee07=await getNotificationChannelConfig(_0xc7fc40['id'],_0xf60063[_0x29a125(0x74)]);_0x5b92f2=normalizeExactNotificationConfig(_0x55ee07,_0xc7fc40['id'],_0xf60063[_0x29a125(0x74)]);}catch{throw notificationError(_0x4ca3f7?_0x29a125(0x82):'notification_config_update_verification_unavailable',_0x29a125(0x80)+_0xc7fc40['id']+_0x29a125(0x83),_0x29a125(0x7e)+_0xc7fc40['id']+_0x29a125(0x81)+_0x2a8c5b+_0x29a125(0x7a));}const _0x577ee3=requestedSafeFieldsMatch(_0xc7fc40[_0x29a125(0x7d)],_0x5b92f2,_0xc7fc40[_0x29a125(0x90)]);if(!_0x577ee3[_0x29a125(0x6c)]||_0x4ca3f7&&!_0x577ee3[_0x29a125(0x92)])throw notificationError(_0x4ca3f7?_0x29a125(0x82):'notification_config_update_verification_failed',_0x29a125(0x80)+_0xc7fc40['id']+_0x29a125(0x89),_0x29a125(0x7e)+_0xc7fc40['id']+_0x29a125(0x81)+_0x2a8c5b+';\x20do\x20not\x20resubmit\x20automatically.');const _0x144f42=_0x4ca3f7?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x29a125(0x6d),'selector':notificationSelector(_0x5b92f2),'before':projectNotificationConfig(_0xc7fc40[_0x29a125(0x7d)]),'after':projectNotificationConfig(_0x5b92f2),'dryRun':![],'backend':{'method':_0x29a125(0x8c),'path':UPDATE_PATH},'warnings':_0x144f42,'verification':{'status':_0x29a125(0x85),'recoveredAfterUnknownResponse':_0x4ca3f7,'verifiedFields':_0x577ee3[_0x29a125(0x84)],'lookupCommand':_0x2a8c5b}},'message':_0x29a125(0x86)+_0x5b92f2['id']};}};function a195_0x4d7b(){const _0x148cc1=['channelType','18tcpmxf','before','Inspect\x20with\x20--id\x20','15LWeJeq','Notification\x20config\x20','\x20via\x20','notification_config_update_outcome_unknown','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','verifiedFields','verified','Updated\x20notification\x20config\x20','719664TMoTbH','26936PzUjHZ','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','Inspect\x20ID\x20','208957JVaewZ','POST','\x20with\x20','planned','high-risk-write','patch','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','provesChange','allMatch','update','3861153tUmCbQ','1511960RKnWHP','/notification/channel-config/update','20egNoaT','8969983YJWqmD','12roSdQT','appCode',';\x20no\x20automatic\x20retry\x20was\x20attempted.','10wCheMh','12621NlKyVE','mutation','payload',';\x20do\x20not\x20resubmit\x20automatically.'];a195_0x4d7b=function(){return _0x148cc1;};return a195_0x4d7b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x159ff1,_0x2a3b08){const _0x81c7ef=a196_0x1c0d,_0x1ae82a=_0x159ff1();while(!![]){try{const _0x3d5b7c=parseInt(_0x81c7ef(0x189))/0x1*(-parseInt(_0x81c7ef(0x18e))/0x2)+parseInt(_0x81c7ef(0x18a))/0x3+-parseInt(_0x81c7ef(0x190))/0x4*(-parseInt(_0x81c7ef(0x187))/0x5)+-parseInt(_0x81c7ef(0x18b))/0x6*(-parseInt(_0x81c7ef(0x188))/0x7)+-parseInt(_0x81c7ef(0x18c))/0x8+parseInt(_0x81c7ef(0x18f))/0x9+parseInt(_0x81c7ef(0x191))/0xa*(-parseInt(_0x81c7ef(0x18d))/0xb);if(_0x3d5b7c===_0x2a3b08)break;else _0x1ae82a['push'](_0x1ae82a['shift']());}catch(_0x2a31c6){_0x1ae82a['push'](_0x1ae82a['shift']());}}}(a196_0xfd6d,0xbe50d));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_0x1c0d(_0x25a07c,_0x4afa79){_0x25a07c=_0x25a07c-0x187;const _0xfd6d0a=a196_0xfd6d();let _0x1c0d02=_0xfd6d0a[_0x25a07c];return _0x1c0d02;}function a196_0xfd6d(){const _0x53114a=['3333RzAocA','180YdggaK','3951405zgzlfB','2463248VhGfyW','15430zypDkC','5dZpRoV','1153495gkYkFx','6113ZGCDEA','208275FakRSo','54dxqfmM','6480920HLFVUe'];a196_0xfd6d=function(){return _0x53114a;};return a196_0xfd6d();}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|