@lovrabet/rabetbase-cli 2.3.16-beta.4 → 2.3.16-beta.6
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.d.ts +9 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.d.ts +2 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +8 -0
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.d.ts +13 -0
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.d.ts +25 -0
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.d.ts +2 -0
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.d.ts +1 -0
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.d.ts +51 -0
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.d.ts +1 -0
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.d.ts +5 -0
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.d.ts +1 -0
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.d.ts +12 -0
- package/lib/cli-flags.js +1 -1
- package/lib/cli.d.ts +2 -0
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.d.ts +2 -0
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.d.ts +2 -0
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.d.ts +2 -0
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.d.ts +2 -0
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.d.ts +18 -0
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.d.ts +5 -0
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.d.ts +10 -0
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.d.ts +2 -0
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.d.ts +11 -0
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.d.ts +46 -0
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.d.ts +2 -0
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.d.ts +2 -0
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.d.ts +2 -0
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.d.ts +2 -0
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.d.ts +2 -0
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.d.ts +105 -0
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.d.ts +2 -0
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.d.ts +4 -0
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.d.ts +2 -0
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.d.ts +2 -0
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.d.ts +5 -0
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.d.ts +2 -0
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.d.ts +2 -0
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.d.ts +2 -0
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.d.ts +2 -0
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.d.ts +8 -0
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.d.ts +2 -0
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.d.ts +2 -0
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.d.ts +2 -0
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.d.ts +2 -0
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.d.ts +17 -0
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.d.ts +17 -0
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.d.ts +11 -0
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.d.ts +12 -0
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +26 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.d.ts +6 -0
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.d.ts +13 -0
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.d.ts +5 -0
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.d.ts +5 -0
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.d.ts +5 -0
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.d.ts +5 -0
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.d.ts +16 -0
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.d.ts +7 -0
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.d.ts +7 -0
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.d.ts +8 -0
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.d.ts +33 -0
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.d.ts +18 -0
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.d.ts +11 -0
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.d.ts +2 -0
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.d.ts +2 -0
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.d.ts +26 -0
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.d.ts +27 -0
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.d.ts +3 -0
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.d.ts +2 -0
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.d.ts +2 -0
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.d.ts +2 -0
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.d.ts +2 -0
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.d.ts +2 -0
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.d.ts +2 -0
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.d.ts +128 -0
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.d.ts +2 -0
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.d.ts +53 -0
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.d.ts +17 -0
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.d.ts +2 -0
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.d.ts +30 -0
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.d.ts +2 -0
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.d.ts +2 -0
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.d.ts +2 -0
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.d.ts +2 -0
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.d.ts +2 -0
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.d.ts +2 -0
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.d.ts +2 -0
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.d.ts +5 -0
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.d.ts +2 -0
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.d.ts +15 -0
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.d.ts +2 -0
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.d.ts +2 -0
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.d.ts +2 -0
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.d.ts +2 -0
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.d.ts +2 -0
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.d.ts +11 -0
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.d.ts +2 -0
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.d.ts +23 -0
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.d.ts +2 -0
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.d.ts +32 -0
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.d.ts +2 -0
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.d.ts +2 -0
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.d.ts +2 -0
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.d.ts +2 -0
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.d.ts +2 -0
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.d.ts +33 -0
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.d.ts +2 -0
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.d.ts +5 -0
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.d.ts +2 -0
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.d.ts +2 -0
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.d.ts +3 -0
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.d.ts +2 -0
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.d.ts +2 -0
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.d.ts +2 -0
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.d.ts +17 -0
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.d.ts +2 -0
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.d.ts +2 -0
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.d.ts +2 -0
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.d.ts +2 -0
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.d.ts +27 -0
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.d.ts +12 -0
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.d.ts +12 -0
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.d.ts +10 -0
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.d.ts +12 -0
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +28 -0
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.d.ts +69 -0
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.d.ts +17 -0
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.d.ts +7 -0
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +162 -0
- package/lib/commands/menu/shared/update-core.d.ts +11 -0
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.d.ts +6 -0
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.d.ts +2 -0
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.d.ts +2 -0
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.d.ts +2 -0
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.d.ts +2 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.d.ts +2 -0
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.d.ts +2 -0
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.d.ts +2 -0
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.d.ts +2 -0
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.d.ts +2 -0
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.d.ts +2 -0
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.d.ts +2 -0
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.d.ts +105 -0
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.d.ts +2 -0
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.d.ts +2 -0
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.d.ts +2 -0
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.d.ts +2 -0
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.d.ts +2 -0
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.d.ts +2 -0
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.d.ts +2 -0
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.d.ts +2 -0
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.d.ts +74 -0
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.d.ts +1 -0
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +6 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.d.ts +9 -0
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.d.ts +4 -0
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.d.ts +1 -0
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.d.ts +2 -0
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.d.ts +1 -0
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.d.ts +66 -0
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.d.ts +2 -0
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.d.ts +2 -0
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.d.ts +2 -0
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.d.ts +2 -0
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.d.ts +2 -0
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.d.ts +107 -0
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.d.ts +2 -0
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.d.ts +2 -0
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.d.ts +2 -0
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.d.ts +2 -0
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.d.ts +2 -0
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.d.ts +5 -0
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.d.ts +10 -0
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.d.ts +5 -0
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.d.ts +2 -0
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.d.ts +2 -0
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.d.ts +5 -0
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.d.ts +2 -0
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.d.ts +5 -0
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.d.ts +5 -0
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.d.ts +23 -0
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.d.ts +5 -0
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.d.ts +2 -0
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.d.ts +2 -0
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.d.ts +2 -0
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.d.ts +2 -0
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.d.ts +2 -0
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.d.ts +10 -0
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/workspace/add.d.ts +6 -0
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.d.ts +11 -0
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.d.ts +6 -0
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.d.ts +50 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.d.ts +1 -0
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.d.ts +34 -0
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.d.ts +10 -0
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +14 -0
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.d.ts +11 -0
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.d.ts +1 -0
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.d.ts +5 -0
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.d.ts +1 -0
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.d.ts +36 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.d.ts +5 -0
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.d.ts +61 -0
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +102 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +31 -0
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +1018 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.d.ts +8 -0
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.d.ts +28 -0
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.d.ts +7 -0
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.d.ts +25 -0
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +92 -0
- package/lib/core/bff/utils.d.ts +25 -0
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.d.ts +43 -0
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.d.ts +6 -0
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.d.ts +4 -0
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.d.ts +8 -0
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/types.d.ts +22 -0
- package/lib/core/sql-index-auditor.d.ts +33 -0
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.d.ts +7 -0
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.d.ts +7 -0
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.d.ts +5 -0
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.d.ts +14 -0
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/types.d.ts +43 -0
- package/lib/core/sql-sync/utils.d.ts +10 -0
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.d.ts +34 -0
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.d.ts +3 -0
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.d.ts +2 -0
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.d.ts +9 -0
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.d.ts +3 -0
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.d.ts +3 -0
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.d.ts +4 -0
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.d.ts +11 -0
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.d.ts +15 -0
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.d.ts +2 -0
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.d.ts +14 -0
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.d.ts +36 -0
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.d.ts +3 -0
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.d.ts +63 -0
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -0
- package/lib/generated/build-info.js +1 -1
- package/lib/help.d.ts +1 -0
- package/lib/help.js +1 -1
- package/lib/runtime/confirmation.d.ts +4 -0
- package/lib/runtime/confirmation.js +1 -0
- package/lib/runtime/event.d.ts +5 -0
- package/lib/runtime/event.js +1 -0
- package/lib/runtime/index.d.ts +7 -0
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/queue.d.ts +5 -0
- package/lib/runtime/queue.js +1 -0
- package/lib/runtime/resolve.d.ts +8 -0
- package/lib/runtime/resolve.js +1 -0
- package/lib/runtime/types.d.ts +50 -0
- package/lib/runtime/types.js +1 -0
- package/lib/skills/main.d.ts +41 -0
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +99 -0
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.d.ts +44 -0
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.d.ts +12 -0
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.d.ts +8 -0
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +93 -0
- package/lib/utils/ai_config.d.ts +47 -0
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.d.ts +1 -0
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.d.ts +42 -0
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.d.ts +23 -0
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.d.ts +37 -0
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.d.ts +9 -0
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.d.ts +42 -0
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.d.ts +1 -0
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.d.ts +30 -0
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.d.ts +25 -0
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.d.ts +80 -0
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.d.ts +30 -0
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.d.ts +7 -0
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.d.ts +62 -0
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.d.ts +15 -0
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.d.ts +21 -0
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.d.ts +38 -0
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.d.ts +1 -0
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.d.ts +55 -0
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.d.ts +10 -0
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.d.ts +1 -0
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.d.ts +1 -0
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.d.ts +6 -0
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +9 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { CliError } from "../../../errors.js";
|
|
2
|
+
import type { CommandDefinition, DryRunResult, FlagDef, RuntimeContext } from "../../../framework/types.js";
|
|
3
|
+
import type { MenuFact, MenuMutationError, MenuMutationResult, MenuSnapshot } from "../../../commands/menu/shared/types.js";
|
|
4
|
+
export declare const MAX_MENU_SORT = 2147483647;
|
|
5
|
+
export declare const MENU_ID_FLAG: FlagDef;
|
|
6
|
+
export declare const MENU_SORT_FLAG: FlagDef;
|
|
7
|
+
export declare const MENU_PARENT_ID_FLAG: FlagDef;
|
|
8
|
+
export declare const MENU_EXPECT_PARENT_ID_FLAG: FlagDef;
|
|
9
|
+
export declare const MENU_EXPECT_FLAGS: FlagDef[];
|
|
10
|
+
export type MenuCommandContext = Parameters<NonNullable<CommandDefinition["execute"]>>[0];
|
|
11
|
+
export declare function validateExactId(ctx: RuntimeContext): number;
|
|
12
|
+
export declare function validateSort(ctx: RuntimeContext, flagName?: string): number | undefined;
|
|
13
|
+
export declare function nextSiblingSort(snapshot: MenuSnapshot, parentId: number | null, subject: string): number;
|
|
14
|
+
export declare function requireExplicitYes(ctx: RuntimeContext): void;
|
|
15
|
+
export declare function fetchMutationSnapshot(ctx: RuntimeContext & {
|
|
16
|
+
appCode: string;
|
|
17
|
+
cookie: string;
|
|
18
|
+
}, operation: string, targetId?: number): Promise<MenuSnapshot>;
|
|
19
|
+
export declare function recheckMutationSnapshot(ctx: RuntimeContext & {
|
|
20
|
+
appCode: string;
|
|
21
|
+
cookie: string;
|
|
22
|
+
}, plan: MenuMutationResult, operation: string, targetId?: number): Promise<MenuSnapshot>;
|
|
23
|
+
export declare function parseParentId(ctx: RuntimeContext, flagName: string, options?: {
|
|
24
|
+
required?: boolean;
|
|
25
|
+
}): number | null | undefined;
|
|
26
|
+
export declare function requireMenu(snapshot: MenuSnapshot, id: number): MenuFact;
|
|
27
|
+
export declare function requireFolder(snapshot: MenuSnapshot, id: number): MenuFact;
|
|
28
|
+
export declare function assertExpectedState(ctx: RuntimeContext, menu: MenuFact): void;
|
|
29
|
+
export declare function assertVerified(condition: boolean, message: string, hint?: string): asserts condition;
|
|
30
|
+
export declare function mutationResult(input: {
|
|
31
|
+
operation: string;
|
|
32
|
+
selector: Record<string, unknown>;
|
|
33
|
+
before: MenuMutationResult["before"];
|
|
34
|
+
after: MenuMutationResult["after"];
|
|
35
|
+
dryRun: boolean;
|
|
36
|
+
backend: MenuMutationResult["backend"];
|
|
37
|
+
plannedActions?: MenuMutationResult["plannedActions"];
|
|
38
|
+
targets?: MenuMutationResult["targets"];
|
|
39
|
+
deleteOrder?: MenuMutationResult["deleteOrder"];
|
|
40
|
+
snapshotHash: string;
|
|
41
|
+
cascade?: MenuMutationResult["cascade"];
|
|
42
|
+
planFile?: MenuMutationResult["planFile"];
|
|
43
|
+
succeeded?: Array<Record<string, unknown>>;
|
|
44
|
+
failed?: Array<Record<string, unknown>>;
|
|
45
|
+
warnings?: string[];
|
|
46
|
+
verification?: Record<string, unknown>;
|
|
47
|
+
error?: MenuMutationError;
|
|
48
|
+
}): MenuMutationResult;
|
|
49
|
+
export declare function menuDryRunResult(plan: MenuMutationResult, request: DryRunResult): DryRunResult & MenuMutationResult;
|
|
50
|
+
export declare function menuFailure(error: CliError, plan: MenuMutationResult, input: {
|
|
51
|
+
stage: string;
|
|
52
|
+
succeeded?: Array<Record<string, unknown>>;
|
|
53
|
+
failed?: Record<string, unknown>;
|
|
54
|
+
warnings?: string[];
|
|
55
|
+
verification?: Record<string, unknown>;
|
|
56
|
+
after?: MenuMutationResult["after"];
|
|
57
|
+
backend?: MenuMutationResult["backend"];
|
|
58
|
+
}): CliError;
|
|
59
|
+
export declare function asVerificationError(error: unknown, message: string): CliError;
|
|
60
|
+
export declare function describeMenuErrorCause(error: unknown, operation: string, targetId?: number): {
|
|
61
|
+
causeCode: string;
|
|
62
|
+
causeMessage: string;
|
|
63
|
+
};
|
|
64
|
+
export declare function hasFlag(ctx: RuntimeContext, name: string): boolean;
|
|
65
|
+
export declare function toApiParentId(parentId: number | null): number;
|
|
66
|
+
export declare function formatParent(parentId: number | null | undefined): string;
|
|
67
|
+
export declare function menuError(code: string, message: string, hint?: string): CliError;
|
|
68
|
+
export declare function mapMenuApiError(error: unknown, operation: string, targetId?: number): CliError;
|
|
69
|
+
export declare function isMenuResponseLoss(error: unknown): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a125_0x1190ac=a125_0x3959;(function(_0x1b8a9a,_0xb8dc60){const _0x52a809=a125_0x3959,_0x251a9d=_0x1b8a9a();while(!![]){try{const _0x195357=-parseInt(_0x52a809(0x1e2))/0x1*(parseInt(_0x52a809(0x1e1))/0x2)+-parseInt(_0x52a809(0x1f9))/0x3+-parseInt(_0x52a809(0x204))/0x4+parseInt(_0x52a809(0x1df))/0x5*(parseInt(_0x52a809(0x1c0))/0x6)+-parseInt(_0x52a809(0x1e0))/0x7+-parseInt(_0x52a809(0x1d5))/0x8+parseInt(_0x52a809(0x1cf))/0x9*(parseInt(_0x52a809(0x1c7))/0xa);if(_0x195357===_0xb8dc60)break;else _0x251a9d['push'](_0x251a9d['shift']());}catch(_0x3c2c00){_0x251a9d['push'](_0x251a9d['shift']());}}}(a125_0x2e1d,0x3b219));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':a125_0x1190ac(0x20b),'required':!![],'description':a125_0x1190ac(0x1b4)};export const MENU_SORT_FLAG={'name':'sort','type':a125_0x1190ac(0x20b),'description':'Sibling\x20sort\x20value\x20(non-negative\x20integer)'};export const MENU_PARENT_ID_FLAG={'name':a125_0x1190ac(0x1cc),'type':'string','description':a125_0x1190ac(0x203)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a125_0x1190ac(0x1d1),'type':'string','description':a125_0x1190ac(0x1c3)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a125_0x1190ac(0x1fe),'type':'string','description':'Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches'},{'name':a125_0x1190ac(0x1ea),'type':a125_0x1190ac(0x20b),'description':a125_0x1190ac(0x1fd)}];export function validateExactId(_0x321f74){const _0x3c17a7=a125_0x1190ac,_0x598f57=_0x321f74[_0x3c17a7(0x1ba)]('id');if(!Number[_0x3c17a7(0x1d4)](_0x598f57)||_0x598f57<=0x0)throw CliErrors['validation'](_0x3c17a7(0x207));return _0x598f57;}export function validateSort(_0x300eb6,_0x4ae067=a125_0x1190ac(0x1f7)){const _0x4830ee=a125_0x1190ac;if(!hasFlag(_0x300eb6,_0x4ae067))return undefined;const _0x50e65b=_0x300eb6[_0x4830ee(0x1ba)](_0x4ae067);if(!Number[_0x4830ee(0x1d4)](_0x50e65b)||_0x50e65b<0x0||_0x50e65b>MAX_MENU_SORT)throw menuError('menu_sort_invalid','--'+_0x4ae067+_0x4830ee(0x1eb)+MAX_MENU_SORT+'.','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.');return _0x50e65b;}export function nextSiblingSort(_0x5ac0c0,_0x135832,_0x57e354){const _0xf69bb5=a125_0x1190ac,_0x15b5f3=getChildren(_0x5ac0c0,_0x135832)['map'](_0x12764a=>_0x12764a[_0xf69bb5(0x1f7)])[_0xf69bb5(0x1cd)](_0x4a8eb4=>typeof _0x4a8eb4===_0xf69bb5(0x20b));if(_0x15b5f3[_0xf69bb5(0x1f0)]===0x0)return 0x0;const _0x37d9a0=Math['max'](..._0x15b5f3);if(_0x37d9a0>=MAX_MENU_SORT)throw menuError(_0xf69bb5(0x1b7),_0xf69bb5(0x1b6)+_0x57e354+_0xf69bb5(0x1a7)+_0x37d9a0+'.',_0xf69bb5(0x1c6)+MAX_MENU_SORT+',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.');return _0x37d9a0+0x1;}export function requireExplicitYes(_0x13f0a1){const _0x17f399=a125_0x1190ac;if(_0x13f0a1[_0x17f399(0x1e5)](_0x17f399(0x1c8)))return;if(!_0x13f0a1[_0x17f399(0x1e5)](_0x17f399(0x20c)))throw menuError('menu_confirmation_required',_0x17f399(0x1f3),_0x17f399(0x205));}export async function fetchMutationSnapshot(_0x335838,_0x539c90,_0x3c5d2e){const _0x15ce98=a125_0x1190ac;try{return await fetchMenuSnapshot(_0x335838[_0x15ce98(0x1ab)],_0x335838[_0x15ce98(0x1e4)]);}catch(_0x2e08ff){throw mapMenuApiError(_0x2e08ff,'read\x20online\x20menu\x20facts\x20before\x20'+_0x539c90,_0x3c5d2e);}}export async function recheckMutationSnapshot(_0x37ece2,_0x5d88e9,_0x2b5c9b,_0x39f6e5){const _0x491df5=a125_0x1190ac;let _0x158330;try{_0x158330=await fetchMenuSnapshot(_0x37ece2[_0x491df5(0x1ab)],_0x37ece2[_0x491df5(0x1e4)]);}catch(_0x83e3eb){const _0x2af62a=mapMenuApiError(_0x83e3eb,_0x491df5(0x1ed)+_0x2b5c9b,_0x39f6e5);throw menuFailure(_0x2af62a,_0x5d88e9,{'stage':_0x491df5(0x20d),'failed':_0x39f6e5==null?{}:{'id':_0x39f6e5}});}if(_0x158330[_0x491df5(0x1be)]!==_0x5d88e9[_0x491df5(0x1ef)]){const _0x3a72af=menuError(_0x491df5(0x1c5),_0x491df5(0x209)+_0x2b5c9b+_0x491df5(0x1fa),_0x491df5(0x1b0));throw menuFailure(_0x3a72af,_0x5d88e9,{'stage':_0x491df5(0x20d),'failed':{..._0x39f6e5==null?{}:{'id':_0x39f6e5},'expectedSnapshotHash':_0x5d88e9[_0x491df5(0x1ef)],'currentSnapshotHash':_0x158330['hash']}});}return _0x158330;}export function parseParentId(_0xc397a7,_0x46c6a4,_0x52d18e={}){const _0x18edef=a125_0x1190ac;if(!hasFlag(_0xc397a7,_0x46c6a4)){if(_0x52d18e[_0x18edef(0x1dc)])throw CliErrors[_0x18edef(0x1ee)](_0x46c6a4);return undefined;}const _0x3bbfb5=_0xc397a7[_0x18edef(0x1c4)](_0x46c6a4)[_0x18edef(0x1e6)]();if(_0x3bbfb5[_0x18edef(0x1d6)]()===_0x18edef(0x1c9))return null;if(!/^\d+$/[_0x18edef(0x1a8)](_0x3bbfb5))throw CliErrors[_0x18edef(0x200)]('--'+_0x46c6a4+_0x18edef(0x1b9));const _0x1497c4=Number(_0x3bbfb5);if(!Number['isSafeInteger'](_0x1497c4)||_0x1497c4<=0x0)throw CliErrors[_0x18edef(0x200)]('--'+_0x46c6a4+_0x18edef(0x1b9));return _0x1497c4;}export function requireMenu(_0x3e3016,_0x49a17d){const _0x12dead=a125_0x1190ac,_0x46f863=_0x3e3016['byId'][_0x12dead(0x1d8)](_0x49a17d);if(!_0x46f863)throw menuError(_0x12dead(0x1bf),_0x12dead(0x1f5)+_0x49a17d,'Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.');return _0x46f863;}export function requireFolder(_0x2dbe54,_0x109abc){const _0x445f98=a125_0x1190ac,_0x596eb0=requireMenu(_0x2dbe54,_0x109abc);if(_0x596eb0[_0x445f98(0x1db)]!==_0x445f98(0x1bd))throw menuError(_0x445f98(0x1f8),_0x445f98(0x1b1)+_0x109abc+_0x445f98(0x1b2)+(_0x596eb0[_0x445f98(0x1db)]||_0x445f98(0x201))+_0x445f98(0x1da),_0x445f98(0x1ce));return _0x596eb0;}export function assertExpectedState(_0xb472ff,_0x12a649){const _0x4baebc=a125_0x1190ac;if(hasFlag(_0xb472ff,_0x4baebc(0x1d1))){const _0x41e1c8=parseParentId(_0xb472ff,_0x4baebc(0x1d1),{'required':!![]});if(_0x12a649['parentId']!==_0x41e1c8)throw stateDrift(_0x4baebc(0x1b1)+_0x12a649['id']+'\x20parent\x20changed:\x20expected\x20'+formatParent(_0x41e1c8)+_0x4baebc(0x1ec)+formatParent(_0x12a649[_0x4baebc(0x1b3)])+'.');}if(hasFlag(_0xb472ff,'expect-path')){const _0x2d0267=_0xb472ff[_0x4baebc(0x1c4)](_0x4baebc(0x1fe));if(_0x12a649[_0x4baebc(0x1aa)]!==_0x2d0267)throw stateDrift(_0x4baebc(0x1b1)+_0x12a649['id']+_0x4baebc(0x1e3)+JSON[_0x4baebc(0x1f1)](_0x2d0267)+',\x20current\x20'+JSON[_0x4baebc(0x1f1)](_0x12a649[_0x4baebc(0x1aa)])+'.');}if(hasFlag(_0xb472ff,_0x4baebc(0x1ea))){const _0x2ab3bf=_0xb472ff[_0x4baebc(0x1ba)](_0x4baebc(0x1ea));if(!Number[_0x4baebc(0x1d4)](_0x2ab3bf)||_0x2ab3bf<0x0)throw CliErrors['validation'](_0x4baebc(0x1b8));if(_0x12a649[_0x4baebc(0x1b5)]!==_0x2ab3bf)throw stateDrift(_0x4baebc(0x1b1)+_0x12a649['id']+'\x20child\x20count\x20changed:\x20expected\x20'+_0x2ab3bf+',\x20current\x20'+_0x12a649[_0x4baebc(0x1b5)]+'.');}}export function assertVerified(_0x5c5787,_0x42ee3d,_0x57d1fd=a125_0x1190ac(0x1fc)){if(!_0x5c5787)throw menuError('menu_verification_failed',_0x42ee3d,_0x57d1fd);}export function mutationResult(_0x3a60a2){const _0xd29a24=a125_0x1190ac;return{'operation':_0x3a60a2[_0xd29a24(0x1c1)],'selector':_0x3a60a2[_0xd29a24(0x1f6)],'before':_0x3a60a2[_0xd29a24(0x1f2)],'after':_0x3a60a2['after'],'dryRun':_0x3a60a2[_0xd29a24(0x1e7)],'backend':_0x3a60a2['backend'],..._0x3a60a2[_0xd29a24(0x20a)]?{'plannedActions':_0x3a60a2[_0xd29a24(0x20a)]}:{},..._0x3a60a2[_0xd29a24(0x1d0)]?{'targets':_0x3a60a2['targets']}:{},..._0x3a60a2['deleteOrder']?{'deleteOrder':_0x3a60a2[_0xd29a24(0x1c2)]}:{},'snapshotHash':_0x3a60a2['snapshotHash'],..._0x3a60a2['cascade']?{'cascade':_0x3a60a2[_0xd29a24(0x1d2)]}:{},..._0x3a60a2[_0xd29a24(0x1de)]?{'planFile':_0x3a60a2['planFile']}:{},'succeeded':_0x3a60a2[_0xd29a24(0x1d9)]??[],'failed':_0x3a60a2[_0xd29a24(0x206)]??[],'warnings':_0x3a60a2[_0xd29a24(0x1cb)]??[],'verification':_0x3a60a2[_0xd29a24(0x1bb)],'error':_0x3a60a2[_0xd29a24(0x208)]};}export function menuDryRunResult(_0x1ed696,_0x2cedba){return{..._0x1ed696,..._0x2cedba};}export function menuFailure(_0x29e46a,_0x1aa2a7,_0x56ba2c){const _0x903141=a125_0x1190ac,_0x215260=mutationResult({..._0x1aa2a7,'after':_0x56ba2c['after']===undefined?_0x1aa2a7[_0x903141(0x1ad)]:_0x56ba2c[_0x903141(0x1ad)],'backend':_0x56ba2c[_0x903141(0x1f4)]??_0x1aa2a7[_0x903141(0x1f4)],'dryRun':![],'succeeded':_0x56ba2c[_0x903141(0x1d9)]??[],'failed':[{..._0x56ba2c[_0x903141(0x206)]??{},'stage':_0x56ba2c[_0x903141(0x1fb)],'code':_0x29e46a[_0x903141(0x1a5)],'message':_0x29e46a[_0x903141(0x1ff)]}],'warnings':[..._0x1aa2a7['warnings'],..._0x56ba2c[_0x903141(0x1cb)]??[]],'verification':_0x56ba2c[_0x903141(0x1bb)],'error':{'code':_0x29e46a[_0x903141(0x1a5)],'message':_0x29e46a[_0x903141(0x1ff)],..._0x29e46a[_0x903141(0x1a9)]?{'hint':_0x29e46a['hint']}:{}}});return Object[_0x903141(0x1af)](_0x29e46a,_0x903141(0x1d3),{'value':_0x215260,'enumerable':!![],'configurable':!![]}),_0x29e46a;}export function asVerificationError(_0x12b710,_0x407750){const _0x5812cb=a125_0x1190ac;if(_0x12b710 instanceof CliError&&_0x12b710[_0x5812cb(0x1a5)]===_0x5812cb(0x1dd))return _0x12b710;const _0x404a02=_0x12b710 instanceof Error?_0x12b710['message']:String(_0x12b710);return menuError('menu_verification_failed',''+_0x407750+(_0x404a02?':\x20'+_0x404a02:''),'The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.');}function a125_0x3959(_0x1cb9aa,_0x302c1a){_0x1cb9aa=_0x1cb9aa-0x1a5;const _0x2e1dc0=a125_0x2e1d();let _0x395945=_0x2e1dc0[_0x1cb9aa];return _0x395945;}export function describeMenuErrorCause(_0x50bf48,_0x29c6a2,_0x1df138){const _0x53b4b8=a125_0x1190ac,_0xbc7e68=mapMenuApiError(_0x50bf48,_0x29c6a2,_0x1df138);return{'causeCode':_0xbc7e68[_0x53b4b8(0x1a5)],'causeMessage':_0xbc7e68[_0x53b4b8(0x1ff)]};}export function hasFlag(_0x378a16,_0x530621){const _0x5327c0=a125_0x1190ac;return Object[_0x5327c0(0x1d7)]['hasOwnProperty']['call'](_0x378a16[_0x5327c0(0x1ca)],_0x530621)&&_0x378a16[_0x5327c0(0x1ca)][_0x530621]!==undefined;}export function toApiParentId(_0xcc030c){return _0xcc030c??0x0;}export function formatParent(_0x1d9e4b){return _0x1d9e4b==null?'root':String(_0x1d9e4b);}export function menuError(_0x41c4fd,_0x421ad8,_0x488a5c){return new CliError(_0x41c4fd,0x1,_0x421ad8,_0x488a5c);}export function mapMenuApiError(_0x28db69,_0x62a031,_0x3b4588){const _0xcf29a5=a125_0x1190ac;if(_0x28db69 instanceof CliError&&_0x28db69[_0xcf29a5(0x1a5)]!==_0xcf29a5(0x1e9))return _0x28db69;const _0x1ebec4=_0x28db69 instanceof Error?_0x28db69[_0xcf29a5(0x1ff)]:String(_0x28db69);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0xcf29a5(0x1a8)](_0x1ebec4))return menuError(_0xcf29a5(0x1e8),'Permission\x20denied\x20while\x20attempting\x20to\x20'+_0x62a031+(_0x3b4588?_0xcf29a5(0x1ae)+_0x3b4588:'')+'.',_0xcf29a5(0x1a6));return menuError(_0xcf29a5(0x1ac),'Failed\x20to\x20'+_0x62a031+(_0x3b4588?_0xcf29a5(0x1ae)+_0x3b4588:'')+':\x20'+_0x1ebec4,_0xcf29a5(0x202));}export function isMenuResponseLoss(_0x21f581){const _0xb95a3=a125_0x1190ac,_0x16b429=_0x21f581 instanceof Error?_0x21f581[_0xb95a3(0x1ff)]:String(_0x21f581);if(_0x21f581 instanceof CliError)return _0x21f581[_0xb95a3(0x1a5)]===_0xb95a3(0x1e9)&&/^Request (?:failed|timeout):/i['test'](_0x16b429);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'](_0x16b429);}function stateDrift(_0x37a5ff){const _0x418a01=a125_0x1190ac;return menuError(_0x418a01(0x1c5),_0x37a5ff,_0x418a01(0x1bc));}function a125_0x2e1d(){const _0x100a95=['num','verification','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','folder','hash','menu_not_found','246Pzycfs','operation','deleteOrder','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','str','menu_state_drift','Reorder\x20sibling\x20menus\x20below\x20','40BOwAsW','dry-run','root','rawFlags','warnings','parent-id','filter','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','3243582zRKmAD','targets','expect-parent-id','cascade','data','isSafeInteger','538144zCFjwJ','toLowerCase','prototype','get','succeeded','\x22,\x20not\x20folder.','type','required','menu_verification_failed','planFile','23235LaKBxK','2163497UhxabE','10HjjmyL','89447ocYCGK','\x20path\x20changed:\x20expected\x20','cookie','bool','trim','dryRun','menu_permission_denied','api_error','expected-children-count','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20',',\x20current\x20','recheck\x20online\x20menu\x20facts\x20before\x20','flagMissing','snapshotHash','length','stringify','before','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','backend','Online\x20menu\x20not\x20found:\x20','selector','sort','menu_parent_not_folder','392064yZMMXQ',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','stage','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','expect-path','message','validation','unknown','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','1742624UTjgmD','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','failed','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','error','Online\x20menu\x20state\x20changed\x20before\x20','plannedActions','number','yes','pre-write-recheck','code','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','test','hint','path','appCode','menu_mutation_failed','after','\x20menu\x20','defineProperty','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','Menu\x20','\x20is\x20type\x20\x22','parentId','Exact\x20online\x20menu\x20id','childrenCount','Cannot\x20append\x20a\x20','menu_sort_overflow','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.'];a125_0x2e1d=function(){return _0x100a95;};return a125_0x2e1d();}
|
|
1
|
+
const a125_0xc6b8a0=a125_0x399c;(function(_0x140d89,_0x72304f){const _0x310c65=a125_0x399c,_0x225226=_0x140d89();while(!![]){try{const _0x54326f=-parseInt(_0x310c65(0x11d))/0x1*(parseInt(_0x310c65(0x153))/0x2)+-parseInt(_0x310c65(0x137))/0x3*(parseInt(_0x310c65(0x126))/0x4)+-parseInt(_0x310c65(0x132))/0x5+-parseInt(_0x310c65(0x14c))/0x6+parseInt(_0x310c65(0x134))/0x7*(-parseInt(_0x310c65(0x13b))/0x8)+-parseInt(_0x310c65(0x14f))/0x9*(parseInt(_0x310c65(0x152))/0xa)+-parseInt(_0x310c65(0x167))/0xb*(-parseInt(_0x310c65(0x146))/0xc);if(_0x54326f===_0x72304f)break;else _0x225226['push'](_0x225226['shift']());}catch(_0xf838fc){_0x225226['push'](_0x225226['shift']());}}}(a125_0x3b5f,0x60b0a));function a125_0x399c(_0xb8a1c4,_0x1b4453){_0xb8a1c4=_0xb8a1c4-0x114;const _0x3b5f64=a125_0x3b5f();let _0x399c49=_0x3b5f64[_0xb8a1c4];return _0x399c49;}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':a125_0xc6b8a0(0x11b),'required':!![],'description':a125_0xc6b8a0(0x169)};export const MENU_SORT_FLAG={'name':a125_0xc6b8a0(0x120),'type':'number','description':a125_0xc6b8a0(0x149)};export const MENU_PARENT_ID_FLAG={'name':a125_0xc6b8a0(0x156),'type':a125_0xc6b8a0(0x11f),'description':a125_0xc6b8a0(0x128)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a125_0xc6b8a0(0x12e),'type':'string','description':'Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level'};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a125_0xc6b8a0(0x144),'type':a125_0xc6b8a0(0x11f),'description':a125_0xc6b8a0(0x13c)},{'name':a125_0xc6b8a0(0x14e),'type':'number','description':a125_0xc6b8a0(0x13f)}];export function validateExactId(_0x5be7aa){const _0x865b79=a125_0xc6b8a0,_0x340de7=_0x5be7aa['num']('id');if(!Number['isSafeInteger'](_0x340de7)||_0x340de7<=0x0)throw CliErrors[_0x865b79(0x12c)](_0x865b79(0x139));return _0x340de7;}export function validateSort(_0x4d5cff,_0x2e9c7a='sort'){const _0x11b2d8=a125_0xc6b8a0;if(!hasFlag(_0x4d5cff,_0x2e9c7a))return undefined;const _0x3b994b=_0x4d5cff['num'](_0x2e9c7a);if(!Number[_0x11b2d8(0x135)](_0x3b994b)||_0x3b994b<0x0||_0x3b994b>MAX_MENU_SORT)throw menuError(_0x11b2d8(0x16a),'--'+_0x2e9c7a+_0x11b2d8(0x176)+MAX_MENU_SORT+'.',_0x11b2d8(0x175));return _0x3b994b;}export function nextSiblingSort(_0x1322b8,_0x2cabd0,_0x51de9a){const _0x455e7a=a125_0xc6b8a0,_0x32784b=getChildren(_0x1322b8,_0x2cabd0)[_0x455e7a(0x16b)](_0x27c144=>_0x27c144[_0x455e7a(0x120)])[_0x455e7a(0x12f)](_0xed89d7=>typeof _0xed89d7===_0x455e7a(0x11b));if(_0x32784b[_0x455e7a(0x15d)]===0x0)return 0x0;const _0x43d562=Math['max'](..._0x32784b);if(_0x43d562>=MAX_MENU_SORT)throw menuError(_0x455e7a(0x142),_0x455e7a(0x16f)+_0x51de9a+_0x455e7a(0x141)+_0x43d562+'.',_0x455e7a(0x154)+MAX_MENU_SORT+_0x455e7a(0x138));return _0x43d562+0x1;}export function requireExplicitYes(_0x27c616){const _0xb0cbaf=a125_0xc6b8a0;if(_0x27c616[_0xb0cbaf(0x166)]('dry-run'))return;if(!_0x27c616[_0xb0cbaf(0x166)](_0xb0cbaf(0x159)))throw menuError(_0xb0cbaf(0x179),_0xb0cbaf(0x12a),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export async function fetchMutationSnapshot(_0x18ea6d,_0x97d5bc,_0x92184f){const _0x1073b8=a125_0xc6b8a0;try{return await fetchMenuSnapshot(_0x18ea6d['appCode'],_0x18ea6d[_0x1073b8(0x155)]);}catch(_0x67ad14){throw mapMenuApiError(_0x67ad14,'read\x20online\x20menu\x20facts\x20before\x20'+_0x97d5bc,_0x92184f);}}export async function recheckMutationSnapshot(_0x2fd8d1,_0x1f2b19,_0x1a4940,_0x8f48b2){const _0x29fdac=a125_0xc6b8a0;let _0x5493d9;try{_0x5493d9=await fetchMenuSnapshot(_0x2fd8d1[_0x29fdac(0x168)],_0x2fd8d1[_0x29fdac(0x155)]);}catch(_0x42942f){const _0x58a205=mapMenuApiError(_0x42942f,_0x29fdac(0x150)+_0x1a4940,_0x8f48b2);throw menuFailure(_0x58a205,_0x1f2b19,{'stage':_0x29fdac(0x14b),'failed':_0x8f48b2==null?{}:{'id':_0x8f48b2}});}if(_0x5493d9['hash']!==_0x1f2b19[_0x29fdac(0x115)]){const _0x17a67e=menuError(_0x29fdac(0x13a),'Online\x20menu\x20state\x20changed\x20before\x20'+_0x1a4940+_0x29fdac(0x140),_0x29fdac(0x125));throw menuFailure(_0x17a67e,_0x1f2b19,{'stage':'pre-write-recheck','failed':{..._0x8f48b2==null?{}:{'id':_0x8f48b2},'expectedSnapshotHash':_0x1f2b19[_0x29fdac(0x115)],'currentSnapshotHash':_0x5493d9[_0x29fdac(0x12d)]}});}return _0x5493d9;}export function parseParentId(_0x5b3b22,_0x5d8576,_0x337f98={}){const _0x40f36e=a125_0xc6b8a0;if(!hasFlag(_0x5b3b22,_0x5d8576)){if(_0x337f98[_0x40f36e(0x15a)])throw CliErrors['flagMissing'](_0x5d8576);return undefined;}const _0xe47e59=_0x5b3b22[_0x40f36e(0x15b)](_0x5d8576)['trim']();if(_0xe47e59[_0x40f36e(0x171)]()==='root')return null;if(!/^\d+$/[_0x40f36e(0x15f)](_0xe47e59))throw CliErrors[_0x40f36e(0x12c)]('--'+_0x5d8576+_0x40f36e(0x165));const _0x497584=Number(_0xe47e59);if(!Number[_0x40f36e(0x135)](_0x497584)||_0x497584<=0x0)throw CliErrors[_0x40f36e(0x12c)]('--'+_0x5d8576+'\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.');return _0x497584;}export function requireMenu(_0x24d634,_0x1f4a16){const _0x4bdfd9=a125_0xc6b8a0,_0x2ae38b=_0x24d634[_0x4bdfd9(0x123)][_0x4bdfd9(0x11a)](_0x1f4a16);if(!_0x2ae38b)throw menuError(_0x4bdfd9(0x178),_0x4bdfd9(0x16c)+_0x1f4a16,'Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.');return _0x2ae38b;}export function requireFolder(_0x1b075f,_0x2b3fe4){const _0x12f678=a125_0xc6b8a0,_0x19bd36=requireMenu(_0x1b075f,_0x2b3fe4);if(_0x19bd36['type']!==_0x12f678(0x131))throw menuError(_0x12f678(0x15e),'Menu\x20'+_0x2b3fe4+_0x12f678(0x17b)+(_0x19bd36[_0x12f678(0x14a)]||'unknown')+_0x12f678(0x157),_0x12f678(0x158));return _0x19bd36;}export function assertExpectedState(_0x974658,_0x475199){const _0x17ac1b=a125_0xc6b8a0;if(hasFlag(_0x974658,_0x17ac1b(0x12e))){const _0x35f84f=parseParentId(_0x974658,_0x17ac1b(0x12e),{'required':!![]});if(_0x475199[_0x17ac1b(0x147)]!==_0x35f84f)throw stateDrift(_0x17ac1b(0x17d)+_0x475199['id']+_0x17ac1b(0x119)+formatParent(_0x35f84f)+_0x17ac1b(0x130)+formatParent(_0x475199[_0x17ac1b(0x147)])+'.');}if(hasFlag(_0x974658,_0x17ac1b(0x144))){const _0x54aa44=_0x974658[_0x17ac1b(0x15b)](_0x17ac1b(0x144));if(_0x475199['path']!==_0x54aa44)throw stateDrift(_0x17ac1b(0x17d)+_0x475199['id']+_0x17ac1b(0x122)+JSON[_0x17ac1b(0x136)](_0x54aa44)+_0x17ac1b(0x130)+JSON[_0x17ac1b(0x136)](_0x475199[_0x17ac1b(0x133)])+'.');}if(hasFlag(_0x974658,_0x17ac1b(0x14e))){const _0x41feb1=_0x974658['num']('expected-children-count');if(!Number[_0x17ac1b(0x135)](_0x41feb1)||_0x41feb1<0x0)throw CliErrors[_0x17ac1b(0x12c)]('--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x475199['childrenCount']!==_0x41feb1)throw stateDrift('Menu\x20'+_0x475199['id']+_0x17ac1b(0x161)+_0x41feb1+_0x17ac1b(0x130)+_0x475199[_0x17ac1b(0x145)]+'.');}}function a125_0x3b5f(){const _0x125965=['\x20is\x20type\x20\x22','code','Menu\x20','after','snapshotHash','prototype','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','before','\x20parent\x20changed:\x20expected\x20','get','number','api_error','2NRGeIo','rawFlags','string','sort','hasOwnProperty','\x20path\x20changed:\x20expected\x20','byId','operation','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','4xAmYDa','call','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','planFile','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','validation','hash','expect-parent-id','filter',',\x20current\x20','folder','3620920cRKPBi','path','35VCHiig','isSafeInteger','stringify','756987hHrnAC',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','menu_state_drift','1059272Syrlip','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','menu_verification_failed','stage','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','menu_sort_overflow','verification','expect-path','childrenCount','4188cPekoF','parentId','backend','Sibling\x20sort\x20value\x20(non-negative\x20integer)','type','pre-write-recheck','3987804eAkxgF','hint','expected-children-count','9csfboc','recheck\x20online\x20menu\x20facts\x20before\x20','plannedActions','2025910QWxKCy','16862zLSOcz','Reorder\x20sibling\x20menus\x20below\x20','cookie','parent-id','\x22,\x20not\x20folder.','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','yes','required','str','targets','length','menu_parent_not_folder','test','message','\x20child\x20count\x20changed:\x20expected\x20','menu_mutation_failed','selector','failed','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','bool','91993lePzCl','appCode','Exact\x20online\x20menu\x20id','menu_sort_invalid','map','Online\x20menu\x20not\x20found:\x20','\x20menu\x20','Failed\x20to\x20','Cannot\x20append\x20a\x20','menu_permission_denied','toLowerCase','warnings','succeeded','data','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','deleteOrder','menu_not_found','menu_confirmation_required','dryRun'];a125_0x3b5f=function(){return _0x125965;};return a125_0x3b5f();}export function assertVerified(_0x38c28b,_0x2850a1,_0x32d969='Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.'){const _0x549868=a125_0xc6b8a0;if(!_0x38c28b)throw menuError(_0x549868(0x13d),_0x2850a1,_0x32d969);}export function mutationResult(_0x18bcdd){const _0x39dfa3=a125_0xc6b8a0;return{'operation':_0x18bcdd[_0x39dfa3(0x124)],'selector':_0x18bcdd[_0x39dfa3(0x163)],'before':_0x18bcdd[_0x39dfa3(0x118)],'after':_0x18bcdd[_0x39dfa3(0x114)],'dryRun':_0x18bcdd[_0x39dfa3(0x17a)],'backend':_0x18bcdd[_0x39dfa3(0x148)],..._0x18bcdd['plannedActions']?{'plannedActions':_0x18bcdd[_0x39dfa3(0x151)]}:{},..._0x18bcdd[_0x39dfa3(0x15c)]?{'targets':_0x18bcdd[_0x39dfa3(0x15c)]}:{},..._0x18bcdd[_0x39dfa3(0x177)]?{'deleteOrder':_0x18bcdd[_0x39dfa3(0x177)]}:{},'snapshotHash':_0x18bcdd['snapshotHash'],..._0x18bcdd['cascade']?{'cascade':_0x18bcdd['cascade']}:{},..._0x18bcdd[_0x39dfa3(0x129)]?{'planFile':_0x18bcdd[_0x39dfa3(0x129)]}:{},'succeeded':_0x18bcdd[_0x39dfa3(0x173)]??[],'failed':_0x18bcdd[_0x39dfa3(0x164)]??[],'warnings':_0x18bcdd['warnings']??[],'verification':_0x18bcdd[_0x39dfa3(0x143)],'error':_0x18bcdd['error']};}export function menuDryRunResult(_0x3857cb,_0x38c388){return{..._0x3857cb,..._0x38c388};}export function menuFailure(_0xfac9b5,_0x57e43d,_0xcd152f){const _0x5d56ed=a125_0xc6b8a0,_0x2aa509=mutationResult({..._0x57e43d,'after':_0xcd152f[_0x5d56ed(0x114)]===undefined?_0x57e43d[_0x5d56ed(0x114)]:_0xcd152f[_0x5d56ed(0x114)],'backend':_0xcd152f[_0x5d56ed(0x148)]??_0x57e43d[_0x5d56ed(0x148)],'dryRun':![],'succeeded':_0xcd152f[_0x5d56ed(0x173)]??[],'failed':[{..._0xcd152f['failed']??{},'stage':_0xcd152f[_0x5d56ed(0x13e)],'code':_0xfac9b5[_0x5d56ed(0x17c)],'message':_0xfac9b5[_0x5d56ed(0x160)]}],'warnings':[..._0x57e43d[_0x5d56ed(0x172)],..._0xcd152f[_0x5d56ed(0x172)]??[]],'verification':_0xcd152f[_0x5d56ed(0x143)],'error':{'code':_0xfac9b5[_0x5d56ed(0x17c)],'message':_0xfac9b5[_0x5d56ed(0x160)],..._0xfac9b5[_0x5d56ed(0x14d)]?{'hint':_0xfac9b5[_0x5d56ed(0x14d)]}:{}}});return Object['defineProperty'](_0xfac9b5,_0x5d56ed(0x174),{'value':_0x2aa509,'enumerable':!![],'configurable':!![]}),_0xfac9b5;}export function asVerificationError(_0x3f4547,_0x2ed9c5){const _0x24f46a=a125_0xc6b8a0;if(_0x3f4547 instanceof CliError&&_0x3f4547[_0x24f46a(0x17c)]==='menu_verification_failed')return _0x3f4547;const _0x2a238a=_0x3f4547 instanceof Error?_0x3f4547[_0x24f46a(0x160)]:String(_0x3f4547);return menuError(_0x24f46a(0x13d),''+_0x2ed9c5+(_0x2a238a?':\x20'+_0x2a238a:''),_0x24f46a(0x12b));}export function describeMenuErrorCause(_0x3dea0b,_0x2c31b6,_0x1e7ccb){const _0x254d3b=a125_0xc6b8a0,_0x5e3486=mapMenuApiError(_0x3dea0b,_0x2c31b6,_0x1e7ccb);return{'causeCode':_0x5e3486[_0x254d3b(0x17c)],'causeMessage':_0x5e3486[_0x254d3b(0x160)]};}export function hasFlag(_0x16e35d,_0x47704a){const _0x3fe4d0=a125_0xc6b8a0;return Object[_0x3fe4d0(0x116)][_0x3fe4d0(0x121)][_0x3fe4d0(0x127)](_0x16e35d[_0x3fe4d0(0x11e)],_0x47704a)&&_0x16e35d['rawFlags'][_0x47704a]!==undefined;}export function toApiParentId(_0x1e4a5e){return _0x1e4a5e??0x0;}export function formatParent(_0x282cea){return _0x282cea==null?'root':String(_0x282cea);}export function menuError(_0x339d81,_0x18289e,_0x5b3bac){return new CliError(_0x339d81,0x1,_0x18289e,_0x5b3bac);}export function mapMenuApiError(_0x3dd79a,_0x421446,_0x53fe57){const _0x3151b5=a125_0xc6b8a0;if(_0x3dd79a instanceof CliError&&_0x3dd79a['code']!==_0x3151b5(0x11c))return _0x3dd79a;const _0x22a380=_0x3dd79a instanceof Error?_0x3dd79a[_0x3151b5(0x160)]:String(_0x3dd79a);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x3151b5(0x15f)](_0x22a380))return menuError(_0x3151b5(0x170),'Permission\x20denied\x20while\x20attempting\x20to\x20'+_0x421446+(_0x53fe57?_0x3151b5(0x16d)+_0x53fe57:'')+'.','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.');return menuError(_0x3151b5(0x162),_0x3151b5(0x16e)+_0x421446+(_0x53fe57?_0x3151b5(0x16d)+_0x53fe57:'')+':\x20'+_0x22a380,_0x3151b5(0x117));}export function isMenuResponseLoss(_0x2d37ad){const _0x4c133e=a125_0xc6b8a0,_0x43fb63=_0x2d37ad instanceof Error?_0x2d37ad[_0x4c133e(0x160)]:String(_0x2d37ad);if(_0x2d37ad instanceof CliError)return _0x2d37ad['code']===_0x4c133e(0x11c)&&/^Request (?:failed|timeout):/i[_0x4c133e(0x15f)](_0x43fb63);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x4c133e(0x15f)](_0x43fb63);}function stateDrift(_0x520376){return menuError('menu_state_drift',_0x520376,'Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.');}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AsyncTaskStatusRecord, MenuRegroupInput } from "../../../core/api-client.js";
|
|
2
|
+
import type { Menu, MenuMutationEntity, ProcessedMenuItem, UpdateMenu, UpdateMenuCdnUrlParams } from "../../../commands/menu/shared/types.js";
|
|
3
|
+
export declare function getOnlineMenuList(appCode: string, cookie: string): Promise<ProcessedMenuItem[]>;
|
|
4
|
+
export declare function createMenu(appCode: string, cookie: string, params: {
|
|
5
|
+
label: string;
|
|
6
|
+
path: string;
|
|
7
|
+
resources?: string[];
|
|
8
|
+
}): Promise<MenuMutationEntity>;
|
|
9
|
+
export declare function createMenus(appCode: string, cookie: string, pages: Array<{
|
|
10
|
+
path: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}>, resources?: string[]): Promise<MenuMutationEntity[]>;
|
|
13
|
+
export declare function updateMenuCdnUrl(appCode: string, cookie: string, params: UpdateMenuCdnUrlParams): Promise<MenuMutationEntity>;
|
|
14
|
+
export declare function createMenuEntity(appCode: string, cookie: string, params: Omit<Menu, "appCode">): Promise<MenuMutationEntity>;
|
|
15
|
+
export declare function updateMenuEntity(appCode: string, cookie: string, params: Omit<UpdateMenu, "appCode">): Promise<MenuMutationEntity>;
|
|
16
|
+
export declare function batchDeleteMenuEntities(cookie: string, ids: number[]): Promise<number>;
|
|
17
|
+
export declare function startMenuRegroup(cookie: string, input: MenuRegroupInput): Promise<AsyncTaskStatusRecord>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2893d5,_0x2290d1){const _0x29e75a=a126_0x3644,_0x140309=_0x2893d5();while(!![]){try{const _0x5c0da0=-parseInt(_0x29e75a(0x7b))/0x1+parseInt(_0x29e75a(0x7a))/0x2+-parseInt(_0x29e75a(0x75))/0x3+parseInt(_0x29e75a(0x77))/0x4*(parseInt(_0x29e75a(0x81))/0x5)+-parseInt(_0x29e75a(0x90))/0x6*(-parseInt(_0x29e75a(0x82))/0x7)+parseInt(_0x29e75a(0x99))/0x8*(-parseInt(_0x29e75a(0x88))/0x9)+parseInt(_0x29e75a(0x8b))/0xa*(parseInt(_0x29e75a(0x94))/0xb);if(_0x5c0da0===_0x2290d1)break;else _0x140309['push'](_0x140309['shift']());}catch(_0x5d83cb){_0x140309['push'](_0x140309['shift']());}}}(a126_0x3303,0x1f10d));import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a126_0x48f949,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x2f209b,_0x27b8cf){const _0x13998b=a126_0x3644,_0x3ab11c=getEnv();logger['info'](_0x13998b(0x7d),isProduction(_0x3ab11c)?_0x13998b(0x96)+_0x2f209b+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0x2f209b+')');const _0x549fe0=await fetchMenuSnapshot(_0x2f209b,_0x27b8cf,{'verbose':!![]});return logger['info'](_0x13998b(0x7d),_0x13998b(0x8f)+_0x549fe0['total']+_0x13998b(0x93)),_0x549fe0['menus'][_0x13998b(0x74)](toProcessedMenuItem);}export async function createMenu(_0x8c4db0,_0x1dfbca,_0x16b77c){const _0x5c0c60=a126_0x3644;logger[_0x5c0c60(0x8a)](_0x5c0c60(0x78),'Creating\x20menu:\x20'+_0x16b77c[_0x5c0c60(0x7c)]+'\x20('+_0x16b77c[_0x5c0c60(0x8c)]+')');const _0xe058ec={'appCode':_0x8c4db0,'type':_0x5c0c60(0x76),'sort':0x0,'extend':{'loadScriptMode':_0x5c0c60(0x92),'resources':_0x16b77c[_0x5c0c60(0x85)]?JSON['stringify'](_0x16b77c['resources']):undefined},..._0x16b77c},_0x9ab2f5=await createMenuRecord(_0xe058ec,_0x1dfbca,'Create\x20menu\x20\x22'+_0x16b77c[_0x5c0c60(0x7c)]+'\x22');return logger[_0x5c0c60(0x8a)](_0x5c0c60(0x78),_0x5c0c60(0x97)+_0x16b77c['label']),_0x9ab2f5;}function a126_0x3644(_0x1e6a78,_0x3df6ab){_0x1e6a78=_0x1e6a78-0x74;const _0x330334=a126_0x3303();let _0x36448f=_0x330334[_0x1e6a78];return _0x36448f;}async function createSingleMenu(_0x5494a7,_0x3a3222,_0x503c4d,_0x344ad3){const _0x140838=a126_0x3644,_0x41816f={'appCode':_0x5494a7,'type':_0x140838(0x76),'sort':0x0,'extend':{'loadScriptMode':_0x140838(0x92),'resources':_0x344ad3?JSON['stringify'](_0x344ad3):undefined},'label':_0x503c4d[_0x140838(0x7c)],'path':_0x503c4d[_0x140838(0x8c)]},_0x289530=await createMenuRecord(_0x41816f,_0x3a3222,_0x140838(0x79)+_0x503c4d['label']+'\x22');return logger[_0x140838(0x8a)](_0x140838(0x78),_0x140838(0x97)+_0x503c4d[_0x140838(0x7c)]),_0x289530;}export async function createMenus(_0x5a777a,_0x3b82af,_0x32ff96,_0x51c8c1){const _0x6cc1ae=a126_0x3644;logger[_0x6cc1ae(0x8a)](_0x6cc1ae(0x87),_0x6cc1ae(0x7f)+_0x32ff96[_0x6cc1ae(0x8d)]);const _0x5d839b=await Promise[_0x6cc1ae(0x80)](_0x32ff96[_0x6cc1ae(0x74)](_0x56960f=>createSingleMenu(_0x5a777a,_0x3b82af,_0x56960f,_0x51c8c1)));return logger[_0x6cc1ae(0x8a)](_0x6cc1ae(0x87),_0x6cc1ae(0x91)+_0x32ff96[_0x6cc1ae(0x8d)]),_0x5d839b;}export async function updateMenuCdnUrl(_0x3d3b28,_0x1fb21f,_0x3981fb){const _0x30d754=a126_0x3644;logger['info'](_0x30d754(0x86),_0x30d754(0x7e)+_0x3981fb[_0x30d754(0x7c)]+'\x20('+_0x3981fb[_0x30d754(0x8c)]+')');const _0x4322cd={'id':_0x3981fb['id'],'appCode':_0x3d3b28,'extend':{..._0x3981fb['extend']??{},..._0x3981fb[_0x30d754(0x83)]?{'loadScriptMode':_0x3981fb[_0x30d754(0x83)]}:{},'resources':_0x3981fb[_0x30d754(0x85)]?JSON[_0x30d754(0x89)](_0x3981fb[_0x30d754(0x85)]):undefined}},_0x2faaf2=await updateMenuRecord(_0x4322cd,_0x1fb21f,'Update\x20menu\x20assets\x20\x22'+_0x3981fb[_0x30d754(0x7c)]+'\x22');return logger[_0x30d754(0x8a)](_0x30d754(0x86),_0x30d754(0x8e)+_0x3981fb[_0x30d754(0x7c)],undefined),_0x2faaf2;}export async function createMenuEntity(_0x4f28ae,_0x1fd491,_0x12e632){const _0x4aaaa2=a126_0x3644;return createMenuRecord({'appCode':_0x4f28ae,..._0x12e632},_0x1fd491,'Create\x20menu\x20\x22'+_0x12e632[_0x4aaaa2(0x7c)]+'\x22');}export async function updateMenuEntity(_0x2a9808,_0x59382b,_0x2f725f){const _0x2976c2=a126_0x3644;return updateMenuRecord({'appCode':_0x2a9808,..._0x2f725f},_0x59382b,_0x2976c2(0x84)+_0x2f725f['id']);}export async function batchDeleteMenuEntities(_0x509a17,_0x51c128){const _0x45a282=a126_0x3644;return batchDeleteMenuRecords(_0x51c128,_0x509a17,'Delete\x20'+_0x51c128[_0x45a282(0x8d)]+_0x45a282(0x98)+(_0x51c128[_0x45a282(0x8d)]===0x1?'':'s'));}export async function startMenuRegroup(_0x3d23f9,_0x18a837){const _0x2ab5f7=a126_0x3644;return a126_0x48f949(_0x18a837,_0x3d23f9,_0x2ab5f7(0x95)+_0x18a837['menuGroups'][_0x2ab5f7(0x8d)]+'\x20menu\x20group(s)');}function a126_0x3303(){const _0x3fb430=['Update\x20menu\x20','resources','update-menu-cdn-url','create-menus','297LBtwzp','stringify','info','9930jXpEdx','path','length','Menu\x20assets\x20synced:\x20','Fetched\x20','329298LRAFnp','Batch\x20menu\x20creation\x20completed,\x20total\x20','import','\x20online\x20menus\x20successfully','2717yYnZEZ','Regroup\x20','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','Menu\x20created\x20successfully:\x20','\x20menu','52344KxAXSU','map','297303CovIQA','procode','12TRJWhL','create-menu','Create\x20menu\x20\x22','181012HHzfPW','99514zUKpFm','label','get-online-menu-list','Updating\x20menu\x20asset\x20links:\x20','Start\x20batch\x20menu\x20creation,\x20total\x20','all','251865UFCQdU','7prFZzH','loadScriptMode'];a126_0x3303=function(){return _0x3fb430;};return a126_0x3303();}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { MenuSyncParams, SyncResult } from "../../../commands/menu/shared/types.js";
|
|
2
|
+
interface MenuSyncOptions {
|
|
3
|
+
dryRun?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function runMenuSyncCore(appCode: string, cookie: string, selectedPaths?: string[], paramsFlag?: string, options?: MenuSyncOptions): Promise<SyncResult>;
|
|
6
|
+
export declare function parseMenuSyncParams(paramsFlag: unknown): MenuSyncParams;
|
|
7
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a127_0x46e140=a127_0x39c6;function a127_0x39c6(_0xa54122,_0x13614a){_0xa54122=_0xa54122-0x145;const _0x13f152=a127_0x13f1();let _0x39c628=_0x13f152[_0xa54122];return _0x39c628;}(function(_0x267fcf,_0xf211cb){const _0x4fc045=a127_0x39c6,_0xc12e9=_0x267fcf();while(!![]){try{const _0x39cbff=-parseInt(_0x4fc045(0x14e))/0x1*(parseInt(_0x4fc045(0x166))/0x2)+parseInt(_0x4fc045(0x161))/0x3*(parseInt(_0x4fc045(0x16b))/0x4)+parseInt(_0x4fc045(0x15d))/0x5*(-parseInt(_0x4fc045(0x155))/0x6)+-parseInt(_0x4fc045(0x15e))/0x7+-parseInt(_0x4fc045(0x164))/0x8*(-parseInt(_0x4fc045(0x15a))/0x9)+parseInt(_0x4fc045(0x148))/0xa+parseInt(_0x4fc045(0x174))/0xb;if(_0x39cbff===_0xf211cb)break;else _0xc12e9['push'](_0xc12e9['shift']());}catch(_0x1b515b){_0xc12e9['push'](_0xc12e9['shift']());}}}(a127_0x13f1,0xa3a02));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a127_0x13f1(){const _0x1e5ba9=['CSS\x20URL\x20is\x20unreachable:\x20','push','1CnjYRv','map','message','string','Invalid\x20--params:\x20','filter','keys','362244fTnqte','dryRun','field','Invalid\x20--params\x20JSON.','Invalid\x20--params.','9rvNQbq','Start\x20non-interactive\x20menu\x20sync','isArray','110VPjanM','4872651cdpWxG','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','jsUrl','2073DWfMvV','cssUrl','join','10104152fSKPHj','\x0a\x20\x20Available\x20local\x20paths:\x20','1445638ednVsf','info','get','label','import','5268FwqVdj','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','setLogPath','trim','length','Invalid\x20--params\x20fields:\x20',':\x20expected\x20a\x20non-empty\x20string.','path','cwd','7923685TYLLWD','has','Menu\x20sync\x20completed','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','5239490ktIOse','JS\x20URL\x20is\x20unreachable:\x20','menu-sync','No\x20local\x20pages\x20matched\x20paths:\x20'];a127_0x13f1=function(){return _0x1e5ba9;};return a127_0x13f1();}import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a127_0x46e140(0x160),a127_0x46e140(0x162)]);function validateParams(_0x45e02f){const _0x41fdf0=a127_0x46e140,_0x4e00ae=[];return _0x45e02f['jsUrl']&&!isValidJsHttpsUrl(_0x45e02f[_0x41fdf0(0x160)])&&_0x4e00ae[_0x41fdf0(0x14d)]({'field':_0x41fdf0(0x160),'message':_0x41fdf0(0x147)}),_0x45e02f[_0x41fdf0(0x162)]&&!isValidCssHttpsUrl(_0x45e02f[_0x41fdf0(0x162)])&&_0x4e00ae[_0x41fdf0(0x14d)]({'field':_0x41fdf0(0x162),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x4e00ae;}export async function runMenuSyncCore(_0x9cc9b1,_0x163620,_0x38258b=[],_0x298a5d,_0x2a08f7={}){const _0x279b98=a127_0x46e140,_0x30016a=parseMenuSyncParams(_0x298a5d),_0x7f2af5=[...new Set(_0x38258b[_0x279b98(0x14f)](_0x530c27=>_0x530c27[_0x279b98(0x16e)]())[_0x279b98(0x153)](Boolean))],_0x2edeab=_0x30016a[_0x279b98(0x160)],_0x243403=_0x30016a[_0x279b98(0x162)],_0x1b8db0=[];if(_0x2edeab)_0x1b8db0[_0x279b98(0x14d)](_0x2edeab);if(_0x243403)_0x1b8db0[_0x279b98(0x14d)](_0x243403);const _0x54eb6a=validateParams(_0x30016a);if(_0x54eb6a[_0x279b98(0x16f)]>0x0){const _0x1dc3d0=_0x54eb6a['map'](_0x366d09=>'--params.'+_0x366d09[_0x279b98(0x157)]+':\x20'+_0x366d09[_0x279b98(0x150)])[_0x279b98(0x163)](';\x20');throw new Error(_0x279b98(0x152)+_0x1dc3d0);}logger[_0x279b98(0x16d)](process[_0x279b98(0x173)]()),logger[_0x279b98(0x167)]('menu-sync',_0x279b98(0x15b),{'appCode':_0x9cc9b1,'selectedCount':_0x7f2af5[_0x279b98(0x16f)],'jsUrl':_0x2edeab,'cssUrl':_0x243403});if(_0x2edeab){const _0x321137=await isUrlReachable(_0x2edeab);if(!_0x321137)throw new Error(_0x279b98(0x149)+_0x2edeab);}if(_0x243403){const _0x5e4a4f=await isUrlReachable(_0x243403);if(!_0x5e4a4f)throw new Error(_0x279b98(0x14c)+_0x243403);}const _0x17ff40=getLocalPages();if(_0x17ff40[_0x279b98(0x16f)]===0x0){if(_0x7f2af5[_0x279b98(0x16f)]>0x0)throw new Error(_0x279b98(0x14b)+_0x7f2af5[_0x279b98(0x163)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x2a08f7[_0x279b98(0x156)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x53c39f=await getOnlineMenuList(_0x9cc9b1,_0x163620),_0x177951=new Set(_0x53c39f[_0x279b98(0x14f)](_0x182fdb=>_0x182fdb['path']));let _0x304a2c;if(_0x7f2af5[_0x279b98(0x16f)]>0x0){const _0x1e1589=new Map(_0x17ff40[_0x279b98(0x14f)](_0x4f6a14=>[_0x4f6a14['path'],_0x4f6a14])),_0x586950=_0x7f2af5[_0x279b98(0x153)](_0x11c2d4=>!_0x1e1589[_0x279b98(0x145)](_0x11c2d4));if(_0x586950['length']>0x0){const _0x7c2e51=_0x17ff40[_0x279b98(0x14f)](_0x5c2fac=>_0x5c2fac[_0x279b98(0x172)])[_0x279b98(0x163)](',\x20');throw new Error(_0x279b98(0x14b)+_0x586950[_0x279b98(0x163)](',\x20')+_0x279b98(0x165)+_0x7c2e51);}const _0x253a5a=_0x7f2af5[_0x279b98(0x153)](_0x1ad318=>_0x177951['has'](_0x1ad318));if(_0x253a5a[_0x279b98(0x16f)]>0x0)throw new Error(_0x279b98(0x16c)+_0x253a5a[_0x279b98(0x163)](',\x20'));_0x304a2c=_0x7f2af5[_0x279b98(0x14f)](_0x328d74=>_0x1e1589[_0x279b98(0x168)](_0x328d74));}else _0x304a2c=_0x17ff40[_0x279b98(0x153)](_0x7e16af=>!_0x177951['has'](_0x7e16af[_0x279b98(0x172)]));if(_0x304a2c['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x2a08f7[_0x279b98(0x156)]===!![],'targetPages':[],'plannedMenus':[]};const _0x327bf3=_0x304a2c['map'](_0x7628c6=>({'type':'procode','path':_0x7628c6[_0x279b98(0x172)],'label':_0x7628c6[_0x279b98(0x169)],'loadScriptMode':_0x279b98(0x16a),'resources':[..._0x1b8db0]}));if(_0x2a08f7[_0x279b98(0x156)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x304a2c,'plannedMenus':_0x327bf3};const _0x3dae38=await createMenus(_0x9cc9b1,_0x163620,_0x304a2c,_0x1b8db0[_0x279b98(0x16f)]>0x0?_0x1b8db0:undefined);return logger[_0x279b98(0x167)](_0x279b98(0x14a),_0x279b98(0x146),{'count':_0x304a2c[_0x279b98(0x16f)],'resources':_0x1b8db0}),{'created':_0x3dae38[_0x279b98(0x16f)],'skipped':![],'dryRun':![],'targetPages':_0x304a2c,'plannedMenus':_0x327bf3,'menus':_0x3dae38};}export function parseMenuSyncParams(_0xa42637){const _0x5855a9=a127_0x46e140;if(!_0xa42637||typeof _0xa42637!==_0x5855a9(0x151))return{};let _0x2a817e;try{_0x2a817e=JSON['parse'](_0xa42637);}catch{throw new Error(_0x5855a9(0x158));}if(typeof _0x2a817e!=='object'||_0x2a817e===null||Array[_0x5855a9(0x15c)](_0x2a817e))throw new Error(_0x5855a9(0x15f));const _0xeb55f9=_0x2a817e;if(Object['hasOwn'](_0xeb55f9,'pages'))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x5bcaf6=Object[_0x5855a9(0x154)](_0xeb55f9)[_0x5855a9(0x153)](_0x2fd7e5=>!MENU_SYNC_PARAM_KEYS['has'](_0x2fd7e5));if(_0x5bcaf6[_0x5855a9(0x16f)]>0x0)throw new Error(_0x5855a9(0x170)+_0x5bcaf6['join'](',\x20')+'.');for(const _0x306923 of MENU_SYNC_PARAM_KEYS){const _0x5020cb=_0xeb55f9[_0x306923];if(_0x5020cb!==undefined&&(typeof _0x5020cb!==_0x5855a9(0x151)||_0x5020cb['trim']()===''))throw new Error(_0x5855a9(0x159)+_0x306923+_0x5855a9(0x171));}return{'jsUrl':typeof _0xeb55f9['jsUrl']===_0x5855a9(0x151)?_0xeb55f9['jsUrl'][_0x5855a9(0x16e)]():undefined,'cssUrl':typeof _0xeb55f9['cssUrl']==='string'?_0xeb55f9[_0x5855a9(0x162)][_0x5855a9(0x16e)]():undefined};}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* menu shared types
|
|
3
|
+
*/
|
|
4
|
+
import type { MenuCreateRecordInput, MenuMutationRecord, MenuTreeRecord, MenuUpdateRecordInput } from "../../../core/api-client.js";
|
|
5
|
+
export type Menu = MenuCreateRecordInput;
|
|
6
|
+
export type OriginalMenuItem = MenuTreeRecord;
|
|
7
|
+
export type UpdateMenu = MenuUpdateRecordInput;
|
|
8
|
+
export type MenuMutationEntity = MenuMutationRecord;
|
|
9
|
+
export interface UpdateMenuCdnUrlParams {
|
|
10
|
+
id: number;
|
|
11
|
+
label: string;
|
|
12
|
+
path: string;
|
|
13
|
+
resources?: string[];
|
|
14
|
+
extend?: Record<string, unknown> | null;
|
|
15
|
+
loadScriptMode?: MenuLoadScriptMode;
|
|
16
|
+
}
|
|
17
|
+
export interface LocalPage {
|
|
18
|
+
path: string;
|
|
19
|
+
label: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ProcessedMenuItem {
|
|
22
|
+
id: number;
|
|
23
|
+
path: string;
|
|
24
|
+
label: string;
|
|
25
|
+
resources: string[];
|
|
26
|
+
extend?: Record<string, unknown> | null;
|
|
27
|
+
}
|
|
28
|
+
export interface MenuFact {
|
|
29
|
+
id: number;
|
|
30
|
+
parentId: number | null;
|
|
31
|
+
depth: number;
|
|
32
|
+
label: string;
|
|
33
|
+
path: string;
|
|
34
|
+
url: string;
|
|
35
|
+
type: string;
|
|
36
|
+
visible: boolean | null;
|
|
37
|
+
sort: number | null;
|
|
38
|
+
resources: string[];
|
|
39
|
+
resourcesValid: boolean;
|
|
40
|
+
childrenIds: number[];
|
|
41
|
+
childrenCount: number;
|
|
42
|
+
pageId: number | null;
|
|
43
|
+
pageType: string;
|
|
44
|
+
modelType: string;
|
|
45
|
+
datasetId: number | null;
|
|
46
|
+
datasetCode: string;
|
|
47
|
+
updateUserId: string | null;
|
|
48
|
+
updateUserName: string | null;
|
|
49
|
+
updateTime: string | number | null;
|
|
50
|
+
extend?: Record<string, unknown> | null;
|
|
51
|
+
}
|
|
52
|
+
export type MenuListItem = Omit<MenuFact, "modelType" | "datasetId" | "datasetCode" | "resourcesValid">;
|
|
53
|
+
export interface MenuSnapshot {
|
|
54
|
+
total: number;
|
|
55
|
+
hash: string;
|
|
56
|
+
menus: MenuFact[];
|
|
57
|
+
byId: Map<number, MenuFact>;
|
|
58
|
+
}
|
|
59
|
+
export interface MenuMutationError {
|
|
60
|
+
code: string;
|
|
61
|
+
message: string;
|
|
62
|
+
hint?: string;
|
|
63
|
+
}
|
|
64
|
+
export interface MenuMutationResult {
|
|
65
|
+
operation: string;
|
|
66
|
+
selector: Record<string, unknown>;
|
|
67
|
+
before: MenuFact | Record<string, unknown> | null;
|
|
68
|
+
after: MenuFact | Record<string, unknown> | null;
|
|
69
|
+
dryRun: boolean;
|
|
70
|
+
backend: Array<{
|
|
71
|
+
method: "POST";
|
|
72
|
+
path: string;
|
|
73
|
+
}>;
|
|
74
|
+
plannedActions?: Array<{
|
|
75
|
+
stage: string;
|
|
76
|
+
method: "POST";
|
|
77
|
+
path: string;
|
|
78
|
+
body: Record<string, unknown>;
|
|
79
|
+
condition?: string;
|
|
80
|
+
}>;
|
|
81
|
+
targets?: MenuFact[];
|
|
82
|
+
deleteOrder?: number[];
|
|
83
|
+
snapshotHash: string;
|
|
84
|
+
cascade?: {
|
|
85
|
+
pages: number[];
|
|
86
|
+
pageSchemaAffected: boolean;
|
|
87
|
+
};
|
|
88
|
+
planFile?: {
|
|
89
|
+
path: string;
|
|
90
|
+
createdAt: string;
|
|
91
|
+
expiresAt: string;
|
|
92
|
+
};
|
|
93
|
+
succeeded: Array<Record<string, unknown>>;
|
|
94
|
+
failed: Array<Record<string, unknown>>;
|
|
95
|
+
warnings: string[];
|
|
96
|
+
verification?: Record<string, unknown>;
|
|
97
|
+
error?: MenuMutationError;
|
|
98
|
+
}
|
|
99
|
+
export interface MenuSyncParams {
|
|
100
|
+
jsUrl?: string;
|
|
101
|
+
cssUrl?: string;
|
|
102
|
+
}
|
|
103
|
+
export interface MenuUpdateParams {
|
|
104
|
+
jsUrl?: string;
|
|
105
|
+
cssUrl?: string;
|
|
106
|
+
}
|
|
107
|
+
export type MenuUpdateMode = "replace" | "patch";
|
|
108
|
+
export type MenuLoadScriptMode = "import" | "script" | "fetch";
|
|
109
|
+
export interface MenuUpdateSelection {
|
|
110
|
+
all: boolean;
|
|
111
|
+
menuIds: number[];
|
|
112
|
+
paths: string[];
|
|
113
|
+
}
|
|
114
|
+
export interface MenuUpdateDiff {
|
|
115
|
+
id: number;
|
|
116
|
+
label: string;
|
|
117
|
+
path: string;
|
|
118
|
+
mode: MenuUpdateMode;
|
|
119
|
+
before: {
|
|
120
|
+
resources: string[];
|
|
121
|
+
loadScriptMode?: string | null;
|
|
122
|
+
};
|
|
123
|
+
after: {
|
|
124
|
+
resources: string[];
|
|
125
|
+
loadScriptMode?: string | null;
|
|
126
|
+
};
|
|
127
|
+
warnings: string[];
|
|
128
|
+
}
|
|
129
|
+
export interface MenuSyncResult {
|
|
130
|
+
created: number;
|
|
131
|
+
failed: number;
|
|
132
|
+
labels: string[];
|
|
133
|
+
}
|
|
134
|
+
export interface MenuUpdateResult {
|
|
135
|
+
updated: number;
|
|
136
|
+
failed: number;
|
|
137
|
+
}
|
|
138
|
+
export interface SyncResult {
|
|
139
|
+
created: number;
|
|
140
|
+
skipped: boolean;
|
|
141
|
+
dryRun?: boolean;
|
|
142
|
+
targetPages: {
|
|
143
|
+
path: string;
|
|
144
|
+
label: string;
|
|
145
|
+
}[];
|
|
146
|
+
plannedMenus?: Array<{
|
|
147
|
+
type: "procode";
|
|
148
|
+
path: string;
|
|
149
|
+
label: string;
|
|
150
|
+
loadScriptMode: "import";
|
|
151
|
+
resources: string[];
|
|
152
|
+
}>;
|
|
153
|
+
menus?: MenuMutationEntity[];
|
|
154
|
+
}
|
|
155
|
+
export interface UpdateResult {
|
|
156
|
+
updated: number;
|
|
157
|
+
failed: number;
|
|
158
|
+
skipped: boolean;
|
|
159
|
+
menus?: MenuMutationEntity[];
|
|
160
|
+
dryRun?: boolean;
|
|
161
|
+
diffs?: MenuUpdateDiff[];
|
|
162
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { MenuLoadScriptMode, MenuUpdateMode, MenuUpdateSelection, ProcessedMenuItem, UpdateResult } from "../../../commands/menu/shared/types.js";
|
|
2
|
+
interface MenuUpdateOptions {
|
|
3
|
+
mode?: MenuUpdateMode;
|
|
4
|
+
dryRun?: boolean;
|
|
5
|
+
force?: boolean;
|
|
6
|
+
selection?: MenuUpdateSelection;
|
|
7
|
+
loadScriptMode?: MenuLoadScriptMode;
|
|
8
|
+
}
|
|
9
|
+
export declare function runMenuUpdateCore(appCode: string, cookie: string, paramsFlag?: string, options?: MenuUpdateOptions): Promise<UpdateResult>;
|
|
10
|
+
export declare function selectMenusForUpdate(menusWithResources: ProcessedMenuItem[], selection: MenuUpdateSelection): ProcessedMenuItem[];
|
|
11
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1f7f73,_0x505878){const _0x10bf08=a129_0x20c4,_0x9788cd=_0x1f7f73();while(!![]){try{const _0x2e4be4=-parseInt(_0x10bf08(0xb8))/0x1+parseInt(_0x10bf08(0xde))/0x2*(-parseInt(_0x10bf08(0xd7))/0x3)+parseInt(_0x10bf08(0xea))/0x4+-parseInt(_0x10bf08(0xc4))/0x5+-parseInt(_0x10bf08(0xff))/0x6*(parseInt(_0x10bf08(0xe1))/0x7)+-parseInt(_0x10bf08(0xc0))/0x8+-parseInt(_0x10bf08(0xbe))/0x9*(-parseInt(_0x10bf08(0xbd))/0xa);if(_0x2e4be4===_0x505878)break;else _0x9788cd['push'](_0x9788cd['shift']());}catch(_0x53ba0f){_0x9788cd['push'](_0x9788cd['shift']());}}}(a129_0x5a03,0xaff3d));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x2bff56){const _0x1ba21a=a129_0x20c4,_0x32fdb7=[];return _0x2bff56['jsUrl']&&!isValidJsHttpsUrl(_0x2bff56[_0x1ba21a(0xfe)])&&_0x32fdb7['push']({'field':_0x1ba21a(0xfe),'message':_0x1ba21a(0x100)}),_0x2bff56[_0x1ba21a(0xed)]&&!isValidCssHttpsUrl(_0x2bff56[_0x1ba21a(0xed)])&&_0x32fdb7[_0x1ba21a(0xd9)]({'field':'cssUrl','message':_0x1ba21a(0xcb)}),_0x32fdb7;}export async function runMenuUpdateCore(_0x5359c7,_0x412afa,_0x533652,_0x41f39d={}){const _0x529b99=a129_0x20c4,_0x203366=parseUpdateParamsFlag(_0x533652),_0x165aca=normalizeMode(_0x41f39d[_0x529b99(0xf9)]);validateSelection(_0x41f39d[_0x529b99(0xd5)]);const _0x2dfc5a=[];if(_0x203366[_0x529b99(0xfe)])_0x2dfc5a[_0x529b99(0xd9)](_0x203366[_0x529b99(0xfe)]);if(_0x203366[_0x529b99(0xed)])_0x2dfc5a[_0x529b99(0xd9)](_0x203366['cssUrl']);const _0x4b2e55=validateParams(_0x203366);if(_0x4b2e55['length']>0x0){const _0x4c37c4=_0x4b2e55[_0x529b99(0xc9)](_0x214d6d=>_0x529b99(0xeb)+_0x214d6d[_0x529b99(0xef)]+':\x20'+_0x214d6d[_0x529b99(0xce)])[_0x529b99(0xbb)](';\x20');throw new Error(_0x529b99(0xca)+_0x4c37c4);}if(_0x2dfc5a[_0x529b99(0xc3)]===0x0)throw new Error(_0x529b99(0xe9)+_0x529b99(0x101));logger[_0x529b99(0xd0)](process[_0x529b99(0xf6)]()),logger['info'](_0x529b99(0xf5),_0x529b99(0xe8),{'appCode':_0x5359c7,'jsUrl':_0x203366[_0x529b99(0xfe)],'cssUrl':_0x203366['cssUrl'],'mode':_0x165aca,'dryRun':_0x41f39d[_0x529b99(0xfc)]===!![]});if(_0x203366['jsUrl']){const _0x1a4372=await isUrlReachable(_0x203366[_0x529b99(0xfe)]);if(!_0x1a4372)throw new Error(_0x529b99(0xe4)+_0x203366[_0x529b99(0xfe)]);}if(_0x203366[_0x529b99(0xed)]){const _0x1536ae=await isUrlReachable(_0x203366[_0x529b99(0xed)]);if(!_0x1536ae)throw new Error(_0x529b99(0xc2)+_0x203366[_0x529b99(0xed)]);}const _0x3a7e7e=await getOnlineMenuList(_0x5359c7,_0x412afa),_0x43f706=_0x3a7e7e[_0x529b99(0xf8)](_0x447aa4=>_0x447aa4[_0x529b99(0xe5)]['length']>0x0),_0x59a0fd=selectMenusForUpdate(_0x43f706,_0x41f39d['selection']);if(_0x59a0fd[_0x529b99(0xc3)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x41f39d['dryRun']===!![]};const _0xf8569=_0x59a0fd['map'](_0x42acaa=>buildMenuUpdateDiff(_0x42acaa,_0x203366,_0x165aca,_0x41f39d[_0x529b99(0xd3)]===!![],_0x41f39d[_0x529b99(0xd4)]));if(_0x41f39d[_0x529b99(0xfc)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0xf8569};const _0x29af55=await Promise['allSettled'](_0x59a0fd['map']((_0x2540b2,_0x2c2ed3)=>updateMenuCdnUrl(_0x5359c7,_0x412afa,{'id':_0x2540b2['id'],'label':_0x2540b2['label'],'path':_0x2540b2[_0x529b99(0xc7)],'resources':_0xf8569[_0x2c2ed3][_0x529b99(0xbc)][_0x529b99(0xe5)],'extend':_0x2540b2[_0x529b99(0xe6)]??null,'loadScriptMode':_0x41f39d['loadScriptMode']}))),_0x44770c=_0x29af55[_0x529b99(0xf8)](_0x7b7d2a=>_0x7b7d2a[_0x529b99(0xcf)]===_0x529b99(0xb9))[_0x529b99(0xc9)](_0x2ef8e9=>_0x2ef8e9[_0x529b99(0xe3)]),_0x1c42f2=_0x29af55['filter'](_0x8e37c7=>_0x8e37c7[_0x529b99(0xcf)]===_0x529b99(0xf4))[_0x529b99(0xc3)];return logger['info'](_0x529b99(0xf5),_0x529b99(0xfa),{'count':_0x59a0fd['length'],'resources':_0x2dfc5a}),{'updated':_0x44770c['length'],'failed':_0x1c42f2,'skipped':![],'menus':_0x44770c};}function validateSelection(_0x345b30){const _0x53c21d=a129_0x20c4;if(!_0x345b30)throw new Error(_0x53c21d(0xf0));if(_0x345b30[_0x53c21d(0xcc)]&&(_0x345b30[_0x53c21d(0xfd)][_0x53c21d(0xc3)]>0x0||_0x345b30[_0x53c21d(0xd1)]['length']>0x0))throw new Error(_0x53c21d(0xc1));if(!_0x345b30['all']&&_0x345b30[_0x53c21d(0xfd)][_0x53c21d(0xc3)]===0x0&&_0x345b30[_0x53c21d(0xd1)][_0x53c21d(0xc3)]===0x0)throw new Error(_0x53c21d(0xf0));}export function selectMenusForUpdate(_0x4d8c98,_0x54c708){const _0x295c80=a129_0x20c4;validateSelection(_0x54c708);if(_0x54c708[_0x295c80(0xcc)])return _0x4d8c98;const _0xc73bc2=new Set(_0x4d8c98['map'](_0x2bf954=>_0x2bf954['id'])),_0x30f38e=new Set(_0x4d8c98['map'](_0xd6ea28=>_0xd6ea28[_0x295c80(0xc7)])),_0x8c4132=_0x54c708[_0x295c80(0xfd)][_0x295c80(0xf8)](_0x400e7a=>!_0xc73bc2[_0x295c80(0xd6)](_0x400e7a)),_0x6ee057=_0x54c708['paths'][_0x295c80(0xf8)](_0x271847=>!_0x30f38e['has'](_0x271847));if(_0x8c4132[_0x295c80(0xc3)]>0x0||_0x6ee057['length']>0x0){const _0x1f6da1=[..._0x8c4132[_0x295c80(0xc9)](_0x4c75be=>String(_0x4c75be)),..._0x6ee057][_0x295c80(0xbb)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x1f6da1);}const _0x3269dd=new Set(_0x54c708[_0x295c80(0xfd)]),_0x1fe081=new Set(_0x54c708['paths']);return _0x4d8c98[_0x295c80(0xf8)](_0x584efb=>_0x3269dd['has'](_0x584efb['id'])||_0x1fe081[_0x295c80(0xd6)](_0x584efb[_0x295c80(0xc7)]));}function normalizeMode(_0xdf5e70){const _0x23c6ce=a129_0x20c4;if(!_0xdf5e70)return _0x23c6ce(0xba);if(_0xdf5e70===_0x23c6ce(0xbf)||_0xdf5e70===_0x23c6ce(0xba))return _0xdf5e70;throw new Error(_0x23c6ce(0xf2)+_0xdf5e70+_0x23c6ce(0xcd));}function a129_0x5a03(){const _0x175d1f=['some','value','JS\x20URL\x20is\x20unreachable:\x20','resources','extend','unshift','Start\x20non-interactive\x20menu\x20asset\x20update','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','1111476OlUrQz','--params.','string','cssUrl','trim','field','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','\x22\x20(','Invalid\x20--mode:\x20','label','rejected','menu-asset-update','cwd','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','filter','mode','Menu\x20asset\x20update\x20completed','isArray','dryRun','menuIds','jsUrl','18eFYLNR','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','286700bEGQjc','fulfilled','patch','join','after','169180XgkNvz','1872aNvFPX','replace','4819152MOazeV','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','CSS\x20URL\x20is\x20unreachable:\x20','length','4039315PYluEF','toLowerCase','\x20existing\x20CSS\x20resources\x20for\x20\x22','path','object','map','Invalid\x20--params:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','all','.\x20Allowed\x20values:\x20replace,\x20patch','message','status','setLogPath','paths',').\x20','force','loadScriptMode','selection','has','686121HKLYKE','menu\x20asset-update\x20cannot\x20patch\x20','push','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','endsWith','.css','.js','4iBdYTb','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','parse','2150729QHfvCr'];a129_0x5a03=function(){return _0x175d1f;};return a129_0x5a03();}function buildMenuUpdateDiff(_0x4d2709,_0x4d00e4,_0xccc0f7,_0xb8976b,_0x1fcf7d){const _0x29804c=a129_0x20c4,_0x1709d5=[..._0x4d2709[_0x29804c(0xe5)]];_0xccc0f7===_0x29804c(0xba)&&assertUnambiguousPatchResources(_0x4d2709,_0x1709d5,_0x4d00e4);const _0x588cae=_0xccc0f7===_0x29804c(0xba)?patchResources(_0x1709d5,_0x4d00e4):replaceResources(_0x4d00e4),_0x195cbe=[],_0x2fc4f3=_0x1709d5[_0x29804c(0xe2)](isJsResource),_0x4a68bd=_0x588cae[_0x29804c(0xe2)](isJsResource);if(_0x2fc4f3&&!_0x4a68bd){const _0x59ae88='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x4d2709[_0x29804c(0xf3)]+_0x29804c(0xf1)+_0x4d2709[_0x29804c(0xc7)]+_0x29804c(0xd2)+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0xb8976b)throw new Error(_0x59ae88);_0x195cbe['push'](_0x59ae88);}const _0x1685c9=_0x1709d5[_0x29804c(0xe2)](isCssResource),_0x40c644=_0x588cae[_0x29804c(0xe2)](isCssResource);_0x1685c9&&!_0x40c644&&_0x195cbe[_0x29804c(0xd9)](_0x29804c(0xdf)+_0x4d2709['label']+_0x29804c(0xf1)+_0x4d2709[_0x29804c(0xc7)]+').');const _0x48e58d=typeof _0x4d2709['extend']?.['loadScriptMode']===_0x29804c(0xec)?_0x4d2709['extend'][_0x29804c(0xd4)]:null,_0x47b8d0=_0x1fcf7d?{'loadScriptMode':_0x48e58d}:{},_0x547959=_0x1fcf7d?{'loadScriptMode':_0x1fcf7d}:{};return{'id':_0x4d2709['id'],'label':_0x4d2709[_0x29804c(0xf3)],'path':_0x4d2709[_0x29804c(0xc7)],'mode':_0xccc0f7,'before':{'resources':_0x1709d5,..._0x47b8d0},'after':{'resources':_0x588cae,..._0x547959},'warnings':_0x195cbe};}function replaceResources(_0x2e7b33){const _0x4cfa67=a129_0x20c4;return[_0x2e7b33['jsUrl'],_0x2e7b33[_0x4cfa67(0xed)]]['filter'](_0x5e896c=>!!_0x5e896c);}function assertUnambiguousPatchResources(_0x2574ea,_0x7eb089,_0x508b06){const _0x3a49df=a129_0x20c4,_0x43bb53=_0x7eb089[_0x3a49df(0xf8)](isJsResource)[_0x3a49df(0xc3)];if(_0x508b06['jsUrl']&&_0x43bb53>0x1)throw new Error(_0x3a49df(0xd8)+_0x43bb53+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x2574ea['label']+_0x3a49df(0xf1)+_0x2574ea[_0x3a49df(0xc7)]+')\x20'+_0x3a49df(0xda));const _0x3d7b1a=_0x7eb089[_0x3a49df(0xf8)](isCssResource)[_0x3a49df(0xc3)];if(_0x508b06[_0x3a49df(0xed)]&&_0x3d7b1a>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x3d7b1a+_0x3a49df(0xc6)+_0x2574ea[_0x3a49df(0xf3)]+_0x3a49df(0xf1)+_0x2574ea[_0x3a49df(0xc7)]+')\x20'+_0x3a49df(0xf7));}function patchResources(_0x1e2718,_0x1bf472){const _0x13fde2=a129_0x20c4;let _0xbabecc=![],_0x6ecfb9=![];const _0x4a9c34=[];for(const _0x1fa3d2 of _0x1e2718){if(isJsResource(_0x1fa3d2)){if(_0x1bf472[_0x13fde2(0xfe)]&&!_0xbabecc)_0x4a9c34[_0x13fde2(0xd9)](_0x1bf472[_0x13fde2(0xfe)]),_0xbabecc=!![];else!_0x1bf472['jsUrl']&&_0x4a9c34[_0x13fde2(0xd9)](_0x1fa3d2);continue;}if(isCssResource(_0x1fa3d2)){if(_0x1bf472[_0x13fde2(0xed)]&&!_0x6ecfb9)_0x4a9c34[_0x13fde2(0xd9)](_0x1bf472[_0x13fde2(0xed)]),_0x6ecfb9=!![];else!_0x1bf472['cssUrl']&&_0x4a9c34[_0x13fde2(0xd9)](_0x1fa3d2);continue;}_0x4a9c34[_0x13fde2(0xd9)](_0x1fa3d2);}return _0x1bf472['jsUrl']&&!_0xbabecc&&_0x4a9c34[_0x13fde2(0xe7)](_0x1bf472[_0x13fde2(0xfe)]),_0x1bf472[_0x13fde2(0xed)]&&!_0x6ecfb9&&_0x4a9c34[_0x13fde2(0xd9)](_0x1bf472[_0x13fde2(0xed)]),_0x4a9c34;}function a129_0x20c4(_0x44ff4b,_0x82aea0){_0x44ff4b=_0x44ff4b-0xb8;const _0x5a032b=a129_0x5a03();let _0x20c4ec=_0x5a032b[_0x44ff4b];return _0x20c4ec;}function isJsResource(_0x2cd7bc){const _0x3f3962=a129_0x20c4;return stripQuery(_0x2cd7bc)[_0x3f3962(0xc5)]()[_0x3f3962(0xdb)](_0x3f3962(0xdd));}function isCssResource(_0x5ccff5){const _0x2ffb63=a129_0x20c4;return stripQuery(_0x5ccff5)[_0x2ffb63(0xc5)]()[_0x2ffb63(0xdb)](_0x2ffb63(0xdc));}function stripQuery(_0x5e745f){return _0x5e745f['split']('?')[0x0]??_0x5e745f;}function parseUpdateParamsFlag(_0xad0e79){const _0x424c62=a129_0x20c4;if(!_0xad0e79||typeof _0xad0e79!==_0x424c62(0xec))return{};try{const _0x37895b=JSON[_0x424c62(0xe0)](_0xad0e79);if(typeof _0x37895b!==_0x424c62(0xc8)||_0x37895b===null||Array[_0x424c62(0xfb)](_0x37895b))return{};return{'jsUrl':typeof _0x37895b['jsUrl']==='string'?_0x37895b[_0x424c62(0xfe)][_0x424c62(0xee)]():undefined,'cssUrl':typeof _0x37895b[_0x424c62(0xed)]===_0x424c62(0xec)?_0x37895b[_0x424c62(0xed)]['trim']():undefined};}catch{return{};}}
|
|
1
|
+
(function(_0x1fd31a,_0x4e4019){const _0xa9dfea=a129_0x3af0,_0x2b104e=_0x1fd31a();while(!![]){try{const _0x4e257f=parseInt(_0xa9dfea(0x1c0))/0x1*(parseInt(_0xa9dfea(0x1b3))/0x2)+parseInt(_0xa9dfea(0x19a))/0x3+parseInt(_0xa9dfea(0x190))/0x4*(parseInt(_0xa9dfea(0x1a6))/0x5)+parseInt(_0xa9dfea(0x197))/0x6+parseInt(_0xa9dfea(0x189))/0x7+-parseInt(_0xa9dfea(0x1b7))/0x8*(-parseInt(_0xa9dfea(0x196))/0x9)+-parseInt(_0xa9dfea(0x19b))/0xa;if(_0x4e257f===_0x4e4019)break;else _0x2b104e['push'](_0x2b104e['shift']());}catch(_0x1c1a82){_0x2b104e['push'](_0x2b104e['shift']());}}}(a129_0x4b54,0x81ff6));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a129_0x4b54(){const _0x49d931=['paths','object','extend','has','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','534916HWIyiM','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','resources','rejected','map','all','63jppbcw','5718876XdXLTS','menu-asset-update',').\x20','2624172fbRJsj','39195680hhGbGB','force','value','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','\x20existing\x20JS\x20resources\x20for\x20\x22','toLowerCase','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','--params.','cssUrl','20kyoAZD','status','path','\x20existing\x20CSS\x20resources\x20for\x20\x22','field','\x22\x20(','dryRun','push','label','.css','allSettled','unshift','loadScriptMode','2ONTqxJ','.\x20Allowed\x20values:\x20replace,\x20patch','after','info','483304EuDeyi','jsUrl','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','isArray','join','fulfilled','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Invalid\x20--params:\x20','patch','896543eSruSt','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','trim','selection','mode','split','.js','filter','Menu\x20asset\x20update\x20completed','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','menuIds','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','endsWith','string','menu\x20asset-update\x20cannot\x20patch\x20','Start\x20non-interactive\x20menu\x20asset\x20update','cwd','some','5388726hSkdFA','length'];a129_0x4b54=function(){return _0x49d931;};return a129_0x4b54();}function validateParams(_0x25ed29){const _0x54650d=a129_0x3af0,_0x2a7ee4=[];return _0x25ed29[_0x54650d(0x1b8)]&&!isValidJsHttpsUrl(_0x25ed29['jsUrl'])&&_0x2a7ee4[_0x54650d(0x1ad)]({'field':'jsUrl','message':_0x54650d(0x1bd)}),_0x25ed29['cssUrl']&&!isValidCssHttpsUrl(_0x25ed29['cssUrl'])&&_0x2a7ee4[_0x54650d(0x1ad)]({'field':'cssUrl','message':_0x54650d(0x1a1)}),_0x2a7ee4;}export async function runMenuUpdateCore(_0x5d85d4,_0xaa278c,_0xf46081,_0x43b71f={}){const _0x4334f4=a129_0x3af0,_0x4646e6=parseUpdateParamsFlag(_0xf46081),_0x387335=normalizeMode(_0x43b71f[_0x4334f4(0x1c5)]);validateSelection(_0x43b71f['selection']);const _0x8ee29f=[];if(_0x4646e6[_0x4334f4(0x1b8)])_0x8ee29f['push'](_0x4646e6[_0x4334f4(0x1b8)]);if(_0x4646e6[_0x4334f4(0x1a5)])_0x8ee29f['push'](_0x4646e6['cssUrl']);const _0x51541b=validateParams(_0x4646e6);if(_0x51541b[_0x4334f4(0x18a)]>0x0){const _0x2658d4=_0x51541b['map'](_0x12bd0f=>_0x4334f4(0x1a4)+_0x12bd0f[_0x4334f4(0x1aa)]+':\x20'+_0x12bd0f['message'])[_0x4334f4(0x1bb)](';\x20');throw new Error(_0x4334f4(0x1be)+_0x2658d4);}if(_0x8ee29f[_0x4334f4(0x18a)]===0x0)throw new Error(_0x4334f4(0x1ca)+_0x4334f4(0x1cc));logger['setLogPath'](process[_0x4334f4(0x187)]()),logger[_0x4334f4(0x1b6)](_0x4334f4(0x198),_0x4334f4(0x186),{'appCode':_0x5d85d4,'jsUrl':_0x4646e6[_0x4334f4(0x1b8)],'cssUrl':_0x4646e6['cssUrl'],'mode':_0x387335,'dryRun':_0x43b71f[_0x4334f4(0x1ac)]===!![]});if(_0x4646e6[_0x4334f4(0x1b8)]){const _0x2b4afc=await isUrlReachable(_0x4646e6[_0x4334f4(0x1b8)]);if(!_0x2b4afc)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x4646e6[_0x4334f4(0x1b8)]);}if(_0x4646e6[_0x4334f4(0x1a5)]){const _0x36f663=await isUrlReachable(_0x4646e6[_0x4334f4(0x1a5)]);if(!_0x36f663)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x4646e6[_0x4334f4(0x1a5)]);}const _0x1b22ed=await getOnlineMenuList(_0x5d85d4,_0xaa278c),_0x12473f=_0x1b22ed['filter'](_0x704fdc=>_0x704fdc[_0x4334f4(0x192)][_0x4334f4(0x18a)]>0x0),_0x46216d=selectMenusForUpdate(_0x12473f,_0x43b71f[_0x4334f4(0x1c4)]);if(_0x46216d[_0x4334f4(0x18a)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x43b71f[_0x4334f4(0x1ac)]===!![]};const _0x1c31e7=_0x46216d[_0x4334f4(0x194)](_0x4cc115=>buildMenuUpdateDiff(_0x4cc115,_0x4646e6,_0x387335,_0x43b71f[_0x4334f4(0x19c)]===!![],_0x43b71f[_0x4334f4(0x1b2)]));if(_0x43b71f['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x1c31e7};const _0x3ab588=await Promise[_0x4334f4(0x1b0)](_0x46216d[_0x4334f4(0x194)]((_0x3188dd,_0x58ceb6)=>updateMenuCdnUrl(_0x5d85d4,_0xaa278c,{'id':_0x3188dd['id'],'label':_0x3188dd[_0x4334f4(0x1ae)],'path':_0x3188dd[_0x4334f4(0x1a8)],'resources':_0x1c31e7[_0x58ceb6][_0x4334f4(0x1b5)][_0x4334f4(0x192)],'extend':_0x3188dd['extend']??null,'loadScriptMode':_0x43b71f[_0x4334f4(0x1b2)]}))),_0x2bcafd=_0x3ab588[_0x4334f4(0x1c8)](_0x5c2a68=>_0x5c2a68[_0x4334f4(0x1a7)]===_0x4334f4(0x1bc))[_0x4334f4(0x194)](_0x4d386f=>_0x4d386f[_0x4334f4(0x19d)]),_0x39a214=_0x3ab588['filter'](_0x2442dc=>_0x2442dc['status']===_0x4334f4(0x193))[_0x4334f4(0x18a)];return logger[_0x4334f4(0x1b6)](_0x4334f4(0x198),_0x4334f4(0x1c9),{'count':_0x46216d['length'],'resources':_0x8ee29f}),{'updated':_0x2bcafd['length'],'failed':_0x39a214,'skipped':![],'menus':_0x2bcafd};}function validateSelection(_0x41fb52){const _0x228dd9=a129_0x3af0;if(!_0x41fb52)throw new Error(_0x228dd9(0x18f));if(_0x41fb52[_0x228dd9(0x195)]&&(_0x41fb52['menuIds']['length']>0x0||_0x41fb52[_0x228dd9(0x18b)][_0x228dd9(0x18a)]>0x0))throw new Error(_0x228dd9(0x19e));if(!_0x41fb52['all']&&_0x41fb52[_0x228dd9(0x1cb)][_0x228dd9(0x18a)]===0x0&&_0x41fb52['paths'][_0x228dd9(0x18a)]===0x0)throw new Error(_0x228dd9(0x18f));}export function selectMenusForUpdate(_0x381ec0,_0x3b7664){const _0x18820e=a129_0x3af0;validateSelection(_0x3b7664);if(_0x3b7664[_0x18820e(0x195)])return _0x381ec0;const _0x1f5192=new Set(_0x381ec0['map'](_0x3be3dc=>_0x3be3dc['id'])),_0x1f797d=new Set(_0x381ec0[_0x18820e(0x194)](_0x18138d=>_0x18138d[_0x18820e(0x1a8)])),_0x552ed6=_0x3b7664[_0x18820e(0x1cb)][_0x18820e(0x1c8)](_0x2c774e=>!_0x1f5192['has'](_0x2c774e)),_0x10f7ac=_0x3b7664['paths']['filter'](_0x16ea0d=>!_0x1f797d[_0x18820e(0x18e)](_0x16ea0d));if(_0x552ed6[_0x18820e(0x18a)]>0x0||_0x10f7ac[_0x18820e(0x18a)]>0x0){const _0x31d440=[..._0x552ed6['map'](_0x6b4d34=>String(_0x6b4d34)),..._0x10f7ac][_0x18820e(0x1bb)](',\x20');throw new Error(_0x18820e(0x1c2)+_0x31d440);}const _0x4a8888=new Set(_0x3b7664['menuIds']),_0x217031=new Set(_0x3b7664['paths']);return _0x381ec0['filter'](_0x390b47=>_0x4a8888[_0x18820e(0x18e)](_0x390b47['id'])||_0x217031[_0x18820e(0x18e)](_0x390b47[_0x18820e(0x1a8)]));}function normalizeMode(_0x10c138){const _0x3ad348=a129_0x3af0;if(!_0x10c138)return _0x3ad348(0x1bf);if(_0x10c138==='replace'||_0x10c138===_0x3ad348(0x1bf))return _0x10c138;throw new Error('Invalid\x20--mode:\x20'+_0x10c138+_0x3ad348(0x1b4));}function a129_0x3af0(_0x4f833e,_0x50d4a1){_0x4f833e=_0x4f833e-0x185;const _0x4b54af=a129_0x4b54();let _0x3af0a6=_0x4b54af[_0x4f833e];return _0x3af0a6;}function buildMenuUpdateDiff(_0x2b16e7,_0x51731f,_0x323de1,_0x2d256d,_0x8c1bc){const _0xd29704=a129_0x3af0,_0x26ced3=[..._0x2b16e7['resources']];_0x323de1===_0xd29704(0x1bf)&&assertUnambiguousPatchResources(_0x2b16e7,_0x26ced3,_0x51731f);const _0x1d9a02=_0x323de1==='patch'?patchResources(_0x26ced3,_0x51731f):replaceResources(_0x51731f),_0x357911=[],_0x4be45b=_0x26ced3[_0xd29704(0x188)](isJsResource),_0x386fe8=_0x1d9a02[_0xd29704(0x188)](isJsResource);if(_0x4be45b&&!_0x386fe8){const _0x3d2d5=_0xd29704(0x1b9)+_0x2b16e7[_0xd29704(0x1ae)]+_0xd29704(0x1ab)+_0x2b16e7[_0xd29704(0x1a8)]+_0xd29704(0x199)+_0xd29704(0x1a2);if(!_0x2d256d)throw new Error(_0x3d2d5);_0x357911['push'](_0x3d2d5);}const _0x367834=_0x26ced3[_0xd29704(0x188)](isCssResource),_0x4e217d=_0x1d9a02['some'](isCssResource);_0x367834&&!_0x4e217d&&_0x357911[_0xd29704(0x1ad)](_0xd29704(0x1c1)+_0x2b16e7['label']+'\x22\x20('+_0x2b16e7[_0xd29704(0x1a8)]+').');const _0x390af1=typeof _0x2b16e7['extend']?.[_0xd29704(0x1b2)]===_0xd29704(0x1ce)?_0x2b16e7[_0xd29704(0x18d)]['loadScriptMode']:null,_0xef8bf8=_0x8c1bc?{'loadScriptMode':_0x390af1}:{},_0x3e7671=_0x8c1bc?{'loadScriptMode':_0x8c1bc}:{};return{'id':_0x2b16e7['id'],'label':_0x2b16e7['label'],'path':_0x2b16e7['path'],'mode':_0x323de1,'before':{'resources':_0x26ced3,..._0xef8bf8},'after':{'resources':_0x1d9a02,..._0x3e7671},'warnings':_0x357911};}function replaceResources(_0xcad2bf){const _0x4bea4c=a129_0x3af0;return[_0xcad2bf[_0x4bea4c(0x1b8)],_0xcad2bf[_0x4bea4c(0x1a5)]][_0x4bea4c(0x1c8)](_0xce4cf1=>!!_0xce4cf1);}function assertUnambiguousPatchResources(_0x168334,_0x591694,_0x905698){const _0xee300d=a129_0x3af0,_0x5c2efa=_0x591694[_0xee300d(0x1c8)](isJsResource)[_0xee300d(0x18a)];if(_0x905698['jsUrl']&&_0x5c2efa>0x1)throw new Error(_0xee300d(0x185)+_0x5c2efa+_0xee300d(0x19f)+_0x168334[_0xee300d(0x1ae)]+_0xee300d(0x1ab)+_0x168334[_0xee300d(0x1a8)]+')\x20'+_0xee300d(0x1a3));const _0x27ef8d=_0x591694['filter'](isCssResource)[_0xee300d(0x18a)];if(_0x905698[_0xee300d(0x1a5)]&&_0x27ef8d>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x27ef8d+_0xee300d(0x1a9)+_0x168334[_0xee300d(0x1ae)]+_0xee300d(0x1ab)+_0x168334[_0xee300d(0x1a8)]+')\x20'+_0xee300d(0x191));}function patchResources(_0x23bd5b,_0x15a0b3){const _0x46e522=a129_0x3af0;let _0x37d97f=![],_0x4da626=![];const _0x43a239=[];for(const _0x70226e of _0x23bd5b){if(isJsResource(_0x70226e)){if(_0x15a0b3[_0x46e522(0x1b8)]&&!_0x37d97f)_0x43a239[_0x46e522(0x1ad)](_0x15a0b3[_0x46e522(0x1b8)]),_0x37d97f=!![];else!_0x15a0b3[_0x46e522(0x1b8)]&&_0x43a239[_0x46e522(0x1ad)](_0x70226e);continue;}if(isCssResource(_0x70226e)){if(_0x15a0b3[_0x46e522(0x1a5)]&&!_0x4da626)_0x43a239[_0x46e522(0x1ad)](_0x15a0b3[_0x46e522(0x1a5)]),_0x4da626=!![];else!_0x15a0b3[_0x46e522(0x1a5)]&&_0x43a239['push'](_0x70226e);continue;}_0x43a239[_0x46e522(0x1ad)](_0x70226e);}return _0x15a0b3[_0x46e522(0x1b8)]&&!_0x37d97f&&_0x43a239[_0x46e522(0x1b1)](_0x15a0b3[_0x46e522(0x1b8)]),_0x15a0b3[_0x46e522(0x1a5)]&&!_0x4da626&&_0x43a239[_0x46e522(0x1ad)](_0x15a0b3[_0x46e522(0x1a5)]),_0x43a239;}function isJsResource(_0x5a0986){const _0x49817b=a129_0x3af0;return stripQuery(_0x5a0986)[_0x49817b(0x1a0)]()[_0x49817b(0x1cd)](_0x49817b(0x1c7));}function isCssResource(_0x5673ea){const _0x596616=a129_0x3af0;return stripQuery(_0x5673ea)[_0x596616(0x1a0)]()['endsWith'](_0x596616(0x1af));}function stripQuery(_0x8de325){const _0x1d4c4a=a129_0x3af0;return _0x8de325[_0x1d4c4a(0x1c6)]('?')[0x0]??_0x8de325;}function parseUpdateParamsFlag(_0x25f0a3){const _0x4fc3f3=a129_0x3af0;if(!_0x25f0a3||typeof _0x25f0a3!==_0x4fc3f3(0x1ce))return{};try{const _0xddd0fc=JSON['parse'](_0x25f0a3);if(typeof _0xddd0fc!==_0x4fc3f3(0x18c)||_0xddd0fc===null||Array[_0x4fc3f3(0x1ba)](_0xddd0fc))return{};return{'jsUrl':typeof _0xddd0fc['jsUrl']==='string'?_0xddd0fc[_0x4fc3f3(0x1b8)][_0x4fc3f3(0x1c3)]():undefined,'cssUrl':typeof _0xddd0fc[_0x4fc3f3(0x1a5)]===_0x4fc3f3(0x1ce)?_0xddd0fc[_0x4fc3f3(0x1a5)][_0x4fc3f3(0x1c3)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a130_0x22b4(_0x3b71a5,_0x16ca32){_0x3b71a5=_0x3b71a5-0x1e0;const _0x53c829=a130_0x53c8();let _0x22b4b6=_0x53c829[_0x3b71a5];return _0x22b4b6;}(function(_0x1e384f,_0x166a82){const _0x20f006=a130_0x22b4,_0x1e0b05=_0x1e384f();while(!![]){try{const _0x463d28=parseInt(_0x20f006(0x1ea))/0x1*(parseInt(_0x20f006(0x1e0))/0x2)+parseInt(_0x20f006(0x1e2))/0x3*(-parseInt(_0x20f006(0x1e1))/0x4)+-parseInt(_0x20f006(0x1e7))/0x5*(-parseInt(_0x20f006(0x1e5))/0x6)+-parseInt(_0x20f006(0x1e3))/0x7+-parseInt(_0x20f006(0x1e6))/0x8+-parseInt(_0x20f006(0x1eb))/0x9*(parseInt(_0x20f006(0x1ec))/0xa)+parseInt(_0x20f006(0x1e9))/0xb;if(_0x463d28===_0x166a82)break;else _0x1e0b05['push'](_0x1e0b05['shift']());}catch(_0x299165){_0x1e0b05['push'](_0x1e0b05['shift']());}}}(a130_0x53c8,0x40ab9));export function isValidJsHttpsUrl(_0x1e7aca){const _0x5bfb9d=a130_0x22b4;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x1e7aca[_0x5bfb9d(0x1e8)]());}function a130_0x53c8(){const _0x4f4f41=['263890shuVRA','3974bygqGW','12GjqQwP','446211EpYqAJ','2527483GjNeCT','test','66zLJRJp','924224qVVHXK','235rAmCfa','trim','14028025tiqMCY','208aEjeQQ','171HCuWLL'];a130_0x53c8=function(){return _0x4f4f41;};return a130_0x53c8();}export function isValidCssHttpsUrl(_0x5bba3c){const _0x4e6400=a130_0x22b4;return/^https:\/\/.+\.css(\?.*)?$/[_0x4e6400(0x1e4)](_0x5bba3c[_0x4e6400(0x1e8)]());}export async function isUrlReachable(_0x27b164){try{const _0x19c47b=await fetch(_0x27b164,{'method':'HEAD'});return _0x19c47b['ok'];}catch{return![];}}
|