@lovrabet/rabetbase-cli 2.3.16-beta.3 → 2.3.16-beta.5
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
- package/lib/commands/page/react/create.js +0 -1
- package/lib/commands/page/react/detail.js +0 -1
- package/lib/commands/page/react/list.js +0 -1
- package/lib/commands/page/react/publish.js +0 -1
- package/lib/commands/page/react/shared.js +0 -1
- package/lib/commands/page/react/syntax.js +0 -1
- package/lib/commands/page/react/template.js +0 -1
- package/lib/commands/page/react/update.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3fbc9a,_0x29393c){const _0x8fff72=a118_0x444e,_0x51d0b1=_0x3fbc9a();while(!![]){try{const _0x53d174=-parseInt(_0x8fff72(0x149))/0x1*(-parseInt(_0x8fff72(0x15a))/0x2)+parseInt(_0x8fff72(0x157))/0x3*(-parseInt(_0x8fff72(0x153))/0x4)+parseInt(_0x8fff72(0x150))/0x5*(-parseInt(_0x8fff72(0x141))/0x6)+parseInt(_0x8fff72(0x152))/0x7+parseInt(_0x8fff72(0x156))/0x8+parseInt(_0x8fff72(0x144))/0x9*(parseInt(_0x8fff72(0x151))/0xa)+parseInt(_0x8fff72(0x15f))/0xb*(-parseInt(_0x8fff72(0x14e))/0xc);if(_0x53d174===_0x29393c)break;else _0x51d0b1['push'](_0x51d0b1['shift']());}catch(_0x14e1f4){_0x51d0b1['push'](_0x51d0b1['shift']());}}}(a118_0x2497,0x844a0));function strWidth(_0x24321b){const _0x52c51f=a118_0x444e;let _0x1dbf1c=0x0;for(const _0x2e0541 of _0x24321b){_0x1dbf1c+=/[\u4e00-\u9fa5]/[_0x52c51f(0x14f)](_0x2e0541)?0x2:0x1;}return _0x1dbf1c;}function padRight(_0x3e0073,_0x1ba598){const _0x3f820c=a118_0x444e,_0x503498=strWidth(_0x3e0073);return _0x3e0073+'\x20'[_0x3f820c(0x147)](Math[_0x3f820c(0x15c)](0x0,_0x1ba598-_0x503498));}function a118_0x2497(){const _0x2ab883=['60wqnAUv','test','2785nxnRVt','4010wxBycm','6211541yFGQEJ','23444IQluMa','path','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','7697400cKDyPP','267xMimJN','local','Local','12YlwzLF','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','max','\x20\x20\x20\x20JS:\x20\x20','length','2249071xQMqdi','Platform','\x20\x20No\x20pages\x20to\x20sync.','map','label','10818wKUnFT','\x20\x20\x20\x20•\x20','Path','7569RSPLnP','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','\x20\x20Affected\x20menus:\x20','repeat','push','150547NHYThJ','showOnline','(unchanged)','join','online'];a118_0x2497=function(){return _0x2ab883;};return a118_0x2497();}export function renderCompareTable(_0x548348,_0x3c8184={}){const _0xa64216=a118_0x444e;if(_0x548348['length']===0x0)return'';const _0x2a3a1e=_0x3c8184[_0xa64216(0x14a)]??!![],_0x353a49=Math['max'](0x1e,..._0x548348['map'](_0x2c8492=>strWidth(_0x2c8492[_0xa64216(0x140)]))),_0x502c53=Math['max'](0x18,..._0x548348[_0xa64216(0x13f)](_0x4685c4=>strWidth(_0x4685c4[_0xa64216(0x154)]))),_0x3d6fa8=0x4,_0x45d673=[],_0x3b35ad='\x20\x20'+padRight('Menu\x20Name',_0x353a49),_0x9a342c=padRight(_0xa64216(0x143),_0x502c53),_0xb83375=padRight(_0xa64216(0x159),_0x3d6fa8),_0x5eabcb=_0x2a3a1e?'\x20\x20'+padRight(_0xa64216(0x160),_0x3d6fa8):'';_0x45d673[_0xa64216(0x148)](_0x3b35ad+'\x20\x20'+_0x9a342c+'\x20\x20'+_0xb83375+(_0x2a3a1e?_0x5eabcb:'')),_0x45d673['push']('\x20\x20'+'─'['repeat'](_0x353a49)+'\x20\x20'+'─'['repeat'](_0x502c53)+'\x20\x20'+'─'[_0xa64216(0x147)](_0x3d6fa8)+(_0x2a3a1e?'\x20\x20'+'─'[_0xa64216(0x147)](_0x3d6fa8):''));for(const _0x220c97 of _0x548348){const _0x3a9f62=padRight(_0x220c97['label'],_0x353a49),_0x4ccdc7=padRight(_0x220c97['path'],_0x502c53),_0x1872f5=_0x220c97[_0xa64216(0x158)]?'✓':'✗',_0x1b76b8=padRight(_0x1872f5,_0x3d6fa8);let _0x304b1d='\x20\x20'+_0x3a9f62+'\x20\x20'+_0x4ccdc7+'\x20\x20'+_0x1b76b8;if(_0x2a3a1e){const _0x49fbb0=_0x220c97[_0xa64216(0x14d)]?'✓':'✗';_0x304b1d+='\x20\x20'+padRight(_0x49fbb0,_0x3d6fa8);}_0x45d673[_0xa64216(0x148)](_0x304b1d);}return _0x45d673[_0xa64216(0x14c)]('\x0a');}function a118_0x444e(_0x1cef54,_0x3ce580){_0x1cef54=_0x1cef54-0x13f;const _0x2497c5=a118_0x2497();let _0x444ec8=_0x2497c5[_0x1cef54];return _0x444ec8;}export function renderSyncSummary(_0x1c6764,_0x446ddd){const _0x208548=a118_0x444e;if(_0x1c6764[_0x208548(0x15e)]===0x0)return _0x446ddd?_0x208548(0x15b):_0x208548(0x161);const _0x456f7a=['\x20\x20'+_0x1c6764[_0x208548(0x15e)]+'\x20page(s)\x20will\x20be\x20created\x20on\x20platform:'];for(const _0x3795a4 of _0x1c6764){_0x456f7a[_0x208548(0x148)](_0x208548(0x142)+_0x3795a4[_0x208548(0x140)]+'\x20('+_0x3795a4[_0x208548(0x154)]+')');}return _0x456f7a[_0x208548(0x14c)]('\x0a');}export function renderUpdateSummary(_0x40870c,_0x5eee96){const _0x46f444=a118_0x444e;if(_0x40870c[_0x46f444(0x15e)]===0x0)return _0x46f444(0x145);const _0x3d07aa=['\x20\x20'+_0x40870c[_0x46f444(0x15e)]+_0x46f444(0x155),_0x46f444(0x15d)+(_0x5eee96[0x0]??_0x46f444(0x14b)),'\x20\x20\x20\x20CSS:\x20'+(_0x5eee96[0x1]??_0x46f444(0x14b)),'',_0x46f444(0x146)+_0x40870c[_0x46f444(0x14c)](',\x20')];return _0x3d07aa[_0x46f444(0x14c)]('\x0a');}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { MenuFact, MenuMutationResult, MenuSnapshot } from "../../../commands/menu/shared/types.js";
|
|
2
|
+
interface MenuDeleteTargetFingerprint {
|
|
3
|
+
id: number;
|
|
4
|
+
parentId: number | null;
|
|
5
|
+
depth: number;
|
|
6
|
+
label: string;
|
|
7
|
+
path: string;
|
|
8
|
+
type: string;
|
|
9
|
+
visible: boolean | null;
|
|
10
|
+
sort: number | null;
|
|
11
|
+
pageId: number | null;
|
|
12
|
+
pageType: string;
|
|
13
|
+
modelType: string;
|
|
14
|
+
datasetId: number | null;
|
|
15
|
+
datasetCode: string;
|
|
16
|
+
childrenIds: number[];
|
|
17
|
+
childrenCount: number;
|
|
18
|
+
resourcesValid: boolean;
|
|
19
|
+
resourcesHash: string;
|
|
20
|
+
extendHash: string;
|
|
21
|
+
updateTime: string | number | null;
|
|
22
|
+
}
|
|
23
|
+
export interface MenuDeletePlanFile {
|
|
24
|
+
version: 2;
|
|
25
|
+
command: "menu delete";
|
|
26
|
+
appCode: string;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
expiresAt: string;
|
|
29
|
+
snapshotHash: string;
|
|
30
|
+
recursive: boolean;
|
|
31
|
+
target: MenuFact;
|
|
32
|
+
targetFingerprint: MenuDeleteTargetFingerprint;
|
|
33
|
+
targets: MenuFact[];
|
|
34
|
+
targetFingerprints: MenuDeleteTargetFingerprint[];
|
|
35
|
+
deleteOrder: number[];
|
|
36
|
+
cascade: {
|
|
37
|
+
pages: number[];
|
|
38
|
+
pageSchemaAffected: boolean;
|
|
39
|
+
};
|
|
40
|
+
warnings: string[];
|
|
41
|
+
}
|
|
42
|
+
export declare function createMenuDeletePlanFile(appCode: string, plan: MenuMutationResult, now?: Date): MenuDeletePlanFile;
|
|
43
|
+
export declare function writeMenuDeletePlan(filePath: string, plan: MenuDeletePlanFile): Promise<string>;
|
|
44
|
+
export declare function readMenuDeletePlan(filePath: string): Promise<{
|
|
45
|
+
path: string;
|
|
46
|
+
plan: MenuDeletePlanFile;
|
|
47
|
+
}>;
|
|
48
|
+
export declare function mutationPlanFromDeleteFile(file: MenuDeletePlanFile, path: string): MenuMutationResult;
|
|
49
|
+
export declare function assertMenuDeletePlanCurrent(file: MenuDeletePlanFile, appCode: string, snapshot: MenuSnapshot, now?: Date): MenuFact[];
|
|
50
|
+
export declare function assertMenuDeletePlanExecutable(file: MenuDeletePlanFile, appCode: string, now?: Date): void;
|
|
51
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a119_0x5259fa=a119_0x1064;(function(_0x1acbeb,_0x10ca36){const _0x36eb5a=a119_0x1064,_0x4df5bc=_0x1acbeb();while(!![]){try{const _0x560f6a=-parseInt(_0x36eb5a(0xd0))/0x1*(-parseInt(_0x36eb5a(0xcb))/0x2)+-parseInt(_0x36eb5a(0xbc))/0x3+parseInt(_0x36eb5a(0xa5))/0x4+parseInt(_0x36eb5a(0x91))/0x5+-parseInt(_0x36eb5a(0xbe))/0x6*(-parseInt(_0x36eb5a(0xb0))/0x7)+-parseInt(_0x36eb5a(0xe0))/0x8*(-parseInt(_0x36eb5a(0xcd))/0x9)+-parseInt(_0x36eb5a(0x82))/0xa;if(_0x560f6a===_0x10ca36)break;else _0x4df5bc['push'](_0x4df5bc['shift']());}catch(_0x2d902e){_0x4df5bc['push'](_0x4df5bc['shift']());}}}(a119_0x22ed,0x3fff0));import{createHash}from'node:crypto';import{mkdir,readFile,stat,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{menuError,mutationResult}from'../../../commands/menu/shared/mutations.js';const PLAN_VERSION=0x2,PLAN_COMMAND=a119_0x5259fa(0xb6),PLAN_TTL_MS=0x1e*0x3c*0x3e8,MAX_PLAN_BYTES=0x400*0x400;export function createMenuDeletePlanFile(_0x4fbb7a,_0xb36621,_0x4512b7=new Date()){const _0x2da4ba=a119_0x5259fa;if(!_0xb36621[_0x2da4ba(0x81)]||!isMenuFact(_0xb36621[_0x2da4ba(0x81)]))throw menuError(_0x2da4ba(0xaf),_0x2da4ba(0x9b));const _0x2231c2=_0xb36621[_0x2da4ba(0xc4)]?.[_0x2da4ba(0x8f)]?_0xb36621[_0x2da4ba(0xc4)]:[_0xb36621[_0x2da4ba(0x81)]],_0x434599=_0xb36621[_0x2da4ba(0xc7)]?.[_0x2da4ba(0x8f)]?_0xb36621['deleteOrder']:_0x2231c2[_0x2da4ba(0x8e)](_0x556abe=>_0x556abe['id']);return{'version':PLAN_VERSION,'command':PLAN_COMMAND,'appCode':_0x4fbb7a,'createdAt':_0x4512b7[_0x2da4ba(0xdc)](),'expiresAt':new Date(_0x4512b7[_0x2da4ba(0x9d)]()+PLAN_TTL_MS)[_0x2da4ba(0xdc)](),'snapshotHash':_0xb36621[_0x2da4ba(0xdb)],'recursive':_0xb36621[_0x2da4ba(0xc8)][_0x2da4ba(0x9f)]===!![],'target':_0xb36621[_0x2da4ba(0x81)],'targetFingerprint':fingerprint(_0xb36621[_0x2da4ba(0x81)]),'targets':_0x2231c2,'targetFingerprints':_0x2231c2[_0x2da4ba(0x8e)](fingerprint),'deleteOrder':_0x434599,'cascade':_0xb36621[_0x2da4ba(0xd8)]??{'pages':_0xb36621[_0x2da4ba(0x81)]['pageId']==null?[]:[_0xb36621['before'][_0x2da4ba(0xaa)]],'pageSchemaAffected':_0xb36621[_0x2da4ba(0x81)][_0x2da4ba(0xaa)]!=null},'warnings':[..._0xb36621[_0x2da4ba(0x8b)]]};}export async function writeMenuDeletePlan(_0x3bb0c0,_0x1c8a38){const _0x2f9d04=a119_0x5259fa,_0x2cd53e=resolvePlanPath(_0x3bb0c0,_0x2f9d04(0xe1));await mkdir(dirname(_0x2cd53e),{'recursive':!![]});try{await writeFile(_0x2cd53e,JSON[_0x2f9d04(0xc3)](_0x1c8a38,null,0x2)+'\x0a',{'encoding':_0x2f9d04(0xb5),'flag':'wx'});}catch(_0x298961){if(_0x298961[_0x2f9d04(0x8d)]==='EEXIST')throw menuError('menu_plan_file_exists',_0x2f9d04(0x7d)+_0x2cd53e,_0x2f9d04(0x97));throw menuError(_0x2f9d04(0xa1),_0x2f9d04(0xab)+_0x2cd53e+':\x20'+errorMessage(_0x298961));}return _0x2cd53e;}export async function readMenuDeletePlan(_0x5733f2){const _0x1cfaac=a119_0x5259fa,_0x4c6f20=resolvePlanPath(_0x5733f2,'plan');let _0x35120c;try{_0x35120c=(await stat(_0x4c6f20))[_0x1cfaac(0x8c)];}catch(_0x147959){throw menuError(_0x1cfaac(0xaf),_0x1cfaac(0xa8)+_0x4c6f20+':\x20'+errorMessage(_0x147959));}if(_0x35120c>MAX_PLAN_BYTES)throw menuError('menu_plan_invalid',_0x1cfaac(0x78)+_0x35120c+_0x1cfaac(0xbd));let _0x26b13a;try{_0x26b13a=JSON[_0x1cfaac(0xc1)](await readFile(_0x4c6f20,_0x1cfaac(0xb5)));}catch(_0x1b0928){throw menuError(_0x1cfaac(0xaf),_0x1cfaac(0xd2)+errorMessage(_0x1b0928));}if(!isMenuDeletePlanFile(_0x26b13a))throw menuError('menu_plan_invalid',_0x1cfaac(0x7f)+PLAN_VERSION+_0x1cfaac(0xce)+PLAN_COMMAND+_0x1cfaac(0xba));if(!sameFingerprint(_0x26b13a[_0x1cfaac(0xa6)],fingerprint(_0x26b13a[_0x1cfaac(0xcf)])))throw menuError(_0x1cfaac(0xaf),_0x1cfaac(0x90),_0x1cfaac(0xd4));if(!_0x26b13a[_0x1cfaac(0xc4)]['every']((_0x207a1e,_0x3b10cb)=>sameFingerprint(_0x26b13a[_0x1cfaac(0xd6)][_0x3b10cb],fingerprint(_0x207a1e)))||!sameFingerprint(_0x26b13a[_0x1cfaac(0xa6)],fingerprint(_0x26b13a[_0x1cfaac(0xc4)][_0x26b13a[_0x1cfaac(0xc4)][_0x1cfaac(0x8f)]-0x1])))throw menuError(_0x1cfaac(0xaf),_0x1cfaac(0xb3),'Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out;\x20do\x20not\x20edit\x20target\x20fields\x20manually.');return{'path':_0x4c6f20,'plan':_0x26b13a};}function a119_0x1064(_0x3f4f73,_0x3b233b){_0x3f4f73=_0x3f4f73-0x77;const _0x22ed1b=a119_0x22ed();let _0x1064e6=_0x22ed1b[_0x3f4f73];return _0x1064e6;}export function mutationPlanFromDeleteFile(_0x5d787f,_0x4603b8){const _0x3f1b7f=a119_0x5259fa;return mutationResult({'operation':'delete','selector':{'id':_0x5d787f['target']['id'],'recursive':_0x5d787f['recursive']},'before':_0x5d787f[_0x3f1b7f(0xcf)],'after':null,'dryRun':![],'backend':[{'method':_0x3f1b7f(0x79),'path':_0x3f1b7f(0x85)}],'plannedActions':[{'stage':_0x3f1b7f(0x84),'method':_0x3f1b7f(0x79),'path':_0x3f1b7f(0x85),'body':{'idList':_0x5d787f[_0x3f1b7f(0xc7)]}}],'targets':_0x5d787f['targets'],'deleteOrder':_0x5d787f['deleteOrder'],'snapshotHash':_0x5d787f[_0x3f1b7f(0xdb)],'cascade':_0x5d787f['cascade'],'planFile':{'path':_0x4603b8,'createdAt':_0x5d787f[_0x3f1b7f(0xc2)],'expiresAt':_0x5d787f[_0x3f1b7f(0xdf)]},'warnings':_0x5d787f['warnings']});}export function assertMenuDeletePlanCurrent(_0x39ed5f,_0x31a22f,_0x4b6ace,_0x4915ce=new Date()){const _0x1c8421=a119_0x5259fa;assertMenuDeletePlanExecutable(_0x39ed5f,_0x31a22f,_0x4915ce);if(_0x4b6ace[_0x1c8421(0x9e)]!==_0x39ed5f[_0x1c8421(0xdb)])throw menuError(_0x1c8421(0xc0),'Online\x20menu\x20state\x20changed\x20after\x20the\x20delete\x20plan\x20was\x20reviewed.',_0x1c8421(0xde));return _0x39ed5f[_0x1c8421(0xc4)][_0x1c8421(0x8e)]((_0x4ca244,_0x58676b)=>{const _0x431558=_0x1c8421,_0x429826=_0x4b6ace['byId'][_0x431558(0x99)](_0x4ca244['id']);if(!_0x429826)throw menuError(_0x431558(0xc0),_0x431558(0xae)+_0x4ca244['id']+_0x431558(0xbb));if(!sameFingerprint(_0x39ed5f[_0x431558(0xd6)][_0x58676b],fingerprint(_0x429826)))throw menuError('menu_state_drift',_0x431558(0xae)+_0x4ca244['id']+_0x431558(0xd7),_0x431558(0xd9));return _0x429826;});}export function assertMenuDeletePlanExecutable(_0x194dcb,_0x4d427f,_0x688eb5=new Date()){const _0x5878ad=a119_0x5259fa;if(_0x194dcb[_0x5878ad(0x95)]!==_0x4d427f)throw menuError(_0x5878ad(0x98),'Menu\x20delete\x20plan\x20targets\x20app\x20'+JSON[_0x5878ad(0xc3)](_0x194dcb[_0x5878ad(0x95)])+_0x5878ad(0x94)+JSON[_0x5878ad(0xc3)](_0x4d427f)+'.');const _0xc12a2d=Date[_0x5878ad(0xc1)](_0x194dcb['createdAt']),_0x39379d=Date[_0x5878ad(0xc1)](_0x194dcb[_0x5878ad(0xdf)]);if(!Number[_0x5878ad(0x7a)](_0xc12a2d)||!Number['isFinite'](_0x39379d)||_0x39379d-_0xc12a2d!==PLAN_TTL_MS)throw menuError('menu_plan_invalid',_0x5878ad(0x8a));if(_0xc12a2d>_0x688eb5['getTime']())throw menuError(_0x5878ad(0xaf),'Menu\x20delete\x20plan\x20creation\x20time\x20'+_0x194dcb[_0x5878ad(0xc2)]+_0x5878ad(0xa0),_0x5878ad(0x83));if(_0x688eb5[_0x5878ad(0x9d)]()>_0x39379d)throw menuError(_0x5878ad(0x9a),_0x5878ad(0xda)+_0x194dcb['expiresAt']+'.',_0x5878ad(0xa9));}function fingerprint(_0x2bca60){const _0x1034e2=a119_0x5259fa;return{'id':_0x2bca60['id'],'parentId':_0x2bca60[_0x1034e2(0xb9)],'depth':_0x2bca60[_0x1034e2(0xbf)],'label':_0x2bca60[_0x1034e2(0x92)],'path':_0x2bca60[_0x1034e2(0xb1)],'type':_0x2bca60[_0x1034e2(0xd5)],'visible':_0x2bca60[_0x1034e2(0x77)],'sort':_0x2bca60['sort'],'pageId':_0x2bca60[_0x1034e2(0xaa)],'pageType':_0x2bca60[_0x1034e2(0xb2)],'modelType':_0x2bca60[_0x1034e2(0xa7)],'datasetId':_0x2bca60['datasetId'],'datasetCode':_0x2bca60['datasetCode'],'childrenIds':[..._0x2bca60[_0x1034e2(0xca)]],'childrenCount':_0x2bca60[_0x1034e2(0xb4)],'resourcesValid':_0x2bca60['resourcesValid'],'resourcesHash':hashValue(_0x2bca60[_0x1034e2(0x93)]),'extendHash':hashValue(_0x2bca60[_0x1034e2(0x87)]??null),'updateTime':_0x2bca60[_0x1034e2(0xb8)]};}function hashValue(_0x55bcce){const _0x3d6abe=a119_0x5259fa;return createHash('sha256')['update'](JSON[_0x3d6abe(0xc3)](_0x55bcce))[_0x3d6abe(0xd3)]('hex');}function sameFingerprint(_0x368780,_0x3fd673){const _0xd04858=a119_0x5259fa;return JSON[_0xd04858(0xc3)](_0x368780)===JSON[_0xd04858(0xc3)](_0x3fd673);}function resolvePlanPath(_0x342d84,_0x3ae523){const _0x6c3956=a119_0x5259fa,_0x792698=_0x342d84['trim']();if(!_0x792698)throw menuError(_0x6c3956(0xaf),'--'+_0x3ae523+_0x6c3956(0xc6));return resolve(_0x792698);}function isMenuDeletePlanFile(_0x4180b9){const _0x47624f=a119_0x5259fa;if(!isRecord(_0x4180b9))return![];return _0x4180b9['version']===PLAN_VERSION&&_0x4180b9['command']===PLAN_COMMAND&&typeof _0x4180b9[_0x47624f(0x95)]===_0x47624f(0xac)&&_0x4180b9['appCode'][_0x47624f(0x8f)]>0x0&&typeof _0x4180b9['createdAt']===_0x47624f(0xac)&&typeof _0x4180b9['expiresAt']==='string'&&typeof _0x4180b9['snapshotHash']===_0x47624f(0xac)&&/^sha256:[a-f0-9]{64}$/[_0x47624f(0x96)](_0x4180b9[_0x47624f(0xdb)])&&typeof _0x4180b9['recursive']===_0x47624f(0xd1)&&isMenuFact(_0x4180b9[_0x47624f(0xcf)])&&isTargetFingerprint(_0x4180b9[_0x47624f(0xa6)])&&Array[_0x47624f(0xad)](_0x4180b9[_0x47624f(0xc4)])&&_0x4180b9['targets']['length']>0x0&&_0x4180b9[_0x47624f(0xc4)][_0x47624f(0xc9)](isMenuFact)&&Array['isArray'](_0x4180b9[_0x47624f(0xd6)])&&_0x4180b9[_0x47624f(0xd6)][_0x47624f(0x8f)]===_0x4180b9[_0x47624f(0xc4)]['length']&&_0x4180b9[_0x47624f(0xd6)]['every'](isTargetFingerprint)&&Array[_0x47624f(0xad)](_0x4180b9[_0x47624f(0xc7)])&&_0x4180b9[_0x47624f(0xc7)]['length']===_0x4180b9['targets'][_0x47624f(0x8f)]&&_0x4180b9[_0x47624f(0xc7)]['every'](isPositiveInteger)&&new Set(_0x4180b9[_0x47624f(0xc7)])[_0x47624f(0x8c)]===_0x4180b9['deleteOrder'][_0x47624f(0x8f)]&&_0x4180b9[_0x47624f(0xc4)][_0x47624f(0xc9)]((_0x533f60,_0x15d912)=>_0x533f60['id']===_0x4180b9[_0x47624f(0xc7)][_0x15d912])&&_0x4180b9[_0x47624f(0xc4)][_0x4180b9['targets']['length']-0x1]?.['id']===_0x4180b9['target']['id']&&isRecord(_0x4180b9['cascade'])&&Array[_0x47624f(0xad)](_0x4180b9[_0x47624f(0xd8)][_0x47624f(0xdd)])&&_0x4180b9['cascade'][_0x47624f(0xdd)][_0x47624f(0xc9)](isPositiveInteger)&&typeof _0x4180b9[_0x47624f(0xd8)][_0x47624f(0x7c)]===_0x47624f(0xd1)&&Array['isArray'](_0x4180b9['warnings'])&&_0x4180b9[_0x47624f(0x8b)][_0x47624f(0xc9)](_0x254aa3=>typeof _0x254aa3==='string');}function isMenuFact(_0x387eb3){const _0x1002e0=a119_0x5259fa;if(!isRecord(_0x387eb3))return![];return isPositiveInteger(_0x387eb3['id'])&&(_0x387eb3['parentId']===null||isPositiveInteger(_0x387eb3[_0x1002e0(0xb9)]))&&Number[_0x1002e0(0xc5)](_0x387eb3[_0x1002e0(0xbf)])&&_0x387eb3[_0x1002e0(0xbf)]>=0x0&&typeof _0x387eb3['label']===_0x1002e0(0xac)&&typeof _0x387eb3[_0x1002e0(0xb1)]==='string'&&typeof _0x387eb3['type']===_0x1002e0(0xac)&&(_0x387eb3[_0x1002e0(0x77)]===null||typeof _0x387eb3[_0x1002e0(0x77)]===_0x1002e0(0xd1))&&(_0x387eb3[_0x1002e0(0x88)]===null||Number['isInteger'](_0x387eb3[_0x1002e0(0x88)]))&&Array[_0x1002e0(0xad)](_0x387eb3['resources'])&&_0x387eb3[_0x1002e0(0x93)][_0x1002e0(0xc9)](_0x4c7fa2=>typeof _0x4c7fa2===_0x1002e0(0xac))&&typeof _0x387eb3[_0x1002e0(0xa2)]===_0x1002e0(0xd1)&&Array[_0x1002e0(0xad)](_0x387eb3[_0x1002e0(0xca)])&&_0x387eb3[_0x1002e0(0xca)][_0x1002e0(0xc9)](isPositiveInteger)&&Number[_0x1002e0(0xc5)](_0x387eb3[_0x1002e0(0xb4)])&&_0x387eb3['childrenCount']>=0x0&&(_0x387eb3[_0x1002e0(0xaa)]===null||isPositiveInteger(_0x387eb3[_0x1002e0(0xaa)]))&&typeof _0x387eb3[_0x1002e0(0xb2)]===_0x1002e0(0xac)&&typeof _0x387eb3[_0x1002e0(0xa7)]===_0x1002e0(0xac)&&(_0x387eb3[_0x1002e0(0x7e)]===null||isPositiveInteger(_0x387eb3['datasetId']))&&typeof _0x387eb3[_0x1002e0(0xcc)]==='string'&&(_0x387eb3[_0x1002e0(0xa4)]===null||typeof _0x387eb3[_0x1002e0(0xa4)]==='string')&&(_0x387eb3[_0x1002e0(0x9c)]===null||typeof _0x387eb3['updateUserName']===_0x1002e0(0xac))&&(_0x387eb3[_0x1002e0(0xb8)]===null||typeof _0x387eb3[_0x1002e0(0xb8)]===_0x1002e0(0xac)||typeof _0x387eb3[_0x1002e0(0xb8)]===_0x1002e0(0x7b))&&(_0x387eb3['extend']===undefined||_0x387eb3[_0x1002e0(0x87)]===null||isRecord(_0x387eb3[_0x1002e0(0x87)]));}function isTargetFingerprint(_0x31eaea){const _0x40446f=a119_0x5259fa;if(!isRecord(_0x31eaea))return![];return isPositiveInteger(_0x31eaea['id'])&&(_0x31eaea[_0x40446f(0xb9)]===null||isPositiveInteger(_0x31eaea[_0x40446f(0xb9)]))&&Number[_0x40446f(0xc5)](_0x31eaea['depth'])&&_0x31eaea[_0x40446f(0xbf)]>=0x0&&typeof _0x31eaea[_0x40446f(0x92)]===_0x40446f(0xac)&&typeof _0x31eaea[_0x40446f(0xb1)]===_0x40446f(0xac)&&typeof _0x31eaea[_0x40446f(0xd5)]===_0x40446f(0xac)&&(_0x31eaea[_0x40446f(0x77)]===null||typeof _0x31eaea[_0x40446f(0x77)]==='boolean')&&(_0x31eaea['sort']===null||Number[_0x40446f(0xc5)](_0x31eaea[_0x40446f(0x88)]))&&(_0x31eaea[_0x40446f(0xaa)]===null||isPositiveInteger(_0x31eaea[_0x40446f(0xaa)]))&&typeof _0x31eaea[_0x40446f(0xb2)]==='string'&&typeof _0x31eaea['modelType']==='string'&&(_0x31eaea[_0x40446f(0x7e)]===null||isPositiveInteger(_0x31eaea[_0x40446f(0x7e)]))&&typeof _0x31eaea[_0x40446f(0xcc)]===_0x40446f(0xac)&&Array[_0x40446f(0xad)](_0x31eaea[_0x40446f(0xca)])&&_0x31eaea[_0x40446f(0xca)][_0x40446f(0xc9)](isPositiveInteger)&&Number[_0x40446f(0xc5)](_0x31eaea[_0x40446f(0xb4)])&&_0x31eaea[_0x40446f(0xb4)]>=0x0&&typeof _0x31eaea[_0x40446f(0xa2)]===_0x40446f(0xd1)&&typeof _0x31eaea['resourcesHash']===_0x40446f(0xac)&&/^[a-f0-9]{64}$/[_0x40446f(0x96)](_0x31eaea[_0x40446f(0x86)])&&typeof _0x31eaea[_0x40446f(0xa3)]===_0x40446f(0xac)&&/^[a-f0-9]{64}$/[_0x40446f(0x96)](_0x31eaea[_0x40446f(0xa3)])&&(_0x31eaea[_0x40446f(0xb8)]===null||typeof _0x31eaea[_0x40446f(0xb8)]===_0x40446f(0xac)||typeof _0x31eaea[_0x40446f(0xb8)]===_0x40446f(0x7b));}function a119_0x22ed(){const _0x10a798=['parse','createdAt','stringify','targets','isInteger','\x20requires\x20a\x20non-empty\x20file\x20path.','deleteOrder','selector','every','childrenIds','169358QFOtDP','datasetCode','963IkmtKw','\x20of\x20the\x20','target','1pFYAFy','boolean','Menu\x20delete\x20plan\x20is\x20not\x20valid\x20JSON:\x20','digest','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out;\x20do\x20not\x20edit\x20target\x20fields\x20manually.','type','targetFingerprints','\x20no\x20longer\x20matches\x20the\x20reviewed\x20target\x20facts.','cascade','Generate\x20a\x20new\x20plan\x20and\x20review\x20parent,\x20path,\x20page,\x20children,\x20resources,\x20and\x20update\x20time.','Menu\x20delete\x20plan\x20expired\x20at\x20','snapshotHash','toISOString','pages','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out\x20and\x20review\x20the\x20latest\x20cascade.','expiresAt','14448fdPawa','plan-out','visible','Menu\x20delete\x20plan\x20is\x20too\x20large:\x20','POST','isFinite','number','pageSchemaAffected','Refusing\x20to\x20overwrite\x20existing\x20menu\x20delete\x20plan:\x20','datasetId','Menu\x20delete\x20plan\x20does\x20not\x20match\x20version\x20','message','before','6891790AHZeCg','Generate\x20a\x20new\x20plan\x20on\x20a\x20machine\x20with\x20a\x20correct\x20system\x20clock.','batch-delete-menu','/smartapi/menu/batchDelete','resourcesHash','extend','sort','isSafeInteger','Menu\x20delete\x20plan\x20has\x20invalid\x20timestamps.','warnings','size','code','map','length','Menu\x20delete\x20plan\x20target\x20facts\x20do\x20not\x20match\x20its\x20immutable\x20fingerprint.','1658065joVgIa','label','resources',',\x20current\x20app\x20is\x20','appCode','test','Choose\x20a\x20new\x20--plan-out\x20path\x20so\x20the\x20reviewed\x20plan\x20remains\x20immutable.','menu_plan_app_mismatch','get','menu_plan_expired','Cannot\x20create\x20a\x20menu\x20delete\x20plan\x20without\x20an\x20exact\x20target\x20snapshot.','updateUserName','getTime','hash','recursive','\x20is\x20in\x20the\x20future.','menu_plan_write_failed','resourcesValid','extendHash','updateUserId','967700LUilLP','targetFingerprint','modelType','Cannot\x20read\x20menu\x20delete\x20plan\x20','Generate\x20and\x20review\x20a\x20new\x20plan\x20before\x20deleting.','pageId','Failed\x20to\x20write\x20menu\x20delete\x20plan\x20','string','isArray','Planned\x20menu\x20','menu_plan_invalid','1257319AUIXCq','path','pageType','Menu\x20delete\x20plan\x20target\x20list\x20does\x20not\x20match\x20its\x20immutable\x20fingerprints.','childrenCount','utf8','menu\x20delete','object','updateTime','parentId','\x20contract.','\x20is\x20no\x20longer\x20present\x20in\x20the\x20online\x20menu\x20tree.','239307AkuWBG','\x20bytes.','6RYBZEu','depth','menu_state_drift'];a119_0x22ed=function(){return _0x10a798;};return a119_0x22ed();}function isRecord(_0x5eb29c){const _0x275e62=a119_0x5259fa;return typeof _0x5eb29c===_0x275e62(0xb7)&&_0x5eb29c!==null&&!Array['isArray'](_0x5eb29c);}function isPositiveInteger(_0x5cf8b5){const _0x2f6a21=a119_0x5259fa;return Number[_0x2f6a21(0x89)](_0x5cf8b5)&&Number(_0x5cf8b5)>0x0;}function errorMessage(_0x23f45b){const _0x47b277=a119_0x5259fa;return _0x23f45b instanceof Error?_0x23f45b[_0x47b277(0x80)]:String(_0x23f45b);}
|
|
1
|
+
const a119_0x2e12f8=a119_0x3fae;(function(_0x11fbbe,_0x4f9d88){const _0x1a70b5=a119_0x3fae,_0x2f55ee=_0x11fbbe();while(!![]){try{const _0x7918d9=-parseInt(_0x1a70b5(0x122))/0x1+parseInt(_0x1a70b5(0x152))/0x2+-parseInt(_0x1a70b5(0xf0))/0x3*(parseInt(_0x1a70b5(0x150))/0x4)+-parseInt(_0x1a70b5(0x114))/0x5+-parseInt(_0x1a70b5(0x100))/0x6*(-parseInt(_0x1a70b5(0x13a))/0x7)+-parseInt(_0x1a70b5(0x138))/0x8*(-parseInt(_0x1a70b5(0xf1))/0x9)+parseInt(_0x1a70b5(0xf6))/0xa*(parseInt(_0x1a70b5(0x12e))/0xb);if(_0x7918d9===_0x4f9d88)break;else _0x2f55ee['push'](_0x2f55ee['shift']());}catch(_0xf6293b){_0x2f55ee['push'](_0x2f55ee['shift']());}}}(a119_0x1890,0x1c5fa));import{createHash}from'node:crypto';import{mkdir,readFile,stat,writeFile}from'node:fs/promises';function a119_0x1890(){const _0x15c01a=['\x20no\x20longer\x20matches\x20the\x20reviewed\x20target\x20facts.','32QZyTpM','visible','2194cYGjFf','byId','/smartapi/menu/batchDelete','version','type','\x20is\x20in\x20the\x20future.','resourcesValid','batch-delete-menu','target','\x20is\x20no\x20longer\x20present\x20in\x20the\x20online\x20menu\x20tree.','31818bBbmTr','1944TjeiAw','toISOString','pageId','Menu\x20delete\x20plan\x20is\x20too\x20large:\x20','resources','10oQzGiq','Menu\x20delete\x20plan\x20expired\x20at\x20','depth','stringify','EEXIST','length','hash','extend','pageSchemaAffected','Menu\x20delete\x20plan\x20target\x20list\x20does\x20not\x20match\x20its\x20immutable\x20fingerprints.','510YQcmTr','Planned\x20menu\x20','\x20contract.','pageType','\x20requires\x20a\x20non-empty\x20file\x20path.','createdAt','extendHash','boolean','menu_plan_expired','expiresAt','\x20bytes.','number','parse','get','childrenCount','warnings','utf8','modelType','Menu\x20delete\x20plan\x20targets\x20app\x20','every','669015DzMbsr','isFinite','snapshotHash','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out;\x20do\x20not\x20edit\x20target\x20fields\x20manually.','deleteOrder','test','menu_plan_app_mismatch','sort','isArray','updateTime','path','Menu\x20delete\x20plan\x20creation\x20time\x20','selector','recursive','53745oFyVao','targetFingerprints','datasetCode','string','cascade','Generate\x20and\x20review\x20a\x20new\x20plan\x20before\x20deleting.','parentId','label','Generate\x20a\x20new\x20plan\x20on\x20a\x20machine\x20with\x20a\x20correct\x20system\x20clock.','resourcesHash','menu\x20delete','digest','604230ZaLyqP','before','Refusing\x20to\x20overwrite\x20existing\x20menu\x20delete\x20plan:\x20','menu_state_drift',',\x20current\x20app\x20is\x20','childrenIds','POST','hex','map','pages','6176SWBOrH','size','13657HoVaOO','code','targets','Online\x20menu\x20state\x20changed\x20after\x20the\x20delete\x20plan\x20was\x20reviewed.','Menu\x20delete\x20plan\x20does\x20not\x20match\x20version\x20','datasetId','appCode','menu_plan_invalid','update','Menu\x20delete\x20plan\x20is\x20not\x20valid\x20JSON:\x20','isSafeInteger','command','isInteger','delete','menu_plan_write_failed','targetFingerprint','updateUserName','plan','\x20of\x20the\x20','getTime','Failed\x20to\x20write\x20menu\x20delete\x20plan\x20'];a119_0x1890=function(){return _0x15c01a;};return a119_0x1890();}import{dirname,resolve}from'node:path';import{menuError,mutationResult}from'../../../commands/menu/shared/mutations.js';const PLAN_VERSION=0x2,PLAN_COMMAND=a119_0x2e12f8(0x12c),PLAN_TTL_MS=0x1e*0x3c*0x3e8,MAX_PLAN_BYTES=0x400*0x400;export function createMenuDeletePlanFile(_0x3f4bc6,_0x1ea0cf,_0x429a3c=new Date()){const _0x3bc555=a119_0x2e12f8;if(!_0x1ea0cf[_0x3bc555(0x12f)]||!isMenuFact(_0x1ea0cf['before']))throw menuError(_0x3bc555(0x141),'Cannot\x20create\x20a\x20menu\x20delete\x20plan\x20without\x20an\x20exact\x20target\x20snapshot.');const _0x21b96b=_0x1ea0cf['targets']?.[_0x3bc555(0xfb)]?_0x1ea0cf[_0x3bc555(0x13c)]:[_0x1ea0cf[_0x3bc555(0x12f)]],_0x267dbd=_0x1ea0cf[_0x3bc555(0x118)]?.['length']?_0x1ea0cf[_0x3bc555(0x118)]:_0x21b96b[_0x3bc555(0x136)](_0x4e7c99=>_0x4e7c99['id']);return{'version':PLAN_VERSION,'command':PLAN_COMMAND,'appCode':_0x3f4bc6,'createdAt':_0x429a3c[_0x3bc555(0xf2)](),'expiresAt':new Date(_0x429a3c[_0x3bc555(0x14d)]()+PLAN_TTL_MS)[_0x3bc555(0xf2)](),'snapshotHash':_0x1ea0cf[_0x3bc555(0x116)],'recursive':_0x1ea0cf[_0x3bc555(0x120)][_0x3bc555(0x121)]===!![],'target':_0x1ea0cf[_0x3bc555(0x12f)],'targetFingerprint':fingerprint(_0x1ea0cf[_0x3bc555(0x12f)]),'targets':_0x21b96b,'targetFingerprints':_0x21b96b[_0x3bc555(0x136)](fingerprint),'deleteOrder':_0x267dbd,'cascade':_0x1ea0cf[_0x3bc555(0x126)]??{'pages':_0x1ea0cf[_0x3bc555(0x12f)][_0x3bc555(0xf3)]==null?[]:[_0x1ea0cf[_0x3bc555(0x12f)][_0x3bc555(0xf3)]],'pageSchemaAffected':_0x1ea0cf[_0x3bc555(0x12f)][_0x3bc555(0xf3)]!=null},'warnings':[..._0x1ea0cf[_0x3bc555(0x10f)]]};}function a119_0x3fae(_0x5f2927,_0x5885ef){_0x5f2927=_0x5f2927-0xef;const _0x189014=a119_0x1890();let _0x3fae20=_0x189014[_0x5f2927];return _0x3fae20;}export async function writeMenuDeletePlan(_0x2d3611,_0x28d83d){const _0x5a45fa=a119_0x2e12f8,_0x47a9ed=resolvePlanPath(_0x2d3611,'plan-out');await mkdir(dirname(_0x47a9ed),{'recursive':!![]});try{await writeFile(_0x47a9ed,JSON[_0x5a45fa(0xf9)](_0x28d83d,null,0x2)+'\x0a',{'encoding':'utf8','flag':'wx'});}catch(_0x565823){if(_0x565823[_0x5a45fa(0x13b)]===_0x5a45fa(0xfa))throw menuError('menu_plan_file_exists',_0x5a45fa(0x130)+_0x47a9ed,'Choose\x20a\x20new\x20--plan-out\x20path\x20so\x20the\x20reviewed\x20plan\x20remains\x20immutable.');throw menuError(_0x5a45fa(0x148),_0x5a45fa(0x14e)+_0x47a9ed+':\x20'+errorMessage(_0x565823));}return _0x47a9ed;}export async function readMenuDeletePlan(_0x3e6724){const _0x42697d=a119_0x2e12f8,_0x6a9eef=resolvePlanPath(_0x3e6724,_0x42697d(0x14b));let _0x5d5297;try{_0x5d5297=(await stat(_0x6a9eef))[_0x42697d(0x139)];}catch(_0x288f2a){throw menuError('menu_plan_invalid','Cannot\x20read\x20menu\x20delete\x20plan\x20'+_0x6a9eef+':\x20'+errorMessage(_0x288f2a));}if(_0x5d5297>MAX_PLAN_BYTES)throw menuError('menu_plan_invalid',_0x42697d(0xf4)+_0x5d5297+_0x42697d(0x10a));let _0x49c2f0;try{_0x49c2f0=JSON[_0x42697d(0x10c)](await readFile(_0x6a9eef,_0x42697d(0x110)));}catch(_0x12211d){throw menuError(_0x42697d(0x141),_0x42697d(0x143)+errorMessage(_0x12211d));}if(!isMenuDeletePlanFile(_0x49c2f0))throw menuError(_0x42697d(0x141),_0x42697d(0x13e)+PLAN_VERSION+_0x42697d(0x14c)+PLAN_COMMAND+_0x42697d(0x102));if(!sameFingerprint(_0x49c2f0[_0x42697d(0x149)],fingerprint(_0x49c2f0[_0x42697d(0x15a)])))throw menuError(_0x42697d(0x141),'Menu\x20delete\x20plan\x20target\x20facts\x20do\x20not\x20match\x20its\x20immutable\x20fingerprint.',_0x42697d(0x117));if(!_0x49c2f0[_0x42697d(0x13c)][_0x42697d(0x113)]((_0x14ac4e,_0x41654d)=>sameFingerprint(_0x49c2f0[_0x42697d(0x123)][_0x41654d],fingerprint(_0x14ac4e)))||!sameFingerprint(_0x49c2f0[_0x42697d(0x149)],fingerprint(_0x49c2f0['targets'][_0x49c2f0[_0x42697d(0x13c)]['length']-0x1])))throw menuError(_0x42697d(0x141),_0x42697d(0xff),_0x42697d(0x117));return{'path':_0x6a9eef,'plan':_0x49c2f0};}export function mutationPlanFromDeleteFile(_0x178b68,_0x493121){const _0x43cb10=a119_0x2e12f8;return mutationResult({'operation':_0x43cb10(0x147),'selector':{'id':_0x178b68[_0x43cb10(0x15a)]['id'],'recursive':_0x178b68[_0x43cb10(0x121)]},'before':_0x178b68[_0x43cb10(0x15a)],'after':null,'dryRun':![],'backend':[{'method':'POST','path':_0x43cb10(0x154)}],'plannedActions':[{'stage':_0x43cb10(0x159),'method':_0x43cb10(0x134),'path':_0x43cb10(0x154),'body':{'idList':_0x178b68[_0x43cb10(0x118)]}}],'targets':_0x178b68['targets'],'deleteOrder':_0x178b68['deleteOrder'],'snapshotHash':_0x178b68['snapshotHash'],'cascade':_0x178b68[_0x43cb10(0x126)],'planFile':{'path':_0x493121,'createdAt':_0x178b68['createdAt'],'expiresAt':_0x178b68[_0x43cb10(0x109)]},'warnings':_0x178b68[_0x43cb10(0x10f)]});}export function assertMenuDeletePlanCurrent(_0x1b9f47,_0x5e2811,_0x4a910,_0x50eb45=new Date()){const _0x1499e3=a119_0x2e12f8;assertMenuDeletePlanExecutable(_0x1b9f47,_0x5e2811,_0x50eb45);if(_0x4a910[_0x1499e3(0xfc)]!==_0x1b9f47[_0x1499e3(0x116)])throw menuError(_0x1499e3(0x131),_0x1499e3(0x13d),'Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out\x20and\x20review\x20the\x20latest\x20cascade.');return _0x1b9f47['targets']['map']((_0x2c1f35,_0x53cdf5)=>{const _0x310d99=_0x1499e3,_0x2e324d=_0x4a910[_0x310d99(0x153)][_0x310d99(0x10d)](_0x2c1f35['id']);if(!_0x2e324d)throw menuError(_0x310d99(0x131),_0x310d99(0x101)+_0x2c1f35['id']+_0x310d99(0xef));if(!sameFingerprint(_0x1b9f47[_0x310d99(0x123)][_0x53cdf5],fingerprint(_0x2e324d)))throw menuError('menu_state_drift',_0x310d99(0x101)+_0x2c1f35['id']+_0x310d99(0x14f),'Generate\x20a\x20new\x20plan\x20and\x20review\x20parent,\x20path,\x20page,\x20children,\x20resources,\x20and\x20update\x20time.');return _0x2e324d;});}export function assertMenuDeletePlanExecutable(_0x47d003,_0x51208d,_0x99f029=new Date()){const _0x2a0abe=a119_0x2e12f8;if(_0x47d003[_0x2a0abe(0x140)]!==_0x51208d)throw menuError(_0x2a0abe(0x11a),_0x2a0abe(0x112)+JSON[_0x2a0abe(0xf9)](_0x47d003[_0x2a0abe(0x140)])+_0x2a0abe(0x132)+JSON[_0x2a0abe(0xf9)](_0x51208d)+'.');const _0x8faa98=Date[_0x2a0abe(0x10c)](_0x47d003[_0x2a0abe(0x105)]),_0x1a1395=Date[_0x2a0abe(0x10c)](_0x47d003[_0x2a0abe(0x109)]);if(!Number['isFinite'](_0x8faa98)||!Number[_0x2a0abe(0x115)](_0x1a1395)||_0x1a1395-_0x8faa98!==PLAN_TTL_MS)throw menuError(_0x2a0abe(0x141),'Menu\x20delete\x20plan\x20has\x20invalid\x20timestamps.');if(_0x8faa98>_0x99f029[_0x2a0abe(0x14d)]())throw menuError(_0x2a0abe(0x141),_0x2a0abe(0x11f)+_0x47d003[_0x2a0abe(0x105)]+_0x2a0abe(0x157),_0x2a0abe(0x12a));if(_0x99f029[_0x2a0abe(0x14d)]()>_0x1a1395)throw menuError(_0x2a0abe(0x108),_0x2a0abe(0xf7)+_0x47d003[_0x2a0abe(0x109)]+'.',_0x2a0abe(0x127));}function fingerprint(_0x5227a4){const _0x215df5=a119_0x2e12f8;return{'id':_0x5227a4['id'],'parentId':_0x5227a4[_0x215df5(0x128)],'depth':_0x5227a4[_0x215df5(0xf8)],'label':_0x5227a4[_0x215df5(0x129)],'path':_0x5227a4[_0x215df5(0x11e)],'type':_0x5227a4[_0x215df5(0x156)],'visible':_0x5227a4[_0x215df5(0x151)],'sort':_0x5227a4[_0x215df5(0x11b)],'pageId':_0x5227a4[_0x215df5(0xf3)],'pageType':_0x5227a4[_0x215df5(0x103)],'modelType':_0x5227a4[_0x215df5(0x111)],'datasetId':_0x5227a4[_0x215df5(0x13f)],'datasetCode':_0x5227a4[_0x215df5(0x124)],'childrenIds':[..._0x5227a4[_0x215df5(0x133)]],'childrenCount':_0x5227a4[_0x215df5(0x10e)],'resourcesValid':_0x5227a4[_0x215df5(0x158)],'resourcesHash':hashValue(_0x5227a4['resources']),'extendHash':hashValue(_0x5227a4['extend']??null),'updateTime':_0x5227a4[_0x215df5(0x11d)]};}function hashValue(_0x599ae8){const _0x5a7a52=a119_0x2e12f8;return createHash('sha256')[_0x5a7a52(0x142)](JSON[_0x5a7a52(0xf9)](_0x599ae8))[_0x5a7a52(0x12d)](_0x5a7a52(0x135));}function sameFingerprint(_0x114350,_0x497c85){const _0x4b6e7d=a119_0x2e12f8;return JSON[_0x4b6e7d(0xf9)](_0x114350)===JSON[_0x4b6e7d(0xf9)](_0x497c85);}function resolvePlanPath(_0x553ed9,_0x369a8b){const _0x251929=a119_0x2e12f8,_0x4c95ec=_0x553ed9['trim']();if(!_0x4c95ec)throw menuError(_0x251929(0x141),'--'+_0x369a8b+_0x251929(0x104));return resolve(_0x4c95ec);}function isMenuDeletePlanFile(_0xc85d77){const _0x4bc256=a119_0x2e12f8;if(!isRecord(_0xc85d77))return![];return _0xc85d77[_0x4bc256(0x155)]===PLAN_VERSION&&_0xc85d77[_0x4bc256(0x145)]===PLAN_COMMAND&&typeof _0xc85d77[_0x4bc256(0x140)]===_0x4bc256(0x125)&&_0xc85d77[_0x4bc256(0x140)][_0x4bc256(0xfb)]>0x0&&typeof _0xc85d77['createdAt']===_0x4bc256(0x125)&&typeof _0xc85d77[_0x4bc256(0x109)]===_0x4bc256(0x125)&&typeof _0xc85d77[_0x4bc256(0x116)]===_0x4bc256(0x125)&&/^sha256:[a-f0-9]{64}$/[_0x4bc256(0x119)](_0xc85d77[_0x4bc256(0x116)])&&typeof _0xc85d77[_0x4bc256(0x121)]===_0x4bc256(0x107)&&isMenuFact(_0xc85d77['target'])&&isTargetFingerprint(_0xc85d77[_0x4bc256(0x149)])&&Array[_0x4bc256(0x11c)](_0xc85d77[_0x4bc256(0x13c)])&&_0xc85d77[_0x4bc256(0x13c)][_0x4bc256(0xfb)]>0x0&&_0xc85d77['targets'][_0x4bc256(0x113)](isMenuFact)&&Array['isArray'](_0xc85d77[_0x4bc256(0x123)])&&_0xc85d77['targetFingerprints'][_0x4bc256(0xfb)]===_0xc85d77[_0x4bc256(0x13c)]['length']&&_0xc85d77[_0x4bc256(0x123)]['every'](isTargetFingerprint)&&Array[_0x4bc256(0x11c)](_0xc85d77['deleteOrder'])&&_0xc85d77[_0x4bc256(0x118)]['length']===_0xc85d77[_0x4bc256(0x13c)][_0x4bc256(0xfb)]&&_0xc85d77[_0x4bc256(0x118)][_0x4bc256(0x113)](isPositiveInteger)&&new Set(_0xc85d77[_0x4bc256(0x118)])[_0x4bc256(0x139)]===_0xc85d77[_0x4bc256(0x118)][_0x4bc256(0xfb)]&&_0xc85d77[_0x4bc256(0x13c)][_0x4bc256(0x113)]((_0xa539d2,_0x3d556e)=>_0xa539d2['id']===_0xc85d77[_0x4bc256(0x118)][_0x3d556e])&&_0xc85d77[_0x4bc256(0x13c)][_0xc85d77[_0x4bc256(0x13c)]['length']-0x1]?.['id']===_0xc85d77[_0x4bc256(0x15a)]['id']&&isRecord(_0xc85d77[_0x4bc256(0x126)])&&Array[_0x4bc256(0x11c)](_0xc85d77['cascade'][_0x4bc256(0x137)])&&_0xc85d77[_0x4bc256(0x126)]['pages'][_0x4bc256(0x113)](isPositiveInteger)&&typeof _0xc85d77['cascade'][_0x4bc256(0xfe)]==='boolean'&&Array[_0x4bc256(0x11c)](_0xc85d77[_0x4bc256(0x10f)])&&_0xc85d77['warnings'][_0x4bc256(0x113)](_0x1c6524=>typeof _0x1c6524===_0x4bc256(0x125));}function isMenuFact(_0x356e6f){const _0x55f8c5=a119_0x2e12f8;if(!isRecord(_0x356e6f))return![];return isPositiveInteger(_0x356e6f['id'])&&(_0x356e6f[_0x55f8c5(0x128)]===null||isPositiveInteger(_0x356e6f['parentId']))&&Number[_0x55f8c5(0x146)](_0x356e6f[_0x55f8c5(0xf8)])&&_0x356e6f[_0x55f8c5(0xf8)]>=0x0&&typeof _0x356e6f[_0x55f8c5(0x129)]===_0x55f8c5(0x125)&&typeof _0x356e6f[_0x55f8c5(0x11e)]===_0x55f8c5(0x125)&&typeof _0x356e6f[_0x55f8c5(0x156)]===_0x55f8c5(0x125)&&(_0x356e6f[_0x55f8c5(0x151)]===null||typeof _0x356e6f[_0x55f8c5(0x151)]===_0x55f8c5(0x107))&&(_0x356e6f[_0x55f8c5(0x11b)]===null||Number[_0x55f8c5(0x146)](_0x356e6f[_0x55f8c5(0x11b)]))&&Array['isArray'](_0x356e6f[_0x55f8c5(0xf5)])&&_0x356e6f[_0x55f8c5(0xf5)]['every'](_0x48618a=>typeof _0x48618a===_0x55f8c5(0x125))&&typeof _0x356e6f[_0x55f8c5(0x158)]===_0x55f8c5(0x107)&&Array[_0x55f8c5(0x11c)](_0x356e6f[_0x55f8c5(0x133)])&&_0x356e6f['childrenIds'][_0x55f8c5(0x113)](isPositiveInteger)&&Number[_0x55f8c5(0x146)](_0x356e6f['childrenCount'])&&_0x356e6f[_0x55f8c5(0x10e)]>=0x0&&(_0x356e6f[_0x55f8c5(0xf3)]===null||isPositiveInteger(_0x356e6f[_0x55f8c5(0xf3)]))&&typeof _0x356e6f[_0x55f8c5(0x103)]==='string'&&typeof _0x356e6f[_0x55f8c5(0x111)]==='string'&&(_0x356e6f[_0x55f8c5(0x13f)]===null||isPositiveInteger(_0x356e6f[_0x55f8c5(0x13f)]))&&typeof _0x356e6f[_0x55f8c5(0x124)]==='string'&&(_0x356e6f['updateUserId']===null||typeof _0x356e6f['updateUserId']==='string')&&(_0x356e6f[_0x55f8c5(0x14a)]===null||typeof _0x356e6f[_0x55f8c5(0x14a)]===_0x55f8c5(0x125))&&(_0x356e6f[_0x55f8c5(0x11d)]===null||typeof _0x356e6f[_0x55f8c5(0x11d)]==='string'||typeof _0x356e6f[_0x55f8c5(0x11d)]==='number')&&(_0x356e6f[_0x55f8c5(0xfd)]===undefined||_0x356e6f[_0x55f8c5(0xfd)]===null||isRecord(_0x356e6f[_0x55f8c5(0xfd)]));}function isTargetFingerprint(_0x3d8c02){const _0x1a132d=a119_0x2e12f8;if(!isRecord(_0x3d8c02))return![];return isPositiveInteger(_0x3d8c02['id'])&&(_0x3d8c02['parentId']===null||isPositiveInteger(_0x3d8c02['parentId']))&&Number['isInteger'](_0x3d8c02[_0x1a132d(0xf8)])&&_0x3d8c02[_0x1a132d(0xf8)]>=0x0&&typeof _0x3d8c02[_0x1a132d(0x129)]==='string'&&typeof _0x3d8c02['path']===_0x1a132d(0x125)&&typeof _0x3d8c02[_0x1a132d(0x156)]==='string'&&(_0x3d8c02['visible']===null||typeof _0x3d8c02[_0x1a132d(0x151)]===_0x1a132d(0x107))&&(_0x3d8c02[_0x1a132d(0x11b)]===null||Number[_0x1a132d(0x146)](_0x3d8c02['sort']))&&(_0x3d8c02[_0x1a132d(0xf3)]===null||isPositiveInteger(_0x3d8c02['pageId']))&&typeof _0x3d8c02[_0x1a132d(0x103)]===_0x1a132d(0x125)&&typeof _0x3d8c02[_0x1a132d(0x111)]===_0x1a132d(0x125)&&(_0x3d8c02[_0x1a132d(0x13f)]===null||isPositiveInteger(_0x3d8c02[_0x1a132d(0x13f)]))&&typeof _0x3d8c02[_0x1a132d(0x124)]==='string'&&Array['isArray'](_0x3d8c02['childrenIds'])&&_0x3d8c02['childrenIds']['every'](isPositiveInteger)&&Number[_0x1a132d(0x146)](_0x3d8c02[_0x1a132d(0x10e)])&&_0x3d8c02[_0x1a132d(0x10e)]>=0x0&&typeof _0x3d8c02['resourcesValid']===_0x1a132d(0x107)&&typeof _0x3d8c02[_0x1a132d(0x12b)]===_0x1a132d(0x125)&&/^[a-f0-9]{64}$/[_0x1a132d(0x119)](_0x3d8c02[_0x1a132d(0x12b)])&&typeof _0x3d8c02[_0x1a132d(0x106)]===_0x1a132d(0x125)&&/^[a-f0-9]{64}$/['test'](_0x3d8c02[_0x1a132d(0x106)])&&(_0x3d8c02[_0x1a132d(0x11d)]===null||typeof _0x3d8c02[_0x1a132d(0x11d)]===_0x1a132d(0x125)||typeof _0x3d8c02[_0x1a132d(0x11d)]===_0x1a132d(0x10b));}function isRecord(_0xf11952){const _0x285ef=a119_0x2e12f8;return typeof _0xf11952==='object'&&_0xf11952!==null&&!Array[_0x285ef(0x11c)](_0xf11952);}function isPositiveInteger(_0x50fde0){const _0xdbc938=a119_0x2e12f8;return Number[_0xdbc938(0x144)](_0x50fde0)&&Number(_0x50fde0)>0x0;}function errorMessage(_0x2b06bd){return _0x2b06bd instanceof Error?_0x2b06bd['message']:String(_0x2b06bd);}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { MenuFact, MenuListItem, MenuSnapshot, ProcessedMenuItem } from "../../../commands/menu/shared/types.js";
|
|
2
|
+
import type { MenuTreeRecord } from "../../../core/api-client.js";
|
|
3
|
+
export declare function fetchMenuSnapshot(appCode: string, cookie: string, options?: {
|
|
4
|
+
verbose?: boolean;
|
|
5
|
+
}): Promise<MenuSnapshot>;
|
|
6
|
+
export declare function buildMenuSnapshot(items: MenuTreeRecord[], options?: {
|
|
7
|
+
verbose?: boolean;
|
|
8
|
+
}): MenuSnapshot;
|
|
9
|
+
export declare function toProcessedMenuItem(menu: MenuFact): ProcessedMenuItem;
|
|
10
|
+
export declare function toMenuListItem(menu: MenuFact): MenuListItem;
|
|
11
|
+
export declare function getChildren(snapshot: MenuSnapshot, parentId: number | null): MenuFact[];
|
|
12
|
+
export declare function normalizeResources(value: unknown): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5f33b3,_0x24ae78){const _0x13c235=a120_0x3424,_0x25d926=_0x5f33b3();while(!![]){try{const _0x1a7753=-parseInt(_0x13c235(0xe3))/0x1*(parseInt(_0x13c235(0xfd))/0x2)+-parseInt(_0x13c235(0xf4))/0x3*(-parseInt(_0x13c235(0xd1))/0x4)+-parseInt(_0x13c235(0xe5))/0x5+parseInt(_0x13c235(0xd7))/0x6+-parseInt(_0x13c235(0xe6))/0x7+parseInt(_0x13c235(0xfe))/0x8*(parseInt(_0x13c235(0xef))/0x9)+parseInt(_0x13c235(0xe1))/0xa;if(_0x1a7753===_0x24ae78)break;else _0x25d926['push'](_0x25d926['shift']());}catch(_0x20d911){_0x25d926['push'](_0x25d926['shift']());}}}(a120_0x18c1,0x8e486));function a120_0x18c1(){const _0x3fd9c0=['908199kOJlJG','boolean','childrenIds','valid','sha256','3858msalxh','verbose','resources','path','pageType','length','stringify','visible','hex','50KtjIzn','8RESnXj','update','digest','filter','map','3164yOqicN','parentId','isArray','sort','isFinite','modelType','5901588ALwFiV','label','url','type','updateTime','string','updateUserId','depth','number','datasetCode','6774310iQXvfx','updateUserName','11243FuRAWx','item','4098145DwNkUF','7669704FXlQIL','extend','push','datasetId','pageId','parse','children','index','resourcesValid'];a120_0x18c1=function(){return _0x3fd9c0;};return a120_0x18c1();}import{createHash}from'node:crypto';import{getMenuTree}from'../../../core/api-client.js';export async function fetchMenuSnapshot(_0x43dd7b,_0xb30f17,_0x444f06={}){const _0x11cf00=a120_0x3424,_0x3a47b2=await getMenuTree(_0x43dd7b,_0xb30f17);return buildMenuSnapshot(Array[_0x11cf00(0xd3)](_0x3a47b2)?_0x3a47b2:[],_0x444f06);}function a120_0x3424(_0x2ac6c3,_0x154774){_0x2ac6c3=_0x2ac6c3-0xcd;const _0x18c1c6=a120_0x18c1();let _0x342496=_0x18c1c6[_0x2ac6c3];return _0x342496;}export function buildMenuSnapshot(_0x38bc4b,_0x225238={}){const _0xd620d5=a120_0x3424,_0x3204b1=flattenMenuItems(_0x38bc4b,{'verbose':_0x225238[_0xd620d5(0xf5)]===!![],'parentId':null,'depth':0x0}),_0xcf0a93=new Map(_0x3204b1[_0xd620d5(0xd0)](_0x5cd202=>[_0x5cd202['id'],_0x5cd202])),_0x4ecdef=createHash(_0xd620d5(0xf3))[_0xd620d5(0xcd)](JSON[_0xd620d5(0xfa)](_0x3204b1['map'](toHashInput)))[_0xd620d5(0xce)](_0xd620d5(0xfc));return{'total':_0x3204b1[_0xd620d5(0xf9)],'hash':'sha256:'+_0x4ecdef,'menus':_0x3204b1,'byId':_0xcf0a93};}export function toProcessedMenuItem(_0x21db7f){const _0x1bc951=a120_0x3424;return{'id':_0x21db7f['id'],'path':_0x21db7f[_0x1bc951(0xf7)],'label':_0x21db7f['label'],'resources':[..._0x21db7f['resources']],'extend':_0x21db7f[_0x1bc951(0xe7)]??null};}export function toMenuListItem(_0x1c6617){const {modelType:_0x12fbe1,datasetId:_0x199afd,datasetCode:_0x193d35,resourcesValid:_0x49d56b,..._0x28dd96}=_0x1c6617;return _0x28dd96;}export function getChildren(_0x2d7eee,_0x49dda9){const _0x3d3b2a=a120_0x3424;return _0x2d7eee['menus'][_0x3d3b2a(0xcf)](_0xd54949=>_0xd54949[_0x3d3b2a(0xd2)]===_0x49dda9);}function flattenMenuItems(_0x1b1068,_0x402617){const _0x278967=a120_0x3424,_0x15785c=sortMenuItems(_0x1b1068),_0x16b468=[];for(const _0x545f82 of _0x15785c){const _0xa32cd8=sortMenuItems(Array[_0x278967(0xd3)](_0x545f82[_0x278967(0xec)])?_0x545f82[_0x278967(0xec)]:[]);_0x16b468[_0x278967(0xe8)](toMenuFact(_0x545f82,_0xa32cd8,_0x402617)),_0xa32cd8[_0x278967(0xf9)]>0x0&&_0x16b468[_0x278967(0xe8)](...flattenMenuItems(_0xa32cd8,{'verbose':_0x402617[_0x278967(0xf5)],'parentId':_0x545f82['id'],'depth':_0x402617[_0x278967(0xde)]+0x1}));}return _0x16b468;}function sortMenuItems(_0x3d94df){const _0x5e166d=a120_0x3424;return _0x3d94df[_0x5e166d(0xd0)]((_0x4b181d,_0xcce4a3)=>({'item':_0x4b181d,'index':_0xcce4a3}))['sort']((_0x374634,_0xa0062f)=>{const _0x55cdb4=_0x5e166d,_0x366ddf=normalizeSort(_0x374634[_0x55cdb4(0xe4)]['sort']),_0xe1a3a5=normalizeSort(_0xa0062f['item'][_0x55cdb4(0xd4)]);if(_0x366ddf!==_0xe1a3a5)return _0x366ddf-_0xe1a3a5;return _0x374634[_0x55cdb4(0xed)]-_0xa0062f['index'];})[_0x5e166d(0xd0)](({item:_0x55a2d4})=>_0x55a2d4);}function toMenuFact(_0x28f8e2,_0x49b9a1,_0x5f22e3){const _0x5a5557=a120_0x3424,_0x3e9b5f=normalizeResourceValue(_0x28f8e2['extend']?.['resources']),_0x1c4038={'id':_0x28f8e2['id'],'parentId':_0x5f22e3[_0x5a5557(0xd2)],'depth':_0x5f22e3[_0x5a5557(0xde)],'label':normalizeString(_0x28f8e2['label']),'path':normalizeString(_0x28f8e2['path']),'url':normalizeString(_0x28f8e2[_0x5a5557(0xd9)]),'type':normalizeString(_0x28f8e2[_0x5a5557(0xda)]),'visible':typeof _0x28f8e2[_0x5a5557(0xfb)]===_0x5a5557(0xf0)?_0x28f8e2[_0x5a5557(0xfb)]:null,'sort':typeof _0x28f8e2[_0x5a5557(0xd4)]==='number'&&Number[_0x5a5557(0xd5)](_0x28f8e2['sort'])?_0x28f8e2['sort']:null,'resources':_0x3e9b5f['values'],'resourcesValid':_0x3e9b5f[_0x5a5557(0xf2)],'childrenIds':_0x49b9a1['map'](_0x27f0dc=>_0x27f0dc['id']),'childrenCount':_0x49b9a1[_0x5a5557(0xf9)],'pageId':normalizeNullableNumber(_0x28f8e2[_0x5a5557(0xea)]),'pageType':normalizeString(_0x28f8e2[_0x5a5557(0xf8)]),'modelType':normalizeString(_0x28f8e2['modelType']),'datasetId':normalizeNullableNumber(_0x28f8e2[_0x5a5557(0xe9)]),'datasetCode':normalizeString(_0x28f8e2[_0x5a5557(0xe0)]),'updateUserId':normalizeNullableString(_0x28f8e2['updateUserId']),'updateUserName':normalizeNullableString(_0x28f8e2['updateUserName']),'updateTime':normalizeNullableTimestamp(_0x28f8e2[_0x5a5557(0xdb)])};return _0x5f22e3[_0x5a5557(0xf5)]&&(_0x1c4038[_0x5a5557(0xe7)]=_0x28f8e2[_0x5a5557(0xe7)]??null),_0x1c4038;}function toHashInput(_0x49a3c1){const _0x32627c=a120_0x3424;return{'id':_0x49a3c1['id'],'parentId':_0x49a3c1['parentId'],'label':_0x49a3c1[_0x32627c(0xd8)],'path':_0x49a3c1[_0x32627c(0xf7)],'url':_0x49a3c1[_0x32627c(0xd9)],'type':_0x49a3c1[_0x32627c(0xda)],'visible':_0x49a3c1['visible'],'sort':_0x49a3c1[_0x32627c(0xd4)],'resources':_0x49a3c1[_0x32627c(0xf6)],'resourcesValid':_0x49a3c1[_0x32627c(0xee)],'childrenIds':_0x49a3c1[_0x32627c(0xf1)],'pageId':_0x49a3c1['pageId'],'pageType':_0x49a3c1[_0x32627c(0xf8)],'modelType':_0x49a3c1[_0x32627c(0xd6)],'datasetId':_0x49a3c1[_0x32627c(0xe9)],'datasetCode':_0x49a3c1['datasetCode'],'updateUserId':_0x49a3c1[_0x32627c(0xdd)],'updateUserName':_0x49a3c1[_0x32627c(0xe2)],'updateTime':_0x49a3c1[_0x32627c(0xdb)]};}function normalizeSort(_0x1e96c7){const _0x54d6df=a120_0x3424;return typeof _0x1e96c7===_0x54d6df(0xdf)&&Number[_0x54d6df(0xd5)](_0x1e96c7)?_0x1e96c7:Number['POSITIVE_INFINITY'];}function normalizeString(_0x2ef428){return typeof _0x2ef428==='string'?_0x2ef428:'';}function normalizeNullableNumber(_0x3e56f4){const _0x4ca1ac=a120_0x3424;return typeof _0x3e56f4===_0x4ca1ac(0xdf)&&Number[_0x4ca1ac(0xd5)](_0x3e56f4)?_0x3e56f4:null;}function normalizeNullableString(_0xed610e){return typeof _0xed610e==='string'&&_0xed610e['length']>0x0?_0xed610e:null;}function normalizeNullableTimestamp(_0x3ced69){const _0x5d25aa=a120_0x3424;if(typeof _0x3ced69==='string')return _0x3ced69[_0x5d25aa(0xf9)]>0x0?_0x3ced69:null;return typeof _0x3ced69==='number'&&Number[_0x5d25aa(0xd5)](_0x3ced69)?_0x3ced69:null;}export function normalizeResources(_0x37c06f){return normalizeResourceValue(_0x37c06f)['values'];}function normalizeResourceValue(_0x4b2fc4){const _0x5180ee=a120_0x3424;if(_0x4b2fc4==null)return{'values':[],'valid':!![]};if(Array[_0x5180ee(0xd3)](_0x4b2fc4))return{'values':_0x4b2fc4[_0x5180ee(0xd0)](String),'valid':!![]};if(typeof _0x4b2fc4!==_0x5180ee(0xdc))return{'values':[],'valid':![]};try{const _0x2114ee=JSON[_0x5180ee(0xeb)](_0x4b2fc4);return Array['isArray'](_0x2114ee)?{'values':_0x2114ee['map'](String),'valid':!![]}:{'values':[],'valid':![]};}catch{return{'values':[],'valid':![]};}}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* menu shared modules
|
|
3
|
+
*/
|
|
4
|
+
export * from "../../../commands/menu/shared/types.js";
|
|
5
|
+
export * from "../../../commands/menu/shared/logic.js";
|
|
6
|
+
export * from "../../../commands/menu/shared/compare-table.js";
|
|
7
|
+
export * from "../../../commands/menu/shared/inquirer.js";
|
|
8
|
+
export * from "../../../commands/menu/shared/valid-url.js";
|
|
9
|
+
export * from "../../../commands/menu/shared/local-pages.js";
|
|
10
|
+
export * from "../../../commands/menu/shared/service.js";
|
|
11
|
+
export * from "../../../commands/menu/shared/sync-core.js";
|
|
12
|
+
export * from "../../../commands/menu/shared/update-core.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a121_0x3ac9(){var _0x26f08f=['1497128GzoCwv','579219KwIBHF','36fxXAls','193215FAsTBu','982SNLiKw','354xjoKLW','377gGldwf','4ypjKol','7865yejgNu','1810278ouiVxN','1762550sGpXVL','14ZKrezz'];a121_0x3ac9=function(){return _0x26f08f;};return a121_0x3ac9();}(function(_0x3b6252,_0x1c40ce){var _0x4103ec=a121_0x5240,_0x39c94f=_0x3b6252();while(!![]){try{var _0x4d48b8=-parseInt(_0x4103ec(0x151))/0x1*(-parseInt(_0x4103ec(0x14f))/0x2)+parseInt(_0x4103ec(0x158))/0x3*(-parseInt(_0x4103ec(0x152))/0x4)+-parseInt(_0x4103ec(0x153))/0x5*(parseInt(_0x4103ec(0x150))/0x6)+-parseInt(_0x4103ec(0x156))/0x7*(-parseInt(_0x4103ec(0x157))/0x8)+-parseInt(_0x4103ec(0x154))/0x9+parseInt(_0x4103ec(0x155))/0xa+parseInt(_0x4103ec(0x14e))/0xb*(-parseInt(_0x4103ec(0x159))/0xc);if(_0x4d48b8===_0x1c40ce)break;else _0x39c94f['push'](_0x39c94f['shift']());}catch(_0x27f50c){_0x39c94f['push'](_0x39c94f['shift']());}}}(a121_0x3ac9,0x2fd57));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';function a121_0x5240(_0x4dfafa,_0x39d16a){_0x4dfafa=_0x4dfafa-0x14e;var _0x3ac90a=a121_0x3ac9();var _0x52408f=_0x3ac90a[_0x4dfafa];return _0x52408f;}export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Ora } from "ora";
|
|
2
|
+
import type { LocalPage } from "../../../commands/menu/shared/types.js";
|
|
3
|
+
export declare function startSpinner(text: string): Ora;
|
|
4
|
+
export declare function stopSpinner(spinner: Ora, text: string, success: boolean): void;
|
|
5
|
+
export declare function askConfirm(message: string): Promise<boolean>;
|
|
6
|
+
export declare function askJsUrl(defaultValue?: string): Promise<string>;
|
|
7
|
+
export declare function askCssUrl(defaultValue?: string): Promise<string>;
|
|
8
|
+
export declare function selectPages(pages: LocalPage[], onlinePaths: Set<string>): Promise<LocalPage[]>;
|
|
9
|
+
export declare function isInteractive(): boolean;
|
|
10
|
+
export declare function requireInteractive(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c3323,_0x4b3782){const _0x3b5427=a122_0x2243,_0x395696=_0x4c3323();while(!![]){try{const _0x3afadd=parseInt(_0x3b5427(0x12b))/0x1+parseInt(_0x3b5427(0x119))/0x2*(parseInt(_0x3b5427(0x11a))/0x3)+-parseInt(_0x3b5427(0x11d))/0x4+-parseInt(_0x3b5427(0x12c))/0x5+parseInt(_0x3b5427(0x115))/0x6*(parseInt(_0x3b5427(0x125))/0x7)+-parseInt(_0x3b5427(0x12e))/0x8+parseInt(_0x3b5427(0x114))/0x9;if(_0x3afadd===_0x4b3782)break;else _0x395696['push'](_0x395696['shift']());}catch(_0x35a3a3){_0x395696['push'](_0x395696['shift']());}}}(a122_0x4975,0x845ba));import a122_0x1be951 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a122_0x27a1e1 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';function a122_0x4975(){const _0x3ee19e=['error','gray','fail','green','filter','path','JS\x20URL\x20check\x20failed','\x20\x20Checking\x20JS\x20URL\x20reachability...','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','7134894WnGOvz','12oebttz','red','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','includes','124HAGcTA','31467pHGadU','length','start','3040392ZTSpCC','isTTY','catch','name','label','stdin','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','\x20\x20CSS\x20URL:','721371bQDfwJ','ExitPromptError','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','cancelled','trim','CSS\x20URL\x20checked','212099SapvGb','2241495zoQixY','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','886032Heyfeu','succeed','\x20\x20Checking\x20CSS\x20URL\x20reachability...','[new]','test','\x20\x20JS\x20URL:','JS\x20URL\x20checked','has','Cancelled.'];a122_0x4975=function(){return _0x3ee19e;};return a122_0x4975();}function a122_0x2243(_0xf03da9,_0x13643a){_0xf03da9=_0xf03da9-0x105;const _0x4975e0=a122_0x4975();let _0x224360=_0x4975e0[_0xf03da9];return _0x224360;}import{CliErrors}from'../../../errors.js';function onCancel(_0x106350){const _0xc5f342=a122_0x2243;return _0x106350[_0xc5f342(0x11f)](_0x262755=>{const _0x14de7e=_0xc5f342;if(_0x262755?.[_0x14de7e(0x120)]===_0x14de7e(0x126))throw CliErrors['cancelled'](_0x14de7e(0x10a));throw _0x262755;});}export function startSpinner(_0x44d6b9){const _0x13ce7c=a122_0x2243;return a122_0x27a1e1({'text':_0x44d6b9,'color':'cyan'})[_0x13ce7c(0x11c)]();}export function stopSpinner(_0x39ea44,_0xc8b14b,_0xe38b2e){const _0x4514ed=a122_0x2243;_0xe38b2e?_0x39ea44[_0x4514ed(0x12f)](_0xc8b14b):_0x39ea44[_0x4514ed(0x10d)](_0xc8b14b);}export async function askConfirm(_0x40b658){return onCancel(confirm({'message':_0x40b658,'theme':{'prefix':''}}));}export async function askJsUrl(_0x154ea7){const _0x36533d=a122_0x2243;while(!![]){const _0x4b68f1=await onCancel(input({'message':_0x36533d(0x107),'default':_0x154ea7,'theme':{'prefix':''}}));if(_0x4b68f1[_0x36533d(0x129)]()==='')throw CliErrors[_0x36533d(0x128)](_0x36533d(0x10a));if(!/^https:\/\/.+\.js(\?.*)?$/['test'](_0x4b68f1[_0x36533d(0x129)]())){console[_0x36533d(0x10b)](a122_0x1be951[_0x36533d(0x116)]('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x4f1fba=startSpinner(_0x36533d(0x112));try{const _0x540699=await isUrlReachable(_0x4b68f1[_0x36533d(0x129)]());stopSpinner(_0x4f1fba,_0x36533d(0x108),_0x540699);if(!_0x540699){console['error'](a122_0x1be951[_0x36533d(0x116)]('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x4b68f1['trim']();}catch(_0x2d6dd0){stopSpinner(_0x4f1fba,_0x36533d(0x111),![]);throw _0x2d6dd0;}}}export async function askCssUrl(_0x1b3e63){const _0xfe242a=a122_0x2243;while(!![]){const _0x2fcf12=await onCancel(input({'message':_0xfe242a(0x124),'default':_0x1b3e63,'theme':{'prefix':''}}));if(_0x2fcf12[_0xfe242a(0x129)]()==='')throw CliErrors[_0xfe242a(0x128)]('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/[_0xfe242a(0x106)](_0x2fcf12[_0xfe242a(0x129)]())){console[_0xfe242a(0x10b)](a122_0x1be951[_0xfe242a(0x116)](_0xfe242a(0x123)));continue;}const _0x3df348=startSpinner(_0xfe242a(0x130));try{const _0x10f3d0=await isUrlReachable(_0x2fcf12[_0xfe242a(0x129)]());stopSpinner(_0x3df348,_0xfe242a(0x12a),_0x10f3d0);if(!_0x10f3d0){console[_0xfe242a(0x10b)](a122_0x1be951['red'](_0xfe242a(0x12d)));continue;}return _0x2fcf12[_0xfe242a(0x129)]();}catch(_0x2394a6){stopSpinner(_0x3df348,'CSS\x20URL\x20check\x20failed',![]);throw _0x2394a6;}}}export async function selectPages(_0x113fcd,_0x2f0077){const _0x367f2d=a122_0x2243,_0x218301=_0x113fcd['map'](_0x1276ae=>{const _0x26cb7f=a122_0x2243,_0x5df383=_0x2f0077[_0x26cb7f(0x109)](_0x1276ae[_0x26cb7f(0x110)]);return{'name':_0x1276ae[_0x26cb7f(0x121)]+'\x20\x20'+a122_0x1be951['gray'](_0x1276ae[_0x26cb7f(0x110)])+'\x20\x20'+(_0x5df383?a122_0x1be951[_0x26cb7f(0x10c)]('[already\x20on\x20platform]'):a122_0x1be951[_0x26cb7f(0x10e)](_0x26cb7f(0x105))),'value':_0x1276ae[_0x26cb7f(0x110)],'checked':!_0x5df383,'disabled':_0x5df383};});if(_0x218301[_0x367f2d(0x11b)]===0x0)throw new Error('No\x20local\x20pages\x20found.');const _0x2316d2=await onCancel(checkbox({'message':_0x367f2d(0x113),'choices':_0x218301,'loop':![],'theme':{'prefix':''}}));if(_0x2316d2[_0x367f2d(0x11b)]===0x0)throw new Error('No\x20menus\x20selected.');return _0x113fcd[_0x367f2d(0x10f)](_0x39bb2e=>_0x2316d2[_0x367f2d(0x118)](_0x39bb2e[_0x367f2d(0x110)]));}export function isInteractive(){const _0xa2fc2d=a122_0x2243;return process[_0xa2fc2d(0x122)][_0xa2fc2d(0x11e)]===!![];}export function requireInteractive(){const _0x41d02c=a122_0x2243;if(!isInteractive())throw new Error(_0x41d02c(0x117)+_0x41d02c(0x127));}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LocalPage } from "../../../commands/menu/shared/types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Extract menu title from a source file.
|
|
4
|
+
*
|
|
5
|
+
* Priority:
|
|
6
|
+
* 1. Title: comment in top block comment
|
|
7
|
+
* 2. ComponentName.displayName
|
|
8
|
+
* 3. Component name from export default
|
|
9
|
+
* 4. null (caller falls back to file path)
|
|
10
|
+
*/
|
|
11
|
+
export declare function extractTitleFromComment(filePath: string): string | null;
|
|
12
|
+
export declare function getLocalPages(dir?: string, baseDir?: string): LocalPage[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a123_0x9c5a1f=a123_0x571d;(function(_0x189b07,_0x4f6deb){const _0xb9914f=a123_0x571d,_0x674cfa=_0x189b07();while(!![]){try{const _0x5179bc=-parseInt(_0xb9914f(0x99))/0x1*(-parseInt(_0xb9914f(0x9a))/0x2)+parseInt(_0xb9914f(0x95))/0x3+parseInt(_0xb9914f(0x97))/0x4*(-parseInt(_0xb9914f(0x9c))/0x5)+-parseInt(_0xb9914f(0xa6))/0x6+-parseInt(_0xb9914f(0x96))/0x7*(-parseInt(_0xb9914f(0x8f))/0x8)+parseInt(_0xb9914f(0xa5))/0x9*(parseInt(_0xb9914f(0x91))/0xa)+parseInt(_0xb9914f(0x8c))/0xb*(parseInt(_0xb9914f(0xa3))/0xc);if(_0x5179bc===_0x4f6deb)break;else _0x674cfa['push'](_0x674cfa['shift']());}catch(_0x12e2ac){_0x674cfa['push'](_0x674cfa['shift']());}}}(a123_0x35ad,0xdcd2d));function a123_0x35ad(){const _0x298bab=['.tsx','slice','cwd','3456522fhVABF','164108HxMCZG','873328gKjvxl','endsWith','1FdYmVw','613026DssXOe','forEach','40fxzfSH','path','split','isDirectory','replace','match','join','94332KlTJBb','index.tsx','3220758iPGkDu','9210414GKAxgZ','1199rqVLOp','src/pages','replaceAll','272GJoDhE','trim','30RHqthR'];a123_0x35ad=function(){return _0x298bab;};return a123_0x35ad();}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a123_0x9c5a1f(0x94)](),a123_0x9c5a1f(0x8d));export function extractTitleFromComment(_0x206364){const _0x305cbd=a123_0x9c5a1f;try{const _0x1a5ffe=readFileSync(_0x206364,'utf-8'),_0x1e3bf0=_0x1a5ffe['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x1e3bf0&&_0x1e3bf0[0x1]){const _0x4dceb7=_0x1e3bf0[0x1],_0x2f7dc8=_0x4dceb7[_0x305cbd(0xa1)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x2f7dc8&&_0x2f7dc8[0x1])return _0x2f7dc8[0x1][_0x305cbd(0x90)]();}let _0x8c38f=null;const _0x35f9b0=_0x1a5ffe[_0x305cbd(0xa1)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x35f9b0&&_0x35f9b0[0x1]&&(_0x8c38f=_0x35f9b0[0x1]);if(!_0x8c38f){const _0x4389ff=_0x1a5ffe[_0x305cbd(0xa1)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x4389ff&&_0x4389ff[0x1]&&(_0x8c38f=_0x4389ff[0x1]);}if(_0x8c38f){const _0x5e10c4=new RegExp('\x5cb'+_0x8c38f+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x33bbed=_0x1a5ffe[_0x305cbd(0xa1)](_0x5e10c4);if(_0x33bbed&&_0x33bbed[0x1])return _0x33bbed[0x1];return _0x8c38f;}return null;}catch(_0x1c7794){return null;}}function a123_0x571d(_0x51c07e,_0x439eba){_0x51c07e=_0x51c07e-0x8c;const _0x35ada1=a123_0x35ad();let _0x571d04=_0x35ada1[_0x51c07e];return _0x571d04;}export function getLocalPages(_0x35e6b2=pagesDir,_0x3b4096=pagesDir){const _0x33832a=a123_0x9c5a1f;let _0x1f60e8=[];const _0x35c3c8=readdirSync(_0x35e6b2);return _0x35c3c8[_0x33832a(0x9b)](_0x526798=>{const _0x31e144=_0x33832a,_0x159826=join(_0x35e6b2,_0x526798),_0x443148=statSync(_0x159826);if(_0x443148&&_0x443148[_0x31e144(0x9f)]())_0x1f60e8=_0x1f60e8['concat'](getLocalPages(_0x159826,_0x3b4096));else{if(_0x526798[_0x31e144(0x98)](_0x31e144(0x92))){let _0x432b53=relative(_0x3b4096,_0x159826);_0x432b53[_0x31e144(0x98)](_0x31e144(0xa4))?_0x432b53=_0x432b53[_0x31e144(0xa0)](/index\.tsx$/,''):_0x432b53=_0x432b53[_0x31e144(0xa0)](/\.tsx$/,'');_0x432b53[_0x31e144(0x98)](sep)&&(_0x432b53=_0x432b53[_0x31e144(0x93)](0x0,-0x1));const _0x31c1f8=_0x432b53[_0x31e144(0x9e)](sep)[_0x31e144(0xa2)]('/'),_0x33af7f=extractTitleFromComment(_0x159826),_0x50dfec=_0x33af7f||_0x31c1f8;_0x1f60e8['push']({'path':_0x31c1f8[_0x31e144(0x8e)]('$',':'),'label':_0x50dfec});}}}),_0x1f60e8['filter'](_0x5b109c=>_0x5b109c[_0x33832a(0x9d)]!=='');}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { LocalPage, MenuMutationEntity, ProcessedMenuItem } from "../../../commands/menu/shared/types.js";
|
|
2
|
+
export interface UrlValidationResult {
|
|
3
|
+
ok: boolean;
|
|
4
|
+
errors: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare function validateJsUrl(url: string): UrlValidationResult;
|
|
7
|
+
export declare function validateCssUrl(url: string): UrlValidationResult;
|
|
8
|
+
export declare function validateJsUrlReachable(url: string): Promise<UrlValidationResult>;
|
|
9
|
+
export declare function validateCssUrlReachable(url: string): Promise<UrlValidationResult>;
|
|
10
|
+
export declare function buildCompareRows(localPages: LocalPage[], onlinePaths: Set<string>): {
|
|
11
|
+
label: string;
|
|
12
|
+
path: string;
|
|
13
|
+
local: boolean;
|
|
14
|
+
online: boolean;
|
|
15
|
+
}[];
|
|
16
|
+
export declare function doCreateMenus(appCode: string, cookie: string, pages: LocalPage[], resources?: string[]): Promise<{
|
|
17
|
+
created: number;
|
|
18
|
+
failed: number;
|
|
19
|
+
labels: string[];
|
|
20
|
+
menus: MenuMutationEntity[];
|
|
21
|
+
}>;
|
|
22
|
+
export declare function filterMenusWithResources(menuList: ProcessedMenuItem[]): ProcessedMenuItem[];
|
|
23
|
+
export declare function fetchMenuData(appCode: string, cookie: string): Promise<{
|
|
24
|
+
localPages: LocalPage[];
|
|
25
|
+
onlineMenuList: ProcessedMenuItem[];
|
|
26
|
+
onlinePaths: Set<string>;
|
|
27
|
+
}>;
|
|
28
|
+
export declare function fetchOnlineMenuList(appCode: string, cookie: string): Promise<ProcessedMenuItem[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f0f82,_0x3618bc){const _0x9560b=a124_0x58c7,_0x2dd802=_0x1f0f82();while(!![]){try{const _0x262749=-parseInt(_0x9560b(0x159))/0x1+parseInt(_0x9560b(0x15c))/0x2*(parseInt(_0x9560b(0x162))/0x3)+-parseInt(_0x9560b(0x161))/0x4*(-parseInt(_0x9560b(0x156))/0x5)+-parseInt(_0x9560b(0x154))/0x6+-parseInt(_0x9560b(0x15e))/0x7*(parseInt(_0x9560b(0x163))/0x8)+-parseInt(_0x9560b(0x164))/0x9+parseInt(_0x9560b(0x158))/0xa*(parseInt(_0x9560b(0x151))/0xb);if(_0x262749===_0x3618bc)break;else _0x2dd802['push'](_0x2dd802['shift']());}catch(_0x10b27b){_0x2dd802['push'](_0x2dd802['shift']());}}}(a124_0x4375,0x1e3fb));function a124_0x58c7(_0xc8c6a8,_0x27fee1){_0xc8c6a8=_0xc8c6a8-0x151;const _0x43754c=a124_0x4375();let _0x58c705=_0x43754c[_0xc8c6a8];return _0x58c705;}import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x2c541f){const _0x44b169=a124_0x58c7,_0x11a408=[];return!isValidJsHttpsUrl(_0x2c541f)&&_0x11a408[_0x44b169(0x166)](_0x44b169(0x157)),{'ok':_0x11a408[_0x44b169(0x160)]===0x0,'errors':_0x11a408};}export function validateCssUrl(_0x12c49e){const _0x20837e=a124_0x58c7,_0x467e90=[];return!isValidCssHttpsUrl(_0x12c49e)&&_0x467e90[_0x20837e(0x166)]('CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'),{'ok':_0x467e90[_0x20837e(0x160)]===0x0,'errors':_0x467e90};}export async function validateJsUrlReachable(_0x4e94b6){const _0x26800b=a124_0x58c7,_0x59db7b=validateJsUrl(_0x4e94b6);if(!_0x59db7b['ok'])return _0x59db7b;const _0x478da8=await isUrlReachable(_0x4e94b6);if(!_0x478da8)_0x59db7b[_0x26800b(0x15d)]['push'](_0x26800b(0x153));return{'ok':_0x59db7b['errors'][_0x26800b(0x160)]===0x0,'errors':_0x59db7b[_0x26800b(0x15d)]};}export async function validateCssUrlReachable(_0x5a7130){const _0x20d9f9=a124_0x58c7,_0x478d04=validateCssUrl(_0x5a7130);if(!_0x478d04['ok'])return _0x478d04;const _0x3a910d=await isUrlReachable(_0x5a7130);if(!_0x3a910d)_0x478d04[_0x20d9f9(0x15d)]['push'](_0x20d9f9(0x165));return{'ok':_0x478d04['errors'][_0x20d9f9(0x160)]===0x0,'errors':_0x478d04[_0x20d9f9(0x15d)]};}export function buildCompareRows(_0x280dd2,_0x55ba38){const _0x139853=a124_0x58c7;return _0x280dd2[_0x139853(0x155)](_0x2b388f=>({'label':_0x2b388f[_0x139853(0x15a)],'path':_0x2b388f['path'],'local':!![],'online':_0x55ba38['has'](_0x2b388f[_0x139853(0x15f)])}));}export async function doCreateMenus(_0x12b60a,_0x40cec7,_0x58e8c2,_0x1aff41){const _0x2587b5=a124_0x58c7,_0x1270fe=await createMenus(_0x12b60a,_0x40cec7,_0x58e8c2,_0x1aff41);return{'created':_0x1270fe['length'],'failed':0x0,'labels':_0x58e8c2[_0x2587b5(0x155)](_0x14d9c8=>_0x14d9c8[_0x2587b5(0x15a)]),'menus':_0x1270fe};}export function filterMenusWithResources(_0x2b60d0){const _0x246477=a124_0x58c7;return _0x2b60d0[_0x246477(0x15b)](_0xf78d52=>_0xf78d52[_0x246477(0x152)][_0x246477(0x160)]>0x0);}export async function fetchMenuData(_0x19592d,_0x46973d){const _0x302634=a124_0x58c7,_0x3ea6e7=getLocalPages(),_0x39ce7b=await getOnlineMenuList(_0x19592d,_0x46973d),_0x294610=new Set(_0x39ce7b['map'](_0x3935d9=>_0x3935d9[_0x302634(0x15f)]));return{'localPages':_0x3ea6e7,'onlineMenuList':_0x39ce7b,'onlinePaths':_0x294610};}function a124_0x4375(){const _0x5c3e76=['JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','4253600xOnlKD','217116fbJzrq','label','filter','1178OjOTZn','errors','742sMpUBr','path','length','4slQOgw','393DUBbFX','2008swjxNY','2108574uLpFPy','CSS\x20URL\x20is\x20unreachable','push','11bajgQX','resources','JS\x20URL\x20is\x20unreachable','448830IZdjut','map','870965XqMkIu'];a124_0x4375=function(){return _0x5c3e76;};return a124_0x4375();}export async function fetchOnlineMenuList(_0x4d58b3,_0x8d18c5){return getOnlineMenuList(_0x4d58b3,_0x8d18c5);}
|
|
@@ -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;
|