@lovrabet/rabetbase-cli 2.5.10-beta.5 → 2.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.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/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a188_0x4a0c85=a188_0x3407;(function(_0x5bd315,_0x16a456){const _0x2a23eb=a188_0x3407,_0x17f458=_0x5bd315();while(!![]){try{const _0x37736d=parseInt(_0x2a23eb(0x18d))/0x1*(-parseInt(_0x2a23eb(0x185))/0x2)+parseInt(_0x2a23eb(0x187))/0x3*(parseInt(_0x2a23eb(0x186))/0x4)+-parseInt(_0x2a23eb(0x17c))/0x5*(-parseInt(_0x2a23eb(0x182))/0x6)+-parseInt(_0x2a23eb(0x17f))/0x7+-parseInt(_0x2a23eb(0x18c))/0x8+-parseInt(_0x2a23eb(0x183))/0x9*(-parseInt(_0x2a23eb(0x181))/0xa)+parseInt(_0x2a23eb(0x17e))/0xb;if(_0x37736d===_0x16a456)break;else _0x17f458['push'](_0x17f458['shift']());}catch(_0x43444e){_0x17f458['push'](_0x17f458['shift']());}}}(a188_0x54cb,0x47706));function a188_0x3407(_0x2d598d,_0x3eb4d7){_0x2d598d=_0x2d598d-0x17c;const _0x54cb2a=a188_0x54cb();let _0x340732=_0x54cb2a[_0x2d598d];return _0x340732;}import{getSmartAppRecord}from'../../core/api-client.js';import{getOnlineMenuList}from'../../commands/menu/shared/service.js';function a188_0x54cb(){const _0x275fed=['688585pttGwQ','menu','3550327KCxlPb','2457581TSKMaN','\x20menu(s)\x20for\x20','364960dBQGic','6nptsdM','63lkUSQV','subapp-assets-status','368476vWHXhp','8JDNxeC','529755FNuATY','\x20in\x20menu\x20host\x20','Inspected\x20','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','cookie','1929448qGCCnr','1lUEBFs','all'];a188_0x54cb=function(){return _0x275fed;};return a188_0x54cb();}import{buildSubappAssetsStatus,getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';export const menuSubappAssetsStatus={'service':a188_0x4a0c85(0x17d),'command':a188_0x4a0c85(0x184),'description':a188_0x4a0c85(0x18a),'risk':'read','strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x3caf97){getSubappSelector(_0x3caf97);},async 'execute'(_0x2aeedc){const _0x463f01=a188_0x4a0c85,{appCode:_0x50e505,appName:_0xe64df1}=getSubappSelector(_0x2aeedc),[_0x442295,_0x2e6659]=await Promise[_0x463f01(0x18e)]([getSmartAppRecord(_0x50e505,_0x2aeedc[_0x463f01(0x18b)]),getOnlineMenuList(_0x50e505,_0x2aeedc[_0x463f01(0x18b)])]),_0x493d4f={'appCode':_0x50e505,...buildSubappAssetsStatus(_0x442295,_0x2e6659,_0xe64df1)};return{'ok':!![],'data':_0x493d4f,'message':_0x463f01(0x189)+_0x493d4f['boundMenus']+_0x463f01(0x180)+_0xe64df1+_0x463f01(0x188)+_0x50e505+'.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a189_0x4021fc=a189_0x3111;(function(_0x2aff40,_0x153ddb){const _0x36a9ea=a189_0x3111,_0x32199c=_0x2aff40();while(!![]){try{const _0x262d45=parseInt(_0x36a9ea(0x121))/0x1+parseInt(_0x36a9ea(0x11e))/0x2+parseInt(_0x36a9ea(0x154))/0x3+-parseInt(_0x36a9ea(0x11f))/0x4+-parseInt(_0x36a9ea(0x129))/0x5+parseInt(_0x36a9ea(0x111))/0x6+-parseInt(_0x36a9ea(0x11a))/0x7;if(_0x262d45===_0x153ddb)break;else _0x32199c['push'](_0x32199c['shift']());}catch(_0x2be8eb){_0x32199c['push'](_0x32199c['shift']());}}}(a189_0x32b4,0x635b5));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set(['skinColor',a189_0x4021fc(0x124),'accessKey','assets',a189_0x4021fc(0x152),a189_0x4021fc(0x14e),a189_0x4021fc(0x122),'enableAutoSync','directDbId',a189_0x4021fc(0x148)]);function parseObject(_0x71ac0c,_0x18126d){const _0x185dec=a189_0x4021fc;let _0x237762=_0x71ac0c;if(typeof _0x71ac0c===_0x185dec(0x123))try{_0x237762=JSON['parse'](_0x71ac0c);}catch{throw CliErrors[_0x185dec(0x128)](_0x18126d+'\x20contains\x20invalid\x20JSON.');}if(!_0x237762||typeof _0x237762!==_0x185dec(0x14f)||Array['isArray'](_0x237762))throw CliErrors[_0x185dec(0x128)](_0x18126d+_0x185dec(0x118));return _0x237762;}function a189_0x3111(_0xe1535f,_0x2231fe){_0xe1535f=_0xe1535f-0x10e;const _0x32b431=a189_0x32b4();let _0x311166=_0x32b431[_0xe1535f];return _0x311166;}function parseArray(_0x4f1b23,_0x5478a6){const _0x19b630=a189_0x4021fc;let _0x49125a;try{_0x49125a=JSON[_0x19b630(0x10e)](_0x4f1b23);}catch{throw CliErrors[_0x19b630(0x128)](_0x5478a6+_0x19b630(0x140));}if(!Array['isArray'](_0x49125a))throw CliErrors[_0x19b630(0x128)](_0x5478a6+_0x19b630(0x120));return _0x49125a['map']((_0xfed5b8,_0x3bd19c)=>parseObject(_0xfed5b8,_0x5478a6+'['+_0x3bd19c+']'));}function validateResources(_0x49734b){const _0x597bc5=a189_0x4021fc;if(_0x49734b[_0x597bc5(0x127)]===0x0)throw CliErrors['validation'](_0x597bc5(0x136));for(const [_0x1172a9,_0x31475f]of _0x49734b[_0x597bc5(0x14a)]()){if(typeof _0x31475f!=='string')throw CliErrors['validation'](_0x597bc5(0x11c)+_0x1172a9+_0x597bc5(0x150));try{if(new URL(_0x31475f)[_0x597bc5(0x144)]!==_0x597bc5(0x133))throw new Error(_0x597bc5(0x12e));}catch{throw CliErrors['validation'](_0x597bc5(0x11c)+_0x1172a9+']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.');}}if(new Set(_0x49734b)[_0x597bc5(0x110)]!==_0x49734b['length']||!_0x49734b[_0x597bc5(0x157)](_0x1ed925=>/\.m?js(?:[?#]|$)/i[_0x597bc5(0x13c)](_0x1ed925)))throw CliErrors['validation'](_0x597bc5(0x12b));return _0x49734b;}function a189_0x32b4(){const _0x415cdc=['Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','entries','Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','enableSample','object',']\x20must\x20be\x20a\x20URL\x20string.','isSafeInteger','tenantColumn','expected-hash','1848576fsKouk','has','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','some','appName','expectedHash','parse','write','size','4260816wmfbfp','keys','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','subapp-assets-update','apiError','resources','POST','\x20must\x20be\x20a\x20JSON\x20object.','unchanged','11347287aDIuYZ','verified\x20app.extend','resources[','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','1122104PebZHX','1092528bBHkPY','\x20must\x20be\x20a\x20JSON\x20array.','760364DMIVXs','vipDeploy','string','enableOpenApi','--resources\x20is\x20required.','sha256','length','validation','1733030RONsGz','assets','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','stringify','cookie','not\x20HTTPS','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.','App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.',';\x20found\x20','extend','https:','isArray','appPublishStatus','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','before','App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.','str','.\x20Refusing\x20update.',';\x20independent\x20deployment\x20not\x20verified.','test','trim','Would\x20update\x20shared\x20assets\x20for\x20','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20','\x20contains\x20invalid\x20JSON.','/smartapi/app/update','JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs','nextExtend','protocol','join','filter','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','directDbEnabled'];a189_0x32b4=function(){return _0x415cdc;};return a189_0x32b4();}function prepare(_0x136493,_0x12a790,_0x150775){const _0x5a0452=a189_0x4021fc;if(!Number[_0x5a0452(0x151)](_0x136493['id'])||(_0x136493['id']??0x0)<=0x0||typeof _0x136493['appPublishStatus']!==_0x5a0452(0x123)||!_0x136493['appPublishStatus'])throw CliErrors[_0x5a0452(0x128)](_0x5a0452(0x113));const _0x5ea0b3=parseObject(_0x136493[_0x5a0452(0x132)],'app.extend'),_0x128b51=Object[_0x5a0452(0x112)](_0x5ea0b3)[_0x5a0452(0x146)](_0x5a8d6d=>!KNOWN_EXTEND_KEYS[_0x5a0452(0x155)](_0x5a8d6d));if(_0x128b51[_0x5a0452(0x127)])throw CliErrors['validation']('Unknown\x20app.extend\x20fields:\x20'+_0x128b51[_0x5a0452(0x145)](',\x20')+_0x5a0452(0x13a));if(typeof _0x5ea0b3['assets']!==_0x5a0452(0x123))throw CliErrors[_0x5a0452(0x128)](_0x5a0452(0x14c));const _0x1119fe=parseArray(_0x5ea0b3[_0x5a0452(0x12a)],'app.extend.assets'),_0x144c66=_0x1119fe[_0x5a0452(0x146)](_0x16328a=>_0x16328a[_0x5a0452(0x158)]===_0x12a790);if(_0x144c66[_0x5a0452(0x127)]!==0x1)throw CliErrors['validation'](_0x5a0452(0x13f)+_0x12a790+_0x5a0452(0x131)+_0x144c66[_0x5a0452(0x127)]+'.');const _0x2fe0af=_0x144c66[0x0];if(typeof _0x2fe0af[_0x5a0452(0x116)]!=='string')throw CliErrors['validation'](_0x5a0452(0x149));let _0x13cf84;try{_0x13cf84=JSON[_0x5a0452(0x10e)](_0x2fe0af[_0x5a0452(0x116)]);}catch{throw CliErrors[_0x5a0452(0x128)](_0x5a0452(0x14d));}if(!Array[_0x5a0452(0x134)](_0x13cf84)||_0x13cf84[_0x5a0452(0x157)](_0x20ac21=>typeof _0x20ac21!==_0x5a0452(0x123)))throw CliErrors[_0x5a0452(0x128)]('Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.');const _0x256423=_0x1119fe['map'](_0x788d03=>_0x788d03===_0x2fe0af?{..._0x788d03,'resources':JSON[_0x5a0452(0x12c)](_0x150775)}:_0x788d03),_0x2d31c8={..._0x5ea0b3,'assets':JSON[_0x5a0452(0x12c)](_0x256423)},_0x30c4a4=createHash(_0x5a0452(0x126))['update'](JSON[_0x5a0452(0x12c)]({'appCode':_0x136493['appCode'],'id':_0x136493['id'],'appPublishStatus':_0x136493[_0x5a0452(0x135)],'extend':_0x5ea0b3,'appName':_0x12a790,'resources':_0x150775}))['digest']('hex');return{'before':_0x13cf84,'nextExtend':_0x2d31c8,'expectedHash':_0x30c4a4,'unchanged':isDeepStrictEqual(_0x13cf84,_0x150775)};}function flags(_0x23d4a5){const _0x439cfe=a189_0x4021fc,{appCode:_0x567296,appName:_0x1a0ba1}=getSubappSelector(_0x23d4a5),_0x278fa9=_0x23d4a5[_0x439cfe(0x139)](_0x439cfe(0x116))[_0x439cfe(0x13d)]();if(!_0x278fa9)throw CliErrors['validation'](_0x439cfe(0x125));let _0x2147c6;try{_0x2147c6=JSON['parse'](_0x278fa9);}catch{throw CliErrors[_0x439cfe(0x128)](_0x439cfe(0x147));}if(!Array[_0x439cfe(0x134)](_0x2147c6))throw CliErrors[_0x439cfe(0x128)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');return{'appCode':_0x567296,'appName':_0x1a0ba1,'resources':validateResources(_0x2147c6)};}export const menuSubappAssetsUpdate={'service':'menu','command':a189_0x4021fc(0x114),'description':a189_0x4021fc(0x14b),'risk':a189_0x4021fc(0x10f),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a189_0x4021fc(0x116),'type':a189_0x4021fc(0x123),'required':!![],'description':a189_0x4021fc(0x142)},{'name':a189_0x4021fc(0x153),'type':a189_0x4021fc(0x123),'description':'Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes'}],async 'validate'(_0x5399b1){flags(_0x5399b1);},async 'dryRun'(_0x5a5481){const _0x2b8974=a189_0x4021fc,{appCode:_0x49b951,appName:_0x59d37d,resources:_0x5836b5}=flags(_0x5a5481),_0x13e087=await getSmartAppRecord(_0x49b951,_0x5a5481[_0x2b8974(0x12d)]),_0x2c4f6e=prepare(_0x13e087,_0x59d37d,_0x5836b5);return{'method':_0x2b8974(0x117),'url':_0x2b8974(0x141),'body':{'preview':{'appCode':_0x49b951,'appName':_0x59d37d,'before':_0x2c4f6e[_0x2b8974(0x137)],'after':_0x5836b5,'expectedHash':_0x2c4f6e[_0x2b8974(0x159)],'unchanged':_0x2c4f6e[_0x2b8974(0x119)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x2c4f6e[_0x2b8974(0x119)]?_0x2b8974(0x12f):_0x2b8974(0x13e)+_0x59d37d+'.'};},async 'execute'(_0x3c4c7d){const _0x5a62ba=a189_0x4021fc,{appCode:_0x4f13db,appName:_0x1e3425,resources:_0x424b72}=flags(_0x3c4c7d),_0x6518f7=_0x3c4c7d[_0x5a62ba(0x139)](_0x5a62ba(0x153))[_0x5a62ba(0x13d)]();if(!/^[a-f0-9]{64}$/i[_0x5a62ba(0x13c)](_0x6518f7))throw CliErrors['validation'](_0x5a62ba(0x11d));const _0xd5223c=await getSmartAppRecord(_0x4f13db,_0x3c4c7d['cookie']),_0x187e1f=prepare(_0xd5223c,_0x1e3425,_0x424b72);if(_0x6518f7!==_0x187e1f[_0x5a62ba(0x159)])throw CliErrors[_0x5a62ba(0x128)](_0x5a62ba(0x138));if(_0x187e1f['unchanged'])return{'ok':!![],'data':{'appCode':_0x4f13db,'appName':_0x1e3425,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x5a62ba(0x156)};await updateSmartAppRecord({'id':_0xd5223c['id'],'appCode':_0x4f13db,'appPublishStatus':_0xd5223c[_0x5a62ba(0x135)],'extend':_0x187e1f[_0x5a62ba(0x143)]},_0x3c4c7d[_0x5a62ba(0x12d)]);const _0x465e00=await getSmartAppRecord(_0x4f13db,_0x3c4c7d[_0x5a62ba(0x12d)]),_0x2d9953=parseObject(_0x465e00[_0x5a62ba(0x132)],_0x5a62ba(0x11b));if(_0x465e00['id']!==_0xd5223c['id']||_0x465e00[_0x5a62ba(0x135)]!==_0xd5223c[_0x5a62ba(0x135)]||!isDeepStrictEqual(_0x2d9953,_0x187e1f[_0x5a62ba(0x143)]))throw CliErrors[_0x5a62ba(0x115)](_0x5a62ba(0x130));return{'ok':!![],'data':{'appCode':_0x4f13db,'appName':_0x1e3425,'updated':!![],'resources':_0x424b72,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':'Updated\x20shared\x20resources\x20for\x20'+_0x1e3425+'\x20in\x20menu\x20host\x20'+_0x4f13db+_0x5a62ba(0x13b)};}};
|
|
1
|
+
const a189_0x173114=a189_0x3ded;function a189_0x3ded(_0x16e367,_0x155aff){_0x16e367=_0x16e367-0xcd;const _0x54f9ae=a189_0x54f9();let _0x3dede4=_0x54f9ae[_0x16e367];return _0x3dede4;}(function(_0xffe137,_0x1d6a48){const _0x4721e9=a189_0x3ded,_0x262343=_0xffe137();while(!![]){try{const _0x472935=-parseInt(_0x4721e9(0x111))/0x1*(parseInt(_0x4721e9(0x116))/0x2)+parseInt(_0x4721e9(0x115))/0x3*(-parseInt(_0x4721e9(0xf8))/0x4)+-parseInt(_0x4721e9(0x101))/0x5+-parseInt(_0x4721e9(0x106))/0x6*(-parseInt(_0x4721e9(0xf6))/0x7)+-parseInt(_0x4721e9(0x114))/0x8+parseInt(_0x4721e9(0x10b))/0x9+-parseInt(_0x4721e9(0xea))/0xa*(-parseInt(_0x4721e9(0xcf))/0xb);if(_0x472935===_0x1d6a48)break;else _0x262343['push'](_0x262343['shift']());}catch(_0x5d3830){_0x262343['push'](_0x262343['shift']());}}}(a189_0x54f9,0x65c46));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a189_0x54f9(){const _0x368983=['parse','object','extend','apiError','4380867oPdwPG','enableSample','Updated\x20shared\x20resources\x20for\x20','resources','some','map','181126ttLzUV','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','assets','3936896KKvCrc','132ISvVfW','4MWqJlj','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','length','isArray','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','\x20must\x20be\x20a\x20JSON\x20object.','expected-hash','size','Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','has','expectedHash','subapp-assets-update','33yURQnY','appPublishStatus','update','accessKey',']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20','appName','enableOpenApi','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','verified\x20app.extend','Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','tenantColumn','nextExtend','appCode','directDbId','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','/smartapi/app/update','\x20contains\x20invalid\x20JSON.',';\x20independent\x20deployment\x20not\x20verified.','before','enableAutoSync','unchanged','string','resources[','App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.','6791610rJNZbM','not\x20HTTPS','skinColor','https:','keys','\x20must\x20be\x20a\x20JSON\x20array.','directDbEnabled','.\x20Refusing\x20update.','trim','cookie','protocol','entries','1337oyFHJA','stringify','58412otwxiM','app.extend.assets','test','join','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','app.extend','App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.','digest','sha256','3148060gCInDC','filter','validation','POST','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','600aVOhyu'];a189_0x54f9=function(){return _0x368983;};return a189_0x54f9();}import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set([a189_0x173114(0xec),a189_0x173114(0xd6),a189_0x173114(0xd2),a189_0x173114(0x113),a189_0x173114(0xdc),a189_0x173114(0x10c),'vipDeploy',a189_0x173114(0xe5),a189_0x173114(0xdf),a189_0x173114(0xf0)]);function parseObject(_0xfd4ba8,_0x3f7b3a){const _0x1b6578=a189_0x173114;let _0x410f20=_0xfd4ba8;if(typeof _0xfd4ba8===_0x1b6578(0xe7))try{_0x410f20=JSON[_0x1b6578(0x107)](_0xfd4ba8);}catch{throw CliErrors[_0x1b6578(0x103)](_0x3f7b3a+_0x1b6578(0xe2));}if(!_0x410f20||typeof _0x410f20!==_0x1b6578(0x108)||Array[_0x1b6578(0x11a)](_0x410f20))throw CliErrors['validation'](_0x3f7b3a+_0x1b6578(0x11c));return _0x410f20;}function parseArray(_0x128c76,_0x2619e5){const _0x294e7f=a189_0x173114;let _0xd47aea;try{_0xd47aea=JSON[_0x294e7f(0x107)](_0x128c76);}catch{throw CliErrors['validation'](_0x2619e5+_0x294e7f(0xe2));}if(!Array['isArray'](_0xd47aea))throw CliErrors[_0x294e7f(0x103)](_0x2619e5+_0x294e7f(0xef));return _0xd47aea['map']((_0xe17dd9,_0x2a9371)=>parseObject(_0xe17dd9,_0x2619e5+'['+_0x2a9371+']'));}function validateResources(_0x45c480){const _0x4da9ba=a189_0x173114;if(_0x45c480[_0x4da9ba(0x119)]===0x0)throw CliErrors[_0x4da9ba(0x103)](_0x4da9ba(0xdb));for(const [_0x2ed560,_0x10cbb7]of _0x45c480[_0x4da9ba(0xf5)]()){if(typeof _0x10cbb7!==_0x4da9ba(0xe7))throw CliErrors[_0x4da9ba(0x103)](_0x4da9ba(0xe8)+_0x2ed560+']\x20must\x20be\x20a\x20URL\x20string.');try{if(new URL(_0x10cbb7)[_0x4da9ba(0xf4)]!==_0x4da9ba(0xed))throw new Error(_0x4da9ba(0xeb));}catch{throw CliErrors[_0x4da9ba(0x103)](_0x4da9ba(0xe8)+_0x2ed560+_0x4da9ba(0xd3));}}if(new Set(_0x45c480)[_0x4da9ba(0x11e)]!==_0x45c480['length']||!_0x45c480[_0x4da9ba(0x10f)](_0x3cf57e=>/\.m?js(?:[?#]|$)/i[_0x4da9ba(0xfa)](_0x3cf57e)))throw CliErrors[_0x4da9ba(0x103)](_0x4da9ba(0x105));return _0x45c480;}function prepare(_0x8a1dbe,_0x9571ed,_0x557774){const _0x17ec07=a189_0x173114;if(!Number['isSafeInteger'](_0x8a1dbe['id'])||(_0x8a1dbe['id']??0x0)<=0x0||typeof _0x8a1dbe[_0x17ec07(0xd0)]!=='string'||!_0x8a1dbe[_0x17ec07(0xd0)])throw CliErrors['validation'](_0x17ec07(0x117));const _0x58d3d5=parseObject(_0x8a1dbe[_0x17ec07(0x109)],_0x17ec07(0xfd)),_0x1e8b80=Object[_0x17ec07(0xee)](_0x58d3d5)[_0x17ec07(0x102)](_0x42b69f=>!KNOWN_EXTEND_KEYS[_0x17ec07(0x120)](_0x42b69f));if(_0x1e8b80[_0x17ec07(0x119)])throw CliErrors['validation']('Unknown\x20app.extend\x20fields:\x20'+_0x1e8b80[_0x17ec07(0xfb)](',\x20')+_0x17ec07(0xf1));if(typeof _0x58d3d5[_0x17ec07(0x113)]!=='string')throw CliErrors[_0x17ec07(0x103)](_0x17ec07(0x11b));const _0x4b9aee=parseArray(_0x58d3d5['assets'],_0x17ec07(0xf9)),_0x5dd905=_0x4b9aee[_0x17ec07(0x102)](_0x4894dd=>_0x4894dd[_0x17ec07(0xd5)]===_0x9571ed);if(_0x5dd905[_0x17ec07(0x119)]!==0x1)throw CliErrors[_0x17ec07(0x103)](_0x17ec07(0xd4)+_0x9571ed+';\x20found\x20'+_0x5dd905[_0x17ec07(0x119)]+'.');const _0x5bd5f0=_0x5dd905[0x0];if(typeof _0x5bd5f0[_0x17ec07(0x10e)]!=='string')throw CliErrors['validation'](_0x17ec07(0xfc));let _0x5b0384;try{_0x5b0384=JSON[_0x17ec07(0x107)](_0x5bd5f0[_0x17ec07(0x10e)]);}catch{throw CliErrors[_0x17ec07(0x103)]('Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.');}if(!Array[_0x17ec07(0x11a)](_0x5b0384)||_0x5b0384[_0x17ec07(0x10f)](_0x1957c3=>typeof _0x1957c3!==_0x17ec07(0xe7)))throw CliErrors[_0x17ec07(0x103)](_0x17ec07(0xe0));const _0x1460fa=_0x4b9aee[_0x17ec07(0x110)](_0x3a1941=>_0x3a1941===_0x5bd5f0?{..._0x3a1941,'resources':JSON[_0x17ec07(0xf7)](_0x557774)}:_0x3a1941),_0x57cef7={..._0x58d3d5,'assets':JSON['stringify'](_0x1460fa)},_0x2e7a33=createHash(_0x17ec07(0x100))[_0x17ec07(0xd1)](JSON['stringify']({'appCode':_0x8a1dbe[_0x17ec07(0xde)],'id':_0x8a1dbe['id'],'appPublishStatus':_0x8a1dbe[_0x17ec07(0xd0)],'extend':_0x58d3d5,'appName':_0x9571ed,'resources':_0x557774}))[_0x17ec07(0xff)]('hex');return{'before':_0x5b0384,'nextExtend':_0x57cef7,'expectedHash':_0x2e7a33,'unchanged':isDeepStrictEqual(_0x5b0384,_0x557774)};}function flags(_0x198647){const _0x22872a=a189_0x173114,{appCode:_0x2a9c90,appName:_0x361ade}=getSubappSelector(_0x198647),_0x4622d3=_0x198647['str'](_0x22872a(0x10e))['trim']();if(!_0x4622d3)throw CliErrors['validation']('--resources\x20is\x20required.');let _0x313574;try{_0x313574=JSON[_0x22872a(0x107)](_0x4622d3);}catch{throw CliErrors[_0x22872a(0x103)](_0x22872a(0xd8));}if(!Array[_0x22872a(0x11a)](_0x313574))throw CliErrors[_0x22872a(0x103)](_0x22872a(0xd8));return{'appCode':_0x2a9c90,'appName':_0x361ade,'resources':validateResources(_0x313574)};}export const menuSubappAssetsUpdate={'service':'menu','command':a189_0x173114(0xce),'description':a189_0x173114(0x11f),'risk':'write','strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a189_0x173114(0x10e),'type':'string','required':!![],'description':'JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs'},{'name':a189_0x173114(0x11d),'type':'string','description':a189_0x173114(0xda)}],async 'validate'(_0x30f9c5){flags(_0x30f9c5);},async 'dryRun'(_0x27d8c5){const _0x3de34c=a189_0x173114,{appCode:_0x27becb,appName:_0x488287,resources:_0x25a351}=flags(_0x27d8c5),_0x462572=await getSmartAppRecord(_0x27becb,_0x27d8c5[_0x3de34c(0xf3)]),_0x445d73=prepare(_0x462572,_0x488287,_0x25a351);return{'method':_0x3de34c(0x104),'url':_0x3de34c(0xe1),'body':{'preview':{'appCode':_0x27becb,'appName':_0x488287,'before':_0x445d73[_0x3de34c(0xe4)],'after':_0x25a351,'expectedHash':_0x445d73[_0x3de34c(0xcd)],'unchanged':_0x445d73[_0x3de34c(0xe6)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x445d73['unchanged']?_0x3de34c(0xd7):'Would\x20update\x20shared\x20assets\x20for\x20'+_0x488287+'.'};},async 'execute'(_0x1e0f8d){const _0xae2df1=a189_0x173114,{appCode:_0x16fcf6,appName:_0x35ca3a,resources:_0x301268}=flags(_0x1e0f8d),_0x440145=_0x1e0f8d['str'](_0xae2df1(0x11d))[_0xae2df1(0xf2)]();if(!/^[a-f0-9]{64}$/i['test'](_0x440145))throw CliErrors[_0xae2df1(0x103)](_0xae2df1(0x112));const _0x5e3165=await getSmartAppRecord(_0x16fcf6,_0x1e0f8d['cookie']),_0x47ae9a=prepare(_0x5e3165,_0x35ca3a,_0x301268);if(_0x440145!==_0x47ae9a[_0xae2df1(0xcd)])throw CliErrors[_0xae2df1(0x103)](_0xae2df1(0xfe));if(_0x47ae9a[_0xae2df1(0xe6)])return{'ok':!![],'data':{'appCode':_0x16fcf6,'appName':_0x35ca3a,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0xae2df1(0x118)};await updateSmartAppRecord({'id':_0x5e3165['id'],'appCode':_0x16fcf6,'appPublishStatus':_0x5e3165[_0xae2df1(0xd0)],'extend':_0x47ae9a['nextExtend']},_0x1e0f8d[_0xae2df1(0xf3)]);const _0x3ee574=await getSmartAppRecord(_0x16fcf6,_0x1e0f8d['cookie']),_0x4049cf=parseObject(_0x3ee574[_0xae2df1(0x109)],_0xae2df1(0xd9));if(_0x3ee574['id']!==_0x5e3165['id']||_0x3ee574['appPublishStatus']!==_0x5e3165[_0xae2df1(0xd0)]||!isDeepStrictEqual(_0x4049cf,_0x47ae9a[_0xae2df1(0xdd)]))throw CliErrors[_0xae2df1(0x10a)](_0xae2df1(0xe9));return{'ok':!![],'data':{'appCode':_0x16fcf6,'appName':_0x35ca3a,'updated':!![],'resources':_0x301268,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0xae2df1(0x10d)+_0x35ca3a+'\x20in\x20menu\x20host\x20'+_0x16fcf6+_0xae2df1(0xe3)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a190_0x3c0759=a190_0x1924;(function(_0x465244,_0x572b19){const _0x256cbe=a190_0x1924,_0x1bd217=_0x465244();while(!![]){try{const _0x5dce68=parseInt(_0x256cbe(0x140))/0x1+-parseInt(_0x256cbe(0x13e))/0x2+parseInt(_0x256cbe(0x179))/0x3+-parseInt(_0x256cbe(0x17b))/0x4+parseInt(_0x256cbe(0x16d))/0x5*(parseInt(_0x256cbe(0x158))/0x6)+-parseInt(_0x256cbe(0x15f))/0x7+parseInt(_0x256cbe(0x145))/0x8;if(_0x5dce68===_0x572b19)break;else _0x1bd217['push'](_0x1bd217['shift']());}catch(_0x4dd8d3){_0x1bd217['push'](_0x1bd217['shift']());}}}(a190_0x5067,0xe0140));import a190_0x11d2c1 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';function a190_0x1924(_0x5b22b2,_0x57c65c){_0x5b22b2=_0x5b22b2-0x137;const _0x50672d=a190_0x5067();let _0x19242a=_0x50672d[_0x5b22b2];return _0x19242a;}import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':'menu','command':'sync','description':'Register\x20local\x20pages\x20as\x20platform\x20menus','risk':a190_0x3c0759(0x144),'flags':[{'name':'params','type':a190_0x3c0759(0x178),'description':a190_0x3c0759(0x139)+a190_0x3c0759(0x15b)},{'name':a190_0x3c0759(0x14c),'type':a190_0x3c0759(0x178),'description':a190_0x3c0759(0x142)},{'name':a190_0x3c0759(0x16f),'type':'boolean','description':a190_0x3c0759(0x16e)}],async 'dryRun'(_0x5e8eae){const _0x1d4469=a190_0x3c0759;ensureRunnableContext(_0x5e8eae['rawFlags'],_0x5e8eae['selectedAppName']);const _0x592a9d=await runMenuSyncCore(_0x5e8eae[_0x1d4469(0x171)],_0x5e8eae[_0x1d4469(0x173)],parsePaths(_0x5e8eae['str'](_0x1d4469(0x14c))),_0x5e8eae[_0x1d4469(0x177)]('params'),{'dryRun':!![]});return{'method':_0x1d4469(0x162),'url':_0x1d4469(0x141),'body':_0x592a9d,'description':_0x592a9d[_0x1d4469(0x166)]?_0x1d4469(0x164):_0x1d4469(0x16b)+_0x592a9d[_0x1d4469(0x155)][_0x1d4469(0x165)]+_0x1d4469(0x172)};},async 'execute'(_0x5debf7){const _0x4a42a1=a190_0x3c0759;ensureRunnableContext(_0x5debf7[_0x4a42a1(0x176)],_0x5debf7[_0x4a42a1(0x14f)]);const _0x35b42e=_0x5debf7[_0x4a42a1(0x174)](_0x4a42a1(0x16f)),_0x177466=_0x5debf7['str']('params'),_0x371517=parsePaths(_0x5debf7[_0x4a42a1(0x177)](_0x4a42a1(0x14c))),_0x5d8180=parseMenuSyncParams(_0x177466);if(_0x35b42e){const _0x56b75c=await runMenuSyncCore(_0x5debf7['appCode'],_0x5debf7[_0x4a42a1(0x173)],_0x371517,_0x177466);if(_0x56b75c[_0x4a42a1(0x166)]){const _0x5adae0=getLocalPages();_0x5adae0[_0x4a42a1(0x165)]===0x0?writeCliSideChannelLine(_0x4a42a1(0x148)):writeCliSideChannelLine(_0x4a42a1(0x143));}else writeCliSideChannelLine(_0x4a42a1(0x137)+_0x56b75c[_0x4a42a1(0x17c)]+_0x4a42a1(0x16c));return{'ok':!![],'data':_0x56b75c,'message':_0x56b75c[_0x4a42a1(0x166)]?_0x4a42a1(0x154):_0x4a42a1(0x14e)+_0x56b75c['created']+'\x20created.'};}if(_0x371517['length']>0x0)throw CliErrors[_0x4a42a1(0x168)](_0x4a42a1(0x175),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x177466)throw CliErrors[_0x4a42a1(0x168)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x4a42a1(0x157));requireInteractive(),writeCliSideChannelLine('Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.');const _0x24720e=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x45d31e,_0xbd0897,_0x2678d3;try{const _0x4633e6=await fetchMenuData(_0x5debf7[_0x4a42a1(0x171)],_0x5debf7[_0x4a42a1(0x173)]);_0x45d31e=_0x4633e6['localPages'],_0xbd0897=_0x4633e6['onlinePaths'],_0x2678d3=_0x4633e6[_0x4a42a1(0x15d)],stopSpinner(_0x24720e,_0x4a42a1(0x149),!![]);}catch(_0x2fbaea){stopSpinner(_0x24720e,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x4a42a1(0x168)](_0x2fbaea instanceof Error?_0x2fbaea[_0x4a42a1(0x16a)]:_0x4a42a1(0x13c));}if(_0x45d31e[_0x4a42a1(0x165)]===0x0)return writeCliSideChannelLine(a190_0x11d2c1[_0x4a42a1(0x170)](_0x4a42a1(0x159))),{'ok':!![]};const _0x2f0963=buildCompareRows(_0x45d31e,_0xbd0897);writeCliSideChannelLine(renderCompareTable(_0x2f0963)),writeCliSideChannelLine('');const _0x15cb96=await selectPages(_0x45d31e,_0xbd0897);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0x11d2c1[_0x4a42a1(0x13b)]('\x20\x20✓\x20Selected:\x20'+_0x15cb96[_0x4a42a1(0x165)]+_0x4a42a1(0x14a)));const _0x2e9d42=_0x5d8180[_0x4a42a1(0x150)]&&_0x5d8180[_0x4a42a1(0x167)];if(!_0x2e9d42){writeCliSideChannelLine(renderSyncSummary(_0x15cb96,_0xbd0897['size']>0x0));const _0x1e2059=await askConfirm(_0x4a42a1(0x15a));if(!_0x1e2059)return writeCliSideChannelLine(a190_0x11d2c1['gray'](_0x4a42a1(0x138))),{'ok':!![]};}let _0x9c5aef=_0x5d8180[_0x4a42a1(0x150)],_0x581dc8=_0x5d8180[_0x4a42a1(0x167)];!_0x9c5aef&&!_0x5d8180['appName']&&(_0x9c5aef=await askJsUrl());!_0x581dc8&&!_0x5d8180[_0x4a42a1(0x160)]&&(_0x581dc8=await askCssUrl());const _0xba54be=await askConfirm(_0x5d8180[_0x4a42a1(0x160)]?_0x4a42a1(0x147)+_0x15cb96[_0x4a42a1(0x165)]+_0x4a42a1(0x17a)+_0x5d8180[_0x4a42a1(0x160)]+'?':_0x4a42a1(0x147)+_0x15cb96['length']+_0x4a42a1(0x161)+_0x9c5aef+_0x4a42a1(0x151)+_0x581dc8+'?');if(!_0xba54be)return writeCliSideChannelLine(a190_0x11d2c1[_0x4a42a1(0x153)](_0x4a42a1(0x138))),{'ok':!![]};const _0x54ba47=[_0x9c5aef,_0x581dc8][_0x4a42a1(0x15c)](_0xf68afe=>Boolean(_0xf68afe));_0x5d8180[_0x4a42a1(0x160)]&&_0x54ba47['length']===0x0&&await assertSharedResourcesConfigured(_0x5debf7[_0x4a42a1(0x171)],_0x5debf7[_0x4a42a1(0x173)],_0x5d8180['appName']);const _0x3f1023=startSpinner(_0x4a42a1(0x146)+_0x15cb96[_0x4a42a1(0x165)]+_0x4a42a1(0x163));try{const _0x9ce2ca=_0x15cb96[_0x4a42a1(0x13a)](_0x2aa854=>resolvePage(_0x2aa854,_0x5d8180,_0x2678d3)),_0x58652b=await doCreateMenus(_0x5debf7[_0x4a42a1(0x171)],_0x5debf7[_0x4a42a1(0x173)],_0x9ce2ca,_0x54ba47,_0x5d8180[_0x4a42a1(0x160)]?{'appName':_0x5d8180['appName']}:undefined);return stopSpinner(_0x3f1023,_0x4a42a1(0x156)+_0x58652b[_0x4a42a1(0x17c)]+_0x4a42a1(0x13d),!![]),{'ok':!![],'data':_0x58652b,'message':_0x4a42a1(0x14e)+_0x58652b[_0x4a42a1(0x17c)]+_0x4a42a1(0x15e)+_0x58652b[_0x4a42a1(0x13f)]+_0x4a42a1(0x169)};}catch(_0x3c2d99){stopSpinner(_0x3f1023,_0x4a42a1(0x17d),![]);throw CliErrors[_0x4a42a1(0x168)](_0x3c2d99 instanceof Error?_0x3c2d99[_0x4a42a1(0x16a)]:_0x4a42a1(0x17d));}}};function ensureRunnableContext(_0x9b6790,_0x3faa3d){const _0x5509f1=a190_0x3c0759,_0x99c357=_0x9b6790['appcode']?String(_0x9b6790[_0x5509f1(0x152)])[_0x5509f1(0x14b)]():'';if(!isInProject()&&!_0x3faa3d&&!_0x99c357)throw CliErrors[_0x5509f1(0x168)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x5509f1(0x14d));}function parsePaths(_0x51c853){const _0x25cb6a=a190_0x3c0759;return[...new Set(_0x51c853['split'](',')[_0x25cb6a(0x13a)](_0x44f88a=>_0x44f88a['trim']())[_0x25cb6a(0x15c)](Boolean))];}function a190_0x5067(){const _0x55ce85=['1744060ZMQSVY','failed','631657jazaoV','/smartapi/menu/create','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','write','7660152xEnhJU','Creating\x20','\x20\x20Create\x20','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','Online\x20menu\x20list\x20fetched','\x20page(s)','trim','paths','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','Menu\x20sync\x20completed:\x20','selectedAppName','jsUrl','\x20and\x20CSS:\x20','appcode','gray','Menu\x20sync\x20skipped','targetPages','Created\x20','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','11706zQdAOw','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','\x20\x20Continue\x20with\x20creation?','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','filter','onlineMenuList','\x20created,\x20','11281179fherfH','appName','\x20menu(s)\x20with\x20JS:\x20','POST','\x20menu(s)...','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','length','skipped','cssUrl','validation','\x20failed.','message','Would\x20create\x20','\x20menu(s)\x20created','2875lVEDyj','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','yes','yellow','appCode','\x20local\x20microfrontend\x20menu(s).','cookie','flag','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','rawFlags','str','string','3344178ycYncI','\x20menu(s)\x20bound\x20to\x20','1697104lQFPAO','created','Menu\x20creation\x20failed','✓\x20Menu\x20sync\x20completed:\x20','\x20\x20Cancelled.','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','map','cyan','Failed\x20to\x20fetch\x20online\x20menu\x20list','\x20menu(s)'];a190_0x5067=function(){return _0x55ce85;};return a190_0x5067();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a191_0x553e7a=a191_0x17ed;(function(_0x25bf04,_0x5c7c37){const _0x3b9b00=a191_0x17ed,_0x41800c=_0x25bf04();while(!![]){try{const _0x31f4f4=-parseInt(_0x3b9b00(0xf0))/0x1*(parseInt(_0x3b9b00(0xb7))/0x2)+parseInt(_0x3b9b00(0xfd))/0x3+parseInt(_0x3b9b00(0xb1))/0x4+parseInt(_0x3b9b00(0xc3))/0x5+parseInt(_0x3b9b00(0xe5))/0x6+parseInt(_0x3b9b00(0xf1))/0x7*(-parseInt(_0x3b9b00(0x101))/0x8)+parseInt(_0x3b9b00(0xbc))/0x9*(-parseInt(_0x3b9b00(0xf7))/0xa);if(_0x31f4f4===_0x5c7c37)break;else _0x41800c['push'](_0x41800c['shift']());}catch(_0x440543){_0x41800c['push'](_0x41800c['shift']());}}}(a191_0x3b68,0x59462));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_0x553e7a(0xb2),'path':a191_0x553e7a(0x12f)}];export const menuVisibilityUpdate={'service':a191_0x553e7a(0x112),'command':a191_0x553e7a(0x117),'description':a191_0x553e7a(0xff),'risk':a191_0x553e7a(0xf2),'structuredErrors':!![],'flags':[{'name':a191_0x553e7a(0xd4),'type':'string','description':a191_0x553e7a(0xbb)},{'name':a191_0x553e7a(0xcc),'type':a191_0x553e7a(0x103),'description':a191_0x553e7a(0x131)},{'name':a191_0x553e7a(0xe1),'type':a191_0x553e7a(0x121),'required':!![],'description':a191_0x553e7a(0xf5)},{'name':a191_0x553e7a(0xe6),'type':a191_0x553e7a(0x121),'description':a191_0x553e7a(0xe2)},{'name':a191_0x553e7a(0x110),'type':'number','description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xc8280e){parseInput(_0xc8280e);},async 'dryRun'(_0x5a5b81){const _0xa917c2=a191_0x553e7a,_0x4ab707=await buildPlan(_0x5a5b81,!![]),_0x1a1b68=_0x4ab707[_0xa917c2(0x126)]['plannedActions']?.['length']??0x0,_0x4cfdc6=_0x4ab707['plan'][_0xa917c2(0x127)]['length']-_0x1a1b68;return menuDryRunResult(_0x4ab707[_0xa917c2(0x126)],{'method':_0xa917c2(0xb2),'url':'/smartapi/menu/update','body':{'updates':_0x4ab707[_0xa917c2(0x126)]['plannedActions']?.[_0xa917c2(0x122)](_0xff1fb6=>_0xff1fb6[_0xa917c2(0xe0)])??[]},'description':_0xa917c2(0xb8)+_0x1a1b68+_0xa917c2(0x104)+_0x4cfdc6+_0xa917c2(0x120)});},async 'execute'(_0x332c9d){const _0x1dd85b=a191_0x553e7a,_0x1d22f1=await buildPlan(_0x332c9d,![]);await recheckMutationSnapshot(_0x332c9d,_0x1d22f1[_0x1dd85b(0x126)],_0x1dd85b(0x12e));const _0x564fd5=[],_0x12b34d=[],_0x1b0c5d=[];for(const _0x2f1975 of _0x1d22f1['plan'][_0x1dd85b(0x127)]){if(_0x2f1975[_0x1dd85b(0xeb)][_0x1dd85b(0xe1)]===_0x1d22f1[_0x1dd85b(0x126)]['requestedVisible']){_0x564fd5[_0x1dd85b(0xef)]({'id':_0x2f1975['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x332c9d[_0x1dd85b(0xf8)],_0x332c9d['cookie'],{'id':_0x2f1975['id'],'visible':_0x1d22f1[_0x1dd85b(0x126)][_0x1dd85b(0x114)]}),_0x564fd5[_0x1dd85b(0xef)]({'id':_0x2f1975['id'],'updated':!![],'skipped':![]});}catch(_0x5fdbaa){const _0x23200c=mapMenuApiError(_0x5fdbaa,_0x1dd85b(0xdb),_0x2f1975['id']);if(isMenuResponseLoss(_0x5fdbaa)&&_0x23200c['code']!==_0x1dd85b(0x118)){_0x1b0c5d[_0x1dd85b(0xef)](_0x2f1975['id']);continue;}_0x12b34d['push']({'id':_0x2f1975['id'],'stage':_0x1dd85b(0xe3),'code':_0x23200c['code'],'message':_0x23200c[_0x1dd85b(0xfc)]});}}let _0x33b473;try{_0x33b473=await fetchMenuSnapshot(_0x332c9d[_0x1dd85b(0xf8)],_0x332c9d[_0x1dd85b(0xcd)]);}catch(_0x47e230){const _0x8ac113=describeMenuErrorCause(_0x47e230,_0x1dd85b(0x132)),_0x30c9ab=_0x1b0c5d[_0x1dd85b(0x122)](_0x21ad01=>({'id':_0x21ad01,'stage':_0x1dd85b(0x102),'code':_0x1dd85b(0xc4),'message':_0x1dd85b(0x12c)+_0x21ad01+_0x1dd85b(0xdc),'requestedStateConfirmed':![],'recovered':![]})),_0x36c9ad={'stage':'verification','code':_0x1dd85b(0xc4),'message':_0x1dd85b(0xd6),'targetIds':_0x1d22f1[_0x1dd85b(0x126)][_0x1dd85b(0x127)][_0x1dd85b(0x122)](_0xf786dd=>_0xf786dd['id']),'requestedStateConfirmed':![],..._0x8ac113};throw menuFailure(asVerificationError(_0x47e230,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x1d22f1[_0x1dd85b(0x126)],{'stage':_0x1dd85b(0xc6),'succeeded':_0x564fd5,'failedRecords':[..._0x12b34d,..._0x30c9ab,_0x36c9ad],'warnings':[_0x1dd85b(0x12b)],'verification':{'status':_0x1dd85b(0x10b),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x3bb3a9=[];for(const _0x2efef7 of _0x564fd5){const _0x4e1bc1=Number(_0x2efef7['id']),_0x54e1c6=_0x1d22f1['beforeById'][_0x1dd85b(0xc8)](_0x4e1bc1),_0x1c0927=_0x33b473[_0x1dd85b(0x11e)]['get'](_0x4e1bc1);try{verifyVisibilityUpdate(_0x54e1c6,_0x1c0927,_0x1d22f1[_0x1dd85b(0x126)][_0x1dd85b(0x114)]);}catch(_0x3eeb87){const _0x144822=asVerificationError(_0x3eeb87,_0x1dd85b(0x129)+_0x4e1bc1+_0x1dd85b(0x11b));_0x3bb3a9[_0x1dd85b(0xef)]({'id':_0x4e1bc1,'stage':'verification','code':_0x144822[_0x1dd85b(0xca)],'message':_0x144822[_0x1dd85b(0xfc)],'requestedStateConfirmed':![]});}}for(const _0x2723f5 of _0x1b0c5d){const _0x2ea9a0=_0x1d22f1[_0x1dd85b(0xe8)][_0x1dd85b(0xc8)](_0x2723f5),_0xc8d215=_0x33b473[_0x1dd85b(0x11e)][_0x1dd85b(0xc8)](_0x2723f5);try{verifyVisibilityUpdate(_0x2ea9a0,_0xc8d215,_0x1d22f1[_0x1dd85b(0x126)][_0x1dd85b(0x114)]),_0x564fd5[_0x1dd85b(0xef)]({'id':_0x2723f5,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x5907d5){const _0xd72dfc=asVerificationError(_0x5907d5,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x2723f5+_0x1dd85b(0x11d));_0x3bb3a9[_0x1dd85b(0xef)]({'id':_0x2723f5,'stage':_0x1dd85b(0x102),'code':_0xd72dfc[_0x1dd85b(0xca)],'message':_0xd72dfc[_0x1dd85b(0xfc)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x3bb3a9[_0x1dd85b(0xc2)]>0x0){const _0x5ef956=_0x3bb3a9[_0x1dd85b(0x122)](_0x595645=>Number(_0x595645['id'])),_0x4f1fd0=_0x564fd5['filter'](_0x5a6290=>_0x5a6290[_0x1dd85b(0xfa)]===!![])['length'],_0x498e52=menuError('menu_verification_failed',_0x1dd85b(0xc9)+_0x5ef956['join'](',\x20')+'.',_0x1dd85b(0xf6));throw menuFailure(_0x498e52,_0x1d22f1['plan'],{'stage':_0x1dd85b(0xc6),'succeeded':_0x564fd5,'failedRecords':[..._0x12b34d,..._0x3bb3a9],'warnings':[_0x1dd85b(0x113)],'verification':{'status':'failed',..._0x5ef956[_0x1dd85b(0xc2)]===0x1?{'targetId':_0x5ef956[0x0]}:{'targetIds':_0x5ef956},'recoveredCount':_0x4f1fd0,'lookupCommand':_0x1dd85b(0xea)}});}const _0x77da19=_0x564fd5[_0x1dd85b(0xe7)](_0x4336f2=>_0x4336f2[_0x1dd85b(0xd0)]===!![])[_0x1dd85b(0xc2)],_0x4ae214=_0x564fd5[_0x1dd85b(0xc2)]-_0x77da19,_0x2425e9={..._0x1d22f1[_0x1dd85b(0x126)],'succeeded':_0x564fd5,'failed':_0x12b34d,'warnings':_0x12b34d[_0x1dd85b(0xc2)]>0x0?[..._0x1d22f1['plan'][_0x1dd85b(0xde)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x1d22f1[_0x1dd85b(0x126)][_0x1dd85b(0xde)],'verification':{'checkedBy':_0x1dd85b(0xf9),'snapshotHash':_0x33b473[_0x1dd85b(0x125)],'matchesRequestedState':_0x12b34d['length']===0x0,'recoveredCount':_0x1b0c5d[_0x1dd85b(0xc2)]}};return{'ok':_0x12b34d[_0x1dd85b(0xc2)]===0x0,'data':_0x2425e9,'message':_0x12b34d[_0x1dd85b(0xc2)]===0x0?_0x1dd85b(0x10c)+_0x77da19+_0x1dd85b(0x111)+_0x4ae214+_0x1dd85b(0x120):_0x1dd85b(0xf3)+_0x77da19+_0x1dd85b(0x10d)+_0x4ae214+'\x20skipped,\x20'+_0x12b34d[_0x1dd85b(0xc2)]+_0x1dd85b(0x108)};}};function parseInput(_0x37d528){const _0x20d0f7=a191_0x553e7a,_0x4ee462=parseMenuIds(_0x37d528[_0x20d0f7(0xc1)](_0x20d0f7(0xd4))),_0x58024a=parseCsv(_0x37d528[_0x20d0f7(0xc1)](_0x20d0f7(0xcc)));if(_0x4ee462[_0x20d0f7(0xc2)]===0x0&&_0x58024a[_0x20d0f7(0xc2)]===0x0)throw CliErrors['validation'](_0x20d0f7(0x12a));const _0x3bb244=parseBooleanFlag(_0x37d528,_0x20d0f7(0xe1),!![]),_0x471dad=parseBooleanFlag(_0x37d528,_0x20d0f7(0xe6),![]);let _0x4729a3;if(hasFlag(_0x37d528,_0x20d0f7(0x110))){_0x4729a3=_0x37d528[_0x20d0f7(0xbd)](_0x20d0f7(0x110));if(!Number[_0x20d0f7(0xf4)](_0x4729a3)||_0x4729a3<0x0)throw CliErrors[_0x20d0f7(0xfe)](_0x20d0f7(0x124));}return{'menuIds':_0x4ee462,'paths':_0x58024a,'visible':_0x3bb244,'expectVisible':_0x471dad,'expectedCount':_0x4729a3};}function a191_0x3b68(){const _0x79cf56=['datasetCode','update-menu-visibility','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','type','update\x20visibility\x20for','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','resourcesValid','warnings','label','body','visible','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','update','Selected\x20','4242030qRQJdV','expect-visible','filter','beforeById','\x20must\x20be\x20true\x20or\x20false.','rabetbase\x20menu\x20list\x20--format\x20compress','before','flagMissing','pageId','datasetId','push','13576ULXGbl','288631zKJDNK','write','Menu\x20visibility\x20update\x20completed:\x20','isSafeInteger','Requested\x20menu\x20visibility','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','37780oXArcR','appCode','menu\x20list','recovered','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','message','716991AaJulq','validation','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','sort','24ZHeeFc','update-recovery','string','\x20menu(s);\x20skip\x20','url','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Menu\x20id\x20selector(s)\x20not\x20found:\x20','\x20failed.','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','menu_selector_not_found','failed','Updated\x20visibility\x20for\x20','\x20updated,\x20','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','expected-count','\x20menu(s);\x20skipped\x20','menu','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','requestedVisible','modelType','menus','visibility-update','menu_permission_denied','path','some','\x20visibility\x20update\x20could\x20not\x20be\x20verified','parentId','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','byId','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','\x20unchanged\x20menu(s).','boolean','map','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','hash','plan','targets','join','Menu\x20','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Response\x20was\x20lost\x20for\x20menu\x20','true','update\x20menu\x20visibility','/smartapi/menu/update','menu_state_drift','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','verify\x20menu\x20visibility\x20update','false','pageType','2306832QXfgoE','POST','set','menu_expected_count_mismatch','expectedCount','has','64Pnktxd','Would\x20update\x20visibility\x20for\x20','depth','menuIds','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','1836kAaUrm','num','stringify','split','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','str','length','858995gQXpJR','menu_verification_failed','rawFlags','verification','expectVisible','get','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','code','resources','paths','cookie','childrenIds','values','updated','menu_selector_ambiguous','childrenCount','trim','menu-ids','isArray','Final\x20menu\x20visibility\x20readback\x20failed.'];a191_0x3b68=function(){return _0x79cf56;};return a191_0x3b68();}async function buildPlan(_0x15381b,_0x3fccd9){const _0x4ac765=a191_0x553e7a,_0x264498=parseInput(_0x15381b),_0x3fcb45=await fetchMutationSnapshot(_0x15381b,'update\x20menu\x20visibility'),_0x2d78a1=selectTargets(_0x3fcb45[_0x4ac765(0x116)],_0x264498['menuIds'],_0x264498[_0x4ac765(0xcc)]);if(_0x264498[_0x4ac765(0xb5)]!==undefined&&_0x2d78a1[_0x4ac765(0xc2)]!==_0x264498[_0x4ac765(0xb5)])throw menuError(_0x4ac765(0xb4),_0x4ac765(0xe4)+_0x2d78a1['length']+'\x20menu(s),\x20expected\x20'+_0x264498['expectedCount']+'.',_0x4ac765(0x10f));if(_0x264498[_0x4ac765(0xc7)]!==undefined){const _0x493dfb=_0x2d78a1[_0x4ac765(0xe7)](_0x2c209b=>_0x2c209b[_0x4ac765(0xe1)]!==_0x264498[_0x4ac765(0xc7)]);if(_0x493dfb[_0x4ac765(0xc2)]>0x0)throw menuError(_0x4ac765(0x130),'Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x493dfb['map'](_0x3bc694=>_0x3bc694['id'])['join'](',\x20')+'.',_0x4ac765(0x123));}const _0xff84e3=_0x2d78a1[_0x4ac765(0x122)](_0x2d3b89=>({'id':_0x2d3b89['id'],'label':_0x2d3b89[_0x4ac765(0xdf)],'path':_0x2d3b89[_0x4ac765(0x119)],'before':{'visible':_0x2d3b89[_0x4ac765(0xe1)]},'after':{'visible':_0x264498[_0x4ac765(0xe1)]}})),_0x26cfd2=_0xff84e3[_0x4ac765(0xe7)](_0x4115c4=>_0x4115c4['before'][_0x4ac765(0xe1)]!==_0x264498[_0x4ac765(0xe1)])[_0x4ac765(0x122)](_0x5a888c=>({'stage':_0x4ac765(0xd8),'method':_0x4ac765(0xb2),'path':_0x4ac765(0x12f),'body':{'appCode':_0x15381b[_0x4ac765(0xf8)],'id':_0x5a888c['id'],'visible':_0x264498[_0x4ac765(0xe1)]}})),_0x19d598=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x264498[_0x4ac765(0xba)],'paths':_0x264498[_0x4ac765(0xcc)]},'before':{'menus':_0x2d78a1[_0x4ac765(0x122)](_0x5794fa=>({'id':_0x5794fa['id'],'path':_0x5794fa[_0x4ac765(0x119)],'visible':_0x5794fa[_0x4ac765(0xe1)]}))},'after':{'menus':_0x2d78a1[_0x4ac765(0x122)](_0x3f9d37=>({'id':_0x3f9d37['id'],'path':_0x3f9d37[_0x4ac765(0x119)],'visible':_0x264498[_0x4ac765(0xe1)]}))},'dryRun':_0x3fccd9,'backend':[...BACKEND],'plannedActions':_0x26cfd2,'snapshotHash':_0x3fcb45[_0x4ac765(0x125)],'warnings':_0x26cfd2[_0x4ac765(0xc2)]===0x0?[_0x4ac765(0x11f)]:[]});return{'plan':{..._0x19d598,'requestedVisible':_0x264498['visible'],'targets':_0xff84e3},'beforeById':new Map(_0x2d78a1[_0x4ac765(0x122)](_0xf2112c=>[_0xf2112c['id'],_0xf2112c]))};}function selectTargets(_0x72796d,_0x2666ff,_0x5b38a9){const _0x73dbb4=a191_0x553e7a,_0x39b7c6=new Map(_0x72796d[_0x73dbb4(0x122)](_0x628689=>[_0x628689['id'],_0x628689])),_0x5922eb=new Map(),_0x23ebe1=_0x2666ff[_0x73dbb4(0xe7)](_0x4ed564=>!_0x39b7c6[_0x73dbb4(0xb6)](_0x4ed564));if(_0x23ebe1['length']>0x0)throw menuError(_0x73dbb4(0x10a),_0x73dbb4(0x107)+_0x23ebe1['join'](',\x20')+'.',_0x73dbb4(0x106));for(const _0x3922b8 of _0x2666ff){_0x5922eb[_0x73dbb4(0xb3)](_0x3922b8,_0x39b7c6[_0x73dbb4(0xc8)](_0x3922b8));}for(const _0x4a450e of _0x5b38a9){const _0x33e215=_0x72796d['filter'](_0x578f32=>_0x578f32[_0x73dbb4(0x119)]===_0x4a450e);if(_0x33e215['length']===0x0)throw menuError(_0x73dbb4(0x10a),'Menu\x20path\x20selector\x20not\x20found:\x20'+JSON[_0x73dbb4(0xbe)](_0x4a450e)+'.',_0x73dbb4(0xc0));if(_0x33e215[_0x73dbb4(0xc2)]>0x1)throw menuError(_0x73dbb4(0xd1),_0x73dbb4(0x10e)+JSON['stringify'](_0x4a450e)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x33e215[_0x73dbb4(0x122)](_0x57b9b7=>_0x57b9b7['id'])[_0x73dbb4(0x128)](',\x20')+'.');const _0xe7ce04=_0x33e215[0x0];_0x5922eb['set'](_0xe7ce04['id'],_0xe7ce04);}return[..._0x5922eb[_0x73dbb4(0xcf)]()];}function a191_0x17ed(_0x5b87ea,_0x5c6016){_0x5b87ea=_0x5b87ea-0xb0;const _0x3b680d=a191_0x3b68();let _0x17ed3f=_0x3b680d[_0x5b87ea];return _0x17ed3f;}function parseMenuIds(_0x23626e){const _0x297234=a191_0x553e7a,_0xba6181=parseCsv(_0x23626e),_0x114795=_0xba6181[_0x297234(0x122)](Number);if(_0x114795[_0x297234(0x11a)](_0x907f2b=>!Number[_0x297234(0xf4)](_0x907f2b)||_0x907f2b<=0x0))throw CliErrors['validation'](_0x297234(0xd9));return[...new Set(_0x114795)];}function parseCsv(_0x21db59){const _0x4cb54d=a191_0x553e7a;return[...new Set(_0x21db59[_0x4cb54d(0xbf)](',')[_0x4cb54d(0x122)](_0x2275af=>_0x2275af[_0x4cb54d(0xd3)]())[_0x4cb54d(0xe7)](Boolean))];}function parseBooleanFlag(_0x46ecb2,_0x207600,_0x16be88){const _0x3e65e9=a191_0x553e7a;if(!hasFlag(_0x46ecb2,_0x207600)){if(_0x16be88)throw CliErrors[_0x3e65e9(0xec)](_0x207600);return undefined;}const _0x4793db=_0x46ecb2[_0x3e65e9(0xc5)][_0x207600];if(_0x4793db===!![]||_0x4793db===![])return _0x4793db;if(_0x4793db===_0x3e65e9(0x12d))return!![];if(_0x4793db===_0x3e65e9(0x133))return![];throw CliErrors['validation']('--'+_0x207600+_0x3e65e9(0xe9));}function verifyVisibilityUpdate(_0x3dbb98,_0x54a0ef,_0x5de3f6){const _0x4d9b9e=a191_0x553e7a;assertVerified(!!_0x54a0ef,_0x4d9b9e(0x129)+_0x3dbb98['id']+_0x4d9b9e(0xfb)),assertVerified(_0x54a0ef[_0x4d9b9e(0xe1)]===_0x5de3f6,_0x4d9b9e(0x129)+_0x3dbb98['id']+_0x4d9b9e(0x109));const _0x495e85=[['id',_0x54a0ef['id'],_0x3dbb98['id']],[_0x4d9b9e(0x11c),_0x54a0ef[_0x4d9b9e(0x11c)],_0x3dbb98[_0x4d9b9e(0x11c)]],[_0x4d9b9e(0xb9),_0x54a0ef[_0x4d9b9e(0xb9)],_0x3dbb98['depth']],['label',_0x54a0ef[_0x4d9b9e(0xdf)],_0x3dbb98[_0x4d9b9e(0xdf)]],[_0x4d9b9e(0x119),_0x54a0ef[_0x4d9b9e(0x119)],_0x3dbb98[_0x4d9b9e(0x119)]],['url',_0x54a0ef[_0x4d9b9e(0x105)],_0x3dbb98[_0x4d9b9e(0x105)]],[_0x4d9b9e(0xda),_0x54a0ef[_0x4d9b9e(0xda)],_0x3dbb98[_0x4d9b9e(0xda)]],[_0x4d9b9e(0x100),_0x54a0ef[_0x4d9b9e(0x100)],_0x3dbb98[_0x4d9b9e(0x100)]],[_0x4d9b9e(0xcb),_0x54a0ef[_0x4d9b9e(0xcb)],_0x3dbb98[_0x4d9b9e(0xcb)]],[_0x4d9b9e(0xdd),_0x54a0ef[_0x4d9b9e(0xdd)],_0x3dbb98['resourcesValid']],[_0x4d9b9e(0xce),_0x54a0ef['childrenIds'],_0x3dbb98['childrenIds']],[_0x4d9b9e(0xd2),_0x54a0ef[_0x4d9b9e(0xd2)],_0x3dbb98[_0x4d9b9e(0xd2)]],[_0x4d9b9e(0xed),_0x54a0ef['pageId'],_0x3dbb98[_0x4d9b9e(0xed)]],[_0x4d9b9e(0xb0),_0x54a0ef['pageType'],_0x3dbb98[_0x4d9b9e(0xb0)]],[_0x4d9b9e(0x115),_0x54a0ef[_0x4d9b9e(0x115)],_0x3dbb98[_0x4d9b9e(0x115)]],[_0x4d9b9e(0xee),_0x54a0ef['datasetId'],_0x3dbb98[_0x4d9b9e(0xee)]],[_0x4d9b9e(0xd7),_0x54a0ef[_0x4d9b9e(0xd7)],_0x3dbb98[_0x4d9b9e(0xd7)]]];for(const [_0x305775,_0x41389f,_0x47cbb5]of _0x495e85){assertVerified(sameValue(_0x41389f,_0x47cbb5),'Menu\x20'+_0x3dbb98['id']+'\x20'+_0x305775+'\x20changed\x20unexpectedly.');}}function sameValue(_0x3a1ef2,_0x1e36f6){const _0x206137=a191_0x553e7a;if(Array[_0x206137(0xd5)](_0x3a1ef2)||Array[_0x206137(0xd5)](_0x1e36f6))return JSON[_0x206137(0xbe)](_0x3a1ef2)===JSON['stringify'](_0x1e36f6);return _0x3a1ef2===_0x1e36f6;}
|
|
1
|
+
function a191_0x501b(_0x29b1d2,_0x269f5f){_0x29b1d2=_0x29b1d2-0x6f;const _0x5c2925=a191_0x5c29();let _0x501b11=_0x5c2925[_0x29b1d2];return _0x501b11;}const a191_0x17c4b5=a191_0x501b;(function(_0x58da2d,_0x3dc40e){const _0x143b47=a191_0x501b,_0x2f5da3=_0x58da2d();while(!![]){try{const _0x2a2bac=parseInt(_0x143b47(0xa2))/0x1*(-parseInt(_0x143b47(0xe0))/0x2)+parseInt(_0x143b47(0x99))/0x3*(parseInt(_0x143b47(0x8d))/0x4)+parseInt(_0x143b47(0x6f))/0x5*(-parseInt(_0x143b47(0x83))/0x6)+parseInt(_0x143b47(0xc4))/0x7+parseInt(_0x143b47(0xee))/0x8*(parseInt(_0x143b47(0xd7))/0x9)+parseInt(_0x143b47(0xbf))/0xa+-parseInt(_0x143b47(0xc8))/0xb;if(_0x2a2bac===_0x3dc40e)break;else _0x2f5da3['push'](_0x2f5da3['shift']());}catch(_0x26f36f){_0x2f5da3['push'](_0x2f5da3['shift']());}}}(a191_0x5c29,0xcd493));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':'POST','path':a191_0x17c4b5(0xdd)}];export const menuVisibilityUpdate={'service':a191_0x17c4b5(0xdc),'command':a191_0x17c4b5(0xaf),'description':a191_0x17c4b5(0xc2),'risk':a191_0x17c4b5(0xd2),'structuredErrors':!![],'flags':[{'name':a191_0x17c4b5(0x70),'type':'string','description':a191_0x17c4b5(0x81)},{'name':a191_0x17c4b5(0xb1),'type':a191_0x17c4b5(0xdb),'description':a191_0x17c4b5(0xb9)},{'name':a191_0x17c4b5(0xce),'type':a191_0x17c4b5(0xb3),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':'expect-visible','type':a191_0x17c4b5(0xb3),'description':a191_0x17c4b5(0x94)},{'name':a191_0x17c4b5(0xae),'type':a191_0x17c4b5(0x84),'description':a191_0x17c4b5(0x93)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x205cc8){parseInput(_0x205cc8);},async 'dryRun'(_0x5d4eed){const _0x994420=a191_0x17c4b5,_0x44fd2a=await buildPlan(_0x5d4eed,!![]),_0x51298d=_0x44fd2a[_0x994420(0xcd)]['plannedActions']?.['length']??0x0,_0x3057f4=_0x44fd2a['plan'][_0x994420(0xc0)]['length']-_0x51298d;return menuDryRunResult(_0x44fd2a[_0x994420(0xcd)],{'method':'POST','url':'/smartapi/menu/update','body':{'updates':_0x44fd2a['plan'][_0x994420(0xbc)]?.[_0x994420(0x75)](_0x47fd64=>_0x47fd64[_0x994420(0xcb)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x51298d+_0x994420(0x7b)+_0x3057f4+_0x994420(0xa5)});},async 'execute'(_0x112964){const _0x3e8ab7=a191_0x17c4b5,_0x5a3d2b=await buildPlan(_0x112964,![]);await recheckMutationSnapshot(_0x112964,_0x5a3d2b[_0x3e8ab7(0xcd)],_0x3e8ab7(0xc3));const _0x395a55=[],_0x317bd7=[],_0x3c9b04=[];for(const _0x547967 of _0x5a3d2b[_0x3e8ab7(0xcd)]['targets']){if(_0x547967[_0x3e8ab7(0x98)]['visible']===_0x5a3d2b[_0x3e8ab7(0xcd)]['requestedVisible']){_0x395a55[_0x3e8ab7(0xb4)]({'id':_0x547967['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x112964['appCode'],_0x112964[_0x3e8ab7(0x90)],{'id':_0x547967['id'],'visible':_0x5a3d2b[_0x3e8ab7(0xcd)][_0x3e8ab7(0xd5)]}),_0x395a55[_0x3e8ab7(0xb4)]({'id':_0x547967['id'],'updated':!![],'skipped':![]});}catch(_0x149baf){const _0x4e5cde=mapMenuApiError(_0x149baf,_0x3e8ab7(0x79),_0x547967['id']);if(isMenuResponseLoss(_0x149baf)&&_0x4e5cde[_0x3e8ab7(0xd3)]!=='menu_permission_denied'){_0x3c9b04[_0x3e8ab7(0xb4)](_0x547967['id']);continue;}_0x317bd7[_0x3e8ab7(0xb4)]({'id':_0x547967['id'],'stage':_0x3e8ab7(0x7f),'code':_0x4e5cde['code'],'message':_0x4e5cde['message']});}}let _0x1fd726;try{_0x1fd726=await fetchMenuSnapshot(_0x112964[_0x3e8ab7(0x77)],_0x112964[_0x3e8ab7(0x90)]);}catch(_0x1ab74b){const _0x5d6ed1=describeMenuErrorCause(_0x1ab74b,_0x3e8ab7(0xcc)),_0x57be5d=_0x3c9b04[_0x3e8ab7(0x75)](_0x7c4b9d=>({'id':_0x7c4b9d,'stage':_0x3e8ab7(0x8e),'code':_0x3e8ab7(0x9c),'message':_0x3e8ab7(0x87)+_0x7c4b9d+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x5a095a={'stage':'verification','code':_0x3e8ab7(0x9c),'message':_0x3e8ab7(0x86),'targetIds':_0x5a3d2b[_0x3e8ab7(0xcd)]['targets'][_0x3e8ab7(0x75)](_0x2fb4a3=>_0x2fb4a3['id']),'requestedStateConfirmed':![],..._0x5d6ed1};throw menuFailure(asVerificationError(_0x1ab74b,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x5a3d2b['plan'],{'stage':'verification','succeeded':_0x395a55,'failedRecords':[..._0x317bd7,..._0x57be5d,_0x5a095a],'warnings':[_0x3e8ab7(0xba)],'verification':{'status':_0x3e8ab7(0xb2),'recoveredCount':0x0,'lookupCommand':_0x3e8ab7(0xa8)}});}const _0x58d664=[];for(const _0x2a86f6 of _0x395a55){const _0x5be086=Number(_0x2a86f6['id']),_0x42aaad=_0x5a3d2b[_0x3e8ab7(0xca)]['get'](_0x5be086),_0x520fbf=_0x1fd726['byId']['get'](_0x5be086);try{verifyVisibilityUpdate(_0x42aaad,_0x520fbf,_0x5a3d2b[_0x3e8ab7(0xcd)]['requestedVisible']);}catch(_0x4c355e){const _0x2f5194=asVerificationError(_0x4c355e,'Menu\x20'+_0x5be086+_0x3e8ab7(0xde));_0x58d664[_0x3e8ab7(0xb4)]({'id':_0x5be086,'stage':_0x3e8ab7(0x9d),'code':_0x2f5194[_0x3e8ab7(0xd3)],'message':_0x2f5194[_0x3e8ab7(0xec)],'requestedStateConfirmed':![]});}}for(const _0x231e37 of _0x3c9b04){const _0x58eedd=_0x5a3d2b['beforeById']['get'](_0x231e37),_0x5f298e=_0x1fd726['byId'][_0x3e8ab7(0xa7)](_0x231e37);try{verifyVisibilityUpdate(_0x58eedd,_0x5f298e,_0x5a3d2b[_0x3e8ab7(0xcd)][_0x3e8ab7(0xd5)]),_0x395a55[_0x3e8ab7(0xb4)]({'id':_0x231e37,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0xa3824f){const _0x369d85=asVerificationError(_0xa3824f,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x231e37+_0x3e8ab7(0xac));_0x58d664[_0x3e8ab7(0xb4)]({'id':_0x231e37,'stage':'update-recovery','code':_0x369d85[_0x3e8ab7(0xd3)],'message':_0x369d85[_0x3e8ab7(0xec)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x58d664[_0x3e8ab7(0x95)]>0x0){const _0x5760b2=_0x58d664[_0x3e8ab7(0x75)](_0x3421c3=>Number(_0x3421c3['id'])),_0x4565c6=_0x395a55['filter'](_0x25dbd9=>_0x25dbd9[_0x3e8ab7(0x82)]===!![])[_0x3e8ab7(0x95)],_0x4dab22=menuError(_0x3e8ab7(0x9c),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x5760b2[_0x3e8ab7(0xad)](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x4dab22,_0x5a3d2b[_0x3e8ab7(0xcd)],{'stage':'verification','succeeded':_0x395a55,'failedRecords':[..._0x317bd7,..._0x58d664],'warnings':[_0x3e8ab7(0xb8)],'verification':{'status':_0x3e8ab7(0xb2),..._0x5760b2[_0x3e8ab7(0x95)]===0x1?{'targetId':_0x5760b2[0x0]}:{'targetIds':_0x5760b2},'recoveredCount':_0x4565c6,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x21784c=_0x395a55['filter'](_0x3a0860=>_0x3a0860['updated']===!![])['length'],_0x4f9378=_0x395a55[_0x3e8ab7(0x95)]-_0x21784c,_0x233b10={..._0x5a3d2b[_0x3e8ab7(0xcd)],'succeeded':_0x395a55,'failed':_0x317bd7,'warnings':_0x317bd7['length']>0x0?[..._0x5a3d2b[_0x3e8ab7(0xcd)]['warnings'],_0x3e8ab7(0x74)]:_0x5a3d2b[_0x3e8ab7(0xcd)][_0x3e8ab7(0xda)],'verification':{'checkedBy':_0x3e8ab7(0xc6),'snapshotHash':_0x1fd726['hash'],'matchesRequestedState':_0x317bd7[_0x3e8ab7(0x95)]===0x0,'recoveredCount':_0x3c9b04['length']}};return{'ok':_0x317bd7[_0x3e8ab7(0x95)]===0x0,'data':_0x233b10,'message':_0x317bd7[_0x3e8ab7(0x95)]===0x0?_0x3e8ab7(0x7e)+_0x21784c+_0x3e8ab7(0xaa)+_0x4f9378+'\x20unchanged\x20menu(s).':_0x3e8ab7(0x8f)+_0x21784c+_0x3e8ab7(0x7a)+_0x4f9378+_0x3e8ab7(0x7c)+_0x317bd7[_0x3e8ab7(0x95)]+_0x3e8ab7(0x8b)};}};function parseInput(_0x45e1e5){const _0x2173a2=a191_0x17c4b5,_0x411dd8=parseMenuIds(_0x45e1e5[_0x2173a2(0xab)](_0x2173a2(0x70))),_0x1c9123=parseCsv(_0x45e1e5[_0x2173a2(0xab)](_0x2173a2(0xb1)));if(_0x411dd8['length']===0x0&&_0x1c9123[_0x2173a2(0x95)]===0x0)throw CliErrors[_0x2173a2(0xc9)](_0x2173a2(0x71));const _0x6813e1=parseBooleanFlag(_0x45e1e5,_0x2173a2(0xce),!![]),_0x441ceb=parseBooleanFlag(_0x45e1e5,_0x2173a2(0xa3),![]);let _0x59c460;if(hasFlag(_0x45e1e5,_0x2173a2(0xae))){_0x59c460=_0x45e1e5[_0x2173a2(0x89)]('expected-count');if(!Number[_0x2173a2(0xe3)](_0x59c460)||_0x59c460<0x0)throw CliErrors['validation']('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0x411dd8,'paths':_0x1c9123,'visible':_0x6813e1,'expectVisible':_0x441ceb,'expectedCount':_0x59c460};}function a191_0x5c29(){const _0x28aa9f=['menuIds','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','POST','plannedActions','type','isArray','9422180GsdgdE','targets','update-menu-visibility','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','update\x20menu\x20visibility','3125255QuACiQ','datasetId','menu\x20list','stringify','11974765CrPfAk','validation','beforeById','body','verify\x20menu\x20visibility\x20update','plan','visible','childrenCount','url','datasetCode','write','code','\x20changed\x20unexpectedly.','requestedVisible','Menu\x20id\x20selector(s)\x20not\x20found:\x20','4365rZmluD','depth','modelType','warnings','string','menu','/smartapi/menu/update','\x20visibility\x20update\x20could\x20not\x20be\x20verified','\x20menu(s),\x20expected\x20','42ojhEjC','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','false','isSafeInteger','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','values','Menu\x20','pageType','hash','\x20must\x20be\x20true\x20or\x20false.','resources','message','trim','23944uEpEOB','3495jSEMjP','menu-ids','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','expectVisible','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','map','parentId','appCode','path','update\x20visibility\x20for','\x20updated,\x20','\x20menu(s);\x20skip\x20','\x20skipped,\x20','pageId','Updated\x20visibility\x20for\x20','update','menu_selector_ambiguous','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','recovered','294wjZXhL','number','Selected\x20','Final\x20menu\x20visibility\x20readback\x20failed.','Response\x20was\x20lost\x20for\x20menu\x20','filter','num','Menu\x20path\x20selector\x20not\x20found:\x20','\x20failed.','expectedCount','8SoeErE','update-recovery','Menu\x20visibility\x20update\x20completed:\x20','cookie','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','flagMissing','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','length','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','menu_expected_count_mismatch','before','1093539OGIxVz','menu_selector_not_found','some','menu_verification_failed','verification','has','set','sort','childrenIds','76457rPLYMr','expect-visible','resourcesValid','\x20unchanged\x20menu(s).','split','get','rabetbase\x20menu\x20list\x20--format\x20compress','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','\x20menu(s);\x20skipped\x20','str','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','join','expected-count','visibility-update','label','paths','failed','boolean','push','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','rawFlags'];a191_0x5c29=function(){return _0x28aa9f;};return a191_0x5c29();}async function buildPlan(_0x268837,_0x542402){const _0x26d76c=a191_0x17c4b5,_0x434ee1=parseInput(_0x268837),_0x1414e6=await fetchMutationSnapshot(_0x268837,_0x26d76c(0xc3)),_0x22b464=selectTargets(_0x1414e6['menus'],_0x434ee1[_0x26d76c(0xb7)],_0x434ee1[_0x26d76c(0xb1)]);if(_0x434ee1[_0x26d76c(0x8c)]!==undefined&&_0x22b464[_0x26d76c(0x95)]!==_0x434ee1[_0x26d76c(0x8c)])throw menuError(_0x26d76c(0x97),_0x26d76c(0x85)+_0x22b464[_0x26d76c(0x95)]+_0x26d76c(0xdf)+_0x434ee1[_0x26d76c(0x8c)]+'.',_0x26d76c(0xe1));if(_0x434ee1[_0x26d76c(0x73)]!==undefined){const _0x2670eb=_0x22b464[_0x26d76c(0x88)](_0xc1d22a=>_0xc1d22a['visible']!==_0x434ee1[_0x26d76c(0x73)]);if(_0x2670eb[_0x26d76c(0x95)]>0x0)throw menuError('menu_state_drift','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x2670eb['map'](_0x4af7fd=>_0x4af7fd['id'])[_0x26d76c(0xad)](',\x20')+'.',_0x26d76c(0x91));}const _0x2ca9cd=_0x22b464[_0x26d76c(0x75)](_0x380e8=>({'id':_0x380e8['id'],'label':_0x380e8[_0x26d76c(0xb0)],'path':_0x380e8['path'],'before':{'visible':_0x380e8[_0x26d76c(0xce)]},'after':{'visible':_0x434ee1[_0x26d76c(0xce)]}})),_0x1f9e64=_0x2ca9cd['filter'](_0x484d75=>_0x484d75[_0x26d76c(0x98)][_0x26d76c(0xce)]!==_0x434ee1['visible'])['map'](_0x2ecb0c=>({'stage':_0x26d76c(0xc1),'method':_0x26d76c(0xbb),'path':'/smartapi/menu/update','body':{'appCode':_0x268837['appCode'],'id':_0x2ecb0c['id'],'visible':_0x434ee1[_0x26d76c(0xce)]}})),_0x4b016b=mutationResult({'operation':_0x26d76c(0xaf),'selector':{'menuIds':_0x434ee1[_0x26d76c(0xb7)],'paths':_0x434ee1[_0x26d76c(0xb1)]},'before':{'menus':_0x22b464['map'](_0x2b44df=>({'id':_0x2b44df['id'],'path':_0x2b44df[_0x26d76c(0x78)],'visible':_0x2b44df[_0x26d76c(0xce)]}))},'after':{'menus':_0x22b464[_0x26d76c(0x75)](_0x1dd86f=>({'id':_0x1dd86f['id'],'path':_0x1dd86f[_0x26d76c(0x78)],'visible':_0x434ee1['visible']}))},'dryRun':_0x542402,'backend':[...BACKEND],'plannedActions':_0x1f9e64,'snapshotHash':_0x1414e6[_0x26d76c(0xe9)],'warnings':_0x1f9e64[_0x26d76c(0x95)]===0x0?[_0x26d76c(0xb5)]:[]});return{'plan':{..._0x4b016b,'requestedVisible':_0x434ee1['visible'],'targets':_0x2ca9cd},'beforeById':new Map(_0x22b464[_0x26d76c(0x75)](_0x4dcee3=>[_0x4dcee3['id'],_0x4dcee3]))};}function selectTargets(_0x49e29a,_0x104dfb,_0x2ebf5b){const _0x48319d=a191_0x17c4b5,_0x1f412d=new Map(_0x49e29a[_0x48319d(0x75)](_0x586227=>[_0x586227['id'],_0x586227])),_0x219767=new Map(),_0x54041b=_0x104dfb[_0x48319d(0x88)](_0x5ebcc7=>!_0x1f412d[_0x48319d(0x9e)](_0x5ebcc7));if(_0x54041b[_0x48319d(0x95)]>0x0)throw menuError(_0x48319d(0x9a),_0x48319d(0xd6)+_0x54041b[_0x48319d(0xad)](',\x20')+'.',_0x48319d(0x72));for(const _0x58ccc6 of _0x104dfb){_0x219767[_0x48319d(0x9f)](_0x58ccc6,_0x1f412d[_0x48319d(0xa7)](_0x58ccc6));}for(const _0x10f239 of _0x2ebf5b){const _0x2a4ee3=_0x49e29a[_0x48319d(0x88)](_0x18ef71=>_0x18ef71[_0x48319d(0x78)]===_0x10f239);if(_0x2a4ee3[_0x48319d(0x95)]===0x0)throw menuError(_0x48319d(0x9a),_0x48319d(0x8a)+JSON[_0x48319d(0xc7)](_0x10f239)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x2a4ee3[_0x48319d(0x95)]>0x1)throw menuError(_0x48319d(0x80),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x48319d(0xc7)](_0x10f239)+'.',_0x48319d(0xe5)+_0x2a4ee3[_0x48319d(0x75)](_0x5736ca=>_0x5736ca['id'])[_0x48319d(0xad)](',\x20')+'.');const _0x1da162=_0x2a4ee3[0x0];_0x219767[_0x48319d(0x9f)](_0x1da162['id'],_0x1da162);}return[..._0x219767[_0x48319d(0xe6)]()];}function parseMenuIds(_0x1078fe){const _0x55ce38=a191_0x17c4b5,_0x9839be=parseCsv(_0x1078fe),_0x1a5025=_0x9839be[_0x55ce38(0x75)](Number);if(_0x1a5025[_0x55ce38(0x9b)](_0x1166c8=>!Number[_0x55ce38(0xe3)](_0x1166c8)||_0x1166c8<=0x0))throw CliErrors[_0x55ce38(0xc9)](_0x55ce38(0x96));return[...new Set(_0x1a5025)];}function parseCsv(_0x586c05){const _0x5d72bb=a191_0x17c4b5;return[...new Set(_0x586c05[_0x5d72bb(0xa6)](',')[_0x5d72bb(0x75)](_0x49fca4=>_0x49fca4[_0x5d72bb(0xed)]())[_0x5d72bb(0x88)](Boolean))];}function parseBooleanFlag(_0x2d798f,_0x1c8e87,_0x1a2350){const _0x2fb801=a191_0x17c4b5;if(!hasFlag(_0x2d798f,_0x1c8e87)){if(_0x1a2350)throw CliErrors[_0x2fb801(0x92)](_0x1c8e87);return undefined;}const _0x5a8b5e=_0x2d798f[_0x2fb801(0xb6)][_0x1c8e87];if(_0x5a8b5e===!![]||_0x5a8b5e===![])return _0x5a8b5e;if(_0x5a8b5e==='true')return!![];if(_0x5a8b5e===_0x2fb801(0xe2))return![];throw CliErrors[_0x2fb801(0xc9)]('--'+_0x1c8e87+_0x2fb801(0xea));}function verifyVisibilityUpdate(_0x3326be,_0xa130ee,_0x26b375){const _0x354e55=a191_0x17c4b5;assertVerified(!!_0xa130ee,'Menu\x20'+_0x3326be['id']+_0x354e55(0xa9)),assertVerified(_0xa130ee[_0x354e55(0xce)]===_0x26b375,_0x354e55(0xe7)+_0x3326be['id']+_0x354e55(0xe4));const _0x2a743b=[['id',_0xa130ee['id'],_0x3326be['id']],[_0x354e55(0x76),_0xa130ee[_0x354e55(0x76)],_0x3326be[_0x354e55(0x76)]],[_0x354e55(0xd8),_0xa130ee[_0x354e55(0xd8)],_0x3326be[_0x354e55(0xd8)]],[_0x354e55(0xb0),_0xa130ee[_0x354e55(0xb0)],_0x3326be[_0x354e55(0xb0)]],['path',_0xa130ee['path'],_0x3326be[_0x354e55(0x78)]],[_0x354e55(0xd0),_0xa130ee[_0x354e55(0xd0)],_0x3326be[_0x354e55(0xd0)]],[_0x354e55(0xbd),_0xa130ee[_0x354e55(0xbd)],_0x3326be[_0x354e55(0xbd)]],['sort',_0xa130ee[_0x354e55(0xa0)],_0x3326be['sort']],['resources',_0xa130ee['resources'],_0x3326be[_0x354e55(0xeb)]],['resourcesValid',_0xa130ee[_0x354e55(0xa4)],_0x3326be[_0x354e55(0xa4)]],[_0x354e55(0xa1),_0xa130ee[_0x354e55(0xa1)],_0x3326be[_0x354e55(0xa1)]],['childrenCount',_0xa130ee['childrenCount'],_0x3326be[_0x354e55(0xcf)]],[_0x354e55(0x7d),_0xa130ee['pageId'],_0x3326be[_0x354e55(0x7d)]],['pageType',_0xa130ee[_0x354e55(0xe8)],_0x3326be[_0x354e55(0xe8)]],[_0x354e55(0xd9),_0xa130ee[_0x354e55(0xd9)],_0x3326be[_0x354e55(0xd9)]],[_0x354e55(0xc5),_0xa130ee['datasetId'],_0x3326be['datasetId']],['datasetCode',_0xa130ee['datasetCode'],_0x3326be[_0x354e55(0xd1)]]];for(const [_0x46f4d0,_0x7f1d83,_0x234551]of _0x2a743b){assertVerified(sameValue(_0x7f1d83,_0x234551),'Menu\x20'+_0x3326be['id']+'\x20'+_0x46f4d0+_0x354e55(0xd4));}}function sameValue(_0x4987ad,_0x632817){const _0x3778c7=a191_0x17c4b5;if(Array[_0x3778c7(0xbe)](_0x4987ad)||Array['isArray'](_0x632817))return JSON[_0x3778c7(0xc7)](_0x4987ad)===JSON['stringify'](_0x632817);return _0x4987ad===_0x632817;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a192_0xd6ba(_0x4b9e8b,_0x334f3c){_0x4b9e8b=_0x4b9e8b-0x1eb;const _0x160d37=a192_0x160d();let _0xd6ba76=_0x160d37[_0x4b9e8b];return _0xd6ba76;}const a192_0x1bed5b=a192_0xd6ba;(function(_0x59060a,_0xe89096){const _0x229074=a192_0xd6ba,_0x1fcee4=_0x59060a();while(!![]){try{const _0x506084=parseInt(_0x229074(0x1fa))/0x1*(parseInt(_0x229074(0x1f6))/0x2)+parseInt(_0x229074(0x1fb))/0x3+-parseInt(_0x229074(0x1fe))/0x4*(parseInt(_0x229074(0x209))/0x5)+-parseInt(_0x229074(0x205))/0x6+parseInt(_0x229074(0x202))/0x7*(-parseInt(_0x229074(0x1f8))/0x8)+-parseInt(_0x229074(0x1ee))/0x9+-parseInt(_0x229074(0x20b))/0xa*(-parseInt(_0x229074(0x204))/0xb);if(_0x506084===_0xe89096)break;else _0x1fcee4['push'](_0x1fcee4['shift']());}catch(_0x73cbda){_0x1fcee4['push'](_0x1fcee4['shift']());}}}(a192_0x160d,0x921ef));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';function a192_0x160d(){const _0x267320=['9034uRRqQv','create','28600DepRXP','Created\x20notification\x20config\x20','20EnxRiO','2806794OmPeRp','configCode','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','16mnsWnj',';\x20do\x20not\x20resubmit\x20automatically.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','verified','1477GfhuFY','channelConfig','160721XKKleU','7040124OnHGfO','configName','document','connectTimeout','535065VIeDXZ','notification','1930FSujSC','channelType',';\x20do\x20not\x20resubmit.','Inspect\x20with\x20','readTimeout','/notification/channel-config/create','endpointUrl','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','8024571VMViGg','mutation','config-create','planned','notification_config_create_outcome_unknown','appCode','POST','description'];a192_0x160d=function(){return _0x267320;};return a192_0x160d();}const CREATE_PATH=a192_0x1bed5b(0x1eb);async function prepareCreate(_0x46c14d){const _0x22b8db=a192_0x1bed5b,_0x64d1c2=await readNotificationDocument(_0x46c14d,'create'),_0x58e40b=createMutationInput(_0x46c14d['appCode'],_0x64d1c2);return{'document':_0x64d1c2,'input':_0x58e40b,'planned':projectNotificationConfig({'appCode':_0x46c14d['appCode'],'configName':_0x64d1c2[_0x22b8db(0x206)],'channelType':_0x64d1c2[_0x22b8db(0x20c)],'endpointUrl':_0x64d1c2[_0x22b8db(0x1ec)],'channelConfig':_0x64d1c2[_0x22b8db(0x203)],'description':_0x64d1c2[_0x22b8db(0x1f5)],'connectTimeout':_0x64d1c2[_0x22b8db(0x208)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x64d1c2[_0x22b8db(0x20f)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a192_0x1bed5b(0x20a),'command':a192_0x1bed5b(0x1f0),'description':'Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x5c89b8){assertSingleNotificationSource(_0x5c89b8);},async 'dryRun'(_0x46d085){const _0x5d03e8=a192_0x1bed5b,_0x15ecc1=await prepareCreate(_0x46d085),_0x11d080=notificationLookupCommand(_0x46d085['appCode'],_0x15ecc1[_0x5d03e8(0x207)][_0x5d03e8(0x20c)]);return asDryRunResult({'operation':_0x5d03e8(0x1f7),'selector':{'appCode':_0x46d085[_0x5d03e8(0x1f3)],'configName':_0x15ecc1[_0x5d03e8(0x207)][_0x5d03e8(0x206)],'channelType':_0x15ecc1['document'][_0x5d03e8(0x20c)]},'before':null,'after':_0x15ecc1['planned'],'dryRun':!![],'backend':{'method':_0x5d03e8(0x1f4),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x5d03e8(0x1f1),'lookupCommand':_0x11d080}},{'method':_0x5d03e8(0x1f4),'url':CREATE_PATH});},async 'execute'(_0x31327d){const _0x6e0ae5=a192_0x1bed5b,_0x2dc12f=await prepareCreate(_0x31327d),_0x5b51b9=notificationLookupCommand(_0x31327d['appCode'],_0x2dc12f['document'][_0x6e0ae5(0x20c)]);let _0x2838d0;try{_0x2838d0=await createNotificationChannelConfig(_0x2dc12f['input']);}catch(_0x421b1f){if(isPlatformTransportFailure(_0x421b1f))throw notificationError('notification_config_create_outcome_unknown',_0x6e0ae5(0x1ed),_0x6e0ae5(0x20e)+_0x5b51b9+_0x6e0ae5(0x20d));throw safeApiFailure(_0x6e0ae5(0x1f7),_0x6e0ae5(0x1ef),_0x6e0ae5(0x20e)+_0x5b51b9+_0x6e0ae5(0x200));}if(!Number['isSafeInteger'](_0x2838d0)||_0x2838d0<=0x0)throw notificationError(_0x6e0ae5(0x1f2),_0x6e0ae5(0x1fd),_0x6e0ae5(0x20e)+_0x5b51b9+';\x20do\x20not\x20resubmit.');let _0x59d69b;try{const _0x58e16f=await getNotificationChannelConfig(_0x2838d0,_0x31327d[_0x6e0ae5(0x1f3)]);_0x59d69b=normalizeExactNotificationConfig(_0x58e16f,_0x2838d0,_0x31327d[_0x6e0ae5(0x1f3)]);}catch{throw safeApiFailure('create','verification','Inspect\x20with\x20'+_0x5b51b9+_0x6e0ae5(0x1ff));}return{'ok':!![],'data':{'operation':_0x6e0ae5(0x1f7),'selector':{'appCode':_0x59d69b[_0x6e0ae5(0x1f3)],'id':_0x59d69b['id'],'configCode':_0x59d69b[_0x6e0ae5(0x1fc)],'configName':_0x59d69b[_0x6e0ae5(0x206)],'channelType':_0x59d69b[_0x6e0ae5(0x20c)]},'before':null,'after':projectNotificationConfig(_0x59d69b),'dryRun':![],'backend':{'method':_0x6e0ae5(0x1f4),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x6e0ae5(0x201),'lookupCommand':_0x5b51b9}},'message':_0x6e0ae5(0x1f9)+_0x59d69b['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a193_0xd487(){const _0x404ee4=['delete','27199oxkuMK','48IZcTtG','2RFLRGM','channelType','before','notification_config_delete_outcome_unknown','7826775zAHlCI','1881798DPIPRf','Inspect\x20with\x20','some','218267yhGxAc','Deleted\x20notification\x20config\x20','POST',';\x20no\x20automatic\x20retry\x20was\x20attempted.','\x20delete\x20could\x20not\x20be\x20verified.','verified','notification_config_delete_verification_unavailable','771462kbcNLa','high-risk-write','20fssHXk','mutation','1474985KPXQeK','899262RWEDiH',';\x20do\x20not\x20resubmit\x20automatically.','/notification/channel-config/delete','notification_config_delete_verification_failed','4OdfGWS','notification','appCode','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','Notification\x20config\x20'];a193_0xd487=function(){return _0x404ee4;};return a193_0xd487();}const a193_0x3092d6=a193_0x5b64;(function(_0x2a7eb2,_0x3ed7d4){const _0x230225=a193_0x5b64,_0x1df1ff=_0x2a7eb2();while(!![]){try{const _0x379d63=-parseInt(_0x230225(0x158))/0x1*(-parseInt(_0x230225(0x15a))/0x2)+parseInt(_0x230225(0x149))/0x3+parseInt(_0x230225(0x152))/0x4*(parseInt(_0x230225(0x14d))/0x5)+parseInt(_0x230225(0x15f))/0x6+parseInt(_0x230225(0x162))/0x7*(parseInt(_0x230225(0x159))/0x8)+parseInt(_0x230225(0x14e))/0x9*(-parseInt(_0x230225(0x14b))/0xa)+-parseInt(_0x230225(0x15e))/0xb;if(_0x379d63===_0x3ed7d4)break;else _0x1df1ff['push'](_0x1df1ff['shift']());}catch(_0x4a5d10){_0x1df1ff['push'](_0x1df1ff['shift']());}}}(a193_0xd487,0x29304));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';function a193_0x5b64(_0x32b4ae,_0x5d9105){_0x32b4ae=_0x32b4ae-0x149;const _0xd487fc=a193_0xd487();let _0x5b6410=_0xd487fc[_0x32b4ae];return _0x5b6410;}const DELETE_PATH=a193_0x3092d6(0x150),REFERENCE_WARNING=a193_0x3092d6(0x155);async function prepareDelete(_0xa187d2){const _0x111feb=a193_0x3092d6,_0x1f37bb=readNotificationId(_0xa187d2),_0x3fb38d=await requireExactNotificationConfig(_0xa187d2['appCode'],_0x1f37bb,_0x111feb(0x157));return{'id':_0x1f37bb,'before':_0x3fb38d};}export const notificationConfigDelete={'service':a193_0x3092d6(0x153),'command':'config-delete','description':'Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','risk':a193_0x3092d6(0x14a),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x53b3d6){readNotificationId(_0x53b3d6),requireNotificationExplicitYes(_0x53b3d6);},async 'dryRun'(_0x5c3918){const _0x4a9f93=a193_0x3092d6,_0x43dff8=await prepareDelete(_0x5c3918),_0x1aae11=notificationLookupCommand(_0x5c3918[_0x4a9f93(0x154)],_0x43dff8[_0x4a9f93(0x15c)][_0x4a9f93(0x15b)]);return asDryRunResult({'operation':_0x4a9f93(0x157),'selector':notificationSelector(_0x43dff8[_0x4a9f93(0x15c)]),'before':projectNotificationConfig(_0x43dff8[_0x4a9f93(0x15c)]),'after':null,'dryRun':!![],'backend':{'method':_0x4a9f93(0x164),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x1aae11}},{'method':_0x4a9f93(0x164),'url':DELETE_PATH});},async 'execute'(_0x5e0d67){const _0x3bbeea=a193_0x3092d6;requireNotificationExplicitYes(_0x5e0d67);const _0x240553=await prepareDelete(_0x5e0d67),_0x26787d=notificationLookupCommand(_0x5e0d67[_0x3bbeea(0x154)],_0x240553['before'][_0x3bbeea(0x15b)]);let _0x373406=![];try{await deleteNotificationChannelConfig(_0x240553['id'],_0x5e0d67[_0x3bbeea(0x154)]);}catch(_0x213625){if(!isPlatformTransportFailure(_0x213625))throw safeApiFailure(_0x3bbeea(0x157),_0x3bbeea(0x14c),_0x3bbeea(0x160)+_0x26787d+_0x3bbeea(0x165));_0x373406=!![];}let _0xa038c7;try{_0xa038c7=await listNotificationChannelConfigs(_0x5e0d67[_0x3bbeea(0x154)],_0x240553[_0x3bbeea(0x15c)][_0x3bbeea(0x15b)]),validateNotificationDeleteReadback(_0xa038c7,_0x5e0d67[_0x3bbeea(0x154)],_0x240553[_0x3bbeea(0x15c)]['channelType']);}catch{throw notificationError(_0x373406?_0x3bbeea(0x15d):_0x3bbeea(0x168),_0x3bbeea(0x156)+_0x240553['id']+_0x3bbeea(0x166),_0x3bbeea(0x160)+_0x26787d+_0x3bbeea(0x14f));}if(_0xa038c7[_0x3bbeea(0x161)](_0x4bbd17=>_0x4bbd17['id']===_0x240553['id']))throw notificationError(_0x373406?_0x3bbeea(0x15d):_0x3bbeea(0x151),_0x3bbeea(0x156)+_0x240553['id']+'\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20'+_0x26787d+_0x3bbeea(0x14f));const _0x1e64d7=[REFERENCE_WARNING];return _0x373406&&_0x1e64d7['unshift']('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x3bbeea(0x157),'selector':notificationSelector(_0x240553[_0x3bbeea(0x15c)]),'before':projectNotificationConfig(_0x240553['before']),'after':null,'dryRun':![],'backend':{'method':_0x3bbeea(0x164),'path':DELETE_PATH},'warnings':_0x1e64d7,'verification':{'status':_0x3bbeea(0x167),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x373406,'lookupCommand':_0x26787d}},'message':_0x3bbeea(0x163)+_0x240553['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a194_0x569221=a194_0x24e2;(function(_0x94cd65,_0x4e4680){const _0x423135=a194_0x24e2,_0x9fb606=_0x94cd65();while(!![]){try{const _0x5025c7=parseInt(_0x423135(0xec))/0x1*(-parseInt(_0x423135(0xef))/0x2)+parseInt(_0x423135(0xf3))/0x3*(parseInt(_0x423135(0xdd))/0x4)+-parseInt(_0x423135(0xd8))/0x5*(parseInt(_0x423135(0xe1))/0x6)+-parseInt(_0x423135(0xe0))/0x7*(-parseInt(_0x423135(0xe3))/0x8)+-parseInt(_0x423135(0xdb))/0x9+-parseInt(_0x423135(0xf0))/0xa*(-parseInt(_0x423135(0xdc))/0xb)+parseInt(_0x423135(0xda))/0xc*(-parseInt(_0x423135(0xd9))/0xd);if(_0x5025c7===_0x4e4680)break;else _0x9fb606['push'](_0x9fb606['shift']());}catch(_0x5a710d){_0x9fb606['push'](_0x9fb606['shift']());}}}(a194_0x44bf,0x2cb65));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a194_0x24e2(_0xd56367,_0x1f0f86){_0xd56367=_0xd56367-0xd6;const _0x44bf01=a194_0x44bf();let _0x24e226=_0x44bf01[_0xd56367];return _0x24e226;}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':a194_0x569221(0xd7),'command':'config-list','description':a194_0x569221(0xf1),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a194_0x569221(0xe2),'description':a194_0x569221(0xea),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a194_0x569221(0xeb),'type':'boolean','default':![],'description':a194_0x569221(0xed)}],async 'validate'(_0x38d940){const _0x4adf52=a194_0x569221;if(_0x38d940[_0x4adf52(0xe8)](_0x4adf52(0xeb))&&_0x38d940['str']('type')[_0x4adf52(0xd6)]())throw CliErrors[_0x4adf52(0xe9)](_0x4adf52(0xee),_0x4adf52(0xe4));if(_0x38d940[_0x4adf52(0xe8)]('all'))return;readNotificationChannelType(_0x38d940);},async 'execute'(_0x5277ac){const _0x275660=a194_0x569221;if(_0x5277ac['bool'](_0x275660(0xeb))){const _0x1977a8=await Promise['all'](NOTIFICATION_CHANNEL_TYPES[_0x275660(0xf2)](_0x15f0e1=>listNotificationChannelConfigs(_0x5277ac[_0x275660(0xdf)],_0x15f0e1))),_0x5d3b64=_0x1977a8[_0x275660(0xe5)]()[_0x275660(0xf2)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5277ac['appCode'],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x5d3b64[_0x275660(0xde)],'configs':_0x5d3b64},'message':_0x275660(0xe6)+_0x5d3b64[_0x275660(0xde)]+_0x275660(0xf4)};}const _0x533dc3=readNotificationChannelType(_0x5277ac),_0x4b3c82=await listNotificationChannelConfigs(_0x5277ac['appCode'],_0x533dc3),_0x14879a=_0x4b3c82[_0x275660(0xf2)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5277ac[_0x275660(0xdf)],'channelType':_0x533dc3,'count':_0x14879a[_0x275660(0xde)],'configs':_0x14879a},'message':_0x275660(0xe6)+_0x14879a['length']+'\x20'+_0x533dc3+_0x275660(0xe7)};}};function a194_0x44bf(){const _0x480055=['flat','Found\x20','\x20notification\x20config(s)','bool','validation','Notification\x20channel\x20type','all','388dzwDGP','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','46LaupoM','79330ZLaICr','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','map','789Mpbgxx','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','trim','notification','5CRLnUD','39xXrujP','1337124eTDPva','170253nUsDqG','407cKOklv','2276LsqUvm','length','appCode','21okKmgF','1483404skorJm','string','931544lahDrw','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.'];a194_0x44bf=function(){return _0x480055;};return a194_0x44bf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a195_0x4f6d15=a195_0x1253;(function(_0x22a79b,_0x2d3896){const _0x8da085=a195_0x1253,_0x1b6e97=_0x22a79b();while(!![]){try{const _0x353b89=parseInt(_0x8da085(0xa5))/0x1+parseInt(_0x8da085(0xc2))/0x2*(parseInt(_0x8da085(0xb9))/0x3)+parseInt(_0x8da085(0xbd))/0x4*(parseInt(_0x8da085(0xae))/0x5)+parseInt(_0x8da085(0xb6))/0x6+-parseInt(_0x8da085(0xc6))/0x7*(parseInt(_0x8da085(0xb3))/0x8)+-parseInt(_0x8da085(0xb0))/0x9+-parseInt(_0x8da085(0xca))/0xa;if(_0x353b89===_0x2d3896)break;else _0x1b6e97['push'](_0x1b6e97['shift']());}catch(_0x41cb05){_0x1b6e97['push'](_0x1b6e97['shift']());}}}(a195_0x28a8,0x7a550));import{asDryRunResult}from'../../commands/common/dry-run.js';function a195_0x1253(_0x1667aa,_0x12d512){_0x1667aa=_0x1667aa-0xa5;const _0x28a804=a195_0x28a8();let _0x12532a=_0x28a804[_0x1667aa];return _0x12532a;}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_0x28a8(){const _0x351b63=['verified','Inspect\x20with\x20--id\x20','/notification/channel-config/update','provesChange','355395GHbgMk','update','6425730uJjrUh','notification_config_update_verification_unavailable','patch','152IznMqR','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','mutation','2136306eDdaTi','before','Notification\x20config\x20','11955Udmaxi','planned','notification_config_update_verification_failed','high-risk-write','52MoixPr',';\x20do\x20not\x20resubmit\x20automatically.','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','notification','notification_config_update_outcome_unknown','268QWnCuV','appCode','channelType','config-update','33075WRbnDq','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','Updated\x20notification\x20config\x20','5842560rlkIDS','75005BZYmpm','POST','verifiedFields','\x20with\x20','Inspect\x20ID\x20'];a195_0x28a8=function(){return _0x351b63;};return a195_0x28a8();}const UPDATE_PATH=a195_0x4f6d15(0xac);async function prepareUpdate(_0x55bcb0){const _0xf877bc=a195_0x4f6d15,_0x2ae23c=readNotificationId(_0x55bcb0),_0x2e548e=await readNotificationDocument(_0x55bcb0,_0xf877bc(0xaf)),_0x3fdd0e=await requireExactNotificationConfig(_0x55bcb0[_0xf877bc(0xc3)],_0x2ae23c,_0xf877bc(0xaf));return{'id':_0x2ae23c,'patch':_0x2e548e,'before':_0x3fdd0e,'payload':mergeUpdateInput(_0x3fdd0e,_0x2e548e),'planned':plannedUpdateProjection(_0x3fdd0e,_0x2e548e)};}export const notificationConfigUpdate={'service':a195_0x4f6d15(0xc0),'command':a195_0x4f6d15(0xc5),'description':a195_0x4f6d15(0xbf),'risk':a195_0x4f6d15(0xbc),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x533131){readNotificationId(_0x533131),assertSingleNotificationSource(_0x533131),requireNotificationExplicitYes(_0x533131);},async 'dryRun'(_0x1256ac){const _0xfca745=a195_0x4f6d15,_0x25dd4e=await prepareUpdate(_0x1256ac),_0x56f278=notificationLookupCommand(_0x1256ac['appCode'],_0x25dd4e[_0xfca745(0xb7)][_0xfca745(0xc4)]);return asDryRunResult({'operation':_0xfca745(0xaf),'selector':notificationSelector(_0x25dd4e[_0xfca745(0xb7)]),'before':projectNotificationConfig(_0x25dd4e[_0xfca745(0xb7)]),'after':_0x25dd4e[_0xfca745(0xba)],'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[],'verification':{'status':_0xfca745(0xba),'lookupCommand':_0x56f278}},{'method':_0xfca745(0xa6),'url':UPDATE_PATH});},async 'execute'(_0x1f857c){const _0x1e5577=a195_0x4f6d15;requireNotificationExplicitYes(_0x1f857c);const _0x54b426=await prepareUpdate(_0x1f857c),_0x542035=notificationLookupCommand(_0x1f857c[_0x1e5577(0xc3)],_0x54b426['before']['channelType']);let _0x342ff8=![];try{await updateNotificationChannelConfig(_0x54b426['payload']);}catch(_0x57432d){if(!isPlatformTransportFailure(_0x57432d))throw safeApiFailure(_0x1e5577(0xaf),_0x1e5577(0xb5),_0x1e5577(0xa9)+_0x54b426['id']+_0x1e5577(0xa8)+_0x542035+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x342ff8=!![];}let _0x9a5abd;try{const _0x17ce02=await getNotificationChannelConfig(_0x54b426['id'],_0x1f857c[_0x1e5577(0xc3)]);_0x9a5abd=normalizeExactNotificationConfig(_0x17ce02,_0x54b426['id'],_0x1f857c[_0x1e5577(0xc3)]);}catch{throw notificationError(_0x342ff8?_0x1e5577(0xc1):_0x1e5577(0xb1),_0x1e5577(0xb8)+_0x54b426['id']+_0x1e5577(0xc8),'Inspect\x20with\x20--id\x20'+_0x54b426['id']+'\x20via\x20'+_0x542035+_0x1e5577(0xbe));}const _0x367603=requestedSafeFieldsMatch(_0x54b426[_0x1e5577(0xb7)],_0x9a5abd,_0x54b426[_0x1e5577(0xb2)]);if(!_0x367603['allMatch']||_0x342ff8&&!_0x367603[_0x1e5577(0xad)])throw notificationError(_0x342ff8?'notification_config_update_outcome_unknown':_0x1e5577(0xbb),'Notification\x20config\x20'+_0x54b426['id']+_0x1e5577(0xc7),_0x1e5577(0xab)+_0x54b426['id']+'\x20via\x20'+_0x542035+_0x1e5577(0xbe));const _0xf6f322=_0x342ff8?[_0x1e5577(0xb4)]:[];return{'ok':!![],'data':{'operation':_0x1e5577(0xaf),'selector':notificationSelector(_0x9a5abd),'before':projectNotificationConfig(_0x54b426[_0x1e5577(0xb7)]),'after':projectNotificationConfig(_0x9a5abd),'dryRun':![],'backend':{'method':_0x1e5577(0xa6),'path':UPDATE_PATH},'warnings':_0xf6f322,'verification':{'status':_0x1e5577(0xaa),'recoveredAfterUnknownResponse':_0x342ff8,'verifiedFields':_0x367603[_0x1e5577(0xa7)],'lookupCommand':_0x542035}},'message':_0x1e5577(0xc9)+_0x9a5abd['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x9848bf,_0x266cbc){const _0xdbea0a=a196_0x5309,_0x3f666b=_0x9848bf();while(!![]){try{const _0x46d329=-parseInt(_0xdbea0a(0x169))/0x1+-parseInt(_0xdbea0a(0x16d))/0x2+-parseInt(_0xdbea0a(0x16b))/0x3*(-parseInt(_0xdbea0a(0x16e))/0x4)+parseInt(_0xdbea0a(0x16c))/0x5+-parseInt(_0xdbea0a(0x16a))/0x6*(parseInt(_0xdbea0a(0x172))/0x7)+parseInt(_0xdbea0a(0x168))/0x8*(-parseInt(_0xdbea0a(0x16f))/0x9)+parseInt(_0xdbea0a(0x170))/0xa*(parseInt(_0xdbea0a(0x171))/0xb);if(_0x46d329===_0x266cbc)break;else _0x3f666b['push'](_0x3f666b['shift']());}catch(_0x1c471c){_0x3f666b['push'](_0x3f666b['shift']());}}}(a196_0x48bb,0x3f2b1));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a196_0x5309(_0x5b28b7,_0x554fb0){_0x5b28b7=_0x5b28b7-0x168;const _0x48bb40=a196_0x48bb();let _0x530919=_0x48bb40[_0x5b28b7];return _0x530919;}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a196_0x48bb(){const _0x10e4a8=['995560SBXddC','488116COxWDg','387gdTRDw','293990VRiSPx','572uSjyfc','3615017fwAcJD','46472mdIuKv','181801kGAcAQ','6vJyDXs','3hXjIkz','268795MZYzlr'];a196_0x48bb=function(){return _0x10e4a8;};return a196_0x48bb();}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a197_0x2dbda0=a197_0x3912;(function(_0x316b49,_0x59d4ea){const _0x31ca29=a197_0x3912,_0xaf00fa=_0x316b49();while(!![]){try{const _0x35604f=-parseInt(_0x31ca29(0x153))/0x1+-parseInt(_0x31ca29(0x15c))/0x2+parseInt(_0x31ca29(0x1b4))/0x3+parseInt(_0x31ca29(0x142))/0x4*(parseInt(_0x31ca29(0x141))/0x5)+parseInt(_0x31ca29(0x14e))/0x6+parseInt(_0x31ca29(0x18a))/0x7*(parseInt(_0x31ca29(0x13c))/0x8)+-parseInt(_0x31ca29(0x17a))/0x9*(parseInt(_0x31ca29(0x14c))/0xa);if(_0x35604f===_0x59d4ea)break;else _0xaf00fa['push'](_0xaf00fa['shift']());}catch(_0x88915){_0xaf00fa['push'](_0xaf00fa['shift']());}}}(a197_0x1c41,0xc7874));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a197_0x2dbda0(0x172),a197_0x2dbda0(0x17d),'DINGTALK',a197_0x2dbda0(0x167),a197_0x2dbda0(0x1ae)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x2dbda0(0x155),a197_0x2dbda0(0x1a2),'endpointUrl',a197_0x2dbda0(0x13a),a197_0x2dbda0(0x18b),'connectTimeout',a197_0x2dbda0(0x180)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x2dbda0(0x164),a197_0x2dbda0(0x185),a197_0x2dbda0(0x17e)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x2dbda0(0x186),a197_0x2dbda0(0x14d),'ccList',a197_0x2dbda0(0x154),a197_0x2dbda0(0x1a6),a197_0x2dbda0(0x1b6),a197_0x2dbda0(0x1a4),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x2dbda0(0x168),'type':a197_0x2dbda0(0x169),'required':![],'description':a197_0x2dbda0(0x16b)},{'name':a197_0x2dbda0(0x152),'type':a197_0x2dbda0(0x147),'required':![],'default':![],'description':a197_0x2dbda0(0x16e)},{'name':a197_0x2dbda0(0x16a),'type':a197_0x2dbda0(0x169),'required':![],'description':a197_0x2dbda0(0x18f)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x2dbda0(0x156),'required':!![],'description':a197_0x2dbda0(0x137)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0xdfed52,_0x33371b,_0x1b42bb){return new CliError(_0xdfed52,0x1,_0x33371b,_0x1b42bb);}export function readNotificationId(_0x565a76){const _0x405fb3=a197_0x2dbda0,_0x84affa=_0x565a76[_0x405fb3(0x17c)]('id');if(!Number[_0x405fb3(0x196)](_0x84affa)||_0x84affa<=0x0)throw notificationError('notification_config_id_invalid',_0x405fb3(0x1af));return _0x84affa;}export function requireNotificationExplicitYes(_0x34ad57){const _0x1ebd45=a197_0x2dbda0;if(_0x34ad57['bool']('dry-run')||_0x34ad57[_0x1ebd45(0x13d)](_0x1ebd45(0x170)))return;throw notificationError(_0x1ebd45(0x199),_0x1ebd45(0x192),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x49f00c,_0x19c9a7=a197_0x2dbda0(0x17b),_0x56de0d=a197_0x2dbda0(0x172)){const _0x28b6fa=a197_0x2dbda0,_0x5697c9=_0x49f00c['str'](_0x19c9a7)['trim']()||_0x56de0d;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x5697c9))throw CliErrors['validation'](_0x28b6fa(0x1b2)+_0x19c9a7+':\x20'+_0x5697c9,_0x28b6fa(0x15f)+NOTIFICATION_CHANNEL_TYPES[_0x28b6fa(0x15d)](',\x20')+'.');return _0x5697c9;}export function assertSingleNotificationSource(_0x1a5660){const _0x1dc5a7=a197_0x2dbda0,_0x3ad262=[],_0x5330ab=_0x1a5660[_0x1dc5a7(0x1b1)](_0x1dc5a7(0x168))[_0x1dc5a7(0x1a3)]();if(_0x5330ab)_0x3ad262['push']({'kind':_0x1dc5a7(0x168),'path':_0x5330ab});if(_0x1a5660['bool']('stdin'))_0x3ad262[_0x1dc5a7(0x19d)]({'kind':'stdin'});const _0x13248f=_0x1a5660[_0x1dc5a7(0x1b1)]('from-env')[_0x1dc5a7(0x1a3)]();if(_0x13248f)_0x3ad262[_0x1dc5a7(0x19d)]({'kind':_0x1dc5a7(0x177),'name':_0x13248f});if(_0x3ad262[_0x1dc5a7(0x171)]===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0x1dc5a7(0x146));if(_0x3ad262[_0x1dc5a7(0x171)]>0x1)throw CliErrors['validation'](_0x1dc5a7(0x14b),_0x1dc5a7(0x146));return _0x3ad262[0x0];}export async function readNotificationDocument(_0xa6c5cd,_0x4e7e35){const _0x497dde=a197_0x2dbda0,_0x37ae7e=assertSingleNotificationSource(_0xa6c5cd),_0x5f095e=_0x37ae7e['kind']===_0x497dde(0x168)?_0x497dde(0x19f)+_0x37ae7e[_0x497dde(0x1b5)]:_0x37ae7e[_0x497dde(0x178)]===_0x497dde(0x177)?_0x497dde(0x191)+_0x37ae7e[_0x497dde(0x144)]:'stdin';let _0x5106dc;try{if(_0x37ae7e[_0x497dde(0x178)]==='file')_0x5106dc=await readFile(_0x37ae7e[_0x497dde(0x1b5)],_0x497dde(0x182));else{if(_0x37ae7e[_0x497dde(0x178)]===_0x497dde(0x177)){if(!(_0x37ae7e['name']in process.env))throw notificationError(_0x497dde(0x18c),_0x497dde(0x1b7)+_0x37ae7e['name']);_0x5106dc=process.env[_0x37ae7e.name]??'';}else _0x5106dc=await readStdin();}}catch(_0x28a59f){if(_0x28a59f instanceof CliError)throw _0x28a59f;throw notificationError(_0x497dde(0x18c),_0x497dde(0x1a1)+_0x5f095e+'.');}let _0x274715;try{_0x274715=JSON[_0x497dde(0x161)](_0x5106dc);}catch{throw notificationError(_0x497dde(0x173),_0x497dde(0x1ac)+_0x5f095e+'\x20is\x20invalid.',_0x497dde(0x195));}if(!isJsonObject(_0x274715))throw notificationError('notification_config_json_invalid','Notification\x20JSON\x20from\x20'+_0x5f095e+_0x497dde(0x187));return validateNotificationDocument(_0x274715,_0x4e7e35);}export function projectNotificationListConfig(_0xcf98b7,_0x428ff0){const _0x3c0dab=a197_0x2dbda0;return{'id':typeof _0xcf98b7['id']==='number'?_0xcf98b7['id']:null,'configCode':requireResponseString(_0xcf98b7[_0x3c0dab(0x185)],_0x3c0dab(0x185),_0x428ff0),'configName':requireResponseString(_0xcf98b7[_0x3c0dab(0x155)],'configName',_0x428ff0),'channelType':requireResponseString(_0xcf98b7['channelType'],_0x3c0dab(0x1a2),_0x428ff0),'description':normalizeNullableString(_0xcf98b7[_0x3c0dab(0x18b)]),'createTime':normalizeNullableString(_0xcf98b7['createTime']),'updateTime':normalizeNullableString(_0xcf98b7[_0x3c0dab(0x190)])};}export function normalizeExactNotificationConfig(_0x454308,_0x2aaa52,_0x400b50){const _0x38bdd9=a197_0x2dbda0;if(!Number[_0x38bdd9(0x196)](_0x454308['id'])||_0x454308['id']!==_0x2aaa52)throw notificationError(_0x38bdd9(0x143),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x2aaa52+'.');if(_0x454308['appCode']!==_0x400b50)throw notificationError(_0x38bdd9(0x143),_0x38bdd9(0x176)+_0x2aaa52+_0x38bdd9(0x181));const _0x262a8f=requireExactString(_0x454308[_0x38bdd9(0x155)],_0x38bdd9(0x155),_0x2aaa52),_0xccac33=requireExactString(_0x454308[_0x38bdd9(0x185)],'configCode',_0x2aaa52),_0x2a62a1=requireExactString(_0x454308['channelType'],_0x38bdd9(0x1a2),_0x2aaa52);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x2a62a1))throw notificationError(_0x38bdd9(0x143),_0x38bdd9(0x176)+_0x2aaa52+'\x20has\x20an\x20unsupported\x20channelType.');const _0x5ba12f=responseNullableString(_0x454308[_0x38bdd9(0x1ab)],_0x38bdd9(0x1ab),_0x2aaa52),_0x43c280=responseNullableString(_0x454308[_0x38bdd9(0x13a)],_0x38bdd9(0x13a),_0x2aaa52),_0xf7456e=responseNullableString(_0x454308[_0x38bdd9(0x18b)],'description',_0x2aaa52),_0x44daa2=responseNullableTimeout(_0x454308['connectTimeout'],_0x38bdd9(0x194),_0x2aaa52),_0x385fa8=responseNullableTimeout(_0x454308[_0x38bdd9(0x180)],_0x38bdd9(0x180),_0x2aaa52);return{'id':_0x2aaa52,'appCode':_0x400b50,'configCode':_0xccac33,'configName':_0x262a8f,'channelType':_0x2a62a1,'endpointUrl':redactSensitive(_0x5ba12f),'channelConfig':redactSensitive(_0x43c280),'description':_0xf7456e,'connectTimeout':_0x44daa2,'readTimeout':_0x385fa8,'endpointUrlRaw':_0x5ba12f,'channelConfigRaw':_0x43c280};}export async function requireExactNotificationConfig(_0x446e43,_0x2ccd02,_0x49d478){const _0x28ab44=a197_0x2dbda0;let _0x420cf2;try{_0x420cf2=await getNotificationChannelConfig(_0x2ccd02,_0x446e43);}catch{throw safeApiFailure(_0x49d478,_0x28ab44(0x1a5),_0x28ab44(0x14f)+_0x446e43+_0x28ab44(0x18d));}return normalizeExactNotificationConfig(_0x420cf2,_0x2ccd02,_0x446e43);}export function projectNotificationConfig(_0x36e34d){const _0x2fb358=a197_0x2dbda0;return{'id':_0x36e34d['id']??null,'appCode':_0x36e34d[_0x2fb358(0x164)],'configCode':_0x36e34d[_0x2fb358(0x185)]??null,'configName':_0x36e34d[_0x2fb358(0x155)],'channelType':_0x36e34d[_0x2fb358(0x1a2)],'endpointUrl':redactSensitive(_0x36e34d['endpointUrl']),'channelConfig':redactSensitive(_0x36e34d[_0x2fb358(0x13a)]),'description':_0x36e34d['description']??null,'connectTimeout':_0x36e34d[_0x2fb358(0x194)]??null,'readTimeout':_0x36e34d['readTimeout']??null};}function a197_0x3912(_0x14aaeb,_0x151c11){_0x14aaeb=_0x14aaeb-0x136;const _0x1c41ee=a197_0x1c41();let _0x391221=_0x1c41ee[_0x14aaeb];return _0x391221;}export function notificationSelector(_0x48b4ac){const _0x14e018=a197_0x2dbda0;return{'appCode':_0x48b4ac[_0x14e018(0x164)],'id':_0x48b4ac['id'],'configCode':_0x48b4ac['configCode'],'configName':_0x48b4ac['configName'],'channelType':_0x48b4ac['channelType']};}export function createMutationInput(_0x1d2397,_0x3152c5){const _0x505a47=a197_0x2dbda0;return{'appCode':_0x1d2397,'configName':_0x3152c5['configName'],'channelType':_0x3152c5[_0x505a47(0x1a2)],...hasOwn(_0x3152c5,_0x505a47(0x1ab))?{'endpointUrl':_0x3152c5[_0x505a47(0x1ab)]}:{},...hasOwn(_0x3152c5,_0x505a47(0x13a))?{'channelConfig':serializeChannelConfig(_0x3152c5[_0x505a47(0x13a)])}:{},...hasOwn(_0x3152c5,_0x505a47(0x18b))?{'description':_0x3152c5[_0x505a47(0x18b)]}:{},...hasOwn(_0x3152c5,'connectTimeout')?{'connectTimeout':_0x3152c5[_0x505a47(0x194)]}:{},...hasOwn(_0x3152c5,_0x505a47(0x180))?{'readTimeout':_0x3152c5[_0x505a47(0x180)]}:{}};}export function mergeUpdateInput(_0x423cc7,_0x200094){const _0xe5b08a=a197_0x2dbda0;return{'id':_0x423cc7['id'],'appCode':_0x423cc7['appCode'],'configName':_0x200094['configName']??_0x423cc7[_0xe5b08a(0x155)],'channelType':_0x200094[_0xe5b08a(0x1a2)]??_0x423cc7[_0xe5b08a(0x1a2)],'endpointUrl':hasOwn(_0x200094,_0xe5b08a(0x1ab))?_0x200094['endpointUrl']:_0x423cc7['endpointUrlRaw'],'channelConfig':hasOwn(_0x200094,_0xe5b08a(0x13a))?serializeChannelConfig(_0x200094[_0xe5b08a(0x13a)]):_0x423cc7[_0xe5b08a(0x16c)],'description':hasOwn(_0x200094,_0xe5b08a(0x18b))?_0x200094[_0xe5b08a(0x18b)]:_0x423cc7['description'],'connectTimeout':hasOwn(_0x200094,'connectTimeout')?_0x200094['connectTimeout']:_0x423cc7[_0xe5b08a(0x194)],'readTimeout':hasOwn(_0x200094,_0xe5b08a(0x180))?_0x200094[_0xe5b08a(0x180)]:_0x423cc7[_0xe5b08a(0x180)]};}export function plannedUpdateProjection(_0x3b3822,_0x53331a){const _0x585411=a197_0x2dbda0;return projectNotificationConfig({'id':_0x3b3822['id'],'appCode':_0x3b3822[_0x585411(0x164)],'configCode':_0x3b3822[_0x585411(0x185)],'configName':_0x53331a[_0x585411(0x155)]??_0x3b3822[_0x585411(0x155)],'channelType':_0x53331a[_0x585411(0x1a2)]??_0x3b3822['channelType'],'endpointUrl':hasOwn(_0x53331a,_0x585411(0x1ab))?_0x53331a[_0x585411(0x1ab)]:_0x3b3822['endpointUrlRaw'],'channelConfig':hasOwn(_0x53331a,_0x585411(0x13a))?_0x53331a['channelConfig']:_0x3b3822[_0x585411(0x16c)],'description':hasOwn(_0x53331a,'description')?_0x53331a[_0x585411(0x18b)]:_0x3b3822[_0x585411(0x18b)],'connectTimeout':hasOwn(_0x53331a,_0x585411(0x194))?_0x53331a[_0x585411(0x194)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x3b3822['connectTimeout'],'readTimeout':hasOwn(_0x53331a,'readTimeout')?_0x53331a[_0x585411(0x180)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x3b3822[_0x585411(0x180)]});}export function requestedSafeFieldsMatch(_0x4bafc5,_0x1e14d5,_0x15587f){const _0x129932=a197_0x2dbda0,_0x429128=[],_0x2cac1a=[],_0x2faaaf=[];for(const _0x135294 of[_0x129932(0x155),_0x129932(0x1a2),_0x129932(0x18b)]){if(!hasOwn(_0x15587f,_0x135294))continue;_0x2faaaf[_0x129932(0x19d)](_0x135294),_0x429128[_0x129932(0x19d)](_0x1e14d5[_0x135294]===_0x15587f[_0x135294]),_0x2cac1a['push'](_0x4bafc5[_0x135294]!==_0x15587f[_0x135294]&&_0x1e14d5[_0x135294]===_0x15587f[_0x135294]);}for(const _0x557e4e of[_0x129932(0x194),_0x129932(0x180)]){if(!hasOwn(_0x15587f,_0x557e4e))continue;const _0x208c76=_0x15587f[_0x557e4e]??(_0x557e4e===_0x129932(0x194)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x2faaaf['push'](_0x557e4e),_0x429128[_0x129932(0x19d)](_0x1e14d5[_0x557e4e]===_0x208c76),_0x2cac1a[_0x129932(0x19d)](_0x4bafc5[_0x557e4e]!==_0x208c76&&_0x1e14d5[_0x557e4e]===_0x208c76);}return hasOwn(_0x15587f,_0x129932(0x1ab))&&_0x15587f[_0x129932(0x1ab)]===null&&(_0x2faaaf['push'](_0x129932(0x184)),_0x429128['push'](_0x1e14d5['endpointUrlRaw']===null||_0x1e14d5[_0x129932(0x19e)]===''),_0x2cac1a[_0x129932(0x19d)](_0x4bafc5[_0x129932(0x19e)]!==null&&_0x4bafc5[_0x129932(0x19e)]!==''&&(_0x1e14d5[_0x129932(0x19e)]===null||_0x1e14d5[_0x129932(0x19e)]===''))),{'allMatch':_0x429128['every'](Boolean),'provesChange':_0x2cac1a[_0x129932(0x13e)](Boolean),'verifiedFields':_0x2faaaf};}export function validateNotificationDeleteReadback(_0x20a187,_0x20abaf,_0xe0042a){const _0x475461=a197_0x2dbda0;for(const [_0x1de155,_0x387062]of _0x20a187[_0x475461(0x174)]()){if(!Number[_0x475461(0x196)](_0x387062['id'])||_0x387062['id']<=0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x1de155+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x387062[_0x475461(0x164)]!==_0x20abaf)throw notificationError(_0x475461(0x143),_0x475461(0x16f)+(_0x1de155+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x387062[_0x475461(0x1a2)]!==_0xe0042a)throw notificationError(_0x475461(0x143),_0x475461(0x16f)+(_0x1de155+0x1)+_0x475461(0x158));}}export function safeApiFailure(_0xfaef3e,_0x5eb1be,_0xcd20aa){const _0x681ec4=a197_0x2dbda0;return notificationError(_0x681ec4(0x15e)+_0xfaef3e+'_'+(_0x5eb1be===_0x681ec4(0x159)?_0x681ec4(0x1a7):_0x5eb1be+_0x681ec4(0x198)),'Notification\x20config\x20'+_0xfaef3e+'\x20'+_0x5eb1be+'\x20failed.',_0xcd20aa);}export function notificationLookupCommand(_0x36dcf5,_0x4a1421){const _0x2b2eed=a197_0x2dbda0;return _0x2b2eed(0x19c)+_0x36dcf5+_0x2b2eed(0x139)+_0x4a1421+_0x2b2eed(0x149);}function validateNotificationDocument(_0x53d031,_0x261880){const _0x58d214=a197_0x2dbda0;for(const _0x3b7332 of Object['keys'](_0x53d031)){if(FORBIDDEN_IDENTITY_FIELDS[_0x58d214(0x140)](_0x3b7332))throw notificationError(_0x58d214(0x1a8),'Notification\x20JSON\x20field\x20\x22'+_0x3b7332+_0x58d214(0x157));if(!ALLOWED_INPUT_FIELDS['has'](_0x3b7332))throw notificationError(_0x58d214(0x145),_0x58d214(0x136)+_0x3b7332+'\x22.');}if(_0x261880===_0x58d214(0x1a9)&&Object[_0x58d214(0x166)](_0x53d031)[_0x58d214(0x171)]===0x0)throw notificationError('notification_config_update_empty','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x12f17b={};if(hasOwn(_0x53d031,_0x58d214(0x155)))_0x12f17b['configName']=validateRequiredString(_0x53d031['configName'],'configName',0x80);else{if(_0x261880===_0x58d214(0x175))throw notificationError(_0x58d214(0x18e),_0x58d214(0x1ad)+_0x58d214(0x17f));}if(hasOwn(_0x53d031,'channelType')){if(typeof _0x53d031['channelType']!=='string')throw invalidFieldType(_0x58d214(0x1a2),_0x58d214(0x15a));const _0x52ad94=_0x53d031[_0x58d214(0x1a2)][_0x58d214(0x1a3)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x58d214(0x193)](_0x52ad94))throw notificationError(_0x58d214(0x1b0),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x58d214(0x15f)+NOTIFICATION_CHANNEL_TYPES[_0x58d214(0x15d)](',\x20')+'.');_0x12f17b[_0x58d214(0x1a2)]=_0x52ad94;}else{if(_0x261880==='create')throw notificationError(_0x58d214(0x18e),'Create\x20JSON\x20requires\x20field\x20'+_0x58d214(0x163));}for(const [_0x519829,_0x1d88f1]of[['endpointUrl',0x200],['description',0x100]]){if(!hasOwn(_0x53d031,_0x519829))continue;const _0x3a6fc5=_0x53d031[_0x519829];if(_0x3a6fc5!==null&&typeof _0x3a6fc5!==_0x58d214(0x169))throw invalidFieldType(_0x519829,_0x58d214(0x14a));if(typeof _0x3a6fc5===_0x58d214(0x169)&&_0x3a6fc5[_0x58d214(0x171)]>_0x1d88f1)throw notificationError(_0x58d214(0x1b0),'Notification\x20JSON\x20field\x20\x22'+_0x519829+'\x22\x20cannot\x20exceed\x20'+_0x1d88f1+_0x58d214(0x189));_0x12f17b[_0x519829]=_0x3a6fc5;}if(hasOwn(_0x53d031,_0x58d214(0x13a))){const _0x201722=_0x53d031[_0x58d214(0x13a)];if(_0x201722===null&&_0x261880===_0x58d214(0x175))throw invalidFieldType(_0x58d214(0x13a),_0x58d214(0x15b));if(_0x201722!==null&&!isJsonObject(_0x201722))throw invalidFieldType(_0x58d214(0x13a),_0x261880===_0x58d214(0x1a9)?_0x58d214(0x1b3):_0x58d214(0x15b));_0x201722!==null&&validateChannelConfigFields(_0x12f17b['channelType'],_0x201722),_0x12f17b['channelConfig']=_0x201722;}for(const _0x1d324c of[_0x58d214(0x194),_0x58d214(0x180)]){if(!hasOwn(_0x53d031,_0x1d324c))continue;const _0x374937=_0x53d031[_0x1d324c];if(_0x374937!==null&&(!Number[_0x58d214(0x196)](_0x374937)||_0x374937<0x0))throw notificationError(_0x58d214(0x1b0),'Notification\x20JSON\x20field\x20\x22'+_0x1d324c+_0x58d214(0x19b));_0x12f17b[_0x1d324c]=_0x374937;}return _0x12f17b;}function validateRequiredString(_0x2ba5c0,_0x1d78d0,_0x564c0b){const _0x131e4d=a197_0x2dbda0;if(typeof _0x2ba5c0!==_0x131e4d(0x169))throw invalidFieldType(_0x1d78d0,'a\x20non-empty\x20string');const _0x55dbd3=_0x2ba5c0[_0x131e4d(0x1a3)]();if(!_0x55dbd3)throw notificationError(_0x131e4d(0x1b0),'Notification\x20JSON\x20field\x20\x22'+_0x1d78d0+_0x131e4d(0x160));if(_0x55dbd3[_0x131e4d(0x171)]>_0x564c0b)throw notificationError('notification_config_field_invalid',_0x131e4d(0x151)+_0x1d78d0+'\x22\x20cannot\x20exceed\x20'+_0x564c0b+'\x20characters.');return _0x55dbd3;}function validateChannelConfigFields(_0x4b486d,_0x262812){const _0x1d68f6=a197_0x2dbda0;if(hasOwn(_0x262812,_0x1d68f6(0x138)))throw forbiddenChannelConfigField('messageTemplate');if(_0x4b486d==='EMAIL')for(const _0x1d51f1 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x262812,_0x1d51f1))throw forbiddenChannelConfigField(_0x1d51f1);}}function a197_0x1c41(){const _0x1b8ec8=['\x22\x20must\x20be\x20a\x20non-empty\x20string.','parse','<redacted>','\x22channelType\x22.','appCode','\x22\x20must\x20be\x20','keys','WECOM','file','string','from-env','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','channelConfigRaw','Notification\x20JSON\x20channelConfig\x20field\x20\x22','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Notification\x20config\x20list\x20item\x20','yes','length','EMAIL','notification_config_json_invalid','entries','create','Notification\x20config\x20','env','kind','call','9aHqtFK','type','num','FEISHU','channelCode','\x22configName\x22.','readTimeout','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','utf8','\x22\x20is\x20forbidden.','endpointUrl:null','configCode','emailTargets','\x20must\x20be\x20an\x20object.','stringify','\x20characters.','1134jNqPBq','description','notification_config_source_unavailable','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','notification_config_field_required','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','updateTime','environment\x20variable\x20','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','includes','connectTimeout','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','isSafeInteger','object','_unavailable','notification_config_confirmation_required','isArray','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','rabetbase\x20notification\x20config-list\x20--appcode\x20','push','endpointUrlRaw','file\x20','prototype','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','channelType','trim','fromName','preflight','replyTo','failed','notification_config_field_forbidden','update','\x20has\x20invalid\x20field\x20\x22','endpointUrl','Notification\x20JSON\x20from\x20','Create\x20JSON\x20requires\x20field\x20','WEBHOOK','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','notification_config_field_invalid','str','Invalid\x20--','a\x20JSON\x20object\x20or\x20null','3384966BjtFHo','path','subjectPrefix','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Unknown\x20notification\x20JSON\x20field\x20\x22','Application-level\x20notification\x20config\x20ID','messageTemplate','\x20--type\x20','channelConfig','setEncoding','73240TnsnXf','bool','some','hasOwnProperty','has','1130WEvKDg','13868dnzPfV','notification_config_response_invalid','name','notification_config_field_unknown','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','boolean','\x20is\x20missing\x20required\x20field\x20\x22','\x20--format\x20compress','a\x20string\x20or\x20null','Notification\x20JSON\x20source\x20is\x20ambiguous.','5352610ktdemL','recipients','674436Ntijfd','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','Item\x20','Notification\x20JSON\x20field\x20\x22','stdin','677348ZmjmGL','bccList','configName','number','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','\x20has\x20an\x20invalid\x20channelType.','mutation','a\x20supported\x20string','a\x20JSON\x20object','2955006rvEtxK','join','notification_config_','Allowed\x20values:\x20'];a197_0x1c41=function(){return _0x1b8ec8;};return a197_0x1c41();}function forbiddenChannelConfigField(_0x52380e){const _0x23f64d=a197_0x2dbda0;return notificationError('notification_config_channel_field_forbidden',_0x23f64d(0x16d)+_0x52380e+_0x23f64d(0x183));}function invalidFieldType(_0x2197bd,_0x420851){const _0x41a078=a197_0x2dbda0;return notificationError('notification_config_field_invalid',_0x41a078(0x151)+_0x2197bd+_0x41a078(0x165)+_0x420851+'.');}function serializeChannelConfig(_0x17650b){const _0x8b2f7b=a197_0x2dbda0;return _0x17650b===null||_0x17650b===undefined?null:JSON[_0x8b2f7b(0x188)](_0x17650b);}function redactSensitive(_0x355649){const _0x222615=a197_0x2dbda0;return _0x355649===null||_0x355649===undefined||_0x355649===''?null:_0x222615(0x162);}function requireResponseString(_0x508b67,_0x4be3f7,_0x1b06c2){const _0x5845ba=a197_0x2dbda0;if(typeof _0x508b67!=='string'||_0x508b67['trim']()==='')throw CliErrors['apiError']('Invalid\x20notification\x20config\x20response.',_0x5845ba(0x150)+(_0x1b06c2+0x1)+_0x5845ba(0x148)+_0x4be3f7+'\x22.');return _0x508b67['trim']();}function requireExactString(_0x544061,_0x4665cc,_0x16fc61){const _0x560585=a197_0x2dbda0;if(typeof _0x544061!==_0x560585(0x169)||_0x544061['trim']()==='')throw notificationError(_0x560585(0x143),'Notification\x20config\x20'+_0x16fc61+_0x560585(0x148)+_0x4665cc+'\x22.');return _0x544061[_0x560585(0x1a3)]();}function responseNullableString(_0x47797a,_0x9fc50e,_0x181df1){const _0x1d95e5=a197_0x2dbda0;if(_0x47797a===undefined||_0x47797a===null)return null;if(typeof _0x47797a!==_0x1d95e5(0x169))throw notificationError(_0x1d95e5(0x143),_0x1d95e5(0x176)+_0x181df1+_0x1d95e5(0x1aa)+_0x9fc50e+'\x22.');return _0x47797a;}function responseNullableTimeout(_0x3f2735,_0x147877,_0x1e389b){const _0x3b2ab4=a197_0x2dbda0;if(_0x3f2735===undefined||_0x3f2735===null)return null;if(!Number[_0x3b2ab4(0x196)](_0x3f2735)||_0x3f2735<0x0)throw notificationError(_0x3b2ab4(0x143),'Notification\x20config\x20'+_0x1e389b+_0x3b2ab4(0x1aa)+_0x147877+'\x22.');return _0x3f2735;}function normalizeNullableString(_0x29fbe1){const _0x18e687=a197_0x2dbda0;return typeof _0x29fbe1===_0x18e687(0x169)?_0x29fbe1:null;}function isJsonObject(_0x16bf1d){const _0x42798c=a197_0x2dbda0;return _0x16bf1d!==null&&typeof _0x16bf1d===_0x42798c(0x197)&&!Array[_0x42798c(0x19a)](_0x16bf1d);}function hasOwn(_0x3f4308,_0x1943b8){const _0x4a005d=a197_0x2dbda0;return Object[_0x4a005d(0x1a0)][_0x4a005d(0x13f)][_0x4a005d(0x179)](_0x3f4308,_0x1943b8);}async function readStdin(){const _0x10dd63=a197_0x2dbda0;let _0x461995='';process['stdin'][_0x10dd63(0x13b)](_0x10dd63(0x182));for await(const _0x59a155 of process[_0x10dd63(0x152)])_0x461995+=_0x59a155;return _0x461995;}
|
|
1
|
+
const a197_0x2c563b=a197_0x1b83;(function(_0xd5104,_0x4d5a1c){const _0x18f6a6=a197_0x1b83,_0x20c17f=_0xd5104();while(!![]){try{const _0x4f24eb=parseInt(_0x18f6a6(0x189))/0x1+-parseInt(_0x18f6a6(0x16d))/0x2+-parseInt(_0x18f6a6(0x147))/0x3+-parseInt(_0x18f6a6(0x19d))/0x4+parseInt(_0x18f6a6(0x17c))/0x5+parseInt(_0x18f6a6(0x161))/0x6*(parseInt(_0x18f6a6(0x193))/0x7)+parseInt(_0x18f6a6(0x17b))/0x8*(parseInt(_0x18f6a6(0x15e))/0x9);if(_0x4f24eb===_0x4d5a1c)break;else _0x20c17f['push'](_0x20c17f['shift']());}catch(_0x37dde1){_0x20c17f['push'](_0x20c17f['shift']());}}}(a197_0x4cbd,0xd87fd));function a197_0x1b83(_0x306be0,_0x2614b7){_0x306be0=_0x306be0-0x133;const _0x4cbd6e=a197_0x4cbd();let _0x1b83d9=_0x4cbd6e[_0x306be0];return _0x1b83d9;}import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL',a197_0x2c563b(0x198),a197_0x2c563b(0x1ad),'WECOM',a197_0x2c563b(0x149)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x2c563b(0x138),'channelType','endpointUrl',a197_0x2c563b(0x192),a197_0x2c563b(0x1a4),a197_0x2c563b(0x169),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x2c563b(0x15d),a197_0x2c563b(0x195),a197_0x2c563b(0x179)]),EMAIL_RECIPIENT_FIELDS=new Set(['emailTargets',a197_0x2c563b(0x196),a197_0x2c563b(0x153),a197_0x2c563b(0x160),'replyTo',a197_0x2c563b(0x134),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x2c563b(0x185),'type':a197_0x2c563b(0x1b0),'required':![],'description':a197_0x2c563b(0x146)},{'name':a197_0x2c563b(0x17a),'type':'boolean','required':![],'default':![],'description':a197_0x2c563b(0x188)},{'name':a197_0x2c563b(0x180),'type':a197_0x2c563b(0x1b0),'required':![],'description':a197_0x2c563b(0x145)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x2c563b(0x177),'required':!![],'description':a197_0x2c563b(0x1a3)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x48fda9,_0x209304,_0x1cb6f4){return new CliError(_0x48fda9,0x1,_0x209304,_0x1cb6f4);}export function readNotificationId(_0x30d9f8){const _0x441fb3=a197_0x2c563b,_0x4e33d0=_0x30d9f8['num']('id');if(!Number[_0x441fb3(0x1ae)](_0x4e33d0)||_0x4e33d0<=0x0)throw notificationError('notification_config_id_invalid',_0x441fb3(0x152));return _0x4e33d0;}export function requireNotificationExplicitYes(_0x3478ab){const _0x3f38e9=a197_0x2c563b;if(_0x3478ab[_0x3f38e9(0x1a5)]('dry-run')||_0x3478ab[_0x3f38e9(0x1a5)]('yes'))return;throw notificationError('notification_config_confirmation_required',_0x3f38e9(0x13e),_0x3f38e9(0x157));}export function readNotificationChannelType(_0x71d9e6,_0x2fb695=a197_0x2c563b(0x1ab),_0x42cc28=a197_0x2c563b(0x187)){const _0x511dfd=a197_0x2c563b,_0x1f26d4=_0x71d9e6[_0x511dfd(0x14c)](_0x2fb695)[_0x511dfd(0x183)]()||_0x42cc28;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x1f26d4))throw CliErrors[_0x511dfd(0x19f)](_0x511dfd(0x15b)+_0x2fb695+':\x20'+_0x1f26d4,_0x511dfd(0x13b)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x1f26d4;}export function assertSingleNotificationSource(_0x5a6090){const _0xe2d231=a197_0x2c563b,_0x6b5a3f=[],_0x1ef145=_0x5a6090[_0xe2d231(0x14c)]('file')[_0xe2d231(0x183)]();if(_0x1ef145)_0x6b5a3f[_0xe2d231(0x135)]({'kind':_0xe2d231(0x185),'path':_0x1ef145});if(_0x5a6090[_0xe2d231(0x1a5)](_0xe2d231(0x17a)))_0x6b5a3f[_0xe2d231(0x135)]({'kind':_0xe2d231(0x17a)});const _0x389e16=_0x5a6090[_0xe2d231(0x14c)](_0xe2d231(0x180))['trim']();if(_0x389e16)_0x6b5a3f[_0xe2d231(0x135)]({'kind':_0xe2d231(0x167),'name':_0x389e16});if(_0x6b5a3f[_0xe2d231(0x13c)]===0x0)throw CliErrors[_0xe2d231(0x19f)](_0xe2d231(0x16a),_0xe2d231(0x15a));if(_0x6b5a3f['length']>0x1)throw CliErrors['validation'](_0xe2d231(0x184),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x6b5a3f[0x0];}export async function readNotificationDocument(_0x4e7b74,_0x53be3f){const _0x322063=a197_0x2c563b,_0x203423=assertSingleNotificationSource(_0x4e7b74),_0x420e6f=_0x203423[_0x322063(0x1a6)]===_0x322063(0x185)?_0x322063(0x15f)+_0x203423[_0x322063(0x14e)]:_0x203423['kind']===_0x322063(0x167)?_0x322063(0x178)+_0x203423[_0x322063(0x14a)]:_0x322063(0x17a);let _0x4a6340;try{if(_0x203423[_0x322063(0x1a6)]===_0x322063(0x185))_0x4a6340=await readFile(_0x203423[_0x322063(0x14e)],_0x322063(0x18e));else{if(_0x203423[_0x322063(0x1a6)]===_0x322063(0x167)){if(!(_0x203423[_0x322063(0x14a)]in process.env))throw notificationError(_0x322063(0x19c),_0x322063(0x197)+_0x203423['name']);_0x4a6340=process.env[_0x203423.name]??'';}else _0x4a6340=await readStdin();}}catch(_0x5cf131){if(_0x5cf131 instanceof CliError)throw _0x5cf131;throw notificationError('notification_config_source_unavailable',_0x322063(0x18b)+_0x420e6f+'.');}let _0x144048;try{_0x144048=JSON['parse'](_0x4a6340);}catch{throw notificationError('notification_config_json_invalid',_0x322063(0x16f)+_0x420e6f+'\x20is\x20invalid.',_0x322063(0x1b2));}if(!isJsonObject(_0x144048))throw notificationError(_0x322063(0x171),_0x322063(0x16f)+_0x420e6f+_0x322063(0x19a));return validateNotificationDocument(_0x144048,_0x53be3f);}export function projectNotificationListConfig(_0x20eb5d,_0x2dc8c8){const _0x49ca5e=a197_0x2c563b;return{'id':typeof _0x20eb5d['id']===_0x49ca5e(0x177)?_0x20eb5d['id']:null,'configCode':requireResponseString(_0x20eb5d[_0x49ca5e(0x195)],'configCode',_0x2dc8c8),'configName':requireResponseString(_0x20eb5d['configName'],_0x49ca5e(0x138),_0x2dc8c8),'channelType':requireResponseString(_0x20eb5d['channelType'],_0x49ca5e(0x13a),_0x2dc8c8),'description':normalizeNullableString(_0x20eb5d[_0x49ca5e(0x1a4)]),'createTime':normalizeNullableString(_0x20eb5d[_0x49ca5e(0x1b1)]),'updateTime':normalizeNullableString(_0x20eb5d[_0x49ca5e(0x1a0)])};}export function normalizeExactNotificationConfig(_0x14cbaf,_0x1c191b,_0x439775){const _0x475332=a197_0x2c563b;if(!Number['isSafeInteger'](_0x14cbaf['id'])||_0x14cbaf['id']!==_0x1c191b)throw notificationError(_0x475332(0x1a8),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x1c191b+'.');if(_0x14cbaf[_0x475332(0x15d)]!==_0x439775)throw notificationError(_0x475332(0x1a8),'Notification\x20config\x20'+_0x1c191b+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x1bc3fd=requireExactString(_0x14cbaf['configName'],_0x475332(0x138),_0x1c191b),_0x46cc00=requireExactString(_0x14cbaf[_0x475332(0x195)],_0x475332(0x195),_0x1c191b),_0x1d74b4=requireExactString(_0x14cbaf[_0x475332(0x13a)],'channelType',_0x1c191b);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x1d74b4))throw notificationError(_0x475332(0x1a8),_0x475332(0x148)+_0x1c191b+'\x20has\x20an\x20unsupported\x20channelType.');const _0x177d4b=responseNullableString(_0x14cbaf['endpointUrl'],_0x475332(0x162),_0x1c191b),_0x3d94dd=responseNullableString(_0x14cbaf[_0x475332(0x192)],'channelConfig',_0x1c191b),_0x17cf0a=responseNullableString(_0x14cbaf[_0x475332(0x1a4)],_0x475332(0x1a4),_0x1c191b),_0x28e36e=responseNullableTimeout(_0x14cbaf[_0x475332(0x169)],'connectTimeout',_0x1c191b),_0x300ea9=responseNullableTimeout(_0x14cbaf['readTimeout'],_0x475332(0x1b3),_0x1c191b);return{'id':_0x1c191b,'appCode':_0x439775,'configCode':_0x46cc00,'configName':_0x1bc3fd,'channelType':_0x1d74b4,'endpointUrl':redactSensitive(_0x177d4b),'channelConfig':redactSensitive(_0x3d94dd),'description':_0x17cf0a,'connectTimeout':_0x28e36e,'readTimeout':_0x300ea9,'endpointUrlRaw':_0x177d4b,'channelConfigRaw':_0x3d94dd};}export async function requireExactNotificationConfig(_0x2d75f6,_0x11c265,_0x2ea121){const _0x4457b0=a197_0x2c563b;let _0x29f911;try{_0x29f911=await getNotificationChannelConfig(_0x11c265,_0x2d75f6);}catch{throw safeApiFailure(_0x2ea121,_0x4457b0(0x18a),_0x4457b0(0x186)+_0x2d75f6+_0x4457b0(0x174));}return normalizeExactNotificationConfig(_0x29f911,_0x11c265,_0x2d75f6);}export function projectNotificationConfig(_0x558e2c){const _0x1dbf54=a197_0x2c563b;return{'id':_0x558e2c['id']??null,'appCode':_0x558e2c[_0x1dbf54(0x15d)],'configCode':_0x558e2c['configCode']??null,'configName':_0x558e2c[_0x1dbf54(0x138)],'channelType':_0x558e2c[_0x1dbf54(0x13a)],'endpointUrl':redactSensitive(_0x558e2c['endpointUrl']),'channelConfig':redactSensitive(_0x558e2c[_0x1dbf54(0x192)]),'description':_0x558e2c[_0x1dbf54(0x1a4)]??null,'connectTimeout':_0x558e2c[_0x1dbf54(0x169)]??null,'readTimeout':_0x558e2c[_0x1dbf54(0x1b3)]??null};}export function notificationSelector(_0xe45693){const _0x48aff4=a197_0x2c563b;return{'appCode':_0xe45693['appCode'],'id':_0xe45693['id'],'configCode':_0xe45693[_0x48aff4(0x195)],'configName':_0xe45693['configName'],'channelType':_0xe45693[_0x48aff4(0x13a)]};}export function createMutationInput(_0x416635,_0x3693db){const _0x2633ac=a197_0x2c563b;return{'appCode':_0x416635,'configName':_0x3693db[_0x2633ac(0x138)],'channelType':_0x3693db[_0x2633ac(0x13a)],...hasOwn(_0x3693db,_0x2633ac(0x162))?{'endpointUrl':_0x3693db['endpointUrl']}:{},...hasOwn(_0x3693db,_0x2633ac(0x192))?{'channelConfig':serializeChannelConfig(_0x3693db[_0x2633ac(0x192)])}:{},...hasOwn(_0x3693db,_0x2633ac(0x1a4))?{'description':_0x3693db['description']}:{},...hasOwn(_0x3693db,'connectTimeout')?{'connectTimeout':_0x3693db[_0x2633ac(0x169)]}:{},...hasOwn(_0x3693db,_0x2633ac(0x1b3))?{'readTimeout':_0x3693db[_0x2633ac(0x1b3)]}:{}};}export function mergeUpdateInput(_0x2e225f,_0x230ab3){const _0x46262f=a197_0x2c563b;return{'id':_0x2e225f['id'],'appCode':_0x2e225f[_0x46262f(0x15d)],'configName':_0x230ab3['configName']??_0x2e225f[_0x46262f(0x138)],'channelType':_0x230ab3[_0x46262f(0x13a)]??_0x2e225f['channelType'],'endpointUrl':hasOwn(_0x230ab3,'endpointUrl')?_0x230ab3[_0x46262f(0x162)]:_0x2e225f[_0x46262f(0x141)],'channelConfig':hasOwn(_0x230ab3,'channelConfig')?serializeChannelConfig(_0x230ab3[_0x46262f(0x192)]):_0x2e225f[_0x46262f(0x191)],'description':hasOwn(_0x230ab3,_0x46262f(0x1a4))?_0x230ab3[_0x46262f(0x1a4)]:_0x2e225f[_0x46262f(0x1a4)],'connectTimeout':hasOwn(_0x230ab3,_0x46262f(0x169))?_0x230ab3[_0x46262f(0x169)]:_0x2e225f[_0x46262f(0x169)],'readTimeout':hasOwn(_0x230ab3,_0x46262f(0x1b3))?_0x230ab3[_0x46262f(0x1b3)]:_0x2e225f[_0x46262f(0x1b3)]};}export function plannedUpdateProjection(_0x33daf6,_0x4d1041){const _0x260d80=a197_0x2c563b;return projectNotificationConfig({'id':_0x33daf6['id'],'appCode':_0x33daf6[_0x260d80(0x15d)],'configCode':_0x33daf6[_0x260d80(0x195)],'configName':_0x4d1041['configName']??_0x33daf6[_0x260d80(0x138)],'channelType':_0x4d1041[_0x260d80(0x13a)]??_0x33daf6[_0x260d80(0x13a)],'endpointUrl':hasOwn(_0x4d1041,_0x260d80(0x162))?_0x4d1041['endpointUrl']:_0x33daf6['endpointUrlRaw'],'channelConfig':hasOwn(_0x4d1041,_0x260d80(0x192))?_0x4d1041['channelConfig']:_0x33daf6['channelConfigRaw'],'description':hasOwn(_0x4d1041,_0x260d80(0x1a4))?_0x4d1041[_0x260d80(0x1a4)]:_0x33daf6[_0x260d80(0x1a4)],'connectTimeout':hasOwn(_0x4d1041,'connectTimeout')?_0x4d1041[_0x260d80(0x169)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x33daf6[_0x260d80(0x169)],'readTimeout':hasOwn(_0x4d1041,_0x260d80(0x1b3))?_0x4d1041[_0x260d80(0x1b3)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x33daf6[_0x260d80(0x1b3)]});}export function requestedSafeFieldsMatch(_0x537bfe,_0x4e59e2,_0x2985d8){const _0x44076b=a197_0x2c563b,_0x309e0e=[],_0x3c2cfe=[],_0x3a606f=[];for(const _0x174211 of[_0x44076b(0x138),_0x44076b(0x13a),_0x44076b(0x1a4)]){if(!hasOwn(_0x2985d8,_0x174211))continue;_0x3a606f[_0x44076b(0x135)](_0x174211),_0x309e0e[_0x44076b(0x135)](_0x4e59e2[_0x174211]===_0x2985d8[_0x174211]),_0x3c2cfe[_0x44076b(0x135)](_0x537bfe[_0x174211]!==_0x2985d8[_0x174211]&&_0x4e59e2[_0x174211]===_0x2985d8[_0x174211]);}for(const _0x2a18fa of[_0x44076b(0x169),_0x44076b(0x1b3)]){if(!hasOwn(_0x2985d8,_0x2a18fa))continue;const _0x12025b=_0x2985d8[_0x2a18fa]??(_0x2a18fa===_0x44076b(0x169)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x3a606f['push'](_0x2a18fa),_0x309e0e[_0x44076b(0x135)](_0x4e59e2[_0x2a18fa]===_0x12025b),_0x3c2cfe[_0x44076b(0x135)](_0x537bfe[_0x2a18fa]!==_0x12025b&&_0x4e59e2[_0x2a18fa]===_0x12025b);}return hasOwn(_0x2985d8,_0x44076b(0x162))&&_0x2985d8['endpointUrl']===null&&(_0x3a606f['push']('endpointUrl:null'),_0x309e0e[_0x44076b(0x135)](_0x4e59e2[_0x44076b(0x141)]===null||_0x4e59e2['endpointUrlRaw']===''),_0x3c2cfe[_0x44076b(0x135)](_0x537bfe[_0x44076b(0x141)]!==null&&_0x537bfe[_0x44076b(0x141)]!==''&&(_0x4e59e2[_0x44076b(0x141)]===null||_0x4e59e2[_0x44076b(0x141)]===''))),{'allMatch':_0x309e0e[_0x44076b(0x13f)](Boolean),'provesChange':_0x3c2cfe[_0x44076b(0x16c)](Boolean),'verifiedFields':_0x3a606f};}export function validateNotificationDeleteReadback(_0x48a875,_0x5f45e6,_0x36be73){const _0x4692be=a197_0x2c563b;for(const [_0x5c874d,_0x5790f9]of _0x48a875[_0x4692be(0x173)]()){if(!Number[_0x4692be(0x1ae)](_0x5790f9['id'])||_0x5790f9['id']<=0x0)throw notificationError(_0x4692be(0x1a8),_0x4692be(0x194)+(_0x5c874d+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x5790f9[_0x4692be(0x15d)]!==_0x5f45e6)throw notificationError('notification_config_response_invalid',_0x4692be(0x194)+(_0x5c874d+0x1)+_0x4692be(0x15c));if(_0x5790f9['channelType']!==_0x36be73)throw notificationError(_0x4692be(0x1a8),'Notification\x20config\x20list\x20item\x20'+(_0x5c874d+0x1)+_0x4692be(0x181));}}export function safeApiFailure(_0xc9a8f2,_0x50ea33,_0x2b86ff){const _0x5c7326=a197_0x2c563b;return notificationError(_0x5c7326(0x1ac)+_0xc9a8f2+'_'+(_0x50ea33===_0x5c7326(0x136)?_0x5c7326(0x1a7):_0x50ea33+_0x5c7326(0x163)),'Notification\x20config\x20'+_0xc9a8f2+'\x20'+_0x50ea33+_0x5c7326(0x172),_0x2b86ff);}function a197_0x4cbd(){const _0x4b3a47=['notification_config_field_required','type','notification_config_','DINGTALK','isSafeInteger','\x20has\x20invalid\x20field\x20\x22','string','createTime','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','readTimeout','join','subjectPrefix','push','mutation','create','configName','messageTemplate','channelType','Allowed\x20values:\x20','length','notification_config_field_invalid','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','every','Unknown\x20notification\x20JSON\x20field\x20\x22','endpointUrlRaw','notification_config_channel_field_forbidden','keys','\x22\x20is\x20forbidden.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','2756721xnnxNN','Notification\x20config\x20','WEBHOOK','name','\x20characters.','str','prototype','path','a\x20supported\x20string','a\x20non-empty\x20string','\x20is\x20missing\x20required\x20field\x20\x22','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','ccList','notification_config_update_empty','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','has','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','stringify','Create\x20JSON\x20requires\x20field\x20','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Invalid\x20--','\x20has\x20an\x20invalid\x20appCode.','appCode','5773509ZyurgQ','file\x20','bccList','6fcHfEi','endpointUrl','_unavailable','notification_config_field_unknown','Item\x20','call','env','includes','connectTimeout','Missing\x20notification\x20JSON\x20source.','update','some','2869848nqyOlU','Notification\x20JSON\x20channelConfig\x20field\x20\x22','Notification\x20JSON\x20from\x20','apiError','notification_config_json_invalid','\x20failed.','entries','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','rabetbase\x20notification\x20config-list\x20--appcode\x20','\x22channelType\x22.','number','environment\x20variable\x20','channelCode','stdin','32oBDNcu','5023555zvPjRS','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x22\x20must\x20be\x20','Notification\x20JSON\x20field\x20\x22','from-env','\x20has\x20an\x20invalid\x20channelType.','notification_config_field_forbidden','trim','Notification\x20JSON\x20source\x20is\x20ambiguous.','file','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','EMAIL','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','424981EXNUPr','preflight','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','a\x20string\x20or\x20null','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','utf8','isArray','\x22\x20must\x20be\x20a\x20non-empty\x20string.','channelConfigRaw','channelConfig','2837695xUcjoa','Notification\x20config\x20list\x20item\x20','configCode','recipients','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','FEISHU','\x22\x20cannot\x20exceed\x20','\x20must\x20be\x20an\x20object.','a\x20JSON\x20object','notification_config_source_unavailable','4641876YBIJbl','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','validation','updateTime','a\x20JSON\x20object\x20or\x20null','\x20--type\x20','Application-level\x20notification\x20config\x20ID','description','bool','kind','failed','notification_config_response_invalid','\x22configName\x22.'];a197_0x4cbd=function(){return _0x4b3a47;};return a197_0x4cbd();}export function notificationLookupCommand(_0x11ffc3,_0x799f5){const _0x2c76eb=a197_0x2c563b;return _0x2c76eb(0x175)+_0x11ffc3+_0x2c76eb(0x1a2)+_0x799f5+'\x20--format\x20compress';}function validateNotificationDocument(_0x35898f,_0x24efbe){const _0x1aedc1=a197_0x2c563b;for(const _0x4883d0 of Object[_0x1aedc1(0x143)](_0x35898f)){if(FORBIDDEN_IDENTITY_FIELDS[_0x1aedc1(0x156)](_0x4883d0))throw notificationError(_0x1aedc1(0x182),'Notification\x20JSON\x20field\x20\x22'+_0x4883d0+_0x1aedc1(0x155));if(!ALLOWED_INPUT_FIELDS[_0x1aedc1(0x156)](_0x4883d0))throw notificationError(_0x1aedc1(0x164),_0x1aedc1(0x140)+_0x4883d0+'\x22.');}if(_0x24efbe===_0x1aedc1(0x16b)&&Object[_0x1aedc1(0x143)](_0x35898f)['length']===0x0)throw notificationError(_0x1aedc1(0x154),_0x1aedc1(0x19e));const _0x267e69={};if(hasOwn(_0x35898f,_0x1aedc1(0x138)))_0x267e69[_0x1aedc1(0x138)]=validateRequiredString(_0x35898f[_0x1aedc1(0x138)],_0x1aedc1(0x138),0x80);else{if(_0x24efbe===_0x1aedc1(0x137))throw notificationError(_0x1aedc1(0x1aa),_0x1aedc1(0x159)+_0x1aedc1(0x1a9));}if(hasOwn(_0x35898f,'channelType')){if(typeof _0x35898f[_0x1aedc1(0x13a)]!==_0x1aedc1(0x1b0))throw invalidFieldType(_0x1aedc1(0x13a),_0x1aedc1(0x14f));const _0x9f3fd1=_0x35898f[_0x1aedc1(0x13a)][_0x1aedc1(0x183)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x1aedc1(0x168)](_0x9f3fd1))throw notificationError(_0x1aedc1(0x13d),_0x1aedc1(0x17d),_0x1aedc1(0x13b)+NOTIFICATION_CHANNEL_TYPES[_0x1aedc1(0x133)](',\x20')+'.');_0x267e69[_0x1aedc1(0x13a)]=_0x9f3fd1;}else{if(_0x24efbe===_0x1aedc1(0x137))throw notificationError(_0x1aedc1(0x1aa),_0x1aedc1(0x159)+_0x1aedc1(0x176));}for(const [_0x326267,_0x54ec28]of[[_0x1aedc1(0x162),0x200],[_0x1aedc1(0x1a4),0x100]]){if(!hasOwn(_0x35898f,_0x326267))continue;const _0x9a6f2=_0x35898f[_0x326267];if(_0x9a6f2!==null&&typeof _0x9a6f2!==_0x1aedc1(0x1b0))throw invalidFieldType(_0x326267,_0x1aedc1(0x18c));if(typeof _0x9a6f2===_0x1aedc1(0x1b0)&&_0x9a6f2[_0x1aedc1(0x13c)]>_0x54ec28)throw notificationError(_0x1aedc1(0x13d),_0x1aedc1(0x17f)+_0x326267+_0x1aedc1(0x199)+_0x54ec28+_0x1aedc1(0x14b));_0x267e69[_0x326267]=_0x9a6f2;}if(hasOwn(_0x35898f,_0x1aedc1(0x192))){const _0x21a5e7=_0x35898f[_0x1aedc1(0x192)];if(_0x21a5e7===null&&_0x24efbe===_0x1aedc1(0x137))throw invalidFieldType('channelConfig',_0x1aedc1(0x19b));if(_0x21a5e7!==null&&!isJsonObject(_0x21a5e7))throw invalidFieldType('channelConfig',_0x24efbe==='update'?_0x1aedc1(0x1a1):'a\x20JSON\x20object');_0x21a5e7!==null&&validateChannelConfigFields(_0x267e69[_0x1aedc1(0x13a)],_0x21a5e7),_0x267e69[_0x1aedc1(0x192)]=_0x21a5e7;}for(const _0x33cfe7 of[_0x1aedc1(0x169),_0x1aedc1(0x1b3)]){if(!hasOwn(_0x35898f,_0x33cfe7))continue;const _0x2bd867=_0x35898f[_0x33cfe7];if(_0x2bd867!==null&&(!Number[_0x1aedc1(0x1ae)](_0x2bd867)||_0x2bd867<0x0))throw notificationError(_0x1aedc1(0x13d),_0x1aedc1(0x17f)+_0x33cfe7+_0x1aedc1(0x18d));_0x267e69[_0x33cfe7]=_0x2bd867;}return _0x267e69;}function validateRequiredString(_0x168fbd,_0x1b50a1,_0x12cccf){const _0x1b9c0f=a197_0x2c563b;if(typeof _0x168fbd!==_0x1b9c0f(0x1b0))throw invalidFieldType(_0x1b50a1,_0x1b9c0f(0x150));const _0x1be9fb=_0x168fbd[_0x1b9c0f(0x183)]();if(!_0x1be9fb)throw notificationError(_0x1b9c0f(0x13d),_0x1b9c0f(0x17f)+_0x1b50a1+_0x1b9c0f(0x190));if(_0x1be9fb['length']>_0x12cccf)throw notificationError(_0x1b9c0f(0x13d),_0x1b9c0f(0x17f)+_0x1b50a1+_0x1b9c0f(0x199)+_0x12cccf+_0x1b9c0f(0x14b));return _0x1be9fb;}function validateChannelConfigFields(_0x16b3be,_0x17f361){const _0x5b3e55=a197_0x2c563b;if(hasOwn(_0x17f361,_0x5b3e55(0x139)))throw forbiddenChannelConfigField(_0x5b3e55(0x139));if(_0x16b3be===_0x5b3e55(0x187))for(const _0x5991fa of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x17f361,_0x5991fa))throw forbiddenChannelConfigField(_0x5991fa);}}function forbiddenChannelConfigField(_0x421a3f){const _0x21fb0d=a197_0x2c563b;return notificationError(_0x21fb0d(0x142),_0x21fb0d(0x16e)+_0x421a3f+_0x21fb0d(0x144));}function invalidFieldType(_0x5e07c5,_0x53287e){const _0x11979c=a197_0x2c563b;return notificationError(_0x11979c(0x13d),'Notification\x20JSON\x20field\x20\x22'+_0x5e07c5+_0x11979c(0x17e)+_0x53287e+'.');}function serializeChannelConfig(_0xb06bc5){const _0x31691e=a197_0x2c563b;return _0xb06bc5===null||_0xb06bc5===undefined?null:JSON[_0x31691e(0x158)](_0xb06bc5);}function redactSensitive(_0x42cba2){return _0x42cba2===null||_0x42cba2===undefined||_0x42cba2===''?null:'<redacted>';}function requireResponseString(_0x145959,_0x3bbd24,_0x4b4d03){const _0x45b6a8=a197_0x2c563b;if(typeof _0x145959!==_0x45b6a8(0x1b0)||_0x145959['trim']()==='')throw CliErrors[_0x45b6a8(0x170)]('Invalid\x20notification\x20config\x20response.',_0x45b6a8(0x165)+(_0x4b4d03+0x1)+_0x45b6a8(0x151)+_0x3bbd24+'\x22.');return _0x145959['trim']();}function requireExactString(_0x4c17ea,_0x17568f,_0x33b1ed){const _0x439b29=a197_0x2c563b;if(typeof _0x4c17ea!==_0x439b29(0x1b0)||_0x4c17ea[_0x439b29(0x183)]()==='')throw notificationError(_0x439b29(0x1a8),_0x439b29(0x148)+_0x33b1ed+_0x439b29(0x151)+_0x17568f+'\x22.');return _0x4c17ea[_0x439b29(0x183)]();}function responseNullableString(_0x1e36d1,_0x17187f,_0x5b6d3b){const _0x352c26=a197_0x2c563b;if(_0x1e36d1===undefined||_0x1e36d1===null)return null;if(typeof _0x1e36d1!==_0x352c26(0x1b0))throw notificationError('notification_config_response_invalid',_0x352c26(0x148)+_0x5b6d3b+_0x352c26(0x1af)+_0x17187f+'\x22.');return _0x1e36d1;}function responseNullableTimeout(_0x2ebc7a,_0x1f37b1,_0x8e7f0a){const _0x2352f4=a197_0x2c563b;if(_0x2ebc7a===undefined||_0x2ebc7a===null)return null;if(!Number[_0x2352f4(0x1ae)](_0x2ebc7a)||_0x2ebc7a<0x0)throw notificationError(_0x2352f4(0x1a8),_0x2352f4(0x148)+_0x8e7f0a+_0x2352f4(0x1af)+_0x1f37b1+'\x22.');return _0x2ebc7a;}function normalizeNullableString(_0x35211a){const _0x29316f=a197_0x2c563b;return typeof _0x35211a===_0x29316f(0x1b0)?_0x35211a:null;}function isJsonObject(_0x421987){const _0x179fdc=a197_0x2c563b;return _0x421987!==null&&typeof _0x421987==='object'&&!Array[_0x179fdc(0x18f)](_0x421987);}function hasOwn(_0x8bd41b,_0x30a70c){const _0x4c1e42=a197_0x2c563b;return Object[_0x4c1e42(0x14d)]['hasOwnProperty'][_0x4c1e42(0x166)](_0x8bd41b,_0x30a70c);}async function readStdin(){const _0x2dede8=a197_0x2c563b;let _0x50afad='';process[_0x2dede8(0x17a)]['setEncoding'](_0x2dede8(0x18e));for await(const _0x72acb1 of process[_0x2dede8(0x17a)])_0x50afad+=_0x72acb1;return _0x50afad;}
|