@lovrabet/rabetbase-cli 2.5.2 → 2.5.3-beta.2
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.d.ts +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.d.ts +2 -1
- package/lib/api/generate-sdk-config-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/logs.d.ts +7 -0
- package/lib/commands/bff/logs.js +1 -0
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.d.ts +21 -0
- package/lib/commands/dataset/batch-design.js +1 -0
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/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-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.d.ts +2 -0
- package/lib/commands/flow/create.js +1 -0
- package/lib/commands/flow/detail.d.ts +2 -0
- package/lib/commands/flow/detail.js +1 -0
- package/lib/commands/flow/index.d.ts +3 -0
- package/lib/commands/flow/index.js +1 -0
- package/lib/commands/flow/list.d.ts +2 -0
- package/lib/commands/flow/list.js +1 -0
- package/lib/commands/flow/publish.d.ts +2 -0
- package/lib/commands/flow/publish.js +1 -0
- package/lib/commands/flow/runtime-resources-shared.d.ts +40 -0
- package/lib/commands/flow/runtime-resources-shared.js +1 -0
- package/lib/commands/flow/runtime-role-list.d.ts +2 -0
- package/lib/commands/flow/runtime-role-list.js +1 -0
- package/lib/commands/flow/runtime-role-user-list.d.ts +2 -0
- package/lib/commands/flow/runtime-role-user-list.js +1 -0
- package/lib/commands/flow/runtime-user-search.d.ts +2 -0
- package/lib/commands/flow/runtime-user-search.js +1 -0
- package/lib/commands/flow/shared.d.ts +41 -0
- package/lib/commands/flow/shared.js +1 -0
- package/lib/commands/flow/update.d.ts +2 -0
- package/lib/commands/flow/update.js +1 -0
- package/lib/commands/flow/validate.d.ts +3 -0
- package/lib/commands/flow/validate.js +1 -0
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/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/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.d.ts +23 -0
- package/lib/config/region-config.js +1 -0
- package/lib/config/schema.d.ts +15 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +6 -0
- 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 +13 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +172 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.d.ts +55 -0
- package/lib/core/bff/hook-directory.js +1 -0
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +15 -0
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.d.ts +628 -0
- package/lib/core/flow-config.js +1 -0
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.d.ts +6 -0
- package/lib/core/page/lr-smart-jsx.js +1 -0
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/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/types/index.d.ts +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.d.ts +2 -8
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.d.ts +2 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +27 -8
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +137 -0
- package/skills/rabetbase/guides/backend-function.md +19 -9
- package/skills/rabetbase/guides/bff-creation-workflow.md +10 -1
- package/skills/rabetbase/guides/conflict-detection.md +2 -0
- package/skills/rabetbase/guides/page-development-workflow.md +3 -0
- package/skills/rabetbase/guides/sdk-client-generation.md +6 -5
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +290 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +11 -3
- package/skills/rabetbase/references/rabetbase-api-pull.md +5 -4
- package/skills/rabetbase/references/rabetbase-app-list.md +3 -0
- package/skills/rabetbase/references/rabetbase-bff-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-logs.md +47 -0
- package/skills/rabetbase/references/rabetbase-bff-pull.md +9 -3
- package/skills/rabetbase/references/rabetbase-bff-push.md +10 -2
- package/skills/rabetbase/references/rabetbase-bff-status.md +2 -0
- package/skills/rabetbase/references/rabetbase-config.md +10 -9
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +52 -2
- package/skills/rabetbase/references/rabetbase-doctor.md +2 -2
- package/skills/rabetbase/references/rabetbase-flow-commands.md +86 -0
- package/skills/rabetbase/references/rabetbase-flow-resources.md +83 -0
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +25 -0
- package/skills/rabetbase/references/rabetbase-instant-api-policy.md +103 -11
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +17 -0
- package/skills/rabetbase/references/rabetbase-page-push.md +5 -1
- package/skills/rabetbase/references/rabetbase-workspace.md +4 -2
- package/skills/rabetbase.manifest.json +9 -3
- package/templates/generate-api/client.ts.tpl +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a179_0x372b09=a179_0x47c9;(function(_0xe67ce0,_0x3316b7){const _0x154601=a179_0x47c9,_0x375403=_0xe67ce0();while(!![]){try{const _0x42ed7a=parseInt(_0x154601(0xa0))/0x1*(parseInt(_0x154601(0xce))/0x2)+parseInt(_0x154601(0xfe))/0x3*(parseInt(_0x154601(0xbc))/0x4)+parseInt(_0x154601(0xe0))/0x5+parseInt(_0x154601(0xf3))/0x6*(parseInt(_0x154601(0xba))/0x7)+-parseInt(_0x154601(0xe8))/0x8+-parseInt(_0x154601(0x104))/0x9*(parseInt(_0x154601(0xc8))/0xa)+parseInt(_0x154601(0x9e))/0xb;if(_0x42ed7a===_0x3316b7)break;else _0x375403['push'](_0x375403['shift']());}catch(_0x54f7f3){_0x375403['push'](_0x375403['shift']());}}}(a179_0xd1da,0x9d224));function a179_0xd1da(){const _0x594f61=['join','get','dev','concat','9dEOjpP','https:','node_modules','readdir','sep','.env','status','mkdtemp','.lovrabet.json','Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20','parse','9176002aIlgcn',',\x20received\x20','149551IzcNxA','downloading','local','href','version','toLowerCase','sha256:','Check\x20the\x20source\x20directory\x20and\x20retry.','test','mode','pathname','abort','hex','Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.','lstat','Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20','verifying','code','sub-app-react-demo','utf8','.env.','Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.','readFile','.lovrabet.log','length','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','100968dIiGOy','sha256','2236khDuZi','CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','protocol','validation','copyFile','isFile','realpath','dirname','.idea','.rabetbase-create-','application/zip','12135650byXpsL','includes','from','rename','isDirectory','.env.example','2jjVTCc','startsWith','.DS_Store','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','template.zip','update','read','package.json','resolve','ino','message','origin','isFinite','headers','cdn','copying','signal','.rabetbase','4793235DlLSAP','access','resolving','name','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','isAbsolute','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','8567888ysfLuC','chmod','isSafeInteger','object','Unable\x20to\x20claim\x20the\x20project\x20directory.','trim','releaseLock','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','Invalid\x20local\x20template\x20source:\x20','Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','168fBeBPY','mkdir','.git','body','.codegraph','basename','size','project','ENOENT','Project\x20directory\x20already\x20exists:\x20','isSymbolicLink','3123BhmTum','number'];a179_0xd1da=function(){return _0x594f61;};return a179_0xd1da();}import{createHash}from'node:crypto';import a179_0x24c6ba from'node:fs/promises';import a179_0x4830f4 from'node:path';import{PROJECT_TEMPLATE_ASSET_BASE_URL}from'../../../constant/cdn.js';import{extractProjectTemplateArchive}from'../../../commands/project/create/project-template-archive.js';import{getRabetbaseCdnConfig}from'../../../utils/cli-version-policy.js';import{CliErrors}from'../../../errors.js';const TEMPLATE_ID=a179_0x372b09(0xb2),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x757b70){const _0x2a8d65=a179_0x372b09;return typeof _0x757b70==='string'&&_0x757b70[_0x2a8d65(0xed)]()?_0x757b70['trim']():null;}function parseDescriptor(_0x495b6b){const _0x448e95=a179_0x372b09;if(!_0x495b6b||typeof _0x495b6b!=='object')throw new Error(_0x448e95(0xef)+TEMPLATE_ID+'\x22.');const _0xe4838a=_0x495b6b,_0x1e31ec=nonEmptyString(_0xe4838a['version']),_0x3a0097=nonEmptyString(_0xe4838a[_0x448e95(0xe3)]),_0x5bfabf=nonEmptyString(_0xe4838a[_0x448e95(0xbb)])?.[_0x448e95(0xa5)](),_0x5ef750=_0xe4838a['size'];if(!_0x1e31ec||!_0x3a0097||_0x3a0097!==a179_0x4830f4['posix'][_0x448e95(0xf8)](_0x3a0097)||_0x3a0097[_0x448e95(0xc9)]('\x5c')||!_0x5bfabf||!/^sha256:[a-f0-9]{64}$/[_0x448e95(0xa8)](_0x5bfabf)||typeof _0x5ef750!==_0x448e95(0xff)||!Number[_0x448e95(0xea)](_0x5ef750)||_0x5ef750<=0x0||_0x5ef750>MAX_ARCHIVE_SIZE)throw new Error(_0x448e95(0xe6)+TEMPLATE_ID+'\x22.');return{'version':_0x1e31ec,'name':_0x3a0097,'sha256':_0x5bfabf,'size':_0x5ef750};}async function fetchWithTimeout(_0x595e4,_0xb6ca8a,_0x2b32e6,_0x2f31ac){const _0x155461=a179_0x372b09,_0x2cf40a=new AbortController(),_0x1b8f4b=setTimeout(()=>_0x2cf40a[_0x155461(0xab)](),_0xb6ca8a);try{const _0x4c24ea=await fetch(_0x595e4,{'headers':{'Accept':_0x2b32e6},'signal':_0x2cf40a[_0x155461(0xde)]});return await _0x2f31ac(_0x4c24ea);}finally{clearTimeout(_0x1b8f4b);}}async function fetchTemplateDescriptor(){const _0x36f12f=await getRabetbaseCdnConfig();if(!_0x36f12f)throw new Error('Rabetbase\x20CDN\x20config\x20is\x20unavailable.');return parseDescriptor(_0x36f12f['projectTemplate']);}function resolveArchiveUrl(_0x2d1b24){const _0x5f51e0=a179_0x372b09,_0x3ce7e2=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0x55e0e4=new URL(_0x2d1b24,_0x3ce7e2);if(_0x55e0e4[_0x5f51e0(0xbf)]!==_0x5f51e0(0x105)||_0x55e0e4[_0x5f51e0(0xd9)]!==_0x3ce7e2[_0x5f51e0(0xd9)]||!_0x55e0e4[_0x5f51e0(0xaa)]['startsWith'](_0x3ce7e2[_0x5f51e0(0xaa)]))throw new Error(_0x5f51e0(0xe7));return _0x55e0e4[_0x5f51e0(0xa3)];}async function readResponseBytes(_0x101225,_0xb35243){const _0x2cf3e4=a179_0x372b09;if(!_0x101225[_0x2cf3e4(0xf6)]){const _0x246c88=Buffer['from'](await _0x101225['arrayBuffer']());if(_0x246c88[_0x2cf3e4(0xb8)]>_0xb35243)throw new Error('CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.');return _0x246c88;}const _0x1ec447=_0x101225[_0x2cf3e4(0xf6)]['getReader'](),_0x170aa0=[];let _0x3e6506=0x0;try{while(!![]){const {done:_0x51e2d7,value:_0x2d0054}=await _0x1ec447[_0x2cf3e4(0xd4)]();if(_0x51e2d7)break;_0x3e6506+=_0x2d0054['byteLength'];if(_0x3e6506>_0xb35243){await _0x1ec447['cancel']();throw new Error(_0x2cf3e4(0xbe));}_0x170aa0['push'](Buffer[_0x2cf3e4(0xca)](_0x2d0054));}}finally{_0x1ec447[_0x2cf3e4(0xee)]();}return Buffer[_0x2cf3e4(0x103)](_0x170aa0,_0x3e6506);}async function downloadArchive(_0x466e8c,_0x3d3ed1,_0x484225){const _0x294e63=a179_0x372b09,_0x12d309=await fetchWithTimeout(resolveArchiveUrl(_0x466e8c['name']),ARCHIVE_TIMEOUT_MS,_0x294e63(0xc7),async _0x2e0b92=>{const _0x317259=_0x294e63;if(!_0x2e0b92['ok'])throw new Error(_0x317259(0xbd)+_0x2e0b92[_0x317259(0x10a)]+'.');const _0x1ea6b8=Number(_0x2e0b92[_0x317259(0xdb)][_0x317259(0x101)]('content-length'));if(Number[_0x317259(0xda)](_0x1ea6b8)&&_0x1ea6b8>MAX_ARCHIVE_SIZE)throw new Error(_0x317259(0xd1));return readResponseBytes(_0x2e0b92,_0x466e8c[_0x317259(0xf9)]);});if(_0x12d309[_0x294e63(0xb8)]!==_0x466e8c[_0x294e63(0xf9)])throw new Error(_0x294e63(0xb9)+_0x466e8c[_0x294e63(0xf9)]+_0x294e63(0x9f)+_0x12d309[_0x294e63(0xb8)]+'.');_0x484225?.(_0x294e63(0xb0));const _0x3df3cc=_0x294e63(0xa6)+createHash('sha256')[_0x294e63(0xd3)](_0x12d309)['digest'](_0x294e63(0xac));if(_0x3df3cc!==_0x466e8c['sha256'])throw new Error(_0x294e63(0xe4));await a179_0x24c6ba['writeFile'](_0x3d3ed1,_0x12d309,{'flag':'wx'});}async function assertTemplateRoot(_0x4a168d){const _0x443e01=a179_0x372b09,_0x553204=a179_0x4830f4['join'](_0x4a168d,_0x443e01(0xd5)),_0x38def1=JSON[_0x443e01(0x10e)](await a179_0x24c6ba[_0x443e01(0xb6)](_0x553204,_0x443e01(0xb3)));if(!_0x38def1||typeof _0x38def1!==_0x443e01(0xeb))throw new Error('Project\x20template\x20package.json\x20is\x20invalid.');}const LOCAL_FORBIDDEN_NAMES=new Set([a179_0x372b09(0xd0),a179_0x372b09(0xf7),a179_0x372b09(0xf5),a179_0x372b09(0xc5),a179_0x372b09(0x10c),a179_0x372b09(0xb7),a179_0x372b09(0xdf),'.rabetbase.json','dist',a179_0x372b09(0x106)]);function isForbiddenTemplateEntry(_0x292d77){const _0xf3362f=a179_0x372b09;if(LOCAL_FORBIDDEN_NAMES['has'](_0x292d77))return!![];return _0x292d77===_0xf3362f(0x109)||_0x292d77[_0xf3362f(0xcf)](_0xf3362f(0xb4))&&_0x292d77!==_0xf3362f(0xcd);}function containsPath(_0x5503f7,_0xaade38){const _0x19e346=a179_0x372b09,_0x28247c=a179_0x4830f4['relative'](_0x5503f7,_0xaade38);return _0x28247c===''||!_0x28247c[_0x19e346(0xcf)]('..'+a179_0x4830f4[_0x19e346(0x108)])&&_0x28247c!=='..'&&!a179_0x4830f4[_0x19e346(0xe5)](_0x28247c);}async function copyLocalTemplateDirectory(_0x46a831,_0x28cd7a){const _0x19896f=a179_0x372b09;await a179_0x24c6ba[_0x19896f(0xf4)](_0x28cd7a,{'recursive':!![]});for(const _0x5f32ba of await a179_0x24c6ba[_0x19896f(0x107)](_0x46a831,{'withFileTypes':!![]})){const _0x1cad96=a179_0x4830f4['join'](_0x46a831,_0x5f32ba[_0x19896f(0xe3)]),_0x13e51a=a179_0x4830f4[_0x19896f(0x100)](_0x28cd7a,_0x5f32ba[_0x19896f(0xe3)]);if(isForbiddenTemplateEntry(_0x5f32ba['name']))throw new Error(_0x19896f(0xaf)+_0x1cad96);const _0x31f554=await a179_0x24c6ba[_0x19896f(0xae)](_0x1cad96);if(_0x31f554[_0x19896f(0xfd)]())throw new Error('Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20'+_0x1cad96);if(_0x31f554[_0x19896f(0xcc)]()){await copyLocalTemplateDirectory(_0x1cad96,_0x13e51a);continue;}if(!_0x31f554[_0x19896f(0xc2)]())continue;await a179_0x24c6ba[_0x19896f(0xc1)](_0x1cad96,_0x13e51a),await a179_0x24c6ba[_0x19896f(0xe9)](_0x13e51a,_0x31f554[_0x19896f(0xa9)]&0x1ff);}}async function readTemplateVersion(_0x1d6488){const _0x1f12e8=a179_0x372b09,_0xcc738e=JSON[_0x1f12e8(0x10e)](await a179_0x24c6ba[_0x1f12e8(0xb6)](a179_0x4830f4[_0x1f12e8(0x100)](_0x1d6488,_0x1f12e8(0xd5)),_0x1f12e8(0xb3)));return nonEmptyString(_0xcc738e[_0x1f12e8(0xa4)])||_0x1f12e8(0xa2);}async function readDirectoryIdentity(_0x5c9a9a){const _0x453e13=a179_0x372b09;try{const _0x165bf3=await a179_0x24c6ba['lstat'](_0x5c9a9a);if(!_0x165bf3[_0x453e13(0xcc)]())return null;return{'dev':_0x165bf3[_0x453e13(0x102)],'ino':_0x165bf3['ino']};}catch{return null;}}function a179_0x47c9(_0x1c108a,_0x1ce7a9){_0x1c108a=_0x1c108a-0x9e;const _0xd1da0e=a179_0xd1da();let _0x47c9f3=_0xd1da0e[_0x1c108a];return _0x47c9f3;}async function commitStagedProject(_0x452c1a,_0x58d9d2){const _0x3d7415=a179_0x372b09;await a179_0x24c6ba[_0x3d7415(0xf4)](_0x58d9d2);const _0x128d84=await readDirectoryIdentity(_0x58d9d2);if(!_0x128d84)throw new Error(_0x3d7415(0xec));try{for(const _0x4b47b3 of await a179_0x24c6ba[_0x3d7415(0x107)](_0x452c1a)){await a179_0x24c6ba[_0x3d7415(0xcb)](a179_0x4830f4[_0x3d7415(0x100)](_0x452c1a,_0x4b47b3),a179_0x4830f4[_0x3d7415(0x100)](_0x58d9d2,_0x4b47b3));}}catch(_0x568b87){const _0x18b302=await readDirectoryIdentity(_0x58d9d2);_0x18b302?.[_0x3d7415(0x102)]===_0x128d84[_0x3d7415(0x102)]&&_0x18b302[_0x3d7415(0xd7)]===_0x128d84[_0x3d7415(0xd7)]&&await a179_0x24c6ba['rm'](_0x58d9d2,{'recursive':!![],'force':!![]});throw _0x568b87;}}export async function materializeProjectTemplate(_0x37e00a,_0x3e5b57){const _0x3599f1=a179_0x372b09,_0x2897d1=a179_0x4830f4[_0x3599f1(0xd6)](_0x37e00a),_0x5c89bd=a179_0x4830f4[_0x3599f1(0xc4)](_0x2897d1);try{await a179_0x24c6ba[_0x3599f1(0xae)](_0x2897d1);throw new Error(_0x3599f1(0xfc)+_0x2897d1);}catch(_0x227804){if(_0x227804['code']!==_0x3599f1(0xfb))throw _0x227804;}const _0x465ab3=await a179_0x24c6ba[_0x3599f1(0x10b)](a179_0x4830f4[_0x3599f1(0x100)](_0x5c89bd,_0x3599f1(0xc6))),_0x121c3e=a179_0x4830f4[_0x3599f1(0x100)](_0x465ab3,'project'),_0x2fa199=a179_0x4830f4[_0x3599f1(0x100)](_0x465ab3,_0x3599f1(0xd2));try{try{_0x3e5b57?.(_0x3599f1(0xe2));const _0x192ef9=await fetchTemplateDescriptor();return _0x3e5b57?.(_0x3599f1(0xa1)),await downloadArchive(_0x192ef9,_0x2fa199,_0x3e5b57),_0x3e5b57?.('extracting'),await extractProjectTemplateArchive(_0x2fa199,_0x121c3e),await assertTemplateRoot(_0x121c3e),await commitStagedProject(_0x121c3e,_0x2897d1),{'source':_0x3599f1(0xdc),'version':_0x192ef9['version']};}catch(_0x439daf){if(_0x439daf[_0x3599f1(0xb1)]==='EEXIST')throw CliErrors['validation']('Project\x20directory\x20already\x20exists:\x20'+_0x2897d1,'Use\x20a\x20different\x20project\x20name.');const _0x2303a0=_0x439daf instanceof Error?_0x439daf[_0x3599f1(0xd8)]:String(_0x439daf);throw CliErrors[_0x3599f1(0xc0)](_0x3599f1(0xf2),'Check\x20your\x20network\x20and\x20retry.\x20Details:\x20'+_0x2303a0);}}finally{await a179_0x24c6ba['rm'](_0x465ab3,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x24a8b7,_0x555022,_0x50eedf){const _0x27ea58=a179_0x372b09;let _0x187e7a;try{_0x187e7a=await a179_0x24c6ba[_0x27ea58(0xc3)](a179_0x4830f4[_0x27ea58(0xd6)](_0x24a8b7));}catch{throw CliErrors['validation']('Local\x20template\x20source\x20does\x20not\x20exist:\x20'+a179_0x4830f4['resolve'](_0x24a8b7),_0x27ea58(0xf1));}const _0x15851e=await a179_0x24c6ba['lstat'](_0x187e7a);if(!_0x15851e[_0x27ea58(0xcc)]())throw CliErrors['validation'](_0x27ea58(0x10d)+_0x187e7a);const _0x38a21e=a179_0x4830f4[_0x27ea58(0xd6)](_0x555022),_0x5d9d87=await a179_0x24c6ba[_0x27ea58(0xc3)](a179_0x4830f4['dirname'](_0x38a21e)),_0x2e2f9f=a179_0x4830f4[_0x27ea58(0x100)](_0x5d9d87,a179_0x4830f4['basename'](_0x38a21e));if(containsPath(_0x187e7a,_0x2e2f9f)||containsPath(_0x2e2f9f,_0x187e7a))throw CliErrors[_0x27ea58(0xc0)](_0x27ea58(0xb5),'Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.');try{await a179_0x24c6ba[_0x27ea58(0xae)](_0x2e2f9f);throw CliErrors[_0x27ea58(0xc0)]('Project\x20directory\x20already\x20exists:\x20'+_0x2e2f9f,_0x27ea58(0xad));}catch(_0x118a10){if(_0x118a10[_0x27ea58(0xb1)]!==_0x27ea58(0xfb))throw _0x118a10;}const _0xf03f8b=a179_0x4830f4[_0x27ea58(0xc4)](_0x2e2f9f);await a179_0x24c6ba[_0x27ea58(0xe1)](_0xf03f8b);const _0x1c88d3=await a179_0x24c6ba[_0x27ea58(0x10b)](a179_0x4830f4[_0x27ea58(0x100)](_0xf03f8b,_0x27ea58(0xc6))),_0x20c286=a179_0x4830f4['join'](_0x1c88d3,_0x27ea58(0xfa));try{_0x50eedf?.(_0x27ea58(0xdd)),await copyLocalTemplateDirectory(_0x187e7a,_0x20c286),await assertTemplateRoot(_0x20c286);const _0x1d0914=await readTemplateVersion(_0x20c286);return await commitStagedProject(_0x20c286,_0x2e2f9f),{'source':_0x27ea58(0xa2),'version':_0x1d0914};}catch(_0x299ec9){const _0xb9686=_0x299ec9 instanceof Error?_0x299ec9[_0x27ea58(0xd8)]:String(_0x299ec9);throw CliErrors[_0x27ea58(0xc0)](_0x27ea58(0xf0)+_0xb9686,_0x27ea58(0xa7));}finally{await a179_0x24c6ba['rm'](_0x1c88d3,{'recursive':!![],'force':!![]});}}
|
|
1
|
+
const a193_0x575c4c=a193_0x4d18;(function(_0x55c9f3,_0x57ca31){const _0x2c7791=a193_0x4d18,_0x4fb3a8=_0x55c9f3();while(!![]){try{const _0x460c2c=-parseInt(_0x2c7791(0x1be))/0x1*(parseInt(_0x2c7791(0x183))/0x2)+parseInt(_0x2c7791(0x1b2))/0x3*(parseInt(_0x2c7791(0x197))/0x4)+-parseInt(_0x2c7791(0x1b4))/0x5*(-parseInt(_0x2c7791(0x17c))/0x6)+parseInt(_0x2c7791(0x189))/0x7*(parseInt(_0x2c7791(0x1c1))/0x8)+parseInt(_0x2c7791(0x164))/0x9+-parseInt(_0x2c7791(0x1ca))/0xa*(-parseInt(_0x2c7791(0x193))/0xb)+-parseInt(_0x2c7791(0x190))/0xc;if(_0x460c2c===_0x57ca31)break;else _0x4fb3a8['push'](_0x4fb3a8['shift']());}catch(_0x9c01c5){_0x4fb3a8['push'](_0x4fb3a8['shift']());}}}(a193_0x2821,0x9acd2));import{createHash}from'node:crypto';import a193_0x28f054 from'node:fs/promises';import a193_0x31ee6d from'node:path';import{PROJECT_TEMPLATE_ASSET_BASE_URL}from'../../../constant/cdn.js';import{extractProjectTemplateArchive}from'../../../commands/project/create/project-template-archive.js';function a193_0x2821(){const _0x47ac01=['Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','verifying','message','Unable\x20to\x20claim\x20the\x20project\x20directory.','digest','protocol','Local\x20template\x20source\x20does\x20not\x20exist:\x20','isDirectory','template.zip','relative','EEXIST','12kkepiC','mode','mkdtemp','Project\x20directory\x20already\x20exists:\x20','update','parse','name','4cZMVvj','validation','abort','read','realpath','Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20','39298DtQlXt','Check\x20the\x20source\x20directory\x20and\x20retry.','isFile','toLowerCase','trim','readFile','.rabetbase.json','26691924pdqYbk','resolve','test','88hLibcu','object','code','.idea','684CouPNg','extracting','.rabetbase-create-','string','.lovrabet.json','size','cdn','isAbsolute','isSymbolicLink','Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.','concat','Project\x20template\x20package.json\x20is\x20invalid.','body','mkdir','Rabetbase\x20CDN\x20config\x20is\x20unavailable.','application/zip','cancel','ino','dev','.git','includes','writeFile','Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.','content-length','basename','isFinite','pathname','16581pYimeA','local','2009405MZJOND','chmod','copyFile','startsWith','lstat','.rabetbase','sha256','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','.env.example','signal','389534xByIev','number','package.json','1360BgJdcI','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','access','dirname','sha256:','version','posix','join','https:','299960opmkeu','arrayBuffer','utf8','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','Invalid\x20local\x20template\x20source:\x20','get','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','.env.','ENOENT','origin','6248106hzpIsg','Use\x20a\x20different\x20project\x20name.','readdir','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','.env','project','Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.','sub-app-react-demo','has','hex','byteLength','Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20','from'];a193_0x2821=function(){return _0x47ac01;};return a193_0x2821();}import{getRabetbaseCdnConfig}from'../../../utils/cli-version-policy.js';import{CliErrors}from'../../../errors.js';const TEMPLATE_ID=a193_0x575c4c(0x16b),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x4988a6){const _0x2fde2e=a193_0x575c4c;return typeof _0x4988a6===_0x2fde2e(0x19a)&&_0x4988a6[_0x2fde2e(0x18d)]()?_0x4988a6[_0x2fde2e(0x18d)]():null;}function parseDescriptor(_0xa59c21){const _0x379be5=a193_0x575c4c;if(!_0xa59c21||typeof _0xa59c21!==_0x379be5(0x194))throw new Error('CDN\x20config\x20does\x20not\x20define\x20template\x20\x22'+TEMPLATE_ID+'\x22.');const _0xfe908e=_0xa59c21,_0x2188a7=nonEmptyString(_0xfe908e[_0x379be5(0x1c6)]),_0x4ffe39=nonEmptyString(_0xfe908e[_0x379be5(0x182)]),_0x3cc801=nonEmptyString(_0xfe908e[_0x379be5(0x1ba)])?.[_0x379be5(0x18c)](),_0x23b106=_0xfe908e[_0x379be5(0x19c)];if(!_0x2188a7||!_0x4ffe39||_0x4ffe39!==a193_0x31ee6d[_0x379be5(0x1c7)][_0x379be5(0x1af)](_0x4ffe39)||_0x4ffe39[_0x379be5(0x1ab)]('\x5c')||!_0x3cc801||!/^sha256:[a-f0-9]{64}$/[_0x379be5(0x192)](_0x3cc801)||typeof _0x23b106!==_0x379be5(0x1bf)||!Number['isSafeInteger'](_0x23b106)||_0x23b106<=0x0||_0x23b106>MAX_ARCHIVE_SIZE)throw new Error(_0x379be5(0x1bb)+TEMPLATE_ID+'\x22.');return{'version':_0x2188a7,'name':_0x4ffe39,'sha256':_0x3cc801,'size':_0x23b106};}async function fetchWithTimeout(_0x14f521,_0x1490ee,_0x2992e7,_0x6e15d8){const _0x5ab084=a193_0x575c4c,_0x145507=new AbortController(),_0xd15a04=setTimeout(()=>_0x145507[_0x5ab084(0x185)](),_0x1490ee);try{const _0x1baa47=await fetch(_0x14f521,{'headers':{'Accept':_0x2992e7},'signal':_0x145507[_0x5ab084(0x1bd)]});return await _0x6e15d8(_0x1baa47);}finally{clearTimeout(_0xd15a04);}}async function fetchTemplateDescriptor(){const _0xc3e5d7=a193_0x575c4c,_0x533f88=await getRabetbaseCdnConfig();if(!_0x533f88)throw new Error(_0xc3e5d7(0x1a5));return parseDescriptor(_0x533f88['projectTemplate']);}function resolveArchiveUrl(_0x3c1e29){const _0x317db2=a193_0x575c4c,_0x5594c9=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0x2e51d9=new URL(_0x3c1e29,_0x5594c9);if(_0x2e51d9[_0x317db2(0x176)]!==_0x317db2(0x1c9)||_0x2e51d9['origin']!==_0x5594c9[_0x317db2(0x163)]||!_0x2e51d9['pathname']['startsWith'](_0x5594c9[_0x317db2(0x1b1)]))throw new Error(_0x317db2(0x160));return _0x2e51d9['href'];}async function readResponseBytes(_0x41ba10,_0x30674e){const _0x326829=a193_0x575c4c;if(!_0x41ba10[_0x326829(0x1a3)]){const _0x4483f4=Buffer['from'](await _0x41ba10[_0x326829(0x1cb)]());if(_0x4483f4['length']>_0x30674e)throw new Error(_0x326829(0x15d));return _0x4483f4;}const _0xbd29ef=_0x41ba10[_0x326829(0x1a3)]['getReader'](),_0x322fa9=[];let _0xb72cb4=0x0;try{while(!![]){const {done:_0x4b4d21,value:_0x148803}=await _0xbd29ef[_0x326829(0x186)]();if(_0x4b4d21)break;_0xb72cb4+=_0x148803[_0x326829(0x16e)];if(_0xb72cb4>_0x30674e){await _0xbd29ef[_0x326829(0x1a7)]();throw new Error(_0x326829(0x15d));}_0x322fa9['push'](Buffer[_0x326829(0x170)](_0x148803));}}finally{_0xbd29ef['releaseLock']();}return Buffer[_0x326829(0x1a1)](_0x322fa9,_0xb72cb4);}async function downloadArchive(_0x56eef9,_0x28cb73,_0x3520f5){const _0x3ba0e0=a193_0x575c4c,_0x4e1a5a=await fetchWithTimeout(resolveArchiveUrl(_0x56eef9[_0x3ba0e0(0x182)]),ARCHIVE_TIMEOUT_MS,_0x3ba0e0(0x1a6),async _0x3de9a1=>{const _0x2f00a8=_0x3ba0e0;if(!_0x3de9a1['ok'])throw new Error('CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20'+_0x3de9a1['status']+'.');const _0x1586f6=Number(_0x3de9a1['headers'][_0x2f00a8(0x15f)](_0x2f00a8(0x1ae)));if(Number[_0x2f00a8(0x1b0)](_0x1586f6)&&_0x1586f6>MAX_ARCHIVE_SIZE)throw new Error('CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.');return readResponseBytes(_0x3de9a1,_0x56eef9[_0x2f00a8(0x19c)]);});if(_0x4e1a5a['length']!==_0x56eef9[_0x3ba0e0(0x19c)])throw new Error(_0x3ba0e0(0x1c2)+_0x56eef9[_0x3ba0e0(0x19c)]+',\x20received\x20'+_0x4e1a5a['length']+'.');_0x3520f5?.(_0x3ba0e0(0x172));const _0x37f2bf=_0x3ba0e0(0x1c5)+createHash(_0x3ba0e0(0x1ba))[_0x3ba0e0(0x180)](_0x4e1a5a)[_0x3ba0e0(0x175)](_0x3ba0e0(0x16d));if(_0x37f2bf!==_0x56eef9['sha256'])throw new Error('CDN\x20project\x20template\x20checksum\x20verification\x20failed.');await a193_0x28f054[_0x3ba0e0(0x1ac)](_0x28cb73,_0x4e1a5a,{'flag':'wx'});}async function assertTemplateRoot(_0x341085){const _0xee061b=a193_0x575c4c,_0x2bc014=a193_0x31ee6d[_0xee061b(0x1c8)](_0x341085,'package.json'),_0x17992c=JSON['parse'](await a193_0x28f054[_0xee061b(0x18e)](_0x2bc014,_0xee061b(0x1cc)));if(!_0x17992c||typeof _0x17992c!==_0xee061b(0x194))throw new Error(_0xee061b(0x1a2));}const LOCAL_FORBIDDEN_NAMES=new Set(['.DS_Store','.codegraph',a193_0x575c4c(0x1aa),a193_0x575c4c(0x196),a193_0x575c4c(0x19b),'.lovrabet.log',a193_0x575c4c(0x1b9),a193_0x575c4c(0x18f),'dist','node_modules']);function isForbiddenTemplateEntry(_0x51bc81){const _0x12102c=a193_0x575c4c;if(LOCAL_FORBIDDEN_NAMES[_0x12102c(0x16c)](_0x51bc81))return!![];return _0x51bc81===_0x12102c(0x168)||_0x51bc81[_0x12102c(0x1b7)](_0x12102c(0x161))&&_0x51bc81!==_0x12102c(0x1bc);}function a193_0x4d18(_0x17f266,_0x845637){_0x17f266=_0x17f266-0x15d;const _0x28219d=a193_0x2821();let _0x4d1858=_0x28219d[_0x17f266];return _0x4d1858;}function containsPath(_0x252cc1,_0x428753){const _0x596cc9=a193_0x575c4c,_0x495f5f=a193_0x31ee6d[_0x596cc9(0x17a)](_0x252cc1,_0x428753);return _0x495f5f===''||!_0x495f5f[_0x596cc9(0x1b7)]('..'+a193_0x31ee6d['sep'])&&_0x495f5f!=='..'&&!a193_0x31ee6d[_0x596cc9(0x19e)](_0x495f5f);}async function copyLocalTemplateDirectory(_0x4faa6b,_0x40bbe4){const _0x336a3f=a193_0x575c4c;await a193_0x28f054[_0x336a3f(0x1a4)](_0x40bbe4,{'recursive':!![]});for(const _0x3bfebe of await a193_0x28f054[_0x336a3f(0x166)](_0x4faa6b,{'withFileTypes':!![]})){const _0x771c4f=a193_0x31ee6d[_0x336a3f(0x1c8)](_0x4faa6b,_0x3bfebe[_0x336a3f(0x182)]),_0x111a78=a193_0x31ee6d[_0x336a3f(0x1c8)](_0x40bbe4,_0x3bfebe[_0x336a3f(0x182)]);if(isForbiddenTemplateEntry(_0x3bfebe[_0x336a3f(0x182)]))throw new Error('Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20'+_0x771c4f);const _0x3e0195=await a193_0x28f054[_0x336a3f(0x1b8)](_0x771c4f);if(_0x3e0195[_0x336a3f(0x19f)]())throw new Error(_0x336a3f(0x188)+_0x771c4f);if(_0x3e0195[_0x336a3f(0x178)]()){await copyLocalTemplateDirectory(_0x771c4f,_0x111a78);continue;}if(!_0x3e0195[_0x336a3f(0x18b)]())continue;await a193_0x28f054[_0x336a3f(0x1b6)](_0x771c4f,_0x111a78),await a193_0x28f054[_0x336a3f(0x1b5)](_0x111a78,_0x3e0195[_0x336a3f(0x17d)]&0x1ff);}}async function readTemplateVersion(_0x3b673b){const _0x26f860=a193_0x575c4c,_0x3424e0=JSON[_0x26f860(0x181)](await a193_0x28f054[_0x26f860(0x18e)](a193_0x31ee6d[_0x26f860(0x1c8)](_0x3b673b,_0x26f860(0x1c0)),_0x26f860(0x1cc)));return nonEmptyString(_0x3424e0[_0x26f860(0x1c6)])||_0x26f860(0x1b3);}async function readDirectoryIdentity(_0xb3ac09){const _0x2e6068=a193_0x575c4c;try{const _0x553908=await a193_0x28f054[_0x2e6068(0x1b8)](_0xb3ac09);if(!_0x553908['isDirectory']())return null;return{'dev':_0x553908[_0x2e6068(0x1a9)],'ino':_0x553908[_0x2e6068(0x1a8)]};}catch{return null;}}async function commitStagedProject(_0x36a9e8,_0x2fd52e){const _0x40395b=a193_0x575c4c;await a193_0x28f054[_0x40395b(0x1a4)](_0x2fd52e);const _0x49404d=await readDirectoryIdentity(_0x2fd52e);if(!_0x49404d)throw new Error(_0x40395b(0x174));try{for(const _0x240d7b of await a193_0x28f054[_0x40395b(0x166)](_0x36a9e8)){await a193_0x28f054['rename'](a193_0x31ee6d[_0x40395b(0x1c8)](_0x36a9e8,_0x240d7b),a193_0x31ee6d[_0x40395b(0x1c8)](_0x2fd52e,_0x240d7b));}}catch(_0x3d285a){const _0x589677=await readDirectoryIdentity(_0x2fd52e);_0x589677?.[_0x40395b(0x1a9)]===_0x49404d['dev']&&_0x589677[_0x40395b(0x1a8)]===_0x49404d[_0x40395b(0x1a8)]&&await a193_0x28f054['rm'](_0x2fd52e,{'recursive':!![],'force':!![]});throw _0x3d285a;}}export async function materializeProjectTemplate(_0x2f0cf2,_0x22a6b9){const _0x52c3c1=a193_0x575c4c,_0x509954=a193_0x31ee6d[_0x52c3c1(0x191)](_0x2f0cf2),_0x1fe2f9=a193_0x31ee6d[_0x52c3c1(0x1c4)](_0x509954);try{await a193_0x28f054[_0x52c3c1(0x1b8)](_0x509954);throw new Error('Project\x20directory\x20already\x20exists:\x20'+_0x509954);}catch(_0x81cb52){if(_0x81cb52[_0x52c3c1(0x195)]!==_0x52c3c1(0x162))throw _0x81cb52;}const _0x33aaf8=await a193_0x28f054[_0x52c3c1(0x17e)](a193_0x31ee6d[_0x52c3c1(0x1c8)](_0x1fe2f9,_0x52c3c1(0x199))),_0x1dc257=a193_0x31ee6d[_0x52c3c1(0x1c8)](_0x33aaf8,_0x52c3c1(0x169)),_0x47cd87=a193_0x31ee6d[_0x52c3c1(0x1c8)](_0x33aaf8,_0x52c3c1(0x179));try{try{_0x22a6b9?.('resolving');const _0xb23037=await fetchTemplateDescriptor();return _0x22a6b9?.('downloading'),await downloadArchive(_0xb23037,_0x47cd87,_0x22a6b9),_0x22a6b9?.(_0x52c3c1(0x198)),await extractProjectTemplateArchive(_0x47cd87,_0x1dc257),await assertTemplateRoot(_0x1dc257),await commitStagedProject(_0x1dc257,_0x509954),{'source':_0x52c3c1(0x19d),'version':_0xb23037[_0x52c3c1(0x1c6)]};}catch(_0x14d146){if(_0x14d146[_0x52c3c1(0x195)]===_0x52c3c1(0x17b))throw CliErrors['validation'](_0x52c3c1(0x17f)+_0x509954,_0x52c3c1(0x165));const _0x390a35=_0x14d146 instanceof Error?_0x14d146[_0x52c3c1(0x173)]:String(_0x14d146);throw CliErrors[_0x52c3c1(0x184)](_0x52c3c1(0x171),_0x52c3c1(0x167)+_0x390a35);}}finally{await a193_0x28f054['rm'](_0x33aaf8,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x3874bc,_0x4f0572,_0x3e58d8){const _0x19ed10=a193_0x575c4c;let _0x4759d2;try{_0x4759d2=await a193_0x28f054[_0x19ed10(0x187)](a193_0x31ee6d[_0x19ed10(0x191)](_0x3874bc));}catch{throw CliErrors[_0x19ed10(0x184)](_0x19ed10(0x177)+a193_0x31ee6d[_0x19ed10(0x191)](_0x3874bc),_0x19ed10(0x1ad));}const _0x7267ff=await a193_0x28f054['lstat'](_0x4759d2);if(!_0x7267ff[_0x19ed10(0x178)]())throw CliErrors[_0x19ed10(0x184)](_0x19ed10(0x16f)+_0x4759d2);const _0x39b36d=a193_0x31ee6d[_0x19ed10(0x191)](_0x4f0572),_0x4c14e9=await a193_0x28f054[_0x19ed10(0x187)](a193_0x31ee6d[_0x19ed10(0x1c4)](_0x39b36d)),_0x3fc82c=a193_0x31ee6d[_0x19ed10(0x1c8)](_0x4c14e9,a193_0x31ee6d[_0x19ed10(0x1af)](_0x39b36d));if(containsPath(_0x4759d2,_0x3fc82c)||containsPath(_0x3fc82c,_0x4759d2))throw CliErrors[_0x19ed10(0x184)](_0x19ed10(0x16a),'Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.');try{await a193_0x28f054[_0x19ed10(0x1b8)](_0x3fc82c);throw CliErrors['validation']('Project\x20directory\x20already\x20exists:\x20'+_0x3fc82c,_0x19ed10(0x1a0));}catch(_0x38b58c){if(_0x38b58c[_0x19ed10(0x195)]!==_0x19ed10(0x162))throw _0x38b58c;}const _0xd42508=a193_0x31ee6d[_0x19ed10(0x1c4)](_0x3fc82c);await a193_0x28f054[_0x19ed10(0x1c3)](_0xd42508);const _0x1f9cda=await a193_0x28f054[_0x19ed10(0x17e)](a193_0x31ee6d[_0x19ed10(0x1c8)](_0xd42508,_0x19ed10(0x199))),_0x351798=a193_0x31ee6d[_0x19ed10(0x1c8)](_0x1f9cda,_0x19ed10(0x169));try{_0x3e58d8?.('copying'),await copyLocalTemplateDirectory(_0x4759d2,_0x351798),await assertTemplateRoot(_0x351798);const _0x24ad49=await readTemplateVersion(_0x351798);return await commitStagedProject(_0x351798,_0x3fc82c),{'source':_0x19ed10(0x1b3),'version':_0x24ad49};}catch(_0x1898ca){const _0x3c9294=_0x1898ca instanceof Error?_0x1898ca[_0x19ed10(0x173)]:String(_0x1898ca);throw CliErrors[_0x19ed10(0x184)](_0x19ed10(0x15e)+_0x3c9294,_0x19ed10(0x18a));}finally{await a193_0x28f054['rm'](_0x1f9cda,{'recursive':!![],'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51fc0c,_0x25242f){const _0x19beac=a194_0x16d8,_0x32130a=_0x51fc0c();while(!![]){try{const _0x5ea8c7=-parseInt(_0x19beac(0x16c))/0x1+parseInt(_0x19beac(0x162))/0x2*(parseInt(_0x19beac(0x166))/0x3)+parseInt(_0x19beac(0x163))/0x4+-parseInt(_0x19beac(0x16a))/0x5+-parseInt(_0x19beac(0x164))/0x6+parseInt(_0x19beac(0x16e))/0x7+-parseInt(_0x19beac(0x171))/0x8*(-parseInt(_0x19beac(0x16d))/0x9);if(_0x5ea8c7===_0x25242f)break;else _0x32130a['push'](_0x32130a['shift']());}catch(_0x10d17c){_0x32130a['push'](_0x32130a['shift']());}}}(a194_0x2890,0xb61c9));import{CliErrors}from'../../../errors.js';function a194_0x16d8(_0x291d60,_0xefbd11){_0x291d60=_0x291d60-0x162;const _0x289001=a194_0x2890();let _0x16d87d=_0x289001[_0x291d60];return _0x16d87d;}const PROJECT_NAME_PATTERN=/^[A-Za-z0-9][A-Za-z0-9_-]*$/,WINDOWS_RESERVED_NAME=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i,MAX_PROJECT_NAME_LENGTH=0x64;export function getProjectNameValidationError(_0x5e8d84){const _0x343c75=a194_0x16d8,_0x2db5d1=_0x5e8d84[_0x343c75(0x16b)]();if(!_0x2db5d1)return'Project\x20name\x20cannot\x20be\x20empty';if(_0x2db5d1['length']>MAX_PROJECT_NAME_LENGTH)return _0x343c75(0x165)+MAX_PROJECT_NAME_LENGTH+_0x343c75(0x168);if(!PROJECT_NAME_PATTERN[_0x343c75(0x172)](_0x2db5d1))return _0x343c75(0x16f);if(WINDOWS_RESERVED_NAME[_0x343c75(0x172)](_0x2db5d1))return'Project\x20name\x20\x22'+_0x2db5d1+_0x343c75(0x167);return null;}function a194_0x2890(){const _0x47b2dd=['test','381838JIlYPx','3443792yoqSzp','4919106OPBktr','Project\x20name\x20cannot\x20exceed\x20','15oJfArT','\x22\x20is\x20reserved\x20on\x20Windows','\x20characters','Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.','5523915QGZKUf','trim','1006505ybTkXo','126pPKgkY','5252709PYxstv','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','validation','634936GBGThz'];a194_0x2890=function(){return _0x47b2dd;};return a194_0x2890();}export function validateProjectName(_0x1f801a){const _0x345f19=a194_0x16d8,_0x151634=_0x1f801a[_0x345f19(0x16b)](),_0x50ac12=getProjectNameValidationError(_0x151634);if(_0x50ac12)throw CliErrors[_0x345f19(0x170)](_0x50ac12,_0x345f19(0x169));return _0x151634;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3cae96,_0x4e4014){const _0x4fec34=a195_0x47ff,_0x5e6c8d=_0x3cae96();while(!![]){try{const _0x213c15=-parseInt(_0x4fec34(0xc6))/0x1*(parseInt(_0x4fec34(0xbd))/0x2)+parseInt(_0x4fec34(0xbe))/0x3*(parseInt(_0x4fec34(0xb5))/0x4)+parseInt(_0x4fec34(0xd1))/0x5+-parseInt(_0x4fec34(0xd0))/0x6*(-parseInt(_0x4fec34(0xc2))/0x7)+parseInt(_0x4fec34(0xbb))/0x8*(parseInt(_0x4fec34(0xc8))/0x9)+parseInt(_0x4fec34(0xc9))/0xa+-parseInt(_0x4fec34(0xcf))/0xb*(parseInt(_0x4fec34(0xc7))/0xc);if(_0x213c15===_0x4e4014)break;else _0x5e6c8d['push'](_0x5e6c8d['shift']());}catch(_0x4a8541){_0x5e6c8d['push'](_0x5e6c8d['shift']());}}}(a195_0x1e76,0xa52bf));import{createWriteStream}from'node:fs';import a195_0xf1b73f from'node:fs/promises';import a195_0x4f17f7 from'node:path';import{pipeline}from'node:stream/promises';import a195_0x23f511 from'yauzl';const MAX_ENTRY_COUNT=0x7d0,MAX_UNCOMPRESSED_SIZE=0x32*0x400*0x400,WINDOWS_RESERVED_NAME=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\..*)?$/i,WINDOWS_INVALID_CHAR=/[<>:"|?*\x00-\x1f]/;function openZip(_0x2c94c1){return new Promise((_0x2672a1,_0x5a8001)=>{a195_0x23f511['open'](_0x2c94c1,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x35ff02,_0x1855f0)=>{const _0x5b2f94=a195_0x47ff;if(_0x35ff02||!_0x1855f0){_0x5a8001(_0x35ff02||new Error(_0x5b2f94(0xb7)));return;}_0x2672a1(_0x1855f0);});});}function a195_0x47ff(_0x50feb5,_0x1ce96d){_0x50feb5=_0x50feb5-0xa6;const _0x1e7605=a195_0x1e76();let _0x47ff0b=_0x1e7605[_0x50feb5];return _0x47ff0b;}function openEntryStream(_0x29d9e8,_0xc84a50){return new Promise((_0x4be100,_0x1e4d61)=>{const _0x5ec3cb=a195_0x47ff;_0x29d9e8[_0x5ec3cb(0xaf)](_0xc84a50,(_0x5164ef,_0x4b3d99)=>{const _0x1e64c5=_0x5ec3cb;if(_0x5164ef||!_0x4b3d99){_0x1e4d61(_0x5164ef||new Error('Unable\x20to\x20read\x20ZIP\x20entry:\x20'+_0xc84a50[_0x1e64c5(0xbc)]));return;}_0x4be100(_0x4b3d99);});});}function validateEntryPath(_0x124a5b){const _0x36f7fc=a195_0x47ff,_0xdbe431=_0x124a5b['replace'](/\\/g,'/'),_0x1f6e51=_0xdbe431[_0x36f7fc(0xc1)]('/'),_0x1919c5=_0x1f6e51?_0xdbe431[_0x36f7fc(0xa9)](0x0,-0x1):_0xdbe431;if(!_0x1919c5||_0xdbe431['startsWith']('/')||/^[A-Za-z]:\//[_0x36f7fc(0xae)](_0xdbe431))throw new Error(_0x36f7fc(0xb6)+_0x124a5b);const _0xbe4b8a=_0x1919c5[_0x36f7fc(0xb2)]('/');for(const _0x4bc0c7 of _0xbe4b8a){if(!_0x4bc0c7||_0x4bc0c7==='.'||_0x4bc0c7==='..'||_0x4bc0c7[_0x36f7fc(0xc1)]('.')||_0x4bc0c7[_0x36f7fc(0xc1)]('\x20')||WINDOWS_INVALID_CHAR[_0x36f7fc(0xae)](_0x4bc0c7)||WINDOWS_RESERVED_NAME[_0x36f7fc(0xae)](_0x4bc0c7))throw new Error(_0x36f7fc(0xb9)+_0x124a5b);}return{'relativePath':_0xbe4b8a[_0x36f7fc(0xaa)](a195_0x4f17f7['sep']),'directory':_0x1f6e51};}function isSymbolicLink(_0x1709db){const _0x1ac4de=a195_0x47ff,_0x2f2a78=_0x1709db[_0x1ac4de(0xb3)]>>>0x10&0xffff;return(_0x2f2a78&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x4c0f78,_0x5210fd){const _0x243c80=a195_0x47ff,_0x48de4c=await openZip(_0x4c0f78),_0xcdd002=a195_0x4f17f7[_0x243c80(0xc4)](_0x5210fd),_0x1e5b95=new Set(),_0x5dce3b=new Map();let _0x27f31b=0x0,_0x608487=0x0;await a195_0xf1b73f[_0x243c80(0xb4)](_0xcdd002,{'recursive':!![]}),await new Promise((_0x6cc4f2,_0x25241e)=>{const _0x26f677=_0x243c80;let _0x570264=![];const _0xdd36e0=_0x24283f=>{if(_0x570264)return;_0x570264=!![],_0x48de4c['close'](),_0x25241e(_0x24283f instanceof Error?_0x24283f:new Error(String(_0x24283f)));};_0x48de4c[_0x26f677(0xa8)](_0x26f677(0xa6),_0xdd36e0),_0x48de4c[_0x26f677(0xa8)](_0x26f677(0xca),()=>{if(_0x570264)return;_0x570264=!![],_0x6cc4f2();}),_0x48de4c['on']('entry',_0x4f676c=>{void(async()=>{const _0x41c9dd=a195_0x47ff;_0x27f31b+=0x1,_0x608487+=_0x4f676c[_0x41c9dd(0xcc)];if(_0x27f31b>MAX_ENTRY_COUNT)throw new Error(_0x41c9dd(0xac)+MAX_ENTRY_COUNT+'\x20entries.');if(_0x608487>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x41c9dd(0xc0));if(_0x4f676c[_0x41c9dd(0xd2)]())throw new Error(_0x41c9dd(0xb0)+_0x4f676c[_0x41c9dd(0xbc)]);if(isSymbolicLink(_0x4f676c))throw new Error('Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20'+_0x4f676c[_0x41c9dd(0xbc)]);const {relativePath:_0x4b8345,directory:_0x5902dc}=validateEntryPath(_0x4f676c[_0x41c9dd(0xbc)]),_0x4e1813=_0x4b8345[_0x41c9dd(0xb2)](a195_0x4f17f7[_0x41c9dd(0xa7)]);for(let _0x2aae18=0x1;_0x2aae18<=_0x4e1813[_0x41c9dd(0xba)];_0x2aae18+=0x1){const _0x1d2836=_0x4e1813[_0x41c9dd(0xa9)](0x0,_0x2aae18)['join'](a195_0x4f17f7['sep']),_0x2e2233=_0x1d2836[_0x41c9dd(0xc5)](_0x41c9dd(0xab)),_0x422020=_0x5dce3b[_0x41c9dd(0xad)](_0x2e2233);if(_0x422020&&_0x422020!==_0x1d2836)throw new Error(_0x41c9dd(0xbf)+_0x4f676c['fileName']);_0x5dce3b[_0x41c9dd(0xcd)](_0x2e2233,_0x1d2836);}const _0x1e5e8e=_0x4b8345[_0x41c9dd(0xc5)](_0x41c9dd(0xab));if(_0x1e5b95['has'](_0x1e5e8e))throw new Error('Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20'+_0x4f676c[_0x41c9dd(0xbc)]);_0x1e5b95[_0x41c9dd(0xce)](_0x1e5e8e);const _0x246aed=a195_0x4f17f7[_0x41c9dd(0xc4)](_0xcdd002,_0x4b8345);if(_0x246aed!==_0xcdd002&&!_0x246aed[_0x41c9dd(0xc3)](''+_0xcdd002+a195_0x4f17f7[_0x41c9dd(0xa7)]))throw new Error(_0x41c9dd(0xcb)+_0x4f676c[_0x41c9dd(0xbc)]);if(_0x5902dc)await a195_0xf1b73f['mkdir'](_0x246aed,{'recursive':!![]});else{await a195_0xf1b73f['mkdir'](a195_0x4f17f7[_0x41c9dd(0xb8)](_0x246aed),{'recursive':!![]});const _0x422e9c=await openEntryStream(_0x48de4c,_0x4f676c);await pipeline(_0x422e9c,createWriteStream(_0x246aed,{'flags':'wx','mode':0x1a4}));}_0x48de4c['readEntry']();})()['catch'](_0xdd36e0);}),_0x48de4c[_0x26f677(0xb1)]();});}function a195_0x1e76(){const _0x269eee=['Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','readEntry','split','externalFileAttributes','mkdir','4uRyJGd','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','Unable\x20to\x20open\x20project\x20template\x20archive.','dirname','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','length','8LFemcC','fileName','178ySiETF','1389018vypDrw','Case-conflicting\x20ZIP\x20entry\x20path:\x20','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','endsWith','7rvCZLj','startsWith','resolve','toLocaleLowerCase','4657RsBWMU','12akBxfu','3028959BjReFr','13150290LkvbLM','end','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','uncompressedSize','set','add','16430843PjWWGo','493044KoXGrU','1939845GlOwYs','isEncrypted','error','sep','once','slice','join','en-US','Project\x20template\x20ZIP\x20exceeds\x20','get','test','openReadStream'];a195_0x1e76=function(){return _0x269eee;};return a195_0x1e76();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a196_0x58a06c=a196_0x5d1d;(function(_0x15a136,_0x530352){const _0x5cff83=a196_0x5d1d,_0x439c34=_0x15a136();while(!![]){try{const _0x3a9ba0=-parseInt(_0x5cff83(0xcc))/0x1+parseInt(_0x5cff83(0xca))/0x2+parseInt(_0x5cff83(0xcd))/0x3+-parseInt(_0x5cff83(0xc6))/0x4+-parseInt(_0x5cff83(0xc5))/0x5*(parseInt(_0x5cff83(0xc9))/0x6)+parseInt(_0x5cff83(0xce))/0x7+parseInt(_0x5cff83(0xcb))/0x8;if(_0x3a9ba0===_0x530352)break;else _0x439c34['push'](_0x439c34['shift']());}catch(_0x5dabc0){_0x439c34['push'](_0x439c34['shift']());}}}(a196_0x3156,0x4e6c3));function a196_0x5d1d(_0x112c5d,_0x2dabdd){_0x112c5d=_0x112c5d-0xc4;const _0x3156c7=a196_0x3156();let _0x5d1d6b=_0x3156c7[_0x112c5d];return _0x5d1d6b;}import a196_0x2fd7f3 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a196_0x2fd7f3[a196_0x58a06c(0xc7)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x241521=a196_0x58a06c;return a196_0x2fd7f3[_0x241521(0xc4)](__dirname,_0x241521(0xc8));}function a196_0x3156(){const _0x242eb9=['1265080rdtVKr','2876856cKDBGa','583613VMnCBI','1113054eteCwN','2049782iAHGnT','resolve','10ufJPwI','1860980QVaDWq','dirname','../../../../','857742fQutaO'];a196_0x3156=function(){return _0x242eb9;};return a196_0x3156();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2bce16,_0x1ec989){const _0x2d7001=a197_0x5278,_0x58376b=_0x2bce16();while(!![]){try{const _0x10e508=-parseInt(_0x2d7001(0x185))/0x1+-parseInt(_0x2d7001(0x196))/0x2*(-parseInt(_0x2d7001(0x198))/0x3)+parseInt(_0x2d7001(0x188))/0x4+parseInt(_0x2d7001(0x18d))/0x5*(-parseInt(_0x2d7001(0x191))/0x6)+parseInt(_0x2d7001(0x18b))/0x7+parseInt(_0x2d7001(0x184))/0x8*(parseInt(_0x2d7001(0x186))/0x9)+-parseInt(_0x2d7001(0x18a))/0xa;if(_0x10e508===_0x1ec989)break;else _0x58376b['push'](_0x58376b['shift']());}catch(_0xa3495a){_0x58376b['push'](_0x58376b['shift']());}}}(a197_0x1775,0x1a7ad));import a197_0x1b9c7f from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a197_0x5278(_0x3cdb19,_0x1113f9){_0x3cdb19=_0x3cdb19-0x184;const _0x17752d=a197_0x1775();let _0x52783=_0x17752d[_0x3cdb19];return _0x52783;}import{materializeLocalProjectTemplate,materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';function a197_0x1775(){const _0x3aa1dc=['93660ErnzWD','version','561180odLnxr','1066863GBDMqb','resolve','75gllTBs','info','Starting\x20project\x20template\x20creation','now','51090vFtxtF','success','message','source','copy','2434vGaKge','Project\x20template\x20created','480RNZsIi','648OQGxzE','182163HTQuBB','11547gtzaEN','error'];a197_0x1775=function(){return _0x3aa1dc;};return a197_0x1775();}export async function copyProjectTemplate(_0x33008a,_0x3056aa,_0x2d6409){const _0x5d2e1c=a197_0x5278,_0x4d5ecb=Date[_0x5d2e1c(0x190)](),_0x56322d=a197_0x1b9c7f[_0x5d2e1c(0x18c)](process['cwd'](),_0x33008a);try{logger[_0x5d2e1c(0x18e)](_0x5d2e1c(0x195),_0x5d2e1c(0x18f),{'projectCode':_0x33008a});const _0x219c8e=_0x2d6409?await materializeLocalProjectTemplate(_0x2d6409,_0x56322d,_0x3056aa):await materializeProjectTemplate(_0x56322d,_0x3056aa),_0x4edbb5=Date['now']()-_0x4d5ecb;logger[_0x5d2e1c(0x192)](_0x5d2e1c(0x195),_0x5d2e1c(0x197),_0x4edbb5,{'projectCode':_0x33008a,'templateSource':_0x219c8e[_0x5d2e1c(0x194)],'templateVersion':_0x219c8e[_0x5d2e1c(0x189)]});}catch(_0x4f9d2e){const _0x5b1a31=Date[_0x5d2e1c(0x190)]()-_0x4d5ecb;logger[_0x5d2e1c(0x187)](_0x5d2e1c(0x195),'Failed\x20to\x20copy\x20project\x20template',{'projectCode':_0x33008a,'error':_0x4f9d2e instanceof Error?_0x4f9d2e[_0x5d2e1c(0x193)]:String(_0x4f9d2e),'duration':_0x5b1a31});throw _0x4f9d2e;}return formatElapsed(_0x4d5ecb);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a198_0x29bf(_0x4c392f,_0x3a6bf5){_0x4c392f=_0x4c392f-0xb8;const _0x28c738=a198_0x28c7();let _0x29bfb1=_0x28c738[_0x4c392f];return _0x29bfb1;}(function(_0x2e9964,_0x10c854){const _0x49663c=a198_0x29bf,_0x3a4b8c=_0x2e9964();while(!![]){try{const _0xd607e5=parseInt(_0x49663c(0xbe))/0x1+parseInt(_0x49663c(0xba))/0x2*(-parseInt(_0x49663c(0xc4))/0x3)+parseInt(_0x49663c(0xbb))/0x4+parseInt(_0x49663c(0xc8))/0x5+parseInt(_0x49663c(0xb9))/0x6+parseInt(_0x49663c(0xbd))/0x7*(parseInt(_0x49663c(0xb8))/0x8)+-parseInt(_0x49663c(0xc9))/0x9;if(_0xd607e5===_0x10c854)break;else _0x3a4b8c['push'](_0x3a4b8c['shift']());}catch(_0x14770d){_0x3a4b8c['push'](_0x3a4b8c['shift']());}}}(a198_0x28c7,0x802f7));import a198_0x73d23 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x2ce623){const _0x55fc65=a198_0x29bf,_0x507694=Date[_0x55fc65(0xc6)](),_0x4b9731=a198_0x73d23[_0x55fc65(0xbf)](process[_0x55fc65(0xc7)](),_0x2ce623);try{logger[_0x55fc65(0xcc)](_0x55fc65(0xcb),_0x55fc65(0xc2),{'projectCode':_0x2ce623}),await execa(resolveNpmBin(_0x55fc65(0xc5)),['prettier',_0x55fc65(0xc3),'.'],{'cwd':_0x4b9731});const _0x8b5823=Date[_0x55fc65(0xc6)]()-_0x507694;logger['success']('format',_0x55fc65(0xbc),_0x8b5823,{'projectCode':_0x2ce623});}catch(_0x4dd397){const _0x595440=Date[_0x55fc65(0xc6)]()-_0x507694;logger[_0x55fc65(0xc1)](_0x55fc65(0xcb),_0x55fc65(0xca),{'projectCode':_0x2ce623,'error':_0x4dd397 instanceof Error?_0x4dd397[_0x55fc65(0xc0)]:String(_0x4dd397),'duration':_0x595440});throw _0x4dd397;}return formatElapsed(_0x507694);}function a198_0x28c7(){const _0x25cb1b=['62937YAPmyu','npx','now','cwd','4526400krHMPu','10386351IQCUuK','Code\x20format\x20failed','format','info','16KbGDwc','2226204eDkVot','98eHkZZR','3568220HGMJCq','Code\x20format\x20completed','209496UEHnmD','478832PsndTi','resolve','message','error','Starting\x20code\x20format','--write'];a198_0x28c7=function(){return _0x25cb1b;};return a198_0x28c7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2fea83,_0x1a8290){const _0x1df247=a199_0x559e,_0xd86428=_0x2fea83();while(!![]){try{const _0x65facd=-parseInt(_0x1df247(0x1f0))/0x1*(parseInt(_0x1df247(0x1e5))/0x2)+parseInt(_0x1df247(0x1e2))/0x3*(-parseInt(_0x1df247(0x1e3))/0x4)+parseInt(_0x1df247(0x1e4))/0x5*(parseInt(_0x1df247(0x1f1))/0x6)+-parseInt(_0x1df247(0x1f2))/0x7+parseInt(_0x1df247(0x1ee))/0x8*(-parseInt(_0x1df247(0x1ef))/0x9)+-parseInt(_0x1df247(0x1eb))/0xa+-parseInt(_0x1df247(0x1f5))/0xb*(-parseInt(_0x1df247(0x1e6))/0xc);if(_0x65facd===_0x1a8290)break;else _0xd86428['push'](_0xd86428['shift']());}catch(_0x19b1d2){_0xd86428['push'](_0xd86428['shift']());}}}(a199_0x236c,0x36238));import a199_0x5da533 from'node:path';function a199_0x559e(_0x426d75,_0x3acdfc){_0x426d75=_0x426d75-0x1e0;const _0x236cb9=a199_0x236c();let _0x559e14=_0x236cb9[_0x426d75];return _0x559e14;}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a199_0x236c(){const _0x2eb733=['364420dPuVPh','https://registry.npmmirror.com','Dependency\x20install\x20completed','20344pDJqyr','36tYvyeM','2srqawE','48zgobYM','1250060lwusQl','message','Starting\x20dependency\x20install','2250149nDahQX','install','info','1172079jBLgUO','4PxSJuJ','182755DiBmmI','68446HjXtWn','36fzhakm','npm','--registry','now','success'];a199_0x236c=function(){return _0x2eb733;};return a199_0x236c();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x58c887){const _0x1dd2ad=a199_0x559e,_0x569ea1=Date[_0x1dd2ad(0x1e9)](),_0x9e74f1=a199_0x5da533['resolve'](process['cwd'](),_0x58c887);try{logger[_0x1dd2ad(0x1e1)](_0x1dd2ad(0x1e0),_0x1dd2ad(0x1f4),{'projectCode':_0x58c887,'registry':_0x1dd2ad(0x1ec)}),await execa(resolveNpmBin(_0x1dd2ad(0x1e7)),[_0x1dd2ad(0x1e0),_0x1dd2ad(0x1e8),'https://registry.npmmirror.com'],{'cwd':_0x9e74f1});const _0x11e92f=Date[_0x1dd2ad(0x1e9)]()-_0x569ea1;logger[_0x1dd2ad(0x1ea)]('install',_0x1dd2ad(0x1ed),_0x11e92f,{'projectCode':_0x58c887});}catch(_0x1ccd87){const _0x479b3c=Date[_0x1dd2ad(0x1e9)]()-_0x569ea1;logger['error'](_0x1dd2ad(0x1e0),'Dependency\x20install\x20failed',{'projectCode':_0x58c887,'error':_0x1ccd87 instanceof Error?_0x1ccd87[_0x1dd2ad(0x1f3)]:String(_0x1ccd87),'duration':_0x479b3c});throw _0x1ccd87;}return formatElapsed(_0x569ea1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a200_0x4d08d5=a200_0x2f9d;(function(_0x230168,_0x2f277d){const _0x4b085e=a200_0x2f9d,_0x591832=_0x230168();while(!![]){try{const _0x54938f=parseInt(_0x4b085e(0x9a))/0x1+parseInt(_0x4b085e(0x9f))/0x2+-parseInt(_0x4b085e(0x9d))/0x3*(parseInt(_0x4b085e(0x98))/0x4)+-parseInt(_0x4b085e(0xa2))/0x5+-parseInt(_0x4b085e(0xa4))/0x6+-parseInt(_0x4b085e(0x97))/0x7+parseInt(_0x4b085e(0xa3))/0x8;if(_0x54938f===_0x2f277d)break;else _0x591832['push'](_0x591832['shift']());}catch(_0x431273){_0x591832['push'](_0x591832['shift']());}}}(a200_0x3afd,0xb748b));function a200_0x3afd(){const _0x3f7f7a=['Run\x20','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','188013NKQPXA','Domain\x20routing\x20synchronized:\x20','2385122kmXgPZ','path','Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','593615fcvVZS','15028984hRHyrp','3988158PFLNWG','project','9621038ljgjuZ','20qbNObA','domain-routing-sync','150752IAyVaG'];a200_0x3afd=function(){return _0x3f7f7a;};return a200_0x3afd();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a200_0x2f9d(_0x1689e5,_0x49cf73){_0x1689e5=_0x1689e5-0x96;const _0x3afdd0=a200_0x3afd();let _0x2f9d7f=_0x3afdd0[_0x1689e5];return _0x2f9d7f;}import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':a200_0x4d08d5(0x96),'command':a200_0x4d08d5(0x99),'description':a200_0x4d08d5(0xa1),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x1ac2ed=a200_0x4d08d5,_0x3f5b7e=findProjectRootDirectory();if(!resolveConfigPath(_0x3f5b7e))throw CliErrors['validation']('No\x20Rabetbase\x20project\x20configuration\x20was\x20found.',_0x1ac2ed(0x9b)+CLI_BIN_NAME+_0x1ac2ed(0x9c));const _0x25aefc=writeProjectDomainRoutingManifest(_0x3f5b7e);return{'ok':!![],'message':_0x1ac2ed(0x9e)+_0x25aefc[_0x1ac2ed(0xa0)],'data':_0x25aefc};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a201_0x257fca=a201_0x1717;function a201_0x1717(_0xf95a05,_0x54f0ca){_0xf95a05=_0xf95a05-0xb1;const _0x213fa3=a201_0x213f();let _0x171736=_0x213fa3[_0xf95a05];return _0x171736;}(function(_0x161e40,_0x3992b7){const _0x1271ef=a201_0x1717,_0xca39ed=_0x161e40();while(!![]){try{const _0x4143c4=parseInt(_0x1271ef(0xb5))/0x1*(parseInt(_0x1271ef(0xcb))/0x2)+parseInt(_0x1271ef(0xb7))/0x3+-parseInt(_0x1271ef(0xd7))/0x4+parseInt(_0x1271ef(0xcd))/0x5*(-parseInt(_0x1271ef(0xd9))/0x6)+parseInt(_0x1271ef(0xb9))/0x7+-parseInt(_0x1271ef(0xb8))/0x8+-parseInt(_0x1271ef(0xbc))/0x9*(-parseInt(_0x1271ef(0xc1))/0xa);if(_0x4143c4===_0x3992b7)break;else _0xca39ed['push'](_0xca39ed['shift']());}catch(_0x3d7eb6){_0xca39ed['push'](_0xca39ed['shift']());}}}(a201_0x213f,0x7ad79));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';const createFlags=[{'name':a201_0x257fca(0xca),'type':a201_0x257fca(0xd0),'description':a201_0x257fca(0xd5)},{'name':a201_0x257fca(0xb2),'type':'string','description':a201_0x257fca(0xb4)},{'name':a201_0x257fca(0xba),'type':a201_0x257fca(0xd0),'description':a201_0x257fca(0xb3)},{'name':a201_0x257fca(0xc9),'type':a201_0x257fca(0xbe),'description':a201_0x257fca(0xc0),'default':![]},{'name':a201_0x257fca(0xbd),'type':a201_0x257fca(0xd0),'description':'Prepared\x20local\x20project\x20template\x20directory'}],upgradeFlags=[{'name':a201_0x257fca(0xc2),'type':a201_0x257fca(0xbe),'description':a201_0x257fca(0xd8),'default':![]}];function a201_0x213f(){const _0x2e9ef5=['\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Project\x20name','nonInteractive','3649532DftHmk','Skip\x20confirmation\x20prompt','12EHXhVc','Usage:\x20','env','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','Target\x20environment','6sWUgpN','str','1937931gizVON','2866904kQFhBB','5756177SzyZYL','appcode','project-name','845433MIFBev','template-source','boolean','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20','Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','30ZkXOUH','yes','Create\x20a\x20new\x20project','../../commands/project/create/main.js','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','project','write','bool','current-dir','name','130612NQLwrt','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','920070CUJCyK','Run\x20','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','string','trim','validation'];a201_0x213f=function(){return _0x2e9ef5;};return a201_0x213f();}export const projectDefinitions=[{'service':a201_0x257fca(0xc6),'command':'create','description':a201_0x257fca(0xc3),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a201_0x257fca(0xbb),'description':a201_0x257fca(0xc5),'required':![]}],'flags':createFlags,async 'execute'(_0x234189){const _0x2ae8ba=a201_0x257fca,{createApp:_0x2de387}=await import(_0x2ae8ba(0xc4)),_0x12c3f6=_0x234189[_0x2ae8ba(0xb6)](_0x2ae8ba(0xca))[_0x2ae8ba(0xd1)]()||_0x234189['args'][0x0]?.['trim'](),_0x35c59a=_0x234189[_0x2ae8ba(0xb6)](_0x2ae8ba(0xb2))||undefined,_0x30b8d7=_0x234189[_0x2ae8ba(0xb6)](_0x2ae8ba(0xba))||undefined,_0x2fe9ed=_0x234189[_0x2ae8ba(0xb6)](_0x2ae8ba(0xbd))['trim']()||undefined,_0x2e9433=_0x234189[_0x2ae8ba(0xc8)](_0x2ae8ba(0xc9));if(_0x2e9433&&_0x12c3f6)throw CliErrors['validation'](_0x2ae8ba(0xcf),_0x2ae8ba(0xce)+CLI_BIN_NAME+_0x2ae8ba(0xcc));if(_0x234189['nonInteractive']){if(!_0x12c3f6&&!_0x2e9433)throw CliErrors[_0x2ae8ba(0xd2)]('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x2ae8ba(0xb1)+CLI_BIN_NAME+_0x2ae8ba(0xbf)+CLI_BIN_NAME+_0x2ae8ba(0xd3));await _0x2de387({'projectCode':_0x12c3f6,'appCode':_0x30b8d7,'env':_0x35c59a,'cookie':_0x234189['cookie'],'currentDir':_0x2e9433,'nonInteractive':!![],'templateSource':_0x2fe9ed});}else await _0x2de387({'projectCode':_0x12c3f6,'appCode':_0x30b8d7,'env':_0x35c59a,'cookie':_0x234189['cookie'],'currentDir':_0x2e9433,'templateSource':_0x2fe9ed});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a201_0x257fca(0xc6),'command':'upgrade','description':a201_0x257fca(0xd4),'risk':a201_0x257fca(0xc7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x5c080b){const _0x31bbb3=a201_0x257fca;return await upgradeApp(_0x5c080b[_0x31bbb3(0xd6)],{'yes':_0x5c080b[_0x31bbb3(0xc8)](_0x31bbb3(0xc2))}),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a188_0xad0a10=a188_0x3488;(function(_0x66162c,_0x1094d1){const _0xb11631=a188_0x3488,_0x39aa0a=_0x66162c();while(!![]){try{const _0x4ea8f3=parseInt(_0xb11631(0x204))/0x1*(-parseInt(_0xb11631(0x1ba))/0x2)+parseInt(_0xb11631(0x203))/0x3*(parseInt(_0xb11631(0x200))/0x4)+-parseInt(_0xb11631(0x1c6))/0x5+parseInt(_0xb11631(0x212))/0x6+parseInt(_0xb11631(0x1a9))/0x7*(-parseInt(_0xb11631(0x1cf))/0x8)+-parseInt(_0xb11631(0x1b7))/0x9+parseInt(_0xb11631(0x205))/0xa*(parseInt(_0xb11631(0x1aa))/0xb);if(_0x4ea8f3===_0x1094d1)break;else _0x39aa0a['push'](_0x39aa0a['shift']());}catch(_0x45f570){_0x39aa0a['push'](_0x39aa0a['shift']());}}}(a188_0x4ad9,0x6aaf8));import a188_0x153756 from'chalk';import a188_0x461dff from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';function a188_0x3488(_0x1fcf5f,_0x105b5d){_0x1fcf5f=_0x1fcf5f-0x199;const _0x4ad95c=a188_0x4ad9();let _0x348878=_0x4ad95c[_0x1fcf5f];return _0x348878;}import{resolve}from'node:path';import{NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=[a188_0xad0a10(0x1df),a188_0xad0a10(0x1d3)];function collectIdeSkillFiles(_0x54d328){const _0x44fb30=a188_0xad0a10,_0x6abfaf=[];for(const _0x490f70 of Object[_0x44fb30(0x20c)](CORE_IDE_CONFIGS)){if(_0x490f70[_0x44fb30(0x1f1)])for(const _0x481424 of _0x490f70[_0x44fb30(0x1f1)]){_0x6abfaf[_0x44fb30(0x1dc)](resolve(_0x54d328,_0x481424['path']));}}return _0x6abfaf;}function analyse(_0x37e673){const _0x194551=a188_0xad0a10;let _0x2391ce=null;const _0x45d4c4=resolve(_0x37e673,NEW_CONFIG_NAME),_0x5c53f9=existsSync(_0x45d4c4);for(const _0x1d6cf4 of LEGACY_CONFIG_NAMES){const _0x1711e7=resolve(_0x37e673,_0x1d6cf4);if(existsSync(_0x1711e7)){const _0x144e49=readConfigFile(_0x1711e7),_0x67b12=Object[_0x194551(0x1c0)](_0x144e49)[_0x194551(0x215)](_0x49044e=>typeof _0x144e49[_0x49044e]!==_0x194551(0x214));_0x2391ce={'oldPath':_0x1711e7,'hasNewConfig':_0x5c53f9,'fields':_0x67b12};break;}}const _0x20a40f=[],_0x1d80f6=resolve(_0x37e673,'.lovrabet');if(existsSync(_0x1d80f6))_0x20a40f[_0x194551(0x1dc)](_0x1d80f6);const _0x2505d4=resolve(_0x37e673,_0x194551(0x1d2));if(existsSync(_0x2505d4))_0x20a40f[_0x194551(0x1dc)](_0x2505d4);const _0x58a506=resolve(_0x37e673,'.claude/skills/lovrabet');if(existsSync(_0x58a506))_0x20a40f[_0x194551(0x1dc)](_0x58a506);for(const _0x4fe063 of collectIdeSkillFiles(_0x37e673)){if(existsSync(_0x4fe063))_0x20a40f[_0x194551(0x1dc)](_0x4fe063);}let _0x36ae54=null;const _0x54ff02=resolve(_0x37e673,_0x194551(0x20f));if(existsSync(_0x54ff02))try{const _0x6fb40a=JSON['parse'](readFileSync(_0x54ff02,'utf8'));if(_0x6fb40a?.[_0x194551(0x1ca)]&&typeof _0x6fb40a['mcpServers']===_0x194551(0x1f6)){const _0x326d9e=[];for(const [_0x2f41e4,_0x42378b]of Object['entries'](_0x6fb40a['mcpServers'])){const _0x2b878a=_0x42378b;_0x2b878a?.[_0x194551(0x1b4)]&&Array['isArray'](_0x2b878a['args'])&&_0x2b878a[_0x194551(0x1b4)][_0x194551(0x1e7)](_0x20a394=>typeof _0x20a394===_0x194551(0x1c8)&&_0x20a394['includes']('@lovrabet/dataset-mcp-server'))&&_0x326d9e['push'](_0x2f41e4);}_0x326d9e['length']>0x0&&(_0x36ae54={'path':_0x54ff02,'keys':_0x326d9e});}}catch{}const _0x1f68b2=_0x20a40f[_0x194551(0x201)]>0x0||_0x2391ce!==null;let _0x4bae71=null;const _0x4ac535=resolve(_0x37e673,_0x194551(0x1a3));if(existsSync(_0x4ac535))try{const _0x51a4c3=JSON[_0x194551(0x1d7)](readFileSync(_0x4ac535,_0x194551(0x1bc)));for(const _0x12fa2 of['dependencies',_0x194551(0x1b6)]){const _0x4201de=_0x51a4c3?.[_0x12fa2]?.[_0x194551(0x208)];if(typeof _0x4201de===_0x194551(0x1c8)){_0x4201de!==_0x194551(0x1b5)&&(_0x4bae71={'pkgPath':_0x4ac535,'currentVersion':_0x4201de,'field':_0x12fa2});break;}}}catch{}return{'configMigration':_0x2391ce,'oldArtifacts':_0x20a40f,'oldMcpConfig':_0x36ae54,'needsSkillSwap':_0x1f68b2,'sdkUpgrade':_0x4bae71};}function printReport(_0x44ec00){const _0x5ead55=a188_0xad0a10,{configMigration:_0x3c66cf,oldArtifacts:_0x3b3e63,oldMcpConfig:_0x5084c9,needsSkillSwap:_0x34b9dc}=_0x44ec00;console[_0x5ead55(0x1dd)](''),console[_0x5ead55(0x1dd)](a188_0x153756['bold']('===\x20Upgrade\x20Analysis\x20===')),console[_0x5ead55(0x1dd)]('');_0x3c66cf?(console[_0x5ead55(0x1dd)](a188_0x153756[_0x5ead55(0x1c2)](_0x5ead55(0x1ee))+('\x20\x20'+a188_0x153756['yellow'](_0x3c66cf[_0x5ead55(0x1b2)]))),console[_0x5ead55(0x1dd)]('\x20\x20New\x20config\x20(.rabetbase.json):\x20'+(_0x3c66cf[_0x5ead55(0x206)]?a188_0x153756[_0x5ead55(0x1d8)]('already\x20exists\x20(will\x20merge)'):a188_0x153756[_0x5ead55(0x1f9)](_0x5ead55(0x19b)))),console[_0x5ead55(0x1dd)](_0x5ead55(0x1db)+_0x3c66cf[_0x5ead55(0x1e6)][_0x5ead55(0x1b1)](',\x20')),console[_0x5ead55(0x1dd)](_0x5ead55(0x1de))):console[_0x5ead55(0x1dd)](a188_0x153756[_0x5ead55(0x1c2)](_0x5ead55(0x1ee))+'\x20\x20'+a188_0x153756['gray'](_0x5ead55(0x1ae)));console[_0x5ead55(0x1dd)]('');if(_0x3b3e63[_0x5ead55(0x201)]>0x0){console['log'](a188_0x153756['cyan'](_0x5ead55(0x19e)));for(const _0x8ac1fb of _0x3b3e63){console[_0x5ead55(0x1dd)]('\x20\x20'+a188_0x153756[_0x5ead55(0x1fd)](_0x5ead55(0x218))+'\x20\x20'+_0x8ac1fb);}console['log']('\x20\x20Action:\x20delete');}else console[_0x5ead55(0x1dd)](a188_0x153756[_0x5ead55(0x1c2)](_0x5ead55(0x19e))+'\x20\x20'+a188_0x153756[_0x5ead55(0x1f9)]('none\x20found'));console[_0x5ead55(0x1dd)]('');_0x5084c9?(console[_0x5ead55(0x1dd)](a188_0x153756[_0x5ead55(0x1c2)]('MCP\x20config:')+('\x20\x20'+a188_0x153756[_0x5ead55(0x1f7)](_0x5084c9[_0x5ead55(0x1f4)])+_0x5ead55(0x1a7)+_0x5084c9[_0x5ead55(0x1c0)][_0x5ead55(0x1b1)](',\x20'))),console[_0x5ead55(0x1dd)](_0x5ead55(0x207))):console[_0x5ead55(0x1dd)](a188_0x153756[_0x5ead55(0x1c2)]('MCP\x20config:')+'\x20\x20'+a188_0x153756['gray'](_0x5ead55(0x1bb)));console[_0x5ead55(0x1dd)](''),console['log'](a188_0x153756[_0x5ead55(0x1c2)](_0x5ead55(0x1a2))+('\x20\x20'+(_0x34b9dc?a188_0x153756['yellow'](_0x5ead55(0x1ce)):a188_0x153756[_0x5ead55(0x1d8)]('not\x20needed'))));_0x34b9dc&&console[_0x5ead55(0x1dd)](_0x5ead55(0x1eb)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x5ead55(0x1dd)]('');if(_0x44ec00[_0x5ead55(0x20d)]){const {currentVersion:_0x376697,field:_0x19f647,pkgPath:_0x306a91}=_0x44ec00['sdkUpgrade'];console[_0x5ead55(0x1dd)](a188_0x153756[_0x5ead55(0x1c2)](_0x5ead55(0x213))+('\x20\x20'+a188_0x153756['yellow'](_0x306a91))),console[_0x5ead55(0x1dd)](_0x5ead55(0x1f8)+_0x19f647+':\x20'+a188_0x153756['yellow'](_0x376697)+_0x5ead55(0x21b)+a188_0x153756[_0x5ead55(0x1d8)]('latest')),console[_0x5ead55(0x1dd)]('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console['log'](a188_0x153756[_0x5ead55(0x1c2)](_0x5ead55(0x213))+'\x20\x20'+a188_0x153756[_0x5ead55(0x1f9)]('not\x20found\x20or\x20already\x20at\x20latest'));console[_0x5ead55(0x1dd)]('');}function execConfigMigration(_0x288a53,_0x5b3b8e){const _0x12be5b=a188_0xad0a10,{configMigration:_0x5c9e5d}=_0x288a53;if(!_0x5c9e5d?.['oldPath'])return{'step':0x1,'label':_0x12be5b(0x1e3),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0x59a1f0=readConfigFile(_0x5c9e5d[_0x12be5b(0x1b2)]),_0x58df78=resolve(_0x5b3b8e,NEW_CONFIG_NAME),_0x50bdca=_0x5c9e5d[_0x12be5b(0x206)]?readConfigFile(_0x58df78):{};for(const [_0x278dcb,_0x4e9c45]of Object[_0x12be5b(0x1be)](_0x59a1f0)){!(_0x278dcb in _0x50bdca)&&(_0x50bdca[_0x278dcb]=_0x4e9c45);}writeConfigFile(_0x58df78,_0x50bdca);const _0xe76b13=_0x5c9e5d[_0x12be5b(0x1b2)]+'.bak';return renameSync(_0x5c9e5d[_0x12be5b(0x1b2)],_0xe76b13),{'step':0x1,'label':_0x12be5b(0x1e3),'ok':!![],'detail':_0x5c9e5d[_0x12be5b(0x1b2)]+_0x12be5b(0x21b)+_0x58df78+_0x12be5b(0x1f0)+_0xe76b13+')'};}function execRemoveOldArtifacts(_0x15cc79){const _0x7facf5=a188_0xad0a10,_0x5300c9=[];for(const _0x461fbe of _0x15cc79){try{if(!existsSync(_0x461fbe))continue;const _0x458ab=tryStat(_0x461fbe);_0x458ab?.[_0x7facf5(0x1e2)]()?rmSync(_0x461fbe,{'recursive':!![],'force':!![]}):unlinkSync(_0x461fbe);}catch(_0x1d5aa8){_0x5300c9[_0x7facf5(0x1dc)](_0x461fbe+':\x20'+_0x1d5aa8[_0x7facf5(0x1e1)]);}}return{'step':0x3,'label':_0x7facf5(0x211),'ok':_0x5300c9['length']===0x0,'detail':_0x5300c9[_0x7facf5(0x201)]>0x0?_0x15cc79[_0x7facf5(0x201)]-_0x5300c9[_0x7facf5(0x201)]+'/'+_0x15cc79[_0x7facf5(0x201)]+_0x7facf5(0x1e8)+_0x5300c9[_0x7facf5(0x1b1)](';\x20')+')':_0x15cc79[_0x7facf5(0x201)]+_0x7facf5(0x1fe)};}function execCleanMcp(_0x1fb596){const _0x1c5a11=a188_0xad0a10;if(!_0x1fb596[_0x1c5a11(0x1d1)])return{'step':0x4,'label':_0x1c5a11(0x1c9),'ok':!![],'detail':_0x1c5a11(0x1c3)};try{const _0x5ef344=readFileSync(_0x1fb596['oldMcpConfig']['path'],_0x1c5a11(0x1bc)),_0x379d30=JSON[_0x1c5a11(0x1d7)](_0x5ef344);if(_0x379d30?.[_0x1c5a11(0x1ca)]&&typeof _0x379d30[_0x1c5a11(0x1ca)]==='object'){const _0x57527e=[];for(const [_0x297927,_0x294c0e]of Object['entries'](_0x379d30[_0x1c5a11(0x1ca)])){_0x294c0e?.[_0x1c5a11(0x1b4)]&&Array[_0x1c5a11(0x1ab)](_0x294c0e[_0x1c5a11(0x1b4)])&&_0x294c0e['args']['some'](_0x253938=>typeof _0x253938===_0x1c5a11(0x1c8)&&_0x253938[_0x1c5a11(0x1a5)]('@lovrabet/dataset-mcp-server'))&&_0x57527e[_0x1c5a11(0x1dc)](_0x297927);}for(const _0x5a8bb7 of _0x57527e){delete _0x379d30[_0x1c5a11(0x1ca)][_0x5a8bb7];}return _0x57527e[_0x1c5a11(0x201)]>0x0&&writeFileSync(_0x1fb596[_0x1c5a11(0x1d1)]['path'],JSON['stringify'](_0x379d30,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0x1c5a11(0x1c9),'ok':!![],'detail':_0x1c5a11(0x1fa)+_0x57527e[_0x1c5a11(0x1b1)](',\x20')+'\x20from\x20'+_0x1fb596['oldMcpConfig']['path']};}return{'step':0x4,'label':_0x1c5a11(0x1c9),'ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x547466){return{'step':0x4,'label':_0x1c5a11(0x1c9),'ok':![],'detail':_0x547466[_0x1c5a11(0x1e1)]};}}function execSkillsRemove(_0x29b455,_0x20127a){const _0xd8f5f8=a188_0xad0a10,_0x267920=runNpxSkillsRemove(_0x29b455,{'stdio':_0xd8f5f8(0x1cc),'yes':_0x20127a});return{'step':0x5,'label':_0xd8f5f8(0x1c4),'ok':_0x267920['ok'],'detail':_0x267920['ok']?_0xd8f5f8(0x216):_0x267920['error']??_0xd8f5f8(0x1b0)+_0x267920[_0xd8f5f8(0x20a)]};}function execSkillsAdd(_0x74505,_0x28c009){const _0x1426a9=a188_0xad0a10,_0x48d42e=runNpxSkillsAddGlobal(_0x74505,_0x1426a9(0x20e),{'stdio':_0x1426a9(0x1cc),'yes':_0x28c009});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x48d42e['ok'],'detail':_0x48d42e['ok']?_0x1426a9(0x19d):_0x48d42e[_0x1426a9(0x219)]??_0x1426a9(0x1b0)+_0x48d42e[_0x1426a9(0x20a)]};}function execUpgradeSdk(_0x18fe81){const _0x4e1d3e=a188_0xad0a10;if(!_0x18fe81[_0x4e1d3e(0x20d)])return{'step':0x7,'label':_0x4e1d3e(0x1cd),'ok':!![],'detail':_0x4e1d3e(0x1e0)};const {pkgPath:_0x25458d,currentVersion:_0x316a0e,field:_0x19a9aa}=_0x18fe81[_0x4e1d3e(0x20d)];try{const _0x2bc198=readFileSync(_0x25458d,_0x4e1d3e(0x1bc)),_0x3995d8=JSON[_0x4e1d3e(0x1d7)](_0x2bc198);return _0x3995d8[_0x19a9aa][_0x4e1d3e(0x208)]=_0x4e1d3e(0x1b5),writeFileSync(_0x25458d,JSON[_0x4e1d3e(0x1f2)](_0x3995d8,null,0x2)+'\x0a',_0x4e1d3e(0x1bc)),{'step':0x7,'label':_0x4e1d3e(0x1cd),'ok':!![],'detail':_0x19a9aa+_0x4e1d3e(0x1a4)+_0x316a0e+_0x4e1d3e(0x1e4)};}catch(_0x4060f9){return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0x4060f9[_0x4e1d3e(0x1e1)]};}}function tryStat(_0x5594e7){try{return statSync(_0x5594e7);}catch{return undefined;}}function a188_0x4ad9(){const _0x24dfef=['.lovrabetrc','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','failed','step','parse','green','\x20\x20\x20\x20\x20\x20\x20','\x20\x20Step\x20','\x20\x20Fields\x20to\x20migrate:\x20','push','log','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','.lovrabet.json','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','message','isDirectory','Config\x20migration','\x20→\x20latest','Step\x206/7:\x20Installing\x20new\x20skill...','fields','some','\x20removed\x20(','start','oldArtifacts','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','Step\x201/7:\x20Migrating\x20config...','Config\x20file:','Upgrade\x20completed\x20successfully!','\x20(backup:\x20','files','stringify','detail','path','succeed','object','yellow','\x20\x20Current\x20version\x20in\x20','gray','removed\x20','\x20\x20#\x20or','white','red','\x20removed','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','8uWCvTT','length','needsSkillSwap','956073QBrSVD','4aawEPz','11670590gBaawf','hasNewConfig','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','@lovrabet/sdk','Remove\x20.lovrabet/','status','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','values','sdkUpgrade','lovrabet/rabetbase','.cursor/mcp.json','\x20\x20npm\x20install','Remove\x20legacy\x20artifacts','2252856IqLYVv','@lovrabet/sdk:','undefined','filter','lovrabet/lovrabet-skill\x20removed','Step\x201/7:\x20Config\x20migration\x20—\x20','FOUND','error','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','\x20→\x20','Step\x205/7:\x20Removing\x20old\x20skill...','Step\x204/7:\x20MCP\x20config\x20—\x20','not\x20found\x20(will\x20create)','Upgrade\x20cancelled.','lovrabet/rabetbase\x20installed\x20globally','Legacy\x20artifacts:','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','yes','Proceed\x20with\x20upgrade?','Skill\x20swap:','package.json','[\x22@lovrabet/sdk\x22]:\x20','includes','FAIL','\x20→\x20keys:\x20','info','221501uJvpxM','11XWhMOc','isArray','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','===\x20Upgrade\x20Summary\x20===','no\x20legacy\x20config\x20found','bold','exit\x20','join','oldPath','CANCEL','args','latest','devDependencies','5427477SzzyPi','Step\x204/7:\x20Cleaning\x20MCP\x20config...','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','394636YMWlJd','no\x20legacy\x20entry','utf8','label','entries','cwd','keys','done','cyan','skipped','Remove\x20old\x20skill','fail','329105yQiqeW','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','string','Clean\x20MCP\x20config','mcpServers','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','inherit','Upgrade\x20@lovrabet/sdk','needed','72cOrZyA','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','oldMcpConfig','.cursor/rules/lovrabet_rules.mdc'];a188_0x4ad9=function(){return _0x24dfef;};return a188_0x4ad9();}function printSummary(_0x14ade6){const _0x1c4d7a=a188_0xad0a10;console[_0x1c4d7a(0x1dd)](''),console[_0x1c4d7a(0x1dd)](a188_0x153756[_0x1c4d7a(0x1af)](_0x1c4d7a(0x1ad))),console[_0x1c4d7a(0x1dd)]('');for(const _0x42eb34 of _0x14ade6){const _0x16bced=_0x42eb34['ok']?a188_0x153756['green']('OK'):a188_0x153756['red'](_0x1c4d7a(0x1a6));console[_0x1c4d7a(0x1dd)]('\x20\x20'+_0x16bced+_0x1c4d7a(0x1da)+_0x42eb34[_0x1c4d7a(0x1d6)]+':\x20'+_0x42eb34[_0x1c4d7a(0x1bd)]);if(_0x42eb34[_0x1c4d7a(0x1f3)])console['log'](_0x1c4d7a(0x1d9)+a188_0x153756[_0x1c4d7a(0x1f9)](_0x42eb34[_0x1c4d7a(0x1f3)]));}console[_0x1c4d7a(0x1dd)]('');}export async function upgradeApp(_0x41b51f,_0xe71c89){const _0x394dcc=a188_0xad0a10,_0x13c025=process[_0x394dcc(0x1bf)](),_0x24e287=analyse(_0x13c025),_0x24c292=!_0x24e287['configMigration']&&_0x24e287[_0x394dcc(0x1ea)][_0x394dcc(0x201)]===0x0&&!_0x24e287[_0x394dcc(0x1d1)]&&!_0x24e287[_0x394dcc(0x202)]&&!_0x24e287[_0x394dcc(0x20d)];if(_0x24c292){console[_0x394dcc(0x1dd)](a188_0x153756[_0x394dcc(0x1d8)](_0x394dcc(0x1cb)));return;}printReport(_0x24e287);const _0x4b29ef=!!(_0xe71c89[_0x394dcc(0x1a0)]||_0xe71c89['Y']||_0x41b51f);if(!_0x4b29ef)try{const _0xc008b4=await askConfirm(_0x394dcc(0x1a1));if(!_0xc008b4){console[_0x394dcc(0x1dd)](a188_0x153756[_0x394dcc(0x1f9)](_0x394dcc(0x19c)));return;}}catch(_0x1369db){if(_0x1369db?.['message']===_0x394dcc(0x1b3)){console[_0x394dcc(0x1dd)](a188_0x153756[_0x394dcc(0x1f9)](_0x394dcc(0x19c)));return;}throw _0x1369db;}const _0x10fe38=[],_0x507835=a188_0x461dff({'text':_0x394dcc(0x1ed),'color':_0x394dcc(0x1c2)})[_0x394dcc(0x1e9)](),_0x2bf878=execConfigMigration(_0x24e287,_0x13c025);_0x10fe38[_0x394dcc(0x1dc)](_0x2bf878),_0x507835[_0x2bf878['ok']?_0x394dcc(0x1f5):_0x394dcc(0x1c5)](_0x394dcc(0x217)+(_0x2bf878['detail']??(_0x2bf878['ok']?'done':_0x394dcc(0x1d5))));const _0x422381=resolve(_0x13c025,'.lovrabet'),_0x41567e=a188_0x461dff({'text':_0x394dcc(0x1b9),'color':_0x394dcc(0x1c2)})['start']();if(existsSync(_0x422381))try{rmSync(_0x422381,{'recursive':!![],'force':!![]}),_0x41567e[_0x394dcc(0x1f5)](_0x394dcc(0x1ff)),_0x10fe38[_0x394dcc(0x1dc)]({'step':0x2,'label':_0x394dcc(0x209),'ok':!![]});}catch(_0x114cd3){_0x41567e[_0x394dcc(0x1c5)](_0x394dcc(0x1d4)+_0x114cd3[_0x394dcc(0x1e1)]),_0x10fe38[_0x394dcc(0x1dc)]({'step':0x2,'label':_0x394dcc(0x209),'ok':![],'detail':_0x114cd3[_0x394dcc(0x1e1)]});}else _0x41567e[_0x394dcc(0x1a8)](_0x394dcc(0x21a)),_0x10fe38[_0x394dcc(0x1dc)]({'step':0x2,'label':_0x394dcc(0x209),'ok':!![],'detail':_0x394dcc(0x1c3)});const _0x3f6f55=a188_0x461dff({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x394dcc(0x1c2)})[_0x394dcc(0x1e9)](),_0x19faa9=execRemoveOldArtifacts(_0x24e287['oldArtifacts']);_0x10fe38['push'](_0x19faa9),_0x3f6f55[_0x19faa9['ok']?_0x394dcc(0x1f5):_0x394dcc(0x1c5)]('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x19faa9[_0x394dcc(0x1f3)]??(_0x19faa9['ok']?_0x394dcc(0x1c1):_0x394dcc(0x1d5))));const _0xa2b35a=a188_0x461dff({'text':_0x394dcc(0x1b8),'color':'cyan'})[_0x394dcc(0x1e9)](),_0x29d235=execCleanMcp(_0x24e287);_0x10fe38['push'](_0x29d235),_0xa2b35a[_0x29d235['ok']?_0x394dcc(0x1f5):_0x394dcc(0x1c5)](_0x394dcc(0x19a)+(_0x29d235[_0x394dcc(0x1f3)]??(_0x29d235['ok']?_0x394dcc(0x1c1):_0x394dcc(0x1d5))));const _0x5b120f=a188_0x461dff({'text':_0x394dcc(0x199),'color':_0x394dcc(0x1c2)})[_0x394dcc(0x1e9)](),_0x169193=execSkillsRemove(_0x13c025,_0x4b29ef);_0x10fe38[_0x394dcc(0x1dc)](_0x169193),_0x5b120f[_0x169193['ok']?_0x394dcc(0x1f5):'fail'](_0x394dcc(0x1ac)+(_0x169193['detail']??(_0x169193['ok']?_0x394dcc(0x1c1):_0x394dcc(0x1d5))));const _0x303d42=a188_0x461dff({'text':_0x394dcc(0x1e5),'color':_0x394dcc(0x1c2)})[_0x394dcc(0x1e9)](),_0x3f55d3=execSkillsAdd(_0x13c025,_0x4b29ef);_0x10fe38[_0x394dcc(0x1dc)](_0x3f55d3),_0x303d42[_0x3f55d3['ok']?_0x394dcc(0x1f5):_0x394dcc(0x1c5)](_0x394dcc(0x1c7)+(_0x3f55d3['detail']??(_0x3f55d3['ok']?_0x394dcc(0x1c1):_0x394dcc(0x1d5))));const _0x909e96=a188_0x461dff({'text':'Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':_0x394dcc(0x1c2)})[_0x394dcc(0x1e9)](),_0x32350d=execUpgradeSdk(_0x24e287);_0x10fe38['push'](_0x32350d),_0x909e96[_0x32350d['ok']?_0x394dcc(0x1f5):_0x394dcc(0x1c5)](_0x394dcc(0x1ec)+(_0x32350d[_0x394dcc(0x1f3)]??(_0x32350d['ok']?'done':_0x394dcc(0x1d5)))),printSummary(_0x10fe38);const _0xbd83b5=_0x10fe38[_0x394dcc(0x1e7)](_0x12bb5e=>!_0x12bb5e['ok']);_0xbd83b5?console[_0x394dcc(0x1dd)](a188_0x153756['yellow'](_0x394dcc(0x19f))):console[_0x394dcc(0x1dd)](a188_0x153756[_0x394dcc(0x1d8)](_0x394dcc(0x1ef))),_0x32350d['ok']&&_0x24e287['sdkUpgrade']&&(console['log'](''),console['log'](a188_0x153756[_0x394dcc(0x1af)][_0x394dcc(0x1c2)](_0x394dcc(0x20b))),console[_0x394dcc(0x1dd)](a188_0x153756[_0x394dcc(0x1c2)](_0x394dcc(0x1d0))),console[_0x394dcc(0x1dd)](''),console[_0x394dcc(0x1dd)](a188_0x153756[_0x394dcc(0x1fc)](_0x394dcc(0x210))),console[_0x394dcc(0x1dd)](a188_0x153756[_0x394dcc(0x1fc)](_0x394dcc(0x1fb))),console[_0x394dcc(0x1dd)](a188_0x153756[_0x394dcc(0x1fc)]('\x20\x20bun\x20install')),console[_0x394dcc(0x1dd)](''));}
|
|
1
|
+
const a202_0x18b320=a202_0x2bf1;(function(_0x2af97b,_0x222abb){const _0x128628=a202_0x2bf1,_0xffd24c=_0x2af97b();while(!![]){try{const _0x3300f3=-parseInt(_0x128628(0xc7))/0x1*(parseInt(_0x128628(0x7b))/0x2)+parseInt(_0x128628(0xdb))/0x3*(-parseInt(_0x128628(0x77))/0x4)+parseInt(_0x128628(0xbc))/0x5*(parseInt(_0x128628(0xeb))/0x6)+parseInt(_0x128628(0x8c))/0x7*(parseInt(_0x128628(0xe4))/0x8)+parseInt(_0x128628(0xcb))/0x9*(-parseInt(_0x128628(0x90))/0xa)+-parseInt(_0x128628(0xb0))/0xb*(parseInt(_0x128628(0x84))/0xc)+parseInt(_0x128628(0xd4))/0xd;if(_0x3300f3===_0x222abb)break;else _0xffd24c['push'](_0xffd24c['shift']());}catch(_0x6a2957){_0xffd24c['push'](_0xffd24c['shift']());}}}(a202_0x5336,0xc0e70));import a202_0x33db47 from'chalk';import a202_0x2be156 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';function a202_0x5336(){const _0x1cb128=['\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','some','.claude/skills/lovrabet','380uQAazt','yellow','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','mcpServers','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','done','\x20\x20Fields\x20to\x20migrate:\x20','\x20\x20npm\x20install','failed','isDirectory','needsSkillSwap','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','push','lovrabet/lovrabet-skill\x20removed','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','yes','entries','.lovrabetrc','message','Config\x20migration','white','files','not\x20found\x20or\x20already\x20at\x20latest','cyan','Install\x20new\x20skill','hasNewConfig','Clean\x20MCP\x20config','none\x20found','object','red','\x20\x20Current\x20version\x20in\x20','33JvIecv','cwd','skipped','keys','Remove\x20.lovrabet/','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','isArray','\x20→\x20','MCP\x20config:','Upgrade\x20completed\x20successfully!','86565UsEtpG','@lovrabet/sdk:','no\x20legacy\x20entry','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','not\x20needed','log','no\x20legacy\x20config\x20found','dependencies','devDependencies','info','needed','5KxkUzg','FAIL','oldPath','latest','15282oSFpca','configMigration','Proceed\x20with\x20upgrade?','string','undefined','args','\x20removed','[\x22@lovrabet/sdk\x22]:\x20','Config\x20file:','21760297crVqcY','Step\x201/7:\x20Config\x20migration\x20—\x20','package.json','start','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','parse','3diNPNf','already\x20exists\x20(will\x20merge)','path','error','no\x20matching\x20entry\x20found','stringify','lovrabet/rabetbase','inherit','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','164336BmpoVM','oldArtifacts','green','\x20\x20New\x20config\x20(.rabetbase.json):\x20','includes','bold','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','342oGHzIo','exit\x20','skipped\x20(no\x20legacy\x20config)','\x20\x20Step\x20','fail','Step\x204/7:\x20MCP\x20config\x20—\x20','Step\x205/7:\x20Removing\x20old\x20skill...','===\x20Upgrade\x20Summary\x20===','not\x20found\x20(will\x20create)','values','\x20(backup:\x20','Step\x201/7:\x20Migrating\x20config...','fields','detail','Step\x206/7:\x20Installing\x20new\x20skill...','Step\x204/7:\x20Cleaning\x20MCP\x20config...','@lovrabet/dataset-mcp-server','oldMcpConfig','utf8','1374228abuubE','.lovrabet.json','length','.cursor/rules/lovrabet_rules.mdc','201772KcBzWt','\x20\x20Action:\x20delete','gray','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','.bak','Upgrade\x20cancelled.','Remove\x20legacy\x20artifacts','succeed','Skill\x20swap:','4325292WCAhNM','join','status','step','removed\x20','sdkUpgrade','Upgrade\x20@lovrabet/sdk','@lovrabet/sdk','42PjhIKw'];a202_0x5336=function(){return _0x1cb128;};return a202_0x5336();}import{resolve}from'node:path';import{NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=[a202_0x18b320(0x78),a202_0x18b320(0xa2)];function collectIdeSkillFiles(_0x2bc698){const _0x477fc0=a202_0x18b320,_0xe90448=[];for(const _0x11fe65 of Object[_0x477fc0(0xf4)](CORE_IDE_CONFIGS)){if(_0x11fe65[_0x477fc0(0xa6)])for(const _0x2d79a6 of _0x11fe65[_0x477fc0(0xa6)]){_0xe90448[_0x477fc0(0x9d)](resolve(_0x2bc698,_0x2d79a6[_0x477fc0(0xdd)]));}}return _0xe90448;}function analyse(_0x19f943){const _0x54e174=a202_0x18b320;let _0x2b5d29=null;const _0x135915=resolve(_0x19f943,NEW_CONFIG_NAME),_0x493690=existsSync(_0x135915);for(const _0x75037c of LEGACY_CONFIG_NAMES){const _0x51923c=resolve(_0x19f943,_0x75037c);if(existsSync(_0x51923c)){const _0x20e213=readConfigFile(_0x51923c),_0x26f399=Object[_0x54e174(0xb3)](_0x20e213)['filter'](_0x5c0bf3=>typeof _0x20e213[_0x5c0bf3]!==_0x54e174(0xcf));_0x2b5d29={'oldPath':_0x51923c,'hasNewConfig':_0x493690,'fields':_0x26f399};break;}}const _0x542467=[],_0x1d7c94=resolve(_0x19f943,'.lovrabet');if(existsSync(_0x1d7c94))_0x542467['push'](_0x1d7c94);const _0x5ae181=resolve(_0x19f943,_0x54e174(0x7a));if(existsSync(_0x5ae181))_0x542467[_0x54e174(0x9d)](_0x5ae181);const _0x441ba4=resolve(_0x19f943,_0x54e174(0x8f));if(existsSync(_0x441ba4))_0x542467[_0x54e174(0x9d)](_0x441ba4);for(const _0x59aac0 of collectIdeSkillFiles(_0x19f943)){if(existsSync(_0x59aac0))_0x542467[_0x54e174(0x9d)](_0x59aac0);}let _0x2635f6=null;const _0x328e0d=resolve(_0x19f943,'.cursor/mcp.json');if(existsSync(_0x328e0d))try{const _0x21fb0b=JSON[_0x54e174(0xda)](readFileSync(_0x328e0d,_0x54e174(0x76)));if(_0x21fb0b?.['mcpServers']&&typeof _0x21fb0b[_0x54e174(0x93)]==='object'){const _0x6a0fd3=[];for(const [_0x3b313b,_0x12b8d5]of Object[_0x54e174(0xa1)](_0x21fb0b[_0x54e174(0x93)])){const _0x3fac84=_0x12b8d5;_0x3fac84?.[_0x54e174(0xd0)]&&Array[_0x54e174(0xb8)](_0x3fac84[_0x54e174(0xd0)])&&_0x3fac84[_0x54e174(0xd0)][_0x54e174(0x8e)](_0x4a49d8=>typeof _0x4a49d8==='string'&&_0x4a49d8[_0x54e174(0xe8)](_0x54e174(0x74)))&&_0x6a0fd3[_0x54e174(0x9d)](_0x3b313b);}_0x6a0fd3[_0x54e174(0x79)]>0x0&&(_0x2635f6={'path':_0x328e0d,'keys':_0x6a0fd3});}}catch{}const _0x52c51a=_0x542467[_0x54e174(0x79)]>0x0||_0x2b5d29!==null;let _0x3837f8=null;const _0x1d2c9a=resolve(_0x19f943,_0x54e174(0xd6));if(existsSync(_0x1d2c9a))try{const _0x2a2dc9=JSON['parse'](readFileSync(_0x1d2c9a,_0x54e174(0x76)));for(const _0x51c473 of[_0x54e174(0xc3),_0x54e174(0xc4)]){const _0x1e828b=_0x2a2dc9?.[_0x51c473]?.[_0x54e174(0x8b)];if(typeof _0x1e828b===_0x54e174(0xce)){_0x1e828b!==_0x54e174(0xca)&&(_0x3837f8={'pkgPath':_0x1d2c9a,'currentVersion':_0x1e828b,'field':_0x51c473});break;}}}catch{}return{'configMigration':_0x2b5d29,'oldArtifacts':_0x542467,'oldMcpConfig':_0x2635f6,'needsSkillSwap':_0x52c51a,'sdkUpgrade':_0x3837f8};}function printReport(_0x50f598){const _0x30ee9c=a202_0x18b320,{configMigration:_0x2150f8,oldArtifacts:_0x3d2c08,oldMcpConfig:_0x29fe4d,needsSkillSwap:_0x447263}=_0x50f598;console[_0x30ee9c(0xc1)](''),console['log'](a202_0x33db47[_0x30ee9c(0xe9)]('===\x20Upgrade\x20Analysis\x20===')),console[_0x30ee9c(0xc1)]('');_0x2150f8?(console[_0x30ee9c(0xc1)](a202_0x33db47[_0x30ee9c(0xa8)](_0x30ee9c(0xd3))+('\x20\x20'+a202_0x33db47[_0x30ee9c(0x91)](_0x2150f8['oldPath']))),console['log'](_0x30ee9c(0xe7)+(_0x2150f8[_0x30ee9c(0xaa)]?a202_0x33db47[_0x30ee9c(0xe6)](_0x30ee9c(0xdc)):a202_0x33db47[_0x30ee9c(0x7d)](_0x30ee9c(0xf3)))),console[_0x30ee9c(0xc1)](_0x30ee9c(0x97)+_0x2150f8[_0x30ee9c(0x70)][_0x30ee9c(0x85)](',\x20')),console['log'](_0x30ee9c(0xb6))):console[_0x30ee9c(0xc1)](a202_0x33db47[_0x30ee9c(0xa8)](_0x30ee9c(0xd3))+'\x20\x20'+a202_0x33db47[_0x30ee9c(0x7d)](_0x30ee9c(0xc2)));console['log']('');if(_0x3d2c08[_0x30ee9c(0x79)]>0x0){console[_0x30ee9c(0xc1)](a202_0x33db47[_0x30ee9c(0xa8)]('Legacy\x20artifacts:'));for(const _0x279b7c of _0x3d2c08){console[_0x30ee9c(0xc1)]('\x20\x20'+a202_0x33db47[_0x30ee9c(0xae)]('FOUND')+'\x20\x20'+_0x279b7c);}console['log'](_0x30ee9c(0x7c));}else console[_0x30ee9c(0xc1)](a202_0x33db47['cyan']('Legacy\x20artifacts:')+'\x20\x20'+a202_0x33db47[_0x30ee9c(0x7d)](_0x30ee9c(0xac)));console['log']('');_0x29fe4d?(console[_0x30ee9c(0xc1)](a202_0x33db47['cyan']('MCP\x20config:')+('\x20\x20'+a202_0x33db47['yellow'](_0x29fe4d[_0x30ee9c(0xdd)])+'\x20→\x20keys:\x20'+_0x29fe4d[_0x30ee9c(0xb3)]['join'](',\x20'))),console[_0x30ee9c(0xc1)]('\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server')):console['log'](a202_0x33db47[_0x30ee9c(0xa8)](_0x30ee9c(0xba))+'\x20\x20'+a202_0x33db47['gray'](_0x30ee9c(0xbe)));console[_0x30ee9c(0xc1)](''),console[_0x30ee9c(0xc1)](a202_0x33db47['cyan'](_0x30ee9c(0x83))+('\x20\x20'+(_0x447263?a202_0x33db47[_0x30ee9c(0x91)](_0x30ee9c(0xc6)):a202_0x33db47[_0x30ee9c(0xe6)](_0x30ee9c(0xc0)))));_0x447263&&console[_0x30ee9c(0xc1)](_0x30ee9c(0x9c)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x30ee9c(0xc1)]('');if(_0x50f598[_0x30ee9c(0x89)]){const {currentVersion:_0x406ba6,field:_0x458cec,pkgPath:_0x17ee1d}=_0x50f598[_0x30ee9c(0x89)];console[_0x30ee9c(0xc1)](a202_0x33db47[_0x30ee9c(0xa8)](_0x30ee9c(0xbd))+('\x20\x20'+a202_0x33db47[_0x30ee9c(0x91)](_0x17ee1d))),console['log'](_0x30ee9c(0xaf)+_0x458cec+':\x20'+a202_0x33db47[_0x30ee9c(0x91)](_0x406ba6)+_0x30ee9c(0xb9)+a202_0x33db47[_0x30ee9c(0xe6)](_0x30ee9c(0xca))),console[_0x30ee9c(0xc1)](_0x30ee9c(0x8d));}else console[_0x30ee9c(0xc1)](a202_0x33db47[_0x30ee9c(0xa8)](_0x30ee9c(0xbd))+'\x20\x20'+a202_0x33db47['gray'](_0x30ee9c(0xa7)));console[_0x30ee9c(0xc1)]('');}function execConfigMigration(_0x57b2da,_0x485e5d){const _0x517b02=a202_0x18b320,{configMigration:_0x20244d}=_0x57b2da;if(!_0x20244d?.[_0x517b02(0xc9)])return{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x517b02(0xed)};const _0x44461f=readConfigFile(_0x20244d[_0x517b02(0xc9)]),_0x39f96e=resolve(_0x485e5d,NEW_CONFIG_NAME),_0x58cd97=_0x20244d[_0x517b02(0xaa)]?readConfigFile(_0x39f96e):{};for(const [_0x3115e0,_0x4c9fc4]of Object[_0x517b02(0xa1)](_0x44461f)){!(_0x3115e0 in _0x58cd97)&&(_0x58cd97[_0x3115e0]=_0x4c9fc4);}writeConfigFile(_0x39f96e,_0x58cd97);const _0x128603=_0x20244d[_0x517b02(0xc9)]+_0x517b02(0x7f);return renameSync(_0x20244d['oldPath'],_0x128603),{'step':0x1,'label':_0x517b02(0xa4),'ok':!![],'detail':_0x20244d[_0x517b02(0xc9)]+'\x20→\x20'+_0x39f96e+_0x517b02(0xf5)+_0x128603+')'};}function execRemoveOldArtifacts(_0x1738eb){const _0x293dbf=a202_0x18b320,_0x457195=[];for(const _0x1effc6 of _0x1738eb){try{if(!existsSync(_0x1effc6))continue;const _0x19a93c=tryStat(_0x1effc6);_0x19a93c?.[_0x293dbf(0x9a)]()?rmSync(_0x1effc6,{'recursive':!![],'force':!![]}):unlinkSync(_0x1effc6);}catch(_0x34fb48){_0x457195[_0x293dbf(0x9d)](_0x1effc6+':\x20'+_0x34fb48[_0x293dbf(0xa3)]);}}return{'step':0x3,'label':_0x293dbf(0x81),'ok':_0x457195[_0x293dbf(0x79)]===0x0,'detail':_0x457195['length']>0x0?_0x1738eb[_0x293dbf(0x79)]-_0x457195[_0x293dbf(0x79)]+'/'+_0x1738eb[_0x293dbf(0x79)]+'\x20removed\x20('+_0x457195[_0x293dbf(0x85)](';\x20')+')':_0x1738eb[_0x293dbf(0x79)]+_0x293dbf(0xd1)};}function execCleanMcp(_0x17384c){const _0x14e33f=a202_0x18b320;if(!_0x17384c['oldMcpConfig'])return{'step':0x4,'label':_0x14e33f(0xab),'ok':!![],'detail':_0x14e33f(0xb2)};try{const _0x4f3b99=readFileSync(_0x17384c[_0x14e33f(0x75)]['path'],'utf8'),_0x32cde7=JSON[_0x14e33f(0xda)](_0x4f3b99);if(_0x32cde7?.['mcpServers']&&typeof _0x32cde7[_0x14e33f(0x93)]===_0x14e33f(0xad)){const _0x10ea28=[];for(const [_0xc3bb9f,_0x458a25]of Object['entries'](_0x32cde7[_0x14e33f(0x93)])){_0x458a25?.[_0x14e33f(0xd0)]&&Array[_0x14e33f(0xb8)](_0x458a25['args'])&&_0x458a25[_0x14e33f(0xd0)][_0x14e33f(0x8e)](_0xe3f1f2=>typeof _0xe3f1f2===_0x14e33f(0xce)&&_0xe3f1f2[_0x14e33f(0xe8)](_0x14e33f(0x74)))&&_0x10ea28[_0x14e33f(0x9d)](_0xc3bb9f);}for(const _0x98f725 of _0x10ea28){delete _0x32cde7[_0x14e33f(0x93)][_0x98f725];}return _0x10ea28[_0x14e33f(0x79)]>0x0&&writeFileSync(_0x17384c[_0x14e33f(0x75)][_0x14e33f(0xdd)],JSON[_0x14e33f(0xe0)](_0x32cde7,null,0x2)+'\x0a',_0x14e33f(0x76)),{'step':0x4,'label':_0x14e33f(0xab),'ok':!![],'detail':_0x14e33f(0x88)+_0x10ea28[_0x14e33f(0x85)](',\x20')+'\x20from\x20'+_0x17384c[_0x14e33f(0x75)][_0x14e33f(0xdd)]};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x14e33f(0xdf)};}catch(_0x1024bd){return{'step':0x4,'label':_0x14e33f(0xab),'ok':![],'detail':_0x1024bd[_0x14e33f(0xa3)]};}}function execSkillsRemove(_0x588f06,_0x1cec63){const _0x3a76ab=a202_0x18b320,_0x408a07=runNpxSkillsRemove(_0x588f06,{'stdio':'inherit','yes':_0x1cec63});return{'step':0x5,'label':'Remove\x20old\x20skill','ok':_0x408a07['ok'],'detail':_0x408a07['ok']?_0x3a76ab(0x9e):_0x408a07['error']??_0x3a76ab(0xec)+_0x408a07[_0x3a76ab(0x86)]};}function execSkillsAdd(_0x4926cd,_0xaa4657){const _0x323f07=a202_0x18b320,_0x70cd59=runNpxSkillsAddGlobal(_0x4926cd,_0x323f07(0xe1),{'stdio':_0x323f07(0xe2),'yes':_0xaa4657});return{'step':0x6,'label':_0x323f07(0xa9),'ok':_0x70cd59['ok'],'detail':_0x70cd59['ok']?'lovrabet/rabetbase\x20installed\x20globally':_0x70cd59[_0x323f07(0xde)]??'exit\x20'+_0x70cd59[_0x323f07(0x86)]};}function execUpgradeSdk(_0x418f31){const _0x9d19db=a202_0x18b320;if(!_0x418f31[_0x9d19db(0x89)])return{'step':0x7,'label':_0x9d19db(0x8a),'ok':!![],'detail':_0x9d19db(0x7e)};const {pkgPath:_0x3195c3,currentVersion:_0x121ae1,field:_0x202c29}=_0x418f31[_0x9d19db(0x89)];try{const _0x3e2e32=readFileSync(_0x3195c3,_0x9d19db(0x76)),_0x46e6eb=JSON[_0x9d19db(0xda)](_0x3e2e32);return _0x46e6eb[_0x202c29][_0x9d19db(0x8b)]=_0x9d19db(0xca),writeFileSync(_0x3195c3,JSON[_0x9d19db(0xe0)](_0x46e6eb,null,0x2)+'\x0a','utf8'),{'step':0x7,'label':_0x9d19db(0x8a),'ok':!![],'detail':_0x202c29+_0x9d19db(0xd2)+_0x121ae1+'\x20→\x20latest'};}catch(_0x575d5c){return{'step':0x7,'label':_0x9d19db(0x8a),'ok':![],'detail':_0x575d5c['message']};}}function tryStat(_0xf5388f){try{return statSync(_0xf5388f);}catch{return undefined;}}function printSummary(_0x32c2e7){const _0x367bed=a202_0x18b320;console[_0x367bed(0xc1)](''),console[_0x367bed(0xc1)](a202_0x33db47[_0x367bed(0xe9)](_0x367bed(0xf2))),console[_0x367bed(0xc1)]('');for(const _0x5a149 of _0x32c2e7){const _0x2409a9=_0x5a149['ok']?a202_0x33db47[_0x367bed(0xe6)]('OK'):a202_0x33db47[_0x367bed(0xae)](_0x367bed(0xc8));console[_0x367bed(0xc1)]('\x20\x20'+_0x2409a9+_0x367bed(0xee)+_0x5a149[_0x367bed(0x87)]+':\x20'+_0x5a149['label']);if(_0x5a149[_0x367bed(0x71)])console[_0x367bed(0xc1)]('\x20\x20\x20\x20\x20\x20\x20'+a202_0x33db47[_0x367bed(0x7d)](_0x5a149[_0x367bed(0x71)]));}console[_0x367bed(0xc1)]('');}function a202_0x2bf1(_0x29b59a,_0xbd08da){_0x29b59a=_0x29b59a-0x70;const _0x5336a0=a202_0x5336();let _0x2bf17f=_0x5336a0[_0x29b59a];return _0x2bf17f;}export async function upgradeApp(_0x24e965,_0x31b4bb){const _0x176a5b=a202_0x18b320,_0x263354=process[_0x176a5b(0xb1)](),_0x4c46fd=analyse(_0x263354),_0x1fd92f=!_0x4c46fd[_0x176a5b(0xcc)]&&_0x4c46fd['oldArtifacts']['length']===0x0&&!_0x4c46fd[_0x176a5b(0x75)]&&!_0x4c46fd[_0x176a5b(0x9b)]&&!_0x4c46fd['sdkUpgrade'];if(_0x1fd92f){console[_0x176a5b(0xc1)](a202_0x33db47['green'](_0x176a5b(0x92)));return;}printReport(_0x4c46fd);const _0x531577=!!(_0x31b4bb[_0x176a5b(0xa0)]||_0x31b4bb['Y']||_0x24e965);if(!_0x531577)try{const _0x25cd51=await askConfirm(_0x176a5b(0xcd));if(!_0x25cd51){console[_0x176a5b(0xc1)](a202_0x33db47[_0x176a5b(0x7d)](_0x176a5b(0x80)));return;}}catch(_0x20b2f6){if(_0x20b2f6?.[_0x176a5b(0xa3)]==='CANCEL'){console[_0x176a5b(0xc1)](a202_0x33db47[_0x176a5b(0x7d)](_0x176a5b(0x80)));return;}throw _0x20b2f6;}const _0x32c199=[],_0x23a523=a202_0x2be156({'text':_0x176a5b(0xf6),'color':_0x176a5b(0xa8)})[_0x176a5b(0xd7)](),_0x3d1f7d=execConfigMigration(_0x4c46fd,_0x263354);_0x32c199[_0x176a5b(0x9d)](_0x3d1f7d),_0x23a523[_0x3d1f7d['ok']?_0x176a5b(0x82):'fail'](_0x176a5b(0xd5)+(_0x3d1f7d[_0x176a5b(0x71)]??(_0x3d1f7d['ok']?'done':'failed')));const _0x43cc71=resolve(_0x263354,'.lovrabet'),_0x3dbd5e=a202_0x2be156({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':_0x176a5b(0xa8)})[_0x176a5b(0xd7)]();if(existsSync(_0x43cc71))try{rmSync(_0x43cc71,{'recursive':!![],'force':!![]}),_0x3dbd5e[_0x176a5b(0x82)](_0x176a5b(0xb5)),_0x32c199[_0x176a5b(0x9d)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0xf9ed9){_0x3dbd5e['fail'](_0x176a5b(0xd9)+_0xf9ed9[_0x176a5b(0xa3)]),_0x32c199['push']({'step':0x2,'label':_0x176a5b(0xb4),'ok':![],'detail':_0xf9ed9[_0x176a5b(0xa3)]});}else _0x3dbd5e[_0x176a5b(0xc5)](_0x176a5b(0x94)),_0x32c199[_0x176a5b(0x9d)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':'skipped'});const _0x110fd4=a202_0x2be156({'text':_0x176a5b(0xb7),'color':_0x176a5b(0xa8)})[_0x176a5b(0xd7)](),_0x48dbeb=execRemoveOldArtifacts(_0x4c46fd[_0x176a5b(0xe5)]);_0x32c199[_0x176a5b(0x9d)](_0x48dbeb),_0x110fd4[_0x48dbeb['ok']?_0x176a5b(0x82):'fail'](_0x176a5b(0xd8)+(_0x48dbeb['detail']??(_0x48dbeb['ok']?_0x176a5b(0x96):_0x176a5b(0x99))));const _0x5de373=a202_0x2be156({'text':_0x176a5b(0x73),'color':_0x176a5b(0xa8)})[_0x176a5b(0xd7)](),_0x1a328c=execCleanMcp(_0x4c46fd);_0x32c199[_0x176a5b(0x9d)](_0x1a328c),_0x5de373[_0x1a328c['ok']?_0x176a5b(0x82):_0x176a5b(0xef)](_0x176a5b(0xf0)+(_0x1a328c[_0x176a5b(0x71)]??(_0x1a328c['ok']?_0x176a5b(0x96):'failed')));const _0x40c503=a202_0x2be156({'text':_0x176a5b(0xf1),'color':_0x176a5b(0xa8)})['start'](),_0x1cec5d=execSkillsRemove(_0x263354,_0x531577);_0x32c199[_0x176a5b(0x9d)](_0x1cec5d),_0x40c503[_0x1cec5d['ok']?_0x176a5b(0x82):_0x176a5b(0xef)](_0x176a5b(0xe3)+(_0x1cec5d['detail']??(_0x1cec5d['ok']?_0x176a5b(0x96):_0x176a5b(0x99))));const _0x320101=a202_0x2be156({'text':_0x176a5b(0x72),'color':'cyan'})['start'](),_0x4b67a8=execSkillsAdd(_0x263354,_0x531577);_0x32c199[_0x176a5b(0x9d)](_0x4b67a8),_0x320101[_0x4b67a8['ok']?_0x176a5b(0x82):_0x176a5b(0xef)](_0x176a5b(0x95)+(_0x4b67a8[_0x176a5b(0x71)]??(_0x4b67a8['ok']?_0x176a5b(0x96):_0x176a5b(0x99))));const _0x31182c=a202_0x2be156({'text':_0x176a5b(0xea),'color':_0x176a5b(0xa8)})[_0x176a5b(0xd7)](),_0x5e0faa=execUpgradeSdk(_0x4c46fd);_0x32c199['push'](_0x5e0faa),_0x31182c[_0x5e0faa['ok']?_0x176a5b(0x82):_0x176a5b(0xef)]('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x5e0faa[_0x176a5b(0x71)]??(_0x5e0faa['ok']?'done':'failed'))),printSummary(_0x32c199);const _0x415c11=_0x32c199[_0x176a5b(0x8e)](_0x479781=>!_0x479781['ok']);_0x415c11?console['log'](a202_0x33db47[_0x176a5b(0x91)](_0x176a5b(0x9f))):console[_0x176a5b(0xc1)](a202_0x33db47[_0x176a5b(0xe6)](_0x176a5b(0xbb))),_0x5e0faa['ok']&&_0x4c46fd['sdkUpgrade']&&(console['log'](''),console[_0x176a5b(0xc1)](a202_0x33db47['bold'][_0x176a5b(0xa8)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console['log'](a202_0x33db47['cyan'](_0x176a5b(0xbf))),console[_0x176a5b(0xc1)](''),console[_0x176a5b(0xc1)](a202_0x33db47[_0x176a5b(0xa5)](_0x176a5b(0x98))),console[_0x176a5b(0xc1)](a202_0x33db47[_0x176a5b(0xa5)]('\x20\x20#\x20or')),console[_0x176a5b(0xc1)](a202_0x33db47[_0x176a5b(0xa5)]('\x20\x20bun\x20install')),console[_0x176a5b(0xc1)](''));}
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a189_0x5d4446=a189_0x39ed;(function(_0x7a9485,_0x5942fe){const _0x17d3de=a189_0x39ed,_0x3a0e89=_0x7a9485();while(!![]){try{const _0x544a6a=parseInt(_0x17d3de(0xf6))/0x1+parseInt(_0x17d3de(0xbf))/0x2*(parseInt(_0x17d3de(0x100))/0x3)+-parseInt(_0x17d3de(0x112))/0x4*(-parseInt(_0x17d3de(0x10d))/0x5)+-parseInt(_0x17d3de(0xca))/0x6+-parseInt(_0x17d3de(0x131))/0x7*(parseInt(_0x17d3de(0xc6))/0x8)+parseInt(_0x17d3de(0x12f))/0x9+parseInt(_0x17d3de(0xc4))/0xa*(parseInt(_0x17d3de(0x120))/0xb);if(_0x544a6a===_0x5942fe)break;else _0x3a0e89['push'](_0x3a0e89['shift']());}catch(_0x4fe872){_0x3a0e89['push'](_0x3a0e89['shift']());}}}(a189_0x5403,0xa294c));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dbDefinitions}from'../commands/db/index.js';import{deploymentDefinitions}from'../commands/deployment/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{ruleDefinitions}from'../commands/rule/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{instantApiPolicyDefinitions}from'../commands/instant-api-policy/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function a189_0x39ed(_0x1d65a7,_0x435f97){_0x1d65a7=_0x1d65a7-0xbc;const _0x540320=a189_0x5403();let _0x39ed48=_0x540320[_0x1d65a7];return _0x39ed48;}function registerDefinitions(_0x4a4077){const _0x24793d=a189_0x39ed;for(const _0x48b1bc of _0x4a4077){definitions[_0x24793d(0x132)](_0x48b1bc[_0x24793d(0x127)]+':'+_0x48b1bc[_0x24793d(0xd3)],_0x48b1bc);let _0x2484ce=serviceGroups[_0x24793d(0x121)](_0x48b1bc[_0x24793d(0x127)]);!_0x2484ce&&(_0x2484ce=[],serviceGroups[_0x24793d(0x132)](_0x48b1bc[_0x24793d(0x127)],_0x2484ce)),_0x2484ce['push'](_0x48b1bc);}}function registerDeclarativeService(_0x538da5,_0x6f2f62,_0x266130){const _0x171d7c=a189_0x39ed;registerDefinitions(_0x6f2f62);_0x266130?.[_0x171d7c(0xc0)]&®isterDefinitions([_0x266130[_0x171d7c(0xc0)]]);const _0x41742a=_0x4af03e=>_0x4af03e===_0x171d7c(0x11d)?'':_0x4af03e===_0x171d7c(0x133)?'\x20\x20[write]':_0x171d7c(0x130),_0x5b2115={'service':_0x6f2f62[0x0][_0x171d7c(0x127)],'label':_0x538da5,'commands':_0x6f2f62[_0x171d7c(0xdb)](_0x30b310=>!_0x30b310[_0x171d7c(0xc2)])[_0x171d7c(0x11b)](_0x3850af=>({'command':_0x3850af[_0x171d7c(0xd3)],'description':_0x3850af[_0x171d7c(0xf4)],'tag':_0x41742a(_0x3850af[_0x171d7c(0xff)])})),'declarative':!![],'defaultCommand':_0x266130?.[_0x171d7c(0x111)]??(_0x266130?.[_0x171d7c(0xbe)]?_0x6f2f62[0x0][_0x171d7c(0xd3)]:undefined),'wildcardDef':_0x266130?.[_0x171d7c(0xc0)],'isSingleCommand':_0x266130?.['isSingleCommand']};serviceRegistry[_0x171d7c(0xce)](_0x5b2115),serviceByName[_0x171d7c(0x132)](_0x5b2115[_0x171d7c(0x127)],_0x5b2115);}registerDeclarativeService(a189_0x5d4446(0xf8),projectDefinitions),registerDeclarativeService(a189_0x5d4446(0x116),workspaceDefinitions),registerDeclarativeService(a189_0x5d4446(0xe4),appDefinitions),registerDeclarativeService(a189_0x5d4446(0xfd),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService('Tenant\x20Members',tenantDefinitions),registerDeclarativeService('User\x20Accounts',userAccountDefinitions),registerDeclarativeService(a189_0x5d4446(0xcc),datasetDefinitions),registerDeclarativeService('Data\x20List\x20Pages\x20&\x20Custom\x20Pages',pageDefinitions),registerDeclarativeService('API\x20Development',apiDefinitions),registerDeclarativeService(a189_0x5d4446(0xeb),bffDefinitions),registerDeclarativeService(a189_0x5d4446(0xcf),instantApiPolicyDefinitions),registerDeclarativeService(a189_0x5d4446(0x12b),notificationDefinitions),registerDeclarativeService(a189_0x5d4446(0x125),sqlDefinitions),registerDeclarativeService(a189_0x5d4446(0x10b),dbDefinitions),registerDeclarativeService(a189_0x5d4446(0x12d),deploymentDefinitions),registerDeclarativeService(a189_0x5d4446(0xd6),menuDefinitions),registerDeclarativeService(a189_0x5d4446(0x123),taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService(a189_0x5d4446(0xfb),appConfigDefinitions),registerDeclarativeService(a189_0x5d4446(0xfa),kbDefinitions),registerDeclarativeService('Agent\x20Context\x20Rules',ruleDefinitions),registerDeclarativeService(a189_0x5d4446(0xcb),issueDefinitions),registerDeclarativeService('File',fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a189_0x5d4446(0xda),codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a189_0x5d4446(0xf9),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a189_0x5d4446(0x105),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a189_0x5d4446(0xe3),cliSkillDefinitions,{'defaultCommand':a189_0x5d4446(0xdc)}),registerDeclarativeService(a189_0x5d4446(0x108),logsDefinitions,{'defaultCommand':a189_0x5d4446(0xe7)}),registerDeclarativeService(a189_0x5d4446(0x126),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a189_0x5d4446(0x12e)]=[{'command':a189_0x5d4446(0xe2),'description':'Run\x20any\x20package.json\x20script','tag':'\x20\x20['+runDefinition[a189_0x5d4446(0xff)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a189_0x5d4446(0xf5),a189_0x5d4446(0x10a)],['bff:new',a189_0x5d4446(0xe9)],[a189_0x5d4446(0xf2),a189_0x5d4446(0xc3)],[a189_0x5d4446(0xe0),a189_0x5d4446(0x119)],[a189_0x5d4446(0xd4),a189_0x5d4446(0x102)],['skill:','rabetbase\x20cli-skill\x20install'],[a189_0x5d4446(0xe1),a189_0x5d4446(0xd8)],[a189_0x5d4446(0x11f),'rabetbase\x20cli-skill\x20install'],['skills:install',a189_0x5d4446(0xd8)],[a189_0x5d4446(0xc7),a189_0x5d4446(0xd2)],[a189_0x5d4446(0x11a),a189_0x5d4446(0x12a)],[a189_0x5d4446(0xf7),'rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>'],[a189_0x5d4446(0x11e),a189_0x5d4446(0x10e)],[a189_0x5d4446(0xf3),a189_0x5d4446(0x109)],[a189_0x5d4446(0x103),a189_0x5d4446(0xc8)],[a189_0x5d4446(0x10f),a189_0x5d4446(0x124)],[a189_0x5d4446(0xc5),a189_0x5d4446(0xe8)],[a189_0x5d4446(0x129),a189_0x5d4446(0xd7)],[a189_0x5d4446(0x118),a189_0x5d4446(0xdd)],[a189_0x5d4446(0xed),a189_0x5d4446(0xd1)],[a189_0x5d4446(0x113),a189_0x5d4446(0xe6)],[a189_0x5d4446(0xbc),a189_0x5d4446(0xef)],[a189_0x5d4446(0xd5),a189_0x5d4446(0xf0)],[a189_0x5d4446(0xd0),a189_0x5d4446(0xf0)],['page:react-list',a189_0x5d4446(0xfc)],[a189_0x5d4446(0x128),a189_0x5d4446(0xbd)],[a189_0x5d4446(0x107),a189_0x5d4446(0x117)],[a189_0x5d4446(0xc1),a189_0x5d4446(0x101)]]),REMOVED_COMMAND_HINTS=new Map([[a189_0x5d4446(0xcd),a189_0x5d4446(0xd9)],['permit:page-get','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a189_0x5d4446(0x114),a189_0x5d4446(0xde)],[a189_0x5d4446(0x104),a189_0x5d4446(0xde)],[a189_0x5d4446(0xea),a189_0x5d4446(0xde)],[a189_0x5d4446(0xe5),a189_0x5d4446(0xde)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create',a189_0x5d4446(0xec)],['start',a189_0x5d4446(0x10c)],[a189_0x5d4446(0x122),a189_0x5d4446(0x110)],[a189_0x5d4446(0xee),'rabetbase\x20run\x20preview'],[a189_0x5d4446(0x12c),'rabetbase\x20auth\x20logout']]);export function resolveRemovedCommand(_0x13a40f,_0x1f980d){const _0x53d69e=a189_0x5d4446;if(!_0x13a40f)return undefined;const _0x3070d8=REMOVED_COMMAND_REPLACEMENTS[_0x53d69e(0x121)](_0x13a40f+':'+(_0x1f980d??'')),_0x1d1a29=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x53d69e(0x121)](_0x13a40f),_0xb028d7=_0x3070d8??_0x1d1a29,_0x22f20c=REMOVED_COMMAND_HINTS[_0x53d69e(0x121)](_0x13a40f+':'+(_0x1f980d??''));if(!_0xb028d7&&!_0x22f20c)return undefined;const _0x1649f7=_0x1d1a29?_0x13a40f:_0x1f980d?_0x13a40f+'\x20'+_0x1f980d:_0x13a40f;return{'command':_0x1649f7,'message':_0x53d69e(0xfe)+_0x1649f7+_0x53d69e(0xc9),'hint':_0x22f20c??_0x53d69e(0xf1)+_0xb028d7+_0x53d69e(0xdf)};}export function findDefinition(_0x112d32,_0x2e9bcf){const _0x131d6d=a189_0x5d4446;return definitions[_0x131d6d(0x121)](_0x112d32+':'+_0x2e9bcf);}export function isKnownService(_0x4e60bf){return serviceByName['has'](_0x4e60bf);}function a189_0x5403(){const _0x1cea0d=['rabetbase\x20workspace\x20use\x20--app\x20<name>','Notification\x20Configuration','logout','Deployment','commands','10084023JDnLGp','\x20\x20[high-risk-write]','7mknXOh','set','write','page:standard-page-status','rabetbase\x20page\x20custom-detail','isSingleCommand','156ehtNXo','wildcardDef','page:react-publish','hidden','rabetbase\x20sql\x20create','250QAyrnZ','knowledge-base:update','8798776BAmugC','app:remote','rabetbase\x20kb\x20detail','`\x20has\x20been\x20removed.','5491698KWoCBj','Platform\x20Issue','Dataset\x20&\x20Operations','deployment:sync','push','Instant\x20API\x20Policy','page:custom-create','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','rabetbase\x20app\x20list\x20--remote','command','project:init','page:react-create','Menu','rabetbase\x20kb\x20delete','rabetbase\x20cli-skill\x20install','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','Code\x20Generation','filter','install','rabetbase\x20role\x20list','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','`\x20instead.','menu:update','skill:install','<script>','CLI\x20Built-in\x20Skill','App\x20Management','permit:role-apis-set','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','show','rabetbase\x20kb\x20update','rabetbase\x20bff\x20create','permit:role-menus-set','Backend\x20Function\x20Scripts','rabetbase\x20project\x20create\x20<project-name>','data:filter','preview','rabetbase\x20page\x20data-list-status','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','Use\x20`','sql:new','knowledge-base:list','description','sql:save','54047cZFneJ','app:add','Project','Schema','Company\x20Knowledge\x20Base','Runtime\x20App\x20Config\x20Management','rabetbase\x20page\x20custom-list','Authentication','`rabetbase\x20','risk','3099TQEqpP','rabetbase\x20page\x20custom-publish','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','knowledge-base:detail','permit:role-menus','Self\x20Update','from','page:react-update','Logs','rabetbase\x20kb\x20list','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','Database\x20Connections','rabetbase\x20run\x20start','15OANCZj','rabetbase\x20workspace\x20remove\x20<name>','knowledge-base:create','rabetbase\x20run\x20build','defaultCommand','1491292zVhYNI','data:getOne','permit:page-set','has','Workspace','rabetbase\x20page\x20custom-update','role:create','rabetbase\x20menu\x20asset-update','app:use','map','values','read','app:remove','skills:','135311hHPjON','get','build','Async\x20Tasks','rabetbase\x20kb\x20create','SQL\x20Queries','Run\x20Scripts','service','page:react-detail','knowledge-base:delete'];a189_0x5403=function(){return _0x1cea0d;};return a189_0x5403();}export function isDeclarativeService(_0x448c92){const _0x474b2b=a189_0x5d4446;return serviceGroups[_0x474b2b(0x115)](_0x448c92)||serviceByName[_0x474b2b(0x121)](_0x448c92)?.[_0x474b2b(0xc0)]!==undefined;}export function getServiceEntry(_0xb29119){const _0x3ac06c=a189_0x5d4446;return serviceByName[_0x3ac06c(0x121)](_0xb29119);}export function getLegacyHandler(_0x24e3f2,_0x4b690c){return undefined;}export function getAllDefinitions(){const _0x4efb87=a189_0x5d4446;return Array[_0x4efb87(0x106)](definitions[_0x4efb87(0x11c)]());}
|
|
1
|
+
const a203_0x45f462=a203_0x3ec2;(function(_0x746359,_0x1a0f6d){const _0x45495d=a203_0x3ec2,_0x24f1c7=_0x746359();while(!![]){try{const _0x55acd9=parseInt(_0x45495d(0x1ac))/0x1+-parseInt(_0x45495d(0x182))/0x2+-parseInt(_0x45495d(0x1c2))/0x3+-parseInt(_0x45495d(0x1ef))/0x4*(parseInt(_0x45495d(0x1da))/0x5)+-parseInt(_0x45495d(0x1cc))/0x6+-parseInt(_0x45495d(0x190))/0x7*(-parseInt(_0x45495d(0x1cb))/0x8)+parseInt(_0x45495d(0x1e9))/0x9*(parseInt(_0x45495d(0x1f3))/0xa);if(_0x55acd9===_0x1a0f6d)break;else _0x24f1c7['push'](_0x24f1c7['shift']());}catch(_0x36f2a9){_0x24f1c7['push'](_0x24f1c7['shift']());}}}(a203_0xc699,0x49ebf));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dbDefinitions}from'../commands/db/index.js';import{deploymentDefinitions}from'../commands/deployment/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{ruleDefinitions}from'../commands/rule/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{instantApiPolicyDefinitions}from'../commands/instant-api-policy/index.js';function a203_0x3ec2(_0x3fb460,_0x147a64){_0x3fb460=_0x3fb460-0x182;const _0xc69998=a203_0xc699();let _0x3ec2d2=_0xc69998[_0x3fb460];return _0x3ec2d2;}import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';function a203_0xc699(){const _0x143fb0=['page:react-update','rabetbase\x20kb\x20create','`\x20instead.','4fcieBV','`\x20has\x20been\x20removed.','page:standard-page-status','sql:save','13817210QkXHzZ','Workspace','\x20\x20[','app:add','read','Schema','1041436uZUHNs','skills:','wildcardDef','rabetbase\x20project\x20create\x20<project-name>','Tenant\x20Members','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','defaultCommand','\x20\x20[high-risk-write]','Authentication','Roles','rabetbase\x20workspace\x20use\x20--app\x20<name>','app:use','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','Instant\x20API\x20Policy','263319IMWzgR','login','knowledge-base:detail','Dataset\x20&\x20Operations','rabetbase\x20app\x20list\x20--remote','command','skills:install','Run\x20any\x20package.json\x20script','page:custom-create','permit:role-menus-set','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','bff:new','hidden','data:getOne','skill:install','rabetbase\x20workspace\x20remove\x20<name>','Notification\x20Configuration','Run\x20Scripts','deployment:sync','service','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','permit:role-apis-set','rabetbase\x20sql\x20create','isSingleCommand','flow:disable','push','Code\x20Generation','Menu','439610kUukGN','logout','\x20\x20[write]','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','install','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','set','permit:page-set','Self\x20Update','Runtime\x20App\x20Config\x20Management','permit:role-menus','Logs','risk','Agent\x20Context\x20Rules','menu:update','map','page:react-create','Deployment','rabetbase\x20kb\x20update','rabetbase\x20page\x20custom-update','Platform\x20Issue','Use\x20`','1688574ZbwFjd','page:react-list','description','page:react-detail','from','rabetbase\x20page\x20custom-detail','App\x20Management','`rabetbase\x20','Database\x20Connections','56DHkVwt','2288502felOpJ','filter','page:react-publish','API\x20Development','permit:page-get','rabetbase\x20run\x20build','SQL\x20Queries','commands','rabetbase\x20cli-skill\x20install','data:filter','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','File','rabetbase\x20kb\x20delete','Backend\x20Function\x20Scripts','1584370GtEgWk','start','knowledge-base:update','rabetbase\x20page\x20data-list-status','show','get','rabetbase\x20role\x20list','knowledge-base:delete','app:remote','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','Diagnostics','Configuration','rabetbase\x20run\x20preview','role:create','Async\x20Tasks','9RmsWsd','preview','User\x20Accounts'];a203_0xc699=function(){return _0x143fb0;};return a203_0xc699();}import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{flowDefinitions}from'../commands/flow/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0xd82efe){const _0x5ec289=a203_0x3ec2;for(const _0x64c414 of _0xd82efe){definitions[_0x5ec289(0x1b2)](_0x64c414['service']+':'+_0x64c414['command'],_0x64c414);let _0x2ecc40=serviceGroups[_0x5ec289(0x1df)](_0x64c414[_0x5ec289(0x1a3)]);!_0x2ecc40&&(_0x2ecc40=[],serviceGroups[_0x5ec289(0x1b2)](_0x64c414[_0x5ec289(0x1a3)],_0x2ecc40)),_0x2ecc40['push'](_0x64c414);}}function registerDeclarativeService(_0x49a5d4,_0x2f465a,_0x12f300){const _0x47210e=a203_0x3ec2;registerDefinitions(_0x2f465a);_0x12f300?.[_0x47210e(0x184)]&®isterDefinitions([_0x12f300[_0x47210e(0x184)]]);const _0x2e5b40=_0x194284=>_0x194284===_0x47210e(0x1f7)?'':_0x194284==='write'?_0x47210e(0x1ae):_0x47210e(0x189),_0x1a13e1={'service':_0x2f465a[0x0][_0x47210e(0x1a3)],'label':_0x49a5d4,'commands':_0x2f465a[_0x47210e(0x1cd)](_0x37ac60=>!_0x37ac60[_0x47210e(0x19c)])[_0x47210e(0x1bb)](_0x10d84d=>({'command':_0x10d84d[_0x47210e(0x195)],'description':_0x10d84d[_0x47210e(0x1c4)],'tag':_0x2e5b40(_0x10d84d[_0x47210e(0x1b8)])})),'declarative':!![],'defaultCommand':_0x12f300?.[_0x47210e(0x188)]??(_0x12f300?.[_0x47210e(0x1a7)]?_0x2f465a[0x0][_0x47210e(0x195)]:undefined),'wildcardDef':_0x12f300?.[_0x47210e(0x184)],'isSingleCommand':_0x12f300?.[_0x47210e(0x1a7)]};serviceRegistry[_0x47210e(0x1a9)](_0x1a13e1),serviceByName[_0x47210e(0x1b2)](_0x1a13e1[_0x47210e(0x1a3)],_0x1a13e1);}registerDeclarativeService('Project',projectDefinitions),registerDeclarativeService(a203_0x45f462(0x1f4),workspaceDefinitions),registerDeclarativeService(a203_0x45f462(0x1c8),appDefinitions),registerDeclarativeService(a203_0x45f462(0x18a),authDefinitions,{'defaultCommand':a203_0x45f462(0x191)}),registerDeclarativeService(a203_0x45f462(0x186),tenantDefinitions),registerDeclarativeService(a203_0x45f462(0x1eb),userAccountDefinitions),registerDeclarativeService(a203_0x45f462(0x193),datasetDefinitions),registerDeclarativeService(a203_0x45f462(0x1e3),pageDefinitions),registerDeclarativeService(a203_0x45f462(0x1cf),apiDefinitions),registerDeclarativeService(a203_0x45f462(0x1d9),bffDefinitions),registerDeclarativeService(a203_0x45f462(0x18f),instantApiPolicyDefinitions),registerDeclarativeService(a203_0x45f462(0x1a0),notificationDefinitions),registerDeclarativeService(a203_0x45f462(0x1d2),sqlDefinitions),registerDeclarativeService(a203_0x45f462(0x1ca),dbDefinitions),registerDeclarativeService(a203_0x45f462(0x1bd),deploymentDefinitions),registerDeclarativeService(a203_0x45f462(0x1ab),menuDefinitions),registerDeclarativeService(a203_0x45f462(0x1e8),taskDefinitions),registerDeclarativeService(a203_0x45f462(0x18b),roleDefinitions),registerDeclarativeService(a203_0x45f462(0x1b5),appConfigDefinitions),registerDeclarativeService('Company\x20Knowledge\x20Base',kbDefinitions),registerDeclarativeService(a203_0x45f462(0x1b9),ruleDefinitions),registerDeclarativeService(a203_0x45f462(0x1c0),issueDefinitions),registerDeclarativeService(a203_0x45f462(0x1d7),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a203_0x45f462(0x1aa),codegenDefinitions),registerDeclarativeService(a203_0x45f462(0x1e5),configDefinitions),registerDeclarativeService(a203_0x45f462(0x1e4),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a203_0x45f462(0x1f8),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a203_0x45f462(0x1b4),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a203_0x45f462(0x1b0)}),registerDeclarativeService('Approval\x20Flows',flowDefinitions),registerDeclarativeService(a203_0x45f462(0x1b7),logsDefinitions,{'defaultCommand':a203_0x45f462(0x1de)}),registerDeclarativeService(a203_0x45f462(0x1a1),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a203_0x45f462(0x1d3)]=[{'command':'<script>','description':a203_0x45f462(0x197),'tag':a203_0x45f462(0x1f5)+runDefinition[a203_0x45f462(0x1b8)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a203_0x45f462(0x1f2),a203_0x45f462(0x19a)],[a203_0x45f462(0x19b),'rabetbase\x20bff\x20create'],['sql:new',a203_0x45f462(0x1a6)],[a203_0x45f462(0x1ba),'rabetbase\x20menu\x20asset-update'],['project:init','rabetbase\x20workspace\x20init\x20--appcode\x20<code>'],['skill:','rabetbase\x20cli-skill\x20install'],[a203_0x45f462(0x19e),a203_0x45f462(0x1d4)],[a203_0x45f462(0x183),a203_0x45f462(0x1d4)],[a203_0x45f462(0x196),a203_0x45f462(0x1d4)],[a203_0x45f462(0x1e2),a203_0x45f462(0x194)],[a203_0x45f462(0x18d),a203_0x45f462(0x18c)],[a203_0x45f462(0x1f6),a203_0x45f462(0x1a4)],['app:remove',a203_0x45f462(0x19f)],['knowledge-base:list','rabetbase\x20kb\x20list'],[a203_0x45f462(0x192),'rabetbase\x20kb\x20detail'],['knowledge-base:create',a203_0x45f462(0x1ed)],[a203_0x45f462(0x1dc),a203_0x45f462(0x1be)],[a203_0x45f462(0x1e1),a203_0x45f462(0x1d8)],[a203_0x45f462(0x1e7),a203_0x45f462(0x1e0)],[a203_0x45f462(0x1d5),a203_0x45f462(0x18e)],[a203_0x45f462(0x19d),'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],[a203_0x45f462(0x1f1),a203_0x45f462(0x1dd)],[a203_0x45f462(0x1bc),a203_0x45f462(0x1b1)],[a203_0x45f462(0x198),a203_0x45f462(0x1b1)],[a203_0x45f462(0x1c3),'rabetbase\x20page\x20custom-list'],[a203_0x45f462(0x1c5),a203_0x45f462(0x1c7)],[a203_0x45f462(0x1ec),a203_0x45f462(0x1bf)],[a203_0x45f462(0x1ce),'rabetbase\x20page\x20custom-publish']]),REMOVED_COMMAND_HINTS=new Map([['flow:enable',a203_0x45f462(0x187)],[a203_0x45f462(0x1a8),a203_0x45f462(0x187)],[a203_0x45f462(0x1a2),a203_0x45f462(0x1af)],[a203_0x45f462(0x1d0),a203_0x45f462(0x1d6)],[a203_0x45f462(0x1b3),a203_0x45f462(0x1d6)],[a203_0x45f462(0x1b6),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a203_0x45f462(0x199),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a203_0x45f462(0x1a5),a203_0x45f462(0x1d6)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create',a203_0x45f462(0x185)],[a203_0x45f462(0x1db),'rabetbase\x20run\x20start'],['build',a203_0x45f462(0x1d1)],[a203_0x45f462(0x1ea),a203_0x45f462(0x1e6)],[a203_0x45f462(0x1ad),'rabetbase\x20auth\x20logout']]);export function resolveRemovedCommand(_0x5bf0c7,_0x1205e9){const _0x2e7e17=a203_0x45f462;if(!_0x5bf0c7)return undefined;const _0x2cd25a=REMOVED_COMMAND_REPLACEMENTS[_0x2e7e17(0x1df)](_0x5bf0c7+':'+(_0x1205e9??'')),_0x88b28d=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x2e7e17(0x1df)](_0x5bf0c7),_0x30d7e9=_0x2cd25a??_0x88b28d,_0x838d85=REMOVED_COMMAND_HINTS[_0x2e7e17(0x1df)](_0x5bf0c7+':'+(_0x1205e9??''));if(!_0x30d7e9&&!_0x838d85)return undefined;const _0xc4fc7c=_0x88b28d?_0x5bf0c7:_0x1205e9?_0x5bf0c7+'\x20'+_0x1205e9:_0x5bf0c7;return{'command':_0xc4fc7c,'message':_0x2e7e17(0x1c9)+_0xc4fc7c+_0x2e7e17(0x1f0),'hint':_0x838d85??_0x2e7e17(0x1c1)+_0x30d7e9+_0x2e7e17(0x1ee)};}export function findDefinition(_0x443077,_0x5c4af2){const _0x1086e3=a203_0x45f462;return definitions[_0x1086e3(0x1df)](_0x443077+':'+_0x5c4af2);}export function isKnownService(_0x1ecffd){return serviceByName['has'](_0x1ecffd);}export function isDeclarativeService(_0x41b33f){const _0x4a341e=a203_0x45f462;return serviceGroups['has'](_0x41b33f)||serviceByName[_0x4a341e(0x1df)](_0x41b33f)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x266b3a){const _0x85ea0d=a203_0x45f462;return serviceByName[_0x85ea0d(0x1df)](_0x266b3a);}export function getLegacyHandler(_0x4ff194,_0x2dee57){return undefined;}export function getAllDefinitions(){const _0x34f17a=a203_0x45f462;return Array[_0x34f17a(0x1c6)](definitions['values']());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a204_0x1ea271=a204_0x18a7;(function(_0x28586c,_0x307f7f){const _0x577f95=a204_0x18a7,_0x1f671d=_0x28586c();while(!![]){try{const _0x15d5c7=-parseInt(_0x577f95(0x120))/0x1*(parseInt(_0x577f95(0x11b))/0x2)+-parseInt(_0x577f95(0x110))/0x3*(parseInt(_0x577f95(0x119))/0x4)+parseInt(_0x577f95(0x11d))/0x5+parseInt(_0x577f95(0x10c))/0x6+parseInt(_0x577f95(0x10f))/0x7*(parseInt(_0x577f95(0x121))/0x8)+parseInt(_0x577f95(0x114))/0x9+parseInt(_0x577f95(0x10d))/0xa;if(_0x15d5c7===_0x307f7f)break;else _0x1f671d['push'](_0x1f671d['shift']());}catch(_0x4aae57){_0x1f671d['push'](_0x1f671d['shift']());}}}(a204_0x3a22,0x54351));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a204_0x3a22(){const _0x400ed8=['1999986bdnien','Deleted\x20role\x20','roleName','/smartapi/permit/role/delete','1237284umyydJ','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','role','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','dev','4bKDevt','num','10ufBFKE','appCode','373095LmrgFl','high-risk-write','POST','37387zwEpoD','111408vxBjFC','\x20(id=','175776HFRHcj','3165230tmTMsM','delete','322GhvDIl'];a204_0x3a22=function(){return _0x400ed8;};return a204_0x3a22();}const DELETE_PATH=a204_0x1ea271(0x113);function a204_0x18a7(_0xe001fa,_0x148ed5){_0xe001fa=_0xe001fa-0x10c;const _0x3a2271=a204_0x3a22();let _0x18a74c=_0x3a2271[_0xe001fa];return _0x18a74c;}export const roleDelete={'service':a204_0x1ea271(0x116),'command':a204_0x1ea271(0x10e),'description':a204_0x1ea271(0x115),'risk':a204_0x1ea271(0x11e),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x3bbd49){const _0x3c587d=a204_0x1ea271,_0x89516c=_0x3bbd49[_0x3c587d(0x11a)]('id'),_0x40ffa8=await getRoleById(_0x3bbd49[_0x3c587d(0x11c)],_0x89516c);return assertCustomRole(_0x40ffa8,_0x3c587d(0x10e)),asDryRunResult({'scope':'dev','operation':_0x3c587d(0x10e),'selector':{'appCode':_0x3bbd49['appCode'],'roleId':_0x89516c,'roleName':_0x40ffa8[_0x3c587d(0x112)]},'before':projectRole(_0x40ffa8),'after':null,'dryRun':!![],'backend':{'method':_0x3c587d(0x11f),'path':DELETE_PATH},'warnings':_0x40ffa8['userCount']>0x0?['Role\x20still\x20has\x20'+_0x40ffa8['userCount']+_0x3c587d(0x117)]:[]},{'method':_0x3c587d(0x11f),'url':DELETE_PATH});},async 'execute'(_0x31b0c8){const _0x5f2696=a204_0x1ea271,_0x57b4e4=_0x31b0c8[_0x5f2696(0x11a)]('id'),_0x534fc7=await getRoleById(_0x31b0c8[_0x5f2696(0x11c)],_0x57b4e4);return assertCustomRole(_0x534fc7,'delete'),await deleteAppRole(_0x57b4e4),{'ok':!![],'data':{'scope':_0x5f2696(0x118),'operation':_0x5f2696(0x10e),'selector':{'appCode':_0x31b0c8[_0x5f2696(0x11c)],'roleId':_0x57b4e4,'roleName':_0x534fc7['roleName']},'before':projectRole(_0x534fc7),'after':null,'dryRun':![],'backend':{'method':_0x5f2696(0x11f),'path':DELETE_PATH},'warnings':[]},'message':_0x5f2696(0x111)+_0x534fc7[_0x5f2696(0x112)]+_0x5f2696(0x122)+_0x57b4e4+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a205_0x313fe8=a205_0x3698;(function(_0x16b262,_0x5a8fe3){const _0x2448c3=a205_0x3698,_0x524dd7=_0x16b262();while(!![]){try{const _0x5c8c3c=-parseInt(_0x2448c3(0x13f))/0x1*(-parseInt(_0x2448c3(0x13a))/0x2)+parseInt(_0x2448c3(0x13e))/0x3+parseInt(_0x2448c3(0x135))/0x4+parseInt(_0x2448c3(0x146))/0x5*(parseInt(_0x2448c3(0x13b))/0x6)+-parseInt(_0x2448c3(0x148))/0x7*(-parseInt(_0x2448c3(0x147))/0x8)+-parseInt(_0x2448c3(0x145))/0x9*(parseInt(_0x2448c3(0x13c))/0xa)+-parseInt(_0x2448c3(0x140))/0xb*(parseInt(_0x2448c3(0x143))/0xc);if(_0x5c8c3c===_0x5a8fe3)break;else _0x524dd7['push'](_0x524dd7['shift']());}catch(_0xc2a74b){_0x524dd7['push'](_0x524dd7['shift']());}}}(a205_0x5d04,0xeb5b4));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a205_0x5d04(){const _0x4ef116=['Role\x20','6288084PZCTRJ','detail','roleType','num','read','2rViqly','22056XEyLMt','10KHbKCt','appCode','421179ekxWEJ','769277cmkDYq','2982683kVuUyU','roleName','dev','156XXmLsi','role','3476394pqybgH','1315yIGCVD','16rBTxqW','4993786ZbIgYz'];a205_0x5d04=function(){return _0x4ef116;};return a205_0x5d04();}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a205_0x3698(_0xd273e8,_0xd6ac70){_0xd273e8=_0xd273e8-0x134;const _0x5d0472=a205_0x5d04();let _0x369828=_0x5d0472[_0xd273e8];return _0x369828;}export const roleDetail={'service':a205_0x313fe8(0x144),'command':a205_0x313fe8(0x136),'description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':a205_0x313fe8(0x139),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x391a62){const _0x1b6c5f=a205_0x313fe8,_0x357c35=_0x391a62[_0x1b6c5f(0x138)]('id'),_0x555fbb=await getRoleById(_0x391a62[_0x1b6c5f(0x13d)],_0x357c35);return{'ok':!![],'data':{'scope':_0x1b6c5f(0x142),'role':projectRole(_0x555fbb)},'message':_0x1b6c5f(0x134)+_0x555fbb[_0x1b6c5f(0x141)]+'\x20('+_0x555fbb[_0x1b6c5f(0x137)]+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x24e555,_0x5224c6){const _0x4d215c=a206_0x4842,_0x24edda=_0x24e555();while(!![]){try{const _0x5789f3=-parseInt(_0x4d215c(0x1a0))/0x1+parseInt(_0x4d215c(0x19d))/0x2+-parseInt(_0x4d215c(0x19b))/0x3*(parseInt(_0x4d215c(0x1a4))/0x4)+parseInt(_0x4d215c(0x19c))/0x5*(-parseInt(_0x4d215c(0x1a1))/0x6)+parseInt(_0x4d215c(0x19e))/0x7*(-parseInt(_0x4d215c(0x19f))/0x8)+parseInt(_0x4d215c(0x19a))/0x9+-parseInt(_0x4d215c(0x1a3))/0xa*(-parseInt(_0x4d215c(0x1a2))/0xb);if(_0x5789f3===_0x5224c6)break;else _0x24edda['push'](_0x24edda['shift']());}catch(_0x30746b){_0x24edda['push'](_0x24edda['shift']());}}}(a206_0x4858,0x979db));import{roleList}from'../../commands/role/list.js';function a206_0x4842(_0x44c937,_0x565e5e){_0x44c937=_0x44c937-0x19a;const _0x485864=a206_0x4858();let _0x4842c3=_0x485864[_0x44c937];return _0x4842c3;}import{roleDetail}from'../../commands/role/detail.js';function a206_0x4858(){const _0x3bab77=['10784115ELhAYH','123JYnoAu','75IqQfKc','123444rmiaeK','329wpHbMo','182432tsfdbt','1051770htgxsJ','479772EKNvXr','1379433BONIZj','240qUurCI','31768ckKwoV'];a206_0x4858=function(){return _0x3bab77;};return a206_0x4858();}import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
|