@lovrabet/rabetbase-cli 2.5.9-beta.1 → 2.5.10-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- 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.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.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/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.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 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase-dataset-generation/SKILL.md +2 -2
- package/skills/rabetbase-page-generation/SKILL.md +2 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x339ac9,_0x402ef9){const _0x42ee33=a219_0xe492,_0x1d78f0=_0x339ac9();while(!![]){try{const _0x57bf15=parseInt(_0x42ee33(0xd8))/0x1+-parseInt(_0x42ee33(0xa5))/0x2+-parseInt(_0x42ee33(0xe1))/0x3*(-parseInt(_0x42ee33(0xe9))/0x4)+-parseInt(_0x42ee33(0xaf))/0x5+parseInt(_0x42ee33(0xec))/0x6*(parseInt(_0x42ee33(0xa3))/0x7)+-parseInt(_0x42ee33(0x7d))/0x8+parseInt(_0x42ee33(0xb1))/0x9;if(_0x57bf15===_0x402ef9)break;else _0x1d78f0['push'](_0x1d78f0['shift']());}catch(_0x59c60d){_0x1d78f0['push'](_0x1d78f0['shift']());}}}(a219_0x428f,0x5a66b));import a219_0x475f7a from'path';import a219_0x1ac73f from'fs';import a219_0x1a0b76 from'chalk';import a219_0x303a27 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';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(_0x2a5f22){const _0x2f4742=a219_0xe492;try{const _0x1fc81f=a219_0x1ac73f[_0x2f4742(0xa1)](_0x2a5f22);if(!_0x1fc81f['isDirectory']())return null;return{'dev':_0x1fc81f[_0x2f4742(0xc0)],'ino':_0x1fc81f[_0x2f4742(0xda)]};}catch{return null;}}function isSameDirectory(_0x25d045,_0x5e77cc){const _0x5d9fb5=a219_0xe492;return!!_0x25d045&&!!_0x5e77cc&&_0x25d045[_0x5d9fb5(0xc0)]===_0x5e77cc[_0x5d9fb5(0xc0)]&&_0x25d045[_0x5d9fb5(0xda)]===_0x5e77cc[_0x5d9fb5(0xda)];}function commitCurrentDirectoryProject(_0x45fae7,_0x273f25,_0x202dc4){const _0x223888=a219_0xe492;if(!isSameDirectory(readDirectoryIdentity(_0x45fae7),_0x202dc4))throw new Error(_0x223888(0x9a));const _0x90dd19=a219_0x475f7a['basename'](_0x273f25),_0x202c44=a219_0x1ac73f[_0x223888(0x7b)](_0x45fae7);if(_0x202c44['length']!==0x1||_0x202c44[0x0]!==_0x90dd19)throw CliErrors[_0x223888(0xab)](_0x223888(0x76),_0x223888(0x9c));const _0x4edb18=a219_0x475f7a[_0x223888(0x7c)](_0x273f25,_0x223888(0xbb)),_0x4c695d=[];try{for(const _0x32b4e4 of a219_0x1ac73f[_0x223888(0x7b)](_0x4edb18)){a219_0x1ac73f[_0x223888(0x9f)](a219_0x475f7a[_0x223888(0x7c)](_0x4edb18,_0x32b4e4),a219_0x475f7a['join'](_0x45fae7,_0x32b4e4)),_0x4c695d[_0x223888(0xe8)](_0x32b4e4);}a219_0x1ac73f[_0x223888(0x93)](_0x273f25,{'recursive':!![],'force':!![]});}catch(_0x4d9de4){for(const _0x6a3155 of _0x4c695d[_0x223888(0xe4)]()){const _0x1135bb=a219_0x475f7a['join'](_0x45fae7,_0x6a3155);if(!a219_0x1ac73f[_0x223888(0x90)](_0x1135bb))continue;a219_0x1ac73f[_0x223888(0x9f)](_0x1135bb,a219_0x475f7a[_0x223888(0x7c)](_0x4edb18,_0x6a3155));}throw _0x4d9de4;}}function a219_0x428f(){const _0x5c29ba=['Project\x20created:\x20','*\x20Pulling\x20API\x20configuration...','gray','Configured\x20app\x20AppCode:\x20','fail','setLogPath','\x20Generated\x20by\x20rabetbase\x20cli\x20','\x20model(s)','cyan','√\x20package.json\x20updated:\x20name=','env','\x20api\x20pull\x20--force\x20--yes','\x20config\x20set\x20appcode\x20<app-code>\x27','name','API\x20configuration\x20pulled:\x20','Failed\x20to\x20update\x20package.json','...','Failed\x20to\x20clean\x20up\x20project\x20directory:\x20','currentDir','Project\x20directory\x20','!\x20Project\x20created,\x20but\x20local\x20logging\x20could\x20not\x20be\x20initialized:\x20','cookie','constants','465289HnUvUr','appCode','ino','belowMinimum','cd\x20','warn','Updating\x20package.json\x20name','1.0.0','green','1137flWSFn','string','repeat','reverse','nonInteractive','message','Starting\x20project\x20creation:\x20','push','644JJEGGL','length','\x20√\x20','464796KlSqil','Extracting\x20project\x20template','The\x20current\x20directory\x20changed\x20during\x20project\x20creation.','\x20already\x20exists','bold','\x20|\x20AppCode:\x20','projectName','readdirSync','join','2944704ROUHEt','readFileSync','Unable\x20to\x20prepare\x20the\x20current\x20directory\x20workspace','\x20\x202.\x20Pull\x20API\x20configuration:\x20','text','parse','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','error','√\x20Pulled\x20','CLI\x20version\x20check','version','dirname','stableVersion','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','stop','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','\x20run\x20start','Skip\x20cleanup:\x20project\x20directory\x20ownership\x20changed:\x20','Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory','existsSync','info','Copying\x20local\x20template\x20source','rmSync','start','verifying','cwd','Format\x20code','package.json','needsUpgrade','Current\x20directory\x20identity\x20changed\x20during\x20project\x20creation','√\x20Configuration\x20file\x20created,\x20Apps:\x20','Remove\x20the\x20new\x20files\x20and\x20retry\x20from\x20an\x20empty\x20directory.','chdir','copying','renameSync','The\x20current\x20directory\x20must\x20be\x20empty.','lstatSync','production','56RFsHvS','create','707434FyLFIA','stringify','Resolving\x20project\x20template','Verifying\x20project\x20template','downloading','W_OK','validation','Failed\x20to\x20configure\x20app\x20AppCode','Project\x20template\x20ready','utf8','816585KxQKId','Install\x20dependencies','984321iSyWag','apps','resolving','resolve','\x20&&\x20','basename','log','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20','\x20|\x20Default:\x20implicit\x20(single\x20app)','writeFileSync','project','templateSource','toLocaleString','extracting','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','dev'];a219_0x428f=function(){return _0x5c29ba;};return a219_0x428f();}export async function createApp(_0x243508){const _0x3ef1ab=a219_0xe492,_0x17779a=await checkCliVersion();(_0x17779a[_0x3ef1ab(0x99)]||_0x17779a[_0x3ef1ab(0xdb)])&&(printCliUpgradeWarning(_0x17779a),assertCliVersionSupported(_0x17779a),logger[_0x3ef1ab(0x91)](_0x3ef1ab(0xa4),_0x3ef1ab(0x86),{'currentVersion':_0x17779a['currentVersion'],'stableVersion':_0x17779a[_0x3ef1ab(0x89)],'minimumVersion':_0x17779a['minimumVersion'],'needsUpgrade':_0x17779a[_0x3ef1ab(0x99)],'belowMinimum':_0x17779a[_0x3ef1ab(0xdb)]}));const _0x5867d0=_0x243508[_0x3ef1ab(0xd3)]?a219_0x475f7a[_0x3ef1ab(0xb6)](process[_0x3ef1ab(0x96)]()):_0x243508['projectCode'];if(_0x5867d0&&(_0x243508[_0x3ef1ab(0xd9)]||_0x243508[_0x3ef1ab(0xe5)]))await runCreate({'projectName':_0x5867d0,'appCode':_0x243508[_0x3ef1ab(0xd9)],'env':_0x243508[_0x3ef1ab(0xcb)]},_0x243508);else{if(_0x5867d0){const _0x1ca453=await selectSingleAppcode(_0x243508[_0x3ef1ab(0xd6)]);await runCreate({'projectName':_0x5867d0,'appCode':_0x1ca453||undefined,'env':_0x243508[_0x3ef1ab(0xcb)]},_0x243508);}else await guidedCreateProject(_0x18b8ea=>runCreate(_0x18b8ea,_0x243508),_0x243508['env'],_0x243508['cookie']);}}async function runCreate(_0x4c4e58,_0x3ad6d0){const _0x533d2b=a219_0xe492;_0x4c4e58[_0x533d2b(0x7a)]=validateProjectName(_0x4c4e58['projectName']);const _0x2bf4a6=_0x3ad6d0[_0x533d2b(0xd3)]?process[_0x533d2b(0x96)]():a219_0x475f7a[_0x533d2b(0xb4)](process['cwd'](),_0x4c4e58[_0x533d2b(0x7a)]);if(_0x3ad6d0[_0x533d2b(0xd3)]){if(a219_0x1ac73f[_0x533d2b(0x7b)](_0x2bf4a6)[_0x533d2b(0xea)]>0x0)throw CliErrors[_0x533d2b(0xab)](_0x533d2b(0xa0),'Remove\x20or\x20move\x20the\x20existing\x20files,\x20then\x20retry\x20with\x20--current-dir.');}else{if(a219_0x1ac73f[_0x533d2b(0x90)](_0x2bf4a6))throw new Error(_0x533d2b(0xd4)+_0x4c4e58['projectName']+_0x533d2b(0x77));}let _0x51cf8e=null;const _0x1ae92e=_0x3ad6d0[_0x533d2b(0xd3)]?readDirectoryIdentity(_0x2bf4a6):null;let _0x493008=null;try{a219_0x1ac73f['accessSync'](a219_0x475f7a[_0x533d2b(0x88)](_0x2bf4a6),a219_0x1ac73f[_0x533d2b(0xd7)][_0x533d2b(0xaa)]);}catch{throw new Error(_0x533d2b(0x8c));}logger[_0x533d2b(0x91)](_0x533d2b(0xa4),_0x533d2b(0xe7)+_0x4c4e58['projectName'],{'projectDir':_0x2bf4a6,'appCode':_0x4c4e58['appCode']}),console['log'](),console['log'](a219_0x1a0b76[_0x533d2b(0xe0)](_0x533d2b(0xeb))+'Project\x20name:\x20'+a219_0x1a0b76[_0x533d2b(0xe0)](_0x4c4e58[_0x533d2b(0x7a)])+(_0x4c4e58['appCode']?_0x533d2b(0x79)+a219_0x1a0b76[_0x533d2b(0xc9)](_0x4c4e58[_0x533d2b(0xd9)]):''));try{let _0x961059=_0x4c4e58[_0x533d2b(0x7a)];_0x3ad6d0['currentDir']&&(_0x493008=a219_0x1ac73f['mkdtempSync'](a219_0x475f7a[_0x533d2b(0x7c)](_0x2bf4a6,'.rabetbase-create-')),_0x961059=a219_0x475f7a['relative'](process['cwd'](),a219_0x475f7a[_0x533d2b(0x7c)](_0x493008,_0x533d2b(0xbb))));const _0x28006c=a219_0x475f7a[_0x533d2b(0xb4)](process[_0x533d2b(0x96)](),_0x961059);await runTask(_0x533d2b(0xa7),_0x4c0c9d=>copyProjectTemplate(_0x961059,_0x680366=>_0x4c0c9d(projectTemplateStageLabel(_0x680366)),_0x3ad6d0[_0x533d2b(0xbc)]),_0x533d2b(0xad)),_0x51cf8e=_0x3ad6d0[_0x533d2b(0xd3)]?null:readDirectoryIdentity(_0x2bf4a6);if(!_0x3ad6d0[_0x533d2b(0xd3)]&&!_0x51cf8e)throw new Error(_0x533d2b(0x8f));await updatePackageJsonName(_0x961059,_0x4c4e58[_0x533d2b(0x7a)]),await runTask(_0x533d2b(0xb0),()=>installDependencies(_0x961059)),await runTask(_0x533d2b(0x97),()=>formatProjectCode(_0x961059)),await configureAppCode(_0x961059,_0x4c4e58[_0x533d2b(0x7a)],_0x4c4e58['appCode']||'',_0x4c4e58['env']);let _0x4a4523=![];if(_0x4c4e58['appCode']){console[_0x533d2b(0xb7)](_0x533d2b(0xc2));const _0x55d106=process[_0x533d2b(0x96)]();try{process[_0x533d2b(0x9d)](_0x28006c);const _0x967ff7=_0x4c4e58['env']||_0x533d2b(0xa2);initEnv(_0x967ff7);const {configArray:_0x31b9af}=await fetchModelList(_0x4c4e58[_0x533d2b(0xd9)],_0x3ad6d0['cookie']||''),_0x2551c7=DEFAULT_API_DIR,_0x1bc13e=await generateApiFile(_0x31b9af,'',_0x4c4e58[_0x533d2b(0xd9)],!![],_0x967ff7,_0x2551c7,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':!![],'modelProfile':{'name':_0x4c4e58[_0x533d2b(0xd9)],'defaultName':_0x4c4e58[_0x533d2b(0xd9)],'runtimeDomain':getRuntimeDomain()}});console[_0x533d2b(0xb7)](_0x533d2b(0x85)+_0x31b9af[_0x533d2b(0xea)]+'\x20dataset(s),\x20generated\x20'+_0x1bc13e['modelCount']+_0x533d2b(0xc8)),logger['info'](_0x533d2b(0xa4),_0x533d2b(0xcf)+_0x4c4e58['appCode']);}catch(_0x1ae6e4){_0x4a4523=!![],console['log'](_0x533d2b(0xb8)+CLI_BIN_NAME+_0x533d2b(0xcc)),logger[_0x533d2b(0xdd)](_0x533d2b(0xa4),'API\x20configuration\x20pull\x20failed',{'error':_0x1ae6e4 instanceof Error?_0x1ae6e4[_0x533d2b(0xe6)]:String(_0x1ae6e4)});}finally{process[_0x533d2b(0x9d)](_0x55d106);}}if(_0x3ad6d0['currentDir']){if(!_0x493008||!_0x1ae92e)throw new Error(_0x533d2b(0x7f));commitCurrentDirectoryProject(_0x2bf4a6,_0x493008,_0x1ae92e),_0x493008=null;}try{logger[_0x533d2b(0xc6)](_0x2bf4a6),logger['success'](_0x533d2b(0xa4),_0x533d2b(0xc1)+_0x4c4e58[_0x533d2b(0x7a)]);}catch(_0x5a3300){console[_0x533d2b(0xdd)](_0x533d2b(0xd5)+(_0x5a3300 instanceof Error?_0x5a3300['message']:String(_0x5a3300)));}console[_0x533d2b(0xb7)](),console['log'](a219_0x1a0b76[_0x533d2b(0xe0)]('─'[_0x533d2b(0xe3)](0x3c))),console[_0x533d2b(0xb7)](a219_0x1a0b76[_0x533d2b(0xc9)]['bold']('🚀\x20Next\x20Steps:')),console[_0x533d2b(0xb7)]();const _0x3a0f64=_0x3ad6d0[_0x533d2b(0xd3)]?CLI_BIN_NAME+_0x533d2b(0x8d):_0x533d2b(0xdc)+_0x4c4e58[_0x533d2b(0x7a)]+_0x533d2b(0xb5)+CLI_BIN_NAME+_0x533d2b(0x8d);console['log']('\x20\x201.\x20Start\x20project:\x20'+a219_0x1a0b76[_0x533d2b(0xc9)][_0x533d2b(0x78)](_0x3a0f64)),_0x4a4523&&console[_0x533d2b(0xb7)](_0x533d2b(0x80)+a219_0x1a0b76[_0x533d2b(0xc9)]['bold'](CLI_BIN_NAME+'\x20api\x20pull\x20--force\x20--yes')),console[_0x533d2b(0xb7)](a219_0x1a0b76[_0x533d2b(0xe0)]('─'[_0x533d2b(0xe3)](0x3c)));}catch(_0x200812){logger['error']('create','Project\x20creation\x20failed:\x20'+_0x4c4e58['projectName'],{'error':_0x200812 instanceof Error?_0x200812[_0x533d2b(0xe6)]:String(_0x200812)});try{const _0x4275b8=readDirectoryIdentity(_0x2bf4a6);if(_0x3ad6d0[_0x533d2b(0xd3)]&&_0x493008)a219_0x1ac73f[_0x533d2b(0x93)](_0x493008,{'recursive':!![],'force':!![]});else{if(_0x51cf8e&&_0x4275b8?.[_0x533d2b(0xc0)]===_0x51cf8e[_0x533d2b(0xc0)]&&_0x4275b8[_0x533d2b(0xda)]===_0x51cf8e[_0x533d2b(0xda)])console['log'](_0x533d2b(0x8a)+_0x2bf4a6),a219_0x1ac73f[_0x533d2b(0x93)](_0x2bf4a6,{'recursive':!![],'force':!![]});else _0x4275b8&&logger[_0x533d2b(0xdd)](_0x533d2b(0xa4),_0x533d2b(0x8e)+_0x2bf4a6);}}catch{logger['warn'](_0x533d2b(0xa4),_0x533d2b(0xd2)+_0x2bf4a6);}throw _0x200812;}}async function runTask(_0x2cefd5,_0xec4a0f,_0xb6eebd=_0x2cefd5){const _0x42a400=a219_0xe492,_0x41ed06=a219_0x303a27(_0x2cefd5+_0x42a400(0xd1))[_0x42a400(0x94)]();try{const _0x1314c4=await _0xec4a0f(_0x45fece=>{const _0x1bce41=_0x42a400;_0x41ed06[_0x1bce41(0x81)]=_0x45fece+_0x1bce41(0xd1);});_0x41ed06[_0x42a400(0x8b)](),console[_0x42a400(0xb7)](''+a219_0x1a0b76['green'](_0x42a400(0xeb))+_0xb6eebd+'\x20'+a219_0x1a0b76[_0x42a400(0xc3)]('['+_0x1314c4+']'));}catch(_0x15c9ba){_0x41ed06[_0x42a400(0xc5)](_0x2cefd5);throw _0x15c9ba;}}function projectTemplateStageLabel(_0x148b37){const _0x2c700e=a219_0xe492;switch(_0x148b37){case _0x2c700e(0xb3):return'Resolving\x20project\x20template';case _0x2c700e(0xa9):return'Downloading\x20project\x20template';case _0x2c700e(0x95):return _0x2c700e(0xa8);case _0x2c700e(0xbe):return _0x2c700e(0xed);case _0x2c700e(0x9e):return _0x2c700e(0x92);}}async function updatePackageJsonName(_0x5c7325,_0x5e1935){const _0x28f27d=a219_0xe492,_0x5229e7=a219_0x475f7a['resolve'](process[_0x28f27d(0x96)](),_0x5c7325),_0x57e4e5=a219_0x475f7a[_0x28f27d(0x7c)](_0x5229e7,_0x28f27d(0x98));try{console[_0x28f27d(0xb7)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x4f795d=getRabetbaseCliPackageRoot(),_0x23440f=a219_0x475f7a[_0x28f27d(0x7c)](_0x4f795d,_0x28f27d(0x98));let _0x56e605=_0x28f27d(0xdf);try{const _0x52c3a3=JSON[_0x28f27d(0x82)](a219_0x1ac73f[_0x28f27d(0x7e)](_0x23440f,_0x28f27d(0xae)));_0x56e605=_0x52c3a3[_0x28f27d(0x87)]||'1.0.0';}catch{}const _0x3399be=a219_0x1ac73f['readFileSync'](_0x57e4e5,_0x28f27d(0xae)),_0x68e10f=JSON[_0x28f27d(0x82)](_0x3399be);_0x68e10f[_0x28f27d(0xce)]=_0x5e1935,_0x68e10f['description']=_0x5e1935+_0x28f27d(0xc7)+_0x56e605,a219_0x1ac73f[_0x28f27d(0xba)](_0x57e4e5,JSON[_0x28f27d(0xa6)](_0x68e10f,null,0x2)+'\x0a',_0x28f27d(0xae)),console['log'](_0x28f27d(0xca)+_0x5e1935),logger[_0x28f27d(0x91)](_0x28f27d(0xa4),_0x28f27d(0xde));}catch(_0x3e9a72){logger[_0x28f27d(0x84)](_0x28f27d(0xa4),_0x28f27d(0xd0));throw _0x3e9a72;}}function a219_0xe492(_0x2b1a0e,_0x5a14b3){_0x2b1a0e=_0x2b1a0e-0x76;const _0x428f82=a219_0x428f();let _0xe492b8=_0x428f82[_0x2b1a0e];return _0xe492b8;}async function configureAppCode(_0x5270ca,_0x3a894f,_0xcebba5,_0xe2f670){const _0x48ccce=a219_0xe492,_0x21237c=a219_0x475f7a[_0x48ccce(0xb4)](process[_0x48ccce(0x96)](),_0x5270ca),_0x36a5b5=a219_0x475f7a[_0x48ccce(0x7c)](_0x21237c,NEW_CONFIG_NAME);try{_0xcebba5?console[_0x48ccce(0xb7)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x3a894f+':\x20'+_0xcebba5):console[_0x48ccce(0xb7)](_0x48ccce(0x83)+_0x3a894f);const _0x420b77=getRabetbaseCliPackageRoot(),_0x529b58=a219_0x475f7a['join'](_0x420b77,'package.json');let _0x215578=_0x48ccce(0xdf);try{const _0x1f0292=JSON[_0x48ccce(0x82)](a219_0x1ac73f[_0x48ccce(0x7e)](_0x529b58,_0x48ccce(0xae)));_0x215578=_0x1f0292[_0x48ccce(0x87)]||_0x48ccce(0xdf);}catch{}const {globalConfig:_0xa0fe95}=loadRawConfigLayers(),_0x2c0ee9=typeof _0xa0fe95[_0x48ccce(0xcb)]===_0x48ccce(0xe2)?_0xa0fe95[_0x48ccce(0xcb)]:undefined,_0x3b93a4={};for(const _0x177b6e of PROJECT_CREATE_INHERITABLE_KEYS){if(_0xa0fe95[_0x177b6e]!=null)_0x3b93a4[_0x177b6e]=_0xa0fe95[_0x177b6e];}const _0x2a199c=buildCanonicalProjectConfig(_0x3b93a4,{'appCodes':_0xcebba5?[_0xcebba5]:[],'env':_0xe2f670||_0x2c0ee9||_0x48ccce(0xa2),'metadata':{'createdAt':new Date()[_0x48ccce(0xbd)](),'version':_0x215578}});writeConfigFile(_0x36a5b5,_0x2a199c),await generateSdkConfigFile(a219_0x475f7a['join'](_0x21237c,DEFAULT_API_DIR),getSdkClientRoutingConfig()),writeProjectDomainRoutingManifest(_0x21237c),_0xcebba5?console[_0x48ccce(0xb7)](_0x48ccce(0x9b)+Object['keys'](_0x2a199c[_0x48ccce(0xb2)]||{})[_0x48ccce(0x7c)](',\x20')+_0x48ccce(0xb9)):console[_0x48ccce(0xb7)](_0x48ccce(0xbf)+CLI_BIN_NAME+_0x48ccce(0xcd)),logger[_0x48ccce(0x91)](_0x48ccce(0xa4),_0x48ccce(0xc4)+_0xcebba5);}catch(_0x112522){logger[_0x48ccce(0x84)](_0x48ccce(0xa4),_0x48ccce(0xac));throw _0x112522;}}
|
|
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 +1 @@
|
|
|
1
|
-
const a220_0x20ac04=a220_0x1e62;(function(_0x999ddb,_0x1a94fa){const _0x527ab8=a220_0x1e62,_0x1bea85=_0x999ddb();while(!![]){try{const _0x2445bc=-parseInt(_0x527ab8(0x202))/0x1+parseInt(_0x527ab8(0x211))/0x2+-parseInt(_0x527ab8(0x21f))/0x3*(parseInt(_0x527ab8(0x1f3))/0x4)+-parseInt(_0x527ab8(0x1da))/0x5+parseInt(_0x527ab8(0x210))/0x6*(parseInt(_0x527ab8(0x1dd))/0x7)+parseInt(_0x527ab8(0x208))/0x8+parseInt(_0x527ab8(0x1f0))/0x9;if(_0x2445bc===_0x1a94fa)break;else _0x1bea85['push'](_0x1bea85['shift']());}catch(_0x2f7f61){_0x1bea85['push'](_0x1bea85['shift']());}}}(a220_0x2bc9,0x88c1e));import{createHash}from'node:crypto';import a220_0x14ad6f from'node:fs/promises';import a220_0x2b64c9 from'node:path';import a220_0x1f5680 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';const TEMPLATE_ID=a220_0x20ac04(0x1b3),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x27ec21){return typeof _0x27ec21==='string'&&_0x27ec21['trim']()?_0x27ec21['trim']():null;}function parseDescriptor(_0x597777){const _0x473f6e=a220_0x20ac04;if(!_0x597777||typeof _0x597777!==_0x473f6e(0x1dc))throw new Error('CDN\x20config\x20does\x20not\x20define\x20template\x20\x22'+TEMPLATE_ID+'\x22.');const _0x32e84d=_0x597777,_0x1a5864=nonEmptyString(_0x32e84d[_0x473f6e(0x1ed)]),_0x5e516d=nonEmptyString(_0x32e84d[_0x473f6e(0x212)]),_0x44bc73=_0x32e84d[_0x473f6e(0x1cd)]===undefined?undefined:nonEmptyString(_0x32e84d['url'])||undefined,_0x5a7b09=nonEmptyString(_0x32e84d[_0x473f6e(0x1e9)])?.[_0x473f6e(0x1e8)](),_0x1621c3=_0x32e84d[_0x473f6e(0x1fe)];if(!_0x1a5864||!a220_0x1f5680[_0x473f6e(0x1f2)](_0x1a5864)||!_0x5e516d||_0x5e516d!==a220_0x2b64c9[_0x473f6e(0x1c5)]['basename'](_0x5e516d)||_0x5e516d['includes']('\x5c')||_0x32e84d[_0x473f6e(0x1cd)]!==undefined&&!_0x44bc73||!_0x5a7b09||!/^sha256:[a-f0-9]{64}$/[_0x473f6e(0x220)](_0x5a7b09)||typeof _0x1621c3!==_0x473f6e(0x1c2)||!Number[_0x473f6e(0x1cc)](_0x1621c3)||_0x1621c3<=0x0||_0x1621c3>MAX_ARCHIVE_SIZE)throw new Error(_0x473f6e(0x206)+TEMPLATE_ID+'\x22.');return{'version':_0x1a5864,'name':_0x5e516d,'url':_0x44bc73,'sha256':_0x5a7b09,'size':_0x1621c3};}async function fetchWithTimeout(_0x16dde6,_0x486eaa,_0x44aabf,_0x17a248){const _0x3c881f=a220_0x20ac04,_0x2550e3=new AbortController(),_0x99e3a5=setTimeout(()=>_0x2550e3[_0x3c881f(0x1d3)](),_0x486eaa);try{const _0xd2a251=await fetch(_0x16dde6,{'headers':{'Accept':_0x44aabf},'redirect':'error','signal':_0x2550e3[_0x3c881f(0x1fb)]});return await _0x17a248(_0xd2a251);}finally{clearTimeout(_0x99e3a5);}}async function fetchTemplateDescriptor(){const _0x1349d5=a220_0x20ac04,_0x56bc36=getCliVersion(),_0x29c95d=isBetaCliVersion(_0x56bc36)?_0x1349d5(0x218):_0x1349d5(0x1b2),_0x2837eb=await fetchProjectTemplateCdnConfig();if(!_0x2837eb)throw new Error('Rabetbase\x20CDN\x20config\x20is\x20unavailable.');const _0x104f0a=parseDescriptor(resolveProjectTemplateDescriptor(_0x2837eb[_0x1349d5(0x1bd)],_0x56bc36));return{'descriptor':_0x104f0a,'channel':_0x29c95d,'assetBaseUrl':_0x2837eb[_0x1349d5(0x1be)],'legacyAssetBaseUrl':_0x2837eb['legacyAssetBaseUrl']};}function a220_0x2bc9(){const _0x34b1f7=['valid','1018824AhGHPV','mode','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','Unable\x20to\x20claim\x20the\x20project\x20directory.','utf8','cancel','pathname','concat','signal','has','startsWith','size','body','copyFile','EEXIST','321211cuvXBD','Local\x20template\x20source\x20does\x20not\x20exist:\x20','read','.env.','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','digest','6020480WUJNNK','downloading','ino','Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20','lstat','extracting','CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20','.rabetbase.json','6108rNorfI','922508mkPcev','name','.DS_Store','template.zip','from','headers','origin','beta','basename','length','.env.example','update','writeFile','rename','3ZNYgQq','test','.git','mkdtemp','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','push','.codegraph','getReader','Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20','.env','readdir','dev','.rabetbase-create-','arrayBuffer','release','sub-app-react-demo','includes','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','resolve','application/zip','releaseLock','code','dirname','mkdir','protocol','config','assetBaseUrl','dist','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','Project\x20template\x20package.json\x20is\x20invalid.','number','local','Check\x20the\x20source\x20directory\x20and\x20retry.','posix','.idea','content-length','join','copying','package.json','sha256:','isSafeInteger','url','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','realpath','isDirectory','.lovrabet.json','Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.','abort','Invalid\x20local\x20template\x20source:\x20','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20',',\x20received\x20','status','get','access','4851120UrwbSW','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','object','3808lbWrDG','project','Project\x20directory\x20already\x20exists:\x20','isSymbolicLink','message','validation','Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.','Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20','readFile','verifying','ENOENT','toLowerCase','sha256','https:','.lovrabet.log','parse','version','isAbsolute','byteLength','3048237XfsmlU','hex'];a220_0x2bc9=function(){return _0x34b1f7;};return a220_0x2bc9();}function resolveArchiveUrl(_0x49dc9c,_0x5d536b,_0x1d9baf,_0x1e6005){const _0x1ff636=a220_0x20ac04,_0xa25909=new URL(_0x1d9baf+'/'),_0x3e6275=[getProjectTemplateRelativeUrl(_0x5d536b),getProjectTemplateRelativeUrl(_0x5d536b,_0x49dc9c[_0x1ff636(0x1ed)])];if(_0x49dc9c[_0x1ff636(0x1cd)]&&!_0x3e6275[_0x1ff636(0x1b4)](_0x49dc9c[_0x1ff636(0x1cd)]))throw new Error('CDN\x20project\x20template\x20relative\x20URL\x20must\x20match\x20its\x20release\x20channel\x20or\x20version.');const _0x295934=new URL(_0x1e6005+'/'),_0x3e679d=_0x49dc9c[_0x1ff636(0x1cd)]?new URL(_0x49dc9c['url'],_0xa25909[_0x1ff636(0x217)]):new URL(_0x49dc9c[_0x1ff636(0x212)],_0x295934),_0x3fef64=_0x49dc9c[_0x1ff636(0x1cd)]?_0xa25909[_0x1ff636(0x217)]:_0x295934['origin'];if(_0x3e679d[_0x1ff636(0x1bc)]!==_0x1ff636(0x1ea)||_0x3e679d[_0x1ff636(0x217)]!==_0x3fef64||a220_0x2b64c9[_0x1ff636(0x1c5)][_0x1ff636(0x219)](decodeURIComponent(_0x3e679d[_0x1ff636(0x1f9)]))!==_0x49dc9c[_0x1ff636(0x212)]||!_0x49dc9c['url']&&!_0x3e679d[_0x1ff636(0x1f9)][_0x1ff636(0x1fd)](_0x295934[_0x1ff636(0x1f9)]))throw new Error(_0x1ff636(0x1db));return _0x3e679d['href'];}async function readResponseBytes(_0x56d01a,_0x394361){const _0x587418=a220_0x20ac04;if(!_0x56d01a[_0x587418(0x1ff)]){const _0x2e2e12=Buffer[_0x587418(0x215)](await _0x56d01a[_0x587418(0x1b1)]());if(_0x2e2e12[_0x587418(0x21a)]>_0x394361)throw new Error(_0x587418(0x1ce));return _0x2e2e12;}const _0x22d5c6=_0x56d01a[_0x587418(0x1ff)][_0x587418(0x1ab)](),_0x533ca0=[];let _0x497bbf=0x0;try{while(!![]){const {done:_0x312cea,value:_0x287b67}=await _0x22d5c6[_0x587418(0x204)]();if(_0x312cea)break;_0x497bbf+=_0x287b67[_0x587418(0x1ef)];if(_0x497bbf>_0x394361){await _0x22d5c6[_0x587418(0x1f8)]();throw new Error(_0x587418(0x1ce));}_0x533ca0[_0x587418(0x1a9)](Buffer[_0x587418(0x215)](_0x287b67));}}finally{_0x22d5c6[_0x587418(0x1b8)]();}return Buffer[_0x587418(0x1fa)](_0x533ca0,_0x497bbf);}async function downloadArchive(_0x3bdf09,_0x2ee0f0,_0x121bea,_0xc19f07,_0xe9500a,_0x216cd5){const _0x30b776=a220_0x20ac04,_0x436f07=await fetchWithTimeout(resolveArchiveUrl(_0x3bdf09,_0x2ee0f0,_0x121bea,_0xc19f07),ARCHIVE_TIMEOUT_MS,_0x30b776(0x1b7),async _0x549e27=>{const _0x196a18=_0x30b776;if(!_0x549e27['ok'])throw new Error(_0x196a18(0x20e)+_0x549e27[_0x196a18(0x1d7)]+'.');const _0x5d855d=Number(_0x549e27[_0x196a18(0x216)][_0x196a18(0x1d8)](_0x196a18(0x1c7)));if(Number['isFinite'](_0x5d855d)&&_0x5d855d>MAX_ARCHIVE_SIZE)throw new Error(_0x196a18(0x1c0));return readResponseBytes(_0x549e27,_0x3bdf09['size']);});if(_0x436f07['length']!==_0x3bdf09[_0x30b776(0x1fe)])throw new Error(_0x30b776(0x1d5)+_0x3bdf09[_0x30b776(0x1fe)]+_0x30b776(0x1d6)+_0x436f07['length']+'.');_0x216cd5?.(_0x30b776(0x1e6));const _0x45d7f4=_0x30b776(0x1cb)+createHash(_0x30b776(0x1e9))[_0x30b776(0x21c)](_0x436f07)[_0x30b776(0x207)](_0x30b776(0x1f1));if(_0x45d7f4!==_0x3bdf09[_0x30b776(0x1e9)])throw new Error(_0x30b776(0x223));await a220_0x14ad6f[_0x30b776(0x21d)](_0xe9500a,_0x436f07,{'flag':'wx'});}async function assertTemplateRoot(_0x252950){const _0x35a03d=a220_0x20ac04,_0x4b9261=a220_0x2b64c9[_0x35a03d(0x1c8)](_0x252950,_0x35a03d(0x1ca)),_0x5d4850=JSON[_0x35a03d(0x1ec)](await a220_0x14ad6f[_0x35a03d(0x1e5)](_0x4b9261,_0x35a03d(0x1f7)));if(!_0x5d4850||typeof _0x5d4850!==_0x35a03d(0x1dc))throw new Error(_0x35a03d(0x1c1));}const LOCAL_FORBIDDEN_NAMES=new Set([a220_0x20ac04(0x213),a220_0x20ac04(0x1aa),a220_0x20ac04(0x221),a220_0x20ac04(0x1c6),a220_0x20ac04(0x1d1),a220_0x20ac04(0x1eb),'.rabetbase',a220_0x20ac04(0x20f),a220_0x20ac04(0x1bf),'node_modules']);function a220_0x1e62(_0xd65687,_0x9b8c14){_0xd65687=_0xd65687-0x1a9;const _0x2bc948=a220_0x2bc9();let _0x1e6290=_0x2bc948[_0xd65687];return _0x1e6290;}function isForbiddenTemplateEntry(_0x2e92b9){const _0x2e2814=a220_0x20ac04;if(LOCAL_FORBIDDEN_NAMES[_0x2e2814(0x1fc)](_0x2e92b9))return!![];return _0x2e92b9===_0x2e2814(0x1ad)||_0x2e92b9[_0x2e2814(0x1fd)](_0x2e2814(0x205))&&_0x2e92b9!==_0x2e2814(0x21b);}function containsPath(_0x34b1e9,_0x34e739){const _0x3c9f9d=a220_0x20ac04,_0x2308c7=a220_0x2b64c9['relative'](_0x34b1e9,_0x34e739);return _0x2308c7===''||!_0x2308c7['startsWith']('..'+a220_0x2b64c9['sep'])&&_0x2308c7!=='..'&&!a220_0x2b64c9[_0x3c9f9d(0x1ee)](_0x2308c7);}async function copyLocalTemplateDirectory(_0x3aeb95,_0x2a85dd){const _0x407a9f=a220_0x20ac04;await a220_0x14ad6f[_0x407a9f(0x1bb)](_0x2a85dd,{'recursive':!![]});for(const _0x38cccb of await a220_0x14ad6f[_0x407a9f(0x1ae)](_0x3aeb95,{'withFileTypes':!![]})){const _0x5782ef=a220_0x2b64c9[_0x407a9f(0x1c8)](_0x3aeb95,_0x38cccb['name']),_0x238bb2=a220_0x2b64c9[_0x407a9f(0x1c8)](_0x2a85dd,_0x38cccb['name']);if(isForbiddenTemplateEntry(_0x38cccb[_0x407a9f(0x212)]))throw new Error(_0x407a9f(0x20b)+_0x5782ef);const _0x204bf7=await a220_0x14ad6f[_0x407a9f(0x20c)](_0x5782ef);if(_0x204bf7[_0x407a9f(0x1e0)]())throw new Error(_0x407a9f(0x1e4)+_0x5782ef);if(_0x204bf7[_0x407a9f(0x1d0)]()){await copyLocalTemplateDirectory(_0x5782ef,_0x238bb2);continue;}if(!_0x204bf7['isFile']())continue;await a220_0x14ad6f[_0x407a9f(0x200)](_0x5782ef,_0x238bb2),await a220_0x14ad6f['chmod'](_0x238bb2,_0x204bf7[_0x407a9f(0x1f4)]&0x1ff);}}async function readTemplateVersion(_0x445abf){const _0x420a42=a220_0x20ac04,_0x502b3b=JSON['parse'](await a220_0x14ad6f[_0x420a42(0x1e5)](a220_0x2b64c9[_0x420a42(0x1c8)](_0x445abf,_0x420a42(0x1ca)),_0x420a42(0x1f7)));return nonEmptyString(_0x502b3b['version'])||_0x420a42(0x1c3);}async function readDirectoryIdentity(_0x26a2a8){const _0x6803db=a220_0x20ac04;try{const _0x3dd2a7=await a220_0x14ad6f[_0x6803db(0x20c)](_0x26a2a8);if(!_0x3dd2a7[_0x6803db(0x1d0)]())return null;return{'dev':_0x3dd2a7[_0x6803db(0x1af)],'ino':_0x3dd2a7[_0x6803db(0x20a)]};}catch{return null;}}async function commitStagedProject(_0x515556,_0x3292e6){const _0x3f93c0=a220_0x20ac04;await a220_0x14ad6f[_0x3f93c0(0x1bb)](_0x3292e6);const _0x1be8e7=await readDirectoryIdentity(_0x3292e6);if(!_0x1be8e7)throw new Error(_0x3f93c0(0x1f6));try{for(const _0x5e7e84 of await a220_0x14ad6f[_0x3f93c0(0x1ae)](_0x515556)){await a220_0x14ad6f[_0x3f93c0(0x21e)](a220_0x2b64c9[_0x3f93c0(0x1c8)](_0x515556,_0x5e7e84),a220_0x2b64c9[_0x3f93c0(0x1c8)](_0x3292e6,_0x5e7e84));}}catch(_0x43641f){const _0x456bb5=await readDirectoryIdentity(_0x3292e6);_0x456bb5?.[_0x3f93c0(0x1af)]===_0x1be8e7['dev']&&_0x456bb5[_0x3f93c0(0x20a)]===_0x1be8e7['ino']&&await a220_0x14ad6f['rm'](_0x3292e6,{'recursive':!![],'force':!![]});throw _0x43641f;}}export async function materializeProjectTemplate(_0x2f213a,_0x2a2d6c){const _0x13c30c=a220_0x20ac04,_0x3b6b54=a220_0x2b64c9[_0x13c30c(0x1b6)](_0x2f213a),_0x5d8d3f=a220_0x2b64c9[_0x13c30c(0x1ba)](_0x3b6b54);try{await a220_0x14ad6f[_0x13c30c(0x20c)](_0x3b6b54);throw new Error(_0x13c30c(0x1df)+_0x3b6b54);}catch(_0x40c0d9){if(_0x40c0d9[_0x13c30c(0x1b9)]!==_0x13c30c(0x1e7))throw _0x40c0d9;}const _0x69bb06=await a220_0x14ad6f[_0x13c30c(0x222)](a220_0x2b64c9[_0x13c30c(0x1c8)](_0x5d8d3f,_0x13c30c(0x1b0))),_0x2fc62d=a220_0x2b64c9[_0x13c30c(0x1c8)](_0x69bb06,_0x13c30c(0x1de)),_0x52d21e=a220_0x2b64c9[_0x13c30c(0x1c8)](_0x69bb06,_0x13c30c(0x214));try{try{_0x2a2d6c?.('resolving');const {descriptor:_0x3d4c77,channel:_0x30220a,assetBaseUrl:_0x5dd6bf,legacyAssetBaseUrl:_0x1e9c92}=await fetchTemplateDescriptor();return _0x2a2d6c?.(_0x13c30c(0x209)),await downloadArchive(_0x3d4c77,_0x30220a,_0x5dd6bf,_0x1e9c92,_0x52d21e,_0x2a2d6c),_0x2a2d6c?.(_0x13c30c(0x20d)),await extractProjectTemplateArchive(_0x52d21e,_0x2fc62d),await assertTemplateRoot(_0x2fc62d),await commitStagedProject(_0x2fc62d,_0x3b6b54),{'source':'cdn','version':_0x3d4c77[_0x13c30c(0x1ed)]};}catch(_0x31049f){if(_0x31049f[_0x13c30c(0x1b9)]===_0x13c30c(0x201))throw CliErrors[_0x13c30c(0x1e2)](_0x13c30c(0x1df)+_0x3b6b54,'Use\x20a\x20different\x20project\x20name.');const _0x559b38=_0x31049f instanceof Error?_0x31049f[_0x13c30c(0x1e1)]:String(_0x31049f);throw CliErrors[_0x13c30c(0x1e2)](_0x13c30c(0x1f5),_0x13c30c(0x1b5)+_0x559b38);}}finally{await a220_0x14ad6f['rm'](_0x69bb06,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x330e5e,_0x4339a,_0x1885fc){const _0x2a00a1=a220_0x20ac04;let _0x4f512b;try{_0x4f512b=await a220_0x14ad6f[_0x2a00a1(0x1cf)](a220_0x2b64c9[_0x2a00a1(0x1b6)](_0x330e5e));}catch{throw CliErrors[_0x2a00a1(0x1e2)](_0x2a00a1(0x203)+a220_0x2b64c9['resolve'](_0x330e5e),_0x2a00a1(0x1e3));}const _0x57eaee=await a220_0x14ad6f[_0x2a00a1(0x20c)](_0x4f512b);if(!_0x57eaee[_0x2a00a1(0x1d0)]())throw CliErrors[_0x2a00a1(0x1e2)](_0x2a00a1(0x1ac)+_0x4f512b);const _0x38e108=a220_0x2b64c9[_0x2a00a1(0x1b6)](_0x4339a),_0xd78eb3=await a220_0x14ad6f[_0x2a00a1(0x1cf)](a220_0x2b64c9[_0x2a00a1(0x1ba)](_0x38e108)),_0x36474b=a220_0x2b64c9['join'](_0xd78eb3,a220_0x2b64c9['basename'](_0x38e108));if(containsPath(_0x4f512b,_0x36474b)||containsPath(_0x36474b,_0x4f512b))throw CliErrors[_0x2a00a1(0x1e2)]('Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.',_0x2a00a1(0x1d2));try{await a220_0x14ad6f[_0x2a00a1(0x20c)](_0x36474b);throw CliErrors[_0x2a00a1(0x1e2)]('Project\x20directory\x20already\x20exists:\x20'+_0x36474b,'Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.');}catch(_0x58478b){if(_0x58478b[_0x2a00a1(0x1b9)]!=='ENOENT')throw _0x58478b;}const _0x47e97e=a220_0x2b64c9['dirname'](_0x36474b);await a220_0x14ad6f[_0x2a00a1(0x1d9)](_0x47e97e);const _0x5204b3=await a220_0x14ad6f[_0x2a00a1(0x222)](a220_0x2b64c9[_0x2a00a1(0x1c8)](_0x47e97e,_0x2a00a1(0x1b0))),_0x210c04=a220_0x2b64c9[_0x2a00a1(0x1c8)](_0x5204b3,_0x2a00a1(0x1de));try{_0x1885fc?.(_0x2a00a1(0x1c9)),await copyLocalTemplateDirectory(_0x4f512b,_0x210c04),await assertTemplateRoot(_0x210c04);const _0x56dde4=await readTemplateVersion(_0x210c04);return await commitStagedProject(_0x210c04,_0x36474b),{'source':_0x2a00a1(0x1c3),'version':_0x56dde4};}catch(_0x204ed8){const _0x350243=_0x204ed8 instanceof Error?_0x204ed8[_0x2a00a1(0x1e1)]:String(_0x204ed8);throw CliErrors[_0x2a00a1(0x1e2)](_0x2a00a1(0x1d4)+_0x350243,_0x2a00a1(0x1c4));}finally{await a220_0x14ad6f['rm'](_0x5204b3,{'recursive':!![],'force':!![]});}}
|
|
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 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x286154,_0x16203d){const _0x409954=a221_0x57aa,_0x2290c2=_0x286154();while(!![]){try{const _0x1dd380=parseInt(_0x409954(0x1d2))/0x1*(parseInt(_0x409954(0x1d4))/0x2)+parseInt(_0x409954(0x1d9))/0x3+-parseInt(_0x409954(0x1da))/0x4+parseInt(_0x409954(0x1db))/0x5+parseInt(_0x409954(0x1cd))/0x6*(-parseInt(_0x409954(0x1d3))/0x7)+-parseInt(_0x409954(0x1dc))/0x8+parseInt(_0x409954(0x1d1))/0x9;if(_0x1dd380===_0x16203d)break;else _0x2290c2['push'](_0x2290c2['shift']());}catch(_0x2a6869){_0x2290c2['push'](_0x2290c2['shift']());}}}(a221_0x37e1,0xbc170));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;export function getProjectNameValidationError(_0xd66511){const _0x28b9f4=a221_0x57aa,_0x194976=_0xd66511['trim']();if(!_0x194976)return _0x28b9f4(0x1d0);if(_0x194976[_0x28b9f4(0x1d7)]>MAX_PROJECT_NAME_LENGTH)return _0x28b9f4(0x1cf)+MAX_PROJECT_NAME_LENGTH+_0x28b9f4(0x1d6);if(!PROJECT_NAME_PATTERN['test'](_0x194976))return _0x28b9f4(0x1ce);if(WINDOWS_RESERVED_NAME[_0x28b9f4(0x1d8)](_0x194976))return _0x28b9f4(0x1dd)+_0x194976+'\x22\x20is\x20reserved\x20on\x20Windows';return null;}function a221_0x57aa(_0x367055,_0x575fc1){_0x367055=_0x367055-0x1cd;const _0x37e16e=a221_0x37e1();let _0x57aa5d=_0x37e16e[_0x367055];return _0x57aa5d;}function a221_0x37e1(){const _0x3a393e=['test','686253mnZunz','3417184RerMtO','1751320OkxNip','2487128WbKijl','Project\x20name\x20\x22','972084PLKhcf','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','Project\x20name\x20cannot\x20exceed\x20','Project\x20name\x20cannot\x20be\x20empty','12370527lTsiIx','81yfJDcn','7cLVoBH','3558VVssIW','trim','\x20characters','length'];a221_0x37e1=function(){return _0x3a393e;};return a221_0x37e1();}export function validateProjectName(_0x46c5d5){const _0x48c215=a221_0x57aa,_0x114086=_0x46c5d5[_0x48c215(0x1d5)](),_0x200dcc=getProjectNameValidationError(_0x114086);if(_0x200dcc)throw CliErrors['validation'](_0x200dcc,'Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.');return _0x114086;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2bc6e7,_0x32366f){const _0x384d04=a222_0x4e79,_0x342dc0=_0x2bc6e7();while(!![]){try{const _0x2d2eac=parseInt(_0x384d04(0x1e9))/0x1+parseInt(_0x384d04(0x1f8))/0x2*(parseInt(_0x384d04(0x1fa))/0x3)+parseInt(_0x384d04(0x206))/0x4+-parseInt(_0x384d04(0x208))/0x5*(parseInt(_0x384d04(0x1f6))/0x6)+parseInt(_0x384d04(0x1e8))/0x7+parseInt(_0x384d04(0x207))/0x8+parseInt(_0x384d04(0x1fb))/0x9*(-parseInt(_0x384d04(0x1f9))/0xa);if(_0x2d2eac===_0x32366f)break;else _0x342dc0['push'](_0x342dc0['shift']());}catch(_0x50ce89){_0x342dc0['push'](_0x342dc0['shift']());}}}(a222_0x5ae9,0x252c4));import{createWriteStream}from'node:fs';import a222_0x1a16ae from'node:fs/promises';import a222_0x3cde21 from'node:path';import{pipeline}from'node:stream/promises';import a222_0x535ae6 from'yauzl';function a222_0x5ae9(){const _0x50f34c=['dirname','fileName','endsWith','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','openReadStream','300vglwxl','error','1048xfMaBz','10HunxaD','426xcCkhQ','5134923Xbtvth','en-US','isEncrypted','join','once','mkdir','add','externalFileAttributes','end','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','Project\x20template\x20ZIP\x20exceeds\x20','1154968dBcnQp','977584kWFSMD','14425gQRyrf','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','close','\x20entries.','split','replace','open','readEntry','length','has','test','Case-conflicting\x20ZIP\x20entry\x20path:\x20','toLocaleLowerCase','1007230hDyZTj','237819OTbTWi','slice','set','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','entry','startsWith','sep'];a222_0x5ae9=function(){return _0x50f34c;};return a222_0x5ae9();}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(_0x29cc87){return new Promise((_0xf4e433,_0x136c0a)=>{const _0x4c3c17=a222_0x4e79;a222_0x535ae6[_0x4c3c17(0x20e)](_0x29cc87,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x1f4078,_0x1b705c)=>{if(_0x1f4078||!_0x1b705c){_0x136c0a(_0x1f4078||new Error('Unable\x20to\x20open\x20project\x20template\x20archive.'));return;}_0xf4e433(_0x1b705c);});});}function openEntryStream(_0x4fafb1,_0x550f78){return new Promise((_0x36879c,_0x497a65)=>{const _0x274244=a222_0x4e79;_0x4fafb1[_0x274244(0x1f5)](_0x550f78,(_0x34bcdb,_0xb3b3eb)=>{const _0x25bdf2=_0x274244;if(_0x34bcdb||!_0xb3b3eb){_0x497a65(_0x34bcdb||new Error('Unable\x20to\x20read\x20ZIP\x20entry:\x20'+_0x550f78[_0x25bdf2(0x1f2)]));return;}_0x36879c(_0xb3b3eb);});});}function validateEntryPath(_0x39412b){const _0x515b9b=a222_0x4e79,_0x563e2a=_0x39412b[_0x515b9b(0x20d)](/\\/g,'/'),_0x21a088=_0x563e2a[_0x515b9b(0x1f3)]('/'),_0x16f5f3=_0x21a088?_0x563e2a[_0x515b9b(0x1ea)](0x0,-0x1):_0x563e2a;if(!_0x16f5f3||_0x563e2a['startsWith']('/')||/^[A-Za-z]:\//[_0x515b9b(0x212)](_0x563e2a))throw new Error('Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20'+_0x39412b);const _0x13ed02=_0x16f5f3[_0x515b9b(0x20c)]('/');for(const _0x5923fa of _0x13ed02){if(!_0x5923fa||_0x5923fa==='.'||_0x5923fa==='..'||_0x5923fa[_0x515b9b(0x1f3)]('.')||_0x5923fa[_0x515b9b(0x1f3)]('\x20')||WINDOWS_INVALID_CHAR[_0x515b9b(0x212)](_0x5923fa)||WINDOWS_RESERVED_NAME['test'](_0x5923fa))throw new Error(_0x515b9b(0x204)+_0x39412b);}return{'relativePath':_0x13ed02[_0x515b9b(0x1fe)](a222_0x3cde21['sep']),'directory':_0x21a088};}function isSymbolicLink(_0x5df157){const _0x395e4c=a222_0x4e79,_0x1552a0=_0x5df157[_0x395e4c(0x202)]>>>0x10&0xffff;return(_0x1552a0&0xf000)===0xa000;}function a222_0x4e79(_0xfc3ac6,_0x174f82){_0xfc3ac6=_0xfc3ac6-0x1e8;const _0x5ae910=a222_0x5ae9();let _0x4e7956=_0x5ae910[_0xfc3ac6];return _0x4e7956;}export async function extractProjectTemplateArchive(_0x1ba4fa,_0x396504){const _0x1bb78d=a222_0x4e79,_0x10e30d=await openZip(_0x1ba4fa),_0x59c85d=a222_0x3cde21['resolve'](_0x396504),_0x57ce59=new Set(),_0x4dc28c=new Map();let _0x21e468=0x0,_0x550d53=0x0;await a222_0x1a16ae[_0x1bb78d(0x200)](_0x59c85d,{'recursive':!![]}),await new Promise((_0x5375ed,_0xf7d7d2)=>{const _0xf7ce74=_0x1bb78d;let _0x2dffd6=![];const _0x12aa8f=_0x4d1805=>{const _0x36d61a=a222_0x4e79;if(_0x2dffd6)return;_0x2dffd6=!![],_0x10e30d[_0x36d61a(0x20a)](),_0xf7d7d2(_0x4d1805 instanceof Error?_0x4d1805:new Error(String(_0x4d1805)));};_0x10e30d['once'](_0xf7ce74(0x1f7),_0x12aa8f),_0x10e30d[_0xf7ce74(0x1ff)](_0xf7ce74(0x203),()=>{if(_0x2dffd6)return;_0x2dffd6=!![],_0x5375ed();}),_0x10e30d['on'](_0xf7ce74(0x1ee),_0x312117=>{void(async()=>{const _0x998151=a222_0x4e79;_0x21e468+=0x1,_0x550d53+=_0x312117['uncompressedSize'];if(_0x21e468>MAX_ENTRY_COUNT)throw new Error(_0x998151(0x205)+MAX_ENTRY_COUNT+_0x998151(0x20b));if(_0x550d53>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x998151(0x209));if(_0x312117[_0x998151(0x1fd)]())throw new Error(_0x998151(0x1ed)+_0x312117[_0x998151(0x1f2)]);if(isSymbolicLink(_0x312117))throw new Error('Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20'+_0x312117[_0x998151(0x1f2)]);const {relativePath:_0x3dcfa8,directory:_0x384ace}=validateEntryPath(_0x312117[_0x998151(0x1f2)]),_0x3e7e33=_0x3dcfa8[_0x998151(0x20c)](a222_0x3cde21[_0x998151(0x1f0)]);for(let _0x2e35a2=0x1;_0x2e35a2<=_0x3e7e33[_0x998151(0x210)];_0x2e35a2+=0x1){const _0x33f942=_0x3e7e33[_0x998151(0x1ea)](0x0,_0x2e35a2)[_0x998151(0x1fe)](a222_0x3cde21[_0x998151(0x1f0)]),_0x27cb52=_0x33f942[_0x998151(0x214)](_0x998151(0x1fc)),_0x3c2119=_0x4dc28c['get'](_0x27cb52);if(_0x3c2119&&_0x3c2119!==_0x33f942)throw new Error(_0x998151(0x213)+_0x312117[_0x998151(0x1f2)]);_0x4dc28c[_0x998151(0x1eb)](_0x27cb52,_0x33f942);}const _0x1f3276=_0x3dcfa8[_0x998151(0x214)]('en-US');if(_0x57ce59[_0x998151(0x211)](_0x1f3276))throw new Error(_0x998151(0x1ec)+_0x312117[_0x998151(0x1f2)]);_0x57ce59[_0x998151(0x201)](_0x1f3276);const _0x2a4aca=a222_0x3cde21['resolve'](_0x59c85d,_0x3dcfa8);if(_0x2a4aca!==_0x59c85d&&!_0x2a4aca[_0x998151(0x1ef)](''+_0x59c85d+a222_0x3cde21[_0x998151(0x1f0)]))throw new Error(_0x998151(0x1f4)+_0x312117[_0x998151(0x1f2)]);if(_0x384ace)await a222_0x1a16ae[_0x998151(0x200)](_0x2a4aca,{'recursive':!![]});else{await a222_0x1a16ae[_0x998151(0x200)](a222_0x3cde21[_0x998151(0x1f1)](_0x2a4aca),{'recursive':!![]});const _0x503f09=await openEntryStream(_0x10e30d,_0x312117);await pipeline(_0x503f09,createWriteStream(_0x2a4aca,{'flags':'wx','mode':0x1a4}));}_0x10e30d['readEntry']();})()['catch'](_0x12aa8f);}),_0x10e30d[_0xf7ce74(0x20f)]();});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a223_0x9a29e0=a223_0x318d;function a223_0x4938(){const _0x18c315=['6gFkGjT','1488494jJIhcU','6841900TCYzgE','resolve','dirname','1040484YBCmDW','9SwVcdl','2801904eOtspZ','218018jDZalh','1021461tsSAaY','../../../../','326088bopOvY','5HDVZoD'];a223_0x4938=function(){return _0x18c315;};return a223_0x4938();}(function(_0x569ba2,_0x1a07e4){const _0x3d237f=a223_0x318d,_0x34d9c3=_0x569ba2();while(!![]){try{const _0x3ae4e6=-parseInt(_0x3d237f(0x14d))/0x1+-parseInt(_0x3d237f(0x14a))/0x2+parseInt(_0x3d237f(0x14b))/0x3+-parseInt(_0x3d237f(0x154))/0x4*(parseInt(_0x3d237f(0x14e))/0x5)+parseInt(_0x3d237f(0x14f))/0x6*(parseInt(_0x3d237f(0x150))/0x7)+-parseInt(_0x3d237f(0x149))/0x8+-parseInt(_0x3d237f(0x148))/0x9*(-parseInt(_0x3d237f(0x151))/0xa);if(_0x3ae4e6===_0x1a07e4)break;else _0x34d9c3['push'](_0x34d9c3['shift']());}catch(_0x197fb8){_0x34d9c3['push'](_0x34d9c3['shift']());}}}(a223_0x4938,0x2ed77));import a223_0x195444 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a223_0x195444[a223_0x9a29e0(0x153)](fileURLToPath(import.meta.url));function a223_0x318d(_0x290aa2,_0x475348){_0x290aa2=_0x290aa2-0x148;const _0x493805=a223_0x4938();let _0x318df7=_0x493805[_0x290aa2];return _0x318df7;}export function getRabetbaseCliPackageRoot(){const _0xb41730=a223_0x9a29e0;return a223_0x195444[_0xb41730(0x152)](__dirname,_0xb41730(0x14c));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2365fe,_0x4b18af){const _0xbd8c8b=a224_0x59d8,_0x47bbf8=_0x2365fe();while(!![]){try{const _0x49b9f7=parseInt(_0xbd8c8b(0x11e))/0x1+parseInt(_0xbd8c8b(0x115))/0x2*(parseInt(_0xbd8c8b(0x125))/0x3)+-parseInt(_0xbd8c8b(0x121))/0x4+-parseInt(_0xbd8c8b(0x127))/0x5*(parseInt(_0xbd8c8b(0x120))/0x6)+parseInt(_0xbd8c8b(0x11d))/0x7+parseInt(_0xbd8c8b(0x123))/0x8+-parseInt(_0xbd8c8b(0x11b))/0x9;if(_0x49b9f7===_0x4b18af)break;else _0x47bbf8['push'](_0x47bbf8['shift']());}catch(_0x5437a4){_0x47bbf8['push'](_0x47bbf8['shift']());}}}(a224_0x546d,0xdd5c7));function a224_0x546d(){const _0x4ab8e9=['error','Failed\x20to\x20copy\x20project\x20template','copy','resolve','now','18295425grzeMC','info','6267156BqpOpA','935358JMIAMR','Project\x20template\x20created','18UxXLVD','2612596AuHJkw','cwd','11326304xqpEaT','success','405fXPaDI','version','1694350RSNbLO','message','20190lQNlPo'];a224_0x546d=function(){return _0x4ab8e9;};return a224_0x546d();}import a224_0x3b539a 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';function a224_0x59d8(_0x53b0ee,_0x51e8eb){_0x53b0ee=_0x53b0ee-0x115;const _0x546d8f=a224_0x546d();let _0x59d83a=_0x546d8f[_0x53b0ee];return _0x59d83a;}export async function copyProjectTemplate(_0x37323c,_0x1502a2,_0x156306){const _0xbc31e6=a224_0x59d8,_0x3bb8e8=Date[_0xbc31e6(0x11a)](),_0x27e532=a224_0x3b539a[_0xbc31e6(0x119)](process[_0xbc31e6(0x122)](),_0x37323c);try{logger[_0xbc31e6(0x11c)](_0xbc31e6(0x118),'Starting\x20project\x20template\x20creation',{'projectCode':_0x37323c});const _0x4bb4db=_0x156306?await materializeLocalProjectTemplate(_0x156306,_0x27e532,_0x1502a2):await materializeProjectTemplate(_0x27e532,_0x1502a2),_0x476ce5=Date[_0xbc31e6(0x11a)]()-_0x3bb8e8;logger[_0xbc31e6(0x124)](_0xbc31e6(0x118),_0xbc31e6(0x11f),_0x476ce5,{'projectCode':_0x37323c,'templateSource':_0x4bb4db['source'],'templateVersion':_0x4bb4db[_0xbc31e6(0x126)]});}catch(_0x28e1c0){const _0x5b0ef6=Date[_0xbc31e6(0x11a)]()-_0x3bb8e8;logger[_0xbc31e6(0x116)](_0xbc31e6(0x118),_0xbc31e6(0x117),{'projectCode':_0x37323c,'error':_0x28e1c0 instanceof Error?_0x28e1c0[_0xbc31e6(0x128)]:String(_0x28e1c0),'duration':_0x5b0ef6});throw _0x28e1c0;}return formatElapsed(_0x3bb8e8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x110092,_0x20ee89){const _0x4a76c5=a225_0x3b6d,_0x37571e=_0x110092();while(!![]){try{const _0x20d68c=-parseInt(_0x4a76c5(0x1ed))/0x1*(parseInt(_0x4a76c5(0x1f0))/0x2)+-parseInt(_0x4a76c5(0x200))/0x3*(-parseInt(_0x4a76c5(0x1fc))/0x4)+-parseInt(_0x4a76c5(0x1f2))/0x5*(parseInt(_0x4a76c5(0x1f5))/0x6)+-parseInt(_0x4a76c5(0x1ef))/0x7+parseInt(_0x4a76c5(0x1fb))/0x8+parseInt(_0x4a76c5(0x1f3))/0x9+parseInt(_0x4a76c5(0x1f9))/0xa*(-parseInt(_0x4a76c5(0x1f6))/0xb);if(_0x20d68c===_0x20ee89)break;else _0x37571e['push'](_0x37571e['shift']());}catch(_0x35c555){_0x37571e['push'](_0x37571e['shift']());}}}(a225_0xdb6b,0x22164));import a225_0xf2f77e from'node:path';import{execa}from'execa';function a225_0xdb6b(){const _0x10b188=['message','16620UoJeMs','format','1943464fPKhHR','64VOjGNv','resolve','error','Code\x20format\x20failed','31938DvtqLg','success','now','info','55MqUPWl','Starting\x20code\x20format','99246NZLuHs','3170mrSmpI','Code\x20format\x20completed','433895aowKrJ','1474047LjRTsX','cwd','6UqNjoc','1650OXykcA','prettier'];a225_0xdb6b=function(){return _0x10b188;};return a225_0xdb6b();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a225_0x3b6d(_0x33c0b1,_0x82bf0d){_0x33c0b1=_0x33c0b1-0x1ec;const _0xdb6b02=a225_0xdb6b();let _0x3b6d9f=_0xdb6b02[_0x33c0b1];return _0x3b6d9f;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x39b340){const _0x2730b8=a225_0x3b6d,_0x22d0ce=Date[_0x2730b8(0x202)](),_0x4e79d0=a225_0xf2f77e[_0x2730b8(0x1fd)](process[_0x2730b8(0x1f4)](),_0x39b340);try{logger[_0x2730b8(0x1ec)](_0x2730b8(0x1fa),_0x2730b8(0x1ee),{'projectCode':_0x39b340}),await execa(resolveNpmBin('npx'),[_0x2730b8(0x1f7),'--write','.'],{'cwd':_0x4e79d0});const _0x1432ff=Date[_0x2730b8(0x202)]()-_0x22d0ce;logger[_0x2730b8(0x201)](_0x2730b8(0x1fa),_0x2730b8(0x1f1),_0x1432ff,{'projectCode':_0x39b340});}catch(_0x346d61){const _0xda005d=Date[_0x2730b8(0x202)]()-_0x22d0ce;logger[_0x2730b8(0x1fe)](_0x2730b8(0x1fa),_0x2730b8(0x1ff),{'projectCode':_0x39b340,'error':_0x346d61 instanceof Error?_0x346d61[_0x2730b8(0x1f8)]:String(_0x346d61),'duration':_0xda005d});throw _0x346d61;}return formatElapsed(_0x22d0ce);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x59a6dd,_0x24dad9){const _0x35ffd9=a226_0x2e9e,_0x59f361=_0x59a6dd();while(!![]){try{const _0x5b3c38=parseInt(_0x35ffd9(0x1cf))/0x1*(parseInt(_0x35ffd9(0x1e0))/0x2)+parseInt(_0x35ffd9(0x1d2))/0x3+parseInt(_0x35ffd9(0x1d6))/0x4+-parseInt(_0x35ffd9(0x1de))/0x5+parseInt(_0x35ffd9(0x1e1))/0x6*(-parseInt(_0x35ffd9(0x1d7))/0x7)+parseInt(_0x35ffd9(0x1dc))/0x8*(-parseInt(_0x35ffd9(0x1e3))/0x9)+-parseInt(_0x35ffd9(0x1db))/0xa;if(_0x5b3c38===_0x24dad9)break;else _0x59f361['push'](_0x59f361['shift']());}catch(_0x1c6949){_0x59f361['push'](_0x59f361['shift']());}}}(a226_0x4743,0xbfea1));import a226_0x324704 from'node:path';import{execa}from'execa';function a226_0x4743(){const _0x2457ec=['27AqToOm','Dependency\x20install\x20completed','1233509qIDYwD','https://registry.npmmirror.com','success','1646433takvnT','npm','error','Dependency\x20install\x20failed','4990304DHaYOA','7LeMZXw','info','resolve','--registry','1335110cpLtNK','3354456FWAaEY','Starting\x20dependency\x20install','2878195LsTxOg','install','2trtgUA','1660464JCTijv','now'];a226_0x4743=function(){return _0x2457ec;};return a226_0x4743();}function a226_0x2e9e(_0x4e58bd,_0x37a306){_0x4e58bd=_0x4e58bd-0x1ce;const _0x47439f=a226_0x4743();let _0x2e9ed=_0x47439f[_0x4e58bd];return _0x2e9ed;}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(_0x290081){const _0x21d2e2=a226_0x2e9e,_0x359f78=Date[_0x21d2e2(0x1e2)](),_0x2e1e16=a226_0x324704[_0x21d2e2(0x1d9)](process['cwd'](),_0x290081);try{logger[_0x21d2e2(0x1d8)](_0x21d2e2(0x1df),_0x21d2e2(0x1dd),{'projectCode':_0x290081,'registry':_0x21d2e2(0x1d0)}),await execa(resolveNpmBin(_0x21d2e2(0x1d3)),[_0x21d2e2(0x1df),_0x21d2e2(0x1da),_0x21d2e2(0x1d0)],{'cwd':_0x2e1e16});const _0x11f785=Date[_0x21d2e2(0x1e2)]()-_0x359f78;logger[_0x21d2e2(0x1d1)](_0x21d2e2(0x1df),_0x21d2e2(0x1ce),_0x11f785,{'projectCode':_0x290081});}catch(_0x1a30fa){const _0x46ca2e=Date[_0x21d2e2(0x1e2)]()-_0x359f78;logger[_0x21d2e2(0x1d4)]('install',_0x21d2e2(0x1d5),{'projectCode':_0x290081,'error':_0x1a30fa instanceof Error?_0x1a30fa['message']:String(_0x1a30fa),'duration':_0x46ca2e});throw _0x1a30fa;}return formatElapsed(_0x359f78);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a227_0x46553a=a227_0x3198;(function(_0x84ded6,_0x3e3b50){const _0x2a9cb9=a227_0x3198,_0x466799=_0x84ded6();while(!![]){try{const _0x23a082=-parseInt(_0x2a9cb9(0x19d))/0x1+parseInt(_0x2a9cb9(0x19f))/0x2+parseInt(_0x2a9cb9(0x19b))/0x3+parseInt(_0x2a9cb9(0x198))/0x4+-parseInt(_0x2a9cb9(0x19e))/0x5*(-parseInt(_0x2a9cb9(0x197))/0x6)+parseInt(_0x2a9cb9(0x195))/0x7*(-parseInt(_0x2a9cb9(0x192))/0x8)+-parseInt(_0x2a9cb9(0x194))/0x9;if(_0x23a082===_0x3e3b50)break;else _0x466799['push'](_0x466799['shift']());}catch(_0x51bc2d){_0x466799['push'](_0x466799['shift']());}}}(a227_0x5e7f,0xabb68));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a227_0x3198(_0x41dcb4,_0x158c19){_0x41dcb4=_0x41dcb4-0x190;const _0x5e7fe0=a227_0x5e7f();let _0x3198d0=_0x5e7fe0[_0x41dcb4];return _0x3198d0;}import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':'project','command':a227_0x46553a(0x19c),'description':a227_0x46553a(0x193),'risk':a227_0x46553a(0x196),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x22570f=a227_0x46553a,_0x16fd88=findProjectRootDirectory();if(!resolveConfigPath(_0x16fd88))throw CliErrors['validation'](_0x22570f(0x19a),'Run\x20'+CLI_BIN_NAME+_0x22570f(0x191));const _0x216bd5=writeProjectDomainRoutingManifest(_0x16fd88);return{'ok':!![],'message':_0x22570f(0x190)+_0x216bd5[_0x22570f(0x199)],'data':_0x216bd5};}};function a227_0x5e7f(){const _0x8cfb55=['284205LSupyn','395FGypOi','1190614yAYnwh','Domain\x20routing\x20synchronized:\x20','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','77272xkzPDX','Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','3732732ehIqxS','203oUIwlK','read','33042MxgxHq','381840yzihqS','path','No\x20Rabetbase\x20project\x20configuration\x20was\x20found.','1669740djoiAW','domain-routing-sync'];a227_0x5e7f=function(){return _0x8cfb55;};return a227_0x5e7f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a228_0x2389bb=a228_0x18fa;(function(_0x7b23ee,_0x53719e){const _0x5945f7=a228_0x18fa,_0x2d39b5=_0x7b23ee();while(!![]){try{const _0x54d696=-parseInt(_0x5945f7(0x14e))/0x1+-parseInt(_0x5945f7(0x167))/0x2+parseInt(_0x5945f7(0x155))/0x3*(-parseInt(_0x5945f7(0x165))/0x4)+-parseInt(_0x5945f7(0x148))/0x5*(-parseInt(_0x5945f7(0x16a))/0x6)+-parseInt(_0x5945f7(0x157))/0x7*(parseInt(_0x5945f7(0x16f))/0x8)+-parseInt(_0x5945f7(0x169))/0x9*(parseInt(_0x5945f7(0x152))/0xa)+parseInt(_0x5945f7(0x150))/0xb;if(_0x54d696===_0x53719e)break;else _0x2d39b5['push'](_0x2d39b5['shift']());}catch(_0x482592){_0x2d39b5['push'](_0x2d39b5['shift']());}}}(a228_0x4c01,0xe8d0a));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a228_0x4c01(){const _0x38f2d0=['60VrMQaB','appcode','args','validation','Prepared\x20local\x20project\x20template\x20directory','24JWrJul','current-dir','string','../../commands/project/create/main.js','Upgrade\x20cancelled.','cookie','name','bool','794430CizYvX','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20','yes','write','trim','964768ZnpMOi','Run\x20','63630644zpOgIE','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','5770aHHNbv','Skip\x20confirmation\x20prompt','completed','5640981AlVPct','cwd','1282883SzGwCq','Project\x20name','PATCH','template-source','project','Upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure','Usage:\x20','Project\x20upgrade\x20completed.','env','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','cancelled','boolean','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','str','4giafYB','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','2894868ZqEojk','nonInteractive','24606NXrVCO'];a228_0x4c01=function(){return _0x38f2d0;};return a228_0x4c01();}import{analyseProjectUpgrade,upgradeApp}from'../../commands/project/upgrade.js';function a228_0x18fa(_0x1278a5,_0x171385){_0x1278a5=_0x1278a5-0x143;const _0x4c012f=a228_0x4c01();let _0x18fab7=_0x4c012f[_0x1278a5];return _0x18fab7;}import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';const createFlags=[{'name':a228_0x2389bb(0x146),'type':a228_0x2389bb(0x171),'description':a228_0x2389bb(0x158)},{'name':a228_0x2389bb(0x15f),'type':a228_0x2389bb(0x171),'description':'Target\x20environment'},{'name':a228_0x2389bb(0x16b),'type':a228_0x2389bb(0x171),'description':a228_0x2389bb(0x160)},{'name':'current-dir','type':a228_0x2389bb(0x162),'description':'Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','default':![]},{'name':'template-source','type':a228_0x2389bb(0x171),'description':a228_0x2389bb(0x16e)}],upgradeFlags=[{'name':a228_0x2389bb(0x14b),'type':a228_0x2389bb(0x162),'description':a228_0x2389bb(0x153),'default':![]}];export const projectDefinitions=[{'service':'project','command':'create','description':'Create\x20a\x20new\x20project','risk':a228_0x2389bb(0x14c),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':a228_0x2389bb(0x166),'required':![]}],'flags':createFlags,async 'execute'(_0x596ce6){const _0x33fbc2=a228_0x2389bb,{createApp:_0x4829fd}=await import(_0x33fbc2(0x143)),_0x116a51=_0x596ce6['str'](_0x33fbc2(0x146))[_0x33fbc2(0x14d)]()||_0x596ce6[_0x33fbc2(0x16c)][0x0]?.[_0x33fbc2(0x14d)](),_0x5d4290=_0x596ce6[_0x33fbc2(0x164)](_0x33fbc2(0x15f))||undefined,_0x36af2e=_0x596ce6[_0x33fbc2(0x164)](_0x33fbc2(0x16b))||undefined,_0x16b4e3=_0x596ce6[_0x33fbc2(0x164)](_0x33fbc2(0x15a))[_0x33fbc2(0x14d)]()||undefined,_0x1243a1=_0x596ce6[_0x33fbc2(0x147)](_0x33fbc2(0x170));if(_0x1243a1&&_0x116a51)throw CliErrors[_0x33fbc2(0x16d)](_0x33fbc2(0x151),_0x33fbc2(0x14f)+CLI_BIN_NAME+_0x33fbc2(0x149));if(_0x596ce6[_0x33fbc2(0x168)]){if(!_0x116a51&&!_0x1243a1)throw CliErrors[_0x33fbc2(0x16d)]('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x33fbc2(0x15d)+CLI_BIN_NAME+_0x33fbc2(0x14a)+CLI_BIN_NAME+_0x33fbc2(0x163));await _0x4829fd({'projectCode':_0x116a51,'appCode':_0x36af2e,'env':_0x5d4290,'cookie':_0x596ce6[_0x33fbc2(0x145)],'currentDir':_0x1243a1,'nonInteractive':!![],'templateSource':_0x16b4e3});}else await _0x4829fd({'projectCode':_0x116a51,'appCode':_0x36af2e,'env':_0x5d4290,'cookie':_0x596ce6[_0x33fbc2(0x145)],'currentDir':_0x1243a1,'templateSource':_0x16b4e3});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a228_0x2389bb(0x15b),'command':'upgrade','description':a228_0x2389bb(0x15c),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'dryRun'(){const _0x106068=a228_0x2389bb,_0x1365c6=analyseProjectUpgrade(process[_0x106068(0x156)]());return{'method':_0x106068(0x159),'url':process[_0x106068(0x156)](),'body':_0x1365c6,'description':'Would\x20upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure\x20without\x20overwriting\x20project-owned\x20entrypoints'};},async 'execute'(_0x4636ed){const _0x432762=a228_0x2389bb,_0x197f01=await upgradeApp(_0x4636ed['nonInteractive'],{'yes':_0x4636ed[_0x432762(0x147)]('yes')});return{'ok':_0x197f01[_0x432762(0x154)]||_0x197f01['cancelled']===!![],'message':_0x197f01[_0x432762(0x161)]?_0x432762(0x144):_0x197f01[_0x432762(0x154)]?_0x432762(0x15e):'Project\x20upgrade\x20completed\x20with\x20follow-up\x20work.','data':_0x197f01};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1314d6,_0x2c1f69){const _0x2378d8=a229_0x3089,_0x4efb4d=_0x1314d6();while(!![]){try{const _0x5b64e7=parseInt(_0x2378d8(0x1fc))/0x1+parseInt(_0x2378d8(0x1f9))/0x2*(-parseInt(_0x2378d8(0x226))/0x3)+-parseInt(_0x2378d8(0x1f8))/0x4*(parseInt(_0x2378d8(0x201))/0x5)+-parseInt(_0x2378d8(0x235))/0x6*(parseInt(_0x2378d8(0x20e))/0x7)+-parseInt(_0x2378d8(0x233))/0x8+-parseInt(_0x2378d8(0x1f2))/0x9*(-parseInt(_0x2378d8(0x1e4))/0xa)+parseInt(_0x2378d8(0x224))/0xb*(parseInt(_0x2378d8(0x1ea))/0xc);if(_0x5b64e7===_0x2c1f69)break;else _0x4efb4d['push'](_0x4efb4d['shift']());}catch(_0x27a01e){_0x4efb4d['push'](_0x4efb4d['shift']());}}}(a229_0x4273,0x4d834));import a229_0x1b810f from'chalk';import a229_0x9f4de9 from'ora';import{existsSync,readFileSync,writeFileSync}from'node:fs';import{resolve}from'node:path';function a229_0x3089(_0x484b39,_0x506f25){_0x484b39=_0x484b39-0x1e4;const _0x4273fa=a229_0x4273();let _0x30893a=_0x4273fa[_0x484b39];return _0x30893a;}import{askConfirm}from'../../commands/menu/shared/inquirer.js';import{analyzeProjectApiArchitecture,upgradeProjectApiArchitecture}from'../../commands/project/api-architecture-upgrade.js';function a229_0x4273(){const _0x275763=['needed','===\x20Upgrade\x20Summary\x20===','\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.','@lovrabet/sdk','\x20\x20\x20\x20\x20\x20\x20','join','Upgrade\x20completed\x20successfully!','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.','Upgrade\x20cancelled.','\x20→\x20latest','apiDir','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','99OOPKKx','groups','48054tksMFb','white','padEnd','done','\x20\x20npm\x20install','Your\x20project\x20is\x20already\x20up-to-date.','parse','gray','\x20\x20\x20\x20','files','failed','string','Step\x202/2:\x20Application\x20source\x20—\x20','636912nJPglK','cyan','15102FVefkW','1468210aexbNV','Step\x201/2:\x20@lovrabet/sdk\x20—\x20','object','profiles','candidatePath','sdkUpgrade','1110684TKIYuw','@lovrabet/sdk:','manualMergeRequired','Upgrade\x20application\x20source','FAIL','upgrade\x20needed','some','log','9uTsiCC','step','red','push','not\x20found\x20or\x20already\x20at\x20latest','detail','16DFncTx','26CReHkg','candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required','[\x22@lovrabet/sdk\x22]:\x20','328599ZJNAaz','succeed','apiArchitecture','utf8','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','699530bjAQFd','===\x20Upgrade\x20Analysis\x20===','green','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','action','package.json','\x20\x20bun\x20install','label','start','source\x20structure\x20is\x20current','stringify','message','Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','399adljLm','Upgrade\x20@lovrabet/sdk','dependencies','bold','length','Proceed\x20with\x20upgrade?','latest','fail','yellow'];a229_0x4273=function(){return _0x275763;};return a229_0x4273();}import{NEW_CONFIG_NAME}from'../../context.js';function readProjectConfig(_0x46e410){const _0x2ab81d=a229_0x3089;try{const _0x200047=JSON[_0x2ab81d(0x22c)](readFileSync(_0x46e410,_0x2ab81d(0x1ff)));return _0x200047&&typeof _0x200047===_0x2ab81d(0x1e6)?_0x200047:{};}catch{return{};}}export function analyseProjectUpgrade(_0xb5004e){const _0x294d49=a229_0x3089;let _0x38d6ca=null;const _0x1fcf28=resolve(_0xb5004e,_0x294d49(0x206));if(existsSync(_0x1fcf28))try{const _0x2b2ebc=JSON['parse'](readFileSync(_0x1fcf28,'utf8'));for(const _0xc15dc2 of[_0x294d49(0x210),'devDependencies']){const _0x48eac5=_0x2b2ebc?.[_0xc15dc2]?.[_0x294d49(0x21a)];if(typeof _0x48eac5===_0x294d49(0x231)){_0x48eac5!=='latest'&&(_0x38d6ca={'pkgPath':_0x1fcf28,'currentVersion':_0x48eac5,'field':_0xc15dc2});break;}}}catch{}const _0x167907=resolve(_0xb5004e,NEW_CONFIG_NAME),_0x1dd3e6=existsSync(_0x167907)?readProjectConfig(_0x167907):{},_0x4a3ae3=analyzeProjectApiArchitecture(_0xb5004e,_0x1dd3e6);return{'sdkUpgrade':_0x38d6ca,'apiArchitecture':_0x4a3ae3};}function printReport(_0x3fa793){const _0x312b6a=a229_0x3089;console['log'](''),console[_0x312b6a(0x1f1)](a229_0x1b810f[_0x312b6a(0x211)](_0x312b6a(0x202))),console[_0x312b6a(0x1f1)](''),console[_0x312b6a(0x1f1)](a229_0x1b810f[_0x312b6a(0x234)]('Application\x20source:')+('\x20\x20'+(_0x3fa793[_0x312b6a(0x1fe)][_0x312b6a(0x217)]?a229_0x1b810f[_0x312b6a(0x216)](_0x312b6a(0x1ef)):a229_0x1b810f[_0x312b6a(0x203)]('up-to-date'))));for(const _0xb53a1d of _0x3fa793[_0x312b6a(0x1fe)][_0x312b6a(0x225)]){console[_0x312b6a(0x1f1)]('\x20\x20'+_0xb53a1d[_0x312b6a(0x222)]+'\x20('+_0xb53a1d[_0x312b6a(0x1e7)][_0x312b6a(0x21c)](',\x20')+')');for(const _0x593551 of _0xb53a1d[_0x312b6a(0x22f)]){console[_0x312b6a(0x1f1)](_0x312b6a(0x22e)+_0x593551[_0x312b6a(0x205)][_0x312b6a(0x228)](0x11)+'\x20'+_0x593551['path']),_0x593551[_0x312b6a(0x1e8)]&&console[_0x312b6a(0x1f1)]('\x20\x20\x20\x20\x20\x20candidate:\x20'+_0x593551[_0x312b6a(0x1e8)]);}}_0x3fa793[_0x312b6a(0x1fe)]['skippedLegacyDirectories'][_0x312b6a(0x212)]>0x0&&console[_0x312b6a(0x1f1)](_0x312b6a(0x219));console[_0x312b6a(0x1f1)]('');if(_0x3fa793[_0x312b6a(0x1e9)]){const {currentVersion:_0x382085,field:_0x5139bb,pkgPath:_0x504ac1}=_0x3fa793[_0x312b6a(0x1e9)];console[_0x312b6a(0x1f1)](a229_0x1b810f[_0x312b6a(0x234)]('@lovrabet/sdk:')+('\x20\x20'+a229_0x1b810f['yellow'](_0x504ac1))),console[_0x312b6a(0x1f1)]('\x20\x20Current\x20version\x20in\x20'+_0x5139bb+':\x20'+a229_0x1b810f['yellow'](_0x382085)+'\x20→\x20'+a229_0x1b810f[_0x312b6a(0x203)](_0x312b6a(0x214))),console[_0x312b6a(0x1f1)](_0x312b6a(0x223));}else console[_0x312b6a(0x1f1)](a229_0x1b810f[_0x312b6a(0x234)](_0x312b6a(0x1eb))+'\x20\x20'+a229_0x1b810f[_0x312b6a(0x22d)](_0x312b6a(0x1f6)));console['log']('');}function execUpgradeSdk(_0x126f78){const _0x42bf3a=a229_0x3089;if(!_0x126f78[_0x42bf3a(0x1e9)])return{'step':0x1,'label':_0x42bf3a(0x20f),'ok':!![],'detail':_0x42bf3a(0x204)};const {pkgPath:_0x41f3a2,currentVersion:_0x1c5630,field:_0x219160}=_0x126f78[_0x42bf3a(0x1e9)];try{const _0x41c437=readFileSync(_0x41f3a2,'utf8'),_0x237b25=JSON[_0x42bf3a(0x22c)](_0x41c437);return _0x237b25[_0x219160]['@lovrabet/sdk']=_0x42bf3a(0x214),writeFileSync(_0x41f3a2,JSON[_0x42bf3a(0x20b)](_0x237b25,null,0x2)+'\x0a',_0x42bf3a(0x1ff)),{'step':0x1,'label':_0x42bf3a(0x20f),'ok':!![],'detail':_0x219160+_0x42bf3a(0x1fb)+_0x1c5630+_0x42bf3a(0x221)};}catch(_0xc4bbfd){return{'step':0x1,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0xc4bbfd instanceof Error?_0xc4bbfd[_0x42bf3a(0x20c)]:String(_0xc4bbfd)};}}function printSummary(_0x4aedc7){const _0xbd0c49=a229_0x3089;console[_0xbd0c49(0x1f1)](''),console[_0xbd0c49(0x1f1)](a229_0x1b810f[_0xbd0c49(0x211)](_0xbd0c49(0x218))),console[_0xbd0c49(0x1f1)]('');for(const _0x1d1850 of _0x4aedc7){const _0x15898e=_0x1d1850['ok']?a229_0x1b810f[_0xbd0c49(0x203)]('OK'):a229_0x1b810f[_0xbd0c49(0x1f4)](_0xbd0c49(0x1ee));console[_0xbd0c49(0x1f1)]('\x20\x20'+_0x15898e+'\x20\x20Step\x20'+_0x1d1850[_0xbd0c49(0x1f3)]+':\x20'+_0x1d1850[_0xbd0c49(0x208)]);if(_0x1d1850['detail'])console['log'](_0xbd0c49(0x21b)+a229_0x1b810f[_0xbd0c49(0x22d)](_0x1d1850[_0xbd0c49(0x1f7)]));}console[_0xbd0c49(0x1f1)]('');}export async function upgradeApp(_0xf9801c,_0x5a482d){const _0x5d28ac=a229_0x3089,_0x125190=process['cwd'](),_0x4da70c=analyseProjectUpgrade(_0x125190);if(!_0x4da70c[_0x5d28ac(0x1e9)]&&!_0x4da70c[_0x5d28ac(0x1fe)][_0x5d28ac(0x217)])return console['log'](a229_0x1b810f[_0x5d28ac(0x203)](_0x5d28ac(0x22b))),{'analysis':_0x4da70c,'steps':[],'completed':!![]};printReport(_0x4da70c);const _0x50e0fa=!!(_0x5a482d['yes']||_0x5a482d['Y']||_0xf9801c);if(!_0x50e0fa)try{const _0xf79962=await askConfirm(_0x5d28ac(0x213));if(!_0xf79962)return console[_0x5d28ac(0x1f1)](a229_0x1b810f[_0x5d28ac(0x22d)]('Upgrade\x20cancelled.')),{'analysis':_0x4da70c,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x2f11f8){if(_0x2f11f8?.['message']==='CANCEL')return console[_0x5d28ac(0x1f1)](a229_0x1b810f[_0x5d28ac(0x22d)](_0x5d28ac(0x220))),{'analysis':_0x4da70c,'steps':[],'completed':![],'cancelled':!![]};throw _0x2f11f8;}const _0x3ddb50=[],_0x30ade4=a229_0x9f4de9({'text':_0x5d28ac(0x20d),'color':_0x5d28ac(0x234)})['start'](),_0x4a543b=execUpgradeSdk(_0x4da70c);_0x3ddb50[_0x5d28ac(0x1f5)](_0x4a543b),_0x30ade4[_0x4a543b['ok']?_0x5d28ac(0x1fd):_0x5d28ac(0x215)](_0x5d28ac(0x1e5)+(_0x4a543b[_0x5d28ac(0x1f7)]??(_0x4a543b['ok']?_0x5d28ac(0x229):_0x5d28ac(0x230))));const _0x24c186=a229_0x9f4de9({'text':'Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','color':_0x5d28ac(0x234)})[_0x5d28ac(0x209)]();let _0xb31c50;try{_0xb31c50=await upgradeProjectApiArchitecture(_0x125190);const _0x4a3cfe=_0xb31c50[_0x5d28ac(0x1ec)]?_0x5d28ac(0x1fa):_0x5d28ac(0x20a);_0x24c186['succeed'](_0x5d28ac(0x232)+_0x4a3cfe),_0x3ddb50[_0x5d28ac(0x1f5)]({'step':0x2,'label':_0x5d28ac(0x1ed),'ok':!![],'detail':_0x4a3cfe});}catch(_0xb74fe7){const _0x2dc772=_0xb74fe7 instanceof Error?_0xb74fe7['message']:String(_0xb74fe7);_0x24c186[_0x5d28ac(0x215)]('Step\x202/2:\x20Application\x20source\x20—\x20'+_0x2dc772),_0x3ddb50[_0x5d28ac(0x1f5)]({'step':0x2,'label':_0x5d28ac(0x1ed),'ok':![],'detail':_0x2dc772});}printSummary(_0x3ddb50);const _0x47c0d3=_0x3ddb50[_0x5d28ac(0x1f0)](_0x862922=>!_0x862922['ok']);if(_0x47c0d3)console[_0x5d28ac(0x1f1)](a229_0x1b810f['yellow'](_0x5d28ac(0x200)));else _0xb31c50?.[_0x5d28ac(0x1ec)]?console[_0x5d28ac(0x1f1)](a229_0x1b810f[_0x5d28ac(0x216)](_0x5d28ac(0x21f))):console[_0x5d28ac(0x1f1)](a229_0x1b810f['green'](_0x5d28ac(0x21d)));return _0x4a543b['ok']&&_0x4da70c['sdkUpgrade']&&(console['log'](''),console[_0x5d28ac(0x1f1)](a229_0x1b810f[_0x5d28ac(0x211)][_0x5d28ac(0x234)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console['log'](a229_0x1b810f[_0x5d28ac(0x234)](_0x5d28ac(0x21e))),console[_0x5d28ac(0x1f1)](''),console[_0x5d28ac(0x1f1)](a229_0x1b810f[_0x5d28ac(0x227)](_0x5d28ac(0x22a))),console[_0x5d28ac(0x1f1)](a229_0x1b810f[_0x5d28ac(0x227)]('\x20\x20#\x20or')),console[_0x5d28ac(0x1f1)](a229_0x1b810f[_0x5d28ac(0x227)](_0x5d28ac(0x207))),console[_0x5d28ac(0x1f1)]('')),{'analysis':_0x4da70c,'steps':_0x3ddb50,'apiArchitecture':_0xb31c50,'completed':!_0x47c0d3&&!_0xb31c50?.[_0x5d28ac(0x1ec)]};}
|
|
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']};}
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a230_0x16cb35=a230_0x566a;(function(_0x5f3ea2,_0x7f6214){const _0x3be404=a230_0x566a,_0x28d1a7=_0x5f3ea2();while(!![]){try{const _0x22ebab=parseInt(_0x3be404(0x1a3))/0x1+parseInt(_0x3be404(0x1d2))/0x2+parseInt(_0x3be404(0x1ab))/0x3+parseInt(_0x3be404(0x1da))/0x4+parseInt(_0x3be404(0x185))/0x5*(-parseInt(_0x3be404(0x1c4))/0x6)+-parseInt(_0x3be404(0x16b))/0x7+-parseInt(_0x3be404(0x1bd))/0x8;if(_0x22ebab===_0x7f6214)break;else _0x28d1a7['push'](_0x28d1a7['shift']());}catch(_0x44b3db){_0x28d1a7['push'](_0x28d1a7['shift']());}}}(a230_0x56eb,0x5c775));function a230_0x566a(_0x54f80e,_0x1daf6b){_0x54f80e=_0x54f80e-0x164;const _0x56eb25=a230_0x56eb();let _0x566ae9=_0x56eb25[_0x54f80e];return _0x566ae9;}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 registerDefinitions(_0x5018a5){const _0x38957d=a230_0x566a;for(const _0x26ab94 of _0x5018a5){definitions[_0x38957d(0x177)](_0x26ab94[_0x38957d(0x1cb)]+':'+_0x26ab94[_0x38957d(0x17a)],_0x26ab94);let _0x2488c0=serviceGroups[_0x38957d(0x1c5)](_0x26ab94[_0x38957d(0x1cb)]);!_0x2488c0&&(_0x2488c0=[],serviceGroups[_0x38957d(0x177)](_0x26ab94[_0x38957d(0x1cb)],_0x2488c0)),_0x2488c0[_0x38957d(0x18b)](_0x26ab94);}}function registerDeclarativeService(_0x5cde49,_0x25cd5b,_0x4805d3){const _0x4a7908=a230_0x566a;registerDefinitions(_0x25cd5b);_0x4805d3?.['wildcardDef']&®isterDefinitions([_0x4805d3[_0x4a7908(0x1a2)]]);const _0x30d656=_0x3c4b12=>_0x3c4b12==='read'?'':_0x3c4b12===_0x4a7908(0x1ac)?_0x4a7908(0x1a0):_0x4a7908(0x19a),_0x3141b6={'service':_0x25cd5b[0x0][_0x4a7908(0x1cb)],'label':_0x5cde49,'commands':_0x25cd5b['filter'](_0x309dab=>!_0x309dab['hidden'])[_0x4a7908(0x1c3)](_0x590271=>({'command':_0x590271[_0x4a7908(0x17a)],'description':_0x590271[_0x4a7908(0x1ca)],'tag':_0x30d656(_0x590271[_0x4a7908(0x196)])})),'declarative':!![],'defaultCommand':_0x4805d3?.[_0x4a7908(0x17f)]??(_0x4805d3?.[_0x4a7908(0x16e)]?_0x25cd5b[0x0][_0x4a7908(0x17a)]:undefined),'wildcardDef':_0x4805d3?.['wildcardDef'],'isSingleCommand':_0x4805d3?.['isSingleCommand']};serviceRegistry['push'](_0x3141b6),serviceByName[_0x4a7908(0x177)](_0x3141b6[_0x4a7908(0x1cb)],_0x3141b6);}registerDeclarativeService(a230_0x16cb35(0x1a4),projectDefinitions),registerDeclarativeService(a230_0x16cb35(0x19e),workspaceDefinitions),registerDeclarativeService(a230_0x16cb35(0x179),appDefinitions),registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':a230_0x16cb35(0x1c8)}),registerDeclarativeService(a230_0x16cb35(0x1b3),tenantDefinitions),registerDeclarativeService(a230_0x16cb35(0x187),userAccountDefinitions),registerDeclarativeService(a230_0x16cb35(0x1c9),datasetDefinitions),registerDeclarativeService('Data\x20List\x20Pages\x20&\x20Custom\x20Pages',pageDefinitions),registerDeclarativeService('API\x20Development',apiDefinitions),registerDeclarativeService(a230_0x16cb35(0x184),bffDefinitions),registerDeclarativeService(a230_0x16cb35(0x167),instantApiPolicyDefinitions),registerDeclarativeService(a230_0x16cb35(0x1cd),notificationDefinitions),registerDeclarativeService(a230_0x16cb35(0x1ad),sqlDefinitions),registerDeclarativeService(a230_0x16cb35(0x176),dbDefinitions),registerDeclarativeService(a230_0x16cb35(0x178),deploymentDefinitions),registerDeclarativeService(a230_0x16cb35(0x1a6),menuDefinitions),registerDeclarativeService('Async\x20Tasks',taskDefinitions),registerDeclarativeService(a230_0x16cb35(0x193),roleDefinitions),registerDeclarativeService(a230_0x16cb35(0x1b0),appConfigDefinitions),registerDeclarativeService(a230_0x16cb35(0x194),kbDefinitions),registerDeclarativeService(a230_0x16cb35(0x1af),ruleDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService(a230_0x16cb35(0x1b7),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a230_0x16cb35(0x1db),codegenDefinitions),registerDeclarativeService(a230_0x16cb35(0x18f),configDefinitions),registerDeclarativeService(a230_0x16cb35(0x1bf),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x16cb35(0x169),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x16cb35(0x192),cliSkillDefinitions,{'defaultCommand':a230_0x16cb35(0x1d6)}),registerDeclarativeService(a230_0x16cb35(0x168),flowDefinitions),registerDeclarativeService(a230_0x16cb35(0x16d),logsDefinitions,{'defaultCommand':a230_0x16cb35(0x1b8)}),registerDeclarativeService(a230_0x16cb35(0x1ce),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a230_0x16cb35(0x1d1)]-0x1];last['commands']=[{'command':'<script>','description':a230_0x16cb35(0x18c),'tag':a230_0x16cb35(0x183)+runDefinition[a230_0x16cb35(0x196)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a230_0x16cb35(0x1d8),a230_0x16cb35(0x18d)],[a230_0x16cb35(0x1b5),a230_0x16cb35(0x1b1)],['sql:save','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a230_0x16cb35(0x19f),'rabetbase\x20bff\x20create'],[a230_0x16cb35(0x181),a230_0x16cb35(0x1a5)],[a230_0x16cb35(0x182),a230_0x16cb35(0x1bc)],[a230_0x16cb35(0x1a1),'rabetbase\x20workspace\x20init\x20--appcode\x20<code>'],[a230_0x16cb35(0x166),a230_0x16cb35(0x1cc)],[a230_0x16cb35(0x1cf),a230_0x16cb35(0x1cc)],['skills:',a230_0x16cb35(0x1cc)],['skills:install',a230_0x16cb35(0x1cc)],[a230_0x16cb35(0x1d5),a230_0x16cb35(0x190)],[a230_0x16cb35(0x1c1),a230_0x16cb35(0x19d)],[a230_0x16cb35(0x164),a230_0x16cb35(0x186)],[a230_0x16cb35(0x188),a230_0x16cb35(0x1d9)],[a230_0x16cb35(0x1d0),a230_0x16cb35(0x191)],[a230_0x16cb35(0x17e),a230_0x16cb35(0x1a7)],[a230_0x16cb35(0x1d7),a230_0x16cb35(0x1d3)],['knowledge-base:detail','rabetbase\x20kb\x20detail'],[a230_0x16cb35(0x17c),a230_0x16cb35(0x1b2)],[a230_0x16cb35(0x1ae),a230_0x16cb35(0x170)],[a230_0x16cb35(0x1d4),'rabetbase\x20kb\x20delete'],['role:create','rabetbase\x20role\x20list'],[a230_0x16cb35(0x1c2),a230_0x16cb35(0x1b6)],[a230_0x16cb35(0x189),'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],['page:standard-page-status',a230_0x16cb35(0x1a9)],[a230_0x16cb35(0x197),a230_0x16cb35(0x171)],['page:custom-create','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],[a230_0x16cb35(0x1b4),a230_0x16cb35(0x172)],[a230_0x16cb35(0x1c7),a230_0x16cb35(0x1c6)],[a230_0x16cb35(0x165),a230_0x16cb35(0x180)],['page:react-publish',a230_0x16cb35(0x16f)]]),REMOVED_COMMAND_HINTS=new Map([[a230_0x16cb35(0x174),a230_0x16cb35(0x1aa)],[a230_0x16cb35(0x16c),a230_0x16cb35(0x1aa)],['deployment:sync',a230_0x16cb35(0x195)],[a230_0x16cb35(0x175),a230_0x16cb35(0x1bb)],[a230_0x16cb35(0x18e),a230_0x16cb35(0x1bb)],[a230_0x16cb35(0x173),a230_0x16cb35(0x1bb)],[a230_0x16cb35(0x1c0),a230_0x16cb35(0x1bb)],['permit:role-apis-set',a230_0x16cb35(0x1bb)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a230_0x16cb35(0x1ba),a230_0x16cb35(0x17d)],['start','rabetbase\x20run\x20start'],[a230_0x16cb35(0x198),a230_0x16cb35(0x19b)],['preview',a230_0x16cb35(0x1b9)],['logout',a230_0x16cb35(0x19c)]]);export function resolveRemovedCommand(_0x40e22f,_0x4977b8){const _0x341e56=a230_0x16cb35;if(!_0x40e22f)return undefined;const _0x5920bc=REMOVED_COMMAND_REPLACEMENTS[_0x341e56(0x1c5)](_0x40e22f+':'+(_0x4977b8??'')),_0x58c8b4=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x341e56(0x1c5)](_0x40e22f),_0x4013f9=_0x5920bc??_0x58c8b4,_0x2fa440=REMOVED_COMMAND_HINTS[_0x341e56(0x1c5)](_0x40e22f+':'+(_0x4977b8??''));if(!_0x4013f9&&!_0x2fa440)return undefined;const _0x4983d8=_0x58c8b4?_0x40e22f:_0x4977b8?_0x40e22f+'\x20'+_0x4977b8:_0x40e22f;return{'command':_0x4983d8,'message':_0x341e56(0x16a)+_0x4983d8+_0x341e56(0x1a8),'hint':_0x2fa440??_0x341e56(0x17b)+_0x4013f9+_0x341e56(0x199)};}export function findDefinition(_0x2f6535,_0x5b028e){const _0x4e196c=a230_0x16cb35;return definitions[_0x4e196c(0x1c5)](_0x2f6535+':'+_0x5b028e);}export function isKnownService(_0x234b80){const _0x94c8d9=a230_0x16cb35;return serviceByName[_0x94c8d9(0x18a)](_0x234b80);}function a230_0x56eb(){const _0x28c692=['`rabetbase\x20','1816521OXuXkC','flow:disable','Logs','isSingleCommand','rabetbase\x20page\x20custom-publish','rabetbase\x20kb\x20update','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','rabetbase\x20page\x20custom-list','permit:role-menus','flow:enable','permit:page-get','Database\x20Connections','set','Deployment','App\x20Management','command','Use\x20`','knowledge-base:create','rabetbase\x20project\x20create\x20<project-name>','app:remove','defaultCommand','rabetbase\x20page\x20custom-update','sql:new','menu:update','\x20\x20[','Backend\x20Function\x20Scripts','220405SUDxRl','rabetbase\x20app\x20list\x20--remote','User\x20Accounts','app:use','data:getOne','has','push','Run\x20any\x20package.json\x20script','rabetbase\x20dataset\x20design-start\x20--file\x20<manifest.json>','permit:page-set','Configuration','rabetbase\x20menu\x20subapp-assets-status\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','CLI\x20Built-in\x20Skill','Roles','Company\x20Knowledge\x20Base','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','risk','page:react-create','build','`\x20instead.','\x20\x20[high-risk-write]','rabetbase\x20run\x20build','rabetbase\x20auth\x20logout','rabetbase\x20menu\x20subapp-assets-update\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>\x20--resources\x20\x27<json>\x27','Workspace','bff:new','\x20\x20[write]','project:init','wildcardDef','85789pZRvTX','Project','rabetbase\x20sql\x20create','Menu','rabetbase\x20workspace\x20remove\x20<name>','`\x20has\x20been\x20removed.','rabetbase\x20page\x20data-list-status','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','879183IiQeoC','write','SQL\x20Queries','knowledge-base:update','Agent\x20Context\x20Rules','Runtime\x20App\x20Config\x20Management','rabetbase\x20dataset\x20design-status\x20--operation-id\x20<id>','rabetbase\x20kb\x20create','Tenant\x20Members','page:react-list','dataset:generate-status','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','File','show','rabetbase\x20run\x20preview','create','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','rabetbase\x20menu\x20asset-update','3474448blwZMg','from','Diagnostics','permit:role-menus-set','app:assets-update','data:filter','map','12GitIPU','get','rabetbase\x20page\x20custom-detail','page:react-detail','login','Dataset\x20&\x20Operations','description','service','rabetbase\x20cli-skill\x20install','Notification\x20Configuration','Run\x20Scripts','skill:install','app:add','length','1042322qaWvxB','rabetbase\x20kb\x20list','knowledge-base:delete','app:assets-status','install','knowledge-base:list','dataset:generate-start','rabetbase\x20workspace\x20use\x20--app\x20<name>','1042804cWUQHE','Code\x20Generation','app:remote','page:react-update','skill:','Instant\x20API\x20Policy','Approval\x20Flows','Schema'];a230_0x56eb=function(){return _0x28c692;};return a230_0x56eb();}export function isDeclarativeService(_0x429242){const _0x5e5378=a230_0x16cb35;return serviceGroups[_0x5e5378(0x18a)](_0x429242)||serviceByName[_0x5e5378(0x1c5)](_0x429242)?.[_0x5e5378(0x1a2)]!==undefined;}export function getServiceEntry(_0x3149fd){const _0x37edb8=a230_0x16cb35;return serviceByName[_0x37edb8(0x1c5)](_0x3149fd);}export function getLegacyHandler(_0x2c96d9,_0x51ffff){return undefined;}export function getAllDefinitions(){const _0x53430a=a230_0x16cb35;return Array[_0x53430a(0x1be)](definitions['values']());}
|
|
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a231_0x18f5de=a231_0x4478;function a231_0x4548(){const _0x5e5ea3=['\x20(id=','1695420UYRcll','102MYBRiN','dev','POST','16yHBFTg','userCount','Role\x20still\x20has\x20','1383501WlYPyT','10KMaNFY','delete','21509976kOgIlh','262423KwgQwp','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','role','777136klXLPl','num','2vfaoeR','roleName','796066mMgPkq','high-risk-write','3563593LJTcVi','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','10qVbLKm','appCode'];a231_0x4548=function(){return _0x5e5ea3;};return a231_0x4548();}(function(_0x121f61,_0x5848e7){const _0x5d03d3=a231_0x4478,_0x36fa53=_0x121f61();while(!![]){try{const _0x1f7358=-parseInt(_0x5d03d3(0x148))/0x1*(-parseInt(_0x5d03d3(0x14a))/0x2)+parseInt(_0x5d03d3(0x158))/0x3+-parseInt(_0x5d03d3(0x146))/0x4*(parseInt(_0x5d03d3(0x159))/0x5)+parseInt(_0x5d03d3(0x152))/0x6*(parseInt(_0x5d03d3(0x143))/0x7)+parseInt(_0x5d03d3(0x155))/0x8*(parseInt(_0x5d03d3(0x151))/0x9)+-parseInt(_0x5d03d3(0x14e))/0xa*(-parseInt(_0x5d03d3(0x14c))/0xb)+-parseInt(_0x5d03d3(0x15b))/0xc;if(_0x1f7358===_0x5848e7)break;else _0x36fa53['push'](_0x36fa53['shift']());}catch(_0xf574b0){_0x36fa53['push'](_0x36fa53['shift']());}}}(a231_0x4548,0x651fb));import{deleteAppRole}from'../../core/api-client.js';function a231_0x4478(_0x5ea202,_0x9f2e39){_0x5ea202=_0x5ea202-0x143;const _0x45487d=a231_0x4548();let _0x447840=_0x45487d[_0x5ea202];return _0x447840;}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='/smartapi/permit/role/delete';export const roleDelete={'service':a231_0x18f5de(0x145),'command':a231_0x18f5de(0x15a),'description':a231_0x18f5de(0x144),'risk':a231_0x18f5de(0x14b),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x34df14){const _0x4c4da7=a231_0x18f5de,_0x499b18=_0x34df14[_0x4c4da7(0x147)]('id'),_0x25c1fd=await getRoleById(_0x34df14['appCode'],_0x499b18);return assertCustomRole(_0x25c1fd,_0x4c4da7(0x15a)),asDryRunResult({'scope':_0x4c4da7(0x153),'operation':_0x4c4da7(0x15a),'selector':{'appCode':_0x34df14['appCode'],'roleId':_0x499b18,'roleName':_0x25c1fd[_0x4c4da7(0x149)]},'before':projectRole(_0x25c1fd),'after':null,'dryRun':!![],'backend':{'method':_0x4c4da7(0x154),'path':DELETE_PATH},'warnings':_0x25c1fd['userCount']>0x0?[_0x4c4da7(0x157)+_0x25c1fd[_0x4c4da7(0x156)]+_0x4c4da7(0x14d)]:[]},{'method':_0x4c4da7(0x154),'url':DELETE_PATH});},async 'execute'(_0x5f235d){const _0x2531ca=a231_0x18f5de,_0x4a68f8=_0x5f235d[_0x2531ca(0x147)]('id'),_0xdef0f9=await getRoleById(_0x5f235d[_0x2531ca(0x14f)],_0x4a68f8);return assertCustomRole(_0xdef0f9,_0x2531ca(0x15a)),await deleteAppRole(_0x4a68f8),{'ok':!![],'data':{'scope':'dev','operation':_0x2531ca(0x15a),'selector':{'appCode':_0x5f235d[_0x2531ca(0x14f)],'roleId':_0x4a68f8,'roleName':_0xdef0f9[_0x2531ca(0x149)]},'before':projectRole(_0xdef0f9),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':'Deleted\x20role\x20'+_0xdef0f9[_0x2531ca(0x149)]+_0x2531ca(0x150)+_0x4a68f8+')'};}};
|