@lovrabet/rabetbase-cli 2.5.9 → 2.5.10-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- 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.d.ts +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +0 -28
- 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/instant-api-policy/endpoints.d.ts +8 -0
- package/lib/core/instant-api-policy/endpoints.js +1 -0
- package/lib/core/kb-management-client.d.ts +3 -9
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +1 -4
- 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 +3 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase-dataset-generation/SKILL.md +2 -2
- package/skills/rabetbase-page-generation/SKILL.md +2 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a188_0x3b92(_0x29d4c2,_0x3f6fc7){_0x29d4c2=_0x29d4c2-0x1c6;const _0x41fcf4=a188_0x41fc();let _0x3b92c4=_0x41fcf4[_0x29d4c2];return _0x3b92c4;}const a188_0x48cdaf=a188_0x3b92;(function(_0x902492,_0x5720ae){const _0x520678=a188_0x3b92,_0x449d32=_0x902492();while(!![]){try{const _0x5bedb9=-parseInt(_0x520678(0x1cd))/0x1+-parseInt(_0x520678(0x1d1))/0x2*(-parseInt(_0x520678(0x1d2))/0x3)+parseInt(_0x520678(0x1cf))/0x4*(-parseInt(_0x520678(0x1c8))/0x5)+parseInt(_0x520678(0x1cc))/0x6*(-parseInt(_0x520678(0x1cb))/0x7)+-parseInt(_0x520678(0x1d6))/0x8*(parseInt(_0x520678(0x1ce))/0x9)+parseInt(_0x520678(0x1d4))/0xa+parseInt(_0x520678(0x1c7))/0xb;if(_0x5bedb9===_0x5720ae)break;else _0x449d32['push'](_0x449d32['shift']());}catch(_0x24c77e){_0x449d32['push'](_0x449d32['shift']());}}}(a188_0x41fc,0xcb143));function a188_0x41fc(){const _0x13bca1=['18008CtUPtV','\x20menu(s)\x20for\x20','10ybQueK','281811NPCowK','cookie','4479580gDaJTJ','read','561992vihRlW','\x20in\x20menu\x20host\x20','39650886dHJJWd','300fCMhSh','all','boundMenus','14rWWmDQ','1164624BLSmEq','1416403pchlFy','207ZAaRFd'];a188_0x41fc=function(){return _0x13bca1;};return a188_0x41fc();}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';export const menuSubappAssetsStatus={'service':'menu','command':'subapp-assets-status','description':'Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','risk':a188_0x48cdaf(0x1d5),'strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x260ce0){getSubappSelector(_0x260ce0);},async 'execute'(_0x41b471){const _0x474090=a188_0x48cdaf,{appCode:_0x1bc450,appName:_0x3a57fa}=getSubappSelector(_0x41b471),[_0x34750f,_0x35f2e1]=await Promise[_0x474090(0x1c9)]([getSmartAppRecord(_0x1bc450,_0x41b471[_0x474090(0x1d3)]),getOnlineMenuList(_0x1bc450,_0x41b471['cookie'])]),_0x2a20bf={'appCode':_0x1bc450,...buildSubappAssetsStatus(_0x34750f,_0x35f2e1,_0x3a57fa)};return{'ok':!![],'data':_0x2a20bf,'message':'Inspected\x20'+_0x2a20bf[_0x474090(0x1ca)]+_0x474090(0x1d0)+_0x3a57fa+_0x474090(0x1c6)+_0x1bc450+'.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a189_0x41ff96=a189_0x2418;function a189_0x2418(_0x3009c4,_0x314dea){_0x3009c4=_0x3009c4-0xc6;const _0x3c5880=a189_0x3c58();let _0x241805=_0x3c5880[_0x3009c4];return _0x241805;}(function(_0x516418,_0x1acd3d){const _0x3260fd=a189_0x2418,_0x28a330=_0x516418();while(!![]){try{const _0x2fd51e=parseInt(_0x3260fd(0x109))/0x1+-parseInt(_0x3260fd(0xca))/0x2*(parseInt(_0x3260fd(0x10b))/0x3)+-parseInt(_0x3260fd(0xf2))/0x4+-parseInt(_0x3260fd(0xd4))/0x5*(parseInt(_0x3260fd(0xd7))/0x6)+parseInt(_0x3260fd(0xdf))/0x7+parseInt(_0x3260fd(0x10d))/0x8*(parseInt(_0x3260fd(0xf3))/0x9)+-parseInt(_0x3260fd(0xf5))/0xa*(-parseInt(_0x3260fd(0x102))/0xb);if(_0x2fd51e===_0x1acd3d)break;else _0x28a330['push'](_0x28a330['shift']());}catch(_0xb1fa82){_0x28a330['push'](_0x28a330['shift']());}}}(a189_0x3c58,0x2824a));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set([a189_0x41ff96(0xe3),a189_0x41ff96(0xd8),a189_0x41ff96(0xd1),a189_0x41ff96(0xce),a189_0x41ff96(0xd9),a189_0x41ff96(0xe1),a189_0x41ff96(0x113),a189_0x41ff96(0x118),a189_0x41ff96(0xdb),'directDbEnabled']);function parseObject(_0x5c9686,_0x1d8a32){const _0x53c11e=a189_0x41ff96;let _0x11f7df=_0x5c9686;if(typeof _0x5c9686===_0x53c11e(0x111))try{_0x11f7df=JSON[_0x53c11e(0xe6)](_0x5c9686);}catch{throw CliErrors[_0x53c11e(0xfe)](_0x1d8a32+_0x53c11e(0xef));}if(!_0x11f7df||typeof _0x11f7df!==_0x53c11e(0x101)||Array[_0x53c11e(0xde)](_0x11f7df))throw CliErrors['validation'](_0x1d8a32+_0x53c11e(0xf9));return _0x11f7df;}function parseArray(_0x485ad0,_0x4aa441){const _0x93187=a189_0x41ff96;let _0x46e1b0;try{_0x46e1b0=JSON[_0x93187(0xe6)](_0x485ad0);}catch{throw CliErrors[_0x93187(0xfe)](_0x4aa441+_0x93187(0xef));}if(!Array[_0x93187(0xde)](_0x46e1b0))throw CliErrors[_0x93187(0xfe)](_0x4aa441+_0x93187(0x10e));return _0x46e1b0[_0x93187(0xe9)]((_0x40557a,_0x30fa17)=>parseObject(_0x40557a,_0x4aa441+'['+_0x30fa17+']'));}function validateResources(_0x142688){const _0x4f69c2=a189_0x41ff96;if(_0x142688[_0x4f69c2(0xf0)]===0x0)throw CliErrors[_0x4f69c2(0xfe)](_0x4f69c2(0x115));for(const [_0x307ce1,_0x4ae508]of _0x142688[_0x4f69c2(0x112)]()){if(typeof _0x4ae508!=='string')throw CliErrors[_0x4f69c2(0xfe)](_0x4f69c2(0xf1)+_0x307ce1+']\x20must\x20be\x20a\x20URL\x20string.');try{if(new URL(_0x4ae508)[_0x4f69c2(0xee)]!=='https:')throw new Error(_0x4f69c2(0xd6));}catch{throw CliErrors[_0x4f69c2(0xfe)]('resources['+_0x307ce1+']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.');}}if(new Set(_0x142688)[_0x4f69c2(0xf4)]!==_0x142688[_0x4f69c2(0xf0)]||!_0x142688[_0x4f69c2(0x106)](_0x134b7c=>/\.m?js(?:[?#]|$)/i['test'](_0x134b7c)))throw CliErrors['validation'](_0x4f69c2(0xcb));return _0x142688;}function prepare(_0x3bb4ff,_0x360fc9,_0xfdd92c){const _0x5f28c0=a189_0x41ff96;if(!Number['isSafeInteger'](_0x3bb4ff['id'])||(_0x3bb4ff['id']??0x0)<=0x0||typeof _0x3bb4ff[_0x5f28c0(0x114)]!==_0x5f28c0(0x111)||!_0x3bb4ff[_0x5f28c0(0x114)])throw CliErrors['validation']('App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.');const _0x8f00f8=parseObject(_0x3bb4ff[_0x5f28c0(0xdc)],_0x5f28c0(0x105)),_0x1cff6f=Object[_0x5f28c0(0x10a)](_0x8f00f8)[_0x5f28c0(0xf6)](_0x216867=>!KNOWN_EXTEND_KEYS[_0x5f28c0(0xeb)](_0x216867));if(_0x1cff6f['length'])throw CliErrors['validation'](_0x5f28c0(0xe0)+_0x1cff6f[_0x5f28c0(0xd5)](',\x20')+_0x5f28c0(0xe7));if(typeof _0x8f00f8[_0x5f28c0(0xce)]!==_0x5f28c0(0x111))throw CliErrors['validation']('app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.');const _0x432c56=parseArray(_0x8f00f8[_0x5f28c0(0xce)],_0x5f28c0(0xdd)),_0x2e559a=_0x432c56[_0x5f28c0(0xf6)](_0x5e25f0=>_0x5e25f0['appName']===_0x360fc9);if(_0x2e559a[_0x5f28c0(0xf0)]!==0x1)throw CliErrors[_0x5f28c0(0xfe)](_0x5f28c0(0x116)+_0x360fc9+_0x5f28c0(0xd0)+_0x2e559a[_0x5f28c0(0xf0)]+'.');const _0x2b39ce=_0x2e559a[0x0];if(typeof _0x2b39ce[_0x5f28c0(0xc6)]!=='string')throw CliErrors[_0x5f28c0(0xfe)](_0x5f28c0(0xcd));let _0x576c2d;try{_0x576c2d=JSON[_0x5f28c0(0xe6)](_0x2b39ce[_0x5f28c0(0xc6)]);}catch{throw CliErrors[_0x5f28c0(0xfe)](_0x5f28c0(0xe5));}if(!Array[_0x5f28c0(0xde)](_0x576c2d)||_0x576c2d[_0x5f28c0(0x106)](_0x3759cb=>typeof _0x3759cb!==_0x5f28c0(0x111)))throw CliErrors[_0x5f28c0(0xfe)](_0x5f28c0(0xfc));const _0xeddafd=_0x432c56[_0x5f28c0(0xe9)](_0x4aed43=>_0x4aed43===_0x2b39ce?{..._0x4aed43,'resources':JSON[_0x5f28c0(0x103)](_0xfdd92c)}:_0x4aed43),_0x1d0a4f={..._0x8f00f8,'assets':JSON[_0x5f28c0(0x103)](_0xeddafd)},_0x2c56e0=createHash('sha256')[_0x5f28c0(0xd2)](JSON[_0x5f28c0(0x103)]({'appCode':_0x3bb4ff[_0x5f28c0(0xd3)],'id':_0x3bb4ff['id'],'appPublishStatus':_0x3bb4ff['appPublishStatus'],'extend':_0x8f00f8,'appName':_0x360fc9,'resources':_0xfdd92c}))[_0x5f28c0(0xfb)]('hex');return{'before':_0x576c2d,'nextExtend':_0x1d0a4f,'expectedHash':_0x2c56e0,'unchanged':isDeepStrictEqual(_0x576c2d,_0xfdd92c)};}function a189_0x3c58(){const _0x38fd6b=['--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','verified\x20app.extend','protocol','\x20contains\x20invalid\x20JSON.','length','resources[','939360QbzUyl','225TbZJRp','size','4998710QfQQUx','filter','subapp-assets-update','unchanged','\x20must\x20be\x20a\x20JSON\x20object.','App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.','digest','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','str','validation','menu','expected-hash','object','11LBukhn','stringify','before','app.extend','some','\x20in\x20menu\x20host\x20','--resources\x20is\x20required.','39471OULqjZ','keys','473862uqnlfx',';\x20independent\x20deployment\x20not\x20verified.','36296GSDQJy','\x20must\x20be\x20a\x20JSON\x20array.','Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','apiError','string','entries','vipDeploy','appPublishStatus','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20','nextExtend','enableAutoSync','resources','trim','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.','test','2dwlwBo','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','assets','Would\x20update\x20shared\x20assets\x20for\x20',';\x20found\x20','accessKey','update','appCode','1190905aPRuEQ','join','not\x20HTTPS','6QKujfj','enableOpenApi','tenantColumn','JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs','directDbId','extend','app.extend.assets','isArray','998438hSnIXg','Unknown\x20app.extend\x20fields:\x20','enableSample','Updated\x20shared\x20resources\x20for\x20','skinColor','cookie','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','parse','.\x20Refusing\x20update.','expectedHash','map','Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','has'];a189_0x3c58=function(){return _0x38fd6b;};return a189_0x3c58();}function flags(_0x35b41a){const _0x38111d=a189_0x41ff96,{appCode:_0x1bc01e,appName:_0xcf6177}=getSubappSelector(_0x35b41a),_0x4fdee6=_0x35b41a[_0x38111d(0xfd)](_0x38111d(0xc6))[_0x38111d(0xc7)]();if(!_0x4fdee6)throw CliErrors[_0x38111d(0xfe)](_0x38111d(0x108));let _0x2b8c3a;try{_0x2b8c3a=JSON[_0x38111d(0xe6)](_0x4fdee6);}catch{throw CliErrors[_0x38111d(0xfe)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');}if(!Array[_0x38111d(0xde)](_0x2b8c3a))throw CliErrors[_0x38111d(0xfe)](_0x38111d(0xec));return{'appCode':_0x1bc01e,'appName':_0xcf6177,'resources':validateResources(_0x2b8c3a)};}export const menuSubappAssetsUpdate={'service':a189_0x41ff96(0xff),'command':a189_0x41ff96(0xf7),'description':a189_0x41ff96(0xea),'risk':'write','strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a189_0x41ff96(0xc6),'type':a189_0x41ff96(0x111),'required':!![],'description':a189_0x41ff96(0xda)},{'name':a189_0x41ff96(0x100),'type':a189_0x41ff96(0x111),'description':a189_0x41ff96(0x10f)}],async 'validate'(_0x89ffdf){flags(_0x89ffdf);},async 'dryRun'(_0xd91626){const _0x587747=a189_0x41ff96,{appCode:_0x41042a,appName:_0xaabb22,resources:_0x3299c0}=flags(_0xd91626),_0x239f7e=await getSmartAppRecord(_0x41042a,_0xd91626[_0x587747(0xe4)]),_0x3102ad=prepare(_0x239f7e,_0xaabb22,_0x3299c0);return{'method':'POST','url':'/smartapi/app/update','body':{'preview':{'appCode':_0x41042a,'appName':_0xaabb22,'before':_0x3102ad[_0x587747(0x104)],'after':_0x3299c0,'expectedHash':_0x3102ad[_0x587747(0xe8)],'unchanged':_0x3102ad['unchanged'],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x3102ad['unchanged']?_0x587747(0xc8):_0x587747(0xcf)+_0xaabb22+'.'};},async 'execute'(_0x33b7c5){const _0x2701fc=a189_0x41ff96,{appCode:_0x5ad594,appName:_0xf17923,resources:_0x38880d}=flags(_0x33b7c5),_0x5c94fc=_0x33b7c5[_0x2701fc(0xfd)](_0x2701fc(0x100))[_0x2701fc(0xc7)]();if(!/^[a-f0-9]{64}$/i[_0x2701fc(0xc9)](_0x5c94fc))throw CliErrors[_0x2701fc(0xfe)]('--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.');const _0x397570=await getSmartAppRecord(_0x5ad594,_0x33b7c5[_0x2701fc(0xe4)]),_0x27fbc3=prepare(_0x397570,_0xf17923,_0x38880d);if(_0x5c94fc!==_0x27fbc3[_0x2701fc(0xe8)])throw CliErrors['validation']('App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.');if(_0x27fbc3[_0x2701fc(0xf8)])return{'ok':!![],'data':{'appCode':_0x5ad594,'appName':_0xf17923,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x2701fc(0xcc)};await updateSmartAppRecord({'id':_0x397570['id'],'appCode':_0x5ad594,'appPublishStatus':_0x397570[_0x2701fc(0x114)],'extend':_0x27fbc3[_0x2701fc(0x117)]},_0x33b7c5[_0x2701fc(0xe4)]);const _0x4a3743=await getSmartAppRecord(_0x5ad594,_0x33b7c5[_0x2701fc(0xe4)]),_0x11c6b4=parseObject(_0x4a3743[_0x2701fc(0xdc)],_0x2701fc(0xed));if(_0x4a3743['id']!==_0x397570['id']||_0x4a3743['appPublishStatus']!==_0x397570['appPublishStatus']||!isDeepStrictEqual(_0x11c6b4,_0x27fbc3[_0x2701fc(0x117)]))throw CliErrors[_0x2701fc(0x110)](_0x2701fc(0xfa));return{'ok':!![],'data':{'appCode':_0x5ad594,'appName':_0xf17923,'updated':!![],'resources':_0x38880d,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x2701fc(0xe2)+_0xf17923+_0x2701fc(0x107)+_0x5ad594+_0x2701fc(0x10c)};}};
|
|
1
|
+
const a189_0x5993aa=a189_0x2e7d;(function(_0x12e37d,_0x20fbfb){const _0x22c894=a189_0x2e7d,_0x35080c=_0x12e37d();while(!![]){try{const _0x99c034=-parseInt(_0x22c894(0x148))/0x1+parseInt(_0x22c894(0x15b))/0x2*(-parseInt(_0x22c894(0x12b))/0x3)+parseInt(_0x22c894(0x13d))/0x4+parseInt(_0x22c894(0x12c))/0x5*(parseInt(_0x22c894(0x12d))/0x6)+parseInt(_0x22c894(0x164))/0x7*(parseInt(_0x22c894(0x169))/0x8)+parseInt(_0x22c894(0x141))/0x9*(-parseInt(_0x22c894(0x161))/0xa)+-parseInt(_0x22c894(0x13e))/0xb*(-parseInt(_0x22c894(0x146))/0xc);if(_0x99c034===_0x20fbfb)break;else _0x35080c['push'](_0x35080c['shift']());}catch(_0x426e2d){_0x35080c['push'](_0x35080c['shift']());}}}(a189_0x2995,0x510ea));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set([a189_0x5993aa(0x167),'enableOpenApi',a189_0x5993aa(0x165),'assets','tenantColumn',a189_0x5993aa(0x170),a189_0x5993aa(0x13a),a189_0x5993aa(0x130),'directDbId',a189_0x5993aa(0x131)]);function parseObject(_0x3b3c8c,_0x453639){const _0x1a354a=a189_0x5993aa;let _0x4411fe=_0x3b3c8c;if(typeof _0x3b3c8c===_0x1a354a(0x168))try{_0x4411fe=JSON[_0x1a354a(0x156)](_0x3b3c8c);}catch{throw CliErrors[_0x1a354a(0x135)](_0x453639+_0x1a354a(0x172));}if(!_0x4411fe||typeof _0x4411fe!==_0x1a354a(0x138)||Array[_0x1a354a(0x16c)](_0x4411fe))throw CliErrors['validation'](_0x453639+_0x1a354a(0x14a));return _0x4411fe;}function parseArray(_0x5576a8,_0xb14f0f){const _0x1b923f=a189_0x5993aa;let _0x2bdce2;try{_0x2bdce2=JSON[_0x1b923f(0x156)](_0x5576a8);}catch{throw CliErrors[_0x1b923f(0x135)](_0xb14f0f+_0x1b923f(0x172));}if(!Array['isArray'](_0x2bdce2))throw CliErrors[_0x1b923f(0x135)](_0xb14f0f+_0x1b923f(0x14f));return _0x2bdce2[_0x1b923f(0x16f)]((_0xf21589,_0x1c130b)=>parseObject(_0xf21589,_0xb14f0f+'['+_0x1c130b+']'));}function validateResources(_0x59e78f){const _0x295b58=a189_0x5993aa;if(_0x59e78f[_0x295b58(0x143)]===0x0)throw CliErrors[_0x295b58(0x135)](_0x295b58(0x140));for(const [_0x26dfd1,_0x32f32b]of _0x59e78f[_0x295b58(0x14d)]()){if(typeof _0x32f32b!=='string')throw CliErrors[_0x295b58(0x135)](_0x295b58(0x144)+_0x26dfd1+_0x295b58(0x14b));try{if(new URL(_0x32f32b)[_0x295b58(0x12f)]!==_0x295b58(0x162))throw new Error('not\x20HTTPS');}catch{throw CliErrors['validation'](_0x295b58(0x144)+_0x26dfd1+_0x295b58(0x137));}}if(new Set(_0x59e78f)[_0x295b58(0x171)]!==_0x59e78f[_0x295b58(0x143)]||!_0x59e78f[_0x295b58(0x16a)](_0x404fdd=>/\.m?js(?:[?#]|$)/i[_0x295b58(0x163)](_0x404fdd)))throw CliErrors['validation'](_0x295b58(0x126));return _0x59e78f;}function a189_0x2995(){const _0x5ecc7b=['write','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','assets','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','apiError','filter','1799109rojKbs','688030JplwRM','12abxsoM','resources','protocol','enableAutoSync','directDbEnabled','join','App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.','nextExtend','validation','isSafeInteger',']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.','object','before','vipDeploy','\x20in\x20menu\x20host\x20','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','235532HsALlS','1199704QoQmdl','unchanged','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','9XCPPyR','has','length','resources[','app.extend.assets','96ZgrvfX','digest','428715PCXOGQ','subapp-assets-update','\x20must\x20be\x20a\x20JSON\x20object.',']\x20must\x20be\x20a\x20URL\x20string.','expectedHash','entries','cookie','\x20must\x20be\x20a\x20JSON\x20array.','appName','hex','appCode','trim','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','.\x20Refusing\x20update.','parse','app.extend','update','--resources\x20is\x20required.','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','2xUGKSx','Would\x20update\x20shared\x20assets\x20for\x20','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','expected-hash','stringify','sha256','2340790zUdEHh','https:','test','175FvubSs','accessKey','appPublishStatus','skinColor','string','124128bYEeOx','some','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20','isArray','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.','extend','map','enableSample','size','\x20contains\x20invalid\x20JSON.'];a189_0x2995=function(){return _0x5ecc7b;};return a189_0x2995();}function a189_0x2e7d(_0x47cae6,_0x318f93){_0x47cae6=_0x47cae6-0x124;const _0x2995a1=a189_0x2995();let _0x2e7d06=_0x2995a1[_0x47cae6];return _0x2e7d06;}function prepare(_0x428708,_0x25f859,_0x2372f9){const _0x249f15=a189_0x5993aa;if(!Number[_0x249f15(0x136)](_0x428708['id'])||(_0x428708['id']??0x0)<=0x0||typeof _0x428708[_0x249f15(0x166)]!==_0x249f15(0x168)||!_0x428708[_0x249f15(0x166)])throw CliErrors[_0x249f15(0x135)](_0x249f15(0x174));const _0x15df47=parseObject(_0x428708['extend'],_0x249f15(0x157)),_0x5b054f=Object['keys'](_0x15df47)[_0x249f15(0x12a)](_0x4f9626=>!KNOWN_EXTEND_KEYS[_0x249f15(0x142)](_0x4f9626));if(_0x5b054f['length'])throw CliErrors['validation']('Unknown\x20app.extend\x20fields:\x20'+_0x5b054f[_0x249f15(0x132)](',\x20')+_0x249f15(0x155));if(typeof _0x15df47[_0x249f15(0x175)]!==_0x249f15(0x168))throw CliErrors[_0x249f15(0x135)](_0x249f15(0x15a));const _0x1c81df=parseArray(_0x15df47[_0x249f15(0x175)],_0x249f15(0x145)),_0x14c2c3=_0x1c81df[_0x249f15(0x12a)](_0x428007=>_0x428007[_0x249f15(0x150)]===_0x25f859);if(_0x14c2c3[_0x249f15(0x143)]!==0x1)throw CliErrors['validation'](_0x249f15(0x16b)+_0x25f859+';\x20found\x20'+_0x14c2c3['length']+'.');const _0x13c4d6=_0x14c2c3[0x0];if(typeof _0x13c4d6[_0x249f15(0x12e)]!==_0x249f15(0x168))throw CliErrors[_0x249f15(0x135)](_0x249f15(0x128));let _0x426d94;try{_0x426d94=JSON['parse'](_0x13c4d6['resources']);}catch{throw CliErrors['validation'](_0x249f15(0x124));}if(!Array[_0x249f15(0x16c)](_0x426d94)||_0x426d94[_0x249f15(0x16a)](_0x3d2eaa=>typeof _0x3d2eaa!==_0x249f15(0x168)))throw CliErrors[_0x249f15(0x135)](_0x249f15(0x154));const _0x248efc=_0x1c81df[_0x249f15(0x16f)](_0x2db5f9=>_0x2db5f9===_0x13c4d6?{..._0x2db5f9,'resources':JSON[_0x249f15(0x15f)](_0x2372f9)}:_0x2db5f9),_0x587641={..._0x15df47,'assets':JSON[_0x249f15(0x15f)](_0x248efc)},_0x252701=createHash(_0x249f15(0x160))[_0x249f15(0x158)](JSON[_0x249f15(0x15f)]({'appCode':_0x428708[_0x249f15(0x152)],'id':_0x428708['id'],'appPublishStatus':_0x428708[_0x249f15(0x166)],'extend':_0x15df47,'appName':_0x25f859,'resources':_0x2372f9}))[_0x249f15(0x147)](_0x249f15(0x151));return{'before':_0x426d94,'nextExtend':_0x587641,'expectedHash':_0x252701,'unchanged':isDeepStrictEqual(_0x426d94,_0x2372f9)};}function flags(_0x2d1e74){const _0x462451=a189_0x5993aa,{appCode:_0xbe64c,appName:_0x48f354}=getSubappSelector(_0x2d1e74),_0x2d7447=_0x2d1e74['str'](_0x462451(0x12e))[_0x462451(0x153)]();if(!_0x2d7447)throw CliErrors[_0x462451(0x135)](_0x462451(0x159));let _0x4a210e;try{_0x4a210e=JSON[_0x462451(0x156)](_0x2d7447);}catch{throw CliErrors[_0x462451(0x135)](_0x462451(0x15d));}if(!Array[_0x462451(0x16c)](_0x4a210e))throw CliErrors[_0x462451(0x135)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');return{'appCode':_0xbe64c,'appName':_0x48f354,'resources':validateResources(_0x4a210e)};}export const menuSubappAssetsUpdate={'service':'menu','command':a189_0x5993aa(0x149),'description':'Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','risk':a189_0x5993aa(0x173),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a189_0x5993aa(0x12e),'type':a189_0x5993aa(0x168),'required':!![],'description':a189_0x5993aa(0x125)},{'name':a189_0x5993aa(0x15e),'type':'string','description':'Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes'}],async 'validate'(_0x15adc4){flags(_0x15adc4);},async 'dryRun'(_0x93404){const _0x41ae2c=a189_0x5993aa,{appCode:_0x352e0f,appName:_0x52f378,resources:_0x270854}=flags(_0x93404),_0x3262ab=await getSmartAppRecord(_0x352e0f,_0x93404['cookie']),_0x26c00d=prepare(_0x3262ab,_0x52f378,_0x270854);return{'method':'POST','url':'/smartapi/app/update','body':{'preview':{'appCode':_0x352e0f,'appName':_0x52f378,'before':_0x26c00d[_0x41ae2c(0x139)],'after':_0x270854,'expectedHash':_0x26c00d[_0x41ae2c(0x14c)],'unchanged':_0x26c00d[_0x41ae2c(0x13f)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x26c00d[_0x41ae2c(0x13f)]?_0x41ae2c(0x16d):_0x41ae2c(0x15c)+_0x52f378+'.'};},async 'execute'(_0x2a2d61){const _0x153e99=a189_0x5993aa,{appCode:_0x261419,appName:_0x1595d1,resources:_0x1c5f1a}=flags(_0x2a2d61),_0x577e15=_0x2a2d61['str'](_0x153e99(0x15e))[_0x153e99(0x153)]();if(!/^[a-f0-9]{64}$/i[_0x153e99(0x163)](_0x577e15))throw CliErrors[_0x153e99(0x135)]('--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.');const _0xe47b2b=await getSmartAppRecord(_0x261419,_0x2a2d61[_0x153e99(0x14e)]),_0x3f7bab=prepare(_0xe47b2b,_0x1595d1,_0x1c5f1a);if(_0x577e15!==_0x3f7bab['expectedHash'])throw CliErrors[_0x153e99(0x135)](_0x153e99(0x133));if(_0x3f7bab[_0x153e99(0x13f)])return{'ok':!![],'data':{'appCode':_0x261419,'appName':_0x1595d1,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x153e99(0x13c)};await updateSmartAppRecord({'id':_0xe47b2b['id'],'appCode':_0x261419,'appPublishStatus':_0xe47b2b[_0x153e99(0x166)],'extend':_0x3f7bab[_0x153e99(0x134)]},_0x2a2d61['cookie']);const _0x145f78=await getSmartAppRecord(_0x261419,_0x2a2d61['cookie']),_0x990e45=parseObject(_0x145f78[_0x153e99(0x16e)],'verified\x20app.extend');if(_0x145f78['id']!==_0xe47b2b['id']||_0x145f78[_0x153e99(0x166)]!==_0xe47b2b[_0x153e99(0x166)]||!isDeepStrictEqual(_0x990e45,_0x3f7bab[_0x153e99(0x134)]))throw CliErrors[_0x153e99(0x129)](_0x153e99(0x127));return{'ok':!![],'data':{'appCode':_0x261419,'appName':_0x1595d1,'updated':!![],'resources':_0x1c5f1a,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':'Updated\x20shared\x20resources\x20for\x20'+_0x1595d1+_0x153e99(0x13b)+_0x261419+';\x20independent\x20deployment\x20not\x20verified.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a190_0x3ed1cb=a190_0xfe40;(function(_0x4b4323,_0x4c59a7){const _0x3dd4b2=a190_0xfe40,_0x4cd539=_0x4b4323();while(!![]){try{const _0x135850=parseInt(_0x3dd4b2(0x1d2))/0x1*(-parseInt(_0x3dd4b2(0x1b7))/0x2)+parseInt(_0x3dd4b2(0x1a3))/0x3*(parseInt(_0x3dd4b2(0x1e8))/0x4)+-parseInt(_0x3dd4b2(0x1ad))/0x5+parseInt(_0x3dd4b2(0x1e2))/0x6*(-parseInt(_0x3dd4b2(0x1c3))/0x7)+-parseInt(_0x3dd4b2(0x1ab))/0x8*(parseInt(_0x3dd4b2(0x1c0))/0x9)+-parseInt(_0x3dd4b2(0x1e0))/0xa+parseInt(_0x3dd4b2(0x1a8))/0xb*(parseInt(_0x3dd4b2(0x1db))/0xc);if(_0x135850===_0x4c59a7)break;else _0x4cd539['push'](_0x4cd539['shift']());}catch(_0x56b23d){_0x4cd539['push'](_0x4cd539['shift']());}}}(a190_0x29b3,0xc5d65));import a190_0xa3923c from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';function a190_0xfe40(_0x3cd03b,_0x5aee7b){_0x3cd03b=_0x3cd03b-0x1a1;const _0x29b34d=a190_0x29b3();let _0xfe408c=_0x29b34d[_0x3cd03b];return _0xfe408c;}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_0x29b3(){const _0x29f4b2=['\x20menu(s)\x20created','\x20\x20Continue\x20with\x20creation?','map','appcode','Online\x20menu\x20list\x20fetched','onlineMenuList','1DIsHQF','cyan','localPages','\x20menu(s)','gray','\x20failed.','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','Menu\x20sync\x20skipped','34908oyxUVV','Failed\x20to\x20fetch\x20online\x20menu\x20list','Menu\x20sync\x20completed:\x20','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','Would\x20create\x20','3723190RhSeed','message','2373870WhEuqj','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','str','\x20menu(s)\x20bound\x20to\x20','split','paths','2044HfDKYC','onlinePaths','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','params','trim','8610ctveem','sync','targetPages','\x20\x20Cancelled.','size','8668nBrjBf','\x20page(s)','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','32AyCgZr','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','2498205vENPoR','filter','Menu\x20creation\x20failed','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','length','skipped','POST','cookie','\x20\x20Create\x20','string','466136vrHJCZ','\x20local\x20microfrontend\x20menu(s).','\x20and\x20CSS:\x20','selectedAppName','write','yes','appCode','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','rawFlags','3257658xLTpvZ','validation','created','7CoLVWZ','flag','appName','\x20\x20✓\x20Selected:\x20','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','yellow','boolean','✓\x20Menu\x20sync\x20completed:\x20','jsUrl'];a190_0x29b3=function(){return _0x29f4b2;};return a190_0x29b3();}import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':'menu','command':a190_0x3ed1cb(0x1a4),'description':'Register\x20local\x20pages\x20as\x20platform\x20menus','risk':a190_0x3ed1cb(0x1bb),'flags':[{'name':a190_0x3ed1cb(0x1a1),'type':'string','description':'Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20'+'JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.'},{'name':a190_0x3ed1cb(0x1e7),'type':a190_0x3ed1cb(0x1b6),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':a190_0x3ed1cb(0x1bc),'type':a190_0x3ed1cb(0x1c9),'description':a190_0x3ed1cb(0x1d9)}],async 'dryRun'(_0x577485){const _0x5c1047=a190_0x3ed1cb;ensureRunnableContext(_0x577485[_0x5c1047(0x1bf)],_0x577485[_0x5c1047(0x1ba)]);const _0x376ef9=await runMenuSyncCore(_0x577485[_0x5c1047(0x1bd)],_0x577485[_0x5c1047(0x1b4)],parsePaths(_0x577485['str'](_0x5c1047(0x1e7))),_0x577485[_0x5c1047(0x1e4)](_0x5c1047(0x1a1)),{'dryRun':!![]});return{'method':_0x5c1047(0x1b3),'url':'/smartapi/menu/create','body':_0x376ef9,'description':_0x376ef9['skipped']?_0x5c1047(0x1de):_0x5c1047(0x1df)+_0x376ef9[_0x5c1047(0x1a5)]['length']+_0x5c1047(0x1b8)};},async 'execute'(_0x305109){const _0x5125ff=a190_0x3ed1cb;ensureRunnableContext(_0x305109[_0x5125ff(0x1bf)],_0x305109[_0x5125ff(0x1ba)]);const _0x588a2a=_0x305109[_0x5125ff(0x1c4)](_0x5125ff(0x1bc)),_0x17c51f=_0x305109['str'](_0x5125ff(0x1a1)),_0x1fdbb5=parsePaths(_0x305109[_0x5125ff(0x1e4)](_0x5125ff(0x1e7))),_0x5dc527=parseMenuSyncParams(_0x17c51f);if(_0x588a2a){const _0x29c02e=await runMenuSyncCore(_0x305109[_0x5125ff(0x1bd)],_0x305109[_0x5125ff(0x1b4)],_0x1fdbb5,_0x17c51f);if(_0x29c02e[_0x5125ff(0x1b2)]){const _0x15d906=getLocalPages();_0x15d906['length']===0x0?writeCliSideChannelLine(_0x5125ff(0x1b0)):writeCliSideChannelLine(_0x5125ff(0x1e3));}else writeCliSideChannelLine(_0x5125ff(0x1ca)+_0x29c02e[_0x5125ff(0x1c2)]+_0x5125ff(0x1cc));return{'ok':!![],'data':_0x29c02e,'message':_0x29c02e['skipped']?_0x5125ff(0x1da):_0x5125ff(0x1dd)+_0x29c02e[_0x5125ff(0x1c2)]+'\x20created.'};}if(_0x1fdbb5['length']>0x0)throw CliErrors[_0x5125ff(0x1c1)](_0x5125ff(0x1ea),_0x5125ff(0x1ac));if(!isInteractive()&&_0x17c51f)throw CliErrors[_0x5125ff(0x1c1)](_0x5125ff(0x1d8),_0x5125ff(0x1ac));requireInteractive(),writeCliSideChannelLine(_0x5125ff(0x1be));const _0x5a103d=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x1dc110,_0x5b8396,_0x569a15;try{const _0x36db74=await fetchMenuData(_0x305109[_0x5125ff(0x1bd)],_0x305109[_0x5125ff(0x1b4)]);_0x1dc110=_0x36db74[_0x5125ff(0x1d4)],_0x5b8396=_0x36db74[_0x5125ff(0x1e9)],_0x569a15=_0x36db74[_0x5125ff(0x1d1)],stopSpinner(_0x5a103d,_0x5125ff(0x1d0),!![]);}catch(_0x7875de){stopSpinner(_0x5a103d,_0x5125ff(0x1dc),![]);throw CliErrors[_0x5125ff(0x1c1)](_0x7875de instanceof Error?_0x7875de['message']:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x1dc110[_0x5125ff(0x1b1)]===0x0)return writeCliSideChannelLine(a190_0xa3923c[_0x5125ff(0x1c8)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x333e37=buildCompareRows(_0x1dc110,_0x5b8396);writeCliSideChannelLine(renderCompareTable(_0x333e37)),writeCliSideChannelLine('');const _0x48d176=await selectPages(_0x1dc110,_0x5b8396);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0xa3923c[_0x5125ff(0x1d3)](_0x5125ff(0x1c6)+_0x48d176[_0x5125ff(0x1b1)]+_0x5125ff(0x1a9)));const _0x2277ae=_0x5dc527[_0x5125ff(0x1cb)]&&_0x5dc527['cssUrl'];if(!_0x2277ae){writeCliSideChannelLine(renderSyncSummary(_0x48d176,_0x5b8396[_0x5125ff(0x1a7)]>0x0));const _0x59bfec=await askConfirm(_0x5125ff(0x1cd));if(!_0x59bfec)return writeCliSideChannelLine(a190_0xa3923c[_0x5125ff(0x1d6)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x2c3fc5=_0x5dc527[_0x5125ff(0x1cb)],_0x427082=_0x5dc527['cssUrl'];!_0x2c3fc5&&!_0x5dc527[_0x5125ff(0x1c5)]&&(_0x2c3fc5=await askJsUrl());!_0x427082&&!_0x5dc527[_0x5125ff(0x1c5)]&&(_0x427082=await askCssUrl());const _0x3c0dc3=await askConfirm(_0x5dc527[_0x5125ff(0x1c5)]?_0x5125ff(0x1b5)+_0x48d176[_0x5125ff(0x1b1)]+_0x5125ff(0x1e5)+_0x5dc527[_0x5125ff(0x1c5)]+'?':_0x5125ff(0x1b5)+_0x48d176['length']+'\x20menu(s)\x20with\x20JS:\x20'+_0x2c3fc5+_0x5125ff(0x1b9)+_0x427082+'?');if(!_0x3c0dc3)return writeCliSideChannelLine(a190_0xa3923c[_0x5125ff(0x1d6)](_0x5125ff(0x1a6))),{'ok':!![]};const _0x117864=[_0x2c3fc5,_0x427082][_0x5125ff(0x1ae)](_0x5be1fc=>Boolean(_0x5be1fc));_0x5dc527[_0x5125ff(0x1c5)]&&_0x117864[_0x5125ff(0x1b1)]===0x0&&await assertSharedResourcesConfigured(_0x305109[_0x5125ff(0x1bd)],_0x305109[_0x5125ff(0x1b4)],_0x5dc527['appName']);const _0x3b924d=startSpinner('Creating\x20'+_0x48d176[_0x5125ff(0x1b1)]+'\x20menu(s)...');try{const _0x3e3658=_0x48d176[_0x5125ff(0x1ce)](_0x3c9ef2=>resolvePage(_0x3c9ef2,_0x5dc527,_0x569a15)),_0x51a354=await doCreateMenus(_0x305109[_0x5125ff(0x1bd)],_0x305109['cookie'],_0x3e3658,_0x117864,_0x5dc527[_0x5125ff(0x1c5)]?{'appName':_0x5dc527['appName']}:undefined);return stopSpinner(_0x3b924d,'Created\x20'+_0x51a354[_0x5125ff(0x1c2)]+_0x5125ff(0x1d5),!![]),{'ok':!![],'data':_0x51a354,'message':_0x5125ff(0x1dd)+_0x51a354[_0x5125ff(0x1c2)]+'\x20created,\x20'+_0x51a354['failed']+_0x5125ff(0x1d7)};}catch(_0x3b5234){stopSpinner(_0x3b924d,_0x5125ff(0x1af),![]);throw CliErrors['validation'](_0x3b5234 instanceof Error?_0x3b5234[_0x5125ff(0x1e1)]:_0x5125ff(0x1af));}}};function ensureRunnableContext(_0x4e789e,_0x239fe6){const _0x11fb14=a190_0x3ed1cb,_0x1a7b7c=_0x4e789e[_0x11fb14(0x1cf)]?String(_0x4e789e[_0x11fb14(0x1cf)])[_0x11fb14(0x1a2)]():'';if(!isInProject()&&!_0x239fe6&&!_0x1a7b7c)throw CliErrors['validation'](_0x11fb14(0x1c7)+_0x11fb14(0x1aa));}function parsePaths(_0x2b1fed){const _0x1baa46=a190_0x3ed1cb;return[...new Set(_0x2b1fed[_0x1baa46(0x1e6)](',')['map'](_0x56a25f=>_0x56a25f['trim']())[_0x1baa46(0x1ae)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a191_0x785c83=a191_0x3324;(function(_0x5035e7,_0x365cc4){const _0x41c38f=a191_0x3324,_0x2ffc81=_0x5035e7();while(!![]){try{const _0x5c10b3=-parseInt(_0x41c38f(0x1b0))/0x1*(parseInt(_0x41c38f(0x16a))/0x2)+parseInt(_0x41c38f(0x15e))/0x3+-parseInt(_0x41c38f(0x15c))/0x4+parseInt(_0x41c38f(0x168))/0x5*(parseInt(_0x41c38f(0x17d))/0x6)+-parseInt(_0x41c38f(0x192))/0x7*(parseInt(_0x41c38f(0x170))/0x8)+parseInt(_0x41c38f(0x191))/0x9*(-parseInt(_0x41c38f(0x171))/0xa)+-parseInt(_0x41c38f(0x160))/0xb*(-parseInt(_0x41c38f(0x194))/0xc);if(_0x5c10b3===_0x365cc4)break;else _0x2ffc81['push'](_0x2ffc81['shift']());}catch(_0x26bcc2){_0x2ffc81['push'](_0x2ffc81['shift']());}}}(a191_0xac21,0xee26e));function a191_0xac21(){const _0x3886f8=['493218MkBxuI','map','23257289YjgCYx','boolean','write','expectVisible','targets','Menu\x20id\x20selector(s)\x20not\x20found:\x20','menu_permission_denied','menuIds','5SeJSAt','Response\x20was\x20lost\x20and\x20menu\x20','2dkiZcO','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','trim','byId','pageId','Menu\x20path\x20selector\x20not\x20found:\x20','147552FAbMUL','211160bCORAb','update\x20menu\x20visibility','datasetId','resourcesValid','beforeById','expected-count','expectedCount','childrenIds','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','appCode','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','2192952FZdcPn','sort','menus','code','path','verify\x20menu\x20visibility\x20update','\x20skipped,\x20','pageType','menu','\x20changed\x20unexpectedly.','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','str','Requested\x20menu\x20visibility','stringify','Updated\x20visibility\x20for\x20','flagMissing','Response\x20was\x20lost\x20for\x20menu\x20','Menu\x20','validation','update-menu-visibility','414BzXwNs','168RgQEgu','parentId','24HHAnqM','verification','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','label','body','num','menu_verification_failed','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','isArray','visible','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','menu_selector_not_found','false','expect-visible','updated','isSafeInteger','length','depth','\x20unchanged\x20menu(s).','update-recovery','some','rawFlags','failed','\x20must\x20be\x20true\x20or\x20false.','resources','\x20menu(s);\x20skipped\x20','Selected\x20','457609aIQGKi','join','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','menu_expected_count_mismatch','plan','number','true','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','filter','push','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','has','menu_selector_ambiguous','get','modelType','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','message','POST','hash','type','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','string','cookie','before','url','Would\x20update\x20visibility\x20for\x20','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','requestedVisible','Menu\x20visibility\x20update\x20completed:\x20','values','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','warnings','visibility-update','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Final\x20menu\x20visibility\x20readback\x20failed.','datasetCode','\x20menu(s);\x20skip\x20','paths','set','/smartapi/menu/update','plannedActions','7645700xCEegR','update'];a191_0xac21=function(){return _0x3886f8;};return a191_0xac21();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x785c83(0x144),'path':a191_0x785c83(0x15a)}];export const menuVisibilityUpdate={'service':a191_0x785c83(0x185),'command':a191_0x785c83(0x153),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':a191_0x785c83(0x162),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':a191_0x785c83(0x148),'description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':a191_0x785c83(0x158),'type':'string','description':a191_0x785c83(0x196)},{'name':a191_0x785c83(0x19e),'type':'boolean','required':!![],'description':a191_0x785c83(0x189)},{'name':a191_0x785c83(0x1a2),'type':a191_0x785c83(0x161),'description':a191_0x785c83(0x17a)},{'name':'expected-count','type':a191_0x785c83(0x1b5),'description':a191_0x785c83(0x1bb)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5b254e){parseInput(_0x5b254e);},async 'dryRun'(_0x54d03d){const _0x21cd2c=a191_0x785c83,_0x34799e=await buildPlan(_0x54d03d,!![]),_0x57fc7d=_0x34799e[_0x21cd2c(0x1b4)]['plannedActions']?.['length']??0x0,_0x1afc7b=_0x34799e[_0x21cd2c(0x1b4)][_0x21cd2c(0x164)][_0x21cd2c(0x1a5)]-_0x57fc7d;return menuDryRunResult(_0x34799e['plan'],{'method':_0x21cd2c(0x144),'url':'/smartapi/menu/update','body':{'updates':_0x34799e[_0x21cd2c(0x1b4)][_0x21cd2c(0x15b)]?.['map'](_0x3302bd=>_0x3302bd[_0x21cd2c(0x199)])??[]},'description':_0x21cd2c(0x14c)+_0x57fc7d+_0x21cd2c(0x157)+_0x1afc7b+_0x21cd2c(0x1a7)});},async 'execute'(_0x148cc5){const _0xf5345f=a191_0x785c83,_0x4e2de3=await buildPlan(_0x148cc5,![]);await recheckMutationSnapshot(_0x148cc5,_0x4e2de3[_0xf5345f(0x1b4)],_0xf5345f(0x172));const _0x505e98=[],_0x3bf78d=[],_0x1a7b29=[];for(const _0x32b076 of _0x4e2de3[_0xf5345f(0x1b4)][_0xf5345f(0x164)]){if(_0x32b076[_0xf5345f(0x14a)]['visible']===_0x4e2de3[_0xf5345f(0x1b4)][_0xf5345f(0x14e)]){_0x505e98[_0xf5345f(0x1b9)]({'id':_0x32b076['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x148cc5[_0xf5345f(0x17b)],_0x148cc5[_0xf5345f(0x149)],{'id':_0x32b076['id'],'visible':_0x4e2de3['plan'][_0xf5345f(0x14e)]}),_0x505e98[_0xf5345f(0x1b9)]({'id':_0x32b076['id'],'updated':!![],'skipped':![]});}catch(_0x7a978e){const _0x17e560=mapMenuApiError(_0x7a978e,'update\x20visibility\x20for',_0x32b076['id']);if(isMenuResponseLoss(_0x7a978e)&&_0x17e560[_0xf5345f(0x180)]!==_0xf5345f(0x166)){_0x1a7b29[_0xf5345f(0x1b9)](_0x32b076['id']);continue;}_0x3bf78d[_0xf5345f(0x1b9)]({'id':_0x32b076['id'],'stage':_0xf5345f(0x15d),'code':_0x17e560[_0xf5345f(0x180)],'message':_0x17e560[_0xf5345f(0x143)]});}}let _0xa52ab7;try{_0xa52ab7=await fetchMenuSnapshot(_0x148cc5[_0xf5345f(0x17b)],_0x148cc5['cookie']);}catch(_0x49ae4e){const _0x3d4e0b=describeMenuErrorCause(_0x49ae4e,_0xf5345f(0x182)),_0x308759=_0x1a7b29[_0xf5345f(0x15f)](_0x59f889=>({'id':_0x59f889,'stage':_0xf5345f(0x1a8),'code':_0xf5345f(0x19b),'message':_0xf5345f(0x18d)+_0x59f889+_0xf5345f(0x142),'requestedStateConfirmed':![],'recovered':![]})),_0x106404={'stage':_0xf5345f(0x195),'code':_0xf5345f(0x19b),'message':_0xf5345f(0x155),'targetIds':_0x4e2de3[_0xf5345f(0x1b4)][_0xf5345f(0x164)][_0xf5345f(0x15f)](_0x5a4b97=>_0x5a4b97['id']),'requestedStateConfirmed':![],..._0x3d4e0b};throw menuFailure(asVerificationError(_0x49ae4e,_0xf5345f(0x16b)),_0x4e2de3[_0xf5345f(0x1b4)],{'stage':_0xf5345f(0x195),'succeeded':_0x505e98,'failedRecords':[..._0x3bf78d,..._0x308759,_0x106404],'warnings':[_0xf5345f(0x17c)],'verification':{'status':_0xf5345f(0x1ab),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x4fac0a=[];for(const _0x39256d of _0x505e98){const _0x22c35b=Number(_0x39256d['id']),_0x31508d=_0x4e2de3[_0xf5345f(0x175)][_0xf5345f(0x140)](_0x22c35b),_0x386242=_0xa52ab7[_0xf5345f(0x16d)][_0xf5345f(0x140)](_0x22c35b);try{verifyVisibilityUpdate(_0x31508d,_0x386242,_0x4e2de3[_0xf5345f(0x1b4)]['requestedVisible']);}catch(_0x4a7230){const _0x151444=asVerificationError(_0x4a7230,'Menu\x20'+_0x22c35b+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x4fac0a[_0xf5345f(0x1b9)]({'id':_0x22c35b,'stage':_0xf5345f(0x195),'code':_0x151444[_0xf5345f(0x180)],'message':_0x151444[_0xf5345f(0x143)],'requestedStateConfirmed':![]});}}for(const _0x2cde9e of _0x1a7b29){const _0xd59d33=_0x4e2de3[_0xf5345f(0x175)]['get'](_0x2cde9e),_0x24b4d0=_0xa52ab7['byId'][_0xf5345f(0x140)](_0x2cde9e);try{verifyVisibilityUpdate(_0xd59d33,_0x24b4d0,_0x4e2de3[_0xf5345f(0x1b4)]['requestedVisible']),_0x505e98[_0xf5345f(0x1b9)]({'id':_0x2cde9e,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x45eb8c){const _0x2e99f3=asVerificationError(_0x45eb8c,_0xf5345f(0x169)+_0x2cde9e+_0xf5345f(0x179));_0x4fac0a[_0xf5345f(0x1b9)]({'id':_0x2cde9e,'stage':_0xf5345f(0x1a8),'code':_0x2e99f3['code'],'message':_0x2e99f3[_0xf5345f(0x143)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x4fac0a[_0xf5345f(0x1a5)]>0x0){const _0x4d7aaf=_0x4fac0a[_0xf5345f(0x15f)](_0x541f10=>Number(_0x541f10['id'])),_0x2bfdff=_0x505e98[_0xf5345f(0x1b8)](_0x1d4ba6=>_0x1d4ba6['recovered']===!![])[_0xf5345f(0x1a5)],_0x5312d9=menuError(_0xf5345f(0x19b),_0xf5345f(0x1b2)+_0x4d7aaf['join'](',\x20')+'.',_0xf5345f(0x147));throw menuFailure(_0x5312d9,_0x4e2de3[_0xf5345f(0x1b4)],{'stage':_0xf5345f(0x195),'succeeded':_0x505e98,'failedRecords':[..._0x3bf78d,..._0x4fac0a],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0xf5345f(0x1ab),..._0x4d7aaf[_0xf5345f(0x1a5)]===0x1?{'targetId':_0x4d7aaf[0x0]}:{'targetIds':_0x4d7aaf},'recoveredCount':_0x2bfdff,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x237c26=_0x505e98[_0xf5345f(0x1b8)](_0x318ef5=>_0x318ef5[_0xf5345f(0x1a3)]===!![])[_0xf5345f(0x1a5)],_0x410f3c=_0x505e98[_0xf5345f(0x1a5)]-_0x237c26,_0x22b7b3={..._0x4e2de3[_0xf5345f(0x1b4)],'succeeded':_0x505e98,'failed':_0x3bf78d,'warnings':_0x3bf78d[_0xf5345f(0x1a5)]>0x0?[..._0x4e2de3['plan'][_0xf5345f(0x152)],_0xf5345f(0x187)]:_0x4e2de3[_0xf5345f(0x1b4)][_0xf5345f(0x152)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0xa52ab7[_0xf5345f(0x145)],'matchesRequestedState':_0x3bf78d[_0xf5345f(0x1a5)]===0x0,'recoveredCount':_0x1a7b29['length']}};return{'ok':_0x3bf78d[_0xf5345f(0x1a5)]===0x0,'data':_0x22b7b3,'message':_0x3bf78d[_0xf5345f(0x1a5)]===0x0?_0xf5345f(0x18b)+_0x237c26+_0xf5345f(0x1ae)+_0x410f3c+_0xf5345f(0x1a7):_0xf5345f(0x14f)+_0x237c26+'\x20updated,\x20'+_0x410f3c+_0xf5345f(0x183)+_0x3bf78d['length']+'\x20failed.'};}};function parseInput(_0x2b8dc5){const _0x29f55b=a191_0x785c83,_0x2bc630=parseMenuIds(_0x2b8dc5['str']('menu-ids')),_0x22ac09=parseCsv(_0x2b8dc5[_0x29f55b(0x188)](_0x29f55b(0x158)));if(_0x2bc630['length']===0x0&&_0x22ac09[_0x29f55b(0x1a5)]===0x0)throw CliErrors['validation'](_0x29f55b(0x19f));const _0x452967=parseBooleanFlag(_0x2b8dc5,_0x29f55b(0x19e),!![]),_0x5ab2f3=parseBooleanFlag(_0x2b8dc5,'expect-visible',![]);let _0x4bb3ec;if(hasFlag(_0x2b8dc5,'expected-count')){_0x4bb3ec=_0x2b8dc5[_0x29f55b(0x19a)](_0x29f55b(0x176));if(!Number[_0x29f55b(0x1a4)](_0x4bb3ec)||_0x4bb3ec<0x0)throw CliErrors[_0x29f55b(0x18f)]('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0x2bc630,'paths':_0x22ac09,'visible':_0x452967,'expectVisible':_0x5ab2f3,'expectedCount':_0x4bb3ec};}async function buildPlan(_0xe7d732,_0x45f47e){const _0x169998=a191_0x785c83,_0x9073df=parseInput(_0xe7d732),_0x1199c6=await fetchMutationSnapshot(_0xe7d732,'update\x20menu\x20visibility'),_0x58dca1=selectTargets(_0x1199c6[_0x169998(0x17f)],_0x9073df[_0x169998(0x167)],_0x9073df[_0x169998(0x158)]);if(_0x9073df[_0x169998(0x177)]!==undefined&&_0x58dca1[_0x169998(0x1a5)]!==_0x9073df[_0x169998(0x177)])throw menuError(_0x169998(0x1b3),_0x169998(0x1af)+_0x58dca1['length']+'\x20menu(s),\x20expected\x20'+_0x9073df['expectedCount']+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x9073df[_0x169998(0x163)]!==undefined){const _0x2ee501=_0x58dca1[_0x169998(0x1b8)](_0xcc25c7=>_0xcc25c7['visible']!==_0x9073df[_0x169998(0x163)]);if(_0x2ee501[_0x169998(0x1a5)]>0x0)throw menuError('menu_state_drift',_0x169998(0x154)+_0x2ee501['map'](_0x43b147=>_0x43b147['id'])[_0x169998(0x1b1)](',\x20')+'.',_0x169998(0x151));}const _0x3bb2c3=_0x58dca1[_0x169998(0x15f)](_0x32dec1=>({'id':_0x32dec1['id'],'label':_0x32dec1[_0x169998(0x198)],'path':_0x32dec1['path'],'before':{'visible':_0x32dec1[_0x169998(0x19e)]},'after':{'visible':_0x9073df[_0x169998(0x19e)]}})),_0x1144f2=_0x3bb2c3[_0x169998(0x1b8)](_0x59b08f=>_0x59b08f[_0x169998(0x14a)][_0x169998(0x19e)]!==_0x9073df[_0x169998(0x19e)])['map'](_0x3965cf=>({'stage':_0x169998(0x190),'method':_0x169998(0x144),'path':'/smartapi/menu/update','body':{'appCode':_0xe7d732[_0x169998(0x17b)],'id':_0x3965cf['id'],'visible':_0x9073df[_0x169998(0x19e)]}})),_0x3c703f=mutationResult({'operation':_0x169998(0x153),'selector':{'menuIds':_0x9073df[_0x169998(0x167)],'paths':_0x9073df['paths']},'before':{'menus':_0x58dca1[_0x169998(0x15f)](_0x4c9c14=>({'id':_0x4c9c14['id'],'path':_0x4c9c14[_0x169998(0x181)],'visible':_0x4c9c14[_0x169998(0x19e)]}))},'after':{'menus':_0x58dca1[_0x169998(0x15f)](_0x564155=>({'id':_0x564155['id'],'path':_0x564155[_0x169998(0x181)],'visible':_0x9073df[_0x169998(0x19e)]}))},'dryRun':_0x45f47e,'backend':[...BACKEND],'plannedActions':_0x1144f2,'snapshotHash':_0x1199c6[_0x169998(0x145)],'warnings':_0x1144f2['length']===0x0?[_0x169998(0x1b7)]:[]});return{'plan':{..._0x3c703f,'requestedVisible':_0x9073df[_0x169998(0x19e)],'targets':_0x3bb2c3},'beforeById':new Map(_0x58dca1[_0x169998(0x15f)](_0x13732f=>[_0x13732f['id'],_0x13732f]))};}function selectTargets(_0x33f356,_0x1e2278,_0x4ff601){const _0x552d97=a191_0x785c83,_0x35c4fc=new Map(_0x33f356[_0x552d97(0x15f)](_0xbe594c=>[_0xbe594c['id'],_0xbe594c])),_0x154262=new Map(),_0x34db45=_0x1e2278[_0x552d97(0x1b8)](_0x1efd22=>!_0x35c4fc[_0x552d97(0x1bc)](_0x1efd22));if(_0x34db45[_0x552d97(0x1a5)]>0x0)throw menuError(_0x552d97(0x1a0),_0x552d97(0x165)+_0x34db45[_0x552d97(0x1b1)](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x4ffc30 of _0x1e2278){_0x154262[_0x552d97(0x159)](_0x4ffc30,_0x35c4fc[_0x552d97(0x140)](_0x4ffc30));}for(const _0x876e6f of _0x4ff601){const _0x48a750=_0x33f356['filter'](_0xe40fe6=>_0xe40fe6[_0x552d97(0x181)]===_0x876e6f);if(_0x48a750['length']===0x0)throw menuError(_0x552d97(0x1a0),_0x552d97(0x16f)+JSON[_0x552d97(0x18a)](_0x876e6f)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x48a750[_0x552d97(0x1a5)]>0x1)throw menuError(_0x552d97(0x13f),_0x552d97(0x19c)+JSON[_0x552d97(0x18a)](_0x876e6f)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x48a750['map'](_0x1df89f=>_0x1df89f['id'])[_0x552d97(0x1b1)](',\x20')+'.');const _0x43405d=_0x48a750[0x0];_0x154262['set'](_0x43405d['id'],_0x43405d);}return[..._0x154262[_0x552d97(0x150)]()];}function a191_0x3324(_0x185aaa,_0x479363){_0x185aaa=_0x185aaa-0x13f;const _0xac21e7=a191_0xac21();let _0x3324d4=_0xac21e7[_0x185aaa];return _0x3324d4;}function parseMenuIds(_0x1c1cfb){const _0x98db10=a191_0x785c83,_0x4b9828=parseCsv(_0x1c1cfb),_0x3549b5=_0x4b9828[_0x98db10(0x15f)](Number);if(_0x3549b5[_0x98db10(0x1a9)](_0x52c807=>!Number[_0x98db10(0x1a4)](_0x52c807)||_0x52c807<=0x0))throw CliErrors['validation'](_0x98db10(0x14d));return[...new Set(_0x3549b5)];}function parseCsv(_0x31b253){const _0x360827=a191_0x785c83;return[...new Set(_0x31b253['split'](',')[_0x360827(0x15f)](_0x22303b=>_0x22303b[_0x360827(0x16c)]())[_0x360827(0x1b8)](Boolean))];}function parseBooleanFlag(_0x48c673,_0x3e8030,_0x373c0b){const _0x1db65b=a191_0x785c83;if(!hasFlag(_0x48c673,_0x3e8030)){if(_0x373c0b)throw CliErrors[_0x1db65b(0x18c)](_0x3e8030);return undefined;}const _0xb8d1b1=_0x48c673[_0x1db65b(0x1aa)][_0x3e8030];if(_0xb8d1b1===!![]||_0xb8d1b1===![])return _0xb8d1b1;if(_0xb8d1b1===_0x1db65b(0x1b6))return!![];if(_0xb8d1b1===_0x1db65b(0x1a1))return![];throw CliErrors[_0x1db65b(0x18f)]('--'+_0x3e8030+_0x1db65b(0x1ac));}function verifyVisibilityUpdate(_0x320020,_0x2adf78,_0x505317){const _0x2609ce=a191_0x785c83;assertVerified(!!_0x2adf78,'Menu\x20'+_0x320020['id']+_0x2609ce(0x1ba)),assertVerified(_0x2adf78['visible']===_0x505317,_0x2609ce(0x18e)+_0x320020['id']+_0x2609ce(0x197));const _0x2f7d58=[['id',_0x2adf78['id'],_0x320020['id']],[_0x2609ce(0x193),_0x2adf78[_0x2609ce(0x193)],_0x320020[_0x2609ce(0x193)]],[_0x2609ce(0x1a6),_0x2adf78[_0x2609ce(0x1a6)],_0x320020[_0x2609ce(0x1a6)]],[_0x2609ce(0x198),_0x2adf78[_0x2609ce(0x198)],_0x320020[_0x2609ce(0x198)]],[_0x2609ce(0x181),_0x2adf78['path'],_0x320020[_0x2609ce(0x181)]],[_0x2609ce(0x14b),_0x2adf78['url'],_0x320020['url']],[_0x2609ce(0x146),_0x2adf78[_0x2609ce(0x146)],_0x320020[_0x2609ce(0x146)]],[_0x2609ce(0x17e),_0x2adf78[_0x2609ce(0x17e)],_0x320020[_0x2609ce(0x17e)]],[_0x2609ce(0x1ad),_0x2adf78[_0x2609ce(0x1ad)],_0x320020[_0x2609ce(0x1ad)]],['resourcesValid',_0x2adf78[_0x2609ce(0x174)],_0x320020['resourcesValid']],['childrenIds',_0x2adf78[_0x2609ce(0x178)],_0x320020['childrenIds']],['childrenCount',_0x2adf78['childrenCount'],_0x320020['childrenCount']],[_0x2609ce(0x16e),_0x2adf78[_0x2609ce(0x16e)],_0x320020[_0x2609ce(0x16e)]],[_0x2609ce(0x184),_0x2adf78['pageType'],_0x320020[_0x2609ce(0x184)]],[_0x2609ce(0x141),_0x2adf78['modelType'],_0x320020['modelType']],['datasetId',_0x2adf78['datasetId'],_0x320020[_0x2609ce(0x173)]],[_0x2609ce(0x156),_0x2adf78['datasetCode'],_0x320020['datasetCode']]];for(const [_0x13f6be,_0x54334a,_0x238784]of _0x2f7d58){assertVerified(sameValue(_0x54334a,_0x238784),_0x2609ce(0x18e)+_0x320020['id']+'\x20'+_0x13f6be+_0x2609ce(0x186));}}function sameValue(_0x26adb5,_0x1a9efd){const _0x401e5f=a191_0x785c83;if(Array[_0x401e5f(0x19d)](_0x26adb5)||Array[_0x401e5f(0x19d)](_0x1a9efd))return JSON[_0x401e5f(0x18a)](_0x26adb5)===JSON[_0x401e5f(0x18a)](_0x1a9efd);return _0x26adb5===_0x1a9efd;}
|
|
1
|
+
const a191_0x13f24b=a191_0x4f71;(function(_0x346e48,_0x1c1ed4){const _0x15a9ee=a191_0x4f71,_0x5c583c=_0x346e48();while(!![]){try{const _0x4b78e8=parseInt(_0x15a9ee(0x17a))/0x1+-parseInt(_0x15a9ee(0x172))/0x2+parseInt(_0x15a9ee(0x1b8))/0x3+parseInt(_0x15a9ee(0x182))/0x4+-parseInt(_0x15a9ee(0x191))/0x5*(parseInt(_0x15a9ee(0x162))/0x6)+-parseInt(_0x15a9ee(0x192))/0x7*(parseInt(_0x15a9ee(0x160))/0x8)+-parseInt(_0x15a9ee(0x152))/0x9*(-parseInt(_0x15a9ee(0x168))/0xa);if(_0x4b78e8===_0x1c1ed4)break;else _0x5c583c['push'](_0x5c583c['shift']());}catch(_0x230398){_0x5c583c['push'](_0x5c583c['shift']());}}}(a191_0x3401,0x72bba));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_0x3401(){const _0x4731d7=['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','menu_state_drift','menu\x20list','paths','targets','resourcesValid','expectVisible','datasetId','1915896naXXAr','expected-count','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','failed','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','\x20menu(s);\x20skipped\x20','pageType','str','push','Menu\x20id\x20selector(s)\x20not\x20found:\x20','plan','verification','update\x20menu\x20visibility','split','visibility-update','map','updated','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','some','get','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','89577qxLZxC','hash','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','values','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','url','menu_verification_failed','/smartapi/menu/update','modelType','num','cookie','true','update-recovery','Menu\x20path\x20selector\x20not\x20found:\x20','1214296AiUzjY','before','12KyEfIS','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','flagMissing','string','visible','update\x20visibility\x20for','1110neolNr','menuIds','validation','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','label','isArray','datasetCode','sort','body','\x20updated,\x20','1240986HdNJyC','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','\x20failed.','isSafeInteger','byId','number','menu','508857IwPHZr','path','childrenCount','POST','expect-visible','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','menu_selector_not_found','menu-ids','720788xNKUKX','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','update','filter','parentId','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Menu\x20visibility\x20update\x20completed:\x20','beforeById','length','join','type','Updated\x20visibility\x20for\x20','boolean','update-menu-visibility','1078270OtCUPc','42SacCLt','recovered','set','Final\x20menu\x20visibility\x20readback\x20failed.','Response\x20was\x20lost\x20for\x20menu\x20','requestedVisible','\x20menu(s),\x20expected\x20','menu_expected_count_mismatch','\x20skipped,\x20','childrenIds','Would\x20update\x20visibility\x20for\x20','menu_permission_denied','Response\x20was\x20lost\x20and\x20menu\x20','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','stringify','expectedCount','resources','pageId','warnings','appCode','depth','message','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x20must\x20be\x20true\x20or\x20false.','\x20unchanged\x20menu(s).','Requested\x20menu\x20visibility','code','Menu\x20','Selected\x20','\x20visibility\x20update\x20could\x20not\x20be\x20verified'];a191_0x3401=function(){return _0x4731d7;};return a191_0x3401();}const BACKEND=[{'method':a191_0x13f24b(0x17d),'path':a191_0x13f24b(0x159)}];export const menuVisibilityUpdate={'service':a191_0x13f24b(0x179),'command':'visibility-update','description':a191_0x13f24b(0x183),'risk':'write','structuredErrors':!![],'flags':[{'name':a191_0x13f24b(0x181),'type':a191_0x13f24b(0x165),'description':a191_0x13f24b(0x163)},{'name':a191_0x13f24b(0x1b3),'type':a191_0x13f24b(0x165),'description':a191_0x13f24b(0x174)},{'name':a191_0x13f24b(0x166),'type':a191_0x13f24b(0x18f),'required':!![],'description':a191_0x13f24b(0x1ab)},{'name':a191_0x13f24b(0x17e),'type':a191_0x13f24b(0x18f),'description':a191_0x13f24b(0x156)},{'name':a191_0x13f24b(0x1b9),'type':a191_0x13f24b(0x178),'description':a191_0x13f24b(0x1ba)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x54b88a){parseInput(_0x54b88a);},async 'dryRun'(_0x58c60c){const _0x23cdef=a191_0x13f24b,_0x109a5b=await buildPlan(_0x58c60c,!![]),_0x548f03=_0x109a5b['plan']['plannedActions']?.[_0x23cdef(0x18b)]??0x0,_0xfd382a=_0x109a5b[_0x23cdef(0x1c2)][_0x23cdef(0x1b4)][_0x23cdef(0x18b)]-_0x548f03;return menuDryRunResult(_0x109a5b[_0x23cdef(0x1c2)],{'method':_0x23cdef(0x17d),'url':_0x23cdef(0x159),'body':{'updates':_0x109a5b[_0x23cdef(0x1c2)]['plannedActions']?.[_0x23cdef(0x14a)](_0x4a4e55=>_0x4a4e55[_0x23cdef(0x170)])??[]},'description':_0x23cdef(0x19c)+_0x548f03+'\x20menu(s);\x20skip\x20'+_0xfd382a+_0x23cdef(0x1aa)});},async 'execute'(_0x5f14a0){const _0x5b9142=a191_0x13f24b,_0xf07a94=await buildPlan(_0x5f14a0,![]);await recheckMutationSnapshot(_0x5f14a0,_0xf07a94[_0x5b9142(0x1c2)],_0x5b9142(0x1c4));const _0x3c9a75=[],_0x173688=[],_0x542d1d=[];for(const _0x270627 of _0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x1b4)]){if(_0x270627['before'][_0x5b9142(0x166)]===_0xf07a94['plan'][_0x5b9142(0x197)]){_0x3c9a75[_0x5b9142(0x1c0)]({'id':_0x270627['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x5f14a0[_0x5b9142(0x1a5)],_0x5f14a0['cookie'],{'id':_0x270627['id'],'visible':_0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x197)]}),_0x3c9a75[_0x5b9142(0x1c0)]({'id':_0x270627['id'],'updated':!![],'skipped':![]});}catch(_0x5aaeae){const _0x5acb9d=mapMenuApiError(_0x5aaeae,_0x5b9142(0x167),_0x270627['id']);if(isMenuResponseLoss(_0x5aaeae)&&_0x5acb9d['code']!==_0x5b9142(0x19d)){_0x542d1d[_0x5b9142(0x1c0)](_0x270627['id']);continue;}_0x173688[_0x5b9142(0x1c0)]({'id':_0x270627['id'],'stage':_0x5b9142(0x184),'code':_0x5acb9d[_0x5b9142(0x1ac)],'message':_0x5acb9d[_0x5b9142(0x1a7)]});}}let _0x1dea92;try{_0x1dea92=await fetchMenuSnapshot(_0x5f14a0[_0x5b9142(0x1a5)],_0x5f14a0[_0x5b9142(0x15c)]);}catch(_0x17f101){const _0x412536=describeMenuErrorCause(_0x17f101,'verify\x20menu\x20visibility\x20update'),_0x1c57eb=_0x542d1d['map'](_0x56bba0=>({'id':_0x56bba0,'stage':_0x5b9142(0x15e),'code':_0x5b9142(0x158),'message':_0x5b9142(0x196)+_0x56bba0+_0x5b9142(0x14d),'requestedStateConfirmed':![],'recovered':![]})),_0x468f80={'stage':_0x5b9142(0x1c3),'code':_0x5b9142(0x158),'message':_0x5b9142(0x195),'targetIds':_0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x1b4)][_0x5b9142(0x14a)](_0x494c07=>_0x494c07['id']),'requestedStateConfirmed':![],..._0x412536};throw menuFailure(asVerificationError(_0x17f101,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0xf07a94[_0x5b9142(0x1c2)],{'stage':_0x5b9142(0x1c3),'succeeded':_0x3c9a75,'failedRecords':[..._0x173688,..._0x1c57eb,_0x468f80],'warnings':[_0x5b9142(0x1b0)],'verification':{'status':_0x5b9142(0x1bb),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x504554=[];for(const _0x10dbb1 of _0x3c9a75){const _0x2a2390=Number(_0x10dbb1['id']),_0x3aa2bd=_0xf07a94[_0x5b9142(0x18a)][_0x5b9142(0x150)](_0x2a2390),_0x233ff9=_0x1dea92[_0x5b9142(0x177)][_0x5b9142(0x150)](_0x2a2390);try{verifyVisibilityUpdate(_0x3aa2bd,_0x233ff9,_0xf07a94['plan'][_0x5b9142(0x197)]);}catch(_0x4301b7){const _0x2a9b9b=asVerificationError(_0x4301b7,_0x5b9142(0x1ad)+_0x2a2390+_0x5b9142(0x1af));_0x504554['push']({'id':_0x2a2390,'stage':'verification','code':_0x2a9b9b['code'],'message':_0x2a9b9b['message'],'requestedStateConfirmed':![]});}}for(const _0x150dd4 of _0x542d1d){const _0x10dd87=_0xf07a94[_0x5b9142(0x18a)]['get'](_0x150dd4),_0x22bf57=_0x1dea92[_0x5b9142(0x177)][_0x5b9142(0x150)](_0x150dd4);try{verifyVisibilityUpdate(_0x10dd87,_0x22bf57,_0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x197)]),_0x3c9a75['push']({'id':_0x150dd4,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x1017fd){const _0x2274d9=asVerificationError(_0x1017fd,_0x5b9142(0x19e)+_0x150dd4+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x504554[_0x5b9142(0x1c0)]({'id':_0x150dd4,'stage':_0x5b9142(0x15e),'code':_0x2274d9[_0x5b9142(0x1ac)],'message':_0x2274d9[_0x5b9142(0x1a7)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x504554[_0x5b9142(0x18b)]>0x0){const _0x447a21=_0x504554[_0x5b9142(0x14a)](_0x1155d2=>Number(_0x1155d2['id'])),_0x53de4f=_0x3c9a75[_0x5b9142(0x185)](_0x502746=>_0x502746[_0x5b9142(0x193)]===!![])[_0x5b9142(0x18b)],_0x127c24=menuError('menu_verification_failed',_0x5b9142(0x14e)+_0x447a21[_0x5b9142(0x18c)](',\x20')+'.',_0x5b9142(0x188));throw menuFailure(_0x127c24,_0xf07a94['plan'],{'stage':_0x5b9142(0x1c3),'succeeded':_0x3c9a75,'failedRecords':[..._0x173688,..._0x504554],'warnings':[_0x5b9142(0x17f)],'verification':{'status':_0x5b9142(0x1bb),..._0x447a21[_0x5b9142(0x18b)]===0x1?{'targetId':_0x447a21[0x0]}:{'targetIds':_0x447a21},'recoveredCount':_0x53de4f,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0xe006bf=_0x3c9a75[_0x5b9142(0x185)](_0x5f0788=>_0x5f0788[_0x5b9142(0x14b)]===!![])[_0x5b9142(0x18b)],_0x681958=_0x3c9a75['length']-_0xe006bf,_0x5e087b={..._0xf07a94[_0x5b9142(0x1c2)],'succeeded':_0x3c9a75,'failed':_0x173688,'warnings':_0x173688['length']>0x0?[..._0xf07a94[_0x5b9142(0x1c2)][_0x5b9142(0x1a4)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0xf07a94['plan'][_0x5b9142(0x1a4)],'verification':{'checkedBy':_0x5b9142(0x1b2),'snapshotHash':_0x1dea92['hash'],'matchesRequestedState':_0x173688[_0x5b9142(0x18b)]===0x0,'recoveredCount':_0x542d1d[_0x5b9142(0x18b)]}};return{'ok':_0x173688['length']===0x0,'data':_0x5e087b,'message':_0x173688[_0x5b9142(0x18b)]===0x0?_0x5b9142(0x18e)+_0xe006bf+_0x5b9142(0x1bd)+_0x681958+_0x5b9142(0x1aa):_0x5b9142(0x189)+_0xe006bf+_0x5b9142(0x171)+_0x681958+_0x5b9142(0x19a)+_0x173688[_0x5b9142(0x18b)]+_0x5b9142(0x175)};}};function parseInput(_0x2e57b2){const _0x338fff=a191_0x13f24b,_0x2002fc=parseMenuIds(_0x2e57b2[_0x338fff(0x1bf)](_0x338fff(0x181))),_0x5387f7=parseCsv(_0x2e57b2['str'](_0x338fff(0x1b3)));if(_0x2002fc[_0x338fff(0x18b)]===0x0&&_0x5387f7[_0x338fff(0x18b)]===0x0)throw CliErrors[_0x338fff(0x16a)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x716946=parseBooleanFlag(_0x2e57b2,_0x338fff(0x166),!![]),_0x4fffdd=parseBooleanFlag(_0x2e57b2,_0x338fff(0x17e),![]);let _0x29468e;if(hasFlag(_0x2e57b2,'expected-count')){_0x29468e=_0x2e57b2[_0x338fff(0x15b)](_0x338fff(0x1b9));if(!Number[_0x338fff(0x176)](_0x29468e)||_0x29468e<0x0)throw CliErrors['validation'](_0x338fff(0x1a8));}return{'menuIds':_0x2002fc,'paths':_0x5387f7,'visible':_0x716946,'expectVisible':_0x4fffdd,'expectedCount':_0x29468e};}async function buildPlan(_0x475e1a,_0x143b38){const _0x3ffdbe=a191_0x13f24b,_0x4ed40a=parseInput(_0x475e1a),_0x4602de=await fetchMutationSnapshot(_0x475e1a,_0x3ffdbe(0x1c4)),_0x558512=selectTargets(_0x4602de['menus'],_0x4ed40a[_0x3ffdbe(0x169)],_0x4ed40a[_0x3ffdbe(0x1b3)]);if(_0x4ed40a['expectedCount']!==undefined&&_0x558512[_0x3ffdbe(0x18b)]!==_0x4ed40a[_0x3ffdbe(0x1a1)])throw menuError(_0x3ffdbe(0x199),_0x3ffdbe(0x1ae)+_0x558512[_0x3ffdbe(0x18b)]+_0x3ffdbe(0x198)+_0x4ed40a['expectedCount']+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x4ed40a[_0x3ffdbe(0x1b6)]!==undefined){const _0x40f5a8=_0x558512[_0x3ffdbe(0x185)](_0x5c4ab3=>_0x5c4ab3[_0x3ffdbe(0x166)]!==_0x4ed40a[_0x3ffdbe(0x1b6)]);if(_0x40f5a8['length']>0x0)throw menuError(_0x3ffdbe(0x1b1),_0x3ffdbe(0x173)+_0x40f5a8[_0x3ffdbe(0x14a)](_0x2bc045=>_0x2bc045['id'])['join'](',\x20')+'.',_0x3ffdbe(0x14c));}const _0x42e4f4=_0x558512[_0x3ffdbe(0x14a)](_0xe62290=>({'id':_0xe62290['id'],'label':_0xe62290['label'],'path':_0xe62290[_0x3ffdbe(0x17b)],'before':{'visible':_0xe62290['visible']},'after':{'visible':_0x4ed40a[_0x3ffdbe(0x166)]}})),_0x3b158c=_0x42e4f4['filter'](_0x270c6e=>_0x270c6e[_0x3ffdbe(0x161)]['visible']!==_0x4ed40a['visible'])[_0x3ffdbe(0x14a)](_0x500bbd=>({'stage':_0x3ffdbe(0x190),'method':_0x3ffdbe(0x17d),'path':_0x3ffdbe(0x159),'body':{'appCode':_0x475e1a[_0x3ffdbe(0x1a5)],'id':_0x500bbd['id'],'visible':_0x4ed40a[_0x3ffdbe(0x166)]}})),_0x4c323d=mutationResult({'operation':_0x3ffdbe(0x1c6),'selector':{'menuIds':_0x4ed40a[_0x3ffdbe(0x169)],'paths':_0x4ed40a[_0x3ffdbe(0x1b3)]},'before':{'menus':_0x558512[_0x3ffdbe(0x14a)](_0xad7fcc=>({'id':_0xad7fcc['id'],'path':_0xad7fcc[_0x3ffdbe(0x17b)],'visible':_0xad7fcc[_0x3ffdbe(0x166)]}))},'after':{'menus':_0x558512[_0x3ffdbe(0x14a)](_0x3f90e9=>({'id':_0x3f90e9['id'],'path':_0x3f90e9['path'],'visible':_0x4ed40a[_0x3ffdbe(0x166)]}))},'dryRun':_0x143b38,'backend':[...BACKEND],'plannedActions':_0x3b158c,'snapshotHash':_0x4602de[_0x3ffdbe(0x153)],'warnings':_0x3b158c[_0x3ffdbe(0x18b)]===0x0?[_0x3ffdbe(0x151)]:[]});return{'plan':{..._0x4c323d,'requestedVisible':_0x4ed40a['visible'],'targets':_0x42e4f4},'beforeById':new Map(_0x558512['map'](_0x583210=>[_0x583210['id'],_0x583210]))};}function a191_0x4f71(_0x1bab6c,_0x138bd8){_0x1bab6c=_0x1bab6c-0x14a;const _0x34015d=a191_0x3401();let _0x4f7190=_0x34015d[_0x1bab6c];return _0x4f7190;}function selectTargets(_0x3a798f,_0x536c38,_0x7cfca2){const _0x6df624=a191_0x13f24b,_0x461e57=new Map(_0x3a798f[_0x6df624(0x14a)](_0x4f3179=>[_0x4f3179['id'],_0x4f3179])),_0x21037d=new Map(),_0x2d38ca=_0x536c38[_0x6df624(0x185)](_0x111cf9=>!_0x461e57['has'](_0x111cf9));if(_0x2d38ca['length']>0x0)throw menuError(_0x6df624(0x180),_0x6df624(0x1c1)+_0x2d38ca[_0x6df624(0x18c)](',\x20')+'.',_0x6df624(0x1bc));for(const _0x2886b4 of _0x536c38){_0x21037d['set'](_0x2886b4,_0x461e57[_0x6df624(0x150)](_0x2886b4));}for(const _0x53e51c of _0x7cfca2){const _0x1cb03c=_0x3a798f[_0x6df624(0x185)](_0x3e34bf=>_0x3e34bf['path']===_0x53e51c);if(_0x1cb03c['length']===0x0)throw menuError(_0x6df624(0x180),_0x6df624(0x15f)+JSON[_0x6df624(0x1a0)](_0x53e51c)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x1cb03c[_0x6df624(0x18b)]>0x1)throw menuError('menu_selector_ambiguous',_0x6df624(0x16b)+JSON[_0x6df624(0x1a0)](_0x53e51c)+'.',_0x6df624(0x154)+_0x1cb03c[_0x6df624(0x14a)](_0x4c99cc=>_0x4c99cc['id'])[_0x6df624(0x18c)](',\x20')+'.');const _0x5eb279=_0x1cb03c[0x0];_0x21037d[_0x6df624(0x194)](_0x5eb279['id'],_0x5eb279);}return[..._0x21037d[_0x6df624(0x155)]()];}function parseMenuIds(_0x3263c0){const _0x392259=a191_0x13f24b,_0x1e138b=parseCsv(_0x3263c0),_0x20ca4d=_0x1e138b[_0x392259(0x14a)](Number);if(_0x20ca4d[_0x392259(0x14f)](_0x292a23=>!Number['isSafeInteger'](_0x292a23)||_0x292a23<=0x0))throw CliErrors[_0x392259(0x16a)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x20ca4d)];}function parseCsv(_0x145c20){const _0x10aec4=a191_0x13f24b;return[...new Set(_0x145c20[_0x10aec4(0x1c5)](',')[_0x10aec4(0x14a)](_0x1c665e=>_0x1c665e['trim']())[_0x10aec4(0x185)](Boolean))];}function parseBooleanFlag(_0x29cdb9,_0x1cf487,_0x3ce0f7){const _0x28cdf8=a191_0x13f24b;if(!hasFlag(_0x29cdb9,_0x1cf487)){if(_0x3ce0f7)throw CliErrors[_0x28cdf8(0x164)](_0x1cf487);return undefined;}const _0x1fba93=_0x29cdb9['rawFlags'][_0x1cf487];if(_0x1fba93===!![]||_0x1fba93===![])return _0x1fba93;if(_0x1fba93===_0x28cdf8(0x15d))return!![];if(_0x1fba93==='false')return![];throw CliErrors[_0x28cdf8(0x16a)]('--'+_0x1cf487+_0x28cdf8(0x1a9));}function verifyVisibilityUpdate(_0x4b9ce6,_0x2d5da7,_0x53eedd){const _0x27f823=a191_0x13f24b;assertVerified(!!_0x2d5da7,_0x27f823(0x1ad)+_0x4b9ce6['id']+_0x27f823(0x19f)),assertVerified(_0x2d5da7[_0x27f823(0x166)]===_0x53eedd,_0x27f823(0x1ad)+_0x4b9ce6['id']+_0x27f823(0x187));const _0x34896a=[['id',_0x2d5da7['id'],_0x4b9ce6['id']],['parentId',_0x2d5da7['parentId'],_0x4b9ce6[_0x27f823(0x186)]],[_0x27f823(0x1a6),_0x2d5da7[_0x27f823(0x1a6)],_0x4b9ce6[_0x27f823(0x1a6)]],[_0x27f823(0x16c),_0x2d5da7[_0x27f823(0x16c)],_0x4b9ce6[_0x27f823(0x16c)]],[_0x27f823(0x17b),_0x2d5da7[_0x27f823(0x17b)],_0x4b9ce6['path']],[_0x27f823(0x157),_0x2d5da7['url'],_0x4b9ce6[_0x27f823(0x157)]],[_0x27f823(0x18d),_0x2d5da7[_0x27f823(0x18d)],_0x4b9ce6['type']],[_0x27f823(0x16f),_0x2d5da7['sort'],_0x4b9ce6['sort']],[_0x27f823(0x1a2),_0x2d5da7[_0x27f823(0x1a2)],_0x4b9ce6[_0x27f823(0x1a2)]],['resourcesValid',_0x2d5da7[_0x27f823(0x1b5)],_0x4b9ce6[_0x27f823(0x1b5)]],[_0x27f823(0x19b),_0x2d5da7[_0x27f823(0x19b)],_0x4b9ce6[_0x27f823(0x19b)]],[_0x27f823(0x17c),_0x2d5da7[_0x27f823(0x17c)],_0x4b9ce6[_0x27f823(0x17c)]],[_0x27f823(0x1a3),_0x2d5da7[_0x27f823(0x1a3)],_0x4b9ce6[_0x27f823(0x1a3)]],['pageType',_0x2d5da7['pageType'],_0x4b9ce6[_0x27f823(0x1be)]],['modelType',_0x2d5da7[_0x27f823(0x15a)],_0x4b9ce6[_0x27f823(0x15a)]],[_0x27f823(0x1b7),_0x2d5da7[_0x27f823(0x1b7)],_0x4b9ce6[_0x27f823(0x1b7)]],[_0x27f823(0x16e),_0x2d5da7[_0x27f823(0x16e)],_0x4b9ce6[_0x27f823(0x16e)]]];for(const [_0x1b0980,_0xcd3d50,_0x41b588]of _0x34896a){assertVerified(sameValue(_0xcd3d50,_0x41b588),_0x27f823(0x1ad)+_0x4b9ce6['id']+'\x20'+_0x1b0980+'\x20changed\x20unexpectedly.');}}function sameValue(_0x497a1d,_0x358ef0){const _0x30ce79=a191_0x13f24b;if(Array[_0x30ce79(0x16d)](_0x497a1d)||Array[_0x30ce79(0x16d)](_0x358ef0))return JSON[_0x30ce79(0x1a0)](_0x497a1d)===JSON['stringify'](_0x358ef0);return _0x497a1d===_0x358ef0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a192_0x10da7f=a192_0x27f2;(function(_0x5c54aa,_0x35efb9){const _0x38dea9=a192_0x27f2,_0x14ae03=_0x5c54aa();while(!![]){try{const _0x397365=parseInt(_0x38dea9(0x1d4))/0x1*(-parseInt(_0x38dea9(0x1ce))/0x2)+parseInt(_0x38dea9(0x1c8))/0x3+parseInt(_0x38dea9(0x1c2))/0x4*(-parseInt(_0x38dea9(0x1db))/0x5)+parseInt(_0x38dea9(0x1d1))/0x6+-parseInt(_0x38dea9(0x1dd))/0x7+-parseInt(_0x38dea9(0x1ba))/0x8*(parseInt(_0x38dea9(0x1d6))/0x9)+parseInt(_0x38dea9(0x1c0))/0xa;if(_0x397365===_0x35efb9)break;else _0x14ae03['push'](_0x14ae03['shift']());}catch(_0x327d30){_0x14ae03['push'](_0x14ae03['shift']());}}}(a192_0x113a,0xc2728));function a192_0x113a(){const _0x2d46fa=['configCode','9512286VXhNls','appCode','config-create','728uOVctP','Inspect\x20with\x20','Created\x20notification\x20config\x20','notification','verified','verification','32067480XojByP','configName','265916UoyaOZ','notification_config_create_outcome_unknown','channelType',';\x20do\x20not\x20resubmit\x20automatically.','input','POST','1973787qhvHGO','/notification/channel-config/create',';\x20no\x20automatic\x20retry\x20was\x20attempted.','endpointUrl','mutation','document','2776718fqyfcf','isSafeInteger',';\x20do\x20not\x20resubmit.','8145816boVPAG','description','write','1FjGFYm','readTimeout','54243CskJmN','create','planned','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','85EIACYU'];a192_0x113a=function(){return _0x2d46fa;};return a192_0x113a();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a192_0x10da7f(0x1c9);function a192_0x27f2(_0x90a9c1,_0x3b9c6){_0x90a9c1=_0x90a9c1-0x1b8;const _0x113ae6=a192_0x113a();let _0x27f2dc=_0x113ae6[_0x90a9c1];return _0x27f2dc;}async function prepareCreate(_0x2eaa24){const _0x5b5726=a192_0x10da7f,_0x5efcf1=await readNotificationDocument(_0x2eaa24,_0x5b5726(0x1d7)),_0x2fcb55=createMutationInput(_0x2eaa24[_0x5b5726(0x1b8)],_0x5efcf1);return{'document':_0x5efcf1,'input':_0x2fcb55,'planned':projectNotificationConfig({'appCode':_0x2eaa24[_0x5b5726(0x1b8)],'configName':_0x5efcf1[_0x5b5726(0x1c1)],'channelType':_0x5efcf1[_0x5b5726(0x1c4)],'endpointUrl':_0x5efcf1[_0x5b5726(0x1cb)],'channelConfig':_0x5efcf1['channelConfig'],'description':_0x5efcf1[_0x5b5726(0x1d2)],'connectTimeout':_0x5efcf1['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x5efcf1[_0x5b5726(0x1d5)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a192_0x10da7f(0x1bd),'command':a192_0x10da7f(0x1b9),'description':a192_0x10da7f(0x1da),'risk':a192_0x10da7f(0x1d3),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x87bbd3){assertSingleNotificationSource(_0x87bbd3);},async 'dryRun'(_0x5e0251){const _0x4327c8=a192_0x10da7f,_0xa83e27=await prepareCreate(_0x5e0251),_0x492daf=notificationLookupCommand(_0x5e0251['appCode'],_0xa83e27[_0x4327c8(0x1cd)][_0x4327c8(0x1c4)]);return asDryRunResult({'operation':_0x4327c8(0x1d7),'selector':{'appCode':_0x5e0251['appCode'],'configName':_0xa83e27[_0x4327c8(0x1cd)][_0x4327c8(0x1c1)],'channelType':_0xa83e27['document'][_0x4327c8(0x1c4)]},'before':null,'after':_0xa83e27[_0x4327c8(0x1d8)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x4327c8(0x1d8),'lookupCommand':_0x492daf}},{'method':_0x4327c8(0x1c7),'url':CREATE_PATH});},async 'execute'(_0x5ecfcc){const _0x308f89=a192_0x10da7f,_0x4931cb=await prepareCreate(_0x5ecfcc),_0x3ba27d=notificationLookupCommand(_0x5ecfcc['appCode'],_0x4931cb[_0x308f89(0x1cd)][_0x308f89(0x1c4)]);let _0x139dff;try{_0x139dff=await createNotificationChannelConfig(_0x4931cb[_0x308f89(0x1c6)]);}catch(_0x53647c){if(isPlatformTransportFailure(_0x53647c))throw notificationError(_0x308f89(0x1c3),'Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','Inspect\x20with\x20'+_0x3ba27d+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x308f89(0x1d7),_0x308f89(0x1cc),_0x308f89(0x1bb)+_0x3ba27d+_0x308f89(0x1ca));}if(!Number[_0x308f89(0x1cf)](_0x139dff)||_0x139dff<=0x0)throw notificationError(_0x308f89(0x1c3),_0x308f89(0x1d9),_0x308f89(0x1bb)+_0x3ba27d+_0x308f89(0x1d0));let _0x5d5000;try{const _0x299bc7=await getNotificationChannelConfig(_0x139dff,_0x5ecfcc['appCode']);_0x5d5000=normalizeExactNotificationConfig(_0x299bc7,_0x139dff,_0x5ecfcc[_0x308f89(0x1b8)]);}catch{throw safeApiFailure(_0x308f89(0x1d7),_0x308f89(0x1bf),_0x308f89(0x1bb)+_0x3ba27d+_0x308f89(0x1c5));}return{'ok':!![],'data':{'operation':_0x308f89(0x1d7),'selector':{'appCode':_0x5d5000[_0x308f89(0x1b8)],'id':_0x5d5000['id'],'configCode':_0x5d5000[_0x308f89(0x1dc)],'configName':_0x5d5000['configName'],'channelType':_0x5d5000[_0x308f89(0x1c4)]},'before':null,'after':projectNotificationConfig(_0x5d5000),'dryRun':![],'backend':{'method':_0x308f89(0x1c7),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x308f89(0x1be),'lookupCommand':_0x3ba27d}},'message':_0x308f89(0x1bc)+_0x5d5000['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a193_0x10b049=a193_0x4957;(function(_0x118da7,_0x1f1a2b){const _0xf33a7b=a193_0x4957,_0x1d09c6=_0x118da7();while(!![]){try{const _0x383e1c=-parseInt(_0xf33a7b(0x100))/0x1+parseInt(_0xf33a7b(0xfa))/0x2*(parseInt(_0xf33a7b(0xff))/0x3)+-parseInt(_0xf33a7b(0xe5))/0x4*(-parseInt(_0xf33a7b(0xfd))/0x5)+parseInt(_0xf33a7b(0xed))/0x6*(parseInt(_0xf33a7b(0xee))/0x7)+-parseInt(_0xf33a7b(0xf4))/0x8*(-parseInt(_0xf33a7b(0xf7))/0x9)+-parseInt(_0xf33a7b(0xe9))/0xa*(parseInt(_0xf33a7b(0xfe))/0xb)+-parseInt(_0xf33a7b(0xfb))/0xc;if(_0x383e1c===_0x1f1a2b)break;else _0x1d09c6['push'](_0x1d09c6['shift']());}catch(_0x2ddd51){_0x1d09c6['push'](_0x1d09c6['shift']());}}}(a193_0x39a8,0xae654));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a193_0x4957(_0x951989,_0x13defa){_0x951989=_0x951989-0xdd;const _0x39a817=a193_0x39a8();let _0x495710=_0x39a817[_0x951989];return _0x495710;}function a193_0x39a8(){const _0x365210=['6PEpIfW','12169260iiJSxb','before','85HgvJha','22fPCbTt','949128FmWcUd','574319lrQhYb','Deleted\x20notification\x20config\x20','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','\x20delete\x20could\x20not\x20be\x20verified.',';\x20do\x20not\x20resubmit\x20automatically.','POST','appCode','unshift','planned','11524DQpDZg','channelType','notification',';\x20no\x20automatic\x20retry\x20was\x20attempted.','1452080QNKryu','Inspect\x20with\x20','verified','notification_config_delete_outcome_unknown','68118RRPxOp','371vGeBEi','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','config-delete','notification_config_delete_verification_unavailable','/notification/channel-config/delete','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','80GvvUqt','delete','\x20remains\x20present\x20after\x20delete.','894015cQWHTQ','notification_config_delete_verification_failed','Notification\x20config\x20'];a193_0x39a8=function(){return _0x365210;};return a193_0x39a8();}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_0x10b049(0xf2),REFERENCE_WARNING=a193_0x10b049(0xf3);async function prepareDelete(_0x4a2080){const _0x5ddf61=a193_0x10b049,_0x510a35=readNotificationId(_0x4a2080),_0x42234a=await requireExactNotificationConfig(_0x4a2080[_0x5ddf61(0xe2)],_0x510a35,_0x5ddf61(0xf5));return{'id':_0x510a35,'before':_0x42234a};}export const notificationConfigDelete={'service':a193_0x10b049(0xe7),'command':a193_0x10b049(0xf0),'description':a193_0x10b049(0xef),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x354edb){readNotificationId(_0x354edb),requireNotificationExplicitYes(_0x354edb);},async 'dryRun'(_0x5ac8b7){const _0x117496=a193_0x10b049,_0x11d28a=await prepareDelete(_0x5ac8b7),_0x237b5b=notificationLookupCommand(_0x5ac8b7[_0x117496(0xe2)],_0x11d28a[_0x117496(0xfc)][_0x117496(0xe6)]);return asDryRunResult({'operation':_0x117496(0xf5),'selector':notificationSelector(_0x11d28a['before']),'before':projectNotificationConfig(_0x11d28a['before']),'after':null,'dryRun':!![],'backend':{'method':_0x117496(0xe1),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x117496(0xe4),'lookupCommand':_0x237b5b}},{'method':_0x117496(0xe1),'url':DELETE_PATH});},async 'execute'(_0x5e7474){const _0x103306=a193_0x10b049;requireNotificationExplicitYes(_0x5e7474);const _0x5cf558=await prepareDelete(_0x5e7474),_0x4b4334=notificationLookupCommand(_0x5e7474[_0x103306(0xe2)],_0x5cf558[_0x103306(0xfc)][_0x103306(0xe6)]);let _0x1a0f0f=![];try{await deleteNotificationChannelConfig(_0x5cf558['id'],_0x5e7474[_0x103306(0xe2)]);}catch(_0x18cf0d){if(!isPlatformTransportFailure(_0x18cf0d))throw safeApiFailure(_0x103306(0xf5),'mutation','Inspect\x20with\x20'+_0x4b4334+_0x103306(0xe8));_0x1a0f0f=!![];}let _0x365613;try{_0x365613=await listNotificationChannelConfigs(_0x5e7474[_0x103306(0xe2)],_0x5cf558[_0x103306(0xfc)][_0x103306(0xe6)]),validateNotificationDeleteReadback(_0x365613,_0x5e7474[_0x103306(0xe2)],_0x5cf558['before'][_0x103306(0xe6)]);}catch{throw notificationError(_0x1a0f0f?_0x103306(0xec):_0x103306(0xf1),_0x103306(0xf9)+_0x5cf558['id']+_0x103306(0xdf),_0x103306(0xea)+_0x4b4334+_0x103306(0xe0));}if(_0x365613['some'](_0x59400a=>_0x59400a['id']===_0x5cf558['id']))throw notificationError(_0x1a0f0f?'notification_config_delete_outcome_unknown':_0x103306(0xf8),'Notification\x20config\x20'+_0x5cf558['id']+_0x103306(0xf6),_0x103306(0xea)+_0x4b4334+';\x20do\x20not\x20resubmit\x20automatically.');const _0x1b3e17=[REFERENCE_WARNING];return _0x1a0f0f&&_0x1b3e17[_0x103306(0xe3)](_0x103306(0xde)),{'ok':!![],'data':{'operation':_0x103306(0xf5),'selector':notificationSelector(_0x5cf558['before']),'before':projectNotificationConfig(_0x5cf558[_0x103306(0xfc)]),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x1b3e17,'verification':{'status':_0x103306(0xeb),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x1a0f0f,'lookupCommand':_0x4b4334}},'message':_0x103306(0xdd)+_0x5cf558['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a194_0x51ba(){const _0x5696cb=['809615JByGSt','config-list','appCode','\x20notification\x20config(s)','1909038Glqchx','boolean','length','all','18HYsKID','flat','4768Urhmoj','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','95btFwio','read','Found\x20','2288629fhdvnm','validation','map','9927fSamdt','trim','157844AHsEkg','str','2263408UlNzwx','type','1483955UwLBJf','110cOFXZF','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','string','bool'];a194_0x51ba=function(){return _0x5696cb;};return a194_0x51ba();}const a194_0x50ecd9=a194_0x3e8a;function a194_0x3e8a(_0x37cd52,_0x39cd90){_0x37cd52=_0x37cd52-0xe6;const _0x51baf8=a194_0x51ba();let _0x3e8aec=_0x51baf8[_0x37cd52];return _0x3e8aec;}(function(_0x295769,_0x28eb7c){const _0x5b386b=a194_0x3e8a,_0x32cda9=_0x295769();while(!![]){try{const _0x4903e8=-parseInt(_0x5b386b(0xe7))/0x1+parseInt(_0x5b386b(0xfd))/0x2+-parseInt(_0x5b386b(0xeb))/0x3+parseInt(_0x5b386b(0xfb))/0x4*(parseInt(_0x5b386b(0xf3))/0x5)+-parseInt(_0x5b386b(0xef))/0x6*(-parseInt(_0x5b386b(0xf6))/0x7)+-parseInt(_0x5b386b(0xf1))/0x8*(-parseInt(_0x5b386b(0xf9))/0x9)+-parseInt(_0x5b386b(0x100))/0xa*(parseInt(_0x5b386b(0xff))/0xb);if(_0x4903e8===_0x28eb7c)break;else _0x32cda9['push'](_0x32cda9['shift']());}catch(_0x2719a8){_0x32cda9['push'](_0x32cda9['shift']());}}}(a194_0x51ba,0x8ffd0));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';export const notificationConfigList={'service':'notification','command':a194_0x50ecd9(0xe8),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a194_0x50ecd9(0xf4),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a194_0x50ecd9(0x102),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':a194_0x50ecd9(0xec),'default':![],'description':'List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type'}],async 'validate'(_0x5ba879){const _0xbb278a=a194_0x50ecd9;if(_0x5ba879[_0xbb278a(0xe6)](_0xbb278a(0xee))&&_0x5ba879[_0xbb278a(0xfc)](_0xbb278a(0xfe))[_0xbb278a(0xfa)]())throw CliErrors[_0xbb278a(0xf7)]('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.',_0xbb278a(0xf2));if(_0x5ba879[_0xbb278a(0xe6)]('all'))return;readNotificationChannelType(_0x5ba879);},async 'execute'(_0x3b2a91){const _0x36733a=a194_0x50ecd9;if(_0x3b2a91['bool'](_0x36733a(0xee))){const _0x3a9834=await Promise[_0x36733a(0xee)](NOTIFICATION_CHANNEL_TYPES['map'](_0x369515=>listNotificationChannelConfigs(_0x3b2a91[_0x36733a(0xe9)],_0x369515))),_0x33aa5a=_0x3a9834[_0x36733a(0xf0)]()[_0x36733a(0xf8)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3b2a91[_0x36733a(0xe9)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x33aa5a[_0x36733a(0xed)],'configs':_0x33aa5a},'message':_0x36733a(0xf5)+_0x33aa5a[_0x36733a(0xed)]+_0x36733a(0x101)};}const _0x23b988=readNotificationChannelType(_0x3b2a91),_0x422b5d=await listNotificationChannelConfigs(_0x3b2a91['appCode'],_0x23b988),_0x531dc1=_0x422b5d['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3b2a91[_0x36733a(0xe9)],'channelType':_0x23b988,'count':_0x531dc1['length'],'configs':_0x531dc1},'message':_0x36733a(0xf5)+_0x531dc1['length']+'\x20'+_0x23b988+_0x36733a(0xea)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a195_0x1e50(_0x101843,_0x2f1927){_0x101843=_0x101843-0x1c9;const _0x4108e1=a195_0x4108();let _0x1e5007=_0x4108e1[_0x101843];return _0x1e5007;}const a195_0x29df98=a195_0x1e50;(function(_0x3d19ff,_0xc97e62){const _0x3dfaaa=a195_0x1e50,_0x19a893=_0x3d19ff();while(!![]){try{const _0x2578a4=parseInt(_0x3dfaaa(0x1e3))/0x1*(parseInt(_0x3dfaaa(0x1cb))/0x2)+parseInt(_0x3dfaaa(0x1e7))/0x3*(-parseInt(_0x3dfaaa(0x1ed))/0x4)+parseInt(_0x3dfaaa(0x1c9))/0x5*(parseInt(_0x3dfaaa(0x1e2))/0x6)+parseInt(_0x3dfaaa(0x1d1))/0x7*(parseInt(_0x3dfaaa(0x1ea))/0x8)+parseInt(_0x3dfaaa(0x1d7))/0x9+parseInt(_0x3dfaaa(0x1db))/0xa*(-parseInt(_0x3dfaaa(0x1da))/0xb)+-parseInt(_0x3dfaaa(0x1e4))/0xc;if(_0x2578a4===_0xc97e62)break;else _0x19a893['push'](_0x19a893['shift']());}catch(_0x34f2ce){_0x19a893['push'](_0x19a893['shift']());}}}(a195_0x4108,0x5b9fd));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';function a195_0x4108(){const _0x10f74a=['notification_config_update_verification_unavailable','/notification/channel-config/update','128895hjycWv','\x20via\x20','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','239352SbHDwb','provesChange','appCode','12vyxxBe','verifiedFields','15MFdXXw','POST','14cEuxlh','notification_config_update_outcome_unknown','high-risk-write','notification',';\x20do\x20not\x20resubmit\x20automatically.','patch','49eNRCjg',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Notification\x20config\x20','planned','mutation','allMatch','4961241kCMsRZ','payload','\x20with\x20','43043TrRUML','140KGpDqr','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','channelType','update','Inspect\x20with\x20--id\x20','Inspect\x20ID\x20','before','773754QRMFDa','13251PXFoNZ','8176152knszqR'];a195_0x4108=function(){return _0x10f74a;};return a195_0x4108();}const UPDATE_PATH=a195_0x29df98(0x1e6);async function prepareUpdate(_0x92b0ba){const _0x1ac35f=a195_0x29df98,_0x3ab90d=readNotificationId(_0x92b0ba),_0x5a9f40=await readNotificationDocument(_0x92b0ba,_0x1ac35f(0x1de)),_0x13bf21=await requireExactNotificationConfig(_0x92b0ba[_0x1ac35f(0x1ec)],_0x3ab90d,_0x1ac35f(0x1de));return{'id':_0x3ab90d,'patch':_0x5a9f40,'before':_0x13bf21,'payload':mergeUpdateInput(_0x13bf21,_0x5a9f40),'planned':plannedUpdateProjection(_0x13bf21,_0x5a9f40)};}export const notificationConfigUpdate={'service':a195_0x29df98(0x1ce),'command':'config-update','description':a195_0x29df98(0x1dc),'risk':a195_0x29df98(0x1cd),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4e28bd){readNotificationId(_0x4e28bd),assertSingleNotificationSource(_0x4e28bd),requireNotificationExplicitYes(_0x4e28bd);},async 'dryRun'(_0x2aa25f){const _0x2c0907=a195_0x29df98,_0x36372d=await prepareUpdate(_0x2aa25f),_0x53b4f5=notificationLookupCommand(_0x2aa25f[_0x2c0907(0x1ec)],_0x36372d[_0x2c0907(0x1e1)][_0x2c0907(0x1dd)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x36372d[_0x2c0907(0x1e1)]),'before':projectNotificationConfig(_0x36372d[_0x2c0907(0x1e1)]),'after':_0x36372d[_0x2c0907(0x1d4)],'dryRun':!![],'backend':{'method':_0x2c0907(0x1ca),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x2c0907(0x1d4),'lookupCommand':_0x53b4f5}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x122a62){const _0x495155=a195_0x29df98;requireNotificationExplicitYes(_0x122a62);const _0x1841ac=await prepareUpdate(_0x122a62),_0x267524=notificationLookupCommand(_0x122a62[_0x495155(0x1ec)],_0x1841ac[_0x495155(0x1e1)][_0x495155(0x1dd)]);let _0x104e65=![];try{await updateNotificationChannelConfig(_0x1841ac[_0x495155(0x1d8)]);}catch(_0x5038f4){if(!isPlatformTransportFailure(_0x5038f4))throw safeApiFailure(_0x495155(0x1de),_0x495155(0x1d5),_0x495155(0x1e0)+_0x1841ac['id']+_0x495155(0x1d9)+_0x267524+_0x495155(0x1d2));_0x104e65=!![];}let _0x1165d8;try{const _0x565425=await getNotificationChannelConfig(_0x1841ac['id'],_0x122a62['appCode']);_0x1165d8=normalizeExactNotificationConfig(_0x565425,_0x1841ac['id'],_0x122a62['appCode']);}catch{throw notificationError(_0x104e65?_0x495155(0x1cc):_0x495155(0x1e5),_0x495155(0x1d3)+_0x1841ac['id']+_0x495155(0x1e9),_0x495155(0x1df)+_0x1841ac['id']+_0x495155(0x1e8)+_0x267524+_0x495155(0x1cf));}const _0x4d4bae=requestedSafeFieldsMatch(_0x1841ac[_0x495155(0x1e1)],_0x1165d8,_0x1841ac[_0x495155(0x1d0)]);if(!_0x4d4bae[_0x495155(0x1d6)]||_0x104e65&&!_0x4d4bae[_0x495155(0x1eb)])throw notificationError(_0x104e65?_0x495155(0x1cc):'notification_config_update_verification_failed',_0x495155(0x1d3)+_0x1841ac['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x495155(0x1df)+_0x1841ac['id']+'\x20via\x20'+_0x267524+';\x20do\x20not\x20resubmit\x20automatically.');const _0x3c6937=_0x104e65?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x1165d8),'before':projectNotificationConfig(_0x1841ac[_0x495155(0x1e1)]),'after':projectNotificationConfig(_0x1165d8),'dryRun':![],'backend':{'method':_0x495155(0x1ca),'path':UPDATE_PATH},'warnings':_0x3c6937,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x104e65,'verifiedFields':_0x4d4bae[_0x495155(0x1ee)],'lookupCommand':_0x267524}},'message':'Updated\x20notification\x20config\x20'+_0x1165d8['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a196_0x8452(){const _0x155964=['202510OQlEjI','2191582fiBUsT','69217RjREBH','1221865tYhRNn','4241392UbulFf','507780XJKcLQ','4PbtOVW','500gcymCD','564ojZIZr','17206LxFmNI','18yHITpc'];a196_0x8452=function(){return _0x155964;};return a196_0x8452();}(function(_0x2a6b09,_0x17e95e){const _0x325a64=a196_0x11e0,_0x92518=_0x2a6b09();while(!![]){try{const _0x38ef92=-parseInt(_0x325a64(0xa8))/0x1+parseInt(_0x325a64(0xa7))/0x2+-parseInt(_0x325a64(0xab))/0x3+parseInt(_0x325a64(0xac))/0x4*(-parseInt(_0x325a64(0xa9))/0x5)+parseInt(_0x325a64(0xae))/0x6*(parseInt(_0x325a64(0xa4))/0x7)+-parseInt(_0x325a64(0xaa))/0x8*(parseInt(_0x325a64(0xa5))/0x9)+-parseInt(_0x325a64(0xad))/0xa*(-parseInt(_0x325a64(0xa6))/0xb);if(_0x38ef92===_0x17e95e)break;else _0x92518['push'](_0x92518['shift']());}catch(_0x59f8b0){_0x92518['push'](_0x92518['shift']());}}}(a196_0x8452,0xabe91));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a196_0x11e0(_0x22567e,_0x313dc1){_0x22567e=_0x22567e-0xa4;const _0x845250=a196_0x8452();let _0x11e043=_0x845250[_0x22567e];return _0x11e043;}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|