@lovrabet/rabetbase-cli 2.4.3 → 2.4.4-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.d.ts +2 -0
- package/lib/commands/db/diff-refresh-start.js +1 -0
- package/lib/commands/db/diff-refresh-status.d.ts +2 -0
- package/lib/commands/db/diff-refresh-status.js +1 -0
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-create.d.ts +2 -0
- package/lib/commands/notification/config-create.js +1 -0
- package/lib/commands/notification/config-delete.d.ts +2 -0
- package/lib/commands/notification/config-delete.js +1 -0
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.d.ts +2 -0
- package/lib/commands/notification/config-update.js +1 -0
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.d.ts +97 -0
- package/lib/commands/notification/shared.js +1 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/react/create.js +1 -1
- package/lib/commands/page/react/detail.js +1 -1
- package/lib/commands/page/react/list.js +1 -1
- package/lib/commands/page/react/publish.js +1 -1
- package/lib/commands/page/react/shared.js +1 -1
- package/lib/commands/page/react/syntax.js +1 -1
- package/lib/commands/page/react/template.js +1 -1
- package/lib/commands/page/react/update.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +1 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.d.ts +11 -0
- package/lib/commands/project/create/materialize-project-template.js +1 -0
- package/lib/commands/project/create/project-name.d.ts +2 -0
- package/lib/commands/project/create/project-name.js +1 -0
- package/lib/commands/project/create/project-template-archive.d.ts +6 -0
- package/lib/commands/project/create/project-template-archive.js +1 -0
- package/lib/commands/project/create/project-template-path.d.ts +1 -3
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.d.ts +2 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.d.ts +2 -0
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +29 -2
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.d.ts +13 -0
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +9 -4
- package/skills/rabetbase/SKILL.md +33 -22
- package/skills/rabetbase/guides/backend-function.md +5 -3
- package/skills/rabetbase/guides/bff-creation-workflow.md +2 -2
- package/skills/rabetbase/guides/conflict-detection.md +2 -2
- package/skills/rabetbase/guides/database-connection-workflow.md +39 -5
- package/skills/rabetbase/guides/react-custom-page-workflow.md +16 -4
- package/skills/rabetbase/guides/sql-creation-workflow.md +4 -2
- package/skills/rabetbase/guides/sql-mybatis.md +2 -2
- package/skills/rabetbase/knowledge/page-schema/YtPage.md +3 -37
- package/skills/rabetbase/knowledge/react-page/generation-standards.md +14 -3
- package/skills/rabetbase/references/rabetbase-app-config.md +2 -2
- package/skills/rabetbase/references/rabetbase-bff-push.md +4 -5
- package/skills/rabetbase/references/rabetbase-bff-save.md +3 -3
- package/skills/rabetbase/references/rabetbase-config.md +2 -2
- package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
- package/skills/rabetbase/references/rabetbase-db-detail.md +3 -0
- package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +53 -0
- package/skills/rabetbase/references/rabetbase-db-diff.md +40 -21
- package/skills/rabetbase/references/rabetbase-db-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +5 -3
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -10
- package/skills/rabetbase/references/rabetbase-menu-external-link-update.md +1 -3
- package/skills/rabetbase/references/rabetbase-menu-regroup-start.md +2 -3
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-notification-config-mutations.md +56 -0
- package/skills/rabetbase/references/rabetbase-page-react-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-react-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-react-publish.md +2 -2
- package/skills/rabetbase/references/rabetbase-project-create.md +3 -0
- package/skills/rabetbase/references/rabetbase-run.md +1 -1
- package/skills/rabetbase/references/rabetbase-sql-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-sql-push.md +3 -4
- package/skills/rabetbase/references/rabetbase-user-account.md +0 -1
- package/skills/rabetbase.manifest.json +5 -5
- package/templates/README.md +14 -2
- package/lib/commands/project/create/non-interactive.d.ts +0 -9
- package/lib/commands/project/create/non-interactive.js +0 -1
- package/lib/utils/copy-directory.d.ts +0 -1
- package/lib/utils/copy-directory.js +0 -1
- package/skills/rabetbase/knowledge/page-schema/LrSmartEcharts.md +0 -291
- package/skills/rabetbase/knowledge/page-schema/LrSmartStatistic.md +0 -223
- package/templates/projects/sub-app-react-demo/.prettierrc +0 -1
- package/templates/projects/sub-app-react-demo/CHANGELOG.md +0 -67
- package/templates/projects/sub-app-react-demo/README.md +0 -246
- package/templates/projects/sub-app-react-demo/docs/quick-start.md +0 -245
- package/templates/projects/sub-app-react-demo/index.html +0 -27
- package/templates/projects/sub-app-react-demo/package.json +0 -34
- package/templates/projects/sub-app-react-demo/public/logo.svg +0 -1
- package/templates/projects/sub-app-react-demo/public/vite.svg +0 -1
- package/templates/projects/sub-app-react-demo/src/api/api.ts +0 -26
- package/templates/projects/sub-app-react-demo/src/api/client.ts +0 -32
- package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.module.css +0 -28
- package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.tsx +0 -55
- package/templates/projects/sub-app-react-demo/src/layouts/MainLayout.tsx +0 -308
- package/templates/projects/sub-app-react-demo/src/main.tsx +0 -52
- package/templates/projects/sub-app-react-demo/src/pages/dashboard/index.tsx +0 -570
- package/templates/projects/sub-app-react-demo/src/pages/data-screen/index.tsx +0 -531
- package/templates/projects/sub-app-react-demo/src/pages/index.module.css +0 -500
- package/templates/projects/sub-app-react-demo/src/pages/index.tsx +0 -641
- package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +0 -536
- package/templates/projects/sub-app-react-demo/src/pages/workbench/index.module.css +0 -295
- package/templates/projects/sub-app-react-demo/src/pages/workbench/index.tsx +0 -242
- package/templates/projects/sub-app-react-demo/src/router/index.tsx +0 -30
- package/templates/projects/sub-app-react-demo/src/style.css +0 -108
- package/templates/projects/sub-app-react-demo/src/utils/api.ts +0 -12
- package/templates/projects/sub-app-react-demo/src/vite-env.d.ts +0 -2
- package/templates/projects/sub-app-react-demo/tsconfig.json +0 -26
- package/templates/projects/sub-app-react-demo/vite.config.ts +0 -111
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4cf61b,_0xd72a49){const _0x1a4cfa=a122_0x2253,_0x356573=_0x4cf61b();while(!![]){try{const _0x22d65b=parseInt(_0x1a4cfa(0x18a))/0x1*(-parseInt(_0x1a4cfa(0x17a))/0x2)+parseInt(_0x1a4cfa(0x16c))/0x3*(-parseInt(_0x1a4cfa(0x192))/0x4)+parseInt(_0x1a4cfa(0x171))/0x5*(-parseInt(_0x1a4cfa(0x17f))/0x6)+-parseInt(_0x1a4cfa(0x188))/0x7+-parseInt(_0x1a4cfa(0x180))/0x8+parseInt(_0x1a4cfa(0x176))/0x9*(parseInt(_0x1a4cfa(0x189))/0xa)+parseInt(_0x1a4cfa(0x185))/0xb;if(_0x22d65b===_0xd72a49)break;else _0x356573['push'](_0x356573['shift']());}catch(_0x4ba404){_0x356573['push'](_0x356573['shift']());}}}(a122_0xbc57,0x94a08));import{createHash}from'node:crypto';function a122_0xbc57(){const _0x10ba03=['pageId','number','label','6153093IXgCSG','values','push','stringify','2TiicaC','isFinite','map','item','path','1223610PXDuzk','744232JOJJIM','hex','updateUserId','parse','parentId','29449046pTmHQM','depth','children','5032965cRPGzB','10mvKwCl','562097MAYaVT','updateUserName','length','visible','updateTime','isArray','sort','resources','4IGioaD','verbose','pageType','sha256','extend','url','datasetId','string','index','1074873MNJUGE','menus','datasetCode','digest','resourcesValid','25DRtiRD','valid'];a122_0xbc57=function(){return _0x10ba03;};return a122_0xbc57();}import{getMenuTree}from'../../../core/api-client.js';export async function fetchMenuSnapshot(_0x36d2c9,_0x4183b4,_0x2ea613={}){const _0x25aa4b=a122_0x2253,_0x54ab93=await getMenuTree(_0x36d2c9,_0x4183b4);return buildMenuSnapshot(Array[_0x25aa4b(0x18f)](_0x54ab93)?_0x54ab93:[],_0x2ea613);}export function buildMenuSnapshot(_0x326b60,_0x46ae30={}){const _0x4ef6d6=a122_0x2253,_0x434536=flattenMenuItems(_0x326b60,{'verbose':_0x46ae30[_0x4ef6d6(0x193)]===!![],'parentId':null,'depth':0x0}),_0x4658fe=new Map(_0x434536['map'](_0x2d48f3=>[_0x2d48f3['id'],_0x2d48f3])),_0x406984=createHash(_0x4ef6d6(0x166))['update'](JSON[_0x4ef6d6(0x179)](_0x434536['map'](toHashInput)))[_0x4ef6d6(0x16f)](_0x4ef6d6(0x181));return{'total':_0x434536['length'],'hash':'sha256:'+_0x406984,'menus':_0x434536,'byId':_0x4658fe};}export function toProcessedMenuItem(_0x12f27c){const _0x59e7f1=a122_0x2253;return{'id':_0x12f27c['id'],'path':_0x12f27c[_0x59e7f1(0x17e)],'label':_0x12f27c[_0x59e7f1(0x175)],'resources':[..._0x12f27c[_0x59e7f1(0x191)]],'extend':_0x12f27c[_0x59e7f1(0x167)]??null};}export function toMenuListItem(_0x4e7bff){const {modelType:_0x49774c,datasetId:_0xeec4b3,datasetCode:_0xbb9478,resourcesValid:_0x36130b,..._0x167149}=_0x4e7bff;return _0x167149;}export function getChildren(_0x53d82c,_0x2f2d47){const _0x27b7b3=a122_0x2253;return _0x53d82c[_0x27b7b3(0x16d)]['filter'](_0x7cd546=>_0x7cd546[_0x27b7b3(0x184)]===_0x2f2d47);}function flattenMenuItems(_0x52daf9,_0x502c35){const _0x4f0cf2=a122_0x2253,_0x2ad8f=sortMenuItems(_0x52daf9),_0x38c8d1=[];for(const _0x3c35c3 of _0x2ad8f){const _0x273638=sortMenuItems(Array[_0x4f0cf2(0x18f)](_0x3c35c3[_0x4f0cf2(0x187)])?_0x3c35c3[_0x4f0cf2(0x187)]:[]);_0x38c8d1[_0x4f0cf2(0x178)](toMenuFact(_0x3c35c3,_0x273638,_0x502c35)),_0x273638[_0x4f0cf2(0x18c)]>0x0&&_0x38c8d1[_0x4f0cf2(0x178)](...flattenMenuItems(_0x273638,{'verbose':_0x502c35[_0x4f0cf2(0x193)],'parentId':_0x3c35c3['id'],'depth':_0x502c35[_0x4f0cf2(0x186)]+0x1}));}return _0x38c8d1;}function sortMenuItems(_0x5acd5d){const _0x925c70=a122_0x2253;return _0x5acd5d[_0x925c70(0x17c)]((_0x2b3ed7,_0x2dbc53)=>({'item':_0x2b3ed7,'index':_0x2dbc53}))[_0x925c70(0x190)]((_0x513186,_0xd8f320)=>{const _0x123a23=_0x925c70,_0x221718=normalizeSort(_0x513186[_0x123a23(0x17d)][_0x123a23(0x190)]),_0x48a8b8=normalizeSort(_0xd8f320[_0x123a23(0x17d)][_0x123a23(0x190)]);if(_0x221718!==_0x48a8b8)return _0x221718-_0x48a8b8;return _0x513186[_0x123a23(0x16b)]-_0xd8f320[_0x123a23(0x16b)];})[_0x925c70(0x17c)](({item:_0x535585})=>_0x535585);}function toMenuFact(_0x595632,_0xb2eaaa,_0x4f1f27){const _0x269370=a122_0x2253,_0x494bdb=normalizeResourceValue(_0x595632[_0x269370(0x167)]?.['resources']),_0xd2beb0={'id':_0x595632['id'],'parentId':_0x4f1f27['parentId'],'depth':_0x4f1f27['depth'],'label':normalizeString(_0x595632[_0x269370(0x175)]),'path':normalizeString(_0x595632['path']),'url':normalizeString(_0x595632[_0x269370(0x168)]),'type':normalizeString(_0x595632['type']),'visible':typeof _0x595632['visible']==='boolean'?_0x595632[_0x269370(0x18d)]:null,'sort':typeof _0x595632[_0x269370(0x190)]===_0x269370(0x174)&&Number['isFinite'](_0x595632[_0x269370(0x190)])?_0x595632[_0x269370(0x190)]:null,'resources':_0x494bdb[_0x269370(0x177)],'resourcesValid':_0x494bdb[_0x269370(0x172)],'childrenIds':_0xb2eaaa[_0x269370(0x17c)](_0xc39715=>_0xc39715['id']),'childrenCount':_0xb2eaaa[_0x269370(0x18c)],'pageId':normalizeNullableNumber(_0x595632[_0x269370(0x173)]),'pageType':normalizeString(_0x595632['pageType']),'modelType':normalizeString(_0x595632['modelType']),'datasetId':normalizeNullableNumber(_0x595632[_0x269370(0x169)]),'datasetCode':normalizeString(_0x595632[_0x269370(0x16e)]),'updateUserId':normalizeNullableString(_0x595632[_0x269370(0x182)]),'updateUserName':normalizeNullableString(_0x595632['updateUserName']),'updateTime':normalizeNullableTimestamp(_0x595632['updateTime'])};return _0x4f1f27[_0x269370(0x193)]&&(_0xd2beb0['extend']=_0x595632[_0x269370(0x167)]??null),_0xd2beb0;}function toHashInput(_0x36b8dc){const _0x12afe7=a122_0x2253;return{'id':_0x36b8dc['id'],'parentId':_0x36b8dc['parentId'],'label':_0x36b8dc['label'],'path':_0x36b8dc[_0x12afe7(0x17e)],'url':_0x36b8dc[_0x12afe7(0x168)],'type':_0x36b8dc['type'],'visible':_0x36b8dc['visible'],'sort':_0x36b8dc[_0x12afe7(0x190)],'resources':_0x36b8dc[_0x12afe7(0x191)],'resourcesValid':_0x36b8dc[_0x12afe7(0x170)],'childrenIds':_0x36b8dc['childrenIds'],'pageId':_0x36b8dc[_0x12afe7(0x173)],'pageType':_0x36b8dc[_0x12afe7(0x165)],'modelType':_0x36b8dc['modelType'],'datasetId':_0x36b8dc['datasetId'],'datasetCode':_0x36b8dc[_0x12afe7(0x16e)],'updateUserId':_0x36b8dc[_0x12afe7(0x182)],'updateUserName':_0x36b8dc[_0x12afe7(0x18b)],'updateTime':_0x36b8dc[_0x12afe7(0x18e)]};}function normalizeSort(_0x50e584){const _0x396629=a122_0x2253;return typeof _0x50e584===_0x396629(0x174)&&Number[_0x396629(0x17b)](_0x50e584)?_0x50e584:Number['POSITIVE_INFINITY'];}function normalizeString(_0x4ba9e6){const _0x342f2e=a122_0x2253;return typeof _0x4ba9e6===_0x342f2e(0x16a)?_0x4ba9e6:'';}function normalizeNullableNumber(_0x2b41db){const _0x288883=a122_0x2253;return typeof _0x2b41db===_0x288883(0x174)&&Number[_0x288883(0x17b)](_0x2b41db)?_0x2b41db:null;}function normalizeNullableString(_0x5d2310){const _0x9650a6=a122_0x2253;return typeof _0x5d2310==='string'&&_0x5d2310[_0x9650a6(0x18c)]>0x0?_0x5d2310:null;}function normalizeNullableTimestamp(_0x150a4e){const _0x44a133=a122_0x2253;if(typeof _0x150a4e==='string')return _0x150a4e[_0x44a133(0x18c)]>0x0?_0x150a4e:null;return typeof _0x150a4e==='number'&&Number['isFinite'](_0x150a4e)?_0x150a4e:null;}export function normalizeResources(_0x60b136){const _0x23f471=a122_0x2253;return normalizeResourceValue(_0x60b136)[_0x23f471(0x177)];}function a122_0x2253(_0x255464,_0x1f41b7){_0x255464=_0x255464-0x165;const _0xbc57da=a122_0xbc57();let _0x225384=_0xbc57da[_0x255464];return _0x225384;}function normalizeResourceValue(_0x2f28fb){const _0x22363f=a122_0x2253;if(_0x2f28fb==null)return{'values':[],'valid':!![]};if(Array['isArray'](_0x2f28fb))return{'values':_0x2f28fb[_0x22363f(0x17c)](String),'valid':!![]};if(typeof _0x2f28fb!==_0x22363f(0x16a))return{'values':[],'valid':![]};try{const _0x1c7812=JSON[_0x22363f(0x183)](_0x2f28fb);return Array[_0x22363f(0x18f)](_0x1c7812)?{'values':_0x1c7812['map'](String),'valid':!![]}:{'values':[],'valid':![]};}catch{return{'values':[],'valid':![]};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a5869,_0x1b34cc){var _0x381fad=a123_0x597f,_0x5f206c=_0x2a5869();while(!![]){try{var _0x3b179a=parseInt(_0x381fad(0x1f2))/0x1+-parseInt(_0x381fad(0x1ed))/0x2*(-parseInt(_0x381fad(0x1ee))/0x3)+-parseInt(_0x381fad(0x1e9))/0x4+parseInt(_0x381fad(0x1f0))/0x5+parseInt(_0x381fad(0x1eb))/0x6*(parseInt(_0x381fad(0x1f1))/0x7)+parseInt(_0x381fad(0x1f3))/0x8*(-parseInt(_0x381fad(0x1ef))/0x9)+-parseInt(_0x381fad(0x1ec))/0xa*(parseInt(_0x381fad(0x1ea))/0xb);if(_0x3b179a===_0x1b34cc)break;else _0x5f206c['push'](_0x5f206c['shift']());}catch(_0x47eb86){_0x5f206c['push'](_0x5f206c['shift']());}}}(a123_0x396c,0x7dee1));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';function a123_0x597f(_0x3f4cb1,_0xb14e04){_0x3f4cb1=_0x3f4cb1-0x1e9;var _0x396cb0=a123_0x396c();var _0x597f2c=_0x396cb0[_0x3f4cb1];return _0x597f2c;}export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';function a123_0x396c(){var _0xb9478e=['63XaJcxw','3955205gjmwAQ','746816YESnnN','444322YERUiD','351032apgxZF','1588236pdGgpt','10543291lDJHnt','24DYUzJw','10JpmkSM','8006PxzYxL','387WeLgsU'];a123_0x396c=function(){return _0xb9478e;};return a123_0x396c();}export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2992da,_0x6a8d34){const _0x3ae4cb=a124_0x3db0,_0x1a73cc=_0x2992da();while(!![]){try{const _0x221306=parseInt(_0x3ae4cb(0x107))/0x1*(parseInt(_0x3ae4cb(0xff))/0x2)+-parseInt(_0x3ae4cb(0x102))/0x3+-parseInt(_0x3ae4cb(0xf6))/0x4+parseInt(_0x3ae4cb(0x103))/0x5*(parseInt(_0x3ae4cb(0x10c))/0x6)+-parseInt(_0x3ae4cb(0xef))/0x7*(parseInt(_0x3ae4cb(0xf8))/0x8)+parseInt(_0x3ae4cb(0xf2))/0x9*(parseInt(_0x3ae4cb(0xf9))/0xa)+parseInt(_0x3ae4cb(0xfb))/0xb;if(_0x221306===_0x6a8d34)break;else _0x1a73cc['push'](_0x1a73cc['shift']());}catch(_0xc3105d){_0x1a73cc['push'](_0x1a73cc['shift']());}}}(a124_0x3967,0x1dbe1));import a124_0x53e8b6 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a124_0x223e84 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x5cfdbd){return _0x5cfdbd['catch'](_0xe4a53=>{const _0x1b478f=a124_0x3db0;if(_0xe4a53?.[_0x1b478f(0x111)]===_0x1b478f(0x101))throw CliErrors['cancelled'](_0x1b478f(0xfd));throw _0xe4a53;});}export function startSpinner(_0x3bc4b7){return a124_0x223e84({'text':_0x3bc4b7,'color':'cyan'})['start']();}function a124_0x3db0(_0x2c05fb,_0x155a97){_0x2c05fb=_0x2c05fb-0xee;const _0x3967fc=a124_0x3967();let _0x3db0c4=_0x3967fc[_0x2c05fb];return _0x3db0c4;}export function stopSpinner(_0x21efe6,_0x16e850,_0x3f31f6){const _0x775fa6=a124_0x3db0;_0x3f31f6?_0x21efe6[_0x775fa6(0xf0)](_0x16e850):_0x21efe6[_0x775fa6(0x117)](_0x16e850);}export async function askConfirm(_0x32f300){return onCancel(confirm({'message':_0x32f300,'theme':{'prefix':''}}));}export async function askJsUrl(_0x454092){const _0x1ecd47=a124_0x3db0;while(!![]){const _0x27290c=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x454092,'theme':{'prefix':''}}));if(_0x27290c['trim']()==='')throw CliErrors[_0x1ecd47(0x108)]('Cancelled.');if(!/^https:\/\/.+\.js(\?.*)?$/['test'](_0x27290c[_0x1ecd47(0x10b)]())){console[_0x1ecd47(0x116)](a124_0x53e8b6[_0x1ecd47(0x115)](_0x1ecd47(0x104)));continue;}const _0x377649=startSpinner(_0x1ecd47(0x112));try{const _0x43f636=await isUrlReachable(_0x27290c[_0x1ecd47(0x10b)]());stopSpinner(_0x377649,_0x1ecd47(0xee),_0x43f636);if(!_0x43f636){console[_0x1ecd47(0x116)](a124_0x53e8b6[_0x1ecd47(0x115)]('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x27290c[_0x1ecd47(0x10b)]();}catch(_0x3e3ecd){stopSpinner(_0x377649,'JS\x20URL\x20check\x20failed',![]);throw _0x3e3ecd;}}}export async function askCssUrl(_0x57c70b){const _0x1ff17d=a124_0x3db0;while(!![]){const _0x4a2950=await onCancel(input({'message':_0x1ff17d(0x118),'default':_0x57c70b,'theme':{'prefix':''}}));if(_0x4a2950[_0x1ff17d(0x10b)]()==='')throw CliErrors[_0x1ff17d(0x108)](_0x1ff17d(0xfd));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x1ff17d(0x110)](_0x4a2950[_0x1ff17d(0x10b)]())){console['error'](a124_0x53e8b6[_0x1ff17d(0x115)](_0x1ff17d(0x10e)));continue;}const _0x4b73bc=startSpinner(_0x1ff17d(0x105));try{const _0x58c61b=await isUrlReachable(_0x4a2950['trim']());stopSpinner(_0x4b73bc,_0x1ff17d(0x100),_0x58c61b);if(!_0x58c61b){console[_0x1ff17d(0x116)](a124_0x53e8b6[_0x1ff17d(0x115)](_0x1ff17d(0x11a)));continue;}return _0x4a2950['trim']();}catch(_0x3a7899){stopSpinner(_0x4b73bc,'CSS\x20URL\x20check\x20failed',![]);throw _0x3a7899;}}}export async function selectPages(_0x3ec6e4,_0x318296){const _0x5ad4e4=a124_0x3db0,_0x3ad7ce=_0x3ec6e4[_0x5ad4e4(0x10a)](_0x32ce99=>{const _0x4b2d78=_0x5ad4e4,_0x229785=_0x318296[_0x4b2d78(0x109)](_0x32ce99['path']);return{'name':_0x32ce99[_0x4b2d78(0x106)]+'\x20\x20'+a124_0x53e8b6['gray'](_0x32ce99[_0x4b2d78(0x10d)])+'\x20\x20'+(_0x229785?a124_0x53e8b6[_0x4b2d78(0xfa)](_0x4b2d78(0xf3)):a124_0x53e8b6['green'](_0x4b2d78(0x10f))),'value':_0x32ce99[_0x4b2d78(0x10d)],'checked':!_0x229785,'disabled':_0x229785};});if(_0x3ad7ce[_0x5ad4e4(0x113)]===0x0)throw new Error(_0x5ad4e4(0xfc));const _0x176165=await onCancel(checkbox({'message':_0x5ad4e4(0xf5),'choices':_0x3ad7ce,'loop':![],'theme':{'prefix':''}}));if(_0x176165[_0x5ad4e4(0x113)]===0x0)throw new Error(_0x5ad4e4(0x114));return _0x3ec6e4[_0x5ad4e4(0xfe)](_0x55c9d3=>_0x176165['includes'](_0x55c9d3[_0x5ad4e4(0x10d)]));}export function isInteractive(){const _0xe2afbf=a124_0x3db0;return process[_0xe2afbf(0xf7)][_0xe2afbf(0xf1)]===!![];}function a124_0x3967(){const _0x34c319=['No\x20menus\x20selected.','red','error','fail','\x20\x20CSS\x20URL:','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','JS\x20URL\x20checked','4137GcBGwD','succeed','isTTY','71559GVKltY','[already\x20on\x20platform]','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','75264bkqjnw','stdin','1808hEZdBC','130Cxodqn','gray','844877bQtcNe','No\x20local\x20pages\x20found.','Cancelled.','filter','2306vuHpJh','CSS\x20URL\x20checked','ExitPromptError','652362TxwGbL','188120TKDjPo','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','\x20\x20Checking\x20CSS\x20URL\x20reachability...','label','107pTYTVE','cancelled','has','map','trim','30EzKjQo','path','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','[new]','test','name','\x20\x20Checking\x20JS\x20URL\x20reachability...','length'];a124_0x3967=function(){return _0x34c319;};return a124_0x3967();}export function requireInteractive(){const _0x3f1950=a124_0x3db0;if(!isInteractive())throw new Error(_0x3f1950(0x119)+_0x3f1950(0xf4));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a125_0x4b33(){const _0x535928=['6854712jAnaNt','split','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','3548180oDQNEM','path','index.tsx','3535028NTAgTM','24wTYDuN','6639248wLWmXg','.tsx','endsWith','102713JIgrSU','match','trim','4575951ViNSmT','2103696WSxMlH','push','4TGGBIA','replace','replaceAll'];a125_0x4b33=function(){return _0x535928;};return a125_0x4b33();}(function(_0x503a75,_0x471128){const _0x634f1a=a125_0x5d87,_0x421fa4=_0x503a75();while(!![]){try{const _0x293ee1=parseInt(_0x634f1a(0x14a))/0x1*(parseInt(_0x634f1a(0x13c))/0x2)+parseInt(_0x634f1a(0x14e))/0x3+-parseInt(_0x634f1a(0x145))/0x4+-parseInt(_0x634f1a(0x142))/0x5+-parseInt(_0x634f1a(0x13f))/0x6+parseInt(_0x634f1a(0x147))/0x7+parseInt(_0x634f1a(0x146))/0x8*(parseInt(_0x634f1a(0x14d))/0x9);if(_0x293ee1===_0x471128)break;else _0x421fa4['push'](_0x421fa4['shift']());}catch(_0x29de1c){_0x421fa4['push'](_0x421fa4['shift']());}}}(a125_0x4b33,0x9d5f2));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process['cwd'](),'src/pages');export function extractTitleFromComment(_0x424883){const _0x37caf8=a125_0x5d87;try{const _0x218465=readFileSync(_0x424883,'utf-8'),_0x833070=_0x218465[_0x37caf8(0x14b)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x833070&&_0x833070[0x1]){const _0x59e109=_0x833070[0x1],_0x3aa39f=_0x59e109[_0x37caf8(0x14b)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x3aa39f&&_0x3aa39f[0x1])return _0x3aa39f[0x1][_0x37caf8(0x14c)]();}let _0x661abd=null;const _0x55ca6e=_0x218465[_0x37caf8(0x14b)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x55ca6e&&_0x55ca6e[0x1]&&(_0x661abd=_0x55ca6e[0x1]);if(!_0x661abd){const _0x20ce97=_0x218465[_0x37caf8(0x14b)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x20ce97&&_0x20ce97[0x1]&&(_0x661abd=_0x20ce97[0x1]);}if(_0x661abd){const _0x76f828=new RegExp('\x5cb'+_0x661abd+_0x37caf8(0x141)),_0x120ee8=_0x218465[_0x37caf8(0x14b)](_0x76f828);if(_0x120ee8&&_0x120ee8[0x1])return _0x120ee8[0x1];return _0x661abd;}return null;}catch(_0x41b1a2){return null;}}function a125_0x5d87(_0xe71ca,_0x214d1c){_0xe71ca=_0xe71ca-0x13b;const _0x4b3387=a125_0x4b33();let _0x5d87fe=_0x4b3387[_0xe71ca];return _0x5d87fe;}export function getLocalPages(_0x565055=pagesDir,_0x48cfdd=pagesDir){const _0x3aabe6=a125_0x5d87;let _0x162bee=[];const _0x2728b9=readdirSync(_0x565055);return _0x2728b9['forEach'](_0x10ca2e=>{const _0x425cd5=a125_0x5d87,_0x57c7d3=join(_0x565055,_0x10ca2e),_0x15b234=statSync(_0x57c7d3);if(_0x15b234&&_0x15b234['isDirectory']())_0x162bee=_0x162bee['concat'](getLocalPages(_0x57c7d3,_0x48cfdd));else{if(_0x10ca2e[_0x425cd5(0x149)](_0x425cd5(0x148))){let _0xac27fa=relative(_0x48cfdd,_0x57c7d3);_0xac27fa['endsWith'](_0x425cd5(0x144))?_0xac27fa=_0xac27fa[_0x425cd5(0x13d)](/index\.tsx$/,''):_0xac27fa=_0xac27fa[_0x425cd5(0x13d)](/\.tsx$/,'');_0xac27fa['endsWith'](sep)&&(_0xac27fa=_0xac27fa['slice'](0x0,-0x1));const _0x5bebf6=_0xac27fa[_0x425cd5(0x140)](sep)['join']('/'),_0x374a3f=extractTitleFromComment(_0x57c7d3),_0x479739=_0x374a3f||_0x5bebf6;_0x162bee[_0x425cd5(0x13b)]({'path':_0x5bebf6[_0x425cd5(0x13e)]('$',':'),'label':_0x479739});}}}),_0x162bee['filter'](_0x55df95=>_0x55df95[_0x3aabe6(0x143)]!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x357c9f,_0xd83cee){const _0xd45ba8=a126_0x2041,_0x5b154c=_0x357c9f();while(!![]){try{const _0x146662=-parseInt(_0xd45ba8(0xe6))/0x1+parseInt(_0xd45ba8(0xf6))/0x2+-parseInt(_0xd45ba8(0xf3))/0x3*(parseInt(_0xd45ba8(0xef))/0x4)+-parseInt(_0xd45ba8(0xec))/0x5*(-parseInt(_0xd45ba8(0xf4))/0x6)+-parseInt(_0xd45ba8(0xe4))/0x7*(-parseInt(_0xd45ba8(0xf7))/0x8)+-parseInt(_0xd45ba8(0xe9))/0x9+parseInt(_0xd45ba8(0xe8))/0xa*(parseInt(_0xd45ba8(0xf0))/0xb);if(_0x146662===_0xd83cee)break;else _0x5b154c['push'](_0x5b154c['shift']());}catch(_0x128879){_0x5b154c['push'](_0x5b154c['shift']());}}}(a126_0x158c,0xd627f));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(_0x51418e){const _0x7c85a5=a126_0x2041,_0x513e2c=[];return!isValidJsHttpsUrl(_0x51418e)&&_0x513e2c[_0x7c85a5(0xe2)](_0x7c85a5(0xe5)),{'ok':_0x513e2c[_0x7c85a5(0xf2)]===0x0,'errors':_0x513e2c};}export function validateCssUrl(_0x57be73){const _0x29e0d2=a126_0x2041,_0x930643=[];return!isValidCssHttpsUrl(_0x57be73)&&_0x930643[_0x29e0d2(0xe2)](_0x29e0d2(0xeb)),{'ok':_0x930643[_0x29e0d2(0xf2)]===0x0,'errors':_0x930643};}export async function validateJsUrlReachable(_0x2bd5ca){const _0x55e9f8=a126_0x2041,_0x44ba1d=validateJsUrl(_0x2bd5ca);if(!_0x44ba1d['ok'])return _0x44ba1d;const _0x3ac432=await isUrlReachable(_0x2bd5ca);if(!_0x3ac432)_0x44ba1d[_0x55e9f8(0xee)][_0x55e9f8(0xe2)](_0x55e9f8(0xe3));return{'ok':_0x44ba1d[_0x55e9f8(0xee)][_0x55e9f8(0xf2)]===0x0,'errors':_0x44ba1d['errors']};}export async function validateCssUrlReachable(_0x5e739f){const _0x51da62=a126_0x2041,_0x43b56d=validateCssUrl(_0x5e739f);if(!_0x43b56d['ok'])return _0x43b56d;const _0x2e86ab=await isUrlReachable(_0x5e739f);if(!_0x2e86ab)_0x43b56d[_0x51da62(0xee)][_0x51da62(0xe2)](_0x51da62(0xed));return{'ok':_0x43b56d[_0x51da62(0xee)][_0x51da62(0xf2)]===0x0,'errors':_0x43b56d[_0x51da62(0xee)]};}export function buildCompareRows(_0x57b2a2,_0xe427c7){const _0x51822a=a126_0x2041;return _0x57b2a2[_0x51822a(0xf5)](_0x2fce54=>({'label':_0x2fce54[_0x51822a(0xea)],'path':_0x2fce54[_0x51822a(0xe7)],'local':!![],'online':_0xe427c7[_0x51822a(0xf8)](_0x2fce54[_0x51822a(0xe7)])}));}export async function doCreateMenus(_0x439e98,_0x5112f5,_0x44b73c,_0x3c3b8e){const _0x535c55=a126_0x2041,_0x2517dc=await createMenus(_0x439e98,_0x5112f5,_0x44b73c,_0x3c3b8e);return{'created':_0x2517dc['length'],'failed':0x0,'labels':_0x44b73c['map'](_0x4a066c=>_0x4a066c[_0x535c55(0xea)]),'menus':_0x2517dc};}function a126_0x158c(){const _0x50559f=['JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','1111124tQWcbY','path','10rMGUoW','9939186znrfWc','label','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','65060RlFDto','CSS\x20URL\x20is\x20unreachable','errors','130136lbtfVG','6308269QfjGJS','resources','length','15uHPoTo','522IUUVLb','map','726444gXbcdm','8gWlWWj','has','push','JS\x20URL\x20is\x20unreachable','8306102Xyxguh'];a126_0x158c=function(){return _0x50559f;};return a126_0x158c();}export function filterMenusWithResources(_0x1c53d0){const _0x13e256=a126_0x2041;return _0x1c53d0['filter'](_0x5ca6b1=>_0x5ca6b1[_0x13e256(0xf1)][_0x13e256(0xf2)]>0x0);}export async function fetchMenuData(_0x49c5bb,_0x3b289c){const _0x34cfe4=a126_0x2041,_0x80cd12=getLocalPages(),_0x287adc=await getOnlineMenuList(_0x49c5bb,_0x3b289c),_0x107923=new Set(_0x287adc['map'](_0x22548c=>_0x22548c[_0x34cfe4(0xe7)]));return{'localPages':_0x80cd12,'onlineMenuList':_0x287adc,'onlinePaths':_0x107923};}function a126_0x2041(_0x1c0243,_0x16966a){_0x1c0243=_0x1c0243-0xe2;const _0x158c60=a126_0x158c();let _0x2041bf=_0x158c60[_0x1c0243];return _0x2041bf;}export async function fetchOnlineMenuList(_0x46696e,_0x2162ba){return getOnlineMenuList(_0x46696e,_0x2162ba);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a125_0x66eb8a=a125_0x1cac;(function(_0x3bab01,_0x8b4f29){const _0x221c62=a125_0x1cac,_0xcfbe91=_0x3bab01();while(!![]){try{const _0xdec0ea=parseInt(_0x221c62(0x173))/0x1*(parseInt(_0x221c62(0x15c))/0x2)+parseInt(_0x221c62(0x12b))/0x3+-parseInt(_0x221c62(0x145))/0x4+-parseInt(_0x221c62(0x142))/0x5*(-parseInt(_0x221c62(0x15d))/0x6)+parseInt(_0x221c62(0x150))/0x7*(-parseInt(_0x221c62(0x136))/0x8)+-parseInt(_0x221c62(0x119))/0x9+parseInt(_0x221c62(0x158))/0xa*(-parseInt(_0x221c62(0x131))/0xb);if(_0xdec0ea===_0x8b4f29)break;else _0xcfbe91['push'](_0xcfbe91['shift']());}catch(_0x1983f4){_0xcfbe91['push'](_0xcfbe91['shift']());}}}(a125_0x2b2d,0x5dd7d));import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Exact\x20online\x20menu\x20id'};function a125_0x2b2d(){const _0x17c4e3=['backend','read\x20online\x20menu\x20facts\x20before\x20','cookie','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','parentId','string','\x20parent\x20changed:\x20expected\x20','Menu\x20','verification','validation','21837BpVBEz','failed','byId','menu_sort_invalid','yes','planFile','Online\x20menu\x20not\x20found:\x20','code','message','call','map','938943YsHveL','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','isSafeInteger',',\x20current\x20','number','dry-run','after','hasOwnProperty',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','max','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','defineProperty','cascade','length','hash','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','1358817jAXlnm','Reorder\x20sibling\x20menus\x20below\x20','num','Permission\x20denied\x20while\x20attempting\x20to\x20','menu_sort_overflow','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','924VtUMZZ','menu_permission_denied','expected-children-count','expect-parent-id','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','86712mSSPfK','menu_parent_not_folder','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','filter','prototype','Online\x20menu\x20state\x20changed\x20before\x20','folder','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','str','toLowerCase','\x20path\x20changed:\x20expected\x20','api_error','1857265CUwklS','warnings','bool','175760KAtsrO','succeeded','childrenCount','get','type','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','test','menu_state_drift','recheck\x20online\x20menu\x20facts\x20before\x20','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','133mHeLvA','hint','data','flagMissing','path','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','expect-path','44010qPdrFU','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','error','menu_not_found','26qnDAcO','6CrLBat','deleteOrder','menu_confirmation_required','stage','rawFlags','\x20menu\x20','root','stringify','plannedActions','snapshotHash','menu_verification_failed','pre-write-recheck'];a125_0x2b2d=function(){return _0x17c4e3;};return a125_0x2b2d();}export const MENU_SORT_FLAG={'name':'sort','type':a125_0x66eb8a(0x11f),'description':'Sibling\x20sort\x20value\x20(non-negative\x20integer)'};export const MENU_PARENT_ID_FLAG={'name':'parent-id','type':a125_0x66eb8a(0x16e),'description':a125_0x66eb8a(0x130)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a125_0x66eb8a(0x134),'type':'string','description':a125_0x66eb8a(0x13d)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':'expect-path','type':'string','description':a125_0x66eb8a(0x12a)},{'name':a125_0x66eb8a(0x133),'type':'number','description':a125_0x66eb8a(0x125)}];export function validateExactId(_0x35a973){const _0x1909e2=a125_0x66eb8a,_0x3758af=_0x35a973[_0x1909e2(0x12d)]('id');if(!Number[_0x1909e2(0x11d)](_0x3758af)||_0x3758af<=0x0)throw CliErrors[_0x1909e2(0x172)](_0x1909e2(0x155));return _0x3758af;}export function validateSort(_0x40f885,_0x30b4aa='sort'){const _0x295593=a125_0x66eb8a;if(!hasFlag(_0x40f885,_0x30b4aa))return undefined;const _0x2e89e4=_0x40f885[_0x295593(0x12d)](_0x30b4aa);if(!Number[_0x295593(0x11d)](_0x2e89e4)||_0x2e89e4<0x0||_0x2e89e4>MAX_MENU_SORT)throw menuError(_0x295593(0x111),'--'+_0x30b4aa+_0x295593(0x159)+MAX_MENU_SORT+'.',_0x295593(0x138));return _0x2e89e4;}export function nextSiblingSort(_0x4943a0,_0x3b95db,_0x4b56c4){const _0x5a7393=a125_0x66eb8a,_0x10210f=getChildren(_0x4943a0,_0x3b95db)[_0x5a7393(0x118)](_0x24b789=>_0x24b789['sort'])[_0x5a7393(0x139)](_0x1dad9b=>typeof _0x1dad9b===_0x5a7393(0x11f));if(_0x10210f[_0x5a7393(0x128)]===0x0)return 0x0;const _0x255779=Math[_0x5a7393(0x124)](..._0x10210f);if(_0x255779>=MAX_MENU_SORT)throw menuError(_0x5a7393(0x12f),'Cannot\x20append\x20a\x20'+_0x4b56c4+_0x5a7393(0x11b)+_0x255779+'.',_0x5a7393(0x12c)+MAX_MENU_SORT+_0x5a7393(0x123));return _0x255779+0x1;}export function requireExplicitYes(_0x244c28){const _0x37545c=a125_0x66eb8a;if(_0x244c28['bool'](_0x37545c(0x120)))return;if(!_0x244c28[_0x37545c(0x144)](_0x37545c(0x112)))throw menuError(_0x37545c(0x15f),_0x37545c(0x135),_0x37545c(0x16c));}export async function fetchMutationSnapshot(_0x293693,_0x3d4232,_0x3d2c0e){const _0x58606e=a125_0x66eb8a;try{return await fetchMenuSnapshot(_0x293693['appCode'],_0x293693[_0x58606e(0x16b)]);}catch(_0x5529ae){throw mapMenuApiError(_0x5529ae,_0x58606e(0x16a)+_0x3d4232,_0x3d2c0e);}}export async function recheckMutationSnapshot(_0x33c0f5,_0x27c5e5,_0x1b33c7,_0x210821){const _0x450a98=a125_0x66eb8a;let _0x5eb0fd;try{_0x5eb0fd=await fetchMenuSnapshot(_0x33c0f5['appCode'],_0x33c0f5['cookie']);}catch(_0x66e468){const _0xa4bc5e=mapMenuApiError(_0x66e468,_0x450a98(0x14e)+_0x1b33c7,_0x210821);throw menuFailure(_0xa4bc5e,_0x27c5e5,{'stage':_0x450a98(0x168),'failed':_0x210821==null?{}:{'id':_0x210821}});}if(_0x5eb0fd[_0x450a98(0x129)]!==_0x27c5e5['snapshotHash']){const _0x4aecf3=menuError(_0x450a98(0x14d),_0x450a98(0x13b)+_0x1b33c7+';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.',_0x450a98(0x14b));throw menuFailure(_0x4aecf3,_0x27c5e5,{'stage':_0x450a98(0x168),'failed':{..._0x210821==null?{}:{'id':_0x210821},'expectedSnapshotHash':_0x27c5e5[_0x450a98(0x166)],'currentSnapshotHash':_0x5eb0fd[_0x450a98(0x129)]}});}return _0x5eb0fd;}export function parseParentId(_0x6e17e1,_0x231f90,_0x44f5a5={}){const _0x3a0bde=a125_0x66eb8a;if(!hasFlag(_0x6e17e1,_0x231f90)){if(_0x44f5a5['required'])throw CliErrors[_0x3a0bde(0x153)](_0x231f90);return undefined;}const _0x85c21f=_0x6e17e1[_0x3a0bde(0x13e)](_0x231f90)['trim']();if(_0x85c21f[_0x3a0bde(0x13f)]()===_0x3a0bde(0x163))return null;if(!/^\d+$/[_0x3a0bde(0x14c)](_0x85c21f))throw CliErrors[_0x3a0bde(0x172)]('--'+_0x231f90+_0x3a0bde(0x156));const _0x49a883=Number(_0x85c21f);if(!Number['isSafeInteger'](_0x49a883)||_0x49a883<=0x0)throw CliErrors[_0x3a0bde(0x172)]('--'+_0x231f90+_0x3a0bde(0x156));return _0x49a883;}export function requireMenu(_0x2510d9,_0x1abf36){const _0x339f1f=a125_0x66eb8a,_0x40a389=_0x2510d9[_0x339f1f(0x110)][_0x339f1f(0x148)](_0x1abf36);if(!_0x40a389)throw menuError(_0x339f1f(0x15b),_0x339f1f(0x114)+_0x1abf36,_0x339f1f(0x11a));return _0x40a389;}export function requireFolder(_0x2b048d,_0x4c642f){const _0x39cafb=a125_0x66eb8a,_0x15c2a2=requireMenu(_0x2b048d,_0x4c642f);if(_0x15c2a2[_0x39cafb(0x149)]!==_0x39cafb(0x13c))throw menuError(_0x39cafb(0x137),_0x39cafb(0x170)+_0x4c642f+'\x20is\x20type\x20\x22'+(_0x15c2a2[_0x39cafb(0x149)]||'unknown')+'\x22,\x20not\x20folder.','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.');return _0x15c2a2;}export function assertExpectedState(_0x5ba332,_0x599721){const _0x4d2180=a125_0x66eb8a;if(hasFlag(_0x5ba332,_0x4d2180(0x134))){const _0x2d216e=parseParentId(_0x5ba332,_0x4d2180(0x134),{'required':!![]});if(_0x599721[_0x4d2180(0x16d)]!==_0x2d216e)throw stateDrift(_0x4d2180(0x170)+_0x599721['id']+_0x4d2180(0x16f)+formatParent(_0x2d216e)+',\x20current\x20'+formatParent(_0x599721[_0x4d2180(0x16d)])+'.');}if(hasFlag(_0x5ba332,_0x4d2180(0x157))){const _0x417906=_0x5ba332[_0x4d2180(0x13e)](_0x4d2180(0x157));if(_0x599721[_0x4d2180(0x154)]!==_0x417906)throw stateDrift(_0x4d2180(0x170)+_0x599721['id']+_0x4d2180(0x140)+JSON['stringify'](_0x417906)+_0x4d2180(0x11e)+JSON[_0x4d2180(0x164)](_0x599721['path'])+'.');}if(hasFlag(_0x5ba332,_0x4d2180(0x133))){const _0x1593fd=_0x5ba332[_0x4d2180(0x12d)](_0x4d2180(0x133));if(!Number[_0x4d2180(0x11d)](_0x1593fd)||_0x1593fd<0x0)throw CliErrors[_0x4d2180(0x172)]('--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x599721['childrenCount']!==_0x1593fd)throw stateDrift(_0x4d2180(0x170)+_0x599721['id']+'\x20child\x20count\x20changed:\x20expected\x20'+_0x1593fd+_0x4d2180(0x11e)+_0x599721[_0x4d2180(0x147)]+'.');}}export function assertVerified(_0x22ba93,_0x590228,_0x545da1='Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.'){if(!_0x22ba93)throw menuError('menu_verification_failed',_0x590228,_0x545da1);}export function mutationResult(_0xbea17f){const _0x420447=a125_0x66eb8a;return{'operation':_0xbea17f['operation'],'selector':_0xbea17f['selector'],'before':_0xbea17f['before'],'after':_0xbea17f['after'],'dryRun':_0xbea17f['dryRun'],'backend':_0xbea17f[_0x420447(0x169)],..._0xbea17f[_0x420447(0x165)]?{'plannedActions':_0xbea17f[_0x420447(0x165)]}:{},..._0xbea17f['targets']?{'targets':_0xbea17f['targets']}:{},..._0xbea17f[_0x420447(0x15e)]?{'deleteOrder':_0xbea17f[_0x420447(0x15e)]}:{},'snapshotHash':_0xbea17f[_0x420447(0x166)],..._0xbea17f[_0x420447(0x127)]?{'cascade':_0xbea17f['cascade']}:{},..._0xbea17f[_0x420447(0x113)]?{'planFile':_0xbea17f['planFile']}:{},'succeeded':_0xbea17f[_0x420447(0x146)]??[],'failed':_0xbea17f[_0x420447(0x10f)]??[],'warnings':_0xbea17f['warnings']??[],'verification':_0xbea17f['verification'],'error':_0xbea17f[_0x420447(0x15a)]};}export function menuDryRunResult(_0x23c930,_0x54ed4e){return{..._0x23c930,..._0x54ed4e};}export function menuFailure(_0x16fb8e,_0x1d1d42,_0x5c4ada){const _0x1ac368=a125_0x66eb8a,_0x20e2b8=mutationResult({..._0x1d1d42,'after':_0x5c4ada['after']===undefined?_0x1d1d42[_0x1ac368(0x121)]:_0x5c4ada[_0x1ac368(0x121)],'backend':_0x5c4ada[_0x1ac368(0x169)]??_0x1d1d42[_0x1ac368(0x169)],'dryRun':![],'succeeded':_0x5c4ada['succeeded']??[],'failed':[{..._0x5c4ada[_0x1ac368(0x10f)]??{},'stage':_0x5c4ada[_0x1ac368(0x160)],'code':_0x16fb8e[_0x1ac368(0x115)],'message':_0x16fb8e[_0x1ac368(0x116)]}],'warnings':[..._0x1d1d42[_0x1ac368(0x143)],..._0x5c4ada[_0x1ac368(0x143)]??[]],'verification':_0x5c4ada[_0x1ac368(0x171)],'error':{'code':_0x16fb8e['code'],'message':_0x16fb8e[_0x1ac368(0x116)],..._0x16fb8e['hint']?{'hint':_0x16fb8e[_0x1ac368(0x151)]}:{}}});return Object[_0x1ac368(0x126)](_0x16fb8e,_0x1ac368(0x152),{'value':_0x20e2b8,'enumerable':!![],'configurable':!![]}),_0x16fb8e;}function a125_0x1cac(_0x33a518,_0x589112){_0x33a518=_0x33a518-0x10f;const _0x2b2d74=a125_0x2b2d();let _0x1cacbf=_0x2b2d74[_0x33a518];return _0x1cacbf;}export function asVerificationError(_0x345546,_0x46da4f){const _0x5a92b5=a125_0x66eb8a;if(_0x345546 instanceof CliError&&_0x345546[_0x5a92b5(0x115)]===_0x5a92b5(0x167))return _0x345546;const _0x38aae4=_0x345546 instanceof Error?_0x345546[_0x5a92b5(0x116)]:String(_0x345546);return menuError(_0x5a92b5(0x167),''+_0x46da4f+(_0x38aae4?':\x20'+_0x38aae4:''),_0x5a92b5(0x11c));}export function describeMenuErrorCause(_0x5f0b5a,_0x119404,_0x4c837a){const _0x14e9ce=a125_0x66eb8a,_0x3b52dc=mapMenuApiError(_0x5f0b5a,_0x119404,_0x4c837a);return{'causeCode':_0x3b52dc[_0x14e9ce(0x115)],'causeMessage':_0x3b52dc[_0x14e9ce(0x116)]};}export function hasFlag(_0xa63a4d,_0x2235cb){const _0x3889ad=a125_0x66eb8a;return Object[_0x3889ad(0x13a)][_0x3889ad(0x122)][_0x3889ad(0x117)](_0xa63a4d[_0x3889ad(0x161)],_0x2235cb)&&_0xa63a4d[_0x3889ad(0x161)][_0x2235cb]!==undefined;}export function toApiParentId(_0x5e76e0){return _0x5e76e0??0x0;}export function formatParent(_0x480b48){const _0x16c5c8=a125_0x66eb8a;return _0x480b48==null?_0x16c5c8(0x163):String(_0x480b48);}export function menuError(_0x1e5d39,_0x2e591a,_0x2d3ef4){return new CliError(_0x1e5d39,0x1,_0x2e591a,_0x2d3ef4);}export function mapMenuApiError(_0x83aeb,_0x5e8bb0,_0x505dcd){const _0x53e4a2=a125_0x66eb8a;if(_0x83aeb instanceof CliError&&_0x83aeb[_0x53e4a2(0x115)]!==_0x53e4a2(0x141))return _0x83aeb;const _0x2f4df9=_0x83aeb instanceof Error?_0x83aeb[_0x53e4a2(0x116)]:String(_0x83aeb);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x53e4a2(0x14c)](_0x2f4df9))return menuError(_0x53e4a2(0x132),_0x53e4a2(0x12e)+_0x5e8bb0+(_0x505dcd?_0x53e4a2(0x162)+_0x505dcd:'')+'.',_0x53e4a2(0x14a));return menuError('menu_mutation_failed','Failed\x20to\x20'+_0x5e8bb0+(_0x505dcd?_0x53e4a2(0x162)+_0x505dcd:'')+':\x20'+_0x2f4df9,_0x53e4a2(0x14f));}export function isMenuResponseLoss(_0x217fc2){const _0x8470e0=a125_0x66eb8a,_0x4edfdb=_0x217fc2 instanceof Error?_0x217fc2[_0x8470e0(0x116)]:String(_0x217fc2);if(_0x217fc2 instanceof CliError)return _0x217fc2[_0x8470e0(0x115)]===_0x8470e0(0x141)&&/^Request (?:failed|timeout):/i['test'](_0x4edfdb);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x8470e0(0x14c)](_0x4edfdb);}function stateDrift(_0x47a11a){return menuError('menu_state_drift',_0x47a11a,'Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.');}
|
|
1
|
+
const a127_0x2b5dc7=a127_0x2019;(function(_0x26c920,_0x64c708){const _0x1a032e=a127_0x2019,_0x134155=_0x26c920();while(!![]){try{const _0x5c5138=-parseInt(_0x1a032e(0x1ff))/0x1*(parseInt(_0x1a032e(0x250))/0x2)+-parseInt(_0x1a032e(0x1f8))/0x3+parseInt(_0x1a032e(0x22d))/0x4*(-parseInt(_0x1a032e(0x257))/0x5)+-parseInt(_0x1a032e(0x244))/0x6+-parseInt(_0x1a032e(0x21a))/0x7*(-parseInt(_0x1a032e(0x217))/0x8)+-parseInt(_0x1a032e(0x230))/0x9+parseInt(_0x1a032e(0x21f))/0xa*(parseInt(_0x1a032e(0x24d))/0xb);if(_0x5c5138===_0x64c708)break;else _0x134155['push'](_0x134155['shift']());}catch(_0x41c913){_0x134155['push'](_0x134155['shift']());}}}(a127_0x3e59,0x366dd));import{CliError,CliErrors}from'../../../errors.js';function a127_0x3e59(){const _0x4a18e9=['Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','Permission\x20denied\x20while\x20attempting\x20to\x20','map','call','stringify','prototype','code',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','\x20path\x20changed:\x20expected\x20','743496OIuLLH','api_error','after','\x20is\x20type\x20\x22','yes','flagMissing','max','snapshotHash','get','13678423GGCgcn','planFile','Failed\x20to\x20','11826RQMsbF','str','test','menu_sort_overflow','defineProperty','\x20parent\x20changed:\x20expected\x20','hash','25mBBtIw','read\x20online\x20menu\x20facts\x20before\x20','targets','menu_mutation_failed','expected-children-count','menu_confirmation_required','Online\x20menu\x20state\x20changed\x20before\x20','data','menu_sort_invalid','appCode','Menu\x20','toLowerCase','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','rawFlags','number','plannedActions','\x20menu\x20','verification','817488eOvbLs','required','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','menu_parent_not_folder','folder','message','pre-write-recheck','20zLfEmC','num','Reorder\x20sibling\x20menus\x20below\x20','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','menu_not_found','before','Exact\x20online\x20menu\x20id','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','bool','childrenCount','parent-id','length','warnings','expect-parent-id','sort','byId','root','failed','error','backend','succeeded','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','validation','expect-path','8OprabD','\x20child\x20count\x20changed:\x20expected\x20','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','1810081BiXszZ','\x22,\x20not\x20folder.','deleteOrder','Cannot\x20append\x20a\x20','type','10NnPmuf','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.',',\x20current\x20','menu_permission_denied','menu_state_drift','selector','trim','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','path','parentId','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','hint','cascade',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','261204pEgebM','dry-run','string','3941622hONlOj','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','isSafeInteger','unknown','filter','menu_verification_failed','recheck\x20online\x20menu\x20facts\x20before\x20','cookie','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','hasOwnProperty','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.'];a127_0x3e59=function(){return _0x4a18e9;};return a127_0x3e59();}import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;function a127_0x2019(_0x33b244,_0x5276f0){_0x33b244=_0x33b244-0x1f0;const _0x3e599f=a127_0x3e59();let _0x2019e6=_0x3e599f[_0x33b244];return _0x2019e6;}export const MENU_ID_FLAG={'name':'id','type':a127_0x2b5dc7(0x1f4),'required':!![],'description':a127_0x2b5dc7(0x205)};export const MENU_SORT_FLAG={'name':a127_0x2b5dc7(0x20d),'type':a127_0x2b5dc7(0x1f4),'description':'Sibling\x20sort\x20value\x20(non-negative\x20integer)'};export const MENU_PARENT_ID_FLAG={'name':a127_0x2b5dc7(0x209),'type':a127_0x2b5dc7(0x22f),'description':a127_0x2b5dc7(0x1f2)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':'expect-parent-id','type':'string','description':a127_0x2b5dc7(0x219)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a127_0x2b5dc7(0x216),'type':a127_0x2b5dc7(0x22f),'description':a127_0x2b5dc7(0x229)},{'name':a127_0x2b5dc7(0x25b),'type':a127_0x2b5dc7(0x1f4),'description':a127_0x2b5dc7(0x206)}];export function validateExactId(_0xac832b){const _0x35fd70=a127_0x2b5dc7,_0x19cb95=_0xac832b[_0x35fd70(0x200)]('id');if(!Number['isSafeInteger'](_0x19cb95)||_0x19cb95<=0x0)throw CliErrors['validation']('--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.');return _0x19cb95;}export function validateSort(_0x5d9108,_0x2d83b4='sort'){const _0x23ba5b=a127_0x2b5dc7;if(!hasFlag(_0x5d9108,_0x2d83b4))return undefined;const _0x25f8e9=_0x5d9108['num'](_0x2d83b4);if(!Number[_0x23ba5b(0x232)](_0x25f8e9)||_0x25f8e9<0x0||_0x25f8e9>MAX_MENU_SORT)throw menuError(_0x23ba5b(0x25f),'--'+_0x2d83b4+'\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20'+MAX_MENU_SORT+'.',_0x23ba5b(0x231));return _0x25f8e9;}export function nextSiblingSort(_0x4efbc8,_0x12ad85,_0x237297){const _0x104fd8=a127_0x2b5dc7,_0x1f1496=getChildren(_0x4efbc8,_0x12ad85)[_0x104fd8(0x23d)](_0x2061dc=>_0x2061dc['sort'])[_0x104fd8(0x234)](_0x54f9ff=>typeof _0x54f9ff===_0x104fd8(0x1f4));if(_0x1f1496[_0x104fd8(0x20a)]===0x0)return 0x0;const _0xb7886f=Math[_0x104fd8(0x24a)](..._0x1f1496);if(_0xb7886f>=MAX_MENU_SORT)throw menuError(_0x104fd8(0x253),_0x104fd8(0x21d)+_0x237297+'\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20'+_0xb7886f+'.',_0x104fd8(0x201)+MAX_MENU_SORT+_0x104fd8(0x242));return _0xb7886f+0x1;}export function requireExplicitYes(_0x4f97ab){const _0x1ad199=a127_0x2b5dc7;if(_0x4f97ab['bool'](_0x1ad199(0x22e)))return;if(!_0x4f97ab[_0x1ad199(0x207)](_0x1ad199(0x248)))throw menuError(_0x1ad199(0x25c),_0x1ad199(0x214),_0x1ad199(0x23a));}export async function fetchMutationSnapshot(_0x569470,_0x240568,_0x3e974c){const _0xbda81=a127_0x2b5dc7;try{return await fetchMenuSnapshot(_0x569470[_0xbda81(0x260)],_0x569470[_0xbda81(0x237)]);}catch(_0x184291){throw mapMenuApiError(_0x184291,_0xbda81(0x258)+_0x240568,_0x3e974c);}}export async function recheckMutationSnapshot(_0x182d9c,_0x1cd671,_0x5ee075,_0x2c8990){const _0x184ec3=a127_0x2b5dc7;let _0x1edbba;try{_0x1edbba=await fetchMenuSnapshot(_0x182d9c[_0x184ec3(0x260)],_0x182d9c[_0x184ec3(0x237)]);}catch(_0x6193ea){const _0x4a3d66=mapMenuApiError(_0x6193ea,_0x184ec3(0x236)+_0x5ee075,_0x2c8990);throw menuFailure(_0x4a3d66,_0x1cd671,{'stage':_0x184ec3(0x1fe),'failed':_0x2c8990==null?{}:{'id':_0x2c8990}});}if(_0x1edbba[_0x184ec3(0x256)]!==_0x1cd671['snapshotHash']){const _0xa0cbfa=menuError(_0x184ec3(0x223),_0x184ec3(0x25d)+_0x5ee075+_0x184ec3(0x22c),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.');throw menuFailure(_0xa0cbfa,_0x1cd671,{'stage':_0x184ec3(0x1fe),'failed':{..._0x2c8990==null?{}:{'id':_0x2c8990},'expectedSnapshotHash':_0x1cd671[_0x184ec3(0x24b)],'currentSnapshotHash':_0x1edbba[_0x184ec3(0x256)]}});}return _0x1edbba;}export function parseParentId(_0x3142ef,_0xe785c4,_0x359514={}){const _0x12d9ba=a127_0x2b5dc7;if(!hasFlag(_0x3142ef,_0xe785c4)){if(_0x359514[_0x12d9ba(0x1f9)])throw CliErrors[_0x12d9ba(0x249)](_0xe785c4);return undefined;}const _0x412acb=_0x3142ef[_0x12d9ba(0x251)](_0xe785c4)[_0x12d9ba(0x225)]();if(_0x412acb[_0x12d9ba(0x1f1)]()===_0x12d9ba(0x20f))return null;if(!/^\d+$/[_0x12d9ba(0x252)](_0x412acb))throw CliErrors[_0x12d9ba(0x215)]('--'+_0xe785c4+_0x12d9ba(0x220));const _0x412351=Number(_0x412acb);if(!Number['isSafeInteger'](_0x412351)||_0x412351<=0x0)throw CliErrors[_0x12d9ba(0x215)]('--'+_0xe785c4+_0x12d9ba(0x220));return _0x412351;}export function requireMenu(_0x181f6e,_0x19a352){const _0xd2829a=a127_0x2b5dc7,_0x5d08f1=_0x181f6e[_0xd2829a(0x20e)][_0xd2829a(0x24c)](_0x19a352);if(!_0x5d08f1)throw menuError(_0xd2829a(0x203),'Online\x20menu\x20not\x20found:\x20'+_0x19a352,_0xd2829a(0x226));return _0x5d08f1;}export function requireFolder(_0x28b0e4,_0x984aab){const _0x1ef1bc=a127_0x2b5dc7,_0x5abd5a=requireMenu(_0x28b0e4,_0x984aab);if(_0x5abd5a[_0x1ef1bc(0x21e)]!==_0x1ef1bc(0x1fc))throw menuError(_0x1ef1bc(0x1fb),_0x1ef1bc(0x1f0)+_0x984aab+_0x1ef1bc(0x247)+(_0x5abd5a[_0x1ef1bc(0x21e)]||_0x1ef1bc(0x233))+_0x1ef1bc(0x21b),_0x1ef1bc(0x1fa));return _0x5abd5a;}export function assertExpectedState(_0xda2024,_0xc38bf1){const _0x5d1f74=a127_0x2b5dc7;if(hasFlag(_0xda2024,_0x5d1f74(0x20c))){const _0x2d8c3e=parseParentId(_0xda2024,_0x5d1f74(0x20c),{'required':!![]});if(_0xc38bf1['parentId']!==_0x2d8c3e)throw stateDrift(_0x5d1f74(0x1f0)+_0xc38bf1['id']+_0x5d1f74(0x255)+formatParent(_0x2d8c3e)+_0x5d1f74(0x221)+formatParent(_0xc38bf1[_0x5d1f74(0x228)])+'.');}if(hasFlag(_0xda2024,_0x5d1f74(0x216))){const _0x1132d8=_0xda2024[_0x5d1f74(0x251)](_0x5d1f74(0x216));if(_0xc38bf1[_0x5d1f74(0x227)]!==_0x1132d8)throw stateDrift(_0x5d1f74(0x1f0)+_0xc38bf1['id']+_0x5d1f74(0x243)+JSON['stringify'](_0x1132d8)+_0x5d1f74(0x221)+JSON[_0x5d1f74(0x23f)](_0xc38bf1[_0x5d1f74(0x227)])+'.');}if(hasFlag(_0xda2024,_0x5d1f74(0x25b))){const _0x3cf5ad=_0xda2024[_0x5d1f74(0x200)]('expected-children-count');if(!Number[_0x5d1f74(0x232)](_0x3cf5ad)||_0x3cf5ad<0x0)throw CliErrors[_0x5d1f74(0x215)]('--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0xc38bf1['childrenCount']!==_0x3cf5ad)throw stateDrift(_0x5d1f74(0x1f0)+_0xc38bf1['id']+_0x5d1f74(0x218)+_0x3cf5ad+_0x5d1f74(0x221)+_0xc38bf1[_0x5d1f74(0x208)]+'.');}}export function assertVerified(_0x2e12a9,_0x2a7e3f,_0x1b4814=a127_0x2b5dc7(0x23b)){if(!_0x2e12a9)throw menuError('menu_verification_failed',_0x2a7e3f,_0x1b4814);}export function mutationResult(_0x3e553d){const _0x27f0b1=a127_0x2b5dc7;return{'operation':_0x3e553d['operation'],'selector':_0x3e553d[_0x27f0b1(0x224)],'before':_0x3e553d[_0x27f0b1(0x204)],'after':_0x3e553d[_0x27f0b1(0x246)],'dryRun':_0x3e553d['dryRun'],'backend':_0x3e553d[_0x27f0b1(0x212)],..._0x3e553d['plannedActions']?{'plannedActions':_0x3e553d[_0x27f0b1(0x1f5)]}:{},..._0x3e553d['targets']?{'targets':_0x3e553d[_0x27f0b1(0x259)]}:{},..._0x3e553d[_0x27f0b1(0x21c)]?{'deleteOrder':_0x3e553d[_0x27f0b1(0x21c)]}:{},'snapshotHash':_0x3e553d['snapshotHash'],..._0x3e553d[_0x27f0b1(0x22b)]?{'cascade':_0x3e553d[_0x27f0b1(0x22b)]}:{},..._0x3e553d[_0x27f0b1(0x24e)]?{'planFile':_0x3e553d[_0x27f0b1(0x24e)]}:{},'succeeded':_0x3e553d[_0x27f0b1(0x213)]??[],'failed':_0x3e553d[_0x27f0b1(0x210)]??[],'warnings':_0x3e553d[_0x27f0b1(0x20b)]??[],'verification':_0x3e553d[_0x27f0b1(0x1f7)],'error':_0x3e553d[_0x27f0b1(0x211)]};}export function menuDryRunResult(_0x1971d6,_0x584542){return{..._0x1971d6,..._0x584542};}export function menuFailure(_0x1b9401,_0x2cfe54,_0x501e53){const _0x55ecc5=a127_0x2b5dc7,_0x203608=mutationResult({..._0x2cfe54,'after':_0x501e53[_0x55ecc5(0x246)]===undefined?_0x2cfe54['after']:_0x501e53[_0x55ecc5(0x246)],'backend':_0x501e53[_0x55ecc5(0x212)]??_0x2cfe54['backend'],'dryRun':![],'succeeded':_0x501e53[_0x55ecc5(0x213)]??[],'failed':[{..._0x501e53[_0x55ecc5(0x210)]??{},'stage':_0x501e53['stage'],'code':_0x1b9401[_0x55ecc5(0x241)],'message':_0x1b9401[_0x55ecc5(0x1fd)]}],'warnings':[..._0x2cfe54['warnings'],..._0x501e53[_0x55ecc5(0x20b)]??[]],'verification':_0x501e53[_0x55ecc5(0x1f7)],'error':{'code':_0x1b9401[_0x55ecc5(0x241)],'message':_0x1b9401[_0x55ecc5(0x1fd)],..._0x1b9401[_0x55ecc5(0x22a)]?{'hint':_0x1b9401[_0x55ecc5(0x22a)]}:{}}});return Object[_0x55ecc5(0x254)](_0x1b9401,_0x55ecc5(0x25e),{'value':_0x203608,'enumerable':!![],'configurable':!![]}),_0x1b9401;}export function asVerificationError(_0x26a781,_0x36a69b){const _0x450de5=a127_0x2b5dc7;if(_0x26a781 instanceof CliError&&_0x26a781['code']==='menu_verification_failed')return _0x26a781;const _0x4de11f=_0x26a781 instanceof Error?_0x26a781[_0x450de5(0x1fd)]:String(_0x26a781);return menuError(_0x450de5(0x235),''+_0x36a69b+(_0x4de11f?':\x20'+_0x4de11f:''),_0x450de5(0x238));}export function describeMenuErrorCause(_0x1d5a09,_0x15aeca,_0x531a12){const _0x180af7=a127_0x2b5dc7,_0x21d1c5=mapMenuApiError(_0x1d5a09,_0x15aeca,_0x531a12);return{'causeCode':_0x21d1c5[_0x180af7(0x241)],'causeMessage':_0x21d1c5[_0x180af7(0x1fd)]};}export function hasFlag(_0x5f102f,_0x37a2d1){const _0x54bfd6=a127_0x2b5dc7;return Object[_0x54bfd6(0x240)][_0x54bfd6(0x239)][_0x54bfd6(0x23e)](_0x5f102f['rawFlags'],_0x37a2d1)&&_0x5f102f[_0x54bfd6(0x1f3)][_0x37a2d1]!==undefined;}export function toApiParentId(_0xda6fa6){return _0xda6fa6??0x0;}export function formatParent(_0x3018e3){const _0x48f718=a127_0x2b5dc7;return _0x3018e3==null?_0x48f718(0x20f):String(_0x3018e3);}export function menuError(_0x283f19,_0x380126,_0x575f40){return new CliError(_0x283f19,0x1,_0x380126,_0x575f40);}export function mapMenuApiError(_0x4196a1,_0x3c9f7b,_0x52ff3c){const _0x4368b1=a127_0x2b5dc7;if(_0x4196a1 instanceof CliError&&_0x4196a1['code']!==_0x4368b1(0x245))return _0x4196a1;const _0x2bff85=_0x4196a1 instanceof Error?_0x4196a1[_0x4368b1(0x1fd)]:String(_0x4196a1);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i['test'](_0x2bff85))return menuError(_0x4368b1(0x222),_0x4368b1(0x23c)+_0x3c9f7b+(_0x52ff3c?_0x4368b1(0x1f6)+_0x52ff3c:'')+'.','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.');return menuError(_0x4368b1(0x25a),_0x4368b1(0x24f)+_0x3c9f7b+(_0x52ff3c?'\x20menu\x20'+_0x52ff3c:'')+':\x20'+_0x2bff85,'Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.');}export function isMenuResponseLoss(_0x1d8439){const _0x4bb986=a127_0x2b5dc7,_0x1542b2=_0x1d8439 instanceof Error?_0x1d8439[_0x4bb986(0x1fd)]:String(_0x1d8439);if(_0x1d8439 instanceof CliError)return _0x1d8439[_0x4bb986(0x241)]===_0x4bb986(0x245)&&/^Request (?:failed|timeout):/i[_0x4bb986(0x252)](_0x1542b2);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x4bb986(0x252)](_0x1542b2);}function stateDrift(_0x3bc4e2){const _0x5ce2b5=a127_0x2b5dc7;return menuError(_0x5ce2b5(0x223),_0x3bc4e2,_0x5ce2b5(0x202));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4576e3,_0x168f9e){const _0x403869=a128_0x52db,_0x25af76=_0x4576e3();while(!![]){try{const _0x2c90bf=parseInt(_0x403869(0x149))/0x1*(-parseInt(_0x403869(0x151))/0x2)+-parseInt(_0x403869(0x156))/0x3*(-parseInt(_0x403869(0x13f))/0x4)+parseInt(_0x403869(0x152))/0x5*(parseInt(_0x403869(0x140))/0x6)+parseInt(_0x403869(0x15f))/0x7*(-parseInt(_0x403869(0x145))/0x8)+-parseInt(_0x403869(0x143))/0x9+-parseInt(_0x403869(0x146))/0xa+parseInt(_0x403869(0x154))/0xb;if(_0x2c90bf===_0x168f9e)break;else _0x25af76['push'](_0x25af76['shift']());}catch(_0x16098b){_0x25af76['push'](_0x25af76['shift']());}}}(a128_0x13b2,0xef8ac));function a128_0x13b2(){const _0x15d48e=['menus','all','label','path','get-online-menu-list','create-menu','665382NuBfoi','136715fciCps','Menu\x20created\x20successfully:\x20','51627532SyXiQl','update-menu-cdn-url','37293vaUHYg','stringify','extend','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','Start\x20batch\x20menu\x20creation,\x20total\x20','info','Delete\x20','Regroup\x20','7uirplI','import','Creating\x20menu:\x20','Create\x20menu\x20\x22','Update\x20menu\x20','resources','Update\x20menu\x20assets\x20\x22','map','length','284JJNUSd','222XoscVq','\x20menu\x20group(s)','create-menus','9705960aFeMsd','loadScriptMode','13960568vdRNFa','11195740ySWmDT','Updating\x20menu\x20asset\x20links:\x20','procode','5GRAArb','Menu\x20assets\x20synced:\x20'];a128_0x13b2=function(){return _0x15d48e;};return a128_0x13b2();}import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a128_0xdd1563,updateMenuRecord}from'../../../core/api-client.js';function a128_0x52db(_0x52e89c,_0x5c5822){_0x52e89c=_0x52e89c-0x138;const _0x13b252=a128_0x13b2();let _0x52dbab=_0x13b252[_0x52e89c];return _0x52dbab;}export async function getOnlineMenuList(_0x3e3720,_0x332026){const _0x5d461a=a128_0x52db,_0x123e4d=getEnv();logger['info'](_0x5d461a(0x14f),isProduction(_0x123e4d)?_0x5d461a(0x15a)+_0x3e3720+')':_0x5d461a(0x159)+_0x3e3720+')');const _0x121594=await fetchMenuSnapshot(_0x3e3720,_0x332026,{'verbose':!![]});return logger[_0x5d461a(0x15c)](_0x5d461a(0x14f),'Fetched\x20'+_0x121594['total']+'\x20online\x20menus\x20successfully'),_0x121594[_0x5d461a(0x14b)][_0x5d461a(0x13d)](toProcessedMenuItem);}export async function createMenu(_0x26694c,_0x294f1f,_0x22867d){const _0x441ba3=a128_0x52db;logger[_0x441ba3(0x15c)](_0x441ba3(0x150),_0x441ba3(0x138)+_0x22867d[_0x441ba3(0x14d)]+'\x20('+_0x22867d[_0x441ba3(0x14e)]+')');const _0x1cf7eb={'appCode':_0x26694c,'type':_0x441ba3(0x148),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x22867d[_0x441ba3(0x13b)]?JSON[_0x441ba3(0x157)](_0x22867d[_0x441ba3(0x13b)]):undefined},..._0x22867d},_0x599577=await createMenuRecord(_0x1cf7eb,_0x294f1f,'Create\x20menu\x20\x22'+_0x22867d['label']+'\x22');return logger[_0x441ba3(0x15c)]('create-menu',_0x441ba3(0x153)+_0x22867d['label']),_0x599577;}async function createSingleMenu(_0x3060b0,_0x142aaa,_0x3c8a3e,_0x51e52b){const _0x795a3a=a128_0x52db,_0x51457d={'appCode':_0x3060b0,'type':_0x795a3a(0x148),'sort':0x0,'extend':{'loadScriptMode':_0x795a3a(0x160),'resources':_0x51e52b?JSON[_0x795a3a(0x157)](_0x51e52b):undefined},'label':_0x3c8a3e[_0x795a3a(0x14d)],'path':_0x3c8a3e[_0x795a3a(0x14e)]},_0x4232b3=await createMenuRecord(_0x51457d,_0x142aaa,_0x795a3a(0x139)+_0x3c8a3e[_0x795a3a(0x14d)]+'\x22');return logger['info']('create-menu',_0x795a3a(0x153)+_0x3c8a3e[_0x795a3a(0x14d)]),_0x4232b3;}export async function createMenus(_0x4e76b9,_0x5bb08b,_0x48ddfe,_0x4bb7aa){const _0x37f089=a128_0x52db;logger[_0x37f089(0x15c)]('create-menus',_0x37f089(0x15b)+_0x48ddfe[_0x37f089(0x13e)]);const _0x15ebdc=await Promise[_0x37f089(0x14c)](_0x48ddfe[_0x37f089(0x13d)](_0x39ebd5=>createSingleMenu(_0x4e76b9,_0x5bb08b,_0x39ebd5,_0x4bb7aa)));return logger['info'](_0x37f089(0x142),'Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0x48ddfe[_0x37f089(0x13e)]),_0x15ebdc;}export async function updateMenuCdnUrl(_0x579e42,_0xb83a06,_0x32540b){const _0x238b9c=a128_0x52db;logger[_0x238b9c(0x15c)](_0x238b9c(0x155),_0x238b9c(0x147)+_0x32540b[_0x238b9c(0x14d)]+'\x20('+_0x32540b[_0x238b9c(0x14e)]+')');const _0x642d53={'id':_0x32540b['id'],'appCode':_0x579e42,'extend':{..._0x32540b[_0x238b9c(0x158)]??{},..._0x32540b[_0x238b9c(0x144)]?{'loadScriptMode':_0x32540b['loadScriptMode']}:{},'resources':_0x32540b[_0x238b9c(0x13b)]?JSON[_0x238b9c(0x157)](_0x32540b['resources']):undefined}},_0x281408=await updateMenuRecord(_0x642d53,_0xb83a06,_0x238b9c(0x13c)+_0x32540b[_0x238b9c(0x14d)]+'\x22');return logger[_0x238b9c(0x15c)](_0x238b9c(0x155),_0x238b9c(0x14a)+_0x32540b[_0x238b9c(0x14d)],undefined),_0x281408;}export async function createMenuEntity(_0x1659a8,_0x46ab7c,_0x1238aa){const _0x50c6c2=a128_0x52db;return createMenuRecord({'appCode':_0x1659a8,..._0x1238aa},_0x46ab7c,_0x50c6c2(0x139)+_0x1238aa['label']+'\x22');}export async function updateMenuEntity(_0x366161,_0x27eb8b,_0x58f5eb){const _0x1b7205=a128_0x52db;return updateMenuRecord({'appCode':_0x366161,..._0x58f5eb},_0x27eb8b,_0x1b7205(0x13a)+_0x58f5eb['id']);}export async function batchDeleteMenuEntities(_0x59f759,_0x72c34b){const _0xc25e3b=a128_0x52db;return batchDeleteMenuRecords(_0x72c34b,_0x59f759,_0xc25e3b(0x15d)+_0x72c34b['length']+'\x20menu'+(_0x72c34b[_0xc25e3b(0x13e)]===0x1?'':'s'));}export async function startMenuRegroup(_0x4d2b4d,_0x4e0c35){const _0x50eb74=a128_0x52db;return a128_0xdd1563(_0x4e0c35,_0x4d2b4d,_0x50eb74(0x15e)+_0x4e0c35['menuGroups'][_0x50eb74(0x13e)]+_0x50eb74(0x141));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a129_0x5af3f7=a129_0x1b45;function a129_0x1b45(_0x5e5713,_0x3195a2){_0x5e5713=_0x5e5713-0x92;const _0x300f29=a129_0x300f();let _0x1b450a=_0x300f29[_0x5e5713];return _0x1b450a;}(function(_0x3492d9,_0x4beba4){const _0xb87243=a129_0x1b45,_0x30bfef=_0x3492d9();while(!![]){try{const _0x3f0ff8=parseInt(_0xb87243(0xa0))/0x1+parseInt(_0xb87243(0xb7))/0x2+parseInt(_0xb87243(0xb2))/0x3+parseInt(_0xb87243(0xa6))/0x4*(parseInt(_0xb87243(0xb9))/0x5)+-parseInt(_0xb87243(0xa8))/0x6*(-parseInt(_0xb87243(0xba))/0x7)+parseInt(_0xb87243(0xb6))/0x8*(parseInt(_0xb87243(0xa1))/0x9)+-parseInt(_0xb87243(0xa9))/0xa;if(_0x3f0ff8===_0x4beba4)break;else _0x30bfef['push'](_0x30bfef['shift']());}catch(_0x5aa597){_0x30bfef['push'](_0x30bfef['shift']());}}}(a129_0x300f,0x66bd9));function a129_0x300f(){const _0x9de5c0=['trim','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','603088ISBFHD','1314184GlzPNp','pages','115ypfXgz','21EOIBAP','Invalid\x20--params:\x20','length','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','get','push','filter','join','has','CSS\x20URL\x20is\x20unreachable:\x20','jsUrl','--params.','dryRun','Invalid\x20--params\x20JSON.','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','isArray','JS\x20URL\x20is\x20unreachable:\x20','cssUrl',':\x20expected\x20a\x20non-empty\x20string.','menu-sync','671102UYMTlI','63hJFnHd','keys','map','string','import','132316kuyBkB','Invalid\x20--params\x20fields:\x20','616386nsvRFJ','27403610QUhdle','info','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','label','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','setLogPath','No\x20local\x20pages\x20matched\x20paths:\x20','path','parse','708840myrjvG','hasOwn'];a129_0x300f=function(){return _0x9de5c0;};return a129_0x300f();}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';import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a129_0x5af3f7(0x96),a129_0x5af3f7(0x9d)]);function validateParams(_0x4374bf){const _0xf19e9b=a129_0x5af3f7,_0x2fae26=[];return _0x4374bf[_0xf19e9b(0x96)]&&!isValidJsHttpsUrl(_0x4374bf[_0xf19e9b(0x96)])&&_0x2fae26[_0xf19e9b(0xbf)]({'field':_0xf19e9b(0x96),'message':_0xf19e9b(0xad)}),_0x4374bf['cssUrl']&&!isValidCssHttpsUrl(_0x4374bf[_0xf19e9b(0x9d)])&&_0x2fae26[_0xf19e9b(0xbf)]({'field':_0xf19e9b(0x9d),'message':_0xf19e9b(0xab)}),_0x2fae26;}export async function runMenuSyncCore(_0x43c5fd,_0x46dd63,_0x4a2dd0=[],_0x14feca,_0x21139c={}){const _0xc2f13b=a129_0x5af3f7,_0x3f373c=parseMenuSyncParams(_0x14feca),_0x4b20fc=[...new Set(_0x4a2dd0[_0xc2f13b(0xa3)](_0x42c411=>_0x42c411['trim']())[_0xc2f13b(0x92)](Boolean))],_0x2870f6=_0x3f373c[_0xc2f13b(0x96)],_0x2ccf11=_0x3f373c['cssUrl'],_0x5ceb93=[];if(_0x2870f6)_0x5ceb93[_0xc2f13b(0xbf)](_0x2870f6);if(_0x2ccf11)_0x5ceb93[_0xc2f13b(0xbf)](_0x2ccf11);const _0x52578b=validateParams(_0x3f373c);if(_0x52578b[_0xc2f13b(0xbc)]>0x0){const _0x26e526=_0x52578b[_0xc2f13b(0xa3)](_0x5def1e=>_0xc2f13b(0x97)+_0x5def1e['field']+':\x20'+_0x5def1e['message'])[_0xc2f13b(0x93)](';\x20');throw new Error(_0xc2f13b(0xbb)+_0x26e526);}logger[_0xc2f13b(0xae)](process['cwd']()),logger['info'](_0xc2f13b(0x9f),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x43c5fd,'selectedCount':_0x4b20fc[_0xc2f13b(0xbc)],'jsUrl':_0x2870f6,'cssUrl':_0x2ccf11});if(_0x2870f6){const _0x55aca9=await isUrlReachable(_0x2870f6);if(!_0x55aca9)throw new Error(_0xc2f13b(0x9c)+_0x2870f6);}if(_0x2ccf11){const _0x37b12a=await isUrlReachable(_0x2ccf11);if(!_0x37b12a)throw new Error(_0xc2f13b(0x95)+_0x2ccf11);}const _0x18ab45=getLocalPages();if(_0x18ab45[_0xc2f13b(0xbc)]===0x0){if(_0x4b20fc[_0xc2f13b(0xbc)]>0x0)throw new Error(_0xc2f13b(0xaf)+_0x4b20fc[_0xc2f13b(0x93)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x21139c['dryRun']===!![],'targetPages':[],'plannedMenus':[]};}const _0x3f33cd=await getOnlineMenuList(_0x43c5fd,_0x46dd63),_0x1cdb3a=new Set(_0x3f33cd['map'](_0x5cfdff=>_0x5cfdff[_0xc2f13b(0xb0)]));let _0x5e9790;if(_0x4b20fc[_0xc2f13b(0xbc)]>0x0){const _0x435422=new Map(_0x18ab45[_0xc2f13b(0xa3)](_0x5e84ed=>[_0x5e84ed[_0xc2f13b(0xb0)],_0x5e84ed])),_0x7f7269=_0x4b20fc[_0xc2f13b(0x92)](_0x1ef16a=>!_0x435422[_0xc2f13b(0x94)](_0x1ef16a));if(_0x7f7269[_0xc2f13b(0xbc)]>0x0){const _0x34335f=_0x18ab45[_0xc2f13b(0xa3)](_0x1a928a=>_0x1a928a[_0xc2f13b(0xb0)])[_0xc2f13b(0x93)](',\x20');throw new Error(_0xc2f13b(0xaf)+_0x7f7269[_0xc2f13b(0x93)](',\x20')+'\x0a\x20\x20Available\x20local\x20paths:\x20'+_0x34335f);}const _0x2ae071=_0x4b20fc[_0xc2f13b(0x92)](_0x2a881f=>_0x1cdb3a[_0xc2f13b(0x94)](_0x2a881f));if(_0x2ae071[_0xc2f13b(0xbc)]>0x0)throw new Error(_0xc2f13b(0x9a)+_0x2ae071['join'](',\x20'));_0x5e9790=_0x4b20fc[_0xc2f13b(0xa3)](_0x51c1d7=>_0x435422[_0xc2f13b(0xbe)](_0x51c1d7));}else _0x5e9790=_0x18ab45['filter'](_0x5c1f18=>!_0x1cdb3a[_0xc2f13b(0x94)](_0x5c1f18[_0xc2f13b(0xb0)]));if(_0x5e9790[_0xc2f13b(0xbc)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x21139c[_0xc2f13b(0x98)]===!![],'targetPages':[],'plannedMenus':[]};const _0x1f07b2=_0x5e9790[_0xc2f13b(0xa3)](_0xfb391=>({'type':'procode','path':_0xfb391['path'],'label':_0xfb391[_0xc2f13b(0xac)],'loadScriptMode':_0xc2f13b(0xa5),'resources':[..._0x5ceb93]}));if(_0x21139c[_0xc2f13b(0x98)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x5e9790,'plannedMenus':_0x1f07b2};const _0x340a3d=await createMenus(_0x43c5fd,_0x46dd63,_0x5e9790,_0x5ceb93[_0xc2f13b(0xbc)]>0x0?_0x5ceb93:undefined);return logger[_0xc2f13b(0xaa)](_0xc2f13b(0x9f),'Menu\x20sync\x20completed',{'count':_0x5e9790[_0xc2f13b(0xbc)],'resources':_0x5ceb93}),{'created':_0x340a3d['length'],'skipped':![],'dryRun':![],'targetPages':_0x5e9790,'plannedMenus':_0x1f07b2,'menus':_0x340a3d};}export function parseMenuSyncParams(_0x556fc6){const _0x22d72f=a129_0x5af3f7;if(!_0x556fc6||typeof _0x556fc6!==_0x22d72f(0xa4))return{};let _0x575167;try{_0x575167=JSON[_0x22d72f(0xb1)](_0x556fc6);}catch{throw new Error(_0x22d72f(0x99));}if(typeof _0x575167!=='object'||_0x575167===null||Array[_0x22d72f(0x9b)](_0x575167))throw new Error(_0x22d72f(0xb5));const _0x5f4b7c=_0x575167;if(Object[_0x22d72f(0xb3)](_0x5f4b7c,_0x22d72f(0xb8)))throw new Error(_0x22d72f(0xbd));const _0xad2c4=Object[_0x22d72f(0xa2)](_0x5f4b7c)[_0x22d72f(0x92)](_0x2c3ba0=>!MENU_SYNC_PARAM_KEYS[_0x22d72f(0x94)](_0x2c3ba0));if(_0xad2c4[_0x22d72f(0xbc)]>0x0)throw new Error(_0x22d72f(0xa7)+_0xad2c4[_0x22d72f(0x93)](',\x20')+'.');for(const _0x258182 of MENU_SYNC_PARAM_KEYS){const _0x5b82f0=_0x5f4b7c[_0x258182];if(_0x5b82f0!==undefined&&(typeof _0x5b82f0!==_0x22d72f(0xa4)||_0x5b82f0[_0x22d72f(0xb4)]()===''))throw new Error('Invalid\x20--params.'+_0x258182+_0x22d72f(0x9e));}return{'jsUrl':typeof _0x5f4b7c[_0x22d72f(0x96)]===_0x22d72f(0xa4)?_0x5f4b7c[_0x22d72f(0x96)][_0x22d72f(0xb4)]():undefined,'cssUrl':typeof _0x5f4b7c['cssUrl']===_0x22d72f(0xa4)?_0x5f4b7c['cssUrl'][_0x22d72f(0xb4)]():undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x43ab48,_0x41fa1b){const _0x2b3390=a129_0x1b19,_0x4fe94e=_0x43ab48();while(!![]){try{const _0x1d759b=parseInt(_0x2b3390(0xd0))/0x1+-parseInt(_0x2b3390(0x103))/0x2+-parseInt(_0x2b3390(0xf4))/0x3*(parseInt(_0x2b3390(0xf1))/0x4)+parseInt(_0x2b3390(0xe2))/0x5*(parseInt(_0x2b3390(0xcf))/0x6)+parseInt(_0x2b3390(0xd7))/0x7*(-parseInt(_0x2b3390(0xc6))/0x8)+parseInt(_0x2b3390(0xc5))/0x9*(-parseInt(_0x2b3390(0xdb))/0xa)+parseInt(_0x2b3390(0xe5))/0xb*(parseInt(_0x2b3390(0xf5))/0xc);if(_0x1d759b===_0x41fa1b)break;else _0x4fe94e['push'](_0x4fe94e['shift']());}catch(_0x69b909){_0x4fe94e['push'](_0x4fe94e['shift']());}}}(a129_0x529c,0xe0eb0));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a129_0x1b19(_0x1b2fb1,_0x2e31b6){_0x1b2fb1=_0x1b2fb1-0xbb;const _0x529cc1=a129_0x529c();let _0x1b1987=_0x529cc1[_0x1b2fb1];return _0x1b1987;}function validateParams(_0x1a4569){const _0x41ed18=a129_0x1b19,_0x36e89d=[];return _0x1a4569[_0x41ed18(0xd8)]&&!isValidJsHttpsUrl(_0x1a4569[_0x41ed18(0xd8)])&&_0x36e89d[_0x41ed18(0xdd)]({'field':'jsUrl','message':_0x41ed18(0xbd)}),_0x1a4569[_0x41ed18(0xfd)]&&!isValidCssHttpsUrl(_0x1a4569[_0x41ed18(0xfd)])&&_0x36e89d['push']({'field':_0x41ed18(0xfd),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x36e89d;}export async function runMenuUpdateCore(_0x37f535,_0xe9f61e,_0x341def,_0x275a86={}){const _0x128d24=a129_0x1b19,_0x553776=parseUpdateParamsFlag(_0x341def),_0x1a2b26=normalizeMode(_0x275a86[_0x128d24(0xc2)]);validateSelection(_0x275a86[_0x128d24(0xf8)]);const _0x19250d=[];if(_0x553776['jsUrl'])_0x19250d[_0x128d24(0xdd)](_0x553776['jsUrl']);if(_0x553776[_0x128d24(0xfd)])_0x19250d[_0x128d24(0xdd)](_0x553776[_0x128d24(0xfd)]);const _0x13934b=validateParams(_0x553776);if(_0x13934b[_0x128d24(0xbf)]>0x0){const _0xf4bfe8=_0x13934b[_0x128d24(0xf7)](_0x331309=>_0x128d24(0xe9)+_0x331309[_0x128d24(0xdf)]+':\x20'+_0x331309[_0x128d24(0x101)])['join'](';\x20');throw new Error(_0x128d24(0xc8)+_0xf4bfe8);}if(_0x19250d[_0x128d24(0xbf)]===0x0)throw new Error(_0x128d24(0xf3)+_0x128d24(0xd2));logger[_0x128d24(0xee)](process['cwd']()),logger[_0x128d24(0xcc)](_0x128d24(0xfc),'Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x37f535,'jsUrl':_0x553776[_0x128d24(0xd8)],'cssUrl':_0x553776['cssUrl'],'mode':_0x1a2b26,'dryRun':_0x275a86[_0x128d24(0xe8)]===!![]});if(_0x553776['jsUrl']){const _0x1509d1=await isUrlReachable(_0x553776[_0x128d24(0xd8)]);if(!_0x1509d1)throw new Error(_0x128d24(0xd5)+_0x553776[_0x128d24(0xd8)]);}if(_0x553776['cssUrl']){const _0x3b5622=await isUrlReachable(_0x553776[_0x128d24(0xfd)]);if(!_0x3b5622)throw new Error(_0x128d24(0xd3)+_0x553776['cssUrl']);}const _0x15b02b=await getOnlineMenuList(_0x37f535,_0xe9f61e),_0x2d9ee4=_0x15b02b[_0x128d24(0xdc)](_0x492dac=>_0x492dac[_0x128d24(0xea)][_0x128d24(0xbf)]>0x0),_0x6b8436=selectMenusForUpdate(_0x2d9ee4,_0x275a86[_0x128d24(0xf8)]);if(_0x6b8436[_0x128d24(0xbf)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x275a86[_0x128d24(0xe8)]===!![]};const _0x49d2ca=_0x6b8436[_0x128d24(0xf7)](_0x559f7b=>buildMenuUpdateDiff(_0x559f7b,_0x553776,_0x1a2b26,_0x275a86[_0x128d24(0xe1)]===!![],_0x275a86['loadScriptMode']));if(_0x275a86['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x49d2ca};const _0x431b25=await Promise['allSettled'](_0x6b8436[_0x128d24(0xf7)]((_0x430095,_0x5717ec)=>updateMenuCdnUrl(_0x37f535,_0xe9f61e,{'id':_0x430095['id'],'label':_0x430095['label'],'path':_0x430095['path'],'resources':_0x49d2ca[_0x5717ec][_0x128d24(0xd1)][_0x128d24(0xea)],'extend':_0x430095[_0x128d24(0xfb)]??null,'loadScriptMode':_0x275a86[_0x128d24(0x102)]}))),_0x1fa52a=_0x431b25['filter'](_0x39914c=>_0x39914c[_0x128d24(0xce)]===_0x128d24(0xf2))[_0x128d24(0xf7)](_0x7241c=>_0x7241c[_0x128d24(0xd4)]),_0xfb424b=_0x431b25['filter'](_0x1f76f5=>_0x1f76f5[_0x128d24(0xce)]===_0x128d24(0xc0))[_0x128d24(0xbf)];return logger[_0x128d24(0xcc)]('menu-asset-update',_0x128d24(0xbe),{'count':_0x6b8436[_0x128d24(0xbf)],'resources':_0x19250d}),{'updated':_0x1fa52a[_0x128d24(0xbf)],'failed':_0xfb424b,'skipped':![],'menus':_0x1fa52a};}function validateSelection(_0x2c3c2d){const _0x595b97=a129_0x1b19;if(!_0x2c3c2d)throw new Error(_0x595b97(0x104));if(_0x2c3c2d['all']&&(_0x2c3c2d['menuIds']['length']>0x0||_0x2c3c2d[_0x595b97(0xeb)]['length']>0x0))throw new Error(_0x595b97(0xff));if(!_0x2c3c2d[_0x595b97(0xfe)]&&_0x2c3c2d['menuIds'][_0x595b97(0xbf)]===0x0&&_0x2c3c2d[_0x595b97(0xeb)][_0x595b97(0xbf)]===0x0)throw new Error(_0x595b97(0x104));}export function selectMenusForUpdate(_0xcee3f5,_0x1849d6){const _0xd5e8cc=a129_0x1b19;validateSelection(_0x1849d6);if(_0x1849d6[_0xd5e8cc(0xfe)])return _0xcee3f5;const _0x1e5290=new Set(_0xcee3f5[_0xd5e8cc(0xf7)](_0xd17097=>_0xd17097['id'])),_0x5f3aa6=new Set(_0xcee3f5['map'](_0x50924c=>_0x50924c['path'])),_0x1f9294=_0x1849d6[_0xd5e8cc(0xc9)][_0xd5e8cc(0xdc)](_0x5e3b2c=>!_0x1e5290['has'](_0x5e3b2c)),_0xaf00d5=_0x1849d6['paths'][_0xd5e8cc(0xdc)](_0x5a6dbc=>!_0x5f3aa6['has'](_0x5a6dbc));if(_0x1f9294[_0xd5e8cc(0xbf)]>0x0||_0xaf00d5[_0xd5e8cc(0xbf)]>0x0){const _0x34f738=[..._0x1f9294['map'](_0x30c3f6=>String(_0x30c3f6)),..._0xaf00d5][_0xd5e8cc(0xf9)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x34f738);}const _0x31fa2a=new Set(_0x1849d6['menuIds']),_0xb93eb5=new Set(_0x1849d6[_0xd5e8cc(0xeb)]);return _0xcee3f5['filter'](_0x2a8277=>_0x31fa2a[_0xd5e8cc(0xd9)](_0x2a8277['id'])||_0xb93eb5['has'](_0x2a8277[_0xd5e8cc(0xbb)]));}function a129_0x529c(){const _0x166aa3=['Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','136020SLDwLF','25893408YXLYsS','some','map','selection','join','\x20existing\x20JS\x20resources\x20for\x20\x22','extend','menu-asset-update','cssUrl','all','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','label','message','loadScriptMode','1058506kKDOnh','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','path','parse','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Menu\x20asset\x20update\x20completed','length','rejected','string','mode','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','.\x20Allowed\x20values:\x20replace,\x20patch','9tRGuxL','1387208pIdVDf','endsWith','Invalid\x20--params:\x20','menuIds','.css','\x22\x20(','info','menu\x20asset-update\x20cannot\x20patch\x20','status','533886LOCKQd','1679736JoGEKh','after','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','CSS\x20URL\x20is\x20unreachable:\x20','value','JS\x20URL\x20is\x20unreachable:\x20','isArray','21xoHZQw','jsUrl','has','unshift','17438390hVJMWg','filter','push','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','field','object','force','95fTzulA','replace','patch','11vZySNT','toLowerCase','split','dryRun','--params.','resources','paths','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','.js','setLogPath','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','Invalid\x20--mode:\x20','160QzKNeR','fulfilled'];a129_0x529c=function(){return _0x166aa3;};return a129_0x529c();}function normalizeMode(_0x27f45a){const _0x442546=a129_0x1b19;if(!_0x27f45a)return _0x442546(0xe4);if(_0x27f45a===_0x442546(0xe3)||_0x27f45a===_0x442546(0xe4))return _0x27f45a;throw new Error(_0x442546(0xf0)+_0x27f45a+_0x442546(0xc4));}function buildMenuUpdateDiff(_0x1f71bc,_0x1f3c6a,_0x2ce3be,_0x3cd85f,_0x4da31e){const _0x4c35ff=a129_0x1b19,_0x3eb021=[..._0x1f71bc['resources']];_0x2ce3be===_0x4c35ff(0xe4)&&assertUnambiguousPatchResources(_0x1f71bc,_0x3eb021,_0x1f3c6a);const _0x1dcab0=_0x2ce3be===_0x4c35ff(0xe4)?patchResources(_0x3eb021,_0x1f3c6a):replaceResources(_0x1f3c6a),_0x5c7dd0=[],_0x45fdf1=_0x3eb021['some'](isJsResource),_0x276154=_0x1dcab0[_0x4c35ff(0xf6)](isJsResource);if(_0x45fdf1&&!_0x276154){const _0x227c05=_0x4c35ff(0xc3)+_0x1f71bc[_0x4c35ff(0x100)]+_0x4c35ff(0xcb)+_0x1f71bc['path']+').\x20'+_0x4c35ff(0xde);if(!_0x3cd85f)throw new Error(_0x227c05);_0x5c7dd0[_0x4c35ff(0xdd)](_0x227c05);}const _0x8ad16=_0x3eb021['some'](isCssResource),_0x5cb8ef=_0x1dcab0[_0x4c35ff(0xf6)](isCssResource);_0x8ad16&&!_0x5cb8ef&&_0x5c7dd0[_0x4c35ff(0xdd)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x1f71bc['label']+_0x4c35ff(0xcb)+_0x1f71bc[_0x4c35ff(0xbb)]+').');const _0x591c97=typeof _0x1f71bc[_0x4c35ff(0xfb)]?.[_0x4c35ff(0x102)]===_0x4c35ff(0xc1)?_0x1f71bc[_0x4c35ff(0xfb)][_0x4c35ff(0x102)]:null,_0x18c1ce=_0x4da31e?{'loadScriptMode':_0x591c97}:{},_0x285871=_0x4da31e?{'loadScriptMode':_0x4da31e}:{};return{'id':_0x1f71bc['id'],'label':_0x1f71bc['label'],'path':_0x1f71bc[_0x4c35ff(0xbb)],'mode':_0x2ce3be,'before':{'resources':_0x3eb021,..._0x18c1ce},'after':{'resources':_0x1dcab0,..._0x285871},'warnings':_0x5c7dd0};}function replaceResources(_0x55a8ec){const _0x31a525=a129_0x1b19;return[_0x55a8ec[_0x31a525(0xd8)],_0x55a8ec[_0x31a525(0xfd)]]['filter'](_0x32ffa8=>!!_0x32ffa8);}function assertUnambiguousPatchResources(_0xf0f3f3,_0x1e891d,_0x560d70){const _0x5ef08b=a129_0x1b19,_0x1473d5=_0x1e891d[_0x5ef08b(0xdc)](isJsResource)['length'];if(_0x560d70[_0x5ef08b(0xd8)]&&_0x1473d5>0x1)throw new Error(_0x5ef08b(0xcd)+_0x1473d5+_0x5ef08b(0xfa)+_0xf0f3f3['label']+_0x5ef08b(0xcb)+_0xf0f3f3[_0x5ef08b(0xbb)]+')\x20'+_0x5ef08b(0xef));const _0x1780c1=_0x1e891d[_0x5ef08b(0xdc)](isCssResource)['length'];if(_0x560d70[_0x5ef08b(0xfd)]&&_0x1780c1>0x1)throw new Error(_0x5ef08b(0xcd)+_0x1780c1+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0xf0f3f3['label']+_0x5ef08b(0xcb)+_0xf0f3f3['path']+')\x20'+_0x5ef08b(0xec));}function patchResources(_0x91df4,_0x180bdf){const _0x14f1f8=a129_0x1b19;let _0x5927ef=![],_0x2ddee4=![];const _0x40c353=[];for(const _0x10989b of _0x91df4){if(isJsResource(_0x10989b)){if(_0x180bdf[_0x14f1f8(0xd8)]&&!_0x5927ef)_0x40c353[_0x14f1f8(0xdd)](_0x180bdf['jsUrl']),_0x5927ef=!![];else!_0x180bdf[_0x14f1f8(0xd8)]&&_0x40c353['push'](_0x10989b);continue;}if(isCssResource(_0x10989b)){if(_0x180bdf[_0x14f1f8(0xfd)]&&!_0x2ddee4)_0x40c353['push'](_0x180bdf[_0x14f1f8(0xfd)]),_0x2ddee4=!![];else!_0x180bdf[_0x14f1f8(0xfd)]&&_0x40c353[_0x14f1f8(0xdd)](_0x10989b);continue;}_0x40c353['push'](_0x10989b);}return _0x180bdf[_0x14f1f8(0xd8)]&&!_0x5927ef&&_0x40c353[_0x14f1f8(0xda)](_0x180bdf['jsUrl']),_0x180bdf[_0x14f1f8(0xfd)]&&!_0x2ddee4&&_0x40c353['push'](_0x180bdf['cssUrl']),_0x40c353;}function isJsResource(_0x27a2f4){const _0x3c03e7=a129_0x1b19;return stripQuery(_0x27a2f4)[_0x3c03e7(0xe6)]()[_0x3c03e7(0xc7)](_0x3c03e7(0xed));}function isCssResource(_0x2f9954){const _0x372225=a129_0x1b19;return stripQuery(_0x2f9954)[_0x372225(0xe6)]()['endsWith'](_0x372225(0xca));}function stripQuery(_0x3bf777){const _0xcd1fa9=a129_0x1b19;return _0x3bf777[_0xcd1fa9(0xe7)]('?')[0x0]??_0x3bf777;}function parseUpdateParamsFlag(_0x13f8b0){const _0x2961cb=a129_0x1b19;if(!_0x13f8b0||typeof _0x13f8b0!==_0x2961cb(0xc1))return{};try{const _0x3a2cf2=JSON[_0x2961cb(0xbc)](_0x13f8b0);if(typeof _0x3a2cf2!==_0x2961cb(0xe0)||_0x3a2cf2===null||Array[_0x2961cb(0xd6)](_0x3a2cf2))return{};return{'jsUrl':typeof _0x3a2cf2[_0x2961cb(0xd8)]===_0x2961cb(0xc1)?_0x3a2cf2['jsUrl']['trim']():undefined,'cssUrl':typeof _0x3a2cf2[_0x2961cb(0xfd)]===_0x2961cb(0xc1)?_0x3a2cf2[_0x2961cb(0xfd)]['trim']():undefined};}catch{return{};}}
|
|
1
|
+
(function(_0x1bf7d1,_0x11a2ef){const _0x2a21ab=a131_0xb5de,_0x26f3df=_0x1bf7d1();while(!![]){try{const _0x3a98d2=-parseInt(_0x2a21ab(0x18d))/0x1+-parseInt(_0x2a21ab(0x17a))/0x2*(-parseInt(_0x2a21ab(0x177))/0x3)+parseInt(_0x2a21ab(0x164))/0x4+-parseInt(_0x2a21ab(0x180))/0x5*(parseInt(_0x2a21ab(0x189))/0x6)+parseInt(_0x2a21ab(0x193))/0x7+parseInt(_0x2a21ab(0x165))/0x8*(parseInt(_0x2a21ab(0x17c))/0x9)+-parseInt(_0x2a21ab(0x187))/0xa;if(_0x3a98d2===_0x11a2ef)break;else _0x26f3df['push'](_0x26f3df['shift']());}catch(_0x3bbd1b){_0x26f3df['push'](_0x26f3df['shift']());}}}(a131_0x24e4,0x89052));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a131_0x24e4(){const _0xb9152f=['has','allSettled','menuIds','patch','after','extend','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','.\x20Allowed\x20values:\x20replace,\x20patch','\x20existing\x20JS\x20resources\x20for\x20\x22','Start\x20non-interactive\x20menu\x20asset\x20update','status','paths','resources','\x22\x20(','JS\x20URL\x20is\x20unreachable:\x20','--params.','1233OWQCvY','mode','selection','302QrkuCD','message','45ENFQjO','label','dryRun','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','20YJwHEt','loadScriptMode','filter','trim','.css','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','force','2378580VJvAFz','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','1339836ESKwxw','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','join','menu\x20asset-update\x20cannot\x20patch\x20','601624KmbZhl','Menu\x20asset\x20update\x20completed','map','toLowerCase','all','replace','5571090JzQgPi','cwd','jsUrl','some','Invalid\x20--mode:\x20','string','cssUrl','info','Invalid\x20--params:\x20','parse','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','field','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','rejected','path','length','push','CSS\x20URL\x20is\x20unreachable:\x20','menu-asset-update','setLogPath','split','3120976SYBntC','1049224jCZQrs','fulfilled'];a131_0x24e4=function(){return _0xb9152f;};return a131_0x24e4();}function validateParams(_0x3f7e05){const _0x9a1271=a131_0xb5de,_0x4eb2b7=[];return _0x3f7e05[_0x9a1271(0x195)]&&!isValidJsHttpsUrl(_0x3f7e05[_0x9a1271(0x195)])&&_0x4eb2b7[_0x9a1271(0x15f)]({'field':_0x9a1271(0x195),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x3f7e05[_0x9a1271(0x199)]&&!isValidCssHttpsUrl(_0x3f7e05[_0x9a1271(0x199)])&&_0x4eb2b7[_0x9a1271(0x15f)]({'field':_0x9a1271(0x199),'message':_0x9a1271(0x18a)}),_0x4eb2b7;}export async function runMenuUpdateCore(_0xe2b849,_0x5d4624,_0x2f0bfe,_0x3f9052={}){const _0x51fc6c=a131_0xb5de,_0xa1e67=parseUpdateParamsFlag(_0x2f0bfe),_0xedab56=normalizeMode(_0x3f9052[_0x51fc6c(0x178)]);validateSelection(_0x3f9052['selection']);const _0x32f4a2=[];if(_0xa1e67['jsUrl'])_0x32f4a2[_0x51fc6c(0x15f)](_0xa1e67[_0x51fc6c(0x195)]);if(_0xa1e67['cssUrl'])_0x32f4a2['push'](_0xa1e67[_0x51fc6c(0x199)]);const _0x4ec184=validateParams(_0xa1e67);if(_0x4ec184[_0x51fc6c(0x15e)]>0x0){const _0x4dfc41=_0x4ec184[_0x51fc6c(0x18f)](_0x15718f=>_0x51fc6c(0x176)+_0x15718f[_0x51fc6c(0x158)]+':\x20'+_0x15718f[_0x51fc6c(0x17b)])[_0x51fc6c(0x18b)](';\x20');throw new Error(_0x51fc6c(0x155)+_0x4dfc41);}if(_0x32f4a2[_0x51fc6c(0x15e)]===0x0)throw new Error(_0x51fc6c(0x185)+_0x51fc6c(0x159));logger[_0x51fc6c(0x162)](process[_0x51fc6c(0x194)]()),logger[_0x51fc6c(0x154)](_0x51fc6c(0x161),_0x51fc6c(0x170),{'appCode':_0xe2b849,'jsUrl':_0xa1e67[_0x51fc6c(0x195)],'cssUrl':_0xa1e67[_0x51fc6c(0x199)],'mode':_0xedab56,'dryRun':_0x3f9052['dryRun']===!![]});if(_0xa1e67['jsUrl']){const _0x5702b3=await isUrlReachable(_0xa1e67['jsUrl']);if(!_0x5702b3)throw new Error(_0x51fc6c(0x175)+_0xa1e67[_0x51fc6c(0x195)]);}if(_0xa1e67['cssUrl']){const _0x135fa6=await isUrlReachable(_0xa1e67[_0x51fc6c(0x199)]);if(!_0x135fa6)throw new Error(_0x51fc6c(0x160)+_0xa1e67[_0x51fc6c(0x199)]);}const _0x58c49c=await getOnlineMenuList(_0xe2b849,_0x5d4624),_0x1b6927=_0x58c49c[_0x51fc6c(0x182)](_0x1a4ece=>_0x1a4ece[_0x51fc6c(0x173)][_0x51fc6c(0x15e)]>0x0),_0x4f696a=selectMenusForUpdate(_0x1b6927,_0x3f9052[_0x51fc6c(0x179)]);if(_0x4f696a[_0x51fc6c(0x15e)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x3f9052['dryRun']===!![]};const _0x123106=_0x4f696a['map'](_0x30d647=>buildMenuUpdateDiff(_0x30d647,_0xa1e67,_0xedab56,_0x3f9052[_0x51fc6c(0x186)]===!![],_0x3f9052[_0x51fc6c(0x181)]));if(_0x3f9052[_0x51fc6c(0x17e)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x123106};const _0x1e60cb=await Promise[_0x51fc6c(0x168)](_0x4f696a['map']((_0x327eb2,_0x11e50e)=>updateMenuCdnUrl(_0xe2b849,_0x5d4624,{'id':_0x327eb2['id'],'label':_0x327eb2[_0x51fc6c(0x17d)],'path':_0x327eb2['path'],'resources':_0x123106[_0x11e50e][_0x51fc6c(0x16b)][_0x51fc6c(0x173)],'extend':_0x327eb2[_0x51fc6c(0x16c)]??null,'loadScriptMode':_0x3f9052['loadScriptMode']}))),_0x45e7e9=_0x1e60cb[_0x51fc6c(0x182)](_0x4f62f2=>_0x4f62f2[_0x51fc6c(0x171)]===_0x51fc6c(0x166))[_0x51fc6c(0x18f)](_0x5c4b3e=>_0x5c4b3e['value']),_0x4cda90=_0x1e60cb[_0x51fc6c(0x182)](_0x48331f=>_0x48331f[_0x51fc6c(0x171)]===_0x51fc6c(0x15c))['length'];return logger['info']('menu-asset-update',_0x51fc6c(0x18e),{'count':_0x4f696a[_0x51fc6c(0x15e)],'resources':_0x32f4a2}),{'updated':_0x45e7e9[_0x51fc6c(0x15e)],'failed':_0x4cda90,'skipped':![],'menus':_0x45e7e9};}function validateSelection(_0x4aa0a4){const _0x430939=a131_0xb5de;if(!_0x4aa0a4)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x4aa0a4[_0x430939(0x191)]&&(_0x4aa0a4['menuIds'][_0x430939(0x15e)]>0x0||_0x4aa0a4[_0x430939(0x172)][_0x430939(0x15e)]>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x4aa0a4[_0x430939(0x191)]&&_0x4aa0a4[_0x430939(0x169)][_0x430939(0x15e)]===0x0&&_0x4aa0a4[_0x430939(0x172)][_0x430939(0x15e)]===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}function a131_0xb5de(_0x14ea03,_0x384514){_0x14ea03=_0x14ea03-0x154;const _0x24e494=a131_0x24e4();let _0xb5de4b=_0x24e494[_0x14ea03];return _0xb5de4b;}export function selectMenusForUpdate(_0x3d7ded,_0x5ce6d5){const _0x44e526=a131_0xb5de;validateSelection(_0x5ce6d5);if(_0x5ce6d5[_0x44e526(0x191)])return _0x3d7ded;const _0x153100=new Set(_0x3d7ded[_0x44e526(0x18f)](_0x47ce6c=>_0x47ce6c['id'])),_0x23aacf=new Set(_0x3d7ded[_0x44e526(0x18f)](_0x2186ce=>_0x2186ce[_0x44e526(0x15d)])),_0x2b996b=_0x5ce6d5[_0x44e526(0x169)][_0x44e526(0x182)](_0x4ba82c=>!_0x153100[_0x44e526(0x167)](_0x4ba82c)),_0x2b818c=_0x5ce6d5[_0x44e526(0x172)][_0x44e526(0x182)](_0x46bb30=>!_0x23aacf['has'](_0x46bb30));if(_0x2b996b[_0x44e526(0x15e)]>0x0||_0x2b818c[_0x44e526(0x15e)]>0x0){const _0x5046ce=[..._0x2b996b['map'](_0x2ee8d9=>String(_0x2ee8d9)),..._0x2b818c][_0x44e526(0x18b)](',\x20');throw new Error(_0x44e526(0x157)+_0x5046ce);}const _0x3a94b3=new Set(_0x5ce6d5[_0x44e526(0x169)]),_0x2026df=new Set(_0x5ce6d5[_0x44e526(0x172)]);return _0x3d7ded[_0x44e526(0x182)](_0x48dccb=>_0x3a94b3[_0x44e526(0x167)](_0x48dccb['id'])||_0x2026df[_0x44e526(0x167)](_0x48dccb[_0x44e526(0x15d)]));}function normalizeMode(_0x4e2cb7){const _0x2f6a76=a131_0xb5de;if(!_0x4e2cb7)return _0x2f6a76(0x16a);if(_0x4e2cb7===_0x2f6a76(0x192)||_0x4e2cb7===_0x2f6a76(0x16a))return _0x4e2cb7;throw new Error(_0x2f6a76(0x197)+_0x4e2cb7+_0x2f6a76(0x16e));}function buildMenuUpdateDiff(_0x4a0565,_0x2067a2,_0x16a573,_0x3ea1f3,_0x2bd029){const _0x146361=a131_0xb5de,_0x116f91=[..._0x4a0565[_0x146361(0x173)]];_0x16a573===_0x146361(0x16a)&&assertUnambiguousPatchResources(_0x4a0565,_0x116f91,_0x2067a2);const _0x2c903a=_0x16a573===_0x146361(0x16a)?patchResources(_0x116f91,_0x2067a2):replaceResources(_0x2067a2),_0x380531=[],_0x4264a0=_0x116f91[_0x146361(0x196)](isJsResource),_0x2bab9d=_0x2c903a[_0x146361(0x196)](isJsResource);if(_0x4264a0&&!_0x2bab9d){const _0x354d0a=_0x146361(0x15b)+_0x4a0565[_0x146361(0x17d)]+'\x22\x20('+_0x4a0565[_0x146361(0x15d)]+').\x20'+_0x146361(0x17f);if(!_0x3ea1f3)throw new Error(_0x354d0a);_0x380531[_0x146361(0x15f)](_0x354d0a);}const _0x89063b=_0x116f91[_0x146361(0x196)](isCssResource),_0x39f4be=_0x2c903a[_0x146361(0x196)](isCssResource);_0x89063b&&!_0x39f4be&&_0x380531['push'](_0x146361(0x15a)+_0x4a0565['label']+_0x146361(0x174)+_0x4a0565[_0x146361(0x15d)]+').');const _0x427806=typeof _0x4a0565[_0x146361(0x16c)]?.['loadScriptMode']===_0x146361(0x198)?_0x4a0565[_0x146361(0x16c)][_0x146361(0x181)]:null,_0x2e5ab0=_0x2bd029?{'loadScriptMode':_0x427806}:{},_0xa0006e=_0x2bd029?{'loadScriptMode':_0x2bd029}:{};return{'id':_0x4a0565['id'],'label':_0x4a0565[_0x146361(0x17d)],'path':_0x4a0565[_0x146361(0x15d)],'mode':_0x16a573,'before':{'resources':_0x116f91,..._0x2e5ab0},'after':{'resources':_0x2c903a,..._0xa0006e},'warnings':_0x380531};}function replaceResources(_0x3e1627){const _0x445782=a131_0xb5de;return[_0x3e1627[_0x445782(0x195)],_0x3e1627[_0x445782(0x199)]][_0x445782(0x182)](_0x3c8f11=>!!_0x3c8f11);}function assertUnambiguousPatchResources(_0x5f1c3a,_0x4637c7,_0x3699ed){const _0x286472=a131_0xb5de,_0x1fe4c6=_0x4637c7['filter'](isJsResource)['length'];if(_0x3699ed[_0x286472(0x195)]&&_0x1fe4c6>0x1)throw new Error(_0x286472(0x18c)+_0x1fe4c6+_0x286472(0x16f)+_0x5f1c3a[_0x286472(0x17d)]+_0x286472(0x174)+_0x5f1c3a['path']+')\x20'+_0x286472(0x188));const _0x337917=_0x4637c7['filter'](isCssResource)['length'];if(_0x3699ed['cssUrl']&&_0x337917>0x1)throw new Error(_0x286472(0x18c)+_0x337917+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x5f1c3a[_0x286472(0x17d)]+'\x22\x20('+_0x5f1c3a['path']+')\x20'+_0x286472(0x16d));}function patchResources(_0x41dfc1,_0x453337){const _0xd45b67=a131_0xb5de;let _0xbaae5c=![],_0x5e5331=![];const _0x49a2cb=[];for(const _0x4d7906 of _0x41dfc1){if(isJsResource(_0x4d7906)){if(_0x453337['jsUrl']&&!_0xbaae5c)_0x49a2cb['push'](_0x453337['jsUrl']),_0xbaae5c=!![];else!_0x453337[_0xd45b67(0x195)]&&_0x49a2cb[_0xd45b67(0x15f)](_0x4d7906);continue;}if(isCssResource(_0x4d7906)){if(_0x453337[_0xd45b67(0x199)]&&!_0x5e5331)_0x49a2cb[_0xd45b67(0x15f)](_0x453337[_0xd45b67(0x199)]),_0x5e5331=!![];else!_0x453337[_0xd45b67(0x199)]&&_0x49a2cb['push'](_0x4d7906);continue;}_0x49a2cb[_0xd45b67(0x15f)](_0x4d7906);}return _0x453337[_0xd45b67(0x195)]&&!_0xbaae5c&&_0x49a2cb['unshift'](_0x453337['jsUrl']),_0x453337[_0xd45b67(0x199)]&&!_0x5e5331&&_0x49a2cb['push'](_0x453337[_0xd45b67(0x199)]),_0x49a2cb;}function isJsResource(_0x14fe44){const _0x2b2254=a131_0xb5de;return stripQuery(_0x14fe44)[_0x2b2254(0x190)]()['endsWith']('.js');}function isCssResource(_0x2fc344){const _0x27301f=a131_0xb5de;return stripQuery(_0x2fc344)['toLowerCase']()['endsWith'](_0x27301f(0x184));}function stripQuery(_0x38eb13){const _0x32eaec=a131_0xb5de;return _0x38eb13[_0x32eaec(0x163)]('?')[0x0]??_0x38eb13;}function parseUpdateParamsFlag(_0x49aea4){const _0x5d05ed=a131_0xb5de;if(!_0x49aea4||typeof _0x49aea4!=='string')return{};try{const _0x3581b1=JSON[_0x5d05ed(0x156)](_0x49aea4);if(typeof _0x3581b1!=='object'||_0x3581b1===null||Array['isArray'](_0x3581b1))return{};return{'jsUrl':typeof _0x3581b1[_0x5d05ed(0x195)]==='string'?_0x3581b1[_0x5d05ed(0x195)][_0x5d05ed(0x183)]():undefined,'cssUrl':typeof _0x3581b1[_0x5d05ed(0x199)]==='string'?_0x3581b1[_0x5d05ed(0x199)][_0x5d05ed(0x183)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ef9f6,_0x1229bc){const _0x2f7fec=a132_0x4477,_0x598ed8=_0x2ef9f6();while(!![]){try{const _0x54b345=parseInt(_0x2f7fec(0x69))/0x1+-parseInt(_0x2f7fec(0x68))/0x2+-parseInt(_0x2f7fec(0x6c))/0x3+-parseInt(_0x2f7fec(0x70))/0x4*(parseInt(_0x2f7fec(0x6a))/0x5)+-parseInt(_0x2f7fec(0x6b))/0x6+-parseInt(_0x2f7fec(0x67))/0x7+-parseInt(_0x2f7fec(0x6e))/0x8*(-parseInt(_0x2f7fec(0x6f))/0x9);if(_0x54b345===_0x1229bc)break;else _0x598ed8['push'](_0x598ed8['shift']());}catch(_0x1f02c5){_0x598ed8['push'](_0x598ed8['shift']());}}}(a132_0x3bbf,0xe330d));function a132_0x4477(_0x2cb734,_0x3fced1){_0x2cb734=_0x2cb734-0x67;const _0x3bbf6b=a132_0x3bbf();let _0x447742=_0x3bbf6b[_0x2cb734];return _0x447742;}export function isValidJsHttpsUrl(_0xe5cc1f){const _0x3eec96=a132_0x4477;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0xe5cc1f[_0x3eec96(0x6d)]());}export function isValidCssHttpsUrl(_0x1c362a){const _0x28f478=a132_0x4477;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x1c362a[_0x28f478(0x6d)]());}function a132_0x3bbf(){const _0x2ada19=['1032VpTVeJ','445941BelPil','980424AXFfpY','12765193QAYuqO','2787842EwsPzC','339660jpLBhX','10siyHwv','9644664eicztC','1457196SaNeNK','trim'];a132_0x3bbf=function(){return _0x2ada19;};return a132_0x3bbf();}export async function isUrlReachable(_0x1358c4){try{const _0x5f2ede=await fetch(_0x1358c4,{'method':'HEAD'});return _0x5f2ede['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a133_0x5e7f23=a133_0x2b7c;(function(_0x481bf8,_0x5d78af){const _0x10ee69=a133_0x2b7c,_0x286089=_0x481bf8();while(!![]){try{const _0x520179=parseInt(_0x10ee69(0x158))/0x1*(-parseInt(_0x10ee69(0x156))/0x2)+parseInt(_0x10ee69(0x142))/0x3*(parseInt(_0x10ee69(0x165))/0x4)+parseInt(_0x10ee69(0x171))/0x5*(parseInt(_0x10ee69(0x175))/0x6)+parseInt(_0x10ee69(0x14e))/0x7+-parseInt(_0x10ee69(0x152))/0x8*(-parseInt(_0x10ee69(0x15f))/0x9)+-parseInt(_0x10ee69(0x172))/0xa+-parseInt(_0x10ee69(0x15b))/0xb;if(_0x520179===_0x5d78af)break;else _0x286089['push'](_0x286089['shift']());}catch(_0x42f9ab){_0x286089['push'](_0x286089['shift']());}}}(a133_0xf9c3,0xbae88));import a133_0x446a77 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';function a133_0xf9c3(){const _0x3e214f=['yellow','length','\x20menu(s)...','validation','rawFlags','\x20page(s)','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','str','\x20\x20Cancelled.','onlineMenuList','15ozgkuy','876020vmQxbY','gray','cyan','1939782plPgoP','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','sync','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','filter','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','appCode','skipped','trim','paths','yes','failed','\x20local\x20microfrontend\x20menu(s).','/smartapi/menu/create','\x20and\x20CSS:\x20','boolean','Menu\x20sync\x20completed:\x20','\x20\x20✓\x20Selected:\x20','cssUrl','jsUrl','93jidgoI','localPages','POST','size','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','\x20created.','split','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','Creating\x20','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20\x20Create\x20','flag','4087923cAOPXx','map','menu','\x20failed.','1090592kAbQRM','appcode','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','created','5926GVfIWE','Menu\x20creation\x20failed','181FLBItO','string','params','9259987pHbegR','Failed\x20to\x20fetch\x20online\x20menu\x20list','cookie','targetPages','36gUiajy','Menu\x20sync\x20skipped','Would\x20create\x20','selectedAppName','write','✓\x20Menu\x20sync\x20completed:\x20','17048SFLsWt'];a133_0xf9c3=function(){return _0x3e214f;};return a133_0xf9c3();}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';function a133_0x2b7c(_0xc30ae,_0x509d92){_0xc30ae=_0xc30ae-0x142;const _0xf9c3ba=a133_0xf9c3();let _0x2b7c89=_0xf9c3ba[_0xc30ae];return _0x2b7c89;}export const menuSync={'service':a133_0x5e7f23(0x150),'command':a133_0x5e7f23(0x177),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a133_0x5e7f23(0x163),'flags':[{'name':a133_0x5e7f23(0x15a),'type':a133_0x5e7f23(0x159),'description':'Pre-fill\x20JS/CSS\x20URLs.\x20'+a133_0x5e7f23(0x14b)},{'name':a133_0x5e7f23(0x17e),'type':a133_0x5e7f23(0x159),'description':a133_0x5e7f23(0x17a)},{'name':a133_0x5e7f23(0x17f),'type':a133_0x5e7f23(0x184),'description':'Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages'}],async 'dryRun'(_0xcf40db){const _0x7dfdbc=a133_0x5e7f23;ensureRunnableContext(_0xcf40db[_0x7dfdbc(0x16a)],_0xcf40db[_0x7dfdbc(0x162)]);const _0x8ea460=await runMenuSyncCore(_0xcf40db[_0x7dfdbc(0x17b)],_0xcf40db['cookie'],parsePaths(_0xcf40db[_0x7dfdbc(0x16e)](_0x7dfdbc(0x17e))),_0xcf40db[_0x7dfdbc(0x16e)](_0x7dfdbc(0x15a)),{'dryRun':!![]});return{'method':_0x7dfdbc(0x144),'url':_0x7dfdbc(0x182),'body':_0x8ea460,'description':_0x8ea460[_0x7dfdbc(0x17c)]?_0x7dfdbc(0x154):_0x7dfdbc(0x161)+_0x8ea460[_0x7dfdbc(0x15e)][_0x7dfdbc(0x167)]+_0x7dfdbc(0x181)};},async 'execute'(_0x2feb44){const _0x3c4613=a133_0x5e7f23;ensureRunnableContext(_0x2feb44[_0x3c4613(0x16a)],_0x2feb44[_0x3c4613(0x162)]);const _0x4a7c5d=_0x2feb44[_0x3c4613(0x14d)](_0x3c4613(0x17f)),_0x18e9b5=_0x2feb44['str'](_0x3c4613(0x15a)),_0x510a2b=parsePaths(_0x2feb44[_0x3c4613(0x16e)](_0x3c4613(0x17e))),_0x7294fa=parseMenuSyncParams(_0x18e9b5);if(_0x4a7c5d){const _0x4b9add=await runMenuSyncCore(_0x2feb44[_0x3c4613(0x17b)],_0x2feb44[_0x3c4613(0x15d)],_0x510a2b,_0x18e9b5);if(_0x4b9add[_0x3c4613(0x17c)]){const _0x2e726a=getLocalPages();_0x2e726a[_0x3c4613(0x167)]===0x0?writeCliSideChannelLine(_0x3c4613(0x16c)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x3c4613(0x164)+_0x4b9add['created']+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x4b9add,'message':_0x4b9add[_0x3c4613(0x17c)]?_0x3c4613(0x160):_0x3c4613(0x185)+_0x4b9add[_0x3c4613(0x155)]+_0x3c4613(0x147)};}if(_0x510a2b[_0x3c4613(0x167)]>0x0)throw CliErrors[_0x3c4613(0x169)](_0x3c4613(0x178),_0x3c4613(0x146));if(!isInteractive()&&_0x18e9b5)throw CliErrors[_0x3c4613(0x169)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x3c4613(0x146));requireInteractive();const _0x4ea91d=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x2ce2eb,_0x39feec,_0x15b95e;try{const _0x126ec7=await fetchMenuData(_0x2feb44['appCode'],_0x2feb44['cookie']);_0x2ce2eb=_0x126ec7[_0x3c4613(0x143)],_0x39feec=_0x126ec7['onlinePaths'],_0x15b95e=_0x126ec7[_0x3c4613(0x170)],stopSpinner(_0x4ea91d,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x41a1d9){stopSpinner(_0x4ea91d,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors['validation'](_0x41a1d9 instanceof Error?_0x41a1d9['message']:_0x3c4613(0x15c));}if(_0x2ce2eb['length']===0x0)return writeCliSideChannelLine(a133_0x446a77[_0x3c4613(0x166)](_0x3c4613(0x149))),{'ok':!![]};const _0x513e3b=buildCompareRows(_0x2ce2eb,_0x39feec);writeCliSideChannelLine(renderCompareTable(_0x513e3b)),writeCliSideChannelLine('');const _0x184e46=await selectPages(_0x2ce2eb,_0x39feec);writeCliSideChannelLine(''),writeCliSideChannelLine(a133_0x446a77[_0x3c4613(0x174)](_0x3c4613(0x186)+_0x184e46[_0x3c4613(0x167)]+_0x3c4613(0x16b)));const _0x3ac40d=_0x7294fa[_0x3c4613(0x188)]&&_0x7294fa[_0x3c4613(0x187)];if(!_0x3ac40d){writeCliSideChannelLine(renderSyncSummary(_0x184e46,_0x39feec[_0x3c4613(0x145)]>0x0));const _0x183cec=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x183cec)return writeCliSideChannelLine(a133_0x446a77[_0x3c4613(0x173)](_0x3c4613(0x16f))),{'ok':!![]};}let _0x2effbc=_0x7294fa['jsUrl'],_0x2a7146=_0x7294fa[_0x3c4613(0x187)];!_0x2effbc&&(_0x2effbc=await askJsUrl());!_0x2a7146&&(_0x2a7146=await askCssUrl());const _0x1dba33=await askConfirm(_0x3c4613(0x14c)+_0x184e46[_0x3c4613(0x167)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x2effbc+_0x3c4613(0x183)+_0x2a7146+'?');if(!_0x1dba33)return writeCliSideChannelLine(a133_0x446a77[_0x3c4613(0x173)](_0x3c4613(0x16f))),{'ok':!![]};const _0x56d93b=[_0x2effbc,_0x2a7146],_0x4af1a6=startSpinner(_0x3c4613(0x14a)+_0x184e46['length']+_0x3c4613(0x168));try{const _0x44b0b1=await doCreateMenus(_0x2feb44[_0x3c4613(0x17b)],_0x2feb44['cookie'],_0x184e46,_0x56d93b);return stopSpinner(_0x4af1a6,'Created\x20'+_0x44b0b1[_0x3c4613(0x155)]+'\x20menu(s)',!![]),{'ok':!![],'data':_0x44b0b1,'message':_0x3c4613(0x185)+_0x44b0b1[_0x3c4613(0x155)]+'\x20created,\x20'+_0x44b0b1[_0x3c4613(0x180)]+_0x3c4613(0x151)};}catch(_0x338528){stopSpinner(_0x4af1a6,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x3c4613(0x169)](_0x338528 instanceof Error?_0x338528['message']:_0x3c4613(0x157));}}};function ensureRunnableContext(_0x36448d,_0x20a224){const _0x12b603=a133_0x5e7f23,_0x1f76fd=_0x36448d[_0x12b603(0x153)]?String(_0x36448d['appcode'])[_0x12b603(0x17d)]():'';if(!isInProject()&&!_0x20a224&&!_0x1f76fd)throw CliErrors[_0x12b603(0x169)](_0x12b603(0x16d)+_0x12b603(0x176));}function parsePaths(_0xa5c9ed){const _0x2c63f6=a133_0x5e7f23;return[...new Set(_0xa5c9ed[_0x2c63f6(0x148)](',')[_0x2c63f6(0x14f)](_0x260ee6=>_0x260ee6[_0x2c63f6(0x17d)]())[_0x2c63f6(0x179)](Boolean))];}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a134_0x5d9504=a134_0x4368;(function(_0x2814ef,_0x2138cb){const _0x15d0f7=a134_0x4368,_0x35e619=_0x2814ef();while(!![]){try{const _0xf3366d=-parseInt(_0x15d0f7(0xda))/0x1*(parseInt(_0x15d0f7(0xe5))/0x2)+parseInt(_0x15d0f7(0xd4))/0x3+-parseInt(_0x15d0f7(0xcb))/0x4+parseInt(_0x15d0f7(0xc7))/0x5+-parseInt(_0x15d0f7(0xc9))/0x6+-parseInt(_0x15d0f7(0xd0))/0x7+parseInt(_0x15d0f7(0xcd))/0x8*(parseInt(_0x15d0f7(0xe0))/0x9);if(_0xf3366d===_0x2138cb)break;else _0x35e619['push'](_0x35e619['shift']());}catch(_0x5ccb03){_0x35e619['push'](_0x35e619['shift']());}}}(a134_0x575c,0xe7c69));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';function a134_0x575c(){const _0x3cdb64=['2262808oGjycA','verification','readTimeout','POST','Created\x20notification\x20config\x20','7197225BxejCT','appCode','4819656GaaeNl',';\x20do\x20not\x20resubmit\x20automatically.','4552400zkboVK','notification_config_create_outcome_unknown','13110992jIzvnv','connectTimeout','verified','5961004dCuNse','planned','mutation','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','5386158yaDvrM','/notification/channel-config/create','endpointUrl','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','notification','isSafeInteger','1iBbMVX','channelType','config-create','channelConfig','Inspect\x20with\x20','document','9XewmQA','configCode',';\x20do\x20not\x20resubmit.','configName','create'];a134_0x575c=function(){return _0x3cdb64;};return a134_0x575c();}import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a134_0x5d9504(0xd5);function a134_0x4368(_0xcf468,_0x3f59be){_0xcf468=_0xcf468-0xc3;const _0x575cb9=a134_0x575c();let _0x4368d2=_0x575cb9[_0xcf468];return _0x4368d2;}async function prepareCreate(_0x13079c){const _0x3c80f1=a134_0x5d9504,_0x21bb4c=await readNotificationDocument(_0x13079c,_0x3c80f1(0xe4)),_0xed7960=createMutationInput(_0x13079c['appCode'],_0x21bb4c);return{'document':_0x21bb4c,'input':_0xed7960,'planned':projectNotificationConfig({'appCode':_0x13079c[_0x3c80f1(0xc8)],'configName':_0x21bb4c[_0x3c80f1(0xe3)],'channelType':_0x21bb4c['channelType'],'endpointUrl':_0x21bb4c[_0x3c80f1(0xd6)],'channelConfig':_0x21bb4c[_0x3c80f1(0xdd)],'description':_0x21bb4c['description'],'connectTimeout':_0x21bb4c[_0x3c80f1(0xce)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x21bb4c[_0x3c80f1(0xc4)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a134_0x5d9504(0xd8),'command':a134_0x5d9504(0xdc),'description':a134_0x5d9504(0xd3),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x35bf70){assertSingleNotificationSource(_0x35bf70);},async 'dryRun'(_0x26159f){const _0x3bcf74=a134_0x5d9504,_0x21690c=await prepareCreate(_0x26159f),_0x288357=notificationLookupCommand(_0x26159f[_0x3bcf74(0xc8)],_0x21690c[_0x3bcf74(0xdf)][_0x3bcf74(0xdb)]);return asDryRunResult({'operation':_0x3bcf74(0xe4),'selector':{'appCode':_0x26159f['appCode'],'configName':_0x21690c[_0x3bcf74(0xdf)]['configName'],'channelType':_0x21690c[_0x3bcf74(0xdf)][_0x3bcf74(0xdb)]},'before':null,'after':_0x21690c[_0x3bcf74(0xd1)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3bcf74(0xd1),'lookupCommand':_0x288357}},{'method':_0x3bcf74(0xc5),'url':CREATE_PATH});},async 'execute'(_0x4745d3){const _0x45e0b0=a134_0x5d9504,_0x404056=await prepareCreate(_0x4745d3),_0x2073dd=notificationLookupCommand(_0x4745d3[_0x45e0b0(0xc8)],_0x404056[_0x45e0b0(0xdf)]['channelType']);let _0x3b4b1f;try{_0x3b4b1f=await createNotificationChannelConfig(_0x404056['input']);}catch(_0x5dc486){if(isPlatformTransportFailure(_0x5dc486))throw notificationError(_0x45e0b0(0xcc),'Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.',_0x45e0b0(0xde)+_0x2073dd+_0x45e0b0(0xe2));throw safeApiFailure(_0x45e0b0(0xe4),_0x45e0b0(0xd2),_0x45e0b0(0xde)+_0x2073dd+';\x20no\x20automatic\x20retry\x20was\x20attempted.');}if(!Number[_0x45e0b0(0xd9)](_0x3b4b1f)||_0x3b4b1f<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x45e0b0(0xd7),_0x45e0b0(0xde)+_0x2073dd+_0x45e0b0(0xe2));let _0x32e26d;try{const _0x3ae744=await getNotificationChannelConfig(_0x3b4b1f,_0x4745d3['appCode']);_0x32e26d=normalizeExactNotificationConfig(_0x3ae744,_0x3b4b1f,_0x4745d3[_0x45e0b0(0xc8)]);}catch{throw safeApiFailure(_0x45e0b0(0xe4),_0x45e0b0(0xc3),'Inspect\x20with\x20'+_0x2073dd+_0x45e0b0(0xca));}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x32e26d[_0x45e0b0(0xc8)],'id':_0x32e26d['id'],'configCode':_0x32e26d[_0x45e0b0(0xe1)],'configName':_0x32e26d[_0x45e0b0(0xe3)],'channelType':_0x32e26d['channelType']},'before':null,'after':projectNotificationConfig(_0x32e26d),'dryRun':![],'backend':{'method':_0x45e0b0(0xc5),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x45e0b0(0xcf),'lookupCommand':_0x2073dd}},'message':_0x45e0b0(0xc6)+_0x32e26d['id']};}};
|