@lovrabet/rabetbase-cli 2.5.8-beta.2 → 2.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-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/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a174_0x20ecd8=a174_0x4191;(function(_0x44a513,_0x1e3be7){const _0x5d7ecd=a174_0x4191,_0x56df8=_0x44a513();while(!![]){try{const _0x5ea7f4=-parseInt(_0x5d7ecd(0x144))/0x1+-parseInt(_0x5d7ecd(0x157))/0x2*(-parseInt(_0x5d7ecd(0x166))/0x3)+-parseInt(_0x5d7ecd(0x150))/0x4*(parseInt(_0x5d7ecd(0x159))/0x5)+parseInt(_0x5d7ecd(0x13e))/0x6+-parseInt(_0x5d7ecd(0x111))/0x7+parseInt(_0x5d7ecd(0x158))/0x8+parseInt(_0x5d7ecd(0x14e))/0x9;if(_0x5ea7f4===_0x1e3be7)break;else _0x56df8['push'](_0x56df8['shift']());}catch(_0x3fe8ee){_0x56df8['push'](_0x56df8['shift']());}}}(a174_0x23ac,0x95345));import{createHash}from'node:crypto';import{mkdir,readFile,stat,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';function a174_0x23ac(){const _0x335791=['plan-out','version','updateTime','createdAt','datasetCode','hash','Menu\x20delete\x20plan\x20creation\x20time\x20','Failed\x20to\x20write\x20menu\x20delete\x20plan\x20','batch-delete-menu','resourcesHash','isArray','Generate\x20a\x20new\x20plan\x20and\x20review\x20parent,\x20path,\x20page,\x20children,\x20resources,\x20and\x20update\x20time.','utf8','resourcesValid','delete','Refusing\x20to\x20overwrite\x20existing\x20menu\x20delete\x20plan:\x20','isInteger','childrenCount','1205658rVvmZZ','POST','\x20bytes.','update','targets','before','693492GkELqt','parse','menu_state_drift','path','parentId','appCode','Generate\x20and\x20review\x20a\x20new\x20plan\x20before\x20deleting.',',\x20current\x20app\x20is\x20','message','\x20is\x20no\x20longer\x20present\x20in\x20the\x20online\x20menu\x20tree.','12894678WKiqjH','recursive','1404GgmHIA','deleteOrder','extendHash','number','getTime','Menu\x20delete\x20plan\x20is\x20too\x20large:\x20','expiresAt','32AFaYkd','4963488VthxrN','11485qVquwR','type','isFinite','object','selector','\x20contract.','visible','warnings','sort','trim','extend','Menu\x20delete\x20plan\x20is\x20not\x20valid\x20JSON:\x20','Generate\x20a\x20new\x20plan\x20on\x20a\x20machine\x20with\x20a\x20correct\x20system\x20clock.','9645osWGRh','depth','every','datasetId','cascade','stringify','childrenIds','string','targetFingerprint','plan','/smartapi/menu/batchDelete','menu_plan_expired','pageSchemaAffected','boolean','label','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out;\x20do\x20not\x20edit\x20target\x20fields\x20manually.','Menu\x20delete\x20plan\x20targets\x20app\x20','byId','Menu\x20delete\x20plan\x20expired\x20at\x20','toISOString','pages','Planned\x20menu\x20','1362767fStkoA','length','hex','map','snapshotHash','sha256','resources','menu\x20delete','targetFingerprints','menu_plan_invalid','Menu\x20delete\x20plan\x20does\x20not\x20match\x20version\x20','Online\x20menu\x20state\x20changed\x20after\x20the\x20delete\x20plan\x20was\x20reviewed.','code','test','target','pageId','size','updateUserId','Cannot\x20read\x20menu\x20delete\x20plan\x20','Menu\x20delete\x20plan\x20target\x20list\x20does\x20not\x20match\x20its\x20immutable\x20fingerprints.','updateUserName','Cannot\x20create\x20a\x20menu\x20delete\x20plan\x20without\x20an\x20exact\x20target\x20snapshot.','Choose\x20a\x20new\x20--plan-out\x20path\x20so\x20the\x20reviewed\x20plan\x20remains\x20immutable.','modelType','menu_plan_app_mismatch','menu_plan_file_exists','pageType'];a174_0x23ac=function(){return _0x335791;};return a174_0x23ac();}import{menuError,mutationResult}from'../../../commands/menu/shared/mutations.js';const PLAN_VERSION=0x2,PLAN_COMMAND=a174_0x20ecd8(0x118),PLAN_TTL_MS=0x1e*0x3c*0x3e8,MAX_PLAN_BYTES=0x400*0x400;export function createMenuDeletePlanFile(_0x1e5165,_0x3b527d,_0x35fe45=new Date()){const _0x87d618=a174_0x20ecd8;if(!_0x3b527d[_0x87d618(0x143)]||!isMenuFact(_0x3b527d[_0x87d618(0x143)]))throw menuError(_0x87d618(0x11a),_0x87d618(0x126));const _0x4ff3ed=_0x3b527d[_0x87d618(0x142)]?.[_0x87d618(0x112)]?_0x3b527d[_0x87d618(0x142)]:[_0x3b527d[_0x87d618(0x143)]],_0x352f03=_0x3b527d[_0x87d618(0x151)]?.[_0x87d618(0x112)]?_0x3b527d['deleteOrder']:_0x4ff3ed[_0x87d618(0x114)](_0x5dc040=>_0x5dc040['id']);return{'version':PLAN_VERSION,'command':PLAN_COMMAND,'appCode':_0x1e5165,'createdAt':_0x35fe45[_0x87d618(0x10e)](),'expiresAt':new Date(_0x35fe45['getTime']()+PLAN_TTL_MS)[_0x87d618(0x10e)](),'snapshotHash':_0x3b527d[_0x87d618(0x115)],'recursive':_0x3b527d[_0x87d618(0x15d)][_0x87d618(0x14f)]===!![],'target':_0x3b527d[_0x87d618(0x143)],'targetFingerprint':fingerprint(_0x3b527d[_0x87d618(0x143)]),'targets':_0x4ff3ed,'targetFingerprints':_0x4ff3ed['map'](fingerprint),'deleteOrder':_0x352f03,'cascade':_0x3b527d[_0x87d618(0xff)]??{'pages':_0x3b527d[_0x87d618(0x143)]['pageId']==null?[]:[_0x3b527d[_0x87d618(0x143)]['pageId']],'pageSchemaAffected':_0x3b527d[_0x87d618(0x143)][_0x87d618(0x120)]!=null},'warnings':[..._0x3b527d[_0x87d618(0x160)]]};}export async function writeMenuDeletePlan(_0x89dbd4,_0x1e0fe3){const _0x107504=a174_0x20ecd8,_0x291cb7=resolvePlanPath(_0x89dbd4,_0x107504(0x12c));await mkdir(dirname(_0x291cb7),{'recursive':!![]});try{await writeFile(_0x291cb7,JSON[_0x107504(0x100)](_0x1e0fe3,null,0x2)+'\x0a',{'encoding':'utf8','flag':'wx'});}catch(_0x54ec1b){if(_0x54ec1b[_0x107504(0x11d)]==='EEXIST')throw menuError(_0x107504(0x12a),_0x107504(0x13b)+_0x291cb7,_0x107504(0x127));throw menuError('menu_plan_write_failed',_0x107504(0x133)+_0x291cb7+':\x20'+errorMessage(_0x54ec1b));}return _0x291cb7;}export async function readMenuDeletePlan(_0x4b1cd0){const _0x3d1a7e=a174_0x20ecd8,_0x232d4c=resolvePlanPath(_0x4b1cd0,_0x3d1a7e(0x104));let _0x3cc48e;try{_0x3cc48e=(await stat(_0x232d4c))[_0x3d1a7e(0x121)];}catch(_0x1a7a08){throw menuError('menu_plan_invalid',_0x3d1a7e(0x123)+_0x232d4c+':\x20'+errorMessage(_0x1a7a08));}if(_0x3cc48e>MAX_PLAN_BYTES)throw menuError(_0x3d1a7e(0x11a),_0x3d1a7e(0x155)+_0x3cc48e+_0x3d1a7e(0x140));let _0x3b8557;try{_0x3b8557=JSON[_0x3d1a7e(0x145)](await readFile(_0x232d4c,_0x3d1a7e(0x138)));}catch(_0x402707){throw menuError('menu_plan_invalid',_0x3d1a7e(0x164)+errorMessage(_0x402707));}if(!isMenuDeletePlanFile(_0x3b8557))throw menuError('menu_plan_invalid',_0x3d1a7e(0x11b)+PLAN_VERSION+'\x20of\x20the\x20'+PLAN_COMMAND+_0x3d1a7e(0x15e));if(!sameFingerprint(_0x3b8557[_0x3d1a7e(0x103)],fingerprint(_0x3b8557[_0x3d1a7e(0x11f)])))throw menuError(_0x3d1a7e(0x11a),'Menu\x20delete\x20plan\x20target\x20facts\x20do\x20not\x20match\x20its\x20immutable\x20fingerprint.',_0x3d1a7e(0x10a));if(!_0x3b8557[_0x3d1a7e(0x142)][_0x3d1a7e(0x168)]((_0xc86551,_0x24f827)=>sameFingerprint(_0x3b8557['targetFingerprints'][_0x24f827],fingerprint(_0xc86551)))||!sameFingerprint(_0x3b8557[_0x3d1a7e(0x103)],fingerprint(_0x3b8557[_0x3d1a7e(0x142)][_0x3b8557[_0x3d1a7e(0x142)][_0x3d1a7e(0x112)]-0x1])))throw menuError('menu_plan_invalid',_0x3d1a7e(0x124),_0x3d1a7e(0x10a));return{'path':_0x232d4c,'plan':_0x3b8557};}export function mutationPlanFromDeleteFile(_0x35e79b,_0x117123){const _0x487f4a=a174_0x20ecd8;return mutationResult({'operation':_0x487f4a(0x13a),'selector':{'id':_0x35e79b['target']['id'],'recursive':_0x35e79b[_0x487f4a(0x14f)]},'before':_0x35e79b[_0x487f4a(0x11f)],'after':null,'dryRun':![],'backend':[{'method':_0x487f4a(0x13f),'path':_0x487f4a(0x105)}],'plannedActions':[{'stage':_0x487f4a(0x134),'method':_0x487f4a(0x13f),'path':_0x487f4a(0x105),'body':{'idList':_0x35e79b[_0x487f4a(0x151)]}}],'targets':_0x35e79b['targets'],'deleteOrder':_0x35e79b[_0x487f4a(0x151)],'snapshotHash':_0x35e79b[_0x487f4a(0x115)],'cascade':_0x35e79b[_0x487f4a(0xff)],'planFile':{'path':_0x117123,'createdAt':_0x35e79b[_0x487f4a(0x12f)],'expiresAt':_0x35e79b[_0x487f4a(0x156)]},'warnings':_0x35e79b[_0x487f4a(0x160)]});}export function assertMenuDeletePlanCurrent(_0x13a5e7,_0x200321,_0x1c9d7e,_0x1d0556=new Date()){const _0x32ab99=a174_0x20ecd8;assertMenuDeletePlanExecutable(_0x13a5e7,_0x200321,_0x1d0556);if(_0x1c9d7e[_0x32ab99(0x131)]!==_0x13a5e7[_0x32ab99(0x115)])throw menuError(_0x32ab99(0x146),_0x32ab99(0x11c),'Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out\x20and\x20review\x20the\x20latest\x20cascade.');return _0x13a5e7[_0x32ab99(0x142)][_0x32ab99(0x114)]((_0xb02cc,_0x4209b6)=>{const _0x1d6f2d=_0x32ab99,_0xe3ffb9=_0x1c9d7e[_0x1d6f2d(0x10c)]['get'](_0xb02cc['id']);if(!_0xe3ffb9)throw menuError(_0x1d6f2d(0x146),_0x1d6f2d(0x110)+_0xb02cc['id']+_0x1d6f2d(0x14d));if(!sameFingerprint(_0x13a5e7['targetFingerprints'][_0x4209b6],fingerprint(_0xe3ffb9)))throw menuError(_0x1d6f2d(0x146),'Planned\x20menu\x20'+_0xb02cc['id']+'\x20no\x20longer\x20matches\x20the\x20reviewed\x20target\x20facts.',_0x1d6f2d(0x137));return _0xe3ffb9;});}export function assertMenuDeletePlanExecutable(_0x157abb,_0x5e1c59,_0x28545b=new Date()){const _0x5e715f=a174_0x20ecd8;if(_0x157abb[_0x5e715f(0x149)]!==_0x5e1c59)throw menuError(_0x5e715f(0x129),_0x5e715f(0x10b)+JSON['stringify'](_0x157abb[_0x5e715f(0x149)])+_0x5e715f(0x14b)+JSON[_0x5e715f(0x100)](_0x5e1c59)+'.');const _0x269824=Date[_0x5e715f(0x145)](_0x157abb['createdAt']),_0x3ae90c=Date['parse'](_0x157abb[_0x5e715f(0x156)]);if(!Number['isFinite'](_0x269824)||!Number[_0x5e715f(0x15b)](_0x3ae90c)||_0x3ae90c-_0x269824!==PLAN_TTL_MS)throw menuError(_0x5e715f(0x11a),'Menu\x20delete\x20plan\x20has\x20invalid\x20timestamps.');if(_0x269824>_0x28545b[_0x5e715f(0x154)]())throw menuError('menu_plan_invalid',_0x5e715f(0x132)+_0x157abb['createdAt']+'\x20is\x20in\x20the\x20future.',_0x5e715f(0x165));if(_0x28545b[_0x5e715f(0x154)]()>_0x3ae90c)throw menuError(_0x5e715f(0x106),_0x5e715f(0x10d)+_0x157abb[_0x5e715f(0x156)]+'.',_0x5e715f(0x14a));}function fingerprint(_0x104195){const _0x3fc3dc=a174_0x20ecd8;return{'id':_0x104195['id'],'parentId':_0x104195[_0x3fc3dc(0x148)],'depth':_0x104195[_0x3fc3dc(0x167)],'label':_0x104195[_0x3fc3dc(0x109)],'path':_0x104195[_0x3fc3dc(0x147)],'type':_0x104195['type'],'visible':_0x104195[_0x3fc3dc(0x15f)],'sort':_0x104195[_0x3fc3dc(0x161)],'pageId':_0x104195[_0x3fc3dc(0x120)],'pageType':_0x104195[_0x3fc3dc(0x12b)],'modelType':_0x104195[_0x3fc3dc(0x128)],'datasetId':_0x104195[_0x3fc3dc(0xfe)],'datasetCode':_0x104195['datasetCode'],'childrenIds':[..._0x104195[_0x3fc3dc(0x101)]],'childrenCount':_0x104195[_0x3fc3dc(0x13d)],'resourcesValid':_0x104195[_0x3fc3dc(0x139)],'resourcesHash':hashValue(_0x104195[_0x3fc3dc(0x117)]),'extendHash':hashValue(_0x104195[_0x3fc3dc(0x163)]??null),'updateTime':_0x104195[_0x3fc3dc(0x12e)]};}function hashValue(_0x46a580){const _0x1d41f2=a174_0x20ecd8;return createHash(_0x1d41f2(0x116))[_0x1d41f2(0x141)](JSON[_0x1d41f2(0x100)](_0x46a580))['digest'](_0x1d41f2(0x113));}function sameFingerprint(_0x70d737,_0x17ec73){const _0x3fde68=a174_0x20ecd8;return JSON[_0x3fde68(0x100)](_0x70d737)===JSON[_0x3fde68(0x100)](_0x17ec73);}function resolvePlanPath(_0x2bb90d,_0x39f3c1){const _0x5bd822=a174_0x20ecd8,_0xf1dbd3=_0x2bb90d[_0x5bd822(0x162)]();if(!_0xf1dbd3)throw menuError(_0x5bd822(0x11a),'--'+_0x39f3c1+'\x20requires\x20a\x20non-empty\x20file\x20path.');return resolve(_0xf1dbd3);}function isMenuDeletePlanFile(_0x794ffb){const _0x1ee9d1=a174_0x20ecd8;if(!isRecord(_0x794ffb))return![];return _0x794ffb[_0x1ee9d1(0x12d)]===PLAN_VERSION&&_0x794ffb['command']===PLAN_COMMAND&&typeof _0x794ffb[_0x1ee9d1(0x149)]==='string'&&_0x794ffb['appCode'][_0x1ee9d1(0x112)]>0x0&&typeof _0x794ffb[_0x1ee9d1(0x12f)]===_0x1ee9d1(0x102)&&typeof _0x794ffb[_0x1ee9d1(0x156)]==='string'&&typeof _0x794ffb[_0x1ee9d1(0x115)]===_0x1ee9d1(0x102)&&/^sha256:[a-f0-9]{64}$/[_0x1ee9d1(0x11e)](_0x794ffb[_0x1ee9d1(0x115)])&&typeof _0x794ffb['recursive']==='boolean'&&isMenuFact(_0x794ffb[_0x1ee9d1(0x11f)])&&isTargetFingerprint(_0x794ffb['targetFingerprint'])&&Array['isArray'](_0x794ffb[_0x1ee9d1(0x142)])&&_0x794ffb[_0x1ee9d1(0x142)]['length']>0x0&&_0x794ffb['targets'][_0x1ee9d1(0x168)](isMenuFact)&&Array['isArray'](_0x794ffb[_0x1ee9d1(0x119)])&&_0x794ffb[_0x1ee9d1(0x119)]['length']===_0x794ffb[_0x1ee9d1(0x142)][_0x1ee9d1(0x112)]&&_0x794ffb['targetFingerprints'][_0x1ee9d1(0x168)](isTargetFingerprint)&&Array[_0x1ee9d1(0x136)](_0x794ffb['deleteOrder'])&&_0x794ffb[_0x1ee9d1(0x151)][_0x1ee9d1(0x112)]===_0x794ffb[_0x1ee9d1(0x142)]['length']&&_0x794ffb[_0x1ee9d1(0x151)][_0x1ee9d1(0x168)](isPositiveInteger)&&new Set(_0x794ffb['deleteOrder'])[_0x1ee9d1(0x121)]===_0x794ffb[_0x1ee9d1(0x151)]['length']&&_0x794ffb[_0x1ee9d1(0x142)][_0x1ee9d1(0x168)]((_0x4e9444,_0x1569f0)=>_0x4e9444['id']===_0x794ffb['deleteOrder'][_0x1569f0])&&_0x794ffb['targets'][_0x794ffb[_0x1ee9d1(0x142)][_0x1ee9d1(0x112)]-0x1]?.['id']===_0x794ffb[_0x1ee9d1(0x11f)]['id']&&isRecord(_0x794ffb['cascade'])&&Array[_0x1ee9d1(0x136)](_0x794ffb[_0x1ee9d1(0xff)][_0x1ee9d1(0x10f)])&&_0x794ffb[_0x1ee9d1(0xff)][_0x1ee9d1(0x10f)][_0x1ee9d1(0x168)](isPositiveInteger)&&typeof _0x794ffb[_0x1ee9d1(0xff)][_0x1ee9d1(0x107)]===_0x1ee9d1(0x108)&&Array[_0x1ee9d1(0x136)](_0x794ffb[_0x1ee9d1(0x160)])&&_0x794ffb['warnings'][_0x1ee9d1(0x168)](_0x1af161=>typeof _0x1af161===_0x1ee9d1(0x102));}function isMenuFact(_0x33940d){const _0x8583b1=a174_0x20ecd8;if(!isRecord(_0x33940d))return![];return isPositiveInteger(_0x33940d['id'])&&(_0x33940d[_0x8583b1(0x148)]===null||isPositiveInteger(_0x33940d[_0x8583b1(0x148)]))&&Number[_0x8583b1(0x13c)](_0x33940d[_0x8583b1(0x167)])&&_0x33940d['depth']>=0x0&&typeof _0x33940d['label']===_0x8583b1(0x102)&&typeof _0x33940d[_0x8583b1(0x147)]===_0x8583b1(0x102)&&typeof _0x33940d[_0x8583b1(0x15a)]===_0x8583b1(0x102)&&(_0x33940d['visible']===null||typeof _0x33940d['visible']==='boolean')&&(_0x33940d[_0x8583b1(0x161)]===null||Number[_0x8583b1(0x13c)](_0x33940d['sort']))&&Array[_0x8583b1(0x136)](_0x33940d[_0x8583b1(0x117)])&&_0x33940d[_0x8583b1(0x117)][_0x8583b1(0x168)](_0x2a25f7=>typeof _0x2a25f7===_0x8583b1(0x102))&&typeof _0x33940d[_0x8583b1(0x139)]===_0x8583b1(0x108)&&Array[_0x8583b1(0x136)](_0x33940d[_0x8583b1(0x101)])&&_0x33940d[_0x8583b1(0x101)][_0x8583b1(0x168)](isPositiveInteger)&&Number[_0x8583b1(0x13c)](_0x33940d[_0x8583b1(0x13d)])&&_0x33940d['childrenCount']>=0x0&&(_0x33940d[_0x8583b1(0x120)]===null||isPositiveInteger(_0x33940d[_0x8583b1(0x120)]))&&typeof _0x33940d['pageType']===_0x8583b1(0x102)&&typeof _0x33940d[_0x8583b1(0x128)]===_0x8583b1(0x102)&&(_0x33940d[_0x8583b1(0xfe)]===null||isPositiveInteger(_0x33940d['datasetId']))&&typeof _0x33940d[_0x8583b1(0x130)]==='string'&&(_0x33940d[_0x8583b1(0x122)]===null||typeof _0x33940d[_0x8583b1(0x122)]===_0x8583b1(0x102))&&(_0x33940d[_0x8583b1(0x125)]===null||typeof _0x33940d['updateUserName']===_0x8583b1(0x102))&&(_0x33940d[_0x8583b1(0x12e)]===null||typeof _0x33940d[_0x8583b1(0x12e)]===_0x8583b1(0x102)||typeof _0x33940d[_0x8583b1(0x12e)]===_0x8583b1(0x153))&&(_0x33940d['extend']===undefined||_0x33940d[_0x8583b1(0x163)]===null||isRecord(_0x33940d[_0x8583b1(0x163)]));}function isTargetFingerprint(_0x28b405){const _0x67c71f=a174_0x20ecd8;if(!isRecord(_0x28b405))return![];return isPositiveInteger(_0x28b405['id'])&&(_0x28b405['parentId']===null||isPositiveInteger(_0x28b405[_0x67c71f(0x148)]))&&Number[_0x67c71f(0x13c)](_0x28b405[_0x67c71f(0x167)])&&_0x28b405[_0x67c71f(0x167)]>=0x0&&typeof _0x28b405['label']===_0x67c71f(0x102)&&typeof _0x28b405[_0x67c71f(0x147)]==='string'&&typeof _0x28b405[_0x67c71f(0x15a)]===_0x67c71f(0x102)&&(_0x28b405['visible']===null||typeof _0x28b405[_0x67c71f(0x15f)]===_0x67c71f(0x108))&&(_0x28b405[_0x67c71f(0x161)]===null||Number[_0x67c71f(0x13c)](_0x28b405['sort']))&&(_0x28b405[_0x67c71f(0x120)]===null||isPositiveInteger(_0x28b405['pageId']))&&typeof _0x28b405[_0x67c71f(0x12b)]===_0x67c71f(0x102)&&typeof _0x28b405[_0x67c71f(0x128)]===_0x67c71f(0x102)&&(_0x28b405[_0x67c71f(0xfe)]===null||isPositiveInteger(_0x28b405['datasetId']))&&typeof _0x28b405['datasetCode']===_0x67c71f(0x102)&&Array[_0x67c71f(0x136)](_0x28b405[_0x67c71f(0x101)])&&_0x28b405[_0x67c71f(0x101)][_0x67c71f(0x168)](isPositiveInteger)&&Number['isInteger'](_0x28b405[_0x67c71f(0x13d)])&&_0x28b405[_0x67c71f(0x13d)]>=0x0&&typeof _0x28b405[_0x67c71f(0x139)]===_0x67c71f(0x108)&&typeof _0x28b405['resourcesHash']===_0x67c71f(0x102)&&/^[a-f0-9]{64}$/[_0x67c71f(0x11e)](_0x28b405[_0x67c71f(0x135)])&&typeof _0x28b405[_0x67c71f(0x152)]===_0x67c71f(0x102)&&/^[a-f0-9]{64}$/[_0x67c71f(0x11e)](_0x28b405[_0x67c71f(0x152)])&&(_0x28b405[_0x67c71f(0x12e)]===null||typeof _0x28b405[_0x67c71f(0x12e)]==='string'||typeof _0x28b405[_0x67c71f(0x12e)]==='number');}function isRecord(_0x20d808){const _0x443275=a174_0x20ecd8;return typeof _0x20d808===_0x443275(0x15c)&&_0x20d808!==null&&!Array['isArray'](_0x20d808);}function a174_0x4191(_0x2320a8,_0x4247d2){_0x2320a8=_0x2320a8-0xfe;const _0x23ac9f=a174_0x23ac();let _0x41913d=_0x23ac9f[_0x2320a8];return _0x41913d;}function isPositiveInteger(_0x398a79){return Number['isSafeInteger'](_0x398a79)&&Number(_0x398a79)>0x0;}function errorMessage(_0x3410f4){const _0x53b529=a174_0x20ecd8;return _0x3410f4 instanceof Error?_0x3410f4[_0x53b529(0x14c)]:String(_0x3410f4);}
|
|
1
|
+
const a174_0x60941e=a174_0x2ed5;(function(_0x2cb7c3,_0x2126a5){const _0x5d9043=a174_0x2ed5,_0x14055e=_0x2cb7c3();while(!![]){try{const _0x680916=parseInt(_0x5d9043(0x1f8))/0x1*(-parseInt(_0x5d9043(0x21e))/0x2)+-parseInt(_0x5d9043(0x1d4))/0x3+parseInt(_0x5d9043(0x1fa))/0x4+-parseInt(_0x5d9043(0x1f7))/0x5+parseInt(_0x5d9043(0x1d6))/0x6*(parseInt(_0x5d9043(0x1fb))/0x7)+-parseInt(_0x5d9043(0x1d7))/0x8+parseInt(_0x5d9043(0x1e5))/0x9*(parseInt(_0x5d9043(0x1fc))/0xa);if(_0x680916===_0x2126a5)break;else _0x14055e['push'](_0x14055e['shift']());}catch(_0x55b529){_0x14055e['push'](_0x14055e['shift']());}}}(a174_0x5b59,0xb4640));import{createHash}from'node:crypto';import{mkdir,readFile,stat,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{menuError,mutationResult}from'../../../commands/menu/shared/mutations.js';const PLAN_VERSION=0x2,PLAN_COMMAND=a174_0x60941e(0x212),PLAN_TTL_MS=0x1e*0x3c*0x3e8,MAX_PLAN_BYTES=0x400*0x400;export function createMenuDeletePlanFile(_0x192972,_0xdfff1c,_0x93da71=new Date()){const _0x49a71d=a174_0x60941e;if(!_0xdfff1c[_0x49a71d(0x1e3)]||!isMenuFact(_0xdfff1c['before']))throw menuError(_0x49a71d(0x219),_0x49a71d(0x1f1));const _0x589571=_0xdfff1c[_0x49a71d(0x1c9)]?.[_0x49a71d(0x1df)]?_0xdfff1c[_0x49a71d(0x1c9)]:[_0xdfff1c[_0x49a71d(0x1e3)]],_0x55017d=_0xdfff1c[_0x49a71d(0x201)]?.[_0x49a71d(0x1df)]?_0xdfff1c[_0x49a71d(0x201)]:_0x589571['map'](_0x5e2e94=>_0x5e2e94['id']);return{'version':PLAN_VERSION,'command':PLAN_COMMAND,'appCode':_0x192972,'createdAt':_0x93da71[_0x49a71d(0x1ec)](),'expiresAt':new Date(_0x93da71[_0x49a71d(0x1f2)]()+PLAN_TTL_MS)['toISOString'](),'snapshotHash':_0xdfff1c[_0x49a71d(0x22b)],'recursive':_0xdfff1c[_0x49a71d(0x1ea)][_0x49a71d(0x21b)]===!![],'target':_0xdfff1c['before'],'targetFingerprint':fingerprint(_0xdfff1c['before']),'targets':_0x589571,'targetFingerprints':_0x589571[_0x49a71d(0x222)](fingerprint),'deleteOrder':_0x55017d,'cascade':_0xdfff1c[_0x49a71d(0x200)]??{'pages':_0xdfff1c[_0x49a71d(0x1e3)][_0x49a71d(0x210)]==null?[]:[_0xdfff1c[_0x49a71d(0x1e3)]['pageId']],'pageSchemaAffected':_0xdfff1c[_0x49a71d(0x1e3)][_0x49a71d(0x210)]!=null},'warnings':[..._0xdfff1c[_0x49a71d(0x20c)]]};}export async function writeMenuDeletePlan(_0x27e98f,_0x29e134){const _0x1ef321=a174_0x60941e,_0x6b15b5=resolvePlanPath(_0x27e98f,'plan-out');await mkdir(dirname(_0x6b15b5),{'recursive':!![]});try{await writeFile(_0x6b15b5,JSON[_0x1ef321(0x221)](_0x29e134,null,0x2)+'\x0a',{'encoding':_0x1ef321(0x1e4),'flag':'wx'});}catch(_0x71e9dc){if(_0x71e9dc['code']===_0x1ef321(0x1fd))throw menuError(_0x1ef321(0x1cc),'Refusing\x20to\x20overwrite\x20existing\x20menu\x20delete\x20plan:\x20'+_0x6b15b5,_0x1ef321(0x1e8));throw menuError('menu_plan_write_failed',_0x1ef321(0x217)+_0x6b15b5+':\x20'+errorMessage(_0x71e9dc));}return _0x6b15b5;}export async function readMenuDeletePlan(_0x3428ad){const _0x1ef3a1=a174_0x60941e,_0x339db7=resolvePlanPath(_0x3428ad,_0x1ef3a1(0x20d));let _0x487b3b;try{_0x487b3b=(await stat(_0x339db7))[_0x1ef3a1(0x1ef)];}catch(_0x447a22){throw menuError(_0x1ef3a1(0x219),_0x1ef3a1(0x1e1)+_0x339db7+':\x20'+errorMessage(_0x447a22));}if(_0x487b3b>MAX_PLAN_BYTES)throw menuError(_0x1ef3a1(0x219),_0x1ef3a1(0x213)+_0x487b3b+'\x20bytes.');let _0xd67fa4;try{_0xd67fa4=JSON[_0x1ef3a1(0x1f6)](await readFile(_0x339db7,_0x1ef3a1(0x1e4)));}catch(_0xa2ed8a){throw menuError('menu_plan_invalid',_0x1ef3a1(0x1ce)+errorMessage(_0xa2ed8a));}if(!isMenuDeletePlanFile(_0xd67fa4))throw menuError(_0x1ef3a1(0x219),'Menu\x20delete\x20plan\x20does\x20not\x20match\x20version\x20'+PLAN_VERSION+'\x20of\x20the\x20'+PLAN_COMMAND+_0x1ef3a1(0x1d9));if(!sameFingerprint(_0xd67fa4[_0x1ef3a1(0x20f)],fingerprint(_0xd67fa4[_0x1ef3a1(0x1ca)])))throw menuError(_0x1ef3a1(0x219),_0x1ef3a1(0x1e2),_0x1ef3a1(0x1ff));if(!_0xd67fa4[_0x1ef3a1(0x1c9)][_0x1ef3a1(0x1f3)]((_0x332f27,_0xdfd3b2)=>sameFingerprint(_0xd67fa4[_0x1ef3a1(0x226)][_0xdfd3b2],fingerprint(_0x332f27)))||!sameFingerprint(_0xd67fa4[_0x1ef3a1(0x20f)],fingerprint(_0xd67fa4['targets'][_0xd67fa4['targets'][_0x1ef3a1(0x1df)]-0x1])))throw menuError(_0x1ef3a1(0x219),_0x1ef3a1(0x1d5),'Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out;\x20do\x20not\x20edit\x20target\x20fields\x20manually.');return{'path':_0x339db7,'plan':_0xd67fa4};}export function mutationPlanFromDeleteFile(_0x8db5d5,_0x51850f){const _0x35bac9=a174_0x60941e;return mutationResult({'operation':_0x35bac9(0x22d),'selector':{'id':_0x8db5d5[_0x35bac9(0x1ca)]['id'],'recursive':_0x8db5d5[_0x35bac9(0x21b)]},'before':_0x8db5d5[_0x35bac9(0x1ca)],'after':null,'dryRun':![],'backend':[{'method':_0x35bac9(0x1d2),'path':_0x35bac9(0x1e6)}],'plannedActions':[{'stage':'batch-delete-menu','method':_0x35bac9(0x1d2),'path':'/smartapi/menu/batchDelete','body':{'idList':_0x8db5d5['deleteOrder']}}],'targets':_0x8db5d5['targets'],'deleteOrder':_0x8db5d5[_0x35bac9(0x201)],'snapshotHash':_0x8db5d5['snapshotHash'],'cascade':_0x8db5d5['cascade'],'planFile':{'path':_0x51850f,'createdAt':_0x8db5d5[_0x35bac9(0x206)],'expiresAt':_0x8db5d5[_0x35bac9(0x22a)]},'warnings':_0x8db5d5['warnings']});}export function assertMenuDeletePlanCurrent(_0x25f2f8,_0x26e999,_0x51cb82,_0x2fb3a2=new Date()){const _0x13d986=a174_0x60941e;assertMenuDeletePlanExecutable(_0x25f2f8,_0x26e999,_0x2fb3a2);if(_0x51cb82[_0x13d986(0x1ee)]!==_0x25f2f8[_0x13d986(0x22b)])throw menuError(_0x13d986(0x211),'Online\x20menu\x20state\x20changed\x20after\x20the\x20delete\x20plan\x20was\x20reviewed.',_0x13d986(0x209));return _0x25f2f8[_0x13d986(0x1c9)][_0x13d986(0x222)]((_0x9c46,_0x3dd2bf)=>{const _0x510284=_0x13d986,_0x2e9028=_0x51cb82[_0x510284(0x20a)]['get'](_0x9c46['id']);if(!_0x2e9028)throw menuError(_0x510284(0x211),_0x510284(0x214)+_0x9c46['id']+_0x510284(0x208));if(!sameFingerprint(_0x25f2f8[_0x510284(0x226)][_0x3dd2bf],fingerprint(_0x2e9028)))throw menuError(_0x510284(0x211),_0x510284(0x214)+_0x9c46['id']+_0x510284(0x1e9),_0x510284(0x218));return _0x2e9028;});}function a174_0x5b59(){const _0x371d66=['targetFingerprints','Menu\x20delete\x20plan\x20has\x20invalid\x20timestamps.','datasetId','pages','expiresAt','snapshotHash','path','delete','Menu\x20delete\x20plan\x20targets\x20app\x20','hex','visible','targets','target','extendHash','menu_plan_file_exists',',\x20current\x20app\x20is\x20','Menu\x20delete\x20plan\x20is\x20not\x20valid\x20JSON:\x20','message','label','resourcesHash','POST','sort','2366421ojVGWy','Menu\x20delete\x20plan\x20target\x20list\x20does\x20not\x20match\x20its\x20immutable\x20fingerprints.','12bYnQOy','3890136cwuJmz','depth','\x20contract.','updateUserId','command','extend','isInteger','update','length','appCode','Cannot\x20read\x20menu\x20delete\x20plan\x20','Menu\x20delete\x20plan\x20target\x20facts\x20do\x20not\x20match\x20its\x20immutable\x20fingerprint.','before','utf8','15507333ZIQWUw','/smartapi/menu/batchDelete','resources','Choose\x20a\x20new\x20--plan-out\x20path\x20so\x20the\x20reviewed\x20plan\x20remains\x20immutable.','\x20no\x20longer\x20matches\x20the\x20reviewed\x20target\x20facts.','selector','\x20requires\x20a\x20non-empty\x20file\x20path.','toISOString','modelType','hash','size','childrenIds','Cannot\x20create\x20a\x20menu\x20delete\x20plan\x20without\x20an\x20exact\x20target\x20snapshot.','getTime','every','menu_plan_expired','datasetCode','parse','6990930YpETmh','23887bpNIKf','menu_plan_app_mismatch','2270460MotUWa','4259626hwLNHK','10DNEFgm','EEXIST','trim','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out;\x20do\x20not\x20edit\x20target\x20fields\x20manually.','cascade','deleteOrder','isFinite','string','boolean','isArray','createdAt','number','\x20is\x20no\x20longer\x20present\x20in\x20the\x20online\x20menu\x20tree.','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out\x20and\x20review\x20the\x20latest\x20cascade.','byId','updateTime','warnings','plan','sha256','targetFingerprint','pageId','menu_state_drift','menu\x20delete','Menu\x20delete\x20plan\x20is\x20too\x20large:\x20','Planned\x20menu\x20','test','Generate\x20a\x20new\x20plan\x20on\x20a\x20machine\x20with\x20a\x20correct\x20system\x20clock.','Failed\x20to\x20write\x20menu\x20delete\x20plan\x20','Generate\x20a\x20new\x20plan\x20and\x20review\x20parent,\x20path,\x20page,\x20children,\x20resources,\x20and\x20update\x20time.','menu_plan_invalid','Menu\x20delete\x20plan\x20creation\x20time\x20','recursive','childrenCount','object','8NkOlPW','updateUserName','\x20is\x20in\x20the\x20future.','stringify','map','resourcesValid','pageSchemaAffected','type'];a174_0x5b59=function(){return _0x371d66;};return a174_0x5b59();}export function assertMenuDeletePlanExecutable(_0x576e2d,_0x1cb31a,_0x4399ce=new Date()){const _0x485557=a174_0x60941e;if(_0x576e2d[_0x485557(0x1e0)]!==_0x1cb31a)throw menuError(_0x485557(0x1f9),_0x485557(0x22e)+JSON[_0x485557(0x221)](_0x576e2d['appCode'])+_0x485557(0x1cd)+JSON[_0x485557(0x221)](_0x1cb31a)+'.');const _0x396e79=Date[_0x485557(0x1f6)](_0x576e2d['createdAt']),_0x1b6175=Date['parse'](_0x576e2d['expiresAt']);if(!Number[_0x485557(0x202)](_0x396e79)||!Number['isFinite'](_0x1b6175)||_0x1b6175-_0x396e79!==PLAN_TTL_MS)throw menuError(_0x485557(0x219),_0x485557(0x227));if(_0x396e79>_0x4399ce['getTime']())throw menuError(_0x485557(0x219),_0x485557(0x21a)+_0x576e2d[_0x485557(0x206)]+_0x485557(0x220),_0x485557(0x216));if(_0x4399ce[_0x485557(0x1f2)]()>_0x1b6175)throw menuError(_0x485557(0x1f4),'Menu\x20delete\x20plan\x20expired\x20at\x20'+_0x576e2d['expiresAt']+'.','Generate\x20and\x20review\x20a\x20new\x20plan\x20before\x20deleting.');}function fingerprint(_0x300aa6){const _0x2de600=a174_0x60941e;return{'id':_0x300aa6['id'],'parentId':_0x300aa6['parentId'],'depth':_0x300aa6[_0x2de600(0x1d8)],'label':_0x300aa6[_0x2de600(0x1d0)],'path':_0x300aa6[_0x2de600(0x22c)],'type':_0x300aa6[_0x2de600(0x225)],'visible':_0x300aa6[_0x2de600(0x1c8)],'sort':_0x300aa6[_0x2de600(0x1d3)],'pageId':_0x300aa6[_0x2de600(0x210)],'pageType':_0x300aa6['pageType'],'modelType':_0x300aa6[_0x2de600(0x1ed)],'datasetId':_0x300aa6[_0x2de600(0x228)],'datasetCode':_0x300aa6[_0x2de600(0x1f5)],'childrenIds':[..._0x300aa6['childrenIds']],'childrenCount':_0x300aa6['childrenCount'],'resourcesValid':_0x300aa6[_0x2de600(0x223)],'resourcesHash':hashValue(_0x300aa6[_0x2de600(0x1e7)]),'extendHash':hashValue(_0x300aa6['extend']??null),'updateTime':_0x300aa6[_0x2de600(0x20b)]};}function hashValue(_0x50b375){const _0x552878=a174_0x60941e;return createHash(_0x552878(0x20e))[_0x552878(0x1de)](JSON[_0x552878(0x221)](_0x50b375))['digest'](_0x552878(0x1c7));}function sameFingerprint(_0x261994,_0x4e11a8){const _0x3d60d4=a174_0x60941e;return JSON[_0x3d60d4(0x221)](_0x261994)===JSON[_0x3d60d4(0x221)](_0x4e11a8);}function resolvePlanPath(_0x1cf066,_0x3dd503){const _0xc5aac6=a174_0x60941e,_0x46cc66=_0x1cf066[_0xc5aac6(0x1fe)]();if(!_0x46cc66)throw menuError(_0xc5aac6(0x219),'--'+_0x3dd503+_0xc5aac6(0x1eb));return resolve(_0x46cc66);}function isMenuDeletePlanFile(_0x442f78){const _0x145f01=a174_0x60941e;if(!isRecord(_0x442f78))return![];return _0x442f78['version']===PLAN_VERSION&&_0x442f78[_0x145f01(0x1db)]===PLAN_COMMAND&&typeof _0x442f78[_0x145f01(0x1e0)]==='string'&&_0x442f78[_0x145f01(0x1e0)][_0x145f01(0x1df)]>0x0&&typeof _0x442f78['createdAt']===_0x145f01(0x203)&&typeof _0x442f78[_0x145f01(0x22a)]===_0x145f01(0x203)&&typeof _0x442f78[_0x145f01(0x22b)]===_0x145f01(0x203)&&/^sha256:[a-f0-9]{64}$/['test'](_0x442f78['snapshotHash'])&&typeof _0x442f78[_0x145f01(0x21b)]===_0x145f01(0x204)&&isMenuFact(_0x442f78[_0x145f01(0x1ca)])&&isTargetFingerprint(_0x442f78[_0x145f01(0x20f)])&&Array[_0x145f01(0x205)](_0x442f78[_0x145f01(0x1c9)])&&_0x442f78[_0x145f01(0x1c9)][_0x145f01(0x1df)]>0x0&&_0x442f78[_0x145f01(0x1c9)][_0x145f01(0x1f3)](isMenuFact)&&Array[_0x145f01(0x205)](_0x442f78[_0x145f01(0x226)])&&_0x442f78[_0x145f01(0x226)][_0x145f01(0x1df)]===_0x442f78[_0x145f01(0x1c9)][_0x145f01(0x1df)]&&_0x442f78[_0x145f01(0x226)][_0x145f01(0x1f3)](isTargetFingerprint)&&Array[_0x145f01(0x205)](_0x442f78[_0x145f01(0x201)])&&_0x442f78[_0x145f01(0x201)][_0x145f01(0x1df)]===_0x442f78[_0x145f01(0x1c9)][_0x145f01(0x1df)]&&_0x442f78[_0x145f01(0x201)][_0x145f01(0x1f3)](isPositiveInteger)&&new Set(_0x442f78[_0x145f01(0x201)])['size']===_0x442f78['deleteOrder'][_0x145f01(0x1df)]&&_0x442f78['targets'][_0x145f01(0x1f3)]((_0x438186,_0x408563)=>_0x438186['id']===_0x442f78[_0x145f01(0x201)][_0x408563])&&_0x442f78[_0x145f01(0x1c9)][_0x442f78[_0x145f01(0x1c9)][_0x145f01(0x1df)]-0x1]?.['id']===_0x442f78['target']['id']&&isRecord(_0x442f78[_0x145f01(0x200)])&&Array[_0x145f01(0x205)](_0x442f78[_0x145f01(0x200)][_0x145f01(0x229)])&&_0x442f78['cascade'][_0x145f01(0x229)]['every'](isPositiveInteger)&&typeof _0x442f78[_0x145f01(0x200)][_0x145f01(0x224)]===_0x145f01(0x204)&&Array[_0x145f01(0x205)](_0x442f78[_0x145f01(0x20c)])&&_0x442f78[_0x145f01(0x20c)][_0x145f01(0x1f3)](_0xe19b3e=>typeof _0xe19b3e===_0x145f01(0x203));}function isMenuFact(_0x2dcb1b){const _0x39acb9=a174_0x60941e;if(!isRecord(_0x2dcb1b))return![];return isPositiveInteger(_0x2dcb1b['id'])&&(_0x2dcb1b['parentId']===null||isPositiveInteger(_0x2dcb1b['parentId']))&&Number[_0x39acb9(0x1dd)](_0x2dcb1b['depth'])&&_0x2dcb1b[_0x39acb9(0x1d8)]>=0x0&&typeof _0x2dcb1b[_0x39acb9(0x1d0)]===_0x39acb9(0x203)&&typeof _0x2dcb1b['path']===_0x39acb9(0x203)&&typeof _0x2dcb1b[_0x39acb9(0x225)]===_0x39acb9(0x203)&&(_0x2dcb1b[_0x39acb9(0x1c8)]===null||typeof _0x2dcb1b[_0x39acb9(0x1c8)]===_0x39acb9(0x204))&&(_0x2dcb1b[_0x39acb9(0x1d3)]===null||Number[_0x39acb9(0x1dd)](_0x2dcb1b[_0x39acb9(0x1d3)]))&&Array[_0x39acb9(0x205)](_0x2dcb1b[_0x39acb9(0x1e7)])&&_0x2dcb1b[_0x39acb9(0x1e7)]['every'](_0x1d291a=>typeof _0x1d291a===_0x39acb9(0x203))&&typeof _0x2dcb1b['resourcesValid']===_0x39acb9(0x204)&&Array[_0x39acb9(0x205)](_0x2dcb1b[_0x39acb9(0x1f0)])&&_0x2dcb1b[_0x39acb9(0x1f0)][_0x39acb9(0x1f3)](isPositiveInteger)&&Number[_0x39acb9(0x1dd)](_0x2dcb1b[_0x39acb9(0x21c)])&&_0x2dcb1b[_0x39acb9(0x21c)]>=0x0&&(_0x2dcb1b[_0x39acb9(0x210)]===null||isPositiveInteger(_0x2dcb1b[_0x39acb9(0x210)]))&&typeof _0x2dcb1b['pageType']===_0x39acb9(0x203)&&typeof _0x2dcb1b[_0x39acb9(0x1ed)]===_0x39acb9(0x203)&&(_0x2dcb1b['datasetId']===null||isPositiveInteger(_0x2dcb1b[_0x39acb9(0x228)]))&&typeof _0x2dcb1b['datasetCode']===_0x39acb9(0x203)&&(_0x2dcb1b[_0x39acb9(0x1da)]===null||typeof _0x2dcb1b[_0x39acb9(0x1da)]==='string')&&(_0x2dcb1b[_0x39acb9(0x21f)]===null||typeof _0x2dcb1b[_0x39acb9(0x21f)]===_0x39acb9(0x203))&&(_0x2dcb1b[_0x39acb9(0x20b)]===null||typeof _0x2dcb1b[_0x39acb9(0x20b)]===_0x39acb9(0x203)||typeof _0x2dcb1b[_0x39acb9(0x20b)]===_0x39acb9(0x207))&&(_0x2dcb1b[_0x39acb9(0x1dc)]===undefined||_0x2dcb1b[_0x39acb9(0x1dc)]===null||isRecord(_0x2dcb1b[_0x39acb9(0x1dc)]));}function isTargetFingerprint(_0x56b5e6){const _0x17a17a=a174_0x60941e;if(!isRecord(_0x56b5e6))return![];return isPositiveInteger(_0x56b5e6['id'])&&(_0x56b5e6['parentId']===null||isPositiveInteger(_0x56b5e6['parentId']))&&Number['isInteger'](_0x56b5e6['depth'])&&_0x56b5e6[_0x17a17a(0x1d8)]>=0x0&&typeof _0x56b5e6[_0x17a17a(0x1d0)]===_0x17a17a(0x203)&&typeof _0x56b5e6[_0x17a17a(0x22c)]===_0x17a17a(0x203)&&typeof _0x56b5e6[_0x17a17a(0x225)]===_0x17a17a(0x203)&&(_0x56b5e6[_0x17a17a(0x1c8)]===null||typeof _0x56b5e6[_0x17a17a(0x1c8)]===_0x17a17a(0x204))&&(_0x56b5e6['sort']===null||Number[_0x17a17a(0x1dd)](_0x56b5e6['sort']))&&(_0x56b5e6[_0x17a17a(0x210)]===null||isPositiveInteger(_0x56b5e6[_0x17a17a(0x210)]))&&typeof _0x56b5e6['pageType']===_0x17a17a(0x203)&&typeof _0x56b5e6[_0x17a17a(0x1ed)]===_0x17a17a(0x203)&&(_0x56b5e6['datasetId']===null||isPositiveInteger(_0x56b5e6[_0x17a17a(0x228)]))&&typeof _0x56b5e6[_0x17a17a(0x1f5)]===_0x17a17a(0x203)&&Array[_0x17a17a(0x205)](_0x56b5e6['childrenIds'])&&_0x56b5e6['childrenIds'][_0x17a17a(0x1f3)](isPositiveInteger)&&Number['isInteger'](_0x56b5e6['childrenCount'])&&_0x56b5e6['childrenCount']>=0x0&&typeof _0x56b5e6['resourcesValid']===_0x17a17a(0x204)&&typeof _0x56b5e6['resourcesHash']==='string'&&/^[a-f0-9]{64}$/[_0x17a17a(0x215)](_0x56b5e6[_0x17a17a(0x1d1)])&&typeof _0x56b5e6['extendHash']===_0x17a17a(0x203)&&/^[a-f0-9]{64}$/[_0x17a17a(0x215)](_0x56b5e6[_0x17a17a(0x1cb)])&&(_0x56b5e6[_0x17a17a(0x20b)]===null||typeof _0x56b5e6['updateTime']===_0x17a17a(0x203)||typeof _0x56b5e6['updateTime']===_0x17a17a(0x207));}function isRecord(_0x3b271b){const _0xaadf7e=a174_0x60941e;return typeof _0x3b271b===_0xaadf7e(0x21d)&&_0x3b271b!==null&&!Array[_0xaadf7e(0x205)](_0x3b271b);}function a174_0x2ed5(_0x1412e6,_0x187533){_0x1412e6=_0x1412e6-0x1c7;const _0x5b599a=a174_0x5b59();let _0x2ed538=_0x5b599a[_0x1412e6];return _0x2ed538;}function isPositiveInteger(_0x4beb89){return Number['isSafeInteger'](_0x4beb89)&&Number(_0x4beb89)>0x0;}function errorMessage(_0x1494cc){const _0x183c56=a174_0x60941e;return _0x1494cc instanceof Error?_0x1494cc[_0x183c56(0x1cf)]:String(_0x1494cc);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3b6b5f,_0x585083){const _0x796b34=a175_0x5eab,_0xfb4e39=_0x3b6b5f();while(!![]){try{const _0x177e2e=parseInt(_0x796b34(0xe1))/0x1+parseInt(_0x796b34(0xc5))/0x2*(parseInt(_0x796b34(0xd0))/0x3)+parseInt(_0x796b34(0xd4))/0x4+parseInt(_0x796b34(0xe0))/0x5*(parseInt(_0x796b34(0xcd))/0x6)+parseInt(_0x796b34(0xe8))/0x7+-parseInt(_0x796b34(0xcb))/0x8*(-parseInt(_0x796b34(0xdc))/0x9)+-parseInt(_0x796b34(0xc8))/0xa*(parseInt(_0x796b34(0xe6))/0xb);if(_0x177e2e===_0x585083)break;else _0xfb4e39['push'](_0xfb4e39['shift']());}catch(_0x2d5d34){_0xfb4e39['push'](_0xfb4e39['shift']());}}}(a175_0x3fc6,0xe2207));import{createHash}from'node:crypto';import{getMenuTree}from'../../../core/api-client.js';export async function fetchMenuSnapshot(_0x219964,_0x3fcb21,_0x54946f={}){const _0x22bd7d=await getMenuTree(_0x219964,_0x3fcb21);return buildMenuSnapshot(Array['isArray'](_0x22bd7d)?_0x22bd7d:[],_0x54946f);}export function buildMenuSnapshot(_0x98e9af,_0x43b20b={}){const _0x4e341c=a175_0x5eab,_0x1baf62=flattenMenuItems(_0x98e9af,{'verbose':_0x43b20b[_0x4e341c(0xec)]===!![],'parentId':null,'depth':0x0}),_0x326fa9=new Map(_0x1baf62['map'](_0x1a7565=>[_0x1a7565['id'],_0x1a7565])),_0xba18d=createHash('sha256')[_0x4e341c(0xe4)](JSON[_0x4e341c(0xbf)](_0x1baf62['map'](toHashInput)))[_0x4e341c(0xd5)](_0x4e341c(0xcc));return{'total':_0x1baf62[_0x4e341c(0xf0)],'hash':_0x4e341c(0xda)+_0xba18d,'menus':_0x1baf62,'byId':_0x326fa9};}export function toProcessedMenuItem(_0x1078c4){const _0x4d2728=a175_0x5eab;return{'id':_0x1078c4['id'],'path':_0x1078c4[_0x4d2728(0xe7)],'label':_0x1078c4[_0x4d2728(0xc6)],'resources':[..._0x1078c4['resources']],'extend':_0x1078c4[_0x4d2728(0xd1)]??null,'type':_0x1078c4[_0x4d2728(0xde)],'parentId':_0x1078c4['parentId']};}export function toMenuListItem(_0x3ed4b6){const {modelType:_0x7e1e95,datasetId:_0x3e0e94,datasetCode:_0x4b8136,resourcesValid:_0x3f42a1,..._0x2d27b6}=_0x3ed4b6;return _0x2d27b6;}export function getChildren(_0x36edba,_0x28a409){const _0x1de597=a175_0x5eab;return _0x36edba[_0x1de597(0xd7)][_0x1de597(0xeb)](_0x3cf95a=>_0x3cf95a[_0x1de597(0xdf)]===_0x28a409);}function flattenMenuItems(_0x3f420f,_0x1a674e){const _0x567e4a=a175_0x5eab,_0xd400f7=sortMenuItems(_0x3f420f),_0x1e8fa4=[];for(const _0x2d495a of _0xd400f7){const _0x528c2e=sortMenuItems(Array[_0x567e4a(0xe2)](_0x2d495a[_0x567e4a(0xc0)])?_0x2d495a[_0x567e4a(0xc0)]:[]);_0x1e8fa4[_0x567e4a(0xce)](toMenuFact(_0x2d495a,_0x528c2e,_0x1a674e)),_0x528c2e[_0x567e4a(0xf0)]>0x0&&_0x1e8fa4['push'](...flattenMenuItems(_0x528c2e,{'verbose':_0x1a674e[_0x567e4a(0xec)],'parentId':_0x2d495a['id'],'depth':_0x1a674e[_0x567e4a(0xd8)]+0x1}));}return _0x1e8fa4;}function a175_0x3fc6(){const _0x4d472b=['string','sha256:','pageType','5373315JLSQnF','modelType','type','parentId','11870ZpKLSY','1234765BnFOkm','isArray','sort','update','number','110UZTybj','path','5426638tlqMTw','visible','POSITIVE_INFINITY','filter','verbose','isFinite','parse','values','length','datasetId','stringify','children','resources','item','boolean','index','2837162auPrve','label','datasetCode','6806950xbVzvp','url','updateUserId','24ygrjCp','hex','4386ZREGOu','push','updateTime','3GCARtT','extend','resourcesValid','map','3112344IeEwvJ','digest','pageId','menus','depth'];a175_0x3fc6=function(){return _0x4d472b;};return a175_0x3fc6();}function sortMenuItems(_0x2a0120){const _0x31212b=a175_0x5eab;return _0x2a0120[_0x31212b(0xd3)]((_0x43d13e,_0x53952d)=>({'item':_0x43d13e,'index':_0x53952d}))['sort']((_0x498e96,_0x21153a)=>{const _0x1cff0f=_0x31212b,_0x3929ce=normalizeSort(_0x498e96['item']['sort']),_0x160578=normalizeSort(_0x21153a[_0x1cff0f(0xc2)][_0x1cff0f(0xe3)]);if(_0x3929ce!==_0x160578)return _0x3929ce-_0x160578;return _0x498e96[_0x1cff0f(0xc4)]-_0x21153a[_0x1cff0f(0xc4)];})[_0x31212b(0xd3)](({item:_0x5aa5d6})=>_0x5aa5d6);}function toMenuFact(_0x2cf0fd,_0x5cd494,_0x52ee7b){const _0x474cb3=a175_0x5eab,_0x213854=normalizeResourceValue(_0x2cf0fd[_0x474cb3(0xd1)]?.[_0x474cb3(0xc1)]),_0x6dbeeb={'id':_0x2cf0fd['id'],'parentId':_0x52ee7b['parentId'],'depth':_0x52ee7b[_0x474cb3(0xd8)],'label':normalizeString(_0x2cf0fd[_0x474cb3(0xc6)]),'path':normalizeString(_0x2cf0fd[_0x474cb3(0xe7)]),'url':normalizeString(_0x2cf0fd['url']),'type':normalizeString(_0x2cf0fd[_0x474cb3(0xde)]),'visible':typeof _0x2cf0fd[_0x474cb3(0xe9)]===_0x474cb3(0xc3)?_0x2cf0fd[_0x474cb3(0xe9)]:null,'sort':typeof _0x2cf0fd[_0x474cb3(0xe3)]==='number'&&Number[_0x474cb3(0xed)](_0x2cf0fd[_0x474cb3(0xe3)])?_0x2cf0fd[_0x474cb3(0xe3)]:null,'resources':_0x213854[_0x474cb3(0xef)],'resourcesValid':_0x213854['valid'],'childrenIds':_0x5cd494['map'](_0x599c59=>_0x599c59['id']),'childrenCount':_0x5cd494[_0x474cb3(0xf0)],'pageId':normalizeNullableNumber(_0x2cf0fd[_0x474cb3(0xd6)]),'pageType':normalizeString(_0x2cf0fd[_0x474cb3(0xdb)]),'modelType':normalizeString(_0x2cf0fd[_0x474cb3(0xdd)]),'datasetId':normalizeNullableNumber(_0x2cf0fd[_0x474cb3(0xf1)]),'datasetCode':normalizeString(_0x2cf0fd['datasetCode']),'updateUserId':normalizeNullableString(_0x2cf0fd[_0x474cb3(0xca)]),'updateUserName':normalizeNullableString(_0x2cf0fd['updateUserName']),'updateTime':normalizeNullableTimestamp(_0x2cf0fd[_0x474cb3(0xcf)])};return _0x52ee7b[_0x474cb3(0xec)]&&(_0x6dbeeb[_0x474cb3(0xd1)]=_0x2cf0fd[_0x474cb3(0xd1)]??null),_0x6dbeeb;}function a175_0x5eab(_0x3eab60,_0x3cfa66){_0x3eab60=_0x3eab60-0xbf;const _0x3fc663=a175_0x3fc6();let _0x5eabe2=_0x3fc663[_0x3eab60];return _0x5eabe2;}function toHashInput(_0x4bbc7a){const _0x1c3dd5=a175_0x5eab;return{'id':_0x4bbc7a['id'],'parentId':_0x4bbc7a[_0x1c3dd5(0xdf)],'label':_0x4bbc7a[_0x1c3dd5(0xc6)],'path':_0x4bbc7a[_0x1c3dd5(0xe7)],'url':_0x4bbc7a[_0x1c3dd5(0xc9)],'type':_0x4bbc7a[_0x1c3dd5(0xde)],'visible':_0x4bbc7a[_0x1c3dd5(0xe9)],'sort':_0x4bbc7a['sort'],'resources':_0x4bbc7a[_0x1c3dd5(0xc1)],'resourcesValid':_0x4bbc7a[_0x1c3dd5(0xd2)],'childrenIds':_0x4bbc7a['childrenIds'],'pageId':_0x4bbc7a['pageId'],'pageType':_0x4bbc7a[_0x1c3dd5(0xdb)],'modelType':_0x4bbc7a[_0x1c3dd5(0xdd)],'datasetId':_0x4bbc7a[_0x1c3dd5(0xf1)],'datasetCode':_0x4bbc7a[_0x1c3dd5(0xc7)],'updateUserId':_0x4bbc7a[_0x1c3dd5(0xca)],'updateUserName':_0x4bbc7a['updateUserName'],'updateTime':_0x4bbc7a[_0x1c3dd5(0xcf)]};}function normalizeSort(_0x315e9f){const _0x346dea=a175_0x5eab;return typeof _0x315e9f==='number'&&Number[_0x346dea(0xed)](_0x315e9f)?_0x315e9f:Number[_0x346dea(0xea)];}function normalizeString(_0x57e6c0){const _0x4be4c4=a175_0x5eab;return typeof _0x57e6c0===_0x4be4c4(0xd9)?_0x57e6c0:'';}function normalizeNullableNumber(_0x2dbe2d){const _0x439ddc=a175_0x5eab;return typeof _0x2dbe2d===_0x439ddc(0xe5)&&Number[_0x439ddc(0xed)](_0x2dbe2d)?_0x2dbe2d:null;}function normalizeNullableString(_0x2b4e0d){const _0x300708=a175_0x5eab;return typeof _0x2b4e0d===_0x300708(0xd9)&&_0x2b4e0d[_0x300708(0xf0)]>0x0?_0x2b4e0d:null;}function normalizeNullableTimestamp(_0xe850e0){const _0x1062ba=a175_0x5eab;if(typeof _0xe850e0===_0x1062ba(0xd9))return _0xe850e0[_0x1062ba(0xf0)]>0x0?_0xe850e0:null;return typeof _0xe850e0===_0x1062ba(0xe5)&&Number['isFinite'](_0xe850e0)?_0xe850e0:null;}export function normalizeResources(_0x31dc76){const _0x2f5251=a175_0x5eab;return normalizeResourceValue(_0x31dc76)[_0x2f5251(0xef)];}function normalizeResourceValue(_0x5cb2d0){const _0x57bfad=a175_0x5eab;if(_0x5cb2d0==null)return{'values':[],'valid':!![]};if(Array[_0x57bfad(0xe2)](_0x5cb2d0))return{'values':_0x5cb2d0['map'](String),'valid':!![]};if(typeof _0x5cb2d0!==_0x57bfad(0xd9))return{'values':[],'valid':![]};try{const _0x25214c=JSON[_0x57bfad(0xee)](_0x5cb2d0);return Array[_0x57bfad(0xe2)](_0x25214c)?{'values':_0x25214c[_0x57bfad(0xd3)](String),'valid':!![]}:{'values':[],'valid':![]};}catch{return{'values':[],'valid':![]};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xfba828,_0x3170e4){var _0x206a3a=a176_0x27f6,_0x59cbf7=_0xfba828();while(!![]){try{var _0x173eae=-parseInt(_0x206a3a(0xeb))/0x1+parseInt(_0x206a3a(0xf0))/0x2+parseInt(_0x206a3a(0xf2))/0x3+-parseInt(_0x206a3a(0xed))/0x4*(parseInt(_0x206a3a(0xee))/0x5)+parseInt(_0x206a3a(0xf1))/0x6+parseInt(_0x206a3a(0xec))/0x7*(parseInt(_0x206a3a(0xef))/0x8)+parseInt(_0x206a3a(0xf4))/0x9*(-parseInt(_0x206a3a(0xf3))/0xa);if(_0x173eae===_0x3170e4)break;else _0x59cbf7['push'](_0x59cbf7['shift']());}catch(_0x3ecd70){_0x59cbf7['push'](_0x59cbf7['shift']());}}}(a176_0x461a,0x65f90));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';function a176_0x27f6(_0x13a818,_0x3814a0){_0x13a818=_0x13a818-0xeb;var _0x461a0b=a176_0x461a();var _0x27f639=_0x461a0b[_0x13a818];return _0x27f639;}export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';function a176_0x461a(){var _0x363c03=['10850HUvMMK','3033qRUNMy','315667JEAiFz','25487YEeigN','17916meiHCt','165cSqTUB','592cmGXTx','1657314cQNUdm','759684AxGDtU','66282xsVCJX'];a176_0x461a=function(){return _0x363c03;};return a176_0x461a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3e13de,_0x15cd14){const _0xd6f1a4=a177_0x4c2b,_0x5388ec=_0x3e13de();while(!![]){try{const _0x52afba=-parseInt(_0xd6f1a4(0x199))/0x1+parseInt(_0xd6f1a4(0x18d))/0x2+parseInt(_0xd6f1a4(0x184))/0x3+-parseInt(_0xd6f1a4(0x19b))/0x4+-parseInt(_0xd6f1a4(0x17a))/0x5*(parseInt(_0xd6f1a4(0x17f))/0x6)+parseInt(_0xd6f1a4(0x17d))/0x7+parseInt(_0xd6f1a4(0x181))/0x8;if(_0x52afba===_0x15cd14)break;else _0x5388ec['push'](_0x5388ec['shift']());}catch(_0x57bf8e){_0x5388ec['push'](_0x5388ec['shift']());}}}(a177_0x5452,0x660c0));import a177_0x5b1632 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a177_0x22520d from'ora';function a177_0x4c2b(_0x58a4e2,_0x4066e7){_0x58a4e2=_0x58a4e2-0x173;const _0x545288=a177_0x5452();let _0x4c2b2f=_0x545288[_0x58a4e2];return _0x4c2b2f;}import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{menuPathKey}from'../../../commands/menu/shared/path.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x416edd){const _0x1a5a2b=a177_0x4c2b;return _0x416edd[_0x1a5a2b(0x17c)](_0xc579d2=>{const _0x30725c=_0x1a5a2b;if(_0xc579d2?.[_0x30725c(0x183)]===_0x30725c(0x17e))throw CliErrors[_0x30725c(0x198)]('Cancelled.');throw _0xc579d2;});}export function startSpinner(_0x8df618){const _0x564639=a177_0x4c2b;return a177_0x22520d({'text':_0x8df618,'color':_0x564639(0x189)})['start']();}export function stopSpinner(_0x399249,_0x1e751d,_0xaeb38e){const _0x1f62b6=a177_0x4c2b;_0xaeb38e?_0x399249[_0x1f62b6(0x174)](_0x1e751d):_0x399249[_0x1f62b6(0x18c)](_0x1e751d);}function a177_0x5452(){const _0x47bc24=['516519JOHUPo','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','1632456riaqqF','trim','succeed','label','No\x20local\x20pages\x20found.','error','\x20\x20JS\x20URL:','CSS\x20URL\x20check\x20failed','895fqICHW','stdin','catch','2980026vmSmhK','ExitPromptError','11346JajpOH','includes','3383872ZpQgIB','JS\x20URL\x20checked','name','333510iPMonE','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','gray','test','No\x20menus\x20selected.','cyan','isTTY','red','fail','1442468UDCOKE','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','CSS\x20URL\x20checked','green','Cancelled.','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','\x20\x20Checking\x20CSS\x20URL\x20reachability...','filter','JS\x20URL\x20check\x20failed','path','length','cancelled'];a177_0x5452=function(){return _0x47bc24;};return a177_0x5452();}export async function askConfirm(_0x35f728){return onCancel(confirm({'message':_0x35f728,'theme':{'prefix':''}}));}export async function askJsUrl(_0xbf9866){const _0x131fb9=a177_0x4c2b;while(!![]){const _0x169ac4=await onCancel(input({'message':_0x131fb9(0x178),'default':_0xbf9866,'theme':{'prefix':''}}));if(_0x169ac4[_0x131fb9(0x173)]()==='')throw CliErrors['cancelled'](_0x131fb9(0x191));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x131fb9(0x187)](_0x169ac4[_0x131fb9(0x173)]())){console[_0x131fb9(0x177)](a177_0x5b1632[_0x131fb9(0x18b)](_0x131fb9(0x19a)));continue;}const _0x507757=startSpinner('\x20\x20Checking\x20JS\x20URL\x20reachability...');try{const _0x188bd0=await isUrlReachable(_0x169ac4[_0x131fb9(0x173)]());stopSpinner(_0x507757,_0x131fb9(0x182),_0x188bd0);if(!_0x188bd0){console[_0x131fb9(0x177)](a177_0x5b1632[_0x131fb9(0x18b)](_0x131fb9(0x192)));continue;}return _0x169ac4[_0x131fb9(0x173)]();}catch(_0x245f57){stopSpinner(_0x507757,_0x131fb9(0x195),![]);throw _0x245f57;}}}export async function askCssUrl(_0x4dcf1d){const _0x238bb7=a177_0x4c2b;while(!![]){const _0x2b18c2=await onCancel(input({'message':'\x20\x20CSS\x20URL:','default':_0x4dcf1d,'theme':{'prefix':''}}));if(_0x2b18c2[_0x238bb7(0x173)]()==='')throw CliErrors['cancelled'](_0x238bb7(0x191));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x238bb7(0x187)](_0x2b18c2[_0x238bb7(0x173)]())){console[_0x238bb7(0x177)](a177_0x5b1632[_0x238bb7(0x18b)]('\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'));continue;}const _0x146a0a=startSpinner(_0x238bb7(0x193));try{const _0x15665e=await isUrlReachable(_0x2b18c2['trim']());stopSpinner(_0x146a0a,_0x238bb7(0x18f),_0x15665e);if(!_0x15665e){console[_0x238bb7(0x177)](a177_0x5b1632['red'](_0x238bb7(0x185)));continue;}return _0x2b18c2['trim']();}catch(_0x54861a){stopSpinner(_0x146a0a,_0x238bb7(0x179),![]);throw _0x54861a;}}}export async function selectPages(_0x117590,_0x3e5c20){const _0x3f2278=a177_0x4c2b,_0x443b37=_0x117590['map'](_0x43a8c5=>{const _0x1fe700=a177_0x4c2b,_0x11ad68=_0x3e5c20['has'](menuPathKey(_0x43a8c5[_0x1fe700(0x196)]));return{'name':_0x43a8c5[_0x1fe700(0x175)]+'\x20\x20'+a177_0x5b1632[_0x1fe700(0x186)](_0x43a8c5[_0x1fe700(0x196)])+'\x20\x20'+(_0x11ad68?a177_0x5b1632['gray']('[already\x20on\x20platform]'):a177_0x5b1632[_0x1fe700(0x190)]('[new]')),'value':_0x43a8c5[_0x1fe700(0x196)],'checked':!_0x11ad68,'disabled':_0x11ad68};});if(_0x443b37[_0x3f2278(0x197)]===0x0)throw new Error(_0x3f2278(0x176));const _0x3d290c=await onCancel(checkbox({'message':'\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','choices':_0x443b37,'loop':![],'theme':{'prefix':''}}));if(_0x3d290c[_0x3f2278(0x197)]===0x0)throw new Error(_0x3f2278(0x188));return _0x117590[_0x3f2278(0x194)](_0x2ee3bf=>_0x3d290c[_0x3f2278(0x180)](_0x2ee3bf['path']));}export function isInteractive(){const _0x32c2bd=a177_0x4c2b;return process[_0x32c2bd(0x17b)][_0x32c2bd(0x18a)]===!![];}export function requireInteractive(){const _0x5ac1f0=a177_0x4c2b;if(!isInteractive())throw new Error(_0x5ac1f0(0x18e)+'Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a178_0x1399ce=a178_0x7b44;(function(_0x54df0a,_0x5de296){const _0x2a1452=a178_0x7b44,_0x10508a=_0x54df0a();while(!![]){try{const _0x100b59=parseInt(_0x2a1452(0x104))/0x1+-parseInt(_0x2a1452(0xdb))/0x2*(parseInt(_0x2a1452(0x10a))/0x3)+parseInt(_0x2a1452(0xe5))/0x4+-parseInt(_0x2a1452(0xe3))/0x5+-parseInt(_0x2a1452(0xd9))/0x6*(-parseInt(_0x2a1452(0xfc))/0x7)+parseInt(_0x2a1452(0xde))/0x8*(parseInt(_0x2a1452(0x10d))/0x9)+-parseInt(_0x2a1452(0xea))/0xa;if(_0x100b59===_0x5de296)break;else _0x10508a['push'](_0x10508a['shift']());}catch(_0x22f958){_0x10508a['push'](_0x10508a['shift']());}}}(a178_0x40ad,0x233bd));import{existsSync,readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a178_0x1399ce(0xe0)](),a178_0x1399ce(0xe6));export function extractTitleFromComment(_0x334d45){const _0x3f5f30=a178_0x1399ce;try{const _0x2e3523=readFileSync(_0x334d45,_0x3f5f30(0xf0)),_0x459a32=_0x2e3523['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x459a32&&_0x459a32[0x1]){const _0x1b0e1d=_0x459a32[0x1],_0x539a7c=_0x1b0e1d['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x539a7c&&_0x539a7c[0x1])return _0x539a7c[0x1][_0x3f5f30(0xda)]();}let _0x14e187=null;const _0x52864d=_0x2e3523[_0x3f5f30(0xfd)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x52864d&&_0x52864d[0x1]&&(_0x14e187=_0x52864d[0x1]);if(!_0x14e187){const _0x54e948=_0x2e3523[_0x3f5f30(0xfd)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x54e948&&_0x54e948[0x1]&&(_0x14e187=_0x54e948[0x1]);}if(_0x14e187){const _0x27943e=new RegExp('\x5cb'+_0x14e187+_0x3f5f30(0x10b)),_0x3f4d6a=_0x2e3523[_0x3f5f30(0xfd)](_0x27943e);if(_0x3f4d6a&&_0x3f4d6a[0x1])return _0x3f4d6a[0x1];return _0x14e187;}return null;}catch(_0x3c79b6){return null;}}export function getLocalPages(_0x53d02=pagesDir,_0x5da6a9=pagesDir,_0x1a1a60=process['cwd']()){const _0x210cbb=a178_0x1399ce;if(resolve(_0x53d02)===resolve(_0x5da6a9)){const _0x39c119=join(_0x1a1a60,_0x210cbb(0xf5));if(existsSync(_0x39c119))return getDeclaredPages(_0x39c119,_0x1a1a60);}let _0x319090=[];const _0x540442=readdirSync(_0x53d02);return _0x540442[_0x210cbb(0xfe)](_0x2cc10a=>{const _0x5b01cb=_0x210cbb,_0x4f8540=join(_0x53d02,_0x2cc10a),_0x3d029e=statSync(_0x4f8540);if(_0x3d029e&&_0x3d029e['isDirectory']())_0x319090=_0x319090[_0x5b01cb(0xe1)](getLocalPages(_0x4f8540,_0x5da6a9,_0x1a1a60));else{if(_0x2cc10a[_0x5b01cb(0xed)]('.tsx')){let _0xbd206=relative(_0x5da6a9,_0x4f8540);_0xbd206[_0x5b01cb(0xed)](_0x5b01cb(0x109))?_0xbd206=_0xbd206[_0x5b01cb(0xfa)](/index\.tsx$/,''):_0xbd206=_0xbd206[_0x5b01cb(0xfa)](/\.tsx$/,'');_0xbd206[_0x5b01cb(0xed)](sep)&&(_0xbd206=_0xbd206['slice'](0x0,-0x1));const _0x3f4cb6=_0xbd206['split'](sep)[_0x5b01cb(0xec)]('/'),_0x4df688=extractTitleFromComment(_0x4f8540),_0xc14c2e=_0x4df688||_0x3f4cb6;_0x319090[_0x5b01cb(0xee)]({'path':_0x3f4cb6[_0x5b01cb(0xff)]('$',':'),'label':_0xc14c2e});}}}),_0x319090[_0x210cbb(0xe7)](_0x1072a9=>_0x1072a9['path']!=='');}function getDeclaredPages(_0x296521,_0x57347c){const _0x5cdac3=a178_0x1399ce;let _0x8a15d3;try{_0x8a15d3=JSON[_0x5cdac3(0xf7)](readFileSync(_0x296521,_0x5cdac3(0xf3)));}catch(_0x4b592c){throw new Error(_0x5cdac3(0xe9)+_0x296521+':\x20'+String(_0x4b592c));}if(!Array[_0x5cdac3(0xf8)](_0x8a15d3))throw new Error(_0x5cdac3(0xf6)+_0x296521);const _0x3c5526=new Set();return _0x8a15d3['map']((_0x2f864b,_0x4f29bc)=>{const _0x46802f=_0x5cdac3;if(!_0x2f864b||typeof _0x2f864b!==_0x46802f(0xef)||Array[_0x46802f(0xf8)](_0x2f864b))throw new Error(_0x46802f(0xf1)+(_0x4f29bc+0x1));const _0x468979=_0x2f864b,_0x145c63=_0x468979[_0x46802f(0x101)],_0x25cd50=_0x468979[_0x46802f(0x108)],_0x8aae6f=_0x468979[_0x46802f(0x100)];if(typeof _0x145c63!==_0x46802f(0x105)||!/^\/(?!\/)[^?#]*$/[_0x46802f(0x10c)](_0x145c63)||typeof _0x25cd50!==_0x46802f(0x105)||!_0x25cd50[_0x46802f(0xda)]()||typeof _0x8aae6f!==_0x46802f(0x105)||!/^src\/pages\/(?!.*\.\.)[^/].*\.tsx$/[_0x46802f(0x10c)](_0x8aae6f)||typeof _0x468979[_0x46802f(0x106)]!==_0x46802f(0xe2))throw new Error('Invalid\x20route\x20manifest\x20row\x20'+(_0x4f29bc+0x1)+_0x46802f(0xdd));if(_0x3c5526['has'](_0x145c63))throw new Error(_0x46802f(0xf4)+_0x145c63);_0x3c5526[_0x46802f(0xfb)](_0x145c63);if(!existsSync(resolve(_0x57347c,_0x8aae6f)))throw new Error('Route\x20page\x20file\x20does\x20not\x20exist:\x20'+_0x8aae6f);const _0x506e4a=_0x8aae6f['slice'](_0x46802f(0x103)[_0x46802f(0xe4)])[_0x46802f(0xfa)](/\/index\.tsx$/,'')[_0x46802f(0xfa)](/\.tsx$/,'')[_0x46802f(0xff)]('$',':')[_0x46802f(0xfa)](/\[([^/\]]+)\]/g,_0x46802f(0xdf)),_0x2d1924=_0x506e4a===_0x46802f(0x102)?'/':'/'+_0x506e4a;if(_0x145c63!==_0x2d1924)throw new Error(_0x46802f(0xdc)+_0x145c63+_0x46802f(0x107)+_0x8aae6f+_0x46802f(0xf2)+_0x2d1924);if(_0x468979[_0x46802f(0xf9)]!==undefined&&(typeof _0x468979['group']!==_0x46802f(0x105)||!_0x468979[_0x46802f(0xf9)][_0x46802f(0xda)]()))throw new Error(_0x46802f(0xeb)+_0x145c63);if(_0x468979[_0x46802f(0xe8)]!==undefined&&(!Number['isInteger'](_0x468979[_0x46802f(0xe8)])||_0x468979[_0x46802f(0xe8)]<0x0))throw new Error('Invalid\x20route\x20order\x20for\x20'+_0x145c63);return{'path':_0x145c63,'label':_0x25cd50[_0x46802f(0xda)](),'visible':_0x468979[_0x46802f(0x106)],..._0x468979[_0x46802f(0xf9)]===undefined?{}:{'group':_0x468979[_0x46802f(0xf9)][_0x46802f(0xda)]()},..._0x468979[_0x46802f(0xe8)]===undefined?{}:{'order':_0x468979[_0x46802f(0xe8)]}};});}function a178_0x7b44(_0x3534ee,_0x1a586e){_0x3534ee=_0x3534ee-0xd9;const _0x40ad4c=a178_0x40ad();let _0x7b444e=_0x40ad4c[_0x3534ee];return _0x7b444e;}function a178_0x40ad(){const _0x164602=['Route\x20',':\x20path,\x20label,\x20pageFile\x20and\x20visible\x20are\x20required','2384aDAQNt',':$1','cwd','concat','boolean','379750iopAvd','length','818100XXwCHz','src/pages','filter','order','Invalid\x20route\x20manifest\x20','951790KmfPGO','Invalid\x20route\x20group\x20for\x20','join','endsWith','push','object','utf-8','Invalid\x20route\x20manifest\x20row\x20',';\x20expected\x20','utf8','Duplicate\x20route\x20path\x20in\x20manifest:\x20','src/features/routing/routes.json','Route\x20manifest\x20must\x20contain\x20an\x20array:\x20','parse','isArray','group','replace','add','35WJlIsA','match','forEach','replaceAll','pageFile','path','index','src/pages/','43906NoENuB','string','visible','\x20disagrees\x20with\x20pageFile\x20','label','index.tsx','3FAIoMn','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','test','3951KpFxbj','6780SzpZhM','trim','138914mIJgUi'];a178_0x40ad=function(){return _0x164602;};return a178_0x40ad();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a179_0x5549(_0x189dd4,_0x594166){_0x189dd4=_0x189dd4-0x1a9;const _0x2e1e90=a179_0x2e1e();let _0x554922=_0x2e1e90[_0x189dd4];return _0x554922;}(function(_0x29b65e,_0x5c6063){const _0x45ddbc=a179_0x5549,_0x676a90=_0x29b65e();while(!![]){try{const _0x3f7110=parseInt(_0x45ddbc(0x1ba))/0x1*(parseInt(_0x45ddbc(0x1b5))/0x2)+-parseInt(_0x45ddbc(0x1ad))/0x3+-parseInt(_0x45ddbc(0x1b8))/0x4*(parseInt(_0x45ddbc(0x1aa))/0x5)+parseInt(_0x45ddbc(0x1be))/0x6+parseInt(_0x45ddbc(0x1b3))/0x7*(parseInt(_0x45ddbc(0x1b1))/0x8)+-parseInt(_0x45ddbc(0x1ab))/0x9+parseInt(_0x45ddbc(0x1a9))/0xa;if(_0x3f7110===_0x5c6063)break;else _0x676a90['push'](_0x676a90['shift']());}catch(_0x1ab672){_0x676a90['push'](_0x676a90['shift']());}}}(a179_0x2e1e,0x9a8c1));import{menuPathKey}from'../../../commands/menu/shared/path.js';import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a179_0x2e1e(){const _0x46e052=['CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','288913ShAYpA','map','path','has','4559196MxOkYX','16582790lAbIRZ','87855jTnAok','11231199ywPdfb','resources','1636680ORsCIQ','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','errors','CSS\x20URL\x20is\x20unreachable','24uTqzXt','label','1459157EUZolr','filter','4ZwDxBi','length','push','272IssKMR'];a179_0x2e1e=function(){return _0x46e052;};return a179_0x2e1e();}export function validateJsUrl(_0x377b59){const _0xb1ac41=a179_0x5549,_0xb6058c=[];return!isValidJsHttpsUrl(_0x377b59)&&_0xb6058c['push'](_0xb1ac41(0x1ae)),{'ok':_0xb6058c[_0xb1ac41(0x1b6)]===0x0,'errors':_0xb6058c};}export function validateCssUrl(_0x2f4951){const _0x1419e9=a179_0x5549,_0x3742fe=[];return!isValidCssHttpsUrl(_0x2f4951)&&_0x3742fe[_0x1419e9(0x1b7)](_0x1419e9(0x1b9)),{'ok':_0x3742fe[_0x1419e9(0x1b6)]===0x0,'errors':_0x3742fe};}export async function validateJsUrlReachable(_0x85fa98){const _0x106cbe=a179_0x5549,_0x51e111=validateJsUrl(_0x85fa98);if(!_0x51e111['ok'])return _0x51e111;const _0x569cd7=await isUrlReachable(_0x85fa98);if(!_0x569cd7)_0x51e111[_0x106cbe(0x1af)][_0x106cbe(0x1b7)]('JS\x20URL\x20is\x20unreachable');return{'ok':_0x51e111[_0x106cbe(0x1af)]['length']===0x0,'errors':_0x51e111['errors']};}export async function validateCssUrlReachable(_0x418423){const _0x2eca07=a179_0x5549,_0x4b6353=validateCssUrl(_0x418423);if(!_0x4b6353['ok'])return _0x4b6353;const _0x1ca39a=await isUrlReachable(_0x418423);if(!_0x1ca39a)_0x4b6353[_0x2eca07(0x1af)]['push'](_0x2eca07(0x1b0));return{'ok':_0x4b6353['errors']['length']===0x0,'errors':_0x4b6353[_0x2eca07(0x1af)]};}export function buildCompareRows(_0x3f9ed3,_0x4b9890){const _0x2a1fd7=a179_0x5549;return _0x3f9ed3[_0x2a1fd7(0x1bb)](_0x2e68cc=>({'label':_0x2e68cc[_0x2a1fd7(0x1b2)],'path':_0x2e68cc[_0x2a1fd7(0x1bc)],'local':!![],'online':_0x4b9890[_0x2a1fd7(0x1bd)](menuPathKey(_0x2e68cc[_0x2a1fd7(0x1bc)]))}));}export async function doCreateMenus(_0x4a73fd,_0x204bc1,_0x3f0f72,_0x1def95,_0x5d1e69){const _0x2215ce=a179_0x5549,_0x4b263c=_0x5d1e69?await createMenus(_0x4a73fd,_0x204bc1,_0x3f0f72,_0x1def95,_0x5d1e69):await createMenus(_0x4a73fd,_0x204bc1,_0x3f0f72,_0x1def95);return{'created':_0x4b263c[_0x2215ce(0x1b6)],'failed':0x0,'labels':_0x3f0f72['map'](_0x2c264d=>_0x2c264d[_0x2215ce(0x1b2)]),'menus':_0x4b263c};}export function filterMenusWithResources(_0x44c4c2){const _0x5097c0=a179_0x5549;return _0x44c4c2[_0x5097c0(0x1b4)](_0x3860cf=>_0x3860cf[_0x5097c0(0x1ac)][_0x5097c0(0x1b6)]>0x0);}export async function fetchMenuData(_0x5d8369,_0x479a8d){const _0xcf129e=a179_0x5549,_0x14e960=getLocalPages(),_0x470ef1=await getOnlineMenuList(_0x5d8369,_0x479a8d),_0x4ca77d=new Set(_0x470ef1[_0xcf129e(0x1bb)](_0x35007c=>menuPathKey(_0x35007c['path'])));return{'localPages':_0x14e960,'onlineMenuList':_0x470ef1,'onlinePaths':_0x4ca77d};}export async function fetchOnlineMenuList(_0x59dbe8,_0x135051){return getOnlineMenuList(_0x59dbe8,_0x135051);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a180_0x358bb1=a180_0x101e;(function(_0x407b48,_0x18d59d){const _0x119da2=a180_0x101e,_0x13deb2=_0x407b48();while(!![]){try{const _0x21decf=-parseInt(_0x119da2(0x1d9))/0x1*(parseInt(_0x119da2(0x1de))/0x2)+parseInt(_0x119da2(0x1fe))/0x3+-parseInt(_0x119da2(0x1bb))/0x4+parseInt(_0x119da2(0x1b1))/0x5*(-parseInt(_0x119da2(0x1f8))/0x6)+-parseInt(_0x119da2(0x1f9))/0x7+parseInt(_0x119da2(0x1f0))/0x8*(parseInt(_0x119da2(0x206))/0x9)+-parseInt(_0x119da2(0x1d6))/0xa*(-parseInt(_0x119da2(0x1a6))/0xb);if(_0x21decf===_0x18d59d)break;else _0x13deb2['push'](_0x13deb2['shift']());}catch(_0x256e35){_0x13deb2['push'](_0x13deb2['shift']());}}}(a180_0x48f4,0x35cf3));import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':a180_0x358bb1(0x1ac),'required':!![],'description':a180_0x358bb1(0x1c5)};export const MENU_SORT_FLAG={'name':'sort','type':'number','description':a180_0x358bb1(0x1fd)};export const MENU_PARENT_ID_FLAG={'name':'parent-id','type':a180_0x358bb1(0x1c1),'description':a180_0x358bb1(0x1c0)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':'expect-parent-id','type':'string','description':a180_0x358bb1(0x1e8)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a180_0x358bb1(0x1ae),'type':a180_0x358bb1(0x1c1),'description':a180_0x358bb1(0x1c7)},{'name':a180_0x358bb1(0x1dd),'type':a180_0x358bb1(0x1ac),'description':'Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches'}];export function validateExactId(_0x2ea7e9){const _0x3466a2=a180_0x358bb1,_0x17759a=_0x2ea7e9[_0x3466a2(0x1ea)]('id');if(!Number[_0x3466a2(0x1b6)](_0x17759a)||_0x17759a<=0x0)throw CliErrors[_0x3466a2(0x1d5)](_0x3466a2(0x1da));return _0x17759a;}export function validateSort(_0x4925f1,_0x190044='sort'){const _0x307c9d=a180_0x358bb1;if(!hasFlag(_0x4925f1,_0x190044))return undefined;const _0x407469=_0x4925f1['num'](_0x190044);if(!Number[_0x307c9d(0x1b6)](_0x407469)||_0x407469<0x0||_0x407469>MAX_MENU_SORT)throw menuError(_0x307c9d(0x1e2),'--'+_0x190044+_0x307c9d(0x1c3)+MAX_MENU_SORT+'.','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.');return _0x407469;}export function nextSiblingSort(_0x593e8c,_0x7e82eb,_0x110e07){const _0x33c212=a180_0x358bb1,_0xb4e6d7=getChildren(_0x593e8c,_0x7e82eb)['map'](_0x351288=>_0x351288[_0x33c212(0x1a7)])[_0x33c212(0x1a5)](_0x5f0359=>typeof _0x5f0359===_0x33c212(0x1ac));if(_0xb4e6d7[_0x33c212(0x1dc)]===0x0)return 0x0;const _0x3bce40=Math[_0x33c212(0x1c4)](..._0xb4e6d7);if(_0x3bce40>=MAX_MENU_SORT)throw menuError(_0x33c212(0x1a8),_0x33c212(0x1e7)+_0x110e07+_0x33c212(0x1ab)+_0x3bce40+'.',_0x33c212(0x1e0)+MAX_MENU_SORT+',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.');return _0x3bce40+0x1;}export function requireExplicitYes(_0x2dfbf7){const _0x548e8d=a180_0x358bb1;if(_0x2dfbf7[_0x548e8d(0x1b0)](_0x548e8d(0x20e)))return;if(!_0x2dfbf7[_0x548e8d(0x1b0)](_0x548e8d(0x201)))throw menuError('menu_confirmation_required',_0x548e8d(0x1d2),_0x548e8d(0x207));}export async function fetchMutationSnapshot(_0x5ab6b4,_0x4e03f7,_0x434f4e){const _0x58a9b7=a180_0x358bb1;try{return await fetchMenuSnapshot(_0x5ab6b4['appCode'],_0x5ab6b4[_0x58a9b7(0x1ec)]);}catch(_0x30464e){throw mapMenuApiError(_0x30464e,'read\x20online\x20menu\x20facts\x20before\x20'+_0x4e03f7,_0x434f4e);}}export async function recheckMutationSnapshot(_0x3b61e6,_0x3ee217,_0x1a19d8,_0x4f6471){const _0xc7aeea=a180_0x358bb1;let _0x25018c;try{_0x25018c=await fetchMenuSnapshot(_0x3b61e6[_0xc7aeea(0x1ef)],_0x3b61e6[_0xc7aeea(0x1ec)]);}catch(_0x5bc18c){const _0x18b227=mapMenuApiError(_0x5bc18c,_0xc7aeea(0x1d4)+_0x1a19d8,_0x4f6471);throw menuFailure(_0x18b227,_0x3ee217,{'stage':_0xc7aeea(0x1fa),'failed':_0x4f6471==null?{}:{'id':_0x4f6471}});}if(_0x25018c[_0xc7aeea(0x1c2)]!==_0x3ee217['snapshotHash']){const _0x2469be=menuError(_0xc7aeea(0x1df),_0xc7aeea(0x208)+_0x1a19d8+';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.',_0xc7aeea(0x1b7));throw menuFailure(_0x2469be,_0x3ee217,{'stage':_0xc7aeea(0x1fa),'failed':{..._0x4f6471==null?{}:{'id':_0x4f6471},'expectedSnapshotHash':_0x3ee217[_0xc7aeea(0x1f1)],'currentSnapshotHash':_0x25018c[_0xc7aeea(0x1c2)]}});}return _0x25018c;}export function parseParentId(_0x55c2a5,_0x1ccc2e,_0x28c575={}){const _0x4feae9=a180_0x358bb1;if(!hasFlag(_0x55c2a5,_0x1ccc2e)){if(_0x28c575[_0x4feae9(0x20d)])throw CliErrors['flagMissing'](_0x1ccc2e);return undefined;}const _0x45f51b=_0x55c2a5[_0x4feae9(0x1a9)](_0x1ccc2e)[_0x4feae9(0x1f6)]();if(_0x45f51b[_0x4feae9(0x1e5)]()===_0x4feae9(0x1bd))return null;if(!/^\d+$/['test'](_0x45f51b))throw CliErrors['validation']('--'+_0x1ccc2e+'\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.');const _0xe17c11=Number(_0x45f51b);if(!Number[_0x4feae9(0x1b6)](_0xe17c11)||_0xe17c11<=0x0)throw CliErrors[_0x4feae9(0x1d5)]('--'+_0x1ccc2e+'\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.');return _0xe17c11;}export function requireMenu(_0x5994da,_0x261675){const _0x1538ab=a180_0x358bb1,_0x337074=_0x5994da[_0x1538ab(0x1c6)][_0x1538ab(0x1ff)](_0x261675);if(!_0x337074)throw menuError(_0x1538ab(0x1b8),_0x1538ab(0x1cd)+_0x261675,_0x1538ab(0x1d1));return _0x337074;}export function requireFolder(_0x9469b2,_0x638145){const _0x117f81=a180_0x358bb1,_0xeb0737=requireMenu(_0x9469b2,_0x638145);if(_0xeb0737[_0x117f81(0x1bc)]!=='folder')throw menuError(_0x117f81(0x1ca),_0x117f81(0x1e9)+_0x638145+_0x117f81(0x209)+(_0xeb0737[_0x117f81(0x1bc)]||_0x117f81(0x1b4))+_0x117f81(0x1c8),'Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.');return _0xeb0737;}export function assertExpectedState(_0x16ac03,_0x3c486a){const _0x47e75f=a180_0x358bb1;if(hasFlag(_0x16ac03,_0x47e75f(0x1ad))){const _0x3a2b25=parseParentId(_0x16ac03,_0x47e75f(0x1ad),{'required':!![]});if(_0x3c486a[_0x47e75f(0x1fb)]!==_0x3a2b25)throw stateDrift('Menu\x20'+_0x3c486a['id']+'\x20parent\x20changed:\x20expected\x20'+formatParent(_0x3a2b25)+_0x47e75f(0x1ba)+formatParent(_0x3c486a[_0x47e75f(0x1fb)])+'.');}if(hasFlag(_0x16ac03,_0x47e75f(0x1ae))){const _0x40bc3b=_0x16ac03[_0x47e75f(0x1a9)](_0x47e75f(0x1ae));if(_0x3c486a[_0x47e75f(0x20c)]!==_0x40bc3b)throw stateDrift('Menu\x20'+_0x3c486a['id']+'\x20path\x20changed:\x20expected\x20'+JSON[_0x47e75f(0x1cf)](_0x40bc3b)+_0x47e75f(0x1ba)+JSON[_0x47e75f(0x1cf)](_0x3c486a[_0x47e75f(0x20c)])+'.');}if(hasFlag(_0x16ac03,_0x47e75f(0x1dd))){const _0x5b2466=_0x16ac03[_0x47e75f(0x1ea)](_0x47e75f(0x1dd));if(!Number[_0x47e75f(0x1b6)](_0x5b2466)||_0x5b2466<0x0)throw CliErrors[_0x47e75f(0x1d5)](_0x47e75f(0x1f3));if(_0x3c486a[_0x47e75f(0x1a4)]!==_0x5b2466)throw stateDrift(_0x47e75f(0x1e9)+_0x3c486a['id']+'\x20child\x20count\x20changed:\x20expected\x20'+_0x5b2466+',\x20current\x20'+_0x3c486a['childrenCount']+'.');}}export function assertVerified(_0x5079de,_0x1ae680,_0x23941b='Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.'){const _0x44f5f0=a180_0x358bb1;if(!_0x5079de)throw menuError(_0x44f5f0(0x1e4),_0x1ae680,_0x23941b);}export function mutationResult(_0x224a95){const _0x19f230=a180_0x358bb1;return{'operation':_0x224a95['operation'],'selector':_0x224a95[_0x19f230(0x1cb)],'before':_0x224a95[_0x19f230(0x1b3)],'after':_0x224a95[_0x19f230(0x200)],'dryRun':_0x224a95[_0x19f230(0x1fc)],'backend':_0x224a95['backend'],..._0x224a95[_0x19f230(0x1c9)]?{'plannedActions':_0x224a95[_0x19f230(0x1c9)]}:{},..._0x224a95[_0x19f230(0x1ee)]?{'targets':_0x224a95[_0x19f230(0x1ee)]}:{},..._0x224a95[_0x19f230(0x1f2)]?{'deleteOrder':_0x224a95[_0x19f230(0x1f2)]}:{},'snapshotHash':_0x224a95[_0x19f230(0x1f1)],..._0x224a95[_0x19f230(0x1cc)]?{'cascade':_0x224a95[_0x19f230(0x1cc)]}:{},..._0x224a95[_0x19f230(0x1db)]?{'planFile':_0x224a95['planFile']}:{},'succeeded':_0x224a95[_0x19f230(0x202)]??[],'failed':_0x224a95[_0x19f230(0x1d3)]??[],'warnings':_0x224a95['warnings']??[],'verification':_0x224a95['verification'],'error':_0x224a95[_0x19f230(0x1ce)]};}export function menuDryRunResult(_0x573d6c,_0x104771){return{..._0x573d6c,..._0x104771};}function a180_0x48f4(){const _0x31f648=['sort','menu_sort_overflow','str','failedRecords','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','number','expect-parent-id','expect-path','data','bool','7305eAMxli','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','before','unknown','message','isSafeInteger','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','menu_not_found','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.',',\x20current\x20','1117732CTUdlt','type','root','Failed\x20to\x20','hint','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','string','hash','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','max','Exact\x20online\x20menu\x20id','byId','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','\x22,\x20not\x20folder.','plannedActions','menu_parent_not_folder','selector','cascade','Online\x20menu\x20not\x20found:\x20','error','stringify','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','failed','recheck\x20online\x20menu\x20facts\x20before\x20','validation','3434230rLOhKi','prototype','defineProperty','385599uPUxJJ','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','planFile','length','expected-children-count','2qUSdAI','menu_state_drift','Reorder\x20sibling\x20menus\x20below\x20','stage','menu_sort_invalid','backend','menu_verification_failed','toLowerCase','rawFlags','Cannot\x20append\x20a\x20','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','Menu\x20','num','call','cookie','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','targets','appCode','8FFtouT','snapshotHash','deleteOrder','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','test','code','trim','hasOwnProperty','1794wEmrQl','2868586hyhGgE','pre-write-recheck','parentId','dryRun','Sibling\x20sort\x20value\x20(non-negative\x20integer)','113976VJogBK','get','after','yes','succeeded','menu_permission_denied','menu_mutation_failed','api_error','2883492xnUPBC','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','Online\x20menu\x20state\x20changed\x20before\x20','\x20is\x20type\x20\x22','warnings','verification','path','required','dry-run','childrenCount','filter','44zKehoZ'];a180_0x48f4=function(){return _0x31f648;};return a180_0x48f4();}export function menuFailure(_0x4fece3,_0x577e1b,_0x13aac3){const _0x143dfd=a180_0x358bb1,_0x4dbe1c=mutationResult({..._0x577e1b,'after':_0x13aac3['after']===undefined?_0x577e1b[_0x143dfd(0x200)]:_0x13aac3['after'],'backend':_0x13aac3[_0x143dfd(0x1e3)]??_0x577e1b[_0x143dfd(0x1e3)],'dryRun':![],'succeeded':_0x13aac3['succeeded']??[],'failed':_0x13aac3[_0x143dfd(0x1aa)]??[{..._0x13aac3[_0x143dfd(0x1d3)]??{},'stage':_0x13aac3[_0x143dfd(0x1e1)],'code':_0x4fece3['code'],'message':_0x4fece3[_0x143dfd(0x1b5)]}],'warnings':[..._0x577e1b[_0x143dfd(0x20a)],..._0x13aac3['warnings']??[]],'verification':_0x13aac3[_0x143dfd(0x20b)],'error':{'code':_0x4fece3[_0x143dfd(0x1f5)],'message':_0x4fece3['message'],..._0x4fece3[_0x143dfd(0x1bf)]?{'hint':_0x4fece3['hint']}:{}}});return Object[_0x143dfd(0x1d8)](_0x4fece3,_0x143dfd(0x1af),{'value':_0x4dbe1c,'enumerable':!![],'configurable':!![]}),_0x4fece3;}export function asVerificationError(_0x55d7af,_0x2a4139){const _0x26fb11=a180_0x358bb1;if(_0x55d7af instanceof CliError&&_0x55d7af['code']===_0x26fb11(0x1e4))return _0x55d7af;const _0x2460e1=_0x55d7af instanceof Error?_0x55d7af['message']:String(_0x55d7af);return menuError(_0x26fb11(0x1e4),''+_0x2a4139+(_0x2460e1?':\x20'+_0x2460e1:''),_0x26fb11(0x1ed));}function a180_0x101e(_0x1bc96a,_0x3f7294){_0x1bc96a=_0x1bc96a-0x1a4;const _0x48f4c5=a180_0x48f4();let _0x101e71=_0x48f4c5[_0x1bc96a];return _0x101e71;}export function describeMenuErrorCause(_0x2c8f52,_0x14824,_0x17ab10){const _0x26da5d=mapMenuApiError(_0x2c8f52,_0x14824,_0x17ab10);return{'causeCode':_0x26da5d['code'],'causeMessage':_0x26da5d['message']};}export function hasFlag(_0x5ccc88,_0x5a61e8){const _0x12249d=a180_0x358bb1;return Object[_0x12249d(0x1d7)][_0x12249d(0x1f7)][_0x12249d(0x1eb)](_0x5ccc88[_0x12249d(0x1e6)],_0x5a61e8)&&_0x5ccc88[_0x12249d(0x1e6)][_0x5a61e8]!==undefined;}export function toApiParentId(_0x2e4dff){return _0x2e4dff??0x0;}export function formatParent(_0x2fe81f){return _0x2fe81f==null?'root':String(_0x2fe81f);}export function menuError(_0x1fe658,_0x27f85e,_0x5d837b){return new CliError(_0x1fe658,0x1,_0x27f85e,_0x5d837b);}export function mapMenuApiError(_0xd4117d,_0xbf23c0,_0x382872){const _0x4f81df=a180_0x358bb1;if(_0xd4117d instanceof CliError&&_0xd4117d[_0x4f81df(0x1f5)]!==_0x4f81df(0x205))return _0xd4117d;const _0x334504=_0xd4117d instanceof Error?_0xd4117d[_0x4f81df(0x1b5)]:String(_0xd4117d);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x4f81df(0x1f4)](_0x334504))return menuError(_0x4f81df(0x203),'Permission\x20denied\x20while\x20attempting\x20to\x20'+_0xbf23c0+(_0x382872?'\x20menu\x20'+_0x382872:'')+'.',_0x4f81df(0x1d0));return menuError(_0x4f81df(0x204),_0x4f81df(0x1be)+_0xbf23c0+(_0x382872?'\x20menu\x20'+_0x382872:'')+':\x20'+_0x334504,_0x4f81df(0x1b9));}export function isMenuResponseLoss(_0x1d3e0c){const _0x5881cb=a180_0x358bb1,_0x5169c5=_0x1d3e0c instanceof Error?_0x1d3e0c[_0x5881cb(0x1b5)]:String(_0x1d3e0c);if(_0x1d3e0c instanceof CliError)return _0x1d3e0c[_0x5881cb(0x1f5)]===_0x5881cb(0x205)&&/^Request (?:failed|timeout):/i[_0x5881cb(0x1f4)](_0x5169c5);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x5881cb(0x1f4)](_0x5169c5);}function stateDrift(_0x2d12f9){const _0x557f69=a180_0x358bb1;return menuError(_0x557f69(0x1df),_0x2d12f9,_0x557f69(0x1b2));}
|
|
1
|
+
const a180_0x3f096d=a180_0x222a;(function(_0x6edaf9,_0x5beb9a){const _0x3e95f6=a180_0x222a,_0x1b777e=_0x6edaf9();while(!![]){try{const _0x256689=-parseInt(_0x3e95f6(0x11a))/0x1*(parseInt(_0x3e95f6(0xef))/0x2)+parseInt(_0x3e95f6(0x11d))/0x3+parseInt(_0x3e95f6(0xdd))/0x4*(parseInt(_0x3e95f6(0x12d))/0x5)+-parseInt(_0x3e95f6(0x126))/0x6+parseInt(_0x3e95f6(0x107))/0x7+-parseInt(_0x3e95f6(0xfe))/0x8*(parseInt(_0x3e95f6(0x105))/0x9)+parseInt(_0x3e95f6(0x110))/0xa;if(_0x256689===_0x5beb9a)break;else _0x1b777e['push'](_0x1b777e['shift']());}catch(_0xe3acae){_0x1b777e['push'](_0x1b777e['shift']());}}}(a180_0x302e,0xa546e));import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;function a180_0x222a(_0x6c2d81,_0x327c47){_0x6c2d81=_0x6c2d81-0xc3;const _0x302efa=a180_0x302e();let _0x222a34=_0x302efa[_0x6c2d81];return _0x222a34;}export const MENU_ID_FLAG={'name':'id','type':a180_0x3f096d(0x112),'required':!![],'description':a180_0x3f096d(0xf9)};export const MENU_SORT_FLAG={'name':a180_0x3f096d(0xf5),'type':'number','description':a180_0x3f096d(0x11f)};export const MENU_PARENT_ID_FLAG={'name':a180_0x3f096d(0x10b),'type':'string','description':a180_0x3f096d(0xde)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a180_0x3f096d(0x104),'type':a180_0x3f096d(0xe6),'description':a180_0x3f096d(0xea)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a180_0x3f096d(0xdb),'type':a180_0x3f096d(0xe6),'description':a180_0x3f096d(0xe8)},{'name':a180_0x3f096d(0xd8),'type':a180_0x3f096d(0x112),'description':'Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches'}];export function validateExactId(_0x74ae82){const _0x4b71dc=a180_0x3f096d,_0x204014=_0x74ae82[_0x4b71dc(0xf2)]('id');if(!Number[_0x4b71dc(0x117)](_0x204014)||_0x204014<=0x0)throw CliErrors[_0x4b71dc(0x113)](_0x4b71dc(0xe9));return _0x204014;}export function validateSort(_0x51d01f,_0x29cbb5=a180_0x3f096d(0xf5)){const _0x51674d=a180_0x3f096d;if(!hasFlag(_0x51d01f,_0x29cbb5))return undefined;const _0x2f9b38=_0x51d01f['num'](_0x29cbb5);if(!Number[_0x51674d(0x117)](_0x2f9b38)||_0x2f9b38<0x0||_0x2f9b38>MAX_MENU_SORT)throw menuError(_0x51674d(0xd2),'--'+_0x29cbb5+_0x51674d(0xfb)+MAX_MENU_SORT+'.',_0x51674d(0xc8));return _0x2f9b38;}export function nextSiblingSort(_0x402f55,_0x5dd358,_0x187935){const _0x902b56=a180_0x3f096d,_0x189b85=getChildren(_0x402f55,_0x5dd358)['map'](_0x30d23d=>_0x30d23d[_0x902b56(0xf5)])[_0x902b56(0xd5)](_0x390b7e=>typeof _0x390b7e==='number');if(_0x189b85['length']===0x0)return 0x0;const _0x39f5bc=Math[_0x902b56(0xc4)](..._0x189b85);if(_0x39f5bc>=MAX_MENU_SORT)throw menuError(_0x902b56(0x106),_0x902b56(0x114)+_0x187935+_0x902b56(0x11e)+_0x39f5bc+'.','Reorder\x20sibling\x20menus\x20below\x20'+MAX_MENU_SORT+_0x902b56(0xe5));return _0x39f5bc+0x1;}export function requireExplicitYes(_0x38a0f1){const _0x1751ad=a180_0x3f096d;if(_0x38a0f1[_0x1751ad(0x10f)](_0x1751ad(0xcf)))return;if(!_0x38a0f1[_0x1751ad(0x10f)]('yes'))throw menuError(_0x1751ad(0xd7),_0x1751ad(0x116),_0x1751ad(0x102));}export async function fetchMutationSnapshot(_0x252c3e,_0x447f70,_0x4930ab){const _0x1fddf0=a180_0x3f096d;try{return await fetchMenuSnapshot(_0x252c3e[_0x1fddf0(0x129)],_0x252c3e[_0x1fddf0(0xee)]);}catch(_0x251742){throw mapMenuApiError(_0x251742,'read\x20online\x20menu\x20facts\x20before\x20'+_0x447f70,_0x4930ab);}}export async function recheckMutationSnapshot(_0x465b30,_0x54f642,_0xc530c1,_0x267087){const _0x3528c2=a180_0x3f096d;let _0xea9dc4;try{_0xea9dc4=await fetchMenuSnapshot(_0x465b30[_0x3528c2(0x129)],_0x465b30[_0x3528c2(0xee)]);}catch(_0x2bb938){const _0x3fa5a6=mapMenuApiError(_0x2bb938,_0x3528c2(0xcc)+_0xc530c1,_0x267087);throw menuFailure(_0x3fa5a6,_0x54f642,{'stage':_0x3528c2(0xf1),'failed':_0x267087==null?{}:{'id':_0x267087}});}if(_0xea9dc4[_0x3528c2(0x123)]!==_0x54f642['snapshotHash']){const _0x39cb24=menuError(_0x3528c2(0x124),_0x3528c2(0xe7)+_0xc530c1+';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.');throw menuFailure(_0x39cb24,_0x54f642,{'stage':_0x3528c2(0xf1),'failed':{..._0x267087==null?{}:{'id':_0x267087},'expectedSnapshotHash':_0x54f642[_0x3528c2(0xd6)],'currentSnapshotHash':_0xea9dc4['hash']}});}return _0xea9dc4;}export function parseParentId(_0x5041c6,_0x140ca9,_0x28c200={}){const _0x393196=a180_0x3f096d;if(!hasFlag(_0x5041c6,_0x140ca9)){if(_0x28c200[_0x393196(0xdc)])throw CliErrors[_0x393196(0x119)](_0x140ca9);return undefined;}const _0x1a1567=_0x5041c6[_0x393196(0xff)](_0x140ca9)[_0x393196(0xcd)]();if(_0x1a1567['toLowerCase']()===_0x393196(0xd4))return null;if(!/^\d+$/[_0x393196(0x122)](_0x1a1567))throw CliErrors[_0x393196(0x113)]('--'+_0x140ca9+'\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.');const _0x4d31ff=Number(_0x1a1567);if(!Number[_0x393196(0x117)](_0x4d31ff)||_0x4d31ff<=0x0)throw CliErrors[_0x393196(0x113)]('--'+_0x140ca9+'\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.');return _0x4d31ff;}export function requireMenu(_0x20a5ec,_0x4785f4){const _0x58bcf2=a180_0x3f096d,_0x3abf8a=_0x20a5ec[_0x58bcf2(0xc9)]['get'](_0x4785f4);if(!_0x3abf8a)throw menuError(_0x58bcf2(0x120),'Online\x20menu\x20not\x20found:\x20'+_0x4785f4,_0x58bcf2(0xe4));return _0x3abf8a;}export function requireFolder(_0x56ef9f,_0x249ae7){const _0xd511fe=a180_0x3f096d,_0x324f41=requireMenu(_0x56ef9f,_0x249ae7);if(_0x324f41[_0xd511fe(0x118)]!==_0xd511fe(0x109))throw menuError(_0xd511fe(0xd1),_0xd511fe(0xf0)+_0x249ae7+_0xd511fe(0xce)+(_0x324f41[_0xd511fe(0x118)]||_0xd511fe(0x103))+_0xd511fe(0xfa),_0xd511fe(0x127));return _0x324f41;}export function assertExpectedState(_0x41ba23,_0x3fea4d){const _0x48dc13=a180_0x3f096d;if(hasFlag(_0x41ba23,'expect-parent-id')){const _0x3cb7d0=parseParentId(_0x41ba23,'expect-parent-id',{'required':!![]});if(_0x3fea4d[_0x48dc13(0x12f)]!==_0x3cb7d0)throw stateDrift(_0x48dc13(0xf0)+_0x3fea4d['id']+'\x20parent\x20changed:\x20expected\x20'+formatParent(_0x3cb7d0)+_0x48dc13(0x10d)+formatParent(_0x3fea4d[_0x48dc13(0x12f)])+'.');}if(hasFlag(_0x41ba23,_0x48dc13(0xdb))){const _0x5d23c=_0x41ba23[_0x48dc13(0xff)](_0x48dc13(0xdb));if(_0x3fea4d[_0x48dc13(0xeb)]!==_0x5d23c)throw stateDrift(_0x48dc13(0xf0)+_0x3fea4d['id']+_0x48dc13(0xda)+JSON[_0x48dc13(0xe1)](_0x5d23c)+_0x48dc13(0x10d)+JSON[_0x48dc13(0xe1)](_0x3fea4d['path'])+'.');}if(hasFlag(_0x41ba23,'expected-children-count')){const _0x2f0d12=_0x41ba23['num'](_0x48dc13(0xd8));if(!Number[_0x48dc13(0x117)](_0x2f0d12)||_0x2f0d12<0x0)throw CliErrors['validation'](_0x48dc13(0xf7));if(_0x3fea4d[_0x48dc13(0xfd)]!==_0x2f0d12)throw stateDrift(_0x48dc13(0xf0)+_0x3fea4d['id']+_0x48dc13(0xf8)+_0x2f0d12+_0x48dc13(0x10d)+_0x3fea4d[_0x48dc13(0xfd)]+'.');}}export function assertVerified(_0xf32d40,_0x11b536,_0x50619f=a180_0x3f096d(0x12a)){const _0x6d3a2d=a180_0x3f096d;if(!_0xf32d40)throw menuError(_0x6d3a2d(0xc5),_0x11b536,_0x50619f);}export function mutationResult(_0x2a0489){const _0x2b23b1=a180_0x3f096d;return{'operation':_0x2a0489[_0x2b23b1(0xe3)],'selector':_0x2a0489[_0x2b23b1(0xca)],'before':_0x2a0489[_0x2b23b1(0x12e)],'after':_0x2a0489[_0x2b23b1(0x111)],'dryRun':_0x2a0489[_0x2b23b1(0xec)],'backend':_0x2a0489[_0x2b23b1(0xf3)],..._0x2a0489['plannedActions']?{'plannedActions':_0x2a0489[_0x2b23b1(0xdf)]}:{},..._0x2a0489['targets']?{'targets':_0x2a0489[_0x2b23b1(0x10c)]}:{},..._0x2a0489[_0x2b23b1(0x11c)]?{'deleteOrder':_0x2a0489['deleteOrder']}:{},'snapshotHash':_0x2a0489[_0x2b23b1(0xd6)],..._0x2a0489['cascade']?{'cascade':_0x2a0489[_0x2b23b1(0x125)]}:{},..._0x2a0489[_0x2b23b1(0x12c)]?{'planFile':_0x2a0489[_0x2b23b1(0x12c)]}:{},'succeeded':_0x2a0489[_0x2b23b1(0xd3)]??[],'failed':_0x2a0489['failed']??[],'warnings':_0x2a0489[_0x2b23b1(0x115)]??[],'verification':_0x2a0489[_0x2b23b1(0x100)],'error':_0x2a0489[_0x2b23b1(0x128)]};}export function menuDryRunResult(_0x2efa57,_0x145c2c){return{..._0x2efa57,..._0x145c2c};}function a180_0x302e(){const _0x883536=['childrenCount','64WMHXdJ','str','verification','failed','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','unknown','expect-parent-id','548478RkYREb','menu_sort_overflow','3950772hZGFYs','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','folder','call','parent-id','targets',',\x20current\x20','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','bool','13599240KsPOBy','after','number','validation','Cannot\x20append\x20a\x20','warnings','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','isSafeInteger','type','flagMissing','8wRmFFb','Failed\x20to\x20','deleteOrder','3463596uNmsxp','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','Sibling\x20sort\x20value\x20(non-negative\x20integer)','menu_not_found','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','test','hash','menu_state_drift','cascade','3898842qJxJMx','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','error','appCode','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','failedRecords','planFile','1545EmMKhh','before','parentId','message','max','menu_verification_failed','prototype','rawFlags','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','byId','selector','menu_permission_denied','recheck\x20online\x20menu\x20facts\x20before\x20','trim','\x20is\x20type\x20\x22','dry-run','menu_mutation_failed','menu_parent_not_folder','menu_sort_invalid','succeeded','root','filter','snapshotHash','menu_confirmation_required','expected-children-count','data','\x20path\x20changed:\x20expected\x20','expect-path','required','916jzJhVI','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','plannedActions','stage','stringify','api_error','operation','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','string','Online\x20menu\x20state\x20changed\x20before\x20','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','path','dryRun','hint','cookie','333824HzRGmd','Menu\x20','pre-write-recheck','num','backend','\x20menu\x20','sort','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x20child\x20count\x20changed:\x20expected\x20','Exact\x20online\x20menu\x20id','\x22,\x20not\x20folder.','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','code'];a180_0x302e=function(){return _0x883536;};return a180_0x302e();}export function menuFailure(_0x3e5372,_0x42ce6e,_0x69f038){const _0x426040=a180_0x3f096d,_0xb0d9ea=mutationResult({..._0x42ce6e,'after':_0x69f038[_0x426040(0x111)]===undefined?_0x42ce6e[_0x426040(0x111)]:_0x69f038[_0x426040(0x111)],'backend':_0x69f038[_0x426040(0xf3)]??_0x42ce6e[_0x426040(0xf3)],'dryRun':![],'succeeded':_0x69f038[_0x426040(0xd3)]??[],'failed':_0x69f038[_0x426040(0x12b)]??[{..._0x69f038[_0x426040(0x101)]??{},'stage':_0x69f038[_0x426040(0xe0)],'code':_0x3e5372['code'],'message':_0x3e5372[_0x426040(0xc3)]}],'warnings':[..._0x42ce6e['warnings'],..._0x69f038[_0x426040(0x115)]??[]],'verification':_0x69f038[_0x426040(0x100)],'error':{'code':_0x3e5372['code'],'message':_0x3e5372[_0x426040(0xc3)],..._0x3e5372[_0x426040(0xed)]?{'hint':_0x3e5372[_0x426040(0xed)]}:{}}});return Object['defineProperty'](_0x3e5372,_0x426040(0xd9),{'value':_0xb0d9ea,'enumerable':!![],'configurable':!![]}),_0x3e5372;}export function asVerificationError(_0xa867f1,_0x227a08){const _0x44cab3=a180_0x3f096d;if(_0xa867f1 instanceof CliError&&_0xa867f1[_0x44cab3(0xfc)]===_0x44cab3(0xc5))return _0xa867f1;const _0x427029=_0xa867f1 instanceof Error?_0xa867f1[_0x44cab3(0xc3)]:String(_0xa867f1);return menuError(_0x44cab3(0xc5),''+_0x227a08+(_0x427029?':\x20'+_0x427029:''),_0x44cab3(0x108));}export function describeMenuErrorCause(_0x566405,_0x31cd1f,_0x352dd7){const _0x15896c=a180_0x3f096d,_0x4dbb5e=mapMenuApiError(_0x566405,_0x31cd1f,_0x352dd7);return{'causeCode':_0x4dbb5e[_0x15896c(0xfc)],'causeMessage':_0x4dbb5e[_0x15896c(0xc3)]};}export function hasFlag(_0x1c7757,_0x17b67a){const _0x55da80=a180_0x3f096d;return Object[_0x55da80(0xc6)]['hasOwnProperty'][_0x55da80(0x10a)](_0x1c7757[_0x55da80(0xc7)],_0x17b67a)&&_0x1c7757[_0x55da80(0xc7)][_0x17b67a]!==undefined;}export function toApiParentId(_0x53669e){return _0x53669e??0x0;}export function formatParent(_0x3fad12){const _0x42fc8d=a180_0x3f096d;return _0x3fad12==null?_0x42fc8d(0xd4):String(_0x3fad12);}export function menuError(_0x343a53,_0x5b7167,_0x5bcf90){return new CliError(_0x343a53,0x1,_0x5b7167,_0x5bcf90);}export function mapMenuApiError(_0x215e54,_0x405e15,_0x50b260){const _0x238bc6=a180_0x3f096d;if(_0x215e54 instanceof CliError&&_0x215e54[_0x238bc6(0xfc)]!=='api_error')return _0x215e54;const _0x38c99d=_0x215e54 instanceof Error?_0x215e54[_0x238bc6(0xc3)]:String(_0x215e54);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x238bc6(0x122)](_0x38c99d))return menuError(_0x238bc6(0xcb),'Permission\x20denied\x20while\x20attempting\x20to\x20'+_0x405e15+(_0x50b260?_0x238bc6(0xf4)+_0x50b260:'')+'.',_0x238bc6(0x121));return menuError(_0x238bc6(0xd0),_0x238bc6(0x11b)+_0x405e15+(_0x50b260?_0x238bc6(0xf4)+_0x50b260:'')+':\x20'+_0x38c99d,_0x238bc6(0xf6));}export function isMenuResponseLoss(_0x514c82){const _0x595975=a180_0x3f096d,_0x32215f=_0x514c82 instanceof Error?_0x514c82['message']:String(_0x514c82);if(_0x514c82 instanceof CliError)return _0x514c82[_0x595975(0xfc)]===_0x595975(0xe2)&&/^Request (?:failed|timeout):/i[_0x595975(0x122)](_0x32215f);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i['test'](_0x32215f);}function stateDrift(_0x4d4a38){const _0x48aa86=a180_0x3f096d;return menuError(_0x48aa86(0x124),_0x4d4a38,_0x48aa86(0x10e));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a181_0x12d3(_0x4826ab,_0x37cea1){_0x4826ab=_0x4826ab-0xf8;const _0x22e2c3=a181_0x22e2();let _0x12d3b0=_0x22e2c3[_0x4826ab];return _0x12d3b0;}(function(_0x570471,_0x53bfa3){const _0x1ad27f=a181_0x12d3,_0x402e07=_0x570471();while(!![]){try{const _0x2e3234=-parseInt(_0x1ad27f(0xff))/0x1+parseInt(_0x1ad27f(0xfc))/0x2*(parseInt(_0x1ad27f(0x103))/0x3)+parseInt(_0x1ad27f(0xfe))/0x4*(-parseInt(_0x1ad27f(0xfa))/0x5)+-parseInt(_0x1ad27f(0xf9))/0x6*(parseInt(_0x1ad27f(0xfb))/0x7)+parseInt(_0x1ad27f(0xf8))/0x8+-parseInt(_0x1ad27f(0x100))/0x9+parseInt(_0x1ad27f(0x101))/0xa*(parseInt(_0x1ad27f(0xfd))/0xb);if(_0x2e3234===_0x53bfa3)break;else _0x402e07['push'](_0x402e07['shift']());}catch(_0x1cf4db){_0x402e07['push'](_0x402e07['shift']());}}}(a181_0x22e2,0xc6aae));export function menuPathKey(_0x38c19a){const _0x5b5006=a181_0x12d3,_0x31c78a=_0x38c19a['trim']();if(!_0x31c78a)return'';return _0x31c78a[_0x5b5006(0x102)](/^\/+/,'')[_0x5b5006(0x102)](/\/+$/,'')||'/';}function a181_0x22e2(){const _0x286b9f=['5570TFWsEX','replace','64983ZutLHL','11704024WVgtbx','18fzHwsQ','15JVyVwR','1172514QSSJlj','6RexpbL','67441fMxbWu','1946852RruBSP','966731ooGFuS','10798515NSadZd'];a181_0x22e2=function(){return _0x286b9f;};return a181_0x22e2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a182_0x5499(_0x3d3ddf,_0x174211){_0x3d3ddf=_0x3d3ddf-0xbd;const _0xa8248e=a182_0xa824();let _0x5499cd=_0xa8248e[_0x3d3ddf];return _0x5499cd;}(function(_0x5c4278,_0x47f25b){const _0x27fa7b=a182_0x5499,_0x226097=_0x5c4278();while(!![]){try{const _0x44fa2a=-parseInt(_0x27fa7b(0xd2))/0x1+-parseInt(_0x27fa7b(0xce))/0x2+parseInt(_0x27fa7b(0xc6))/0x3*(parseInt(_0x27fa7b(0xbe))/0x4)+parseInt(_0x27fa7b(0xe8))/0x5+parseInt(_0x27fa7b(0xd4))/0x6*(-parseInt(_0x27fa7b(0xe4))/0x7)+-parseInt(_0x27fa7b(0xc7))/0x8+parseInt(_0x27fa7b(0xe3))/0x9;if(_0x44fa2a===_0x47f25b)break;else _0x226097['push'](_0x226097['shift']());}catch(_0x419a9e){_0x226097['push'](_0x226097['shift']());}}}(a182_0xa824,0xa0424));import{getEnv,isProduction}from'../../../constant/env.js';function a182_0xa824(){const _0x309ac2=['number','Start\x20batch\x20menu\x20creation,\x20total\x20','1085748ksmNIg','total','map','Updating\x20menu\x20asset\x20links:\x20','743605BcsGax','Menu\x20created\x20successfully:\x20','1785192deEbeY','menus','order','resources','create-menus','create-menu','Update\x20menu\x20assets\x20\x22','Regroup\x20','import','stringify','boolean','visible','update-menu-cdn-url','loadScriptMode','Batch\x20menu\x20creation\x20completed,\x20total\x20','15679728GQYRPI','21rzsrHP','info','Create\x20menu\x20\x22','length','6118745vdrVeA','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','20428hddRiM','Delete\x20','\x20menu\x20group(s)','Menu\x20assets\x20synced:\x20','parentId','\x20menu','label','path','249ClGjJd','4434616RrIXVC','procode','appName','Update\x20menu\x20','\x20online\x20menus\x20successfully'];a182_0xa824=function(){return _0x309ac2;};return a182_0xa824();}import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a182_0x12a1c4,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x3e7ecc,_0xd27a43){const _0x2d21ae=a182_0x5499,_0x48d51c=getEnv();logger[_0x2d21ae(0xe5)]('get-online-menu-list',isProduction(_0x48d51c)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x3e7ecc+')':_0x2d21ae(0xbd)+_0x3e7ecc+')');const _0x4840e9=await fetchMenuSnapshot(_0x3e7ecc,_0xd27a43,{'verbose':!![]});return logger['info']('get-online-menu-list','Fetched\x20'+_0x4840e9[_0x2d21ae(0xcf)]+_0x2d21ae(0xcb)),_0x4840e9[_0x2d21ae(0xd5)]['map'](toProcessedMenuItem);}export async function createMenu(_0x1c6877,_0x12ada0,_0xfd5af9){const _0x3e3ea5=a182_0x5499;logger[_0x3e3ea5(0xe5)]('create-menu','Creating\x20menu:\x20'+_0xfd5af9['label']+'\x20('+_0xfd5af9['path']+')');const _0x5ec843={'appCode':_0x1c6877,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x3e3ea5(0xdc),'resources':_0xfd5af9['resources']?JSON[_0x3e3ea5(0xdd)](_0xfd5af9['resources']):undefined},..._0xfd5af9},_0x4090ea=await createMenuRecord(_0x5ec843,_0x12ada0,'Create\x20menu\x20\x22'+_0xfd5af9[_0x3e3ea5(0xc4)]+'\x22');return logger[_0x3e3ea5(0xe5)](_0x3e3ea5(0xd9),'Menu\x20created\x20successfully:\x20'+_0xfd5af9[_0x3e3ea5(0xc4)]),_0x4090ea;}async function createSingleMenu(_0x4bd82e,_0x2adf5e,_0xdf0d98,_0x55b19f,_0x5a2b8a){const _0x708ec1=a182_0x5499,_0x4c9236={'appCode':_0x4bd82e,'type':_0x708ec1(0xc8),'sort':'order'in _0xdf0d98&&typeof _0xdf0d98[_0x708ec1(0xd6)]==='number'?_0xdf0d98['order']:0x0,..._0x708ec1(0xdf)in _0xdf0d98&&typeof _0xdf0d98[_0x708ec1(0xdf)]===_0x708ec1(0xde)?{'visible':_0xdf0d98[_0x708ec1(0xdf)]}:{},..._0x708ec1(0xc2)in _0xdf0d98&&typeof _0xdf0d98['parentId']===_0x708ec1(0xcc)?{'parentId':_0xdf0d98[_0x708ec1(0xc2)]}:{},'extend':{..._0x5a2b8a?.[_0x708ec1(0xc9)]?{'appName':_0x5a2b8a[_0x708ec1(0xc9)]}:{},'loadScriptMode':_0x708ec1(0xdc),'resources':_0x55b19f?JSON[_0x708ec1(0xdd)](_0x55b19f):undefined},'label':_0xdf0d98[_0x708ec1(0xc4)],'path':_0xdf0d98[_0x708ec1(0xc5)]},_0x1d853b=await createMenuRecord(_0x4c9236,_0x2adf5e,_0x708ec1(0xe6)+_0xdf0d98[_0x708ec1(0xc4)]+'\x22');return logger[_0x708ec1(0xe5)](_0x708ec1(0xd9),_0x708ec1(0xd3)+_0xdf0d98['label']),_0x1d853b;}export async function createMenus(_0x2a7f21,_0x299ff2,_0x45a483,_0x164f36,_0x3668d6){const _0x5196b2=a182_0x5499;logger[_0x5196b2(0xe5)](_0x5196b2(0xd8),_0x5196b2(0xcd)+_0x45a483['length']);const _0x3a6749=await Promise['all'](_0x45a483[_0x5196b2(0xd0)](_0x2a621c=>createSingleMenu(_0x2a7f21,_0x299ff2,_0x2a621c,_0x164f36,_0x3668d6)));return logger['info'](_0x5196b2(0xd8),_0x5196b2(0xe2)+_0x45a483[_0x5196b2(0xe7)]),_0x3a6749;}export async function updateMenuCdnUrl(_0x4009dd,_0x22889a,_0x314f7f){const _0x4f67f2=a182_0x5499;logger[_0x4f67f2(0xe5)](_0x4f67f2(0xe0),_0x4f67f2(0xd1)+_0x314f7f['label']+'\x20('+_0x314f7f[_0x4f67f2(0xc5)]+')');const _0x2db9ca={'id':_0x314f7f['id'],'appCode':_0x4009dd,'extend':{..._0x314f7f['extend']??{},..._0x314f7f['loadScriptMode']?{'loadScriptMode':_0x314f7f[_0x4f67f2(0xe1)]}:{},'resources':_0x314f7f[_0x4f67f2(0xd7)]?JSON[_0x4f67f2(0xdd)](_0x314f7f[_0x4f67f2(0xd7)]):undefined}},_0x150d75=await updateMenuRecord(_0x2db9ca,_0x22889a,_0x4f67f2(0xda)+_0x314f7f['label']+'\x22');return logger[_0x4f67f2(0xe5)]('update-menu-cdn-url',_0x4f67f2(0xc1)+_0x314f7f[_0x4f67f2(0xc4)],undefined),_0x150d75;}export async function createMenuEntity(_0x4455dc,_0x582a81,_0x373820){const _0x1285c2=a182_0x5499;return createMenuRecord({'appCode':_0x4455dc,..._0x373820},_0x582a81,_0x1285c2(0xe6)+_0x373820[_0x1285c2(0xc4)]+'\x22');}export async function updateMenuEntity(_0x500454,_0x3893aa,_0x925256){const _0x5655b0=a182_0x5499;return updateMenuRecord({'appCode':_0x500454,..._0x925256},_0x3893aa,_0x5655b0(0xca)+_0x925256['id']);}export async function batchDeleteMenuEntities(_0x1ec4e3,_0x343838){const _0x4610e0=a182_0x5499;return batchDeleteMenuRecords(_0x343838,_0x1ec4e3,_0x4610e0(0xbf)+_0x343838[_0x4610e0(0xe7)]+_0x4610e0(0xc3)+(_0x343838[_0x4610e0(0xe7)]===0x1?'':'s'));}export async function startMenuRegroup(_0x2fa665,_0x44cba0){const _0x281c69=a182_0x5499;return a182_0x12a1c4(_0x44cba0,_0x2fa665,_0x281c69(0xdb)+_0x44cba0['menuGroups']['length']+_0x281c69(0xc0));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a183_0x3a4e23=a183_0x49e4;(function(_0x381dad,_0x4d53ce){const _0x1c7b64=a183_0x49e4,_0x443f16=_0x381dad();while(!![]){try{const _0x2972b7=parseInt(_0x1c7b64(0xae))/0x1*(parseInt(_0x1c7b64(0xc8))/0x2)+-parseInt(_0x1c7b64(0xb0))/0x3*(-parseInt(_0x1c7b64(0xd1))/0x4)+-parseInt(_0x1c7b64(0xca))/0x5*(-parseInt(_0x1c7b64(0xd2))/0x6)+parseInt(_0x1c7b64(0xc4))/0x7+-parseInt(_0x1c7b64(0xb9))/0x8*(parseInt(_0x1c7b64(0xd5))/0x9)+-parseInt(_0x1c7b64(0xd4))/0xa+-parseInt(_0x1c7b64(0xcf))/0xb;if(_0x2972b7===_0x4d53ce)break;else _0x443f16['push'](_0x443f16['shift']());}catch(_0x3ff0af){_0x443f16['push'](_0x443f16['shift']());}}}(a183_0x43a5,0x26d3a));import{getSmartAppRecord}from'../../../core/api-client.js';function a183_0x43a5(){const _0xb37a08=['app','object','menu\x20','trim','1821841Drgpwm','str','filter','app.extend','4534TZMfkS','\x20resources','100zFxawQ','validation','path','sharedConfigured','string','3272676pLvXlU','\x20contains\x20invalid\x20JSON.','587276cXFTgM','25602HRsCWT','resources','3170050oufFhS','1137519rLwhlm','map','appName','extend','--app-name\x20is\x20required.','115tfocXr','subapp.resources','6OjFrLK','app-name','message','isArray','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','length','app.extend.assets[','appCode','sharedResources','8wishWI','app.extend.assets\x20must\x20be\x20an\x20array.','parse','Duplicate\x20subapp\x20records\x20for\x20','No\x20shared\x20resources\x20configured\x20for\x20','assets','loadScriptMode'];a183_0x43a5=function(){return _0xb37a08;};return a183_0x43a5();}import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{CliErrors}from'../../../errors.js';function objectValue(_0x4d054c,_0x232de2){const _0x345c51=a183_0x49e4,_0x5bbdf2=typeof _0x4d054c==='string'?parseJson(_0x4d054c,_0x232de2):_0x4d054c;if(!_0x5bbdf2||typeof _0x5bbdf2!==_0x345c51(0xc1)||Array['isArray'](_0x5bbdf2))throw CliErrors[_0x345c51(0xcb)](_0x232de2+'\x20must\x20be\x20a\x20JSON\x20object.');return _0x5bbdf2;}function parseJson(_0x4a39a9,_0x598139){const _0x1ee29b=a183_0x49e4;try{return JSON[_0x1ee29b(0xbb)](_0x4a39a9);}catch{throw CliErrors[_0x1ee29b(0xcb)](_0x598139+_0x1ee29b(0xd0));}}function resourceList(_0x9c9131,_0x3f9fed){const _0x2104a8=a183_0x49e4;if(typeof _0x9c9131!==_0x2104a8(0xce))throw CliErrors[_0x2104a8(0xcb)](_0x3f9fed+'\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.');const _0x37dee7=parseJson(_0x9c9131,_0x3f9fed);if(!Array[_0x2104a8(0xb3)](_0x37dee7)||_0x37dee7['some'](_0x4dcea7=>typeof _0x4dcea7!==_0x2104a8(0xce)))throw CliErrors['validation'](_0x3f9fed+'\x20must\x20be\x20an\x20array\x20of\x20URLs.');return _0x37dee7;}function a183_0x49e4(_0x2ca70b,_0x3efe9b){_0x2ca70b=_0x2ca70b-0xad;const _0x43a51a=a183_0x43a5();let _0x49e4c8=_0x43a51a[_0x2ca70b];return _0x49e4c8;}export function buildSubappAssetsStatus(_0x5a6666,_0x3d94a6,_0x518cad){const _0x1e5531=a183_0x49e4,_0x4992a4=_0x5a6666[_0x1e5531(0xd8)]==null?{}:objectValue(_0x5a6666[_0x1e5531(0xd8)],_0x1e5531(0xc7)),_0xad24d5=_0x4992a4[_0x1e5531(0xbe)]==null?[]:typeof _0x4992a4[_0x1e5531(0xbe)]===_0x1e5531(0xce)?parseJson(_0x4992a4[_0x1e5531(0xbe)],'app.extend.assets'):_0x4992a4[_0x1e5531(0xbe)];if(!Array[_0x1e5531(0xb3)](_0xad24d5))throw CliErrors[_0x1e5531(0xcb)](_0x1e5531(0xba));const _0x13c98e=_0xad24d5[_0x1e5531(0xd6)]((_0x3e5d90,_0x3b847b)=>objectValue(_0x3e5d90,_0x1e5531(0xb6)+_0x3b847b+']')),_0x221e6a=_0x13c98e['filter'](_0x29ca1a=>_0x29ca1a[_0x1e5531(0xd7)]===_0x518cad);if(_0x221e6a['length']>0x1)throw CliErrors[_0x1e5531(0xcb)](_0x1e5531(0xbc)+_0x518cad+'.');const _0x4c0792=_0x221e6a[0x0],_0x4d6d99=_0x4c0792?.['resources']==null?[]:resourceList(_0x4c0792[_0x1e5531(0xd3)],_0x1e5531(0xaf)),_0x573c25=_0x3d94a6[_0x1e5531(0xc6)](_0x5c1a31=>_0x5c1a31[_0x1e5531(0xd8)]?.[_0x1e5531(0xd7)]===_0x518cad),_0xc7f068=_0x573c25[_0x1e5531(0xd6)](_0x3352e1=>{const _0x97d96f=_0x1e5531;let _0x2180c2=null,_0x2a4fdf=null;try{_0x2180c2=_0x3352e1[_0x97d96f(0xd8)]?.[_0x97d96f(0xd3)]==null?_0x3352e1['resources']:resourceList(_0x3352e1[_0x97d96f(0xd8)][_0x97d96f(0xd3)],_0x97d96f(0xc2)+_0x3352e1['id']+_0x97d96f(0xc9));}catch(_0x2ab020){_0x2a4fdf=_0x2ab020 instanceof Error?_0x2ab020[_0x97d96f(0xb2)]:String(_0x2ab020);}const _0x555287=_0x4d6d99['length']>0x0?_0x97d96f(0xc0):'menu',_0xa30628=_0x555287===_0x97d96f(0xc0)?_0x4d6d99:_0x2180c2;return{'id':_0x3352e1['id'],'path':_0x3352e1[_0x97d96f(0xcc)],'preferredSourceIfSupported':_0x555287,'preferredResourcesIfSupported':_0xa30628,'menuFallbackResources':_0x2180c2,'menuFallbackError':_0x2a4fdf,'fallbackDiffers':_0x2180c2===null?null:_0x555287===_0x97d96f(0xc0)&&_0x2180c2[_0x97d96f(0xb5)]>0x0&&JSON['stringify'](_0x2180c2)!==JSON['stringify'](_0xa30628)};});return{'appName':_0x518cad,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x4c0792),'sharedResources':_0x4d6d99,'loadScriptMode':_0x4c0792?.[_0x1e5531(0xbf)]??null,'basename':_0x4c0792?.['basename']??null,'boundMenus':_0xc7f068[_0x1e5531(0xb5)],'staleMenuFallbacks':_0xc7f068['filter'](_0xca34eb=>_0xca34eb['fallbackDiffers'])[_0x1e5531(0xb5)],'menus':_0xc7f068};}export async function assertSharedResourcesConfigured(_0x35b7a2,_0x3ac806,_0x214c2e){const _0x589ac1=a183_0x49e4,_0x424dee=await getSmartAppRecord(_0x35b7a2,_0x3ac806),_0x530fae=buildSubappAssetsStatus(_0x424dee,[],_0x214c2e);if(!_0x530fae[_0x589ac1(0xcd)]||_0x530fae[_0x589ac1(0xb8)][_0x589ac1(0xb5)]===0x0)throw CliErrors[_0x589ac1(0xcb)](_0x589ac1(0xbd)+_0x214c2e+'.');}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':'Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app'},{'name':a183_0x3a4e23(0xb1),'type':a183_0x3a4e23(0xce),'required':!![],'description':a183_0x3a4e23(0xb4)}];export function getSubappSelector(_0x39b7a3){const _0x448c3c=a183_0x3a4e23,_0xe34541=_0x39b7a3[_0x448c3c(0xb7)],_0x5184cc=_0x39b7a3[_0x448c3c(0xc5)](_0x448c3c(0xb1))[_0x448c3c(0xc3)]();if(!_0x5184cc)throw CliErrors[_0x448c3c(0xcb)](_0x448c3c(0xad));return{'appCode':_0xe34541,'appName':_0x5184cc};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a184_0x4583b8=a184_0x4df3;(function(_0x51ef2d,_0x2f4492){const _0x2eb710=a184_0x4df3,_0x4f8de6=_0x51ef2d();while(!![]){try{const _0xdfcae8=parseInt(_0x2eb710(0x198))/0x1*(parseInt(_0x2eb710(0x181))/0x2)+parseInt(_0x2eb710(0x182))/0x3+-parseInt(_0x2eb710(0x1a7))/0x4*(-parseInt(_0x2eb710(0x19e))/0x5)+parseInt(_0x2eb710(0x193))/0x6+-parseInt(_0x2eb710(0x1b2))/0x7*(-parseInt(_0x2eb710(0x194))/0x8)+-parseInt(_0x2eb710(0x1a1))/0x9*(-parseInt(_0x2eb710(0x17f))/0xa)+-parseInt(_0x2eb710(0x1a3))/0xb*(parseInt(_0x2eb710(0x19b))/0xc);if(_0xdfcae8===_0x2f4492)break;else _0x4f8de6['push'](_0x4f8de6['shift']());}catch(_0x1b08b6){_0x4f8de6['push'](_0x4f8de6['shift']());}}}(a184_0x2f50,0x85ccb));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a184_0x2f50(){const _0xd91ebc=['CSS\x20URL\x20is\x20unreachable:\x20','No\x20local\x20pages\x20matched\x20paths:\x20','keys',';\x20found\x20','setLogPath','join','jsUrl','info','7AZqLuF','trim','Expected\x20one\x20folder\x20named\x20\x22','parse','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','folder','boolean','Parent\x20','string','has','JS\x20URL\x20is\x20unreachable:\x20','menu-sync','Invalid\x20--params:\x20',':\x20expected\x20a\x20non-empty\x20string.','object','190TLAETo','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','1916WPWBtt','3205134TvHlgQ','import','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','Invalid\x20--params.visible:\x20expected\x20a\x20boolean.','get','Invalid\x20--params.','label','dryRun','map','pages','type','visible','order','Menu\x20sync\x20completed','\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.','group','filter','1690944LIEDnV','53208owfaGj','hasOwn','cwd','parentId','1078qQjPSh','message','cssUrl','48NayXKu','number','--params.','5IIFoiF','length','path','231975iKPciH','push','7270483LtEVIV','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','isArray','Invalid\x20--params\x20JSON.','1250212RhmhkJ','appName','\x0a\x20\x20Available\x20local\x20paths:\x20'];a184_0x2f50=function(){return _0xd91ebc;};return a184_0x2f50();}import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{menuPathKey}from'../../../commands/menu/shared/path.js';import{logger}from'../../../utils/logger.js';function a184_0x4df3(_0x21ecf1,_0x582085){_0x21ecf1=_0x21ecf1-0x178;const _0x2f50c2=a184_0x2f50();let _0x4df3ea=_0x2f50c2[_0x21ecf1];return _0x4df3ea;}import{assertSharedResourcesConfigured}from'../../../commands/menu/shared/subapp-assets.js';const MENU_SYNC_PARAM_KEYS=new Set([a184_0x4583b8(0x1b0),a184_0x4583b8(0x19a),a184_0x4583b8(0x1a8),a184_0x4583b8(0x18d),a184_0x4583b8(0x197)]);export function resolvePage(_0x33be46,_0x1ae204,_0x18fd6d){const _0x143f43=a184_0x4583b8;let _0x1b6919=_0x1ae204[_0x143f43(0x197)]??_0x33be46[_0x143f43(0x197)];if(_0x1b6919===undefined&&_0x33be46[_0x143f43(0x191)]){const _0xd07252=_0x18fd6d[_0x143f43(0x192)](_0x2f66bf=>_0x2f66bf[_0x143f43(0x18c)]===_0x143f43(0x1b8)&&_0x2f66bf[_0x143f43(0x188)]===_0x33be46[_0x143f43(0x191)]);if(_0xd07252[_0x143f43(0x19f)]!==0x1)throw new Error(_0x143f43(0x1b4)+_0x33be46['group']+'\x22\x20for\x20'+_0x33be46[_0x143f43(0x1a0)]+_0x143f43(0x1ad)+_0xd07252[_0x143f43(0x19f)]);_0x1b6919=_0xd07252[0x0]['id'];}if(_0x1b6919!==undefined&&_0x1b6919!==0x0&&_0x18fd6d[_0x143f43(0x192)](_0x978869=>_0x978869['id']===_0x1b6919&&_0x978869[_0x143f43(0x18c)]===_0x143f43(0x1b8))[_0x143f43(0x19f)]!==0x1)throw new Error(_0x143f43(0x1ba)+_0x1b6919+_0x143f43(0x190));return{..._0x33be46,..._0x1b6919===undefined?{}:{'parentId':_0x1b6919},..._0x1ae204[_0x143f43(0x18d)]===undefined?{}:{'visible':_0x1ae204['visible']}};}function validateParams(_0x1dd552){const _0x2cfa50=a184_0x4583b8,_0xff1c5a=[];return _0x1dd552['jsUrl']&&!isValidJsHttpsUrl(_0x1dd552[_0x2cfa50(0x1b0)])&&_0xff1c5a[_0x2cfa50(0x1a2)]({'field':_0x2cfa50(0x1b0),'message':_0x2cfa50(0x1a4)}),_0x1dd552[_0x2cfa50(0x19a)]&&!isValidCssHttpsUrl(_0x1dd552['cssUrl'])&&_0xff1c5a[_0x2cfa50(0x1a2)]({'field':_0x2cfa50(0x19a),'message':_0x2cfa50(0x1b7)}),_0xff1c5a;}export async function runMenuSyncCore(_0x5a3f0c,_0x3a365c,_0x811ab7=[],_0x3939ee,_0x487a83={}){const _0x4bcdf4=a184_0x4583b8,_0x13bd09=parseMenuSyncParams(_0x3939ee),_0x38d680=[...new Set(_0x811ab7[_0x4bcdf4(0x18a)](_0x3e16e9=>_0x3e16e9[_0x4bcdf4(0x1b3)]())[_0x4bcdf4(0x192)](Boolean)[_0x4bcdf4(0x18a)](menuPathKey))],_0x571090=_0x13bd09['jsUrl'],_0x3923b6=_0x13bd09[_0x4bcdf4(0x19a)],_0x4d0b90=[];if(_0x571090)_0x4d0b90[_0x4bcdf4(0x1a2)](_0x571090);if(_0x3923b6)_0x4d0b90[_0x4bcdf4(0x1a2)](_0x3923b6);const _0x5b9467=validateParams(_0x13bd09);if(_0x5b9467[_0x4bcdf4(0x19f)]>0x0){const _0x392929=_0x5b9467['map'](_0xb5ce69=>_0x4bcdf4(0x19d)+_0xb5ce69['field']+':\x20'+_0xb5ce69[_0x4bcdf4(0x199)])[_0x4bcdf4(0x1af)](';\x20');throw new Error(_0x4bcdf4(0x17c)+_0x392929);}logger[_0x4bcdf4(0x1ae)](process[_0x4bcdf4(0x196)]()),logger[_0x4bcdf4(0x1b1)]('menu-sync','Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x5a3f0c,'selectedCount':_0x38d680['length'],'jsUrl':_0x571090,'cssUrl':_0x3923b6});if(_0x571090){const _0x49e36a=await isUrlReachable(_0x571090);if(!_0x49e36a)throw new Error(_0x4bcdf4(0x17a)+_0x571090);}if(_0x3923b6){const _0x2de71f=await isUrlReachable(_0x3923b6);if(!_0x2de71f)throw new Error(_0x4bcdf4(0x1aa)+_0x3923b6);}const _0x52d3e3=getLocalPages();if(_0x52d3e3[_0x4bcdf4(0x19f)]===0x0){if(_0x38d680[_0x4bcdf4(0x19f)]>0x0)throw new Error(_0x4bcdf4(0x1ab)+_0x38d680[_0x4bcdf4(0x1af)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x487a83[_0x4bcdf4(0x189)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x326cf0=await getOnlineMenuList(_0x5a3f0c,_0x3a365c),_0x278cee=new Set(_0x326cf0[_0x4bcdf4(0x18a)](_0x49a432=>menuPathKey(_0x49a432['path'])));let _0x54cb48;if(_0x38d680[_0x4bcdf4(0x19f)]>0x0){const _0x390716=new Map(_0x52d3e3[_0x4bcdf4(0x18a)](_0x3cbdf7=>[menuPathKey(_0x3cbdf7[_0x4bcdf4(0x1a0)]),_0x3cbdf7])),_0x34e541=_0x38d680[_0x4bcdf4(0x192)](_0x47940b=>!_0x390716[_0x4bcdf4(0x179)](_0x47940b));if(_0x34e541[_0x4bcdf4(0x19f)]>0x0){const _0x446ea3=_0x52d3e3[_0x4bcdf4(0x18a)](_0x45adde=>_0x45adde['path'])[_0x4bcdf4(0x1af)](',\x20');throw new Error(_0x4bcdf4(0x1ab)+_0x34e541[_0x4bcdf4(0x1af)](',\x20')+_0x4bcdf4(0x1a9)+_0x446ea3);}const _0x2680e3=_0x38d680['filter'](_0x30f49e=>_0x278cee['has'](_0x30f49e));if(_0x2680e3['length']>0x0)throw new Error(_0x4bcdf4(0x180)+_0x2680e3['join'](',\x20'));_0x54cb48=_0x38d680[_0x4bcdf4(0x18a)](_0x3a2713=>_0x390716[_0x4bcdf4(0x186)](_0x3a2713));}else _0x54cb48=_0x52d3e3['filter'](_0x3b3652=>!_0x278cee[_0x4bcdf4(0x179)](menuPathKey(_0x3b3652[_0x4bcdf4(0x1a0)])));if(_0x54cb48[_0x4bcdf4(0x19f)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x487a83[_0x4bcdf4(0x189)]===!![],'targetPages':[],'plannedMenus':[]};_0x54cb48=_0x54cb48['map'](_0x5c529f=>resolvePage(_0x5c529f,_0x13bd09,_0x326cf0));_0x13bd09[_0x4bcdf4(0x1a8)]&&_0x4d0b90['length']===0x0&&await assertSharedResourcesConfigured(_0x5a3f0c,_0x3a365c,_0x13bd09[_0x4bcdf4(0x1a8)]);const _0x4a997=_0x54cb48['map'](_0x573912=>({'type':'procode','path':_0x573912[_0x4bcdf4(0x1a0)],'label':_0x573912['label'],'loadScriptMode':_0x4bcdf4(0x183),'resources':[..._0x4d0b90],..._0x573912['visible']===undefined?{}:{'visible':_0x573912[_0x4bcdf4(0x18d)]},..._0x573912[_0x4bcdf4(0x197)]===undefined?{}:{'parentId':_0x573912[_0x4bcdf4(0x197)]},..._0x573912[_0x4bcdf4(0x18e)]===undefined?{}:{'sort':_0x573912[_0x4bcdf4(0x18e)]},..._0x13bd09[_0x4bcdf4(0x1a8)]===undefined?{}:{'appName':_0x13bd09['appName']}}));if(_0x487a83['dryRun'])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x54cb48,'plannedMenus':_0x4a997};const _0x149060=_0x13bd09['appName']?await createMenus(_0x5a3f0c,_0x3a365c,_0x54cb48,_0x4d0b90[_0x4bcdf4(0x19f)]>0x0?_0x4d0b90:undefined,{'appName':_0x13bd09['appName']}):await createMenus(_0x5a3f0c,_0x3a365c,_0x54cb48,_0x4d0b90[_0x4bcdf4(0x19f)]>0x0?_0x4d0b90:undefined);return logger[_0x4bcdf4(0x1b1)](_0x4bcdf4(0x17b),_0x4bcdf4(0x18f),{'count':_0x54cb48[_0x4bcdf4(0x19f)],'resources':_0x4d0b90}),{'created':_0x149060[_0x4bcdf4(0x19f)],'skipped':![],'dryRun':![],'targetPages':_0x54cb48,'plannedMenus':_0x4a997,'menus':_0x149060};}export function parseMenuSyncParams(_0x50becf){const _0x5bd194=a184_0x4583b8;if(!_0x50becf||typeof _0x50becf!=='string')return{};let _0x4abd3a;try{_0x4abd3a=JSON[_0x5bd194(0x1b5)](_0x50becf);}catch{throw new Error(_0x5bd194(0x1a6));}if(typeof _0x4abd3a!==_0x5bd194(0x17e)||_0x4abd3a===null||Array[_0x5bd194(0x1a5)](_0x4abd3a))throw new Error(_0x5bd194(0x1b6));const _0xada668=_0x4abd3a;if(Object[_0x5bd194(0x195)](_0xada668,_0x5bd194(0x18b)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0xe5aa1e=Object[_0x5bd194(0x1ac)](_0xada668)[_0x5bd194(0x192)](_0x1890fb=>!MENU_SYNC_PARAM_KEYS[_0x5bd194(0x179)](_0x1890fb));if(_0xe5aa1e[_0x5bd194(0x19f)]>0x0)throw new Error('Invalid\x20--params\x20fields:\x20'+_0xe5aa1e[_0x5bd194(0x1af)](',\x20')+'.');for(const _0x45acb7 of[_0x5bd194(0x1b0),_0x5bd194(0x19a),_0x5bd194(0x1a8)]){const _0x71f17d=_0xada668[_0x45acb7];if(_0x71f17d!==undefined&&(typeof _0x71f17d!==_0x5bd194(0x178)||_0x71f17d[_0x5bd194(0x1b3)]()===''))throw new Error(_0x5bd194(0x187)+_0x45acb7+_0x5bd194(0x17d));}if(_0xada668[_0x5bd194(0x18d)]!==undefined&&typeof _0xada668[_0x5bd194(0x18d)]!==_0x5bd194(0x1b9))throw new Error(_0x5bd194(0x185));if(_0xada668['parentId']!==undefined&&(!Number['isInteger'](_0xada668['parentId'])||_0xada668[_0x5bd194(0x197)]<0x0))throw new Error(_0x5bd194(0x184));return{'jsUrl':typeof _0xada668[_0x5bd194(0x1b0)]==='string'?_0xada668[_0x5bd194(0x1b0)][_0x5bd194(0x1b3)]():undefined,'cssUrl':typeof _0xada668['cssUrl']===_0x5bd194(0x178)?_0xada668[_0x5bd194(0x19a)]['trim']():undefined,'appName':typeof _0xada668[_0x5bd194(0x1a8)]===_0x5bd194(0x178)?_0xada668[_0x5bd194(0x1a8)][_0x5bd194(0x1b3)]():undefined,'visible':typeof _0xada668[_0x5bd194(0x18d)]===_0x5bd194(0x1b9)?_0xada668[_0x5bd194(0x18d)]:undefined,'parentId':typeof _0xada668[_0x5bd194(0x197)]===_0x5bd194(0x19c)?_0xada668[_0x5bd194(0x197)]:undefined};}
|
|
1
|
+
const a184_0x18c720=a184_0x20bc;(function(_0x1b7c9d,_0x41fda3){const _0x306059=a184_0x20bc,_0x123306=_0x1b7c9d();while(!![]){try{const _0x47065c=parseInt(_0x306059(0x12b))/0x1*(parseInt(_0x306059(0xfd))/0x2)+-parseInt(_0x306059(0x113))/0x3+parseInt(_0x306059(0xf4))/0x4+parseInt(_0x306059(0x12c))/0x5*(parseInt(_0x306059(0xfe))/0x6)+-parseInt(_0x306059(0x112))/0x7*(-parseInt(_0x306059(0x11a))/0x8)+parseInt(_0x306059(0x10d))/0x9+-parseInt(_0x306059(0xf5))/0xa*(parseInt(_0x306059(0x111))/0xb);if(_0x47065c===_0x41fda3)break;else _0x123306['push'](_0x123306['shift']());}catch(_0x48193c){_0x123306['push'](_0x123306['shift']());}}}(a184_0x4bab,0x497cd));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a184_0x4bab(){const _0x4b8e42=['procode','cssUrl','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','boolean','menu-sync','type','1991574ueciax','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','parse','get','11FdNZZS','2044497tIwsMt','1528188oAbtQT','\x22\x20for\x20','import','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.',';\x20found\x20',':\x20expected\x20a\x20non-empty\x20string.','16KOAMQQ','path','dryRun','isInteger','parentId','string','appName','CSS\x20URL\x20is\x20unreachable:\x20','message','info','Invalid\x20--params\x20JSON.','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','filter','trim','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','JS\x20URL\x20is\x20unreachable:\x20','group','1iOLhdU','565GcXqoU','length','Menu\x20sync\x20completed','visible','\x0a\x20\x20Available\x20local\x20paths:\x20','Invalid\x20--params.visible:\x20expected\x20a\x20boolean.','label','Parent\x20','--params.','158228EKPXmK','7183420pGzYVf','Invalid\x20--params.','push','number','Start\x20non-interactive\x20menu\x20sync','jsUrl','has','cwd','950998WlbMqC','11058sdMTgq','object','join','order','Invalid\x20--params:\x20','setLogPath','map','folder','No\x20local\x20pages\x20matched\x20paths:\x20'];a184_0x4bab=function(){return _0x4b8e42;};return a184_0x4bab();}import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{menuPathKey}from'../../../commands/menu/shared/path.js';import{logger}from'../../../utils/logger.js';import{assertSharedResourcesConfigured}from'../../../commands/menu/shared/subapp-assets.js';const MENU_SYNC_PARAM_KEYS=new Set(['jsUrl',a184_0x18c720(0x108),'appName','visible','parentId']);function a184_0x20bc(_0x23b46e,_0x2db681){_0x23b46e=_0x23b46e-0xed;const _0x4bab3a=a184_0x4bab();let _0x20bc6b=_0x4bab3a[_0x23b46e];return _0x20bc6b;}export function resolvePage(_0x1e8302,_0x20e69a,_0x84e68c){const _0xea8ac5=a184_0x18c720;let _0x14eba1=_0x20e69a[_0xea8ac5(0x11e)]??_0x1e8302['parentId'];if(_0x14eba1===undefined&&_0x1e8302['group']){const _0x40e5e9=_0x84e68c['filter'](_0x347cc9=>_0x347cc9[_0xea8ac5(0x10c)]==='folder'&&_0x347cc9[_0xea8ac5(0xf1)]===_0x1e8302['group']);if(_0x40e5e9['length']!==0x1)throw new Error('Expected\x20one\x20folder\x20named\x20\x22'+_0x1e8302[_0xea8ac5(0x12a)]+_0xea8ac5(0x114)+_0x1e8302[_0xea8ac5(0x11b)]+_0xea8ac5(0x118)+_0x40e5e9[_0xea8ac5(0x12d)]);_0x14eba1=_0x40e5e9[0x0]['id'];}if(_0x14eba1!==undefined&&_0x14eba1!==0x0&&_0x84e68c[_0xea8ac5(0x126)](_0x4af118=>_0x4af118['id']===_0x14eba1&&_0x4af118['type']===_0xea8ac5(0x105))[_0xea8ac5(0x12d)]!==0x1)throw new Error(_0xea8ac5(0xf2)+_0x14eba1+_0xea8ac5(0x117));return{..._0x1e8302,..._0x14eba1===undefined?{}:{'parentId':_0x14eba1},..._0x20e69a[_0xea8ac5(0xee)]===undefined?{}:{'visible':_0x20e69a[_0xea8ac5(0xee)]}};}function validateParams(_0x5efb18){const _0x119221=a184_0x18c720,_0x4095be=[];return _0x5efb18[_0x119221(0xfa)]&&!isValidJsHttpsUrl(_0x5efb18['jsUrl'])&&_0x4095be[_0x119221(0xf7)]({'field':_0x119221(0xfa),'message':_0x119221(0x10e)}),_0x5efb18[_0x119221(0x108)]&&!isValidCssHttpsUrl(_0x5efb18[_0x119221(0x108)])&&_0x4095be['push']({'field':_0x119221(0x108),'message':_0x119221(0x128)}),_0x4095be;}export async function runMenuSyncCore(_0x488e10,_0x2697a0,_0x8fcd8=[],_0xaa0f79,_0x4e4c04={}){const _0x1476ff=a184_0x18c720,_0xfafec=parseMenuSyncParams(_0xaa0f79),_0x1d9d9b=[...new Set(_0x8fcd8[_0x1476ff(0x104)](_0x17cbba=>_0x17cbba['trim']())[_0x1476ff(0x126)](Boolean)[_0x1476ff(0x104)](menuPathKey))],_0x2712da=_0xfafec[_0x1476ff(0xfa)],_0x21ded7=_0xfafec['cssUrl'],_0x5aead3=[];if(_0x2712da)_0x5aead3[_0x1476ff(0xf7)](_0x2712da);if(_0x21ded7)_0x5aead3['push'](_0x21ded7);const _0x2de3c9=validateParams(_0xfafec);if(_0x2de3c9[_0x1476ff(0x12d)]>0x0){const _0x1843e5=_0x2de3c9['map'](_0x18d58b=>_0x1476ff(0xf3)+_0x18d58b['field']+':\x20'+_0x18d58b[_0x1476ff(0x122)])[_0x1476ff(0x100)](';\x20');throw new Error(_0x1476ff(0x102)+_0x1843e5);}logger[_0x1476ff(0x103)](process[_0x1476ff(0xfc)]()),logger['info'](_0x1476ff(0x10b),_0x1476ff(0xf9),{'appCode':_0x488e10,'selectedCount':_0x1d9d9b[_0x1476ff(0x12d)],'jsUrl':_0x2712da,'cssUrl':_0x21ded7});if(_0x2712da){const _0x59d798=await isUrlReachable(_0x2712da);if(!_0x59d798)throw new Error(_0x1476ff(0x129)+_0x2712da);}if(_0x21ded7){const _0x3993f1=await isUrlReachable(_0x21ded7);if(!_0x3993f1)throw new Error(_0x1476ff(0x121)+_0x21ded7);}const _0x35c073=getLocalPages();if(_0x35c073[_0x1476ff(0x12d)]===0x0){if(_0x1d9d9b[_0x1476ff(0x12d)]>0x0)throw new Error(_0x1476ff(0x106)+_0x1d9d9b[_0x1476ff(0x100)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x4e4c04[_0x1476ff(0x11c)]===!![],'targetPages':[],'plannedMenus':[]};}const _0xbcfeb3=await getOnlineMenuList(_0x488e10,_0x2697a0),_0x28846b=new Set(_0xbcfeb3[_0x1476ff(0x104)](_0xaa69a7=>menuPathKey(_0xaa69a7[_0x1476ff(0x11b)])));let _0x102dfd;if(_0x1d9d9b['length']>0x0){const _0x578122=new Map(_0x35c073[_0x1476ff(0x104)](_0x1e6f47=>[menuPathKey(_0x1e6f47[_0x1476ff(0x11b)]),_0x1e6f47])),_0x23e308=_0x1d9d9b[_0x1476ff(0x126)](_0x12b2e6=>!_0x578122[_0x1476ff(0xfb)](_0x12b2e6));if(_0x23e308['length']>0x0){const _0xd06f87=_0x35c073['map'](_0x12a440=>_0x12a440[_0x1476ff(0x11b)])[_0x1476ff(0x100)](',\x20');throw new Error(_0x1476ff(0x106)+_0x23e308[_0x1476ff(0x100)](',\x20')+_0x1476ff(0xef)+_0xd06f87);}const _0x497db6=_0x1d9d9b[_0x1476ff(0x126)](_0x2381ed=>_0x28846b[_0x1476ff(0xfb)](_0x2381ed));if(_0x497db6['length']>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0x497db6[_0x1476ff(0x100)](',\x20'));_0x102dfd=_0x1d9d9b['map'](_0xce16f6=>_0x578122[_0x1476ff(0x110)](_0xce16f6));}else _0x102dfd=_0x35c073[_0x1476ff(0x126)](_0x173871=>!_0x28846b['has'](menuPathKey(_0x173871['path'])));if(_0x102dfd[_0x1476ff(0x12d)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x4e4c04[_0x1476ff(0x11c)]===!![],'targetPages':[],'plannedMenus':[]};_0x102dfd=_0x102dfd[_0x1476ff(0x104)](_0x1b812e=>resolvePage(_0x1b812e,_0xfafec,_0xbcfeb3));_0xfafec[_0x1476ff(0x120)]&&_0x5aead3[_0x1476ff(0x12d)]===0x0&&await assertSharedResourcesConfigured(_0x488e10,_0x2697a0,_0xfafec[_0x1476ff(0x120)]);const _0x160c8f=_0x102dfd[_0x1476ff(0x104)](_0x58325f=>({'type':_0x1476ff(0x107),'path':_0x58325f[_0x1476ff(0x11b)],'label':_0x58325f['label'],'loadScriptMode':_0x1476ff(0x115),'resources':[..._0x5aead3],..._0x58325f[_0x1476ff(0xee)]===undefined?{}:{'visible':_0x58325f[_0x1476ff(0xee)]},..._0x58325f[_0x1476ff(0x11e)]===undefined?{}:{'parentId':_0x58325f[_0x1476ff(0x11e)]},..._0x58325f[_0x1476ff(0x101)]===undefined?{}:{'sort':_0x58325f[_0x1476ff(0x101)]},..._0xfafec[_0x1476ff(0x120)]===undefined?{}:{'appName':_0xfafec['appName']}}));if(_0x4e4c04[_0x1476ff(0x11c)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x102dfd,'plannedMenus':_0x160c8f};const _0x56a20d=_0xfafec[_0x1476ff(0x120)]?await createMenus(_0x488e10,_0x2697a0,_0x102dfd,_0x5aead3[_0x1476ff(0x12d)]>0x0?_0x5aead3:undefined,{'appName':_0xfafec[_0x1476ff(0x120)]}):await createMenus(_0x488e10,_0x2697a0,_0x102dfd,_0x5aead3[_0x1476ff(0x12d)]>0x0?_0x5aead3:undefined);return logger[_0x1476ff(0x123)](_0x1476ff(0x10b),_0x1476ff(0xed),{'count':_0x102dfd['length'],'resources':_0x5aead3}),{'created':_0x56a20d[_0x1476ff(0x12d)],'skipped':![],'dryRun':![],'targetPages':_0x102dfd,'plannedMenus':_0x160c8f,'menus':_0x56a20d};}export function parseMenuSyncParams(_0x4082ee){const _0x1d8354=a184_0x18c720;if(!_0x4082ee||typeof _0x4082ee!==_0x1d8354(0x11f))return{};let _0x2758dc;try{_0x2758dc=JSON[_0x1d8354(0x10f)](_0x4082ee);}catch{throw new Error(_0x1d8354(0x124));}if(typeof _0x2758dc!==_0x1d8354(0xff)||_0x2758dc===null||Array['isArray'](_0x2758dc))throw new Error(_0x1d8354(0x109));const _0x41e1bd=_0x2758dc;if(Object['hasOwn'](_0x41e1bd,'pages'))throw new Error(_0x1d8354(0x116));const _0x3979e5=Object['keys'](_0x41e1bd)[_0x1d8354(0x126)](_0x22d339=>!MENU_SYNC_PARAM_KEYS[_0x1d8354(0xfb)](_0x22d339));if(_0x3979e5[_0x1d8354(0x12d)]>0x0)throw new Error('Invalid\x20--params\x20fields:\x20'+_0x3979e5[_0x1d8354(0x100)](',\x20')+'.');for(const _0xb137bd of[_0x1d8354(0xfa),_0x1d8354(0x108),_0x1d8354(0x120)]){const _0x886257=_0x41e1bd[_0xb137bd];if(_0x886257!==undefined&&(typeof _0x886257!==_0x1d8354(0x11f)||_0x886257['trim']()===''))throw new Error(_0x1d8354(0xf6)+_0xb137bd+_0x1d8354(0x119));}if(_0x41e1bd['visible']!==undefined&&typeof _0x41e1bd[_0x1d8354(0xee)]!==_0x1d8354(0x10a))throw new Error(_0x1d8354(0xf0));if(_0x41e1bd[_0x1d8354(0x11e)]!==undefined&&(!Number[_0x1d8354(0x11d)](_0x41e1bd[_0x1d8354(0x11e)])||_0x41e1bd[_0x1d8354(0x11e)]<0x0))throw new Error(_0x1d8354(0x125));return{'jsUrl':typeof _0x41e1bd[_0x1d8354(0xfa)]===_0x1d8354(0x11f)?_0x41e1bd[_0x1d8354(0xfa)][_0x1d8354(0x127)]():undefined,'cssUrl':typeof _0x41e1bd[_0x1d8354(0x108)]===_0x1d8354(0x11f)?_0x41e1bd[_0x1d8354(0x108)][_0x1d8354(0x127)]():undefined,'appName':typeof _0x41e1bd[_0x1d8354(0x120)]===_0x1d8354(0x11f)?_0x41e1bd[_0x1d8354(0x120)][_0x1d8354(0x127)]():undefined,'visible':typeof _0x41e1bd[_0x1d8354(0xee)]==='boolean'?_0x41e1bd[_0x1d8354(0xee)]:undefined,'parentId':typeof _0x41e1bd[_0x1d8354(0x11e)]===_0x1d8354(0xf8)?_0x41e1bd['parentId']:undefined};}
|