@lovrabet/rabetbase-cli 2.5.10-beta.1 → 2.5.10-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/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.d.ts +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +0 -28
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.d.ts +8 -0
- package/lib/core/instant-api-policy/endpoints.js +1 -0
- package/lib/core/kb-management-client.d.ts +3 -9
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +1 -4
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
function a219_0x4fd8(){const _0x223b70=['14221rjvuFb','extracting','600gWmhkW','1272890qRrREO','\x20dataset(s),\x20generated\x20','*\x20Pulling\x20API\x20configuration...','writeFileSync','warn','API\x20configuration\x20pulled:\x20','174295WoDojw','start','Current\x20directory\x20identity\x20changed\x20during\x20project\x20creation','accessSync','info','belowMinimum','copying','W_OK','utf8','repeat','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','version','√\x20package.json\x20updated:\x20name=','stableVersion','readdirSync','Project\x20created:\x20','bold','Format\x20code','dirname','dev','\x20|\x20AppCode:\x20','84477Yfaqkx','stringify','isDirectory','projectName','error','appCode','nonInteractive','relative','*\x20Configuring\x20AppCode\x20for\x20project\x20','\x20api\x20pull\x20--force\x20--yes','!\x20Project\x20created,\x20but\x20local\x20logging\x20could\x20not\x20be\x20initialized:\x20','readFileSync','ino','parse','Project\x20template\x20ready','Remove\x20or\x20move\x20the\x20existing\x20files,\x20then\x20retry\x20with\x20--current-dir.','resolve','cyan','success','\x20Generated\x20by\x20rabetbase\x20cli\x20','validation','\x20run\x20start','downloading','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','reverse','gray','projectCode','2887280JCVtaV','Verifying\x20project\x20template','green','basename','package.json','√\x20Configuration\x20file\x20created,\x20Apps:\x20','cookie','rmSync','env','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20','toLocaleString','Resolving\x20project\x20template','Project\x20directory\x20','Failed\x20to\x20clean\x20up\x20project\x20directory:\x20','cwd','templateSource','2612286sEjfMk','The\x20current\x20directory\x20changed\x20during\x20project\x20creation.','message','1.0.0','needsUpgrade','length','fail','modelCount','currentDir','CLI\x20version\x20check','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','\x20√\x20','Skip\x20cleanup:\x20project\x20directory\x20ownership\x20changed:\x20','\x20already\x20exists','setLogPath','46rooamR','join','\x20&&\x20','description','6MpYZhn','Project\x20creation\x20failed:\x20','588aPXfYy','44RopsVU','Extracting\x20project\x20template','Unable\x20to\x20prepare\x20the\x20current\x20directory\x20workspace','log','string','Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory','The\x20current\x20directory\x20must\x20be\x20empty.','existsSync','production','17512NXVkUh','text','Copying\x20local\x20template\x20source','Project\x20name:\x20','apps','renameSync','\x20\x202.\x20Pull\x20API\x20configuration:\x20','...','project','push','Failed\x20to\x20update\x20package.json','create','cd\x20','verifying','constants'];a219_0x4fd8=function(){return _0x223b70;};return a219_0x4fd8();}(function(_0x1b4671,_0x26ab1c){const _0x14cc4e=a219_0x6bb7,_0x4bb919=_0x1b4671();while(!![]){try{const _0x1152e8=-parseInt(_0x14cc4e(0x148))/0x1*(parseInt(_0x14cc4e(0x129))/0x2)+parseInt(_0x14cc4e(0xed))/0x3*(-parseInt(_0x14cc4e(0x130))/0x4)+parseInt(_0x14cc4e(0x14b))/0x5*(parseInt(_0x14cc4e(0x12d))/0x6)+-parseInt(_0x14cc4e(0x12f))/0x7*(parseInt(_0x14cc4e(0x139))/0x8)+parseInt(_0x14cc4e(0x118))/0x9+-parseInt(_0x14cc4e(0x108))/0xa+-parseInt(_0x14cc4e(0x151))/0xb*(-parseInt(_0x14cc4e(0x14a))/0xc);if(_0x1152e8===_0x26ab1c)break;else _0x4bb919['push'](_0x4bb919['shift']());}catch(_0x122aa9){_0x4bb919['push'](_0x4bb919['shift']());}}}(a219_0x4fd8,0x3793e));import a219_0x443141 from'path';import a219_0x47db56 from'fs';import a219_0x56f173 from'chalk';import a219_0x508919 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';function a219_0x6bb7(_0x17265d,_0x9e8d0b){_0x17265d=_0x17265d-0xed;const _0x4fd85f=a219_0x4fd8();let _0x6bb7c2=_0x4fd85f[_0x17265d];return _0x6bb7c2;}import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{loadRawConfigLayers,writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';import{validateProjectName}from'../../../commands/project/create/project-name.js';import{getRuntimeDomain,getSdkClientRoutingConfig}from'../../../constant/domain.js';import{generateSdkConfigFile}from'../../../api/generate-sdk-config-file.js';import{writeProjectDomainRoutingManifest}from'../../../config/project-domain-routing.js';import{CliErrors}from'../../../errors.js';function readDirectoryIdentity(_0x5d6724){const _0x11db6a=a219_0x6bb7;try{const _0x4cb145=a219_0x47db56['lstatSync'](_0x5d6724);if(!_0x4cb145[_0x11db6a(0xef)]())return null;return{'dev':_0x4cb145[_0x11db6a(0x164)],'ino':_0x4cb145[_0x11db6a(0xf9)]};}catch{return null;}}function isSameDirectory(_0x146e0a,_0x401ff2){const _0x382c32=a219_0x6bb7;return!!_0x146e0a&&!!_0x401ff2&&_0x146e0a[_0x382c32(0x164)]===_0x401ff2['dev']&&_0x146e0a[_0x382c32(0xf9)]===_0x401ff2[_0x382c32(0xf9)];}function commitCurrentDirectoryProject(_0x266dec,_0x14142d,_0x16042c){const _0x5210e2=a219_0x6bb7;if(!isSameDirectory(readDirectoryIdentity(_0x266dec),_0x16042c))throw new Error(_0x5210e2(0x153));const _0x108111=a219_0x443141[_0x5210e2(0x10b)](_0x14142d),_0x498069=a219_0x47db56[_0x5210e2(0x15f)](_0x266dec);if(_0x498069[_0x5210e2(0x11d)]!==0x1||_0x498069[0x0]!==_0x108111)throw CliErrors[_0x5210e2(0x101)](_0x5210e2(0x119),'Remove\x20the\x20new\x20files\x20and\x20retry\x20from\x20an\x20empty\x20directory.');const _0x4a6692=a219_0x443141[_0x5210e2(0x12a)](_0x14142d,_0x5210e2(0x141)),_0x471ebf=[];try{for(const _0xa9d73a of a219_0x47db56[_0x5210e2(0x15f)](_0x4a6692)){a219_0x47db56[_0x5210e2(0x13e)](a219_0x443141[_0x5210e2(0x12a)](_0x4a6692,_0xa9d73a),a219_0x443141['join'](_0x266dec,_0xa9d73a)),_0x471ebf[_0x5210e2(0x142)](_0xa9d73a);}a219_0x47db56[_0x5210e2(0x10f)](_0x14142d,{'recursive':!![],'force':!![]});}catch(_0x4209d2){for(const _0x469ab7 of _0x471ebf[_0x5210e2(0x105)]()){const _0x2f948a=a219_0x443141['join'](_0x266dec,_0x469ab7);if(!a219_0x47db56[_0x5210e2(0x137)](_0x2f948a))continue;a219_0x47db56[_0x5210e2(0x13e)](_0x2f948a,a219_0x443141[_0x5210e2(0x12a)](_0x4a6692,_0x469ab7));}throw _0x4209d2;}}export async function createApp(_0x489ebe){const _0x3e9ff5=a219_0x6bb7,_0x13d503=await checkCliVersion();(_0x13d503[_0x3e9ff5(0x11c)]||_0x13d503[_0x3e9ff5(0x156)])&&(printCliUpgradeWarning(_0x13d503),assertCliVersionSupported(_0x13d503),logger[_0x3e9ff5(0x155)](_0x3e9ff5(0x144),_0x3e9ff5(0x121),{'currentVersion':_0x13d503['currentVersion'],'stableVersion':_0x13d503[_0x3e9ff5(0x15e)],'minimumVersion':_0x13d503['minimumVersion'],'needsUpgrade':_0x13d503[_0x3e9ff5(0x11c)],'belowMinimum':_0x13d503['belowMinimum']}));const _0x486a83=_0x489ebe[_0x3e9ff5(0x120)]?a219_0x443141['basename'](process[_0x3e9ff5(0x116)]()):_0x489ebe[_0x3e9ff5(0x107)];if(_0x486a83&&(_0x489ebe[_0x3e9ff5(0xf2)]||_0x489ebe[_0x3e9ff5(0xf3)]))await runCreate({'projectName':_0x486a83,'appCode':_0x489ebe[_0x3e9ff5(0xf2)],'env':_0x489ebe['env']},_0x489ebe);else{if(_0x486a83){const _0x3cee2f=await selectSingleAppcode(_0x489ebe['cookie']);await runCreate({'projectName':_0x486a83,'appCode':_0x3cee2f||undefined,'env':_0x489ebe[_0x3e9ff5(0x110)]},_0x489ebe);}else await guidedCreateProject(_0x2a11f7=>runCreate(_0x2a11f7,_0x489ebe),_0x489ebe['env'],_0x489ebe[_0x3e9ff5(0x10e)]);}}async function runCreate(_0x67685f,_0x41d9b6){const _0x1eba6f=a219_0x6bb7;_0x67685f[_0x1eba6f(0xf0)]=validateProjectName(_0x67685f[_0x1eba6f(0xf0)]);const _0x14a39f=_0x41d9b6[_0x1eba6f(0x120)]?process[_0x1eba6f(0x116)]():a219_0x443141['resolve'](process[_0x1eba6f(0x116)](),_0x67685f[_0x1eba6f(0xf0)]);if(_0x41d9b6['currentDir']){if(a219_0x47db56[_0x1eba6f(0x15f)](_0x14a39f)['length']>0x0)throw CliErrors[_0x1eba6f(0x101)](_0x1eba6f(0x136),_0x1eba6f(0xfc));}else{if(a219_0x47db56[_0x1eba6f(0x137)](_0x14a39f))throw new Error(_0x1eba6f(0x114)+_0x67685f[_0x1eba6f(0xf0)]+_0x1eba6f(0x127));}let _0x5257fd=null;const _0x1f96b4=_0x41d9b6[_0x1eba6f(0x120)]?readDirectoryIdentity(_0x14a39f):null;let _0x99f4d0=null;try{a219_0x47db56[_0x1eba6f(0x154)](a219_0x443141[_0x1eba6f(0x163)](_0x14a39f),a219_0x47db56[_0x1eba6f(0x147)][_0x1eba6f(0x158)]);}catch{throw new Error(_0x1eba6f(0x122));}logger[_0x1eba6f(0x155)]('create','Starting\x20project\x20creation:\x20'+_0x67685f[_0x1eba6f(0xf0)],{'projectDir':_0x14a39f,'appCode':_0x67685f['appCode']}),console[_0x1eba6f(0x133)](),console[_0x1eba6f(0x133)](a219_0x56f173[_0x1eba6f(0x10a)](_0x1eba6f(0x125))+_0x1eba6f(0x13c)+a219_0x56f173[_0x1eba6f(0x10a)](_0x67685f[_0x1eba6f(0xf0)])+(_0x67685f['appCode']?_0x1eba6f(0x165)+a219_0x56f173[_0x1eba6f(0xfe)](_0x67685f[_0x1eba6f(0xf2)]):''));try{let _0x1043b9=_0x67685f['projectName'];_0x41d9b6[_0x1eba6f(0x120)]&&(_0x99f4d0=a219_0x47db56['mkdtempSync'](a219_0x443141[_0x1eba6f(0x12a)](_0x14a39f,'.rabetbase-create-')),_0x1043b9=a219_0x443141[_0x1eba6f(0xf4)](process[_0x1eba6f(0x116)](),a219_0x443141[_0x1eba6f(0x12a)](_0x99f4d0,_0x1eba6f(0x141))));const _0x5b6c18=a219_0x443141['resolve'](process[_0x1eba6f(0x116)](),_0x1043b9);await runTask('Resolving\x20project\x20template',_0x13b296=>copyProjectTemplate(_0x1043b9,_0x45bb71=>_0x13b296(projectTemplateStageLabel(_0x45bb71)),_0x41d9b6[_0x1eba6f(0x117)]),_0x1eba6f(0xfb)),_0x5257fd=_0x41d9b6[_0x1eba6f(0x120)]?null:readDirectoryIdentity(_0x14a39f);if(!_0x41d9b6[_0x1eba6f(0x120)]&&!_0x5257fd)throw new Error(_0x1eba6f(0x135));await updatePackageJsonName(_0x1043b9,_0x67685f[_0x1eba6f(0xf0)]),await runTask('Install\x20dependencies',()=>installDependencies(_0x1043b9)),await runTask(_0x1eba6f(0x162),()=>formatProjectCode(_0x1043b9)),await configureAppCode(_0x1043b9,_0x67685f[_0x1eba6f(0xf0)],_0x67685f[_0x1eba6f(0xf2)]||'',_0x67685f[_0x1eba6f(0x110)]);let _0x3b4e8b=![];if(_0x67685f[_0x1eba6f(0xf2)]){console['log'](_0x1eba6f(0x14d));const _0x5b44aa=process['cwd']();try{process['chdir'](_0x5b6c18);const _0x52d69b=_0x67685f[_0x1eba6f(0x110)]||_0x1eba6f(0x138);initEnv(_0x52d69b);const {configArray:_0xda0679}=await fetchModelList(_0x67685f['appCode'],_0x41d9b6[_0x1eba6f(0x10e)]||''),_0x5f4056=DEFAULT_API_DIR,_0xdb3484=await generateApiFile(_0xda0679,'',_0x67685f[_0x1eba6f(0xf2)],!![],_0x52d69b,_0x5f4056,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':!![],'modelProfile':{'name':_0x67685f[_0x1eba6f(0xf2)],'defaultName':_0x67685f[_0x1eba6f(0xf2)],'runtimeDomain':getRuntimeDomain()}});console['log']('√\x20Pulled\x20'+_0xda0679[_0x1eba6f(0x11d)]+_0x1eba6f(0x14c)+_0xdb3484[_0x1eba6f(0x11f)]+'\x20model(s)'),logger[_0x1eba6f(0x155)](_0x1eba6f(0x144),_0x1eba6f(0x150)+_0x67685f['appCode']);}catch(_0x513a35){_0x3b4e8b=!![],console[_0x1eba6f(0x133)](_0x1eba6f(0x111)+CLI_BIN_NAME+'\x20api\x20pull\x20--force\x20--yes'),logger[_0x1eba6f(0x14f)](_0x1eba6f(0x144),'API\x20configuration\x20pull\x20failed',{'error':_0x513a35 instanceof Error?_0x513a35[_0x1eba6f(0x11a)]:String(_0x513a35)});}finally{process['chdir'](_0x5b44aa);}}if(_0x41d9b6[_0x1eba6f(0x120)]){if(!_0x99f4d0||!_0x1f96b4)throw new Error(_0x1eba6f(0x132));commitCurrentDirectoryProject(_0x14a39f,_0x99f4d0,_0x1f96b4),_0x99f4d0=null;}try{logger[_0x1eba6f(0x128)](_0x14a39f),logger[_0x1eba6f(0xff)](_0x1eba6f(0x144),_0x1eba6f(0x160)+_0x67685f[_0x1eba6f(0xf0)]);}catch(_0x209bc4){console[_0x1eba6f(0x14f)](_0x1eba6f(0xf7)+(_0x209bc4 instanceof Error?_0x209bc4[_0x1eba6f(0x11a)]:String(_0x209bc4)));}console[_0x1eba6f(0x133)](),console[_0x1eba6f(0x133)](a219_0x56f173['green']('─'[_0x1eba6f(0x15a)](0x3c))),console[_0x1eba6f(0x133)](a219_0x56f173[_0x1eba6f(0xfe)]['bold']('🚀\x20Next\x20Steps:')),console[_0x1eba6f(0x133)]();const _0x1e15ba=_0x41d9b6[_0x1eba6f(0x120)]?CLI_BIN_NAME+'\x20run\x20start':_0x1eba6f(0x145)+_0x67685f[_0x1eba6f(0xf0)]+_0x1eba6f(0x12b)+CLI_BIN_NAME+_0x1eba6f(0x102);console[_0x1eba6f(0x133)]('\x20\x201.\x20Start\x20project:\x20'+a219_0x56f173[_0x1eba6f(0xfe)][_0x1eba6f(0x161)](_0x1e15ba)),_0x3b4e8b&&console[_0x1eba6f(0x133)](_0x1eba6f(0x13f)+a219_0x56f173[_0x1eba6f(0xfe)][_0x1eba6f(0x161)](CLI_BIN_NAME+_0x1eba6f(0xf6))),console[_0x1eba6f(0x133)](a219_0x56f173['green']('─'[_0x1eba6f(0x15a)](0x3c)));}catch(_0x3e0c88){logger[_0x1eba6f(0xf1)](_0x1eba6f(0x144),_0x1eba6f(0x12e)+_0x67685f['projectName'],{'error':_0x3e0c88 instanceof Error?_0x3e0c88[_0x1eba6f(0x11a)]:String(_0x3e0c88)});try{const _0x491c25=readDirectoryIdentity(_0x14a39f);if(_0x41d9b6['currentDir']&&_0x99f4d0)a219_0x47db56[_0x1eba6f(0x10f)](_0x99f4d0,{'recursive':!![],'force':!![]});else{if(_0x5257fd&&_0x491c25?.[_0x1eba6f(0x164)]===_0x5257fd[_0x1eba6f(0x164)]&&_0x491c25[_0x1eba6f(0xf9)]===_0x5257fd[_0x1eba6f(0xf9)])console[_0x1eba6f(0x133)](_0x1eba6f(0x15b)+_0x14a39f),a219_0x47db56[_0x1eba6f(0x10f)](_0x14a39f,{'recursive':!![],'force':!![]});else _0x491c25&&logger[_0x1eba6f(0x14f)]('create',_0x1eba6f(0x126)+_0x14a39f);}}catch{logger[_0x1eba6f(0x14f)]('create',_0x1eba6f(0x115)+_0x14a39f);}throw _0x3e0c88;}}async function runTask(_0x216f13,_0x495c45,_0x234315=_0x216f13){const _0x5b1767=a219_0x6bb7,_0x5ee7f4=a219_0x508919(_0x216f13+_0x5b1767(0x140))[_0x5b1767(0x152)]();try{const _0x5ba712=await _0x495c45(_0x4444a2=>{const _0x58e03c=_0x5b1767;_0x5ee7f4[_0x58e03c(0x13a)]=_0x4444a2+_0x58e03c(0x140);});_0x5ee7f4['stop'](),console['log'](''+a219_0x56f173[_0x5b1767(0x10a)](_0x5b1767(0x125))+_0x234315+'\x20'+a219_0x56f173[_0x5b1767(0x106)]('['+_0x5ba712+']'));}catch(_0x15bf3b){_0x5ee7f4[_0x5b1767(0x11e)](_0x216f13);throw _0x15bf3b;}}function projectTemplateStageLabel(_0x52b194){const _0x5716ab=a219_0x6bb7;switch(_0x52b194){case'resolving':return _0x5716ab(0x113);case _0x5716ab(0x103):return'Downloading\x20project\x20template';case _0x5716ab(0x146):return _0x5716ab(0x109);case _0x5716ab(0x149):return _0x5716ab(0x131);case _0x5716ab(0x157):return _0x5716ab(0x13b);}}async function updatePackageJsonName(_0x35857a,_0x228f34){const _0x208d98=a219_0x6bb7,_0x7af570=a219_0x443141['resolve'](process[_0x208d98(0x116)](),_0x35857a),_0x4b7990=a219_0x443141[_0x208d98(0x12a)](_0x7af570,_0x208d98(0x10c));try{console[_0x208d98(0x133)](_0x208d98(0x104));const _0x4f14f9=getRabetbaseCliPackageRoot(),_0xb3f517=a219_0x443141['join'](_0x4f14f9,_0x208d98(0x10c));let _0x3cc1dc=_0x208d98(0x11b);try{const _0x174eb1=JSON[_0x208d98(0xfa)](a219_0x47db56[_0x208d98(0xf8)](_0xb3f517,_0x208d98(0x159)));_0x3cc1dc=_0x174eb1['version']||'1.0.0';}catch{}const _0x472d5c=a219_0x47db56[_0x208d98(0xf8)](_0x4b7990,_0x208d98(0x159)),_0x9cf692=JSON[_0x208d98(0xfa)](_0x472d5c);_0x9cf692['name']=_0x228f34,_0x9cf692[_0x208d98(0x12c)]=_0x228f34+_0x208d98(0x100)+_0x3cc1dc,a219_0x47db56[_0x208d98(0x14e)](_0x4b7990,JSON[_0x208d98(0xee)](_0x9cf692,null,0x2)+'\x0a','utf8'),console[_0x208d98(0x133)](_0x208d98(0x15d)+_0x228f34),logger[_0x208d98(0x155)](_0x208d98(0x144),'Updating\x20package.json\x20name');}catch(_0x1055a7){logger[_0x208d98(0xf1)]('create',_0x208d98(0x143));throw _0x1055a7;}}async function configureAppCode(_0x5505ca,_0x44002d,_0x8e76b8,_0x5b35af){const _0x3d4898=a219_0x6bb7,_0x3df843=a219_0x443141[_0x3d4898(0xfd)](process[_0x3d4898(0x116)](),_0x5505ca),_0x219d78=a219_0x443141['join'](_0x3df843,NEW_CONFIG_NAME);try{_0x8e76b8?console[_0x3d4898(0x133)](_0x3d4898(0xf5)+_0x44002d+':\x20'+_0x8e76b8):console['log'](_0x3d4898(0x124)+_0x44002d);const _0x5697e2=getRabetbaseCliPackageRoot(),_0x34e7f4=a219_0x443141['join'](_0x5697e2,_0x3d4898(0x10c));let _0x13a915=_0x3d4898(0x11b);try{const _0x163f9a=JSON[_0x3d4898(0xfa)](a219_0x47db56[_0x3d4898(0xf8)](_0x34e7f4,'utf8'));_0x13a915=_0x163f9a[_0x3d4898(0x15c)]||'1.0.0';}catch{}const {globalConfig:_0x1ba57a}=loadRawConfigLayers(),_0x1f0a8c=typeof _0x1ba57a[_0x3d4898(0x110)]===_0x3d4898(0x134)?_0x1ba57a[_0x3d4898(0x110)]:undefined,_0x5dfd76={};for(const _0x301cf1 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1ba57a[_0x301cf1]!=null)_0x5dfd76[_0x301cf1]=_0x1ba57a[_0x301cf1];}const _0x837710=buildCanonicalProjectConfig(_0x5dfd76,{'appCodes':_0x8e76b8?[_0x8e76b8]:[],'env':_0x5b35af||_0x1f0a8c||_0x3d4898(0x138),'metadata':{'createdAt':new Date()[_0x3d4898(0x112)](),'version':_0x13a915}});writeConfigFile(_0x219d78,_0x837710),await generateSdkConfigFile(a219_0x443141[_0x3d4898(0x12a)](_0x3df843,DEFAULT_API_DIR),getSdkClientRoutingConfig()),writeProjectDomainRoutingManifest(_0x3df843),_0x8e76b8?console['log'](_0x3d4898(0x10d)+Object['keys'](_0x837710[_0x3d4898(0x13d)]||{})[_0x3d4898(0x12a)](',\x20')+'\x20|\x20Default:\x20implicit\x20(single\x20app)'):console[_0x3d4898(0x133)](_0x3d4898(0x123)+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger['info'](_0x3d4898(0x144),'Configured\x20app\x20AppCode:\x20'+_0x8e76b8);}catch(_0x2948bd){logger[_0x3d4898(0xf1)](_0x3d4898(0x144),'Failed\x20to\x20configure\x20app\x20AppCode');throw _0x2948bd;}}
|
|
1
|
+
(function(_0x45c2d6,_0x2b40e4){const _0x538fdf=a219_0x2d31,_0x1fa9c2=_0x45c2d6();while(!![]){try{const _0x17ea95=-parseInt(_0x538fdf(0xed))/0x1+-parseInt(_0x538fdf(0xdf))/0x2+parseInt(_0x538fdf(0x11e))/0x3+parseInt(_0x538fdf(0xdb))/0x4*(-parseInt(_0x538fdf(0xee))/0x5)+-parseInt(_0x538fdf(0xff))/0x6+-parseInt(_0x538fdf(0xf5))/0x7+parseInt(_0x538fdf(0x100))/0x8;if(_0x17ea95===_0x2b40e4)break;else _0x1fa9c2['push'](_0x1fa9c2['shift']());}catch(_0xa6033b){_0x1fa9c2['push'](_0x1fa9c2['shift']());}}}(a219_0x42f9,0xdb6cb));import a219_0xf3a2c4 from'path';import a219_0x594e4a from'fs';import a219_0x525178 from'chalk';import a219_0x2607b9 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';function a219_0x2d31(_0x3776d5,_0x57213a){_0x3776d5=_0x3776d5-0xca;const _0x42f9cd=a219_0x42f9();let _0x2d3196=_0x42f9cd[_0x3776d5];return _0x2d3196;}import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';function a219_0x42f9(){const _0xdc42db=['Unable\x20to\x20prepare\x20the\x20current\x20directory\x20workspace','string','create','Verifying\x20project\x20template','Project\x20name:\x20','ino','3399qPqLEd','451320uJxeoE','appCode','repeat','Downloading\x20project\x20template','🚀\x20Next\x20Steps:','.rabetbase-create-','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20','3193260nvdBDm','The\x20current\x20directory\x20changed\x20during\x20project\x20creation.','cwd','production','*\x20Pulling\x20API\x20configuration...','Project\x20creation\x20failed:\x20','cyan','cookie','existsSync','mkdtempSync','3882192jwFiCf','28678296hcYrXU','stringify','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','downloading','Project\x20template\x20ready','projectName','version','success','\x20|\x20AppCode:\x20','nonInteractive','The\x20current\x20directory\x20must\x20be\x20empty.','setLogPath','basename','constants','warn','project','package.json','templateSource','Project\x20created:\x20','√\x20Pulled\x20','Project\x20directory\x20','error','name','Install\x20dependencies','Failed\x20to\x20clean\x20up\x20project\x20directory:\x20','resolve','bold','belowMinimum','join','modelCount','2751447LrXtXZ','√\x20package.json\x20updated:\x20name=','dirname','Resolving\x20project\x20template','keys','!\x20Project\x20created,\x20but\x20local\x20logging\x20could\x20not\x20be\x20initialized:\x20','text','\x20run\x20start','copying','\x20api\x20pull\x20--force\x20--yes','message','gray','projectCode','readdirSync','renameSync','API\x20configuration\x20pulled:\x20','Copying\x20local\x20template\x20source','...','1.0.0','accessSync','needsUpgrade','writeFileSync','description','Failed\x20to\x20update\x20package.json','rmSync','Current\x20directory\x20identity\x20changed\x20during\x20project\x20creation','env','info','\x20&&\x20','√\x20Configuration\x20file\x20created,\x20Apps:\x20','parse','extracting','dev','\x20model(s)','currentVersion','\x20|\x20Default:\x20implicit\x20(single\x20app)','cd\x20','\x20\x201.\x20Start\x20project:\x20','chdir','toLocaleString','Extracting\x20project\x20template','fail','green','Skip\x20cleanup:\x20project\x20directory\x20ownership\x20changed:\x20','W_OK','currentDir','stableVersion','length','log','\x20Generated\x20by\x20rabetbase\x20cli\x20','36OjdcuO','verifying','utf8','Remove\x20the\x20new\x20files\x20and\x20retry\x20from\x20an\x20empty\x20directory.','3368372yKsAYp','validation','start','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','CLI\x20version\x20check','apps','Format\x20code','\x20dataset(s),\x20generated\x20'];a219_0x42f9=function(){return _0xdc42db;};return a219_0x42f9();}import{loadRawConfigLayers,writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';import{validateProjectName}from'../../../commands/project/create/project-name.js';import{getRuntimeDomain,getSdkClientRoutingConfig}from'../../../constant/domain.js';import{generateSdkConfigFile}from'../../../api/generate-sdk-config-file.js';import{writeProjectDomainRoutingManifest}from'../../../config/project-domain-routing.js';import{CliErrors}from'../../../errors.js';function readDirectoryIdentity(_0x594fb2){const _0x57fa09=a219_0x2d31;try{const _0x4953cf=a219_0x594e4a['lstatSync'](_0x594fb2);if(!_0x4953cf['isDirectory']())return null;return{'dev':_0x4953cf['dev'],'ino':_0x4953cf[_0x57fa09(0xec)]};}catch{return null;}}function isSameDirectory(_0x12e2e0,_0x44e93e){const _0x868db7=a219_0x2d31;return!!_0x12e2e0&&!!_0x44e93e&&_0x12e2e0['dev']===_0x44e93e['dev']&&_0x12e2e0[_0x868db7(0xec)]===_0x44e93e['ino'];}function commitCurrentDirectoryProject(_0x50fbfd,_0x211717,_0x53c908){const _0x10bb6b=a219_0x2d31;if(!isSameDirectory(readDirectoryIdentity(_0x50fbfd),_0x53c908))throw new Error(_0x10bb6b(0x137));const _0x26ad74=a219_0xf3a2c4['basename'](_0x211717),_0x7333c8=a219_0x594e4a[_0x10bb6b(0x12b)](_0x50fbfd);if(_0x7333c8[_0x10bb6b(0xd8)]!==0x1||_0x7333c8[0x0]!==_0x26ad74)throw CliErrors[_0x10bb6b(0xe0)](_0x10bb6b(0xf6),_0x10bb6b(0xde));const _0x4d5500=a219_0xf3a2c4[_0x10bb6b(0x11c)](_0x211717,_0x10bb6b(0x10f)),_0x36bfdb=[];try{for(const _0x273e89 of a219_0x594e4a[_0x10bb6b(0x12b)](_0x4d5500)){a219_0x594e4a[_0x10bb6b(0x12c)](a219_0xf3a2c4[_0x10bb6b(0x11c)](_0x4d5500,_0x273e89),a219_0xf3a2c4[_0x10bb6b(0x11c)](_0x50fbfd,_0x273e89)),_0x36bfdb['push'](_0x273e89);}a219_0x594e4a[_0x10bb6b(0x136)](_0x211717,{'recursive':!![],'force':!![]});}catch(_0x2dfa18){for(const _0x52931b of _0x36bfdb['reverse']()){const _0x1062ac=a219_0xf3a2c4[_0x10bb6b(0x11c)](_0x50fbfd,_0x52931b);if(!a219_0x594e4a[_0x10bb6b(0xfd)](_0x1062ac))continue;a219_0x594e4a[_0x10bb6b(0x12c)](_0x1062ac,a219_0xf3a2c4[_0x10bb6b(0x11c)](_0x4d5500,_0x52931b));}throw _0x2dfa18;}}export async function createApp(_0x5d9bad){const _0x54a36c=a219_0x2d31,_0x1e2f54=await checkCliVersion();(_0x1e2f54[_0x54a36c(0x132)]||_0x1e2f54[_0x54a36c(0x11b)])&&(printCliUpgradeWarning(_0x1e2f54),assertCliVersionSupported(_0x1e2f54),logger[_0x54a36c(0x139)](_0x54a36c(0xe9),_0x54a36c(0xe3),{'currentVersion':_0x1e2f54[_0x54a36c(0xcb)],'stableVersion':_0x1e2f54[_0x54a36c(0xd7)],'minimumVersion':_0x1e2f54['minimumVersion'],'needsUpgrade':_0x1e2f54[_0x54a36c(0x132)],'belowMinimum':_0x1e2f54[_0x54a36c(0x11b)]}));const _0xa66884=_0x5d9bad['currentDir']?a219_0xf3a2c4[_0x54a36c(0x10c)](process[_0x54a36c(0xf7)]()):_0x5d9bad[_0x54a36c(0x12a)];if(_0xa66884&&(_0x5d9bad[_0x54a36c(0xef)]||_0x5d9bad[_0x54a36c(0x109)]))await runCreate({'projectName':_0xa66884,'appCode':_0x5d9bad[_0x54a36c(0xef)],'env':_0x5d9bad[_0x54a36c(0x138)]},_0x5d9bad);else{if(_0xa66884){const _0x4c61f3=await selectSingleAppcode(_0x5d9bad[_0x54a36c(0xfc)]);await runCreate({'projectName':_0xa66884,'appCode':_0x4c61f3||undefined,'env':_0x5d9bad[_0x54a36c(0x138)]},_0x5d9bad);}else await guidedCreateProject(_0x5e5baa=>runCreate(_0x5e5baa,_0x5d9bad),_0x5d9bad[_0x54a36c(0x138)],_0x5d9bad[_0x54a36c(0xfc)]);}}async function runCreate(_0x33ba98,_0x2836b8){const _0x2a6844=a219_0x2d31;_0x33ba98[_0x2a6844(0x105)]=validateProjectName(_0x33ba98['projectName']);const _0x9a56e2=_0x2836b8['currentDir']?process[_0x2a6844(0xf7)]():a219_0xf3a2c4[_0x2a6844(0x119)](process[_0x2a6844(0xf7)](),_0x33ba98['projectName']);if(_0x2836b8[_0x2a6844(0xd6)]){if(a219_0x594e4a[_0x2a6844(0x12b)](_0x9a56e2)[_0x2a6844(0xd8)]>0x0)throw CliErrors[_0x2a6844(0xe0)](_0x2a6844(0x10a),'Remove\x20or\x20move\x20the\x20existing\x20files,\x20then\x20retry\x20with\x20--current-dir.');}else{if(a219_0x594e4a[_0x2a6844(0xfd)](_0x9a56e2))throw new Error(_0x2a6844(0x114)+_0x33ba98[_0x2a6844(0x105)]+'\x20already\x20exists');}let _0x542fd5=null;const _0xd313d3=_0x2836b8[_0x2a6844(0xd6)]?readDirectoryIdentity(_0x9a56e2):null;let _0x542e67=null;try{a219_0x594e4a[_0x2a6844(0x131)](a219_0xf3a2c4[_0x2a6844(0x120)](_0x9a56e2),a219_0x594e4a[_0x2a6844(0x10d)][_0x2a6844(0xd5)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x2a6844(0x139)]('create','Starting\x20project\x20creation:\x20'+_0x33ba98[_0x2a6844(0x105)],{'projectDir':_0x9a56e2,'appCode':_0x33ba98['appCode']}),console[_0x2a6844(0xd9)](),console[_0x2a6844(0xd9)](a219_0x525178[_0x2a6844(0xd3)]('\x20√\x20')+_0x2a6844(0xeb)+a219_0x525178[_0x2a6844(0xd3)](_0x33ba98[_0x2a6844(0x105)])+(_0x33ba98['appCode']?_0x2a6844(0x108)+a219_0x525178[_0x2a6844(0xfb)](_0x33ba98['appCode']):''));try{let _0x3687a8=_0x33ba98[_0x2a6844(0x105)];_0x2836b8[_0x2a6844(0xd6)]&&(_0x542e67=a219_0x594e4a[_0x2a6844(0xfe)](a219_0xf3a2c4['join'](_0x9a56e2,_0x2a6844(0xf3))),_0x3687a8=a219_0xf3a2c4['relative'](process[_0x2a6844(0xf7)](),a219_0xf3a2c4['join'](_0x542e67,'project')));const _0xeb606d=a219_0xf3a2c4[_0x2a6844(0x119)](process[_0x2a6844(0xf7)](),_0x3687a8);await runTask(_0x2a6844(0x121),_0x93e04e=>copyProjectTemplate(_0x3687a8,_0x2f0d17=>_0x93e04e(projectTemplateStageLabel(_0x2f0d17)),_0x2836b8[_0x2a6844(0x111)]),_0x2a6844(0x104)),_0x542fd5=_0x2836b8[_0x2a6844(0xd6)]?null:readDirectoryIdentity(_0x9a56e2);if(!_0x2836b8['currentDir']&&!_0x542fd5)throw new Error('Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory');await updatePackageJsonName(_0x3687a8,_0x33ba98[_0x2a6844(0x105)]),await runTask(_0x2a6844(0x117),()=>installDependencies(_0x3687a8)),await runTask(_0x2a6844(0xe5),()=>formatProjectCode(_0x3687a8)),await configureAppCode(_0x3687a8,_0x33ba98['projectName'],_0x33ba98['appCode']||'',_0x33ba98[_0x2a6844(0x138)]);let _0x20c74e=![];if(_0x33ba98[_0x2a6844(0xef)]){console[_0x2a6844(0xd9)](_0x2a6844(0xf9));const _0x2f1c8a=process[_0x2a6844(0xf7)]();try{process[_0x2a6844(0xcf)](_0xeb606d);const _0x3af90a=_0x33ba98[_0x2a6844(0x138)]||_0x2a6844(0xf8);initEnv(_0x3af90a);const {configArray:_0x1abcd0}=await fetchModelList(_0x33ba98[_0x2a6844(0xef)],_0x2836b8['cookie']||''),_0x57616c=DEFAULT_API_DIR,_0x58679b=await generateApiFile(_0x1abcd0,'',_0x33ba98['appCode'],!![],_0x3af90a,_0x57616c,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':!![],'modelProfile':{'name':_0x33ba98[_0x2a6844(0xef)],'defaultName':_0x33ba98['appCode'],'runtimeDomain':getRuntimeDomain()}});console[_0x2a6844(0xd9)](_0x2a6844(0x113)+_0x1abcd0['length']+_0x2a6844(0xe6)+_0x58679b[_0x2a6844(0x11d)]+_0x2a6844(0xca)),logger[_0x2a6844(0x139)]('create',_0x2a6844(0x12d)+_0x33ba98[_0x2a6844(0xef)]);}catch(_0x146680){_0x20c74e=!![],console[_0x2a6844(0xd9)](_0x2a6844(0xf4)+CLI_BIN_NAME+'\x20api\x20pull\x20--force\x20--yes'),logger[_0x2a6844(0x10e)](_0x2a6844(0xe9),'API\x20configuration\x20pull\x20failed',{'error':_0x146680 instanceof Error?_0x146680['message']:String(_0x146680)});}finally{process[_0x2a6844(0xcf)](_0x2f1c8a);}}if(_0x2836b8['currentDir']){if(!_0x542e67||!_0xd313d3)throw new Error(_0x2a6844(0xe7));commitCurrentDirectoryProject(_0x9a56e2,_0x542e67,_0xd313d3),_0x542e67=null;}try{logger[_0x2a6844(0x10b)](_0x9a56e2),logger[_0x2a6844(0x107)]('create',_0x2a6844(0x112)+_0x33ba98[_0x2a6844(0x105)]);}catch(_0x433976){console[_0x2a6844(0x10e)](_0x2a6844(0x123)+(_0x433976 instanceof Error?_0x433976['message']:String(_0x433976)));}console[_0x2a6844(0xd9)](),console['log'](a219_0x525178[_0x2a6844(0xd3)]('─'[_0x2a6844(0xf0)](0x3c))),console['log'](a219_0x525178['cyan'][_0x2a6844(0x11a)](_0x2a6844(0xf2))),console[_0x2a6844(0xd9)]();const _0x199348=_0x2836b8['currentDir']?CLI_BIN_NAME+_0x2a6844(0x125):_0x2a6844(0xcd)+_0x33ba98['projectName']+_0x2a6844(0x13a)+CLI_BIN_NAME+_0x2a6844(0x125);console[_0x2a6844(0xd9)](_0x2a6844(0xce)+a219_0x525178[_0x2a6844(0xfb)]['bold'](_0x199348)),_0x20c74e&&console[_0x2a6844(0xd9)]('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a219_0x525178['cyan'][_0x2a6844(0x11a)](CLI_BIN_NAME+_0x2a6844(0x127))),console[_0x2a6844(0xd9)](a219_0x525178[_0x2a6844(0xd3)]('─'['repeat'](0x3c)));}catch(_0x2561ec){logger['error'](_0x2a6844(0xe9),_0x2a6844(0xfa)+_0x33ba98[_0x2a6844(0x105)],{'error':_0x2561ec instanceof Error?_0x2561ec[_0x2a6844(0x128)]:String(_0x2561ec)});try{const _0x3a0776=readDirectoryIdentity(_0x9a56e2);if(_0x2836b8['currentDir']&&_0x542e67)a219_0x594e4a[_0x2a6844(0x136)](_0x542e67,{'recursive':!![],'force':!![]});else{if(_0x542fd5&&_0x3a0776?.['dev']===_0x542fd5[_0x2a6844(0x13e)]&&_0x3a0776[_0x2a6844(0xec)]===_0x542fd5[_0x2a6844(0xec)])console[_0x2a6844(0xd9)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0x9a56e2),a219_0x594e4a[_0x2a6844(0x136)](_0x9a56e2,{'recursive':!![],'force':!![]});else _0x3a0776&&logger[_0x2a6844(0x10e)]('create',_0x2a6844(0xd4)+_0x9a56e2);}}catch{logger[_0x2a6844(0x10e)]('create',_0x2a6844(0x118)+_0x9a56e2);}throw _0x2561ec;}}async function runTask(_0x219ca3,_0x44702c,_0x55ac33=_0x219ca3){const _0x227d66=a219_0x2d31,_0x40432c=a219_0x2607b9(_0x219ca3+'...')[_0x227d66(0xe1)]();try{const _0x174b62=await _0x44702c(_0x1955bc=>{const _0x44320f=_0x227d66;_0x40432c[_0x44320f(0x124)]=_0x1955bc+_0x44320f(0x12f);});_0x40432c['stop'](),console['log'](''+a219_0x525178[_0x227d66(0xd3)]('\x20√\x20')+_0x55ac33+'\x20'+a219_0x525178[_0x227d66(0x129)]('['+_0x174b62+']'));}catch(_0x431294){_0x40432c[_0x227d66(0xd2)](_0x219ca3);throw _0x431294;}}function projectTemplateStageLabel(_0x444cc2){const _0x4ed7a6=a219_0x2d31;switch(_0x444cc2){case'resolving':return _0x4ed7a6(0x121);case _0x4ed7a6(0x103):return _0x4ed7a6(0xf1);case _0x4ed7a6(0xdc):return _0x4ed7a6(0xea);case _0x4ed7a6(0x13d):return _0x4ed7a6(0xd1);case _0x4ed7a6(0x126):return _0x4ed7a6(0x12e);}}async function updatePackageJsonName(_0xa75f3,_0x36533f){const _0x42ed3b=a219_0x2d31,_0x51a10d=a219_0xf3a2c4[_0x42ed3b(0x119)](process[_0x42ed3b(0xf7)](),_0xa75f3),_0x39d01d=a219_0xf3a2c4[_0x42ed3b(0x11c)](_0x51a10d,_0x42ed3b(0x110));try{console[_0x42ed3b(0xd9)](_0x42ed3b(0x102));const _0x453fb9=getRabetbaseCliPackageRoot(),_0x4476a4=a219_0xf3a2c4[_0x42ed3b(0x11c)](_0x453fb9,_0x42ed3b(0x110));let _0x123e33=_0x42ed3b(0x130);try{const _0x266a62=JSON[_0x42ed3b(0x13c)](a219_0x594e4a['readFileSync'](_0x4476a4,_0x42ed3b(0xdd)));_0x123e33=_0x266a62[_0x42ed3b(0x106)]||_0x42ed3b(0x130);}catch{}const _0x41b208=a219_0x594e4a['readFileSync'](_0x39d01d,_0x42ed3b(0xdd)),_0xbab85f=JSON[_0x42ed3b(0x13c)](_0x41b208);_0xbab85f[_0x42ed3b(0x116)]=_0x36533f,_0xbab85f[_0x42ed3b(0x134)]=_0x36533f+_0x42ed3b(0xda)+_0x123e33,a219_0x594e4a[_0x42ed3b(0x133)](_0x39d01d,JSON[_0x42ed3b(0x101)](_0xbab85f,null,0x2)+'\x0a',_0x42ed3b(0xdd)),console[_0x42ed3b(0xd9)](_0x42ed3b(0x11f)+_0x36533f),logger[_0x42ed3b(0x139)](_0x42ed3b(0xe9),'Updating\x20package.json\x20name');}catch(_0x48dad3){logger[_0x42ed3b(0x115)](_0x42ed3b(0xe9),_0x42ed3b(0x135));throw _0x48dad3;}}async function configureAppCode(_0x5b79d,_0x2b2f8a,_0x335ed5,_0x538104){const _0xdf991e=a219_0x2d31,_0x2144eb=a219_0xf3a2c4[_0xdf991e(0x119)](process[_0xdf991e(0xf7)](),_0x5b79d),_0xef0c32=a219_0xf3a2c4['join'](_0x2144eb,NEW_CONFIG_NAME);try{_0x335ed5?console['log']('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x2b2f8a+':\x20'+_0x335ed5):console['log']('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x2b2f8a);const _0x2b50f1=getRabetbaseCliPackageRoot(),_0x472650=a219_0xf3a2c4['join'](_0x2b50f1,_0xdf991e(0x110));let _0x3a8e53=_0xdf991e(0x130);try{const _0x15b586=JSON[_0xdf991e(0x13c)](a219_0x594e4a['readFileSync'](_0x472650,_0xdf991e(0xdd)));_0x3a8e53=_0x15b586['version']||_0xdf991e(0x130);}catch{}const {globalConfig:_0x2f2cf4}=loadRawConfigLayers(),_0x3a5e4f=typeof _0x2f2cf4[_0xdf991e(0x138)]===_0xdf991e(0xe8)?_0x2f2cf4['env']:undefined,_0x2c3ea4={};for(const _0xf3e273 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x2f2cf4[_0xf3e273]!=null)_0x2c3ea4[_0xf3e273]=_0x2f2cf4[_0xf3e273];}const _0x3201ed=buildCanonicalProjectConfig(_0x2c3ea4,{'appCodes':_0x335ed5?[_0x335ed5]:[],'env':_0x538104||_0x3a5e4f||_0xdf991e(0xf8),'metadata':{'createdAt':new Date()[_0xdf991e(0xd0)](),'version':_0x3a8e53}});writeConfigFile(_0xef0c32,_0x3201ed),await generateSdkConfigFile(a219_0xf3a2c4['join'](_0x2144eb,DEFAULT_API_DIR),getSdkClientRoutingConfig()),writeProjectDomainRoutingManifest(_0x2144eb),_0x335ed5?console[_0xdf991e(0xd9)](_0xdf991e(0x13b)+Object[_0xdf991e(0x122)](_0x3201ed[_0xdf991e(0xe4)]||{})[_0xdf991e(0x11c)](',\x20')+_0xdf991e(0xcc)):console[_0xdf991e(0xd9)](_0xdf991e(0xe2)+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger[_0xdf991e(0x139)](_0xdf991e(0xe9),'Configured\x20app\x20AppCode:\x20'+_0x335ed5);}catch(_0x2111dc){logger[_0xdf991e(0x115)](_0xdf991e(0xe9),'Failed\x20to\x20configure\x20app\x20AppCode');throw _0x2111dc;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a220_0x2d64ca=a220_0x23dd;(function(_0x4a6613,_0x848e8e){const _0x2c5522=a220_0x23dd,_0x56092d=_0x4a6613();while(!![]){try{const _0x5a59d5=-parseInt(_0x2c5522(0x178))/0x1+parseInt(_0x2c5522(0x109))/0x2+parseInt(_0x2c5522(0x175))/0x3+parseInt(_0x2c5522(0x143))/0x4+parseInt(_0x2c5522(0x161))/0x5+-parseInt(_0x2c5522(0x128))/0x6*(-parseInt(_0x2c5522(0x164))/0x7)+parseInt(_0x2c5522(0x16d))/0x8*(-parseInt(_0x2c5522(0x11b))/0x9);if(_0x5a59d5===_0x848e8e)break;else _0x56092d['push'](_0x56092d['shift']());}catch(_0x17df1a){_0x56092d['push'](_0x56092d['shift']());}}}(a220_0x2383,0x61e29));import{createHash}from'node:crypto';import a220_0x2c31ba from'node:fs/promises';import a220_0x4b6a86 from'node:path';import a220_0x39edbe from'semver';import{getProjectTemplateRelativeUrl}from'../../../constant/cdn.js';function a220_0x2383(){const _0x4e522f=['isDirectory','test','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','error','content-length','arrayBuffer','copyFile','valid','isAbsolute','pathname','sha256','.rabetbase.json','dist','ENOENT','copying','protocol','https:','Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20','Project\x20directory\x20already\x20exists:\x20','sub-app-react-demo','code','beta','2966925ncEEDh','isFile','Local\x20template\x20source\x20does\x20not\x20exist:\x20','245KRMjwS','length','join','readdir','dirname','byteLength','includes','startsWith','Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.','8fAdGwM','assetBaseUrl','application/zip','validation','origin','readFile','template.zip','access','633849botxDm','.rabetbase','object','528252QWruiy','local','posix','rename','cancel','Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.','project','package.json','394420mUrXoQ','message','status','resolve','Use\x20a\x20different\x20project\x20name.','isSymbolicLink','mkdir','.git','ino','mkdtemp','digest','name','.lovrabet.json','size','.env','cdn','node_modules','concat','8081253jHnrPp','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','.env.example','basename','sha256:','read','sep','Check\x20the\x20source\x20directory\x20and\x20retry.','release','.rabetbase-create-','abort','Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.','from','12522ERlkIn','Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.','parse',',\x20received\x20','CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20','headers','CDN\x20project\x20template\x20relative\x20URL\x20must\x20match\x20its\x20release\x20channel\x20or\x20version.','href','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','update','Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20','number','utf8','body','version','legacyAssetBaseUrl','extracting','url','push','mode','dev','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','config','.idea','.codegraph','Unable\x20to\x20claim\x20the\x20project\x20directory.','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','3008732YAMhRj','toLowerCase','writeFile','lstat','.DS_Store','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','.lovrabet.log','Invalid\x20local\x20template\x20source:\x20'];a220_0x2383=function(){return _0x4e522f;};return a220_0x2383();}import{extractProjectTemplateArchive}from'../../../commands/project/create/project-template-archive.js';import{fetchProjectTemplateCdnConfig,isBetaCliVersion,resolveProjectTemplateDescriptor}from'../../../utils/cli-version-policy.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';const TEMPLATE_ID=a220_0x2d64ca(0x15e),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x405e95){return typeof _0x405e95==='string'&&_0x405e95['trim']()?_0x405e95['trim']():null;}function parseDescriptor(_0x2cad2e){const _0xb727c3=a220_0x2d64ca;if(!_0x2cad2e||typeof _0x2cad2e!==_0xb727c3(0x177))throw new Error(_0xb727c3(0x11c)+TEMPLATE_ID+'\x22.');const _0x41be35=_0x2cad2e,_0x5af189=nonEmptyString(_0x41be35['version']),_0x5859a0=nonEmptyString(_0x41be35['name']),_0xd8ae3=_0x41be35[_0xb727c3(0x139)]===undefined?undefined:nonEmptyString(_0x41be35[_0xb727c3(0x139)])||undefined,_0x464317=nonEmptyString(_0x41be35['sha256'])?.[_0xb727c3(0x144)](),_0x5cb044=_0x41be35['size'];if(!_0x5af189||!a220_0x39edbe[_0xb727c3(0x152)](_0x5af189)||!_0x5859a0||_0x5859a0!==a220_0x4b6a86[_0xb727c3(0x17a)][_0xb727c3(0x11e)](_0x5859a0)||_0x5859a0[_0xb727c3(0x16a)]('\x5c')||_0x41be35[_0xb727c3(0x139)]!==undefined&&!_0xd8ae3||!_0x464317||!/^sha256:[a-f0-9]{64}$/[_0xb727c3(0x14c)](_0x464317)||typeof _0x5cb044!==_0xb727c3(0x133)||!Number['isSafeInteger'](_0x5cb044)||_0x5cb044<=0x0||_0x5cb044>MAX_ARCHIVE_SIZE)throw new Error(_0xb727c3(0x130)+TEMPLATE_ID+'\x22.');return{'version':_0x5af189,'name':_0x5859a0,'url':_0xd8ae3,'sha256':_0x464317,'size':_0x5cb044};}async function fetchWithTimeout(_0x30e49,_0x33e376,_0xaa357b,_0x4d6708){const _0x4bd55b=a220_0x2d64ca,_0xbe32be=new AbortController(),_0x33b30f=setTimeout(()=>_0xbe32be[_0x4bd55b(0x125)](),_0x33e376);try{const _0x2e2718=await fetch(_0x30e49,{'headers':{'Accept':_0xaa357b},'redirect':_0x4bd55b(0x14e),'signal':_0xbe32be['signal']});return await _0x4d6708(_0x2e2718);}finally{clearTimeout(_0x33b30f);}}async function fetchTemplateDescriptor(){const _0x23f273=a220_0x2d64ca,_0x34864e=getCliVersion(),_0x46138e=isBetaCliVersion(_0x34864e)?_0x23f273(0x160):_0x23f273(0x123),_0x4ce81c=await fetchProjectTemplateCdnConfig();if(!_0x4ce81c)throw new Error('Rabetbase\x20CDN\x20config\x20is\x20unavailable.');const _0x3d60be=parseDescriptor(resolveProjectTemplateDescriptor(_0x4ce81c[_0x23f273(0x13e)],_0x34864e));return{'descriptor':_0x3d60be,'channel':_0x46138e,'assetBaseUrl':_0x4ce81c[_0x23f273(0x16e)],'legacyAssetBaseUrl':_0x4ce81c[_0x23f273(0x137)]};}function resolveArchiveUrl(_0x5ec95b,_0x14abd7,_0x38785b,_0x52b104){const _0x206f26=a220_0x2d64ca,_0xadf571=new URL(_0x38785b+'/'),_0x59b053=[getProjectTemplateRelativeUrl(_0x14abd7),getProjectTemplateRelativeUrl(_0x14abd7,_0x5ec95b[_0x206f26(0x136)])];if(_0x5ec95b[_0x206f26(0x139)]&&!_0x59b053['includes'](_0x5ec95b['url']))throw new Error(_0x206f26(0x12e));const _0x5b300d=new URL(_0x52b104+'/'),_0x1e8d0c=_0x5ec95b['url']?new URL(_0x5ec95b[_0x206f26(0x139)],_0xadf571[_0x206f26(0x171)]):new URL(_0x5ec95b[_0x206f26(0x114)],_0x5b300d),_0x2b8f38=_0x5ec95b[_0x206f26(0x139)]?_0xadf571['origin']:_0x5b300d[_0x206f26(0x171)];if(_0x1e8d0c[_0x206f26(0x15a)]!==_0x206f26(0x15b)||_0x1e8d0c[_0x206f26(0x171)]!==_0x2b8f38||a220_0x4b6a86[_0x206f26(0x17a)]['basename'](decodeURIComponent(_0x1e8d0c[_0x206f26(0x154)]))!==_0x5ec95b[_0x206f26(0x114)]||!_0x5ec95b[_0x206f26(0x139)]&&!_0x1e8d0c[_0x206f26(0x154)][_0x206f26(0x16b)](_0x5b300d[_0x206f26(0x154)]))throw new Error(_0x206f26(0x148));return _0x1e8d0c[_0x206f26(0x12f)];}async function readResponseBytes(_0x3bf5fb,_0x132c2c){const _0x40330c=a220_0x2d64ca;if(!_0x3bf5fb[_0x40330c(0x135)]){const _0x1c9979=Buffer[_0x40330c(0x127)](await _0x3bf5fb[_0x40330c(0x150)]());if(_0x1c9979['length']>_0x132c2c)throw new Error(_0x40330c(0x14d));return _0x1c9979;}const _0x4cbcd4=_0x3bf5fb[_0x40330c(0x135)]['getReader'](),_0xbdf90c=[];let _0x35ee90=0x0;try{while(!![]){const {done:_0x2c0bf6,value:_0x515beb}=await _0x4cbcd4[_0x40330c(0x120)]();if(_0x2c0bf6)break;_0x35ee90+=_0x515beb[_0x40330c(0x169)];if(_0x35ee90>_0x132c2c){await _0x4cbcd4[_0x40330c(0x17c)]();throw new Error('CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.');}_0xbdf90c[_0x40330c(0x13a)](Buffer[_0x40330c(0x127)](_0x515beb));}}finally{_0x4cbcd4['releaseLock']();}return Buffer[_0x40330c(0x11a)](_0xbdf90c,_0x35ee90);}async function downloadArchive(_0x319f65,_0x3042c6,_0xeba155,_0x19c5d9,_0x31ade3,_0x2683c9){const _0x17a07c=a220_0x2d64ca,_0x22775d=await fetchWithTimeout(resolveArchiveUrl(_0x319f65,_0x3042c6,_0xeba155,_0x19c5d9),ARCHIVE_TIMEOUT_MS,_0x17a07c(0x16f),async _0x90398=>{const _0x738dae=_0x17a07c;if(!_0x90398['ok'])throw new Error(_0x738dae(0x12c)+_0x90398[_0x738dae(0x10b)]+'.');const _0x5ecffe=Number(_0x90398[_0x738dae(0x12d)]['get'](_0x738dae(0x14f)));if(Number['isFinite'](_0x5ecffe)&&_0x5ecffe>MAX_ARCHIVE_SIZE)throw new Error(_0x738dae(0x142));return readResponseBytes(_0x90398,_0x319f65['size']);});if(_0x22775d[_0x17a07c(0x165)]!==_0x319f65[_0x17a07c(0x116)])throw new Error('CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20'+_0x319f65[_0x17a07c(0x116)]+_0x17a07c(0x12b)+_0x22775d[_0x17a07c(0x165)]+'.');_0x2683c9?.('verifying');const _0x4aa963=_0x17a07c(0x11f)+createHash(_0x17a07c(0x155))[_0x17a07c(0x131)](_0x22775d)[_0x17a07c(0x113)]('hex');if(_0x4aa963!==_0x319f65[_0x17a07c(0x155)])throw new Error('CDN\x20project\x20template\x20checksum\x20verification\x20failed.');await a220_0x2c31ba[_0x17a07c(0x145)](_0x31ade3,_0x22775d,{'flag':'wx'});}async function assertTemplateRoot(_0x61f7d9){const _0x99f3d7=a220_0x2d64ca,_0x57c1e8=a220_0x4b6a86[_0x99f3d7(0x166)](_0x61f7d9,'package.json'),_0x36aadd=JSON[_0x99f3d7(0x12a)](await a220_0x2c31ba[_0x99f3d7(0x172)](_0x57c1e8,_0x99f3d7(0x134)));if(!_0x36aadd||typeof _0x36aadd!==_0x99f3d7(0x177))throw new Error('Project\x20template\x20package.json\x20is\x20invalid.');}function a220_0x23dd(_0x45309f,_0x473eb7){_0x45309f=_0x45309f-0x106;const _0x238340=a220_0x2383();let _0x23dd98=_0x238340[_0x45309f];return _0x23dd98;}const LOCAL_FORBIDDEN_NAMES=new Set([a220_0x2d64ca(0x147),a220_0x2d64ca(0x140),a220_0x2d64ca(0x110),a220_0x2d64ca(0x13f),a220_0x2d64ca(0x115),a220_0x2d64ca(0x149),a220_0x2d64ca(0x176),a220_0x2d64ca(0x156),a220_0x2d64ca(0x157),a220_0x2d64ca(0x119)]);function isForbiddenTemplateEntry(_0x413320){const _0x2afc66=a220_0x2d64ca;if(LOCAL_FORBIDDEN_NAMES['has'](_0x413320))return!![];return _0x413320===_0x2afc66(0x117)||_0x413320[_0x2afc66(0x16b)]('.env.')&&_0x413320!==_0x2afc66(0x11d);}function containsPath(_0x268f57,_0x410d80){const _0x251e57=a220_0x2d64ca,_0x1c4178=a220_0x4b6a86['relative'](_0x268f57,_0x410d80);return _0x1c4178===''||!_0x1c4178[_0x251e57(0x16b)]('..'+a220_0x4b6a86[_0x251e57(0x121)])&&_0x1c4178!=='..'&&!a220_0x4b6a86[_0x251e57(0x153)](_0x1c4178);}async function copyLocalTemplateDirectory(_0x1ab1b5,_0xa14abf){const _0x1845f6=a220_0x2d64ca;await a220_0x2c31ba[_0x1845f6(0x10f)](_0xa14abf,{'recursive':!![]});for(const _0x340115 of await a220_0x2c31ba[_0x1845f6(0x167)](_0x1ab1b5,{'withFileTypes':!![]})){const _0x368d8f=a220_0x4b6a86[_0x1845f6(0x166)](_0x1ab1b5,_0x340115[_0x1845f6(0x114)]),_0x1f9996=a220_0x4b6a86[_0x1845f6(0x166)](_0xa14abf,_0x340115[_0x1845f6(0x114)]);if(isForbiddenTemplateEntry(_0x340115[_0x1845f6(0x114)]))throw new Error(_0x1845f6(0x15c)+_0x368d8f);const _0x2de648=await a220_0x2c31ba[_0x1845f6(0x146)](_0x368d8f);if(_0x2de648[_0x1845f6(0x10e)]())throw new Error('Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20'+_0x368d8f);if(_0x2de648[_0x1845f6(0x14b)]()){await copyLocalTemplateDirectory(_0x368d8f,_0x1f9996);continue;}if(!_0x2de648[_0x1845f6(0x162)]())continue;await a220_0x2c31ba[_0x1845f6(0x151)](_0x368d8f,_0x1f9996),await a220_0x2c31ba['chmod'](_0x1f9996,_0x2de648[_0x1845f6(0x13b)]&0x1ff);}}async function readTemplateVersion(_0x3572ac){const _0x44d74c=a220_0x2d64ca,_0x363ef8=JSON['parse'](await a220_0x2c31ba[_0x44d74c(0x172)](a220_0x4b6a86[_0x44d74c(0x166)](_0x3572ac,_0x44d74c(0x108)),_0x44d74c(0x134)));return nonEmptyString(_0x363ef8[_0x44d74c(0x136)])||_0x44d74c(0x179);}async function readDirectoryIdentity(_0x4ddb97){const _0x59950a=a220_0x2d64ca;try{const _0x3ec24d=await a220_0x2c31ba[_0x59950a(0x146)](_0x4ddb97);if(!_0x3ec24d[_0x59950a(0x14b)]())return null;return{'dev':_0x3ec24d['dev'],'ino':_0x3ec24d['ino']};}catch{return null;}}async function commitStagedProject(_0x39cb06,_0x20104d){const _0x2a07d4=a220_0x2d64ca;await a220_0x2c31ba[_0x2a07d4(0x10f)](_0x20104d);const _0x55e908=await readDirectoryIdentity(_0x20104d);if(!_0x55e908)throw new Error(_0x2a07d4(0x141));try{for(const _0x377d6d of await a220_0x2c31ba[_0x2a07d4(0x167)](_0x39cb06)){await a220_0x2c31ba[_0x2a07d4(0x17b)](a220_0x4b6a86[_0x2a07d4(0x166)](_0x39cb06,_0x377d6d),a220_0x4b6a86['join'](_0x20104d,_0x377d6d));}}catch(_0x31eedc){const _0x1353cf=await readDirectoryIdentity(_0x20104d);_0x1353cf?.['dev']===_0x55e908[_0x2a07d4(0x13c)]&&_0x1353cf[_0x2a07d4(0x111)]===_0x55e908[_0x2a07d4(0x111)]&&await a220_0x2c31ba['rm'](_0x20104d,{'recursive':!![],'force':!![]});throw _0x31eedc;}}export async function materializeProjectTemplate(_0x2fcd94,_0x14c5e6){const _0x2c549d=a220_0x2d64ca,_0x3fbe86=a220_0x4b6a86['resolve'](_0x2fcd94),_0x950490=a220_0x4b6a86[_0x2c549d(0x168)](_0x3fbe86);try{await a220_0x2c31ba[_0x2c549d(0x146)](_0x3fbe86);throw new Error(_0x2c549d(0x15d)+_0x3fbe86);}catch(_0x531082){if(_0x531082[_0x2c549d(0x15f)]!==_0x2c549d(0x158))throw _0x531082;}const _0x9a81c6=await a220_0x2c31ba[_0x2c549d(0x112)](a220_0x4b6a86[_0x2c549d(0x166)](_0x950490,_0x2c549d(0x124))),_0x1ce856=a220_0x4b6a86[_0x2c549d(0x166)](_0x9a81c6,_0x2c549d(0x107)),_0x2639be=a220_0x4b6a86[_0x2c549d(0x166)](_0x9a81c6,_0x2c549d(0x173));try{try{_0x14c5e6?.('resolving');const {descriptor:_0x27cd21,channel:_0x4f8220,assetBaseUrl:_0x2fe7a2,legacyAssetBaseUrl:_0x5eecfa}=await fetchTemplateDescriptor();return _0x14c5e6?.('downloading'),await downloadArchive(_0x27cd21,_0x4f8220,_0x2fe7a2,_0x5eecfa,_0x2639be,_0x14c5e6),_0x14c5e6?.(_0x2c549d(0x138)),await extractProjectTemplateArchive(_0x2639be,_0x1ce856),await assertTemplateRoot(_0x1ce856),await commitStagedProject(_0x1ce856,_0x3fbe86),{'source':_0x2c549d(0x118),'version':_0x27cd21['version']};}catch(_0x26956b){if(_0x26956b[_0x2c549d(0x15f)]==='EEXIST')throw CliErrors['validation'](_0x2c549d(0x15d)+_0x3fbe86,_0x2c549d(0x10d));const _0x2b7e28=_0x26956b instanceof Error?_0x26956b[_0x2c549d(0x10a)]:String(_0x26956b);throw CliErrors[_0x2c549d(0x170)]('Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.',_0x2c549d(0x13d)+_0x2b7e28);}}finally{await a220_0x2c31ba['rm'](_0x9a81c6,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x444f0b,_0x20529f,_0x2c0b65){const _0x315570=a220_0x2d64ca;let _0x8f8e8e;try{_0x8f8e8e=await a220_0x2c31ba['realpath'](a220_0x4b6a86[_0x315570(0x10c)](_0x444f0b));}catch{throw CliErrors['validation'](_0x315570(0x163)+a220_0x4b6a86[_0x315570(0x10c)](_0x444f0b),_0x315570(0x106));}const _0x5bda1e=await a220_0x2c31ba[_0x315570(0x146)](_0x8f8e8e);if(!_0x5bda1e[_0x315570(0x14b)]())throw CliErrors[_0x315570(0x170)](_0x315570(0x132)+_0x8f8e8e);const _0x3b06ca=a220_0x4b6a86[_0x315570(0x10c)](_0x20529f),_0x1c57f2=await a220_0x2c31ba['realpath'](a220_0x4b6a86[_0x315570(0x168)](_0x3b06ca)),_0x7c95ad=a220_0x4b6a86[_0x315570(0x166)](_0x1c57f2,a220_0x4b6a86[_0x315570(0x11e)](_0x3b06ca));if(containsPath(_0x8f8e8e,_0x7c95ad)||containsPath(_0x7c95ad,_0x8f8e8e))throw CliErrors[_0x315570(0x170)](_0x315570(0x126),_0x315570(0x129));try{await a220_0x2c31ba[_0x315570(0x146)](_0x7c95ad);throw CliErrors[_0x315570(0x170)](_0x315570(0x15d)+_0x7c95ad,_0x315570(0x16c));}catch(_0x28d902){if(_0x28d902[_0x315570(0x15f)]!==_0x315570(0x158))throw _0x28d902;}const _0x181d0a=a220_0x4b6a86[_0x315570(0x168)](_0x7c95ad);await a220_0x2c31ba[_0x315570(0x174)](_0x181d0a);const _0x366017=await a220_0x2c31ba[_0x315570(0x112)](a220_0x4b6a86[_0x315570(0x166)](_0x181d0a,'.rabetbase-create-')),_0x2c8d25=a220_0x4b6a86[_0x315570(0x166)](_0x366017,_0x315570(0x107));try{_0x2c0b65?.(_0x315570(0x159)),await copyLocalTemplateDirectory(_0x8f8e8e,_0x2c8d25),await assertTemplateRoot(_0x2c8d25);const _0x19f29d=await readTemplateVersion(_0x2c8d25);return await commitStagedProject(_0x2c8d25,_0x7c95ad),{'source':_0x315570(0x179),'version':_0x19f29d};}catch(_0x1af3e4){const _0x48bca5=_0x1af3e4 instanceof Error?_0x1af3e4['message']:String(_0x1af3e4);throw CliErrors[_0x315570(0x170)](_0x315570(0x14a)+_0x48bca5,_0x315570(0x122));}finally{await a220_0x2c31ba['rm'](_0x366017,{'recursive':!![],'force':!![]});}}
|
|
1
|
+
const a220_0x537eb5=a220_0x3f41;(function(_0x26997f,_0x438160){const _0x7144e4=a220_0x3f41,_0x187ef4=_0x26997f();while(!![]){try{const _0x4e5d33=-parseInt(_0x7144e4(0x7d))/0x1*(-parseInt(_0x7144e4(0xdc))/0x2)+-parseInt(_0x7144e4(0xc9))/0x3+-parseInt(_0x7144e4(0x87))/0x4+-parseInt(_0x7144e4(0xc5))/0x5*(-parseInt(_0x7144e4(0xa2))/0x6)+parseInt(_0x7144e4(0x83))/0x7*(parseInt(_0x7144e4(0xa6))/0x8)+parseInt(_0x7144e4(0x78))/0x9+-parseInt(_0x7144e4(0xcc))/0xa*(parseInt(_0x7144e4(0xc3))/0xb);if(_0x4e5d33===_0x438160)break;else _0x187ef4['push'](_0x187ef4['shift']());}catch(_0x13f819){_0x187ef4['push'](_0x187ef4['shift']());}}}(a220_0x4376,0x59578));import{createHash}from'node:crypto';import a220_0x30ed82 from'node:fs/promises';import a220_0x55437f from'node:path';import a220_0xd44f5a from'semver';import{getProjectTemplateRelativeUrl}from'../../../constant/cdn.js';import{extractProjectTemplateArchive}from'../../../commands/project/create/project-template-archive.js';import{fetchProjectTemplateCdnConfig,isBetaCliVersion,resolveProjectTemplateDescriptor}from'../../../utils/cli-version-policy.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';function a220_0x4376(){const _0x556a88=['object','.idea','14619XNwQom','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','245NRlKbm','getReader','basename','rename','877962xvPRlX','Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20','chmod','5650ovlJme','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','cancel','assetBaseUrl','downloading','isSafeInteger','verifying','.DS_Store','number','Project\x20directory\x20already\x20exists:\x20','mkdir','access','byteLength','package.json','join','isDirectory','86exFmVM','parse','posix','.codegraph','releaseLock','ino','code','hex','Invalid\x20local\x20template\x20source:\x20','extracting','Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.','isAbsolute','update','https:','from','realpath','readFile','project','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','toLowerCase','600759GiKifr','digest','push','body','release','16155eCMYeP','.lovrabet.log','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','arrayBuffer','.rabetbase.json','has','1909817JPfVPG','ENOENT','pathname','CDN\x20project\x20template\x20relative\x20URL\x20must\x20match\x20its\x20release\x20channel\x20or\x20version.','849488kwFYBb','mkdtemp','cdn','content-length','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','headers','protocol','Rabetbase\x20CDN\x20config\x20is\x20unavailable.','origin','CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20','trim','sha256:','Use\x20a\x20different\x20project\x20name.','.env.','get','.git','relative','string','resolve','legacyAssetBaseUrl','Local\x20template\x20source\x20does\x20not\x20exist:\x20','Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.','copyFile','signal','valid','.rabetbase','error','71952hcxHua','includes','message','dev','8NQgjlZ','startsWith','readdir','Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.','size','Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.','Unable\x20to\x20claim\x20the\x20project\x20directory.','url','lstat','local','validation','name','length','isFinite','.lovrabet.json','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','application/zip','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','version','sep','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','sha256','utf8','copying','dirname','mode','beta'];a220_0x4376=function(){return _0x556a88;};return a220_0x4376();}const TEMPLATE_ID='sub-app-react-demo',ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x4f3b00){const _0xad7ad7=a220_0x3f41;return typeof _0x4f3b00===_0xad7ad7(0x98)&&_0x4f3b00[_0xad7ad7(0x91)]()?_0x4f3b00[_0xad7ad7(0x91)]():null;}function parseDescriptor(_0xa661d){const _0x49dbb7=a220_0x3f41;if(!_0xa661d||typeof _0xa661d!==_0x49dbb7(0xc1))throw new Error(_0x49dbb7(0x76)+TEMPLATE_ID+'\x22.');const _0x4f630e=_0xa661d,_0x3fbd41=nonEmptyString(_0x4f630e[_0x49dbb7(0xb8)]),_0x6a0ff0=nonEmptyString(_0x4f630e[_0x49dbb7(0xb1)]),_0x291ba0=_0x4f630e['url']===undefined?undefined:nonEmptyString(_0x4f630e[_0x49dbb7(0xad)])||undefined,_0x480de7=nonEmptyString(_0x4f630e[_0x49dbb7(0xbb)])?.[_0x49dbb7(0x77)](),_0xb50651=_0x4f630e[_0x49dbb7(0xaa)];if(!_0x3fbd41||!a220_0xd44f5a[_0x49dbb7(0x9f)](_0x3fbd41)||!_0x6a0ff0||_0x6a0ff0!==a220_0x55437f[_0x49dbb7(0xde)]['basename'](_0x6a0ff0)||_0x6a0ff0[_0x49dbb7(0xa3)]('\x5c')||_0x4f630e[_0x49dbb7(0xad)]!==undefined&&!_0x291ba0||!_0x480de7||!/^sha256:[a-f0-9]{64}$/['test'](_0x480de7)||typeof _0xb50651!==_0x49dbb7(0xd4)||!Number[_0x49dbb7(0xd1)](_0xb50651)||_0xb50651<=0x0||_0xb50651>MAX_ARCHIVE_SIZE)throw new Error('CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22'+TEMPLATE_ID+'\x22.');return{'version':_0x3fbd41,'name':_0x6a0ff0,'url':_0x291ba0,'sha256':_0x480de7,'size':_0xb50651};}async function fetchWithTimeout(_0xb9d850,_0x53d6b4,_0x4167a7,_0x1fdd6a){const _0x134348=a220_0x3f41,_0x1c554d=new AbortController(),_0x22713b=setTimeout(()=>_0x1c554d['abort'](),_0x53d6b4);try{const _0x13009a=await fetch(_0xb9d850,{'headers':{'Accept':_0x4167a7},'redirect':_0x134348(0xa1),'signal':_0x1c554d[_0x134348(0x9e)]});return await _0x1fdd6a(_0x13009a);}finally{clearTimeout(_0x22713b);}}function a220_0x3f41(_0x2c02aa,_0x489303){_0x2c02aa=_0x2c02aa-0x68;const _0x437649=a220_0x4376();let _0x3f41b1=_0x437649[_0x2c02aa];return _0x3f41b1;}async function fetchTemplateDescriptor(){const _0x4ec27e=a220_0x3f41,_0x22bc0f=getCliVersion(),_0x3886ea=isBetaCliVersion(_0x22bc0f)?_0x4ec27e(0xc0):_0x4ec27e(0x7c),_0x442413=await fetchProjectTemplateCdnConfig();if(!_0x442413)throw new Error(_0x4ec27e(0x8e));const _0x5cd1b9=parseDescriptor(resolveProjectTemplateDescriptor(_0x442413['config'],_0x22bc0f));return{'descriptor':_0x5cd1b9,'channel':_0x3886ea,'assetBaseUrl':_0x442413[_0x4ec27e(0xcf)],'legacyAssetBaseUrl':_0x442413[_0x4ec27e(0x9a)]};}function resolveArchiveUrl(_0x2e60f7,_0x2537dd,_0x4be42b,_0x29acd8){const _0x4cb137=a220_0x3f41,_0x225ca5=new URL(_0x4be42b+'/'),_0xb7eb34=[getProjectTemplateRelativeUrl(_0x2537dd),getProjectTemplateRelativeUrl(_0x2537dd,_0x2e60f7['version'])];if(_0x2e60f7[_0x4cb137(0xad)]&&!_0xb7eb34[_0x4cb137(0xa3)](_0x2e60f7[_0x4cb137(0xad)]))throw new Error(_0x4cb137(0x86));const _0x12232f=new URL(_0x29acd8+'/'),_0x342fc2=_0x2e60f7[_0x4cb137(0xad)]?new URL(_0x2e60f7[_0x4cb137(0xad)],_0x225ca5[_0x4cb137(0x8f)]):new URL(_0x2e60f7[_0x4cb137(0xb1)],_0x12232f),_0x3d7978=_0x2e60f7['url']?_0x225ca5['origin']:_0x12232f[_0x4cb137(0x8f)];if(_0x342fc2[_0x4cb137(0x8d)]!==_0x4cb137(0x71)||_0x342fc2[_0x4cb137(0x8f)]!==_0x3d7978||a220_0x55437f[_0x4cb137(0xde)][_0x4cb137(0xc7)](decodeURIComponent(_0x342fc2['pathname']))!==_0x2e60f7[_0x4cb137(0xb1)]||!_0x2e60f7[_0x4cb137(0xad)]&&!_0x342fc2[_0x4cb137(0x85)][_0x4cb137(0xa7)](_0x12232f[_0x4cb137(0x85)]))throw new Error(_0x4cb137(0x7f));return _0x342fc2['href'];}async function readResponseBytes(_0x39ad16,_0x4c0fa5){const _0x38e1a2=a220_0x3f41;if(!_0x39ad16[_0x38e1a2(0x7b)]){const _0x143629=Buffer[_0x38e1a2(0x72)](await _0x39ad16[_0x38e1a2(0x80)]());if(_0x143629[_0x38e1a2(0xb2)]>_0x4c0fa5)throw new Error(_0x38e1a2(0xba));return _0x143629;}const _0x2e573d=_0x39ad16[_0x38e1a2(0x7b)][_0x38e1a2(0xc6)](),_0xbc305f=[];let _0x1b09ad=0x0;try{while(!![]){const {done:_0x513baa,value:_0x16a823}=await _0x2e573d['read']();if(_0x513baa)break;_0x1b09ad+=_0x16a823[_0x38e1a2(0xd8)];if(_0x1b09ad>_0x4c0fa5){await _0x2e573d[_0x38e1a2(0xce)]();throw new Error('CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.');}_0xbc305f[_0x38e1a2(0x7a)](Buffer[_0x38e1a2(0x72)](_0x16a823));}}finally{_0x2e573d[_0x38e1a2(0x68)]();}return Buffer['concat'](_0xbc305f,_0x1b09ad);}async function downloadArchive(_0x2bf947,_0x752d19,_0x3f9c71,_0x3edaf9,_0x776fbc,_0xf0dbe6){const _0x56c9ee=a220_0x3f41,_0x27ea49=await fetchWithTimeout(resolveArchiveUrl(_0x2bf947,_0x752d19,_0x3f9c71,_0x3edaf9),ARCHIVE_TIMEOUT_MS,_0x56c9ee(0xb6),async _0x1ca8e1=>{const _0x59dfea=_0x56c9ee;if(!_0x1ca8e1['ok'])throw new Error(_0x59dfea(0x90)+_0x1ca8e1['status']+'.');const _0xca79eb=Number(_0x1ca8e1[_0x59dfea(0x8c)][_0x59dfea(0x95)](_0x59dfea(0x8a)));if(Number[_0x59dfea(0xb3)](_0xca79eb)&&_0xca79eb>MAX_ARCHIVE_SIZE)throw new Error(_0x59dfea(0x8b));return readResponseBytes(_0x1ca8e1,_0x2bf947[_0x59dfea(0xaa)]);});if(_0x27ea49['length']!==_0x2bf947[_0x56c9ee(0xaa)])throw new Error(_0x56c9ee(0xc4)+_0x2bf947[_0x56c9ee(0xaa)]+',\x20received\x20'+_0x27ea49['length']+'.');_0xf0dbe6?.(_0x56c9ee(0xd2));const _0x45ed42=_0x56c9ee(0x92)+createHash(_0x56c9ee(0xbb))[_0x56c9ee(0x70)](_0x27ea49)[_0x56c9ee(0x79)](_0x56c9ee(0x6b));if(_0x45ed42!==_0x2bf947[_0x56c9ee(0xbb)])throw new Error(_0x56c9ee(0xb5));await a220_0x30ed82['writeFile'](_0x776fbc,_0x27ea49,{'flag':'wx'});}async function assertTemplateRoot(_0x122b46){const _0x31b22d=a220_0x3f41,_0x5b3460=a220_0x55437f[_0x31b22d(0xda)](_0x122b46,'package.json'),_0x38b800=JSON[_0x31b22d(0xdd)](await a220_0x30ed82[_0x31b22d(0x74)](_0x5b3460,_0x31b22d(0xbc)));if(!_0x38b800||typeof _0x38b800!==_0x31b22d(0xc1))throw new Error('Project\x20template\x20package.json\x20is\x20invalid.');}const LOCAL_FORBIDDEN_NAMES=new Set([a220_0x537eb5(0xd3),a220_0x537eb5(0xdf),a220_0x537eb5(0x96),a220_0x537eb5(0xc2),a220_0x537eb5(0xb4),a220_0x537eb5(0x7e),a220_0x537eb5(0xa0),a220_0x537eb5(0x81),'dist','node_modules']);function isForbiddenTemplateEntry(_0x18c47b){const _0x544377=a220_0x537eb5;if(LOCAL_FORBIDDEN_NAMES[_0x544377(0x82)](_0x18c47b))return!![];return _0x18c47b==='.env'||_0x18c47b[_0x544377(0xa7)](_0x544377(0x94))&&_0x18c47b!=='.env.example';}function containsPath(_0x3717e7,_0x41bd75){const _0x2848da=a220_0x537eb5,_0x3561a1=a220_0x55437f[_0x2848da(0x97)](_0x3717e7,_0x41bd75);return _0x3561a1===''||!_0x3561a1[_0x2848da(0xa7)]('..'+a220_0x55437f[_0x2848da(0xb9)])&&_0x3561a1!=='..'&&!a220_0x55437f[_0x2848da(0x6f)](_0x3561a1);}async function copyLocalTemplateDirectory(_0x1c9980,_0x534b6d){const _0x3beff5=a220_0x537eb5;await a220_0x30ed82[_0x3beff5(0xd6)](_0x534b6d,{'recursive':!![]});for(const _0x3545a8 of await a220_0x30ed82[_0x3beff5(0xa8)](_0x1c9980,{'withFileTypes':!![]})){const _0x115b35=a220_0x55437f[_0x3beff5(0xda)](_0x1c9980,_0x3545a8['name']),_0x1fac2c=a220_0x55437f['join'](_0x534b6d,_0x3545a8['name']);if(isForbiddenTemplateEntry(_0x3545a8['name']))throw new Error('Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20'+_0x115b35);const _0x1fe935=await a220_0x30ed82[_0x3beff5(0xae)](_0x115b35);if(_0x1fe935['isSymbolicLink']())throw new Error(_0x3beff5(0xca)+_0x115b35);if(_0x1fe935[_0x3beff5(0xdb)]()){await copyLocalTemplateDirectory(_0x115b35,_0x1fac2c);continue;}if(!_0x1fe935['isFile']())continue;await a220_0x30ed82[_0x3beff5(0x9d)](_0x115b35,_0x1fac2c),await a220_0x30ed82[_0x3beff5(0xcb)](_0x1fac2c,_0x1fe935[_0x3beff5(0xbf)]&0x1ff);}}async function readTemplateVersion(_0x77bd65){const _0x54b8e9=a220_0x537eb5,_0x449beb=JSON[_0x54b8e9(0xdd)](await a220_0x30ed82['readFile'](a220_0x55437f[_0x54b8e9(0xda)](_0x77bd65,_0x54b8e9(0xd9)),_0x54b8e9(0xbc)));return nonEmptyString(_0x449beb[_0x54b8e9(0xb8)])||_0x54b8e9(0xaf);}async function readDirectoryIdentity(_0x50c11f){const _0x52e530=a220_0x537eb5;try{const _0x5104d6=await a220_0x30ed82[_0x52e530(0xae)](_0x50c11f);if(!_0x5104d6[_0x52e530(0xdb)]())return null;return{'dev':_0x5104d6['dev'],'ino':_0x5104d6[_0x52e530(0x69)]};}catch{return null;}}async function commitStagedProject(_0x402866,_0xedf96f){const _0xc180cb=a220_0x537eb5;await a220_0x30ed82[_0xc180cb(0xd6)](_0xedf96f);const _0x9bdda=await readDirectoryIdentity(_0xedf96f);if(!_0x9bdda)throw new Error(_0xc180cb(0xac));try{for(const _0x52dde7 of await a220_0x30ed82[_0xc180cb(0xa8)](_0x402866)){await a220_0x30ed82[_0xc180cb(0xc8)](a220_0x55437f[_0xc180cb(0xda)](_0x402866,_0x52dde7),a220_0x55437f['join'](_0xedf96f,_0x52dde7));}}catch(_0x5f503f){const _0x159ba3=await readDirectoryIdentity(_0xedf96f);_0x159ba3?.[_0xc180cb(0xa5)]===_0x9bdda[_0xc180cb(0xa5)]&&_0x159ba3[_0xc180cb(0x69)]===_0x9bdda[_0xc180cb(0x69)]&&await a220_0x30ed82['rm'](_0xedf96f,{'recursive':!![],'force':!![]});throw _0x5f503f;}}export async function materializeProjectTemplate(_0x128027,_0x190026){const _0x5937f1=a220_0x537eb5,_0x530e57=a220_0x55437f['resolve'](_0x128027),_0x2df0e4=a220_0x55437f[_0x5937f1(0xbe)](_0x530e57);try{await a220_0x30ed82['lstat'](_0x530e57);throw new Error(_0x5937f1(0xd5)+_0x530e57);}catch(_0x407837){if(_0x407837['code']!=='ENOENT')throw _0x407837;}const _0x98e575=await a220_0x30ed82[_0x5937f1(0x88)](a220_0x55437f['join'](_0x2df0e4,'.rabetbase-create-')),_0x3ea49a=a220_0x55437f[_0x5937f1(0xda)](_0x98e575,_0x5937f1(0x75)),_0x3b2549=a220_0x55437f[_0x5937f1(0xda)](_0x98e575,'template.zip');try{try{_0x190026?.('resolving');const {descriptor:_0x4c8959,channel:_0x564f69,assetBaseUrl:_0x5b51c1,legacyAssetBaseUrl:_0x2b4a24}=await fetchTemplateDescriptor();return _0x190026?.(_0x5937f1(0xd0)),await downloadArchive(_0x4c8959,_0x564f69,_0x5b51c1,_0x2b4a24,_0x3b2549,_0x190026),_0x190026?.(_0x5937f1(0x6d)),await extractProjectTemplateArchive(_0x3b2549,_0x3ea49a),await assertTemplateRoot(_0x3ea49a),await commitStagedProject(_0x3ea49a,_0x530e57),{'source':_0x5937f1(0x89),'version':_0x4c8959[_0x5937f1(0xb8)]};}catch(_0x2a7978){if(_0x2a7978[_0x5937f1(0x6a)]==='EEXIST')throw CliErrors[_0x5937f1(0xb0)](_0x5937f1(0xd5)+_0x530e57,_0x5937f1(0x93));const _0x42b3eb=_0x2a7978 instanceof Error?_0x2a7978[_0x5937f1(0xa4)]:String(_0x2a7978);throw CliErrors['validation'](_0x5937f1(0xb7),_0x5937f1(0xcd)+_0x42b3eb);}}finally{await a220_0x30ed82['rm'](_0x98e575,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x17c446,_0x797bb5,_0x39c45e){const _0x5b881b=a220_0x537eb5;let _0x6b8f34;try{_0x6b8f34=await a220_0x30ed82[_0x5b881b(0x73)](a220_0x55437f[_0x5b881b(0x99)](_0x17c446));}catch{throw CliErrors[_0x5b881b(0xb0)](_0x5b881b(0x9b)+a220_0x55437f['resolve'](_0x17c446),_0x5b881b(0xa9));}const _0x357f37=await a220_0x30ed82['lstat'](_0x6b8f34);if(!_0x357f37[_0x5b881b(0xdb)]())throw CliErrors[_0x5b881b(0xb0)]('Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20'+_0x6b8f34);const _0xc05c23=a220_0x55437f[_0x5b881b(0x99)](_0x797bb5),_0x387b5e=await a220_0x30ed82[_0x5b881b(0x73)](a220_0x55437f[_0x5b881b(0xbe)](_0xc05c23)),_0x38a92d=a220_0x55437f['join'](_0x387b5e,a220_0x55437f[_0x5b881b(0xc7)](_0xc05c23));if(containsPath(_0x6b8f34,_0x38a92d)||containsPath(_0x38a92d,_0x6b8f34))throw CliErrors['validation'](_0x5b881b(0x9c),_0x5b881b(0xab));try{await a220_0x30ed82[_0x5b881b(0xae)](_0x38a92d);throw CliErrors[_0x5b881b(0xb0)](_0x5b881b(0xd5)+_0x38a92d,_0x5b881b(0x6e));}catch(_0x1769c8){if(_0x1769c8['code']!==_0x5b881b(0x84))throw _0x1769c8;}const _0x5ee01f=a220_0x55437f[_0x5b881b(0xbe)](_0x38a92d);await a220_0x30ed82[_0x5b881b(0xd7)](_0x5ee01f);const _0x25dabf=await a220_0x30ed82['mkdtemp'](a220_0x55437f[_0x5b881b(0xda)](_0x5ee01f,'.rabetbase-create-')),_0x32cb8c=a220_0x55437f['join'](_0x25dabf,_0x5b881b(0x75));try{_0x39c45e?.(_0x5b881b(0xbd)),await copyLocalTemplateDirectory(_0x6b8f34,_0x32cb8c),await assertTemplateRoot(_0x32cb8c);const _0x1cb061=await readTemplateVersion(_0x32cb8c);return await commitStagedProject(_0x32cb8c,_0x38a92d),{'source':_0x5b881b(0xaf),'version':_0x1cb061};}catch(_0x2baf78){const _0xcf4883=_0x2baf78 instanceof Error?_0x2baf78['message']:String(_0x2baf78);throw CliErrors[_0x5b881b(0xb0)](_0x5b881b(0x6c)+_0xcf4883,'Check\x20the\x20source\x20directory\x20and\x20retry.');}finally{await a220_0x30ed82['rm'](_0x25dabf,{'recursive':!![],'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51a187,_0x33a58a){const _0xcb8f2e=a221_0x5e13,_0x33363c=_0x51a187();while(!![]){try{const _0x1b6da0=parseInt(_0xcb8f2e(0xd1))/0x1+parseInt(_0xcb8f2e(0xca))/0x2+parseInt(_0xcb8f2e(0xc6))/0x3*(-parseInt(_0xcb8f2e(0xc1))/0x4)+-parseInt(_0xcb8f2e(0xc2))/0x5+parseInt(_0xcb8f2e(0xd0))/0x6+-parseInt(_0xcb8f2e(0xcd))/0x7+-parseInt(_0xcb8f2e(0xcb))/0x8*(-parseInt(_0xcb8f2e(0xc4))/0x9);if(_0x1b6da0===_0x33a58a)break;else _0x33363c['push'](_0x33363c['shift']());}catch(_0x280c4d){_0x33363c['push'](_0x33363c['shift']());}}}(a221_0x832b,0x7d6d4));function a221_0x5e13(_0x2423e8,_0x4da56e){_0x2423e8=_0x2423e8-0xc0;const _0x832b2a=a221_0x832b();let _0x5e1398=_0x832b2a[_0x2423e8];return _0x5e1398;}import{CliErrors}from'../../../errors.js';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;function a221_0x832b(){const _0x434dac=['8UVFhuD','Project\x20name\x20cannot\x20exceed\x20','4753980UVuPrz','Project\x20name\x20cannot\x20be\x20empty','Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.','2918838jCftwE','562812nejhvZ','trim','1007516TVPruu','977980UyXOdA','validation','4617324AeCVVB','test','6MDEWyL','Project\x20name\x20\x22','\x22\x20is\x20reserved\x20on\x20Windows','length','659842BovgQP'];a221_0x832b=function(){return _0x434dac;};return a221_0x832b();}export function getProjectNameValidationError(_0x2e96c1){const _0x35f861=a221_0x5e13,_0x5e2e2f=_0x2e96c1[_0x35f861(0xc0)]();if(!_0x5e2e2f)return _0x35f861(0xce);if(_0x5e2e2f[_0x35f861(0xc9)]>MAX_PROJECT_NAME_LENGTH)return _0x35f861(0xcc)+MAX_PROJECT_NAME_LENGTH+'\x20characters';if(!PROJECT_NAME_PATTERN[_0x35f861(0xc5)](_0x5e2e2f))return'Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_';if(WINDOWS_RESERVED_NAME['test'](_0x5e2e2f))return _0x35f861(0xc7)+_0x5e2e2f+_0x35f861(0xc8);return null;}export function validateProjectName(_0x3a3e75){const _0x3868f4=a221_0x5e13,_0x13f38f=_0x3a3e75[_0x3868f4(0xc0)](),_0x22b087=getProjectNameValidationError(_0x13f38f);if(_0x22b087)throw CliErrors[_0x3868f4(0xc3)](_0x22b087,_0x3868f4(0xcf));return _0x13f38f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1e53c7,_0x51834f){const _0xc530c1=a222_0x3b53,_0x3c78d5=_0x1e53c7();while(!![]){try{const _0x4f38ff=parseInt(_0xc530c1(0xc7))/0x1+parseInt(_0xc530c1(0xbc))/0x2+parseInt(_0xc530c1(0xc9))/0x3+parseInt(_0xc530c1(0xd3))/0x4+parseInt(_0xc530c1(0xd7))/0x5*(parseInt(_0xc530c1(0xc4))/0x6)+parseInt(_0xc530c1(0xcd))/0x7+parseInt(_0xc530c1(0xd8))/0x8*(-parseInt(_0xc530c1(0xc1))/0x9);if(_0x4f38ff===_0x51834f)break;else _0x3c78d5['push'](_0x3c78d5['shift']());}catch(_0x53d858){_0x3c78d5['push'](_0x3c78d5['shift']());}}}(a222_0xf166,0x8c844));import{createWriteStream}from'node:fs';import a222_0x30ec9e from'node:fs/promises';import a222_0x1114a9 from'node:path';function a222_0xf166(){const _0x1bad97=['uncompressedSize','test','mkdir','externalFileAttributes','startsWith','has','Case-conflicting\x20ZIP\x20entry\x20path:\x20','join','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','800000lotclu','get','slice','Project\x20template\x20ZIP\x20exceeds\x20','error','720xVxpka','endsWith','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','294666iAwvkm','split','Unable\x20to\x20read\x20ZIP\x20entry:\x20','413573RWamcv','set','2209494MMSUjA','sep','readEntry','\x20entries.','2144079kSQrxL','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','once','en-US','resolve','length','1027228BIGFUs','toLocaleLowerCase','replace','fileName','55WySYVf','207784tqfXJO','catch','end','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20'];a222_0xf166=function(){return _0x1bad97;};return a222_0xf166();}import{pipeline}from'node:stream/promises';import a222_0x5d4747 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(_0x47f368){return new Promise((_0xd0a8e3,_0xfd7e10)=>{a222_0x5d4747['open'](_0x47f368,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x31bb4d,_0x4922e8)=>{if(_0x31bb4d||!_0x4922e8){_0xfd7e10(_0x31bb4d||new Error('Unable\x20to\x20open\x20project\x20template\x20archive.'));return;}_0xd0a8e3(_0x4922e8);});});}function openEntryStream(_0xa49fe1,_0x1ec46e){return new Promise((_0x59050a,_0x1f383f)=>{_0xa49fe1['openReadStream'](_0x1ec46e,(_0x1d8e30,_0x78c2e)=>{const _0x37d07f=a222_0x3b53;if(_0x1d8e30||!_0x78c2e){_0x1f383f(_0x1d8e30||new Error(_0x37d07f(0xc6)+_0x1ec46e[_0x37d07f(0xd6)]));return;}_0x59050a(_0x78c2e);});});}function a222_0x3b53(_0x46b7b7,_0x163ab6){_0x46b7b7=_0x46b7b7-0xbb;const _0xf16638=a222_0xf166();let _0x3b5309=_0xf16638[_0x46b7b7];return _0x3b5309;}function validateEntryPath(_0x209399){const _0x2b03b1=a222_0x3b53,_0x52347b=_0x209399[_0x2b03b1(0xd5)](/\\/g,'/'),_0x46a902=_0x52347b[_0x2b03b1(0xc2)]('/'),_0x15b142=_0x46a902?_0x52347b[_0x2b03b1(0xbe)](0x0,-0x1):_0x52347b;if(!_0x15b142||_0x52347b[_0x2b03b1(0xe0)]('/')||/^[A-Za-z]:\//[_0x2b03b1(0xdd)](_0x52347b))throw new Error(_0x2b03b1(0xce)+_0x209399);const _0x2adf4b=_0x15b142[_0x2b03b1(0xc5)]('/');for(const _0x1486c8 of _0x2adf4b){if(!_0x1486c8||_0x1486c8==='.'||_0x1486c8==='..'||_0x1486c8[_0x2b03b1(0xc2)]('.')||_0x1486c8['endsWith']('\x20')||WINDOWS_INVALID_CHAR[_0x2b03b1(0xdd)](_0x1486c8)||WINDOWS_RESERVED_NAME[_0x2b03b1(0xdd)](_0x1486c8))throw new Error('Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20'+_0x209399);}return{'relativePath':_0x2adf4b[_0x2b03b1(0xe3)](a222_0x1114a9[_0x2b03b1(0xca)]),'directory':_0x46a902};}function isSymbolicLink(_0x6695ab){const _0x13fba8=a222_0x3b53,_0x40a7d9=_0x6695ab[_0x13fba8(0xdf)]>>>0x10&0xffff;return(_0x40a7d9&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x8ca51d,_0xc8ec5){const _0x7a4236=a222_0x3b53,_0x323e63=await openZip(_0x8ca51d),_0x1d5575=a222_0x1114a9[_0x7a4236(0xd1)](_0xc8ec5),_0x601bb4=new Set(),_0x5cff31=new Map();let _0x19bd9c=0x0,_0x454a3c=0x0;await a222_0x30ec9e['mkdir'](_0x1d5575,{'recursive':!![]}),await new Promise((_0x473ce5,_0x3eefe0)=>{const _0xfcf306=_0x7a4236;let _0x59d621=![];const _0x3afa37=_0x16ef67=>{if(_0x59d621)return;_0x59d621=!![],_0x323e63['close'](),_0x3eefe0(_0x16ef67 instanceof Error?_0x16ef67:new Error(String(_0x16ef67)));};_0x323e63[_0xfcf306(0xcf)](_0xfcf306(0xc0),_0x3afa37),_0x323e63[_0xfcf306(0xcf)](_0xfcf306(0xda),()=>{if(_0x59d621)return;_0x59d621=!![],_0x473ce5();}),_0x323e63['on']('entry',_0x3f8165=>{const _0x1a6810=_0xfcf306;void(async()=>{const _0x3d0a6e=a222_0x3b53;_0x19bd9c+=0x1,_0x454a3c+=_0x3f8165[_0x3d0a6e(0xdc)];if(_0x19bd9c>MAX_ENTRY_COUNT)throw new Error(_0x3d0a6e(0xbf)+MAX_ENTRY_COUNT+_0x3d0a6e(0xcc));if(_0x454a3c>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x3d0a6e(0xc3));if(_0x3f8165['isEncrypted']())throw new Error(_0x3d0a6e(0xbb)+_0x3f8165[_0x3d0a6e(0xd6)]);if(isSymbolicLink(_0x3f8165))throw new Error(_0x3d0a6e(0xdb)+_0x3f8165[_0x3d0a6e(0xd6)]);const {relativePath:_0xc18617,directory:_0x197d25}=validateEntryPath(_0x3f8165[_0x3d0a6e(0xd6)]),_0x5498f1=_0xc18617[_0x3d0a6e(0xc5)](a222_0x1114a9['sep']);for(let _0x4d827d=0x1;_0x4d827d<=_0x5498f1[_0x3d0a6e(0xd2)];_0x4d827d+=0x1){const _0x50eba3=_0x5498f1[_0x3d0a6e(0xbe)](0x0,_0x4d827d)[_0x3d0a6e(0xe3)](a222_0x1114a9[_0x3d0a6e(0xca)]),_0x562cab=_0x50eba3[_0x3d0a6e(0xd4)]('en-US'),_0x55a795=_0x5cff31[_0x3d0a6e(0xbd)](_0x562cab);if(_0x55a795&&_0x55a795!==_0x50eba3)throw new Error(_0x3d0a6e(0xe2)+_0x3f8165[_0x3d0a6e(0xd6)]);_0x5cff31[_0x3d0a6e(0xc8)](_0x562cab,_0x50eba3);}const _0x5b9e9d=_0xc18617[_0x3d0a6e(0xd4)](_0x3d0a6e(0xd0));if(_0x601bb4[_0x3d0a6e(0xe1)](_0x5b9e9d))throw new Error('Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20'+_0x3f8165['fileName']);_0x601bb4['add'](_0x5b9e9d);const _0x179fb1=a222_0x1114a9['resolve'](_0x1d5575,_0xc18617);if(_0x179fb1!==_0x1d5575&&!_0x179fb1[_0x3d0a6e(0xe0)](''+_0x1d5575+a222_0x1114a9[_0x3d0a6e(0xca)]))throw new Error('ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20'+_0x3f8165[_0x3d0a6e(0xd6)]);if(_0x197d25)await a222_0x30ec9e['mkdir'](_0x179fb1,{'recursive':!![]});else{await a222_0x30ec9e[_0x3d0a6e(0xde)](a222_0x1114a9['dirname'](_0x179fb1),{'recursive':!![]});const _0x3894dd=await openEntryStream(_0x323e63,_0x3f8165);await pipeline(_0x3894dd,createWriteStream(_0x179fb1,{'flags':'wx','mode':0x1a4}));}_0x323e63['readEntry']();})()[_0x1a6810(0xd9)](_0x3afa37);}),_0x323e63[_0xfcf306(0xcb)]();});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a223_0x45a377=a223_0x4ec4;function a223_0x60c9(){const _0xbc71e3=['1055787kGBCSh','4jIOpVW','5864090qEGaxh','4321vikiaK','580FNOxvJ','81zlPerY','5433946kAzExa','dirname','6439098rHArPC','../../../../','372ptLLNk','resolve','533434MHMpFI','32424hVdKnL'];a223_0x60c9=function(){return _0xbc71e3;};return a223_0x60c9();}(function(_0x594ecd,_0x195973){const _0x21b66f=a223_0x4ec4,_0x3cd62a=_0x594ecd();while(!![]){try{const _0x5c9089=parseInt(_0x21b66f(0x17d))/0x1*(parseInt(_0x21b66f(0x184))/0x2)+-parseInt(_0x21b66f(0x17a))/0x3+-parseInt(_0x21b66f(0x17b))/0x4*(-parseInt(_0x21b66f(0x17c))/0x5)+parseInt(_0x21b66f(0x182))/0x6+parseInt(_0x21b66f(0x180))/0x7+parseInt(_0x21b66f(0x179))/0x8*(-parseInt(_0x21b66f(0x17f))/0x9)+parseInt(_0x21b66f(0x17e))/0xa*(-parseInt(_0x21b66f(0x178))/0xb);if(_0x5c9089===_0x195973)break;else _0x3cd62a['push'](_0x3cd62a['shift']());}catch(_0x2727d5){_0x3cd62a['push'](_0x3cd62a['shift']());}}}(a223_0x60c9,0x9891f));function a223_0x4ec4(_0x835e33,_0x5727f7){_0x835e33=_0x835e33-0x177;const _0x60c94d=a223_0x60c9();let _0x4ec4c6=_0x60c94d[_0x835e33];return _0x4ec4c6;}import a223_0x5e2409 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a223_0x5e2409[a223_0x45a377(0x181)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x1eb9e4=a223_0x45a377;return a223_0x5e2409[_0x1eb9e4(0x177)](__dirname,_0x1eb9e4(0x183));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a224_0x5edf(_0x4ff580,_0xf00d4a){_0x4ff580=_0x4ff580-0x91;const _0x4b6fdf=a224_0x4b6f();let _0x5edff9=_0x4b6fdf[_0x4ff580];return _0x5edff9;}(function(_0x47a268,_0xe1f912){const _0x2853b7=a224_0x5edf,_0x4539db=_0x47a268();while(!![]){try{const _0x2b46ca=parseInt(_0x2853b7(0xa3))/0x1*(parseInt(_0x2853b7(0x9c))/0x2)+-parseInt(_0x2853b7(0xa1))/0x3*(parseInt(_0x2853b7(0xa2))/0x4)+-parseInt(_0x2853b7(0x9d))/0x5*(-parseInt(_0x2853b7(0x91))/0x6)+parseInt(_0x2853b7(0xa5))/0x7+-parseInt(_0x2853b7(0x98))/0x8+-parseInt(_0x2853b7(0x9f))/0x9*(-parseInt(_0x2853b7(0x9b))/0xa)+parseInt(_0x2853b7(0xa6))/0xb*(-parseInt(_0x2853b7(0xa4))/0xc);if(_0x2b46ca===_0xe1f912)break;else _0x4539db['push'](_0x4539db['shift']());}catch(_0xf36a0c){_0x4539db['push'](_0x4539db['shift']());}}}(a224_0x4b6f,0xb0876));function a224_0x4b6f(){const _0x417aff=['Starting\x20project\x20template\x20creation','9063goWVQe','version','1719nwGMdT','4388yQdCcp','377708MoYAbZ','60mYeLaY','3938291xlkmVo','3774331ZnZBxH','54EPNETd','cwd','now','Project\x20template\x20created','resolve','message','Failed\x20to\x20copy\x20project\x20template','2863064FdfehY','copy','source','13410HIyAOw','2pjaqwt','630235NzQjhI'];a224_0x4b6f=function(){return _0x417aff;};return a224_0x4b6f();}import a224_0x15df76 from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{materializeLocalProjectTemplate,materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';export async function copyProjectTemplate(_0x10db61,_0x5b66d2,_0x343fdd){const _0x5422db=a224_0x5edf,_0x3d9a62=Date[_0x5422db(0x93)](),_0x26e353=a224_0x15df76[_0x5422db(0x95)](process[_0x5422db(0x92)](),_0x10db61);try{logger['info'](_0x5422db(0x99),_0x5422db(0x9e),{'projectCode':_0x10db61});const _0x1fad30=_0x343fdd?await materializeLocalProjectTemplate(_0x343fdd,_0x26e353,_0x5b66d2):await materializeProjectTemplate(_0x26e353,_0x5b66d2),_0x247023=Date['now']()-_0x3d9a62;logger['success'](_0x5422db(0x99),_0x5422db(0x94),_0x247023,{'projectCode':_0x10db61,'templateSource':_0x1fad30[_0x5422db(0x9a)],'templateVersion':_0x1fad30[_0x5422db(0xa0)]});}catch(_0x3248f1){const _0x393e57=Date['now']()-_0x3d9a62;logger['error']('copy',_0x5422db(0x97),{'projectCode':_0x10db61,'error':_0x3248f1 instanceof Error?_0x3248f1[_0x5422db(0x96)]:String(_0x3248f1),'duration':_0x393e57});throw _0x3248f1;}return formatElapsed(_0x3d9a62);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ddca7,_0x1dc022){const _0x8de0a9=a225_0x1a5f,_0xf27f0b=_0x3ddca7();while(!![]){try{const _0x55c22c=-parseInt(_0x8de0a9(0x1c7))/0x1*(parseInt(_0x8de0a9(0x1d0))/0x2)+parseInt(_0x8de0a9(0x1bf))/0x3*(parseInt(_0x8de0a9(0x1c4))/0x4)+-parseInt(_0x8de0a9(0x1be))/0x5+parseInt(_0x8de0a9(0x1bd))/0x6*(-parseInt(_0x8de0a9(0x1d4))/0x7)+-parseInt(_0x8de0a9(0x1c8))/0x8+parseInt(_0x8de0a9(0x1c3))/0x9+-parseInt(_0x8de0a9(0x1c0))/0xa*(-parseInt(_0x8de0a9(0x1cf))/0xb);if(_0x55c22c===_0x1dc022)break;else _0xf27f0b['push'](_0xf27f0b['shift']());}catch(_0x408403){_0xf27f0b['push'](_0xf27f0b['shift']());}}}(a225_0x5f5b,0xba0e1));import a225_0xa9dc00 from'node:path';import{execa}from'execa';function a225_0x1a5f(_0x5a455d,_0x52fffc){_0x5a455d=_0x5a455d-0x1bd;const _0x5f5b4f=a225_0x5f5b();let _0x1a5f9c=_0x5f5b4f[_0x5a455d];return _0x1a5f9c;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a225_0x5f5b(){const _0x577ecc=['cwd','336AdsjRf','870uoTthu','6539860VhCNaP','27aHSMRp','748390XluloZ','error','Code\x20format\x20failed','11108898ZCEjTa','58184FWcrKi','--write','npx','104562ZDMcLy','4844816VsxUeF','success','resolve','format','Code\x20format\x20completed','Starting\x20code\x20format','now','209TRNDwv','2ZnpCjA','prettier','message'];a225_0x5f5b=function(){return _0x577ecc;};return a225_0x5f5b();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x5fdb2){const _0x37a15e=a225_0x1a5f,_0x47950b=Date[_0x37a15e(0x1ce)](),_0x3f8581=a225_0xa9dc00[_0x37a15e(0x1ca)](process[_0x37a15e(0x1d3)](),_0x5fdb2);try{logger['info']('format',_0x37a15e(0x1cd),{'projectCode':_0x5fdb2}),await execa(resolveNpmBin(_0x37a15e(0x1c6)),[_0x37a15e(0x1d1),_0x37a15e(0x1c5),'.'],{'cwd':_0x3f8581});const _0x312d8d=Date[_0x37a15e(0x1ce)]()-_0x47950b;logger[_0x37a15e(0x1c9)]('format',_0x37a15e(0x1cc),_0x312d8d,{'projectCode':_0x5fdb2});}catch(_0x38e4c2){const _0x3a35ec=Date[_0x37a15e(0x1ce)]()-_0x47950b;logger[_0x37a15e(0x1c1)](_0x37a15e(0x1cb),_0x37a15e(0x1c2),{'projectCode':_0x5fdb2,'error':_0x38e4c2 instanceof Error?_0x38e4c2[_0x37a15e(0x1d2)]:String(_0x38e4c2),'duration':_0x3a35ec});throw _0x38e4c2;}return formatElapsed(_0x47950b);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a226_0x2f5e(){const _0x118891=['now','install','10852604VoYfHa','9355720dIIOoz','https://registry.npmmirror.com','1932855klIeYP','message','117AcZuRa','30lznFIj','--registry','error','55612FQJXMt','info','2571300eyaaOP','3224630VrJClT','722124QWPpMJ','resolve','Dependency\x20install\x20completed','6JxmKic'];a226_0x2f5e=function(){return _0x118891;};return a226_0x2f5e();}(function(_0x5bb396,_0x227c15){const _0x49eafb=a226_0x2308,_0xa42fd2=_0x5bb396();while(!![]){try{const _0x38090e=parseInt(_0x49eafb(0x10f))/0x1+parseInt(_0x49eafb(0x120))/0x2+parseInt(_0x49eafb(0x11b))/0x3*(-parseInt(_0x49eafb(0x11e))/0x4)+parseInt(_0x49eafb(0x118))/0x5+parseInt(_0x49eafb(0x112))/0x6*(parseInt(_0x49eafb(0x115))/0x7)+parseInt(_0x49eafb(0x116))/0x8+parseInt(_0x49eafb(0x11a))/0x9*(-parseInt(_0x49eafb(0x121))/0xa);if(_0x38090e===_0x227c15)break;else _0xa42fd2['push'](_0xa42fd2['shift']());}catch(_0x528e73){_0xa42fd2['push'](_0xa42fd2['shift']());}}}(a226_0x2f5e,0xbf31d));import a226_0x2103b5 from'node:path';function a226_0x2308(_0x1055d8,_0x470e41){_0x1055d8=_0x1055d8-0x10f;const _0x2f5eb6=a226_0x2f5e();let _0x2308f8=_0x2f5eb6[_0x1055d8];return _0x2308f8;}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 installDependencies(_0x4b885){const _0x1e362c=a226_0x2308,_0x15131f=Date[_0x1e362c(0x113)](),_0x53d069=a226_0x2103b5[_0x1e362c(0x110)](process['cwd'](),_0x4b885);try{logger[_0x1e362c(0x11f)]('install','Starting\x20dependency\x20install',{'projectCode':_0x4b885,'registry':_0x1e362c(0x117)}),await execa(resolveNpmBin('npm'),[_0x1e362c(0x114),_0x1e362c(0x11c),'https://registry.npmmirror.com'],{'cwd':_0x53d069});const _0x23a578=Date[_0x1e362c(0x113)]()-_0x15131f;logger['success'](_0x1e362c(0x114),_0x1e362c(0x111),_0x23a578,{'projectCode':_0x4b885});}catch(_0xb97ed2){const _0x192189=Date['now']()-_0x15131f;logger[_0x1e362c(0x11d)](_0x1e362c(0x114),'Dependency\x20install\x20failed',{'projectCode':_0x4b885,'error':_0xb97ed2 instanceof Error?_0xb97ed2[_0x1e362c(0x119)]:String(_0xb97ed2),'duration':_0x192189});throw _0xb97ed2;}return formatElapsed(_0x15131f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a227_0x39fde3=a227_0x5446;function a227_0x5446(_0x27a4d8,_0x61a1a9){_0x27a4d8=_0x27a4d8-0x87;const _0xebc5b6=a227_0xebc5();let _0x5446e3=_0xebc5b6[_0x27a4d8];return _0x5446e3;}(function(_0x37142e,_0x4cf3c8){const _0x2811e7=a227_0x5446,_0x2e4ccf=_0x37142e();while(!![]){try{const _0x194139=parseInt(_0x2811e7(0x93))/0x1+-parseInt(_0x2811e7(0x99))/0x2*(parseInt(_0x2811e7(0x8b))/0x3)+parseInt(_0x2811e7(0x95))/0x4+parseInt(_0x2811e7(0x96))/0x5+-parseInt(_0x2811e7(0x8c))/0x6*(parseInt(_0x2811e7(0x98))/0x7)+parseInt(_0x2811e7(0x8d))/0x8*(-parseInt(_0x2811e7(0x87))/0x9)+parseInt(_0x2811e7(0x89))/0xa*(-parseInt(_0x2811e7(0x8e))/0xb);if(_0x194139===_0x4cf3c8)break;else _0x2e4ccf['push'](_0x2e4ccf['shift']());}catch(_0x4c608b){_0x2e4ccf['push'](_0x2e4ccf['shift']());}}}(a227_0xebc5,0x87d65));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a227_0xebc5(){const _0xec48db=['No\x20Rabetbase\x20project\x20configuration\x20was\x20found.','1429128UgBjTF','3781980pXcqUK','validation','56Ftajpt','22924GBmrmb','18EKWiqV','Run\x20','37430eihCJe','domain-routing-sync','87NxDfNy','365106UkvUlO','726456NHMEWC','77hvwvti','path','project','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','Domain\x20routing\x20synchronized:\x20','469732OdBWVG'];a227_0xebc5=function(){return _0xec48db;};return a227_0xebc5();}import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':a227_0x39fde3(0x90),'command':a227_0x39fde3(0x8a),'description':'Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x3d7a07=a227_0x39fde3,_0x4c502f=findProjectRootDirectory();if(!resolveConfigPath(_0x4c502f))throw CliErrors[_0x3d7a07(0x97)](_0x3d7a07(0x94),_0x3d7a07(0x88)+CLI_BIN_NAME+_0x3d7a07(0x91));const _0xbd4093=writeProjectDomainRoutingManifest(_0x4c502f);return{'ok':!![],'message':_0x3d7a07(0x92)+_0xbd4093[_0x3d7a07(0x8f)],'data':_0xbd4093};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a228_0x5c0251=a228_0x194f;(function(_0x552a19,_0x558f03){const _0x2b6c75=a228_0x194f,_0x5285f7=_0x552a19();while(!![]){try{const _0xbff46f=parseInt(_0x2b6c75(0x171))/0x1+parseInt(_0x2b6c75(0x198))/0x2*(-parseInt(_0x2b6c75(0x186))/0x3)+parseInt(_0x2b6c75(0x17f))/0x4+parseInt(_0x2b6c75(0x187))/0x5+-parseInt(_0x2b6c75(0x16e))/0x6+-parseInt(_0x2b6c75(0x193))/0x7+-parseInt(_0x2b6c75(0x190))/0x8*(-parseInt(_0x2b6c75(0x16b))/0x9);if(_0xbff46f===_0x558f03)break;else _0x5285f7['push'](_0x5285f7['shift']());}catch(_0x54dbb0){_0x5285f7['push'](_0x5285f7['shift']());}}}(a228_0x1f9d,0x645bc));function a228_0x1f9d(){const _0xf7e723=['521300hQmdhW','write','Upgrade\x20cancelled.','create','nonInteractive','Would\x20upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure\x20without\x20overwriting\x20project-owned\x20entrypoints','yes','3GmrEre','1693780GXoMyX','cwd','str','Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','Project\x20name','Skip\x20confirmation\x20prompt','bool','Run\x20','completed','7738392KhILOD','project','Project\x20upgrade\x20completed\x20with\x20follow-up\x20work.','1931363pSFjLC','Usage:\x20','../../commands/project/create/main.js','project-name','validation','1376930lDSvAa','cookie','boolean','Project\x20upgrade\x20completed.','9iPXvbt','PATCH','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','1545768gtLUEL','string','args','196690IZXPly','Create\x20a\x20new\x20project','name','trim','env','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','appcode','Prepared\x20local\x20project\x20template\x20directory','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20','cancelled','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','current-dir','Upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure','template-source'];a228_0x1f9d=function(){return _0xf7e723;};return a228_0x1f9d();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{analyseProjectUpgrade,upgradeApp}from'../../commands/project/upgrade.js';import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';function a228_0x194f(_0x1555eb,_0x61f757){_0x1555eb=_0x1555eb-0x169;const _0x1f9db2=a228_0x1f9d();let _0x194f49=_0x1f9db2[_0x1555eb];return _0x194f49;}const createFlags=[{'name':a228_0x5c0251(0x173),'type':a228_0x5c0251(0x16f),'description':a228_0x5c0251(0x18b)},{'name':a228_0x5c0251(0x175),'type':a228_0x5c0251(0x16f),'description':'Target\x20environment'},{'name':a228_0x5c0251(0x177),'type':a228_0x5c0251(0x16f),'description':a228_0x5c0251(0x16d)},{'name':'current-dir','type':a228_0x5c0251(0x169),'description':a228_0x5c0251(0x18a),'default':![]},{'name':a228_0x5c0251(0x17e),'type':a228_0x5c0251(0x16f),'description':a228_0x5c0251(0x178)}],upgradeFlags=[{'name':a228_0x5c0251(0x185),'type':'boolean','description':a228_0x5c0251(0x18c),'default':![]}];export const projectDefinitions=[{'service':a228_0x5c0251(0x191),'command':a228_0x5c0251(0x182),'description':a228_0x5c0251(0x172),'risk':a228_0x5c0251(0x180),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a228_0x5c0251(0x196),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x1e748a){const _0x39fa1a=a228_0x5c0251,{createApp:_0x4f7744}=await import(_0x39fa1a(0x195)),_0x16aa36=_0x1e748a[_0x39fa1a(0x189)](_0x39fa1a(0x173))[_0x39fa1a(0x174)]()||_0x1e748a[_0x39fa1a(0x170)][0x0]?.[_0x39fa1a(0x174)](),_0x378122=_0x1e748a[_0x39fa1a(0x189)](_0x39fa1a(0x175))||undefined,_0x4c0177=_0x1e748a[_0x39fa1a(0x189)](_0x39fa1a(0x177))||undefined,_0x4158fd=_0x1e748a[_0x39fa1a(0x189)]('template-source')['trim']()||undefined,_0x501905=_0x1e748a[_0x39fa1a(0x18d)](_0x39fa1a(0x17c));if(_0x501905&&_0x16aa36)throw CliErrors[_0x39fa1a(0x197)]('--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.',_0x39fa1a(0x18e)+CLI_BIN_NAME+_0x39fa1a(0x17b));if(_0x1e748a[_0x39fa1a(0x183)]){if(!_0x16aa36&&!_0x501905)throw CliErrors[_0x39fa1a(0x197)](_0x39fa1a(0x176),_0x39fa1a(0x194)+CLI_BIN_NAME+_0x39fa1a(0x179)+CLI_BIN_NAME+'\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]');await _0x4f7744({'projectCode':_0x16aa36,'appCode':_0x4c0177,'env':_0x378122,'cookie':_0x1e748a[_0x39fa1a(0x199)],'currentDir':_0x501905,'nonInteractive':!![],'templateSource':_0x4158fd});}else await _0x4f7744({'projectCode':_0x16aa36,'appCode':_0x4c0177,'env':_0x378122,'cookie':_0x1e748a[_0x39fa1a(0x199)],'currentDir':_0x501905,'templateSource':_0x4158fd});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a228_0x5c0251(0x191),'command':'upgrade','description':a228_0x5c0251(0x17d),'risk':a228_0x5c0251(0x180),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'dryRun'(){const _0x2ad6e1=a228_0x5c0251,_0x62c45b=analyseProjectUpgrade(process[_0x2ad6e1(0x188)]());return{'method':_0x2ad6e1(0x16c),'url':process[_0x2ad6e1(0x188)](),'body':_0x62c45b,'description':_0x2ad6e1(0x184)};},async 'execute'(_0x27f9ad){const _0x1e3773=a228_0x5c0251,_0x2ee84b=await upgradeApp(_0x27f9ad[_0x1e3773(0x183)],{'yes':_0x27f9ad[_0x1e3773(0x18d)](_0x1e3773(0x185))});return{'ok':_0x2ee84b[_0x1e3773(0x18f)]||_0x2ee84b[_0x1e3773(0x17a)]===!![],'message':_0x2ee84b[_0x1e3773(0x17a)]?_0x1e3773(0x181):_0x2ee84b['completed']?_0x1e3773(0x16a):_0x1e3773(0x192),'data':_0x2ee84b};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x38ce3d,_0x1462c4){const _0x177603=a229_0x40c8,_0x367edd=_0x38ce3d();while(!![]){try{const _0x4813e5=parseInt(_0x177603(0xdf))/0x1*(-parseInt(_0x177603(0xb6))/0x2)+-parseInt(_0x177603(0xbe))/0x3+-parseInt(_0x177603(0xb8))/0x4+-parseInt(_0x177603(0xc7))/0x5*(-parseInt(_0x177603(0xa7))/0x6)+-parseInt(_0x177603(0x9f))/0x7*(parseInt(_0x177603(0xcc))/0x8)+parseInt(_0x177603(0xb3))/0x9+-parseInt(_0x177603(0xde))/0xa*(-parseInt(_0x177603(0xe7))/0xb);if(_0x4813e5===_0x1462c4)break;else _0x367edd['push'](_0x367edd['shift']());}catch(_0x2bf3a6){_0x367edd['push'](_0x367edd['shift']());}}}(a229_0x4343,0xba009));import a229_0xee226f from'chalk';import a229_0x2a9933 from'ora';function a229_0x40c8(_0x5bed06,_0x2965d8){_0x5bed06=_0x5bed06-0x9a;const _0x43433b=a229_0x4343();let _0x40c80f=_0x43433b[_0x5bed06];return _0x40c80f;}import{existsSync,readFileSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{askConfirm}from'../../commands/menu/shared/inquirer.js';import{analyzeProjectApiArchitecture,upgradeProjectApiArchitecture}from'../../commands/project/api-architecture-upgrade.js';import{NEW_CONFIG_NAME}from'../../context.js';function readProjectConfig(_0x3d4f6b){const _0x63188a=a229_0x40c8;try{const _0x45650b=JSON[_0x63188a(0xb4)](readFileSync(_0x3d4f6b,_0x63188a(0xd5)));return _0x45650b&&typeof _0x45650b===_0x63188a(0xdb)?_0x45650b:{};}catch{return{};}}export function analyseProjectUpgrade(_0x596fcd){const _0x163e29=a229_0x40c8;let _0x49b66f=null;const _0x494020=resolve(_0x596fcd,_0x163e29(0xa3));if(existsSync(_0x494020))try{const _0x33e242=JSON[_0x163e29(0xb4)](readFileSync(_0x494020,_0x163e29(0xd5)));for(const _0x1e22d6 of[_0x163e29(0xa8),_0x163e29(0xc9)]){const _0x7c074=_0x33e242?.[_0x1e22d6]?.[_0x163e29(0xc0)];if(typeof _0x7c074===_0x163e29(0x9b)){_0x7c074!==_0x163e29(0xb1)&&(_0x49b66f={'pkgPath':_0x494020,'currentVersion':_0x7c074,'field':_0x1e22d6});break;}}}catch{}const _0x3f2194=resolve(_0x596fcd,NEW_CONFIG_NAME),_0x5bde38=existsSync(_0x3f2194)?readProjectConfig(_0x3f2194):{},_0x567caa=analyzeProjectApiArchitecture(_0x596fcd,_0x5bde38);return{'sdkUpgrade':_0x49b66f,'apiArchitecture':_0x567caa};}function printReport(_0x2e7328){const _0x142d61=a229_0x40c8;console[_0x142d61(0xb2)](''),console['log'](a229_0xee226f['bold'](_0x142d61(0xd2))),console['log'](''),console['log'](a229_0xee226f['cyan'](_0x142d61(0xb9))+('\x20\x20'+(_0x2e7328['apiArchitecture']['needed']?a229_0xee226f['yellow'](_0x142d61(0xd7)):a229_0xee226f[_0x142d61(0xcd)]('up-to-date'))));for(const _0x4e8806 of _0x2e7328[_0x142d61(0x9d)]['groups']){console[_0x142d61(0xb2)]('\x20\x20'+_0x4e8806[_0x142d61(0xc5)]+'\x20('+_0x4e8806['profiles'][_0x142d61(0x9c)](',\x20')+')');for(const _0x18ae8f of _0x4e8806[_0x142d61(0xb5)]){console[_0x142d61(0xb2)](_0x142d61(0xce)+_0x18ae8f['action'][_0x142d61(0xdd)](0x11)+'\x20'+_0x18ae8f['path']),_0x18ae8f[_0x142d61(0x9a)]&&console[_0x142d61(0xb2)](_0x142d61(0xb0)+_0x18ae8f['candidatePath']);}}_0x2e7328[_0x142d61(0x9d)][_0x142d61(0xa5)][_0x142d61(0xae)]>0x0&&console[_0x142d61(0xb2)]('\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.');console['log']('');if(_0x2e7328[_0x142d61(0xe2)]){const {currentVersion:_0x8a4031,field:_0x5dfc82,pkgPath:_0x52c91e}=_0x2e7328[_0x142d61(0xe2)];console[_0x142d61(0xb2)](a229_0xee226f[_0x142d61(0xb7)](_0x142d61(0xdc))+('\x20\x20'+a229_0xee226f[_0x142d61(0xa2)](_0x52c91e))),console['log'](_0x142d61(0xe8)+_0x5dfc82+':\x20'+a229_0xee226f[_0x142d61(0xa2)](_0x8a4031)+_0x142d61(0xe0)+a229_0xee226f[_0x142d61(0xcd)](_0x142d61(0xb1))),console['log'](_0x142d61(0xe9));}else console[_0x142d61(0xb2)](a229_0xee226f[_0x142d61(0xb7)](_0x142d61(0xdc))+'\x20\x20'+a229_0xee226f['gray'](_0x142d61(0xda)));console[_0x142d61(0xb2)]('');}function execUpgradeSdk(_0x4e37db){const _0x42f0e4=a229_0x40c8;if(!_0x4e37db['sdkUpgrade'])return{'step':0x1,'label':_0x42f0e4(0xc2),'ok':!![],'detail':_0x42f0e4(0xe5)};const {pkgPath:_0x9b6d6e,currentVersion:_0xf0aec1,field:_0x371c3f}=_0x4e37db[_0x42f0e4(0xe2)];try{const _0x13f71d=readFileSync(_0x9b6d6e,'utf8'),_0x35ed6f=JSON[_0x42f0e4(0xb4)](_0x13f71d);return _0x35ed6f[_0x371c3f][_0x42f0e4(0xc0)]=_0x42f0e4(0xb1),writeFileSync(_0x9b6d6e,JSON[_0x42f0e4(0xd9)](_0x35ed6f,null,0x2)+'\x0a',_0x42f0e4(0xd5)),{'step':0x1,'label':_0x42f0e4(0xc2),'ok':!![],'detail':_0x371c3f+_0x42f0e4(0xe3)+_0xf0aec1+_0x42f0e4(0xc3)};}catch(_0x475ffc){return{'step':0x1,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0x475ffc instanceof Error?_0x475ffc[_0x42f0e4(0xc6)]:String(_0x475ffc)};}}function a229_0x4343(){const _0x2a7dc8=['done','white','push','length','\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20\x20\x20candidate:\x20','latest','log','4205349grNcMW','parse','files','6QzyPmf','cyan','2883088MyhpJy','Application\x20source:','\x20\x20Step\x20','Upgrade\x20application\x20source','detail','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','4041345YrHGfe','Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','@lovrabet/sdk','cwd','Upgrade\x20@lovrabet/sdk','\x20→\x20latest','needed','apiDir','message','880505dnnWcD','yes','devDependencies','\x20\x20npm\x20install','manualMergeRequired','630880akxQdW','green','\x20\x20\x20\x20','fail','===\x20Upgrade\x20Summary\x20===','Step\x202/2:\x20Application\x20source\x20—\x20','===\x20Upgrade\x20Analysis\x20===','source\x20structure\x20is\x20current','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','utf8','start','upgrade\x20needed','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','stringify','not\x20found\x20or\x20already\x20at\x20latest','object','@lovrabet/sdk:','padEnd','168790cSKTzC','324055ayfKED','\x20→\x20','Your\x20project\x20is\x20already\x20up-to-date.','sdkUpgrade','[\x22@lovrabet/sdk\x22]:\x20','gray','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','Upgrade\x20cancelled.','2497qwMfMx','\x20\x20Current\x20version\x20in\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','candidatePath','string','join','apiArchitecture','candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required','91OtEpVS','CANCEL','red','yellow','package.json','some','skippedLegacyDirectories','succeed','18YSThKX','dependencies','Upgrade\x20completed\x20successfully!','Proceed\x20with\x20upgrade?'];a229_0x4343=function(){return _0x2a7dc8;};return a229_0x4343();}function printSummary(_0x50532e){const _0x49b2ef=a229_0x40c8;console[_0x49b2ef(0xb2)](''),console[_0x49b2ef(0xb2)](a229_0xee226f['bold'](_0x49b2ef(0xd0))),console[_0x49b2ef(0xb2)]('');for(const _0x1d17e7 of _0x50532e){const _0x5ea4a5=_0x1d17e7['ok']?a229_0xee226f[_0x49b2ef(0xcd)]('OK'):a229_0xee226f[_0x49b2ef(0xa1)]('FAIL');console[_0x49b2ef(0xb2)]('\x20\x20'+_0x5ea4a5+_0x49b2ef(0xba)+_0x1d17e7['step']+':\x20'+_0x1d17e7['label']);if(_0x1d17e7[_0x49b2ef(0xbc)])console['log'](_0x49b2ef(0xaf)+a229_0xee226f[_0x49b2ef(0xe4)](_0x1d17e7[_0x49b2ef(0xbc)]));}console['log']('');}export async function upgradeApp(_0x1f5d7c,_0x59cb43){const _0x5e7f53=a229_0x40c8,_0x47d1f7=process[_0x5e7f53(0xc1)](),_0x35e6c5=analyseProjectUpgrade(_0x47d1f7);if(!_0x35e6c5['sdkUpgrade']&&!_0x35e6c5[_0x5e7f53(0x9d)][_0x5e7f53(0xc4)])return console['log'](a229_0xee226f['green'](_0x5e7f53(0xe1))),{'analysis':_0x35e6c5,'steps':[],'completed':!![]};printReport(_0x35e6c5);const _0x5b7ec0=!!(_0x59cb43[_0x5e7f53(0xc8)]||_0x59cb43['Y']||_0x1f5d7c);if(!_0x5b7ec0)try{const _0x1ede6e=await askConfirm(_0x5e7f53(0xaa));if(!_0x1ede6e)return console[_0x5e7f53(0xb2)](a229_0xee226f[_0x5e7f53(0xe4)](_0x5e7f53(0xe6))),{'analysis':_0x35e6c5,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x541cfa){if(_0x541cfa?.[_0x5e7f53(0xc6)]===_0x5e7f53(0xa0))return console[_0x5e7f53(0xb2)](a229_0xee226f['gray'](_0x5e7f53(0xe6))),{'analysis':_0x35e6c5,'steps':[],'completed':![],'cancelled':!![]};throw _0x541cfa;}const _0x23c551=[],_0x42c932=a229_0x2a9933({'text':'Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':'cyan'})['start'](),_0xa0d8e4=execUpgradeSdk(_0x35e6c5);_0x23c551[_0x5e7f53(0xad)](_0xa0d8e4),_0x42c932[_0xa0d8e4['ok']?_0x5e7f53(0xa6):_0x5e7f53(0xcf)]('Step\x201/2:\x20@lovrabet/sdk\x20—\x20'+(_0xa0d8e4[_0x5e7f53(0xbc)]??(_0xa0d8e4['ok']?_0x5e7f53(0xab):'failed')));const _0x572e29=a229_0x2a9933({'text':_0x5e7f53(0xbf),'color':_0x5e7f53(0xb7)})[_0x5e7f53(0xd6)]();let _0x1bb9fa;try{_0x1bb9fa=await upgradeProjectApiArchitecture(_0x47d1f7);const _0x4398c6=_0x1bb9fa[_0x5e7f53(0xcb)]?_0x5e7f53(0x9e):_0x5e7f53(0xd3);_0x572e29[_0x5e7f53(0xa6)](_0x5e7f53(0xd1)+_0x4398c6),_0x23c551[_0x5e7f53(0xad)]({'step':0x2,'label':_0x5e7f53(0xbb),'ok':!![],'detail':_0x4398c6});}catch(_0x3f50e7){const _0x80e4ec=_0x3f50e7 instanceof Error?_0x3f50e7[_0x5e7f53(0xc6)]:String(_0x3f50e7);_0x572e29[_0x5e7f53(0xcf)](_0x5e7f53(0xd1)+_0x80e4ec),_0x23c551['push']({'step':0x2,'label':'Upgrade\x20application\x20source','ok':![],'detail':_0x80e4ec});}printSummary(_0x23c551);const _0x33bd8b=_0x23c551[_0x5e7f53(0xa4)](_0x5c3e27=>!_0x5c3e27['ok']);if(_0x33bd8b)console[_0x5e7f53(0xb2)](a229_0xee226f['yellow'](_0x5e7f53(0xd8)));else _0x1bb9fa?.[_0x5e7f53(0xcb)]?console[_0x5e7f53(0xb2)](a229_0xee226f[_0x5e7f53(0xa2)]('Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.')):console['log'](a229_0xee226f[_0x5e7f53(0xcd)](_0x5e7f53(0xa9)));return _0xa0d8e4['ok']&&_0x35e6c5['sdkUpgrade']&&(console[_0x5e7f53(0xb2)](''),console[_0x5e7f53(0xb2)](a229_0xee226f['bold'][_0x5e7f53(0xb7)](_0x5e7f53(0xbd))),console[_0x5e7f53(0xb2)](a229_0xee226f[_0x5e7f53(0xb7)](_0x5e7f53(0xd4))),console[_0x5e7f53(0xb2)](''),console[_0x5e7f53(0xb2)](a229_0xee226f[_0x5e7f53(0xac)](_0x5e7f53(0xca))),console['log'](a229_0xee226f[_0x5e7f53(0xac)]('\x20\x20#\x20or')),console[_0x5e7f53(0xb2)](a229_0xee226f[_0x5e7f53(0xac)]('\x20\x20bun\x20install')),console[_0x5e7f53(0xb2)]('')),{'analysis':_0x35e6c5,'steps':_0x23c551,'apiArchitecture':_0x1bb9fa,'completed':!_0x33bd8b&&!_0x1bb9fa?.['manualMergeRequired']};}
|
|
1
|
+
(function(_0x566115,_0x110832){const _0x5e1552=a229_0x2037,_0x2fec32=_0x566115();while(!![]){try{const _0x45b14a=-parseInt(_0x5e1552(0x1a6))/0x1+parseInt(_0x5e1552(0x1a1))/0x2+-parseInt(_0x5e1552(0x1c9))/0x3*(-parseInt(_0x5e1552(0x1ae))/0x4)+parseInt(_0x5e1552(0x1af))/0x5+parseInt(_0x5e1552(0x1a3))/0x6*(parseInt(_0x5e1552(0x1bb))/0x7)+parseInt(_0x5e1552(0x1d7))/0x8*(parseInt(_0x5e1552(0x1b4))/0x9)+parseInt(_0x5e1552(0x1cc))/0xa*(-parseInt(_0x5e1552(0x195))/0xb);if(_0x45b14a===_0x110832)break;else _0x2fec32['push'](_0x2fec32['shift']());}catch(_0x4ff21c){_0x2fec32['push'](_0x2fec32['shift']());}}}(a229_0x3b9e,0x255c1));import a229_0x2f5192 from'chalk';import a229_0x2b437c from'ora';import{existsSync,readFileSync,writeFileSync}from'node:fs';function a229_0x2037(_0x4691a3,_0xf922ce){_0x4691a3=_0x4691a3-0x191;const _0x3b9eb6=a229_0x3b9e();let _0x2037d9=_0x3b9eb6[_0x4691a3];return _0x2037d9;}import{resolve}from'node:path';import{askConfirm}from'../../commands/menu/shared/inquirer.js';import{analyzeProjectApiArchitecture,upgradeProjectApiArchitecture}from'../../commands/project/api-architecture-upgrade.js';function a229_0x3b9e(){const _0x5e0213=['up-to-date','259kWeVBa','path','cyan','files','log','Upgrade\x20completed\x20successfully!','package.json','length','gray','message','parse','manualMergeRequired','\x20\x20Current\x20version\x20in\x20','start','151299AffLjN','source\x20structure\x20is\x20current','push','10ECQxUv','Upgrade\x20application\x20source','FAIL','\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','Upgrade\x20cancelled.','Proceed\x20with\x20upgrade?','needed','object','Step\x201/2:\x20@lovrabet/sdk\x20—\x20','\x20\x20#\x20or','8fhGyce','detail','not\x20found\x20or\x20already\x20at\x20latest','\x20\x20bun\x20install','candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required','[\x22@lovrabet/sdk\x22]:\x20','dependencies','Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','action','6828954kVqiYw','cwd','apiArchitecture','Application\x20source:','green','succeed','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','bold','\x20→\x20','yes','latest','candidatePath','227878Fvwitx','@lovrabet/sdk:','19164FczVpY','label','utf8','270077GwajZo','Upgrade\x20@lovrabet/sdk','Step\x202/2:\x20Application\x20source\x20—\x20','apiDir','\x20\x20\x20\x20\x20\x20candidate:\x20','Your\x20project\x20is\x20already\x20up-to-date.','sdkUpgrade','stringify','24FGXdSJ','1261585qykieU','yellow','\x20\x20\x20\x20','\x20→\x20latest','\x20\x20Step\x20','2311956LGEsBE','groups','string','red','white','fail'];a229_0x3b9e=function(){return _0x5e0213;};return a229_0x3b9e();}import{NEW_CONFIG_NAME}from'../../context.js';function readProjectConfig(_0xa6bd94){const _0x536e5c=a229_0x2037;try{const _0x30a633=JSON[_0x536e5c(0x1c5)](readFileSync(_0xa6bd94,_0x536e5c(0x1a5)));return _0x30a633&&typeof _0x30a633===_0x536e5c(0x1d4)?_0x30a633:{};}catch{return{};}}export function analyseProjectUpgrade(_0x131583){const _0x391e54=a229_0x2037;let _0x337750=null;const _0x50e2b2=resolve(_0x131583,_0x391e54(0x1c1));if(existsSync(_0x50e2b2))try{const _0xc7df44=JSON[_0x391e54(0x1c5)](readFileSync(_0x50e2b2,'utf8'));for(const _0x250735 of[_0x391e54(0x192),'devDependencies']){const _0x398436=_0xc7df44?.[_0x250735]?.['@lovrabet/sdk'];if(typeof _0x398436===_0x391e54(0x1b6)){_0x398436!==_0x391e54(0x19f)&&(_0x337750={'pkgPath':_0x50e2b2,'currentVersion':_0x398436,'field':_0x250735});break;}}}catch{}const _0x10c6af=resolve(_0x131583,NEW_CONFIG_NAME),_0x594d0a=existsSync(_0x10c6af)?readProjectConfig(_0x10c6af):{},_0x45a4de=analyzeProjectApiArchitecture(_0x131583,_0x594d0a);return{'sdkUpgrade':_0x337750,'apiArchitecture':_0x45a4de};}function printReport(_0x24c19f){const _0x724e43=a229_0x2037;console[_0x724e43(0x1bf)](''),console[_0x724e43(0x1bf)](a229_0x2f5192['bold']('===\x20Upgrade\x20Analysis\x20===')),console[_0x724e43(0x1bf)](''),console[_0x724e43(0x1bf)](a229_0x2f5192[_0x724e43(0x1bd)](_0x724e43(0x198))+('\x20\x20'+(_0x24c19f[_0x724e43(0x197)][_0x724e43(0x1d3)]?a229_0x2f5192[_0x724e43(0x1b0)]('upgrade\x20needed'):a229_0x2f5192[_0x724e43(0x199)](_0x724e43(0x1ba)))));for(const _0x1f8f37 of _0x24c19f[_0x724e43(0x197)][_0x724e43(0x1b5)]){console[_0x724e43(0x1bf)]('\x20\x20'+_0x1f8f37[_0x724e43(0x1a9)]+'\x20('+_0x1f8f37['profiles']['join'](',\x20')+')');for(const _0x58674b of _0x1f8f37[_0x724e43(0x1be)]){console[_0x724e43(0x1bf)](_0x724e43(0x1b1)+_0x58674b[_0x724e43(0x194)]['padEnd'](0x11)+'\x20'+_0x58674b[_0x724e43(0x1bc)]),_0x58674b[_0x724e43(0x1a0)]&&console[_0x724e43(0x1bf)](_0x724e43(0x1aa)+_0x58674b[_0x724e43(0x1a0)]);}}_0x24c19f[_0x724e43(0x197)]['skippedLegacyDirectories'][_0x724e43(0x1c2)]>0x0&&console['log'](_0x724e43(0x1cf));console[_0x724e43(0x1bf)]('');if(_0x24c19f['sdkUpgrade']){const {currentVersion:_0x2c8f02,field:_0x4b6ace,pkgPath:_0xe70599}=_0x24c19f[_0x724e43(0x1ac)];console[_0x724e43(0x1bf)](a229_0x2f5192[_0x724e43(0x1bd)](_0x724e43(0x1a2))+('\x20\x20'+a229_0x2f5192[_0x724e43(0x1b0)](_0xe70599))),console[_0x724e43(0x1bf)](_0x724e43(0x1c7)+_0x4b6ace+':\x20'+a229_0x2f5192['yellow'](_0x2c8f02)+_0x724e43(0x19d)+a229_0x2f5192[_0x724e43(0x199)](_0x724e43(0x19f))),console[_0x724e43(0x1bf)]('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console['log'](a229_0x2f5192['cyan'](_0x724e43(0x1a2))+'\x20\x20'+a229_0x2f5192[_0x724e43(0x1c3)](_0x724e43(0x1d9)));console[_0x724e43(0x1bf)]('');}function execUpgradeSdk(_0x4b002d){const _0x246210=a229_0x2037;if(!_0x4b002d[_0x246210(0x1ac)])return{'step':0x1,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x246210(0x1d0)};const {pkgPath:_0x35a27d,currentVersion:_0x5d52ed,field:_0x408721}=_0x4b002d[_0x246210(0x1ac)];try{const _0x28e3a8=readFileSync(_0x35a27d,_0x246210(0x1a5)),_0x18956a=JSON[_0x246210(0x1c5)](_0x28e3a8);return _0x18956a[_0x408721]['@lovrabet/sdk']='latest',writeFileSync(_0x35a27d,JSON[_0x246210(0x1ad)](_0x18956a,null,0x2)+'\x0a',_0x246210(0x1a5)),{'step':0x1,'label':_0x246210(0x1a7),'ok':!![],'detail':_0x408721+_0x246210(0x191)+_0x5d52ed+_0x246210(0x1b2)};}catch(_0x74f903){return{'step':0x1,'label':_0x246210(0x1a7),'ok':![],'detail':_0x74f903 instanceof Error?_0x74f903[_0x246210(0x1c4)]:String(_0x74f903)};}}function printSummary(_0x133458){const _0x27fcc7=a229_0x2037;console[_0x27fcc7(0x1bf)](''),console[_0x27fcc7(0x1bf)](a229_0x2f5192[_0x27fcc7(0x19c)]('===\x20Upgrade\x20Summary\x20===')),console[_0x27fcc7(0x1bf)]('');for(const _0x266710 of _0x133458){const _0x4166d0=_0x266710['ok']?a229_0x2f5192['green']('OK'):a229_0x2f5192[_0x27fcc7(0x1b7)](_0x27fcc7(0x1ce));console['log']('\x20\x20'+_0x4166d0+_0x27fcc7(0x1b3)+_0x266710['step']+':\x20'+_0x266710[_0x27fcc7(0x1a4)]);if(_0x266710['detail'])console['log']('\x20\x20\x20\x20\x20\x20\x20'+a229_0x2f5192[_0x27fcc7(0x1c3)](_0x266710[_0x27fcc7(0x1d8)]));}console['log']('');}export async function upgradeApp(_0x4c7aa9,_0x2449d5){const _0x3c67e2=a229_0x2037,_0x4da44d=process[_0x3c67e2(0x196)](),_0x16d61b=analyseProjectUpgrade(_0x4da44d);if(!_0x16d61b['sdkUpgrade']&&!_0x16d61b['apiArchitecture'][_0x3c67e2(0x1d3)])return console[_0x3c67e2(0x1bf)](a229_0x2f5192[_0x3c67e2(0x199)](_0x3c67e2(0x1ab))),{'analysis':_0x16d61b,'steps':[],'completed':!![]};printReport(_0x16d61b);const _0x188edf=!!(_0x2449d5[_0x3c67e2(0x19e)]||_0x2449d5['Y']||_0x4c7aa9);if(!_0x188edf)try{const _0x5c22e7=await askConfirm(_0x3c67e2(0x1d2));if(!_0x5c22e7)return console[_0x3c67e2(0x1bf)](a229_0x2f5192[_0x3c67e2(0x1c3)](_0x3c67e2(0x1d1))),{'analysis':_0x16d61b,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x5b9ee2){if(_0x5b9ee2?.[_0x3c67e2(0x1c4)]==='CANCEL')return console['log'](a229_0x2f5192[_0x3c67e2(0x1c3)](_0x3c67e2(0x1d1))),{'analysis':_0x16d61b,'steps':[],'completed':![],'cancelled':!![]};throw _0x5b9ee2;}const _0x367885=[],_0x5c19f8=a229_0x2b437c({'text':'Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':_0x3c67e2(0x1bd)})[_0x3c67e2(0x1c8)](),_0x2cd9da=execUpgradeSdk(_0x16d61b);_0x367885[_0x3c67e2(0x1cb)](_0x2cd9da),_0x5c19f8[_0x2cd9da['ok']?_0x3c67e2(0x19a):_0x3c67e2(0x1b9)](_0x3c67e2(0x1d5)+(_0x2cd9da[_0x3c67e2(0x1d8)]??(_0x2cd9da['ok']?'done':'failed')));const _0x2bbf77=a229_0x2b437c({'text':_0x3c67e2(0x193),'color':_0x3c67e2(0x1bd)})[_0x3c67e2(0x1c8)]();let _0x4f7350;try{_0x4f7350=await upgradeProjectApiArchitecture(_0x4da44d);const _0x214405=_0x4f7350['manualMergeRequired']?_0x3c67e2(0x1db):_0x3c67e2(0x1ca);_0x2bbf77[_0x3c67e2(0x19a)](_0x3c67e2(0x1a8)+_0x214405),_0x367885[_0x3c67e2(0x1cb)]({'step':0x2,'label':_0x3c67e2(0x1cd),'ok':!![],'detail':_0x214405});}catch(_0x3f372a){const _0x3f3bfd=_0x3f372a instanceof Error?_0x3f372a[_0x3c67e2(0x1c4)]:String(_0x3f372a);_0x2bbf77[_0x3c67e2(0x1b9)](_0x3c67e2(0x1a8)+_0x3f3bfd),_0x367885[_0x3c67e2(0x1cb)]({'step':0x2,'label':_0x3c67e2(0x1cd),'ok':![],'detail':_0x3f3bfd});}printSummary(_0x367885);const _0x455c37=_0x367885['some'](_0x57a53c=>!_0x57a53c['ok']);if(_0x455c37)console[_0x3c67e2(0x1bf)](a229_0x2f5192[_0x3c67e2(0x1b0)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.'));else _0x4f7350?.[_0x3c67e2(0x1c6)]?console['log'](a229_0x2f5192[_0x3c67e2(0x1b0)]('Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.')):console[_0x3c67e2(0x1bf)](a229_0x2f5192[_0x3c67e2(0x199)](_0x3c67e2(0x1c0)));return _0x2cd9da['ok']&&_0x16d61b[_0x3c67e2(0x1ac)]&&(console[_0x3c67e2(0x1bf)](''),console[_0x3c67e2(0x1bf)](a229_0x2f5192[_0x3c67e2(0x19c)][_0x3c67e2(0x1bd)](_0x3c67e2(0x19b))),console[_0x3c67e2(0x1bf)](a229_0x2f5192[_0x3c67e2(0x1bd)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x3c67e2(0x1bf)](''),console[_0x3c67e2(0x1bf)](a229_0x2f5192[_0x3c67e2(0x1b8)]('\x20\x20npm\x20install')),console[_0x3c67e2(0x1bf)](a229_0x2f5192[_0x3c67e2(0x1b8)](_0x3c67e2(0x1d6))),console['log'](a229_0x2f5192['white'](_0x3c67e2(0x1da))),console[_0x3c67e2(0x1bf)]('')),{'analysis':_0x16d61b,'steps':_0x367885,'apiArchitecture':_0x4f7350,'completed':!_0x455c37&&!_0x4f7350?.[_0x3c67e2(0x1c6)]};}
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a230_0x2f0bd0=a230_0x2f25;(function(_0x39ec4d,_0x30fcc6){const _0x11898c=a230_0x2f25,_0x3a06e1=_0x39ec4d();while(!![]){try{const _0x218074=parseInt(_0x11898c(0x9d))/0x1+parseInt(_0x11898c(0xee))/0x2+parseInt(_0x11898c(0x88))/0x3+-parseInt(_0x11898c(0x86))/0x4*(-parseInt(_0x11898c(0x99))/0x5)+-parseInt(_0x11898c(0x8e))/0x6*(parseInt(_0x11898c(0xa7))/0x7)+parseInt(_0x11898c(0xc4))/0x8*(parseInt(_0x11898c(0x7d))/0x9)+-parseInt(_0x11898c(0xc1))/0xa;if(_0x218074===_0x30fcc6)break;else _0x3a06e1['push'](_0x3a06e1['shift']());}catch(_0x40d9ed){_0x3a06e1['push'](_0x3a06e1['shift']());}}}(a230_0x5b8c,0x8a590));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{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 a230_0x5b8c(){const _0x751424=['permit:role-menus-set','rabetbase\x20menu\x20asset-update','read','start','rabetbase\x20project\x20create\x20<project-name>','set','install','app:assets-update','permit:role-apis-set','rabetbase\x20menu\x20subapp-assets-status\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','app:remove','skills:','Platform\x20Issue','app:remote','from','Use\x20`','dataset:generate-status','Agent\x20Context\x20Rules','create','rabetbase\x20kb\x20detail','bff:new','map','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','19629780ziIhNA','CLI\x20Built-in\x20Skill','permit:page-set','8024mQZCVS','Logs','flow:enable','\x20\x20[write]','permit:role-menus','app:use','flow:disable','page:react-publish','Runtime\x20App\x20Config\x20Management','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','write','rabetbase\x20kb\x20update','rabetbase\x20dataset\x20design-start\x20--file\x20<manifest.json>','show','rabetbase\x20kb\x20create','wildcardDef','role:create','dataset:generate-start','rabetbase\x20app\x20list\x20--remote','Run\x20any\x20package.json\x20script','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','isSingleCommand','Deployment','`\x20has\x20been\x20removed.','Dataset\x20&\x20Operations','Roles','`\x20instead.','Tenant\x20Members','SQL\x20Queries','command','File','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','hidden','skill:install','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','page:standard-page-status','defaultCommand','rabetbase\x20workspace\x20use\x20--app\x20<name>','Self\x20Update','logout','1482266PzUyYu','User\x20Accounts','Menu','Backend\x20Function\x20Scripts','Code\x20Generation','page:react-update','knowledge-base:update','page:react-list','skill:','project:init','knowledge-base:list','length','has','filter','rabetbase\x20page\x20custom-publish','612PKsLte','rabetbase\x20run\x20preview','data:getOne','risk','rabetbase\x20cli-skill\x20install','Run\x20Scripts','Schema','push','rabetbase\x20page\x20custom-update','115948OflUID','Database\x20Connections','2114097GZSGMb','Project','menu:update','API\x20Development','rabetbase\x20auth\x20logout','\x20\x20[high-risk-write]','30ZLYZas','knowledge-base:detail','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','rabetbase\x20menu\x20subapp-assets-update\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>\x20--resources\x20\x27<json>\x27','Configuration','knowledge-base:create','description','build','Diagnostics','knowledge-base:delete','\x20\x20[','190HuXiEN','permit:page-get','app:assets-status','page:custom-create','725333jJHSVB','commands','get','service','Company\x20Knowledge\x20Base','`rabetbase\x20','Instant\x20API\x20Policy','rabetbase\x20workspace\x20remove\x20<name>','rabetbase\x20page\x20data-list-status','page:react-detail','1135715kfFogK','Workspace'];a230_0x5b8c=function(){return _0x751424;};return a230_0x5b8c();}function registerDefinitions(_0x5c0088){const _0x140b27=a230_0x2f25;for(const _0x46b281 of _0x5c0088){definitions['set'](_0x46b281[_0x140b27(0xa0)]+':'+_0x46b281['command'],_0x46b281);let _0x3d7af8=serviceGroups[_0x140b27(0x9f)](_0x46b281[_0x140b27(0xa0)]);!_0x3d7af8&&(_0x3d7af8=[],serviceGroups[_0x140b27(0xae)](_0x46b281[_0x140b27(0xa0)],_0x3d7af8)),_0x3d7af8[_0x140b27(0x84)](_0x46b281);}}function registerDeclarativeService(_0x26c669,_0x1bb2f1,_0x5bf0a1){const _0xbb6ce8=a230_0x2f25;registerDefinitions(_0x1bb2f1);_0x5bf0a1?.[_0xbb6ce8(0xd5)]&®isterDefinitions([_0x5bf0a1[_0xbb6ce8(0xd5)]]);const _0x507859=_0x33978a=>_0x33978a===_0xbb6ce8(0xab)?'':_0x33978a===_0xbb6ce8(0xd0)?_0xbb6ce8(0xc7):_0xbb6ce8(0x8d),_0x369e95={'service':_0x1bb2f1[0x0][_0xbb6ce8(0xa0)],'label':_0x26c669,'commands':_0x1bb2f1[_0xbb6ce8(0x7b)](_0x513132=>!_0x513132[_0xbb6ce8(0xe6)])[_0xbb6ce8(0xbf)](_0xb1647d=>({'command':_0xb1647d['command'],'description':_0xb1647d[_0xbb6ce8(0x94)],'tag':_0x507859(_0xb1647d[_0xbb6ce8(0x80)])})),'declarative':!![],'defaultCommand':_0x5bf0a1?.[_0xbb6ce8(0xea)]??(_0x5bf0a1?.[_0xbb6ce8(0xdb)]?_0x1bb2f1[0x0][_0xbb6ce8(0xe3)]:undefined),'wildcardDef':_0x5bf0a1?.[_0xbb6ce8(0xd5)],'isSingleCommand':_0x5bf0a1?.[_0xbb6ce8(0xdb)]};serviceRegistry['push'](_0x369e95),serviceByName['set'](_0x369e95['service'],_0x369e95);}registerDeclarativeService(a230_0x2f0bd0(0x89),projectDefinitions),registerDeclarativeService(a230_0x2f0bd0(0xa8),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a230_0x2f0bd0(0xe1),tenantDefinitions),registerDeclarativeService(a230_0x2f0bd0(0xef),userAccountDefinitions),registerDeclarativeService(a230_0x2f0bd0(0xde),datasetDefinitions),registerDeclarativeService(a230_0x2f0bd0(0xe8),pageDefinitions),registerDeclarativeService(a230_0x2f0bd0(0x8b),apiDefinitions),registerDeclarativeService(a230_0x2f0bd0(0xf1),bffDefinitions),registerDeclarativeService(a230_0x2f0bd0(0xa3),instantApiPolicyDefinitions),registerDeclarativeService('Notification\x20Configuration',notificationDefinitions),registerDeclarativeService(a230_0x2f0bd0(0xe2),sqlDefinitions),registerDeclarativeService(a230_0x2f0bd0(0x87),dbDefinitions),registerDeclarativeService(a230_0x2f0bd0(0xdc),deploymentDefinitions),registerDeclarativeService(a230_0x2f0bd0(0xf0),menuDefinitions),registerDeclarativeService('Async\x20Tasks',taskDefinitions),registerDeclarativeService(a230_0x2f0bd0(0xdf),roleDefinitions),registerDeclarativeService(a230_0x2f0bd0(0xcc),appConfigDefinitions),registerDeclarativeService(a230_0x2f0bd0(0xa1),kbDefinitions),registerDeclarativeService(a230_0x2f0bd0(0xbb),ruleDefinitions),registerDeclarativeService(a230_0x2f0bd0(0xb6),issueDefinitions),registerDeclarativeService(a230_0x2f0bd0(0xe4),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a230_0x2f0bd0(0x72),codegenDefinitions),registerDeclarativeService(a230_0x2f0bd0(0x92),configDefinitions),registerDeclarativeService(a230_0x2f0bd0(0x96),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x2f0bd0(0x83),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x2f0bd0(0xec),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x2f0bd0(0xc2),cliSkillDefinitions,{'defaultCommand':a230_0x2f0bd0(0xaf)}),registerDeclarativeService('Approval\x20Flows',flowDefinitions),registerDeclarativeService(a230_0x2f0bd0(0xc5),logsDefinitions,{'defaultCommand':a230_0x2f0bd0(0xd3)}),registerDeclarativeService(a230_0x2f0bd0(0x82),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a230_0x2f0bd0(0x79)]-0x1];last[a230_0x2f0bd0(0x9e)]=[{'command':'<script>','description':a230_0x2f0bd0(0xd9),'tag':a230_0x2f0bd0(0x98)+runDefinition[a230_0x2f0bd0(0x80)]+']'}];}function a230_0x2f25(_0x457643,_0x1198cb){_0x457643=_0x457643-0x72;const _0x5b8c1a=a230_0x5b8c();let _0x2f254a=_0x5b8c1a[_0x457643];return _0x2f254a;}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a230_0x2f0bd0(0xd7),a230_0x2f0bd0(0xd2)],[a230_0x2f0bd0(0xba),'rabetbase\x20dataset\x20design-status\x20--operation-id\x20<id>'],['sql:save','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a230_0x2f0bd0(0xbe),'rabetbase\x20bff\x20create'],['sql:new','rabetbase\x20sql\x20create'],[a230_0x2f0bd0(0x8a),a230_0x2f0bd0(0xaa)],[a230_0x2f0bd0(0x77),a230_0x2f0bd0(0xda)],[a230_0x2f0bd0(0x76),'rabetbase\x20cli-skill\x20install'],[a230_0x2f0bd0(0xe7),a230_0x2f0bd0(0x81)],[a230_0x2f0bd0(0xb5),'rabetbase\x20cli-skill\x20install'],['skills:install',a230_0x2f0bd0(0x81)],[a230_0x2f0bd0(0x9b),a230_0x2f0bd0(0xb2)],[a230_0x2f0bd0(0xb0),a230_0x2f0bd0(0x91)],[a230_0x2f0bd0(0xb7),a230_0x2f0bd0(0xd8)],[a230_0x2f0bd0(0xc9),a230_0x2f0bd0(0xeb)],['app:add',a230_0x2f0bd0(0xb3)],[a230_0x2f0bd0(0xb4),a230_0x2f0bd0(0xa4)],[a230_0x2f0bd0(0x78),'rabetbase\x20kb\x20list'],[a230_0x2f0bd0(0x8f),a230_0x2f0bd0(0xbd)],[a230_0x2f0bd0(0x93),a230_0x2f0bd0(0xd4)],[a230_0x2f0bd0(0x74),a230_0x2f0bd0(0xd1)],[a230_0x2f0bd0(0x97),'rabetbase\x20kb\x20delete'],[a230_0x2f0bd0(0xd6),'rabetbase\x20role\x20list'],['data:filter',a230_0x2f0bd0(0xe5)],[a230_0x2f0bd0(0x7f),a230_0x2f0bd0(0x90)],[a230_0x2f0bd0(0xe9),a230_0x2f0bd0(0xa5)],['page:react-create',a230_0x2f0bd0(0xce)],[a230_0x2f0bd0(0x9c),a230_0x2f0bd0(0xce)],[a230_0x2f0bd0(0x75),'rabetbase\x20page\x20custom-list'],[a230_0x2f0bd0(0xa6),'rabetbase\x20page\x20custom-detail'],[a230_0x2f0bd0(0x73),a230_0x2f0bd0(0x85)],[a230_0x2f0bd0(0xcb),a230_0x2f0bd0(0x7c)]]),REMOVED_COMMAND_HINTS=new Map([[a230_0x2f0bd0(0xc6),a230_0x2f0bd0(0xc0)],[a230_0x2f0bd0(0xca),'This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.'],['deployment:sync',a230_0x2f0bd0(0xcf)],[a230_0x2f0bd0(0x9a),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a230_0x2f0bd0(0xc3),a230_0x2f0bd0(0xcd)],[a230_0x2f0bd0(0xc8),a230_0x2f0bd0(0xcd)],[a230_0x2f0bd0(0xa9),a230_0x2f0bd0(0xcd)],[a230_0x2f0bd0(0xb1),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.']]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a230_0x2f0bd0(0xbc),a230_0x2f0bd0(0xad)],[a230_0x2f0bd0(0xac),'rabetbase\x20run\x20start'],[a230_0x2f0bd0(0x95),'rabetbase\x20run\x20build'],['preview',a230_0x2f0bd0(0x7e)],[a230_0x2f0bd0(0xed),a230_0x2f0bd0(0x8c)]]);export function resolveRemovedCommand(_0x1eaca,_0x3cd405){const _0x6205ad=a230_0x2f0bd0;if(!_0x1eaca)return undefined;const _0x35350d=REMOVED_COMMAND_REPLACEMENTS[_0x6205ad(0x9f)](_0x1eaca+':'+(_0x3cd405??'')),_0x1971fd=REMOVED_FLAT_COMMAND_REPLACEMENTS['get'](_0x1eaca),_0x2d041b=_0x35350d??_0x1971fd,_0x3f414c=REMOVED_COMMAND_HINTS['get'](_0x1eaca+':'+(_0x3cd405??''));if(!_0x2d041b&&!_0x3f414c)return undefined;const _0x566ba2=_0x1971fd?_0x1eaca:_0x3cd405?_0x1eaca+'\x20'+_0x3cd405:_0x1eaca;return{'command':_0x566ba2,'message':_0x6205ad(0xa2)+_0x566ba2+_0x6205ad(0xdd),'hint':_0x3f414c??_0x6205ad(0xb9)+_0x2d041b+_0x6205ad(0xe0)};}export function findDefinition(_0x3f377c,_0x46452c){const _0x146184=a230_0x2f0bd0;return definitions[_0x146184(0x9f)](_0x3f377c+':'+_0x46452c);}export function isKnownService(_0x965b32){const _0x40f221=a230_0x2f0bd0;return serviceByName[_0x40f221(0x7a)](_0x965b32);}export function isDeclarativeService(_0x2e33ee){const _0x4ff54a=a230_0x2f0bd0;return serviceGroups['has'](_0x2e33ee)||serviceByName[_0x4ff54a(0x9f)](_0x2e33ee)?.[_0x4ff54a(0xd5)]!==undefined;}export function getServiceEntry(_0x29ccfa){const _0x1f1dc6=a230_0x2f0bd0;return serviceByName[_0x1f1dc6(0x9f)](_0x29ccfa);}export function getLegacyHandler(_0x56f9c2,_0x5c46f2){return undefined;}export function getAllDefinitions(){const _0x12781d=a230_0x2f0bd0;return Array[_0x12781d(0xb8)](definitions['values']());}
|
|
1
|
+
const a230_0x4194b9=a230_0x1308;(function(_0x572903,_0xe5a0d3){const _0x396ad7=a230_0x1308,_0xf49a5a=_0x572903();while(!![]){try{const _0x377d43=-parseInt(_0x396ad7(0x23b))/0x1*(-parseInt(_0x396ad7(0x22a))/0x2)+parseInt(_0x396ad7(0x216))/0x3+parseInt(_0x396ad7(0x21e))/0x4+parseInt(_0x396ad7(0x25f))/0x5*(parseInt(_0x396ad7(0x239))/0x6)+-parseInt(_0x396ad7(0x1fb))/0x7*(-parseInt(_0x396ad7(0x209))/0x8)+parseInt(_0x396ad7(0x235))/0x9*(-parseInt(_0x396ad7(0x217))/0xa)+-parseInt(_0x396ad7(0x23a))/0xb;if(_0x377d43===_0xe5a0d3)break;else _0xf49a5a['push'](_0xf49a5a['shift']());}catch(_0x6b9e5b){_0xf49a5a['push'](_0xf49a5a['shift']());}}}(a230_0x53d5,0xc1f0a));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';function a230_0x1308(_0x45b80e,_0x19d763){_0x45b80e=_0x45b80e-0x1f3;const _0x53d5c3=a230_0x53d5();let _0x130827=_0x53d5c3[_0x45b80e];return _0x130827;}import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';function a230_0x53d5(){const _0x4357d0=['rabetbase\x20cli-skill\x20install','page:react-create','User\x20Accounts','rabetbase\x20page\x20custom-detail','permit:role-menus-set','`rabetbase\x20','47131HyktyU','rabetbase\x20run\x20start','Logs','page:custom-create','show','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','page:standard-page-status','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','skills:','get','Database\x20Connections','risk','knowledge-base:update','knowledge-base:delete','808KfPaFb','rabetbase\x20dataset\x20design-status\x20--operation-id\x20<id>','hidden','app:assets-update','OCR','rabetbase\x20workspace\x20remove\x20<name>','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','app:assets-status','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','rabetbase\x20page\x20custom-publish','Company\x20Knowledge\x20Base','from','4674171Gpvjsh','370eFRLRw','Diagnostics','skill:install','File','sql:new','login','Notification\x20Configuration','5243600SPjEoT','page:react-update','install','Backend\x20Function\x20Scripts','Platform\x20Issue','preview','Approval\x20Flows','knowledge-base:create','service','Run\x20any\x20package.json\x20script','app:remove','command','121948Caitwu','Code\x20Generation','project:init','rabetbase\x20kb\x20create','API\x20Development','rabetbase\x20run\x20preview','\x20\x20[high-risk-write]','length','rabetbase\x20kb\x20delete','rabetbase\x20menu\x20subapp-assets-status\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>','commands','211338HZalNs','Workspace','rabetbase\x20menu\x20asset-update','permit:role-apis-set','2246742NLQVUg','36359466nUqBUK','11TEHILz','build','set','dataset:generate-start','page:react-publish','app:use','values','filter','Runtime\x20App\x20Config\x20Management','flow:enable','Authentication','SQL\x20Queries','Instant\x20API\x20Policy','data:getOne','knowledge-base:detail','Use\x20`','create','permit:page-set','rabetbase\x20menu\x20subapp-assets-update\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>\x20--resources\x20\x27<json>\x27','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','app:add','`\x20instead.','\x20\x20[','rabetbase\x20project\x20create\x20<project-name>','description','Project','rabetbase\x20run\x20build','Dataset\x20&\x20Operations','Roles','rabetbase\x20role\x20list','isSingleCommand','data:filter','wildcardDef','Schema','rabetbase\x20dataset\x20design-start\x20--file\x20<manifest.json>','role:create','10dSPwTf','push','rabetbase\x20workspace\x20use\x20--app\x20<name>','start','deployment:sync','logout','Run\x20Scripts','Menu','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','dataset:generate-status','rabetbase\x20kb\x20update','write','flow:disable','rabetbase\x20page\x20custom-update','permit:page-get'];a230_0x53d5=function(){return _0x4357d0;};return a230_0x53d5();}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{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(_0x29ac36){const _0x28cdbd=a230_0x1308;for(const _0x3d654d of _0x29ac36){definitions['set'](_0x3d654d[_0x28cdbd(0x226)]+':'+_0x3d654d[_0x28cdbd(0x229)],_0x3d654d);let _0xf035d3=serviceGroups[_0x28cdbd(0x204)](_0x3d654d[_0x28cdbd(0x226)]);!_0xf035d3&&(_0xf035d3=[],serviceGroups[_0x28cdbd(0x23d)](_0x3d654d[_0x28cdbd(0x226)],_0xf035d3)),_0xf035d3[_0x28cdbd(0x260)](_0x3d654d);}}function registerDeclarativeService(_0x21eca2,_0x11cd24,_0x3a3ce8){const _0x242005=a230_0x1308;registerDefinitions(_0x11cd24);_0x3a3ce8?.[_0x242005(0x25b)]&®isterDefinitions([_0x3a3ce8[_0x242005(0x25b)]]);const _0x412510=_0xe09a51=>_0xe09a51==='read'?'':_0xe09a51===_0x242005(0x26a)?'\x20\x20[write]':_0x242005(0x230),_0x239d5a={'service':_0x11cd24[0x0]['service'],'label':_0x21eca2,'commands':_0x11cd24[_0x242005(0x242)](_0xc58ab2=>!_0xc58ab2[_0x242005(0x20b)])['map'](_0x49277c=>({'command':_0x49277c[_0x242005(0x229)],'description':_0x49277c[_0x242005(0x253)],'tag':_0x412510(_0x49277c[_0x242005(0x206)])})),'declarative':!![],'defaultCommand':_0x3a3ce8?.['defaultCommand']??(_0x3a3ce8?.[_0x242005(0x259)]?_0x11cd24[0x0]['command']:undefined),'wildcardDef':_0x3a3ce8?.[_0x242005(0x25b)],'isSingleCommand':_0x3a3ce8?.[_0x242005(0x259)]};serviceRegistry[_0x242005(0x260)](_0x239d5a),serviceByName['set'](_0x239d5a[_0x242005(0x226)],_0x239d5a);}registerDeclarativeService(a230_0x4194b9(0x254),projectDefinitions),registerDeclarativeService(a230_0x4194b9(0x236),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a230_0x4194b9(0x245),authDefinitions,{'defaultCommand':a230_0x4194b9(0x21c)}),registerDeclarativeService('Tenant\x20Members',tenantDefinitions),registerDeclarativeService(a230_0x4194b9(0x1f7),userAccountDefinitions),registerDeclarativeService(a230_0x4194b9(0x256),datasetDefinitions),registerDeclarativeService('Data\x20List\x20Pages\x20&\x20Custom\x20Pages',pageDefinitions),registerDeclarativeService(a230_0x4194b9(0x22e),apiDefinitions),registerDeclarativeService(a230_0x4194b9(0x221),bffDefinitions),registerDeclarativeService(a230_0x4194b9(0x247),instantApiPolicyDefinitions),registerDeclarativeService(a230_0x4194b9(0x21d),notificationDefinitions),registerDeclarativeService(a230_0x4194b9(0x246),sqlDefinitions),registerDeclarativeService(a230_0x4194b9(0x205),dbDefinitions),registerDeclarativeService('Deployment',deploymentDefinitions),registerDeclarativeService(a230_0x4194b9(0x266),menuDefinitions),registerDeclarativeService('Async\x20Tasks',taskDefinitions),registerDeclarativeService(a230_0x4194b9(0x257),roleDefinitions),registerDeclarativeService(a230_0x4194b9(0x243),appConfigDefinitions),registerDeclarativeService(a230_0x4194b9(0x214),kbDefinitions),registerDeclarativeService('Agent\x20Context\x20Rules',ruleDefinitions),registerDeclarativeService(a230_0x4194b9(0x222),issueDefinitions),registerDeclarativeService(a230_0x4194b9(0x21a),fileDefinitions),registerDeclarativeService(a230_0x4194b9(0x20d),ocrDefinitions),registerDeclarativeService(a230_0x4194b9(0x22b),codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a230_0x4194b9(0x218),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x4194b9(0x25c),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a230_0x4194b9(0x220)}),registerDeclarativeService(a230_0x4194b9(0x224),flowDefinitions),registerDeclarativeService(a230_0x4194b9(0x1fd),logsDefinitions,{'defaultCommand':a230_0x4194b9(0x1ff)}),registerDeclarativeService(a230_0x4194b9(0x265),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a230_0x4194b9(0x231)]-0x1];last[a230_0x4194b9(0x234)]=[{'command':'<script>','description':a230_0x4194b9(0x227),'tag':a230_0x4194b9(0x251)+runDefinition[a230_0x4194b9(0x206)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a230_0x4194b9(0x23e),a230_0x4194b9(0x25d)],[a230_0x4194b9(0x268),a230_0x4194b9(0x20a)],['sql:save',a230_0x4194b9(0x24e)],['bff:new','rabetbase\x20bff\x20create'],[a230_0x4194b9(0x21b),'rabetbase\x20sql\x20create'],['menu:update',a230_0x4194b9(0x237)],[a230_0x4194b9(0x22c),a230_0x4194b9(0x200)],['skill:','rabetbase\x20cli-skill\x20install'],[a230_0x4194b9(0x219),a230_0x4194b9(0x1f5)],[a230_0x4194b9(0x203),a230_0x4194b9(0x1f5)],['skills:install',a230_0x4194b9(0x1f5)],[a230_0x4194b9(0x211),a230_0x4194b9(0x233)],[a230_0x4194b9(0x20c),a230_0x4194b9(0x24d)],['app:remote','rabetbase\x20app\x20list\x20--remote'],[a230_0x4194b9(0x240),a230_0x4194b9(0x261)],[a230_0x4194b9(0x24f),'rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>'],[a230_0x4194b9(0x228),a230_0x4194b9(0x20e)],['knowledge-base:list','rabetbase\x20kb\x20list'],[a230_0x4194b9(0x249),'rabetbase\x20kb\x20detail'],[a230_0x4194b9(0x225),a230_0x4194b9(0x22d)],[a230_0x4194b9(0x207),a230_0x4194b9(0x269)],[a230_0x4194b9(0x208),a230_0x4194b9(0x232)],[a230_0x4194b9(0x25e),a230_0x4194b9(0x258)],[a230_0x4194b9(0x25a),a230_0x4194b9(0x212)],[a230_0x4194b9(0x248),a230_0x4194b9(0x267)],[a230_0x4194b9(0x201),'rabetbase\x20page\x20data-list-status'],[a230_0x4194b9(0x1f6),a230_0x4194b9(0x20f)],[a230_0x4194b9(0x1fe),a230_0x4194b9(0x20f)],['page:react-list','rabetbase\x20page\x20custom-list'],['page:react-detail',a230_0x4194b9(0x1f8)],[a230_0x4194b9(0x21f),a230_0x4194b9(0x1f3)],[a230_0x4194b9(0x23f),a230_0x4194b9(0x213)]]),REMOVED_COMMAND_HINTS=new Map([[a230_0x4194b9(0x244),'This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.'],[a230_0x4194b9(0x26b),'This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.'],[a230_0x4194b9(0x263),a230_0x4194b9(0x202)],[a230_0x4194b9(0x1f4),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a230_0x4194b9(0x24c),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],['permit:role-menus',a230_0x4194b9(0x210)],[a230_0x4194b9(0x1f9),a230_0x4194b9(0x210)],[a230_0x4194b9(0x238),a230_0x4194b9(0x210)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a230_0x4194b9(0x24b),a230_0x4194b9(0x252)],[a230_0x4194b9(0x262),a230_0x4194b9(0x1fc)],[a230_0x4194b9(0x23c),a230_0x4194b9(0x255)],[a230_0x4194b9(0x223),a230_0x4194b9(0x22f)],[a230_0x4194b9(0x264),'rabetbase\x20auth\x20logout']]);export function resolveRemovedCommand(_0x435b16,_0x39a15e){const _0x5388d0=a230_0x4194b9;if(!_0x435b16)return undefined;const _0xdb9c8=REMOVED_COMMAND_REPLACEMENTS['get'](_0x435b16+':'+(_0x39a15e??'')),_0x18332a=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x5388d0(0x204)](_0x435b16),_0x5aab59=_0xdb9c8??_0x18332a,_0x5b235a=REMOVED_COMMAND_HINTS[_0x5388d0(0x204)](_0x435b16+':'+(_0x39a15e??''));if(!_0x5aab59&&!_0x5b235a)return undefined;const _0x669ec1=_0x18332a?_0x435b16:_0x39a15e?_0x435b16+'\x20'+_0x39a15e:_0x435b16;return{'command':_0x669ec1,'message':_0x5388d0(0x1fa)+_0x669ec1+'`\x20has\x20been\x20removed.','hint':_0x5b235a??_0x5388d0(0x24a)+_0x5aab59+_0x5388d0(0x250)};}export function findDefinition(_0x389f1e,_0xc62417){const _0x25be60=a230_0x4194b9;return definitions[_0x25be60(0x204)](_0x389f1e+':'+_0xc62417);}export function isKnownService(_0x517d8d){return serviceByName['has'](_0x517d8d);}export function isDeclarativeService(_0x14cf6b){const _0x56c92d=a230_0x4194b9;return serviceGroups['has'](_0x14cf6b)||serviceByName[_0x56c92d(0x204)](_0x14cf6b)?.[_0x56c92d(0x25b)]!==undefined;}export function getServiceEntry(_0x211ac5){const _0x298805=a230_0x4194b9;return serviceByName[_0x298805(0x204)](_0x211ac5);}export function getLegacyHandler(_0x599b65,_0x486c81){return undefined;}export function getAllDefinitions(){const _0x34b169=a230_0x4194b9;return Array[_0x34b169(0x215)](definitions[_0x34b169(0x241)]());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a231_0x4c4302=a231_0xa0ec;(function(_0x11f8b8,_0x42222d){const _0x32e82a=a231_0xa0ec,_0x513bb1=_0x11f8b8();while(!![]){try{const _0x379190=parseInt(_0x32e82a(0x1f1))/0x1*(parseInt(_0x32e82a(0x1e3))/0x2)+-parseInt(_0x32e82a(0x1e5))/0x3+parseInt(_0x32e82a(0x1e8))/0x4*(-parseInt(_0x32e82a(0x1f0))/0x5)+-parseInt(_0x32e82a(0x1ef))/0x6*(-parseInt(_0x32e82a(0x1f5))/0x7)+-parseInt(_0x32e82a(0x1ee))/0x8+-parseInt(_0x32e82a(0x1f3))/0x9*(parseInt(_0x32e82a(0x1ec))/0xa)+parseInt(_0x32e82a(0x1e1))/0xb;if(_0x379190===_0x42222d)break;else _0x513bb1['push'](_0x513bb1['shift']());}catch(_0x42e324){_0x513bb1['push'](_0x513bb1['shift']());}}}(a231_0x51bd,0x4f2d3));function a231_0xa0ec(_0x28d65a,_0x5eca19){_0x28d65a=_0x28d65a-0x1df;const _0x51bd20=a231_0x51bd();let _0xa0ecd6=_0x51bd20[_0x28d65a];return _0xa0ecd6;}import{deleteAppRole}from'../../core/api-client.js';function a231_0x51bd(){const _0x165482=['appCode','high-risk-write','4mrqABv','userCount','POST','role','1030LSxaCK','dev','2682376SHtRjk','426996mXjRLw','1171490NWONth','37568PmNelm','\x20(id=','32949hHGEIQ','delete','35Rxpuce','roleName','/smartapi/permit/role/delete','9550365KXgzqM','Role\x20still\x20has\x20','8MQpcxb','num','309996VQazzl'];a231_0x51bd=function(){return _0x165482;};return a231_0x51bd();}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';const DELETE_PATH=a231_0x4c4302(0x1e0);export const roleDelete={'service':a231_0x4c4302(0x1eb),'command':a231_0x4c4302(0x1f4),'description':'Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','risk':a231_0x4c4302(0x1e7),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x3a9257){const _0x78e944=a231_0x4c4302,_0x3ea0a9=_0x3a9257[_0x78e944(0x1e4)]('id'),_0x69549c=await getRoleById(_0x3a9257['appCode'],_0x3ea0a9);return assertCustomRole(_0x69549c,_0x78e944(0x1f4)),asDryRunResult({'scope':'dev','operation':_0x78e944(0x1f4),'selector':{'appCode':_0x3a9257[_0x78e944(0x1e6)],'roleId':_0x3ea0a9,'roleName':_0x69549c[_0x78e944(0x1df)]},'before':projectRole(_0x69549c),'after':null,'dryRun':!![],'backend':{'method':_0x78e944(0x1ea),'path':DELETE_PATH},'warnings':_0x69549c['userCount']>0x0?[_0x78e944(0x1e2)+_0x69549c[_0x78e944(0x1e9)]+'\x20member(s);\x20they\x20will\x20lose\x20this\x20group.']:[]},{'method':_0x78e944(0x1ea),'url':DELETE_PATH});},async 'execute'(_0x3b8e2f){const _0x3becae=a231_0x4c4302,_0x3393a5=_0x3b8e2f['num']('id'),_0x23b364=await getRoleById(_0x3b8e2f[_0x3becae(0x1e6)],_0x3393a5);return assertCustomRole(_0x23b364,_0x3becae(0x1f4)),await deleteAppRole(_0x3393a5),{'ok':!![],'data':{'scope':_0x3becae(0x1ed),'operation':_0x3becae(0x1f4),'selector':{'appCode':_0x3b8e2f[_0x3becae(0x1e6)],'roleId':_0x3393a5,'roleName':_0x23b364[_0x3becae(0x1df)]},'before':projectRole(_0x23b364),'after':null,'dryRun':![],'backend':{'method':_0x3becae(0x1ea),'path':DELETE_PATH},'warnings':[]},'message':'Deleted\x20role\x20'+_0x23b364[_0x3becae(0x1df)]+_0x3becae(0x1f2)+_0x3393a5+')'};}};
|