@lovrabet/rabetbase-cli 2.5.9 → 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 a219_0x5d4e(_0x5a128f,_0xf478e8){_0x5a128f=_0x5a128f-0x66;const _0x2aae2b=a219_0x2aae();let _0x5d4e16=_0x2aae2b[_0x5a128f];return _0x5d4e16;}(function(_0xa4882d,_0x39122e){const _0x18d2cd=a219_0x5d4e,_0x3b9f27=_0xa4882d();while(!![]){try{const _0x4e775e=-parseInt(_0x18d2cd(0x67))/0x1*(-parseInt(_0x18d2cd(0xbf))/0x2)+-parseInt(_0x18d2cd(0x90))/0x3+parseInt(_0x18d2cd(0xc6))/0x4*(-parseInt(_0x18d2cd(0xc2))/0x5)+parseInt(_0x18d2cd(0xb0))/0x6*(-parseInt(_0x18d2cd(0xad))/0x7)+parseInt(_0x18d2cd(0xd6))/0x8+-parseInt(_0x18d2cd(0xc0))/0x9*(parseInt(_0x18d2cd(0xa7))/0xa)+parseInt(_0x18d2cd(0xcc))/0xb;if(_0x4e775e===_0x39122e)break;else _0x3b9f27['push'](_0x3b9f27['shift']());}catch(_0x25e8ed){_0x3b9f27['push'](_0x3b9f27['shift']());}}}(a219_0x2aae,0xda08c));import a219_0x467778 from'path';import a219_0x2998a8 from'fs';import a219_0x99b8cb from'chalk';import a219_0x8e80f 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';function a219_0x2aae(){const _0xc29740=['.rabetbase-create-','currentDir','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','...','readdirSync','lstatSync','project','7721208cnmfvW','Configured\x20app\x20AppCode:\x20','API\x20configuration\x20pull\x20failed','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','√\x20Pulled\x20','rmSync','extracting','projectCode','push','toLocaleString','888967iVTpqK','minimumVersion','success','downloading','fail','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','appCode','name','\x20api\x20pull\x20--force\x20--yes','Failed\x20to\x20configure\x20app\x20AppCode','version','production','Project\x20creation\x20failed:\x20','keys','Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory','Starting\x20project\x20creation:\x20','The\x20current\x20directory\x20must\x20be\x20empty.','error','\x20√\x20','Project\x20template\x20ready','length','\x20|\x20AppCode:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','cd\x20','The\x20current\x20directory\x20changed\x20during\x20project\x20creation.','readFileSync','Updating\x20package.json\x20name','Copying\x20local\x20template\x20source','\x20&&\x20','dev','create','API\x20configuration\x20pulled:\x20','info','green','package.json','stableVersion','cookie','parse','\x20model(s)','Verifying\x20project\x20template','2817246FQaqth','\x20dataset(s),\x20generated\x20','resolving','*\x20Pulling\x20API\x20configuration...','start','basename','needsUpgrade','belowMinimum','1.0.0','*\x20Configuring\x20AppCode\x20for\x20project\x20','\x20run\x20start','Failed\x20to\x20update\x20package.json','join','\x20\x201.\x20Start\x20project:\x20','existsSync','log','message','apps','Project\x20name:\x20','CLI\x20version\x20check','relative','gray','Resolving\x20project\x20template','4110810YZfOQk','modelCount','warn','repeat','ino','resolve','7JKoMTq','🚀\x20Next\x20Steps:','mkdtempSync','5313180boOyCc','reverse','currentVersion','nonInteractive','cyan','!\x20Project\x20created,\x20but\x20local\x20logging\x20could\x20not\x20be\x20initialized:\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','\x20already\x20exists','utf8','isDirectory','Format\x20code','description','projectName','verifying','Current\x20directory\x20identity\x20changed\x20during\x20project\x20creation','2UVJmSx','27ASCADz','string','5199805fiRCZB','Project\x20directory\x20','stop','Remove\x20the\x20new\x20files\x20and\x20retry\x20from\x20an\x20empty\x20directory.','4QjAhXG','env','bold','cwd','setLogPath','√\x20package.json\x20updated:\x20name=','34504426yRQaFi','validation','copying'];a219_0x2aae=function(){return _0xc29740;};return a219_0x2aae();}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(_0x4c3cce){const _0x443068=a219_0x5d4e;try{const _0x295e16=a219_0x2998a8[_0x443068(0xd4)](_0x4c3cce);if(!_0x295e16[_0x443068(0xb9)]())return null;return{'dev':_0x295e16[_0x443068(0x85)],'ino':_0x295e16[_0x443068(0xab)]};}catch{return null;}}function isSameDirectory(_0x3c54a1,_0x3300bf){const _0x5bbdb2=a219_0x5d4e;return!!_0x3c54a1&&!!_0x3300bf&&_0x3c54a1[_0x5bbdb2(0x85)]===_0x3300bf[_0x5bbdb2(0x85)]&&_0x3c54a1['ino']===_0x3300bf[_0x5bbdb2(0xab)];}function commitCurrentDirectoryProject(_0x4dd1f7,_0x43ddaa,_0x480700){const _0xc8f3cd=a219_0x5d4e;if(!isSameDirectory(readDirectoryIdentity(_0x4dd1f7),_0x480700))throw new Error(_0xc8f3cd(0xbe));const _0x525d7a=a219_0x467778['basename'](_0x43ddaa),_0x34b75b=a219_0x2998a8['readdirSync'](_0x4dd1f7);if(_0x34b75b['length']!==0x1||_0x34b75b[0x0]!==_0x525d7a)throw CliErrors[_0xc8f3cd(0xcd)](_0xc8f3cd(0x80),_0xc8f3cd(0xc5));const _0x21e45e=a219_0x467778[_0xc8f3cd(0x9c)](_0x43ddaa,_0xc8f3cd(0xd5)),_0x3fce3d=[];try{for(const _0x127c02 of a219_0x2998a8[_0xc8f3cd(0xd3)](_0x21e45e)){a219_0x2998a8['renameSync'](a219_0x467778[_0xc8f3cd(0x9c)](_0x21e45e,_0x127c02),a219_0x467778[_0xc8f3cd(0x9c)](_0x4dd1f7,_0x127c02)),_0x3fce3d[_0xc8f3cd(0xde)](_0x127c02);}a219_0x2998a8[_0xc8f3cd(0xdb)](_0x43ddaa,{'recursive':!![],'force':!![]});}catch(_0x23556d){for(const _0x599443 of _0x3fce3d[_0xc8f3cd(0xb1)]()){const _0x55c822=a219_0x467778[_0xc8f3cd(0x9c)](_0x4dd1f7,_0x599443);if(!a219_0x2998a8[_0xc8f3cd(0x9e)](_0x55c822))continue;a219_0x2998a8['renameSync'](_0x55c822,a219_0x467778[_0xc8f3cd(0x9c)](_0x21e45e,_0x599443));}throw _0x23556d;}}export async function createApp(_0x77a3f2){const _0x4179f2=a219_0x5d4e,_0x17f452=await checkCliVersion();(_0x17f452[_0x4179f2(0x96)]||_0x17f452[_0x4179f2(0x97)])&&(printCliUpgradeWarning(_0x17f452),assertCliVersionSupported(_0x17f452),logger['info']('create',_0x4179f2(0xa3),{'currentVersion':_0x17f452[_0x4179f2(0xb2)],'stableVersion':_0x17f452[_0x4179f2(0x8b)],'minimumVersion':_0x17f452[_0x4179f2(0x68)],'needsUpgrade':_0x17f452[_0x4179f2(0x96)],'belowMinimum':_0x17f452['belowMinimum']}));const _0x5af280=_0x77a3f2[_0x4179f2(0xd0)]?a219_0x467778[_0x4179f2(0x95)](process[_0x4179f2(0xc9)]()):_0x77a3f2[_0x4179f2(0xdd)];if(_0x5af280&&(_0x77a3f2['appCode']||_0x77a3f2[_0x4179f2(0xb3)]))await runCreate({'projectName':_0x5af280,'appCode':_0x77a3f2['appCode'],'env':_0x77a3f2[_0x4179f2(0xc7)]},_0x77a3f2);else{if(_0x5af280){const _0x542c98=await selectSingleAppcode(_0x77a3f2['cookie']);await runCreate({'projectName':_0x5af280,'appCode':_0x542c98||undefined,'env':_0x77a3f2[_0x4179f2(0xc7)]},_0x77a3f2);}else await guidedCreateProject(_0x25fdd4=>runCreate(_0x25fdd4,_0x77a3f2),_0x77a3f2['env'],_0x77a3f2[_0x4179f2(0x8c)]);}}async function runCreate(_0x458527,_0x31996d){const _0x31bfce=a219_0x5d4e;_0x458527[_0x31bfce(0xbc)]=validateProjectName(_0x458527[_0x31bfce(0xbc)]);const _0xc28d65=_0x31996d[_0x31bfce(0xd0)]?process[_0x31bfce(0xc9)]():a219_0x467778[_0x31bfce(0xac)](process[_0x31bfce(0xc9)](),_0x458527[_0x31bfce(0xbc)]);if(_0x31996d[_0x31bfce(0xd0)]){if(a219_0x2998a8[_0x31bfce(0xd3)](_0xc28d65)['length']>0x0)throw CliErrors[_0x31bfce(0xcd)](_0x31bfce(0x77),'Remove\x20or\x20move\x20the\x20existing\x20files,\x20then\x20retry\x20with\x20--current-dir.');}else{if(a219_0x2998a8[_0x31bfce(0x9e)](_0xc28d65))throw new Error(_0x31bfce(0xc3)+_0x458527[_0x31bfce(0xbc)]+_0x31bfce(0xb7));}let _0x4161fe=null;const _0x4c128c=_0x31996d[_0x31bfce(0xd0)]?readDirectoryIdentity(_0xc28d65):null;let _0x47aa2c=null;try{a219_0x2998a8['accessSync'](a219_0x467778['dirname'](_0xc28d65),a219_0x2998a8['constants']['W_OK']);}catch{throw new Error(_0x31bfce(0x7e));}logger[_0x31bfce(0x88)](_0x31bfce(0x86),_0x31bfce(0x76)+_0x458527[_0x31bfce(0xbc)],{'projectDir':_0xc28d65,'appCode':_0x458527['appCode']}),console['log'](),console[_0x31bfce(0x9f)](a219_0x99b8cb[_0x31bfce(0x89)](_0x31bfce(0x79))+_0x31bfce(0xa2)+a219_0x99b8cb[_0x31bfce(0x89)](_0x458527[_0x31bfce(0xbc)])+(_0x458527[_0x31bfce(0x6d)]?_0x31bfce(0x7c)+a219_0x99b8cb['cyan'](_0x458527[_0x31bfce(0x6d)]):''));try{let _0x3843e2=_0x458527[_0x31bfce(0xbc)];_0x31996d[_0x31bfce(0xd0)]&&(_0x47aa2c=a219_0x2998a8[_0x31bfce(0xaf)](a219_0x467778[_0x31bfce(0x9c)](_0xc28d65,_0x31bfce(0xcf))),_0x3843e2=a219_0x467778[_0x31bfce(0xa4)](process[_0x31bfce(0xc9)](),a219_0x467778[_0x31bfce(0x9c)](_0x47aa2c,_0x31bfce(0xd5))));const _0x45792c=a219_0x467778[_0x31bfce(0xac)](process[_0x31bfce(0xc9)](),_0x3843e2);await runTask(_0x31bfce(0xa6),_0x94cc7e=>copyProjectTemplate(_0x3843e2,_0x50f003=>_0x94cc7e(projectTemplateStageLabel(_0x50f003)),_0x31996d['templateSource']),_0x31bfce(0x7a)),_0x4161fe=_0x31996d[_0x31bfce(0xd0)]?null:readDirectoryIdentity(_0xc28d65);if(!_0x31996d[_0x31bfce(0xd0)]&&!_0x4161fe)throw new Error(_0x31bfce(0x75));await updatePackageJsonName(_0x3843e2,_0x458527[_0x31bfce(0xbc)]),await runTask('Install\x20dependencies',()=>installDependencies(_0x3843e2)),await runTask(_0x31bfce(0xba),()=>formatProjectCode(_0x3843e2)),await configureAppCode(_0x3843e2,_0x458527['projectName'],_0x458527['appCode']||'',_0x458527['env']);let _0x17e359=![];if(_0x458527[_0x31bfce(0x6d)]){console[_0x31bfce(0x9f)](_0x31bfce(0x93));const _0x6b033b=process[_0x31bfce(0xc9)]();try{process['chdir'](_0x45792c);const _0x3e5234=_0x458527['env']||_0x31bfce(0x72);initEnv(_0x3e5234);const {configArray:_0x3ad24e}=await fetchModelList(_0x458527[_0x31bfce(0x6d)],_0x31996d[_0x31bfce(0x8c)]||''),_0x5b5c8d=DEFAULT_API_DIR,_0x3cc45a=await generateApiFile(_0x3ad24e,'',_0x458527['appCode'],!![],_0x3e5234,_0x5b5c8d,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':!![],'modelProfile':{'name':_0x458527[_0x31bfce(0x6d)],'defaultName':_0x458527['appCode'],'runtimeDomain':getRuntimeDomain()}});console['log'](_0x31bfce(0xda)+_0x3ad24e[_0x31bfce(0x7b)]+_0x31bfce(0x91)+_0x3cc45a[_0x31bfce(0xa8)]+_0x31bfce(0x8e)),logger[_0x31bfce(0x88)](_0x31bfce(0x86),_0x31bfce(0x87)+_0x458527[_0x31bfce(0x6d)]);}catch(_0x3fd674){_0x17e359=!![],console[_0x31bfce(0x9f)](_0x31bfce(0x7d)+CLI_BIN_NAME+'\x20api\x20pull\x20--force\x20--yes'),logger[_0x31bfce(0xa9)](_0x31bfce(0x86),_0x31bfce(0xd8),{'error':_0x3fd674 instanceof Error?_0x3fd674[_0x31bfce(0xa0)]:String(_0x3fd674)});}finally{process['chdir'](_0x6b033b);}}if(_0x31996d[_0x31bfce(0xd0)]){if(!_0x47aa2c||!_0x4c128c)throw new Error('Unable\x20to\x20prepare\x20the\x20current\x20directory\x20workspace');commitCurrentDirectoryProject(_0xc28d65,_0x47aa2c,_0x4c128c),_0x47aa2c=null;}try{logger[_0x31bfce(0xca)](_0xc28d65),logger[_0x31bfce(0x69)](_0x31bfce(0x86),'Project\x20created:\x20'+_0x458527['projectName']);}catch(_0x4dc205){console[_0x31bfce(0xa9)](_0x31bfce(0xb5)+(_0x4dc205 instanceof Error?_0x4dc205[_0x31bfce(0xa0)]:String(_0x4dc205)));}console[_0x31bfce(0x9f)](),console[_0x31bfce(0x9f)](a219_0x99b8cb[_0x31bfce(0x89)]('─'['repeat'](0x3c))),console[_0x31bfce(0x9f)](a219_0x99b8cb['cyan'][_0x31bfce(0xc8)](_0x31bfce(0xae))),console[_0x31bfce(0x9f)]();const _0x4dd22a=_0x31996d[_0x31bfce(0xd0)]?CLI_BIN_NAME+_0x31bfce(0x9a):_0x31bfce(0x7f)+_0x458527[_0x31bfce(0xbc)]+_0x31bfce(0x84)+CLI_BIN_NAME+_0x31bfce(0x9a);console[_0x31bfce(0x9f)](_0x31bfce(0x9d)+a219_0x99b8cb[_0x31bfce(0xb4)][_0x31bfce(0xc8)](_0x4dd22a)),_0x17e359&&console[_0x31bfce(0x9f)]('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a219_0x99b8cb['cyan'][_0x31bfce(0xc8)](CLI_BIN_NAME+_0x31bfce(0x6f))),console['log'](a219_0x99b8cb[_0x31bfce(0x89)]('─'[_0x31bfce(0xaa)](0x3c)));}catch(_0x3a58bc){logger[_0x31bfce(0x78)](_0x31bfce(0x86),_0x31bfce(0x73)+_0x458527[_0x31bfce(0xbc)],{'error':_0x3a58bc instanceof Error?_0x3a58bc['message']:String(_0x3a58bc)});try{const _0x3354f8=readDirectoryIdentity(_0xc28d65);if(_0x31996d['currentDir']&&_0x47aa2c)a219_0x2998a8['rmSync'](_0x47aa2c,{'recursive':!![],'force':!![]});else{if(_0x4161fe&&_0x3354f8?.[_0x31bfce(0x85)]===_0x4161fe[_0x31bfce(0x85)]&&_0x3354f8[_0x31bfce(0xab)]===_0x4161fe['ino'])console[_0x31bfce(0x9f)](_0x31bfce(0xd9)+_0xc28d65),a219_0x2998a8[_0x31bfce(0xdb)](_0xc28d65,{'recursive':!![],'force':!![]});else _0x3354f8&&logger['warn'](_0x31bfce(0x86),'Skip\x20cleanup:\x20project\x20directory\x20ownership\x20changed:\x20'+_0xc28d65);}}catch{logger[_0x31bfce(0xa9)](_0x31bfce(0x86),'Failed\x20to\x20clean\x20up\x20project\x20directory:\x20'+_0xc28d65);}throw _0x3a58bc;}}async function runTask(_0xfa3e83,_0x3afa52,_0xeb0cf0=_0xfa3e83){const _0x4bef27=a219_0x5d4e,_0x55e45f=a219_0x8e80f(_0xfa3e83+_0x4bef27(0xd2))[_0x4bef27(0x94)]();try{const _0x3a2a43=await _0x3afa52(_0x3340a5=>{const _0x45baa0=_0x4bef27;_0x55e45f['text']=_0x3340a5+_0x45baa0(0xd2);});_0x55e45f[_0x4bef27(0xc4)](),console[_0x4bef27(0x9f)](''+a219_0x99b8cb[_0x4bef27(0x89)]('\x20√\x20')+_0xeb0cf0+'\x20'+a219_0x99b8cb[_0x4bef27(0xa5)]('['+_0x3a2a43+']'));}catch(_0x5a09fe){_0x55e45f[_0x4bef27(0x6b)](_0xfa3e83);throw _0x5a09fe;}}function projectTemplateStageLabel(_0x334f20){const _0x1e3011=a219_0x5d4e;switch(_0x334f20){case _0x1e3011(0x92):return'Resolving\x20project\x20template';case _0x1e3011(0x6a):return'Downloading\x20project\x20template';case _0x1e3011(0xbd):return _0x1e3011(0x8f);case _0x1e3011(0xdc):return'Extracting\x20project\x20template';case _0x1e3011(0xce):return _0x1e3011(0x83);}}async function updatePackageJsonName(_0x3330eb,_0x24ce5d){const _0x5646e6=a219_0x5d4e,_0x231d79=a219_0x467778[_0x5646e6(0xac)](process[_0x5646e6(0xc9)](),_0x3330eb),_0xafae6b=a219_0x467778[_0x5646e6(0x9c)](_0x231d79,_0x5646e6(0x8a));try{console[_0x5646e6(0x9f)](_0x5646e6(0x6c));const _0x331a70=getRabetbaseCliPackageRoot(),_0x17a4fa=a219_0x467778['join'](_0x331a70,_0x5646e6(0x8a));let _0x56f857=_0x5646e6(0x98);try{const _0xaa9fe9=JSON[_0x5646e6(0x8d)](a219_0x2998a8[_0x5646e6(0x81)](_0x17a4fa,_0x5646e6(0xb8)));_0x56f857=_0xaa9fe9[_0x5646e6(0x71)]||'1.0.0';}catch{}const _0x135b9d=a219_0x2998a8[_0x5646e6(0x81)](_0xafae6b,_0x5646e6(0xb8)),_0x5b5fd6=JSON[_0x5646e6(0x8d)](_0x135b9d);_0x5b5fd6[_0x5646e6(0x6e)]=_0x24ce5d,_0x5b5fd6[_0x5646e6(0xbb)]=_0x24ce5d+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x56f857,a219_0x2998a8['writeFileSync'](_0xafae6b,JSON['stringify'](_0x5b5fd6,null,0x2)+'\x0a',_0x5646e6(0xb8)),console[_0x5646e6(0x9f)](_0x5646e6(0xcb)+_0x24ce5d),logger[_0x5646e6(0x88)]('create',_0x5646e6(0x82));}catch(_0x128343){logger[_0x5646e6(0x78)](_0x5646e6(0x86),_0x5646e6(0x9b));throw _0x128343;}}async function configureAppCode(_0x29945e,_0x490f86,_0x139c3a,_0x12b4fa){const _0xfa8776=a219_0x5d4e,_0x568af3=a219_0x467778[_0xfa8776(0xac)](process[_0xfa8776(0xc9)](),_0x29945e),_0x54ee59=a219_0x467778['join'](_0x568af3,NEW_CONFIG_NAME);try{_0x139c3a?console['log'](_0xfa8776(0x99)+_0x490f86+':\x20'+_0x139c3a):console[_0xfa8776(0x9f)](_0xfa8776(0xb6)+_0x490f86);const _0x513034=getRabetbaseCliPackageRoot(),_0x5a8497=a219_0x467778['join'](_0x513034,_0xfa8776(0x8a));let _0x58b8c1='1.0.0';try{const _0x4c157a=JSON['parse'](a219_0x2998a8[_0xfa8776(0x81)](_0x5a8497,_0xfa8776(0xb8)));_0x58b8c1=_0x4c157a[_0xfa8776(0x71)]||'1.0.0';}catch{}const {globalConfig:_0x3ec46d}=loadRawConfigLayers(),_0x35326f=typeof _0x3ec46d[_0xfa8776(0xc7)]===_0xfa8776(0xc1)?_0x3ec46d[_0xfa8776(0xc7)]:undefined,_0x50fef5={};for(const _0x2cce08 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x3ec46d[_0x2cce08]!=null)_0x50fef5[_0x2cce08]=_0x3ec46d[_0x2cce08];}const _0x39eecd=buildCanonicalProjectConfig(_0x50fef5,{'appCodes':_0x139c3a?[_0x139c3a]:[],'env':_0x12b4fa||_0x35326f||_0xfa8776(0x72),'metadata':{'createdAt':new Date()[_0xfa8776(0x66)](),'version':_0x58b8c1}});writeConfigFile(_0x54ee59,_0x39eecd),await generateSdkConfigFile(a219_0x467778['join'](_0x568af3,DEFAULT_API_DIR),getSdkClientRoutingConfig()),writeProjectDomainRoutingManifest(_0x568af3),_0x139c3a?console[_0xfa8776(0x9f)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0xfa8776(0x74)](_0x39eecd[_0xfa8776(0xa1)]||{})[_0xfa8776(0x9c)](',\x20')+'\x20|\x20Default:\x20implicit\x20(single\x20app)'):console[_0xfa8776(0x9f)](_0xfa8776(0xd1)+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger[_0xfa8776(0x88)]('create',_0xfa8776(0xd7)+_0x139c3a);}catch(_0x3259b0){logger[_0xfa8776(0x78)](_0xfa8776(0x86),_0xfa8776(0x70));throw _0x3259b0;}}
|
|
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_0x517f9c=a220_0x1af5;(function(_0x3b0ad4,_0x47b081){const _0x482b8e=a220_0x1af5,_0x33bc87=_0x3b0ad4();while(!![]){try{const _0x21ae19=parseInt(_0x482b8e(0x149))/0x1+parseInt(_0x482b8e(0x166))/0x2*(parseInt(_0x482b8e(0x168))/0x3)+-parseInt(_0x482b8e(0x157))/0x4+parseInt(_0x482b8e(0x14f))/0x5+-parseInt(_0x482b8e(0x161))/0x6*(-parseInt(_0x482b8e(0x169))/0x7)+parseInt(_0x482b8e(0x159))/0x8*(parseInt(_0x482b8e(0x164))/0x9)+-parseInt(_0x482b8e(0x10e))/0xa;if(_0x21ae19===_0x47b081)break;else _0x33bc87['push'](_0x33bc87['shift']());}catch(_0x5ba9ab){_0x33bc87['push'](_0x33bc87['shift']());}}}(a220_0x3d1b,0xebce4));import{createHash}from'node:crypto';import a220_0x9c1d40 from'node:fs/promises';import a220_0xf110f7 from'node:path';import a220_0xa9d657 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='sub-app-react-demo',ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x2a505c){const _0x3f23c8=a220_0x1af5;return typeof _0x2a505c===_0x3f23c8(0x111)&&_0x2a505c[_0x3f23c8(0x137)]()?_0x2a505c[_0x3f23c8(0x137)]():null;}function parseDescriptor(_0x305ee8){const _0x1b696b=a220_0x1af5;if(!_0x305ee8||typeof _0x305ee8!==_0x1b696b(0x162))throw new Error(_0x1b696b(0x153)+TEMPLATE_ID+'\x22.');const _0x4d1a2a=_0x305ee8,_0x16c618=nonEmptyString(_0x4d1a2a[_0x1b696b(0x14a)]),_0x653f06=nonEmptyString(_0x4d1a2a[_0x1b696b(0x15e)]),_0x22a961=_0x4d1a2a[_0x1b696b(0x17a)]===undefined?undefined:nonEmptyString(_0x4d1a2a['url'])||undefined,_0xa2e150=nonEmptyString(_0x4d1a2a[_0x1b696b(0x135)])?.['toLowerCase'](),_0x2842d9=_0x4d1a2a[_0x1b696b(0x160)];if(!_0x16c618||!a220_0xa9d657[_0x1b696b(0x112)](_0x16c618)||!_0x653f06||_0x653f06!==a220_0xf110f7['posix']['basename'](_0x653f06)||_0x653f06['includes']('\x5c')||_0x4d1a2a[_0x1b696b(0x17a)]!==undefined&&!_0x22a961||!_0xa2e150||!/^sha256:[a-f0-9]{64}$/[_0x1b696b(0x132)](_0xa2e150)||typeof _0x2842d9!=='number'||!Number[_0x1b696b(0x15c)](_0x2842d9)||_0x2842d9<=0x0||_0x2842d9>MAX_ARCHIVE_SIZE)throw new Error(_0x1b696b(0x172)+TEMPLATE_ID+'\x22.');return{'version':_0x16c618,'name':_0x653f06,'url':_0x22a961,'sha256':_0xa2e150,'size':_0x2842d9};}async function fetchWithTimeout(_0x5e71f9,_0x5ce357,_0x15f735,_0x33a013){const _0x529630=a220_0x1af5,_0x48ab4c=new AbortController(),_0x280b66=setTimeout(()=>_0x48ab4c[_0x529630(0x124)](),_0x5ce357);try{const _0x52c498=await fetch(_0x5e71f9,{'headers':{'Accept':_0x15f735},'redirect':_0x529630(0x131),'signal':_0x48ab4c['signal']});return await _0x33a013(_0x52c498);}finally{clearTimeout(_0x280b66);}}async function fetchTemplateDescriptor(){const _0x17bdee=a220_0x1af5,_0x4cf4b5=getCliVersion(),_0x33a086=isBetaCliVersion(_0x4cf4b5)?_0x17bdee(0x151):_0x17bdee(0x14c),_0x203340=await fetchProjectTemplateCdnConfig();if(!_0x203340)throw new Error('Rabetbase\x20CDN\x20config\x20is\x20unavailable.');const _0x3d629a=parseDescriptor(resolveProjectTemplateDescriptor(_0x203340[_0x17bdee(0x13d)],_0x4cf4b5));return{'descriptor':_0x3d629a,'channel':_0x33a086,'assetBaseUrl':_0x203340[_0x17bdee(0x11a)],'legacyAssetBaseUrl':_0x203340[_0x17bdee(0x13a)]};}function resolveArchiveUrl(_0xb382e2,_0x213ae4,_0xd37740,_0x2ce37e){const _0x3862ee=a220_0x1af5,_0x236b50=new URL(_0xd37740+'/'),_0x4ef87b=[getProjectTemplateRelativeUrl(_0x213ae4),getProjectTemplateRelativeUrl(_0x213ae4,_0xb382e2['version'])];if(_0xb382e2[_0x3862ee(0x17a)]&&!_0x4ef87b[_0x3862ee(0x116)](_0xb382e2[_0x3862ee(0x17a)]))throw new Error(_0x3862ee(0x117));const _0x4a43ea=new URL(_0x2ce37e+'/'),_0x3368c3=_0xb382e2[_0x3862ee(0x17a)]?new URL(_0xb382e2['url'],_0x236b50['origin']):new URL(_0xb382e2[_0x3862ee(0x15e)],_0x4a43ea),_0x4ef19d=_0xb382e2['url']?_0x236b50[_0x3862ee(0x142)]:_0x4a43ea[_0x3862ee(0x142)];if(_0x3368c3[_0x3862ee(0x12b)]!=='https:'||_0x3368c3['origin']!==_0x4ef19d||a220_0xf110f7[_0x3862ee(0x107)][_0x3862ee(0x134)](decodeURIComponent(_0x3368c3[_0x3862ee(0x16f)]))!==_0xb382e2['name']||!_0xb382e2[_0x3862ee(0x17a)]&&!_0x3368c3[_0x3862ee(0x16f)]['startsWith'](_0x4a43ea[_0x3862ee(0x16f)]))throw new Error('CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.');return _0x3368c3[_0x3862ee(0x125)];}async function readResponseBytes(_0x468f41,_0x120995){const _0x42498e=a220_0x1af5;if(!_0x468f41[_0x42498e(0x146)]){const _0xc0d7b5=Buffer[_0x42498e(0x13b)](await _0x468f41[_0x42498e(0x13c)]());if(_0xc0d7b5['length']>_0x120995)throw new Error(_0x42498e(0x105));return _0xc0d7b5;}const _0x1d48f2=_0x468f41[_0x42498e(0x146)][_0x42498e(0x108)](),_0x1e1886=[];let _0x2ab2d3=0x0;try{while(!![]){const {done:_0x421f62,value:_0x58ca50}=await _0x1d48f2[_0x42498e(0x126)]();if(_0x421f62)break;_0x2ab2d3+=_0x58ca50[_0x42498e(0x118)];if(_0x2ab2d3>_0x120995){await _0x1d48f2['cancel']();throw new Error(_0x42498e(0x105));}_0x1e1886[_0x42498e(0x179)](Buffer[_0x42498e(0x13b)](_0x58ca50));}}finally{_0x1d48f2[_0x42498e(0x174)]();}return Buffer['concat'](_0x1e1886,_0x2ab2d3);}async function downloadArchive(_0x58d2f7,_0xfccbae,_0x18397a,_0x49f3dc,_0x4e4a8e,_0x471939){const _0x508e06=a220_0x1af5,_0x586e3e=await fetchWithTimeout(resolveArchiveUrl(_0x58d2f7,_0xfccbae,_0x18397a,_0x49f3dc),ARCHIVE_TIMEOUT_MS,_0x508e06(0x13e),async _0x210929=>{const _0x35e9ed=_0x508e06;if(!_0x210929['ok'])throw new Error('CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20'+_0x210929[_0x35e9ed(0x138)]+'.');const _0x66bd96=Number(_0x210929[_0x35e9ed(0x143)][_0x35e9ed(0x16b)](_0x35e9ed(0x15a)));if(Number['isFinite'](_0x66bd96)&&_0x66bd96>MAX_ARCHIVE_SIZE)throw new Error('CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.');return readResponseBytes(_0x210929,_0x58d2f7[_0x35e9ed(0x160)]);});if(_0x586e3e[_0x508e06(0x114)]!==_0x58d2f7[_0x508e06(0x160)])throw new Error(_0x508e06(0x12f)+_0x58d2f7[_0x508e06(0x160)]+',\x20received\x20'+_0x586e3e[_0x508e06(0x114)]+'.');_0x471939?.(_0x508e06(0x147));const _0x53ef4d=_0x508e06(0x128)+createHash(_0x508e06(0x135))[_0x508e06(0x15f)](_0x586e3e)[_0x508e06(0x121)](_0x508e06(0x156));if(_0x53ef4d!==_0x58d2f7[_0x508e06(0x135)])throw new Error(_0x508e06(0x122));await a220_0x9c1d40[_0x508e06(0x11f)](_0x4e4a8e,_0x586e3e,{'flag':'wx'});}async function assertTemplateRoot(_0x435279){const _0x1af40c=a220_0x1af5,_0x5cdb89=a220_0xf110f7['join'](_0x435279,'package.json'),_0x23e0b1=JSON[_0x1af40c(0x123)](await a220_0x9c1d40[_0x1af40c(0x10f)](_0x5cdb89,_0x1af40c(0x141)));if(!_0x23e0b1||typeof _0x23e0b1!==_0x1af40c(0x162))throw new Error('Project\x20template\x20package.json\x20is\x20invalid.');}const LOCAL_FORBIDDEN_NAMES=new Set(['.DS_Store',a220_0x517f9c(0x12a),a220_0x517f9c(0x167),a220_0x517f9c(0x14d),a220_0x517f9c(0x171),'.lovrabet.log',a220_0x517f9c(0x113),a220_0x517f9c(0x14b),a220_0x517f9c(0x16a),'node_modules']);function a220_0x3d1b(){const _0x22a373=['has','resolving','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','local','message','11940980dnbroo','readFile','cdn','string','valid','.rabetbase','length','EEXIST','includes','CDN\x20project\x20template\x20relative\x20URL\x20must\x20match\x20its\x20release\x20channel\x20or\x20version.','byteLength','ENOENT','assetBaseUrl','isDirectory','template.zip','isAbsolute','relative','writeFile','downloading','digest','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','parse','abort','href','read','mkdir','sha256:','ino','.codegraph','protocol','Project\x20directory\x20already\x20exists:\x20','package.json','Invalid\x20local\x20template\x20source:\x20','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.','error','test','copyFile','basename','sha256','Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20','trim','status','Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.','legacyAssetBaseUrl','from','arrayBuffer','config','application/zip','realpath','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','utf8','origin','headers','.env','readdir','body','verifying','Local\x20template\x20source\x20does\x20not\x20exist:\x20','340813FdQuVI','version','.rabetbase.json','release','.idea','startsWith','3702600DTTuAz','mkdtemp','beta','Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','isFile','Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.','hex','3572760StuwQi','isSymbolicLink','54232XVubXD','content-length','join','isSafeInteger','Unable\x20to\x20claim\x20the\x20project\x20directory.','name','update','size','6WSNgJG','object','.env.','1611kItTOe','lstat','4uefqcw','.git','1044147jjgvwu','435932EtfphQ','dist','get','dirname','Use\x20a\x20different\x20project\x20name.','Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.','pathname','resolve','.lovrabet.json','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','code','releaseLock','validation','dev','.rabetbase-create-','project','push','url','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','copying','posix','getReader'];a220_0x3d1b=function(){return _0x22a373;};return a220_0x3d1b();}function isForbiddenTemplateEntry(_0x1a16d5){const _0xc36a9d=a220_0x517f9c;if(LOCAL_FORBIDDEN_NAMES[_0xc36a9d(0x109)](_0x1a16d5))return!![];return _0x1a16d5===_0xc36a9d(0x144)||_0x1a16d5['startsWith'](_0xc36a9d(0x163))&&_0x1a16d5!=='.env.example';}function containsPath(_0xcd44bb,_0x21d92b){const _0x5097f9=a220_0x517f9c,_0x25c635=a220_0xf110f7[_0x5097f9(0x11e)](_0xcd44bb,_0x21d92b);return _0x25c635===''||!_0x25c635[_0x5097f9(0x14e)]('..'+a220_0xf110f7['sep'])&&_0x25c635!=='..'&&!a220_0xf110f7[_0x5097f9(0x11d)](_0x25c635);}async function copyLocalTemplateDirectory(_0x446aa4,_0x23ce7b){const _0x500f2f=a220_0x517f9c;await a220_0x9c1d40[_0x500f2f(0x127)](_0x23ce7b,{'recursive':!![]});for(const _0x19d8e1 of await a220_0x9c1d40[_0x500f2f(0x145)](_0x446aa4,{'withFileTypes':!![]})){const _0x46bfbb=a220_0xf110f7[_0x500f2f(0x15b)](_0x446aa4,_0x19d8e1[_0x500f2f(0x15e)]),_0x9f83da=a220_0xf110f7[_0x500f2f(0x15b)](_0x23ce7b,_0x19d8e1[_0x500f2f(0x15e)]);if(isForbiddenTemplateEntry(_0x19d8e1['name']))throw new Error(_0x500f2f(0x152)+_0x46bfbb);const _0x4b6407=await a220_0x9c1d40['lstat'](_0x46bfbb);if(_0x4b6407[_0x500f2f(0x158)]())throw new Error(_0x500f2f(0x136)+_0x46bfbb);if(_0x4b6407[_0x500f2f(0x11b)]()){await copyLocalTemplateDirectory(_0x46bfbb,_0x9f83da);continue;}if(!_0x4b6407[_0x500f2f(0x154)]())continue;await a220_0x9c1d40[_0x500f2f(0x133)](_0x46bfbb,_0x9f83da),await a220_0x9c1d40['chmod'](_0x9f83da,_0x4b6407['mode']&0x1ff);}}async function readTemplateVersion(_0x31a893){const _0xe968fd=a220_0x517f9c,_0x5e304e=JSON[_0xe968fd(0x123)](await a220_0x9c1d40[_0xe968fd(0x10f)](a220_0xf110f7[_0xe968fd(0x15b)](_0x31a893,_0xe968fd(0x12d)),'utf8'));return nonEmptyString(_0x5e304e[_0xe968fd(0x14a)])||'local';}async function readDirectoryIdentity(_0x4b7c81){const _0x336def=a220_0x517f9c;try{const _0x2bd0d5=await a220_0x9c1d40['lstat'](_0x4b7c81);if(!_0x2bd0d5[_0x336def(0x11b)]())return null;return{'dev':_0x2bd0d5[_0x336def(0x176)],'ino':_0x2bd0d5[_0x336def(0x129)]};}catch{return null;}}async function commitStagedProject(_0xd8f3e4,_0x3143ff){const _0x5c116b=a220_0x517f9c;await a220_0x9c1d40[_0x5c116b(0x127)](_0x3143ff);const _0x36913c=await readDirectoryIdentity(_0x3143ff);if(!_0x36913c)throw new Error(_0x5c116b(0x15d));try{for(const _0x364190 of await a220_0x9c1d40[_0x5c116b(0x145)](_0xd8f3e4)){await a220_0x9c1d40['rename'](a220_0xf110f7['join'](_0xd8f3e4,_0x364190),a220_0xf110f7[_0x5c116b(0x15b)](_0x3143ff,_0x364190));}}catch(_0x32285d){const _0x5c4743=await readDirectoryIdentity(_0x3143ff);_0x5c4743?.[_0x5c116b(0x176)]===_0x36913c[_0x5c116b(0x176)]&&_0x5c4743[_0x5c116b(0x129)]===_0x36913c[_0x5c116b(0x129)]&&await a220_0x9c1d40['rm'](_0x3143ff,{'recursive':!![],'force':!![]});throw _0x32285d;}}function a220_0x1af5(_0x21f2a0,_0x1cd0b3){_0x21f2a0=_0x21f2a0-0x105;const _0x3d1b7a=a220_0x3d1b();let _0x1af5fd=_0x3d1b7a[_0x21f2a0];return _0x1af5fd;}export async function materializeProjectTemplate(_0x39eea1,_0x34bb95){const _0x246326=a220_0x517f9c,_0x5e6e2c=a220_0xf110f7['resolve'](_0x39eea1),_0x979fb0=a220_0xf110f7[_0x246326(0x16c)](_0x5e6e2c);try{await a220_0x9c1d40[_0x246326(0x165)](_0x5e6e2c);throw new Error(_0x246326(0x12c)+_0x5e6e2c);}catch(_0x4ceff0){if(_0x4ceff0['code']!==_0x246326(0x119))throw _0x4ceff0;}const _0x513c8f=await a220_0x9c1d40[_0x246326(0x150)](a220_0xf110f7[_0x246326(0x15b)](_0x979fb0,_0x246326(0x177))),_0x44c058=a220_0xf110f7['join'](_0x513c8f,_0x246326(0x178)),_0x20b08b=a220_0xf110f7['join'](_0x513c8f,_0x246326(0x11c));try{try{_0x34bb95?.(_0x246326(0x10a));const {descriptor:_0x336f75,channel:_0x59013a,assetBaseUrl:_0x3e1f11,legacyAssetBaseUrl:_0x3e379f}=await fetchTemplateDescriptor();return _0x34bb95?.(_0x246326(0x120)),await downloadArchive(_0x336f75,_0x59013a,_0x3e1f11,_0x3e379f,_0x20b08b,_0x34bb95),_0x34bb95?.('extracting'),await extractProjectTemplateArchive(_0x20b08b,_0x44c058),await assertTemplateRoot(_0x44c058),await commitStagedProject(_0x44c058,_0x5e6e2c),{'source':_0x246326(0x110),'version':_0x336f75[_0x246326(0x14a)]};}catch(_0x590ff9){if(_0x590ff9[_0x246326(0x173)]===_0x246326(0x115))throw CliErrors[_0x246326(0x175)](_0x246326(0x12c)+_0x5e6e2c,_0x246326(0x16d));const _0x1410b5=_0x590ff9 instanceof Error?_0x590ff9[_0x246326(0x10d)]:String(_0x590ff9);throw CliErrors['validation'](_0x246326(0x140),_0x246326(0x10b)+_0x1410b5);}}finally{await a220_0x9c1d40['rm'](_0x513c8f,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x50abdf,_0x346c9d,_0x1cd4c7){const _0x27b2ca=a220_0x517f9c;let _0x11de99;try{_0x11de99=await a220_0x9c1d40['realpath'](a220_0xf110f7[_0x27b2ca(0x170)](_0x50abdf));}catch{throw CliErrors[_0x27b2ca(0x175)](_0x27b2ca(0x148)+a220_0xf110f7[_0x27b2ca(0x170)](_0x50abdf),_0x27b2ca(0x155));}const _0x19f1bf=await a220_0x9c1d40[_0x27b2ca(0x165)](_0x11de99);if(!_0x19f1bf['isDirectory']())throw CliErrors['validation']('Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20'+_0x11de99);const _0x444145=a220_0xf110f7[_0x27b2ca(0x170)](_0x346c9d),_0x38290b=await a220_0x9c1d40[_0x27b2ca(0x13f)](a220_0xf110f7['dirname'](_0x444145)),_0x4c7048=a220_0xf110f7[_0x27b2ca(0x15b)](_0x38290b,a220_0xf110f7['basename'](_0x444145));if(containsPath(_0x11de99,_0x4c7048)||containsPath(_0x4c7048,_0x11de99))throw CliErrors[_0x27b2ca(0x175)](_0x27b2ca(0x130),_0x27b2ca(0x16e));try{await a220_0x9c1d40['lstat'](_0x4c7048);throw CliErrors[_0x27b2ca(0x175)](_0x27b2ca(0x12c)+_0x4c7048,_0x27b2ca(0x139));}catch(_0x1e6d5c){if(_0x1e6d5c[_0x27b2ca(0x173)]!=='ENOENT')throw _0x1e6d5c;}const _0x3cc907=a220_0xf110f7[_0x27b2ca(0x16c)](_0x4c7048);await a220_0x9c1d40['access'](_0x3cc907);const _0x3c3fbf=await a220_0x9c1d40[_0x27b2ca(0x150)](a220_0xf110f7[_0x27b2ca(0x15b)](_0x3cc907,_0x27b2ca(0x177))),_0x5664f7=a220_0xf110f7[_0x27b2ca(0x15b)](_0x3c3fbf,_0x27b2ca(0x178));try{_0x1cd4c7?.(_0x27b2ca(0x106)),await copyLocalTemplateDirectory(_0x11de99,_0x5664f7),await assertTemplateRoot(_0x5664f7);const _0x51cedb=await readTemplateVersion(_0x5664f7);return await commitStagedProject(_0x5664f7,_0x4c7048),{'source':_0x27b2ca(0x10c),'version':_0x51cedb};}catch(_0x5b5f69){const _0x2c836b=_0x5b5f69 instanceof Error?_0x5b5f69['message']:String(_0x5b5f69);throw CliErrors[_0x27b2ca(0x175)](_0x27b2ca(0x12e)+_0x2c836b,'Check\x20the\x20source\x20directory\x20and\x20retry.');}finally{await a220_0x9c1d40['rm'](_0x3c3fbf,{'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
|
-
const
|
|
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
|
-
|
|
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
|
-
(function(
|
|
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
|
-
(function(
|
|
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(_0x25a677,_0x427a7b){const _0x328c95=a229_0x2fa9,_0x4752a9=_0x25a677();while(!![]){try{const _0x47b986=-parseInt(_0x328c95(0x14b))/0x1+-parseInt(_0x328c95(0x165))/0x2*(-parseInt(_0x328c95(0x145))/0x3)+-parseInt(_0x328c95(0x187))/0x4*(parseInt(_0x328c95(0x17c))/0x5)+parseInt(_0x328c95(0x163))/0x6+-parseInt(_0x328c95(0x15d))/0x7+parseInt(_0x328c95(0x151))/0x8*(parseInt(_0x328c95(0x179))/0x9)+-parseInt(_0x328c95(0x154))/0xa*(-parseInt(_0x328c95(0x14d))/0xb);if(_0x47b986===_0x427a7b)break;else _0x4752a9['push'](_0x4752a9['shift']());}catch(_0x56c6c5){_0x4752a9['push'](_0x4752a9['shift']());}}}(a229_0x4a50,0x6fb2c));function a229_0x4a50(){const _0x1a3973=['green','\x20\x20npm\x20install','latest','\x20→\x20','bold','Step\x202/2:\x20Application\x20source\x20—\x20','\x20\x20Current\x20version\x20in\x20','message','log','upgrade\x20needed','parse','push','step','white','Upgrade\x20application\x20source','manualMergeRequired','join','===\x20Upgrade\x20Analysis\x20===','3249umrjhB','\x20\x20Step\x20','devDependencies','81845AxTCsJ','red','gray','apiArchitecture','\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.','\x20\x20\x20\x20','stringify','CANCEL','Upgrade\x20cancelled.','detail','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','8MPIbRX','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','source\x20structure\x20is\x20current','sdkUpgrade','fail','@lovrabet/sdk','cyan','some','candidatePath','dependencies','Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','object','Application\x20source:','\x20\x20#\x20or','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','4419ZCzNJP','groups','length','succeed','files','apiDir','593565OouImy','utf8','5347133eGtCNn','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','@lovrabet/sdk:','padEnd','4792PwKlCA','===\x20Upgrade\x20Summary\x20===','failed','30VHrvSH','needed','done','yellow','Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.','yes','Your\x20project\x20is\x20already\x20up-to-date.','\x20→\x20latest','label','5923498cAQEQI','\x20\x20\x20\x20\x20\x20\x20','cwd','Upgrade\x20@lovrabet/sdk','not\x20found\x20or\x20already\x20at\x20latest','skippedLegacyDirectories','1453368DJXrjY','FAIL','18xNnKEW','\x20\x20bun\x20install'];a229_0x4a50=function(){return _0x1a3973;};return a229_0x4a50();}import a229_0x4ae336 from'chalk';import a229_0x407ac9 from'ora';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(_0x14d2a9){const _0x4c3447=a229_0x2fa9;try{const _0x2ba678=JSON[_0x4c3447(0x171)](readFileSync(_0x14d2a9,'utf8'));return _0x2ba678&&typeof _0x2ba678===_0x4c3447(0x141)?_0x2ba678:{};}catch{return{};}}export function analyseProjectUpgrade(_0x107bec){const _0x77777b=a229_0x2fa9;let _0x4b17aa=null;const _0x267846=resolve(_0x107bec,'package.json');if(existsSync(_0x267846))try{const _0x4d6c3e=JSON[_0x77777b(0x171)](readFileSync(_0x267846,_0x77777b(0x14c)));for(const _0x582365 of[_0x77777b(0x13f),_0x77777b(0x17b)]){const _0x48ae7b=_0x4d6c3e?.[_0x582365]?.[_0x77777b(0x13b)];if(typeof _0x48ae7b==='string'){_0x48ae7b!=='latest'&&(_0x4b17aa={'pkgPath':_0x267846,'currentVersion':_0x48ae7b,'field':_0x582365});break;}}}catch{}const _0x28cfdf=resolve(_0x107bec,NEW_CONFIG_NAME),_0x206dcb=existsSync(_0x28cfdf)?readProjectConfig(_0x28cfdf):{},_0x48b0b9=analyzeProjectApiArchitecture(_0x107bec,_0x206dcb);return{'sdkUpgrade':_0x4b17aa,'apiArchitecture':_0x48b0b9};}function a229_0x2fa9(_0x982213,_0x472fba){_0x982213=_0x982213-0x137;const _0x4a502a=a229_0x4a50();let _0x2fa9c2=_0x4a502a[_0x982213];return _0x2fa9c2;}function printReport(_0xeeee10){const _0x373e07=a229_0x2fa9;console[_0x373e07(0x16f)](''),console[_0x373e07(0x16f)](a229_0x4ae336[_0x373e07(0x16b)](_0x373e07(0x178))),console[_0x373e07(0x16f)](''),console[_0x373e07(0x16f)](a229_0x4ae336[_0x373e07(0x13c)](_0x373e07(0x142))+('\x20\x20'+(_0xeeee10['apiArchitecture'][_0x373e07(0x155)]?a229_0x4ae336['yellow'](_0x373e07(0x170)):a229_0x4ae336['green']('up-to-date'))));for(const _0x40a40d of _0xeeee10[_0x373e07(0x17f)][_0x373e07(0x146)]){console[_0x373e07(0x16f)]('\x20\x20'+_0x40a40d[_0x373e07(0x14a)]+'\x20('+_0x40a40d['profiles'][_0x373e07(0x177)](',\x20')+')');for(const _0x203b48 of _0x40a40d[_0x373e07(0x149)]){console['log'](_0x373e07(0x181)+_0x203b48['action'][_0x373e07(0x150)](0x11)+'\x20'+_0x203b48['path']),_0x203b48[_0x373e07(0x13e)]&&console['log']('\x20\x20\x20\x20\x20\x20candidate:\x20'+_0x203b48[_0x373e07(0x13e)]);}}_0xeeee10[_0x373e07(0x17f)][_0x373e07(0x162)][_0x373e07(0x147)]>0x0&&console[_0x373e07(0x16f)](_0x373e07(0x180));console['log']('');if(_0xeeee10[_0x373e07(0x139)]){const {currentVersion:_0x544673,field:_0x376458,pkgPath:_0x429e67}=_0xeeee10[_0x373e07(0x139)];console['log'](a229_0x4ae336[_0x373e07(0x13c)]('@lovrabet/sdk:')+('\x20\x20'+a229_0x4ae336[_0x373e07(0x157)](_0x429e67))),console[_0x373e07(0x16f)](_0x373e07(0x16d)+_0x376458+':\x20'+a229_0x4ae336[_0x373e07(0x157)](_0x544673)+_0x373e07(0x16a)+a229_0x4ae336[_0x373e07(0x167)](_0x373e07(0x169))),console[_0x373e07(0x16f)](_0x373e07(0x144));}else console[_0x373e07(0x16f)](a229_0x4ae336[_0x373e07(0x13c)](_0x373e07(0x14f))+'\x20\x20'+a229_0x4ae336[_0x373e07(0x17e)](_0x373e07(0x161)));console[_0x373e07(0x16f)]('');}function execUpgradeSdk(_0x3d6fd8){const _0x5125b9=a229_0x2fa9;if(!_0x3d6fd8[_0x5125b9(0x139)])return{'step':0x1,'label':_0x5125b9(0x160),'ok':!![],'detail':_0x5125b9(0x137)};const {pkgPath:_0x959ba3,currentVersion:_0x23c14d,field:_0x5b9783}=_0x3d6fd8[_0x5125b9(0x139)];try{const _0x2014c1=readFileSync(_0x959ba3,_0x5125b9(0x14c)),_0x4ac2e3=JSON[_0x5125b9(0x171)](_0x2014c1);return _0x4ac2e3[_0x5b9783][_0x5125b9(0x13b)]=_0x5125b9(0x169),writeFileSync(_0x959ba3,JSON[_0x5125b9(0x182)](_0x4ac2e3,null,0x2)+'\x0a',_0x5125b9(0x14c)),{'step':0x1,'label':_0x5125b9(0x160),'ok':!![],'detail':_0x5b9783+'[\x22@lovrabet/sdk\x22]:\x20'+_0x23c14d+_0x5125b9(0x15b)};}catch(_0x3b5fb8){return{'step':0x1,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0x3b5fb8 instanceof Error?_0x3b5fb8[_0x5125b9(0x16e)]:String(_0x3b5fb8)};}}function printSummary(_0x40c834){const _0x7fd643=a229_0x2fa9;console[_0x7fd643(0x16f)](''),console[_0x7fd643(0x16f)](a229_0x4ae336['bold'](_0x7fd643(0x152))),console['log']('');for(const _0x11607a of _0x40c834){const _0x22e1d5=_0x11607a['ok']?a229_0x4ae336[_0x7fd643(0x167)]('OK'):a229_0x4ae336[_0x7fd643(0x17d)](_0x7fd643(0x164));console[_0x7fd643(0x16f)]('\x20\x20'+_0x22e1d5+_0x7fd643(0x17a)+_0x11607a[_0x7fd643(0x173)]+':\x20'+_0x11607a[_0x7fd643(0x15c)]);if(_0x11607a[_0x7fd643(0x185)])console[_0x7fd643(0x16f)](_0x7fd643(0x15e)+a229_0x4ae336['gray'](_0x11607a[_0x7fd643(0x185)]));}console[_0x7fd643(0x16f)]('');}export async function upgradeApp(_0x3f2fd8,_0x1d66cc){const _0x471052=a229_0x2fa9,_0x1c59a8=process[_0x471052(0x15f)](),_0x1092e4=analyseProjectUpgrade(_0x1c59a8);if(!_0x1092e4[_0x471052(0x139)]&&!_0x1092e4['apiArchitecture']['needed'])return console['log'](a229_0x4ae336[_0x471052(0x167)](_0x471052(0x15a))),{'analysis':_0x1092e4,'steps':[],'completed':!![]};printReport(_0x1092e4);const _0x237541=!!(_0x1d66cc[_0x471052(0x159)]||_0x1d66cc['Y']||_0x3f2fd8);if(!_0x237541)try{const _0x2c88bf=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x2c88bf)return console[_0x471052(0x16f)](a229_0x4ae336[_0x471052(0x17e)](_0x471052(0x184))),{'analysis':_0x1092e4,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x4aba56){if(_0x4aba56?.[_0x471052(0x16e)]===_0x471052(0x183))return console['log'](a229_0x4ae336[_0x471052(0x17e)](_0x471052(0x184))),{'analysis':_0x1092e4,'steps':[],'completed':![],'cancelled':!![]};throw _0x4aba56;}const _0xcf1d7c=[],_0x383892=a229_0x407ac9({'text':_0x471052(0x140),'color':_0x471052(0x13c)})['start'](),_0x3c0fa4=execUpgradeSdk(_0x1092e4);_0xcf1d7c[_0x471052(0x172)](_0x3c0fa4),_0x383892[_0x3c0fa4['ok']?_0x471052(0x148):'fail']('Step\x201/2:\x20@lovrabet/sdk\x20—\x20'+(_0x3c0fa4[_0x471052(0x185)]??(_0x3c0fa4['ok']?_0x471052(0x156):_0x471052(0x153))));const _0x3ee9ff=a229_0x407ac9({'text':'Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','color':_0x471052(0x13c)})['start']();let _0x10b4c7;try{_0x10b4c7=await upgradeProjectApiArchitecture(_0x1c59a8);const _0xc2803e=_0x10b4c7[_0x471052(0x176)]?'candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required':_0x471052(0x138);_0x3ee9ff[_0x471052(0x148)]('Step\x202/2:\x20Application\x20source\x20—\x20'+_0xc2803e),_0xcf1d7c[_0x471052(0x172)]({'step':0x2,'label':_0x471052(0x175),'ok':!![],'detail':_0xc2803e});}catch(_0x267736){const _0x2eac08=_0x267736 instanceof Error?_0x267736[_0x471052(0x16e)]:String(_0x267736);_0x3ee9ff[_0x471052(0x13a)](_0x471052(0x16c)+_0x2eac08),_0xcf1d7c[_0x471052(0x172)]({'step':0x2,'label':_0x471052(0x175),'ok':![],'detail':_0x2eac08});}printSummary(_0xcf1d7c);const _0x17740f=_0xcf1d7c[_0x471052(0x13d)](_0x432c01=>!_0x432c01['ok']);if(_0x17740f)console['log'](a229_0x4ae336['yellow'](_0x471052(0x186)));else _0x10b4c7?.['manualMergeRequired']?console['log'](a229_0x4ae336[_0x471052(0x157)](_0x471052(0x158))):console[_0x471052(0x16f)](a229_0x4ae336[_0x471052(0x167)]('Upgrade\x20completed\x20successfully!'));return _0x3c0fa4['ok']&&_0x1092e4[_0x471052(0x139)]&&(console['log'](''),console[_0x471052(0x16f)](a229_0x4ae336[_0x471052(0x16b)]['cyan'](_0x471052(0x14e))),console[_0x471052(0x16f)](a229_0x4ae336[_0x471052(0x13c)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x471052(0x16f)](''),console[_0x471052(0x16f)](a229_0x4ae336[_0x471052(0x174)](_0x471052(0x168))),console[_0x471052(0x16f)](a229_0x4ae336['white'](_0x471052(0x143))),console[_0x471052(0x16f)](a229_0x4ae336[_0x471052(0x174)](_0x471052(0x166))),console['log']('')),{'analysis':_0x1092e4,'steps':_0xcf1d7c,'apiArchitecture':_0x10b4c7,'completed':!_0x17740f&&!_0x10b4c7?.[_0x471052(0x176)]};}
|
|
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_0x40c81f=a230_0x1b44;function a230_0x1b44(_0x1268e8,_0x1b81b1){_0x1268e8=_0x1268e8-0x148;const _0x22127e=a230_0x2212();let _0x1b447f=_0x22127e[_0x1268e8];return _0x1b447f;}(function(_0x1ad045,_0xb9c864){const _0x31001a=a230_0x1b44,_0x1879cf=_0x1ad045();while(!![]){try{const _0x4b60bb=-parseInt(_0x31001a(0x15d))/0x1+parseInt(_0x31001a(0x187))/0x2+-parseInt(_0x31001a(0x19b))/0x3*(-parseInt(_0x31001a(0x1b4))/0x4)+-parseInt(_0x31001a(0x153))/0x5+-parseInt(_0x31001a(0x1ba))/0x6*(parseInt(_0x31001a(0x1a5))/0x7)+parseInt(_0x31001a(0x1ae))/0x8+parseInt(_0x31001a(0x14b))/0x9;if(_0x4b60bb===_0xb9c864)break;else _0x1879cf['push'](_0x1879cf['shift']());}catch(_0x2e03d3){_0x1879cf['push'](_0x1879cf['shift']());}}}(a230_0x2212,0x92254));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';function a230_0x2212(){const _0x34ea7b=['User\x20Accounts','filter','Diagnostics','Platform\x20Issue','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','push','preview','from','<script>','`\x20instead.','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','logout','permit:page-get','role:create','permit:role-apis-set','Project','has','rabetbase\x20kb\x20create','\x20\x20[','File','rabetbase\x20workspace\x20remove\x20<name>','49550KdYXxr','Authentication','\x20\x20[high-risk-write]','rabetbase\x20auth\x20logout','start','Workspace','isSingleCommand','Runtime\x20App\x20Config\x20Management','deployment:sync','rabetbase\x20app\x20list\x20--remote','app:add','permit:role-menus','get','skill:install','description','dataset:generate-status','service','data:getOne','rabetbase\x20dataset\x20design-status\x20--operation-id\x20<id>','commands','3ttfdbO','Backend\x20Function\x20Scripts','`rabetbase\x20','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','Menu','app:assets-status','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','read','rabetbase\x20kb\x20list','sql:new','203WeAdWa','Logs','data:filter','app:remote','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','Use\x20`','wildcardDef','flow:enable','rabetbase\x20kb\x20detail','270488iFiYPe','`\x20has\x20been\x20removed.','rabetbase\x20cli-skill\x20install','knowledge-base:list','rabetbase\x20bff\x20create','defaultCommand','71092hdAjhb','rabetbase\x20page\x20custom-detail','rabetbase\x20kb\x20update','app:use','rabetbase\x20run\x20preview','page:react-publish','158754uyzhoq','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','values','rabetbase\x20page\x20custom-list','API\x20Development','login','skill:','rabetbase\x20page\x20data-list-status','rabetbase\x20menu\x20asset-update','set','flow:disable','project:init','menu:update','build','length','Agent\x20Context\x20Rules','Tenant\x20Members','22200255McDLVB','bff:new','skills:install','\x20\x20[write]','page:standard-page-status','permit:role-menus-set','rabetbase\x20menu\x20subapp-assets-update\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>\x20--resources\x20\x27<json>\x27','knowledge-base:detail','488635wxpyuU','rabetbase\x20run\x20start','knowledge-base:delete','Deployment','app:assets-update','Schema','Database\x20Connections','page:custom-create','permit:page-set','page:react-update','1079404TcTOsi','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','SQL\x20Queries','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','knowledge-base:create','hidden','Run\x20Scripts','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','rabetbase\x20run\x20build','knowledge-base:update','create','Dataset\x20&\x20Operations','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','Notification\x20Configuration','rabetbase\x20dataset\x20design-start\x20--file\x20<manifest.json>','rabetbase\x20sql\x20create','Configuration','risk','command','rabetbase\x20workspace\x20use\x20--app\x20<name>','Self\x20Update'];a230_0x2212=function(){return _0x34ea7b;};return a230_0x2212();}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(_0x2498fc){const _0x16f63d=a230_0x1b44;for(const _0x1e2e5f of _0x2498fc){definitions[_0x16f63d(0x1c3)](_0x1e2e5f[_0x16f63d(0x197)]+':'+_0x1e2e5f[_0x16f63d(0x16f)],_0x1e2e5f);let _0xfec1d3=serviceGroups['get'](_0x1e2e5f['service']);!_0xfec1d3&&(_0xfec1d3=[],serviceGroups[_0x16f63d(0x1c3)](_0x1e2e5f['service'],_0xfec1d3)),_0xfec1d3[_0x16f63d(0x177)](_0x1e2e5f);}}function registerDeclarativeService(_0x11334d,_0x21dbd3,_0x7c140a){const _0x2d0fd2=a230_0x1b44;registerDefinitions(_0x21dbd3);_0x7c140a?.['wildcardDef']&®isterDefinitions([_0x7c140a[_0x2d0fd2(0x1ab)]]);const _0x1c98fd=_0x56490f=>_0x56490f===_0x2d0fd2(0x1a2)?'':_0x56490f==='write'?_0x2d0fd2(0x14e):_0x2d0fd2(0x189),_0x4d702a={'service':_0x21dbd3[0x0][_0x2d0fd2(0x197)],'label':_0x11334d,'commands':_0x21dbd3[_0x2d0fd2(0x173)](_0xf4f87b=>!_0xf4f87b[_0x2d0fd2(0x162)])['map'](_0x49ccd6=>({'command':_0x49ccd6[_0x2d0fd2(0x16f)],'description':_0x49ccd6[_0x2d0fd2(0x195)],'tag':_0x1c98fd(_0x49ccd6[_0x2d0fd2(0x16e)])})),'declarative':!![],'defaultCommand':_0x7c140a?.[_0x2d0fd2(0x1b3)]??(_0x7c140a?.[_0x2d0fd2(0x18d)]?_0x21dbd3[0x0][_0x2d0fd2(0x16f)]:undefined),'wildcardDef':_0x7c140a?.['wildcardDef'],'isSingleCommand':_0x7c140a?.[_0x2d0fd2(0x18d)]};serviceRegistry[_0x2d0fd2(0x177)](_0x4d702a),serviceByName[_0x2d0fd2(0x1c3)](_0x4d702a['service'],_0x4d702a);}registerDeclarativeService(a230_0x40c81f(0x181),projectDefinitions),registerDeclarativeService(a230_0x40c81f(0x18c),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a230_0x40c81f(0x188),authDefinitions,{'defaultCommand':a230_0x40c81f(0x1bf)}),registerDeclarativeService(a230_0x40c81f(0x14a),tenantDefinitions),registerDeclarativeService(a230_0x40c81f(0x172),userAccountDefinitions),registerDeclarativeService(a230_0x40c81f(0x168),datasetDefinitions),registerDeclarativeService(a230_0x40c81f(0x160),pageDefinitions),registerDeclarativeService(a230_0x40c81f(0x1be),apiDefinitions),registerDeclarativeService(a230_0x40c81f(0x19c),bffDefinitions),registerDeclarativeService('Instant\x20API\x20Policy',instantApiPolicyDefinitions),registerDeclarativeService(a230_0x40c81f(0x16a),notificationDefinitions),registerDeclarativeService(a230_0x40c81f(0x15f),sqlDefinitions),registerDeclarativeService(a230_0x40c81f(0x159),dbDefinitions),registerDeclarativeService(a230_0x40c81f(0x156),deploymentDefinitions),registerDeclarativeService(a230_0x40c81f(0x19f),menuDefinitions),registerDeclarativeService('Async\x20Tasks',taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService(a230_0x40c81f(0x18e),appConfigDefinitions),registerDeclarativeService('Company\x20Knowledge\x20Base',kbDefinitions),registerDeclarativeService(a230_0x40c81f(0x149),ruleDefinitions),registerDeclarativeService(a230_0x40c81f(0x175),issueDefinitions),registerDeclarativeService(a230_0x40c81f(0x185),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a230_0x40c81f(0x16d),configDefinitions),registerDeclarativeService(a230_0x40c81f(0x174),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x40c81f(0x158),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x40c81f(0x171),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService('Approval\x20Flows',flowDefinitions),registerDeclarativeService(a230_0x40c81f(0x1a6),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService(a230_0x40c81f(0x163),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a230_0x40c81f(0x148)]-0x1];last[a230_0x40c81f(0x19a)]=[{'command':a230_0x40c81f(0x17a),'description':'Run\x20any\x20package.json\x20script','tag':a230_0x40c81f(0x184)+runDefinition[a230_0x40c81f(0x16e)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([['dataset:generate-start',a230_0x40c81f(0x16b)],[a230_0x40c81f(0x196),a230_0x40c81f(0x199)],['sql:save',a230_0x40c81f(0x1a9)],[a230_0x40c81f(0x14c),a230_0x40c81f(0x1b2)],[a230_0x40c81f(0x1a4),a230_0x40c81f(0x16c)],[a230_0x40c81f(0x1c6),a230_0x40c81f(0x1c2)],[a230_0x40c81f(0x1c5),a230_0x40c81f(0x17c)],[a230_0x40c81f(0x1c0),a230_0x40c81f(0x1b0)],[a230_0x40c81f(0x194),a230_0x40c81f(0x1b0)],['skills:','rabetbase\x20cli-skill\x20install'],[a230_0x40c81f(0x14d),a230_0x40c81f(0x1b0)],[a230_0x40c81f(0x1a0),'rabetbase\x20menu\x20subapp-assets-status\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>'],[a230_0x40c81f(0x157),a230_0x40c81f(0x151)],[a230_0x40c81f(0x1a8),a230_0x40c81f(0x190)],[a230_0x40c81f(0x1b7),a230_0x40c81f(0x170)],[a230_0x40c81f(0x191),a230_0x40c81f(0x169)],['app:remove',a230_0x40c81f(0x186)],[a230_0x40c81f(0x1b1),a230_0x40c81f(0x1a3)],[a230_0x40c81f(0x152),a230_0x40c81f(0x1ad)],[a230_0x40c81f(0x161),a230_0x40c81f(0x183)],[a230_0x40c81f(0x166),a230_0x40c81f(0x1b6)],[a230_0x40c81f(0x155),'rabetbase\x20kb\x20delete'],[a230_0x40c81f(0x17f),'rabetbase\x20role\x20list'],[a230_0x40c81f(0x1a7),a230_0x40c81f(0x15e)],[a230_0x40c81f(0x198),a230_0x40c81f(0x19e)],[a230_0x40c81f(0x14f),a230_0x40c81f(0x1c1)],['page:react-create',a230_0x40c81f(0x1a1)],[a230_0x40c81f(0x15a),a230_0x40c81f(0x1a1)],['page:react-list',a230_0x40c81f(0x1bd)],['page:react-detail',a230_0x40c81f(0x1b5)],[a230_0x40c81f(0x15c),'rabetbase\x20page\x20custom-update'],[a230_0x40c81f(0x1b9),'rabetbase\x20page\x20custom-publish']]),REMOVED_COMMAND_HINTS=new Map([[a230_0x40c81f(0x1ac),a230_0x40c81f(0x164)],[a230_0x40c81f(0x1c4),a230_0x40c81f(0x164)],[a230_0x40c81f(0x18f),a230_0x40c81f(0x1bb)],[a230_0x40c81f(0x17e),a230_0x40c81f(0x176)],[a230_0x40c81f(0x15b),a230_0x40c81f(0x176)],[a230_0x40c81f(0x192),a230_0x40c81f(0x176)],[a230_0x40c81f(0x150),a230_0x40c81f(0x176)],[a230_0x40c81f(0x180),a230_0x40c81f(0x176)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a230_0x40c81f(0x167),'rabetbase\x20project\x20create\x20<project-name>'],[a230_0x40c81f(0x18b),a230_0x40c81f(0x154)],[a230_0x40c81f(0x1c7),a230_0x40c81f(0x165)],[a230_0x40c81f(0x178),a230_0x40c81f(0x1b8)],[a230_0x40c81f(0x17d),a230_0x40c81f(0x18a)]]);export function resolveRemovedCommand(_0x1f0fc4,_0x5b00a8){const _0x205450=a230_0x40c81f;if(!_0x1f0fc4)return undefined;const _0x2adb58=REMOVED_COMMAND_REPLACEMENTS[_0x205450(0x193)](_0x1f0fc4+':'+(_0x5b00a8??'')),_0x12a037=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x205450(0x193)](_0x1f0fc4),_0x2bbda8=_0x2adb58??_0x12a037,_0x7eea6d=REMOVED_COMMAND_HINTS['get'](_0x1f0fc4+':'+(_0x5b00a8??''));if(!_0x2bbda8&&!_0x7eea6d)return undefined;const _0x1f899a=_0x12a037?_0x1f0fc4:_0x5b00a8?_0x1f0fc4+'\x20'+_0x5b00a8:_0x1f0fc4;return{'command':_0x1f899a,'message':_0x205450(0x19d)+_0x1f899a+_0x205450(0x1af),'hint':_0x7eea6d??_0x205450(0x1aa)+_0x2bbda8+_0x205450(0x17b)};}export function findDefinition(_0x469133,_0x1609fc){const _0x5352a1=a230_0x40c81f;return definitions[_0x5352a1(0x193)](_0x469133+':'+_0x1609fc);}export function isKnownService(_0x447af7){const _0x30cc2c=a230_0x40c81f;return serviceByName[_0x30cc2c(0x182)](_0x447af7);}export function isDeclarativeService(_0x34c81d){const _0x66b7b6=a230_0x40c81f;return serviceGroups[_0x66b7b6(0x182)](_0x34c81d)||serviceByName[_0x66b7b6(0x193)](_0x34c81d)?.[_0x66b7b6(0x1ab)]!==undefined;}export function getServiceEntry(_0x42f600){const _0x30cd90=a230_0x40c81f;return serviceByName[_0x30cd90(0x193)](_0x42f600);}export function getLegacyHandler(_0x295180,_0x51f927){return undefined;}export function getAllDefinitions(){const _0x3b5c87=a230_0x40c81f;return Array[_0x3b5c87(0x179)](definitions[_0x3b5c87(0x1bc)]());}
|
|
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+')'};}};
|